Browse Source

修改上架记录

wms3.0_pda
niexiting 11 months ago
parent
commit
41bc8fd0d4
  1. 60
      pages/putaway/record/putawayRecord.vue
  2. 2
      static/config.json

60
pages/putaway/record/putawayRecord.vue

@ -97,14 +97,14 @@
detailSource: [], // detailSource: [], //
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "",
fromlocationTypeList: [], fromlocationTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
showToLoaction: true, showToLoaction: true,
recommendLocationList: [] // recommendLocationList: [], //
fromWarehouseCode: '' //
}; };
}, },
onLoad(option) { onLoad(option) {
@ -143,12 +143,16 @@
return res return res
} }
}) })
if (this.fromWarehouseCode == '') {
this.fromWarehouseCode = balance.warehouseCode;
}
if (item == undefined) { if (item == undefined) {
// //
this.getRecommendLocation(balance, pack, toLocationCode => { this.getRecommendLocation(balance, pack, toLocation => {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.toLocationCode = toLocationCode; newDetail.toLocationCode = toLocation.code;
newDetail.toWarehouseCode = toLocation.warehouseCode;
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
}) })
@ -163,9 +167,10 @@
} }
}) })
if (detail == undefined) { if (detail == undefined) {
this.getRecommendLocation(balance, pack, toLocationCode => { this.getRecommendLocation(balance, pack, toLocation => {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
newDetail.toLocationCode = toLocationCode; newDetail.toLocationCode = toLocation.code;
newDetail.toWarehouseCode = toLocation.warehouseCode;
item.subList.push(newDetail); item.subList.push(newDetail);
}); });
} else { } else {
@ -193,14 +198,14 @@
itemCode: balance.itemCode, itemCode: balance.itemCode,
locationCode: res.data.code locationCode: res.data.code
}) })
callback(res.data.code); callback(res.data);
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} else { } else {
callback(recommend.locationCode); callback(recommend);
} }
}, },
@ -262,19 +267,17 @@
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
}, },
scanLocationCode(location, code) { // scanLocationCode(location, code) {
this.toLocationCode = code // this.toLocationCode = code
this.toLocationCode = location; // this.toLocationCode = location;
}, // },
commit() { commit() {
// uni.showLoading({
title: "提交中....",
// uni.showLoading({ mask: true
// title: "....", });
// mask: true
// });
// //
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource); let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource);
@ -301,7 +304,6 @@
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
} }
}); });
}, },
@ -337,8 +339,10 @@
}, },
setRecordParams() { setRecordParams() {
var subList = [] this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.fromWarehouseCode;
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
var subList = []
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
@ -354,8 +358,11 @@
} }
}) })
}) })
if (subList.length > 0) {
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode;
}
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.creator = creator; debugger;
return this.dataContent; return this.dataContent;
}, },
@ -404,8 +411,7 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = ''; this.clear();
}) })
}, },
@ -417,6 +423,14 @@
this.detailSource.splice(i, 1) this.detailSource.splice(i, 1)
} }
} }
},
clear() {
this.fromLocationInfo = {};
this.fromLocationCode = '';
this.fromWarehouseCode = '';
this.toWarehouseCode = '';
this.detailSource = [];
} }
} }
} }

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api", "value": "http://192.168.0.230:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save