Procházet zdrojové kódy

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

祁鹏飞 před 1 měsícem
rodič
revize
87a123b88c

+ 3 - 3
src/views/finance/modules/auditDetail.vue

@@ -194,13 +194,13 @@
           <el-col :span="6" class="TBMsgItem">
             <span class="label">是否过户车</span>
             <span class="value">
-              <span>--</span>
+              <span>{{ detailData?.order?.isTransfer  ? '是' : '否' }}</span>
             </span>
           </el-col>
           <el-col :span="6" class="TBMsgItem">
             <span class="label">商业险是否过户</span>
             <span class="value">
-              <span>--</span>
+              <span>{{ detailData?.order?.transferBi  ? '是' : '否' }}</span>
             </span>
           </el-col>
           <el-col :span="6" class="TBMsgItem">
@@ -1235,7 +1235,7 @@ const initOption = () => {
 }
 const dictChange = (list, value) => {
   if (list && list.length) {
-    let obj = list.find(a => a.value = value)
+    let obj = list.find(a => a.value == value)
     if (obj) {
       return obj.label
     } else {

+ 1 - 1
src/views/receivable/handingFee/invoiceRecord.vue

@@ -297,7 +297,7 @@ const handleCount = (row) => {
 /** 计算实收金额与应收监管保费的差值,并将结果赋值给付款差额字段 */
 const handleChange = async () => {
   if (countForm.value.actualReceivedAmount > countForm.value.remainSettlementAmount) {
-    const num = await calSub(countForm.value.actualReceivedAmount, countForm.value.receivableSupervisePremium)
+    const num = await calSub(countForm.value.actualReceivedAmount, countForm.value.remainSettlementAmount)
     countForm.value.settlementPaymentDifference = num
   } else {
     countForm.value.settlementPaymentDifference = 0

+ 47 - 15
src/views/representative/externalCostApproval.vue

@@ -4,6 +4,8 @@
       <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
         <el-tab-pane :label="`待审核(${pendingReviewlength})`" name="pendingReview">
         </el-tab-pane>
+        <el-tab-pane :label="`审核通过(${passlength})`" name="pass">
+        </el-tab-pane>
         <el-tab-pane :label="`审核不通过(${reviewRejectedlength})`" name="reviewRejected">
         </el-tab-pane>
       </el-tabs>
@@ -28,7 +30,7 @@
           <el-button v-if="scope.operationData.auditStatus == '0'" type="primary" link
             @click="agreemenUpdate(scope.operationData.id)"> 审核
           </el-button>
-          <el-button v-if="scope.operationData.auditStatus == '2'" type="primary" link
+          <el-button v-if="scope.operationData.auditStatus == '2'  || scope.operationData.auditStatus == '1'" type="primary" link
             @click="agreemenUpdate(scope.operationData.id)"> 详情
           </el-button>
         </template>
@@ -61,6 +63,7 @@ onBeforeMount(async () => {
     formInline.agreement = id.value;
   }
   findpage(0);//列表数据
+  findpage(1);//列表数据
   findpage(2);//列表数据
   valid_status.value = getDict('valid_status');//生效状态
   is_enable.value = getDict('is_enable');//协议状态
@@ -70,16 +73,25 @@ onBeforeMount(async () => {
 });
 const activeName = ref('pendingReview')
 const pendingReviewlength = ref(0);
+const passlength = ref(0);//审核通过
 const reviewRejectedlength = ref(0);
 // 两个选项卡各自的数据和分页
-const tableDataPending = ref([]);//待审核
-const tableDataRejected = ref([]);//审核不通过
+const tableData1 = ref([]);//待审核
+const tableData2 = ref([]);//审核通过
+const tableData3 = ref([]);//审核不通过
 const pageInfoPending = ref({
   pageNum: 1,
   pageSize: 20,
   sizes: [10, 20, 30, 40, 50],
   total: 0,
 });
+const pageInfoPass = ref({
+  pageNum: 1,
+  pageSize: 20,
+  sizes: [10, 20, 30, 40, 50],
+  total: 0,
+});
+
 const pageInfoRejected = ref({
   pageNum: 1,
   pageSize: 20,
@@ -88,10 +100,10 @@ const pageInfoRejected = ref({
 });
 // 当前激活选项卡的数据和分页
 const tableData = computed(() => {
-  return activeName.value === 'pendingReview' ? tableDataPending.value : tableDataRejected.value;
+  return activeName.value === 'pendingReview' ? tableData1.value : activeName.value === 'pass' ? tableData2.value : tableData3.value;
 });
 const pageInfo = computed(() => {
-  return activeName.value === 'pendingReview' ? pageInfoPending.value : pageInfoRejected.value;
+  return activeName.value === 'pendingReview' ? pageInfoPending.value : activeName.value === 'pass' ? pageInfoPass.value : pageInfoRejected.value;
 });
 const sysUpAndDownList = ref<string[]>([])//选中id
 const insurance_type = ref();
@@ -150,18 +162,23 @@ const fields = ref([
 
 //费用数据查询
 function findpage(status: any) {
+  formInline.auditStatus = status;
   // 根据状态使用对应的分页数据
-  let currentPageInfo = status === 0 ? pageInfoPending.value : pageInfoRejected.value;
+  let currentPageInfo = status == '0' ? pageInfoPending.value : status == '1' ? pageInfoPass.value : pageInfoRejected.value;
   api.agreementApi.CostExternalFeePageList({ pages: currentPageInfo.pageNum, size: currentPageInfo.pageSize, ...formInline, auditStatus: status }).then((res: any) => {
     if (res.code == '200') {
       currentPageInfo.pageNum = res.data.current;
       currentPageInfo.pageSize = res.data.size;
       currentPageInfo.total = res.data.total;
       if (status == 0) {
-        tableDataPending.value = res.data.records;
+        tableData1.value = res.data.records;
         pendingReviewlength.value = res.data.total;
-      } else {
-        tableDataRejected.value = res.data.records;
+      } else if (status == '1') {
+        tableData2.value = res.data.records;
+        passlength.value = res.data.total;
+      }
+      else {
+        tableData3.value = res.data.records;
         reviewRejectedlength.value = res.data.total;
       }
     } else {
@@ -224,7 +241,7 @@ const columns = [
     prop: "costExternalTypeAdds", label: "交强险费用", width: '300', formatter: (row: any) => {
       let info = row.costExternalTypeAdds.find((val: any) => val.costType == '交强险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n一级:${info.level1?.toFixed(2)}% 五级:${info.level5?.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n一级:${info.level1?.toFixed(2)}% 五级:${info.level5?.toFixed(2)}%`
       } else {
         return '-'
       }
@@ -234,7 +251,7 @@ const columns = [
     prop: "costExternalTypeAdds", label: "商业险费用", width: '300', formatter: (row: any) => {
       let info = row.costExternalTypeAdds.find((val: any) => val.costType == '商业险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n一级:${info.level1?.toFixed(2)}% 五级:${info.level5?.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n一级:${info.level1?.toFixed(2)}% 五级:${info.level5?.toFixed(2)}%`
       } else {
         return '-'
       }
@@ -244,7 +261,7 @@ const columns = [
     prop: "costExternalTypeAdds", label: "驾意险费用", width: '300', formatter: (row: any) => {
       let info = row.costExternalTypeAdds.find((val: any) => val.costType == '驾意险');
       if (info) {
-        return `入口:${info.inlet.toFixed(2)}% 出口:${info.export.toFixed(2)}%\n一级:${info.level1?.toFixed(2)}% 五级:${info.level5?.toFixed(2)}%`
+        return `入口:${info.inlet?.toFixed(2)}% 出口:${info.export?.toFixed(2)}%\n一级:${info.level1?.toFixed(2)}% 五级:${info.level5?.toFixed(2)}%`
       } else {
         return '-'
       }
@@ -258,6 +275,10 @@ function getList(item: PageInfo) {
     pageInfoPending.value.pageNum = item.pageNum;
     pageInfoPending.value.pageSize = item.pageSize;
     findpage(0);
+  } else if (activeName.value == 'pass') {
+    pageInfoPass.value.pageNum = item.pageNum;
+    pageInfoPass.value.pageSize = item.pageSize;
+    findpage(1);
   } else {
     pageInfoRejected.value.pageNum = item.pageNum;
     pageInfoRejected.value.pageSize = item.pageSize;
@@ -290,6 +311,8 @@ const ruleFeeEditSave = (data: object) => {
       ruleFeeEditVisible.value = false;
       if (activeName.value == 'pendingReview') {
         findpage(0);
+      } else if (activeName.value == 'pass') {
+        findpage(1);
       } else {
         findpage(2);
       }
@@ -344,6 +367,8 @@ const rejectOperation = (automatic: any, id: any, value: any) => {
 const agreementQuery = () => {
   if (activeName.value == 'pendingReview') {
     findpage(0);
+  } else if (activeName.value == 'pass') {
+    findpage(1);
   } else {
     findpage(2);
   }
@@ -352,6 +377,7 @@ const ExternalauditSuccess = async (list: string[], automatic?: boolean) => {
   await api.agreementApi.ExternalauditSuccess({ ids: list, automatic: automatic }).then((res: any) => {
     if (res.code == '200') {
       findpage(0);
+      findpage(1);
       findpage(2);
       ElMessage({
         type: 'success',
@@ -360,7 +386,7 @@ const ExternalauditSuccess = async (list: string[], automatic?: boolean) => {
       })
       ruleFeeEditVisible.value = false;
       if (res.data) {
-        let info: any = tableDataPending.value.find((val: any) => val.id == res.data);
+        let info: any = tableData1.value.find((val: any) => val.id == res.data);
         if (info) {
           agreemenUpdate(info.id)
         }
@@ -372,6 +398,7 @@ const ExternalauditFailed = async (list: string[], value: string, automatic?: bo
   await api.agreementApi.ExternalauditFailed({ ids: list, reason: value, automatic: automatic }).then((res: any) => {
     if (res.code == '200') {
       findpage(0);
+      findpage(1);
       findpage(2);
       ElMessage({
         type: 'success',
@@ -380,7 +407,7 @@ const ExternalauditFailed = async (list: string[], value: string, automatic?: bo
       })
       ruleFeeEditVisible.value = false;
       if (res.data) {
-        let info: any = tableDataPending.value.find((val: any) => val.id == res.data);
+        let info: any = tableData1.value.find((val: any) => val.id == res.data);
         if (info) {
           agreemenUpdate(info.id)
         }
@@ -400,14 +427,19 @@ const resetForm = () => {
   formInline.failureTime = [];
   if (activeName.value == 'pendingReview') {
     findpage(0);
+  } else if (activeName.value == 'pass') {
+    findpage(1);
   } else {
     findpage(2);
   }
 }
 // 批量编辑
 const handleClick = (pane: any) => {
+  activeName.value = pane.props.name;
   if (pane.props.name == 'pendingReview') {
     findpage(0);
+  } else if (pane.props.name == 'pass') {
+    findpage(1);
   } else {
     findpage(2);
   }
@@ -434,4 +466,4 @@ const handleClick = (pane: any) => {
 .el-inputs {
   width: 100% !important;
 }
-</style>
+</style>

+ 65 - 9
src/views/representative/quoteApproval.vue

@@ -8,9 +8,15 @@
       <el-tab-pane :label="`审核不通过(${reviewRejectedlength})`" name="reviewRejected">
       </el-tab-pane>
     </el-tabs>
-    <SearchForm :fields="fields" :formInline="formInline" :onSearch="agreementQuery" :onReset="resetForm" />
+    <SearchForm :fields="visibleFields" :formInline="formInline" :onSearch="agreementQuery" :onReset="resetForm" />
     <ComplexTable :tableData="companylist" :columns="columns" :showIndex="false" :columnwidth="200" :showSelect="true"
       :pageInfo="pageInfo" @getList="getList" @selectionChange="selectionChange" uniqueIdName="costId">
+      <template #ruleDescription="{ data, bodyCell }">
+        <div class="whitespace-normal">{{ data.ruleDescription }}</div>
+      </template>
+      <template #costRules="{ data, bodyCell }">
+        <div class="whitespace-normal">{{ data.costRules }}</div>
+      </template>
       <template v-slot:table-title-btn>
         <el-dropdown placement="bottom-start" v-if="activeName == 'pendingReview'">
           <el-button> 批量审核<el-icon>
@@ -40,7 +46,8 @@
   <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle"
     :agreementInfo="AgreementInfo" :RulesInfo="ruleInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
     @cancel="ruleFeeEditVisible = false" :operationType="activeName == 'pendingReview' ? 'audit' : 'rejected'"
-    @rejectOperation="rejectOperation" @auditOperation="auditOperation" :titleType="activeName == 'pendingReview' ? '费用审核' : '费用详情'"  />
+    @rejectOperation="rejectOperation" @auditOperation="auditOperation"
+    :titleType="activeName == 'pendingReview' ? '费用审核' : '费用详情'" />
 </template>
 
 <script lang="ts" setup>
@@ -67,6 +74,7 @@ onBeforeMount(async () => {
   getDeptTree();
   agreement();
   getAgreement();//全部协议;
+  initCompany();//保险公司
   valid_status.value = getDict('valid_status');//生效状态
   is_enable.value = getDict('is_enable');//协议状态
   insurance_type.value = getDict('insurance_type')
@@ -86,7 +94,13 @@ const valid_status = ref();
 const audit_status = ref();
 const is_enable = ref();
 const agreementListALL = ref();//全部协议列表
-
+const company_list = ref();//保险公司列表
+const companyIdprops = {
+  expandTrigger: 'hover' as const,
+  value: 'id',
+  label: 'name',
+  checkStrictly: true,
+}
 const route = useRoute();
 const id = ref(route.query.id as string);//id参数
 const pendingReviewlength = ref(0);//待审核
@@ -134,6 +148,9 @@ const formInline = reactive({
   validState: "",
   effectiveTime: [],
   failureTime: [],
+  auditTimeBegin: "",//审核时间开始
+  auditTimeEnd: "",//审核时间结束
+  companyId: '',//保险公司id
 })
 const companylist = computed(() => {
   let list = [] as any;
@@ -152,7 +169,7 @@ const companylist = computed(() => {
   }
   return list;
 })
-//表格字段数据
+//表格字段数据(待审核时隐藏"审核人"筛选项)
 const fields = ref([
   {
     label: "所属协议", model: "agreement", type: "select", placeholder: "输入代码,名称,简称查找", options: agreementListALL,
@@ -164,11 +181,16 @@ const fields = ref([
   {
     label: "险种", model: "productId", type: "select", options: insurance_type,
   },
+  {
+    label: "保险公司", model: "companyId", type: "cascader", placeholder: "选择保险公司", options: company_list, props: companyIdprops, placement: 'left', onChange: (value: any) => {
+      formInline.companyId = value[value.length - 1];
+    }
+  },
   {
     label: "承保规则", model: "rulesName", type: "input", placeholder: "输入业务规则查找",
   },
   {
-    label: "费用规则", model: "costRules", type: "input", placeholder: "输入费用规则关键字查找",
+    label: "费用规则", model: "costRules", type: "inputTag", placeholder: "输入费用规则关键字查找",
   },
 
   {
@@ -192,8 +214,42 @@ const fields = ref([
       formInline.failureTime = value;
     }
   },
-]);
+  {
+    label: "审核人", model: "auditPerson", type: "input", placeholder: "输入审核人查找",
+  },
+  {
+    label: "审核时间", model: "auditTime", type: "date", dateType: "datetimerange", startplaceholder: "开始时间", endplaceholder: "结束时间",
+    format: "YYYY-MM-DD HH:mm:ss", valueFormat: "YYYY-MM-DD HH:mm:ss", timeFormat: "HH:mm:ss",
+    onChange: (value: any) => {
+      formInline.auditTimeBegin = value[0];
+      formInline.auditTimeEnd = value[1];
+    }
+  },
 
+]);
+// 待审核选项卡下隐藏的筛选项(fields 保持 ref, 这里只做过滤, 避免破坏 ref 的自动解包)
+const visibleFields = computed(() => {
+  if (activeName.value === 'pendingReview') {
+    // 需要隐藏更多字段时, 把对应的 model 加到下面数组里即可
+    const hiddenModels = ['auditPerson', 'auditTime'];
+    return fields.value.filter((field: any) => !hiddenModels.includes(field.model));
+  }
+  return fields.value;
+})
+// 保险公司
+const initCompany = () => {
+  api.agreementApi.findTree({ name: "", systemCode: localStorage.getItem('login_system') }).then((res: any) => {
+    if (res.code == '200') {
+      company_list.value = res.data;
+    } else {
+      ElMessage({
+        type: 'error',
+        message: res.msg,
+        plain: true,
+      })
+    }
+  });
+}
 //费用数据查询
 function findpage(type: string) {
   formInline.auditStatus = type;
@@ -245,11 +301,11 @@ const columns = [
   { prop: "effectiveTime", label: "生效时间", width: '200' },
   { prop: "failureTime", label: "失效时间", width: '200' },
   {
-    prop: "ruleDescription", label: "承保规则", width: '500'
+    prop: "ruleDescription", label: "承保规则", component: 'customSlot', width: '500'
   },
   { prop: "productName", label: "险种", width: '120', },
   {
-    prop: "costRules", label: "费用规则", width: '500',
+    prop: "costRules", label: "费用规则", component: 'customSlot', width: '500',
   },
   {
     prop: "ruleConditions", label: "交强费用", width: '300', formatter: (row: any) => {
@@ -601,4 +657,4 @@ const handleClick = (pane: any) => {
     }
   }
 }
-</style>
+</style>