فهرست منبع

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-aps into dengfei

695593266@qq.com 8 ماه پیش
والد
کامیت
3d423d4486

+ 6 - 0
src/views/aps/capacity/index.vue

@@ -59,6 +59,8 @@
         :pageSizes="[20, 30, 40, 50, 100]"
         row-key="id"
         @selection-change="handleSelectionChange"
+        @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
       >
         <template v-slot:toolbar>
           <el-button
@@ -288,12 +290,16 @@ import {
   updateFactory_capacity_detail
 } from '@/api/aps/factory_capacity_detail';
 import { getFactoryList } from '@/api/saleOrder';
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
   name: 'Capacity',
+  mixins: [tabMixins],
+  
   // dicts: ['year_select','month_select'],
   data() {
     return {
+      cacheKeyUrl: 'c32a9c7d-aps-factoryCapacity-index',
       titleDetail: '工厂能力详情',
       openDetail: false,
       // 遮罩层

+ 8 - 8
src/views/aps/presalesorder/index.vue

@@ -14,6 +14,8 @@
         :initLoad="false"
         @select="handleSelect"
         @done="onDone"
+        @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
       >
         <template v-slot:toolbar>
           <el-button
@@ -430,19 +432,16 @@
     occupyAllRes,
     getQueryFactory
   } from '@/api/aps/presalesorder';
-  import {
-    API_BASE_URL,
-    TOKEN_HEADER_NAME,
-    LAYOUT_PATH
-  } from '@/config/setting';
-  import { getToken, setToken } from '@/utils/token-util';
-  import { download } from '@/utils/request';
+  import { API_BASE_URL } from '@/config/setting';
+
   import modalTitle from '@/components/modalTitle.vue';
   import search from './search.vue';
   import importDialog from './import-dialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+
   export default {
     name: 'PreSalesorder',
-
+    mixins: [tabMixins],
     components: { modalTitle, search, importDialog },
     data() {
       return {
@@ -489,6 +488,7 @@
         titleExpect: '交期确定',
         // 是否显示弹出层
         openExpect: false,
+        cacheKeyUrl: 'c32a9c7d-aps-presalesorder-index',
 
         columns: [
           {

+ 6 - 2
src/views/aps/transferred/index.vue

@@ -5,6 +5,8 @@
       <search ref="search" @search="reload"></search>
 
       <ele-pro-table ref="tableRef" :columns="columns" :datasource="datasource" :pageSize="20"
+         @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
         :pageSizes="[20, 30, 40, 50, 100]" row-key="id" @selection-change="handleSelectionChange" :initLoad="false" @select="handleSelect"
         @done="onDone">
         <!-- <template v-slot:toolbar>
@@ -200,15 +202,16 @@
 <script>
 import { estimateDeliveryDates, createAll, convertToSalesOrder, importTemplate, exportFile, importFile, listSalesorder, getSalesOrder, delSalesorder, addSalesorder, updateSalesorder, listSalesOrderExpect, occupyRes, listSalesOrderOccupyRes, listSalesorderExpectAll, occupyAllRes, getQueryFactory } from "@/api/aps/presalesorder";
 import { API_BASE_URL, TOKEN_HEADER_NAME, LAYOUT_PATH } from '@/config/setting';
-import { getToken, setToken } from '@/utils/token-util';
-import { download } from '@/utils/request';
+
 
 import modalTitle from '@/components/modalTitle.vue';
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 import search from './search.vue';
 
 export default {
   name: "PreSalesorder",
+  mixins: [tabMixins],
 
   components: { modalTitle, search },
   data() {
@@ -256,6 +259,7 @@ export default {
       titleExpect: "交期确定",
       // 是否显示弹出层
       openExpect: false,
+      cacheKeyUrl: 'c32a9c7d-aps-Transferred-index',
 
       columns: [
         // {

+ 6 - 0
src/views/aps_workday_schedule/schedule/index.vue

@@ -59,6 +59,8 @@
       </el-col> -->
 
       <ele-pro-table ref="tableRef" :columns="columns" :datasource="scheduleList" row-key="id"
+       @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
         @selection-change="handleSelectionChange">
         <template v-slot:toolbar>
           <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
@@ -521,12 +523,16 @@
 
 <script>
 import { listSchedule, getSchedule, delSchedule, addSchedule, updateSchedule } from "@/api/aps_workday_schedule/schedule";
+import tabMixins from '@/mixins/tableColumnsMixin';
 
 export default {
+  mixins: [ tabMixins],
+
   name: "Schedule",
   // dicts: ['workday_status','year_select','month_select'],
   data() {
     return {
+      cacheKeyUrl: 'c32a9c7d-aps-workday_schedule-index',
       workday_status: [{ "label": "工作", "value": "1" }, { "label": "休息", "value": "0" },],
       year_select: [
         { "value": 2025 }, { "value": 2026 }, { "value": 2027 }, { "value": 2028 }

+ 285 - 249
src/views/cuttingPlan/index.vue

@@ -1,12 +1,25 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading">
-      <cuttingPlanSearch @search="reload" :statusOpt="statusOpt" :activeName="activeName" ref="searchRef">
+      <cuttingPlanSearch
+        @search="reload"
+        :statusOpt="statusOpt"
+        :activeName="activeName"
+        ref="searchRef"
+      >
       </cuttingPlanSearch>
 
       <!-- 数据表格 -->
-      <ele-pro-table ref="table11" :initLoad="false" :columns="columns" :datasource="datasource"
-        cache-key="`materialPlanTable`" :pageSize="20" :pageSizes="[20, 30, 40, 50, 100]">
+      <ele-pro-table
+        ref="table11"
+        :initLoad="false"
+        :columns="columns"
+        :datasource="datasource"
+        @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
+        :pageSize="20"
+        :pageSizes="[20, 30, 40, 50, 100]"
+      >
         <template v-slot:toolbar>
           <el-dropdown trigger="click" @command="handleClick">
             <el-link type="primary" icon="el-icon-plus">创建计划</el-link>
@@ -38,29 +51,47 @@
               row.orderType == 1
                 ? '销售订单'
                 : row.orderType == 2
-                  ? '生产计划'
-                  : ''
+                ? '生产计划'
+                : ''
             }}
           </span>
         </template>
 
         <template v-slot:approvalStatus="{ row }">
-          <el-link type="primary" :underline="false" @click="handleDetails(row)">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="handleDetails(row)"
+          >
             {{ approvalStatusFormatter(row.approvalStatus) }}
           </el-link>
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-          <el-link type="primary" :underline="false" @click="todo(row)"
-            v-if="row.approvalStatus == 0 || row.approvalStatus == 3">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="todo(row)"
+            v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
+          >
             提交
           </el-link>
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="handleEdit('edit', row)"
-            v-if="row.approvalStatus != 2 && row.approvalStatus != 1">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="handleEdit('edit', row)"
+            v-if="row.approvalStatus != 2 && row.approvalStatus != 1"
+          >
             修改
           </el-link>
-          <el-link @click="handleDel(row)" type="danger" :underline="false" icon="el-icon-delete"
-            v-if="row.approvalStatus == 0 || row.approvalStatus == 3">
+          <el-link
+            @click="handleDel(row)"
+            type="danger"
+            :underline="false"
+            icon="el-icon-delete"
+            v-if="row.approvalStatus == 0 || row.approvalStatus == 3"
+          >
             删除
           </el-link>
         </template>
@@ -81,258 +112,263 @@
 </template>
 
 <script>
-import cuttingPlanSearch from './components/cuttingPlan-search.vue';
+  import cuttingPlanSearch from './components/cuttingPlan-search.vue';
 
-import planEditDialog from './components/plan-edit-dialog.vue';
+  import planEditDialog from './components/plan-edit-dialog.vue';
 
-import producePlan from './components/producePlan.vue';
+  import producePlan from './components/producePlan.vue';
 
-import detail from '@/views/materialPlan/components/detail.vue';
-import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
-import { getList, del, submit } from '@/api/cuttingPlan/index.js';
+  import detail from '@/views/materialPlan/components/detail.vue';
+  import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
+  import { getList, del, submit } from '@/api/cuttingPlan/index.js';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
-export default {
-  components: {
-    cuttingPlanSearch,
-    processSubmitDialog,
-    detail,
-    planEditDialog,
-    producePlan
-  },
+  export default {
+    components: {
+      cuttingPlanSearch,
+      processSubmitDialog,
+      detail,
+      planEditDialog,
+      producePlan
+    },
+    mixins: [tabMixins],
 
-  data() {
-    return {
-      activeName: 'first',
+    data() {
+      return {
+        activeName: 'first',
+        cacheKeyUrl: 'c32a9c7d-aps-cuttingPlan-index',
+        columnsVersion: 1,
+        // 加载状态
+        loading: false,
+        processSubmitDialogFlag: false,
+        statusOpt: {
+          first: [
+            { label: '所有状态', value: null },
+            { label: '待排产', value: '1' },
+            { label: '待发布', value: '2' },
+            { label: '发布失败', value: '3' },
+            { label: '已完成', value: '6' }
+          ]
+        },
 
-      // 加载状态
-      loading: false,
-      processSubmitDialogFlag:false,
-      statusOpt: {
-        first: [
-          { label: '所有状态', value: null },
-          { label: '待排产', value: '1' },
-          { label: '待发布', value: '2' },
-          { label: '发布失败', value: '3' },
-          { label: '已完成', value: '6' }
-        ]
-      },
+        approvalStatusOpt: {
+          first: [
+            { label: '未提交', value: '0' },
+            { label: '审核中', value: '1' },
+            { label: '审核通过', value: '2' },
+            { label: '审核未通过', value: '3' }
+          ]
+        }
+      };
+    },
+    computed: {
+      // 表格列配置
+      columns() {
+        let num = this.columnsVersion;
 
-      approvalStatusOpt: {
-        first: [
-          { label: '未提交', value: '0' },
-          { label: '审核中', value: '1' },
-          { label: '审核通过', value: '2' },
-          { label: '审核未通过', value: '3' }
-        ]
-      }
-    };
-  },
-  computed: {
-    // 表格列配置
-    columns() {
-      return [
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          slot: 'demandType',
-          prop: 'demandType',
-          label: '需求类型',
-          align: 'center',
-          formatter: (row, column, cellValue) => {
-            return row.demandType == 1
-              ? '生产性物资采购'
-              : row.demandType == 6
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            slot: 'demandType',
+            prop: 'demandType',
+            label: '需求类型',
+            align: 'center',
+            formatter: (row, column, cellValue) => {
+              return row.demandType == 1
+                ? '生产性物资采购'
+                : row.demandType == 6
                 ? '外协自供料采购'
                 : row.demandType == 7
-                  ? '外协客供料采购'
-                  : '';
+                ? '外协客供料采购'
+                : '';
+            },
+            width: 130,
+            showOverflowTooltip: true,
+            fixed: 'left'
           },
-          width: 130,
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          slot: 'name',
-          prop: 'name',
-          label: '名称',
-          align: 'center',
-          width: 130,
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          slot: 'code',
-          prop: 'code',
-          label: '编号',
-          align: 'center',
-          width: 160,
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'planStr',
-          label: '生产计划编码',
-          align: 'center',
-          width: 160,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'orderStr',
-          label: '销售订单号',
-          align: 'center',
-          width: 160,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'serialNoStr',
-          label: '客户代号',
-          align: 'center',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'status',
-          label: '状态',
-          align: 'center',
-          slot: 'status',
-          action: 'status',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'approvalStatus',
-          label: '审批状态',
-          align: 'center',
-          slot: 'approvalStatus',
-          action: 'approvalStatus',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'orderType',
-          label: '来源类型',
-          align: 'center',
-          slot: 'orderType',
-          action: 'orderType',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          width: 120,
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 250,
-          align: 'center',
-          resizable: false,
-          fixed: 'right',
-          slot: 'action'
-        }
-      ];
-    }
-  },
-  methods: {
-    statusFormatter(status) {
-      const obj = this.statusOpt[this.activeName].find(
-        (i) => i.value == status
-      );
-
-      return obj && obj.label;
+          {
+            slot: 'name',
+            prop: 'name',
+            label: '名称',
+            align: 'center',
+            minWidth: 130,
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            slot: 'code',
+            prop: 'code',
+            label: '编号',
+            align: 'center',
+            minWidth: 160,
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'planStr',
+            label: '生产计划编码',
+            align: 'center',
+            width: 160,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'orderStr',
+            label: '销售订单号',
+            align: 'center',
+            width: 160,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'serialNoStr',
+            label: '客户代号',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'status',
+            label: '状态',
+            align: 'center',
+            slot: 'status',
+            action: 'status',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'approvalStatus',
+            label: '审批状态',
+            align: 'center',
+            slot: 'approvalStatus',
+            action: 'approvalStatus',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'orderType',
+            label: '来源类型',
+            align: 'center',
+            slot: 'orderType',
+            action: 'orderType',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 250,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action'
+          }
+        ];
+      }
     },
+    methods: {
+      statusFormatter(status) {
+        const obj = this.statusOpt[this.activeName].find(
+          (i) => i.value == status
+        );
 
-    approvalStatusFormatter(status) {
-      const obj = this.approvalStatusOpt[this.activeName].find(
-        (i) => i.value == status
-      );
+        return obj && obj.label;
+      },
 
-      return obj && obj.label;
-    },
-    reload(where = {}) {
-      if (where.statusList) {
-        where.statusList = where.statusList.split(',');
-      }
-      this.$nextTick(() => {
-        this.$refs.table11.reload({ page: 1, where });
-      });
-    },
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      where.type = 1;
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    handleClick(tab) {
-      if (tab == 1) {
-        this.$refs.planEditDialogRef.open('add');
-      } else if (tab == 2) {
-        this.$refs.produceRef.open('add');
-      }
-    },
-    handleDetails(row) {
-      if (row.status == 0) {
-        this.$message.info('未提交没有审核流程');
-      } else {
-        this.$refs.detailRef.open(row.processInstanceId);
-      }
-    },
-    handleEdit(type, row) {
-      if (row.orderType == 1) {
-        this.$refs.planEditDialogRef.open(type, row);
-      } else if (row.orderType == 2) {
-        this.$refs.produceRef.open(type, row);
-      }
-    },
-    handleDel({ id }) {
-      this.$confirm('确认删除当前数据!', '提示').then(async () => {
-        await del([id]);
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
+      approvalStatusFormatter(status) {
+        const obj = this.approvalStatusOpt[this.activeName].find(
+          (i) => i.value == status
+        );
 
-    todo(row) {
-      this.processSubmitDialogFlag = true;
-      this.$nextTick(() => {
-        let params = {
-          businessId: row.id,
-          businessKey: 'baiting_code',
-          formCreateUserId: row.createUserId,
-          variables: {
-            businessCode: row.code
-          }
-        };
-        this.$refs.processSubmitDialogRef.init(params);
-      });
-      // submit({ businessId: row.id }).then((res) => {
-      //   if (res) {
-      //     this.$message.success('提交成功!');
-      //     this.reload();
-      //   }
-      // });
+        return obj && obj.label;
+      },
+      reload(where = {}) {
+        if (where.statusList) {
+          where.statusList = where.statusList.split(',');
+        }
+        this.$nextTick(() => {
+          this.$refs.table11.reload({ page: 1, where });
+        });
+      },
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        where.type = 1;
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      handleClick(tab) {
+        if (tab == 1) {
+          this.$refs.planEditDialogRef.open('add');
+        } else if (tab == 2) {
+          this.$refs.produceRef.open('add');
+        }
+      },
+      handleDetails(row) {
+        if (row.status == 0) {
+          this.$message.info('未提交没有审核流程');
+        } else {
+          this.$refs.detailRef.open(row.processInstanceId);
+        }
+      },
+      handleEdit(type, row) {
+        if (row.orderType == 1) {
+          this.$refs.planEditDialogRef.open(type, row);
+        } else if (row.orderType == 2) {
+          this.$refs.produceRef.open(type, row);
+        }
+      },
+      handleDel({ id }) {
+        this.$confirm('确认删除当前数据!', '提示').then(async () => {
+          await del([id]);
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
+
+      todo(row) {
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: row.id,
+            businessKey: 'baiting_code',
+            formCreateUserId: row.createUserId,
+            variables: {
+              businessCode: row.code
+            }
+          };
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+        // submit({ businessId: row.id }).then((res) => {
+        //   if (res) {
+        //     this.$message.success('提交成功!');
+        //     this.reload();
+        //   }
+        // });
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped></style>

+ 7 - 0
src/views/materialPlan/index.vue

@@ -18,6 +18,8 @@
         cache-key="`materialPlanTable`"
         :pageSize="20"
         :pageSizes="[20, 30, 40, 50, 100]"
+        @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
       >
         <template v-slot:toolbar>
           <el-dropdown trigger="click" @command="handleClick">
@@ -141,6 +143,7 @@
   import planEditDialog from './components/plan-edit-dialog.vue';
   import producePlan from './components/producePlan.vue';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   import detail from './components/detail.vue';
   import { getList, del, submit } from '@/api/materialPlan/index';
@@ -152,10 +155,13 @@
       producePlan,
       processSubmitDialog
     },
+    mixins: [tabMixins],
 
     data() {
       return {
         activeName: 'first',
+        cacheKeyUrl: 'c32a9c7d-aps-materialPlan-index',
+        columnsVersion: 1,
 
         // 加载状态
         loading: false,
@@ -195,6 +201,7 @@
     computed: {
       // 表格列配置
       columns() {
+        let num = this.columnsVersion;
         return [
           {
             columnKey: 'index',

+ 9 - 2
src/views/materialPlan/pickPlan.vue

@@ -15,7 +15,8 @@
         :initLoad="false"
         :columns="columns"
         :datasource="datasource"
-        cache-key="pickPlanTable"
+        @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
       >
         <template v-slot:toolbar>
           <el-button type="primary" @click="handleEdit('add')"
@@ -71,16 +72,20 @@
 
   import produceEditDialog from './components/produce-edit-dialog';
   import { getList, del } from '@/api/materialPlan/index';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+
   export default {
     components: {
       produceEditDialog,
       materialPlanSearch
     },
+    mixins: [tabMixins],
 
     data() {
       return {
         activeName: 'second',
-
+        cacheKeyUrl: 'c32a9c7d-aps-cuttingPlan-index',
+        columnsVersion: 1,
         // 加载状态
         loading: false,
 
@@ -98,6 +103,8 @@
     computed: {
       // 表格列配置
       columns() {
+        let num = this.columnsVersion;
+
         return [
           {
             columnKey: 'index',

+ 177 - 152
src/views/materialPlan/usePlan.vue

@@ -1,13 +1,23 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading">
-      <materialPlan-search @search="reload" :statusOpt="statusOpt" :activeName="activeName" ref="searchRef">
+      <materialPlan-search
+        @search="reload"
+        :statusOpt="statusOpt"
+        :activeName="activeName"
+        ref="searchRef"
+      >
       </materialPlan-search>
 
-
       <!-- 数据表格 -->
-      <ele-pro-table ref="table" :initLoad="false" :columns="columns" :datasource="datasource"
-        cache-key="pickPlanTable">
+      <ele-pro-table
+        ref="table"
+        :initLoad="false"
+        :columns="columns"
+        :datasource="datasource"
+        @columns-change="handleColumnChange"
+        :cacheKey="cacheKeyUrl"
+      >
         <template v-slot:toolbar>
           <el-button type="primary" @click="handleEdit('add')">新增</el-button>
         </template>
@@ -23,179 +33,194 @@
           }}</el-link>
         </template>
 
-
         <!-- 操作列 -->
-        <template v-slot:action="{ row }" >
-          <el-link type="primary" :underline="false" @click="add(row)" v-if="row.status != 200 && row.status != 201">
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="add(row)"
+            v-if="row.status != 200 && row.status != 201"
+          >
             提交
           </el-link>
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="handleEdit('edit', row)" v-if="row.status != 200 && row.status != 201">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="handleEdit('edit', row)"
+            v-if="row.status != 200 && row.status != 201"
+          >
             修改计划
           </el-link>
-          <el-link @click="handleDel(row)" type="danger" :underline="false" icon="el-icon-delete" v-if="row.status != 200 && row.status != 201">
+          <el-link
+            @click="handleDel(row)"
+            type="danger"
+            :underline="false"
+            icon="el-icon-delete"
+            v-if="row.status != 200 && row.status != 201"
+          >
             删除
           </el-link>
-
         </template>
       </ele-pro-table>
     </el-card>
-    <produceEditDialog ref="produceEditDialogRef" @success="reload"></produceEditDialog>
-
+    <produceEditDialog
+      ref="produceEditDialogRef"
+      @success="reload"
+    ></produceEditDialog>
   </div>
 </template>
 
 <script>
-import materialPlanSearch from './components/materialPlan-search.vue';
-
-import produceEditDialog from './components/produce-edit-dialog'
-import { getList, del, addUserPlan } from '@/api/materialPlan/index';
-export default {
-  components: {
-
-    produceEditDialog,
-    materialPlanSearch,
-
-  },
-
-  data() {
-    return {
-      activeName: 'second',
+  import materialPlanSearch from './components/materialPlan-search.vue';
 
-      // 加载状态
-      loading: false,
+  import produceEditDialog from './components/produce-edit-dialog';
+  import { getList, del, addUserPlan } from '@/api/materialPlan/index';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
+  export default {
+    components: {
+      produceEditDialog,
+      materialPlanSearch
+    },
+    mixins: [tabMixins],
+
+    data() {
+      return {
+        activeName: 'second',
+        columnsVersion: 1,
+        cacheKeyUrl: 'c32a9c7d-aps-usePlan-index',
+        // 加载状态
+        loading: false,
+
+        statusOpt: {
+          second: [
+            { label: '所有状态', value: null },
+            { label: '待排产', value: '1' },
+            { label: '待提交', value: '2' },
+            { label: '发布失败', value: '3' },
+            { label: '已完成', value: '6' },
+            { label: '已申请', value: '200' },
+            { label: '已入库', value: '201' }
+          ]
+        }
+      };
+    },
+    computed: {
+      // 表格列配置
+      columns() {
+        let num = this.columnsVersion;
+
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            slot: 'name',
+            prop: 'name',
+            label: '计划名称',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'code',
+            slot: 'code',
+            label: '计划编号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'status',
+            label: '状态',
+            align: 'center',
+            slot: 'status',
+            action: 'status',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 250,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action'
+          }
+        ];
+      }
+    },
+    methods: {
+      statusFormatter(status) {
+        const obj = this.statusOpt[this.activeName].find(
+          (i) => i.value == status
+        );
 
+        return obj && obj.label;
+      },
 
-      statusOpt: {
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        where.type = 2;
+        delete where.statusList;
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      handleEdit(type, row) {
+        this.$refs.produceEditDialogRef.open(type, row);
+      },
 
-        second: [
-          { label: '所有状态', value: null },
-          { label: '待排产', value: '1' },
-          { label: '待提交', value: '2' },
-          { label: '发布失败', value: '3' },
-          { label: '已完成', value: '6' },
-          { label: '已申请', value: '200' },
-          { label: '已入库', value: '201' },
-        ]
+      handleDel({ id }) {
+        this.$confirm('确认删除当前数据!', '提示').then(async () => {
+          await del([id]);
+          this.$message.success('删除成功!');
+          this.reload();
+        });
       },
 
+      handleTabChange() {
+        this.$refs.searchRef.reset();
+      },
 
-    };
-  },
-  computed: {
-    // 表格列配置
-    columns() {
-      return [
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          slot: 'name',
-          prop: 'name',
-          label: '计划名称',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'code',
-          slot: 'code',
-          label: '计划编号',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'status',
-          label: '状态',
-          align: 'center',
-          slot: 'status',
-          action: 'status',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 250,
-          align: 'center',
-          resizable: false,
-          fixed: 'right',
-          slot: 'action'
+      /* 刷新表格 */
+      reload(where = {}) {
+        if (where.statusList) {
+          where.statusList = where.statusList.split(',');
         }
-      ];
-    }
-  },
-  methods: {
-    statusFormatter(status) {
-      const obj = this.statusOpt[this.activeName].find(
-        (i) => i.value == status
-      );
-
-      return obj && obj.label;
-    },
-
-
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      where.type = 2
-      delete where.statusList
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    handleEdit(type, row) {
-      this.$refs.produceEditDialogRef.open(type, row);
-    },
-
-    handleDel({ id }) {
-      this.$confirm('确认删除当前数据!', '提示').then(async () => {
-        await del([id]);
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
-
-    handleTabChange() {
-      this.$refs.searchRef.reset();
-    },
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      },
 
-    /* 刷新表格 */
-    reload(where = {}) {
-      if (where.statusList) {
-        where.statusList = where.statusList.split(',')
+      //提交
+      add(e) {
+        addUserPlan({ id: e.id }).then((res) => {
+          if (res.code == 200) {
+            this.$message.success('提交成功!');
+          }
+        });
       }
-      this.$nextTick(() => {
-        this.$refs.table.reload({ page: 1, where });
-      });
-    },
-
-    //提交
-    add(e) {
-      addUserPlan({id:e.id}).then((res) => {
-        if (res.code == 200) {
-          this.$message.success('提交成功!')
-        }
-      })
     }
-  }
-};
+  };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>

+ 2 - 2
src/views/productionPlan/components/homogeneityInspectDialog.vue

@@ -691,7 +691,7 @@
         pickerOptions: {
           // 限制最大可选日期为今天
           disabledDate(time) {
-            const today = new Date(2025, 7, 29);
+            const today = new Date();
             return time.getTime() > today.getTime();
           }
         },
@@ -745,7 +745,7 @@
       },
       initTime() {
         // 获取当前日期(今天)
-        const today = new Date(2025, 7, 29); // 注意:月份是0-based,8月对应7
+        const today = new Date(); // 注意:月份是0-based,8月对应7
         // 计算三个月前的日期
         const threeMonthsAgo = new Date(today);
         threeMonthsAgo.setMonth(today.getMonth() - 3);

+ 59 - 58
src/views/productionPlan/index.vue

@@ -136,7 +136,7 @@
         ref="table"
         :key="activeName"
         :initLoad="false"
-        :columns="newColumns"
+        :columns="columns"
         :datasource="datasource"
         row-key="code"
         :selection.sync="selection"
@@ -447,8 +447,7 @@
           { label: '改型计划', value: '4' },
           { label: '返工返修计划', value: '5' }
         ],
-        newColumns: [],
-
+        columns: [],
         selection: [],
         clientEnvironmentId: '',
         // factoryShow: false,
@@ -465,44 +464,58 @@
       //   return this.$store.state.user.info.clientEnvironmentId;
       // },
       // 表格列配置
-      columns() {
-        const num = this.columnsVersion;
-        const opt = {
-          first: [],
-          second: [
-            {
-              prop: 'releaseTime',
-              label: '工单发布日期',
-              align: 'center',
-
-              minWidth: 110
-            },
-            {
-              prop: 'planFormingTime',
-              label: '预测生产日期',
-              align: 'center',
-
-              minWidth: 110
-            },
-            {
-              prop: 'deliveryTime',
-              label: '预测交货日期',
-              align: 'center',
-
-              minWidth: 110
-            },
-            {
-              prop: 'formingTime',
-              label: '实际交货日期',
-              align: 'center',
+      // columns() {
+      //   const num = this.columnsVersion;
+      //   const opt = {
+      //     first: [],
+      //     second: [
+      //       {
+      //         prop: 'releaseTime',
+      //         label: '工单发布日期',
+      //         align: 'center',
+      //         minWidth: 110
+      //       },
+      //       {
+      //         prop: 'planFormingTime',
+      //         label: '预测生产日期',
+      //         align: 'center',
+      //         minWidth: 110
+      //       },
+      //       {
+      //         prop: 'deliveryTime',
+      //         label: '预测交货日期',
+      //         align: 'center',
+      //         minWidth: 110
+      //       },
+      //       {
+      //         prop: 'formingTime',
+      //         label: '实际交货日期',
+      //         align: 'center',
+      //         minWidth: 110
+      //       }
+      //     ],
+      //     change: []
+      //   };
+      //   return
+      // }
+    },
+    created() {
+      this.setColumns();
+      this.getFieldModel();
+    },
+    mounted() {
+      this.clientEnvironmentId =
+        this.$store.state.user.info.clientEnvironmentId;
 
-              minWidth: 110
-            }
-          ],
-          change: []
-        };
+      this.getPlanStatistics();
+      this.getplannedReleaseRequire('planned_release_require');
+    },
+    methods: {
+      setColumns() {
+        let clientEnvironmentId =
+          this.$store.state.user.info.clientEnvironmentId;
 
-        return [
+        this.columns = [
           {
             width: 45,
             type: 'selection',
@@ -772,21 +785,21 @@
             prop: 'moCount',
             label: '模数',
             align: 'center',
-            show: this.clientEnvironmentId == '4'
+            show: clientEnvironmentId == '4'
           },
 
           {
             prop: 'blockCount',
             label: '块数',
             align: 'center',
-            show: this.clientEnvironmentId == '4'
+            show: clientEnvironmentId == '4'
           },
           {
             prop: 'noWordCount',
             label: '未排程块数',
             align: 'center',
 
-            show: this.clientEnvironmentId == '4',
+            show: clientEnvironmentId == '4',
             minWidth: 110
           },
           {
@@ -877,19 +890,7 @@
             showOverflowTooltip: true
           }
         ];
-      }
-    },
-    created() {
-      this.getFieldModel();
-    },
-    mounted() {
-      this.clientEnvironmentId =
-        this.$store.state.user.info.clientEnvironmentId;
-
-      this.getPlanStatistics();
-      this.getplannedReleaseRequire('planned_release_require');
-    },
-    methods: {
+      },
       handleSele(e) {
         if (e.index === '1') {
           this.isshow = false;
@@ -1120,9 +1121,9 @@
             };
           });
 
-          this.newColumns = [...this.columns, ...newRes, ...privateColumn];
-
-          this.$forceUpdate();
+          // this.newColumns = [...this.columns, ...newRes, ...privateColumn];
+          this.columns = [...this.columns, ...newRes, ...privateColumn];
+          this.getTabColumns();
         });
       },
 

+ 2 - 2
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -649,7 +649,7 @@
         pickerOptions: {
           // 限制最大可选日期为今天
           disabledDate(time) {
-            const today = new Date(2025, 7, 29);
+            const today = new Date();
             return time.getTime() > today.getTime();
           }
         },
@@ -692,7 +692,7 @@
       },
       initTime() {
         // 获取当前日期(今天)
-        const today = new Date(2025, 7, 29); // 注意:月份是0-based,8月对应7
+        const today = new Date(); // 注意:月份是0-based,8月对应7
         // 计算三个月前的日期
         const threeMonthsAgo = new Date(today);
         threeMonthsAgo.setMonth(today.getMonth() - 3);

+ 1 - 0
src/views/workOrder/components/releaseDialog.vue

@@ -630,6 +630,7 @@
                 : res.value == '1'
                 ? 1
                 : '';
+                console.log(this.form.singleReport, 'this.form.singleReport');
           }
         });
       },

+ 12 - 8
src/views/workOrder/index.vue

@@ -365,6 +365,18 @@
             align: 'center',
             minWidth: 160
           },
+          {
+            prop: 'list',
+            label: '派单对象',
+            align: 'center',
+            minWidth: 160,
+            formatter: (row) => {
+              if (row.list.length) {
+                let assignees = row.list.map((item) => item.assignees)?.flat();
+                return assignees?.map((item) => item.assigneeName).join(',');
+              }
+            }
+          },
           {
             prop: 'productionPlanCode',
             label: '计划编号',
@@ -387,14 +399,6 @@
               if (row.produceType == 3) {
                 return 'ABOM';
               }
-              // return '';
-              // if (row.produceType == 2) {
-              //   return '加工(MBOM)';
-              // }
-              // if (row.produceType == 3) {
-              //   return '装配(ABOM)';
-              // }
-              // return '';
             }
           },
           {