|
@ -223,21 +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") { |
|
|
|
|
|
var params = this.setRequestParams(); |
|
|
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
|
|
purchaseReturnRequestCreate(params).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成采购退货申请" + res.data, ) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("提交失败" + res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
//直接创建记录 |
|
|
//直接创建记录 |
|
|
//采购退货直接出库,不用查询管理模式 |
|
|
//采购退货直接出库,不用查询管理模式 |
|
|
var params = this.setRecordParams(true) |
|
|
var params = this.setRecordParams(true) |
|
@ -254,8 +240,6 @@ |
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
this.showErrorMessage(error) |
|
|
this.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.showErrorMessage("没有要提交的数据") |
|
|
this.showErrorMessage("没有要提交的数据") |
|
|
} |
|
|
} |
|
@ -272,50 +256,30 @@ |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
detail.itemCode = detail.itemCode; |
|
|
detail.itemCode = detail.itemCode; |
|
|
detail.inventoryStatus = detail.inventoryStatus; |
|
|
detail.inventoryStatus = detail.inventoryStatus; |
|
|
detail.packingNumber = detail.packingNumber; |
|
|
|
|
|
detail.containerNumber = detail.containerNumber; |
|
|
detail.fromPackingNumber = detail.packingNumber; |
|
|
detail.batch = detail.batch; |
|
|
detail.toPackingNumber = detail.packingNumber;; |
|
|
|
|
|
|
|
|
|
|
|
detail.fromContainerNumber = detail.containerNumber; |
|
|
|
|
|
detail.toContainerNumber = detail.containerNumber |
|
|
|
|
|
|
|
|
|
|
|
detail.fromBatch = detail.batch; |
|
|
|
|
|
detail.toBatch = detail.batch; |
|
|
|
|
|
|
|
|
detail.fromLocationCode = this.fromLocationCode; |
|
|
detail.fromLocationCode = this.fromLocationCode; |
|
|
detail.toLocationCode = ''; //采购退货直接出库,目标库位为空 |
|
|
detail.toLocationCode = ''; //采购退货直接出库,目标库位为空 |
|
|
|
|
|
|
|
|
|
|
|
detail.package = null; |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
this.dataContent.subList = subList |
|
|
this.dataContent.subList = subList |
|
|
|
|
|
|
|
|
// this.dataContent.jobNumber = ''; |
|
|
// this.dataContent.jobNumber = ''; |
|
|
return this.dataContent; |
|
|
return this.dataContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setRequestParams() { |
|
|
|
|
|
var subList = [] |
|
|
|
|
|
var supplierCode = "" |
|
|
|
|
|
this.detailSource.forEach(item => { |
|
|
|
|
|
item.subList.forEach(detail => { |
|
|
|
|
|
if (detail.scaned) { |
|
|
|
|
|
if (supplierCode == "") { |
|
|
|
|
|
supplierCode = detail.package.supplierCode |
|
|
|
|
|
} |
|
|
|
|
|
subList.push(detail) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.dataContent.subList = subList |
|
|
|
|
|
this.dataContent.purchaseReceiptRecordNumber = ""; |
|
|
|
|
|
this.transferMode = ""; |
|
|
|
|
|
|
|
|
|
|
|
this.dataContent.supplierCode = supplierCode |
|
|
|
|
|
this.dataContent.businessType = "PurchasePutaway" |
|
|
|
|
|
this.dataContent.departmentCode = "研发部门"; |
|
|
|
|
|
this.dataContent.status = 1; |
|
|
|
|
|
this.dataContent.autoCommit = "FALSE"; |
|
|
|
|
|
this.dataContent.autoAgree = "FALSE"; |
|
|
|
|
|
this.dataContent.autoExecute = "FALSE"; |
|
|
|
|
|
this.dataContent.directCreateRecord = "FALSE"; |
|
|
|
|
|
return this.dataContent; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showMessage(message) { |
|
|
showMessage(message) { |
|
|
setTimeout(r => { |
|
|
setTimeout(r => { |
|
|