695593266@qq.com hai 1 semana
pai
achega
6995128ec4

+ 7 - 0
src/views/productionPlan/components/newFactoryProductionScheduling.columns.js

@@ -234,6 +234,13 @@ export function createWorkOrderSchedulingColumns() {
       minWidth: 170,
       showOverflowTooltip: true
     },
+    {
+      prop: 'workOrderType',
+      label: '订单类型',
+      align: 'center',
+      width: 100,
+      slot: 'workOrderType'
+    },
     {
       prop: 'productionPlanCode',
       label: '计划编号',

+ 25 - 2
src/views/productionPlan/components/newFactoryProductionScheduling.vue

@@ -86,6 +86,7 @@
           :page-size="20"
           :pagination-class="planPaginationClass"
           @reload="handlePlanTableReload"
+          @columns-change="handleColumnChange"
           @update:selection="handlePlanSelectionChange"
         >
           <template v-slot:action="{ row }">
@@ -105,6 +106,21 @@
               未布点
             </el-tag>
           </template>
+          <template v-slot:workOrderType="{ row }">
+            <el-tag v-if="row.workOrderType == 1" type="success" size="mini">
+              普通订单
+            </el-tag>
+            <el-tag v-else-if="row.workOrderType == 2" size="mini">
+              临时订单
+            </el-tag>
+            <el-tag
+              v-else-if="row.workOrderType == 3"
+              type="warning"
+              size="mini"
+            >
+              受托订单
+            </el-tag>
+          </template>
         </ele-pro-table>
       </div>
 
@@ -214,6 +230,7 @@
   import PlanPickerDialog from './newFactoryProductionScheduling/PlanPickerDialog.vue';
   import PlanRoutePanel from './newFactoryProductionScheduling/PlanRoutePanel.vue';
   import TaskConfigPanel from './newFactoryProductionScheduling/TaskConfigPanel.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
   import {
     getList,
     teamSchedulingGanttChart,
@@ -254,6 +271,7 @@
   } from './newFactoryProductionScheduling.utils';
 
   export default {
+    mixins: [tabMixins],
     components: {
       projectGantt,
       PlanPickerDialog,
@@ -316,6 +334,9 @@
         orderListLoader: null,
         orderDateReloadTimer: null,
         columns: createSchedulingColumns(),
+        newColumns: [],
+        columnsVersion: 1,
+        tabMixinsInit: false,
         viewportWidth: typeof window === 'undefined' ? 1920 : window.innerWidth,
         viewportHeight: typeof window === 'undefined' ? 900 : window.innerHeight
       };
@@ -407,6 +428,9 @@
           ? 'aps-team-scheduling-work-order-table'
           : 'aps-factory-scheduling-plan-table';
       },
+      cacheKeyUrl() {
+        return this.planTableCacheKey;
+      },
       planTableStatusTabs() {
         if (this.isOrderScheduling) {
           return [
@@ -993,8 +1017,6 @@
       handlePublish(row) {
         const skipBomCheck =
           this.isOrderScheduling && String(row?.workOrderType ?? '') == '3';
-        console.log('this.isOrderScheduling', this.isOrderScheduling);
-        console.log('skipBomCheck', skipBomCheck, row?.workOrderType);
         if (!skipBomCheck && !row.bomCategoryId) {
           this.$message.warning('该计划没有配置BOM请先配置BOM');
           return;
@@ -2573,6 +2595,7 @@
           mode === 'order'
             ? createWorkOrderSchedulingColumns()
             : createSchedulingColumns();
+        await this.getTabColumns();
         this.selectedWorkOrders =
           this.buildWorkOrderTableRows(selectedWorkOrders);
         if (mode === 'order' && this.selectedWorkOrders.length) {

+ 2 - 2
vue.config.js

@@ -35,14 +35,14 @@ module.exports = {
         // target: 'http://192.168.1.103:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
-        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.102:18086',
         // target: 'http://aiot.zoomwin.com.cn:51001/api',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
 
         // target: 'http://192.168.1.116:18086',