浏览代码

Merge branches 'techPool_442', 'techPool_454' and 'techPool_473'

hbchen 2 年之前
父节点
当前提交
2c62e215e8

+ 2 - 2
.env.development

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

+ 11 - 35
src/views/financialManagement/contractProgress-component/Compliance.vue

@@ -261,7 +261,6 @@
   // 销售修改
   const sellerChange=(value)=>{
     let ficcSeller,qySeller
-    let isLeaveSeller=false
     if(value?.length>0){
       for (let i = 0; i < value.length; i++) {
         const element = value[i];
@@ -271,29 +270,13 @@
         }else if(element[0]==5){
           //权益
           qySeller = element[element.length-1]
-        }else{
-          // 离职的销售
-          isLeaveSeller=true
-        }
-      }
-      // 编辑,不允许修改销售数量
-      if(compliance.form.contract_register_id){
-        if(cascaderSelectSeller.value.length<2 && !isLeaveSeller || !(qySeller||ficcSeller)){
-          ElMessage.warning('合规套餐类型已定,不允许修改销售数量')
-          cascaderSelectSeller.value = compliance.form.seller_ids.split(',').map(item => +item)
-          return 
         }
       }
       cascaderSelectSeller.value=[ficcSeller,qySeller]
       compliance.form.seller_ids= cascaderSelectSeller.value.join(',')
     }else{
-      if(compliance.form.contract_register_id){
-        // 编辑的情况下
-        ElMessage.warning('合规套餐类型已定,不允许修改销售数量')
-        cascaderSelectSeller.value = compliance.form.seller_ids.split(',').map(item => +item)
-        return 
-      }
       cascaderSelectSeller.value=[]
+      compliance.form.seller_ids=''
     }
   }
   // 合同编号选中
@@ -410,18 +393,17 @@
         if(isLeave){
           // 判断原本销售已离职
           if(sellerListType.value==3){
-            if(!cascaderSelectSeller.value[0]){
-              ElMessage.error('请选择FICC销售')
-              return 
-            }
-            if(!cascaderSelectSeller.value[1]){
-              ElMessage.error('请选择权益销售')
-              return 
+            if(cascaderSelectSeller.value[0]){
+              if(props.sellerData.ficc_list.findIndex(item => item.seller_id == cascaderSelectSeller.value[0])==-1){
+                ElMessage.error('选择的FICC销售不存在或已离职')
+                return 
+              }
             }
-            if(props.sellerData.ficc_list.findIndex(item => item.seller_id == cascaderSelectSeller.value[0])==-1||
-            props.sellerData.rai_list.findIndex(item => item.seller_id == cascaderSelectSeller.value[1])==-1){
-              ElMessage.error('选择的销售不存在或已离职')
-              return 
+            if(cascaderSelectSeller.value[1]){
+              if(props.sellerData.rai_list.findIndex(item => item.seller_id == cascaderSelectSeller.value[1])==-1){
+                ElMessage.error('选择的权益销售不存在或已离职')
+                return
+              }
             }
           }else{
             if(!Number(compliance.form.seller_id)){
@@ -561,11 +543,6 @@
           compliance.form.actual_pay_companies=''
         }
 
-        // if(compliance.form.has_invoice){
-        //   compliance.form.has_invoice=1
-        // }else{
-        //   compliance.form.has_invoice=0
-        // }
         // 检验合同名称或者合同有效期是否重复
         if(compliance.form.contract_register_id){
           // 编辑
@@ -670,7 +647,6 @@
 
   // 对于销售的处理
   const sellerOperation=({seller_id,rai_seller_id,seller_ids,seller_name,rai_seller_name})=>{
-    console.log({seller_id,rai_seller_id,seller_ids,seller_name,rai_seller_name});
     if(seller_id && rai_seller_id){
       cascaderSelectSeller.value = seller_ids.split(',').map(item => +item) 
       if(props.sellerData.ficc_list.findIndex(item => item.seller_id == seller_id)==-1){

+ 1 - 1
src/views/financialManagement/contractProgress.vue

@@ -247,7 +247,7 @@
       if(!res.data) return 
       contractInfo.progressList=res.data.logs || [{}]
       let sellerListType=3
-      if(res.data.seller_id && res.data.rai_seller_id){
+      if(res.data.contract_source==0){
         sellerListType = 3
       }else if(!res.data.seller_id){
         sellerListType = 2

+ 18 - 6
src/views/financialManagement/financialList.vue

@@ -207,6 +207,15 @@ const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
       })
     }).catch(()=>{})
   }
+  /**
+   * 设置row-key,优化表格渲染,主要由于表格操作栏混合使用了 v-permission指令和v-if指令,猜测el-table底层默认是用索引作为每行的key值
+   * 可能造导致vue3底层更新表格 在对比 新树和老树 时通过索引找到的不是原来的Node,导致报错,故给表格行设置唯一的key值
+   * 以上纯属瞎猜
+   */
+  const setRowKey=(row)=>{
+    return row.contract_register_id
+  }
+
   //  ---------------------created
   // 由于三级路由还是在当前页面,所以判断路径,避免重复请求
   if(route.path=='/financial/list'){
@@ -224,7 +233,7 @@ const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
         <div class="financial-list-container" id="financial-list-container" > 
           <!-- 搜索区域 -->
           <div class="financial-search-zone">
-            <el-input v-model="financial.searchParams.keyword" placeholder="合同编号/客户姓名/销售/实际使用方" :prefix-icon="Search"
+            <el-input v-model="financial.searchParams.keyword" placeholder="合同编号/客户姓名/销售/代付方" :prefix-icon="Search"
             style="width: 340px;margin-bottom: 8px;" @input="searchFinancial" clearable />
             <el-date-picker v-model="financial.createtime" start-placeholder="登记日期-开始"
             end-placeholder="登记日期-结束" style="margin-right: 30px;max-width: 240px;margin-bottom: 8px;"
@@ -300,7 +309,8 @@ const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
           </div>
           <div class="financial-table-zone">
             <!-- 表格 -->
-            <el-table :data="financial.tableData" border max-height="640px" size="default"> 
+            <el-table :data="financial.tableData" border max-height="640px" size="default" 
+            :row-key="setRowKey"> 
               <el-table-column label="合同编号" align="center" show-overflow-tooltip 
               prop="contract_code" fixed="left" min-width="150"></el-table-column>
               <el-table-column label="客户名称" align="center" prop="company_name"
@@ -379,8 +389,8 @@ const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
                       @click="registration('view',row.contract_register_id)">
                         查看
                       </span>
-                      <span class="table-option-buttons" v-permission="'financial:list:complianceEdit'"
-                      @click="registration('compliance',row.contract_register_id)">
+                      <span class="table-option-buttons" v-if="row.register_status!=2" v-permission="'financial:list:complianceEdit'"
+                      @click="registration('compliance',row.contract_register_id)" >
                         编辑
                       </span>
                       <span class="table-option-buttons"  v-permission="'financial:list:delete'"
@@ -388,11 +398,13 @@ const statusArray=[{id:1,label:"进行中"},{id:2,label:"已完成"}]
                         删除
                       </span>
                       <span class="table-option-buttons" v-permission="'financial:list:invoice'"
-                      @click="registration('invoice',row.contract_register_id)" v-if="row.has_invoice==1 && row.contract_status!=4">
+                      @click="registration('invoice',row.contract_register_id)" 
+                      v-if="row.has_invoice==1 && row.contract_status!=4 && row.register_status!=2">
                         开票登记
                       </span>
                       <span class="table-option-buttons" v-permission="'financial:list:placement'"
-                      @click="registration('placement',row.contract_register_id)" v-if="row.has_invoice==1 && row.contract_status!=4">
+                      @click="registration('placement',row.contract_register_id)" 
+                      v-if="row.has_invoice==1 && row.contract_status!=4 && row.register_status!=2">
                         到款登记
                       </span>
                       <span class="table-option-buttons" @click="changeContractStatus(row)">