Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
9ec1c19b58
|
|
@ -58,7 +58,11 @@
|
|||
<el-tag :type="wmState[mlogItem.wm_in_state]?.type">{{ wmState[mlogItem.wm_in_state]?.text }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="padding: 5px 10px;display: flex;justify-content: end;">
|
||||
<div style="padding: 5px 10px;display: flex;justify-content: end;align-items: center;">
|
||||
<div v-if="mlogItem.submit_time == null && hasOkBDefect" style="margin-right: 16px;display:flex;align-items:center;">
|
||||
<span style="margin-right: 6px;">合格B类不拆批</span>
|
||||
<el-switch v-model="mlogItem.clear_defect"></el-switch>
|
||||
</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="mlogItem.submit_time == null"
|
||||
|
|
@ -485,6 +489,13 @@ export default {
|
|||
print
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
computed: {
|
||||
hasOkBDefect() {
|
||||
const rows = this.tableData2 || [];
|
||||
return rows.some(row => Array.isArray(row.mlogbdefect)
|
||||
&& row.mlogbdefect.some(d => Number(d.defect_okcate) === 20 && Number(d.count) > 0));
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
wmState,
|
||||
|
|
@ -976,14 +987,25 @@ export default {
|
|||
submitFun(){
|
||||
let that = this;
|
||||
that.isSaveing = true;
|
||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit('closed',false);
|
||||
that.$message.success("操作成功");
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
});
|
||||
const doSubmit = () => {
|
||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit('closed',false);
|
||||
that.$message.success("操作成功");
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
});
|
||||
};
|
||||
if (that.hasOkBDefect) {
|
||||
that.$API.wpm.mlog.change.req(that.mlogItem.id, { clear_defect: !!that.mlogItem.clear_defect }).then(() => {
|
||||
doSubmit();
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
});
|
||||
} else {
|
||||
doSubmit();
|
||||
}
|
||||
},
|
||||
saveMuserSubmit(row){
|
||||
let that = this;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,11 @@
|
|||
<el-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div style="padding: 5px 10px;display: flex;justify-content: end;">
|
||||
<div style="padding: 5px 10px;display: flex;justify-content: end;align-items: center;">
|
||||
<div v-if="mlogItem.submit_time == null && hasOkBDefect" style="margin-right: 16px;display:flex;align-items:center;">
|
||||
<span style="margin-right: 6px;">合格B类不拆批</span>
|
||||
<el-switch v-model="mlogItem.clear_defect"></el-switch>
|
||||
</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="mlogItem.submit_time == null"
|
||||
|
|
@ -397,6 +401,13 @@ export default {
|
|||
printDialog
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
computed: {
|
||||
hasOkBDefect() {
|
||||
const rows = this.tableData2 || [];
|
||||
return rows.some(row => Array.isArray(row.mlogbdefect)
|
||||
&& row.mlogbdefect.some(d => Number(d.defect_okcate) === 20 && Number(d.count) > 0));
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
wmState,
|
||||
|
|
@ -638,11 +649,25 @@ export default {
|
|||
//表单提交方法
|
||||
mlogSubmit() {
|
||||
let that = this;
|
||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
});
|
||||
that.isSaveing = true;
|
||||
const doSubmit = () => {
|
||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$message.success("操作成功");
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
});
|
||||
};
|
||||
if (that.hasOkBDefect) {
|
||||
that.$API.wpm.mlog.change.req(that.mlogItem.id, { clear_defect: !!that.mlogItem.clear_defect }).then(() => {
|
||||
doSubmit();
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
});
|
||||
} else {
|
||||
doSubmit();
|
||||
}
|
||||
},
|
||||
// //渲染工单提交按钮
|
||||
// getInit() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue