|
|
|
@ -390,7 +390,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 弹窗组件 --> |
|
|
|
|
<div class="addlalog addlalogS" > |
|
|
|
|
<div class="addlalog addlalogS"> |
|
|
|
|
<el-dialog v-model="AddLalog" :title="wrapLoading ? '包件信息' : '在库订单信息'"> |
|
|
|
|
<!-- 表格列开始 --> |
|
|
|
|
<!-- data 订单信息 wrapData包件信息 --> |
|
|
|
@ -487,7 +487,7 @@
|
|
|
|
|
<el-table |
|
|
|
|
:data="wrapLoading ? wrapData : data" |
|
|
|
|
border |
|
|
|
|
:height="searchSo? '500': '580'" |
|
|
|
|
:height="searchSo ? '500' : '580'" |
|
|
|
|
style="width: 100%" |
|
|
|
|
ref="tableRefs" |
|
|
|
|
@select-all="selectAll" |
|
|
|
@ -729,10 +729,15 @@
|
|
|
|
|
<el-table-column fixed="right" label="数量操作"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-input-number |
|
|
|
|
v-if="!RouteId" |
|
|
|
|
size="small" |
|
|
|
|
v-model="scope.row.number" |
|
|
|
|
:min="0" |
|
|
|
|
:max="scope.row.quantity" |
|
|
|
|
@change="isZeroNumber(scope.row)" |
|
|
|
|
/> |
|
|
|
|
<el-input-number |
|
|
|
|
v-else |
|
|
|
|
size="small" |
|
|
|
|
v-model="scope.row.reservationNum" |
|
|
|
|
@change="isZeroNumber(scope.row)" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
@ -757,12 +762,14 @@ import {
|
|
|
|
|
$_selectStockArticleInfoList, |
|
|
|
|
$_getPackageListByStockArticleId, |
|
|
|
|
getZeroOrderDetail, |
|
|
|
|
$_getDeliveryZeroOrderDetail, |
|
|
|
|
} from '@/api/distribution/distributionStockArticle'; //API |
|
|
|
|
import { getVehicleList } from '@/api/basicdata/basicdataVehicle'; //车辆信息 |
|
|
|
|
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery'; //司机信息 |
|
|
|
|
import { ElMessage, type UploadProps } from 'element-plus'; |
|
|
|
|
import { deliveryBusinessTask } from '@/api/distribution/distributionReservation'; //提交API |
|
|
|
|
import { |
|
|
|
|
deliveryBusinessTask, |
|
|
|
|
$_getDeliveryZeroOrderDetail, |
|
|
|
|
} from '@/api/distribution/distributionReservation'; //提交API |
|
|
|
|
import { getListUser } from '@/api/distribution/distributionStockup'; //备货人员查询 |
|
|
|
|
import { $_stockUpInfo } from '@/api/basicdata/basicdataGoodsArea'; //备货区域 |
|
|
|
|
import { getListTeamInfo } from '@/api/basicdata/basicdataTeamGroup'; //装卸班组 |
|
|
|
@ -1050,10 +1057,10 @@ const ElButtonS = ref([
|
|
|
|
|
table: '查看', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
class: 'el-btn-view', |
|
|
|
|
class: 'el-btn-view Zola-View', |
|
|
|
|
space: true, |
|
|
|
|
size: 'small', |
|
|
|
|
icon: 'el-icon-view', |
|
|
|
|
icon: 'EditPen', |
|
|
|
|
table: '在库录入', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -1779,7 +1786,6 @@ const EditEvent = val => {
|
|
|
|
|
|
|
|
|
|
const toggleSelection = options => { |
|
|
|
|
const { val = true, data, dataInfo = wrapData.value, index = 0 } = options; |
|
|
|
|
|
|
|
|
|
const setIn = setTimeout(() => { |
|
|
|
|
if (val) { |
|
|
|
|
dataInfo.forEach((row, i) => { |
|
|
|
@ -1891,13 +1897,49 @@ const QuantityEntry = val => {
|
|
|
|
|
QuantityEntryStatus.value = true; //此时开启零担录入 |
|
|
|
|
EnteringLibrary.value = true; //显示零担 |
|
|
|
|
SjTc.value = false; //关闭司机弹窗 |
|
|
|
|
getZeroOrderDetail(val.id).then(res => { |
|
|
|
|
console.log(res, '数量录入返回信息'); |
|
|
|
|
isZeroTable.value = res.data.data; |
|
|
|
|
}); |
|
|
|
|
// 编辑状态 |
|
|
|
|
if (RouteId.value) { |
|
|
|
|
$_getDeliveryZeroOrderDetail({ |
|
|
|
|
deliveryId: dataId.value, |
|
|
|
|
orderId: val.id, |
|
|
|
|
}).then(res => { |
|
|
|
|
console.log(res, '编辑状态在库录入'); |
|
|
|
|
// 冻结数量-数量操作 =冻结数量 |
|
|
|
|
for (let item of res.data.data) { |
|
|
|
|
item.deliveryQuantity = item.deliveryQuantity - item.number; |
|
|
|
|
} |
|
|
|
|
isZeroTable.value = res.data.data; |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
// 新增状态 |
|
|
|
|
getZeroOrderDetail(val.id).then(res => { |
|
|
|
|
console.log(res, '数量录入返回信息'); |
|
|
|
|
isZeroTable.value = res.data.data; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 修改零担数量 |
|
|
|
|
const ModifyLCL = () => { |
|
|
|
|
// 最大值校验 |
|
|
|
|
for (const item of isZeroTable.value) { |
|
|
|
|
if (item.number > item.quantity) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: item.firsts + ':最大值: 不能大于(数量)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 最小值校验 |
|
|
|
|
for (const item of isZeroTable.value) { |
|
|
|
|
if (item.number < item.deliveryQuantity + item.outboundQuantity) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: item.firsts + ':最小值: 不能低于(冻结数量+出库数量)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
updateEntryNum(isZeroTable.value).then(res => { |
|
|
|
|
console.log(res, '修改零担'); |
|
|
|
|
console.log(isZeroTable.value, '修改零担的值'); |
|
|
|
@ -1911,22 +1953,51 @@ const SubmitLoad = () => {
|
|
|
|
|
// 新增订单 |
|
|
|
|
// QuantityEntryStatus为真表示此时此刻操作的是数量录入提交 |
|
|
|
|
if (QuantityEntryStatus.value) { |
|
|
|
|
dataInfo.value[dataId.value].parcelNumberVOS = isZeroTable.value; |
|
|
|
|
if (RouteId.value) { |
|
|
|
|
for (let item of isZeroTable.value) { |
|
|
|
|
item.number > item.handQuantity - item.deliveryQuantity - item.outboundQuantity; |
|
|
|
|
ElMessage({ |
|
|
|
|
message: item.firsts + ':最大值:不能超过(可用数量)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log(dataInfo.value[dataId.value], '当前零担信息'); |
|
|
|
|
} else { |
|
|
|
|
// 操作数量最小值校验 冻结数量+出库数量 |
|
|
|
|
for (const item of isZeroTable.value) { |
|
|
|
|
if (item.number < item.deliveryQuantity + item.outboundQuantity) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: item.firsts + ':最小值:不能低于(冻结数量+在库数量)', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 操作数量最大值校验 |
|
|
|
|
|
|
|
|
|
for (const item of isZeroTable.value) { |
|
|
|
|
if (item.handQuantity + item.number > item.quantity) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: item.firsts + ':最大值:不能超过(在库数量+输入的数量)>数量', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
entryNum(isZeroTable.value).then(res => { |
|
|
|
|
console.log(res, '提交零担'); |
|
|
|
|
console.log(isZeroTable.value, '提交零担的值'); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
dataInfo.value[dataId.value].parcelNumberVOS = isZeroTable.value; |
|
|
|
|
comprehensive.value = false; //关闭弹窗 |
|
|
|
|
EnteringLibrary.value = false; //关闭零担 |
|
|
|
|
QuantityEntryStatus.value = false; //此时开启零担录入 |
|
|
|
|
}; |
|
|
|
|
// 零担数量操作 |
|
|
|
|
const isZeroNumber = val => { |
|
|
|
|
console.log(val, '当前操作数据'); |
|
|
|
|
|
|
|
|
|
val.reservationNum = val.number; |
|
|
|
|
}; |
|
|
|
|
// 刷新功能触发事件 |
|
|
|
@ -2765,6 +2836,9 @@ const SubmitCommercial = () => {
|
|
|
|
|
padding: 0; |
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
.el-input-number { |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.isZel-btn { |
|
|
|
|
display: flex; |
|
|
|
|