From 74073d164925eff4962188405355debb367aaf06 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 24 十月 2024 18:13:25 +0800 Subject: [PATCH] feat:小问题修改 --- subPages/addDailyPlan/addDailyPlan.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 49 insertions(+), 5 deletions(-) diff --git a/subPages/addDailyPlan/addDailyPlan.vue b/subPages/addDailyPlan/addDailyPlan.vue index 75caa41..8cd2ed2 100644 --- a/subPages/addDailyPlan/addDailyPlan.vue +++ b/subPages/addDailyPlan/addDailyPlan.vue @@ -44,6 +44,7 @@ class="customer-name_block-input" placeholder="璇疯緭鍏ヨ溅鏁�" border="surround" + :disabled="isNumOk" v-model="value" ></u--input> </view> @@ -74,18 +75,24 @@ emptyText="鏆傛棤鏇村鏁版嵁"> <uni-tr> <uni-th align="center">浜у搧鍚嶇О</uni-th> - <uni-th align="center">绫诲瀷</uni-th> + <uni-th align="center">瑙勬牸</uni-th> <uni-th align="center">浠撳簱</uni-th> + <uni-th align="center" v-if="isNumOk">鏁伴噺</uni-th> </uni-tr> <uni-tr v-for="(item, index) in subDataList" :key="index"> <uni-td align="center"> <view>{{ item.productName}}</view></uni-td> - <uni-td> - <view class="name">{{ item.orderType }}</view> - </uni-td> - + <uni-td align="center"> + <view>{{ item.productSpecs}}</view></uni-td> 聽 <uni-td align="center"> <view>{{ item.bunkerName }}</view></uni-td> + 聽 <uni-td align="center" v-if="isNumOk"> + <view> + <u-input + v-model="subDataList[index].surplusQuant" + border="surround" + placeholder="璇疯緭鍏ユ暟閲�" /> + </view></uni-td> </uni-tr> </uni-table> </view> @@ -176,6 +183,7 @@ deptId: '', checkList:[], deptName: '', + mapProductNum:'', activeName:'', isNumOk:false, isNumData:[], @@ -198,6 +206,8 @@ customerNameList: [], buildLoading: false, subDataList:[], + isWeighing:'', + orderType:'', } }, computed: { @@ -280,12 +290,42 @@ }else{ this.subDataList = []; } + //鏌ョ湅鏄笉鏄噰璐殑璁℃暟 + if(this.subDataList.find(item=>item.isWeight === 0)){ + this.isNumOk = true; + this.value = 1; + } else{ + this.isNumOk = false; + } + if(this.isNumOk){ + let tempArr = []; + this.subDataList.forEach(item=>{ + tempArr.push(item.productId + ':' + item.surplusQuant); + this.isWeighing = item.isWeight; + this.orderType = item.orderType; + }) + + this.mapProductNum = tempArr.join(",") + }else{ + this.mapProductNum = ''; + } } }) }, confirmBuild() { + let tempArr = []; + this.subDataList.forEach(item=>{ + this.checkList.forEach(val=>{ + if(item.id === val){ + tempArr.push(item.productId + ':' + item.surplusQuant); + } + + }) + + }) + this.mapProductNum = tempArr.join(",") let form = { orderId:this.deptId, carNum:this.value, @@ -293,6 +333,10 @@ sendSign:0, itemIds:this.checkList.join(",") + ',', closeOrderId:this.closeOrderId, + mapProductNum:this.mapProductNum, + orderType:this.orderType, + isWeighing:this.isWeighing + } this.buildLoading = true this.$reqPost('addDeliveryPlan', form, 'json').then(res => { -- Gitblit v1.9.1