From c5c6d6924fb3953af9036ba5e987940df100acfe Mon Sep 17 00:00:00 2001 From: kilo Date: Wed, 2 Aug 2023 19:52:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E9=85=8D=E8=AE=A1=E5=88=92=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=9B=9E=E6=98=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/reservation/reservation.vue | 16 +++++++++++- .../turndelivery/deliveryDiscuss.vue | 25 ++++++++++--------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/views/distribution/reservation/reservation.vue b/src/views/distribution/reservation/reservation.vue index 0e432526..d684f55c 100644 --- a/src/views/distribution/reservation/reservation.vue +++ b/src/views/distribution/reservation/reservation.vue @@ -95,7 +95,8 @@
取消预约
- 预约确认 + + 确认预约 @@ -885,6 +886,19 @@ }); }); }, + confirmReservation(scope){ + const { row } = scope; + let param = {}; + param.ids = row.id; + addReservations(param).then(res => { + this.selectionClear(); + this.onLoad(this.page); + this.$message({ + type: 'success', + message: '操作成功!' + }); + }); + }, handleSubmit() { this.form.serveType = this.form.serveType.join(','); update(this.form).then(() => { diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index 54d70336..f1f3ce32 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -662,11 +662,12 @@ - + + + @@ -1101,6 +1102,9 @@ //这里应该先对订单下的所有包件信息进行获取,然后结合查询出预约单下以选择的包件信息进行勾选状态的回显 //查询该订单下所有的包件信息 this.loading = true; + this.obj = row; + console.log("++++++++++++",this.obj); + if (this.deliveryListId){ //编辑 let params={}; @@ -1109,7 +1113,6 @@ //TODO 这里还需要对包件的状态进行过滤 this.query.id = 1; // this.query.typeService = 1; // this.query.genre = '1'; - this.obj = row; getPackageList(Object.assign(params,this.query)).then(res=>{ console.log(res.data.data); let data =res.data.data; @@ -1162,15 +1165,13 @@ //这里就需要对原来包件是否发生变化进行处理 //如果发生变化该订单下的某一字段就会发生改变,后台根据该字段进行判断是否发生包件选择的变化 console.log(this.obj.parcelListVOS); - console.log(this.selectionList); - this.orderData.forEach(o=>{ - this.selectionList.forEach(p=>{ - if (p.stockArticleId === o.id){ - o.packageList.push(p); - } - }) - }); - console.log(this.obj.parcelListVOS); + console.log("___________",this.obj); + this.orderData.forEach(item=>{ + if (item.id===this.obj.id){ + item.packageList = this.selectionList; + } + }) + console.log( "**********",this.orderData); // if (this.selectionList.length ===this.obj.parcelListVOS.length){ // //这里就需要考虑,如果选中包件的数组长度和原来不同,那么包件信息必定发生变化 // //当包件长度一致需要判断包件数组的内容是否一致,然后进行字段的改变和赋值