Browse Source

修改直接采购上架,计划外出入库,物料转隔离,库存转移, 报废出库,调拨出入库

intex_online20241111
lijuncheng 4 weeks ago
parent
commit
0bf1a07215
  1. 8
      .env.development
  2. 3
      .env.hella13
  3. 3
      .env.hella14
  4. 3
      .env.hella15
  5. 3
      .env.hella16
  6. 3
      .env.hella8
  7. 3
      .env.hella9
  8. 3
      .env.production
  9. 9
      src/mycomponents/record/recordComDetailCard.vue
  10. 11
      src/pages/inventoryMove/coms/comMoveRecord.vue
  11. 48
      src/pages/inventoryMove/record/okToHoldRecord.vue
  12. 19
      src/pages/putaway/record/putawayRecord.vue
  13. 66
      src/pages/scrap/record/scrapRecord.vue
  14. 78
      src/pages/transfer/record/deliverRecord.vue
  15. 55
      src/pages/transfer/record/receiptRecord.vue
  16. 93
      src/pages/unPlanned/record/issueRecord.vue
  17. 57
      src/pages/unPlanned/record/receiptRecord.vue

8
.env.development

@ -1,11 +1,15 @@
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api
# VITE_BASE_URL=http://localhost:12080/admin-api
VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]'
VITE_TENANT='[{"text":"英泰","value":1},{"text":"长春2379","value":3}]'
# 是否是测试环境
VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella13

@ -9,3 +9,6 @@ VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella14

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella15

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella16

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella8

@ -10,3 +10,6 @@ VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella9

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.production

@ -10,3 +10,6 @@ VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

9
src/mycomponents/record/recordComDetailCard.vue

@ -32,7 +32,7 @@
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" ></balance-qty-edit>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :queryBalance="queryBalance" ></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
@ -121,7 +121,12 @@
allowModifyLocation: {
type: Boolean,
default: false
}
},
queryBalance: {
type: Boolean,
default: true
},
},
watch: {

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

@ -76,9 +76,12 @@
createItemInfo,
createDetailInfo,
calcHandleQty,
calcHandleQtyAdd
} from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
export default {
components: {
comEmptyView,
@ -330,7 +333,6 @@
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = 0
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@ -355,15 +357,14 @@
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
newDetail.handleQty = 0
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
calcHandleQtyAdd(this.detailSource,result.label);
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
if (this.$refs.scanPopup) {

48
src/pages/inventoryMove/record/okToHoldRecord.vue

@ -1,58 +1,26 @@
<template>
<view class="page-wraper">
<okToHoldRecordScan :formField='formField' :allData='data' :labelWidth='140' :formItemBorder='true'></okToHoldRecordScan>
<comMoveRecord :myTitle="title" businessTypeCode='OkToHold' > </comMoveRecord>
</view>
</template>
<script>
import okToHoldRecordScan from '@/pages/inventoryMove/coms/okToHoldRecordScan.vue'
// import {fromLocationField} from '@/api/data.js'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
export default {
components: {
okToHoldRecordScan
comMoveRecord
},
data() {
return {
formField: [{
label: '来源库位',
field: 'fromLocationCode',
form:{
type:'text',
}
},{
label: '零件',
field: 'itemCode',
form:{
type:'select',
dictType:[{
}]
}
},{
label: '批次',
field: 'batch',
form:{
type:'select',
}
},{
label: '数量',
field: 'qty',
form:{
type:'select',
}
}],
data:{
fromLocationCode:'12122',
itemCode:'233',
batch:'111',
qty:22,
}
title:''
}
},
onLoad(option) {
onLoad(option){
this.title = option.title
},
methods: {}
methods: {
}
}
</script>

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

@ -91,7 +91,6 @@
createItemInfo,
createDetailInfo,
calcHandleQty,
calcHandleQtyAdd
} from '@/common/record.js';
import {
@ -100,6 +99,10 @@
getPrecisionStrategyParams
} from '@/common/balance.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@ -170,7 +173,7 @@
mounted() {},
methods: {
getScanResult(result,managementType) {
getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result)
@ -206,11 +209,8 @@
newDetail.poNumber=poNumber;
newDetail.supplierCode=supplierCode;
newDetail.fromInventoryStatus = balance.inventoryStatus;
newDetail.handleQty =0;
newDetail.balanceQty =result.balance.qty;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
calcHandleQtyAdd(this.detailSource,result.label);
})
} else {
@ -231,24 +231,19 @@
newDetail.poNumber=poNumber;
newDetail.supplierCode=supplierCode;
newDetail.fromInventoryStatus = balance.inventoryStatus;
newDetail.handleQty =0;
newDetail.balanceQty =result.balance.qty;
if(item.subList&&item.subList.length>0){
if(item.subList[0].batch!=newDetail.batch){
this.showErrorMessage("扫描的批次是["+newDetail.batch+"],请扫描["+item.subList[0].batch+"的批次的箱码")
}
}else {
item.subList.push(newDetail);
calcHandleQtyAdd(this.detailSource,result.label);
}
});
} else {
if (detail.scaned == true) {
calcHandleQtyAdd(this.detailSource,result.label);
// this.showErrorMessage( "[" + balance.batch + "]")
}
detail.handleQty =calc.add(detail.handleQty, result.label.handleQty)
}
}
this.calcHandleQty(this.detailSource)
},
setData(result){

66
src/pages/scrap/record/scrapRecord.vue

@ -17,7 +17,13 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
<record-com-detail-card-batch :dataContent="item" :index="index" :isShowFromLocation="true"
:isShowParentToLocation="false"
@removeItem="removeItem(index,item)" :isShowToLocation="false" @updateData="updateData"
@removePack="removePack"
v-if="managementType == 'BY_BATCH'||managementType =='BY_QUANTITY' ">
</record-com-detail-card-batch>
<record-com-detail-card v-else :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
:isShowToLocation="false"
@removePack="removePack">
@ -59,6 +65,10 @@
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc'
import {
getInventoryStatusDesc,
getDirectoryItemArray,
@ -69,7 +79,8 @@
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
calcHandleQty,
calcHandleQtyAdd
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -78,6 +89,7 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue'
export default {
components: {
@ -86,7 +98,8 @@
comBlankView,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard
recordComDetailCard,
recordComDetailCardBatch
},
data() {
return {
@ -102,6 +115,7 @@
businessType: {},
reasonList: [],
reasonText: "",
managementType:""
};
},
onLoad(option) {
@ -137,7 +151,50 @@
},
methods: {
getScanResult(result) {
getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
console.log("模式"+managementTypeParams)
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setDataBatch(result){
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty(this.detailSource)
},
setData(result){
let balance = result.balance;
let label = result.label;
let pack = result.package;
@ -170,7 +227,6 @@
}
}
this.calcHandleQty();
},
showErrorMessage(message) {

78
src/pages/transfer/record/deliverRecord.vue

@ -8,7 +8,17 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
<record-com-detail-card-batch :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowModifedLocation="false"
:isShowParentToLocation="false"
@updateData="updateData"
@editLocation="showScanToLocation"
@removePack="removePack"
v-if="managementType == 'BY_BATCH'||managementType =='BY_QUANTITY' ">
</record-com-detail-card-batch>
<record-com-detail-card v-else :dataContent="item" :index="index" :isShowLocation="true"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -32,7 +42,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation='false'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
@ -63,8 +73,11 @@
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
calcHandleQty,
} from '@/common/record.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -73,6 +86,7 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue'
export default {
components: {
@ -82,7 +96,8 @@
comBlankView,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard
recordComDetailCard,
recordComDetailCardBatch
},
data() {
return {
@ -98,7 +113,8 @@
businessType: {},
managementList: [],
dataContent: {},
toWarehouseCode: ''
toWarehouseCode: '',
managementType:""
};
},
@ -131,7 +147,17 @@
onPullDownRefresh() {},
methods: {
getScanResult(result) {
getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setData(result){
let balance = result.balance;
let label = result.label;
let pack = result.package;
@ -166,6 +192,46 @@
}
this.calcHandleQty();
},
setDataBatch(result){
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.inventoryStatus = "OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
}else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty(this.detailSource)
},
showScanToLocation(item) {
this.editItem = item;
setTimeout(r => {
this.$refs.scanToLocationCode.openScanPopup();
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {

55
src/pages/transfer/record/receiptRecord.vue

@ -10,6 +10,9 @@
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowFromLocation="false"
:isShowToLocation="false"
:isShowParentToLocation="false"
:allowModifyQty="true"
:queryBalance="false"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
@ -64,6 +67,10 @@
calcHandleQty
} from '@/common/record.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@ -90,7 +97,8 @@
businessType: {},
managementList: [],
dataContent: {},
toWarehouseCode: ''
toWarehouseCode: '',
managementType:import.meta.env.VITE_MANAGE_MODEL
};
},
@ -124,6 +132,17 @@
methods: {
getScanResult(result) {
var managementTypeParams =this.managementType
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setData(result){
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
@ -156,6 +175,37 @@
this.calcHandleQty();
},
setDataBatch(result){
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(label, pack);
let newDetail = createDetailInfo(label, pack); //
newDetail.inventoryStatus = "OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(label, pack);
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -339,9 +389,6 @@
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();

93
src/pages/unPlanned/record/issueRecord.vue

@ -11,7 +11,13 @@
</uni-data-picker>
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index"
<record-com-detail-card-batch :dataContent="item" :index="index" :isShowFromLocation="false"
:isShowParentToLocation="false"
@removeItem="removeItem(index,item)" :isShowToLocation="false" @updateData="updateData"
@removePack="removePack"
v-if="managementType == 'BY_BATCH'||managementType =='BY_QUANTITY' ">
</record-com-detail-card-batch>
<record-com-detail-card v-else :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" :isShowLocation="true"
@removePack="removePack" :isShowToLocation="false">
</record-com-detail-card>
@ -48,6 +54,7 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue'
import {
unPlannedIssueRecordSubmit
} from '@/api/request2.js';
@ -64,9 +71,13 @@
import {
createItemInfo,
createDetailInfo,
calcHandleQty
calcHandleQty,
} from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
deepCopyData
@ -79,7 +90,8 @@
comBlankView,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard
recordComDetailCard,
recordComDetailCardBatch
},
props: {},
data() {
@ -91,9 +103,11 @@
businessType: {}, //
detailSource: [], //
reasonText: "",
reasonCode:"",
reasonCode: "",
reasonList: [],
dataContent:{}
dataContent: {},
managementType:""
}
},
@ -111,8 +125,7 @@
});
},
onLoad(option) {
},
onLoad(option) {},
methods: {
openScanPopup() {
@ -135,11 +148,55 @@
this.fromLocationCode = location.code;
this.openScanPopup();
},
getScanResult(result) {
this.getDataSource(result)
getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
console.log(managementTypeParams)
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setDataBatch(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
// newDetail.inventoryStatus ="OK";
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.packGetFocus()
} else {
var detail = item.subList.find(r => {
if (r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
this.packGetFocus()
}else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty(this.detailSource)
},
getDataSource(result) {
setData(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
@ -178,8 +235,8 @@
},
packGetFocus(){
if(this.$refs.scanPopup){
packGetFocus() {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packGetFocus()
}
},
@ -216,12 +273,12 @@
this.showErrorMessage("请选择出库原因")
return;
}
var params =this.setParams()
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
unPlannedIssueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data )
this.showCommitSuccessMessage("提交成功\n生成计划外出库记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -259,7 +316,7 @@
submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty;
submitItem.package ="";
submitItem.package = "";
submitItem.detailDataType = 1;
subList.push(submitItem)
}
@ -285,12 +342,12 @@
this.clearData();
})
},
clearData(){
clearData() {
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
this.managementList =[];
this.dataContent ={}
this.managementList = [];
this.dataContent = {}
}
}

57
src/pages/unPlanned/record/receiptRecord.vue

@ -14,8 +14,11 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-receipt-record :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData" :isShowLocation="false" @removePack="removePack">
<com-receipt-record
:dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData"
:queryBalance="false"
:isShowLocation="false" @removePack="removePack">
</com-receipt-record>
</view>
<view class='split_line'></view>
@ -105,7 +108,8 @@
reasonList: [],
dataContent: {},
managementList: [],
toLocationAreaTypeList:[]
toLocationAreaTypeList:[],
managementType:import.meta.env.VITE_MANAGE_MODEL
}
},
@ -122,7 +126,8 @@
});
},
onLoad(option) {},
onLoad(option) {
},
methods: {
openScanPopup() {
@ -132,6 +137,16 @@
this.toLocationCode = code;
},
getScanResult(result) {
var managementTypeParams =this.managementType
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setData(result){
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
@ -166,7 +181,41 @@
}
}
this.calcHandleQty();
},
setDataBatch(result){
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.getfocus()
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == pack.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail);
this.getfocus()
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty();
},
getfocus(){

Loading…
Cancel
Save