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

View File

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