feat: 10车间可直接出产物(无兄弟件)

This commit is contained in:
caoqianming 2024-03-04 15:16:20 +08:00
parent 2a316c2c56
commit 59522261b7
2 changed files with 33 additions and 20 deletions

View File

@ -15,7 +15,7 @@
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="paramsMtask" :query="queryMtask"
@row-click="rowClick">
<el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number" width="130">
<el-table-column label="任务编号" prop="number" width="150">
</el-table-column>
<el-table-column label="产物" prop="material_out_name" show-overflow-tooltip width="250">
</el-table-column>
@ -45,7 +45,8 @@
</div>
</el-header>
<el-main>
<scTable ref="tableprocess" row-key="id" stripe :hideDo="hideDo" :data="processList" @row-click="itemClick">
<scTable ref="tableprocess" row-key="id" stripe :hideDo="hideDo" :data="processList"
@row-click="itemClick">
<el-table-column label="任务编号" prop="number" width="150">
</el-table-column>
<el-table-column label="日期" prop="start_date" width="120">
@ -59,6 +60,7 @@
<el-table-column label="提交人" prop="submit_user_name">
</el-table-column>
<el-table-column label="操作" fixed="right" width="60">
<template #default="scope">
<el-link type="primary" @click.stop="table_submit(scope.row)" v-auth="'mtask.submit'"
v-if="scope.row.state != 40">提交
@ -96,12 +98,14 @@
<el-table-column label="接收人" prop="recive_user_name">
</el-table-column>
<el-table-column label="是否确认" prop="submit_time">
<template #default="scope">
<span v-if="scope.row.submit_time"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="left">
<template #default="scope">
<el-button link type="primary" @click.stop="handover_submit(scope.row)" v-auth="'handover.submit'"
v-if="scope.row.submit_time == null">
@ -128,24 +132,28 @@
<el-main style="padding: 0;">
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe hidePagination>
<el-table-column label="物料名" prop="material">
<template #default="scope">
{{ scope.row.material_.name }}
</template>
</el-table-column>
<el-table-column label="规格" prop="material">
<template #default="scope">
{{ scope.row.material_.specification }}
</template>
</el-table-column>
<el-table-column label="型号" prop="material">
<template #default="scope">
{{ scope.row.material_.model }}
</template>
</el-table-column>
<el-table-column label="已到工序" prop="material">
<template #default="scope">{{
scope.row.material_.process_name
}}</template>
scope.row.material_.process_name
}}</template>
</el-table-column>
<el-table-column label="批次" prop="batch"> </el-table-column>
<el-table-column label="数量" prop="count" width="80">
@ -158,6 +166,7 @@
</el-main>
</el-container>
</template>
<script>
export default {
data() {
@ -230,20 +239,20 @@ export default {
this.$refs.table.queryData(this.queryMtask);
},
table_submit(row) {
let lengths = row.mlogs.length,infoText = '';
if(lengths>0){
infoText = '该任务有'+lengths+'条日志,确定提交吗?';
}else{
infoText = '该任务没有日志,确定提交吗?';
let lengths = row.mlogs.length, infoText = '';
if (lengths > 0) {
infoText = '该任务有' + lengths + '条日志,确定提交吗?';
} else {
infoText = '该任务没有日志,确定提交吗?';
}
this.$confirm(infoText, "提示", {
type: "warning",
type: "warning",
}).then(() => {
this.$API.pm.mtask.submit.req(row.id).then(res => {
this.$message.success('操作成功')
this.$refs.table_mtask.refresh()
this.mtaskClick(this.currentMtask)
}).catch(err => {})
this.$API.pm.mtask.submit.req(row.id).then(res => {
this.$message.success('操作成功')
this.$refs.table_mtask.refresh()
this.mtaskClick(this.currentMtask)
}).catch(err => { })
})
},
handover_submit(row) {
@ -255,6 +264,7 @@ export default {
}
}
</script>
<style scoped>
.tabsHeader {
display: inline-block;

View File

@ -883,11 +883,14 @@ export default {
this.form.count_n_dxt +
this.form.count_n_js +
this.form.count_n_qx;
let ok_number = 0;
this.mlogb.forEach((item) => {
ok_number += item.count_ok;
});
this.form.count_ok = ok_number;
if (this.mlogb.length > 0) {
let ok_number = 0;
this.mlogb.forEach((item) => {
ok_number += item.count_ok;
});
this.form.count_ok = ok_number;
}
} else if (this.activeType == "退火") {
// this.form.mgroup = "3428194648706011136";
this.form.count_notok =