diff --git a/mycomponents/balance/balance.vue b/mycomponents/balance/balance.vue
index df890c9c..5c1c33cb 100644
--- a/mycomponents/balance/balance.vue
+++ b/mycomponents/balance/balance.vue
@@ -81,7 +81,7 @@
methods: {
copy(){
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
- var content = "HPQ;V1.0;I"+this.detail.itemCode+";P"+this.detail.packingNumber+";B"+this.detail.batch+";Q"+this.detail.qty
+ var content = "HPQ;V1.0;I"+this.dataContent.itemCode+";P"+this.dataContent.packingNumber+";B"+this.dataContent.batch+";Q"+this.dataContent.qty
this.$copyText(content).then(
res => {
uni.showToast({
@@ -93,7 +93,7 @@
},
copyPro(){
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
- var content = "HMQ;V1.0;I"+this.detail.itemCode+";P"+this.detail.packingNumber+";B"+this.detail.batch+";Q"+this.detail.qty
+ var content = "HMQ;V1.0;I"+this.dataContent.itemCode+";P"+this.dataContent.packingNumber+";B"+this.dataContent.batch+";Q"+this.dataContent.qty
this.$copyText(content).then(
res => {
uni.showToast({
diff --git a/mycomponents/balance/location.vue b/mycomponents/balance/location.vue
index bcdb2dab..486979d1 100644
--- a/mycomponents/balance/location.vue
+++ b/mycomponents/balance/location.vue
@@ -1,6 +1,6 @@
- 库位
+ {{title}}
{{locationCode}}
@@ -17,6 +17,11 @@
type: String,
default: ''
},
+ title: {
+ type: String,
+ default: '库位'
+ },
+
},
}
diff --git a/mycomponents/detail/comDetailCard.vue b/mycomponents/detail/comDetailCard.vue
index e0c4205a..b4f3f7b9 100644
--- a/mycomponents/detail/comDetailCard.vue
+++ b/mycomponents/detail/comDetailCard.vue
@@ -11,14 +11,16 @@
-
+
+
+
@@ -28,10 +30,10 @@
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
+ import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
- getDetailEditRemoveOption,
- getDetailRemoveOption
+ getPurchaseReceiptOption
} from '@/common/array.js';
export default {
@@ -41,6 +43,7 @@
recommend,
balanceQtyEdit,
comMessage,
+ winScanLocation
},
props: {
dataContent: {
@@ -63,6 +66,10 @@
type: Boolean,
default: true
},
+ locationTypeList: {
+ type: Object,
+ default: {}
+ },
},
watch: {
@@ -72,8 +79,7 @@
return {
option: [],
showItem: {},
- editItem: {
- },
+ editItem: {},
detailOptions: [],
scanOptions: []
}
@@ -84,12 +90,8 @@
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
- this.scanOptions = getDetailEditRemoveOption();
- // if (this.dataContent.allowModifyQty == 1) {
- // this.scanOptions = getDetailEditRemoveOption();
- // } else {
- // this.scanOptions = getDetailRemoveOption();
- // }
+ this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
+ .allowModifyLocation)
}
},
@@ -119,7 +121,7 @@
if (res) {
item.scaned = false
item.balance = {}
- item.inventoryStatus = item.RecommendInventoryStatus
+ item.handleQty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
@@ -128,7 +130,12 @@
confirm(qty) {
this.editItem.qty = qty;
this.$emit('updateData')
- }
+ },
+ //扫描源库位
+ getLocation(location, code) {
+ this.locatonItem.toLocationCode =code;
+ this.$emit('updateData')
+ },
}
}
diff --git a/mycomponents/qty/balanceQtyEdit.vue b/mycomponents/qty/balanceQtyEdit.vue
index bfe98e46..8768c247 100644
--- a/mycomponents/qty/balanceQtyEdit.vue
+++ b/mycomponents/qty/balanceQtyEdit.vue
@@ -127,7 +127,10 @@
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = Number(handleQty)
console.log("数量",this.allQty)
+ setTimeout(res=>{
this.$refs.popup.open('bottom')
+ },500)
+
},
diff --git a/mycomponents/recommend/recommend.vue b/mycomponents/recommend/recommend.vue
index e6258c95..e969ccfe 100644
--- a/mycomponents/recommend/recommend.vue
+++ b/mycomponents/recommend/recommend.vue
@@ -4,9 +4,17 @@
-
+
+
+
+
+
+
-
+
@@ -22,8 +22,8 @@
-
+
@@ -62,6 +62,12 @@
type: Object,
default: {}
},
+ locationTypeList: {
+ type: Object,
+ default: {}
+ },
+
+
},
watch: {
diff --git a/pages/purchaseReceipt/job/receiptDetail.vue b/pages/purchaseReceipt/job/receiptDetail.vue
index 78d22b8f..06a05270 100644
--- a/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/pages/purchaseReceipt/job/receiptDetail.vue
@@ -5,7 +5,7 @@
+ @remove="updateData" @updateData="updateData" :locationTypeList ='locationTypeList'>
@@ -246,15 +246,27 @@
},
scanLocationCode(location, code) {
- this.toLocationCode = code
- this.toLocationInfo = location;
+ this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位["+code+"]", res => {
+ this.toLocationCode = code
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.toLocationCode = code
+ })
+ })
+ })
},
- async commit() {
+ commit() {
+ this.scanCount = this.getScanCount();
//校验库位、
if (!this.checkLocation()) {
return
}
+
+ if( this.scanCount==0){
+ this.showErrorMessage("扫描数为0,请先扫描")
+ return;
+ }
console.log("校验通过")
@@ -349,27 +361,25 @@
return isPass = false;
}
//空库位校验
- var isHaveNullLocation = false;
- var nullLocationList = [];
- this.detailSource.forEach(item => {
- item.subList.forEach(detail => {
- if (detail.toLocationCode == null || detail.toLocationCode == "") {
- nullLocationList.push(detail)
- }
- })
- })
-
-
-
- if (nullLocationList.length > 0) {
- //弹出提示,是否把其他的库位都变成默认库位
- this.$refs.comMessage.showQuestionMessage("是否把其他的库位都变成默认库位", res => {
- nullLocationList.forEach(res => {
- res.toLocationCode = this.toLocationCode
- })
- })
- isPass = false;
- }
+ // var isHaveNullLocation = false;
+ // var nullLocationList = [];
+ // this.detailSource.forEach(item => {
+ // item.subList.forEach(detail => {
+ // if (detail.toLocationCode == null || detail.toLocationCode == "") {
+ // nullLocationList.push(detail)
+ // }
+ // })
+ // })
+
+ // if (nullLocationList.length > 0) {
+ // //弹出提示,是否把其他的库位都变成默认库位
+ // this.$refs.comMessage.showQuestionMessage("是否把其他的库位都变成默认库位", res => {
+ // nullLocationList.forEach(res => {
+ // res.toLocationCode = this.toLocationCode
+ // })
+ // })
+ // isPass = false;
+ // }
return isPass;
},
diff --git a/pages/purchaseReturn/job/returnDetail.vue b/pages/purchaseReturn/job/returnDetail.vue
index c55926b8..68ee438f 100644
--- a/pages/purchaseReturn/job/returnDetail.vue
+++ b/pages/purchaseReturn/job/returnDetail.vue
@@ -281,6 +281,11 @@
},
commit() {
+ this.scanCount = getScanCount(this.subList);
+ if (this.scanCount == 0) {
+ this.showErrorMessage("扫描数为0,请先扫描")
+ return;
+ }
//允许部分提交
//扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
@@ -309,7 +314,7 @@
mask: true
});
//如果目标库位等于null,不查询管理模式,否则查询管理模式
- if (this.toLocationCode == null) {
+ if (this.toLocationCode == null||this.toLocationCode == "") {
var params = this.setParams(false)
console.log("提交参数", JSON.stringify(params));
// purchaseReturnJobsubmit( params).then(res => {
@@ -365,23 +370,29 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
+ var subItem = {};
+ Object.assign(subItem, detail)
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
- detail.toPackingNumber = info.packingNumber;;
- detail.toContainerNumber = detail.containerNumber
- detail.toBatch = info.batch;
- detail.toInventoryStatus = detail.inventoryStatus
- detail.toLocationCode = this.toLocationCode
+ subItem.package ="" ;
+ subItem.balance ="" ;
+ subItem.toPackingNumber = info.packingNumber;;
+ subItem.toContainerNumber = subItem.containerNumber
+ subItem.toBatch = info.batch;
+ subItem.toInventoryStatus = subItem.inventoryStatus
+ subItem.toLocationCode = this.toLocationCode
} else {
- detail.toPackingNumber = detail.packingNumber;
- detail.toContainerNumber = detail.containerNumber
- detail.toBatch = detail.toBatch;
- detail.toInventoryStatus = detail.inventoryStatus
- detail.toLocationCode = ""
+ subItem.package ="" ;
+ subItem.balance ="" ;
+ subItem.toPackingNumber = subItem.packingNumber;
+ subItem.toContainerNumber = subItem.containerNumber
+ subItem.toBatch = subItem.toBatch;
+ subItem.toInventoryStatus = subItem.inventoryStatus
+ subItem.toLocationCode = ""
}
- subList.push(detail)
+ subList.push(subItem)
}
})
})
diff --git a/pages/putaway/job/putawayDetail.vue b/pages/putaway/job/putawayDetail.vue
index 9547a21d..2209d995 100644
--- a/pages/putaway/job/putawayDetail.vue
+++ b/pages/putaway/job/putawayDetail.vue
@@ -5,7 +5,8 @@
+ @remove="updateData" @updateData="updateData" @openDetail="openDetail"
+ :locationTypeList='locationTypeList'>
@@ -14,7 +15,7 @@
@@ -40,7 +41,7 @@
import {
getManagementPrecisions,
} from '@/common/balance.js';
-
+
import {
getPutawayJobDetail,
getBasicLocationByCode,
@@ -53,7 +54,7 @@
getCurrDateTime,
getPackingNumberAndBatch,
} from '@/common/basic.js';
-
+
import {
getDirectoryItemArray,
getInventoryStatusName
@@ -71,7 +72,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import putawayDetailInfoPopup from '@/pages/putaway/coms/putawayDetailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
-
+
export default {
components: {
winScanButton,
@@ -163,19 +164,19 @@
});
getPutawayJobDetail(that.id).then(res => {
uni.hideLoading();
- if(res.data==null){
+ if (res.data == null) {
that.showMessage('未获取到详情');
- }else {
+ } else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
-
+
that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.getLocationInfo(that.toLocationCode);
-
+
} else {
that.showMessage('列表数据为0');
}
@@ -284,7 +285,11 @@
']不一致,是否继续上架?', res => {
if (res) {
itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.label.qty);
+ itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty);
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = result.balance.qty;
+ itemDetail.balance.stdPackQty =result.package.stdPackQty
+ itemDetail.balance.stdPackUnit =result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
@@ -292,7 +297,11 @@
});
} else {
itemDetail.scaned = true;
- itemDetail.handleQty = Number(result.label.qty);
+ itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty);
+ itemDetail.balance = result.balance;
+ itemDetail.balance.balanceQty = result.balance.qty;
+ itemDetail.balance.stdPackQty =result.package.stdPackQty
+ itemDetail.balance.stdPackUnit =result.package.stdPackUnit
this.calcHandleQty();
}
}
@@ -304,101 +313,165 @@
},
scanLocationCode(location, code) {
- this.toLocationCode = code
- this.toLocationInfo = location;
+ this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
+ this.toLocationCode = code
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.toLocationCode = code
+ })
+ })
+ })
},
openDetail(item) {
this.$refs.jobDetailPopup.openPopup(item)
},
- commit() {
+ checkLocation() {
+ var isPass = true;
if (this.toLocationCode == "") {
- this.showMessage("请先选择目标库位")
+ this.showMessageHint('请扫描收货库位', callback => {
+ this.$refs.comScanLocation.showLocation();
+ })
+
+ return isPass = false;
+ }
+ return isPass;
+ },
+
+ showMessageHint(hint, callback) {
+ this.$refs.comMessage.showErrorMessage(hint, res => {
+ if (res) {
+ callback()
+ }
+ });
+ },
+
+ commit() {
+ this.scanCount = getScanCount(this.subList);
+ if (!this.checkLocation()) {
+ return
+ }
+ if (this.scanCount == 0) {
+ this.showErrorMessage("扫描数为0,请先扫描")
return;
}
- //允许部分提交
- if (this.jobContent.allowPartialComplete == "TRUE") {
+ //扫描数量和任务数量相等,直接提交
+ if (this.scanCount == this.subList.length) {
this.submitJob();
- } else {
- this.scanCount = getScanCount(this.subList);
- if (this.scanCount < this.subList.length) {
+ } else if (this.scanCount < this.subList.length) {
+ //扫描数量小于任务数量,判断是否允许部分提交
+ if (this.jobContent.allowPartialComplete == "TRUE") {
+ //提交
+ this.submitJob();
+ } else {
+ //不允许部分提交,提示
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount +
- "]箱总共[" + this.subList.length + "]箱", res => {
+ "]箱总共[" + this
+ .subList.length + "]箱", res => {
if (res) {
this.openScanPopup();
}
});
- } else {
- this.submitJob();
}
}
},
- async submitJob() {
+ submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
- var itemCodes = []
- this.detailSource.forEach(item => {
- itemCodes.push(item.itemCode)
- })
- var param = {
- itemCode: itemCodes,
- locationCode: this.toLocationCode
+ //如果目标库位等于null,不查询管理模式,否则查询管理模式
+ if (this.toLocationCode == null || this.toLocationCode == "") {
+ var params = this.setParams(false)
+ console.log("提交参数", JSON.stringify(params));
+ // putawayJobSubmit( params).then(res => {
+ // if (res.data) {
+ // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, )
+ // } else {
+ // this.showErrorMessage("提交失败"+res.msg)
+ // }
+ // uni.hideLoading()
+ // }).catch(error => {
+ // uni.hideLoading()
+ // this.showErrorMessage(error)
+ // })
+
+ } else {
+ var itemCodes = []
+ this.detailSource.forEach(item => {
+ itemCodes.push(item.itemCode)
+ })
+ //获取管理模式,封装参数
+ getManagementPrecisions(itemCodes, this.toLocationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ var params = this.setParams(true)
+ console.log("提交参数", JSON.stringify(params));
+
+ // putawayJobSubmit( params).then(res => {
+ // if (res.data) {
+ // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, )
+ // } else {
+ // this.showErrorMessage("提交失败"+res.msg)
+ // }
+ // uni.hideLoading()
+ // }).catch(error => {
+ // uni.hideLoading()
+ // this.showErrorMessage(error)
+ // })
+ } else {
+ uni.hideLoading();
+ this.showErrorMessage(res.message);
+ }
+ });
}
-
- getManagementPrecisions(itemCodes, this.toLocationCode, res => {
- if (res.success) {
- this.managementList = res.list;
- var params = this.setParams()
- console.log("提交参数",JSON.stringify(params));
-
- putawayJobSubmit(this.id, params).then(res => {
- uni.hideLoading()
- if (res.data) {
- var hint = res.data.Number;
- this.showCommitSuccessMessage("提交成功" + hint)
-
- } else {
- this.showErrorMessage("提交失败")
- }
- }).catch(error => {
- uni.hideLoading()
- this.showErrorMessage(error)
- })
- } else {
- uni.hideLoading();
- this.showErrorMessage(res.message);
- }
- });
-
+
},
- setParams() {
+ setParams(queryModel) {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
-
+
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
- var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
- detail.packingNumber, detail.batch);
- detail.toPackingNumber =info.packingNumber;
- detail.toBatch =info.batch;
- subList.push(detail)
+ var subItem = {};
+ Object.assign(subItem, detail)
+ if (queryModel) {
+ var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
+ detail.packingNumber, detail.batch);
+ subItem.package ="" ;
+ subItem.balance ="" ;
+ subItem.toPackingNumber = info.packingNumber;;
+ subItem.toContainerNumber = subItem.containerNumber
+ subItem.toBatch = info.batch;
+ subItem.toInventoryStatus = subItem.inventoryStatus
+ subItem.toLocationCode = this.toLocationCode
+ } else {
+ subItem.package ="" ;
+ subItem.balance ="" ;
+ subItem.toPackingNumber = subItem.packingNumber;
+ subItem.toContainerNumber = subItem.containerNumber
+ subItem.toBatch = subItem.toBatch;
+ subItem.toInventoryStatus = subItem.inventoryStatus
+ subItem.toLocationCode = ""
+ }
+
+ subList.push(subItem)
}
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
- this.jobContent.creator =creator;
+ this.jobContent.creator = creator;
return this.jobContent;
},
+
showMessage(message) {
setTimeout(r => {
diff --git a/pages/putaway/record/putawayRecord.vue b/pages/putaway/record/putawayRecord.vue
index 6313686d..0d2f4a12 100644
--- a/pages/putaway/record/putawayRecord.vue
+++ b/pages/putaway/record/putawayRecord.vue
@@ -17,7 +17,7 @@
-