Browse Source

市配预约订单选取调整

fix_bug_pro20231227
kilo 1 year ago
parent
commit
00658a6e58
  1. 13
      src/api/distribution/distributionReservation.js
  2. 12
      src/api/distribution/distributionStockArticle.js
  3. 129
      src/views/distribution/reservation/reservationAddFrom.vue

13
src/api/distribution/distributionReservation.js

@ -235,6 +235,19 @@ export const getDeliveryZeroOrderDetail = (deliveryId,id) => {
}); });
} }
/**
* 查询预约计划零担详情
* @param ids
* @returns {AxiosPromise}
*/
export const getReservationPackageListByOrderId = (reservationId,orderId,current, size) => {
return request({
url: '/api/logpm-distribution/reservation/getReservationPackageListByOrderId',
method: 'get',
params: { reservationId,orderId,current, size }
});
}

12
src/api/distribution/distributionStockArticle.js

@ -250,4 +250,16 @@ export const selectUpdateAvailableStockArticle = (current, size, params) => {
}) })
} }
export const getPackageListByStockArticleId = (current, size, orderId) => {
return request({
url: '/api/logpm-distribution/distributionStockArticle/getPackageListByStockArticleId',
method: 'get',
params: {
orderId,
current,
size,
}
})
}

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

@ -589,11 +589,11 @@
autonomouslySave, autonomouslySave,
update, update,
remove, remove,
getReservationInfo, getReservationZeroOrderDetail getReservationInfo, getReservationZeroOrderDetail, getReservationPackageListByOrderId
} from '@/api/distribution/distributionReservation'; } from '@/api/distribution/distributionReservation';
import { import {
getStockArticleList, getStockArticleList,
selectStockArticleList, getPackageListByStockArticleId,
selectStockArticleInfoList, selectStockArticleInfoList,
selectUpdateAvailableStockArticle, getZeroOrderDetail selectUpdateAvailableStockArticle, getZeroOrderDetail
} from '@/api/distribution/distributionStockArticle'; } from '@/api/distribution/distributionStockArticle';
@ -2053,68 +2053,79 @@
this.loading = true; this.loading = true;
this.packageList = row.packageList; this.packageList = row.packageList;
this.obj = row; this.obj = row;
let page = this.page;
console.log('row>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row); console.log('row>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row);
if (this.reservationId) { if (this.reservationId) {
// getReservationPackageListByOrderId(this.reservationId,row.id,page.currentPage,page.pageSize).then(res=>{
let packageInfo = row.parcelListVOS; console.log("->>>>>>>>>>>>>>>>>>",res);
// this.packageData = row.parcelListVOS; })
let packageListData = this.packageData;
if (row.packageList.length > 0) {
let packageListInfo = row.packageList;
packageInfo.forEach((item, index) => {
packageListInfo.forEach(p => {
if (item.id === p.id) {
this.$nextTick(() => {
this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
});
}
});
});
} else {
//
packageInfo.forEach((item, index) => {
this.$nextTick(() => {
this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
});
});
}
this.packageData = row.parcelListVOS;
// rowpackageList,
if (row.packageList.length === 0) {
this.packageDataSec = row.parcelListVOS; // //
} else { // let packageInfo = row.parcelListVOS;
this.packageDataSec = row.parcelListVOS.filter(item => { // // this.packageData = row.parcelListVOS;
return row.packageList.some(value => value.id === item.id); // let packageListData = this.packageData;
}); // if (row.packageList.length > 0) {
} // let packageListInfo = row.packageList;
// packageInfo.forEach((item, index) => {
// packageListInfo.forEach(p => {
// if (item.id === p.id) {
// this.$nextTick(() => {
// this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
// });
// }
// });
// });
// } else {
// //
// packageInfo.forEach((item, index) => {
// this.$nextTick(() => {
// this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
// });
// });
// }
// this.packageData = row.parcelListVOS;
//
// // rowpackageList,
// if (row.packageList.length === 0) {
// this.packageDataSec = row.parcelListVOS;
// } else {
// this.packageDataSec = row.parcelListVOS.filter(item => {
// return row.packageList.some(value => value.id === item.id);
// });
// }
} else { } else {
this.packageData = row.parcelListVOS; getPackageListByStockArticleId(page.currentPage,page.pageSize,row.id).then(res=>{
this.packageDataSec = row.parcelListVOS; console.log("res---------------->",res);
// })
let data = row.parcelListVOS; // this.packageData = row.parcelListVOS;
data.forEach((item, index) => { // this.packageDataSec = row.parcelListVOS;
if ( // //
item.orderPackageReservationStatusName === '已预约' || // let data = row.parcelListVOS;
item.orderPackageReservationStatus === '20' // data.forEach((item, index) => {
) { // if (
// //使 // item.orderPackageReservationStatusName === '' ||
this.$nextTick(() => { // item.orderPackageReservationStatus === '20'
this.$refs.packageList.toggleRowSelection(this.packageData[index], true); // ) {
}); // // //使
// console.log('::', item); // this.$nextTick(() => {
// this.checkPackage(item, index); // this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
} // });
// else if ( // // console.log('::', item);
// item.orderPackageFreezeStatusName !== '' || // // this.checkPackage(item, index);
// item.orderPackageFreezeStatus !== '20' // }
// ) { // // else if (
// this.$nextTick(() => { // // item.orderPackageFreezeStatusName !== '' ||
// this.$refs.packageList.toggleRowSelection(this.packageData[index], true); // // item.orderPackageFreezeStatus !== '20'
// }); // // ) {
// } // // this.$nextTick(() => {
}); // // this.$refs.packageList.toggleRowSelection(this.packageData[index], true);
// // });
// // }
// });
} }
this.isaddvalue = true; this.isaddvalue = true;
this.loading = false; this.loading = false;

Loading…
Cancel
Save