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-tag :type="wmState[mlogItem.wm_in_state]?.type">{{ wmState[mlogItem.wm_in_state]?.text }}</el-tag>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</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
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null"
|
v-if="mlogItem.submit_time == null"
|
||||||
|
|
@ -485,6 +489,13 @@ export default {
|
||||||
print
|
print
|
||||||
},
|
},
|
||||||
emits: ["success", "closed"],
|
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wmState,
|
wmState,
|
||||||
|
|
@ -976,6 +987,7 @@ export default {
|
||||||
submitFun(){
|
submitFun(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
|
const doSubmit = () => {
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
|
|
@ -984,6 +996,16 @@ export default {
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
that.isSaveing = false;
|
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){
|
saveMuserSubmit(row){
|
||||||
let that = this;
|
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-link :href="mlogItem.test_file" target="_blank" type="primary" :underline="false">{{mlogItem.test_file}}</el-link>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</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
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null"
|
v-if="mlogItem.submit_time == null"
|
||||||
|
|
@ -397,6 +401,13 @@ export default {
|
||||||
printDialog
|
printDialog
|
||||||
},
|
},
|
||||||
emits: ["success", "closed"],
|
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
wmState,
|
wmState,
|
||||||
|
|
@ -638,11 +649,25 @@ export default {
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
mlogSubmit() {
|
mlogSubmit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.isSaveing = true;
|
||||||
|
const doSubmit = () => {
|
||||||
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
that.visible = false;
|
that.visible = false;
|
||||||
that.$message.success("操作成功");
|
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() {
|
// getInit() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue