Browse Source

线上bug修复

hbchen 1 year ago
parent
commit
a022d0b762

+ 1 - 1
.env.development

@@ -1,5 +1,5 @@
 # 接口地址
-# VITE_APP_API_URL="http://192.168.77.4:8619/api"
+# VITE_APP_API_URL="http://192.168.77.17:8619/api"
 VITE_APP_API_URL="http://8.136.199.33:8619/api"
 # crm系统地址
 VITE_CRM_SYSTEM_URL="https://rddptest.hzinsights.com/login"

+ 5 - 5
src/views/financialManagement/composition/serivceCascader.js

@@ -7,8 +7,8 @@ export default function serviceCascader() {
   let hasFiccSmall=false
   let hasFiccBig=false
   // 小品种的service_template_id
-  const FICCSmallServiceId=[90001,90016,90103,90138,90142,90109,90110,90114,90107,90111,90108,
-    90118,90239,90205,90212,90224,90224,90226,90302,90317,90325,90340]
+  // const FICCSmallServiceId=[90001,90016,90103,90138,90142,90109,90110,90114,90107,90111,90108,
+  //   90118,90239,90205,90212,90224,90224,90226,90302,90317,90325,90340]
 
   // 套餐选择更改
   // servicesList套餐列表 value-选中的套餐Id cascaderRef - el-cascaser的ref值
@@ -39,9 +39,9 @@ export default function serviceCascader() {
     
     if(value.includes(1)){
       // FICC大套餐
-      value=value.filter(it => !FICCSmallServiceId.includes(it))
+      value=value.filter(it => it<90000)
       hasFiccBig=true
-    }else if(value.some(it => FICCSmallServiceId.includes(it))){
+    }else if(value.some(it => !(it<90000))){
       // FICC小套餐
       value=value.filter(it => it!=1)
       hasFiccSmall=true
@@ -145,7 +145,7 @@ export default function serviceCascader() {
   }
 
   return {
-    FICCSmallServiceId,
+    // FICCSmallServiceId,
     servicesChange,
     resetDisable
   }

+ 8 - 4
src/views/financialManagement/contractProgress-component/Compliance.vue

@@ -55,7 +55,7 @@
   const compliance=reactive({
     // 合规登记表单
     form:{
-      product_ids:'1,2',
+      product_ids:'',
       supplement:0, // 是否是补录合同
       contract_register_id:0,
       crm_contract_id:0,
@@ -167,7 +167,7 @@
   // 合同来源改变
   const contractSourceChange=(value)=>{
     // 切换来源,清空数据
-    compliance.form.product_ids=value==0?'1,2':'',
+    compliance.form.product_ids='',
     compliance.form.crm_contract_id=0,
     compliance.form.contract_code='',
     compliance.form.company_name='',
@@ -193,6 +193,7 @@
     compliance.form.remark=""
 
     compliance.hasQYSeller=''
+    cascaderSelectSeller.value=[]
 
     serviceData.checkedService=[]
     serviceData.checkedServiceQy=[]
@@ -361,7 +362,7 @@
       }
       serviceData.varietyDiaType='edit'
     })
-    compliance.form.product_ids = selectItem.product_id.toString()
+    // compliance.form.product_ids = selectItem.product_id.toString()
     sellerListType.value = selectItem.product_id
 
     compliance.hasQYSeller=selectItem.product_id==2
@@ -501,12 +502,15 @@
         let servicesAll=0
         if(hasFICCservice&&hasQYservice){
           servicesAll = Math.round((compliance.form.services_Qy_amount+compliance.form.services_amount)*100)/100
+          compliance.form.product_ids = '1,2'
         }else if(hasFICCservice){
           servicesAll = compliance.form.services_amount
           compliance.form.services_Qy_amount=''
+          compliance.form.product_ids = '1'
         }else{
           servicesAll = compliance.form.services_Qy_amount
           compliance.form.services_amount=''
+          compliance.form.product_ids = '2'
         }
         compliance.form.contract_amount = +parseFloat(compliance.form.contract_amount).toFixed(2)
         if(servicesAll!=compliance.form.contract_amount){
@@ -534,7 +538,7 @@
             // 预登记过来的
             params={...params,contract_register_id:props.supplementaryInfo.id}
           }
-          // console.log(params);
+          // console.log(params,'params');
           // 新增
           contractRegisterCheck({company_name:compliance.form.company_name,
             start_date:compliance.form.start_date,end_date:compliance.form.end_date,seller_ids:compliance.form.seller_ids}).then(res=>{

+ 29 - 6
src/views/financialManagement/registrationPre.vue

@@ -142,20 +142,20 @@ const serivcesDataHandler=(cascaderRef)=>{
         // 小套餐肯定选中了
         hasFICCSmallChecked=true
         // 真正拿取的是chart_permission_id
-        if(serviceComposition.FICCSmallServiceId.includes(nodeData.service_template_id)) FICCSmallServiceIds.push(nodeData.chart_permission_id)
+        FICCSmallServiceIds.push(nodeData.chart_permission_id)
       }else if(nodeData.service_template_id!=2){
-        servicesParam.push({service_template_id:nodeData.service_template_id,title:nodeData.title,value:nodeData.value})
+        servicesParam.push({service_template_id:nodeData.service_template_id,title:nodeData.title,value:nodeData.value,product_id:1})
       }
     }
   })
   // 做去重->循环
   Array.from(new Set(servicesParamId)).map(it =>{
     if(it>10000) return 
-    servicesParam.push({service_template_id:it,title:servicesParamLabel[it]})
+    servicesParam.push({service_template_id:it,title:servicesParamLabel[it],product_id:2})
   })
   if(hasFICCSmallChecked){
     // 将小套餐以及品种push进入
-    servicesParam.push({service_template_id:2,
+    servicesParam.push({service_template_id:2,product_id:1,
     title:'FICC小套餐',value:'',chart_permission_ids:FICCSmallServiceIds.join(',')})
   }
   return servicesParam
@@ -370,8 +370,20 @@ const submitForm=()=>{
         list:dialog.registrationPreForm.IorPInfo,
         services:dialog.hasServiceChange?serviceData:dialog.registrationPreForm.services,
         del_invoice_ids:hasDeleteContractInvoiceIds,
-        del_pre_register_ids:hasDeletePreRegisterIds
+        del_pre_register_ids:hasDeletePreRegisterIds,
+        product_ids:''
       }
+      // 判断 product_ids
+      let hasFICCServe=params.services.some(serve => serve.product_id==1)
+      let hasQYServe=params.services.some(serve => serve.product_id==2)
+      if(hasFICCServe && hasQYServe){
+        params.product_ids="1,2"
+      }else if(hasFICCServe){
+        params.product_ids="1"
+      }else{
+        params.product_ids="2"
+      }
+
       // 化''为0
       params.list.forEach(item =>{
         item.amount = parseFloat(item.amount)
@@ -545,7 +557,18 @@ const submitPreForm=()=>{
           seller_id:preDialog.preForm.seller_id||0,
           service_product_id:preDialog.preForm.service_product_id,
         }],
-        services:preDialog.preForm.services
+        services:preDialog.preForm.services,
+        product_ids:''
+      }
+      // 判断 product_ids
+      let hasFICCServe=params.services.some(serve => serve.product_id==1)
+      let hasQYServe=params.services.some(serve => serve.product_id==2)
+      if(hasFICCServe && hasQYServe){
+        params.product_ids="1,2"
+      }else if(hasFICCServe){
+        params.product_ids="1"
+      }else{
+        params.product_ids="2"
       }
       // console.log(params);
       preRegistrationSave(params).then(res=>{