Commit 77d5bdf1 by wusiyi

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

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