Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into intex

intex_online20241205
lijuncheng 3 months ago
parent
commit
46a1288489
  1. 16
      src/common/record.js
  2. 2
      src/mycomponents/package/packageCard.vue
  3. 2
      src/mycomponents/qty/balanceQtyEdit.vue
  4. 2
      src/mycomponents/qty/packUnit.vue
  5. 9
      src/mycomponents/record/recordComDetailCard.vue
  6. 2
      src/mycomponents/scan/winComScan.vue
  7. 56
      src/pages.json
  8. 110
      src/pages/customerReturn/job/returnDetail.vue
  9. 9
      src/pages/customerReturn/record/returnRecord.vue
  10. 12
      src/pages/deliver/record/deliverRecord.vue
  11. 108
      src/pages/inventoryMove/coms/comMoveRecord.vue
  12. 4
      src/pages/inventoryMove/coms/comMoveRecordCard.vue
  13. 78
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue
  14. 2
      src/pages/inventoryMove/record/holdToOkRecord.vue
  15. 5
      src/pages/issue/record/directIssueByBatch.vue
  16. 2
      src/pages/purchaseReceipt/job/purchaseReceipt.vue
  17. 52
      src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue
  18. 52
      src/pages/purchaseReceipt/job/purchaseReceiptTool.vue
  19. 15
      src/pages/purchaseReceipt/job/receiptDetail.vue
  20. 14
      src/pages/purchaseReceipt/job/receiptJob.vue
  21. 189
      src/pages/scrap/job/scrapJobDetail.vue

16
src/common/record.js

@ -48,7 +48,23 @@ export function createDetailInfo(balance, pack) {
return detail; return detail;
} }
export function createDetailInfoForLabel(balance, pack,label) {
balance.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
console.log(988,label.qty)
detail.handleQty = new Decimal(label.qty).toNumber();
detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail;
}
export function createDetailByPackInfo(pack) { export function createDetailByPackInfo(pack) {

2
src/mycomponents/package/packageCard.vue

@ -6,7 +6,7 @@
<view style="word-break: break-all;"> <view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber"> <!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> --> </container> -->
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> <location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location> </location>

2
src/mycomponents/qty/balanceQtyEdit.vue

@ -44,7 +44,7 @@
<view class="uni-flex uni-row space-between padding title u-col-center" v-if="queryBalance"> <view class="uni-flex uni-row space-between padding title u-col-center" v-if="queryBalance">
<text>库存数量 : </text> <text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;"> <view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text> <text class="text_recommend" v-if="dataContent.balanceQty">{{Number(dataContent.balanceQty)}}</text>
<uom :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
</view> </view>
</view> </view>

2
src/mycomponents/qty/packUnit.vue

@ -1,5 +1,5 @@
<template> <template>
<view class="std_pack" v-if="dataContent.packQty!=undefined"> <view class="std_pack" v-if="dataContent.packQty">
<text> <text>
<!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} --> <!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} -->
<!-- {{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}) --> <!-- {{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}) -->

9
src/mycomponents/record/recordComDetailCard.vue

@ -4,7 +4,7 @@
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<uni-swipe-action> <uni-swipe-action>
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="scanOptions">
<item-qty :dataContent="dataContent" :isShowBalance="true" <item-qty :dataContent="dataContent" :isShowBalance="true"
:isShowBalanceQty="isShowBalanceQty" :isShowBalanceQty="isShowBalanceQty"
:isShowRecommendQty="false" :isShowRecommendQty="false"
@ -109,14 +109,17 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowHandleQty: {
type: Boolean,
default: true
},
isShowModifedLocation: { isShowModifedLocation: {
type: Boolean, type: Boolean,
default: false default: false
}, },
allowModifyQty: { allowModifyQty: {
type: Boolean, type: Boolean,
default: false default: true
}, },
allowModifyLocation: { allowModifyLocation: {
type: Boolean, type: Boolean,

2
src/mycomponents/scan/winComScan.vue

@ -155,11 +155,9 @@
// title: '...', // title: '...',
// mask: true // mask: true
// }) // })
console.log(222)
let that = this; let that = this;
// if(index==-1){ // if(index==-1){
// that.sc // that.sc
console.log(that.scanMsg.includes('\n'))
if (that.scanMsg.includes('\n')) { if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {

56
src/pages.json

@ -254,6 +254,62 @@
} }
} }
}, },
{
"path": "pages/purchaseReceipt/job/purchaseReceiptTool",
"style": {
"navigationBarTitleText": "协定品收货",
"enablePullDownRefresh": true,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},
{
"path": "pages/purchaseReceipt/job/purchaseReceiptDevelop",
"style": {
"navigationBarTitleText": "号试品收货",
"enablePullDownRefresh": true,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},
{ {
"path": "pages/purchaseReceipt/job/purchaseReject", "path": "pages/purchaseReceipt/job/purchaseReject",
"style": { "style": {

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

@ -80,6 +80,10 @@
getScanCount getScanCount
} from '@/common/detail.js'; } from '@/common/detail.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
@ -246,7 +250,7 @@
}, },
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup( this.fromLocationCode );
}, },
closeScanPopup() { closeScanPopup() {
@ -254,6 +258,52 @@
}, },
getScanResult(result) { getScanResult(result) {
console.log(result)
this.managementType ==result.managementType
if(result.managementType == "BY_BATCH" || result.managementType == "BY_QUANTITY" ){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setDataBatch(result){
try {
var packingNumber = result.package.number;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
console.log(366,batch)
console.log(366,detail.subList)
var itemDetail = detail.subList.find(r => {
return r.batch == batch
})
if (itemDetail == undefined) {
this.showErrorMessage( "批次[" + batch + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showErrorMessage("[" + packingNumber + "]" + "[" + batch + "]")
itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty)
itemDetail.packQty = Number(result.package.packQty)
itemDetail.packUnit = result.package.packUnit
this.calcHandleQty();
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
setData(result){
try { try {
var packingNumber = result.package.number; var packingNumber = result.package.number;
var batch = result.label.batch; var batch = result.label.batch;
@ -287,7 +337,6 @@
this.showMessage(e.message) this.showMessage(e.message)
} }
}, },
scanLocationCode(location, code) { scanLocationCode(location, code) {
this.toLocationCode = code this.toLocationCode = code
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
@ -310,12 +359,20 @@
// // // //
if (this.scanCount == this.subList.length) { if (this.scanCount == this.subList.length) {
this.checkCount(); if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
this.checkCountBatch()
}else{
this.checkCount();
}
} else if (this.scanCount < this.subList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.checkCount(); if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
this.checkCountBatch()
}else{
this.checkCount();
}
} else { } else {
// //
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@ -354,7 +411,51 @@
this.submitJob() this.submitJob()
} }
}, },
checkCountBatch(){
//
let str = ''
let str1 = ''
let str2 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
}
if(cur.handleQty > cur.qty){
str1 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于推荐数量【${cur.qty}`
}
if(cur.handleQty < cur.qty){
str2 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以小于推荐数量【${cur.qty}`
}
})
})
this.jobContent.allowBiggerQty = 'FALSE'
if(this.jobContent.allowBiggerQty == 'FALSE' &&str1){
this.$refs.comMessage.showConfirmWarningModal(str1)
return
}
if(this.jobContent.allowSmallerQty == 'FALSE' && str2){
this.$refs.comMessage.showConfirmWarningModal(str2)
return
}
if (str) {
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.submitJob()
}
});
} else {
this.submitJob()
}
},
submitJob() { submitJob() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
@ -370,6 +471,7 @@
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
customerReturnJobSubmit(params).then(res => { customerReturnJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {

9
src/pages/customerReturn/record/returnRecord.vue

@ -211,6 +211,7 @@
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.packingNumber =pack.number newDetail.packingNumber =pack.number
newDetail.handleQty =result.label.qty
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -314,7 +315,13 @@
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" ,params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
customerReturnRecordSubmit(params).then(res => { customerReturnRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {

12
src/pages/deliver/record/deliverRecord.vue

@ -175,10 +175,6 @@
} else { } else {
this.setData(result) this.setData(result)
} }
}, },
setData(result){ setData(result){
@ -343,7 +339,13 @@
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
console.log("提交" + JSON.stringify(params)) console.log("提交",params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
deliverRecordSubmit(params).then(res => { deliverRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {

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

@ -12,7 +12,7 @@
<com-move-record-card :dataContent="item" :index="index" @removeData="removeData" <com-move-record-card :dataContent="item" :index="index" @removeData="removeData"
:isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack' :isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack'
:allowEditQty="true" :allowEditQty="true"
:allowEditStatus="allowEditStatus"> :allowEditStatus="allowEditStatus" >
</com-move-record-card> </com-move-record-card>
</view> </view>
</view> </view>
@ -35,7 +35,7 @@
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button> <win-scan-button @goScan='showFromLocationPopup'></win-scan-button>
</view> </view>
<!-- 合格转隔离单独的弹窗--> <!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' :isClearFromLocationCode='isClearFromLocationCode' :isClearItemCode='isClearItemCode' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack> <okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg' @clickBtnClearFromLocation='clearFromLocation' @clickBtnClearItemCode='clearItemCode'></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :title="'箱码'" > <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :title="'箱码'" >
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' <win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -147,10 +147,6 @@
fromLocationAreaTypeList: [], fromLocationAreaTypeList: [],
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
isShowEditLocation: false, isShowEditLocation: false,
itemCode:'',
batch:'',
isClearFromLocationCode:false,//
isClearItemCode:false,//
} }
}, },
@ -160,7 +156,7 @@
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup()
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
@ -245,13 +241,18 @@
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
}, },
showFromLocationPopup() { showFromLocationPopup() {
this.$nextTick(() => { setTimeout(()=>{
if(this.showOnePop){ if(this.showOnePop){
this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
this.$refs.okToHoldRecordPackRef.itemCode = ''
this.$refs.okToHoldRecordPackRef.batch = ''
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = true this.$refs.okToHoldRecordPackRef.showOne = true
}else{ }else{
this.$refs.scanFromLocationCode.openScanPopup(); this.$refs.scanFromLocationCode.openScanPopup();
} }
}) },200)
}, },
getFromLocation(location) { getFromLocation(location) {
this.fromLocationCode = location.code; this.fromLocationCode = location.code;
@ -267,20 +268,19 @@
this.toLocationCode = code; this.toLocationCode = code;
this.toLocationInfo = location; this.toLocationInfo = location;
}, },
getScanResult(result,managementType) { getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
if(this.showOnePop){ if(this.showOnePop){
this.itemCode= result.balance.itemCode this.$refs.okToHoldRecordPackRef.itemCode= result.balance.itemCode
this.batch = result.balance.batch this.$refs.okToHoldRecordPackRef.batch = result.balance.batch
this.isClearItemCode = false
debugger
this.getResult = result// this.getResult = result//
this.$refs.scanPopup.closeScanPopup() this.$refs.scanPopup.closeScanPopup()
}else{ }else{
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result) this.getScanResultAfterBatch(result,managementTypeParams)
}else{ }else{
this.getScanResultAfter(result) this.getScanResultAfter(result,managementTypeParams)
} }
} }
@ -302,7 +302,7 @@
// this.getResult.fromLocationCode = obj.fromLocationCode // this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty this.getResult.label.qty = obj.handleQty
this.getScanResultAfterBatch(this.getResult) this.getScanResultAfterBatch(this.getResult,this.managementType)
}, },
getScanResultAfter(result){ getScanResultAfter(result){
var balance = result.balance; var balance = result.balance;
@ -364,7 +364,7 @@
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
}, },
getScanResultAfterBatch(result){ getScanResultAfterBatch(result,managementTypeParams){
var balance = result.balance; var balance = result.balance;
this.balanceInfo = result.balance; this.balanceInfo = result.balance;
var pack = result.package; var pack = result.package;
@ -387,18 +387,35 @@
newDetail.toInventoryStatus = this.toInventoryStatus; newDetail.toInventoryStatus = this.toInventoryStatus;
} }
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty) newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.clearFromLocation()
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = false
} else { } else {
var detail = item.subList.find(r => { var detail = ''
if (r.batch == pack.batch && console.log(9988,managementTypeParams)
r.fromLocationCode == balance.locationCode && if(managementTypeParams == 'BY_QUANTITY'){
r.scaned == true) { detail = item.subList.find(r => {
return r; if (r.fromLocationCode == balance.locationCode &&
} r.scaned == true) {
}) return r;
}
})
}else if(managementTypeParams == 'BY_BATCH'){
detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}
console.log(detail)
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus; // newDetail.inventoryStatus = balance.inventoryStatus;
@ -412,10 +429,24 @@
newDetail.packingNumber = pack.number; newDetail.packingNumber = pack.number;
} }
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail); item.subList.push(newDetail);
this.clearFromLocation()
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = false
} else { } else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty) // console.log(999,detail.handleQty)
// detail.handleQty =calc.add(detail.handleQty, result.label.qty)
if(managementTypeParams == 'BY_QUANTITY'){
this.showErrorMessage(
"批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}else if(managementTypeParams == 'BY_BATCH'){
this.showErrorMessage(
"批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}
} }
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -426,17 +457,17 @@
}, },
// //
clearFromLocation(fromLocationCodeParams){ clearFromLocation(fromLocationCodeParams){
this.fromLocationCode = fromLocationCodeParams this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
this.itemCode ='' this.$refs.okToHoldRecordPackRef.itemCode =''
this.batch ='' this.$refs.okToHoldRecordPackRef.batch =''
this.isClearFromLocationCode = true // this.isClearFromLocationCode = true
}, },
// //
clearItemCode(label){ clearItemCode(label){
this.itemCode = label.itemCode this.$refs.okToHoldRecordPackRef.itemCode =''
this.batch ='' this.$refs.okToHoldRecordPackRef.batch =''
this.isClearItemCode = true
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus() this.$refs.scanPopup.packLoseFocus()
@ -547,7 +578,12 @@
} }
// if(this.balanceInfo) // if(this.balanceInfo)
console.log("提交" ,params) console.log("提交" ,params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
inventoryMoveRecordSubmit(params).then(res => { inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {

4
src/pages/inventoryMove/coms/comMoveRecordCard.vue

@ -16,9 +16,9 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)" <uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions"> :right-options="item.scaned?scanOptions:detailOptions">
<comMovebalance :dataContent="item" :isShowStdPack="false" :isShowPack="true" <comMovebalance :dataContent="item" :isShowStdPack="false"
:fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus" :fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="true" :allowEditStatus='allowEditStatus'></comMovebalance> :isShowLocation="true" :allowEditStatus='allowEditStatus' :isShowPack='item.managementTypeParams == "BY_PACKAGING"' ></comMovebalance>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
<view class='split_line'></view> <view class='split_line'></view>

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

@ -9,14 +9,20 @@
</view> </view>
<view class="item"> <view class="item">
<view class="label">来源库位</view> <view class="label">来源库位</view>
<view class="value"><u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg" clearable></u-input></view> <view class="value">
<u-input v-model="fromLocationCode" @blur="fromLocationScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearFromLocation"></u-icon>
</view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/> <image src="/static/search.svg" mode="" @click="fromLocationClick"/>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="label">零件</view> <view class="label">零件</view>
<view class="value"><u-input v-model="itemCode" @confirm="itemCodeScanMsg" clearable></u-input></view> <view class="value">
<u-input v-model="itemCode" @blur="itemCodeScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearItemCode"></u-icon>
</view>
<view class="searchIcon"> <view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> <image src="/static/search.svg" mode="" @click="itemCodeClick"/>
</view> </view>
@ -25,6 +31,7 @@
<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'></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>
@ -62,7 +69,7 @@
components: { components: {
winScanLocation winScanLocation
}, },
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'], emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'],
data() { data() {
return { return {
handleQty:0, handleQty:0,
@ -73,31 +80,11 @@
} }
}, },
props: { props: {
fromLocationCodeProps:{
type: String,
default: ''
},
// //
showOnePop: { showOnePop: {
type: Boolean, type: Boolean,
default: false default: false
}, },
itemCodeProps:{
type: String,
default: ''
},
batchProps:{
type: String,
default: ''
},
isClearFromLocationCode:{
type: Boolean,
default: false
},
isClearItemCode:{
type: Boolean,
default: false
},
}, },
mounted() { mounted() {
}, },
@ -128,12 +115,15 @@
this.$emit("confirm",obj); this.$emit("confirm",obj);
}, },
fromLocationScanMsg(){ fromLocationScanMsg(){
if (this.fromLocationCode) {
console.log(111,this.fromLocationCode) console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg' this.fromWitch = 'fromLocationScanMsg'
this.handelScanMsg() this.handelScanMsg()
}
}, },
itemCodeScanMsg(){ itemCodeScanMsg(){
if (this.itemCode) {
if(!this.fromLocationCode){ if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位") this.$refs.comMessage.showMessage("请先扫描来源库位")
return return
@ -141,6 +131,7 @@
this.fromWitch = 'itemCodeScanMsg' this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode this.scanMsg = this.itemCode
this.handelScanMsg() this.handelScanMsg()
}
}, },
handelScanMsg() { handelScanMsg() {
// //
@ -154,7 +145,7 @@
// that.scanMsg =that.scanMsg + "\n"; // that.scanMsg =that.scanMsg + "\n";
// } // }
console.log(that.scanMsg.includes('\n')) console.log(that.scanMsg.includes('\n'))
// if (that.scanMsg.includes('\n')) { if (that.scanMsg) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
@ -192,7 +183,7 @@
} }
}); });
}, 200); }, 200);
// } }
}, },
losefocus() { losefocus() {
let that = this; let that = this;
@ -200,38 +191,15 @@
that.boxfocus = false; that.boxfocus = false;
}); });
}, },
onClear(){ clickBtnClearFromLocation(){
console.log(111) this.$emit("clickBtnClearFromLocation");
}
},
watch: {
fromLocationCodeProps:{
handler(newVal, oldVal) {
if(this.isClearFromLocationCode){
this.fromLocationCode=''
}else{
this.fromLocationCode = newVal
}
},
// deep: true,
// immediate: true
},
itemCodeProps: {
handler(newVal, oldVal) {
if(this.isClearItemCode){
this.itemCode=''
}else{
this.itemCode = newVal
}
},
}, },
batchProps(newVal) { clickBtnClearItemCode(){
if(this.isClearItemCode){ this.$emit("clickBtnClearItemCode");
this.batch=''
}else{
this.batch = newVal
}
}, },
},
watch: {
} }
} }
</script> </script>

2
src/pages/inventoryMove/record/holdToOkRecord.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveRecord :myTitle="title" businessTypeCode='HoldToOk' > </comMoveRecord> <comMoveRecord :myTitle="title" businessTypeCode='HoldToOk' :showOnePop='true'> </comMoveRecord>
</view> </view>
</template> </template>

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

@ -81,6 +81,7 @@
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty, calcHandleQty,
createDetailInfoForLabel
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
@ -251,7 +252,7 @@
}) })
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfoForLabel(balance, pack,label);
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -263,7 +264,7 @@
} }
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfoForLabel(balance, pack,label);
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty) detail.handleQty =calc.add(detail.handleQty, result.label.qty)

2
src/pages/purchaseReceipt/job/purchaseReceipt.vue

@ -1,6 +1,6 @@
<template> <template>
<view class=""> <view class="">
<receipt-job :title="title" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job> <receipt-job source_type="ASN" :title="title" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view> </view>
</template> </template>

52
src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue

@ -0,0 +1,52 @@
<template>
<view class="">
<receipt-job :title="title" source_type="Develop" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view>
</template>
<script>
import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
export default {
name: 'purchaseReceiptTool',
components: {
receiptJob
},
data() {
return {
title:''
};
},
onShow() {
if(this.$refs.receiptjob!=undefined){
this.$refs.receiptjob.refresh();
}
},
onLoad(option) {
this.title = option.title
},
onPullDownRefresh() {
this.$refs.receiptjob.refresh();
},
onReachBottom() {
this.$refs.receiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.receiptjob.goHome();
// this.$refs.receiptjob.refresh();
} else if (e.index == 1) {
this.$refs.receiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

52
src/pages/purchaseReceipt/job/purchaseReceiptTool.vue

@ -0,0 +1,52 @@
<template>
<view class="">
<receipt-job :title="title" source_type="TOOL" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view>
</template>
<script>
import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
export default {
name: 'purchaseReceiptTool',
components: {
receiptJob
},
data() {
return {
title:''
};
},
onShow() {
if(this.$refs.receiptjob!=undefined){
this.$refs.receiptjob.refresh();
}
},
onLoad(option) {
this.title = option.title
},
onPullDownRefresh() {
this.$refs.receiptjob.refresh();
},
onReachBottom() {
this.$refs.receiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.receiptjob.goHome();
// this.$refs.receiptjob.refresh();
} else if (e.index == 1) {
this.$refs.receiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

15
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -177,6 +177,7 @@
isCheckLocation: 'purchaseReceiptLocationCodeValidate', // isCheckLocation: 'purchaseReceiptLocationCodeValidate', //
reasonText: "", reasonText: "",
packingNumberList:[], packingNumberList:[],
source_type:'',
// printDeafult: {}, // // printDeafult: {}, //
// templateDeafult: {} // // templateDeafult: {} //
}; };
@ -188,6 +189,7 @@
this.scanMessage = option.scanMessage; this.scanMessage = option.scanMessage;
this.operation = option.operation; this.operation = option.operation;
this.status = option.status; this.status = option.status;
this.source_type = option.source_type;
this.switchCode = "purchasereceiptPrintPDA" //PDA this.switchCode = "purchasereceiptPrintPDA" //PDA
this.switchCode1 = "EnableQms" //QMSTRUEFALSE this.switchCode1 = "EnableQms" //QMSTRUEFALSE
}, },
@ -467,6 +469,7 @@
} }
} }
} else if (result.label.labelType == "PurchaseLabel") { } else if (result.label.labelType == "PurchaseLabel") {
debugger
var packingNumber = result.package.number; var packingNumber = result.package.number;
var parentpackingNumber = result.package.parentNumber; var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch; var batch = result.label.batch;
@ -492,7 +495,7 @@
} else { } else {
let isScan = false let isScan = false
if(packingNumber){ if(packingNumber){
isScan = this.packingNumberList.some(item=>item == packingNumber) isScan = this.packList.some(item=>item == packingNumber)
}else{ }else{
isScan = false isScan = false
} }
@ -502,7 +505,8 @@
pack.handleQty = calc.add(pack.handleQty,result.label.qty) pack.handleQty = calc.add(pack.handleQty,result.label.qty)
} else { } else {
this.packingNumberList.push(packingNumber) this.packList.push(packingNumber)
pack.packList.push(packingNumber)
pack.scaned = true pack.scaned = true
pack.scanDate = new Date(); pack.scanDate = new Date();
pack.handleQty = Number(result.label.qty); pack.handleQty = Number(result.label.qty);
@ -852,6 +856,7 @@
console.log(877,params) console.log(877,params)
// return; // return;
purchaseReceiptJobSubmit(params).then(res => { purchaseReceiptJobSubmit(params).then(res => {
if (res.data) { if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode)// let isCheckPrint = getSwitchInfoByCode(this.switchCode)//
let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)// let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//
@ -863,7 +868,7 @@
}) })
}else if(!isCheckPrint1 && !isCheckPrint){ }else if(!isCheckPrint1 && !isCheckPrint){
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number) this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
}else { }else if(that.source_type!='TOOL'&&that.source_type!='Develop'){
// if (res.data == '') { // if (res.data == '') {
// this.showCommitSuccessMessage(res.data) // this.showCommitSuccessMessage(res.data)
// const purchaseReceiptDetailPointParams = { // const purchaseReceiptDetailPointParams = {
@ -874,6 +879,7 @@
// } else { // } else {
// this.showErrorMessage(res.data) // this.showErrorMessage(res.data)
// } // }
uni.showLoading({ uni.showLoading({
title: "提交成功,将跳转到打印页面", title: "提交成功,将跳转到打印页面",
mask: true mask: true
@ -936,6 +942,9 @@
}) })
}, 2000) }, 2000)
}else if(that.source_type=='TOOL'||that.source_type=='Develop'){
uni.hideLoading()
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
} }
} else { } else {

14
src/pages/purchaseReceipt/job/receiptJob.vue

@ -102,6 +102,10 @@
type: String, type: String,
default: '' default: ''
}, },
source_type: {
type: String,
default: ''
},
}, },
// onShow() { // onShow() {
@ -199,6 +203,14 @@
action: "==", action: "==",
value: this.$store.state.user.id value: this.$store.state.user.id
}) })
if(this.source_type){
filters.push({
column: "source_type",
action: "==",
value: this.source_type
})
}
var params = { var params = {
filters: filters, filters: filters,
@ -298,7 +310,7 @@
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
uni.navigateTo({ uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scanMessage=' + scanMessage .operation + '&scanMessage=' + scanMessage + '&source_type=' + this.source_type
}); });
this.scanMessage = "" this.scanMessage = ""
}, },

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

@ -1,13 +1,14 @@
<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-view">
<view class="header_job_top" >
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
</view> </view>
<view class="header_item"> <view class="header_item" >
申请单号 : {{jobContent.requestNumber}} 申请单号 : {{jobContent.requestNumber}}
</view> </view>
<view class='split_line'></view> </view>
</view> </view>
<view class="page-main"> <view class="page-main">
@ -68,6 +69,10 @@
getScanCount getScanCount
} from '@/common/detail.js'; } from '@/common/detail.js';
import {
calc
} from '@/common/calc.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comScrapDetailCard from '@/pages/scrap/coms/comScrapDetailCard.vue' import comScrapDetailCard from '@/pages/scrap/coms/comScrapDetailCard.vue'
@ -208,7 +213,131 @@
}, },
getScanResult(result) { getScanResult(result,managementPrecisionParams) {
this.managementPrecision = managementPrecisionParams
if(managementPrecisionParams == 'BY_QUANTITY' || managementPrecisionParams == 'BY_BATCH'){
this.setDataBatch(result,managementPrecisionParams)
}else{
this.setData(result,managementPrecisionParams)
}
},
setDataBatch(result,managementPrecisionParams){
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var qty = result.balance.qty;
var itemCode = result.balance.itemCode;
var locationCode = result.balance.locationCode;
var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail =''
if(managementPrecisionParams == 'BY_QUANTITY'){
itemDetail = detail.subList.find(r => {
return r.fromlocationCode == result.fromlocationCode
})
}else if(managementPrecisionParams == 'BY_BATCH'){
itemDetail = detail.subList.find(r => {
return r.batch == batch&& r.fromlocationCode == result.fromlocationCode
})
}
if (itemDetail == undefined) {
this.showErrorMessage("批次[" + (batch ? batch: '') + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showErrorMessage("[" + packingNumber + "]" + "[" + batch + "]")
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续出库?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
} else {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = calc.add(itemDetail.handleQty, Number(result.label.qty));
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
}
} else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续出库?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
} else {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
}
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
setData(result){
try { try {
var packingNumber = result.balance.packingNumber; var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch; var batch = result.balance.batch;
@ -278,7 +407,6 @@
} }
}, },
// //
continueScan() { continueScan() {
this.scanCount = getScanCount(this.subList); this.scanCount = getScanCount(this.subList);
@ -302,7 +430,6 @@
commit() { commit() {
this.scanCount = getScanCount(this.subList); this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) { if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
@ -311,12 +438,20 @@
// // // //
if (this.scanCount == this.subList.length) { if (this.scanCount == this.subList.length) {
this.checkCount(); if(this.managementPrecision == 'BY_QUANTITY' || this.managementPrecision == 'BY_BATCH'){
this.checkCountBatch();
}else{
this.checkCount();
}
} else if (this.scanCount < this.subList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.checkCount(); if(this.managementPrecision == 'BY_QUANTITY' || this.managementPrecision == 'BY_BATCH'){
this.checkCountBatch();
}else{
this.checkCount();
}
} else { } else {
// //
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@ -355,6 +490,42 @@
this.submitJob() this.submitJob()
} }
}, },
checkCountBatch(){
//
let str = ''
let str1 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
}
if(cur.handleQty > cur.balance.balanceQty){
str1 += `批次【${cur.batch}】提交数量【${ cur.balance.balanceQty}】不允许大于库存数量【${ cur.balance.balanceQty}`
}
})
})
if(str1){
this.$refs.comMessage.showConfirmWarningModal(str1)
return
}
if (str) {
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.submitJob()
}
});
} else {
this.submitJob()
}
},
async submitJob() { async submitJob() {
uni.showLoading({ uni.showLoading({
@ -372,7 +543,7 @@
this.managementList = res.list; this.managementList = res.list;
// //
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数",params);
scrapJobSubmit(params).then(res => { scrapJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {

Loading…
Cancel
Save