Jelajahi Sumber

优化生产类型条件判断逻辑,统一使用!=2判断非采购件,并增加受托件类型处理

yusheng 7 bulan lalu
induk
melakukan
7ecd1a8bb5

+ 13 - 5
src/views/productionPlan/components/homogeneityInspectDialog.vue

@@ -97,7 +97,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6" v-if="produceType!= 2">
+            <el-col :span="6" v-if="produceType != 2">
               <el-form-item label="在制总数:">
                 <el-input
                   readonly
@@ -170,7 +170,7 @@
                         >下发采购计划</el-button
                       >
                       <el-button
-                        v-if="produceType == 1 && formInline.bomType != 1"
+                        v-if="produceType !=2 && formInline.bomType != 1"
                         type="primary"
                         @click="issuePlan"
                         size="medium"
@@ -273,7 +273,7 @@
                   >
                 </template> -->
                 <!-- 默认按订单 -->
-                <template v-slot:toolbar v-if="produceType == 1">
+                <template v-slot:toolbar v-if="produceType != 2">
                   <el-form :inline="true">
                     <el-form-item label="定额计算方法:">
                       <el-radio-group
@@ -432,7 +432,7 @@
     },
     computed: {
       fieldShow() {
-        return this.produceType == 1 && this.quota_calculation === 2;
+        return this.produceType != 2 && this.quota_calculation === 2;
       },
       columns() {
         return [
@@ -897,7 +897,15 @@
         }
         let kitting = this.quota_calculation == 1 ? false : true;
         let produceType =
-          this.produceType == 1 ? 1 : attributeType == 2 ? 2 : 3;
+          this.produceType == 1
+            ? 1
+            : this.produceType == 4
+            ? 4
+            : attributeType == 2
+            ? 2
+            : attributeType == 3
+            ? 3
+            : '';
         let { startTime, endTime } = this.getTimeData();
         let params = {
           planId: this.planId,

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

@@ -94,7 +94,7 @@
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item command="1"> 自制件 </el-dropdown-item>
             <el-dropdown-item command="2"> 采购件 </el-dropdown-item>
-            <el-dropdown-item command="1"> 受托件 </el-dropdown-item>
+            <el-dropdown-item command="4"> 受托件 </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
         <el-button

+ 1 - 1
src/views/saleOrder/components/order-search.vue

@@ -367,7 +367,7 @@
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item command="1"> 自制件 </el-dropdown-item>
                 <el-dropdown-item command="2"> 采购件 </el-dropdown-item>
-                <el-dropdown-item command="1"> 受托件 </el-dropdown-item>
+                <el-dropdown-item command="4"> 受托件 </el-dropdown-item>
                 <!-- <el-dropdown-item command="3"> 外协件 </el-dropdown-item> -->
               </el-dropdown-menu>
             </el-dropdown>

+ 12 - 6
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -80,7 +80,7 @@
                 <el-input readonly v-model="orderInfo.contractNum"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6" v-if="produceType == 1">
+            <el-col :span="6" v-if="produceType != 2">
               <el-form-item label="未发总数:">
                 <el-input
                   readonly
@@ -97,7 +97,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6" v-if="produceType == 1">
+            <el-col :span="6" v-if="produceType != 2">
               <el-form-item label="在制总数:">
                 <el-input
                   readonly
@@ -105,7 +105,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6" v-if="produceType == 1">
+            <el-col :span="6" v-if="produceType != 2">
               <el-form-item label="最终缺料数量:">
                 <el-input
                   readonly
@@ -245,7 +245,7 @@
                   </div>
                 </template>
                 <!-- 默认按订单 -->
-                <template v-slot:toolbar v-if="produceType == 1">
+                <template v-slot:toolbar v-if="produceType != 2">
                   <el-form :inline="true">
                     <el-form-item label="定额计算方法:">
                       <el-radio-group
@@ -388,7 +388,7 @@
     },
     computed: {
       fieldShow() {
-        return this.produceType == 1 && this.quota_calculation === 2;
+        return this.produceType != 2 && this.quota_calculation === 2;
       },
       columns() {
         return [
@@ -929,7 +929,13 @@
         let api = null;
         if (this.source == 'list') {
           let produceType =
-            this.produceType == 1 ? 1 : attributeType == 2 ? 2 : 3;
+            this.produceType == 1
+              ? 1
+              : this.produceType == 4
+              ? 4
+              : attributeType == 2
+              ? 2
+              : 3;
           let kitting = this.quota_calculation == 1 ? false : true;
           let { startTime, endTime } = this.getTimeData();
           params = {