feat: 6车间mlog撤回
This commit is contained in:
parent
ae299a4194
commit
2f2220c5c1
|
@ -6,56 +6,56 @@
|
||||||
<el-aside style="width: 50%">
|
<el-aside style="width: 50%">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-date-picker v-model="query.date" type="date" value-format="YYYY-MM-DD" />
|
<el-date-picker v-model="query.date" type="date" value-format="YYYY-MM-DD" />
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination
|
||||||
@row-click="rowClick" hideDo>
|
@row-click="rowClick" hideDo>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="任务编号" prop="number">
|
<el-table-column label="任务编号" prop="number">
|
||||||
</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_">{{ scope.row.material_out_.name }}</span>
|
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.name }}</span>
|
||||||
</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">
|
||||||
<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>
|
</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">
|
||||||
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.model }}</span>
|
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.model }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="计划数量" prop="count">
|
<el-table-column label="计划数量" prop="count">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产日期" prop="start_date">
|
<el-table-column label="生产日期" prop="start_date">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" prop="state">
|
<el-table-column label="状态" prop="state">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.state !== 40">
|
<el-tag v-if="scope.row.state !== 40">
|
||||||
{{ state_[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="success">
|
<el-tag v-else type="success">
|
||||||
{{ state_[scope.row.state] }}
|
{{ state_[scope.row.state] }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main style="padding: 0;">
|
<el-main style="padding: 0;">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<span style="font-size: 14px">各工序进度</span>
|
<span style="font-size: 14px">各工序进度</span>
|
||||||
</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">
|
||||||
|
@ -73,11 +73,11 @@
|
||||||
<el-table-column label="操作人" prop="">
|
<el-table-column label="操作人" prop="">
|
||||||
</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="table_submit(scope.row)" v-auth="'mtask.submit'"
|
<el-link type="primary" @click="table_submit(scope.row)" v-auth="'mtask.submit'"
|
||||||
v-if="scope.row.state != 40">提交
|
v-if="scope.row.state != 40">提交
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
|
@ -92,44 +92,43 @@
|
||||||
<!-- 交接记录 -->
|
<!-- 交接记录 -->
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<span style="font-size: 14px">交接记录</span>
|
<span style="font-size: 14px">交接记录</span>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<scTable ref="table_handover" :apiObj="apiObjHandover" row-key="id" stripe
|
<scTable ref="table_handover" :apiObj="apiObjHandover" row-key="id" stripe :params="paramsHandover">
|
||||||
:params="paramsHandover">
|
<el-table-column type="index" width="50" />
|
||||||
<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>
|
<el-table-column label="产物" prop="material" show-overflow-tooltip>
|
||||||
<el-table-column label="产物" prop="material" show-overflow-tooltip>
|
<template #default="scope"><span v-if="scope.row.material_">{{
|
||||||
<template #default="scope"><span v-if="scope.row.material_">{{
|
scope.row.material_.name
|
||||||
scope.row.material_.name
|
}}</span>
|
||||||
}}</span>
|
</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">
|
||||||
<el-table-column label="数量" prop="count">
|
</el-table-column>
|
||||||
</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>
|
<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-if="scope.row.submit_time == null">
|
||||||
v-auth="'handover.submit'" v-if="scope.row.submit_time == null">
|
确认
|
||||||
确认
|
</el-button>
|
||||||
</el-button>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
</scTable>
|
||||||
</scTable>
|
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
|
@ -146,26 +145,25 @@
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main style="padding: 0;">
|
<el-main style="padding: 0;">
|
||||||
<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 hideDo>
|
<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="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">
|
</el-table-column>
|
||||||
</el-table-column>
|
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
@ -177,37 +175,37 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
},
|
},
|
||||||
apiObj:null,
|
apiObj: null,
|
||||||
query: {
|
query: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
belong_dept_name: '6车间',
|
belong_dept_name: '6车间',
|
||||||
date: '2023-10-24'
|
date: '2023-10-24'
|
||||||
},
|
},
|
||||||
processList: [],//工序进度
|
processList: [],//工序进度
|
||||||
state_: {
|
state_: {
|
||||||
10: '创建中',
|
10: '创建中',
|
||||||
20: '已下达',
|
20: '已下达',
|
||||||
30: '生产中',
|
30: '生产中',
|
||||||
40: '已提交',
|
40: '已提交',
|
||||||
},
|
},
|
||||||
hideDo: true,
|
hideDo: true,
|
||||||
apiObjWm: this.$API.wpm.wmaterial.list,
|
apiObjWm: this.$API.wpm.wmaterial.list,
|
||||||
paramsMlog:{
|
paramsMlog: {
|
||||||
mtask:''
|
mtask: ''
|
||||||
},
|
},
|
||||||
apiObjHandover:this.$API.wpm.handover.list,
|
apiObjHandover: this.$API.wpm.handover.list,
|
||||||
paramsHandover:{
|
paramsHandover: {
|
||||||
recive_dept__name:'6车间'
|
recive_dept__name: '6车间'
|
||||||
},
|
},
|
||||||
paramsWm: {
|
paramsWm: {
|
||||||
belong_dept__name: '6车间'
|
belong_dept__name: '6车间'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let NowDate = new Date();
|
let NowDate = new Date();
|
||||||
|
@ -216,7 +214,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tomio() {
|
tomio() {
|
||||||
this.$router.push({ name: "halfgood_mio" });
|
this.$router.push({ name: "halfgood_mio" });
|
||||||
},
|
},
|
||||||
//点击任务
|
//点击任务
|
||||||
rowClick(row) {
|
rowClick(row) {
|
||||||
|
@ -226,7 +224,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//工序详情
|
//工序详情
|
||||||
itemClick(row){
|
itemClick(row) {
|
||||||
// this.currentMtask = row;
|
// this.currentMtask = row;
|
||||||
// this.mgroup = row.mgroup;
|
// this.mgroup = row.mgroup;
|
||||||
// this.mtask = row.id;
|
// this.mtask = row.id;
|
||||||
|
@ -240,7 +238,7 @@ export default {
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleQueryMtask(){
|
handleQueryMtask() {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
@ -251,14 +249,14 @@ export default {
|
||||||
},
|
},
|
||||||
table_submit(row) {
|
table_submit(row) {
|
||||||
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.rowClick(row);
|
this.rowClick(row);
|
||||||
}).catch(err => { })
|
}).catch(err => { })
|
||||||
},
|
},
|
||||||
handover_submit(row){
|
handover_submit(row) {
|
||||||
this.$API.wpm.handover.submit.req(row.id).then(res => {
|
this.$API.wpm.handover.submit.req(row.id).then(res => {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
this.$refs.table_handover.refresh();
|
this.$refs.table_handover.refresh();
|
||||||
}).catch(err => { })
|
}).catch(err => { })
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<!-- 任务信息 -->
|
<!-- 任务信息 -->
|
||||||
<el-header style="height: 20%; padding: 0">
|
<el-header style="height: 20%; padding: 0">
|
||||||
<el-card style="width: 100%; height: 100%">
|
<el-card style="width: 100%; height: 100%">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>任务信息</span>
|
<span>任务信息</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions>
|
<el-descriptions>
|
||||||
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="产品名称">
|
<el-descriptions-item label="产品名称">
|
||||||
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name}}</span>
|
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="规格型号">
|
<el-descriptions-item label="规格型号">
|
||||||
<span v-if="currentMtask.material_out_">{{currentMtask.material_out_.specification}}</span>
|
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.specification }}</span>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="计划数量">{{ currentMtask.count}}</el-descriptions-item>
|
<el-descriptions-item label="计划数量">{{ currentMtask.count }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="计划日期">{{ currentMtask.start_date}}</el-descriptions-item>
|
<el-descriptions-item label="计划日期">{{ currentMtask.start_date }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-header>
|
</el-header>
|
||||||
|
@ -27,68 +27,59 @@
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="addMlog"
|
<el-button type="primary" icon="el-icon-plus" @click="addMlog"
|
||||||
v-if="currentMtask && currentMtask.state == 20">新增</el-button>
|
v-if="currentMtask && currentMtask.state == 20">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main style="padding: 0;">
|
<el-main style="padding: 0;">
|
||||||
<scTable ref="mtaskMlogs" :apiObj="apiObj" row-key="id" :params="params" stripe
|
<scTable ref="mtaskMlogs" :apiObj="apiObj" row-key="id" :params="params" stripe hidePagination hideDo>
|
||||||
hidePagination hideDo>
|
<el-table-column label="工序" prop="mgroup_name"></el-table-column>
|
||||||
<el-table-column label="工序" prop="mgroup_name"></el-table-column>
|
<el-table-column label="产品编号">
|
||||||
<el-table-column label="产品编号">
|
<template #default="scope">
|
||||||
<template #default="scope">
|
<span v-if="scope.row.material_out_">{{ scope.row.material_out_.number }}</span>
|
||||||
<span v-if="scope.row.material_out_">{{scope.row.material_out_.number}}</span>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="加工设备" prop="equipment_name"></el-table-column>
|
||||||
<el-table-column label="加工设备" prop="equipment_name"></el-table-column>
|
<el-table-column label="领用数量" prop="count_use"> </el-table-column>
|
||||||
<el-table-column label="领用数量" prop="count_use"> </el-table-column>
|
<el-table-column label="加工数量" prop="count_real"> </el-table-column>
|
||||||
<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_ok"></el-table-column>
|
<el-table-column label="不合格数量" align="center">
|
||||||
<el-table-column label="不合格数量" align="center">
|
<el-table-column prop="count_n_wq" label="弯曲" />
|
||||||
<el-table-column prop="count_n_wq" label="弯曲"/>
|
<el-table-column prop="count_n_zw" label="炸纹" />
|
||||||
<el-table-column prop="count_n_zw" label="炸纹"/>
|
<el-table-column prop="count_n_tw" label="条纹" />
|
||||||
<el-table-column prop="count_n_tw" label="条纹"/>
|
<el-table-column prop="count_n_qp" label="气泡" />
|
||||||
<el-table-column prop="count_n_qp" label="气泡"/>
|
<el-table-column prop="count_n_dl" label="断裂" />
|
||||||
<el-table-column prop="count_n_dl" label="断裂"/>
|
<el-table-column prop="count_n_pb" label="偏壁" />
|
||||||
<el-table-column prop="count_n_pb" label="偏壁"/>
|
<el-table-column prop="count_n_dxt" label="大小头" />
|
||||||
<el-table-column prop="count_n_dxt" label="大小头"/>
|
<el-table-column prop="count_n_jsqx" label="结石气绒" />
|
||||||
<el-table-column prop="count_n_jsqx" label="结石气绒"/>
|
<el-table-column prop="count_n_qt" label="其他" />
|
||||||
<el-table-column prop="count_n_qt" label="其他"/>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column label="操作人" prop="update_by_name"></el-table-column>
|
||||||
<el-table-column label="操作人" prop="count_ok"></el-table-column>
|
<el-table-column label="操作" fixed="right" width="130">
|
||||||
<el-table-column label="操作" fixed="right" width="130">
|
<template #default="scope">
|
||||||
<template #default="scope">
|
<el-button link type="primary" @click="table_edit(scope.row)" v-auth="'mlog.update'"
|
||||||
<el-button link type="primary" @click="table_edit(scope.row)">
|
v-if="scope.row.submit_time == null">编辑
|
||||||
编辑
|
</el-button>
|
||||||
</el-button>
|
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'"
|
||||||
<el-link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'"
|
|
||||||
v-if="scope.row.submit_time == null">删除
|
v-if="scope.row.submit_time == null">删除
|
||||||
</el-link>
|
</el-button>
|
||||||
<el-link type="primary" @click="mlog_submit(scope.row)"
|
<el-button link type="primary" @click="mlog_submit(scope.row)" v-auth="'mlog.submit'"
|
||||||
v-auth="'mlog.submit'" v-if="scope.row.submit_time == null">提交
|
v-if="scope.row.submit_time == null" :loading="mlogHandleLoading">提交
|
||||||
</el-link>
|
</el-button>
|
||||||
<el-button link type="success" @click="table_show(scope.row)">
|
<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>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</el-main>
|
</el-main>
|
||||||
<save-dialog
|
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="mtask" :mgroup="mgroup" :handledate="handledate"
|
||||||
v-if="dialogSave"
|
:material_out="material_out" @success="handleSaveSuccess" @closed="dialogSave = false"></save-dialog>
|
||||||
ref="saveDialog"
|
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
|
||||||
:mtask="mtask"
|
|
||||||
:mgroup="mgroup"
|
|
||||||
:handledate="handledate"
|
|
||||||
:material_out="material_out"
|
|
||||||
@success="handleSaveSuccess"
|
|
||||||
@closed="dialogSave = false"
|
|
||||||
></save-dialog>
|
|
||||||
<showDrawer ref="showDrawer"
|
|
||||||
v-if="visibleDrawer"
|
|
||||||
:mlogId="mlogId"
|
|
||||||
@closed="visibleDrawer = false">
|
|
||||||
</showDrawer>
|
</showDrawer>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
@ -97,30 +88,31 @@ import saveDialog from "./mlog6_form.vue";
|
||||||
import showDrawer from "./mlog_drawer.vue";
|
import showDrawer from "./mlog_drawer.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
saveDialog,showDrawer
|
saveDialog, showDrawer
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: {
|
mlogHandleLoading: false,
|
||||||
save: false,
|
dialog: {
|
||||||
},
|
save: false,
|
||||||
state_: {
|
},
|
||||||
10: '创建中',
|
state_: {
|
||||||
20: '已下达',
|
10: '创建中',
|
||||||
30: '生产中',
|
20: '已下达',
|
||||||
40: '已提交',
|
30: '生产中',
|
||||||
},
|
40: '已提交',
|
||||||
hideDo: true,
|
},
|
||||||
currentMtask:{},
|
hideDo: true,
|
||||||
apiObj:null,
|
currentMtask: {},
|
||||||
params:{
|
apiObj: null,
|
||||||
mtask:''
|
params: {
|
||||||
},
|
mtask: ''
|
||||||
mlogId:'',
|
},
|
||||||
handledate:'',
|
mlogId: '',
|
||||||
dialogSave:false,
|
handledate: '',
|
||||||
visibleDrawer:false,
|
dialogSave: false,
|
||||||
}
|
visibleDrawer: false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.mtaskId = this.$route.query.mtaskId;
|
this.mtaskId = this.$route.query.mtaskId;
|
||||||
|
@ -129,7 +121,7 @@ export default {
|
||||||
this.getMtask(this.mtaskId);
|
this.getMtask(this.mtaskId);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMtask(id){
|
getMtask(id) {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.pm.mtask.item.req(id).then(res => {
|
this.$API.pm.mtask.item.req(id).then(res => {
|
||||||
that.currentMtask = res;
|
that.currentMtask = res;
|
||||||
|
@ -137,7 +129,7 @@ export default {
|
||||||
this.mtask = res.id;
|
this.mtask = res.id;
|
||||||
this.material_out = res.material_out_.id;
|
this.material_out = res.material_out_.id;
|
||||||
this.handledate = res.start_date;
|
this.handledate = res.start_date;
|
||||||
|
|
||||||
this.params.mtask = this.mtaskId;
|
this.params.mtask = this.mtaskId;
|
||||||
this.apiObj = this.$API.wpm.mlog.list;
|
this.apiObj = this.$API.wpm.mlog.list;
|
||||||
})
|
})
|
||||||
|
@ -146,11 +138,11 @@ export default {
|
||||||
this.visibleDrawer = true;
|
this.visibleDrawer = true;
|
||||||
this.mlogId = row.id;
|
this.mlogId = row.id;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.showDrawer.open();
|
this.$refs.showDrawer.open();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
handleQueryMtask(){
|
handleQueryMtask() {
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
},
|
},
|
||||||
//添加
|
//添加
|
||||||
|
@ -160,7 +152,7 @@ export default {
|
||||||
that.material_out = that.currentMtask.material_out;
|
that.material_out = that.currentMtask.material_out;
|
||||||
that.dialogSave = true;
|
that.dialogSave = true;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
that.$refs.saveDialog.open("add");
|
that.$refs.saveDialog.open("add");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//编辑
|
//编辑
|
||||||
|
@ -177,6 +169,7 @@ export default {
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$API.wpm.mlog.delete.req(row.id).then((res) => {
|
this.$API.wpm.mlog.delete.req(row.id).then((res) => {
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
|
this.$refs.mtaskMlogs.refresh();
|
||||||
return res;
|
return res;
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
return err;
|
return err;
|
||||||
|
@ -188,17 +181,24 @@ export default {
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
this.$refs.mtaskMlogs.refresh();
|
this.$refs.mtaskMlogs.refresh();
|
||||||
},
|
},
|
||||||
handleQuery() {
|
|
||||||
this.$refs.table.queryData(this.query)
|
|
||||||
},
|
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.query = {};
|
this.query = {};
|
||||||
},
|
},
|
||||||
mlog_submit(row){
|
mlog_submit(row) {
|
||||||
this.$API.wpm.mlog.submit.req(row.id).then(res => {
|
this.$API.wpm.mlog.submit.req(row.id).then(res => {
|
||||||
this.$message.success('操作成功')
|
this.$message.success('操作成功')
|
||||||
this.$refs.mtaskMlogs.refresh()
|
this.$refs.mtaskMlogs.refresh()
|
||||||
}).catch(err => {})
|
}).catch(err => { })
|
||||||
|
},
|
||||||
|
mlog_revert(row) {
|
||||||
|
this.mlogHandleLoading = true;
|
||||||
|
this.$API.wpm.mlog.revert.req(row.id).then(res => {
|
||||||
|
this.$message.success("撤回成功");
|
||||||
|
this.$refs.mtaskMlogs.refresh()
|
||||||
|
this.mlogHandleLoading = false;
|
||||||
|
}).catch(e => {
|
||||||
|
this.mlogHandleLoading = false;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue