|
|
@@ -1 +1,248 @@
|
|
|
-<template></template>
|
|
|
+<template>
|
|
|
+ <div class="ele-body">
|
|
|
+ <el-card shadow="never" v-loading="loading">
|
|
|
+ <productionPlan-search @search="reload" ref="searchRef">
|
|
|
+ </productionPlan-search>
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="handleTabChange">
|
|
|
+ <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"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="datasource"
|
|
|
+ :cache-key="`${activeName}ProductionPlanTable`"
|
|
|
+ >
|
|
|
+ <!-- 操作列 -->
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-truck"
|
|
|
+ @click="handleOrderPublish(row)"
|
|
|
+ >
|
|
|
+ 发布工单
|
|
|
+ </el-link>
|
|
|
+ <el-link type="primary" :underline="false" icon="el-icon-truck">
|
|
|
+ 重新发布
|
|
|
+ </el-link>
|
|
|
+ <el-link type="primary" :underline="false" icon="el-icon-edit">
|
|
|
+ 修改计划
|
|
|
+ </el-link>
|
|
|
+ <el-link type="primary" :underline="false" icon="el-icon-edit">
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import productionPlanSearch from './components/productionPlan-search.vue';
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ productionPlanSearch
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ activeName: 'first',
|
|
|
+
|
|
|
+ // 加载状态
|
|
|
+ loading: false,
|
|
|
+ pageType: 'add',
|
|
|
+ dialogTitle: '',
|
|
|
+ isBindPlan: false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 表格列配置
|
|
|
+ columns () {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '计划编号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planCode',
|
|
|
+ label: '产品编号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planName',
|
|
|
+ label: '牌号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'equiCode',
|
|
|
+ label: '型号',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'equiName',
|
|
|
+ label: '计划数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'executeUserName',
|
|
|
+ label: '计划重量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'planFinishTime',
|
|
|
+ label: '要求成型数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'acceptTime',
|
|
|
+ label: '已成型数量',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'finishTime',
|
|
|
+ label: '要求成型日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sj',
|
|
|
+ label: '预测成型日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '实际成型日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '交货日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '预测交货日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ ...(this.activeName === 'second'
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '实际交货日期',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : []),
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '计划类型',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态',
|
|
|
+ fixed: this.activeName === 'second' ? 'right' : false,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ ...(this.activeName === 'first'
|
|
|
+ ? [
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 350,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ fixed: 'right',
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ : [])
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /* 表格数据源 */
|
|
|
+ datasource ({ page, limit, where, order }) {
|
|
|
+ return [{}];
|
|
|
+ // return getWorkOrderList({
|
|
|
+ // pageNum: page,
|
|
|
+ // size: limit,
|
|
|
+ // ...where,
|
|
|
+ // type: 3
|
|
|
+ // });
|
|
|
+ },
|
|
|
+ // 发布工单
|
|
|
+ handleOrderPublish (row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/productionPlan/workOrderPublish'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleTabChange () {
|
|
|
+ this.$refs.searchRef.reset();
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload (where) {
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
+ },
|
|
|
+
|
|
|
+ goDetail (row) {
|
|
|
+ row.title = '工单详情';
|
|
|
+ row.tabLabel = '工单信息';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|