|
|
|
@ -93,7 +93,6 @@
|
|
|
|
|
|
|
|
|
|
<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;"> |
|
|
|
|
<el-button |
|
|
|
@ -128,7 +127,6 @@
|
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
:searchInput="multifunctional" |
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-button |
|
|
|
@ -650,7 +648,7 @@ import { mapGetters } from 'vuex';
|
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
import { getListStockList } from '@/api/distribution/distributionStockList'; |
|
|
|
|
import { getListOne ,$_getListOne} from '@/api/distribution/distributionStockArticle'; |
|
|
|
|
import { getListOne, $_getListOne } from '@/api/distribution/distributionStockArticle'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { detail } from '@/api/flow/flow'; |
|
|
|
|
import { nextTick, ref } from 'vue'; |
|
|
|
@ -663,12 +661,12 @@ export default {
|
|
|
|
|
return { |
|
|
|
|
PackageCheckList:[],//包件勾选的数据 |
|
|
|
|
tabletit: '', //记录当前点击的标题栏 |
|
|
|
|
multifunctional:'', //编辑订单搜索 |
|
|
|
|
multifunctional: '', //编辑订单搜索 |
|
|
|
|
dialogImg: false, |
|
|
|
|
Imgurl: undefined, |
|
|
|
|
Selfpickuploading: false, //页面加载 |
|
|
|
|
mydata:{},//仓库信息 |
|
|
|
|
packageRow:{},//当前选择的包件 |
|
|
|
|
mydata: {}, //仓库信息 |
|
|
|
|
packageRow: {}, //当前选择的包件 |
|
|
|
|
OrdercolumnList: [ |
|
|
|
|
{ |
|
|
|
|
prop: 'serviceNumber', |
|
|
|
@ -688,6 +686,7 @@ export default {
|
|
|
|
|
dialogFormZeroOrderVisible: false, // 零担订单弹出层 |
|
|
|
|
// 选择包件弹出层 |
|
|
|
|
dialogChooseOrderVisible: false, |
|
|
|
|
CheckId:[],//需要勾选ID |
|
|
|
|
height: 0, |
|
|
|
|
// 弹框标题 |
|
|
|
|
title: '', |
|
|
|
@ -1903,7 +1902,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') { |
|
|
|
@ -2060,7 +2059,7 @@ export default {
|
|
|
|
|
const _type = this.$route.query.type; |
|
|
|
|
// 编辑状态 |
|
|
|
|
if (Number(_type) === 2) { |
|
|
|
|
this.onLoadEditChoose(this.order.query,this.packageRow); |
|
|
|
|
this.onLoadEditChoose(this.order.query, this.packageRow); |
|
|
|
|
} else this.onLoadOrderChoose(); |
|
|
|
|
}, |
|
|
|
|
orderSelectSc(index, row) { |
|
|
|
@ -2076,16 +2075,19 @@ export default {
|
|
|
|
|
scrollToElementWithinTableRow(partialIdString) { |
|
|
|
|
// 清空之前的样式 |
|
|
|
|
const tableRows = document.querySelectorAll('tr'); |
|
|
|
|
tableRows.forEach(function(row) { |
|
|
|
|
tableRows.forEach(function (row) { |
|
|
|
|
const cells = row.querySelectorAll('[id]'); |
|
|
|
|
cells.forEach(function(cell) { |
|
|
|
|
cells.forEach(function (cell) { |
|
|
|
|
cell.style.backgroundColor = ''; // 移除背景颜色 |
|
|
|
|
cell.style.color = ''; // 移除文字颜色 |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 统一逗号分隔符:将中文逗号替换为英文逗号,并去除可能的前后空格 |
|
|
|
|
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) { |
|
|
|
@ -2096,7 +2098,7 @@ export default {
|
|
|
|
|
if (allIdsFound) { |
|
|
|
|
// 行包含所有partialIds, 则高亮显示并滚动到该行 |
|
|
|
|
const cells = row.querySelectorAll('[id]'); |
|
|
|
|
cells.forEach(function(cell) { |
|
|
|
|
cells.forEach(function (cell) { |
|
|
|
|
cell.style.backgroundColor = '#ff0000'; |
|
|
|
|
cell.style.color = '#fff'; |
|
|
|
|
}); |
|
|
|
@ -2106,9 +2108,9 @@ export default {
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
// 编辑多功能搜索 |
|
|
|
|
SearchFu(){ |
|
|
|
|
SearchFu() { |
|
|
|
|
console.log(this.multifunctional, '搜索的参数值'); |
|
|
|
|
if (this.multifunctional) { |
|
|
|
|
this.scrollToElementWithinTableRow(this.multifunctional); |
|
|
|
@ -2120,8 +2122,8 @@ export default {
|
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
// console.log(dataInfo.value, '搜索结果'); |
|
|
|
|
}, |
|
|
|
|
soclear (){ |
|
|
|
|
}, |
|
|
|
|
soclear() { |
|
|
|
|
this.SearchFu(); |
|
|
|
|
}, |
|
|
|
|
orderTimesc(index, row) { |
|
|
|
@ -2135,7 +2137,7 @@ export default {
|
|
|
|
|
const _type = this.$route.query.type; |
|
|
|
|
// 编辑状态 |
|
|
|
|
if (Number(_type) === 2) { |
|
|
|
|
this.onLoadEditChoose(this.order.query,this.packageRow); |
|
|
|
|
this.onLoadEditChoose(this.order.query, this.packageRow); |
|
|
|
|
} else this.onLoadOrderChoose(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -2144,10 +2146,10 @@ export default {
|
|
|
|
|
this.orderAdd = true; |
|
|
|
|
getDetail(this.$route.query.id).then(res => { |
|
|
|
|
let s = res.data.data; |
|
|
|
|
console.log(res,'res'); |
|
|
|
|
console.log(res, 'res'); |
|
|
|
|
this.form = s; |
|
|
|
|
let f = []; |
|
|
|
|
if(s.chargeList){ |
|
|
|
|
if (s.chargeList) { |
|
|
|
|
s.chargeList.forEach(c => { |
|
|
|
|
let a = this.clientType.find(i => c.cost == i.dictKey); |
|
|
|
|
|
|
|
|
@ -2226,13 +2228,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) |
|
|
|
|
if(mallIdState){ |
|
|
|
|
console.log(this.selectionList, 'this.selectionList'); |
|
|
|
|
let scID = this.selectionList[0].mallId; //获取第一个商场DI用于匹配后面的是否选择的一样 |
|
|
|
|
let mallIdState = this.selectionList.find(res => res.mallId != scID); |
|
|
|
|
if (mallIdState) { |
|
|
|
|
this.$message.warning('请选择同一商场'); |
|
|
|
|
return |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
@ -2279,8 +2280,8 @@ export default {
|
|
|
|
|
let isa = false; |
|
|
|
|
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 |
|
|
|
|
if (!this.$route.query.id) { |
|
|
|
|
i.reservationNum = i.handQuantity; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!a) { |
|
|
|
@ -2298,16 +2299,16 @@ export default {
|
|
|
|
|
this.$message.warning('至少选择一条数据!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(this.selectionList,'22'); |
|
|
|
|
console.log(this.selectionList, '22'); |
|
|
|
|
|
|
|
|
|
if( this.dataList && this.dataList.length){ |
|
|
|
|
if( this.dataList[0].mallId !=this.selectionList[0].marketId){ |
|
|
|
|
if (this.dataList && this.dataList.length) { |
|
|
|
|
if (this.dataList[0].mallId != this.selectionList[0].marketId) { |
|
|
|
|
this.$message.warning('请选择和定制品一样的商场!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
let scID= this.selectionList[0].marketId |
|
|
|
|
if(this.selectionList.find(res=>res.marketId !=scID)){ |
|
|
|
|
let scID = this.selectionList[0].marketId; |
|
|
|
|
if (this.selectionList.find(res => res.marketId != scID)) { |
|
|
|
|
this.$message.warning('请选同一商场!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -2347,7 +2348,7 @@ export default {
|
|
|
|
|
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; |
|
|
|
@ -2355,7 +2356,7 @@ export default {
|
|
|
|
|
if (Number(_type) === 2) { |
|
|
|
|
await this.onLoadEditChoose({}, row); |
|
|
|
|
} else await this.onLoadOrderChoose(); |
|
|
|
|
|
|
|
|
|
this.dialogChooseOrderVisible = true; |
|
|
|
|
}, |
|
|
|
|
// 每页数量改变 |
|
|
|
|
sizeChangeOrderChoose(size) { |
|
|
|
@ -2364,7 +2365,7 @@ export default {
|
|
|
|
|
const _type = this.$route.query.type; |
|
|
|
|
// 编辑状态 |
|
|
|
|
if (Number(_type) === 2) { |
|
|
|
|
this.onLoadEditChoose(this.order.query,this.packageRow); |
|
|
|
|
this.onLoadEditChoose(this.order.query, this.packageRow); |
|
|
|
|
} else this.onLoadOrderChoose(); |
|
|
|
|
}, |
|
|
|
|
// 页码改变 |
|
|
|
@ -2387,7 +2388,7 @@ export default {
|
|
|
|
|
this.Unchecked = this.order.orderDetails.filter(b => !this.order.selectList.some(c => c.id === b.id)); |
|
|
|
|
// 编辑状态 |
|
|
|
|
if (Number(_type) === 2) { |
|
|
|
|
this.onLoadEditChoose(this.order.query,this.packageRow); |
|
|
|
|
this.onLoadEditChoose(this.order.query, this.packageRow); |
|
|
|
|
} else this.onLoadOrderChoose(); |
|
|
|
|
}, |
|
|
|
|
// 请求包件数据 -- 新增 |
|
|
|
@ -2449,6 +2450,7 @@ console.log(_check,'筛选出来的参数');
|
|
|
|
|
console.log(res,'必须参数ID'); |
|
|
|
|
if(res.data.code==200){ |
|
|
|
|
_dataList=res.data.data |
|
|
|
|
this.CheckId=res.data.data;//需要勾选的ID |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
@ -2515,7 +2517,7 @@ console.log(_check,'筛选出来的参数');
|
|
|
|
|
this.Unchecked = this.order.orderDetails.filter(b => !this.order.selectList.some(c => c.id === b.id)); |
|
|
|
|
//全部勾选的数据 |
|
|
|
|
let uncheckedIds = this.Unchecked.map(item => item.id); |
|
|
|
|
// 过滤掉 _aa 中未勾选的项 |
|
|
|
|
// 过滤掉 中未勾选的项 |
|
|
|
|
this.PackageCheckList = this.PackageCheckList.filter(a => !uncheckedIds.includes(a.id)); |
|
|
|
|
console.log(this.PackageCheckList,'准备提交的参数'); |
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
@ -2523,29 +2525,61 @@ console.log(_check,'筛选出来的参数');
|
|
|
|
|
return this.$message({ type: 'warning', message: '最少选择一项数据' }); |
|
|
|
|
} |
|
|
|
|
if(this.order.selectList){ |
|
|
|
|
this.packageRow.reservationNum=this.PackageCheckList.length |
|
|
|
|
this.packageRow.reservationNum=this.order.selectList.length |
|
|
|
|
} |
|
|
|
|
// billPackageEntityList |
|
|
|
|
console.log('this.order.dataList :>> ', this.dataList); |
|
|
|
|
this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList = |
|
|
|
|
this.PackageCheckList.map(val => { |
|
|
|
|
console.log('val :>> ', val); |
|
|
|
|
console.log('最外层表格', this.dataList); |
|
|
|
|
// this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList = this.order.selectList.map(val => { |
|
|
|
|
// console.log('val :>> ', val); |
|
|
|
|
// return { |
|
|
|
|
// parceListId: val.id, |
|
|
|
|
// stockArticleId: val.stockArticleId, |
|
|
|
|
// packetBarCode: val.orderPackageCode, |
|
|
|
|
// }; |
|
|
|
|
// }); |
|
|
|
|
console.log(this.CheckId,'原本数据'); |
|
|
|
|
console.log(this.order.selectList,'当前勾选的数据'); |
|
|
|
|
console.log(this.order.orderDetails,'全部数据'); |
|
|
|
|
// 找出新增数据对象 |
|
|
|
|
let addedData = this.order.selectList.filter(item => !this.CheckId.includes(item.id)); |
|
|
|
|
let addedObjects = this.order.orderDetails.filter(item => addedData.map(data => data.id).includes(item.id)); |
|
|
|
|
if(addedObjects && addedObjects.length){ |
|
|
|
|
this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList=[] |
|
|
|
|
this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList = addedObjects.map(item => { |
|
|
|
|
return { |
|
|
|
|
parceListId: val.id, |
|
|
|
|
stockArticleId: val.stockArticleId, |
|
|
|
|
packetBarCode: val.orderPackageCode, |
|
|
|
|
parceListId: item.id, |
|
|
|
|
stockArticleId: item.stockArticleId, |
|
|
|
|
packetBarCode: item.orderPackageCode, |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 找出删除数据对象 |
|
|
|
|
let deletedData = this.CheckId.filter(id => !this.order.selectList.find(item => item.id === id)); |
|
|
|
|
let deletedObjects = this.order.orderDetails.filter(item => deletedData.includes(item.id)); |
|
|
|
|
if(deletedObjects && deletedObjects.length){ |
|
|
|
|
this.dataList.find(val => val.id === this.orderChooseId).unBillPackageEntityList=[] |
|
|
|
|
this.dataList.find(val => val.id === this.orderChooseId).unBillPackageEntityList = deletedObjects.map(item => { |
|
|
|
|
return { |
|
|
|
|
parceListId: item.id, |
|
|
|
|
stockArticleId: item.stockArticleId, |
|
|
|
|
packetBarCode: item.orderPackageCode, |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
console.log('新增的数据对象:', addedObjects); |
|
|
|
|
console.log('删除的数据对象:', deletedObjects); |
|
|
|
|
|
|
|
|
|
this.dialogChooseOrderVisible = false; |
|
|
|
|
console.log( this.dataList.find(val => val.id === this.orderChooseId),' this.dataList.find(val => val.id === this.orderChooseId)筛选出来的'); |
|
|
|
|
}, |
|
|
|
|
ProhibitSelection(val, index) { |
|
|
|
|
if (val.orderPackageStatus == 70) { |
|
|
|
|
ProhibitSelection(val, index) { |
|
|
|
|
if (val.orderPackageStatus == 70) { |
|
|
|
|
return false; |
|
|
|
|
} else { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
// 数量校验 |
|
|
|
|
handleNumberRange(e, row) { |
|
|
|
|
console.log(e, 'ee====='); |
|
|
|
@ -2701,12 +2735,11 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
lastpage(){ |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList') |
|
|
|
|
lastpage() { |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList'); |
|
|
|
|
}, |
|
|
|
|
// 最后提交 |
|
|
|
|
async handleSubmit() { |
|
|
|
|
|
|
|
|
|
// console.log(this.dataList,'this.dataList'); |
|
|
|
|
|
|
|
|
|
// if (this.$route.query.type !== '2') { |
|
|
|
@ -2735,36 +2768,33 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
// // if () |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.form.validate(async valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
|
|
|
|
|
// if(!this.dataList.length){ |
|
|
|
|
// return ElMessage({ |
|
|
|
|
// message: '请选择定制品', |
|
|
|
|
// type: 'warning', |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
console.log(this.data,'11'); |
|
|
|
|
console.log(this.data, '11'); |
|
|
|
|
|
|
|
|
|
if( !this.data.every(res=>res.inventoryQuantity)){ |
|
|
|
|
if (!this.data.every(res => res.inventoryQuantity)) { |
|
|
|
|
return ElMessage({ |
|
|
|
|
message: '请移除库存品预约数量为0的订单', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let zeroOrderList=null |
|
|
|
|
if(this.dataList.length){ |
|
|
|
|
let resState=this.dataList.find(res=>!res.reservationNum) |
|
|
|
|
console.log(resState,'123'); |
|
|
|
|
if(resState){ |
|
|
|
|
let zeroOrderList = null; |
|
|
|
|
if (this.dataList.length) { |
|
|
|
|
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'); |
|
|
|
@ -2776,17 +2806,11 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
message: '请移除添加数量为0的订单', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.form.id) { |
|
|
|
|
|
|
|
|
|
// if (this.fileListSell.length === 0) { |
|
|
|
|
// this.$message.warning('请上传提货证件!!!'); |
|
|
|
|
// return; |
|
|
|
@ -2856,19 +2880,22 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
} |
|
|
|
|
// ParcelLisList |
|
|
|
|
const submitFormData = this.form; |
|
|
|
|
console.log(this.form,'this.form'); |
|
|
|
|
console.log(submitFormData,'this.sub'); |
|
|
|
|
console.log(this.form, 'this.form'); |
|
|
|
|
console.log(submitFormData, 'this.sub'); |
|
|
|
|
// 当有零担数据时 |
|
|
|
|
if (zeroOrderList && zeroOrderList.length !== 0) { |
|
|
|
|
console.log(zeroOrderList,'zeroOrderList222'); |
|
|
|
|
console.log(zeroOrderList, 'zeroOrderList222'); |
|
|
|
|
// console.log(1); |
|
|
|
|
submitFormData.parcelLisList = []; |
|
|
|
|
submitFormData.zeroType = '2'; |
|
|
|
|
zeroOrderList.forEach(valE => { |
|
|
|
|
console.log(valE,'valE==>'); |
|
|
|
|
if(valE.ParcelLisList){ |
|
|
|
|
if(valE.ParcelLisList.length){ |
|
|
|
|
submitFormData.parcelLisList = [...submitFormData.parcelLisList, ...valE.ParcelLisList]; |
|
|
|
|
console.log(valE, 'valE==>'); |
|
|
|
|
if (valE.ParcelLisList) { |
|
|
|
|
if (valE.ParcelLisList.length) { |
|
|
|
|
submitFormData.parcelLisList = [ |
|
|
|
|
...submitFormData.parcelLisList, |
|
|
|
|
...valE.ParcelLisList, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -2886,7 +2913,7 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}); |
|
|
|
|
submitFormData.billPackageEntityList = _billPackageEntityList; |
|
|
|
|
// SM24010411 |
|
|
|
|
console.log(submitFormData,'submitFormData'); |
|
|
|
|
console.log(submitFormData, 'submitFormData'); |
|
|
|
|
this.Selfpickuploading = true; //开启加载效果 |
|
|
|
|
|
|
|
|
|
add(submitFormData) |
|
|
|
@ -2902,6 +2929,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 => { |
|
|
|
@ -2970,7 +3001,7 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
up.deliveryDocument = this.form.deliveryDocument; |
|
|
|
|
up.certificateType = this.form.certificateType; |
|
|
|
|
up.totalCost = this.form.totalCost; |
|
|
|
|
up.remark=this.form.remark; |
|
|
|
|
up.remark = this.form.remark; |
|
|
|
|
up.mark = mark; |
|
|
|
|
up.stockArticleList = this.dataList; |
|
|
|
|
// 当有零担数据时 |
|
|
|
@ -2990,36 +3021,57 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
up.zeroType = '1'; |
|
|
|
|
} |
|
|
|
|
// 新增列表 |
|
|
|
|
let _billPackageEntityList = []; |
|
|
|
|
// 删除列表 |
|
|
|
|
let _unBillPackageEntityList = []; |
|
|
|
|
// submitFormData.billPackageEntityList |
|
|
|
|
this.dataList.forEach(val => { |
|
|
|
|
if (val.originalIdList) { |
|
|
|
|
let _billPackageEntityList = []; |
|
|
|
|
// 删除列表 |
|
|
|
|
let _unBillPackageEntityList = []; |
|
|
|
|
// submitFormData.billPackageEntityList |
|
|
|
|
this.dataList.forEach(val => { |
|
|
|
|
console.log(val,'value'); |
|
|
|
|
if(val.billPackageEntityList && val.billPackageEntityList.length){ |
|
|
|
|
val.billPackageEntityList.forEach(item => { |
|
|
|
|
// 新增 |
|
|
|
|
if (!val.originalIdList.includes(item.parceListId)) { |
|
|
|
|
_billPackageEntityList.push(item); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除 |
|
|
|
|
val.originalList.forEach(item => { |
|
|
|
|
const _flag = val.billPackageEntityList.findIndex( |
|
|
|
|
value => value.parceListId === item.id |
|
|
|
|
); |
|
|
|
|
if (_flag === -1) { |
|
|
|
|
if(val.unBillPackageEntityList && val.unBillPackageEntityList.length){ |
|
|
|
|
val.unBillPackageEntityList.forEach(item=>{ |
|
|
|
|
console.log(item,'item===>'); |
|
|
|
|
_unBillPackageEntityList.push({ |
|
|
|
|
parceListId: item.id, |
|
|
|
|
parceListId: item.parceListId, |
|
|
|
|
stockArticleId: item.stockArticleId, |
|
|
|
|
packetBarCode: item.orderPackageCode, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
packetBarCode: item.packetBarCode, |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
up.billPackageEntityList = _billPackageEntityList; |
|
|
|
|
up.unBillPackageEntityList = _unBillPackageEntityList; |
|
|
|
|
this.Selfpickuploading = true; //开启加载效果 |
|
|
|
|
|
|
|
|
|
// if(val.originalList && val.originalList.length){ |
|
|
|
|
// val.originalList.forEach(item => { |
|
|
|
|
// const _flag = val.billPackageEntityList.findIndex( |
|
|
|
|
// value => value.parceListId === item.id |
|
|
|
|
// ); |
|
|
|
|
// if (_flag === -1) { |
|
|
|
|
// _unBillPackageEntityList.push({ |
|
|
|
|
// parceListId: item.id, |
|
|
|
|
// stockArticleId: item.stockArticleId, |
|
|
|
|
// packetBarCode: item.orderPackageCode, |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
console.log(_unBillPackageEntityList,'删除的'); |
|
|
|
|
up.billPackageEntityList = _billPackageEntityList; |
|
|
|
|
up.unBillPackageEntityList = _unBillPackageEntityList; |
|
|
|
|
this.Selfpickuploading = true; //开启加载效果 |
|
|
|
|
console.log(up,'要提交的数据'); |
|
|
|
|
|
|
|
|
|
update(up) |
|
|
|
|
.then(() => { |
|
|
|
|
this.Selfpickuploading = false; //开启加载效果 |
|
|
|
@ -3030,6 +3082,10 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
this.PackageCheckList=[] |
|
|
|
|
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 => { |
|
|
|
@ -3094,16 +3150,15 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
params.genre = 1; |
|
|
|
|
params.typeService = 3; |
|
|
|
|
params.isAll = 0; |
|
|
|
|
if(this.data && this.data.length){ |
|
|
|
|
params.mallId =this.data[0].marketId |
|
|
|
|
console.log(params,'params'); |
|
|
|
|
if (this.data && this.data.length) { |
|
|
|
|
params.mallId = this.data[0].marketId; |
|
|
|
|
console.log(params, 'params'); |
|
|
|
|
} |
|
|
|
|
$_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 |
|
|
|
|
$_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; |
|
|
|
|
} |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.pageOrder.total = data.total || 0; |
|
|
|
@ -3138,10 +3193,9 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
} |
|
|
|
|
).catch(res=>{ |
|
|
|
|
|
|
|
|
|
}).finally(()=>{ |
|
|
|
|
}) |
|
|
|
|
.catch(res => {}) |
|
|
|
|
.finally(() => { |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -3150,14 +3204,14 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
// if (this.dataList.length === 0) { |
|
|
|
|
// return this.$message.warning('请选择最少一条定制品'); |
|
|
|
|
// } |
|
|
|
|
if(!JSON.parse(localStorage.getItem('my_data'))){ |
|
|
|
|
if (!JSON.parse(localStorage.getItem('my_data'))) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择仓库!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(this.dataList,'dataList'); |
|
|
|
|
console.log(this.dataList, 'dataList'); |
|
|
|
|
|
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.dialogFormVisible = true; |
|
|
|
@ -3237,23 +3291,22 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
// 定制品新增 -- 页码改变 |
|
|
|
|
currentChangeOrder(currentPage) { |
|
|
|
|
this.pageOrder.currentPage = currentPage; |
|
|
|
|
this.onLoadOrder(this.pageOrder,this.query); |
|
|
|
|
this.onLoadOrder(this.pageOrder, this.query); |
|
|
|
|
}, |
|
|
|
|
sizeChangeOrder(pageSize) { |
|
|
|
|
this.pageOrder.pageSize = pageSize; |
|
|
|
|
this.onLoadOrder(this.pageOrder,this.query); |
|
|
|
|
this.onLoadOrder(this.pageOrder, this.query); |
|
|
|
|
}, |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
this.onLoad(this.page,this.query); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page,this.query); |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
|
params.ids = this.$route.query.id; |
|
|
|
|
this.orderAdd = false; |
|
|
|
@ -3264,9 +3317,6 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 创建自提 |
|
|
|
@ -3281,11 +3331,11 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
let data = { |
|
|
|
|
current: this.pageStock.currentPage, |
|
|
|
|
size: this.pageStock.pageSize, |
|
|
|
|
warehouseId:this.mydata.id, |
|
|
|
|
warehouseId: this.mydata.id, |
|
|
|
|
...dataso, |
|
|
|
|
}; |
|
|
|
|
if(this.dataList && this.dataList.length){ |
|
|
|
|
data.marketId= this.dataList[0].mallId |
|
|
|
|
if (this.dataList && this.dataList.length) { |
|
|
|
|
data.marketId = this.dataList[0].mallId; |
|
|
|
|
} |
|
|
|
|
console.log(data, '处理好的值'); |
|
|
|
|
getListStockList(data).then(res => { |
|
|
|
@ -3298,50 +3348,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 = {}) { |
|
|
|
@ -3410,22 +3417,21 @@ if (val.orderPackageStatus == 70) {
|
|
|
|
|
}, |
|
|
|
|
// 修改零担零担信息 |
|
|
|
|
handleRowZeroOrder() { |
|
|
|
|
console.log(this.zeroOrderFormList,'12121212'); |
|
|
|
|
let sum =0 |
|
|
|
|
this.zeroOrderFormList.forEach(res=>{ |
|
|
|
|
sum+= res.tiQuantity |
|
|
|
|
}) |
|
|
|
|
console.log(sum,'总和'); |
|
|
|
|
this.dataList.find(res=>res.id==this.zeroOrderFormList[0].stockArticleId).reservationNum=sum |
|
|
|
|
|
|
|
|
|
console.log(this.zeroOrderFormList, '12121212'); |
|
|
|
|
let sum = 0; |
|
|
|
|
this.zeroOrderFormList.forEach(res => { |
|
|
|
|
sum += res.tiQuantity; |
|
|
|
|
}); |
|
|
|
|
console.log(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; |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 显示维护在库零担数量 |
|
|
|
|