Browse Source

修改直接退货

wms3.0_pda
聂喜婷 1 year ago
parent
commit
751d670a85
  1. 95
      pages/purchaseReturn/record/returnRecord.vue
  2. 5
      static/config.json

95
pages/purchaseReturn/record/returnRecord.vue

@ -89,7 +89,7 @@
businessType: {}, // businessType: {}, //
poNumber: '', poNumber: '',
fromType: "", fromType: "",
dataContent : {} dataContent: {}
}; };
}, },
@ -223,6 +223,7 @@
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
//
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
var params = this.setRequestParams(); var params = this.setRequestParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
@ -231,7 +232,7 @@
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购退货申请" + res.data, ) this.showCommitSuccessMessage("提交成功<br>生成采购退货申请" + res.data, )
} else { } else {
this.showErrorMessage("提交失败"+res.msg) this.showErrorMessage("提交失败" + res.msg)
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
@ -239,34 +240,25 @@
}) })
} else { } else {
var itemCodes = [] //
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
//退
// //
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) { var params = this.setRecordParams(true)
this.managementList = res.list; console.log("提交参数", JSON.stringify(params));
var params = this.setRecordParams(true)
console.log("提交参数", JSON.stringify(params)); purchaseReturnRecordSubmit(params).then(res => {
uni.hideLoading()
// purchaseReturnRecordSubmit(params).then(res => { if (res.data) {
// uni.hideLoading() this.showCommitSuccessMessage("提交成功<br>生成采购退货记录" + res.data)
// if (res.data) {
// this.showCommitSuccessMessage("<br>退" + res.data )
// } else {
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else { } else {
uni.hideLoading(); this.showErrorMessage("提交失败" + res.msg)
this.showErrorMessage(res.message);
} }
}); }).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} }
@ -279,41 +271,42 @@
setRecordParams(queryModel) { setRecordParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.dataContent.creator = creator;
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if (queryModel) { detail.itemCode = detail.itemCode;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, detail.inventoryStatus = detail.inventoryStatus;
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;; detail.fromPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber detail.toPackingNumber = detail.packingNumber;;
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus detail.fromContainerNumber = detail.containerNumber;
detail.toLocationCode = this.toLocationCode detail.toContainerNumber = detail.containerNumber
} else {
detail.toPackingNumber = detail.packingNumber; detail.fromBatch = detail.batch;
detail.toContainerNumber = detail.containerNumber detail.toBatch = detail.batch;
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus detail.fromLocationCode = this.fromLocationCode;
detail.toLocationCode = "" detail.toLocationCode = ''; //退
}
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.creator = creator; // this.dataContent.jobNumber = '';
return this.dataContent; return this.dataContent;
}, },
setRequestParams(){ setRequestParams() {
var subList = [] var subList = []
var supplierCode="" var supplierCode = ""
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
if(supplierCode==""){ if (supplierCode == "") {
supplierCode = detail.package.supplierCode supplierCode = detail.package.supplierCode
} }
subList.push(detail) subList.push(detail)
@ -322,14 +315,14 @@
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.purchaseReceiptRecordNumber=""; this.dataContent.purchaseReceiptRecordNumber = "";
this.transferMode =""; this.transferMode = "";
this.dataContent.supplierCode = supplierCode this.dataContent.supplierCode = supplierCode
this.dataContent.businessType = "PurchasePutaway" this.dataContent.businessType = "PurchasePutaway"
this.dataContent.departmentCode= "研发部门"; this.dataContent.departmentCode = "研发部门";
this.dataContent.status= 1 ; this.dataContent.status = 1;
this.dataContent.autoCommit = "FALSE"; this.dataContent.autoCommit = "FALSE";
this.dataContent.autoAgree = "FALSE"; this.dataContent.autoAgree = "FALSE";
this.dataContent.autoExecute = "FALSE"; this.dataContent.autoExecute = "FALSE";
this.dataContent.directCreateRecord = "FALSE"; this.dataContent.directCreateRecord = "FALSE";
@ -383,7 +376,7 @@
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
navigateBack(1) navigateBack(1)
}else { } else {
// //
this.subList = []; this.subList = [];
this.detailSource = []; this.detailSource = [];

5
static/config.json

@ -18,10 +18,11 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.157:12080/admin-api", "value": "http://192.168.0.159: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.178:12080/admin-api", "chenfang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",
"liuchen": "http://192.168.0.159:12080/admin-api",
"dev": "http://dev.ccwin-in.com:25100/api/admin-api", "dev": "http://dev.ccwin-in.com:25100/api/admin-api",
"local": "http://localhost:12080", "local": "http://localhost:12080",
"desc": "api请求地址" "desc": "api请求地址"

Loading…
Cancel
Save