From aeb8685d9cafbfb42ecc587ebc8bc54f1e34be46 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期二, 15 十月 2024 18:03:01 +0800 Subject: [PATCH] feat:液氯瓶装流程 --- subPages/addDailyPlan/addDailyPlan.vue | 56 ++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 48 insertions(+), 8 deletions(-) diff --git a/subPages/addDailyPlan/addDailyPlan.vue b/subPages/addDailyPlan/addDailyPlan.vue index fe1ddbf..34c0417 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,22 @@ 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" 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.bunkerName }}</view></uni-td> + 聽 <uni-td align="center"> + <view> + <u-input + v-model="subDataList[index].quant" + border="surround" + placeholder="璇疯緭鍏ユ暟閲�" /> + </view></uni-td> </uni-tr> </uni-table> </view> @@ -158,9 +163,14 @@ uni.$on('updateData',(data)=>{ console.log('鐩戝惉鍒颁簨浠舵潵鑷� updateData 锛屾惡甯﹀弬鏁颁负锛�' + JSON.parse( JSON.stringify(data)) , JSON.parse(data) .id ); const params = JSON.parse(data); + // this.checkList2 = params.map(item=>{ + // item.text = item.orderCode + '/' + item.customerName; + // return item; + // }); + // let temp = this.checkList2; + // this.closeOrderIds = temp.map(item=>item.id).join(',') + this.activeName = params.orderCode +'/' + params.customerName; this.closeOrderId = params.id; - this.activeName = params.orderCode + '/' + params.customerName; - }) @@ -171,7 +181,11 @@ deptId: '', checkList:[], deptName: '', + mapProductNum:'', activeName:'', + isNumOk:false, + isNumData:[], + checkList2:[], deptList: [], uncoidCard:'', productName: '', @@ -184,7 +198,7 @@ sendDateStart: '', sendDateEnd: '', customerId: '', - closeOrderId:'', + closeOrderIds:'', value:'', customerName: '', customerNameList: [], @@ -250,7 +264,9 @@ if(this.deptId){ this.subDataList = this.customerNameList.filter(item=>item.id === e).length ? + this.customerNameList.filter(item=>item.id === e)[0].tmOrderList : []; + console.log(this.subDataList,'subDataList') const tempArr = this.customerNameList.filter(item=>item.id === e); if(tempArr.length){ this.unionParams = { @@ -270,12 +286,33 @@ }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.quant); + }) + this.mapProductNum = tempArr.join(",") + }else{ + this.mapProductNum = ''; + } } }) }, confirmBuild() { + let tempArr = []; + this.subDataList.forEach(item=>{ + tempArr.push(item.productId + ':' + item.quant); + }) + this.mapProductNum = tempArr.join(",") let form = { orderId:this.deptId, carNum:this.value, @@ -283,6 +320,8 @@ sendSign:0, itemIds:this.checkList.join(",") + ',', closeOrderId:this.closeOrderId, + mapProductNum:this.mapProductNum, + } this.buildLoading = true this.$reqPost('addDeliveryPlan', form, 'json').then(res => { @@ -315,12 +354,13 @@ todoUncoid(){ console.log('todoUncoid'); uni.navigateTo({ - url: `/subPages/unionCard/unionCard?unionParams=${JSON.stringify(this.unionParams) }` + url: `/subPages/unionCard/unionCard?unionParams=${JSON.stringify(this.unionParams)}&checkArray=${JSON.stringify(this.checkList2) }` }); }, clearInp(){ this.closeOrderId = ''; + this.activeName = ''; } }, } -- Gitblit v1.9.1