Browse Source

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

intex_online20241111
lijuncheng 4 weeks ago
parent
commit
26cca44bf7
  1. 4
      src/pages/putaway/record/putawayRecord.vue
  2. 71
      src/pages/unPlanned/job/issueJobDetail.vue
  3. 61
      src/pages/unPlanned/job/receiptJobDetail.vue

4
src/pages/putaway/record/putawayRecord.vue

@ -100,9 +100,7 @@
getPrecisionStrategyParams getPrecisionStrategyParams
} from '@/common/balance.js'; } from '@/common/balance.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'

71
src/pages/unPlanned/job/issueJobDetail.vue

@ -250,6 +250,13 @@
}, },
getScanResult(result) { getScanResult(result) {
if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setDataBatch(result){
try { try {
var packingNumber = result.balance.packingNumber; var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch; var batch = result.balance.batch;
@ -258,13 +265,12 @@
var locationCode = result.balance.locationCode; var locationCode = result.balance.locationCode;
var inventoryStatus = result.balance.inventoryStatus; var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) { if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.subList.find(r => { var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber && return r.batch == batch &&
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode&& r.fromLocationCode == result.fromLocationCode&&
r.isRecommend==false r.isRecommend==false
}) })
@ -273,7 +279,7 @@
itemCode:itemCode, itemCode:itemCode,
packingNumber:packingNumber, packingNumber:packingNumber,
batch:batch, batch:batch,
handleQty:detail.qty<Number(result.balance.qty)?detail.qty:Number(result.balance.qty), handleQty:Number(result.label.qty),
qty:detail.qty, qty:detail.qty,
fromLocationCode:locationCode, fromLocationCode:locationCode,
inventoryStatus:inventoryStatus, inventoryStatus:inventoryStatus,
@ -290,8 +296,9 @@
this.calcHandleQty(); this.calcHandleQty();
} else { } else {
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty));
.fromLocationCode + "】已经扫描") // this.showErrorMessage("" + packingNumber + "," + batch + "" + result
// .fromLocationCode + "")
} }
} }
} }
@ -299,7 +306,57 @@
this.showMessage(e.message) this.showMessage(e.message)
} }
}, },
setData(result){
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 = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode&&
r.isRecommend==false
})
if (itemDetail == undefined) {
var newAdd = {
itemCode:itemCode,
packingNumber:packingNumber,
batch:batch,
handleQty:detail.qty<Number(result.balance.qty)?detail.qty:Number(result.balance.qty),
qty:detail.qty,
fromLocationCode:locationCode,
inventoryStatus:inventoryStatus,
toInventoryStatus:inventoryStatus,
balance:result.balance,
isRecommend:false,
isNewAdd:"newAdd"
}
newAdd.balance.balanceQty = Number(result.balance.qty);
newAdd.balance.packQty = Number(result.package.packQty)
newAdd.balance.packUnit = result.package.packUnit
newAdd.scaned = true;
detail.subList.push(newAdd)
this.calcHandleQty();
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】已经扫描")
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
commit() { commit() {
var scanCount=0; var scanCount=0;
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {

61
src/pages/unPlanned/job/receiptJobDetail.vue

@ -12,13 +12,9 @@
<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="">
<comReceiptDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comReceiptDetailCardBatch>
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-else> :locationAreaTypeList='toLocationAreaTypeList'>
</com-receipt-detail-card> </com-receipt-detail-card>
</view> </view>
<view class='split_line'></view> <view class='split_line'></view>
@ -70,12 +66,15 @@
calcHandleQty, calcHandleQty,
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 locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue' import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue'
import comReceiptDetailCardBatch from '@/pages/unPlanned/coms/comReceiptDetailCardBatch.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
export default { export default {
@ -84,7 +83,6 @@
winScanButton, winScanButton,
winScanPack, winScanPack,
comReceiptDetailCard, comReceiptDetailCard,
comReceiptDetailCardBatch,
locationCompare, locationCompare,
jobTop jobTop
}, },
@ -229,6 +227,14 @@
getScanResult(result) { getScanResult(result) {
if(import.meta.env.VITE_MANAGE_MODEL == 'BY_BATCH'){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setDataBatch(result){
try { try {
var packingNumber = result.label.packingNumber; var packingNumber = result.label.packingNumber;
var batch = result.label.batch; var batch = result.label.batch;
@ -238,7 +244,42 @@
if (detail == undefined) { if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
var itemDetail = detail.subList.find(r => r.batch == batch);
if (itemDetail == undefined) {
this.showErrorMessage("批次【" + batch + "】" + "不在列表中")
} else {
if (itemDetail.scaned) {
// this.showErrorMessage("" + packingNumber + "," + batch + "" + "")
itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty));
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail
.toLocationCode;
itemDetail.packQty = result.package.packQty
itemDetail.labelQty = Number(result.label.qty);
this.continueScan()
}
}
calcHandleQty(this.detailSource);
}
} catch (e) {
this.showErrorMessage(e.message)
}
},
setData(result){
try {
var packingNumber = result.label.packingNumber;
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 {
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch); var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) { if (itemDetail == undefined) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "不在列表中") this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】" + "不在列表中")
@ -257,12 +298,11 @@
} }
} }
} }
} catch (e) { } catch (e) {
this.showErrorMessage(e.message) this.showErrorMessage(e.message)
} }
}, },
commit() { commit() {
this.scanCount = getScanCount(this.subList); this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) { if (this.scanCount == 0) {
@ -326,6 +366,7 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
return
getManagementPrecisions(itemCodes, this.toLocationCode, res => { getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { if (res.success) {

Loading…
Cancel
Save