diff --git a/src/mycomponents/detail/comDetailCard.vue b/src/mycomponents/detail/comDetailCard.vue index 8c0c48dd..567543d4 100644 --- a/src/mycomponents/detail/comDetailCard.vue +++ b/src/mycomponents/detail/comDetailCard.vue @@ -6,7 +6,7 @@ - + @@ -52,6 +52,10 @@ const props = defineProps({ queryBalance: { type: Boolean, default: true + }, + isShowStatus: { + type: Boolean, + default: true } }) const option = ref([]) diff --git a/src/mycomponents/detail/comJobDetailCard.vue b/src/mycomponents/detail/comJobDetailCard.vue index 66b31772..0861bf27 100644 --- a/src/mycomponents/detail/comJobDetailCard.vue +++ b/src/mycomponents/detail/comJobDetailCard.vue @@ -5,7 +5,7 @@ - + @@ -34,6 +34,10 @@ const props = defineProps({ locationAreaTypeList: { type: Object, default: null + }, + isShowStatus: { + type: Boolean, + default: true } }) const showItem = ref({}) diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue index 6a44f1c6..fe4523ba 100644 --- a/src/mycomponents/package/packageList.vue +++ b/src/mycomponents/package/packageList.vue @@ -4,7 +4,7 @@ diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue index b8d877a9..58de0ee9 100644 --- a/src/mycomponents/record/recordComDetailCard.vue +++ b/src/mycomponents/record/recordComDetailCard.vue @@ -8,7 +8,7 @@ - + diff --git a/src/pages/issue/record/directIssue.vue b/src/pages/issue/record/directIssue.vue index da546aa6..b0b7804f 100644 --- a/src/pages/issue/record/directIssue.vue +++ b/src/pages/issue/record/directIssue.vue @@ -13,7 +13,7 @@ - + @@ -53,7 +53,7 @@ import { calc } from '@/common/calc.js' import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js' -import { getBusinessType, createItemInfo, createDetailInfo, calcTreeHandleQty } from '@/common/record.js' +import { getBusinessType, createItemInfo, createDetailInfo, calcTreeHandleQty, calcHandleQty } from '@/common/record.js' import { getManagementPrecisions, getPrecisionStrategyList, getPrecisionStrategyParams } from '@/common/balance.js' @@ -139,6 +139,8 @@ const getScanResult = (result) => { const { balance } = result const { label } = result const pack = result.package + const { packUnit } = pack + const { packQty } = pack const item = detailSource.value.find((res) => { if (res.itemCode == balance.itemCode) { return res @@ -148,34 +150,29 @@ const getScanResult = (result) => { fromWarehouseCode.value = balance.warehouseCode } if (item == undefined) { - // 获取推荐库位 - // this.getRecommendLocation(balance, pack, toLocation => { const itemp = createItemInfo(balance, pack) - const newDetail = createDetailInfo(balance, pack) // - // newDetail.toLocationCode = toLocation.code; - // newDetail.toWarehouseCode = toLocation.warehouseCode; + const newDetail = createDetailInfo(balance, pack) + newDetail.packUnit = packUnit || '' + newDetail.packQty = packQty || '' itemp.subList.push(newDetail) - const dataList = pack.subList detailSource.value.push(itemp) - detailSource.value.forEach((res) => { - res.subList.forEach((pack) => { - pack.packList = dataList.filter((c) => c.parentNumber == pack.packingNumber) - pack.packList.forEach((pac) => { - pac.parentPackingNumber = pac.parentNumber - pac.packingNumber = pac.number - pac.inventoryStatus = 'OK' - pac.scaned = true - }) - }) - }) - // }) + calcHandleQty(detailSource.value) } else { - const itemDetail = item.subList.find((r) => r.packingNumber == balance.packingNumber && r.batch == balance.batch) - if (itemDetail != undefined) { + const detail = item.subList.find((r) => { + if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) { + return r + } + }) + if (detail == undefined) { + const newDetail = createDetailInfo(balance, pack) + newDetail.packUnit = packUnit + newDetail.packQty = packQty + item.subList.push(newDetail) + calcHandleQty(detailSource.value) + } else if (detail.scaned == true) { showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) } } - // calcTreeHandleQty(this.detailSource); } // 获取推荐库位 @@ -272,10 +269,6 @@ const confirmSelect = (e) => { }) } -// const updateData = () => { -// calcTreeHandleQty() -// } - const removeItem = (index, item) => { detailSource.value.splice(index, 1) } @@ -343,33 +336,6 @@ const commit = () => { }) } -const getItemAndLocationRelations = () => { - const itemList = [] - detailSource.value.forEach((item) => { - item.subList.forEach((detail) => { - if (detail.scaned) { - detail.toLocationCode = toLocationCode - const filterResult = itemList.filter((res) => { - if (res.itemCode == item.itemCode && res.locationCode == detail.toLocationCode && res.batch == detail.batch && res.inventoryStatus == detail.inventoryStatus) { - return res - } - }) - // 去掉重复元素 - if (filterResult.length == 0) { - const result = { - itemCode: item.itemCode, - locationCode: detail.toLocationCode, - batch: detail.batch, - inventoryStatus: detail.inventoryStatus - } - itemList.push(result) - } - } - }) - }) - return itemList -} - const setRecordParams = () => { const subList = [] const creator = store.id @@ -402,7 +368,11 @@ const setRecordParams = () => { toBatch: info.batch, fromLocationCode: detail.locationCode, toLocationCode: detail.toLocationCode, - handleQty: detail.handleQty + handleQty: detail.handleQty, + fromPackUnit: detail.packUnit, + toPackUnit: detail.packUnit, + fromPackQty: detail.packQty, + toPackQty: detail.packQty } ] subList.push(submitItem) @@ -468,7 +438,7 @@ const showCommitSuccessMessage = (hint) => { } const updateData = () => { - // this.calcTreeHandleQty(); + calcHandleQty(detailSource.value) for (let i = 0; i < detailSource.value.length; i++) { const item = detailSource.value[i] if (item.qty == 0) { diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index b359bf21..b1654724 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -101,7 +101,7 @@ onLoad(() => { uni.clearStorage() // 清除缓存 if (import.meta.env.VITE_USER_NODE_ENV === 'development') { username.value = 'admin' - password.value = '123456' + password.value = 'win123456' } uni.setNavigationBarColor({ frontColor: '#ffffff', diff --git a/src/pages/productPutaway/job/productPutawayDetail.vue b/src/pages/productPutaway/job/productPutawayDetail.vue index 12b9e921..f53b2048 100644 --- a/src/pages/productPutaway/job/productPutawayDetail.vue +++ b/src/pages/productPutaway/job/productPutawayDetail.vue @@ -12,7 +12,7 @@ - + diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue index 3fc56e4d..7debdb69 100644 --- a/src/pages/productPutaway/record/productPutawayRecord.vue +++ b/src/pages/productPutaway/record/productPutawayRecord.vue @@ -9,7 +9,7 @@ - + diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue index 09cdef59..5d4186a6 100644 --- a/src/pages/productReceipt/job/productReceiptDetail.vue +++ b/src/pages/productReceipt/job/productReceiptDetail.vue @@ -178,7 +178,10 @@ const getDetail = () => { detailSource.value = getDataSource(subList.value) detailSource.value.forEach((r) => { r.subList.forEach((s) => { - if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) s.scaned = true + if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { + s.scaned = true + s.handleQty = s.qty + } }) }) } else { diff --git a/src/pages/putaway/job/putawayDetail.vue b/src/pages/putaway/job/putawayDetail.vue index 10824c40..9ee26f36 100644 --- a/src/pages/putaway/job/putawayDetail.vue +++ b/src/pages/putaway/job/putawayDetail.vue @@ -14,7 +14,7 @@ - +