diff --git a/api/request2.js b/api/request2.js index 0360896d..ca0798db 100644 --- a/api/request2.js +++ b/api/request2.js @@ -2687,8 +2687,8 @@ export function getScrapRequestDetail(id) { */ export function scrapRequestCreate(params) { return request({ - url: baseApi + "/wms/scrap-job-main/create", - method: "put", + url: baseApi + "/wms/scrap-request-main/create", + method: "post", data: params, }); } diff --git a/mycomponents/scan/winScanPackAndLocation.vue b/mycomponents/scan/winScanPackAndLocation.vue index e3ec3242..62b61d78 100644 --- a/mycomponents/scan/winScanPackAndLocation.vue +++ b/mycomponents/scan/winScanPackAndLocation.vue @@ -139,6 +139,7 @@ this.$refs.popup.open('bottom'); this.fromInventoryStatuses = jobContent.outInventoryStatuses this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //出库库存状态; //出库库存状态 + debugger this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //出库库存状态 }, diff --git a/pages/package/record/mergePackageRecord.vue b/pages/package/record/mergePackageRecord.vue index 2d57c1dd..b7f4e1ce 100644 --- a/pages/package/record/mergePackageRecord.vue +++ b/pages/package/record/mergePackageRecord.vue @@ -44,10 +44,13 @@ - - + + + + + diff --git a/pages/scrap/request/scrapRequestCreate.vue b/pages/scrap/request/scrapRequestCreate.vue index 982d9431..b4c921f4 100644 --- a/pages/scrap/request/scrapRequestCreate.vue +++ b/pages/scrap/request/scrapRequestCreate.vue @@ -5,8 +5,8 @@ - 报废原因: - + 报废原因: + @@ -51,18 +51,20 @@ import { scrapRequestCreate, } from '@/api/request2.js'; - + import { goHome, - updateTitle + updateTitle, + getCurrDateOneMonthsTimes, + navigateBack } from '@/common/basic.js'; - + import { getInventoryStatusDesc, getDirectoryItemArray, getScarpReasonList } from '@/common/directory.js'; - + import { getBusinessType, createItemInfo, @@ -78,7 +80,7 @@ import comMessage from '@/mycomponents/common/comMessage.vue' import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' - + export default { components: { winScanButton, @@ -113,9 +115,9 @@ reasonList: [], reasonText: "", }; - + }, - + onLoad(option) { this.reasonList = getScarpReasonList(); var typeCode = "Scrap" @@ -126,7 +128,7 @@ this.tolocationTypeList = res.tolocationTypeList; this.showFromLocationPopup(); } else { - this.$refs.comMessage.showBreakMessage(res.message ); + this.$refs.comMessage.showBreakMessage(res.message); } }); @@ -143,7 +145,7 @@ onPullDownRefresh() {}, mounted() { - + }, methods: { getScanResult(result) { @@ -235,11 +237,11 @@ commit() { - if(this.reasonText==""){ + if (this.reasonText == "") { this.showMessage("请先选择报废原因") return; } - if(this.detailSource.length==0){ + if (this.detailSource.length == 0) { this.showErrorMessage("请先扫描数据") return; } @@ -248,46 +250,41 @@ title: "提交中....", mask: true }); - - var params = this.setRequestParams(); - console.log("提交" + JSON.stringify(params)) - // scrapRequestCreate(params).then(res => { - // uni.hideLoading() - // if (res.data) { - // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, ) - // } else { - // this.showErrorMessage("提交失败[" + res.msg + "]") - // } - // }).catch(error => { - // uni.hideLoading() - // this.showErrorMessage(error) - // }) - + var params = this.setRequestParams(); + console.log("提交" + JSON.stringify(params)) + scrapRequestCreate(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功
生成报废出库申请
" + res.data, ) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) }, - - setRequestParams(){ + + setRequestParams() { var subList = [] this.detailSource.forEach(item => { item.subList.forEach(detail => { if (detail.scaned) { + detail.fromLocationCode = detail.locationCode subList.push(detail) } }) }) - + this.dataContent.subList = subList - 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"; + this.dataContent.status = 1; + this.dataContent.fromWarehouseCode = "W1"; + this.dataContent.dueTime = getCurrDateOneMonthsTimes(); return this.dataContent; }, - + showMessage(message) { this.$refs.comMessage.showMessage(message, res => { @@ -324,8 +321,7 @@ showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - this.fromLocationCode = ''; - + navigateBack(1) }) }, diff --git a/pages/unPlanned/record/issueRecord.vue b/pages/unPlanned/record/issueRecord.vue index 5688e903..a81d7470 100644 --- a/pages/unPlanned/record/issueRecord.vue +++ b/pages/unPlanned/record/issueRecord.vue @@ -51,7 +51,6 @@ import comMessage from '@/mycomponents/common/comMessage.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import { - unPlannedIssueRequestSubmit, unPlannedIssueRecordSubmit } from '@/api/request2.js'; diff --git a/pages/unPlanned/record/receiptRecord.vue b/pages/unPlanned/record/receiptRecord.vue index 6ca5d38f..a05e811f 100644 --- a/pages/unPlanned/record/receiptRecord.vue +++ b/pages/unPlanned/record/receiptRecord.vue @@ -52,7 +52,6 @@ import comMessage from '@/mycomponents/common/comMessage.vue' import { - unPlannedReceiptRequestbSubmit, unPlannedReceiptRecordbSubmit } from '@/api/request2.js'; diff --git a/static/config.json b/static/config.json index 4a668deb..124e1c16 100644 --- a/static/config.json +++ b/static/config.json @@ -26,6 +26,7 @@ "local": "http://localhost:12080", "desc": "api请求地址" }, + "tenantId": { "name": "tenantId", "value": "1",