20 changed files with 580 additions and 640 deletions
@ -1,29 +0,0 @@ |
|||||
import { |
|
||||
getLabelInfo |
|
||||
} from '@/common/label.js'; |
|
||||
|
|
||||
// export function getLabelInfoResult(scanMsg, headerType callBackInfo) {
|
|
||||
// let index = scanMsg.indexOf('\n');
|
|
||||
// if (index >= 0) {
|
|
||||
// // let content = uni.$u.trim(scanMsg)
|
|
||||
// let content = scanMsg
|
|
||||
// if (content == "") {
|
|
||||
// return ""
|
|
||||
// }
|
|
||||
|
|
||||
// getLabelInfo(content, headerType, callback => {
|
|
||||
// let scanResult = callback;
|
|
||||
// scanResult.scanMessage = content
|
|
||||
// if (scanResult.success) {
|
|
||||
// return scanResult
|
|
||||
// } else {
|
|
||||
// return ""
|
|
||||
// }
|
|
||||
// });
|
|
||||
|
|
||||
// }
|
|
||||
// }
|
|
||||
|
|
||||
export function getLabelInfoResult(){ |
|
||||
|
|
||||
} |
|
@ -1,456 +1,451 @@ |
|||||
<template> |
<template> |
||||
<view class="page-wraper"> |
<view class="page-wraper"> |
||||
<view class="page-header"> |
<view class="page-header"> |
||||
<view class="header_job_top"> |
<view class="header_job_top"> |
||||
<job-top :dataContent="jobContent"></job-top> |
<job-top :dataContent="jobContent"></job-top> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
<view class="page-main"> |
<view class="page-main"> |
||||
<scroll-view scroll-y="true" class="page-main-scroll"> |
<scroll-view scroll-y="true" class="page-main-scroll"> |
||||
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> |
||||
<view class="cen_card" style="padding: 5rpx"> |
<view class="cen_card" style="padding: 5rpx"> |
||||
<view class="cell_box uni-flex uni-row"> |
<view class="cell_box uni-flex uni-row"> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">车间</view> |
<view class="text_lightblue">车间</view> |
||||
<view> |
<view> |
||||
{{ jobContent.workShopCode }} |
{{ jobContent.workShopCode }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">生产线</view> |
<view class="text_lightblue">生产线</view> |
||||
<view> |
<view> |
||||
{{ item.subList[0].productionLineCode }} |
{{ item.subList[0].productionLineCode }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">班组</view> |
<view class="text_lightblue">班组</view> |
||||
<view> |
<view> |
||||
{{ jobContent.team }} |
{{ jobContent.team }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="cell_info"> |
<view class="cell_info"> |
||||
<view class="text_lightblue">班次</view> |
<view class="text_lightblue">班次</view> |
||||
<view> |
<view> |
||||
{{ jobContent.shift }} |
{{ jobContent.shift }} |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
<view class="split_line"></view> |
<view class="split_line"></view> |
||||
</view> |
</view> |
||||
|
|
||||
<view class=""> |
<view class=""> |
||||
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" @remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> </comProductDetailCard> |
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" |
||||
</view> |
@remove="updateData" @updateData="updateData" :locationAreaTypeList="toLocationAreaTypeList"> |
||||
</view> |
</comProductDetailCard> |
||||
</scroll-view> |
</view> |
||||
</view> |
</view> |
||||
|
</scroll-view> |
||||
<view class="page-footer"> |
</view> |
||||
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
|
||||
<view class=""> |
<view class="page-footer"> |
||||
<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation == 'TRUE'" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" @getLocation="scanLocationCode" :locationAreaTypeList="toLocationAreaTypeList"></locationCompare> |
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> |
||||
</view> |
<view class=""> |
||||
<view class="uni-flex uni-row"> |
<<locationCompare ref="comScanLocation" title="收货库位" :isShowEdit="jobContent.allowModifyLocation=='TRUE'" |
||||
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
:recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" @getLocation='scanLocationCode' |
||||
</view> |
:locationAreaTypeList="toLocationAreaTypeList"> |
||||
</view> |
</locationCompare> |
||||
</view> |
</view> |
||||
|
<view class="uni-flex uni-row"> |
||||
<win-scan-button @goScan="openScanPopup"></win-scan-button> |
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> |
||||
<win-scan-pack ref="scanPopup" @getResult="getScanResult" :title="'制品标签'" headerType="HMQ"></win-scan-pack> |
</view> |
||||
<com-message ref="comMessageRef" /> |
</view> |
||||
</view> |
</view> |
||||
|
|
||||
|
<win-scan-button @goScan="openScanPopup"></win-scan-button> |
||||
|
<win-scan-pack ref="scanPopup" @getResult="getScanResult" :title="'制品标签'" headerType="HMQ"></win-scan-pack> |
||||
|
<com-message ref="comMessageRef" /> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
|
|
||||
<script setup lang="ts"> |
<script setup lang="ts"> |
||||
import { ref, getCurrentInstance, nextTick, onMounted } from 'vue' |
import { ref, getCurrentInstance, nextTick, onMounted } 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 { getManagementPrecisions } from '@/common/balance.js' |
import { getManagementPrecisions } from '@/common/balance.js' |
||||
|
|
||||
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, ccProductReceiptJobsubmit } from '@/api/request2.js' |
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, ccProductReceiptJobsubmit } from '@/api/request2.js' |
||||
import { goHome, navigateBack, getPackingNumberAndBatch } from '@/common/basic.js' |
import { goHome, navigateBack, getPackingNumberAndBatch } from '@/common/basic.js' |
||||
|
|
||||
import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js' |
import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js' |
||||
|
|
||||
import { getDataSource, createRecordInfo, calcHandleQty, getScanCount } from '@/common/detail.js' |
import { getDataSource, createRecordInfo, calcHandleQty, getScanCount } from '@/common/detail.js' |
||||
import { calc } from '@/common/calc.js' |
import { calc } from '@/common/calc.js' |
||||
|
|
||||
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
||||
import locationCompare from '@/mycomponents/location/locationCompare.vue' |
import locationCompare from '@/mycomponents/location/locationCompare.vue' |
||||
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
import winScanPack from '@/mycomponents/scan/winScanPack.vue' |
||||
import comDetailCard from '@/mycomponents/detail/comDetailCard.vue' |
import comDetailCard from '@/mycomponents/detail/comDetailCard.vue' |
||||
import jobTop from '@/mycomponents/job/jobTop.vue' |
import jobTop from '@/mycomponents/job/jobTop.vue' |
||||
import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue' |
import comProductDetailCard from '@/pages/productReceipt/coms/comProductDetailCard.vue' |
||||
|
|
||||
import { useCountStore } from '@/store' |
import { useCountStore } from '@/store' |
||||
// 获取自定义的store |
// 获取自定义的store |
||||
const store = useCountStore() |
const store = useCountStore() |
||||
const id= ref('') |
const id = ref('') |
||||
const receiptJob= ref({}) |
const receiptJob = ref({}) |
||||
const toLocationCode= ref('') |
const toLocationCode = ref('') |
||||
const isShowPackingCode= ref(true) |
const isShowPackingCode = ref(true) |
||||
const scanCount= ref(0) |
const scanCount = ref(0) |
||||
const jobContent= ref({})// 任务内容 |
const jobContent = ref({})// 任务内容 |
||||
const subList= ref([])// 接口返回的任务subList |
const subList = ref([])// 接口返回的任务subList |
||||
const detailSource= ref([])// 绑定在页面上的数据源 |
const detailSource = ref([])// 绑定在页面上的数据源 |
||||
const toLocationAreaTypeList= ref([]) |
const toLocationAreaTypeList = ref([]) |
||||
const managementList= ref([]) |
const managementList = ref([]) |
||||
const jobStatus= ref('') |
const jobStatus = ref('') |
||||
const jobToLocationCode= ref('') |
const jobToLocationCode = ref('') |
||||
const scanedPackingNumber= ref('') |
const scanedPackingNumber = ref('') |
||||
const status= ref('') |
const status = ref('') |
||||
const comScanLocation= ref() |
const scanMessage = ref('') |
||||
const scanPopup= ref() |
const comScanLocation = ref() |
||||
const comMessageRef= ref() |
const scanPopup = ref() |
||||
|
const comMessageRef = ref() |
||||
onLoad((option)=> { |
|
||||
setTimeout(res=>{ |
onLoad((option) => { |
||||
uni.setNavigationBarTitle({ |
setTimeout(res => { |
||||
title: `${option.title}详情` |
uni.setNavigationBarTitle({ |
||||
}) |
title: `${option.title}详情` |
||||
|
}) |
||||
},50) |
|
||||
id.value = option.id |
}, 50) |
||||
scanedPackingNumber.value = option.scaned || '' |
id.value = option.id |
||||
status.value = option.status || '' |
scanMessage.value = option.scanMessage || '' |
||||
}) |
status.value = option.status || '' |
||||
onShow(() =>{ |
}) |
||||
if (id.value != undefined) { |
onShow(() => { |
||||
// 新建的任务自动接收 |
if (id.value != undefined) { |
||||
if (status.value == '1') { |
// 新建的任务自动接收 |
||||
receive((callback) => { |
if (status.value == '1') { |
||||
getDetail() |
receive((callback) => { |
||||
}) |
getDetail() |
||||
} else { |
}) |
||||
getDetail() |
} else { |
||||
} |
getDetail() |
||||
} |
} |
||||
}) |
} |
||||
// 返回首页 |
}) |
||||
onNavigationBarButtonTap((e) =>{ |
// 返回首页 |
||||
if (e.index === 0) { |
onNavigationBarButtonTap((e) => { |
||||
goHome() |
if (e.index === 0) { |
||||
} |
goHome() |
||||
}) |
} |
||||
// 拦截返回按钮事件 |
}) |
||||
onBackPress((e)=> { |
// 拦截返回按钮事件 |
||||
// 已经接收但是没提交任务 |
onBackPress((e) => { |
||||
if (e.from == 'backbutton') { |
// 已经接收但是没提交任务 |
||||
if (jobStatus.value == '2') { |
if (e.from == 'backbutton') { |
||||
// 取消承接任务 |
if (jobStatus.value == '2') { |
||||
cancleTakeProductReceiptJob(id.value ) |
// 取消承接任务 |
||||
.then((res) => { |
cancleTakeProductReceiptJob(id.value) |
||||
uni.navigateBack() |
.then((res) => { |
||||
}) |
uni.navigateBack() |
||||
.catch((error) => { |
}) |
||||
uni.navigateBack() |
.catch((error) => { |
||||
}) |
uni.navigateBack() |
||||
} else { |
}) |
||||
uni.navigateBack() |
} else { |
||||
} |
uni.navigateBack() |
||||
|
} |
||||
return true |
|
||||
} |
return true |
||||
}) |
} |
||||
|
}) |
||||
onPullDownRefresh(() =>{ |
|
||||
getDetail() |
onPullDownRefresh(() => { |
||||
uni.stopPullDownRefresh() |
getDetail() |
||||
}) |
uni.stopPullDownRefresh() |
||||
|
}) |
||||
// 接收 |
|
||||
const receive=(callback)=> { |
// 接收 |
||||
if (id.value != null) { |
const receive = (callback) => { |
||||
takeProductReceiptJob(id.value) |
if (id.value != null) { |
||||
.then((res) => { |
takeProductReceiptJob(id.value) |
||||
callback() |
.then((res) => { |
||||
}) |
callback() |
||||
.catch((error) => { |
}) |
||||
showErrorMessage(error) |
.catch((error) => { |
||||
}) |
showErrorMessage(error) |
||||
} |
}) |
||||
} |
} |
||||
|
} |
||||
const getDetail=() =>{ |
|
||||
uni.showLoading({ |
const getDetail = () => { |
||||
title: '加载中....', |
uni.showLoading({ |
||||
mask: true |
title: '加载中....', |
||||
}) |
mask: true |
||||
getProductReceiptJobDetail(that.id) |
}) |
||||
.then((res) => { |
getProductReceiptJobDetail(that.id) |
||||
uni.hideLoading() |
.then((res) => { |
||||
if (res.data == null) { |
uni.hideLoading() |
||||
showMessage('未获取到详情') |
if (res.data == null) { |
||||
} else if (res.data.subList.length > 0) { |
showMessage('未获取到详情') |
||||
jobContent.value = res.data |
} else if (res.data.subList.length > 0) { |
||||
subList.value = res.data.subList |
jobContent.value = res.data |
||||
jobStatus.value = res.data.status |
subList.value = res.data.subList |
||||
jobToLocationCode.value = subList.value[0].toLocationCode |
jobStatus.value = res.data.status |
||||
if (jobContent.value.allowModifyLocation == 'FALSE') { |
jobToLocationCode.value = subList.value[0].toLocationCode |
||||
toLocationCode.value = subList.value[0].toLocationCode |
if (jobContent.value.allowModifyLocation == 'FALSE') { |
||||
} |
toLocationCode.value = subList.value[0].toLocationCode |
||||
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) |
} |
||||
detailSource.value = getDataSource(subList.value) |
toLocationAreaTypeList.value = getDirectoryItemArray(jobContent.value.toAreaTypes) |
||||
detailSource.value.forEach((r) => { |
detailSource.value = getDataSource(subList.value) |
||||
r.subList.forEach((s) => { |
if (scanMessage.value) { |
||||
if (scanedPackingNumber.value && scanedPackingNumber.value == s.packingNumber) { |
scanPopup.value.simulateScan(scanMessage.value); |
||||
s.scaned = true |
} |
||||
s.cancleScanedHiht = true |
} else { |
||||
s.copyContent = `HMQ;V1.0;I${s.itemCode};P${s.packingNumber};B${s.batch};Q${s.qty}` |
showMessage('列表数据为0') |
||||
|
} |
||||
scanPopup.value.simulateScan(s) |
}) |
||||
scanedPackingNumber.value = '' |
.catch((error) => { |
||||
// s.handleQty =s.qty |
uni.hideLoading() |
||||
} |
showErrorMessage(error) |
||||
}) |
}) |
||||
}) |
} |
||||
} else { |
|
||||
showMessage('列表数据为0') |
const getScanResult = (result) => { |
||||
} |
const { label } = result |
||||
}) |
const { packingNumber } = label |
||||
.catch((error) => { |
const { batch } = label |
||||
uni.hideLoading() |
const { qty } = label |
||||
showErrorMessage(error) |
const { itemCode } = label |
||||
}) |
|
||||
} |
const detail = detailSource.find((r) => r.itemCode == itemCode) |
||||
|
if (detail == undefined) { |
||||
const getScanResult=(result) =>{ |
showErrorMessage(`物料号【${itemCode}】不在列表中`) |
||||
const { label } = result |
} else { |
||||
const { packingNumber } = label |
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) |
||||
const { batch } = label |
if (itemDetail == undefined) { |
||||
const { qty } = label |
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`) |
||||
const { itemCode } = label |
} else if (itemDetail.scaned) { |
||||
|
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`) |
||||
const detail = detailSource.find((r) => r.itemCode == itemCode) |
} else { |
||||
if (detail == undefined) { |
itemDetail.scaned = true |
||||
showErrorMessage(`物料号【${itemCode}】不在列表中`) |
itemDetail.handleQty = Number(result.label.qty) |
||||
} else { |
itemDetail.toLocationCode = toLocationCode.value |
||||
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch) |
itemDetail.labelQty = Number(result.label.qty) |
||||
if (itemDetail == undefined) { |
calcHandleQty(detailSource.value) |
||||
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]不在任务列表中`) |
continueScan() |
||||
} else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) { |
$forceUpdate() |
||||
showErrorMessage(`箱码[${packingNumber}]` + `批次[${batch}]已经扫描`) |
} |
||||
} else { |
} |
||||
itemDetail.scaned = true |
} |
||||
itemDetail.handleQty = Number(result.label.qty) |
|
||||
itemDetail.toLocationCode = toLocationCode.value |
// 继续扫描 |
||||
itemDetail.labelQty = Number(result.label.qty) |
const continueScan = () => { |
||||
calcHandleQty(detailSource.value) |
scanCount.value = getScanCount(subList.value) |
||||
continueScan() |
if (scanCount.value == subList.value.length) { |
||||
$forceUpdate() |
closeScanPopup() |
||||
} |
} else { |
||||
} |
scanPopupGetFocus() |
||||
} |
} |
||||
|
} |
||||
// 继续扫描 |
|
||||
const continueScan=()=> { |
const updateData = () => { |
||||
scanCount.value = getScanCount(subList.value) |
calcHandleQty(detailSource.value) |
||||
if (scanCount.value == subList.value.length) { |
} |
||||
closeScanPopup() |
|
||||
} else { |
const openScanPopup = () => { |
||||
scanPopupGetFocus() |
scanPopup.value.openScanPopup() |
||||
} |
} |
||||
} |
|
||||
|
const closeScanPopup = () => { |
||||
const updateData=() =>{ |
scanPopup.value.closeScanPopup() |
||||
calcHandleQty(detailSource.value) |
} |
||||
} |
|
||||
|
const scanLocationCode = (location, code) => { |
||||
const openScanPopup=() =>{ |
toLocationCode.value = code |
||||
scanPopup.value.openScanPopup() |
detailSource.value.forEach((item) => { |
||||
} |
item.subList.forEach((detail) => { |
||||
|
detail.toLocationCode = code |
||||
const closeScanPopup=() =>{ |
}) |
||||
scanPopup.value.closeScanPopup() |
}) |
||||
} |
} |
||||
|
|
||||
const scanLocationCode=(location, code) =>{ |
const checkLocation = () => { |
||||
toLocationCode.value = code |
let isPass = true |
||||
detailSource.value.forEach((item) => { |
if (toLocationCode.value == '' || toLocationCode.value == null) { |
||||
item.subList.forEach((detail) => { |
showMessageHint('请扫描收货库位', (callback) => { |
||||
detail.toLocationCode = code |
comScanLocation.value.showLocation() |
||||
}) |
}) |
||||
}) |
|
||||
} |
return (isPass = false) |
||||
|
} |
||||
const checkLocation=() =>{ |
return isPass |
||||
let isPass = true |
} |
||||
if (toLocationCode.value == '' || toLocationCode.value == null) { |
|
||||
showMessageHint('请扫描收货库位', (callback) => { |
const showMessageHint(hint, callback) { |
||||
comScanLocation.value.showLocation() |
comMessageRef.value.showErrorMessage(hint, (res) => { |
||||
}) |
if (res) { |
||||
|
callback() |
||||
return (isPass = false) |
} |
||||
} |
}) |
||||
return isPass |
} |
||||
} |
const commit = () => { |
||||
|
scanCount.value = getScanCount(subList.value) |
||||
const showMessageHint(hint, callback) { |
if (scanCount.value == 0) { |
||||
comMessageRef.value.showErrorMessage(hint, (res) => { |
showErrorMessage('扫描数为0,请先扫描') |
||||
if (res) { |
return |
||||
callback() |
} |
||||
} |
// 校验库位、 |
||||
}) |
if (!checkLocation()) { |
||||
} |
return |
||||
const commit=() =>{ |
} |
||||
scanCount.value = getScanCount(subList.value) |
|
||||
if (scanCount.value == 0) { |
// 扫描数量和任务数量相等,直接提交 |
||||
showErrorMessage('扫描数为0,请先扫描') |
if (scanCount.value == subList.value.length) { |
||||
return |
if (checkCount()) { |
||||
} |
submitJob() |
||||
// 校验库位、 |
} |
||||
if (!checkLocation()) { |
} else if (scanCount.value < subList.value.length) { |
||||
return |
// 扫描数量小于任务数量,判断是否允许部分提交 |
||||
} |
if (jobContent.value.allowPartialComplete == 'TRUE') { |
||||
|
// 提交 |
||||
// 扫描数量和任务数量相等,直接提交 |
if (checkCount()) { |
||||
if (scanCount.value == subList.value.length) { |
submitJob() |
||||
if (checkCount()) { |
} |
||||
submitJob() |
} else { |
||||
} |
// 不允许部分提交,提示 |
||||
} else if (scanCount.value < subList.value.length) { |
showMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`) |
||||
// 扫描数量小于任务数量,判断是否允许部分提交 |
} |
||||
if (jobContent.value.allowPartialComplete == 'TRUE') { |
} |
||||
// 提交 |
} |
||||
if (checkCount()) { |
|
||||
submitJob() |
const checkCount = () => { |
||||
} |
let isCheck = true |
||||
} else { |
let hint = '' |
||||
// 不允许部分提交,提示 |
for (let i = 0; i < detailSource.value.length; i++) { |
||||
showMessage('请完成扫描后,再进行提交<br>' + `已经扫描[${scanCount.value}]总共[${subList.value.length}]`) |
const item = detailSource.value[i] |
||||
} |
for (let j = 0; j < item.subList.length; j++) { |
||||
} |
const subItem = item.subList[i] |
||||
} |
if (calc.sub(subItem.handleQty, subItem.qty) < 0) { |
||||
|
isCheck = false |
||||
const checkCount=()=> { |
hint = `包装【${subItem.packingNumber}】实际收货数量:${subItem.handleQty}与包装数量${subItem.qty}不相等,是否继续收货?` |
||||
let isCheck = true |
break |
||||
let hint = '' |
} |
||||
for (let i = 0; i < detailSource.value.length; i++) { |
} |
||||
const item =detailSource.value[i] |
} |
||||
for (let j = 0; j < item.subList.length; j++) { |
if (!isCheck) { |
||||
const subItem = item.subList[i] |
showQuestMessage(hint, (res) => { |
||||
if (calc.sub(subItem.handleQty, subItem.qty) < 0) { |
if (res) { |
||||
isCheck = false |
submitJob() |
||||
hint = `包装【${subItem.packingNumber}】实际收货数量:${subItem.handleQty}与包装数量${subItem.qty}不相等,是否继续收货?` |
} |
||||
break |
}) |
||||
} |
} |
||||
} |
|
||||
} |
return isCheck |
||||
if (!isCheck) { |
} |
||||
showQuestMessage(hint, (res) => { |
|
||||
if (res) { |
const submitJob = () => { |
||||
submitJob() |
uni.showLoading({ |
||||
} |
title: '提交中....', |
||||
}) |
mask: true |
||||
} |
}) |
||||
|
const itemCodes = [] |
||||
return isCheck |
detailSource.value.forEach((item) => { |
||||
} |
itemCodes.push(item.itemCode) |
||||
|
}) |
||||
const submitJob=() =>{ |
getManagementPrecisions(itemCodes, toLocationCode.value, (res) => { |
||||
uni.showLoading({ |
if (res.success) { |
||||
title: '提交中....', |
managementList.value = res.list |
||||
mask: true |
const params = setParams() |
||||
}) |
ccProductReceiptJobsubmit(params) |
||||
const itemCodes = [] |
.then((res) => { |
||||
detailSource.value.forEach((item) => { |
uni.hideLoading() |
||||
itemCodes.push(item.itemCode) |
if (res.data) { |
||||
}) |
showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data) |
||||
getManagementPrecisions(itemCodes,toLocationCode.value, (res) => { |
} else { |
||||
if (res.success) { |
showErrorMessage(`提交失败[${res.msg}]`) |
||||
managementList.value = res.list |
} |
||||
const params = setParams() |
}) |
||||
ccProductReceiptJobsubmit(params) |
.catch((error) => { |
||||
.then((res) => { |
uni.hideLoading() |
||||
uni.hideLoading() |
showErrorMessage(error) |
||||
if (res.data) { |
}) |
||||
showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data ) |
} else { |
||||
} else { |
uni.hideLoading() |
||||
showErrorMessage(`提交失败[${res.msg}]`) |
showErrorMessage(res.message) |
||||
} |
} |
||||
}) |
}) |
||||
.catch((error) => { |
} |
||||
uni.hideLoading() |
|
||||
showErrorMessage(error) |
const setParams = () => { |
||||
}) |
const subList = [] |
||||
} else { |
const creator = store.id |
||||
uni.hideLoading() |
|
||||
showErrorMessage(res.message) |
detailSource.value.forEach((item) => { |
||||
} |
item.subList.forEach((detail) => { |
||||
}) |
if (detail.scaned) { |
||||
} |
const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) |
||||
|
detail.toPackingNumber = info.packingNumber |
||||
const setParams=() =>{ |
detail.toBatch = info.batch |
||||
const subList = [] |
detail.toContainerNumber = '' |
||||
const creator = store.id |
detail.toInventoryStatus = detail.inventoryStatus |
||||
|
detail.toLocationCode = toLocationCode.value |
||||
detailSource.value.forEach((item) => { |
subList.push(detail) |
||||
item.subList.forEach((detail) => { |
} |
||||
if (detail.scaned) { |
}) |
||||
const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) |
}) |
||||
detail.toPackingNumber = info.packingNumber |
jobContent.value.subList = subList |
||||
detail.toBatch = info.batch |
jobContent.value.creator = creator |
||||
detail.toContainerNumber = '' |
return jobContent.value |
||||
detail.toInventoryStatus = detail.inventoryStatus |
} |
||||
detail.toLocationCode =toLocationCode.value |
|
||||
subList.push(detail) |
const scanPopupGetFocus = () => { |
||||
} |
if (scanPopup.value != undefined) { |
||||
}) |
scanPopup.value.getfocus() |
||||
}) |
} |
||||
jobContent.value.subList = subList |
} |
||||
jobContent.value.creator = creator |
|
||||
return jobContent.value |
const scanPopupLoseFocus = () => { |
||||
} |
if (scanPopup.value != undefined) { |
||||
|
scanPopup.value.losefocus() |
||||
const scanPopupGetFocus=() =>{ |
} |
||||
if (scanPopup.value != undefined) { |
} |
||||
scanPopup.value.getfocus() |
|
||||
} |
const showMessage = (message) => { |
||||
} |
setTimeout((r) => { |
||||
|
scanPopupLoseFocus() |
||||
const scanPopupLoseFocus=()=> { |
comMessageRef.value.showMessage(message, (res) => { |
||||
if (scanPopup.value != undefined) { |
if (res) { |
||||
scanPopup.value.losefocus() |
scanPopupGetFocus() |
||||
} |
} |
||||
} |
}) |
||||
|
}) |
||||
const showMessage=(message)=> { |
} |
||||
setTimeout((r) => { |
|
||||
scanPopupLoseFocus() |
const showErrorMessage = (message) => { |
||||
comMessageRef.value.showMessage(message, (res) => { |
setTimeout((r) => { |
||||
if (res) { |
scanPopupLoseFocus() |
||||
scanPopupGetFocus() |
comMessageRef.value.showErrorMessage(message, (res) => { |
||||
} |
if (res) { |
||||
}) |
scanPopupGetFocus() |
||||
}) |
} |
||||
} |
}) |
||||
|
}) |
||||
const showErrorMessage=(message)=> { |
} |
||||
setTimeout((r) => { |
|
||||
scanPopupLoseFocus() |
const showCommitSuccessMessage = (hint) => { |
||||
comMessageRef.value.showErrorMessage(message, (res) => { |
comMessageRef.value.showSuccessMessage(hint, (res) => { |
||||
if (res) { |
navigateBack(1) |
||||
scanPopupGetFocus() |
}) |
||||
} |
} |
||||
}) |
const showQuestMessage = (hint, callBack) => { |
||||
}) |
comMessageRef.value.showQuestionMessage(hint, (res) => { |
||||
} |
if (res) { |
||||
|
callBack(true) |
||||
const showCommitSuccessMessage=(hint) =>{ |
} |
||||
comMessageRef.value.showSuccessMessage(hint, (res) => { |
}) |
||||
navigateBack(1) |
} |
||||
}) |
|
||||
} |
|
||||
const showQuestMessage=(hint, callBack) =>{ |
|
||||
comMessageRef.value.showQuestionMessage(hint, (res) => { |
|
||||
if (res) { |
|
||||
callBack(true) |
|
||||
} |
|
||||
}) |
|
||||
} |
|
||||
|
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"></style> |
<style scoped lang="scss"></style> |
Loading…
Reference in new issue