Bläddra i källkod

bug fixe: 184,185

chris 2 år sedan
förälder
incheckning
8c9742abbf

+ 30 - 7
src/views/modules/cus/quoted-detail.vue

@@ -405,15 +405,24 @@ export default {
       getDetail(id).then(({ data }) => {
         if (data && data.code === '200') {
           this.dataForm = data.data
-          this.dataForm.coCode = this.coOption.find(
+          let find1 = this.coOption.find(
             (t) => t.coId === this.dataForm.coId
-          ).coCode
-          this.dataForm.typeName = this.productTypeOption.find(
+          )
+          if (find1) {
+            this.dataForm.coCode = find1.coCode
+          }
+          let find2 = this.productTypeOption.find(
             (t) => t.value === this.dataForm.type
-          ).label
-          this.dataForm.productName = this.productIdOption.find(
+          )
+          if (find2) {
+            this.dataForm.typeName = find2.label
+          }
+          let find3 = this.productIdOption.find(
             (t) => t.value === this.dataForm.productId
-          ).label
+          )
+          if (find3) {
+            this.dataForm.productName = find3.label
+          }
 
           this.productIdChangeHandle(this.dataForm.productId)
 
@@ -428,7 +437,7 @@ export default {
           )
 
           // 初始化审批Form
-          this.showApproveForm(businessType, this.id)
+          this.showApproveForm(businessType, id)
         }
       })
     },
@@ -478,6 +487,20 @@ export default {
       } else {
         this.productList = []
       }
+    },
+    // 初始化审批Form
+    showApproveForm (businessType, businessId) {
+      console.log('businessType = ' + businessType + ', businessId = ' + businessId)
+      if (this.isFlow) {
+        this.$nextTick(() => {
+          this.$refs.approve.init(businessType, businessId)
+        })
+      }
+    },
+    // 审批完成
+    approveFinished () {
+      this.onChose()
+      this.$emit('approveFinished')
     }
   }
 }

+ 3 - 0
src/views/modules/msg-center/approve-add-or-update.vue

@@ -45,6 +45,9 @@
     <div v-show="businessType === 'project_estimate'">
       <cus-quoted-detail ref="cusQuotedDetail" @approveFinished="approveFinished" @onChose="onChose"/>
     </div>
+<!--    <div v-show="businessType === 'first_identify_flow'">-->
+<!--      <cus-quoted-detail ref="cusQuotedDetail" @approveFinished="approveFinished" @onChose="onChose"/>-->
+<!--    </div>-->
   </div>
 </template>
 

+ 9 - 0
src/views/modules/msg-center/approve.vue

@@ -212,6 +212,15 @@
           },
           {
             code: 'cus_communicate_flow', value: '沟通审批'
+          },
+          {
+            code: 'project_estimate', value: '项目评估'
+          },
+          {
+            code: 'first_identify_flow', value: '首件鉴定'
+          },
+          {
+            code: 'nonconforming_hear_flow', value: '不合格品审理'
           }
         ],
         optionsCustomer: []