|
|
@@ -4,13 +4,10 @@
|
|
|
<materialPlan-search @search="reload" :statusOpt="statusOpt" :activeName="activeName" ref="searchRef">
|
|
|
</materialPlan-search>
|
|
|
|
|
|
- <el-tabs v-model="activeName" type="card">
|
|
|
- <el-tab-pane label="采购配料计划" name="first"></el-tab-pane>
|
|
|
- <el-tab-pane label="生产配料计划" name="second"></el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+
|
|
|
<!-- 数据表格 -->
|
|
|
- <ele-pro-table ref="table" :key="activeName" :initLoad="false" :columns="columns" :datasource="datasource"
|
|
|
- :cache-key="`${activeName}materialPlanTable`">
|
|
|
+ <ele-pro-table ref="table" :initLoad="false" :columns="columns" :datasource="datasource"
|
|
|
+ cache-key="`materialPlanTable`">
|
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary" @click="handleEdit('add')">创建计划</el-button>
|
|
|
</template>
|
|
|
@@ -44,7 +41,7 @@
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
<planEditDialog ref="planEditDialogRef" @success="reload" />
|
|
|
- <produceEditDialog ref="produceEditDialogRef" @success="reload"></produceEditDialog>
|
|
|
+
|
|
|
<detail ref="detailRef"></detail>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -52,13 +49,13 @@
|
|
|
<script>
|
|
|
import materialPlanSearch from './components/materialPlan-search.vue';
|
|
|
import planEditDialog from './components/plan-edit-dialog.vue';
|
|
|
-import produceEditDialog from './components/produce-edit-dialog'
|
|
|
+
|
|
|
import detail from './components/detail.vue'
|
|
|
import { getList, del, submit } from '@/api/materialPlan/index';
|
|
|
export default {
|
|
|
components: {
|
|
|
planEditDialog,
|
|
|
- produceEditDialog,
|
|
|
+
|
|
|
materialPlanSearch,
|
|
|
detail
|
|
|
},
|
|
|
@@ -69,9 +66,6 @@ export default {
|
|
|
|
|
|
// 加载状态
|
|
|
loading: false,
|
|
|
- pageType: 'add',
|
|
|
- dialogTitle: '',
|
|
|
- isBindPlan: false,
|
|
|
|
|
|
|
|
|
statusOpt: {
|
|
|
@@ -83,13 +77,7 @@ export default {
|
|
|
{ label: '已完成', value: '6' },
|
|
|
|
|
|
],
|
|
|
- second: [
|
|
|
- { label: '所有状态', value: null },
|
|
|
- { label: '待排产', value: '1' },
|
|
|
- { label: '待发布', value: '2' },
|
|
|
- { label: '发布失败', value: '3' },
|
|
|
- { label: '已完成', value: '6' },
|
|
|
- ]
|
|
|
+
|
|
|
},
|
|
|
|
|
|
approvalStatusOpt: {
|
|
|
@@ -130,10 +118,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
{
|
|
|
columnKey: 'status',
|
|
|
label: '状态',
|
|
|
@@ -143,18 +127,13 @@ export default {
|
|
|
},
|
|
|
|
|
|
|
|
|
- ...(this.activeName === 'first'
|
|
|
- ? [
|
|
|
- {
|
|
|
+ {
|
|
|
prop: 'approvalStatus',
|
|
|
label: '审批状态',
|
|
|
align: 'center',
|
|
|
slot: 'approvalStatus',
|
|
|
action: 'approvalStatus'
|
|
|
- }
|
|
|
- ]
|
|
|
- : []),
|
|
|
-
|
|
|
+ },
|
|
|
|
|
|
|
|
|
{
|
|
|
@@ -198,12 +177,7 @@ export default {
|
|
|
},
|
|
|
/* 表格数据源 */
|
|
|
datasource({ page, limit, where }) {
|
|
|
- if (this.activeName == 'first') {
|
|
|
- where.type = 1
|
|
|
- } else if (this.activeName == 'second') {
|
|
|
- where.type = 2
|
|
|
- delete where.statusList
|
|
|
- }
|
|
|
+ where.type = 1
|
|
|
return getList({
|
|
|
pageNum: page,
|
|
|
size: limit,
|
|
|
@@ -211,11 +185,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handleEdit(type, row) {
|
|
|
- if (this.activeName == 'first') {
|
|
|
- this.$refs.planEditDialogRef.open(type, row);
|
|
|
- } else if (this.activeName == 'second') {
|
|
|
- this.$refs.produceEditDialogRef.open(type, row);
|
|
|
- }
|
|
|
+ this.$refs.planEditDialogRef.open(type, row);
|
|
|
|
|
|
},
|
|
|
handleDel({ id }) {
|