From 16c42e89312ec86a5c75092cc3bf83d2fe625c8f Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期一, 16 十二月 2024 10:13:37 +0800 Subject: [PATCH] feat:pvc拼单大于40二次确认 --- subPages/pvcSplicePage/index.vue | 71 ++++++++++++++++++++++++----------- 1 files changed, 48 insertions(+), 23 deletions(-) diff --git a/subPages/pvcSplicePage/index.vue b/subPages/pvcSplicePage/index.vue index 330b502..15e9206 100644 --- a/subPages/pvcSplicePage/index.vue +++ b/subPages/pvcSplicePage/index.vue @@ -15,11 +15,12 @@ <uni-th align="center">鎿嶄綔</uni-th> </uni-tr> <uni-tr v-for="(item, index) in daiPageList" - :key="item.id"> + :key="index"> <uni-td align="center">{{ item.productName || '' }}</uni-td> <uni-td align="center">{{ item.customerName || '' }}</uni-td> - <uni-td align="center"><u-button text="閫夋嫨" + <uni-td align="center"> + <u-button text="閫夋嫨" type="primary" :disabled=" item.isPretendDischar === 1" @click="enterOk(item)"></u-button></uni-td> @@ -42,7 +43,7 @@ <uni-th align="center">鎿嶄綔</uni-th> </uni-tr> <uni-tr v-for="(item, index) in yiPageList" - :key="item.id"> + :key="index"> <uni-td align="center">{{ item.productName || '' }}</uni-td> <uni-td align="center">{{ item.customerName || '' }}</uni-td> <uni-td align="center"><u-button text="鍒犻櫎" @@ -139,6 +140,7 @@ onLoad(params){ console.log(params,'params') this.mainTmTaskId = JSON.parse(params.item).id; + this.init(); console.log(JSON.parse(params.item).id,'213123') }, @@ -147,11 +149,12 @@ }, onShow(){ - this.init(); + // this.init(); }, data() { return { daiPageList:[], + radioNum:'', yiPageList:[], quxiaoShow:false, radioValue:'', @@ -168,19 +171,20 @@ methods: { init(){ this.$reqGet('pvcSplicingList').then((res) => { - console.log(res,'res') + console.log(res.data.list1,this.daiPageList,'res'); this.daiPageList = res.data.list1; this.yiPageList = res.data.list2; }) }, enterOk(item){ + console.log(item,'12313') this.activeObj = item; - this.getBuild(); + this.getBuild(item); }, getBuild(item){ - this.$reqGet('getBuildList',{orderPlanId:this.activeObj.orderPlanId,customerId:this.activeObj.customerId,status:1,fleetId:this.activeObj.fleetId}).then(res=>{ + this.$reqGet('getBuildList',{orderPlanId:item.orderPlanId,customerId:item.customerId,status:1,fleetId:item.fleetId}).then(res=>{ console.log(res,'resss') this.showLing = true; this.pageList = res.data.map(item=>{ @@ -200,7 +204,14 @@ if(!this.radioValue){ return this.$u.toast('蹇呴』閫夋嫨瑙勬牸') }else{ - let result = this.yiPageList.reduce((cur,next)=>cur + (next.productQuantity),Number(this.radioValue)); + let radioNum = this.pageList.find(item=>item.id === this.radioValue).planMeasure; + console.log(radioNum,'ressi88') + let result = this.yiPageList.reduce((cur,next)=>{ + return Number(cur) + Number(next.productQuantity) + },radioNum); + + + console.log(result,'result') if(result >= 40){ uni.showModal({ title: '鎻愮ず', @@ -208,30 +219,44 @@ cancelText: "鍙栨秷", // 鍙栨秷鎸夐挳鐨勬枃瀛� d confirmText: "纭", // 纭鎸夐挳鐨勬枃瀛� showCancel: true, // 鏄惁鏄剧ず鍙栨秷鎸夐挳锛岄粯璁や负 true - confirmColor: '#f55850', - cancelColor: '#39B54A', success: (res) => { if(res.confirm) { console.log('comfirm') //鐐瑰嚮纭畾涔嬪悗鎵ц鐨勪唬鐮� + if (this.activeObj.tmcCount == '0') { + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } else { + // this.qiangDanOrderPlanId = value.orderPlanId + // this.fleetId = + // this.customerId = !value.customerId ? '0' : value.customerId; + // this.xsUserId = !value.xsUserId ? '0' : value.xsUserId; + // this.qiangDanShow = true; + this.$u.toast(`褰撳墠宸叉帴${value.tmcCount}鍗昤); + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } } else { console.log('cancel') //鐐瑰嚮鍙栨秷涔嬪悗鎵ц鐨勪唬鐮� } } }) + }else{ + if (this.activeObj.tmcCount == '0') { + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } else { + // this.qiangDanOrderPlanId = value.orderPlanId + // this.fleetId = + // this.customerId = !value.customerId ? '0' : value.customerId; + // this.xsUserId = !value.xsUserId ? '0' : value.xsUserId; + // this.qiangDanShow = true; + this.$u.toast(`褰撳墠宸叉帴${value.tmcCount}鍗昤); + this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, + !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); + } + } - if (this.activeObj.tmcCount == '0') { - this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, - !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); - } else { - // this.qiangDanOrderPlanId = value.orderPlanId - // this.fleetId = - // this.customerId = !value.customerId ? '0' : value.customerId; - // this.xsUserId = !value.xsUserId ? '0' : value.xsUserId; - // this.qiangDanShow = true; - this.$u.toast(`褰撳墠宸叉帴${value.tmcCount}鍗昤); - this.qiangDan(this.activeObj.orderPlanId,this.activeObj.fleetId, !this.activeObj.customerId ? '0' : this.activeObj.customerId, - !this.activeObj.xsUserId ? '0' : this.activeObj.xsUserId,this.mainTmTaskId); - } + } -- Gitblit v1.9.1