From 1ed84d2ba55f234b09fadc1f9e733cae92a79684 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Thu, 30 Nov 2023 16:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=B3=E8=AF=B7=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../record/productPutawayRecord.vue | 42 ++++++++++++++---- pages/productionReturn/coms/comReturn.vue | 38 +++++++++++++--- pages/purchaseReturn/record/returnRecord.vue | 43 +++++++++++++++---- pages/putaway/record/putawayRecord.vue | 6 +-- pages/repleinsh/record/repleinshRecord.vue | 37 ++++++++++++++-- pages/scrap/record/scrapRecord.vue | 34 +++++++++++++-- pages/unPlanned/record/issueRecord.vue | 36 ++++++++++++++-- pages/unPlanned/record/receiptRecord.vue | 37 +++++++++++++--- 8 files changed, 232 insertions(+), 41 deletions(-) diff --git a/pages/productPutaway/record/productPutawayRecord.vue b/pages/productPutaway/record/productPutawayRecord.vue index 4b6e6e41..5cf9cdfe 100644 --- a/pages/productPutaway/record/productPutawayRecord.vue +++ b/pages/productPutaway/record/productPutawayRecord.vue @@ -9,7 +9,7 @@ - @@ -98,7 +98,7 @@ received: false, isShowPackingCode: true, scanCount: 0, - jobContent: {}, //任务内容 + dataContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 locationTypeList: [], @@ -268,7 +268,7 @@ if(this.fromType=="requestType"){ - var params = this.setParams(false) + var params = this.setRequestParams() console.log("提交" + JSON.stringify(params)) // productPutawayRequestSubmit(params).then(res => { // uni.hideLoading() @@ -291,7 +291,7 @@ getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { this.managementList = res.list; - var params = this.setParams(true) + var params = this.setRecordParams(true) console.log("提交参数", JSON.stringify(params)); // productPutawayRecordSubmit(params).then(res => { @@ -314,7 +314,33 @@ }, - setParams(queryModel) { + 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.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; + }, + + setRecordParams(queryModel) { var subList = [] var creator = this.$store.state.user.id this.detailSource.forEach(item => { @@ -342,9 +368,9 @@ } }) }) - this.jobContent.subList = subList - this.jobContent.creator = creator; - return this.jobContent; + this.dataContent.subList = subList + this.dataContent.creator = creator; + return this.dataContent; }, diff --git a/pages/productionReturn/coms/comReturn.vue b/pages/productionReturn/coms/comReturn.vue index 7104b729..19399fdb 100644 --- a/pages/productionReturn/coms/comReturn.vue +++ b/pages/productionReturn/coms/comReturn.vue @@ -8,7 +8,7 @@ - @@ -119,7 +119,7 @@ return { id: '', scanCount: 0, - jobContent: {}, //任务内容 + dataContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 fromLocationInfo: {}, @@ -285,7 +285,7 @@ }); if(this.fromType=="requestType"){ - var params = this.setParams(false) + var params = this.setRequestParams() console.log("提交" + JSON.stringify(params)) // productionReturnRequestSubmit(params).then(res => { // uni.hideLoading() @@ -331,6 +331,32 @@ }, + 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.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; + }, + setParams(queryModel) { var subList = [] var creator = this.$store.state.user.id @@ -359,9 +385,9 @@ } }) }) - this.jobContent.subList = subList - this.jobContent.creator = creator; - return this.jobContent; + this.dataContent.subList = subList + this.dataContent.creator = creator; + return this.dataContent; }, diff --git a/pages/purchaseReturn/record/returnRecord.vue b/pages/purchaseReturn/record/returnRecord.vue index 3af8eaa1..50382afb 100644 --- a/pages/purchaseReturn/record/returnRecord.vue +++ b/pages/purchaseReturn/record/returnRecord.vue @@ -87,7 +87,8 @@ tolocationTypeList: [], businessType: {}, //业务类型 poNumber: '', - fromType: "" + fromType: "", + dataContent : {} }; }, @@ -219,10 +220,10 @@ }); if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { - var params = this.setParams(); + console.log("提交参数", JSON.stringify(params)); if (this.fromType == "requestType") { - var params = this.setParams(false) + var params = this.setRequestParams(); console.log("提交" + JSON.stringify(params)) // purchaseReturnRequestSubmit(params).then(res => { // uni.hideLoading() @@ -246,7 +247,7 @@ getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { this.managementList = res.list; - var params = this.setParams(true) + var params = this.setRecordParams(true) console.log("提交参数", JSON.stringify(params)); // purchaseReturnRecordSubmit(params).then(res => { @@ -274,7 +275,7 @@ }, - setParams(queryModel) { + setRecordParams(queryModel) { var subList = [] var creator = this.$store.state.user.id this.detailSource.forEach(item => { @@ -300,9 +301,35 @@ } }) }) - this.jobContent.subList = subList - this.jobContent.creator = creator; - return this.jobContent; + this.dataContent.subList = subList + this.dataContent.creator = creator; + 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.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) { diff --git a/pages/putaway/record/putawayRecord.vue b/pages/putaway/record/putawayRecord.vue index c5e6778b..933d4fe5 100644 --- a/pages/putaway/record/putawayRecord.vue +++ b/pages/putaway/record/putawayRecord.vue @@ -98,7 +98,7 @@ id: '', receiptJob: {}, received: false, - dataContent: {}, //任务内容 + dataContent: {}, //内容 detailSource: [], //绑定在页面上的数据源 locationTypeList: [], businessTypeInfo: {}, @@ -283,7 +283,7 @@ getManagementPrecisions(itemCodes, this.toLocationCode, res => { if (res.success) { this.managementList = res.list; - var params = this.setParams(true) + var params = this.setRecordParams(true) console.log("提交参数", JSON.stringify(params)); // putawayRecordSubmit(params).then(res => { @@ -305,7 +305,7 @@ } }, - setParams(queryModel) { + setRecordParams(queryModel) { var subList = [] var creator = this.$store.state.user.id this.detailSource.forEach(item => { diff --git a/pages/repleinsh/record/repleinshRecord.vue b/pages/repleinsh/record/repleinshRecord.vue index 3a252548..caab0033 100644 --- a/pages/repleinsh/record/repleinshRecord.vue +++ b/pages/repleinsh/record/repleinshRecord.vue @@ -8,7 +8,7 @@ - @@ -97,7 +97,7 @@ received: false, isShowPackingCode: true, scanCount: 0, - jobContent: {}, //任务内容 + dataContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 locationTypeList: [], @@ -256,9 +256,12 @@ mask: true }); - var params = this.setParams(); - console.log("提交" + JSON.stringify(params)) + + if(this.fromType=="requestType"){ + var params = this.setRequestParams(); + console.log("提交" + JSON.stringify(params)) + // repleinshRequestSubmit(params).then(res => { // uni.hideLoading() // if (res.data) { @@ -302,6 +305,32 @@ }) return subList; }, + + 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.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) { this.$refs.comMessage.showMessage(message, res => { diff --git a/pages/scrap/record/scrapRecord.vue b/pages/scrap/record/scrapRecord.vue index 39fa5c1a..a8cfd294 100644 --- a/pages/scrap/record/scrapRecord.vue +++ b/pages/scrap/record/scrapRecord.vue @@ -17,7 +17,7 @@ - @@ -99,7 +99,7 @@ received: false, isShowPackingCode: true, scanCount: 0, - jobContent: {}, //任务内容 + dataContent: {}, //任务内容 subList: [], //接口返回的任务subList detailSource: [], //绑定在页面上的数据源 locationTypeList: [], @@ -263,10 +263,10 @@ mask: true }); - var params = this.setParams(); - console.log("提交" + JSON.stringify(params)) if(this.fromType=="requestType"){ + var params = this.setRequestParams(); + console.log("提交" + JSON.stringify(params)) // scrapRequestSubmit(params).then(res => { // uni.hideLoading() // if (res.data) { @@ -310,6 +310,32 @@ return subList; }, + 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.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) { this.$refs.comMessage.showMessage(message, res => { diff --git a/pages/unPlanned/record/issueRecord.vue b/pages/unPlanned/record/issueRecord.vue index 9602334d..baa9f62a 100644 --- a/pages/unPlanned/record/issueRecord.vue +++ b/pages/unPlanned/record/issueRecord.vue @@ -102,7 +102,8 @@ detailSource: [], //绑定在页面上的数据源 reason: "", reasonList: [], - fromType: "" + fromType: "", + dataContent:{} } }, @@ -222,9 +223,12 @@ this.showErrorMessage("请选择出库原因") return; } - var params = this.setParams(); - console.log("提交参数",JSON.stringify(params)); + if(this.fromType=="requestType"){ + var params = this.setRequestParams(); + console.log("提交参数",JSON.stringify(params)); + + // unPlannedIssueRequestSubmit(params).then(res => { // uni.hideLoading() // if (res.data) { @@ -266,6 +270,32 @@ }) return subList; }, + + 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.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; + }, } } diff --git a/pages/unPlanned/record/receiptRecord.vue b/pages/unPlanned/record/receiptRecord.vue index 885975c1..f7e371cf 100644 --- a/pages/unPlanned/record/receiptRecord.vue +++ b/pages/unPlanned/record/receiptRecord.vue @@ -100,7 +100,8 @@ reason: "", reasonList: [], fromType: "", - showToLoaction:true + showToLoaction:true, + dataContent:{} } }, @@ -249,7 +250,7 @@ } if(this.fromType=="requestType"){ - var params = this.setParams(false) + var params = this.setRequestParams() console.log("提交" + JSON.stringify(params)) // unPlannedReceiptRequestbSubmit(params).then(res => { // uni.hideLoading() @@ -322,9 +323,35 @@ } }) }) - this.jobContent.subList = subList - this.jobContent.creator = creator; - return this.jobContent; + this.dataContent.subList = subList + this.dataContent.creator = creator; + 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.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; }, }