|
|
|
@ -93,13 +93,8 @@
|
|
|
|
|
|
|
|
|
|
<el-form-item label-width="0" prop="certificateType"> |
|
|
|
|
<el-tabs @tab-click="handleChlickTab" style="width: 100%"> |
|
|
|
|
|
|
|
|
|
<el-tab-pane label="定制品"> |
|
|
|
|
<div style=" |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
margin-bottom: 6px; |
|
|
|
|
"> |
|
|
|
|
<div style="display: flex; justify-content: space-between; margin-bottom: 6px"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
text |
|
|
|
@ -132,7 +127,6 @@
|
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
:searchInput="multifunctional" |
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-button |
|
|
|
@ -1916,7 +1910,7 @@ export default {
|
|
|
|
|
mounted() { |
|
|
|
|
console.log('123 :>> ', 123); |
|
|
|
|
this.setTableHeight(); |
|
|
|
|
this.mydata= JSON.parse(localStorage.getItem('my_data')) |
|
|
|
|
this.mydata = JSON.parse(localStorage.getItem('my_data')); |
|
|
|
|
this.init(); |
|
|
|
|
|
|
|
|
|
if (this.$route.query.type == '2') { |
|
|
|
@ -2096,7 +2090,10 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 统一逗号分隔符:将中文逗号替换为英文逗号,并去除可能的前后空格 |
|
|
|
|
const partialIds = partialIdString.replace(/,/g, ',').split(',').map(id => id.trim()); |
|
|
|
|
const partialIds = partialIdString |
|
|
|
|
.replace(/,/g, ',') |
|
|
|
|
.split(',') |
|
|
|
|
.map(id => id.trim()); |
|
|
|
|
|
|
|
|
|
// 逐行检查是否含有所有partialIds |
|
|
|
|
for (let row of tableRows) { |
|
|
|
@ -2237,13 +2234,12 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
//订单选择确定 |
|
|
|
|
callFordeliveryOrder() { |
|
|
|
|
|
|
|
|
|
console.log(this.selectionList, 'this.selectionList'); |
|
|
|
|
let scID = this.selectionList[0].mallId; //获取第一个商场DI用于匹配后面的是否选择的一样 |
|
|
|
|
let mallIdState=this.selectionList.find(res=>res.mallId !=scID) |
|
|
|
|
let mallIdState = this.selectionList.find(res => res.mallId != scID); |
|
|
|
|
if (mallIdState) { |
|
|
|
|
this.$message.warning('请选择同一商场'); |
|
|
|
|
return |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
@ -2291,7 +2287,7 @@ export default {
|
|
|
|
|
this.selectionList.some(i => { |
|
|
|
|
let a = this.dataList.filter(ele => ele.id == i.id).length >= 1; |
|
|
|
|
if (!this.$route.query.id) { |
|
|
|
|
i.reservationNum=i.handQuantity |
|
|
|
|
i.reservationNum = i.handQuantity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!a) { |
|
|
|
@ -2317,7 +2313,7 @@ export default {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
let scID= this.selectionList[0].marketId |
|
|
|
|
let scID = this.selectionList[0].marketId; |
|
|
|
|
if (this.selectionList.find(res => res.marketId != scID)) { |
|
|
|
|
this.$message.warning('请选同一商场!'); |
|
|
|
|
return; |
|
|
|
@ -2352,11 +2348,11 @@ export default {
|
|
|
|
|
// 选择包件 |
|
|
|
|
async handleChooseOrder(row) { |
|
|
|
|
console.log(this.order.columnOrderList, 'order.columnOrderList'); |
|
|
|
|
this.order.columnOrderList.forEach(res=>res.values='') |
|
|
|
|
this.order.query={} |
|
|
|
|
this.order.currentPage=1 |
|
|
|
|
this.order.columnOrderList.forEach(res => (res.values = '')); |
|
|
|
|
this.order.query = {}; |
|
|
|
|
this.order.currentPage = 1; |
|
|
|
|
console.log('row :>> ', row); |
|
|
|
|
this.packageRow=row |
|
|
|
|
this.packageRow = row; |
|
|
|
|
// 页面类型 |
|
|
|
|
const _type = this.$route.query.type; |
|
|
|
|
this.orderChooseId = row.id; |
|
|
|
@ -2365,7 +2361,6 @@ export default {
|
|
|
|
|
await this.onLoadEditChoose({}, row); |
|
|
|
|
} else await this.onLoadOrderChoose(); |
|
|
|
|
this.dialogChooseOrderVisible = true; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 每页数量改变 |
|
|
|
|
sizeChangeOrderChoose(size) { |
|
|
|
@ -2422,9 +2417,10 @@ export default {
|
|
|
|
|
await getEditList(this.order.currentPage, this.order.pageSize, { |
|
|
|
|
...params, |
|
|
|
|
...this.order.query, |
|
|
|
|
}).then(res => { |
|
|
|
|
}) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.data.code != 200) { |
|
|
|
|
return |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
const data = res.data.data; |
|
|
|
@ -2449,7 +2445,8 @@ export default {
|
|
|
|
|
row.originalList = JSON.parse(JSON.stringify(this.order.selectList)); |
|
|
|
|
this.order.orderChooseLoading = false; |
|
|
|
|
} |
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
}) |
|
|
|
|
.catch(error => { |
|
|
|
|
console.log(error, 'error'); |
|
|
|
|
this.order.orderChooseLoading = false; |
|
|
|
|
}); |
|
|
|
@ -2465,7 +2462,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (this.order.selectList) { |
|
|
|
|
this.packageRow.reservationNum=this.order.selectList.length |
|
|
|
|
this.packageRow.reservationNum = this.order.selectList.length; |
|
|
|
|
} |
|
|
|
|
// billPackageEntityList |
|
|
|
|
console.log('this.order.dataList :>> ', this.dataList); |
|
|
|
@ -2486,7 +2483,6 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
} else { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 数量校验 |
|
|
|
|
handleNumberRange(e, row) { |
|
|
|
@ -2644,11 +2640,10 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
lastpage() { |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList') |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList'); |
|
|
|
|
}, |
|
|
|
|
// 最后提交 |
|
|
|
|
async handleSubmit() { |
|
|
|
|
|
|
|
|
|
// console.log(this.dataList,'this.dataList'); |
|
|
|
|
|
|
|
|
|
// if (this.$route.query.type !== '2') { |
|
|
|
@ -2677,11 +2672,8 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
// // if () |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.form.validate(async valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
|
|
// if(!this.dataList.length){ |
|
|
|
|
// return ElMessage({ |
|
|
|
|
// message: '请选择定制品', |
|
|
|
@ -2697,16 +2689,16 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let zeroOrderList=null |
|
|
|
|
let zeroOrderList = null; |
|
|
|
|
if (this.dataList.length) { |
|
|
|
|
let resState=this.dataList.find(res=>!res.reservationNum) |
|
|
|
|
let resState = this.dataList.find(res => !res.reservationNum); |
|
|
|
|
console.log(resState, '123'); |
|
|
|
|
if (resState) { |
|
|
|
|
return ElMessage({ |
|
|
|
|
message: `单自编号为${resState.orderCode}的计划数量为0请移除或者重新录入预约数量`, |
|
|
|
|
type: 'warning', |
|
|
|
|
plain: true, |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
zeroOrderList = this.dataList.filter(val => val.isZero === '1'); |
|
|
|
@ -2718,17 +2710,11 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
message: '请移除添加数量为0的订单', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.form.id) { |
|
|
|
|
|
|
|
|
|
// if (this.fileListSell.length === 0) { |
|
|
|
|
// this.$message.warning('请上传提货证件!!!'); |
|
|
|
|
// return; |
|
|
|
@ -2810,7 +2796,10 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
console.log(valE, 'valE==>'); |
|
|
|
|
if (valE.ParcelLisList) { |
|
|
|
|
if (valE.ParcelLisList.length) { |
|
|
|
|
submitFormData.parcelLisList = [...submitFormData.parcelLisList, ...valE.ParcelLisList]; |
|
|
|
|
submitFormData.parcelLisList = [ |
|
|
|
|
...submitFormData.parcelLisList, |
|
|
|
|
...valE.ParcelLisList, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -2844,6 +2833,10 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
this.Selfpickuploading = false; //关闭加载效果 |
|
|
|
|
console.log(this.Selfpickuploading, '当前状态'); |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
this.$store.commit('EDIT_REFRESHITEM', { |
|
|
|
|
title: 'distrilbutionBillLadingList', |
|
|
|
|
status: true, |
|
|
|
|
}); |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList'); |
|
|
|
|
}) |
|
|
|
|
.catch(res => { |
|
|
|
@ -2971,6 +2964,10 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}); |
|
|
|
|
this.Selfpickuploading = false; //关闭加载效果 |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
this.$store.commit('EDIT_REFRESHITEM', { |
|
|
|
|
title: 'distrilbutionBillLadingList', |
|
|
|
|
status: true, |
|
|
|
|
}); |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList'); |
|
|
|
|
}) |
|
|
|
|
.catch(res => { |
|
|
|
@ -3036,15 +3033,14 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
params.typeService = 3; |
|
|
|
|
params.isAll = 0; |
|
|
|
|
if (this.data && this.data.length) { |
|
|
|
|
params.mallId =this.data[0].marketId |
|
|
|
|
params.mallId = this.data[0].marketId; |
|
|
|
|
console.log(params, 'params'); |
|
|
|
|
} |
|
|
|
|
$_getListOne(page.currentPage, page.pageSize, Object.assign(params, this.queryOrder)).then( |
|
|
|
|
res => { |
|
|
|
|
$_getListOne(page.currentPage, page.pageSize, Object.assign(params, this.queryOrder)) |
|
|
|
|
.then(res => { |
|
|
|
|
console.log(res, 'res===>'); |
|
|
|
|
if (res.data.code != 200 || !res.data.data) { |
|
|
|
|
|
|
|
|
|
return |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.pageOrder.total = data.total || 0; |
|
|
|
@ -3079,10 +3075,9 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
} |
|
|
|
|
).catch(res=>{ |
|
|
|
|
|
|
|
|
|
}).finally(()=>{ |
|
|
|
|
}) |
|
|
|
|
.catch(res => {}) |
|
|
|
|
.finally(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -3095,8 +3090,8 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择仓库!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(this.dataList, 'dataList'); |
|
|
|
|
|
|
|
|
@ -3194,7 +3189,6 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
|
params.ids = this.$route.query.id; |
|
|
|
|
this.orderAdd = false; |
|
|
|
@ -3205,9 +3199,6 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 创建自提 |
|
|
|
@ -3226,7 +3217,7 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
...dataso, |
|
|
|
|
}; |
|
|
|
|
if (this.dataList && this.dataList.length) { |
|
|
|
|
data.marketId= this.dataList[0].mallId |
|
|
|
|
data.marketId = this.dataList[0].mallId; |
|
|
|
|
} |
|
|
|
|
console.log(data, '处理好的值'); |
|
|
|
|
getListStockList(data).then(res => { |
|
|
|
@ -3239,50 +3230,7 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
return |
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
|
this.loading = true; |
|
|
|
|
let a = {}; |
|
|
|
|
if (this.$route.query.type == '1') { |
|
|
|
|
a = this.dataList[0]; |
|
|
|
|
} else if (this.$route.query.type === '2') { |
|
|
|
|
a = this.dataList[0]; |
|
|
|
|
} else if (this.$route.query.type == '3') { |
|
|
|
|
a = this.dataList[0]; |
|
|
|
|
} |
|
|
|
|
console.log('a :>> ', a); |
|
|
|
|
console.log(' this.dataOrder :>> ', this.dataOrder); |
|
|
|
|
// let a = this.dataList[0]; |
|
|
|
|
if (!!a.mallId) { |
|
|
|
|
// params.marketId = a.mallId; |
|
|
|
|
// params.warehouseId = a.warehouseId; |
|
|
|
|
let data = { |
|
|
|
|
current: this.pageStock.currentPage, |
|
|
|
|
size: this.pageStock.pageSize, |
|
|
|
|
//marketId: a.mallId, |
|
|
|
|
// warehouseId: a.warehouseId, |
|
|
|
|
...dataso, |
|
|
|
|
}; |
|
|
|
|
console.log(data, '处理好的值'); |
|
|
|
|
// return |
|
|
|
|
getListStockList(data).then(res => { |
|
|
|
|
const dataOwn = res.data.data; |
|
|
|
|
this.pageStock.total = dataOwn.total; |
|
|
|
|
this.dataOwn = dataOwn.records; |
|
|
|
|
this.dataOwn.forEach(i => { |
|
|
|
|
i.available = i.quantityStock - i.quantityOccupied; |
|
|
|
|
}); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'warning', |
|
|
|
|
message: '无法获取商场信息', |
|
|
|
|
}); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.pageStock.total = 0; |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
}, |
|
|
|
|
//包件信息 |
|
|
|
|
onLoadOwn(page, params = {}) { |
|
|
|
@ -3352,21 +3300,20 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
// 修改零担零担信息 |
|
|
|
|
handleRowZeroOrder() { |
|
|
|
|
console.log(this.zeroOrderFormList, '12121212'); |
|
|
|
|
let sum =0 |
|
|
|
|
let sum = 0; |
|
|
|
|
this.zeroOrderFormList.forEach(res => { |
|
|
|
|
sum+= res.tiQuantity |
|
|
|
|
}) |
|
|
|
|
sum += res.tiQuantity; |
|
|
|
|
}); |
|
|
|
|
console.log(sum, '总和'); |
|
|
|
|
this.dataList.find(res=>res.id==this.zeroOrderFormList[0].stockArticleId).reservationNum=sum |
|
|
|
|
|
|
|
|
|
this.dataList.find(res => res.id == this.zeroOrderFormList[0].stockArticleId).reservationNum = |
|
|
|
|
sum; |
|
|
|
|
|
|
|
|
|
// 将修改的零担信息存入dataList中 |
|
|
|
|
this.dataList.find(val => val.id === this.zeroOrderFormList[0].stockArticleId).ParcelLisList = this.zeroOrderFormList; |
|
|
|
|
|
|
|
|
|
this.dataList.find(val => val.id === this.zeroOrderFormList[0].stockArticleId).ParcelLisList = |
|
|
|
|
this.zeroOrderFormList; |
|
|
|
|
|
|
|
|
|
// 关闭零担蒙层弹框 |
|
|
|
|
this.dialogFormZeroOrderVisible = false; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 显示维护在库零担数量 |
|
|
|
|