Browse Source

PDA采购收货任务执行,是否打印的开关

2024/6/19 14:41:46
pull/1/head
张立 6 months ago
parent
commit
9458c72085
  1. 3
      src/pages.json
  2. 2
      src/pages/index/index.vue
  3. 2
      src/pages/pointPutawayJob/index.vue
  4. 10
      src/pages/productPutaway/job/productPutawayDetail.vue
  5. 4
      src/pages/productPutaway/job/productPutawayJob.vue
  6. 1
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  7. 1
      src/pages/productReceipt/job/productReceiptDetail.vue
  8. 94
      src/pages/purchaseReceipt/job/receiptDetail.vue
  9. 1
      src/pages/putaway/job/putawayDetail.vue

3
src/pages.json

@ -902,7 +902,7 @@
{ {
"path": "pages/productPutaway/job/fgProductPutawayJob", "path": "pages/productPutaway/job/fgProductPutawayJob",
"style": { "style": {
"navigationBarTitleText": "装配上架任务", "navigationBarTitleText": "成品入库任务",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"titleNView": { "titleNView": {
// "autoBackButton": "true", // "autoBackButton": "true",
@ -2074,7 +2074,6 @@
} }
}, },
{ {
"path": "pages/check/checkFgLabel",
"style": { "style": {
"navigationBarTitleText": "标签成品标签", "navigationBarTitleText": "标签成品标签",
"enablePullDownRefresh": false "enablePullDownRefresh": false

2
src/pages/index/index.vue

@ -339,7 +339,7 @@ const getDictory = () => {
console.log('包装规格获取失败', res) console.log('包装规格获取失败', res)
}) })
const switchCode = 'FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate' const switchCode = 'FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,purchasereceiptPrintPDA'
getSwitchByCode(switchCode) getSwitchByCode(switchCode)
.then((res) => { .then((res) => {

2
src/pages/pointPutawayJob/index.vue

@ -33,7 +33,7 @@
<u-td>{{ cur.batch }}</u-td> <u-td>{{ cur.batch }}</u-td>
<u-td>{{ cur.packingNumber }}</u-td> <u-td>{{ cur.packingNumber }}</u-td>
<u-td>{{ cur.packUnit }}</u-td> <u-td>{{ cur.packUnit }}</u-td>
<u-td>{{ cur.packQty }}</u-td> <u-td>{{ cur.qty }}</u-td>
<u-td>{{ cur.uom }}</u-td> <u-td>{{ cur.uom }}</u-td>
</u-tr> </u-tr>
</u-table> </u-table>

10
src/pages/productPutaway/job/productPutawayDetail.vue

@ -78,6 +78,7 @@ const type = ref('')
const isCheckLocation = ref(false) const isCheckLocation = ref(false)
const switchCode = ref('') const switchCode = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const hintTitle = ref('')
const status = ref('') const status = ref('')
const scanPopup = ref() const scanPopup = ref()
const comScanLocation = ref() const comScanLocation = ref()
@ -90,10 +91,12 @@ onLoad((option) => {
status.value = option.status || '' status.value = option.status || ''
if (type.value == 'predict') { if (type.value == 'predict') {
switchCode.value = 'SemiPutawayLocationCodeValidate' switchCode.value = 'SemiPutawayLocationCodeValidate'
updateTitle('预生产上架任务') hintTitle.value = '预生产上架'
updateTitle('预生产上架详情')
} else if (type.value == 'assemble') { } else if (type.value == 'assemble') {
hintTitle.value = '成品入库'
switchCode.value = 'FgPutawayLocationCodeValidate' switchCode.value = 'FgPutawayLocationCodeValidate'
updateTitle('装配上架任务') updateTitle('成品入库详情')
} }
}) })
onShow(() => { onShow(() => {
@ -171,6 +174,7 @@ const getDetail = () => {
s.scaned = true s.scaned = true
s.cancleScanedHiht = true s.cancleScanedHiht = true
openScanPopupSimulate(s) openScanPopupSimulate(s)
scanedPackingNumber.value = ''
} }
}) })
}) })
@ -355,7 +359,7 @@ const submitJob = () => {
.then((res) => { .then((res) => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
showCommitSuccessMessage(`提交成功<br>生成制品上架记录:${res.data}`) showCommitSuccessMessage(`提交成功<br>生成${hintTitle.value}记录<br>${res.data}`)
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }

4
src/pages/productPutaway/job/productPutawayJob.vue

@ -127,7 +127,7 @@ const getList = (type) => {
if (props.type == 'predict') { if (props.type == 'predict') {
updateTitle(`预生产上架任务(${totalCount.value})`) updateTitle(`预生产上架任务(${totalCount.value})`)
} else if (props.type == 'assemble') { } else if (props.type == 'assemble') {
updateTitle(`装配上架任务(${totalCount.value})`) updateTitle(`成品入库任务(${totalCount.value})`)
} }
loadingType.value = 'loadmore' loadingType.value = 'loadmore'
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
@ -144,7 +144,7 @@ const getList = (type) => {
if (props.type == 'predict') { if (props.type == 'predict') {
updateTitle(`预生产上架任务(${totalCount.value})`) updateTitle(`预生产上架任务(${totalCount.value})`)
} else if (props.type == 'assemble') { } else if (props.type == 'assemble') {
updateTitle(`装配上架任务(${totalCount.value})`) updateTitle(`成品入库任务(${totalCount.value})`)
} }
loadingType.value = '' loadingType.value = ''
uni.hideLoading() uni.hideLoading()

1
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -187,6 +187,7 @@ const getDetail = () => {
s.scaned = true s.scaned = true
// //
scanPopup.value.simulateScan(s) scanPopup.value.simulateScan(s)
scanedPackingNumber.value = ''
} }
}) })
}) })

1
src/pages/productReceipt/job/productReceiptDetail.vue

@ -187,6 +187,7 @@ const getDetail = () => {
s.cancleScanedHiht = true s.cancleScanedHiht = true
s.copyContent = `HMQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}` s.copyContent = `HMQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}`
scanPopup.value.simulateScan(s) scanPopup.value.simulateScan(s)
scanedPackingNumber.value = ''
// s.handleQty = s.qty // s.handleQty = s.qty
} }
}) })

94
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -55,7 +55,7 @@ import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { purchaseReceiptJobSubmit, getPurchaseReceiptJobDetail, takePurchaseReceiptJob, cancleTakePurchaseReceiptJob, productDismantleJobClose, getPutawayJobList } from '@/api/request2.js' import { purchaseReceiptJobSubmit, getPurchaseReceiptJobDetail, takePurchaseReceiptJob, cancleTakePurchaseReceiptJob, productDismantleJobClose, getPutawayJobList } from '@/api/request2.js'
import { goHome, getCurrDateTime, getPackingNumberAndBatch, compareAsc, navigateBack } from '@/common/basic.js' import { goHome, getCurrDateTime, getPackingNumberAndBatch, compareAsc, navigateBack, getSwitchInfoByCode } from '@/common/basic.js'
import { getDirectoryItemArray } from '@/common/directory.js' import { getDirectoryItemArray } from '@/common/directory.js'
@ -91,6 +91,7 @@ const isAllReceived = ref(false)
const operation = ref('') const operation = ref('')
const scanedPackingNumber = ref('') const scanedPackingNumber = ref('')
const status = ref('') const status = ref('')
const switchCode = ref('')
const comMessageRef = ref() const comMessageRef = ref()
const locationCompareRef = ref() const locationCompareRef = ref()
const scanPopup = ref() const scanPopup = ref()
@ -101,6 +102,7 @@ onLoad((option) => {
scanedPackingNumber.value = option.scaned || '' scanedPackingNumber.value = option.scaned || ''
status.value = option.status || '' status.value = option.status || ''
operation.value = option.operation operation.value = option.operation
switchCode.value = 'purchasereceiptPrintPDA'
}) })
onShow(() => { onShow(() => {
@ -182,6 +184,7 @@ const getDetail = () => {
s.cancleScanedHiht = true s.cancleScanedHiht = true
s.copyContent = `HPQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}` s.copyContent = `HPQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}`
scanPopup.value.simulateScan(s) scanPopup.value.simulateScan(s)
scanedPackingNumber.value = ''
} }
}) })
}) })
@ -391,50 +394,57 @@ const submitJob = () => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
// showCommitSuccessMessage(`<br><br>${res.data}`) // showCommitSuccessMessage(`<br><br>${res.data}`)
uni.showLoading({ const isCheckPrint = getSwitchInfoByCode(switchCode.value)
title: '提交成功,将跳转到打印页面', if (!isCheckPrint) {
mask: true uni.hideLoading()
})
// showCommitSuccessMessage(`提交成功<br>生成采购收货记录<br>${res.data.number}`)
let timerCount = 0 } else {
const timer1 = setInterval(async () => { uni.showLoading({
if (timerCount == 15) { title: '提交成功,将跳转到打印页面',
clearInterval(timer1) mask: true
uni.showToast({ })
title: '跳转打印页面失败', //
icon: 'none' let timerCount = 0
}) const timer1 = setInterval(async () => {
return if (timerCount == 15) {
}
await getPutawayJobList({
filters: [
{
column: 'purchaseReceiptRecordNumber',
action: 'in',
value: res.data.number
}
],
pageNo: 1,
pageSize: 1000
}).then((res1) => {
timerCount += 1
if (res1.data && res1.data.list && res1.data.list.length && res1.data.total >= res.data.detailCount) {
uni.hideLoading()
clearInterval(timer1) clearInterval(timer1)
const dataParams = { uni.showToast({
toLocationCode: res1.data.list[0].toLocationCode, title: '跳转打印页面失败',
number: res1.data.list[0].number, icon: 'none'
creator: res1.data.list[0].creator,
createTime: res1.data.list[0].createTime,
ids: res1.data.list.map((item) => item.masterId).join(',')
}
console.log(dataParams)
uni.navigateTo({
url: `/pages/pointPutawayJob/index?data=${encodeURIComponent(JSON.stringify(dataParams))}`
}) })
return
} }
}) await getPutawayJobList({
}, 2000) filters: [
{
column: 'purchaseReceiptRecordNumber',
action: 'in',
value: res.data.number
}
],
pageNo: 1,
pageSize: 1000
}).then((res1) => {
timerCount += 1
if (res1.data && res1.data.list && res1.data.list.length && res1.data.total >= res.data.detailCount) {
uni.hideLoading()
clearInterval(timer1)
const dataParams = {
toLocationCode: res1.data.list[0].toLocationCode,
number: res1.data.list[0].number,
creator: res1.data.list[0].creator,
createTime: res1.data.list[0].createTime,
ids: res1.data.list.map((item) => item.masterId).join(',')
}
console.log(dataParams)
uni.navigateTo({
url: `/pages/pointPutawayJob/index?data=${encodeURIComponent(JSON.stringify(dataParams))}`
})
}
})
}, 2000)
}
} else { } else {
showErrorMessage(`提交失败[${res.msg}]`) showErrorMessage(`提交失败[${res.msg}]`)
} }

1
src/pages/putaway/job/putawayDetail.vue

@ -163,6 +163,7 @@ const getDetail = () => {
s.packList.forEach((item) => (item.scaned = true)) s.packList.forEach((item) => (item.scaned = true))
s.inventoryStatus = s.inspectResult // s.inventoryStatus = s.inspectResult //
openScanPopupSimulate(s) openScanPopupSimulate(s)
scanedPackingNumber.value = ''
} }
}) })
}) })

Loading…
Cancel
Save