Commit 77d5bdf1 by wusiyi

feat: 工厂订单new添加配货分拣功能 #1005762

parent 013ab342
......@@ -844,6 +844,10 @@ const handleSearch = () => {
const everyPower = podOrderDetailsData.value?.productList?.every(
(item) => item.power,
)
if (props.wallType === 'sort' && !isAutoPrint.value) {
getPackingData(code)
return
}
if (everyPower) {
/**
* printSuccess 打印成功
......@@ -851,11 +855,11 @@ const handleSearch = () => {
* printIng 打印中
* notPrintSuccess 未能获取打印状态
*/
// 配货分拣 自动打单(无需校验是否打单成功)
// 非配货分拣 打印成功提示;配货分拣:开启自动打单且打印成功,提交;配货分拣:不开启自动打单,不提示
if (
props.wallType !== 'sort' &&
podOrderDetailsData.value?.printResult === 'printSuccess'
podOrderDetailsData.value?.printResult === 'printSuccess' &&
(props.wallType !== 'sort' ||
(props.wallType === 'sort' && isAutoPrint.value))
) {
submitInspection(() => {
getPackingData(code)
......@@ -1123,9 +1127,7 @@ const initOrderDetailBox = async () => {
})
const boxs = pickFinished.map((item) => item.box)
if (boxs.length > 0) {
if (props.wallType === 'sort') {
console.log(podOrderDetailsData, 'boxspodOrderDetailsData')
if (props.wallType === 'sort' && !isAutoPrint.value) {
return
}
nextTick(async () => {
......@@ -1187,9 +1189,10 @@ const nextStep = async (callback: () => void) => {
)
if (
everyPicked &&
((props.wallType === 'sort' && isAutoPrint.value) ||
props.wallType !== 'sort') &&
(podOrderDetailsData.value?.printResult === 'printSuccess' ||
podOrderDetailsData.value?.printResult === 'notPrintSuccess') &&
props.wallType !== 'sort'
podOrderDetailsData.value?.printResult === 'notPrintSuccess')
) {
try {
await ElMessageBox.alert(
......@@ -1407,12 +1410,7 @@ const syncSortingArea = (
) => {
const currentArea = sortingAreaList.value.find((item) => item.id == packingId)
if (!currentArea) return
if (
sortingAreaId.value == packingId &&
warehouseId.value == currentArea.warehouseId
) {
return
}
warehouseId.value = currentArea.warehouseId
sortingAreaId.value = packingId
isAutoPrint.value = currentArea.autoPrint
......@@ -1513,7 +1511,7 @@ const getSortingAreaList = async () => {
sortingAreaList.value = res.data.records
sortingAreaId.value = res.data.records[0].id
warehouseId.value = res.data.records[0].warehouseId
isAutoPrint.value = res.data.records[0].autoPrint
isAutoPrint.value = res.data.records[0].autoPrint || false
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment