报工增加remark

master
zhaoxiaolin 8 months ago
parent 78c44cb10f
commit b4435563d5

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

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

Loading…
Cancel
Save