Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
8794e6a4b4
|
|
@ -30,15 +30,22 @@
|
||||||
:addTemplate="addTemplate"
|
:addTemplate="addTemplate"
|
||||||
:tableHeight="tableHeight"
|
:tableHeight="tableHeight"
|
||||||
:canMultiple = "canMultiple"
|
:canMultiple = "canMultiple"
|
||||||
|
:pushType="pushType"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@selectChange="selectChange"
|
@selectChange="selectChange"
|
||||||
@selectAllChange="selectAllChange"
|
@selectAllChange="selectAllChange"
|
||||||
@add="rowAdd"
|
@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">
|
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
|
||||||
<template #default="scope">
|
<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-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>
|
<span v-if="scope.row.wpr_number_out!==null&&scope.row.wpr_number_out!==undefined">——{{ scope.row.wpr_number_out }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -396,12 +403,13 @@ export default {
|
||||||
wprInputText:"",
|
wprInputText:"",
|
||||||
canMultiple:false,
|
canMultiple:false,
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
hideAdd: true,
|
hideAdd: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
setVisible:false,
|
setVisible:false,
|
||||||
multipleSet:false,
|
multipleSet:false,
|
||||||
checkVisible:false,
|
checkVisible:false,
|
||||||
hasWpr:false,
|
hasWpr:false,
|
||||||
|
pushType:'unshift',
|
||||||
descriptionVisible:false,
|
descriptionVisible:false,
|
||||||
options:[],
|
options:[],
|
||||||
qct_defects:[],
|
qct_defects:[],
|
||||||
|
|
@ -413,6 +421,7 @@ export default {
|
||||||
mlogb: "",
|
mlogb: "",
|
||||||
number: "",
|
number: "",
|
||||||
note: "",
|
note: "",
|
||||||
|
mlogb__batch:"",
|
||||||
isEdit: true,
|
isEdit: true,
|
||||||
},
|
},
|
||||||
setForm:{
|
setForm:{
|
||||||
|
|
@ -575,6 +584,8 @@ export default {
|
||||||
that.$API.wpm.mlogbw.list.req(params).then((res) => {
|
that.$API.wpm.mlogbw.list.req(params).then((res) => {
|
||||||
that.mlogbwlist = [];
|
that.mlogbwlist = [];
|
||||||
if(res.length>0){
|
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) => {
|
res.forEach((item) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj = Object.assign({},item);
|
obj = Object.assign({},item);
|
||||||
|
|
@ -632,19 +643,6 @@ export default {
|
||||||
obj.note = row.note;
|
obj.note = row.note;
|
||||||
//qct不为空,有检验表
|
//qct不为空,有检验表
|
||||||
if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){
|
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 = {};
|
||||||
obj.ftest.ftestitems = [];
|
obj.ftest.ftestitems = [];
|
||||||
obj.ftest.ftestdefects = [];
|
obj.ftest.ftestdefects = [];
|
||||||
|
|
@ -684,7 +682,11 @@ export default {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
}else{
|
}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.$message.success("添加成功");
|
||||||
that.mlogbwlist[editIndex].isEdit = false;
|
that.mlogbwlist[editIndex].isEdit = false;
|
||||||
// that.getList();
|
// that.getList();
|
||||||
|
|
@ -712,8 +714,8 @@ export default {
|
||||||
that.getEqData(index);
|
that.getEqData(index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
formTableDelet(row){
|
formTableDelet(row,index){
|
||||||
this.mlogbwlist.pop();
|
this.mlogbwlist.splice(index, 1);
|
||||||
},
|
},
|
||||||
//删除
|
//删除
|
||||||
formTableDel(id,index) {
|
formTableDel(id,index) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue