fix:mlogbw提交
This commit is contained in:
parent
2dfc51b67d
commit
f93eb0fe89
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- 日志详情 mlog信息以及mlogb -->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
title="日志详情"
|
title="日志详情"
|
||||||
|
|
@ -8,7 +9,6 @@
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||||
<!-- <el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button> -->
|
|
||||||
<el-descriptions>
|
<el-descriptions>
|
||||||
<el-descriptions-item label="工艺路线">{{
|
<el-descriptions-item label="工艺路线">{{
|
||||||
mlogItem.routepack_name
|
mlogItem.routepack_name
|
||||||
|
|
@ -97,11 +97,11 @@
|
||||||
<el-table-column label="主要批次" prop="is_main_batchin">
|
<el-table-column label="主要批次" prop="is_main_batchin">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="scope.row.parent==null ? 'success': 'info'">
|
<el-tag :type="scope.row.parent==null ? 'success': 'info'">
|
||||||
{{scope.row.is_main_batchin==null ? '是' : '否'}}
|
{{scope.row.parent==null ? '是' : '否'}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="加工前不良" prop="count_pn_jgqbl">
|
<el-table-column label="加工前不良" prop="count_pn_jgqbl">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
|
|
@ -116,27 +116,29 @@
|
||||||
width="100px"
|
width="100px"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-link
|
||||||
link
|
:underline="false"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_in_edit(scope.row)"
|
@click="table_in_edit(scope.row)"
|
||||||
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
v-if="mlogItem.submit_time== null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==10"
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-link>
|
||||||
<el-button
|
<el-link
|
||||||
link type="primary"
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
|
v-if="mlogItem.submit_time == null&&mlogItem.material_in_&&mlogItem.material_in_.tracking==20"
|
||||||
@click="table_out_check_single(scope.row,'ins')"
|
@click="table_out_check_single(scope.row,'ins')"
|
||||||
>详情</el-button>
|
>详情</el-link>
|
||||||
<el-button
|
<el-link
|
||||||
link
|
:underline="false"
|
||||||
:disabled="mlogItem.submit_time !== null"
|
:disabled="mlogItem.submit_time !== null"
|
||||||
type="danger"
|
type="danger"
|
||||||
|
style="margin-left: 10px;"
|
||||||
@click="table_in_del(scope.row)"
|
@click="table_in_del(scope.row)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -160,7 +162,7 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="23">
|
<el-col :span="23" v-if="base_code!=='bxerp'">
|
||||||
<el-form-item label="加工前不良" prop="count_pn_jgqbl">
|
<el-form-item label="加工前不良" prop="count_pn_jgqbl">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="saveInForm.count_pn_jgqbl"
|
v-model="saveInForm.count_pn_jgqbl"
|
||||||
|
|
@ -170,6 +172,63 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- <sc-form-table
|
||||||
|
hideDelete
|
||||||
|
:tableHeight="300"
|
||||||
|
v-model="defectlist"
|
||||||
|
:addTemplate="addTemplate"
|
||||||
|
placeholder="暂无数据"
|
||||||
|
>
|
||||||
|
<el-table-column prop="number" label="不合格项">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-select
|
||||||
|
v-model="scope.row.defect"
|
||||||
|
placeholder="不合格项"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in defectOptions"
|
||||||
|
:key="item.defect"
|
||||||
|
:label="item.defect_name"
|
||||||
|
:value="item.defect"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input-number
|
||||||
|
v-model="scope.row.count"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="open" label="操作" width="60" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.id"
|
||||||
|
text
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
@click="formTableDel(scope.row.id)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="formTableSave(scope.row)"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</sc-form-table> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|
@ -231,17 +290,19 @@
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- 批次 -->
|
<!-- 批次 -->
|
||||||
<el-button
|
<el-link
|
||||||
link type="primary"
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null&&mlogItem.material_out_&&mlogItem.material_out_.tracking==10"
|
v-if="mlogItem.submit_time == null&&mlogItem.material_out_&&mlogItem.material_out_.tracking==10"
|
||||||
@click="table_out_check(scope.row)"
|
@click="table_out_check(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-link>
|
||||||
<!-- 单个 -->
|
<!-- 单个 -->
|
||||||
<el-button
|
<el-link
|
||||||
link type="primary"
|
:underline="false"
|
||||||
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null&&mlogItem.material_out_&&mlogItem.material_out_.tracking==20"
|
v-if="mlogItem.submit_time == null&&mlogItem.material_out_&&mlogItem.material_out_.tracking==20"
|
||||||
@click="table_out_check_single(scope.row,'outs')"
|
@click="table_out_check_single(scope.row,'outs')"
|
||||||
>详情</el-button>
|
>详情</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -265,7 +326,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="100">
|
<el-table-column width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
<el-link :underline="false" @click="printMaterial(scope.row)" type="primary">物料标签</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -296,6 +357,8 @@
|
||||||
:mlogb="mlogb"
|
:mlogb="mlogb"
|
||||||
:wm = "wm"
|
:wm = "wm"
|
||||||
:qct="qct"
|
:qct="qct"
|
||||||
|
:handle_user="handle_user"
|
||||||
|
:handle_date="handle_date"
|
||||||
@success="handlesCheckSuccess"
|
@success="handlesCheckSuccess"
|
||||||
@closed="dialog.check_single = false"
|
@closed="dialog.check_single = false"
|
||||||
>
|
>
|
||||||
|
|
@ -338,6 +401,7 @@ export default {
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
base_code: this.$TOOL.data.get('BASE_INFO').base.base_code,
|
||||||
loading: false,
|
loading: false,
|
||||||
//表单数据
|
//表单数据
|
||||||
form: {},
|
form: {},
|
||||||
|
|
@ -383,6 +447,7 @@ export default {
|
||||||
options: [],
|
options: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
tableData2:[],
|
tableData2:[],
|
||||||
|
defectOptions:[],
|
||||||
isSingle:true,
|
isSingle:true,
|
||||||
saveInDialog: false,
|
saveInDialog: false,
|
||||||
printVisible:false,
|
printVisible:false,
|
||||||
|
|
@ -396,11 +461,20 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
handle_date:'',
|
||||||
|
handle_user:'',
|
||||||
wm:'',
|
wm:'',
|
||||||
materialOut:'',
|
materialOut:'',
|
||||||
batchContains:'',
|
batchContains:'',
|
||||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||||
printer_name:localStorage.getItem("printer_name")
|
printer_name:localStorage.getItem("printer_name"),
|
||||||
|
addTemplate:{
|
||||||
|
defect: "",
|
||||||
|
count: 1,
|
||||||
|
mlogb: "",
|
||||||
|
isEdit: true,
|
||||||
|
},
|
||||||
|
defectlist:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -471,7 +545,25 @@ export default {
|
||||||
table_in_edit(row) {
|
table_in_edit(row) {
|
||||||
this.saveInForm = row;
|
this.saveInForm = row;
|
||||||
this.saveInDialog = true;
|
this.saveInDialog = true;
|
||||||
|
// this.getdefects(row.qct);
|
||||||
},
|
},
|
||||||
|
// getdefects(qct){
|
||||||
|
// let that = this;
|
||||||
|
// that.$API.qm.qct.item.req(qct).then((res) => {
|
||||||
|
// that.defectOptions = [];
|
||||||
|
// that.defectOptions = res.qct_defects;
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// formTableSave(row){
|
||||||
|
// let that = this;
|
||||||
|
// let obj = new Object();
|
||||||
|
// obj.count = row.count;
|
||||||
|
// obj.defect = row.defect;
|
||||||
|
// obj.mlogb = that.saveInForm.id;
|
||||||
|
// that.$API.wpm.mlogbdefect.create.req(obj).then((res) => {
|
||||||
|
|
||||||
|
// })
|
||||||
|
// },
|
||||||
//提交自检
|
//提交自检
|
||||||
saveInSubmit() {
|
saveInSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -518,13 +610,12 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
table_out_check_single(row,type){
|
table_out_check_single(row,type){
|
||||||
this.dialog.check_single = true;
|
|
||||||
this.mlogb = row.id;
|
this.mlogb = row.id;
|
||||||
this.wm = row.wm_in;
|
this.wm = row.wm_in;
|
||||||
this.qct = row.qct;
|
this.qct = row.qct;
|
||||||
let obj = {};
|
this.handle_date=this.mlogItem.handle_date;
|
||||||
Object.assign(obj, row);
|
this.handle_user = this.mlogItem.handle_user;
|
||||||
obj.mgroup_name = this.mlogItem.mgroup_name;
|
this.dialog.check_single = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.checkDialogSingle.open(type);
|
this.$refs.checkDialogSingle.open(type);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!-- 新增mlogbIn -->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="添加日志详情"
|
title="添加日志详情"
|
||||||
|
|
@ -184,6 +185,7 @@ export default {
|
||||||
return item.batch == wm_in;
|
return item.batch == wm_in;
|
||||||
});
|
});
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
|
that.form.batch = wm_in;
|
||||||
that.form.wm_in = arr[0].id;
|
that.form.wm_in = arr[0].id;
|
||||||
that.form.count_use = arr[0].count;
|
that.form.count_use = arr[0].count;
|
||||||
if(that.tracking==10){}else{
|
if(that.tracking==10){}else{
|
||||||
|
|
@ -202,9 +204,10 @@ export default {
|
||||||
that.$message.success("添加成功");
|
that.$message.success("添加成功");
|
||||||
that.$emit("success");
|
that.$emit("success");
|
||||||
that.wm_in = '';
|
that.wm_in = '';
|
||||||
that.mtask = '';
|
that.form.mtask = '';
|
||||||
that.batch = '';
|
that.form.batch = '';
|
||||||
that.parent = '';
|
that.form.parent = '';
|
||||||
|
that.form.count_use = 0;
|
||||||
}).catch((err) => {});
|
}).catch((err) => {});
|
||||||
},
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,83 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input-number
|
||||||
|
v-if="item.testitem_field_type=='input-number'"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
<el-input-number
|
||||||
|
v-if="item.testitem_field_type=='input-int'"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
:min="0"
|
||||||
|
class="width-100"
|
||||||
|
controls-position="right"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
<el-input
|
||||||
|
v-if="item.testitem_field_type=='input-text'"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
<el-select
|
||||||
|
v-if="item.testitem_field_type=='select-text'"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
clearable
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item0 in item.testitem_choices"
|
||||||
|
:key="item0"
|
||||||
|
:label="item0"
|
||||||
|
:value="item0"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-select
|
||||||
|
v-if="item.testitem_field_type=='selects-text'"
|
||||||
|
v-model="scope.row[item.testitem_name]"
|
||||||
|
clearable
|
||||||
|
multiple
|
||||||
|
class="width-100"
|
||||||
|
@change="defectCountSun(scope.row)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.testitem_choices"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="note" :label="item.defect_name" v-for="item in qct_defects" :key="item.id">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-switch
|
||||||
|
:disabled="!scope.row.isEdit"
|
||||||
|
v-model="scope.row[item.defect_name]"
|
||||||
|
style="--el-switch-on-color: red"
|
||||||
|
@change="switchChange(scope.row, item)"
|
||||||
|
></el-switch>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="note" label="备注">
|
<el-table-column prop="note" label="备注">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="!scope.row.isEdit">{{ scope.row.note }}</span>
|
<span v-if="!scope.row.isEdit">{{ scope.row.note }}</span>
|
||||||
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="open" label="操作" width="125" align="center">
|
<el-table-column prop="open" label="操作" width="60" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.isEdit"
|
v-if="scope.row.isEdit"
|
||||||
|
|
@ -67,7 +137,6 @@
|
||||||
@click="formTableDel(scope.row.id)"
|
@click="formTableDel(scope.row.id)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</sc-form-table>
|
</sc-form-table>
|
||||||
|
|
@ -85,6 +154,18 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: "",
|
||||||
},
|
},
|
||||||
|
qct: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
handle_user:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
handle_date:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ["success", "closed"],
|
emits: ["success", "closed"],
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -101,6 +182,8 @@ export default {
|
||||||
params: {mlogb:'',page:0},
|
params: {mlogb:'',page:0},
|
||||||
visible: false,
|
visible: false,
|
||||||
options:[],
|
options:[],
|
||||||
|
qct_defects:[],
|
||||||
|
qct_testitems:[],
|
||||||
mlogbwlist:[],
|
mlogbwlist:[],
|
||||||
addTemplate:{
|
addTemplate:{
|
||||||
mlogb: "",
|
mlogb: "",
|
||||||
|
|
@ -117,6 +200,7 @@ export default {
|
||||||
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
|
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
|
||||||
that.getList();
|
that.getList();
|
||||||
that.getOptions();
|
that.getOptions();
|
||||||
|
that.getdefects();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(mode = "ins") {
|
open(mode = "ins") {
|
||||||
|
|
@ -124,6 +208,28 @@ export default {
|
||||||
console.log(this.mode);
|
console.log(this.mode);
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
|
getdefects(){
|
||||||
|
let that = this;
|
||||||
|
that.$API.qm.qct.item.req(that.qct).then((res) => {
|
||||||
|
that.qct_defects = [];
|
||||||
|
res.qct_defects.forEach((item) => {
|
||||||
|
that.addTemplate[item.defect_name] = false;
|
||||||
|
})
|
||||||
|
that.qct_defects = res.qct_defects;
|
||||||
|
that.qct_testitems = [];
|
||||||
|
res.qct_testitems.forEach((item2) => {
|
||||||
|
that.addTemplate[item2.testitem_name] = '';
|
||||||
|
let obj2 = Object.assign({}, item2);
|
||||||
|
obj2.value = '';
|
||||||
|
if(obj2.testitem_field_type=='select-text'||obj2.testitem_field_type=='selects-text'){
|
||||||
|
let str = obj2.testitem_choices.replace(/'/g, '"');
|
||||||
|
let arr = JSON.parse(str);
|
||||||
|
obj2.testitem_choices = arr;
|
||||||
|
}
|
||||||
|
that.qct_testitems.push(obj2);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
getOptions(){
|
getOptions(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.wpm.wpr.req({wm:that.wm,page:0}).then((res) => {
|
that.$API.wpm.wpr.req({wm:that.wm,page:0}).then((res) => {
|
||||||
|
|
@ -148,6 +254,16 @@ export default {
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
let obj = Object.assign({},item);
|
let obj = Object.assign({},item);
|
||||||
obj.isEdit = false;
|
obj.isEdit = false;
|
||||||
|
if(item.ftest.ftestdefects.length>0){
|
||||||
|
item.ftest.ftestdefects.forEach((item1) => {
|
||||||
|
obj[item1.defect_name] = item1.has;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(item.ftest.ftestitems.length>0){
|
||||||
|
item.ftest.ftestitems.forEach((item2) => {
|
||||||
|
obj[item2.testitem_name] = item2.test_val_json;
|
||||||
|
})
|
||||||
|
}
|
||||||
that.mlogbwlist.push(obj);
|
that.mlogbwlist.push(obj);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -156,8 +272,37 @@ export default {
|
||||||
//添加
|
//添加
|
||||||
formTableSave(row) {
|
formTableSave(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
obj.number = row.number;
|
||||||
|
obj.mlogb = row.mlogb;
|
||||||
|
obj.note = row.note;
|
||||||
|
obj.ftest = {};
|
||||||
|
obj.ftest.test_date = that.handle_date;
|
||||||
|
obj.ftest.test_user = that.handle_user;
|
||||||
|
obj.ftest.qct = that.qct;
|
||||||
|
obj.ftest.ftestitems = [];
|
||||||
|
obj.ftest.ftestdefects = [];
|
||||||
|
if(row.id!=''&&row.id!==undefined&&row.id!==null){
|
||||||
|
obj.id = row.id;
|
||||||
|
}
|
||||||
|
that.qct_defects.forEach((item) => {
|
||||||
|
let itemObj = {};
|
||||||
|
itemObj.defect = item.defect;
|
||||||
|
itemObj.test_user = that.handle_user;
|
||||||
|
itemObj.has = row[item.defect_name]?row[item.defect_name]:false;
|
||||||
|
obj.ftest.ftestdefects.push(itemObj);
|
||||||
|
})
|
||||||
|
that.qct_testitems.forEach((item1) => {
|
||||||
|
let itemObj1 = {};
|
||||||
|
itemObj1.testitem = item1.testitem;
|
||||||
|
itemObj1.test_user = that.handle_user;
|
||||||
|
itemObj1.test_val_json = row[item1.testitem_name];
|
||||||
|
obj.ftest.ftestitems.push(itemObj1);
|
||||||
|
})
|
||||||
|
console.log('row:',row);
|
||||||
|
console.log('obj:',obj);
|
||||||
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
if(row.id!==''&&row.id!==undefined&&row.id!==null){
|
||||||
that.$API.wpm.mlogbw.update.req(row.id,row).then((res) => {
|
that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
||||||
that.$message.success("保存成功");
|
that.$message.success("保存成功");
|
||||||
that.getList();
|
that.getList();
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -165,7 +310,7 @@ export default {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
that.$API.wpm.mlogbw.create.req(row).then((res) => {
|
that.$API.wpm.mlogbw.create.req(obj).then((res) => {
|
||||||
that.$message.success("添加成功");
|
that.$message.success("添加成功");
|
||||||
that.getList();
|
that.getList();
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -196,6 +341,18 @@ export default {
|
||||||
});
|
});
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
|
switchChange(row,item){
|
||||||
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
obj = Object.assign({},item);
|
||||||
|
// that.$API.wpm.mlogbw.update.req(row.id,obj).then((res) => {
|
||||||
|
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
//表单提交方法
|
||||||
|
mlogbwSubmit() {
|
||||||
|
let that = this;
|
||||||
|
},
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogbSubmit() {
|
mlogbSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -205,6 +362,16 @@ export default {
|
||||||
that.$message.success("操作成功");
|
that.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
defectCountSun(row){
|
||||||
|
let that = this;
|
||||||
|
let index = that.mlogbwlist.indexOf(row);
|
||||||
|
that.qct_defects.forEach(item => {
|
||||||
|
let str = item.rule_expression.replace(/`/g, '');
|
||||||
|
str = str.replace(/\${(.*?)}/g, 'row.\$1')
|
||||||
|
let judge = eval(str);
|
||||||
|
that.mlogbwlist[index][item.defect_name] = judge;
|
||||||
|
});
|
||||||
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
this.selectionFilters = filters;
|
this.selectionFilters = filters;
|
||||||
|
|
@ -241,4 +408,8 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style scoped>
|
||||||
|
.width-100{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue