This commit is contained in:
zpc 2025-06-16 21:33:00 +08:00
parent 05ccf0ffa9
commit 68068c2cb7

View File

@ -1,311 +1,307 @@
<template>
<view class="content">
<uni-nav-bar color="#000000" backgroundColor="transparent" :fixed="true" :statusBar="true" :border="false"
@clickLeft="$common.back">
<view style="font-size: 34rpx; width: 100%; display: flex; justify-content: center; align-items: center;">
我的盒柜
<page-container title="我的盒柜">
<view class="content">
<view class="tab">
<view class="tab-item center relative" v-for="(item, i) in tabList" :key="i"
:class="tabCur == i ? 'act' : 'unact'" @click="tabChange(i)">
<text>{{ item.title }}</text>
</view>
</view>
</uni-nav-bar>
<view class="tab">
<view class="tab-item center relative" v-for="(item, i) in tabList" :key="i"
:class="tabCur == i ? 'act' : 'unact'" @click="tabChange(i)">
<text>{{ item.title }}</text>
</view>
</view>
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="getList" :down="downOption"
:up="upOption">
<template v-if="tabList[tabCur].id == 1">
<view class="search">
<view class="input-box">
<input v-model="keyword" placeholder-style="color:#8A8A8A;" placeholder="请输入关键字" />
<view class="icon" @click="tabChange(tabCur)">
<uni-icons type="search" color="#8A8A8A"></uni-icons>
</view>
</view>
<view class="rule column align-center" @click="$refs.rulePop.getRule(10, '发货规则')">
<image class="img100" :src="$img1('shangdai/shuoming.png')"></image>
</view>
</view>
<view class="sub-tab">
<view class="sub-tab-item common_bg center" v-for="(item, i) in subTab" :key="i"
:class="subTabCur == i ? 'act' : 'unact'" @click="subTabChange(i)">
<text>{{ item.title }}</text>
</view>
</view>
<view class="num-all">
<view class="flex row">
<view class="num">
<text>{{ nowNum }}</text>
个赏品
</view>
<view class="all" style="margin-left: 30rpx;">
已选
<text>{{ nowChooseNum }}</text>
</view>
</view>
<view class="flex row" v-if="tabList[tabCur].id == 1">
<view class="flex center" @click="tabChange(tabCur)"
style="width: 88rpx; height: 40rpx; background-color: #F5F5F5; border-radius: 8rpx;">
<text style="color: #333333; font-size: 20rpx;">刷新</text>
</view>
<view class="" @click="chooseAll">
<view v-if="isAll" class="flex center"
style="width: 88rpx; height: 40rpx; background-color: #E6F791; border-radius: 8rpx; margin-left: 32rpx;">
<text style="color: #333333; font-size: 20rpx;">全选</text>
<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="getList" :down="downOption"
:up="upOption">
<template v-if="tabList[tabCur].id == 1">
<view class="search">
<view class="input-box">
<input v-model="keyword" placeholder-style="color:#8A8A8A;" placeholder="请输入关键字" />
<view class="icon" @click="tabChange(tabCur)">
<uni-icons type="search" color="#8A8A8A"></uni-icons>
</view>
<view v-else class="flex center"
style="width: 88rpx; height: 40rpx; background-color: #F5F5F5; border-radius: 8rpx; margin-left: 32rpx;">
<text style="color: #333333; font-size: 20rpx;">全选</text>
</view>
<view class="rule column align-center" @click="$refs.rulePop.getRule(10, '发货规则')">
<image class="img100" :src="$img1('shangdai/shuoming.png')"></image>
</view>
</view>
<view class="sub-tab">
<view class="sub-tab-item common_bg center" v-for="(item, i) in subTab" :key="i"
:class="subTabCur == i ? 'act' : 'unact'" @click="subTabChange(i)">
<text>{{ item.title }}</text>
</view>
</view>
<view class="num-all">
<view class="flex row">
<view class="num">
<text>{{ nowNum }}</text>
个赏品
</view>
<view class="all" style="margin-left: 30rpx;">
已选
<text>{{ nowChooseNum }}</text>
</view>
</view>
<view class="flex row" v-if="tabList[tabCur].id == 1">
<view class="flex center" @click="tabChange(tabCur)"
style="width: 88rpx; height: 40rpx; background-color: #F5F5F5; border-radius: 8rpx;">
<text style="color: #333333; font-size: 20rpx;">刷新</text>
</view>
<view class="" @click="chooseAll">
<view v-if="isAll" class="flex center"
style="width: 88rpx; height: 40rpx; background-color: #E6F791; border-radius: 8rpx; margin-left: 32rpx;">
<text style="color: #333333; font-size: 20rpx;">全选</text>
</view>
<view v-else class="flex center"
style="width: 88rpx; height: 40rpx; background-color: #F5F5F5; border-radius: 8rpx; margin-left: 32rpx;">
<text style="color: #333333; font-size: 20rpx;">全选</text>
</view>
</view>
</view>
</view>
</view>
<view class="list">
<view class="list-item" v-for="(a, b) in GetOrderList" :key="a.prize_code">
<view class="pic">
<image :src="a.goodslist_imgurl" lazy-load></image>
<view class="num">{{ a.prize_num }}</view>
<view class="yu-tag ziti" v-if="subTab[subTabCur].id == 2">预售</view>
</view>
<view class="name hang1">{{ a.goodslist_title }}</view>
<view class="price" v-if="false">
{{
a.goodslist_money * 1 > 0
? `可分解:${a.goodslist_money}`
: `不可分解`
}}
</view>
<view class="num-box">
<view class="icon flex" @click="jian(a)">
<image class="img100" :src="$img1('shangdai/jian.png')"></image>
</view>
<input v-model="a.chooseNum" disabled="true" @blur="verifyNum(a)" />
<view class="icon flex" @click="jia(a)">
<image class="img100" :src="$img1('shangdai/jia.png')"></image>
</view>
</view>
</view>
</view>
</template>
<!-- 申请提货/已发货/完成提货 -->
<view v-else class="order-list">
<view class="order-item" v-for="(item, i) in listData" :key="i" @click="toOrder(item)">
<view class="order-hd">
<view class="time">申请时间{{ item.addtime }}</view>
<view class="status">{{ item.status_name }}</view>
</view>
<scroll-view class="order-bd" scroll-x>
<view class="order-goods" v-for="(a, b) in item.order_list" :key="b">
<view class="list">
<view class="list-item" v-for="(a, b) in GetOrderList" :key="a.prize_code">
<view class="pic">
<image :src="a.goodslist_imgurl" lazy-load></image>
<view class="num center">{{ a.prize_num }}</view>
<view class="num2 center" v-if="a.fh_status == 1">已发货</view>
<view class="num">{{ a.prize_num }}</view>
<view class="yu-tag ziti" v-if="subTab[subTabCur].id == 2">预售</view>
</view>
<view class="title hang1">
{{ a.goodslist_title }}
</view>
</view>
</scroll-view>
<view class="order-btns mt20" v-if="item.status == 2" @click.stop>
<view class="btn center" @click="toExpress(item)">查看物流</view>
<view class="btn2 center ml30" @click="submitGet(item)">确认收货</view>
</view>
</view>
</view>
</mescroll-body>
<view v-if="tabList[tabCur].id == 1" class="bt-fixed">
<template v-if="subTab[subTabCur].id != 4">
<view v-if="subTab[subTabCur].id != 6 && is_exchange == '1' && show_dadajuan" class="btn center"
@click="open('changePop')">达达券</view>
<view v-if="subTab[subTabCur].id != 2" class="btn2 center" @click="open('sendPop')">发货</view>
<view v-if="subTab[subTabCur].id != 6" class="btn center" @click="open('model')">上锁</view>
</template>
<view v-else class="btn center" @click="open('model')">解锁</view>
</view>
<!-- 兑换弹窗 -->
<uni-popup ref="changePop" type="bottom">
<view class="change-pop relative">
<view class="change-pop-hd">
<text class="">兑换确认</text>
<view class="close icon" @click="close('changePop')">
<image :src="$img('/static/img/close2.png')" lazy-load></image>
</view>
</view>
<view class="change-pop-bd">
<view class="bd-top">
<view>已选
<text style="color: #333333;">{{ nowChooseNum }}</text>
件赏品
</view>
</view>
<scroll-view class="bd-goods" scroll-x>
<view class="goods-item" v-for="(item, i) in handelList" :key="i">
<view class="pic">
<image :src="item.goodslist_imgurl" lazy-load></image>
<view class="num center">{{ item.chooseNum }}</view>
</view>
<view class="title hang1">
{{ item.goodslist_title }}
</view>
</view>
</scroll-view>
</view>
<view class="align-center justify-center mt30"
style="background-color: #FFFFFF; height: 82rpx; border-radius: 16rpx;">
<view class="" style="color: #333333;">
<text style="color: #333333;">{{ nowChooseNum }}</text>
件物品合计兑换<text style="color: #333333;"></text>
<text style="color: #333333; font-size: 30rpx;">{{ totalChangeMoney }}</text>
<text style="">{{ this.$config.getAppSetting('currency2_name') }}</text>
</view>
</view>
<view class="change-pop-ft" @click="$common.noDouble(submitChange)">
<text>确认兑换</text>
</view>
</view>
</uni-popup>
<uni-popup ref="sendPop" type="bottom">
<view class="send-pop relative">
<view class="send-pop-hd">
发货确认单
<view class="close icon" @click="close('sendPop')">
<image :src="$img('/static/img/close2.png')" lazy-load></image>
</view>
</view>
<view class="send-pop-card">
<view class="card-top">
<view>已选
<text style="color: #333333;">{{ nowChooseNum }}</text>
件赏品
</view>
</view>
<scroll-view class="card-goods" scroll-x>
<view class="goods-item" v-for="(item, i) in handelList" :key="i">
<view class="pic">
<image :src="item.goodslist_imgurl" lazy-load></image>
<view class="num center">{{ item.chooseNum }}</view>
</view>
<view class="title hang1">
{{ item.goodslist_title }}
</view>
</view>
</scroll-view>
</view>
<view class="br20 mt20" style="background: #FFFFFF;padding: 0 20rpx;">
<view class="address" @click="chooseAdd">
<view v-if="!addData" class="add-choose">请选择收货地址</view>
<view v-else class="add-info">
<view class="name-phone">
<view>{{ addData.userName }}</view>
<view class="phone">{{ addData.telNumber }}</view>
</view>
<view class="add-text">
{{ addData.detailed_address }}
</view>
</view>
<view class="icon">
<image :src="$img1('common/right1.png')" lazy-load></image>
</view>
</view>
<view class="freight border">
<view>快递({{ freightData.free_post }}件包邮)</view>
<view>
<text>
<view class="name hang1">{{ a.goodslist_title }}</view>
<view class="price" v-if="false">
{{
nowChooseNum >= freightData.free_post
? '包邮'
: `¥${freightData.post_money}`
a.goodslist_money * 1 > 0
? `可分解:${a.goodslist_money}`
: `不可分解`
}}
</text>
</view>
</view>
</view>
<view class="agree" @click="isAgree = !isAgree">
<view class="icon">
<image v-if="isAgree" :src="$img1('common/check_act.png')" lazy-load></image>
<image v-else :src="$img1('common/check.png')" lazy-load></image>
</view>
我已满18岁,阅读并同意
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=4' })">
用户协议
</text>
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=5' })">
隐私政策
</text>
</view>
<view class="send-pop-ft mt30" @click="$common.noDouble(submitSend)">
<text>确认发货</text>
</view>
</view>
</uni-popup>
<!-- 上锁弹窗 -->
<uni-popup ref="model" type="center">
<view class="model flex center">
<view class="model-bd">{{ lockMsg }}</view>
</view>
<view class="model-ft row">
<view class="model-btn" @click="close('model')">取消</view>
<view class="model-btn act" @click="$common.noDouble(submitLock)">
确定
</view>
</view>
</uni-popup>
<uni-popup ref="resPop" type="center" mask-background-color="rgba(0,0,0,0.8)">
<view class="res-pop column center">
<!-- <view class="res-pop-hd"></view> -->
<view class="res-list center">
<view class="res-item center column">
<view class="pic center">
<image class="img100" :src="$img1('shangdai/qianbao.png')" lazy-load></image>
</view>
<view class="item-info">
<view class="title center hang1">
恭喜您成功兑换获得{{ zhanshiMoney }} {{ this.$config.getAppSetting('currency2_name') }}
</view>
<view class="num-box">
<view class="icon flex" @click="jian(a)">
<image class="img100" :src="$img1('shangdai/jian.png')"></image>
</view>
<input v-model="a.chooseNum" disabled="true" @blur="verifyNum(a)" />
<view class="icon flex" @click="jia(a)">
<image class="img100" :src="$img1('shangdai/jia.png')"></image>
</view>
</view>
</view>
</view>
</view>
<view class="res-pop-ft center justify-center" @click="$refs.resPop.close()">
<text>确定</text>
</view>
</view>
</uni-popup>
</template>
<!-- 申请提货/已发货/完成提货 -->
<view v-else class="order-list">
<view class="order-item" v-for="(item, i) in listData" :key="i" @click="toOrder(item)">
<view class="order-hd">
<view class="time">申请时间{{ item.addtime }}</view>
<view class="status">{{ item.status_name }}</view>
</view>
<scroll-view class="order-bd" scroll-x>
<view class="order-goods" v-for="(a, b) in item.order_list" :key="b">
<view class="pic">
<image :src="a.goodslist_imgurl" lazy-load></image>
<view class="num center">{{ a.prize_num }}</view>
<view class="num2 center" v-if="a.fh_status == 1">已发货</view>
</view>
<view class="title hang1">
{{ a.goodslist_title }}
</view>
</view>
</scroll-view>
<view class="order-btns mt20" v-if="item.status == 2" @click.stop>
<view class="btn center" @click="toExpress(item)">查看物流</view>
<view class="btn2 center ml30" @click="submitGet(item)">确认收货</view>
</view>
</view>
</view>
</mescroll-body>
<view v-if="tabList[tabCur].id == 1" class="bt-fixed">
<template v-if="subTab[subTabCur].id != 4">
<view v-if="subTab[subTabCur].id != 6 && is_exchange == '1' && show_dadajuan" class="btn center"
@click="open('changePop')">达达券</view>
<view v-if="subTab[subTabCur].id != 2" class="btn2 center" @click="open('sendPop')">发货</view>
<view v-if="subTab[subTabCur].id != 6" class="btn center" @click="open('model')">上锁</view>
</template>
<view v-else class="btn center" @click="open('model')">解锁</view>
</view>
<!-- 兑换弹窗 -->
<uni-popup ref="changePop" type="bottom">
<view class="change-pop relative">
<view class="change-pop-hd">
<text class="">兑换确认</text>
<view class="close icon" @click="close('changePop')">
<image :src="$img('/static/img/close2.png')" lazy-load></image>
</view>
</view>
<view class="change-pop-bd">
<view class="bd-top">
<view>已选
<text style="color: #333333;">{{ nowChooseNum }}</text>
件赏品
</view>
</view>
<scroll-view class="bd-goods" scroll-x>
<view class="goods-item" v-for="(item, i) in handelList" :key="i">
<view class="pic">
<image :src="item.goodslist_imgurl" lazy-load></image>
<view class="num center">{{ item.chooseNum }}</view>
</view>
<view class="title hang1">
{{ item.goodslist_title }}
</view>
</view>
</scroll-view>
</view>
<view class="align-center justify-center mt30"
style="background-color: #FFFFFF; height: 82rpx; border-radius: 16rpx;">
<view class="" style="color: #333333;">
<text style="color: #333333;">{{ nowChooseNum }}</text>
件物品合计兑换<text style="color: #333333;"></text>
<text style="color: #333333; font-size: 30rpx;">{{ totalChangeMoney }}</text>
<text style="">{{ this.$config.getAppSetting('currency2_name') }}</text>
</view>
</view>
<view class="change-pop-ft" @click="$common.noDouble(submitChange)">
<text>确认兑换</text>
</view>
</view>
</uni-popup>
<uni-popup ref="sendPop" type="bottom">
<view class="send-pop relative">
<view class="send-pop-hd">
发货确认单
<view class="close icon" @click="close('sendPop')">
<image :src="$img('/static/img/close2.png')" lazy-load></image>
</view>
</view>
<view class="send-pop-card">
<view class="card-top">
<view>已选
<text style="color: #333333;">{{ nowChooseNum }}</text>
件赏品
</view>
</view>
<scroll-view class="card-goods" scroll-x>
<view class="goods-item" v-for="(item, i) in handelList" :key="i">
<view class="pic">
<image :src="item.goodslist_imgurl" lazy-load></image>
<view class="num center">{{ item.chooseNum }}</view>
</view>
<view class="title hang1">
{{ item.goodslist_title }}
</view>
</view>
</scroll-view>
</view>
<view class="br20 mt20" style="background: #FFFFFF;padding: 0 20rpx;">
<view class="address" @click="chooseAdd">
<view v-if="!addData" class="add-choose">请选择收货地址</view>
<view v-else class="add-info">
<view class="name-phone">
<view>{{ addData.userName }}</view>
<view class="phone">{{ addData.telNumber }}</view>
</view>
<view class="add-text">
{{ addData.detailed_address }}
</view>
</view>
<view class="icon">
<image :src="$img1('common/right1.png')" lazy-load></image>
</view>
</view>
<view class="freight border">
<view>快递({{ freightData.free_post }}件包邮)</view>
<view>
<text>
{{
nowChooseNum >= freightData.free_post
? '包邮'
: `¥${freightData.post_money}`
}}
</text>
</view>
</view>
</view>
<view class="agree" @click="isAgree = !isAgree">
<view class="icon">
<image v-if="isAgree" :src="$img1('common/check_act.png')" lazy-load></image>
<image v-else :src="$img1('common/check.png')" lazy-load></image>
</view>
我已满18岁,阅读并同意
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=4' })">
用户协议
</text>
<text @click.stop="$common.to({ url: '/pages/guize/guize?type=5' })">
隐私政策
</text>
</view>
<view class="send-pop-ft mt30" @click="$common.noDouble(submitSend)">
<text>确认发货</text>
</view>
</view>
</uni-popup>
<!-- 上锁弹窗 -->
<uni-popup ref="model" type="center">
<view class="model flex center">
<view class="model-bd">{{ lockMsg }}</view>
</view>
<view class="model-ft row">
<view class="model-btn" @click="close('model')">取消</view>
<view class="model-btn act" @click="$common.noDouble(submitLock)">
确定
</view>
</view>
</uni-popup>
<uni-popup ref="resPop" type="center" mask-background-color="rgba(0,0,0,0.8)">
<view class="res-pop column center">
<!-- <view class="res-pop-hd"></view> -->
<view class="res-list center">
<view class="res-item center column">
<view class="pic center">
<image class="img100" :src="$img1('shangdai/qianbao.png')" lazy-load></image>
</view>
<view class="item-info">
<view class="title center hang1">
恭喜您成功兑换获得{{ zhanshiMoney }} {{ this.$config.getAppSetting('currency2_name') }}
</view>
</view>
</view>
</view>
<view class="res-pop-ft center justify-center" @click="$refs.resPop.close()">
<text>确定</text>
</view>
</view>
</uni-popup>
<rule-pop ref="rulePop"></rule-pop>
</view>
</page-container>
<rule-pop ref="rulePop"></rule-pop>
</view>
</template>
<script>
@ -465,9 +461,7 @@ export default {
},
onReady() {
// this.open('changePop')
// this.open('sendPop')
// this.open('model')
},
methods: {
@ -765,7 +759,7 @@ export default {
data.status = this.tabList[this.tabCur].status
}
try {
this.req({
url,
data,