|
|
|
@ -367,7 +367,7 @@
|
|
|
|
|
<el-button v-if="!isrReservationEntry" type="primary" icon="el-icon-circle-close" @click="onSubmitUpdateZeroOrder" |
|
|
|
|
>修改(零担订单) |
|
|
|
|
</el-button |
|
|
|
|
> |
|
|
|
|
>loading |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-close" @click="onSubmitZeroOrder" |
|
|
|
|
>提交(零担订单) |
|
|
|
|
</el-button |
|
|
|
@ -2657,7 +2657,7 @@
|
|
|
|
|
* 增加订单提交 |
|
|
|
|
*/ |
|
|
|
|
onSubmitOrder() { |
|
|
|
|
console.log('-------------》', this.orderList); |
|
|
|
|
console.log('orderList-------------》', this.orderList); |
|
|
|
|
if (this.orderList.length === 0) return this.$message.warning('最少选择一条数据!!!') |
|
|
|
|
const list = this.orderList; |
|
|
|
|
let _name = list[0].customerName; |
|
|
|
@ -2687,48 +2687,51 @@
|
|
|
|
|
this.form.consignee = _name; |
|
|
|
|
this.form.deliveryAddress = _address; |
|
|
|
|
this.form.deliveryPhone = _phone; |
|
|
|
|
this.orderData = this.orderList; |
|
|
|
|
this.orderData = Array.from(new Set([this.orderData,...this.orderList])) |
|
|
|
|
|
|
|
|
|
//这里需要对选择的订单进行筛选 |
|
|
|
|
const info = []; |
|
|
|
|
this.stockArticleInfo.forEach((item, index) => { |
|
|
|
|
this.orderList.forEach(order => { |
|
|
|
|
// const newDate1 = this.orderData.map(item => { // map遍历本地数据 |
|
|
|
|
// if (this.orderList.find(o => o.id !== item.id)) { // 如果在接口数据中包含本地数据,则返回这条本地数据 |
|
|
|
|
// return item; |
|
|
|
|
// }); |
|
|
|
|
// } info.push(order); |
|
|
|
|
//清理原来订单列表的订单数据 |
|
|
|
|
info.push(order); |
|
|
|
|
this.stockArticleInfo.splice(index, 1); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
// const info = []; |
|
|
|
|
// this.stockArticleInfo.forEach((item, index) => { |
|
|
|
|
// this.orderList.forEach(order => { |
|
|
|
|
// // const newDate1 = this.orderData.map(item => { // map遍历本地数据 |
|
|
|
|
// // if (this.orderList.find(o => o.id !== item.id)) { // 如果在接口数据中包含本地数据,则返回这条本地数据 |
|
|
|
|
// // return item; |
|
|
|
|
// // }); |
|
|
|
|
// // } info.push(order); |
|
|
|
|
// //清理原来订单列表的订单数据 |
|
|
|
|
// info.push(order); |
|
|
|
|
// this.stockArticleInfo.splice(index, 1); |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.orderData.length >= 1) { |
|
|
|
|
let newDate1 = this.orderData.map(item => { |
|
|
|
|
// map遍历本地数据 |
|
|
|
|
if (this.orderList.find(o => o.id !== item.id)) { |
|
|
|
|
// 如果在接口数据中包含本地数据,则返回这条本地数据 |
|
|
|
|
return item; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log('newDate1-------------->', newDate1.length); |
|
|
|
|
if (newDate1.length >= 1) { |
|
|
|
|
console.log('newDate1-------------->', newDate1); |
|
|
|
|
newDate1.forEach(a => { |
|
|
|
|
this.orderData.push(a); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
console.log('this.orderData------------->', this.orderData); |
|
|
|
|
} else { |
|
|
|
|
// if (this.orderData.length >= 1) { |
|
|
|
|
// let newDate1 = this.orderData.map(item => { |
|
|
|
|
// // map遍历本地数据 |
|
|
|
|
// if (this.orderList.find(o => o.id !== item.id)) { |
|
|
|
|
// // 如果在接口数据中包含本地数据,则返回这条本地数据 |
|
|
|
|
// return item; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// console.log('newDate1-------------->', newDate1.length); |
|
|
|
|
// if (newDate1.length >= 1) { |
|
|
|
|
// console.log('newDate1-------------->', newDate1); |
|
|
|
|
// newDate1.forEach(a => { |
|
|
|
|
// this.orderData.push(a); |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// console.log('this.orderData------------->', this.orderData); |
|
|
|
|
// } else { |
|
|
|
|
|
|
|
|
|
this.orderData = this.orderList; |
|
|
|
|
} |
|
|
|
|
// this.orderData = this.orderList; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.orderData.forEach(a => { |
|
|
|
|
a.reservationNum = a.handQuantity; |
|
|
|
|
// this.orderData.forEach(a => { |
|
|
|
|
// a.reservationNum = a.handQuantity; |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.orderData.push(info); |
|
|
|
|