Browse Source

🎈 perf:优化包件明细显示

master
qb 1 year ago
parent
commit
7c72863fa9
  1. 29
      src/views/distribution/reservation/reservationAddFrom.vue
  2. 62
      src/views/warehouse/parcelList/distributionParcelList.vue

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

@ -1936,11 +1936,10 @@ export default {
this.page.total = inventoryList.total; this.page.total = inventoryList.total;
console.log('res :>> ', res); console.log('res :>> ', res);
// //
const _inventoryInfo = inventoryList.records; const _inventoryInfo = inventoryList.records;
this.inventoryInfo = _inventoryInfo this.inventoryInfo = _inventoryInfo;
if (this.inventoryData.length !== 0) { if (this.inventoryData.length !== 0) {
// ids // ids
const ids = this.inventoryData.map(val => val.id); const ids = this.inventoryData.map(val => val.id);
@ -2797,14 +2796,9 @@ export default {
this.query.typeService = 2; this.query.typeService = 2;
this.query.genre = '1'; this.query.genre = '1';
this.query.marketName = this.marketName; this.query.marketName = this.marketName;
// const page = this.page; if (this.orderData.length !== 0) {
let a = []; this.query.orderIds = this.orderData.map(val => val.id).join(',');
if (this.orderData) {
this.orderData.forEach(item => {
a.push(item.id);
});
} }
this.query.orderIds = a.join(',');
console.log('--------------query>', this.query); console.log('--------------query>', this.query);
const res = await selectStockArticleInfoList( const res = await selectStockArticleInfoList(
page.currentPage, page.currentPage,
@ -2812,27 +2806,18 @@ export default {
Object.assign(params, this.query) Object.assign(params, this.query)
); );
const { records, total } = res.data.data; const { records, total } = res.data.data;
this.stockArticleInfo = records; const _filterArr = records
// this.stockArticleInfo = records;
console.log('this.stockArticleInfo :>> ', this.stockArticleInfo); console.log('this.stockArticleInfo :>> ', this.stockArticleInfo);
this.stockArticleInfo.forEach((item, index) => { this.stockArticleInfo.forEach((item, index) => {
// //
this.checkOrder(item, index); this.checkOrder(item, index);
// if (this.orderData) {
// this.orderData.forEach(o => {
// if (o.id === item.id) {
// this.$nextTick(() => {
// this.$refs.orderList.toggleRowSelection(this.stockArticleInfo[index], true);
// });
// }
// });
// }else {
// this.orderList = [];
// }
this.page.total = total; this.page.total = total;
}); });
if (this.orderData.length !== 0) { if (this.orderData.length !== 0) {
const ids = this.orderData.map(val => val.id); const ids = this.orderData.map(val => val.id);
const _orderData = this.stockArticleInfo.filter(val => !ids.includes(val.id)) const _orderData = this.stockArticleInfo.filter(val => !ids.includes(val.id));
// this.orderSelectList = this.stockArticleInfo.filter(val => ids.includes(val.id)); // this.orderSelectList = this.stockArticleInfo.filter(val => ids.includes(val.id));
console.log('orderSelectList :>> ', this.orderSelectList); console.log('orderSelectList :>> ', this.orderSelectList);
} }

62
src/views/warehouse/parcelList/distributionParcelList.vue

@ -154,6 +154,27 @@ export default {
sortable: false, sortable: false,
head: false, head: false,
}, },
{
prop: '',
label: '序号',
type: 12,
values: '',
width: '55',
checkarr: [],
fixed: true,
sortable: false,
head: false,
},
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
},
{ {
prop: 'warehouse', prop: 'warehouse',
label: '仓库', label: '仓库',
@ -165,6 +186,26 @@ export default {
sortable: true, sortable: true,
head: false, head: false,
}, },
{
prop: 'conditionsType',
label: '包件明细状态',
type: 3,
values: '',
width: '130',
checkarr: [
{
label: '定制品',
value: '1',
},
{
label: '库存品',
value: '2',
},
],
fixed: false,
sortable: false,
head: false,
},
{ {
prop: 'orderPackageCode', prop: 'orderPackageCode',
label: '包条码', label: '包条码',
@ -269,16 +310,6 @@ export default {
fixed: false, fixed: false,
sortable: true, sortable: true,
}, },
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '180',
checkarr: [],
fixed: false,
sortable: true,
},
], ],
drawerShow: false, drawerShow: false,
height: 0, height: 0,
@ -420,6 +451,12 @@ export default {
console.log(this.query); console.log(this.query);
this.onLoad(this.page); this.onLoad(this.page);
}, },
timesc() {},
btnsc() {},
selectsc(value, row) {
console.log('value :>> ', value);
console.log('row :>> ', row);
},
showdrawer(value) { showdrawer(value) {
this.drawerShow = value; this.drawerShow = value;
}, },
@ -558,7 +595,10 @@ export default {
getpage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getpage(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data; const data = res.data.data;
this.page.total = data.total; this.page.total = data.total;
this.data = data.records; this.data = data.records.map(val => {
val.conditionsType = val.conditions === 1 ? '定制品' : '库存品';
return val;
});
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
}); });

Loading…
Cancel
Save