ruanqi 3 years ago
parent
commit
f4b7ab9912
  1. 47
      src/views/modules/eam/eamMaintenanceModel.vue
  2. 47
      src/views/modules/eam/eamPropertiesModel.vue

47
src/views/modules/eam/eamMaintenanceModel.vue

@ -194,9 +194,9 @@
<div style="margin-top: 100px">
<el-button type="primary" @click="addItem()">添加>></el-button>
</div>
<!-- <div style="margin-top: 20px">-->
<!-- <el-button type="primary" @click="deleteItem()">删除<<</el-button>-->
<!-- </div>-->
<div style="margin-top: 20px">
<el-button type="primary" @click="deleteItem()">删除<<</el-button>
</div>
</el-main>
<el-main style="width: 300px">
<span style="font-size: 12px" >已有项目</span>
@ -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

47
src/views/modules/eam/eamPropertiesModel.vue

@ -195,9 +195,9 @@
<div style="margin-top: 100px">
<el-button type="primary" @click="addItem()">添加>></el-button>
</div>
<!-- <div style="margin-top: 20px">-->
<!-- <el-button type="primary" @click="deleteItem()">删除<<</el-button>-->
<!-- </div>-->
<div style="margin-top: 20px">
<el-button type="primary" @click="deleteItem()">删除<<</el-button>
</div>
</el-main>
<el-main style="width: 300px">
<span style="font-size: 12px" >已有项目</span>
@ -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

Loading…
Cancel
Save