Browse Source

PDA部分任务增加扫描数量与任务数量不一致的提醒 2024/8/9

hella_vue3
王志国 4 weeks ago
parent
commit
cfc15c1f53
  1. 17
      src/mycomponents/common/comMessage.vue
  2. 45
      src/pages/customerReturn/job/returnDetail.vue
  3. 28
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  4. 6
      src/pages/package/job/overPackageJobDetail.vue
  5. 26
      src/pages/productReceipt/job/scrapReceiptDetail.vue
  6. 29
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  7. 44
      src/pages/productionReturn/job/returnDetail.vue
  8. 45
      src/pages/scrap/job/scrapJobDetail.vue
  9. 47
      src/pages/unPlanned/job/issueJobDetail.vue

17
src/mycomponents/common/comMessage.vue

@ -9,7 +9,7 @@
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<slot name="content"> <slot name="content">
<rich-text class="content" :nodes="content"> </rich-text> <rich-text class="content" :nodes="content" :style="{'color': textColor}" :key='count'> </rich-text>
</slot> </slot>
<view class="split_line"></view> <view class="split_line"></view>
<slot name="button"> <slot name="button">
@ -58,6 +58,8 @@ const seconds = ref(0)
const success = ref(() => {}) const success = ref(() => {})
const version = ref('') const version = ref('')
const modal = ref(null) const modal = ref(null)
const textColor = ref('#000')
const count = ref(0)
// onMounted(() => { // onMounted(() => {
// const systemInfo = uni.getSystemInfoSync() // const systemInfo = uni.getSystemInfoSync()
// // #ifdef H5 // // #ifdef H5
@ -134,8 +136,8 @@ const showBreakMessage = (mContent, callback) => {
} }
// (+ // (+
const showQuestionMessage = (mContent, callback) => { const showQuestionMessage = (mContent,textColor, callback) => {
showSelectModal('疑问', mContent, callback) showSelectModal('疑问', mContent, callback,textColor)
} }
// (+) // (+)
@ -227,10 +229,11 @@ const showSelectWarningModal = (mContent, callback) => {
} }
// (+ // (+
const showSelectModal = (mIconType, mContent, callback) => { const showSelectModal = (mIconType, mContent, callback,textColor) => {
showModal({ showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
textColor:textColor,
success(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
@ -375,7 +378,11 @@ const showModal = (data) => {
} else { } else {
cancelColor.value = '#666F83' cancelColor.value = '#666F83'
} }
if (data.textColor) {
textColor.value = data.textColor
} else {
textColor.value = '#000'
}
if (data.showConfirmButton === false || data.showConfirmButton === true) { if (data.showConfirmButton === false || data.showConfirmButton === true) {
showConfirmButton.value = data.showConfirmButton showConfirmButton.value = data.showConfirmButton
} else { } else {

45
src/pages/customerReturn/job/returnDetail.vue

@ -279,23 +279,42 @@ const commit = () => {
if (!checkLocation()) { if (!checkLocation()) {
return return
} }
// //
if (scanCount.value == subList.value.length) { let str = ''
submitJob() detailSource.value.forEach((item) => {
} else if (scanCount.value < subList.value.length) { item.subList.forEach(cur => {
// if (cur.qty != cur.handleQty) {
if (jobContent.value.allowPartialComplete == 'TRUE') { str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
//
submitJob()
} else {
//
comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => {
if (res) {
openScanPopup()
} }
}) })
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob()
} }
});
} else {
submitJob()
} }
// //
// if (scanCount.value == subList.value.length) {
// submitJob()
// } else if (scanCount.value < subList.value.length) {
// //
// if (jobContent.value.allowPartialComplete == 'TRUE') {
// //
// submitJob()
// } else {
// //
// comMessageRef.value.showErrorMessage(',<br>' + `[${scanCount.value}][${subList.value.length}]`, (res) => {
// if (res) {
// openScanPopup()
// }
// })
// }
// }
} }
const submitJob = () => { const submitJob = () => {
proxy.$modal.loading('提交中...') proxy.$modal.loading('提交中...')

28
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -293,22 +293,24 @@ const commit = () => {
return return
} }
// //
if (scanCount.value == subList.value.length) { let str = ''
submitJob() detailSource.value.forEach((item) => {
} else if (scanCount.value < subList.value.length) { item.subList.forEach(cur => {
// if (cur.qty != cur.handleQty) {
if (jobContent.value.allowPartialComplete == 'TRUE') { str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
//
submitJob()
} else {
//
comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => {
if (res) {
openScanPopup()
} }
}) })
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob()
} }
});
} else {
submitJob()
} }
} }

6
src/pages/package/job/overPackageJobDetail.vue

@ -27,14 +27,14 @@
</scroll-view> </scroll-view>
</view> </view>
<view style="background: white"> <view style="background: white">
<uni-collapse> <!--<uni-collapse>
<uni-collapse-item> <uni-collapse-item>
<template v-slot:title> <template v-slot:title>
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx"> 打印设置 </view> <view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx"> 打印设置 </view>
</template> </template>
<!-- <print ref="printService" @printCode="printCode" @templateCode="templateCode"></print>--> <print ref="printService" @printCode="printCode" @templateCode="templateCode"></print>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>-->
</view> </view>
<view style="background: white"> <view style="background: white">
<uni-collapse> <uni-collapse>

26
src/pages/productReceipt/job/scrapReceiptDetail.vue

@ -235,18 +235,24 @@ const commit = () => {
if (!checkLocation()) { if (!checkLocation()) {
return return
} }
// //
if (scanCount.value == subList.value.length) { let str = ''
submitJob() detailSource.value.forEach((item) => {
} else if (scanCount.value < subList.value.length) { item.subList.forEach(cur => {
// if (cur.qty != cur.handleQty) {
if (jobContent.value.allowPartialComplete == 'TRUE') { str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
// }
})
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob() submitJob()
} else {
//
showMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`)
} }
});
} else {
submitJob()
} }
} }
const submitJob = () => { const submitJob = () => {

29
src/pages/productRecycle/job/productRecycleJobDetail.vue

@ -256,23 +256,24 @@ const commit = () => {
showErrorMessage('扫描数为0,请先扫描') showErrorMessage('扫描数为0,请先扫描')
return return
} }
// //
// let str = ''
if (scanCount.value == subList.value.length) { detailSource.value.forEach((item) => {
submitJob() item.subList.forEach(cur => {
} else if (scanCount.value < subList.value.length) { if (cur.qty != cur.handleQty) {
// str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
if (jobContent.value.allowPartialComplete == 'TRUE') {
//
submitJob()
} else {
//
comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => {
if (res) {
openScanPopup()
} }
}) })
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob()
} }
});
} else {
submitJob()
} }
} }

44
src/pages/productionReturn/job/returnDetail.vue

@ -232,24 +232,40 @@ const commit = () => {
showErrorMessage('扫描数为0,请先扫描') showErrorMessage('扫描数为0,请先扫描')
return return
} }
if (!checkLocation()) { //
return let str = ''
detailSource.value.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
} }
//
if (scanCount.value == subList.value.length) {
submitJob()
} else if (scanCount.value < subList.value.length) {
//
if (jobContent.value.allowPartialComplete == 'TRUE') {
//
submitJob()
} else {
//
comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => {
openScanPopup()
}) })
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob()
} }
});
} else {
submitJob()
} }
// //
// if (scanCount.value == subList.value.length) {
// submitJob()
// } else if (scanCount.value < subList.value.length) {
// //
// if (jobContent.value.allowPartialComplete == 'TRUE') {
// //
// submitJob()
// } else {
// //
// comMessageRef.value.showErrorMessage(',<br>' + `[${scanCount.value}][${subList.value.length}]`, (res) => {
// openScanPopup()
// })
// }
// }
} }
const submitJob = () => { const submitJob = () => {

45
src/pages/scrap/job/scrapJobDetail.vue

@ -238,23 +238,42 @@ const commit = () => {
showErrorMessage('扫描数为0,请先扫描') showErrorMessage('扫描数为0,请先扫描')
return return
} }
// //
if (scanCount.value == subList.value.length) { let str = ''
submitJob() detailSource.value.forEach((item) => {
} else if (scanCount.value < subList.value.length) { item.subList.forEach(cur => {
// if (cur.qty != cur.handleQty) {
if (jobContent.value.allowPartialComplete == 'TRUE') { str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
//
submitJob()
} else {
//
comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => {
if (res) {
openScanPopup()
} }
}) })
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob()
} }
});
} else {
submitJob()
} }
// //
// if (scanCount.value == subList.value.length) {
// submitJob()
// } else if (scanCount.value < subList.value.length) {
// //
// if (jobContent.value.allowPartialComplete == 'TRUE') {
// //
// submitJob()
// } else {
// //
// comMessageRef.value.showErrorMessage(',<br>' + `[${scanCount.value}][${subList.value.length}]`, (res) => {
// if (res) {
// openScanPopup()
// }
// })
// }
// }
} }
const submitJob = () => { const submitJob = () => {

47
src/pages/unPlanned/job/issueJobDetail.vue

@ -233,24 +233,43 @@ const commit = () => {
showErrorMessage('扫描数为0,请先扫描') showErrorMessage('扫描数为0,请先扫描')
return return
} }
// //
// let str = ''
if (scanCount.value == subList.value.length) { detailSource.value.forEach((item) => {
submitJob() item.subList.forEach(cur => {
} else if (scanCount.value < subList.value.length) { if (cur.qty != cur.handleQty) {
// str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
if (jobContent.value.allowPartialComplete == 'TRUE') {
//
submitJob()
} else {
//
comMessageRef.value.showErrorMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]箱总共[${subList.value.length}]箱`, (res) => {
if (res) {
openScanPopup()
} }
}) })
})
if (str) {
str += ',是否确认提交?'
comMessageRef.value.showQuestionMessage(str, 'red', res => {
if (res) {
submitJob()
} }
});
} else {
submitJob()
} }
// //
// //
// if (scanCount.value == subList.value.length) {
// submitJob()
// } else if (scanCount.value < subList.value.length) {
// //
// if (jobContent.value.allowPartialComplete == 'TRUE') {
// //
// submitJob()
// } else {
// //
// comMessageRef.value.showErrorMessage(',<br>' + `[${scanCount.value}][${subList.value.length}]`, (res) => {
// if (res) {
// openScanPopup()
// }
// })
// }
// }
} }
const submitJob = () => { const submitJob = () => {
proxy.$modal.loading('提交中...') proxy.$modal.loading('提交中...')

Loading…
Cancel
Save