From f4b7ab9912fbf7ce4a4c0c79cb95eb178f50027b Mon Sep 17 00:00:00 2001 From: ruanqi Date: Thu, 30 Mar 2023 11:09:14 +0800 Subject: [PATCH] 1 --- src/views/modules/eam/eamMaintenanceModel.vue | 47 ++++++++++++++----- src/views/modules/eam/eamPropertiesModel.vue | 47 ++++++++++++++----- 2 files changed, 72 insertions(+), 22 deletions(-) diff --git a/src/views/modules/eam/eamMaintenanceModel.vue b/src/views/modules/eam/eamMaintenanceModel.vue index 8db6c0a..111045f 100644 --- a/src/views/modules/eam/eamMaintenanceModel.vue +++ b/src/views/modules/eam/eamMaintenanceModel.vue @@ -194,9 +194,9 @@
添加>>
- - - +
+ 删除<< +
已有项目: @@ -839,6 +839,8 @@ //---------快速添加---------- addFastModal(){ + this.itemListRow2=null + this.itemListRow1=null getItemLists(this.detailData).then(({data}) => { this.itemList1=data.row1; this.itemList2=data.row2; @@ -873,6 +875,37 @@ this.itemList1=data.row1; this.itemList2=data.row2; }) + this.itemListRow1=null + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + deleteItem(){ + if(this.itemListRow2==null){ + this.$alert("请选择已选项目!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={ + codeNo:this.detailData.codeNo, + codeDesc:this.detailData.codeDesc, + functionType:this.detailData.functionType, + itemNo: this.itemListRow2.itemNo, + itemDesc:this.itemListRow2.itemDesc, + itemType:this.detailData.itemType, + userId:this.$store.state.user.name + } + deleteModalDetails(inData).then(({data}) => { + if (data && data.code === 0) { + getItemLists(this.detailData).then(({data}) => { + this.itemList1=data.row1; + this.itemList2=data.row2; + }) + this.itemListRow2=null } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -880,14 +913,6 @@ } }) }, - // deleteItem(){ - // if(this.itemListRow2==null){ - // this.$alert("请选择已选项目!", '错误', { - // confirmButtonText: '确定' - // }) - // return false; - // } - // }, refreshDetailList(){ searchModalDetails(this.detailData).then(({data}) => { this.detailList = data.rows diff --git a/src/views/modules/eam/eamPropertiesModel.vue b/src/views/modules/eam/eamPropertiesModel.vue index eff280e..dbfe52a 100644 --- a/src/views/modules/eam/eamPropertiesModel.vue +++ b/src/views/modules/eam/eamPropertiesModel.vue @@ -195,9 +195,9 @@
添加>>
- - - +
+ 删除<< +
已有项目: @@ -840,6 +840,8 @@ }, //---------快速添加---------- addFastModal(){ + this.itemListRow2=null + this.itemListRow1=null getItemLists(this.detailData).then(({data}) => { this.itemList1=data.row1; this.itemList2=data.row2; @@ -874,6 +876,37 @@ this.itemList1=data.row1; this.itemList2=data.row2; }) + this.itemListRow1=null + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + deleteItem(){ + if(this.itemListRow2==null){ + this.$alert("请选择已选项目!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={ + codeNo:this.detailData.codeNo, + codeDesc:this.detailData.codeDesc, + functionType:this.detailData.functionType, + itemNo: this.itemListRow2.itemNo, + itemDesc:this.itemListRow2.itemDesc, + itemType:this.detailData.itemType, + userId:this.$store.state.user.name + } + deleteModalDetails(inData).then(({data}) => { + if (data && data.code === 0) { + getItemLists(this.detailData).then(({data}) => { + this.itemList1=data.row1; + this.itemList2=data.row2; + }) + this.itemListRow2=null } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -881,14 +914,6 @@ } }) }, - // deleteItem(){ - // if(this.itemListRow2==null){ - // this.$alert("请选择已选项目!", '错误', { - // confirmButtonText: '确定' - // }) - // return false; - // } - // }, refreshDetailList(){ searchModalDetails(this.detailData).then(({data}) => { this.detailList = data.rows