|
|
@ -22,10 +22,6 @@ import { goHome, updateTitle, getRemoveOption, navigateBack, getCurrDateOneMonth |
|
|
|
import { getDataSource } from '@/pages/issue/js/issue.js' |
|
|
|
|
|
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
|
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' |
|
|
|
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' |
|
|
|
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue' |
|
|
|
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
|
|
|
import winScanPackLevel from '@/mycomponents/scan/winScanPackLevel.vue' |
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
@ -65,11 +61,6 @@ onLoad((option) => { |
|
|
|
}) |
|
|
|
const goScan = () => { |
|
|
|
scanPopup.value.openScanPopup() |
|
|
|
setTimeout((res) => { |
|
|
|
if (scanPopup.value != undefined) { |
|
|
|
scanPopup.value.getfocus() |
|
|
|
} |
|
|
|
}, 400) |
|
|
|
} |
|
|
|
const getScanResult = (result) => { |
|
|
|
detailSource.value = { |
|
|
@ -105,9 +96,9 @@ const submit = () => { |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
showCommitSuccessMessage(`提交成功<br>生成发料申请[${res.data}]`) |
|
|
|
showCommitSuccessMessage(`提交成功\n生成发料申请[${res.data}]`) |
|
|
|
} else { |
|
|
|
showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
showCommitSuccessMessage(`提交成功`) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
@ -118,13 +109,18 @@ const submit = () => { |
|
|
|
const showCommitSuccessMessage = (hint) => { |
|
|
|
comMessageRef.value.showSuccessMessage(hint, (res) => { |
|
|
|
closeScanPopup() |
|
|
|
setTimeout(()=>{ |
|
|
|
goScan() |
|
|
|
},500) |
|
|
|
}) |
|
|
|
} |
|
|
|
const closeScanPopup = () => { |
|
|
|
scanPopup.value.closeScanPopup() |
|
|
|
} |
|
|
|
const showErrorMessage = (message) => { |
|
|
|
if (scanPopup.value) { |
|
|
|
scanPopup.value.losefocus(); |
|
|
|
} |
|
|
|
comMessageRef.value.showErrorMessage(message, (res) => { |
|
|
|
if (res) { |
|
|
|
scanPopupGetFocus() |
|
|
@ -132,7 +128,7 @@ const showErrorMessage = (message) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
const scanPopupGetFocus = () => { |
|
|
|
if (scanPopup.value != undefined) { |
|
|
|
if (scanPopup.value) { |
|
|
|
scanPopup.value.getfocus() |
|
|
|
} |
|
|
|
} |
|
|
|