wuguojie пре 7 месеци
родитељ
комит
5cedc1d205

+ 1 - 1
src/api/modules/project.ts

@@ -11,7 +11,7 @@ export interface GetSchemeList {
 }
 
 const projectApi = (axiosInstance: ApiInstance) => ({
-  getBusinessInsurance: () => axiosInstance.get('/scheme/getBusinessInsurance'), // 险种
+  getBusinessInsurance: (data?: any) => axiosInstance.get(`/scheme/getBusinessInsurance?productId=${data}`), // 险种
   getScheme: (data: string | null | LocationQueryValue[]) => axiosInstance.get(`/scheme/getScheme?id=${data}`), // 详情
   getSchemeList: (data: GetSchemeList) => axiosInstance.post('/scheme/getSchemeList', data), // 险种
   jyxList: (data: { company: string }) => axiosInstance.post('/jyxConfig/jyxList', data), // 驾意险

+ 9 - 9
src/components/ruleCondition/index.vue

@@ -309,16 +309,16 @@ const change = (value: any, title: title) => {
 // 遍历并处理每个数组
 const processArray = (array: any[]) => {
   return array?.map((val) => {
-    switch (val.attrType) {
-      case 'inputNumber':
-      case 'datetime':
-        if (!val.operator) {
+      if (!val.operator) {
           val.operator = '1'; // 设置默认值
-        }
-        break;
-      default:
-        break;
-    }
+      }
+    // switch (val.attrType) {
+    //   case 'inputNumber':
+    //   case 'datetime':
+    //     break;
+    //   default:
+    //     break;
+    // }
     if (val.attrCode == 'LicenseNo') {
       val.dictLabal = licensePlateNumber.value;
     }

+ 1 - 1
src/components/ruleConditionContainer/index.vue

@@ -8,7 +8,7 @@
         </el-col>
         <el-col :span="3">
           <el-select v-model="item.operator" placeholder="运算符" style="width: 100px; margin: 0 10px;">
-            <template v-if="item.attrType == 'inputTag'">
+            <template v-if="item.attrType == 'inputTag' || item.attrType == 'checkbox' || item.attrType == 'select'">
               <el-option label="包含" value="1"></el-option>
               <el-option label="不包含" value="2"></el-option>
             </template>

+ 2 - 2
src/layouts/components/InsuranceType/index.vue

@@ -120,11 +120,11 @@ const handleConfirm = () => {
 
 // 修改数据
 let editIndex = ref(0)
-const initEditData = (data, index, type) => {
+const initEditData = (data, index, type, productId) => {
   editIndex.value = index
   insuranceType.value = type
     console.log('选择好的数据', data)
-  api.projectApi.getBusinessInsurance().then(res => {
+  api.projectApi.getBusinessInsurance(productId).then(res => {
     if(res.code == 200) {
       if(res.data&&res.data.length>0) {
         choiceItem.value = res.data[0]

+ 91 - 6
src/views/additionalOrder/additional/index.vue

@@ -429,7 +429,7 @@
                     </span>
                   </template>
                   <el-row v-if="owerSwitch" :gutter="24">
-                      <el-col :span="5">
+                      <el-col :span="5" v-if="additionalForm.personType1 === '1'">
                           <el-form-item label="身份证正面页" class="white-m-p24">
                               <el-upload v-if="!sfzFront" drag @change="uploadImage($event, 'sfzf')" :auto-upload="false" :show-file-list="false">
                                   <div class="upload-box">
@@ -469,6 +469,27 @@
                               </el-upload>
                           </el-form-item>
                       </el-col>
+                      <el-col :span="5" v-if="additionalForm.personType1 === '2'">
+                          <el-form-item label="营业执照" class="white-m-p24">
+                              <el-upload v-if="!yyzzFront" drag @change="uploadImage($event, 'yyzz')" :auto-upload="false" :show-file-list="false">
+                                  <div class="upload-box">
+                                      <div class="icon-box">
+                                          <el-icon style="font-size: 20px"><Camera /></el-icon>
+                                          <p>传营业执照</p>
+                                      </div>
+                                  </div>
+                              </el-upload>
+                              <el-upload v-else drag :auto-upload="false" :show-file-list="false" @change="uploadImage($event, 'yyzz')">
+                                  <div class="upload-box">
+                                      <img class="upload-image" :src="yyzzFront"/>
+                                      <div class="btns">
+                                          <span style="margin-right: 20px" @click.stop="handleViewImage('yyzz')"><el-icon><ZoomIn /></el-icon>查看大图</span>
+                                          <span @click.stop="handleDelImage('yyzz')"><el-icon><Delete /></el-icon>删除</span>
+                                      </div>
+                                  </div>
+                              </el-upload>
+                          </el-form-item>
+                      </el-col>
                       <el-divider direction="vertical"></el-divider>
                       <el-col :span="18">
                           <el-row :gutter="20">
@@ -532,13 +553,13 @@
                                       </div>
                                   </el-form-item>
                               </el-col>
-                              <el-col class="col-m-b-6" :span="8">
+                              <el-col class="col-m-b-6" :span="8" v-if="additionalForm.personType1 === '1'">
                                   <el-form-item label="年龄" prop="age1">
                                       <el-input v-model.number="additionalForm.age1" placeholder="请输入年龄"></el-input>
                                   </el-form-item>
                               </el-col>
 
-                              <el-col class="col-m-b-6" :span="8">
+                              <el-col class="col-m-b-6" :span="8" v-if="additionalForm.personType1 === '1'">
                                   <el-form-item label="性别" prop="gender1">
                                       <el-select v-model="additionalForm.gender1" placeholder="请选择">
                                           <el-option label="男" value="男" key="1"></el-option>
@@ -551,6 +572,43 @@
                                       <el-input v-model="additionalForm.email1" placeholder="请输入电子邮箱"></el-input>
                                   </el-form-item>
                               </el-col>
+                              <el-col :span="8" v-if="additionalForm.personType1 === '2'">
+                                  <el-form-item label="投保人座机" prop="telephone">
+                                      <el-input v-model="additionalForm.telephone1" placeholder="请输入投保人座机"></el-input>
+                                  </el-form-item>
+                              </el-col>
+
+                              <el-col :span="8" v-if="additionalForm.personType1 === '2'">
+                                  <el-form-item label="投保人联系人" prop="person">
+                                      <el-input v-model="additionalForm.person1" placeholder="请输入投保人联系人"></el-input>
+                                  </el-form-item>
+                              </el-col>
+                              <el-col :span="8" v-if="additionalForm.personType1 === '2'">
+                                  <el-form-item label="联系人证件号码" prop="age">
+                                      <el-input v-model.number="additionalForm.age1" placeholder="请输入联系人证件号码"></el-input>
+                                  </el-form-item>
+                              </el-col>
+                              <el-col :span="8" v-if="additionalForm.personType1 === '2'">
+                                  <el-form-item prop="identifyValidEndDate" label="有效期止期">
+                                      <el-date-picker
+                                          v-model="additionalForm.identifyValidEndDate1"
+                                          type="date"
+                                          placeholder="请选择"
+                                          value-format="YYYY-MM-DD"
+                                          style="width: 100%"
+                                      />
+                                  </el-form-item>
+                              </el-col>
+
+                              <el-col :span="8" v-if="additionalForm.personType1 === '2'">
+                                  <el-form-item label="注册资金" prop="money">
+                                      <el-input v-model="additionalForm.registeredCapital1" placeholder="请输入注册资金">
+                                          <template #append>
+                                              <span>元</span>
+                                          </template>
+                                      </el-input>
+                                  </el-form-item>
+                              </el-col>
                           </el-row>
                       </el-col>
                   </el-row>
@@ -1944,9 +2002,9 @@ let additionalRules = ref({
   displacement: [
     { required: true, message: "请输入排量", trigger: "blur" }
   ],
-  powerScale: [
-    { required: true, message: "请输入功率", trigger: "blur" }
-  ],
+  // powerScale: [
+  //   { required: true, message: "请输入功率", trigger: "blur" }
+  // ],
   purchasePrice: [
     { required: true, message: "请输入新车购置价", trigger: "blur" }
   ],
@@ -2497,6 +2555,8 @@ let sfz1Back = ref('')
 let sfz2Front = ref('')
 let sfz2Back = ref('')
 
+let yyzzFront = ref('')
+
 let xszFrontFile = ref(null)
 let xszBackFile = ref(null)
 let sfzFrontFile = ref(null)
@@ -2506,6 +2566,8 @@ let sfz1BackFile = ref(null)
 let sfz2FrontFile = ref(null)
 let sfz2BackFile = ref(null)
 
+let yyzzFrontFile = ref(null)
+
 let xszFrontResult = ref(null)
 let xszBackResult = ref(null)
 let sfzFrontResult = ref(null)
@@ -2515,6 +2577,8 @@ let sfz1BackResult = ref(null)
 let sfz2FrontResult = ref(null)
 let sfz2BackResult = ref(null)
 
+let yyzzFrontResult = ref(null)
+
 // 保费信息
 let historyRules = ref({
   a:[
@@ -2744,6 +2808,27 @@ const uploadImage = async (file, type) => {
               }
           })
         break;
+      case 'yyzz':
+          yyzzFrontResult.value = result
+          yyzzFront.value = result.downloadUrl
+          yyzzFrontFile.value = files
+          if(yyzzFront.value) {
+              const fileParams = new FormData()
+              fileParams.append('image1', yyzzFrontFile.value)
+              api.additionalApi.businessLicense(fileParams).then((res: any) => {
+                  if (res.code == 200) {
+                      const data = res.data
+                      additionalForm.value.identifyNumber1 = data.socialCreditCode
+                      additionalForm.value.company1 = data.company
+                      additionalForm.value.types1 = data.types
+                      additionalForm.value.addr1 = data.address
+                      additionalForm.value.legalRepresentative1 = data.legalRepresentative
+                      additionalForm.value.registeredCapital1 = data.registeredCapital
+                      additionalForm.value.businessScope1 = data.businessScope
+                  }
+              })
+          }
+          break;
       case 'sfzf1':
         sfz1Front.value = result.downloadUrl
         sfz1FrontFile.value = files

+ 1 - 0
src/views/externalAgreement/agreement/components/contactPersonFeeDialog.vue

@@ -338,6 +338,7 @@ const save = async (formEl: FormInstance | undefined | any) => {
   if (!formEl) return
   const validationPromises = ruleFeeinfo.ptlAgreementCostExternalAddList.map((formRef: any, index: any) => {
     // 轮询验证所有表单校验
+      console.log('index', index, typeof index, typeof activeName.value)
     return new Promise((resolve, reject) => {
       if (formRef) {
         formEl[index].validate((valid: boolean) => {

+ 1 - 1
src/views/payCredit/agentCount.vue

@@ -78,7 +78,7 @@
                             <el-button link type="primary" size="small" @click="agentPass(scope.row)">申请通过</el-button>
                             <el-popover placement="top" width="300" trigger="click" v-model:visible="scope.row.agentShow">
                                 <template #reference>
-                                    <el-button link type="primary" size="small">驳回</el-button>
+                                    <el-button link type="primary" size="small" >驳回</el-button>
                                 </template>
                                 <el-input type="textarea" v-model="agentReason" maxlength="200"></el-input>
                                 <div style="display: flex; align-items: center; justify-content: flex-end; margin-top: 10px">

+ 44 - 17
src/views/quoteConfig/agreement/components/ruleFeeDialog.vue

@@ -277,7 +277,6 @@ const close = () => {
 }
 const save = async (formEl: FormInstance | undefined | any) => {
   if (!formEl) return
-    console.log('规则', ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList)
   const validationPromises = ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList.map((formRef: any, index: any) => {
     // 轮询验证所有表单校验
     return new Promise((resolve, reject) => {
@@ -292,16 +291,16 @@ const save = async (formEl: FormInstance | undefined | any) => {
               });
               return;
             }
-            const resultInputTag = checkArrayValues(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions as RuleCondition[], "operator");
-            if(!resultInputTag){
-                ElMessage({
-                    type: 'error',
-                    message: `规则运算符不能为空值`,
-                    plain: true,
-                });
-                return;
-            }
-            const result = checkArrayValues(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions as RuleCondition[], "min");
+            // const resultInputTag = checkArrayValues(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions as RuleCondition[], "operator");
+            // if(!resultInputTag){
+            //     ElMessage({
+            //         type: 'error',
+            //         message: `规则运算符不能为空值`,
+            //         plain: true,
+            //     });
+            //     return;
+            // }
+            const result = checkArrayValues(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions as RuleCondition[]);
             if(!result){
               ElMessage({
                 type: 'error',
@@ -310,7 +309,7 @@ const save = async (formEl: FormInstance | undefined | any) => {
               });
               return;
             }
-            if(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length && result && resultInputTag) {
+            if(ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length && result ) {
                 resolve(true);
             }
           } else {
@@ -347,13 +346,41 @@ const save = async (formEl: FormInstance | undefined | any) => {
     });
   }
 };
-const checkArrayValues = <T, K extends keyof T>(arr: T[], key: K) => {
+const checkArrayValues = <T, K extends keyof T>(arr: T[]) => {
+    console.log('规则数组', arr)
   // 遍历数组
   for (let item of arr) {
-    // 检查指定键的值是否为空
-    if (item[key] === null || item[key] === undefined || item[key] === "") {
-      return false; // 如果为空,返回 false
-    }
+      // 检查指定键的值是否为空
+      if (item.operator === null || item.operator === undefined || item.operator === "") {
+          return false; // 如果为空,返回 false
+      }
+      if(item.attrType == 'radio') {
+          if (item.min === null || item.min === undefined || item.min === "") {
+              return false; // 如果为空,返回 false
+          }
+      }
+      if(item.attrType == 'checkbox' || item.attrType == 'select' || item.attrType == 'inputTag') {
+          if (item.minArray === null || item.minArray === undefined || item.minArray === "") {
+              return false; // 如果为空,返回 false
+          }
+      }
+      if(item.attrType == 'inputNumber' || item.attrType == 'datetime') {
+        if(item.operator == '1' || item.operator == null) {
+            if ((item.min === null || item.min === undefined || item.min === "") || (item.max === null || item.max === undefined || item.max === "")) {
+                return false; // 如果为空,返回 false
+            }
+        }
+        if(item.operator == '2' || item.operator == '3') {
+            if(item.min === null || item.min === undefined || item.min === "") {
+                return false; // 如果为空,返回 false
+            }
+        }
+        if(item.operator == '4' || item.operator == '5') {
+            if(item.max === null || item.max === undefined || item.max === "") {
+                return false; // 如果为空,返回 false
+            }
+        }
+      }
   }
   return true; // 如果所有值都不为空,返回 true
 }

+ 7 - 0
src/views/quoteConfig/dispatch/components/rule.vue

@@ -802,6 +802,13 @@ const submit = async () => {
       },
     },
   ];
+  if(!actionJson[0].agreementId) {
+      ElMessage({
+          message: '请选择指定报价协议!',
+          type: 'error'
+      })
+      return
+  }
 
   const submitData = {
     companyId: props.companyId + "",

+ 5 - 3
src/views/quoteConfig/project/modules/projectAdd.vue

@@ -248,6 +248,7 @@ let isEdit = ref(false)
 let projectAddFrom = ref({
   ruleAttrs: [],
   schemeType: 1,
+  productId: '',
   schemeList: [{
     schemeName: '',
     description: '',
@@ -422,7 +423,8 @@ const initProduct = (e) => {
 // 险种
 let insuranceTypeList = ref([])
 const initInsurance = () => {
-  api.projectApi.getBusinessInsurance().then(res => {
+    console.log(111, projectAddFrom.value)
+  api.projectApi.getBusinessInsurance(projectAddFrom.value.productId).then(res => {
     if(res.code == 200) {
       // res.data.forEach(item => {
       //   item.options.forEach(sub => {
@@ -547,6 +549,7 @@ const initType = () => {
     if(res.code == 200) {
       insuranceType.value = res.data
       projectAddFrom.value.productId = insuranceType.value[0].value
+      initInsurance()
     } else {
       ElMessage({
         message: res.msg,
@@ -618,7 +621,7 @@ const drivingTypeDel = (item, row) => {
 const handlePopover = (item, index) => {
   insuranceShow.value = true
   nextTick(() => {
-    InsuranceTypeRef.value.initEditData(item.tableData, index, projectAddFrom.value.schemeType)
+    InsuranceTypeRef.value.initEditData(item.tableData, index, projectAddFrom.value.schemeType, projectAddFrom.value.productId)
   })
 }
 
@@ -756,7 +759,6 @@ const save = async (ProjectAddRef: FormInstance | undefined) => {
 }
 
 onMounted(() => {
-  initInsurance()
   initType()
   initCompany()
   regionLicenseRegion('0')