|
|
|
@ -242,12 +242,15 @@
|
|
|
|
|
text |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="rowOrder(slotProps.scope.row)" |
|
|
|
|
>移除</el-text > |
|
|
|
|
>移除</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
|
@click="handleChooseOrder(slotProps.scope.row)" |
|
|
|
|
text |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
>选择包件</el-text > |
|
|
|
|
>选择包件</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
</el-tab-pane> |
|
|
|
@ -427,6 +430,7 @@
|
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog v-model="dialogFormOrderVisible" title="添加订单" style="width: 80%"> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="multipleTable" |
|
|
|
@ -491,6 +495,45 @@
|
|
|
|
|
<el-button @click="dialogFormZeroOrderVisible = false">取消</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 选择包件 --> |
|
|
|
|
<el-dialog v-model="dialogChooseOrderVisible" title="选择包件" center style="width: 80%"> |
|
|
|
|
<tablecmt |
|
|
|
|
ref="orderChooseTable" |
|
|
|
|
:columnList="columnOrderList" |
|
|
|
|
:tableData="orderDetails" |
|
|
|
|
:loading="orderChooseLoading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
</tablecmt> |
|
|
|
|
<div class="avue-crud__pagination" style="width: 100%"> |
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<el-pagination |
|
|
|
|
align="right" |
|
|
|
|
background |
|
|
|
|
@size-change="sizeChangeOrderChoose" |
|
|
|
|
@current-change="currentChangeOrderChoose" |
|
|
|
|
:current-page="pageOrderChoose.currentPage" |
|
|
|
|
:page-sizes="[30, 50, 80, 120]" |
|
|
|
|
:page-size="pageOrderChoose.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="pageOrderChoose.total" |
|
|
|
|
> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
|
<span class="dialog-footer"> |
|
|
|
|
<el-button @click="dialogChooseOrderVisible = false">取消</el-button> |
|
|
|
|
<!-- <el-button type="primary" @click="dialogFormVisible = false"> 确定 </el-button>--> |
|
|
|
|
<el-button type="primary" @click="callFordeliveryOrder('1')"> 确定 </el-button> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -533,6 +576,8 @@ export default {
|
|
|
|
|
dialogFormVisible: false, |
|
|
|
|
dialogFormOrderVisible: false, //订单详细 |
|
|
|
|
dialogFormZeroOrderVisible: false, // 零担订单弹出层 |
|
|
|
|
// 选择包件弹出层 |
|
|
|
|
dialogChooseOrderVisible: false, |
|
|
|
|
height: 0, |
|
|
|
|
// 弹框标题 |
|
|
|
|
title: '', |
|
|
|
@ -543,6 +588,7 @@ export default {
|
|
|
|
|
orderAdd: false, |
|
|
|
|
// 加载中 |
|
|
|
|
loading: false, |
|
|
|
|
orderChooseLoading: false, |
|
|
|
|
// 是否为查看模式 |
|
|
|
|
view: false, |
|
|
|
|
// 查询信息 |
|
|
|
@ -553,21 +599,27 @@ export default {
|
|
|
|
|
page: { |
|
|
|
|
currentPage: 1, |
|
|
|
|
pageSize: 30, |
|
|
|
|
total: 40, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
pageOrder: { |
|
|
|
|
currentPage: 1, |
|
|
|
|
pageSize: 30, |
|
|
|
|
total: 40, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
// 分页信息 |
|
|
|
|
pageStock: { |
|
|
|
|
currentPage: 1, |
|
|
|
|
pageSize: 30, |
|
|
|
|
total: 40, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
pageOrderChoose: { |
|
|
|
|
currentPage: 1, |
|
|
|
|
pageSize: 30, |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
// 表单数据 |
|
|
|
|
form: {}, |
|
|
|
|
orderChooseId: '', |
|
|
|
|
// 选择行 |
|
|
|
|
selectionList: [], |
|
|
|
|
stockupDate: [], // 时间 |
|
|
|
@ -1550,6 +1602,8 @@ export default {
|
|
|
|
|
hide: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
columnOrderList: [], |
|
|
|
|
orderDetails: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -1918,7 +1972,37 @@ export default {
|
|
|
|
|
this.dialogFormVisible = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//数量校验 |
|
|
|
|
// 选择包件 |
|
|
|
|
handleChooseOrder(row) { |
|
|
|
|
console.log('row :>> ', row); |
|
|
|
|
console.log('111 :>> ', 111); |
|
|
|
|
this.dialogChooseOrderVisible = true; |
|
|
|
|
this.orderChooseId = row.id; |
|
|
|
|
onLoadOrderChoose(); |
|
|
|
|
}, |
|
|
|
|
// 每页数量改变 |
|
|
|
|
sizeChangeOrderChoose() {}, |
|
|
|
|
// 页码改变 |
|
|
|
|
currentChangeOrderChoose() {}, |
|
|
|
|
// 请求包件数据 |
|
|
|
|
onLoadOrderChoose() { |
|
|
|
|
console.log('1111 :>> ', 1111); |
|
|
|
|
this.orderChooseLoading = true; |
|
|
|
|
this.query.stockArticleId = this.orderChooseId; |
|
|
|
|
this.query.conditions = '1'; |
|
|
|
|
getList( |
|
|
|
|
pageOrderChoose.currentPage, |
|
|
|
|
pageOrderChoose.pageSize, |
|
|
|
|
Object.assign(params, this.query) |
|
|
|
|
).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.pageOrderChoose.total = data.total; |
|
|
|
|
this.orderDetails = data.records; |
|
|
|
|
this.orderChooseLoading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 数量校验 |
|
|
|
|
handleNumberRange(e, row) { |
|
|
|
|
if (e.target.value) { |
|
|
|
|
e.target.value = e.target.value.replace(/[^\.\d]/g, ''); //替换掉与数字无关的字符(中英文与符号都会被替换掉,只留下数字,此时值类型为字符串) |
|
|
|
@ -2065,16 +2149,18 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async handleSubmit() { |
|
|
|
|
const zeroOrderList = |
|
|
|
|
this.dataList.filter(val => val.isZero === '1'); |
|
|
|
|
console.log('123 :>> ', 123); |
|
|
|
|
const zeroOrderList = this.dataList.filter(val => val.isZero === '1'); |
|
|
|
|
// 当有零担订单物料数量没操作时 |
|
|
|
|
const wrongZeroOrder = zeroOrderList.find(val => !val.ParcelLisList); |
|
|
|
|
console.log('zeroOrderList :>> ', zeroOrderList); |
|
|
|
|
console.log('wrongZeroOrder :>> ', wrongZeroOrder); |
|
|
|
|
if (wrongZeroOrder) |
|
|
|
|
if (wrongZeroOrder) { |
|
|
|
|
return this.$message({ |
|
|
|
|
type: 'error', |
|
|
|
|
message: `订单自编号为${wrongZeroOrder.orderCode}的物料数量未编辑`, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (zeroOrderList) { |
|
|
|
|
// 双层循环查看每一个物料数量是否被填写 |
|
|
|
|
const isSubmit = zeroOrderList.every(item => { |
|
|
|
@ -2094,7 +2180,9 @@ export default {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let fei = new Map(); |
|
|
|
|
await this.bianLier(this.costListName, this.clientType, this.costList, fei); |
|
|
|
|
console.log('123 :>> ', 123); |
|
|
|
|
this.bianLier(this.costListName, this.clientType, this.costList, fei); |
|
|
|
|
console.log('321 :>> ', 321); |
|
|
|
|
this.form.fei = Object.fromEntries(fei); |
|
|
|
|
this.form.stockArticleId = !this.$route.query.id ? null : this.$route.query.id; //订单ID |
|
|
|
|
this.form.stockDTOList = this.data; |
|
|
|
@ -2141,17 +2229,21 @@ export default {
|
|
|
|
|
const submitFormData = this.form; |
|
|
|
|
// 当有零担数据时 |
|
|
|
|
if (zeroOrderList.length !== 0) { |
|
|
|
|
console.log(1); |
|
|
|
|
submitFormData.parcelLisList = []; |
|
|
|
|
submitFormData.zeroType = '2'; |
|
|
|
|
zeroOrderList.forEach(val => { |
|
|
|
|
val.ParcelLisList.forEach(item => { |
|
|
|
|
submitFormData.parcelLisList.push(item); |
|
|
|
|
}); |
|
|
|
|
submitFormData.parcelLisList = [ |
|
|
|
|
...submitFormData.parcelLisList, |
|
|
|
|
...val.ParcelLisList, |
|
|
|
|
]; |
|
|
|
|
// val.ParcelLisList.forEach(item => { |
|
|
|
|
// submitFormData.parcelLisList.push(item); |
|
|
|
|
// }); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
submitFormData.zeroType = '1'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
add(submitFormData).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
@ -2165,7 +2257,7 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
let fei = new Map(); |
|
|
|
|
await this.bianLier(this.costListName, this.clientType, this.costList, fei); |
|
|
|
|
this.bianLier(this.costListName, this.clientType, this.costList, fei); |
|
|
|
|
this.form.fei = Object.fromEntries(fei); |
|
|
|
|
this.form.stockDTOList = this.data; |
|
|
|
|
let o = []; |
|
|
|
@ -2207,6 +2299,20 @@ export default {
|
|
|
|
|
up.totalCost = this.form.totalCost; |
|
|
|
|
up.mark = mark; |
|
|
|
|
up.stockArticleList = this.dataList; |
|
|
|
|
// 当有零担数据时 |
|
|
|
|
if (zeroOrderList.length !== 0) { |
|
|
|
|
console.log(1); |
|
|
|
|
up.parcelLisList = []; |
|
|
|
|
up.zeroType = '2'; |
|
|
|
|
zeroOrderList.forEach(val => { |
|
|
|
|
up.parcelLisList = [...up.parcelLisList, ...val.ParcelLisList]; |
|
|
|
|
// val.ParcelLisList.forEach(item => { |
|
|
|
|
// up.parcelLisList.push(item); |
|
|
|
|
// }); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
up.zeroType = '1'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
update(up).then(() => { |
|
|
|
|
// this.box = false; |
|
|
|
@ -2466,6 +2572,8 @@ export default {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('row :>> ', row); |
|
|
|
|
|
|
|
|
|
// 请求零担数据详情 |
|
|
|
|
const res = await zeroMaterial({ stockArticleId: row.id }); |
|
|
|
|
console.log('res :>> ', res); |
|
|
|
@ -2484,7 +2592,12 @@ export default {
|
|
|
|
|
// 物料名称 |
|
|
|
|
firsts: val.firsts, |
|
|
|
|
}; |
|
|
|
|
if (row.completeSetName !== '是') zeroOrder.quantity = null; |
|
|
|
|
// 新增时, 检测是否齐套 |
|
|
|
|
if (row.completeSetName !== '是' && Number(this.$route.query.type) === 3) |
|
|
|
|
zeroOrder.quantity = null; |
|
|
|
|
else if (val.deliveryQuantity && Number(this.$route.query.type) === 2) { |
|
|
|
|
zeroOrder.quantity = val.deliveryQuantity; |
|
|
|
|
} |
|
|
|
|
return zeroOrder; |
|
|
|
|
}); |
|
|
|
|
console.log('this.zeroOrderFormList :>> ', this.zeroOrderFormList); |
|
|
|
|