fix:禅道133成品检测问题
This commit is contained in:
parent
ecae48fe14
commit
29f986b5e0
|
|
@ -124,12 +124,16 @@
|
||||||
},
|
},
|
||||||
//表格勾选事件
|
//表格勾选事件
|
||||||
select(rows, row){
|
select(rows, row){
|
||||||
var isSelect = rows.length && rows.indexOf(row) !== -1&& this.defaultValue.indexOf(row) !== -1
|
var isSelect = rows.length && rows.indexOf(row) !== -1;
|
||||||
if(isSelect){
|
if(isSelect){//被选中
|
||||||
|
if(this.defaultValue.indexOf(row) == -1){
|
||||||
this.defaultValue.push(row)
|
this.defaultValue.push(row)
|
||||||
}else{
|
}
|
||||||
|
}else{//被取消
|
||||||
|
if(this.defaultValue.indexOf(row) !== -1){
|
||||||
this.defaultValue.splice(this.defaultValue.findIndex(item => item.id == row.id), 1)
|
this.defaultValue.splice(this.defaultValue.findIndex(item => item.id == row.id), 1)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.$emit('selectChange', this.defaultValue);
|
this.$emit('selectChange', this.defaultValue);
|
||||||
},
|
},
|
||||||
//表格全选事件
|
//表格全选事件
|
||||||
|
|
@ -147,6 +151,11 @@
|
||||||
}
|
}
|
||||||
this.$emit('selectAllChange', this.defaultValue);
|
this.$emit('selectAllChange', this.defaultValue);
|
||||||
},
|
},
|
||||||
|
clearSelection(){
|
||||||
|
let that = this;
|
||||||
|
that.defaultValue = [];
|
||||||
|
this.$emit('selectChange', this.defaultValue);
|
||||||
|
},
|
||||||
setCurrentRows(row){
|
setCurrentRows(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="selectWpr" border>
|
<el-table :data="selectWpr" border>
|
||||||
|
<el-table-column type="index"></el-table-column>
|
||||||
<el-table-column prop="number" label="物料编号"></el-table-column>
|
<el-table-column prop="number" label="物料编号"></el-table-column>
|
||||||
<el-table-column v-for="item2 in defectlists" :key="item2.id" :label="item2.defect_name">
|
<el-table-column v-for="item2 in defectlists" :key="item2.id" :label="item2.defect_name">
|
||||||
<el-switch v-model="item2.value" disabled></el-switch>
|
<el-switch v-model="item2.value" disabled></el-switch>
|
||||||
|
|
@ -489,7 +490,6 @@ export default {
|
||||||
selectChange(rows){
|
selectChange(rows){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.selectWprList = rows;
|
that.selectWprList = rows;
|
||||||
console.log('selectChangerows',rows);
|
|
||||||
},
|
},
|
||||||
selectAllChange(datas){
|
selectAllChange(datas){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -989,6 +989,11 @@ export default {
|
||||||
});
|
});
|
||||||
that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
|
that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
|
||||||
that.setVisible = false;
|
that.setVisible = false;
|
||||||
|
that.selectWprList = [];
|
||||||
|
that.$refs.mlogbwTable.clearSelection();
|
||||||
|
that.defectlists.forEach(item => {
|
||||||
|
item.value = false;
|
||||||
|
});
|
||||||
that.getList();
|
that.getList();
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue