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

交三变成单三 交强这还显示费用问题解决

祁鹏飞 3 недель назад
Родитель
Сommit
d50703e22e

+ 53 - 3
src/views/quoteConfig/agreement/components/ruleFeeDialogEdit.vue

@@ -39,8 +39,7 @@
               :disabled="disabledShow" class="flex a-c f-wrap" :size="fromSize" :rules="editRules">
               <ElCol :md="24" :lg="24">
                 <el-form-item label="险种" prop="productId">
-                  <el-radio-group v-model="costitemEditInfo.productId"
-                    @change="costitemEditInfo.productName = ruleFeeinfo.find(v => v.value === costitemEditInfo.productId).label">
+                  <el-radio-group v-model="costitemEditInfo.productId" @change="changeProductId()">
                     <el-radio-button v-for="item in ruleFeeinfo" :key="item.id" :label="item.label"
                       :value="item.value" />
                   </el-radio-group>
@@ -288,7 +287,7 @@ const handelRK = (scope) => {
   if (scope.row.keepPointRatio && scope.row.addThrow || scope.row.keepPointRatio && scope.row.addThrow === 0) {
     scope.row.export = scope.row.inlet + scope.row.addThrow - scope.row.keepPointRatio
   }
-  if (scope.row.inlet < scope.row.export) scope.row.export = scope.row.inlet;handelCK(scope)
+  if (scope.row.inlet < scope.row.export) scope.row.export = scope.row.inlet; handelCK(scope)
 }
 const handelCK = (scope) => {
   if (scope.row.inlet && scope.row.addThrow || scope.row.inlet && scope.row.addThrow === 0) {
@@ -407,6 +406,57 @@ const rejectOperation = () => {
 const auditOperation = () => {
   emits("auditOperation", automatic.value, costitemEditInfo.value.id)
 }
+
+// 过滤方法
+const ptlAgreementCostTypeList = [
+  {
+    costType: "交强险",
+    inlet: 0,
+    export: 0,
+    addThrow: 0,
+    keepPointRatio: 0,
+    exportKeepPointRatio: 0,
+  },
+  {
+    costType: "商业险",
+    inlet: 0,
+    export: 0,
+    addThrow: 0,
+    keepPointRatio: 0,
+    exportKeepPointRatio: 0,
+  },
+  {
+    costType: "驾意险",
+    inlet: 0,
+    export: 0,
+    addThrow: 0,
+    keepPointRatio: 0,
+    exportKeepPointRatio: 0,
+  }
+];
+const changeProductId = () => {
+  const name = ruleFeeinfo.value.find(v => v.value === costitemEditInfo.value.productId).label
+  costitemEditInfo.value.productName = name
+  const list= ptlAgreementCostTypeList.filter(item => {
+    if (name === "单交" && item.costType === "商业险") {
+      return false; // 当 name 为 "单交" 且 costType 为 "商业险" 时,返回 false,不包含该项
+    }
+    if (name === "单商" && item.costType === "交强险") {
+      return false; // 当 name 为 "商业" 且 costType 为 "交强险" 时,返回 false,不包含该项
+    }
+    if (name === "单三" && item.costType === "交强险") {
+      return false; // 当 name 为 "商业" 且 costType 为 "交强险" 时,返回 false,不包含该项
+    }
+    return true; // 其他情况返回 true,保留该项
+  });
+  costitemEditInfo.value.ptlAgreementCostTypeList=list.map(v=>{
+    const obj=costitemEditInfo.value.ptlAgreementCostTypeList.find(k=>k.costType===v.costType) ?? {}
+    return {
+      ...v,
+      ...obj
+    }
+  })
+}
 </script>
 <!-- 样式区域 -->
 <style lang='scss' scoped>

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

@@ -839,7 +839,6 @@ onMounted(async () => {
             minArray: [],
           });
         }
-        console.log('group-------------', group)
         return group;
       }
     );