fix:输出手动添加bw
This commit is contained in:
parent
faacaa8d8e
commit
6a64f944ff
|
|
@ -30,15 +30,22 @@
|
|||
:addTemplate="addTemplate"
|
||||
:tableHeight="tableHeight"
|
||||
:canMultiple = "canMultiple"
|
||||
:pushType="pushType"
|
||||
row-key="id"
|
||||
@selectChange="selectChange"
|
||||
@selectAllChange="selectAllChange"
|
||||
@add="rowAdd"
|
||||
>
|
||||
<el-table-column prop="mlogb__batch" label="物料批次" fixed min-width="80px"></el-table-column>
|
||||
<el-table-column prop="mlogb__batch" label="物料批次" fixed min-width="80px">
|
||||
<template #default="scope">
|
||||
<el-input v-if="scope.row.isEdit" v-model="scope.row.mlogb__batch" placeholder="物料编号"></el-input>
|
||||
<span v-else>{{ scope.row.mlogb__batch }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
|
||||
<template #default="scope">
|
||||
<el-input v-if="(route_code=='paiban'||route_code=='paiyicibang')&&scope.row.isEdit" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
||||
<!-- <el-input v-if="(route_code=='paiban'||route_code=='paiyicibang')&&scope.row.isEdit" v-model="scope.row.number" placeholder="物料编号"></el-input> -->
|
||||
<el-input v-if="scope.row.isEdit" v-model="scope.row.number" placeholder="物料编号"></el-input>
|
||||
<span v-else>{{ scope.row.number }}</span>
|
||||
<span v-if="scope.row.wpr_number_out!==null&&scope.row.wpr_number_out!==undefined">——{{ scope.row.wpr_number_out }}</span>
|
||||
</template>
|
||||
|
|
@ -396,12 +403,13 @@ export default {
|
|||
wprInputText:"",
|
||||
canMultiple:false,
|
||||
checkAll: false,
|
||||
hideAdd: true,
|
||||
hideAdd: false,
|
||||
visible: false,
|
||||
setVisible:false,
|
||||
multipleSet:false,
|
||||
checkVisible:false,
|
||||
hasWpr:false,
|
||||
pushType:'unshift',
|
||||
descriptionVisible:false,
|
||||
options:[],
|
||||
qct_defects:[],
|
||||
|
|
@ -413,6 +421,7 @@ export default {
|
|||
mlogb: "",
|
||||
number: "",
|
||||
note: "",
|
||||
mlogb__batch:"",
|
||||
isEdit: true,
|
||||
},
|
||||
setForm:{
|
||||
|
|
@ -575,6 +584,8 @@ export default {
|
|||
that.$API.wpm.mlogbw.list.req(params).then((res) => {
|
||||
that.mlogbwlist = [];
|
||||
if(res.length>0){
|
||||
that.addTemplate.mlogb = that.mlogb = res[0].mlogb;
|
||||
that.addTemplate.mlogb__batch = that.mlogb__batch = res[0].mlogb__batch;
|
||||
res.forEach((item) => {
|
||||
let obj = {};
|
||||
obj = Object.assign({},item);
|
||||
|
|
@ -632,19 +643,6 @@ export default {
|
|||
obj.note = row.note;
|
||||
//qct不为空,有检验表
|
||||
if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){
|
||||
// that.qct_defects.forEach(item => {
|
||||
// if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
|
||||
// let str = item.rule_expression.replace(/`/g, '');
|
||||
// str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||
// let judge = false;
|
||||
// try {
|
||||
// judge = eval(str);
|
||||
// that.mlogbwlist[editIndex][item.defect_name] = judge;
|
||||
// }catch (error) {
|
||||
// console.error('error',error);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
obj.ftest = {};
|
||||
obj.ftest.ftestitems = [];
|
||||
obj.ftest.ftestdefects = [];
|
||||
|
|
@ -684,7 +682,11 @@ export default {
|
|||
return err;
|
||||
});
|
||||
}else{
|
||||
that.$API.wpm.mlogbw.create.req(obj).then((res) => {
|
||||
let objNew = {};
|
||||
objNew.mlogb = obj.mlogb;
|
||||
objNew.number = obj.number;
|
||||
objNew.mlogb__batch = that.mlogb__batch;
|
||||
that.$API.wpm.mlogbw.create.req(objNew).then((res) => {
|
||||
that.$message.success("添加成功");
|
||||
that.mlogbwlist[editIndex].isEdit = false;
|
||||
// that.getList();
|
||||
|
|
@ -712,8 +714,8 @@ export default {
|
|||
that.getEqData(index);
|
||||
}
|
||||
},
|
||||
formTableDelet(row){
|
||||
this.mlogbwlist.pop();
|
||||
formTableDelet(row,index){
|
||||
this.mlogbwlist.splice(index, 1);
|
||||
},
|
||||
//删除
|
||||
formTableDel(id,index) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue