|
@@ -4,11 +4,16 @@
|
|
|
|
|
|
|
|
<div class="name">报工信息({{ list.length || 0 }})个 </div>
|
|
<div class="name">报工信息({{ list.length || 0 }})个 </div>
|
|
|
|
|
|
|
|
- <div class="rx-bc"> </div>
|
|
|
|
|
|
|
+ <div class="rx-bc"><el-button type="text" size="mini" @click="batchDelete()">批量删除</el-button> </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<el-table ref="oneJobQualityBom" class="table_content" :max-height="600" :data="list" tooltip-effect="dark"
|
|
<el-table ref="oneJobQualityBom" class="table_content" :max-height="600" :data="list" tooltip-effect="dark"
|
|
|
- style="width: 100%" stripe border>
|
|
|
|
|
|
|
+ style="width: 100%" stripe border @selection-change="tableDataSelectChange">
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ type="selection"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ width="55">
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="序号" type="index" width="55">
|
|
<el-table-column label="序号" type="index" width="55">
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{ $index + 1 }}
|
|
{{ $index + 1 }}
|
|
@@ -459,7 +464,8 @@ export default {
|
|
|
code: 5,
|
|
code: 5,
|
|
|
name: '让步接收'
|
|
name: '让步接收'
|
|
|
}
|
|
}
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ selectArr:[],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -718,6 +724,41 @@ export default {
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
this.cancel();
|
|
this.cancel();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 多选
|
|
|
|
|
+ tableDataSelectChange(val) {
|
|
|
|
|
+ let arr=[];
|
|
|
|
|
+ this.selectArr=[]
|
|
|
|
|
+ if(val.length>0){
|
|
|
|
|
+ val.map(item=>{
|
|
|
|
|
+ arr.push(item.id || item.instanceId)
|
|
|
|
|
+ })
|
|
|
|
|
+ this.selectArr=arr
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(arr);
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ //批量删除
|
|
|
|
|
+ batchDelete(){
|
|
|
|
|
+ if (!this.selectArr.length) {
|
|
|
|
|
+ this.$message.warning('请至少选择一条数据');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$confirm('确定要删除选中的报工信息吗?', '提示', {
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.selectArr.forEach((sitem, sindex) => {
|
|
|
|
|
+ this.list.forEach((item, index) => {
|
|
|
|
|
+ let id=item.id || item.instanceId
|
|
|
|
|
+ if (id==sitem) {
|
|
|
|
|
+ this.list.splice(index, 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|