fix:禅道133成品检测问题

This commit is contained in:
shijing 2025-10-21 15:26:57 +08:00
parent ecae48fe14
commit 29f986b5e0
2 changed files with 20 additions and 6 deletions

View File

@ -124,11 +124,15 @@
},
//
select(rows, row){
var isSelect = rows.length && rows.indexOf(row) !== -1&& this.defaultValue.indexOf(row) !== -1
if(isSelect){
this.defaultValue.push(row)
}else{
this.defaultValue.splice(this.defaultValue.findIndex(item => item.id == row.id), 1)
var isSelect = rows.length && rows.indexOf(row) !== -1;
if(isSelect){//
if(this.defaultValue.indexOf(row) == -1){
this.defaultValue.push(row)
}
}else{//
if(this.defaultValue.indexOf(row) !== -1){
this.defaultValue.splice(this.defaultValue.findIndex(item => item.id == row.id), 1)
}
}
this.$emit('selectChange', this.defaultValue);
},
@ -147,6 +151,11 @@
}
this.$emit('selectAllChange', this.defaultValue);
},
clearSelection(){
let that = this;
that.defaultValue = [];
this.$emit('selectChange', this.defaultValue);
},
setCurrentRows(row){
let that = this;
that.$nextTick(() => {

View File

@ -288,6 +288,7 @@
</el-form>
<el-row>
<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 v-for="item2 in defectlists" :key="item2.id" :label="item2.defect_name">
<el-switch v-model="item2.value" disabled></el-switch>
@ -489,7 +490,6 @@ export default {
selectChange(rows){
let that = this;
that.selectWprList = rows;
console.log('selectChangerows',rows);
},
selectAllChange(datas){
let that = this;
@ -989,6 +989,11 @@ export default {
});
that.$API.wpm.mlogbw.update.req("bulk",that.selectWpr).then((res) => {
that.setVisible = false;
that.selectWprList = [];
that.$refs.mlogbwTable.clearSelection();
that.defectlists.forEach(item => {
item.value = false;
});
that.getList();
}).catch((err) => {
return err;