From bc919bf89e0d293bb5be874f1cc89238082eea54 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Mon, 2 Sep 2024 14:52:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E4=B8=8D?=
=?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=9C=A8=E9=80=94=E5=BA=93=202024/6/20=2008:?=
=?UTF-8?q?35:42?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/issue/coms/comScanIssuePack.vue | 23 +++++-
src/pages/issue/job/issueDetail.vue | 34 +++-----
src/pages/issue/job/issueJob.vue | 79 +++++++++++++++++--
src/pages/issue/js/issue.js | 1 +
.../package/job/overPackageJobDetail.vue | 32 ++++----
.../productPutaway/job/productPutawayJob.vue | 5 ++
.../productReceipt/job/productReceiptJob.vue | 5 ++
.../job/productionReceiptDetail.vue | 38 ++++++++-
.../job/productionReceiptJob.vue | 74 ++++++++++++++++-
src/pages/purchaseReceipt/job/receiptJob.vue | 5 ++
src/pages/putaway/job/putawayJob.vue | 5 ++
src/pages/repleinsh/job/repleinshDetail.vue | 32 ++++----
12 files changed, 269 insertions(+), 64 deletions(-)
diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue
index 9cd06df1..86d9fc8d 100644
--- a/src/pages/issue/coms/comScanIssuePack.vue
+++ b/src/pages/issue/coms/comScanIssuePack.vue
@@ -47,6 +47,8 @@
+
+
@@ -93,6 +95,7 @@ const fromInventoryStatuses = ref('')
const packageInfo = ref({})
const label = ref({})
const toLocationCombox = ref()
+const comscansimulate = ref()
const comMessageRef = ref()
const detailOptions = ref([])
const comscan = ref()
@@ -102,10 +105,26 @@ onMounted(() => {
detailOptions.value = getDetailOption()
scanOptions.value = getDetailEditRemoveOption()
})
-const openScanPopup = (content, jobcontent) => {
+const openScanPopupForJobSimulate = (content, jobcontentParams) => {
issueRecord.value = []
dataContent.value = content
- jobContent.value = jobcontent
+ jobContent.value = jobcontentParams
+ initData()
+ if (comscansimulate.value.vlaue != undefined) {
+ comscansimulate.value.vlaue.getfocus()
+ }
+ const timer = setTimeout((res) => {
+ if (timer) {
+ clearTimeout(timer)
+ }
+ comscansimulate.value.vlaue.setItemCodeSimulate(item.copyContent)
+ comscansimulate.value.vlaue.clickScanMsg()
+ }, 500)
+}
+const openScanPopup = (content, jobcontentParams) => {
+ issueRecord.value = []
+ dataContent.value = content
+ jobContent.value = jobcontentParams
initData()
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode
diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue
index 8c04b90a..ea82231b 100644
--- a/src/pages/issue/job/issueDetail.vue
+++ b/src/pages/issue/job/issueDetail.vue
@@ -64,6 +64,7 @@ const detailSource = ref([]) // 绑定在页面上的数据源
const detailOptions = ref([])
const scanOptions = ref([])
const jobStatus = ref('')
+const scanedPackingNumber = ref('')
const scanPopup = ref()
const comScanIssuePackRef = ref()
const comMessageRef = ref()
@@ -72,6 +73,7 @@ const managementList = ref([])
const comIssueDetailCardRef = ref()
onLoad((option) => {
id.value = option.id
+ scanedPackingNumber.value = option.scaned
if (id.value != undefined) {
// 新建的任务自动接收
if (option.status == '1') {
@@ -158,11 +160,6 @@ const closeScan = () => {
resizeCollapse()
}
const submit = () => {
- const params = setParams()
- if (!params.subList || params.subList.length == 0) {
- showErrorMessage('请扫描您需要提交的发料任务')
- return
- }
proxy.$modal.loading('提交中....')
// 目前任务只到一个库位
@@ -174,21 +171,16 @@ const submit = () => {
})
})
- // 使用在途库,不查询管理模式
- if (jobContent.value.useOnTheWayLocation == 'TRUE') {
- submitJob()
- } else {
- // 获取管理模式,封装参数
- getManagementPrecisions(itemCodes, locationCode, (res) => {
- if (res.success) {
- managementList.value = res.list
- submitJob()
- } else {
- uni.hideLoading()
- showErrorMessage(res.message)
- }
- })
- }
+ // 获取管理模式,封装参数
+ getManagementPrecisions(itemCodes, locationCode, (res) => {
+ if (res.success) {
+ managementList.value = res.list
+ submitJob()
+ } else {
+ uni.hideLoading()
+ showErrorMessage(res.message)
+ }
+ })
}
const submitJob = () => {
@@ -244,7 +236,7 @@ const setParams = () => {
record.amount = single_price * r.qty
// 使用在途库不改变管理模式
- if (jobContent.value.useOnTheWayLocation == 'TRUE') {
+ if (item.onTheWayLocationCode) {
record.toPackingNumber = r.packingNumber
record.toBatch = r.batch
} else {
diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue
index 567d235b..247f9f84 100644
--- a/src/pages/issue/job/issueJob.vue
+++ b/src/pages/issue/job/issueJob.vue
@@ -12,6 +12,9 @@
+
+
+
@@ -30,6 +33,10 @@ import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue'
import jobListPopup from '@/pages/issue/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
+import winScanButton from '@/mycomponents/scan/winScanButton.vue'
+import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
+import jobList from '@/mycomponents/jobList/jobList.vue'
+
const { proxy } = getCurrentInstance()
const jobList = ref([])
const pageNo = ref(1)
@@ -46,6 +53,8 @@ const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
+const scanPopup = ref()
+const jobListRef = ref()
onShow(() => {
nextTick(() => {
getList('refresh')
@@ -157,12 +166,16 @@ const getList = (type, fromLocationCode = '', productionLineCode = '') => {
})
}
-const openJobDetail = (item) => {
- proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}`)
+const openJobDetail = (item, packingNumber = '') => {
+ proxy.$tab.navigateTo(`./issueDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
}
const selectedItem = (item) => {
openJobDetail(item)
}
+const selectItem = (item) => {
+ scanPopup.value.closeScanPopup()
+ openJobDetail(item, item.packingNumber)
+}
const swipeClick = (index, index1) => {
// var text = clearTirmAndWrap(requestList.value[index].options[index].text)
let text = ''
@@ -258,9 +271,7 @@ const getDataListByType = (code) => {
const params = {
filters,
pageNo: 1,
- pageSize: 100,
- sort: 'fromLocationCode',
- by: 'asc'
+ pageSize: 100
}
getIssueJobList(params)
.then((res) => {
@@ -282,6 +293,64 @@ const showMessage = (message) => {
}
})
}
+const openScanPopup = () => {
+ scanPopup.value.openScanPopup()
+}
+const getScanResult = (result) => {
+ try {
+ const filters = [
+ {
+ column: 'status',
+ action: 'in',
+ value: '1,2'
+ },
+ {
+ column: 'batch',
+ action: '==',
+ value: result.label.batch
+ },
+ {
+ column: 'itemCode',
+ action: '==',
+ value: result.label.itemCode
+ }
+ ]
+ getIssueJobList({
+ filters,
+ pageNo: 1,
+ pageSize: 100,
+ sort: 'createTime',
+ by: 'asc'
+ })
+ .then((res) => {
+ const resultList = res.data.list
+ if (resultList.length > 0) {
+ resultList.forEach((item) => {
+ item.title = item.number
+ item.selected = false
+ })
+ const list = []
+ resultList.forEach((item) => {
+ if (!list.find((subItem) => subItem.title == item.title)) {
+ list.push(item)
+ }
+ })
+ if (list.length > 1) {
+ jobListRef.value.openList(list)
+ } else {
+ selectItem(list[0])
+ }
+ } else {
+ showMessage('未查找到任务')
+ }
+ })
+ .catch((error) => {
+ showMessage(error)
+ })
+ } catch (e) {
+ showMessage(e.message)
+ }
+}
diff --git a/src/pages/issue/js/issue.js b/src/pages/issue/js/issue.js
index 696ff895..97b8b8b5 100644
--- a/src/pages/issue/js/issue.js
+++ b/src/pages/issue/js/issue.js
@@ -53,6 +53,7 @@ export function createItemInfo(detail) {
let item = {
itemCode: detail.itemCode,
itemName: detail.itemName,
+ onTheWayLocationCode:detail.onTheWayLocationCode,
productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode,
packQty: detail.packQty,
diff --git a/src/pages/package/job/overPackageJobDetail.vue b/src/pages/package/job/overPackageJobDetail.vue
index 68e4cdb9..053a014e 100644
--- a/src/pages/package/job/overPackageJobDetail.vue
+++ b/src/pages/package/job/overPackageJobDetail.vue
@@ -177,22 +177,22 @@ const submit = () => {
itemCodes.push(item.itemCode)
})
})
-
- // 使用在途库,不查询管理模式
- if (jobContent.value.useOnTheWayLocation == 'TRUE') {
- checkSubmit()
- } else {
- // 获取管理模式,封装参数
- getManagementPrecisions(itemCodes, locationCode, (res) => {
- if (res.success) {
- managementList.value = res.list
- checkSubmit()
- } else {
- uni.hideLoading()
- showErrorMessage(res.message)
- }
- })
- }
+ checkSubmit()
+ // // 使用在途库,不查询管理模式
+ // if (jobContent.value.useOnTheWayLocation == 'TRUE') {
+ // checkSubmit()
+ // } else {
+ // // 获取管理模式,封装参数
+ // getManagementPrecisions(itemCodes, locationCode, (res) => {
+ // if (res.success) {
+ // managementList.value = res.list
+ // checkSubmit()
+ // } else {
+ // uni.hideLoading()
+ // showErrorMessage(res.message)
+ // }
+ // })
+ // }
}
const checkSubmit = () => {
const tempHandleQty = detailSource.value[0].Items[0].Locations[0].Batchs[0].handleQty
diff --git a/src/pages/productPutaway/job/productPutawayJob.vue b/src/pages/productPutaway/job/productPutawayJob.vue
index d8f288f2..5730d4d9 100644
--- a/src/pages/productPutaway/job/productPutawayJob.vue
+++ b/src/pages/productPutaway/job/productPutawayJob.vue
@@ -287,6 +287,11 @@ const getScanResult = (result) => {
column: 'type',
action: '==',
value: props.type
+ },
+ {
+ column: 'status',
+ action: 'in',
+ value: '1,2'
}
// {
// column: 'fromLocationCode',
diff --git a/src/pages/productReceipt/job/productReceiptJob.vue b/src/pages/productReceipt/job/productReceiptJob.vue
index b9649d46..672e0595 100644
--- a/src/pages/productReceipt/job/productReceiptJob.vue
+++ b/src/pages/productReceipt/job/productReceiptJob.vue
@@ -306,6 +306,11 @@ const getScanResult = (result) => {
column: 'type',
action: '==',
value: props.type
+ },
+ {
+ column: 'status',
+ action: 'in',
+ value: '1,2'
}
// {
// column: 'fromLocationCode',
diff --git a/src/pages/productionReceipt/job/productionReceiptDetail.vue b/src/pages/productionReceipt/job/productionReceiptDetail.vue
index d2f7d020..681776bf 100644
--- a/src/pages/productionReceipt/job/productionReceiptDetail.vue
+++ b/src/pages/productionReceipt/job/productionReceiptDetail.vue
@@ -75,6 +75,7 @@ const toLocationAreaTypeList = ref([])
const jobStatus = ref('')
const jobToLocationCode = ref('')
const isCheckLocation = ref(false)
+const scanedPackingNumber = ref('')
const scanPopup = ref()
const comScanIssuePackRef = ref()
const detailInfoPopupRef = ref()
@@ -82,6 +83,7 @@ const comMessageRef = ref()
const comScanLocation = ref()
onLoad((option) => {
id.value = option.id
+ scanedPackingNumber.value = option.scaned
if (id.value != undefined) {
// 新建的任务自动接收
if (option.status == '1') {
@@ -151,7 +153,17 @@ const getDetail = () => {
} else {
toLocationCode.value = jobToLocationCode.value
}
- uni.hideLoading()
+ detailSource.value.forEach((r) => {
+ r.subList.forEach((s) => {
+ if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) {
+ s.scaned = true
+ s.cancleScanedHiht = true
+ // 模拟扫描功能
+ openScanPopupSimulate(s)
+ scanedPackingNumber.value = ''
+ }
+ })
+ })
} else {
showMessage('列表数据为0')
}
@@ -203,6 +215,28 @@ const openScanPopup = () => {
const closeScanPopup = () => {
scanPopup.value.closeScanPopup()
}
+// 模拟扫描功能
+const openScanPopupSimulate = (item) => {
+ let fromlocationCode = ''
+ const fromlocationList = []
+ for (let i = 0; i < detailSource.value.length; i++) {
+ const item = detailSource.value[i]
+ item.subList.forEach((l) => {
+ // 重复的库位不往里面插入
+ const location = fromlocationList.find((res) => res == l.fromLocationCode)
+ if (location == undefined) {
+ fromlocationList.push(l.fromLocationCode)
+ }
+ // 来源库位赋默认值
+ if (fromlocationCode == '') {
+ if (!l.scaned) {
+ fromlocationCode = l.fromLocationCode
+ }
+ }
+ })
+ }
+ scanPopup.value.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, jobContent.value, item)
+}
const getScanResult = (result) => {
try {
// var supplierCode = result.label.supplierCode;
@@ -226,7 +260,7 @@ const getScanResult = (result) => {
})
if (itemDetail == undefined) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]不在列表中`)
- } else if (itemDetail.scaned) {
+ } else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]库位[${locationCode}]已经扫描`)
} else {
const balanceStatus = getInventoryStatusName(result.balance.inventoryStatus)
diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue
index 7ed0c3c0..4ee391bf 100644
--- a/src/pages/productionReceipt/job/productionReceiptJob.vue
+++ b/src/pages/productionReceipt/job/productionReceiptJob.vue
@@ -12,6 +12,9 @@
+
+
+
@@ -31,6 +34,9 @@ import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comProductionJobCard from '@/pages/productionReceipt/coms/comProductionJobCard.vue'
import jobListPopup from '@/pages/productionReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productionReceipt/coms/jobInfoPopup.vue'
+import winScanButton from '@/mycomponents/scan/winScanButton.vue'
+import winScanPackJob from '@/mycomponents/scan/winScanPackJob.vue'
+import jobList from '@/mycomponents/jobList/jobList.vue'
const { proxy } = getCurrentInstance()
const jobList = ref([])
@@ -48,6 +54,7 @@ const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
+const jobListRef = ref()
onShow(() => {
nextTick(() => {
getList('refresh')
@@ -139,8 +146,8 @@ const getList = (type) => {
showErrorMessage(error)
})
}
-const openJobDetail = (item) => {
- proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}`)
+const openJobDetail = (item, packingNumber = '') => {
+ proxy.$tab.navigateTo(`./productionReceiptDetail?id=${item.masterId}&status=${item.status}&scaned=${packingNumber}`)
}
const selectedItem = (item) => {
openJobDetail(item)
@@ -239,6 +246,69 @@ const showMessage = (message) => {
}
})
}
+
+const openScanPopup = () => {
+ scanPopup.value.openScanPopup()
+}
+
+const selectItem = (item) => {
+ scanPopup.value.closeScanPopup()
+ openJobDetail(item, item.packingNumber)
+}
+
+const getScanResult = (result) => {
+ try {
+ const filters = [
+ {
+ column: 'packingNumber',
+ action: '==',
+ value: result.label.packingNumber
+ },
+ {
+ column: 'batch',
+ action: '==',
+ value: result.label.batch
+ },
+ {
+ column: 'itemCode',
+ action: '==',
+ value: result.label.itemCode
+ }
+ ]
+ getProductionReceiptJobList({
+ filters,
+ pageNo: 1,
+ pageSize: 100
+ })
+ .then((res) => {
+ const resultList = res.data.list
+ if (resultList.length > 0) {
+ resultList.forEach((item) => {
+ item.title = item.number
+ item.selected = false
+ })
+ const list = []
+ resultList.forEach((item) => {
+ if (!list.find((subItem) => subItem.title == item.title)) {
+ list.push(item)
+ }
+ })
+ if (list.length > 1) {
+ jobListRef.value.openList(list)
+ } else {
+ selectItem(list[0])
+ }
+ } else {
+ showMessage('未查找到任务')
+ }
+ })
+ .catch((error) => {
+ showMessage(error)
+ })
+ } catch (e) {
+ showMessage(e.message)
+ }
+}
diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue
index d0bd3e3d..3d84fbe6 100644
--- a/src/pages/purchaseReceipt/job/receiptJob.vue
+++ b/src/pages/purchaseReceipt/job/receiptJob.vue
@@ -307,6 +307,11 @@ const getScanResult = (result) => {
column: 'itemCode',
action: '==',
value: result.label.itemCode
+ },
+ {
+ column: 'status',
+ action: 'in',
+ value: '1,2'
}
// {
// column: 'fromLocationCode',
diff --git a/src/pages/putaway/job/putawayJob.vue b/src/pages/putaway/job/putawayJob.vue
index 5506707c..1a5be3d4 100644
--- a/src/pages/putaway/job/putawayJob.vue
+++ b/src/pages/putaway/job/putawayJob.vue
@@ -282,6 +282,11 @@ const getScanResult = (result) => {
column: 'itemCode',
action: '==',
value: result.label.itemCode
+ },
+ {
+ column: 'status',
+ action: 'in',
+ value: '1,2'
}
// {
// column: 'fromLocationCode',
diff --git a/src/pages/repleinsh/job/repleinshDetail.vue b/src/pages/repleinsh/job/repleinshDetail.vue
index c7f08e9b..6148b721 100644
--- a/src/pages/repleinsh/job/repleinshDetail.vue
+++ b/src/pages/repleinsh/job/repleinshDetail.vue
@@ -216,22 +216,22 @@ const setSubmitParamsAndSubmit = () => {
itemCodes.push(item.itemCode)
})
})
-
- // 使用在途库,不查询管理模式
- if (jobContent.value.useOnTheWayLocation == 'TRUE') {
- submitJob()
- } else {
- // 获取管理模式,封装参数
- getManagementPrecisions(itemCodes, locationCode, (res) => {
- if (res.success) {
- managementList.value = res.list
- submitJob()
- } else {
- uni.hideLoading()
- showErrorMessage(res.message)
- }
- })
- }
+ submitJob()
+ // // 使用在途库,不查询管理模式
+ // if (jobContent.value.useOnTheWayLocation == 'TRUE') {
+ // submitJob()
+ // } else {
+ // // 获取管理模式,封装参数
+ // getManagementPrecisions(itemCodes, locationCode, (res) => {
+ // if (res.success) {
+ // managementList.value = res.list
+ // submitJob()
+ // } else {
+ // uni.hideLoading()
+ // showErrorMessage(res.message)
+ // }
+ // })
+ // }
}
const submitJob = () => {