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="事件种类" width="240" :show-overflow-tooltip="true">
<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>
</el-table-column>
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
<el-table-column label="事件类型" prop="obj_cate" width="100">
<template #default="scope">
{{ objCateOptions[scope.row.obj_cate] }}
</template>
</el-table-column>
<el-table-column label="事件对象" :show-overflow-tooltip="true">
<template #default="scope">
<span v-if="scope.row.opl">{{ scope.row.operation_name }}</span>
<span v-else-if="scope.row.employee">
{{ eTypeOptions[scope.row.employee_.type] }}-{{ scope.row.employee_.name }}-{{
scope.row.employee_.belong_dept_name }}
scope.row.employee_.belong_dept_name }}
</span>
</template>
</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_desc" width="150" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="事件标记" prop="mark">
<template #default="scope">
<el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag>
<el-tag v-else type="success" effect="plain">正确</el-tag>
</template>
</el-table-column>
<el-table-column label="处理超时">
<template #default="scope">
<el-tag v-if="scope.row.is_timeout" type="warning"></el-tag>
<el-tag v-else type="success" effect="plain"></el-tag>
@ -60,6 +66,7 @@
</el-table-column>
<el-table-column label="操作" fixed="right" align="center">
<template #default="scope">
<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"
@ -80,6 +87,7 @@
</el-drawer>
</el-container>
</template>
<script>
import detailDialog from "./event_handlefrom.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>
</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-main class="nopadding">
<el-container>

View File

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

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

View File

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