Ver Fonte

非空判断

祁鹏飞 há 3 meses atrás
pai
commit
407db6046a

+ 3 - 3
src/views/quoteConfig/agreement/agreementDetails.vue

@@ -611,7 +611,7 @@ const columns = [
     prop: "ptlAgreementCostTypeList", label: "交强险费用", width: '300', formatter: (row: any) => {
       let info = row.ptlAgreementCostTypeList.find((val: any) => val.costType == '交强险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n加投:${info.addThrow.toFixed(2)}% 手续费:${info.commission.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n加投:${info.addThrow?.toFixed(2)}% 手续费:${info.commission?.toFixed(2)}%`
       } else {
         return '-'
       }
@@ -621,7 +621,7 @@ const columns = [
     prop: "agreementAbbreviation", label: "商业险费用", width: '300', formatter: (row: any) => {
       let info = row.ptlAgreementCostTypeList.find((val: any) => val.costType == '商业险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n加投:${info.addThrow.toFixed(2)}% 手续费:${info.commission.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n加投:${info.addThrow?.toFixed(2)}% 手续费:${info.commission?.toFixed(2)}%`
       } else {
         return '-'
       }
@@ -631,7 +631,7 @@ const columns = [
     prop: "deptName", label: "驾意险费用", width: '300', formatter: (row: any) => {
       let info = row.ptlAgreementCostTypeList.find((val: any) => val.costType == '驾意险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n加投:${info.addThrow.toFixed(2)}% 手续费:${info.commission.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n加投:${info.addThrow?.toFixed(2)}% 手续费:${info.commission?.toFixed(2)}%`
       } else {
         return '-'
       }

+ 3 - 3
src/views/representative/quoteApproval.vue

@@ -181,7 +181,7 @@ const columns = [
     prop: "ruleConditions", label: "交强费用", width: '300', formatter: (row: any) => {
       let info = row.ruleConditions.find((val: any) => val.costType == '交强险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n加投:${info.addThrow.toFixed(2)}% 手续费:${info.commission.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n加投:${info.addThrow?.toFixed(2)}% 手续费:${info.commission?.toFixed(2)}%`
       } else {
         return '-';
       }
@@ -191,7 +191,7 @@ const columns = [
     prop: "ruleConditions", label: "商业费用", width: '300', formatter: (row: any) => {
       let info = row.ruleConditions.find((val: any) => val.costType == '商业险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n加投:${info.addThrow.toFixed(2)}% 手续费:${info.commission.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n加投:${info.addThrow?.toFixed(2)}% 手续费:${info.commission?.toFixed(2)}%`
       } else {
         return '-';
       }
@@ -201,7 +201,7 @@ const columns = [
     prop: "ruleConditions", label: "驾意险费用", width: '300', formatter: (row: any) => {
       let info = row.ruleConditions.find((val: any) => val.costType == '驾意险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n加投:${info.addThrow.toFixed(2)}% 手续费:${info.commission.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n加投:${info.addThrow?.toFixed(2)}% 手续费:${info.commission?.toFixed(2)}%`
       } else {
         return '-';
       }