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 @@ > + + +