Browse Source

fix: customerReturn\job deliver\job inventoryMove issue 文件修改 Vue2升级Vue3 11-11/11-13

syhx_app_vue3
王志国 1 week ago
parent
commit
f53b107126
  1. 10
      src/pages/customerReturn/job/returnDetail.vue
  2. 33
      src/pages/deliver/job/deliverDetailBatch.vue
  3. 71
      src/pages/inventoryMove/coms/comMoveRecord.vue
  4. 20
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue
  5. 4
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  6. 2
      src/pages/issue/coms/comIssueDetailCardBatch.vue
  7. 82
      src/pages/issue/job/issueDetailBatch.vue
  8. 2
      src/pages/issue/record/directIssueByBatch.vue

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

@ -14,15 +14,15 @@
<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=""> <view class="">
<comDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <!-- <comDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"-->
@remove="updateData" @updateData="updateData" @openDetail="openDetail" <!-- @remove="updateData" @updateData="updateData" @openDetail="openDetail"-->
:locationAreaTypeList="toLocationAreaTypeList" v-if="managementType=='BY_BATCH'"> <!-- :locationAreaTypeList="toLocationAreaTypeList" v-if="managementType=='BY_BATCH'">-->
</comDetailCardBatch> <!-- </comDetailCardBatch>-->
<comLableDetailCard :dataContent="item" :settingParam="jobContent" <comLableDetailCard :dataContent="item" :settingParam="jobContent"
:isShowStatus="false" :isShowStatus="false"
:isShowLocation="false" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList="toLocationAreaTypeList" v-else> :locationAreaTypeList="toLocationAreaTypeList">
</comLableDetailCard > </comLableDetailCard >
</view> </view>
<view class="split_line"></view> <view class="split_line"></view>

33
src/pages/deliver/job/deliverDetailBatch.vue

@ -120,6 +120,7 @@ const managementType = ref('')
const scanCount = ref('') const scanCount = ref('')
const balanceinfo = ref('') const balanceinfo = ref('')
const fromLocationCode = ref('') const fromLocationCode = ref('')
const recommendQty = ref('')
const managementList = ref([]); const managementList = ref([]);
const comMessageRef = ref(null); const comMessageRef = ref(null);
@ -217,6 +218,34 @@ const resizeCollapse = () => {
}; };
const getScanResult = (result, managementTypeParams)=> { const getScanResult = (result, managementTypeParams)=> {
managementType.value = managementTypeParams managementType.value = managementTypeParams
let array1 = []//
let array2 = []//
detailSource.value.forEach(item=>{
item.subList.forEach(cur=>{
array1.push(cur.fromLocationCode)
array2.push(cur.batch)
})
})
//
const obj1 = array1.find(item=>item == result.fromLocationCode)
const obj2 = array2.find(item=>item == result.label.batch)
if(jobContent.value.allowModifyLocation == 'FALSE'){
if(!obj1){
showErrorMessage(`不可以扫描推荐库位【${array1.join(',')}】以外的库位`)
return
}
}
if(jobContent.value.allowModifyBatch == 'FALSE'){
if(!obj2){
showErrorMessage(`不可以扫描推荐批次【${array2.join(',')}】以外的批次`)
return
}
}
if(!obj1){
recommendQty.value = 0
}else{
recommendQty.value = result.balance.qty
}
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
setDataBatch(result) setDataBatch(result)
}else{ }else{
@ -274,7 +303,7 @@ const setDataBatch = (result)=> {
toLocationCode:toLocationCode.value, toLocationCode:toLocationCode.value,
batch:result.label.batch, batch:result.label.batch,
handleQty:result.label.qty, handleQty:result.label.qty,
qty:result.balance.qty, qty:recommendQty.value,
inventoryStatus:result.balance.inventoryStatus, inventoryStatus:result.balance.inventoryStatus,
toLocation:result.balance.toLocation, toLocation:result.balance.toLocation,
balance:result.balance, balance:result.balance,
@ -468,7 +497,7 @@ const checkCountBatch = ()=> {
item.totalQty = 0 item.totalQty = 0
item.taskQty = calc.add(item.taskQty, item.qty) item.taskQty = calc.add(item.taskQty, item.qty)
item.totalQty = calc.add(item.totalQty, item.handleQty) item.totalQty = calc.add(item.totalQty, item.handleQty)
if (jobContent.value.allowPartialComplete == "FALSE") { if (jobContent.value.allowSmallerQty == "FALSE") {
if (item.handleQty != item.taskQty) { if (item.handleQty != item.taskQty) {
str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.taskQty}】不一致\n` str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.taskQty}】不一致\n`
} }

71
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view> <com-blank-view @goScan="showPopup" v-if="detailSource.length == 0"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="detailSource.length > 0"> <view class="page-wraper" v-if="detailSource.length > 0">
<view class="split_line"></view> <view class="split_line"></view>
@ -30,7 +30,7 @@
</view> </view>
</view> </view>
</view> </view>
<win-scan-button @goScan="showFromLocationPopup"></win-scan-button> <win-scan-button @goScan="showPopup"></win-scan-button>
</view> </view>
<okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop' <okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop'
@showFromLocationPopup='showFromLocationPopup' @showFromLocationPopup='showFromLocationPopup'
@ -39,10 +39,12 @@
@clickBtnClearFromLocation='clearFromLocation' @clickBtnClearFromLocation='clearFromLocation'
@clickBtnClearItemCode='clearItemCode'> @clickBtnClearItemCode='clearItemCode'>
</okToHoldRecordPack> </okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" @clearItemCode='clearItemCode' :title="'箱码'"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult"
:title="'箱码'">
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" <win-scan-location ref="scanFromLocationCode" title="来源库位"
@getLocation="getFromLocation" :locationAreaTypeList="fromLocationAreaTypeList" @getLocation="getFromLocation" :locationAreaTypeList="fromLocationAreaTypeList"
@clearFromLocation='clearFromLocation'> >
</win-scan-location> </win-scan-location>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
@ -69,7 +71,7 @@ import {
} from '@/common/calc.js'; } from '@/common/calc.js';
import { getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js' import { getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js' import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty,createItemInfoForLabel,createDetailInfoForLabel } from '@/common/record.js'
import { useCountStore } from '@/store' import { useCountStore } from '@/store'
// store // store
const store = useCountStore() const store = useCountStore()
@ -113,6 +115,7 @@ const isShowEditLocation = ref(false)
const scanFromLocationCode = ref() const scanFromLocationCode = ref()
const getResult = ref({}) const getResult = ref({})
const managementType = ref('') const managementType = ref('')
const isJustReplay = ref(true)
const scanPopup = ref() const scanPopup = ref()
const businessTypeCode = ref(props.businessTypeCode) const businessTypeCode = ref(props.businessTypeCode)
@ -125,7 +128,9 @@ onMounted(() => {
getBusinessType(props.businessTypeCode, (res) => { getBusinessType(props.businessTypeCode, (res) => {
if (res.success) { if (res.success) {
businessType.value = res.businessType businessType.value = res.businessType
openScanPopup(true) fromLocationAreaTypeList.value = res.fromLocationAreaTypeList;
toLocationAreaTypeList.value = res.toLocationAreaTypeList;
showPopup(true)
} else { } else {
showErrorMessage(res.message) showErrorMessage(res.message)
} }
@ -200,13 +205,17 @@ const getLocationInfo = () => {
} }
const openScanPopup = () => { const openScanPopup = () => {
isJustReplay.value = true
if (fromLocationCode.value == '') { if (fromLocationCode.value == '') {
showFromLocationPopup() showFromLocationPopup()
return return
} }
scanPopup.value.openScanPopupForType(fromLocationCode.value, businessType.value) scanPopup.value.openScanPopupForType(fromLocationCode.value, businessType.value)
} }
const showFromLocationPopup = () => { const showFromLocationPopup = ()=> {
scanFromLocationCode.value.openScanPopup();
}
const showPopup = () => {
setTimeout(()=>{ setTimeout(()=>{
if(props.showOnePop){ if(props.showOnePop){
okToHoldRecordPackRef.value.fromLocationCode = '' okToHoldRecordPackRef.value.fromLocationCode = ''
@ -222,6 +231,7 @@ const showFromLocationPopup = () => {
} }
const getFromLocation = (location) => { const getFromLocation = (location) => {
fromLocationCode.value = location.code fromLocationCode.value = location.code
okToHoldRecordPackRef.value.fromLocationCode = location.code
fromLocationInfo.value = location fromLocationInfo.value = location
if(!props.showOnePop){ if(!props.showOnePop){
openScanPopup() openScanPopup()
@ -238,11 +248,14 @@ const getToLocation = (location, code) => {
const getScanResult = (result,managementTypeParams)=> { const getScanResult = (result,managementTypeParams)=> {
managementType.value = managementTypeParams managementType.value = managementTypeParams
if(props.showOnePop){ if(props.showOnePop){
okToHoldRecordPackRef.value.itemCode= result.balance.itemCode if(this.isJustReplay){
okToHoldRecordPackRef.value.batch = result.balance.batch okToHoldRecordPackRef.value.itemCode= result.balance.itemCode
getResult.value = result// okToHoldRecordPackRef.value.batch = result.balance.batch
scanPopup.value.closeScanPopup() getResult.value = result//
scanPopup.value.closeScanPopup()
}else{
getScanResultAfterBatch(result,managementTypeParams)
}
}else{ }else{
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
getScanResultAfterBatch(result,managementTypeParams) getScanResultAfterBatch(result,managementTypeParams)
@ -254,21 +267,27 @@ const getScanResult = (result,managementTypeParams)=> {
const okToHoldRecordPackConfirm = (obj)=>{ const okToHoldRecordPackConfirm = (obj)=>{
// this.getResult. = result// // this.getResult. = result//
if(!obj.fromLocationCode){ if(!obj.fromLocationCode){
comMessageRef.value.showErrorMessage('请选择来源库位'); comMessageRef.value.showErrorMessage('请输入来源库位');
return; return;
} }
if(!obj.itemCode){ if(!obj.itemCode){
comMessageRef.value.showErrorMessage('请选择零件'); comMessageRef.value.showErrorMessage('请输入零件');
return; return;
} }
if(!obj.handleQty){ if(!obj.handleQty){
comMessageRef.value.showErrorMessage('请输入数量'); comMessageRef.value.showErrorMessage('请输入数量');
return; return;
} }
// this.getResult.fromLocationCode = obj.fromLocationCode getResult.value = getResult.value ? getResult.value : {
getResult.value.label.batch = obj.handleQty label:{},
fromLocationCode:''
}
getResult.value.fromLocationCode = obj.fromLocationCode
getResult.value.label.itemCode = obj.itemCode
getResult.value.label.batch = obj.batch
getResult.value.label.qty = obj.handleQty getResult.value.label.qty = obj.handleQty
getScanResultAfterBatch(getResult.value,managementType.value) isJustReplay.value = false
scanPopup.value.getScanResult(getResult.value,businessType.value)
} }
const getScanResultAfter = (result) => { const getScanResultAfter = (result) => {
const { balance } = result const { balance } = result
@ -335,8 +354,8 @@ const getScanResultAfterBatch = (result,managementTypeParams)=> {
} }
}) })
if (item == undefined) { if (item == undefined) {
let itemp = createItemInfo(balance, pack); let itemp = createItemInfoForLabel(balance, result.label);
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfoForLabel(balance, pack, result.label);
if (newDetail.packingNumber == '') { if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number; newDetail.packingNumber = pack.number;
@ -369,7 +388,7 @@ const getScanResultAfterBatch = (result,managementTypeParams)=> {
}) })
}else if(managementTypeParams == 'BY_BATCH'){ }else if(managementTypeParams == 'BY_BATCH'){
detail = item.subList.find(r => { detail = item.subList.find(r => {
if (r.batch == pack.batch && if (r.batch == result.label.batch &&
r.fromLocationCode == balance.locationCode && r.fromLocationCode == balance.locationCode &&
r.scaned == true) { r.scaned == true) {
return r; return r;
@ -424,14 +443,14 @@ const getInputMsgResult = (result,fromWitch)=> {
// //
const clearFromLocation = (fromLocationCodeParams)=>{ const clearFromLocation = (fromLocationCodeParams)=>{
okToHoldRecordPackRef.value.fromLocationCode = '' okToHoldRecordPackRef.value.fromLocationCode = ''
okToHoldRecordPackRef.value.itemCode ='' // okToHoldRecordPackRef.value.itemCode =''
okToHoldRecordPackRef.value.batch ='' // okToHoldRecordPackRef.value.batch =''
// this.isClearFromLocationCode = true // this.isClearFromLocationCode = true
} }
// //
const clearItemCode = (label)=>{ const clearItemCode = (label)=>{
okToHoldRecordPackRef.value.itemCode ='' okToHoldRecordPackRef.value.itemCode =''
okToHoldRecordPackRef.value.batch ='' // okToHoldRecordPackRef.value.batch =''
} }
const showErrorMessage = (message) => { const showErrorMessage = (message) => {
if(scanPopup.value){ if(scanPopup.value){
@ -585,9 +604,9 @@ const setParams = () => {
const info = getPackingNumberAndBatchByList(managementList.value, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch) const info = getPackingNumberAndBatchByList(managementList.value, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch)
const submitItem = deepCopyData(detail) const submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode submitItem.itemCode = detail.itemCode
submitItem.itemName = detail.package.itemName submitItem.itemName = detail.itemName
submitItem.itemDesc1 = detail.package.itemDesc1 submitItem.itemDesc1 = detail.itemDesc1
submitItem.itemDesc2 = detail.package.itemDesc2 submitItem.itemDesc2 = detail.itemDesc2
submitItem.fromInventoryStatus = detail.inventoryStatus submitItem.fromInventoryStatus = detail.inventoryStatus
submitItem.toInventoryStatus = detail.toInventoryStatus submitItem.toInventoryStatus = detail.toInventoryStatus

20
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -10,7 +10,7 @@
<view class="item"> <view class="item">
<view class="label">来源库位</view> <view class="label">来源库位</view>
<view class="value"> <view class="value">
<u-input v-model="fromLocationCode" @blur="fromLocationScanMsg"></u-input> <u-input v-model="fromLocationCode" @blur="fromLocationScanMsg" clearable></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearFromLocation"></u-icon> <u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearFromLocation"></u-icon>
</view> </view>
<view class="searchIcon"> <view class="searchIcon">
@ -20,8 +20,7 @@
<view class="item"> <view class="item">
<view class="label">零件</view> <view class="label">零件</view>
<view class="value"> <view class="value">
<u-input v-model="itemCode" @blur="itemCodeScanMsg"></u-input> <u-input v-model="itemCode" clearable></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearItemCode"></u-icon>
</view> </view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> <image src="/static/search.svg" mode="" @click="itemCodeClick"/>
@ -30,8 +29,7 @@
<view class="item"> <view class="item">
<view class="label">批次</view> <view class="label">批次</view>
<view class="value"> <view class="value">
<u-input v-model='batch'></u-input> <u-input v-model='batch' clearable></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="batch = ''"></u-icon>
</view> </view>
<view class="searchIcon"></view> <view class="searchIcon"></view>
</view> </view>
@ -115,6 +113,18 @@ const confirm = () => {
handleQty: handleQty.value, handleQty: handleQty.value,
}; };
emit('confirm', obj); emit('confirm', obj);
// if(!obj.fromLocationCode){
// this.$refs.comMessage.showErrorMessage('');
// return;
// }
// if(!obj.itemCode){
// this.$refs.comMessage.showErrorMessage('');
// return;
// }
// if(!obj.handleQty){
// this.$refs.comMessage.showErrorMessage('');
// return;
// }
}; };
const fromLocationScanMsg = () => { const fromLocationScanMsg = () => {

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

@ -490,12 +490,12 @@ const checkCountBatch = ()=> {
tempHandleQty = 0 tempHandleQty = 0
} }
str += str +=
`批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` `物料号【${item.itemCode}批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
if( cur.handleQty > cur.balance.balanceQty){ if( cur.handleQty > cur.balance.balanceQty){
console.log(2333,cur.handleQty) console.log(2333,cur.handleQty)
console.log(2333,cur.balance.balanceQty) console.log(2333,cur.balance.balanceQty)
str1 += str1 +=
`批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}` `物料号【${item.itemCode}批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}`
} }
} }
}) })

2
src/pages/issue/coms/comIssueDetailCardBatch.vue

@ -11,7 +11,7 @@
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent"> <!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> --> </com-issue-request-info> -->
</template> </template>
<u-swipe-action ref="swipeAction" :options="removeOptions" <u-swipe-action ref="swipeAction" :options="(item.scaned&&settingParam.allowModifyQty == 'TRUE')?editAndRemoveOptions : item.scaned? removeOptions:options"
v-for="(item,index) in dataContent.subList" v-for="(item,index) in dataContent.subList"
@click="(...event)=>itemCoceClick(event,item,index)"> @click="(...event)=>itemCoceClick(event,item,index)">
<view class="" :class="item.scaned?'scan_view':''"> <view class="" :class="item.scaned?'scan_view':''">

82
src/pages/issue/job/issueDetailBatch.vue

@ -84,6 +84,8 @@ import {
import WinScanButton from '@/mycomponents/scan/winScanButton.vue' import WinScanButton from '@/mycomponents/scan/winScanButton.vue'
import JobTop from '@/mycomponents/job/jobTop.vue' import JobTop from '@/mycomponents/job/jobTop.vue'
import WinScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import WinScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import WorkStation from '@/mycomponents/workStation/workStation.vue'
import BalanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import {ref, nextTick, getCurrentInstance} from 'vue'; import {ref, nextTick, getCurrentInstance} from 'vue';
import {onLoad, onNavigationBarButtonTap, onBackPress} from '@dcloudio/uni-app'; import {onLoad, onNavigationBarButtonTap, onBackPress} from '@dcloudio/uni-app';
@ -104,6 +106,7 @@ const scanCount = ref('')
const balanceinfo = ref('') const balanceinfo = ref('')
const fromLocationCode = ref('') const fromLocationCode = ref('')
const scanMessage = ref('') const scanMessage = ref('')
const recommendQty = ref('')
const managementList = ref([]); const managementList = ref([]);
const comMessageRef = ref(null); const comMessageRef = ref(null);
@ -172,6 +175,7 @@ const getDetail = () => {
getIssueJobDetail(id.value).then((res) => { getIssueJobDetail(id.value).then((res) => {
uni.hideLoading(); uni.hideLoading();
if (res.data && res.data.subList.length > 0) { if (res.data && res.data.subList.length > 0) {
// res.data.allowModifyLocation = 'FALSE'
jobContent.value = res.data; jobContent.value = res.data;
jobStatus.value = res.data.status; jobStatus.value = res.data.status;
subList.value = res.data.subList; subList.value = res.data.subList;
@ -209,6 +213,34 @@ const resizeCollapse = () => {
}; };
const getScanResult = (result, managementTypeParams)=> { const getScanResult = (result, managementTypeParams)=> {
managementType.value = managementTypeParams managementType.value = managementTypeParams
let array1 = []//
let array2 = []//
this.detailSource.forEach(item=>{
item.subList.forEach(cur=>{
array1.push(cur.fromLocationCode)
array2.push(cur.batch)
})
})
//
const obj1 = array1.find(item=>item == result.fromLocationCode)
const obj2 = array2.find(item=>item == result.label.batch)
if(jobContent.value.allowModifyLocation == 'FALSE'){
if(!obj1){
this.showErrorMessage(`不可以扫描推荐库位【${array1.join(',')}】以外的库位`)
return
}
}
if(jobContent.value.allowModifyBatch == 'FALSE'){
if(!obj2){
showErrorMessage(`不可以扫描推荐批次【${array2.join(',')}】以外的批次`)
return
}
}
if(!obj1){
recommendQty.value = 0
}else{
recommendQty.value = result.balance.qty
}
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
setDataBatch(result) setDataBatch(result)
} }
@ -262,7 +294,7 @@ const setDataBatch = (result)=> {
toLocationCode:toLocationCode.value, toLocationCode:toLocationCode.value,
batch:result.label.batch, batch:result.label.batch,
handleQty:result.label.qty, handleQty:result.label.qty,
qty:result.balance.qty, qty:recommendQty.value,
inventoryStatus:result.balance.inventoryStatus, inventoryStatus:result.balance.inventoryStatus,
toLocation:result.balance.toLocation, toLocation:result.balance.toLocation,
balance:result.balance, balance:result.balance,
@ -604,8 +636,10 @@ const updateData = (record) => {
}; };
const autoCommit = ()=> { const autoCommit = ()=> {
// this.$throttle(this.submit, 2000, this)() // this.$throttle(this.submit, 2000, this)()
jobContent.value.allowBiggerQty = 'FALSE'
let str = "" let str = ""
let str1 = "" let str1 = ""
let str2 = ""
let totalQty = 0; let totalQty = 0;
let taskQty = 0; let taskQty = 0;
detailSource.value.forEach(detail => { detailSource.value.forEach(detail => {
@ -613,22 +647,35 @@ const autoCommit = ()=> {
if (item.scaned) { if (item.scaned) {
taskQty = calc.add(taskQty, item.qty) taskQty = calc.add(taskQty, item.qty)
totalQty = calc.add(totalQty, item.handleQty) totalQty = calc.add(totalQty, item.handleQty)
if (item.handleQty < item.qty) { if (jobContent.value.allowSmallerQty == "FALSE") {
str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.qty}】不一致\n` if(parseFloat(item.handleQty)<parseFloat(item.qty)){
str += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许小于任务数量【${item.qty}`
}
} }
if (item.handleQty > item.balance.qty) { if (jobContent.value.allowBiggerQty == 'FALSE') {
str1 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}` if (parseFloat( item.handleQty )> parseFloat(item.qty)){
str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}`
}
}
if(parseFloat(item.handleQty)>parseFloat( item.balance.qty)){
str2 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}`
} }
} }
}) })
}) })
if(str1){ if (str) {
comMessageRef.value.showMessage(str1, res => { str1 = '不允许提交\n' + str
if (res) { showErrorMessage(str)
afterCloseMessage() return
} }
}); if (str1) {
str1 = '不允许提交\n' + str1
showErrorMessage(str1)
return
}
if (str2) {
str2 = '不允许提交\n' + str2
showErrorMessage(str2)
return return
} }
if(str){ if(str){
@ -641,17 +688,6 @@ const autoCommit = ()=> {
// //
proxy.$throttle(submit, 2000, proxy)() proxy.$throttle(submit, 2000, proxy)()
} else { } else {
// this.detailSource.forEach(detail => {
// detail.Items.forEach(item => {
// taskQty =calc.add(taskQty,item.qty)
// item.Locations.forEach(lco => {
// lco.Batchs.forEach(batch => {
// batch.Records = []
// })
// })
// })
// })
// this.$refs.comScanIssuePack.clearList()
scanPopupGetFocus() scanPopupGetFocus()
} }
}); });

2
src/pages/issue/record/directIssueByBatch.vue

@ -345,7 +345,7 @@ const closeScanPopup = () => {
const scanPopupGetFocus = () => { const scanPopupGetFocus = () => {
if (scanPopup.value) { if (scanPopup.value) {
scanPopup.value.getfocus(); scanPopup.value.packGetFocus();
} }
}; };

Loading…
Cancel
Save