|
@@ -51,6 +51,13 @@
|
|
|
>返回</p>
|
|
|
</el-col>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item style="float: right;" v-if="addPagePropsData.type">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <p class="reset-button-one"
|
|
|
+ @click="goPage(4)"
|
|
|
+ >取消</p>
|
|
|
+ </el-col>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
<!--<el-table border :data="tableList" ref="multipleTable" @selection-change="handleSelectionChange" :row-key="getRowKeys">-->
|
|
|
<el-table border :data="tableList" ref="multipleTable" @select-all="handleSelectionChange" @select="handleSelectionChange" :row-key="getRowKeys">
|
|
@@ -124,6 +131,7 @@
|
|
|
addPagePropsData:{},
|
|
|
//勾选数据
|
|
|
multipleTableList:[],
|
|
|
+ multipleTableListOne:[],
|
|
|
//编辑参数
|
|
|
editPropsData:{},
|
|
|
}
|
|
@@ -152,10 +160,18 @@
|
|
|
this.msgError("请勾选化学品")
|
|
|
return
|
|
|
}
|
|
|
+ this.$set(this,'multipleTableListOne',this.multipleTableList);
|
|
|
this.pageType = 2;
|
|
|
}else if(type == 3){
|
|
|
this.$set(this,'addPagePropsData',JSON.parse(JSON.stringify(data)));
|
|
|
this.pageType = 1;
|
|
|
+ }else if(type == 4){
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ for(let o=0;o<self.multipleTableListOne.length;o++){
|
|
|
+ self.$refs.multipleTable.toggleRowSelection(self.multipleTableListOne[o],true);
|
|
|
+ }
|
|
|
+ this.$set(this,'multipleTableList',this.multipleTableListOne);
|
|
|
+ this.pageType = 2;
|
|
|
}
|
|
|
},
|
|
|
//获取数据列表
|
|
@@ -207,39 +223,12 @@
|
|
|
}
|
|
|
}
|
|
|
this.$set(this,'multipleTableList',list);
|
|
|
+ if(!this.addPagePropsData.type){
|
|
|
+ this.$set(this,'multipleTableListOne',list);
|
|
|
+ }
|
|
|
if (selection.length>20){
|
|
|
this.msgError("一次最多可申购20个化学品")
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- // let list = JSON.parse(JSON.stringify(this.multipleTableList))
|
|
|
- // console.log('selection',selection)
|
|
|
- // console.log('list',list)
|
|
|
- // for(let i=0;i<selection.length;i++){
|
|
|
- // let num = 0;
|
|
|
- // for(let o=0;o<list.length;o++){
|
|
|
- // if(selection[i].id == list[o].id){
|
|
|
- // num++
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if(num == 0){
|
|
|
- // list.push(selection[i])
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if(list.length<=20){
|
|
|
- // this.selectedNum = selection.length;
|
|
|
- // this.userIds = selection.map(item => item.id)
|
|
|
- // this.$set(this,'multipleTableList',selection);
|
|
|
- // this.multiple = !selection.length
|
|
|
- // }else{
|
|
|
- // this.$refs.multipleTable.clearSelection();
|
|
|
- // setTimeout(function(){
|
|
|
- // for(let i=0;i<20;i++){
|
|
|
- // self.$refs.multipleTable.toggleRowSelection(self.multipleTableList[i],true);
|
|
|
- // }
|
|
|
- // },50);
|
|
|
- // this.msgError("一次最多可申购20个化学品")
|
|
|
- // }
|
|
|
},
|
|
|
/*===记录勾选数据===
|
|
|
需要再el-table 添加 :row-key="getRowKeys"
|