This commit is contained in:
shijing 2024-03-04 17:13:05 +08:00
commit c9f78b5d6a
6 changed files with 92 additions and 46 deletions

View File

@ -25,34 +25,40 @@
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="事件种类" width="240" :show-overflow-tooltip="true"> <el-table-column label="事件种类" width="240" :show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
<el-tag v-for="item in scope.row.cates_" :key="item.id" type="warning" effect="plain">{{ item.name }}</el-tag> <el-tag v-for="item in scope.row.cates_" :key="item.id" type="warning" effect="plain">{{ item.name
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生区域" prop="area_.name"></el-table-column> <el-table-column label="发生区域" prop="area_.name"></el-table-column>
<el-table-column label="事件类型" prop="obj_cate" width="100"> <el-table-column label="事件类型" prop="obj_cate" width="100">
<template #default="scope"> <template #default="scope">
{{ objCateOptions[scope.row.obj_cate] }} {{ objCateOptions[scope.row.obj_cate] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="事件对象" :show-overflow-tooltip="true"> <el-table-column label="事件对象" :show-overflow-tooltip="true">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.opl">{{ scope.row.operation_name }}</span> <span v-if="scope.row.opl">{{ scope.row.operation_name }}</span>
<span v-else-if="scope.row.employee"> <span v-else-if="scope.row.employee">
{{ eTypeOptions[scope.row.employee_.type] }}-{{ scope.row.employee_.name }}-{{ {{ eTypeOptions[scope.row.employee_.type] }}-{{ scope.row.employee_.name }}-{{
scope.row.employee_.belong_dept_name }} scope.row.employee_.belong_dept_name }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发生时间" prop="create_time" width="150"></el-table-column> <el-table-column label="发生时间" prop="create_time" width="150"></el-table-column>
<el-table-column label="处理人" prop="handle_user_name"></el-table-column> <el-table-column label="处理人" prop="handle_user_name"></el-table-column>
<el-table-column label="处理描述" prop="handle_desc" width="150" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="事件标记" prop="mark"> <el-table-column label="事件标记" prop="mark">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag> <el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag>
<el-tag v-else type="success" effect="plain">正确</el-tag> <el-tag v-else type="success" effect="plain">正确</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理超时"> <el-table-column label="处理超时">
<template #default="scope"> <template #default="scope">
<el-tag v-if="scope.row.is_timeout" type="warning"></el-tag> <el-tag v-if="scope.row.is_timeout" type="warning"></el-tag>
<el-tag v-else type="success" effect="plain"></el-tag> <el-tag v-else type="success" effect="plain"></el-tag>
@ -60,6 +66,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center"> <el-table-column label="操作" fixed="right" align="center">
<template #default="scope"> <template #default="scope">
<el-button link type="info" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button> <el-button link type="info" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
<el-button link type="primary" size="small" v-if="scope.row.handle_user == null" <el-button link type="primary" size="small" v-if="scope.row.handle_user == null"
@ -80,6 +87,7 @@
</el-drawer> </el-drawer>
</el-container> </el-container>
</template> </template>
<script> <script>
import detailDialog from "./event_handlefrom.vue"; import detailDialog from "./event_handlefrom.vue";
import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue"; import { CircleCheckFilled, CircleCloseFilled } from "@element-plus/icons-vue";

View File

@ -6,6 +6,10 @@
<scFileImport :templateUrl="materialTemplate" accept=".xlsx" :apiObj="$API.common.upload" @success="upSuccess"> <scFileImport :templateUrl="materialTemplate" accept=".xlsx" :apiObj="$API.common.upload" @success="upSuccess">
</scFileImport> </scFileImport>
</div> </div>
<div class="right-panel">
<el-input v-model="query.search" placeholder="名称" clearable></el-input>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
</div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<el-container> <el-container>

View File

@ -108,12 +108,16 @@
<el-table-column label="规格" prop="mlogb" width="300"> <el-table-column label="规格" prop="mlogb" width="300">
<template #default="scope"> <template #default="scope">
<div v-for="item in scope.row.mlogb" :key="item" class="cateItem" <div v-if="scope.row.mlogb.length > 0">
style=""> <div v-for="item in scope.row.mlogb" :key="item" class="cateItem"
<span>{{ item.material_out_name }}|</span> style="">
<span style="color:darkblue; font-weight: bold;">{{ item.count_ok <span>{{ item.material_out_name }}|</span>
}}</span> <span style="color:darkblue; font-weight: bold;">{{
item.count_ok
}}</span>
</div>
</div> </div>
<div v-else>{{ scope.row.material_out_name }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合格总数" prop="count_ok"> <el-table-column label="合格总数" prop="count_ok">

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

@ -30,22 +30,24 @@
<el-table-column label="不合格数" prop="count_notok"> <el-table-column label="不合格数" prop="count_notok">
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180"> <el-table-column label="操作" fixed="right" align="center" width="180">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" :disabled="scope.row.submit_user != null" <el-button link type="primary" v-if="scope.row.submit_time == null"
@click="table_edit(scope.row)" v-auth="'mlog.update'"> @click="table_edit(scope.row)" v-auth="'mlog.update'">
编辑 编辑
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'"
v-if="scope.row.submit_time == null">
删除
</el-button>
<el-button link type="success" v-if="scope.row.submit_user == null" <el-button link type="success" v-if="scope.row.submit_user == null"
@click="table_submit(scope.row)" v-auth="'mlog.submit'"> @click="table_submit(scope.row)" v-auth="'mlog.submit'">
提交 提交
</el-button> </el-button>
<el-button link type="warning" v-else @click="table_revert(scope.row)" <el-button link type="warning" v-if="scope.row.submit_time != null"
v-auth="'mlog.submit'"> @click="table_revert(scope.row)" v-auth="'mlog.submit'">
撤回 撤回
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'">
删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -71,6 +73,7 @@
<el-table-column label="送料日期" prop="send_date"> <el-table-column label="送料日期" prop="send_date">
</el-table-column> </el-table-column>
<el-table-column label="产物" prop="material" show-overflow-tooltip> <el-table-column label="产物" prop="material" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_out_"> <span v-if="scope.row.material_out_">
{{ scope.row.material_out_.full_name }} {{ scope.row.material_out_.full_name }}
@ -85,12 +88,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" width="100"> <el-table-column label="操作" fixed="right" align="left" width="100">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="handover_edit(scope.row)" <el-button link type="primary" @click="handover_edit(scope.row)"
v-auth="'handover.update'" v-if="scope.row.submit_time == null"> v-auth="'handover.update'" v-if="scope.row.submit_time == null">
@ -121,24 +126,28 @@
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe <scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe
hidePagination> 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">
@ -213,6 +222,7 @@
@closed="dialogSave = false"> @closed="dialogSave = false">
</save-dialog> </save-dialog>
</template> </template>
<script> <script>
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
export default { export default {

View File

@ -848,14 +848,19 @@ export default {
this.form.count_n_js + this.form.count_n_js +
this.form.count_n_qx + this.form.count_n_qx +
this.form.count_break; this.form.count_break;
this.form.count_real = this.form.count_ok + this.form.count_notok;
this.form.count_use = this.form.count_real;
} }
}, },
countOkSun() { countOkSun() {
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;
}
this.countChange(); this.countChange();
}, },
// //
@ -881,11 +886,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 =
@ -897,6 +905,8 @@ export default {
this.form.count_n_js + this.form.count_n_js +
this.form.count_n_qx + this.form.count_n_qx +
this.form.count_break; this.form.count_break;
this.form.count_real = this.form.count_ok + this.form.count_notok;
this.form.count_use = this.form.count_real;
} }
if (this.activeType == "10车间") { if (this.activeType == "10车间") {
let mlogb = this.mlogb; let mlogb = this.mlogb;