ysy 1 жил өмнө
parent
commit
353585bc47

+ 123 - 0
src/views/productionPlan/components/unpackDetails.vue

@@ -0,0 +1,123 @@
+<template>
+  <ele-modal
+    width="80vw"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
+    row-key="code"
+    custom-class="ele-dialog-form"
+    :title="title"
+  >
+    <div class="form-wrapper">
+      <ele-pro-table
+        ref="table"
+        :needPage="false"
+        :columns="columns"
+        :datasource="List"
+      >
+      </ele-pro-table>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  export default {
+    components: {},
+    data() {
+      return {
+        visible: false,
+
+        List: [],
+        title: '',
+
+        columns: [
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center',
+            minWidth: 100,
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'code',
+            label: '计划编号',
+            align: 'center',
+            minWidth: 200
+          },
+
+
+          {
+            prop: 'productCode',
+            label: '产品编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'productName',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+
+          {
+            prop: 'brandNo',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            minWidth: 150,
+
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'model',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+
+          {
+            prop: 'produceRoutingName',
+            label: '工艺路线',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            prop: 'requiredFormingNum',
+            label: '要求生产数量',
+            align: 'center',
+            minWidth: 200
+          },
+
+          {
+            prop: 'reqMoldTime',
+            label: '要求完成日期',
+            align: 'center',
+            minWidth: 200
+          }
+        ]
+      };
+    },
+    methods: {
+      open(type, list) {
+        this.title = type === 1 ? '拆批详情' : '合批详情';
+        this.List = list;
+        this.visible = true;
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .form-wrapper {
+    margin-bottom: 10px;
+  }
+</style>

+ 13 - 4
src/views/productionPlan/index.vue

@@ -37,10 +37,10 @@
         <template v-slot:batchNo="{ row }">
           <el-link type="primary" :underline="false">
             {{ row.batchNo }}
-            <el-tag type="success" size="mini" v-if="row.joinPlanCode"
-              >拆</el-tag
+            <el-tag type="success" size="mini" v-if="row.joinPlanCode" @click.stop="splitDetails(1, row)">
+              拆</el-tag
             >
-            <el-tag type="danger" size="mini" v-if="row.splitBatch == 2">
+            <el-tag type="danger" size="mini" v-if="row.splitBatch == 2" @click.stop="splitDetails(2, row)">
               和</el-tag
             >
           </el-link>
@@ -145,6 +145,9 @@
     <unpackDialog ref="unpackRef" @success="reload" />
 
     <mergeDialog ref="mergeRef" @success="reload"></mergeDialog>
+
+
+    <unpackDetails ref="DetailsRef"></unpackDetails>
   </div>
 </template>
 
@@ -153,6 +156,7 @@
   import productionPlanSearch from './components/productionPlan-search.vue';
   import unpackDialog from './components/unpackDialog.vue';
   import mergeDialog from './components/mergeDialog.vue';
+  import unpackDetails from './components/unpackDetails.vue';
   import { release } from '@/api/productionPlan/order.js';
 
   import { getCode } from '@/api/codeManagement';
@@ -164,7 +168,8 @@
     components: {
       productionPlanSearch,
       unpackDialog,
-      mergeDialog
+      mergeDialog,
+      unpackDetails
     },
     data() {
       return {
@@ -633,6 +638,10 @@
         console.log(this.selection);
       },
 
+      splitDetails(type, row) {
+          this.$refs.DetailsRef.open(type, row.childList);
+      },
+
       handleDelete({ id }) {
         this.$confirm('确定删除当前数据?', '提示')
           .then(async () => {