Browse Source

修改直接上架

hella_online_20240829
niexiting 2 months ago
parent
commit
90f3569ec2
  1. 2
      .env.development
  2. 87
      src/pages/productPutaway/record/productPutawayRecord.vue

2
.env.development

@ -1,4 +1,4 @@
VITE_BASE_URL=http://192.168.0.108:12080/admin-api VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
# 租户配置 # 租户配置

87
src/pages/productPutaway/record/productPutawayRecord.vue

@ -289,55 +289,44 @@
}, },
commit() { commit() {
if (this.toLocationCode == "") {
this.$refs.comMessage.showQuestionMessage('未指定目标库位,系统将按上架策略推荐库位是否继续提交?', res => {
if (res) {
this.commitRecord();
}
});
} else {
this.commitRecord();
}
},
commitRecord() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
// //
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
this.managementList = []; // this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams() // var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => { // getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { // if (res.success) {
this.managementList = res.list; // this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
productPutawayRecordSubmit(params).then(res => { var params = this.setParams()
uni.hideLoading() console.log("提交" + JSON.stringify(params))
if (res.data) { productPutawayRecordSubmit(params).then(res => {
this.showCommitSuccessMessage("提交成功<br>生成制品上架记录<br>" + res.data) uni.hideLoading()
let removeId = []; if (res.data) {
this.detailSource.forEach(r => { this.showCommitSuccessMessage("提交成功<br>生成制品上架记录<br>" + res.data)
removeId.push(r.expectinNumber); let removeId = [];
}) this.detailSource.forEach(r => {
removeId.push(r.expectinNumber);
this.removeRecommendLocation(removeId);
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
}) })
this.removeRecommendLocation(removeId);
} else { } else {
uni.hideLoading(); this.showErrorMessage("提交失败[" + res.msg + "]")
this.showErrorMessage(res.message);
} }
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
}) })
// } else {
// uni.hideLoading();
// this.showErrorMessage(res.message);
// }
} else { } else {
this.showErrorMessage("没有要提交的数据,请先扫描") this.showErrorMessage("没有要提交的数据,请先扫描")
} }
@ -376,8 +365,8 @@
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
var submitItem = deepCopyData(detail) var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, // var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch); // detail.packingNumber, detail.toLocationCode, detail.batch);
submitItem.itemCode = detail.itemCode; submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName; submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1; submitItem.itemDesc1 = detail.package.itemDesc1;
@ -385,14 +374,20 @@
submitItem.inventoryStatus = detail.inventoryStatus; submitItem.inventoryStatus = detail.inventoryStatus;
submitItem.fromPackingNumber = info.packingNumber; // submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber; // submitItem.toPackingNumber = info.packingNumber;
submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber; //submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber //submitItem.toContainerNumber = detail.containerNumber
submitItem.fromBatch = info.batch; //submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch; //submitItem.toBatch = info.batch;
submitItem.fromBatch = detail.package.batch;
submitItem.toBatch = detail.package.batch;
submitItem.fromLocationCode = detail.locationCode; submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = item.toLocationCode; submitItem.toLocationCode = item.toLocationCode;

Loading…
Cancel
Save