|
|
|
@ -110,14 +110,13 @@
|
|
|
|
|
<el-form ref="form" :model="stockUpForm" label-width="100px" style="margin: 3px"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="叉车司机:" prop="forklift"> |
|
|
|
|
<el-select filterable v-model="stockUpForm.forklift" placeholder="请选择叉车司机"> |
|
|
|
|
<el-form-item label="备货人员:" prop="forklift"> |
|
|
|
|
<el-select filterable v-model="stockUpForm.forklift" placeholder="请选择备货人员"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in this.forkliftData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
<!-- {{this.forkliftData}}--> |
|
|
|
@ -132,7 +131,6 @@
|
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
@ -145,7 +143,6 @@
|
|
|
|
|
v-for="item in loadAndUnloadData" |
|
|
|
|
:label="item.dictKey" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
> |
|
|
|
|
<span>{{ item.dictValue }}</span> |
|
|
|
|
</el-checkbox> |
|
|
|
@ -155,7 +152,7 @@
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="配送类型:" prop="goodsAreaId"> |
|
|
|
|
<el-radio-group v-model="stockUpForm.deliveryType"> |
|
|
|
|
<el-radio :label="'1'" :value="'1'">商配  </el-radio> |
|
|
|
|
<el-radio :label="'10'" :value="'10'">商配  </el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -169,7 +166,6 @@
|
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
@ -177,7 +173,7 @@
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="备货时间:" prop="goodsShelfId"> |
|
|
|
|
<el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间" :disabled="isDisable"> |
|
|
|
|
<el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -886,33 +882,35 @@
|
|
|
|
|
this.loading = true; |
|
|
|
|
this.obj = row; |
|
|
|
|
console.log("++++++++++++",this.obj); |
|
|
|
|
|
|
|
|
|
if (this.deliveryListId){ |
|
|
|
|
//编辑 |
|
|
|
|
let params={}; |
|
|
|
|
console.log("^^^^^^^^",row); |
|
|
|
|
this.query.stockArticleId = row.id; |
|
|
|
|
//TODO 这里还需要对包件的状态进行过滤 this.query.id = 1; |
|
|
|
|
// this.query.typeService = 1; |
|
|
|
|
// this.query.genre = '1'; |
|
|
|
|
getPackageList(Object.assign(params,this.query)).then(res=>{ |
|
|
|
|
console.log(res.data.data); |
|
|
|
|
let data =res.data.data; |
|
|
|
|
this.packageData =data.records; |
|
|
|
|
let packageInfo =row.parcelListVOS |
|
|
|
|
console.log("packageInfo",packageInfo); |
|
|
|
|
this.packageData.forEach((item,index)=>{ |
|
|
|
|
packageInfo.forEach(p=>{ |
|
|
|
|
//这里订单的对象中应该存在三个数组,一个数组是该订单下的所有包件细信息 |
|
|
|
|
//一个数组是该订单被选择使用的包件信息 |
|
|
|
|
//还有一个就是正在操作的包件信息 |
|
|
|
|
let packageInfo = row.parcelListVOS |
|
|
|
|
if (row.packageList){ |
|
|
|
|
let packageListInfo = row.packageList; |
|
|
|
|
packageInfo.forEach((item,index)=>{ |
|
|
|
|
packageListInfo.forEach(p=>{ |
|
|
|
|
if (item.id===p.id){ |
|
|
|
|
this.selectionList.push(item); |
|
|
|
|
this.$nextTick( ()=> { |
|
|
|
|
this.$refs.packageList.toggleRowSelection(this.packageData[index],true); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}) |
|
|
|
|
}else { |
|
|
|
|
//新增订单,默认全选 |
|
|
|
|
packageInfo.forEach((item,index)=>{ |
|
|
|
|
this.$nextTick( ()=> { |
|
|
|
|
this.$refs.packageList.toggleRowSelection(this.packageData[index],true); |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.packageData =row.parcelListVOS; |
|
|
|
|
}else { |
|
|
|
|
//新增 |
|
|
|
|
//默认打开包件信息,包件列表处于全选状态 |
|
|
|
@ -949,7 +947,7 @@
|
|
|
|
|
console.log("___________",this.obj); |
|
|
|
|
this.orderData.forEach(item=>{ |
|
|
|
|
if (item.id===this.obj.id){ |
|
|
|
|
item.packageList = this.selectionList; |
|
|
|
|
item.packageListInfo = this.selectionList; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log( "**********",this.orderData); |
|
|
|
@ -992,18 +990,30 @@
|
|
|
|
|
this.stockListShow = false; |
|
|
|
|
}, |
|
|
|
|
onSubmitOrder() { |
|
|
|
|
console.log('>>>>>>>>>>>>', this.selectionList); |
|
|
|
|
this.orderData.forEach(item => { |
|
|
|
|
item.reservationNum = 0; |
|
|
|
|
this.selectionList.forEach((list, index) => { |
|
|
|
|
if (item.id === list.stockArticleId) { |
|
|
|
|
item.reservationNum += list.quantity; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
item.packageList = this.selectionList; |
|
|
|
|
}); |
|
|
|
|
console.log('>>>>>>>>>>>>', this.stockArticleList); |
|
|
|
|
console.log('>>>>>>>>orderData', this.orderData); |
|
|
|
|
if (this.orderData){ |
|
|
|
|
let a = this.orderData; |
|
|
|
|
this.stockArticleList.forEach(item=>{ |
|
|
|
|
a.forEach(order=>{ |
|
|
|
|
console.log("order----------------->",order); |
|
|
|
|
if (item.id === order.id){ |
|
|
|
|
item.packageListInfo = order.packageList; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// this.orderData.forEach(item => { |
|
|
|
|
// item.reservationNum = 0; |
|
|
|
|
// this.stockArticleList.forEach((list, index) => { |
|
|
|
|
// if (item.id === list.id) { |
|
|
|
|
// list = item; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
this.orderData = this.stockArticleList; |
|
|
|
|
console.log('+++++++++++++++', this.orderData); |
|
|
|
|
this.isaddvalue = false; |
|
|
|
|
this.orderShow = false; |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 订单提交 |
|
|
|
@ -1173,7 +1183,8 @@
|
|
|
|
|
if (this.waixieForm.driverName) { |
|
|
|
|
tripartite.driverName = this.waixieForm.driverName; |
|
|
|
|
} |
|
|
|
|
if (this.waixieForm.deiverPhone) { |
|
|
|
|
console.log("-------------->",this.waixieForm); |
|
|
|
|
if (this.waixieForm.driverPhone) { |
|
|
|
|
tripartite.driverPhone = this.waixieForm.driverPhone; |
|
|
|
|
} |
|
|
|
|
if (this.waixieForm.vehicleNum) { |
|
|
|
@ -1184,7 +1195,7 @@
|
|
|
|
|
} |
|
|
|
|
if (this.waixieForm.tripartiteSource) { |
|
|
|
|
this.tripartiteSourceData.forEach(item => { |
|
|
|
|
if (params.tripartiteSource === item.dictValue) { |
|
|
|
|
if (this.waixieForm.tripartiteSource === item.dictValue) { |
|
|
|
|
tripartite.distributionCompanyId = item.dictKey; |
|
|
|
|
tripartite.distributionCompany = item.dictValue; |
|
|
|
|
} |
|
|
|
@ -1365,7 +1376,7 @@
|
|
|
|
|
} |
|
|
|
|
this.aaa = true; |
|
|
|
|
this.bbb = false; |
|
|
|
|
this.stockUpForm.deliveryType="1"; |
|
|
|
|
this.stockUpForm.deliveryType="10"; |
|
|
|
|
this.stockUpForm.deliveryWay="10"; |
|
|
|
|
this.loadAndUnload = ["1","2"]; |
|
|
|
|
this.stockUpForm.otherFee = 0; |
|
|
|
@ -1386,7 +1397,7 @@
|
|
|
|
|
} |
|
|
|
|
this.aaa = false; |
|
|
|
|
this.bbb = true; |
|
|
|
|
this.stockUpForm.deliveryType="1"; |
|
|
|
|
this.stockUpForm.deliveryType="10"; |
|
|
|
|
this.stockUpForm.deliveryWay="10"; |
|
|
|
|
this.loadAndUnload = ["1","2"]; |
|
|
|
|
this.stockUpForm.otherFee = 0; |
|
|
|
@ -1402,14 +1413,22 @@
|
|
|
|
|
selectStockArticleAndParcel(Object.assign(params,this.query)).then(res=>{ |
|
|
|
|
console.log(res.data.data); |
|
|
|
|
const data = res.data.data; |
|
|
|
|
data.forEach(item => { |
|
|
|
|
item.reservationNum = item.handQuantity; |
|
|
|
|
data.forEach(item => { |
|
|
|
|
if (this.orderData){ |
|
|
|
|
this.orderData.forEach(a=>{ |
|
|
|
|
if (item.id === a.id){ |
|
|
|
|
item.packageList = a.packageList; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// item.reservationNum = item.handQuantity; |
|
|
|
|
}); |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.stockArticleInfo = data; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.query={}; |
|
|
|
|
// this.selectionClear(); |
|
|
|
|
|
|
|
|
|
if (this.deliveryListId) { |
|
|
|
|
//编辑 |
|
|
|
|
console.log("---->", this.stockArticleInfo); |
|
|
|
@ -1449,14 +1468,9 @@
|
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.stockListShow = true; |
|
|
|
|
}, |
|
|
|
|
onSubmitOrder() { |
|
|
|
|
this.orderData=this.stockArticleList; |
|
|
|
|
this.orderShow = false; |
|
|
|
|
}, |
|
|
|
|
selectionClear() { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.query={}; |
|
|
|
|
// this.$refs.table.clearSelection(); |
|
|
|
|
}, |
|
|
|
|
async onLoad(page, params = {}) { |
|
|
|
|
console.log("》》》》》》》》》》》》》》》",this.deliveryListId); |
|
|
|
@ -1465,7 +1479,7 @@
|
|
|
|
|
let data = res.data.data; |
|
|
|
|
Object.assign(this.stockUpForm,data.reservationInfo) |
|
|
|
|
Object.assign(this.stockUpForm,data.stockupInfo) |
|
|
|
|
this.stockUpForm.deliveryType = '1'; |
|
|
|
|
this.stockUpForm.deliveryType = '10'; |
|
|
|
|
this.stockUpForm.deliveryWay = data.reservationInfo.deliveryWay; |
|
|
|
|
this.serveType = data.reservationInfo.serveType.split(","); |
|
|
|
|
if (data.stockupInfo){ |
|
|
|
@ -1477,6 +1491,12 @@
|
|
|
|
|
this.stockUpForm.outboundDate = data.stockupInfo.outboundDate; |
|
|
|
|
this.stockUpForm.remarks = data.stockupInfo.remarks; |
|
|
|
|
this.stockUpForm.taskTime = data.taskTime; |
|
|
|
|
data.stockArticleList.forEach(item=>{ |
|
|
|
|
if (item.packageList){ |
|
|
|
|
item.packageList = item.packageList; |
|
|
|
|
item.packageListInfo = item.packageList; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.orderData = data.stockArticleList; |
|
|
|
|
if (data.teamResponsibility){ |
|
|
|
|
this.loadAndUnload =data.teamResponsibility.split(","); |
|
|
|
@ -1537,7 +1557,7 @@
|
|
|
|
|
}) |
|
|
|
|
this.isDisable=true; |
|
|
|
|
}else { |
|
|
|
|
this.stockUpForm.deliveryType="1"; |
|
|
|
|
this.stockUpForm.deliveryType="10"; |
|
|
|
|
this.stockUpForm.deliveryWay="10"; |
|
|
|
|
this.loadAndUnload = ["1","2"]; |
|
|
|
|
this.stockUpForm.otherFee = 0; |
|
|
|
|