Jelajahi Sumber

方案详情车牌号后请求绑定不上值的问题

祁鹏飞 1 Minggu lalu
induk
melakukan
ac05d3d592

+ 0 - 1
src/components/ruleCondition/index.vue

@@ -103,7 +103,6 @@ const setCheckedData = () => {
   attrName.value = ''
   attractivelist.value = props.attrIdList;//获取编辑数据
   const matchedid = matchDataByIds(attractivelist.value);//
-  console.log("🚀 ~ setCheckedData ~ matchedid:", matchedid)
   const matchedinfo = matchDataByInfos(attractivelist.value)
   Object.keys(checked).forEach(key => { //复选框回显
     checked[key as keyof checkeddata] = matchedid[key] || [];

+ 0 - 1
src/views/consoleManage/businessDataManage/riskDataManage/index.vue

@@ -224,7 +224,6 @@ const handleSortUpdate = (sortInfo: {
 
 //查询
 const query = (item) => {
-  console.log("🚀 ~ query ~ item:", item)
   queryFormRes.value = item;
   queryList();
 };

+ 0 - 2
src/views/externalAgreement/agreement/agreementDetails.vue

@@ -630,7 +630,6 @@ const copyDialog = ref(false)
 const contactObj = ref({})
 /** 复制操作处理:记录当前行的ID并打开复制确认对话框 */
 const handleCopy = (item, costitem) => {
-  console.log("🚀 ~ handleCopy ~ item:", item)
   formInline.ptlAgreementId = agreementInfo.value.id
   contactObj.value = item
   resetForm();
@@ -759,7 +758,6 @@ const columns1 = [
 const costIds = ref<string[]>([])//选中id
 //多选事件
 const selectionChange = (val: any) => {
-  console.log("🚀 ~ selectionChange ~ val:", val)
   costIds.value = val;
 }
 const pageInfo = ref({

+ 0 - 1
src/views/insurancePolicy/index.vue

@@ -1565,7 +1565,6 @@ import { gainFocus } from "@/utils/dataformat"
 import Decimal from 'decimal.js'
 
 let userInfo = ref(JSON.parse(localStorage.getItem('userInfo')))
-console.log("🚀 ~ userInfo:", userInfo.value)
 
 // 下拉选项接口定义
 interface OptionItem {

+ 0 - 1
src/views/quoteConfig/agreement/components/autoLoadingButton.vue

@@ -40,7 +40,6 @@ watch(() => props.loading, (val) => {
 }, { immediate: true })
 
 watch(internalLoading, (val) => {
-  console.log("🚀 ~ val:", val)
   if (props.loading === undefined) {
     isLoading.value = val
   }

+ 0 - 4
src/views/quoteConfig/agreement/components/ruleFeeDialog.vue

@@ -356,17 +356,14 @@ const save = async (formEl: FormInstance | undefined | any) => {
             // if (hasInvalidItem) {
             //   return;
             // }
-        console.log("🚀 ~ save ~ index:", index)
             if (ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[index].ruleConditions.length && result) {
               resolve(true);
             }
           } else {
-        console.log("🚀 ~ save ~ index:", index)
             reject(index);
           }
         });
       } else {
-        console.log("🚀 ~ save ~ index:", index)
         reject(index);
       }
     });
@@ -383,7 +380,6 @@ const save = async (formEl: FormInstance | undefined | any) => {
     })
     emits("save", { ptlAgreementCode: props.agreementInfo.agreementCode, ptlAgreementName: props.agreementInfo.agreementTitle, costAddList: ruleFeeinfo.value })
   } catch (error) {
-  console.log("🚀 ~ save ~ error:", error)
     const invalidIndex: any = error; // 获取未通过校验的表单索引
     // const invalidForm = ruleFeeinfo.value[insuranceTypeIndex.value].ptlAgreementCostAddList[invalidIndex]; // 获取未通过校验的表单对象
     const invalidFormElement = document.getElementById(`from-${insuranceTypeIndex.value}-${invalidIndex}`); // 获取未通过校验的表单元素

+ 36 - 29
src/views/quoteConfig/project/modules/projectAdd.vue

@@ -28,7 +28,7 @@
             <el-form-item label="险种类型" prop="productId">
               <el-radio-group :disabled="isEdit" v-model="projectAddFrom.productId" @change="initProduct">
                 <el-radio-button v-for="item in insuranceType" :key="item.value" :value="item.value">{{ item.label
-                }}</el-radio-button>
+                  }}</el-radio-button>
               </el-radio-group>
             </el-form-item>
 
@@ -85,7 +85,7 @@
                         <el-table-column label="名称" prop="productName">
                           <template #default="scope">
                             <el-button link type="primary" @click="getJYXDetail(scope.row)">{{ scope.row.productName
-                              }}</el-button>
+                            }}</el-button>
                           </template>
                         </el-table-column>
                         <!-- 客户端状态(仅自选方案显示) -->
@@ -255,19 +255,23 @@ const licensePlateNumber = ref();
  * @param value 地区代码
  */
 const regionLicenseRegion = (value: string) => {
-  api.agreementApi.getAreaLicense(value).then((res: any) => {
-    if (res.code == '200') {
-      let data: any = [];
-      res.data.map((val: any) => {
-        data.push({
-          code: val.areaNumber,
-          name: val.license,
+  return new Promise((resolve, rej) => {
+
+    api.agreementApi.getAreaLicense(value).then((res: any) => {
+      if (res.code == '200') {
+        let data: any = [];
+        res.data.map((val: any) => {
+          data.push({
+            code: val.areaNumber,
+            name: val.license,
+          })
+          return val;
         })
-        return val;
-      })
-      licensePlateRegion.value = data;
-    }
-  });
+        licensePlateRegion.value = data;
+        resolve(data)
+      }
+    });
+  })
 }
 
 /**
@@ -275,18 +279,21 @@ const regionLicenseRegion = (value: string) => {
  * @param value 地区代码
  */
 const regionLicenseNumber = (value: string) => {
-  api.agreementApi.getAreaLicense(value).then((res: any) => {
-    if (res.code == '200') {
-      let data: any = [];
-      res.data.map((val: any) => {
-        data.push({
-          code: val.areaNumber,
-          name: val.license,
+  return new Promise((resolve, rej) => {
+    api.agreementApi.getAreaLicense(value).then((res: any) => {
+      if (res.code == '200') {
+        let data: any = [];
+        res.data.map((val: any) => {
+          data.push({
+            code: val.areaNumber,
+            name: val.license,
+          })
+          return val;
         })
-        return val;
-      })
-      licensePlateNumber.value = data;
-    }
+        licensePlateNumber.value = data;
+        resolve(data)
+      }
+    });
   });
 }
 
@@ -798,7 +805,6 @@ const initEdit = async () => {
           item.drivingList = item.drivingIntentionList
           item.tableData = item.schemeInsuranceList.map(sub => {
             let obj = insuranceTypeList.value.find(a => a.id == sub.insuranceId)
-            console.log("🚀 ~ initEdit ~ obj:", obj)
             return {
               ...sub,
               optionId: res.data.schemeType === 1 ? `${sub.optionId[0]}` : sub.optionId,
@@ -920,15 +926,16 @@ const save = async (ProjectAddRef: FormInstance | undefined) => {
 /**
  * 组件挂载时执行
  */
-onBeforeMount(() => {
+onBeforeMount(async () => {
   // 初始化险种类型
   initType()
   // 初始化保险公司列表
   initCompany()
   // 初始化车牌地区数据
-  regionLicenseRegion('0')
+  await regionLicenseRegion('0')
   // 初始化车牌号数据
-  regionLicenseNumber('14')
+
+  await regionLicenseNumber('14')
   // 设置保险公司ID
   projectAddFrom.value.companyId = myRoute.query.companyId
 

+ 1 - 2
src/views/receivable/documentary/ticket.vue

@@ -359,7 +359,6 @@ const handleTicket = async (bool: boolean) => {
     openCountForm()
     countForm.value.companyId = selectedList.value[0].companyId
     countForm.value.reconciliationAmount = selectedList.value.reduce((total, current) => total + current.reconciliationAmount, 0);
-    console.log("🚀 ~ handleTicket ~ countForm.value.reconciliationAmount:", countForm.value.reconciliationAmount)
     receivableSupervisePremium.value = res.data
     if (selectedList.value.length > 1) countForm.value.receivableSupervisePremium = res.data
     if (selectedList.value.length === 1) countForm.value.selectFlag = 0
@@ -622,4 +621,4 @@ onMounted(() => {
     color: #ccc;
   }
 }
-</style>
+</style>