报工增加remark

yangwl
zhaoxiaolin 6 months ago
parent 78c44cb10f
commit b4435563d5

@ -473,6 +473,7 @@
@select-all="allReportSelection"
:summary-method="getSummaries"
show-summary
:ref = "tableIndex+index"
>
<el-table-column width="60" align="center" type="selection"/>
<el-table-column label="id" align="center" prop="id" v-if="false"/>
@ -575,7 +576,7 @@
</el-table-column>
</el-table>
<div class="button-container">
<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList)"></el-button>
<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList,index)"></el-button>
</div>
</el-tab-pane>
@ -934,7 +935,8 @@ export default {
],
},
consumeList : [],
cwarehouseList:[]
cwarehouseList:[],
tableIndex: 'tableIndex'
};
},
created() {
@ -1573,7 +1575,7 @@ export default {
},
//--
addConsumeTableRow(rows){
addConsumeTableRow(rows,index){
this.consumeList = rows;
if(rows.length==0){
this.$modal.msgError(`上位机尚未填写损耗,不允许提前新增`);
@ -1581,10 +1583,10 @@ export default {
}
this.$refs.itemSelectNewPrepare.showFlag = true;
this.$refs.itemSelectNewPrepare.init(rows[0].workorderCode,this.selectRow[0].workorderCode);
this.$refs.itemSelectNewPrepare.init(rows[0].workorderCode,this.selectRow[0].workorderCode,index);
},
//--
onSelectNewPrepare(obj) {
onSelectNewPrepare(obj,tableIndx) {
let sr = this.selectRow[0]
for(let i=0;i<obj.length;i++){
if(this.pConsumeRows.length !=0 ){
@ -1615,9 +1617,19 @@ export default {
parentOrder:sr.workorderCode
};
this.consumeList.push(row);
/**
//
this.$nextTick(() => {
let dynamicRef = 'tableIndex'+tableIndx;
console.log(dynamicRef)
this.$refs[dynamicRef].toggleRowSelection(row, true);
});
**/
}
}
},
//
addRemarksblur(table,remark,index){
table.forEach(item=>{
item.remark = remark;

@ -114,7 +114,8 @@ export default {
workorderCode:'',
parentOrder:''
},
selectionRows:[]
selectionRows:[],
tableIndex:''
};
},
created() {
@ -128,10 +129,11 @@ export default {
return cellValue.slice(7,18); //
}
},
init(workorderCode,parentOrder){
init(workorderCode,parentOrder,tableIndex){
this.workorderCode = workorderCode;
this.queryParams.workorderCode = this.workorderCode;
this.queryParams.parentOrder = parentOrder;
this.tableIndex = tableIndex;
this.getList();
},
/** 查询表格列表*/
@ -176,7 +178,7 @@ export default {
obj.workorderCode = this.workorderCode;
});
this.$emit('onSelected', this.selectionRows);
this.$emit('onSelected', this.selectionRows,this.tableIndex);
this.showFlag = false;
},
}

Loading…
Cancel
Save