fix:6、7、10车间可以显示已终止的任务
This commit is contained in:
parent
d4809de933
commit
4c935cb4a2
|
@ -6,50 +6,111 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker v-model="queryMtask.start_date" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="工作日期" @change="handleQueryMtask" />
|
||||
<el-date-picker
|
||||
v-model="queryMtask.start_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="工作日期"
|
||||
@change="handleQueryMtask"
|
||||
/>
|
||||
<el-checkbox
|
||||
style="margin-left: 10px"
|
||||
v-model="queryMtaskState"
|
||||
label="已终止"
|
||||
@change="handleQueryMtask"
|
||||
/>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table_mtask" :apiObj="apiMtask" row-key="id" stripe :params="paramsMtask"
|
||||
:query="queryMtask" @row-click="mtaskClick">
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
<scTable
|
||||
ref="table_mtask"
|
||||
:apiObj="apiMtask"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="paramsMtask"
|
||||
:query="queryMtask"
|
||||
@row-click="mtaskClick"
|
||||
>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="material"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.name
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格" prop="" width="160">
|
||||
|
||||
<el-table-column
|
||||
label="型号规格"
|
||||
prop=""
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.specification
|
||||
}}|{{ scope.row.material_out_.model }}</span>
|
||||
<span v-if="scope.row.material_out_"
|
||||
>{{
|
||||
scope.row.material_out_
|
||||
.specification
|
||||
}}|{{
|
||||
scope.row.material_out_.model
|
||||
}}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||
<el-table-column
|
||||
label="任务编号"
|
||||
prop="number"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务量" prop="count"> </el-table-column>
|
||||
<el-table-column label="工作日期" prop="start_date">
|
||||
<el-table-column label="任务量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工作日期"
|
||||
prop="start_date"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok"> </el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state !== 40">
|
||||
<el-tag v-if="scope.row.state == 20">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="success">
|
||||
<el-tag v-if="scope.row.state == 30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.state == 34"
|
||||
type="danger"
|
||||
>
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.state == 40"
|
||||
type="success"
|
||||
>
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="60">
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="60"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="table_submit(scope.row)" v-auth="'mtask.submit'"
|
||||
v-if="scope.row.state != 40">提交
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="table_submit(scope.row)"
|
||||
v-auth="'mtask.submit'"
|
||||
v-if="
|
||||
scope.row.state != 40 &&
|
||||
scope.row.state != 34
|
||||
"
|
||||
>提交
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -59,9 +120,14 @@
|
|||
</el-aside>
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<el-header style="height: 30%; padding: 0;">
|
||||
<el-card style="width: 100%; height: 100%; overflow-y: auto;">
|
||||
|
||||
<el-header style="height: 30%; padding: 0">
|
||||
<el-card
|
||||
style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
"
|
||||
>
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>任务信息</span>
|
||||
|
@ -72,18 +138,34 @@
|
|||
</div>
|
||||
</template>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">{{ state_[currentMtask.state]
|
||||
<el-descriptions-item label="任务编号">{{
|
||||
currentMtask.number
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">{{
|
||||
state_[currentMtask.state]
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称">
|
||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name
|
||||
}}</span></el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号"><span v-if="currentMtask.material_out_">{{
|
||||
currentMtask.material_out_.specification
|
||||
}}</span></el-descriptions-item>
|
||||
<el-descriptions-item label="合格数">{{ currentMtask.count_ok
|
||||
<span
|
||||
v-if="currentMtask.material_out_"
|
||||
>{{
|
||||
currentMtask.material_out_.name
|
||||
}}</span
|
||||
></el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="规格型号"
|
||||
><span
|
||||
v-if="currentMtask.material_out_"
|
||||
>{{
|
||||
currentMtask.material_out_
|
||||
.specification
|
||||
}}</span
|
||||
></el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="合格数">{{
|
||||
currentMtask.count_ok
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格数">{{ currentMtask.count_notok
|
||||
<el-descriptions-item label="不合格数">{{
|
||||
currentMtask.count_notok
|
||||
}}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="配粉料数">{{ currentMtask.peifen_kg
|
||||
}}</el-descriptions-item> -->
|
||||
|
@ -94,82 +176,236 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addMlog"
|
||||
v-if="currentMtask && currentMtask.state == 20"
|
||||
v-auth="'mlog.create'">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addMlog"
|
||||
v-if="
|
||||
currentMtask &&
|
||||
currentMtask.state == 20
|
||||
"
|
||||
v-auth="'mlog.create'"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table_mlog" :data="mlogs" row-key="id" stripe hidePagination hideDo>
|
||||
<el-table-column label="班次" prop="shift_name"> </el-table-column>
|
||||
<el-table-column label="批次号" prop="batch"></el-table-column>
|
||||
<el-table-column label="出管总数" prop="count_real">
|
||||
<scTable
|
||||
ref="table_mlog"
|
||||
:data="mlogs"
|
||||
row-key="id"
|
||||
stripe
|
||||
hidePagination
|
||||
hideDo
|
||||
>
|
||||
<el-table-column
|
||||
label="班次"
|
||||
prop="shift_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="mlogb" width="300">
|
||||
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batch"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="出管总数"
|
||||
prop="count_real"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
prop="mlogb"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<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;">{{
|
||||
<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>
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>{{ scope.row.material_out_name }}</div>
|
||||
<div v-else>
|
||||
{{
|
||||
scope.row
|
||||
.material_out_name
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格总数" prop="count_ok">
|
||||
<el-table-column
|
||||
label="合格总数"
|
||||
prop="count_ok"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="count">
|
||||
|
||||
<el-table-column
|
||||
label="合格率"
|
||||
prop="count"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ Math.floor(scope.row.count_ok / scope.row.count_real * 100)
|
||||
}}%</span>
|
||||
<span
|
||||
>{{
|
||||
Math.floor(
|
||||
(scope.row
|
||||
.count_ok /
|
||||
scope.row
|
||||
.count_real) *
|
||||
100
|
||||
)
|
||||
}}%</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因及数量" align="center">
|
||||
<el-table-column label="椭圆/弯曲" prop="count_n_wq">
|
||||
<el-table-column
|
||||
label="不合格原因及数量"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column
|
||||
label="椭圆/弯曲"
|
||||
prop="count_n_wq"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="条纹" prop="count_n_tw">
|
||||
<el-table-column
|
||||
label="条纹"
|
||||
prop="count_n_tw"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="断裂" prop="count_n_dl">
|
||||
<el-table-column
|
||||
label="断裂"
|
||||
prop="count_n_dl"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="偏壁" prop="count_n_pb">
|
||||
<el-table-column
|
||||
label="偏壁"
|
||||
prop="count_n_pb"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="大小头" prop="count_n_dxt">
|
||||
<el-table-column
|
||||
label="大小头"
|
||||
prop="count_n_dxt"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="结石" prop="count_n_js">
|
||||
<el-table-column
|
||||
label="结石"
|
||||
prop="count_n_js"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="气线" prop="count_n_qx">
|
||||
<el-table-column
|
||||
label="气线"
|
||||
prop="count_n_qx"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" prop="count_notok">
|
||||
<el-table-column
|
||||
label="合计"
|
||||
prop="count_notok"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="成型人" prop="handle_user_name">
|
||||
<el-table-column
|
||||
label="成型人"
|
||||
prop="handle_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="带班长" prop="handle_leader_name">
|
||||
<el-table-column
|
||||
label="带班长"
|
||||
prop="handle_leader_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="碎料" prop="count_break"> </el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="120" align="center">
|
||||
|
||||
<el-table-column
|
||||
label="碎料"
|
||||
prop="count_break"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="table_edit(scope.row)"
|
||||
v-auth="'mlog.update'" v-if="scope.row.submit_time == null">编辑
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
table_edit(scope.row)
|
||||
"
|
||||
v-auth="'mlog.update'"
|
||||
v-if="
|
||||
scope.row.submit_time ==
|
||||
null
|
||||
"
|
||||
>编辑
|
||||
</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
|
||||
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="primary" @click="mlog_submit(scope.row)"
|
||||
v-auth="'mlog.submit'" v-if="scope.row.submit_time == null"
|
||||
:loading="mlogHandleLoading">提交
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
mlog_submit(scope.row)
|
||||
"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="
|
||||
scope.row.submit_time ==
|
||||
null
|
||||
"
|
||||
:loading="mlogHandleLoading"
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="mlog_revert(scope.row)"
|
||||
v-auth="'mlog.submit'" v-if="scope.row.submit_time != null"
|
||||
:loading="mlogHandleLoading">撤回
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="
|
||||
mlog_revert(scope.row)
|
||||
"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="
|
||||
scope.row.submit_time !=
|
||||
null
|
||||
"
|
||||
:loading="mlogHandleLoading"
|
||||
>撤回
|
||||
</el-button>
|
||||
<el-button link type="success" @click="table_show(scope.row)">
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="
|
||||
table_show(scope.row)
|
||||
"
|
||||
>
|
||||
日志记录
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -192,37 +428,70 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable ref="table_handover" :apiObj="apiObjHandover" row-key="id" stripe
|
||||
:params="paramsHandover">
|
||||
<scTable
|
||||
ref="table_handover"
|
||||
:apiObj="apiObjHandover"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="paramsHandover"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="送料日期" prop="send_date">
|
||||
<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_">{{
|
||||
<el-table-column
|
||||
label="产物"
|
||||
prop="material"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope"
|
||||
><span v-if="scope.row.material_">{{
|
||||
scope.row.material_.name
|
||||
}}</span>
|
||||
</template>
|
||||
</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">
|
||||
</el-table-column>
|
||||
<el-table-column label="交送人" prop="send_user_name">
|
||||
<el-table-column
|
||||
label="交送人"
|
||||
prop="send_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收人" prop="recive_user_name">
|
||||
<el-table-column
|
||||
label="接收人"
|
||||
prop="recive_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否确认" prop="submit_time">
|
||||
|
||||
<el-table-column
|
||||
label="是否确认"
|
||||
prop="submit_time"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.submit_time">是</span>
|
||||
<span v-if="scope.row.submit_time"
|
||||
>是</span
|
||||
>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left">
|
||||
|
||||
<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">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click.stop="
|
||||
handover_submit(scope.row)
|
||||
"
|
||||
v-auth="'handover.submit'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -238,39 +507,59 @@
|
|||
<span style="font-size: 14px">车间库存</span>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">领料</el-button>
|
||||
<el-button type="primary" @click="tomioin" v-auth="'mio.do'">入库</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="tomio"
|
||||
v-auth="'mio.do'"
|
||||
>领料</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="tomioin"
|
||||
v-auth="'mio.do'"
|
||||
>入库</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<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">
|
||||
|
||||
<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">
|
||||
|
||||
<el-table-column
|
||||
label="已到工序"
|
||||
prop="material"
|
||||
>
|
||||
<template #default="scope">{{
|
||||
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">
|
||||
<el-table-column label="批次" prop="batch">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
prop="count"
|
||||
width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
|
@ -278,22 +567,46 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup" :mtaskDate="mtaskDate"
|
||||
:material_out="material_out" :material_model="material_model" :brothersList="brothersList"
|
||||
:material_in="material_in" :activeType="activeName" @success="handleSaveSuccess"
|
||||
@closed="dialogSave = false"></save-dialog>
|
||||
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
||||
<save-dialog
|
||||
v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
:mtask="currentMtask.id"
|
||||
:mgroup="mgroup"
|
||||
:mtaskDate="mtaskDate"
|
||||
:material_out="material_out"
|
||||
:material_model="material_model"
|
||||
:brothersList="brothersList"
|
||||
:material_in="material_in"
|
||||
:activeType="activeName"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false"
|
||||
></save-dialog>
|
||||
<showDrawer
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:mlogId="mlogId"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
</showDrawer>
|
||||
<el-dialog title="编辑任务" v-model="addMtaskInfoVisible">
|
||||
<el-form :model="addMtaskInfoForm">
|
||||
<el-form-item label="配分料数(kg)" width="100">
|
||||
<el-input-number v-model="addMtaskInfoForm.peifen_kg" controls-position="right" :min="0" :step="1"
|
||||
:step-strictly="true" style="width: 100%" placeholder="请输入">
|
||||
<el-input-number
|
||||
v-model="addMtaskInfoForm.peifen_kg"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
:step="1"
|
||||
:step-strictly="true"
|
||||
style="width: 100%"
|
||||
placeholder="请输入"
|
||||
>
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-footer>
|
||||
<el-button type="primary" @click="updateMtaskSubmit">确定</el-button>
|
||||
<el-button type="primary" @click="updateMtaskSubmit"
|
||||
>确定</el-button
|
||||
>
|
||||
<el-button @click="addMtaskInfoVisible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-dialog>
|
||||
|
@ -305,14 +618,15 @@ import saveDialog from "./worktask_form.vue";
|
|||
import showDrawer from "./mlog_drawer.vue";
|
||||
export default {
|
||||
components: {
|
||||
saveDialog, showDrawer
|
||||
saveDialog,
|
||||
showDrawer,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mlogHandleLoading: false,
|
||||
addMtaskInfoForm: {},
|
||||
addMtaskInfoVisible: false,
|
||||
activeName: '10车间',
|
||||
activeName: "10车间",
|
||||
mlogs: [],
|
||||
currentDept: {},
|
||||
currentMtask: {},
|
||||
|
@ -323,6 +637,7 @@ export default {
|
|||
10: "创建中",
|
||||
20: "已下达",
|
||||
30: "生产中",
|
||||
34: "已终止",
|
||||
40: "已提交",
|
||||
},
|
||||
brothersList: [],
|
||||
|
@ -333,38 +648,45 @@ export default {
|
|||
dialogSave: false,
|
||||
paramsHandover: {},
|
||||
paramsWm: {},
|
||||
mgroup: '',
|
||||
mlogId: '',
|
||||
mtaskDate: '',
|
||||
material_out: '',
|
||||
material_model: '',
|
||||
}
|
||||
mgroup: "",
|
||||
mlogId: "",
|
||||
mtaskDate: "",
|
||||
material_out: "",
|
||||
material_model: "",
|
||||
queryMtaskState: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initDept()
|
||||
this.initDept();
|
||||
},
|
||||
methods: {
|
||||
mlog_revert(row) {
|
||||
this.mlogHandleLoading = true;
|
||||
this.$API.wpm.mlog.revert.req(row.id).then(res => {
|
||||
this.$API.wpm.mlog.revert
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("撤回成功");
|
||||
this.mtaskClick(this.currentMtask)
|
||||
this.$refs.table_wm.refresh()
|
||||
this.mlogHandleLoading = false;
|
||||
}).catch(e => {
|
||||
this.mtaskClick(this.currentMtask);
|
||||
this.$refs.table_wm.refresh();
|
||||
this.mlogHandleLoading = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.mlogHandleLoading = false;
|
||||
});
|
||||
},
|
||||
addMtaskInfo() {
|
||||
this.addMtaskInfoForm.peifen_kg = this.currentMtask.peifen_kg
|
||||
this.addMtaskInfoVisible = true
|
||||
this.addMtaskInfoForm.peifen_kg = this.currentMtask.peifen_kg;
|
||||
this.addMtaskInfoVisible = true;
|
||||
},
|
||||
updateMtaskSubmit() {
|
||||
this.$API.pm.mtask.addInfo.req(this.currentMtask.id, this.addMtaskInfoForm).then(res => {
|
||||
this.currentMtask.peifen_kg = this.addMtaskInfoForm.peifen_kg
|
||||
this.addMtaskInfoVisible = false
|
||||
this.$message.success('操作成功')
|
||||
})
|
||||
this.$API.pm.mtask.addInfo
|
||||
.req(this.currentMtask.id, this.addMtaskInfoForm)
|
||||
.then((res) => {
|
||||
this.currentMtask.peifen_kg =
|
||||
this.addMtaskInfoForm.peifen_kg;
|
||||
this.addMtaskInfoVisible = false;
|
||||
this.$message.success("操作成功");
|
||||
});
|
||||
},
|
||||
tomio() {
|
||||
this.$router.push({ name: "mainso_mio" });
|
||||
|
@ -373,51 +695,62 @@ export default {
|
|||
this.$router.push({ name: "halfgood_mio" });
|
||||
},
|
||||
initDept() {
|
||||
this.$API.system.dept.list.req({ page: 0, name: '10车间' }).then(res => {
|
||||
this.$API.system.dept.list
|
||||
.req({ page: 0, name: "10车间" })
|
||||
.then((res) => {
|
||||
if (res.length == 1) {
|
||||
this.currentDept = res[0]
|
||||
this.paramsMtask.mgroup__belong_dept = this.currentDept.id
|
||||
this.paramsMtask.state__in = '20,40'
|
||||
this.apiMtask = this.$API.pm.mtask.list
|
||||
this.currentDept = res[0];
|
||||
this.paramsMtask.mgroup__belong_dept =
|
||||
this.currentDept.id;
|
||||
this.paramsMtask.state__in = "20,40";
|
||||
this.apiMtask = this.$API.pm.mtask.list;
|
||||
|
||||
this.paramsHandover.recive_dept = this.currentDept.id
|
||||
this.apiObjHandover = this.$API.wpm.handover.list
|
||||
this.paramsHandover.recive_dept = this.currentDept.id;
|
||||
this.apiObjHandover = this.$API.wpm.handover.list;
|
||||
|
||||
this.paramsWm.belong_dept = this.currentDept.id
|
||||
this.paramsWm.count__gte = 1
|
||||
this.apiObjWm = this.$API.wpm.wmaterial.list
|
||||
this.paramsWm.belong_dept = this.currentDept.id;
|
||||
this.paramsWm.count__gte = 1;
|
||||
this.apiObjWm = this.$API.wpm.wmaterial.list;
|
||||
} else {
|
||||
this.$message.error("未找到车间");
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleQueryMtask() {
|
||||
this.$refs.table_mtask.queryData(this.queryMtask)
|
||||
if (this.queryMtaskState) {
|
||||
this.queryMtask.state__in = "20,30,34,40";
|
||||
} else {
|
||||
this.queryMtask.state__in = "20,30,40";
|
||||
}
|
||||
this.$refs.table_mtask.queryData(this.queryMtask);
|
||||
},
|
||||
handover_submit(row) {
|
||||
this.$API.wpm.handover.submit.req(row.id).then(res => {
|
||||
this.$refs.table_handover.refresh()
|
||||
this.$message.success('操作成功')
|
||||
}).catch(e => {
|
||||
|
||||
this.$API.wpm.handover.submit
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$refs.table_handover.refresh();
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
getMlogs() {
|
||||
this.$API.wpm.mlog.list.req({ mtask: this.currentMtask.id, page: 0 }).then(res => {
|
||||
this.mlogs = res
|
||||
})
|
||||
this.$API.wpm.mlog.list
|
||||
.req({ mtask: this.currentMtask.id, page: 0 })
|
||||
.then((res) => {
|
||||
this.mlogs = res;
|
||||
});
|
||||
},
|
||||
getMtask() {
|
||||
this.$API.pm.mtask.item.req(this.currentMtask.id).then(res => {
|
||||
this.currentMtask = res
|
||||
})
|
||||
this.$API.pm.mtask.item.req(this.currentMtask.id).then((res) => {
|
||||
this.currentMtask = res;
|
||||
});
|
||||
},
|
||||
mtaskClick(row) {
|
||||
this.currentMtask = row;
|
||||
this.getMtask()
|
||||
this.getMtask();
|
||||
this.brothersListorigin = [];
|
||||
this.brothersListorigin = this.currentMtask.material_out_.brothers;
|
||||
this.getMlogs()
|
||||
this.getMlogs();
|
||||
},
|
||||
addMlog() {
|
||||
let that = this;
|
||||
|
@ -428,12 +761,12 @@ export default {
|
|||
that.material_model = that.currentMtask.material_out_.model;
|
||||
let arr = [];
|
||||
this.brothersList = [];
|
||||
this.brothersListorigin.forEach(item => {
|
||||
this.brothersListorigin.forEach((item) => {
|
||||
let obj = {};
|
||||
obj.count_ok = null;
|
||||
obj.material_out = item;
|
||||
arr.push(obj)
|
||||
})
|
||||
arr.push(obj);
|
||||
});
|
||||
this.brothersList = arr;
|
||||
that.dialogSave = true;
|
||||
that.$nextTick(() => {
|
||||
|
@ -444,21 +777,25 @@ export default {
|
|||
}
|
||||
},
|
||||
table_submit(row) {
|
||||
let lengths = row.mlogs.length, infoText = '';
|
||||
let lengths = row.mlogs.length,
|
||||
infoText = "";
|
||||
if (lengths > 0) {
|
||||
infoText = '该任务有' + lengths + '条日志,确定提交吗?';
|
||||
infoText = "该任务有" + lengths + "条日志,确定提交吗?";
|
||||
} else {
|
||||
infoText = '该任务没有日志,确定提交吗?';
|
||||
infoText = "该任务没有日志,确定提交吗?";
|
||||
}
|
||||
this.$confirm(infoText, "提示", {
|
||||
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) => {});
|
||||
});
|
||||
},
|
||||
// table_submit(row) {
|
||||
// this.$API.pm.mtask.submit.req(row.id).then(res => {
|
||||
|
@ -490,30 +827,38 @@ export default {
|
|||
let that = this;
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
that.$API.wpm.mlog.delete.req(row.id).then((res) => {
|
||||
})
|
||||
.then(() => {
|
||||
that.$API.wpm.mlog.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
that.$message.success("删除成功");
|
||||
that.getMlogs();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handleSaveSuccess() {
|
||||
this.getMlogs();
|
||||
},
|
||||
mlog_submit(row) {
|
||||
this.mlogHandleLoading = true
|
||||
this.$API.wpm.mlog.submit.req(row.id).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
this.mtaskClick(this.currentMtask)
|
||||
this.$refs.table_wm.refresh()
|
||||
this.mlogHandleLoading = false
|
||||
}).catch(err => {
|
||||
this.mlogHandleLoading = false
|
||||
this.mlogHandleLoading = true;
|
||||
this.$API.wpm.mlog.submit
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("操作成功");
|
||||
this.mtaskClick(this.currentMtask);
|
||||
this.$refs.table_wm.refresh();
|
||||
this.mlogHandleLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.mlogHandleLoading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -7,28 +7,69 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker v-model="queryMtask.start_date" type="date" value-format="YYYY-MM-DD"
|
||||
@change="handleQueryMtask" />
|
||||
<el-date-picker
|
||||
v-model="queryMtask.start_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleQueryMtask"
|
||||
/>
|
||||
<el-checkbox
|
||||
style="margin-left: 10px"
|
||||
v-model="queryMtaskState"
|
||||
label="已终止"
|
||||
@change="handleQueryMtask"
|
||||
/>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="paramsMtask" :query="queryMtask"
|
||||
@row-click="rowClick">
|
||||
<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="150">
|
||||
<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
|
||||
label="产物"
|
||||
prop="material_out_name"
|
||||
show-overflow-tooltip
|
||||
width="250"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="生产日期" prop="start_date">
|
||||
<el-table-column
|
||||
label="生产日期"
|
||||
prop="start_date"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state !== 40">
|
||||
<el-tag v-if="scope.row.state == 20">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="success">
|
||||
<el-tag v-if="scope.row.state == 30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.state == 34"
|
||||
type="danger"
|
||||
>
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.state == 40"
|
||||
type="success"
|
||||
>
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
@ -37,7 +78,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
<el-main style="padding: 0;">
|
||||
<el-main style="padding: 0">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
|
@ -45,25 +86,60 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable ref="tableprocess" row-key="id" stripe :hideDo="hideDo" :data="processList"
|
||||
@row-click="itemClick">
|
||||
<el-table-column label="任务编号" prop="number" width="150">
|
||||
<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">
|
||||
<el-table-column
|
||||
label="日期"
|
||||
prop="start_date"
|
||||
width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序" prop="mgroup_name">
|
||||
<el-table-column
|
||||
label="工序"
|
||||
prop="mgroup_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" prop="count_ok">
|
||||
<el-table-column
|
||||
label="合格数量"
|
||||
prop="count_ok"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交人" prop="submit_user_name">
|
||||
<el-table-column
|
||||
label="提交人"
|
||||
prop="submit_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="60">
|
||||
|
||||
<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">提交
|
||||
<el-link
|
||||
type="primary"
|
||||
@click.stop="
|
||||
table_submit(scope.row)
|
||||
"
|
||||
v-auth="'mtask.submit'"
|
||||
v-if="
|
||||
scope.row.state != 40 &&
|
||||
scope.row.state != 34
|
||||
"
|
||||
>提交
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -85,30 +161,64 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable ref="table_handover" :apiObj="apiObjHandover" row-key="id" stripe :params="paramsHandover">
|
||||
<el-table-column label="送料日期" prop="send_date">
|
||||
<scTable
|
||||
ref="table_handover"
|
||||
:apiObj="apiObjHandover"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="paramsHandover"
|
||||
>
|
||||
<el-table-column
|
||||
label="送料日期"
|
||||
prop="send_date"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="产物" prop="material_name" show-overflow-tooltip>
|
||||
<el-table-column
|
||||
label="产物"
|
||||
prop="material_name"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</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">
|
||||
</el-table-column>
|
||||
<el-table-column label="交送人" prop="send_user_name">
|
||||
<el-table-column
|
||||
label="交送人"
|
||||
prop="send_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收人" prop="recive_user_name">
|
||||
<el-table-column
|
||||
label="接收人"
|
||||
prop="recive_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否确认" prop="submit_time">
|
||||
|
||||
<el-table-column
|
||||
label="是否确认"
|
||||
prop="submit_time"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.submit_time">是</span>
|
||||
<span v-if="scope.row.submit_time"
|
||||
>是</span
|
||||
>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left">
|
||||
|
||||
<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">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click.stop="
|
||||
handover_submit(scope.row)
|
||||
"
|
||||
v-auth="'handover.submit'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -117,7 +227,7 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
</el-aside>
|
||||
<el-main style="padding: 0 0 0 8px;">
|
||||
<el-main style="padding: 0 0 0 8px">
|
||||
<!-- 车间库存 -->
|
||||
<el-container>
|
||||
<el-header>
|
||||
|
@ -125,38 +235,59 @@
|
|||
<span style="font-size: 14px">车间库存</span>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">领料</el-button>
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">入库</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="tomio"
|
||||
v-auth="'mio.do'"
|
||||
>领料</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="tomio"
|
||||
v-auth="'mio.do'"
|
||||
>入库</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0;">
|
||||
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe hidePagination>
|
||||
<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">
|
||||
|
||||
<el-table-column
|
||||
label="已到工序"
|
||||
prop="material"
|
||||
>
|
||||
<template #default="scope">{{
|
||||
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">
|
||||
<el-table-column label="批次" prop="batch">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
prop="count"
|
||||
width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
|
@ -178,31 +309,35 @@ export default {
|
|||
query: {},
|
||||
processList: [], //工序进度
|
||||
state_: {
|
||||
10: '创建中',
|
||||
20: '已下达',
|
||||
30: '生产中',
|
||||
40: '已提交',
|
||||
10: "创建中",
|
||||
20: "已下达",
|
||||
30: "生产中",
|
||||
34: "已终止",
|
||||
40: "已提交",
|
||||
},
|
||||
hideDo: true,
|
||||
queryMtaskState: false,
|
||||
apiObjWm: this.$API.wpm.wmaterial.list,
|
||||
paramsMlog: {
|
||||
mtask: ''
|
||||
mtask: "",
|
||||
},
|
||||
apiObjHandover: this.$API.wpm.handover.list,
|
||||
paramsHandover: {
|
||||
recive_dept__name: '6车间'
|
||||
recive_dept__name: "6车间",
|
||||
},
|
||||
paramsWm: {
|
||||
belong_dept__name: '6车间',
|
||||
count__gte: 1
|
||||
belong_dept__name: "6车间",
|
||||
count__gte: 1,
|
||||
},
|
||||
paramsMtask: {
|
||||
mgroup__belong_dept__name: '6车间',
|
||||
mgroup__belong_dept__name: "6车间",
|
||||
is_count_utask: true,
|
||||
state__in: "20,40"
|
||||
state__in: "20,30,40",
|
||||
},
|
||||
queryMtask: {}
|
||||
}
|
||||
queryMtask: {
|
||||
state__in: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let NowDate = new Date();
|
||||
|
@ -216,9 +351,16 @@ export default {
|
|||
//点击任务
|
||||
rowClick(row) {
|
||||
let that = this;
|
||||
this.$API.pm.mtask.list.req({ start_date: row.start_date, end_date: row.end_date, mgroup__belong_dept__name: '6车间', utask: row.utask }).then(res => {
|
||||
that.processList = res.results;
|
||||
this.$API.pm.mtask.list
|
||||
.req({
|
||||
start_date: row.start_date,
|
||||
end_date: row.end_date,
|
||||
mgroup__belong_dept__name: "6车间",
|
||||
utask: row.utask,
|
||||
})
|
||||
.then((res) => {
|
||||
that.processList = res.results;
|
||||
});
|
||||
},
|
||||
//工序详情
|
||||
itemClick(row) {
|
||||
|
@ -231,39 +373,50 @@ export default {
|
|||
// this.apiObjMlog = this.$API.wpm.mlog.list;
|
||||
this.$router.push({
|
||||
name: "mlogDept6Detail",
|
||||
query: { mtaskId: row.id }
|
||||
|
||||
query: { mtaskId: row.id },
|
||||
});
|
||||
},
|
||||
handleQueryMtask() {
|
||||
if (this.queryMtaskState) {
|
||||
this.queryMtask.state__in = "20,30,34,40";
|
||||
} else {
|
||||
this.queryMtask.state__in = "20,30,40";
|
||||
}
|
||||
this.$refs.table.queryData(this.queryMtask);
|
||||
},
|
||||
table_submit(row) {
|
||||
let lengths = row.mlogs.length, infoText = '';
|
||||
let lengths = row.mlogs.length,
|
||||
infoText = "";
|
||||
if (lengths > 0) {
|
||||
infoText = '该任务有' + lengths + '条日志,确定提交吗?';
|
||||
infoText = "该任务有" + lengths + "条日志,确定提交吗?";
|
||||
} else {
|
||||
infoText = '该任务没有日志,确定提交吗?';
|
||||
infoText = "该任务没有日志,确定提交吗?";
|
||||
}
|
||||
this.$confirm(infoText, "提示", {
|
||||
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) {
|
||||
this.$API.wpm.handover.submit.req(row.id).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
this.$API.wpm.handover.submit
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("操作成功");
|
||||
this.$refs.table_handover.refresh();
|
||||
this.$refs.table_wm.refresh();
|
||||
}).catch(err => { })
|
||||
})
|
||||
.catch((err) => {});
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
@ -272,7 +425,7 @@ export default {
|
|||
position: absolute;
|
||||
right: 20px;
|
||||
margin-top: 4px;
|
||||
z-index: 100
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.right-panel > * + * {
|
||||
|
@ -280,7 +433,7 @@ export default {
|
|||
}
|
||||
|
||||
.el-main.nopadding {
|
||||
padding: 0 20px 0 20px
|
||||
padding: 0 20px 0 20px;
|
||||
}
|
||||
|
||||
.tableTitle {
|
||||
|
|
|
@ -6,14 +6,36 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker v-model="queryMtask.start_date" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="工作日期" @change="handleQueryMtask" />
|
||||
<el-date-picker
|
||||
v-model="queryMtask.start_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="工作日期"
|
||||
@change="handleQueryMtask"
|
||||
/>
|
||||
<el-checkbox
|
||||
style="margin-left: 10px"
|
||||
v-model="queryMtaskState"
|
||||
label="已终止"
|
||||
@change="handleQueryMtask"
|
||||
/>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table_mtask" :apiObj="apiMtask" row-key="id" stripe :params="paramsMtask"
|
||||
:query="queryMtask" @row-click="mtaskClick">
|
||||
<el-table-column label="产品名称" prop="material" show-overflow-tooltip>
|
||||
<scTable
|
||||
ref="table_mtask"
|
||||
:apiObj="apiMtask"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="paramsMtask"
|
||||
:query="queryMtask"
|
||||
@row-click="mtaskClick"
|
||||
>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="material"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.name
|
||||
|
@ -22,31 +44,69 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="型号规格" prop="">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.specification
|
||||
}}|{{ scope.row.material_out_.model }}</span>
|
||||
<span v-if="scope.row.material_out_"
|
||||
>{{
|
||||
scope.row.material_out_
|
||||
.specification
|
||||
}}|{{
|
||||
scope.row.material_out_.model
|
||||
}}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务编号" prop="number" width="140" show-overflow-tooltip>
|
||||
<el-table-column
|
||||
label="任务编号"
|
||||
prop="number"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="任务量" prop="count"> </el-table-column>
|
||||
<el-table-column label="工作日期" prop="start_date">
|
||||
<el-table-column label="任务量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工作日期"
|
||||
prop="start_date"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok"> </el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.state !== 40">
|
||||
<el-tag v-if="scope.row.state == 20">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="success">
|
||||
<el-tag v-if="scope.row.state == 30">
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.state == 34"
|
||||
type="danger"
|
||||
>
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
v-if="scope.row.state == 40"
|
||||
type="success"
|
||||
>
|
||||
{{ state_[scope.row.state] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="60">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="60"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="mtask_submit(scope.row)" v-auth="'mtask.submit'"
|
||||
v-if="scope.row.state != 40">提交
|
||||
<el-link
|
||||
type="primary"
|
||||
@click="mtask_submit(scope.row)"
|
||||
v-auth="'mtask.submit'"
|
||||
v-if="
|
||||
scope.row.state != 40 &&
|
||||
scope.row.state != 34
|
||||
"
|
||||
>提交
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -64,17 +124,34 @@
|
|||
</div>
|
||||
</template>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">{{ state_[currentMtask.state] }}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称">
|
||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name
|
||||
}}</span></el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号"><span v-if="currentMtask.material_out_">{{
|
||||
currentMtask.material_out_.specification
|
||||
}}</span></el-descriptions-item>
|
||||
<el-descriptions-item label="合格数">{{ currentMtask.count_ok
|
||||
<el-descriptions-item label="任务编号">{{
|
||||
currentMtask.number
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格数">{{ currentMtask.count_notok
|
||||
<el-descriptions-item label="状态">{{
|
||||
state_[currentMtask.state]
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称">
|
||||
<span
|
||||
v-if="currentMtask.material_out_"
|
||||
>{{
|
||||
currentMtask.material_out_.name
|
||||
}}</span
|
||||
></el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="规格型号"
|
||||
><span
|
||||
v-if="currentMtask.material_out_"
|
||||
>{{
|
||||
currentMtask.material_out_
|
||||
.specification
|
||||
}}</span
|
||||
></el-descriptions-item
|
||||
>
|
||||
<el-descriptions-item label="合格数">{{
|
||||
currentMtask.count_ok
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格数">{{
|
||||
currentMtask.count_notok
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
|
@ -83,78 +160,222 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addMlog"
|
||||
v-if="currentMtask && currentMtask.state == 20"
|
||||
v-auth="'mlog.create'">新增</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addMlog"
|
||||
v-if="
|
||||
currentMtask &&
|
||||
currentMtask.state == 20
|
||||
"
|
||||
v-auth="'mlog.create'"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table_mlog" :data="mlogs" row-key="id" stripe hidePagination hideDo>
|
||||
<el-table-column label="锅号" prop="equipment_name">
|
||||
<scTable
|
||||
ref="table_mlog"
|
||||
:data="mlogs"
|
||||
row-key="id"
|
||||
stripe
|
||||
hidePagination
|
||||
hideDo
|
||||
>
|
||||
<el-table-column
|
||||
label="锅号"
|
||||
prop="equipment_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="material_out_" min-width="120">
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="material_out_"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.name
|
||||
}}</span>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.material_out_
|
||||
"
|
||||
>{{
|
||||
scope.row.material_out_
|
||||
.name
|
||||
}}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次号" prop="batch">
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batch"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="material_out_">
|
||||
<el-table-column
|
||||
label="规格"
|
||||
prop="material_out_"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_out_">{{
|
||||
scope.row.material_out_.specification
|
||||
}}</span>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.material_out_
|
||||
"
|
||||
>{{
|
||||
scope.row.material_out_
|
||||
.specification
|
||||
}}</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产量" prop="count_real">
|
||||
<el-table-column
|
||||
label="生产量"
|
||||
prop="count_real"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格量" prop="count_ok"> </el-table-column>
|
||||
<el-table-column label="合格率" prop="count">
|
||||
<el-table-column
|
||||
label="合格量"
|
||||
prop="count_ok"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合格率"
|
||||
prop="count"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ Math.floor(scope.row.count_ok / scope.row.count_real * 100)
|
||||
}}%</span>
|
||||
<span
|
||||
>{{
|
||||
Math.floor(
|
||||
(scope.row
|
||||
.count_ok /
|
||||
scope.row
|
||||
.count_real) *
|
||||
100
|
||||
)
|
||||
}}%</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因及数量" align="center">
|
||||
<el-table-column label="炸纹" prop="count_n_zw">
|
||||
<el-table-column
|
||||
label="不合格原因及数量"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column
|
||||
label="炸纹"
|
||||
prop="count_n_zw"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="条纹" prop="count_n_tw">
|
||||
<el-table-column
|
||||
label="条纹"
|
||||
prop="count_n_tw"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="气泡" prop="count_n_qp">
|
||||
<el-table-column
|
||||
label="气泡"
|
||||
prop="count_n_qp"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="弯曲" prop="count_n_wq">
|
||||
<el-table-column
|
||||
label="弯曲"
|
||||
prop="count_n_wq"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" prop="count_n_qt">
|
||||
<el-table-column
|
||||
label="其他"
|
||||
prop="count_n_qt"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" prop="count_n_qt">
|
||||
<el-table-column
|
||||
label="合计"
|
||||
prop="count_n_qt"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="退火炉号" prop="equipment_2_name">
|
||||
<el-table-column
|
||||
label="退火炉号"
|
||||
prop="equipment_2_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="第几锅" prop="index"> </el-table-column>
|
||||
<el-table-column label="成型人" prop="handle_user_name">
|
||||
<el-table-column
|
||||
label="第几锅"
|
||||
prop="index"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="切料人" prop="handle_user_2_name">
|
||||
<el-table-column
|
||||
label="成型人"
|
||||
prop="handle_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="120" align="center">
|
||||
<el-table-column
|
||||
label="切料人"
|
||||
prop="handle_user_2_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="table_edit(scope.row)"
|
||||
v-auth="'mlog.update'" v-if="scope.row.submit_time == null">编辑
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
table_edit(scope.row)
|
||||
"
|
||||
v-auth="'mlog.update'"
|
||||
v-if="
|
||||
scope.row.submit_time ==
|
||||
null
|
||||
"
|
||||
>编辑
|
||||
</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
|
||||
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="primary" @click="mlog_submit(scope.row)"
|
||||
v-auth="'mlog.submit'" v-if="scope.row.submit_time == null"
|
||||
:loading="mlogHandleLoading">提交
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
mlog_submit(scope.row)
|
||||
"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="
|
||||
scope.row.submit_time ==
|
||||
null
|
||||
"
|
||||
:loading="mlogHandleLoading"
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="mlog_revert(scope.row)"
|
||||
v-auth="'mlog.submit'" v-if="scope.row.submit_time != null"
|
||||
:loading="mlogHandleLoading">撤回
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="
|
||||
mlog_revert(scope.row)
|
||||
"
|
||||
v-auth="'mlog.submit'"
|
||||
v-if="
|
||||
scope.row.submit_time !=
|
||||
null
|
||||
"
|
||||
:loading="mlogHandleLoading"
|
||||
>撤回
|
||||
</el-button>
|
||||
<el-button link type="success" @click="table_show(scope.row)">
|
||||
<el-button
|
||||
link
|
||||
type="success"
|
||||
@click="
|
||||
table_show(scope.row)
|
||||
"
|
||||
>
|
||||
日志记录
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -164,7 +385,6 @@
|
|||
</el-container>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-header>
|
||||
|
@ -178,34 +398,70 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable ref="table_handover" :apiObj="apiObjHandover" row-key="id" stripe
|
||||
:params="paramsHandover">
|
||||
<scTable
|
||||
ref="table_handover"
|
||||
:apiObj="apiObjHandover"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="paramsHandover"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="送料日期" prop="send_date">
|
||||
<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_">{{
|
||||
<el-table-column
|
||||
label="产物"
|
||||
prop="material"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="scope"
|
||||
><span v-if="scope.row.material_">{{
|
||||
scope.row.material_.name
|
||||
}}</span>
|
||||
</template>
|
||||
</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">
|
||||
</el-table-column>
|
||||
<el-table-column label="交送人" prop="send_user_name">
|
||||
<el-table-column
|
||||
label="交送人"
|
||||
prop="send_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收人" prop="recive_user_name">
|
||||
<el-table-column
|
||||
label="接收人"
|
||||
prop="recive_user_name"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否确认" prop="submit_time">
|
||||
<el-table-column
|
||||
label="是否确认"
|
||||
prop="submit_time"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.submit_time">是</span>
|
||||
<span v-if="scope.row.submit_time"
|
||||
>是</span
|
||||
>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left">
|
||||
<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">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click.stop="
|
||||
handover_submit(scope.row)
|
||||
"
|
||||
v-auth="'handover.submit'"
|
||||
v-if="scope.row.submit_time == null"
|
||||
>
|
||||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -213,7 +469,6 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</el-aside>
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
|
@ -222,13 +477,29 @@
|
|||
<span style="font-size: 14px">车间库存</span>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'">领料</el-button>
|
||||
<el-button type="primary" @click="tomioin" v-auth="'mio.do'">入库</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="tomio"
|
||||
v-auth="'mio.do'"
|
||||
>领料</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="tomioin"
|
||||
v-auth="'mio.do'"
|
||||
>入库</el-button
|
||||
>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<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">
|
||||
<template #default="scope">{{
|
||||
scope.row.material_.name
|
||||
|
@ -244,13 +515,21 @@
|
|||
scope.row.material_.model
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到工序" prop="material">
|
||||
<el-table-column
|
||||
label="已到工序"
|
||||
prop="material"
|
||||
>
|
||||
<template #default="scope">{{
|
||||
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">
|
||||
<el-table-column label="批次" prop="batch">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
prop="count"
|
||||
width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
|
@ -258,11 +537,25 @@
|
|||
</el-main>
|
||||
</el-container>
|
||||
</el-main>
|
||||
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
|
||||
:material_out="material_out" :material_model="material_model" :material_in="material_in" :activeType="activeName" @success="handleSaveSuccess"
|
||||
@closed="dialogSave = false">
|
||||
<save-dialog
|
||||
v-if="dialogSave"
|
||||
ref="saveDialog"
|
||||
:mtask="currentMtask.id"
|
||||
:mgroup="mgroup"
|
||||
:material_out="material_out"
|
||||
:material_model="material_model"
|
||||
:material_in="material_in"
|
||||
:activeType="activeName"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialogSave = false"
|
||||
>
|
||||
</save-dialog>
|
||||
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
||||
<showDrawer
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:mlogId="mlogId"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
</showDrawer>
|
||||
</el-container>
|
||||
</template>
|
||||
|
@ -271,12 +564,13 @@ import saveDialog from "./worktask_form.vue";
|
|||
import showDrawer from "./mlog_drawer.vue";
|
||||
export default {
|
||||
components: {
|
||||
saveDialog, showDrawer
|
||||
saveDialog,
|
||||
showDrawer,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mlogHandleLoading: false,
|
||||
activeName: '7车间',
|
||||
activeName: "7车间",
|
||||
currentDept: {},
|
||||
currentMtask: {},
|
||||
apiMtask: null,
|
||||
|
@ -286,35 +580,40 @@ export default {
|
|||
10: "创建中",
|
||||
20: "已下达",
|
||||
30: "生产中",
|
||||
34: "已终止",
|
||||
40: "已提交",
|
||||
},
|
||||
dialogSave: false,
|
||||
visibleDrawer: false,
|
||||
queryMtaskState: false,
|
||||
apiObjHandover: null,
|
||||
paramsHandover: {},
|
||||
apiObjWm: null,
|
||||
paramsWm: {},
|
||||
mlogs: [],
|
||||
mlogId: '',
|
||||
mgroup: '',
|
||||
material_out: '',
|
||||
material_model:''
|
||||
}
|
||||
mlogId: "",
|
||||
mgroup: "",
|
||||
material_out: "",
|
||||
material_model: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initDept()
|
||||
this.initDept();
|
||||
},
|
||||
methods: {
|
||||
mlog_revert(row) {
|
||||
this.mlogHandleLoading = true;
|
||||
this.$API.wpm.mlog.revert.req(row.id).then(res => {
|
||||
this.$API.wpm.mlog.revert
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("撤回成功");
|
||||
this.mtaskClick(this.currentMtask)
|
||||
this.$refs.table_wm.refresh()
|
||||
this.mlogHandleLoading = false;
|
||||
}).catch(e => {
|
||||
this.mtaskClick(this.currentMtask);
|
||||
this.$refs.table_wm.refresh();
|
||||
this.mlogHandleLoading = false;
|
||||
})
|
||||
.catch((e) => {
|
||||
this.mlogHandleLoading = false;
|
||||
});
|
||||
},
|
||||
tomio() {
|
||||
this.$router.push({ name: "mainso_mio" });
|
||||
|
@ -350,77 +649,97 @@ export default {
|
|||
let that = this;
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
that.$API.wpm.mlog.delete.req(row.id).then((res) => {
|
||||
})
|
||||
.then(() => {
|
||||
that.$API.wpm.mlog.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
that.$message.success("删除成功");
|
||||
that.getMlogs();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => { });
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
initDept() {
|
||||
this.$API.system.dept.list.req({ page: 0, name: '7车间' }).then(res => {
|
||||
this.$API.system.dept.list
|
||||
.req({ page: 0, name: "7车间" })
|
||||
.then((res) => {
|
||||
if (res.length == 1) {
|
||||
this.currentDept = res[0]
|
||||
this.paramsMtask.mgroup__belong_dept = this.currentDept.id
|
||||
this.paramsMtask.state__in = '20,40'
|
||||
this.apiMtask = this.$API.pm.mtask.list
|
||||
this.currentDept = res[0];
|
||||
this.paramsMtask.mgroup__belong_dept =
|
||||
this.currentDept.id;
|
||||
this.paramsMtask.state__in = "20,40";
|
||||
this.apiMtask = this.$API.pm.mtask.list;
|
||||
|
||||
this.paramsHandover.recive_dept = this.currentDept.id
|
||||
this.apiObjHandover = this.$API.wpm.handover.list
|
||||
this.paramsHandover.recive_dept = this.currentDept.id;
|
||||
this.apiObjHandover = this.$API.wpm.handover.list;
|
||||
|
||||
this.paramsWm.belong_dept = this.currentDept.id
|
||||
this.paramsWm.count__gte = 1
|
||||
this.apiObjWm = this.$API.wpm.wmaterial.list
|
||||
this.paramsWm.belong_dept = this.currentDept.id;
|
||||
this.paramsWm.count__gte = 1;
|
||||
this.apiObjWm = this.$API.wpm.wmaterial.list;
|
||||
} else {
|
||||
this.$message.error("未找到车间");
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleQueryMtask() {
|
||||
this.$refs.table_mtask.queryData(this.queryMtask)
|
||||
if (this.queryMtaskState) {
|
||||
this.queryMtask.state__in = "20,30,34,40";
|
||||
} else {
|
||||
this.queryMtask.state__in = "20,30,40";
|
||||
}
|
||||
this.$refs.table_mtask.queryData(this.queryMtask);
|
||||
},
|
||||
handover_submit(row) {
|
||||
this.$API.wpm.handover.submit.req(row.id).then(res => {
|
||||
this.$refs.table_handover.refresh()
|
||||
this.$message.success('操作成功')
|
||||
}).catch(e => {
|
||||
|
||||
this.$API.wpm.handover.submit
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$refs.table_handover.refresh();
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
getMlogs() {
|
||||
this.$API.wpm.mlog.list.req({ mtask: this.currentMtask.id, page: 0 }).then(res => {
|
||||
this.mlogs = res
|
||||
})
|
||||
this.$API.wpm.mlog.list
|
||||
.req({ mtask: this.currentMtask.id, page: 0 })
|
||||
.then((res) => {
|
||||
this.mlogs = res;
|
||||
});
|
||||
},
|
||||
getMtask() {
|
||||
this.$API.pm.mtask.item.req(this.currentMtask.id).then(res => {
|
||||
this.currentMtask = res
|
||||
})
|
||||
this.$API.pm.mtask.item.req(this.currentMtask.id).then((res) => {
|
||||
this.currentMtask = res;
|
||||
});
|
||||
},
|
||||
mtaskClick(row) {
|
||||
this.currentMtask = row;
|
||||
this.getMtask()
|
||||
this.getMlogs()
|
||||
this.getMtask();
|
||||
this.getMlogs();
|
||||
},
|
||||
mtask_submit(row) {
|
||||
let lengths = row.mlogs.length,infoText = '';
|
||||
let lengths = row.mlogs.length,
|
||||
infoText = "";
|
||||
if (lengths > 0) {
|
||||
infoText = '该任务有'+lengths+'条日志,确定提交吗?';
|
||||
infoText = "该任务有" + lengths + "条日志,确定提交吗?";
|
||||
} else {
|
||||
infoText = '该任务没有日志,确定提交吗?';
|
||||
infoText = "该任务没有日志,确定提交吗?";
|
||||
}
|
||||
this.$confirm(infoText, "提示", {
|
||||
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) => {});
|
||||
});
|
||||
},
|
||||
handleSaveSuccess() {
|
||||
this.getMlogs();
|
||||
|
@ -433,16 +752,19 @@ export default {
|
|||
});
|
||||
},
|
||||
mlog_submit(row) {
|
||||
this.mlogHandleLoading = true
|
||||
this.$API.wpm.mlog.submit.req(row.id).then(res => {
|
||||
this.$message.success('操作成功')
|
||||
this.mtaskClick(this.currentMtask)
|
||||
this.$refs.table_wm.refresh()
|
||||
this.mlogHandleLoading = false
|
||||
}).catch(err => {
|
||||
this.mlogHandleLoading = false
|
||||
this.mlogHandleLoading = true;
|
||||
this.$API.wpm.mlog.submit
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("操作成功");
|
||||
this.mtaskClick(this.currentMtask);
|
||||
this.$refs.table_wm.refresh();
|
||||
this.mlogHandleLoading = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
this.mlogHandleLoading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue