From 82fa9121ff649bb681fc55e482fe405c5ce0d4d0 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期三, 22 三月 2023 13:48:29 +0800 Subject: [PATCH] 称重界面完成(上磅计量页面完成) --- pages/driver-page/driver-index/driver-index.vue | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue index 41a08cd..3446a6c 100644 --- a/pages/driver-page/driver-index/driver-index.vue +++ b/pages/driver-page/driver-index/driver-index.vue @@ -16,7 +16,7 @@ <text>{{ item.carNum }}</text> 寮� </view> - <view class="card-left__utils"><u-button @tap.stop="qiangDanBtn(item.orderPlanId)" text="鎶㈠崟" type="primary" shape="circle"></u-button></view> + <view class="card-left__utils"><u-button @tap.stop="qiangDan(item.orderPlanId)" text="鎶㈠崟" type="primary" shape="circle"></u-button></view> </template> <template v-slot:right-top> <view class="right-top"> @@ -126,7 +126,8 @@ // 鎶㈠崟妯℃�佹 qiangDanShow: false, qiangDanTitle: '鎶㈠崟鎻愮ず', - qiangDanContent: '' + qiangDanContent: '', + qiangDanOrderPlanId:null }; }, onShow() { @@ -141,33 +142,37 @@ uni.showLoading({ title: '鍔犺浇涓�...' }); - // this.$reqGet('qiangDanList', { id: customerId }).then(res => { this.$reqGet('qiangDanList').then(res => { - console.log('鎶㈠崟鍒楄〃', res); uni.hideLoading(); this.driverBillOfLoadingData = res.data; }); }, // 鎶㈠崟鎸夐挳 qiangDanBtn(value) { - if (value.taskNum == 0) { + if (value.tmcCount == 0) { this.qiangDan(value.orderPlanId); } else { + this.qiangDanOrderPlanId = value.orderPlanId + this.qiangDanShow = true + this.qiangDanContent = `宸叉姠${value.tmcCount}鍗曪紝纭畾鎶㈠崟锛焋 } }, // 鎶㈠崟妯℃�佹 - qiangDanConfirm() {}, + qiangDanConfirm() { + this.qiangDanContent = '' + this.qiangDan(this.qiangDanOrderPlanId); + }, qiangDanCancel() { this.qiangDanShow = false; }, // 鎶㈠崟璇锋眰 qiangDan(id) { - // this.$reqPost('qiangDan', { orderPlanId: id, wxUserId: customerId }, 'params').then(res => { this.$reqPost('qiangDan', { orderPlanId: id }, 'params').then(res => { if (res.code == 0) { this.$u.toast('鎶㈠崟鎴愬姛'); + } else { + this.$u.toast(res.data ? res.data : '鎶㈠崟澶辫触'); } - console.log('鎶㈠崟', res); this.qiangDanList(); }); }, -- Gitblit v1.9.1