ysy 1 年之前
父节点
当前提交
ecd765a8d8

+ 1 - 1
src/views/productionPlan/components/unpackDetails.vue

@@ -27,7 +27,7 @@
       <headerTitle v-if="type == 1" title="拆批数据明细" class="mt20">
       </headerTitle>
       <ele-pro-table
-        v-if="type == 1"
+        v-if="type == 1 && List.length > 0"
         ref="unpackTable"
         :needPage="false"
         :columns="columns"

+ 30 - 17
src/views/productionPlan/index.vue

@@ -13,16 +13,17 @@
         <el-button type="success" size="mini">齐套性检查</el-button>
         <el-button type="primary" size="mini">计划分解</el-button>
         <el-button type="primary" size="mini">补单计划</el-button>
-        <el-button type="danger" size="mini">计划行事历</el-button>
+        <el-button type="info" size="mini">计划行事历</el-button>
         <el-button type="warning" size="mini">预警设置</el-button>
         <el-button type="primary" size="mini" @click="handleMerge"
           >合批</el-button
         >
+        <el-button type="danger" size="mini">延期申请</el-button>
+        <el-button type="danger" size="mini">变更申请</el-button>
 
-        <el-button type="info" size="mini">延期申请</el-button>
-        <el-button type="info" size="mini">变更申请</el-button>
-
-        <el-button type="success" size="mini" v-if="timeDimensionPlanType == 3">新增</el-button>
+        <el-button type="success" size="mini" v-if="timeDimensionPlanType == 3"
+          >新增</el-button
+        >
       </div>
 
       <el-tabs v-model="activeName" type="card" size="mini">
@@ -41,7 +42,8 @@
         row-key="code"
         :selection.sync="selection"
         :cache-key="`${activeName}ProductionPlanTable`"
-        @sort-change="onSortChange"
+        @sort-change="onSortChange"   autoAmendPage
+        :parse-data="parseData"
       >
         <template v-slot:batchNo="{ row }">
           <el-link type="primary" :underline="false">
@@ -71,6 +73,10 @@
           </el-link>
         </template>
 
+        <template v-slot:salesCode="{ row }">
+          {{ row.salesCode }}
+        </template>
+
         <template v-slot:priority="{ row }">
           <div style="display: flex">
             <el-input
@@ -292,13 +298,6 @@
             type: 'selection',
             columnKey: 'selection',
             align: 'center',
-            selectable: (row, index) => {
-              return (
-                this.activeName == 'first' &&
-                row.splitBatch != 2 &&
-                !row.joinPlanCode
-              );
-            },
             reserveSelection: true,
             fixed: 'left'
           },
@@ -316,8 +315,8 @@
             prop: 'batchNo',
             label: '子批次号',
             align: 'center',
-            minWidth: 120,
-            showOverflowTooltip: true
+            minWidth: 140,
+         
           },
 
           {
@@ -340,8 +339,8 @@
           },
 
           {
-            prop: '',
-            action: '',
+            prop: 'salesCode',
+            action: 'salesCode',
             label: '销售订单号',
             align: 'center',
             showOverflowTooltip: true,
@@ -655,6 +654,20 @@
         });
       },
 
+      /* 数据转为树形结构 */
+      parseData(data) {
+        return {
+          ...data,
+          list: this.$util.toTreeData({
+            data: data.list,
+            count: data.total,
+
+            idField: 'code',
+            parentIdField: 'joinPlanCode'
+          })
+        };
+      },
+
       goDetail({ id }) {
         this.$router.push({
           path: '/productionPlan/detail/' + id

+ 1 - 1
src/views/workOrder/index.vue

@@ -67,7 +67,7 @@
                 row.status == 8)
             "
           >
-            下达
+            派单
           </el-link>
         </template>
       </ele-pro-table>