From a88664df4e07242b5052226a4185e46d35512d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Mon, 11 Nov 2024 16:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=AE=E6=94=B9=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E9=A1=B9=E7=9B=AE=E6=8F=90=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/DlInspectionProjectForm.vue | 30 +- src/views/partner/api/workOrder.js | 17 ++ src/views/partner/workOrder.vue | 261 +++++++++++++++++- 3 files changed, 282 insertions(+), 26 deletions(-) diff --git a/src/views/inspection/project/DlInspectionProjectForm.vue b/src/views/inspection/project/DlInspectionProjectForm.vue index c5d9433..322a111 100644 --- a/src/views/inspection/project/DlInspectionProjectForm.vue +++ b/src/views/inspection/project/DlInspectionProjectForm.vue @@ -90,8 +90,6 @@ export default { if (res.data.projectRoyaltyList.length > 0){ this.tableData = res.data.projectRoyaltyList console.log('tableData', this.tableData) - }else { - this.getGoods() } this.title = "修改检测项目"; } finally { @@ -109,25 +107,6 @@ export default { this.formLoading = true; try { const data = this.formData; - - // 修改的提交 - if (data.id) { - this.tableData.map(item => { - if (!item.royaltyAmount) { - item.royaltyAmount = 0 - }else { - /*将royaltyAmount的单位转为分*/ - item.royaltyAmount = item.royaltyAmount * 100 - } - }) - data.projectRoyaltyList = this.tableData - console.log('商品及提成', this.tableData) - await DlInspectionProjectApi.updateDlInspectionProject(data); - this.$modal.msgSuccess("修改成功"); - this.dialogVisible = false; - this.$emit('success'); - return; - } this.tableData.map(item => { item.goodsId = item.id /*如果royaltyAmount 为空,则设置为0*/ @@ -140,6 +119,15 @@ export default { delete item.id }) data.projectRoyaltyList = this.tableData + // 修改的提交 + if (data.id) { + console.log('商品及提成', this.tableData) + await DlInspectionProjectApi.updateDlInspectionProject(data); + this.$modal.msgSuccess("修改成功"); + this.dialogVisible = false; + this.$emit('success'); + return; + } console.log('商品及提成', this.tableData) // 添加的提交 await DlInspectionProjectApi.createDlInspectionProject(data); diff --git a/src/views/partner/api/workOrder.js b/src/views/partner/api/workOrder.js index 5963abc..5287e1d 100644 --- a/src/views/partner/api/workOrder.js +++ b/src/views/partner/api/workOrder.js @@ -143,3 +143,20 @@ export function detail(params) { params: params }) } +export function getINspectionProject(params) { + return request({ + url: '/inspection/dl-inspection-project/page', + method: 'get', + params: { + pageNo:1, + pageSize:10000 + } + }) +} +export function getWeorkNodesById(params) { + return request({ + url: '/system/info/getWeorkNodesById', + method: 'get', + params: params + }) +} diff --git a/src/views/partner/workOrder.vue b/src/views/partner/workOrder.vue index 57f9b4b..0f7b483 100644 --- a/src/views/partner/workOrder.vue +++ b/src/views/partner/workOrder.vue @@ -367,6 +367,44 @@ > + + +