ysy 1 سال پیش
والد
کامیت
a21b33af00
2فایلهای تغییر یافته به همراه42 افزوده شده و 11 حذف شده
  1. 34 5
      src/views/productionPlan/components/unpackDialog.vue
  2. 8 6
      src/views/productionPlan/index.vue

+ 34 - 5
src/views/productionPlan/components/unpackDialog.vue

@@ -11,7 +11,7 @@
       <el-form :model="requestData" label-width="0" :show-message="false">
         <el-descriptions title="" :column="2" border>
           <el-descriptions-item label="计划编号">
-            {{ formData.joinPlanCode }}</el-descriptions-item
+            {{ formData.code }}</el-descriptions-item
           >
 
           <el-descriptions-item label="产品编码">{{
@@ -48,7 +48,7 @@
         <ele-pro-table
           ref="table"
           :needPage="false"
-          :columns="columns"
+          :columns="formData.splitBatch == 1 ? columns3 : columns"
           :datasource="form.surplusUnpack"
         >
           <template v-slot:toolbar>
@@ -91,6 +91,10 @@
             <el-form-item v-else> 工单已全部拆完 </el-form-item>
           </template>
 
+          <template v-slot:splitResidue="scope">
+            {{ formData.splitResidue }}
+          </template>
+
           <template v-slot:reqMoldTime="scope">
             <el-form-item
               v-if="requiredFormingNum != 0"
@@ -195,6 +199,7 @@
           deviceId: ''
         },
         requiredFormingNum: 0,
+        showNum: 0,
 
         form: {
           surplusUnpack: [],
@@ -274,14 +279,38 @@
             slot: 'action',
             showOverflowTooltip: true
           }
-        ]
+        ],
+
+        columns3: []
       };
     },
     methods: {
       open(row) {
         this.visible = true;
         this.formData = deepClone(row);
-        this.requiredFormingNum = this.formData.requiredFormingNum;
+
+
+
+        if (this.formData.splitBatch == 1) {
+        
+          this.columns3 = deepClone(this.columns);
+
+          this.columns3.splice(3, 0, {
+            prop: 'splitResidue',
+            label: '剩余数量',
+            align: 'center',
+            slot: 'splitResidue',
+            minWidth: 100
+          });
+          this.requiredFormingNum = this.formData.splitResidue;
+        
+
+        } else {
+          this.requiredFormingNum = this.formData.requiredFormingNum;
+        }
+
+
+        this.showNum = this.formData.requiredFormingNum;
 
         this.form.surplusUnpack = [];
         this.form.unpackList = [];
@@ -374,7 +403,7 @@
             }
 
             const res = await splitWork(params);
-            console.log(res, 55);
+
             if (res) {
               this.$message.success('拆分成功!');
               this.$emit('success');

+ 8 - 6
src/views/productionPlan/index.vue

@@ -69,8 +69,8 @@
           </el-link>
         </template>
 
-        <template v-slot:selection="{ row }" >
-          <div class="check_box"  @click="handOneSelection(row)">
+        <template v-slot:selection="{ row }">
+          <div class="check_box" @click="handOneSelection(row)">
             <div class="check act_check" v-if="selectionFilter(row)">
               <i class="el-icon-check"></i>
             </div>
@@ -144,7 +144,7 @@
             v-if="row.status == 2 && row.splitBatch != 1"
             @click="handleOrderPublish(1, row)"
           >
-            发布
+            发布 {{ row.splitResidue }}
           </el-link>
           <el-link
             type="primary"
@@ -156,15 +156,17 @@
           </el-link>
           <el-link
             v-if="
-              row.splitBatch != 2 &&  row.splitBatch != 1 && activeName == 'first'
+              row.splitBatch != 2 &&
+              row.splitBatch != 1 &&
+              activeName == 'first'
             "
             type="primary"
             :underline="false"
             @click="planEdit(row)"
           >
-            修改
+            修改 
           </el-link>
-
+            
           <el-link
             v-if="
               clientEnvironmentId != 4 &&