Browse Source

新增预约单页面修改筛选条件

fix_bug_pro20231227
qb 1 year ago
parent
commit
26020256d6
  1. 61
      src/views/distribution/reservation/reservationAddFrom.vue

61
src/views/distribution/reservation/reservationAddFrom.vue

@ -1906,6 +1906,7 @@
let page = this.page;
let params = {};
this.query.serviceType = '2';
console.log('this.marketName :>> ', this.marketName);
params.marketName = this.marketName
console.log('params :>> ', params);
getInventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(
@ -1917,15 +1918,9 @@
});
this.page.total = inventoryList.total;
console.log('res :>> ', res);
// this.inventoryInfo = inventoryList.records.filter(value=>{
// if(this.marketName === '')return value
// return value.marketName === this.marketName
// });
this.inventoryInfo = inventoryList.records
this.inventoryInfo = inventoryList.records.filter(value => {
if (this.marketName === '') return value;
return value.marketName === this.marketName;
});
//
if (this.inventoryData) {
this.inventoryInfo.forEach((item, index) => {
@ -2657,7 +2652,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;
@ -2682,56 +2677,16 @@
//
if (this.marketName === '') this.marketName = _marketName
this.marketName = list[0].marketName;
// this.marketName = list[0].marketName;
this.form.consignee = _name;
this.form.deliveryAddress = _address;
this.form.deliveryPhone = _phone;
//
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 {
this.orderData = this.orderList;
}
this.orderData.forEach(a => {
a.reservationNum = a.handQuantity;
});
const _ids = this.orderData.map(val => val.id)
this.orderData = [...this.orderData, ...this.orderList.filter(item => !_ids.includes(item.id))]
// this.orderData.push(info);
this.orderShow = false;
},
selectionClear() {

Loading…
Cancel
Save