Просмотр исходного кода

Merge branch 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy 2 месяцев назад
Родитель
Сommit
a4fe4294bf

+ 236 - 75
src/views/additionalOrder/additional/index.vue

@@ -1517,81 +1517,197 @@
             <template #title>
               <span class="title">费用信息</span>
             </template>
-            <el-row :gutter="20" class="p-r-20px">
-              <el-col :span="8">
-                <el-form-item class="white-m-p24" label="报价协议" prop="agreementId">
-                  <el-select v-model="additionalForm.agreementId" @change="handleAgreementSelect">
-                    <el-option v-for="(item, index) in agreementList" :label="item.agreementName" :value="item.id"
-                      key="1"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="是否现询" prop="isInquiry">
-                  <el-select v-model="additionalForm.isInquiry" @change="handleAgreementSelect">
-                    <el-option label="是" value="0" key="0"></el-option>
-                    <el-option label="否" value="1" key="1"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="非现询费用" prop="costId" v-if="additionalForm.isInquiry == '1'">
-                  <el-select v-model="additionalForm.costId">
-                    <el-option v-for="(item, index) in selectList" :key="item.id" :label="item.productName"
-                      :value="item.id"></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item class="white-m-p24" label="交强险总比例" prop="jqInletRatio">
-                  <el-input-number v-model="additionalForm.jqInletRatio" :min="0" :max="100" :controls="false"
-                    style="width: 100%;">
-                    <template #suffix>%</template>
-                  </el-input-number>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="商业险总比例" prop="syInletRatio">
-                  <el-input-number v-model="additionalForm.syInletRatio" :min="0" :max="100" :controls="false"
-                    style="width: 100%;">
-                    <template #suffix>%</template>
-                  </el-input-number>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="驾意险总比例" prop="jyInletRatio">
-                  <el-input-number v-model="additionalForm.jyInletRatio" :min="0" :max="100" :controls="false"
-                    style="width: 100%;">
-                    <template #suffix>%</template>
-                  </el-input-number>
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="8">
-                <el-form-item class="white-m-p24" label="交强险出口比例" prop="jqExportRatio">
-                  <el-input-number v-model="additionalForm.jqExportRatio" :min="0" :max="100" :controls="false"
-                    style="width: 100%;">
-                    <template #suffix>%</template>
-                  </el-input-number>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="商业险出口比例" prop="syExportRatio">
-                  <el-input-number v-model="additionalForm.syExportRatio" :min="0" :max="100" :controls="false"
-                    style="width: 100%;">
-                    <template #suffix>%</template>
-                  </el-input-number>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="驾意险出口比例" prop="jyExportRatio">
-                  <el-input-number v-model="additionalForm.jyExportRatio" :min="0" :max="100" :controls="false"
-                    style="width: 100%;">
-                    <template #suffix>%</template>
-                  </el-input-number>
-                </el-form-item>
-              </el-col>
-            </el-row>
+            <table class="costTable" cellpadding="0" cellspacing="0">
+          <thead>
+            <tr>
+              <th>
+                <div>险种</div>
+              </th>
+              <th>
+                <div>保费</div>
+              </th>
+              <th colspan="2">
+                <div>入口费用</div>
+              </th>
+              <th colspan="2">
+                <div>出口费用</div>
+              </th>
+              <th colspan="2">
+                <div>手续费费用</div>
+              </th>
+              <th colspan="2">
+                <div>跟单费用</div>
+              </th>
+              <th colspan="2">
+                <div>加投费用(净费)</div>
+              </th>
+
+            </tr>
+          </thead>
+          <tbody>
+            <tr>
+              <th>
+                <div>交强险</div>
+              </th>
+
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jqPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jqInletRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jqReceivablePremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jqExportRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jqPayablePremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jqCommissionRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jqCommissionPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jqFollowRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jqFollowPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jqAdditionalRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jqAdditionalPremium }}</div>
+              </th>
+            </tr>
+            <tr>
+              <th>
+                <div>商业险</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.syPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.syInletRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.syReceivablePremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.syExportRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.syPayablePremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.syCommissionRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.syCommissionPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.syFollowRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.syFollowPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.syAdditionalRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.syAdditionalPremium }}</div>
+              </th>
+            </tr>
+            <tr>
+              <th>
+                <div>驾意险</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jyPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jyInletRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jyReceivablePremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jyExportRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jyPayablePremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jyCommissionRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jyCommissionPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jyFollowRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jyFollowPremium }}</div>
+              </th>
+
+              <th>
+                <div>{{ detailData?.costRatio?.jyAdditionalRatio }}%</div>
+              </th>
+              <th>
+                <div>¥{{ detailData?.feeOrdersVo?.jyAdditionalPremium }}</div>
+              </th>
+            </tr>
+            <tr>
+              <th colspan="2">
+                <div>合计:¥{{ (Number(detailData?.feeOrdersVo?.jqPremium) + Number(detailData?.feeOrdersVo?.syPremium) +
+                  Number(detailData?.feeOrdersVo?.jyPremium)).toFixed(2) }}</div>
+              </th>
+              <th colspan="2">
+                <div>小计: ¥{{ (Number(detailData?.feeOrdersVo?.jqReceivablePremium) +
+                  Number(detailData?.feeOrdersVo?.syReceivablePremium) +
+                  Number(detailData?.feeOrdersVo?.jyReceivablePremium)).toFixed(5) }}</div>
+              </th>
+              <th colspan="2">
+                <div>小计: ¥{{ (Number(detailData?.feeOrdersVo?.jqPayablePremium) +
+                  Number(detailData?.feeOrdersVo?.syPayablePremium) +
+                  Number(detailData?.feeOrdersVo?.jyPayablePremium)).toFixed(5) }}</div>
+              </th>
+              <th colspan="2">
+                <div>小计: ¥{{ (Number(detailData?.feeOrdersVo?.jqCommissionPremium) +
+                  Number(detailData?.feeOrdersVo?.syCommissionPremium) +
+                  Number(detailData?.feeOrdersVo?.jyCommissionPremium)).toFixed(5) }}</div>
+              </th>
+              <th colspan="2">
+                <div>小计: ¥{{ (Number(detailData?.feeOrdersVo?.jqFollowPremium) +
+                  Number(detailData?.feeOrdersVo?.syFollowPremium) +
+                  Number(detailData?.feeOrdersVo?.jyFollowPremium)).toFixed(5) }}</div>
+              </th>
+              <th colspan="2">
+                <div>小计: ¥{{ (Number(detailData?.feeOrdersVo?.jqAdditionalPremium) +
+                  Number(detailData?.feeOrdersVo?.syAdditionalPremium) +
+                  Number(detailData?.feeOrdersVo?.jyAdditionalPremium)).toFixed(5) }}</div>
+              </th>
+            </tr>
+          </tbody>
+        </table>
             <template #icon="{ isActive }">
               <span class="icon">
                 <span class="icon-ele">
@@ -4248,6 +4364,51 @@ onMounted(() => {
 :deep(.el-upload.el-upload--text) {
   --el-color-primary-light-9: #fff
 }
+.costTable {
+        width: 100%;
+        border: 1px solid #ebeef5;
+
+        thead {
+          color: #909399;
+
+          th {
+            border-right: 1px solid #ebeef5;
+
+            div {
+              box-sizing: border-box;
+              line-height: 23px;
+              overflow: hidden;
+              overflow-wrap: break-word;
+              padding: 8px 12px;
+              text-overflow: ellipsis;
+              white-space: normal;
+              font-size: 14px;
+              font-weight: 500;
+            }
+          }
+        }
+
+        tbody {
+          color: #303133;
+
+          th {
+            border-top: 1px solid #ebeef5;
+            border-right: 1px solid #ebeef5;
+
+            div {
+              box-sizing: border-box;
+              line-height: 23px;
+              overflow: hidden;
+              overflow-wrap: break-word;
+              padding: 8px 12px;
+              text-overflow: ellipsis;
+              white-space: normal;
+              font-size: 14px;
+              font-weight: 500;
+            }
+          }
+        }
+      }
 .addtional {
   width: calc(100% - 20px);
   height: calc(100vh - 140px);

+ 36 - 34
src/views/insurancePolicy/index.vue

@@ -976,7 +976,7 @@
                                     :value="item.value"></el-option>
                                 </el-select>
                                 <span v-if="props.row.kindName == '乘客责任险'">*{{ insurancePolicyForm.seatCount - 1
-                                  }}/座</span>
+                                }}/座</span>
                               </div>
                             </template>
                           </el-table-column>
@@ -1046,7 +1046,7 @@
                           <el-table-column label="产品名称" prop="productName" align="center">
                             <template #default="props">
                               <el-button link type="primary" @click="getJYXDetail(props.row)">{{ props.row.productName
-                                }}</el-button>
+                              }}</el-button>
                             </template>
                           </el-table-column>
                           <el-table-column label="数量" align="center">
@@ -1098,11 +1098,13 @@
                             </div>
                             <div class="Factor-item flex a-c f-c ">
                               <span class="item-header flex a-c ">交强续保</span>
-                              <span>{{ ['','新保','续保','转保'][Number(scope.row.quoteResult?.scoreVo?.jqRenewal)] || '--' }}</span>
+                              <span>{{ ['', '新保', '续保', '转保'][Number(scope.row.quoteResult?.scoreVo?.jqRenewal)] || '--'
+                                }}</span>
                             </div>
                             <div class="Factor-item flex a-c f-c ">
                               <span class="item-header flex a-c ">商业续保</span>
-                              <span>{{ ['','新保','续保','转保'][Number(scope.row.quoteResult?.scoreVo?.syRenewal)] || '--' }}</span>
+                              <span>{{ ['', '新保', '续保', '转保'][Number(scope.row.quoteResult?.scoreVo?.syRenewal)] || '--'
+                                }}</span>
                             </div>
                             <div class="Factor-item flex a-c f-c ">
                               <span class="item-header flex a-c ">总折扣率</span>
@@ -1428,7 +1430,7 @@
       </template>
     </el-dialog>
     <el-dialog :close-on-click-modal="false" title="优惠测算" v-model="calculatingShow" width="600">
-      <calculating ref="calculatingRefs"></calculating>
+      <calculating ref="calculatingRefs" :discounts="discounts"></calculating>
     </el-dialog>
     <el-dialog :close-on-click-modal="false" title="提交核保" width="1100" v-model="underwritingShow">
       <underwriting v-if="underwritingShow" ref="UnderwritingRefs" :insOrderRightsInfoDto="insOrderRightsInfoDto"
@@ -2995,7 +2997,9 @@ const handlePayment = (scope: any) => {
 // 优惠测算
 let calculatingShow = ref(false)
 const handleCount = (scope: any) => {
+  console.log("🚀 ~ handleCount ~ scope:", scope)
   calculatingShow.value = true
+  discounts.value = scope.row.discounts
 }
 
 // 详情
@@ -3523,9 +3527,7 @@ const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
 
   quoteData.value[companyIndex].loading = true
   let company = quoteData.value[companyIndex]
-  console.log("🚀 ~ quoteInsurance ~ company:", company)
   let product = company.projectList?.find((v, i) => val.productIndex === i)
-  console.log("🚀 ~ quoteInsurance ~ product:", product)
   // 构建提交数据
   let data = {
     systemType: '2',
@@ -3680,32 +3682,32 @@ const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
       const feeOrders = res.data?.feeOrders || {};
       if (quoteData.value[companyIndex]) {
         quoteData.value[companyIndex].discounts = [
-        {
-          name: '交强',  // 交强险费用明细
-          additionalPremium: feeOrders.jqAdditionalPremium ?? 0,
-          additionalRatio: feeOrders.jqAdditionalRatio ?? 0,
-          commissionPremium: feeOrders.jqCommissionPremium ?? 0,
-          commissionRatio: feeOrders.jqCommissionRatio ?? 0,
-          exportPremium: feeOrders.jqExportPremium ?? 0,
-          exportRatio: feeOrders.jqExportRatio ?? 0,
-        }, {
-          name: '商业',  // 商业险费用明细
-          additionalPremium: feeOrders.syAdditionalPremium ?? 0,
-          additionalRatio: feeOrders.syAdditionalRatio ?? 0,
-          commissionPremium: feeOrders.syCommissionPremium ?? 0,
-          commissionRatio: feeOrders.syCommissionRatio ?? 0,
-          exportPremium: feeOrders.syExportPremium ?? 0,
-          exportRatio: feeOrders.syExportRatio ?? 0,
-        }, {
-          name: '驾意险',  // 驾意险费用明细
-          additionalPremium: feeOrders.jyAdditionalPremium ?? 0,
-          additionalRatio: feeOrders.jyAdditionalRatio ?? 0,
-          commissionPremium: feeOrders.jyCommissionPremium ?? 0,
-          commissionRatio: feeOrders.jyCommissionRatio ?? 0,
-          exportPremium: feeOrders.jyExportPremium ?? 0,
-          exportRatio: feeOrders.jyExportRatio ?? 0,
-        },
-      ]
+          {
+            name: '交强',  // 交强险费用明细
+            additionalPremium: feeOrders.jqAdditionalPremium ?? 0,
+            additionalRatio: feeOrders.jqAdditionalRatio ?? 0,
+            commissionPremium: feeOrders.jqCommissionPremium ?? 0,
+            commissionRatio: feeOrders.jqCommissionRatio ?? 0,
+            exportPremium: feeOrders.jqExportPremium ?? 0,
+            exportRatio: feeOrders.jqExportRatio ?? 0,
+          }, {
+            name: '商业',  // 商业险费用明细
+            additionalPremium: feeOrders.syAdditionalPremium ?? 0,
+            additionalRatio: feeOrders.syAdditionalRatio ?? 0,
+            commissionPremium: feeOrders.syCommissionPremium ?? 0,
+            commissionRatio: feeOrders.syCommissionRatio ?? 0,
+            exportPremium: feeOrders.syExportPremium ?? 0,
+            exportRatio: feeOrders.syExportRatio ?? 0,
+          }, {
+            name: '驾意险',  // 驾意险费用明细
+            additionalPremium: feeOrders.jyAdditionalPremium ?? 0,
+            additionalRatio: feeOrders.jyAdditionalRatio ?? 0,
+            commissionPremium: feeOrders.jyCommissionPremium ?? 0,
+            commissionRatio: feeOrders.jyCommissionRatio ?? 0,
+            exportPremium: feeOrders.jyExportPremium ?? 0,
+            exportRatio: feeOrders.jyExportRatio ?? 0,
+          },
+        ]
         // 保存报价结果
         quoteData.value[companyIndex].quoteResult = res.data
         quoteData.value[companyIndex].quoteCode = 200
@@ -4334,4 +4336,4 @@ onMounted(() => {
     }
   }
 }
-</style>
+</style>

+ 10 - 16
src/views/insurancePolicy/modules/calculating.vue

@@ -1,28 +1,22 @@
 <template>
   <div class="calculating">
-    <el-table :data="tableData" border show-summary style="width: 100%">
-      <el-table-column prop="id" label="险种" />
-      <el-table-column prop="name" label="比例" />
-      <el-table-column prop="amount1" label="优惠金额" />
-      <el-table-column prop="amount2" label="返还测算比例" width="160">
-        <template #default="scope">
-          <el-input>
-            <template #append>
-              <span>%</span>
-            </template>
-          </el-input>
-        </template>
+    <el-table :data="discounts" border show-summary style="width: 100%">
+      <el-table-column prop="name" label="险种" />
+      <el-table-column prop="commissionRatio" label="比例" />
+      <el-table-column prop="commissionPremium" label="优惠金额" />
+      <el-table-column prop="exportRatio" label="返还测算比例" width="160">
       </el-table-column>
-      <el-table-column prop="amount3" label="返还金额" />
+      <el-table-column prop="exportPremium" label="返还金额" />
     </el-table>
   </div>
 </template>
 
 <script setup lang="ts">
 
-let tableData = ref([{
-  id: 1
-}])
+
+const props=defineProps({
+  discounts:Array
+})
 </script>
 
 <style scoped lang="scss">