|
|
@ -100,10 +100,14 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { ref, getCurrentInstance, nextTick } from 'vue' |
|
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
|
import { isCheckMesCode, planReceiptSubmit, createPutawayRequestByPlan, createInspectRequestByPlan, getPlanByNumber } from '@/api/request2.js' |
|
|
|
import { isCheckMesCode, planReceiptSubmit, |
|
|
|
createPutawayRequestByPlan, createInspectRequestByPlan, |
|
|
|
getPlanByNumber,getBalanceToPackage, |
|
|
|
batchPrintingLable } from '@/api/request2.js' |
|
|
|
import { calc } from '@/common/calc.js' |
|
|
|
|
|
|
|
import { getRemoveOption, deepCopyData, getCurrDateTime, compare,getSwitchInfoByCode } from '@/common/basic.js' |
|
|
|
import storage from '@/common/utils/storage.js' |
|
|
|
import { getRemoveOption, deepCopyData, |
|
|
|
getCurrDateTime, compare,getSwitchInfoByCode} from '@/common/basic.js' |
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import comBlankView from '@/mycomponents/common/comBlankView.vue' |
|
|
|
import comReceiptPopup from '@/pages/fg/coms/comReceiptPopup.vue' |
|
|
@ -390,13 +394,46 @@ const scanPopupLoseFocus = () => { |
|
|
|
scanPopup.value.losefocus() |
|
|
|
} |
|
|
|
} |
|
|
|
const showCommitSuccessMessage = (hint, pointData) => { |
|
|
|
comMessageRef.value.showSuccessMessage(hint, (res) => { |
|
|
|
const getH5BatchPrintingLable = (number)=> { |
|
|
|
batchPrintingLable(number).then(resLable => { |
|
|
|
console.log('batchPrintingLable', resLable) |
|
|
|
const webUrl = `${import.meta.env.VITE_JMREPORT_BASE_URL}/jmreport/view/922734157577715712` |
|
|
|
const webData = { |
|
|
|
token: storage.getStorage(storage.constant.token), |
|
|
|
asn_number: resLable.data |
|
|
|
} |
|
|
|
uni.redirectTo({ |
|
|
|
url: `/pages/pointProductReceipt/webview?url=${webUrl}&webData=${JSON.stringify(webData)}` |
|
|
|
}); |
|
|
|
}) |
|
|
|
} |
|
|
|
const print = (pointData)=> { |
|
|
|
// #ifdef APP |
|
|
|
if (pointData.length > 0) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages/point/index?points=${JSON.stringify(pointData)}` |
|
|
|
}); |
|
|
|
} |
|
|
|
// #endif |
|
|
|
// #ifdef H5 |
|
|
|
let packingNumber = [] |
|
|
|
pointData.forEach(item=>{ |
|
|
|
packingNumber.push(item.packageCode) |
|
|
|
}) |
|
|
|
getBalanceToPackage({ |
|
|
|
packingNumber: packingNumber.join(',') |
|
|
|
}).then(res => { |
|
|
|
console.log('PC打印', res) |
|
|
|
getH5BatchPrintingLable(res.data.number) |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
showErrorMessage(error) |
|
|
|
}) |
|
|
|
// #endif |
|
|
|
} |
|
|
|
const showCommitSuccessMessage = (hint, pointData) => { |
|
|
|
comMessageRef.value.showSuccessMessage(hint, (res) => { |
|
|
|
print(pointData) |
|
|
|
}) |
|
|
|
} |
|
|
|
const showErrorMessage = (message) => { |
|
|
|