diff --git a/.env.development b/.env.development
index 9bf7280a..faacbb33 100644
--- a/.env.development
+++ b/.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"
\ No newline at end of file
diff --git a/.env.hella13 b/.env.hella13
index 9a603299..97e83b15 100644
--- a/.env.hella13
+++ b/.env.hella13
@@ -9,3 +9,6 @@ VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/.env.hella14 b/.env.hella14
index 91cea3ff..441178e5 100644
--- a/.env.hella14
+++ b/.env.hella14
@@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/.env.hella15 b/.env.hella15
index b40ff86e..f7c9ff07 100644
--- a/.env.hella15
+++ b/.env.hella15
@@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/.env.hella16 b/.env.hella16
index 406618cf..c84efd8f 100644
--- a/.env.hella16
+++ b/.env.hella16
@@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/.env.hella8 b/.env.hella8
index f6803774..8851bd7c 100644
--- a/.env.hella8
+++ b/.env.hella8
@@ -9,4 +9,7 @@ VITE_isDevelopment=false
# 积木报表请求路径
-VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
+VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/.env.hella9 b/.env.hella9
index fc674a67..36f3d239 100644
--- a/.env.hella9
+++ b/.env.hella9
@@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/.env.production b/.env.production
index f6803774..49336718 100644
--- a/.env.production
+++ b/.env.production
@@ -10,3 +10,6 @@ VITE_isDevelopment=false
# 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
+
+# 项目管理模式 批次货/包装
+VITE_MANAGE_MODEL="BY_BATCH"
\ No newline at end of file
diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue
index d0144453..c712871e 100644
--- a/src/mycomponents/record/recordComDetailCard.vue
+++ b/src/mycomponents/record/recordComDetailCard.vue
@@ -32,7 +32,7 @@
-
+
@@ -121,7 +121,12 @@
allowModifyLocation: {
type: Boolean,
default: false
- }
+ },
+ queryBalance: {
+ type: Boolean,
+ default: true
+ },
+
},
watch: {
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index 9fa42e5e..fb0f46e9 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -76,8 +76,11 @@
createItemInfo,
createDetailInfo,
calcHandleQty,
- calcHandleQtyAdd
} from '@/common/record.js';
+
+ import {
+ calc
+ } from '@/common/calc.js';
export default {
components: {
@@ -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) {
diff --git a/src/pages/inventoryMove/record/okToHoldRecord.vue b/src/pages/inventoryMove/record/okToHoldRecord.vue
index e3b0a138..e025da9a 100644
--- a/src/pages/inventoryMove/record/okToHoldRecord.vue
+++ b/src/pages/inventoryMove/record/okToHoldRecord.vue
@@ -1,60 +1,28 @@
-
+
\ No newline at end of file
+
diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue
index 1ea5eab1..9ca0a5ce 100644
--- a/src/pages/putaway/record/putawayRecord.vue
+++ b/src/pages/putaway/record/putawayRecord.vue
@@ -91,7 +91,6 @@
createItemInfo,
createDetailInfo,
calcHandleQty,
- calcHandleQtyAdd
} from '@/common/record.js';
import {
@@ -99,6 +98,10 @@
getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js';
+
+ import {
+ calc
+ } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.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){
diff --git a/src/pages/scrap/record/scrapRecord.vue b/src/pages/scrap/record/scrapRecord.vue
index a5b8f7c9..1c1eba10 100644
--- a/src/pages/scrap/record/scrapRecord.vue
+++ b/src/pages/scrap/record/scrapRecord.vue
@@ -17,7 +17,13 @@
-
+
+
@@ -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) {
diff --git a/src/pages/transfer/record/deliverRecord.vue b/src/pages/transfer/record/deliverRecord.vue
index 6fe03d5a..f2374fe7 100644
--- a/src/pages/transfer/record/deliverRecord.vue
+++ b/src/pages/transfer/record/deliverRecord.vue
@@ -8,7 +8,17 @@
-
+
+
+
@@ -32,7 +42,7 @@
-
+
@@ -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,7 +86,8 @@
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: {
winScanButton,
@@ -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 => {
diff --git a/src/pages/transfer/record/receiptRecord.vue b/src/pages/transfer/record/receiptRecord.vue
index 61b9ee37..7f33326b 100644
--- a/src/pages/transfer/record/receiptRecord.vue
+++ b/src/pages/transfer/record/receiptRecord.vue
@@ -10,6 +10,9 @@
@@ -63,6 +66,10 @@
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
+
+ import {
+ calc
+ } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.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 => {
@@ -155,6 +174,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 => {
@@ -339,9 +389,6 @@
});
},
- showScanMessage(message) {
- this.$refs.comMessage.showScanMessage(message);
- },
afterCloseMessage() {
this.scanPopupGetFocus();
diff --git a/src/pages/unPlanned/record/issueRecord.vue b/src/pages/unPlanned/record/issueRecord.vue
index 42ea5f8e..27f0d6a9 100644
--- a/src/pages/unPlanned/record/issueRecord.vue
+++ b/src/pages/unPlanned/record/issueRecord.vue
@@ -7,11 +7,17 @@
+ placeholder="请选择出库原因" popup-title="出库原因" :localdata="reasonList" @change="reasonChange">
-
+
+
@@ -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,8 +71,12 @@
import {
createItemInfo,
createDetailInfo,
- calcHandleQty
+ calcHandleQty,
} from '@/common/record.js';
+
+ import {
+ calc
+ } from '@/common/calc.js';
import {
goHome,
@@ -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)
+ }
},
- getDataSource(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)
+
+ },
+
+ setData(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
@@ -177,9 +234,9 @@
this.calcHandleQty();
},
-
- packGetFocus(){
- if(this.$refs.scanPopup){
+
+ packGetFocus() {
+ if (this.$refs.scanPopup) {
this.$refs.scanPopup.packGetFocus()
}
},
@@ -216,20 +273,20 @@
this.showErrorMessage("请选择出库原因")
return;
}
- var params =this.setParams()
- console.log("提交" + JSON.stringify(params))
- unPlannedIssueRecordSubmit(params).then(res => {
- uni.hideLoading()
- if (res.data) {
- this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data )
- } else {
- this.showErrorMessage("提交失败[" + res.msg + "]")
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
-
+ var params = this.setParams()
+ console.log("提交" + JSON.stringify(params))
+ unPlannedIssueRecordSubmit(params).then(res => {
+ uni.hideLoading()
+ if (res.data) {
+ this.showCommitSuccessMessage("提交成功\n生成计划外出库记录\n" + res.data)
+ } else {
+ this.showErrorMessage("提交失败[" + res.msg + "]")
+ }
+ }).catch(error => {
+ uni.hideLoading()
+ this.showErrorMessage(error)
+ })
+
},
setParams() {
var subList = []
@@ -242,24 +299,24 @@
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
-
+
submitItem.inventoryStatus = detail.inventoryStatus;
-
+
submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber;
-
+
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
-
+
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
-
+
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = "";
-
+
submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty;
- submitItem.package ="";
+ submitItem.package = "";
submitItem.detailDataType = 1;
subList.push(submitItem)
}
@@ -270,7 +327,7 @@
this.dataContent.creator = creator;
return this.dataContent;
},
-
+
reasonChange(e) {
if (e.detail.value.length == 0) {
this.reasonCode = ""
@@ -282,20 +339,20 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
- this.clearData();
+ this.clearData();
})
},
- clearData(){
+ clearData() {
this.reasonCode = ""
this.reasonText = "";
this.detailSource = [];
- this.managementList =[];
- this.dataContent ={}
+ this.managementList = [];
+ this.dataContent = {}
}
-
+
}
}
+
\ No newline at end of file
diff --git a/src/pages/unPlanned/record/receiptRecord.vue b/src/pages/unPlanned/record/receiptRecord.vue
index 8529bcd0..efeaf748 100644
--- a/src/pages/unPlanned/record/receiptRecord.vue
+++ b/src/pages/unPlanned/record/receiptRecord.vue
@@ -14,8 +14,11 @@
-
+
@@ -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 => {
@@ -153,7 +168,7 @@
return r;
}
})
-
+
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail);
@@ -162,11 +177,45 @@
if (detail.scaned) {
this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描")
}
-
+
+ }
+ }
+ 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(){