Преглед на файлове

费用复制沿用旧系统的复制

祁鹏飞 преди 1 месец
родител
ревизия
e24e39e660

+ 1 - 1
src/components/complexTable/index.vue

@@ -183,7 +183,7 @@ onMounted(() => {
     counter: counter++
 
   }));
-  handleResize();
+  if(!props.tableheight) handleResize();
 });
 function handleResize() {
   // 获取当前窗口的高度

+ 6 - 6
src/views/consoleManage/personDataManage/salesmanReport/index.vue

@@ -242,9 +242,9 @@ const queryList = async () => {
       ? globalSortKey.value + " " + globalSortOrder.value
       : "",
     ...query,
-    signingTimeStart: query.signTime[0] ?? '',
-    signingTimeEnd: query.signTime[1] ?? '',
-    typeAttr: '6',
+    signTimeBegin: query.signTime[0] ?? '',
+    signTimeEnd: query.signTime[1] ?? '',
+    salesmanTypes: ['6'],
   });
   tableData.value = data.records;
   pageInfo.value.pageNum = data.current;
@@ -272,9 +272,9 @@ const downloadFile = async () => {
       ? globalSortKey.value + " " + globalSortOrder.value
       : "",
     ...query,
-    signingTimeStart: query.signTime[0] ?? '',
-    signingTimeEnd: query.signTime[1] ?? '',
-    typeAttr: '6',
+    signTimeBegin: query.signTime[0] ?? '',
+    signTimeEnd: query.signTime[1] ?? '',
+    salesmanTypes: ['6'],
   });
   ElMessage({
     message: msg,

+ 194 - 43
src/views/quoteConfig/agreement/agreementDetails.vue

@@ -154,17 +154,15 @@
                     </el-button>
                     <el-button type="primary" link @click="handleUpdateCostRatio()"> 批量设置比例
                     </el-button>
-                    <el-button type="primary" link @click="handleCopy({})"> 批量复制
+                    <el-button type="primary" link @click="handleCopy(item)"> 批量复制
                     </el-button>
                     <ComplexTable showSelect :tableData="costitem.ptlAgreementCostVoList" :columns="columns"
-                      :maxHeight="250" :showIndex="false" :columnwidth="200" @selectionChange="(arr) => costIds = arr"
+                      :showIndex="false" tableheight="auto" :columnwidth="200" @selectionChange="(arr) => costIds = arr"
                       @select-all="(arr) => costIds = arr">
                       <template v-slot:operation="scope">
                         <el-button type="primary" link
                           @click="costitemEdit(scope.operationData.id, item, index, costindex)"> 编辑
                         </el-button>
-                        <el-button type="primary" link @click="handleCopy(scope.operationData)"> 复制
-                        </el-button>
                         <el-button type="primary" link @click="costitemDel(scope.operationData.id)"> 删除
                         </el-button>
                       </template>
@@ -248,21 +246,14 @@
       :agreementInfo="agreementInfo" :RulesInfo="RulesInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
       @cancel="ruleFeeEditVisible = false" />
 
-    <el-dialog :close-on-click-modal="false" v-model="copyDialog" title="复制" width="800">
-      <el-form inline>
-        <el-form-item label="协议">
-          <el-select style="width:300px" v-model="agreementId" placeholder="请选择协议" @change="changeAgreement" filterable>
-            <el-option v-for="item in agreementList" :key="item.id" :value="item.id"
-              :label="item.agreementTitle"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="规则">
-          <el-select style="width:300px" :disabled="!agreementId" v-model="coverRuleId" placeholder="请选择规则">
-            <el-option v-for="(item, index) in rulesList" :key="item.id" :value="item.id"
-              :label="'承保规则一' + (index + 1)"></el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
+    <el-dialog :close-on-click-modal="false" v-model="copyDialog" title="批量复制" fullscreen>
+      <div class="h-[calc(100vh-159px)]">
+        <SearchForm :fields="fields" isOffset :formInline="formInline" :onSearch="findpage" :onReset="resetForm" />
+        <ComplexTable :tableData="tableData" tableheight="calc(100vh - 410px)" :showOperation="false"
+          :columns="columns1" :columnwidth="200" :showSelect="true" :pageInfo="pageInfo" @getList="getList"
+          @selectionChange="selectionChange" uniqueIdName="costId">
+        </ComplexTable>
+      </div>
       <template #footer>
         <el-button type="primary" @click="costitemCopy">确定</el-button>
       </template>
@@ -281,7 +272,7 @@
       </template>
     </el-dialog>
     <el-dialog :close-on-click-modal="false" v-model="copyDialog2" title="批量设置有效期" width="500">
-      <el-form >
+      <el-form>
         <el-form-item label="开始时间">
           <el-date-picker v-model="effectiveTime" type="date" value-format="YYYY-MM-DD HH:mm:ss" />
         </el-form-item>
@@ -368,7 +359,7 @@ const addRules = (val: string, rules: any = {}) => {
 }
 
 onBeforeMount(async () => {
-  await loadDicts(['agreement_type', 'valid_status', 'is_enable', 'with_tax', 'audit_status']);//获取多个字典
+  await loadDicts(['agreement_type', 'valid_status', 'is_enable', 'with_tax', 'audit_status', 'insurance_type', 'is_enable', 'audit_status', 'valid_status']);//获取多个字典
   if (id.value) {
     detailsInfo();//协议信息
     agreementRulesList();//承保规则
@@ -784,7 +775,7 @@ const RulesInfo = ref({});
 const columns = computed(() => [
   { prop: "costRules", label: "费用规则", width: '200', },
   { prop: "priorityLevel", label: "优先级", width: '100', },
-  { prop: "costDescribe", label: "费用规则", width: '200', },
+  { prop: "costDescribe", label: "费用规则名称", width: '200', },
   {
     prop: "ptlAgreementCostTypeList", label: "交强险费用", width: '300', formatter: (row: any) => {
       let info = row.ptlAgreementCostTypeList.find((val: any) => val.costType == '交强险');
@@ -967,15 +958,12 @@ const costitemDel = (id: string) => {
 
 const copyDialog = ref(false)
 const costIds = ref([])
-const agreementId = ref('')
 const coverRuleId = ref('')
 const agreementList = ref([])
 const rulesList = ref([])
 /** 复制操作处理:记录当前行的ID并打开复制确认对话框 */
-const handleCopy = (row) => {
-  agreementId.value = ''
-  coverRuleId.value = ''
-  if (row.id) costIds.value = [row.id]
+const handleCopy = (item) => {
+  if (item.id) coverRuleId.value = item.id
   openDialog()
 }
 
@@ -985,27 +973,190 @@ const openDialog = () => {
       agreementList.value = res.data.records;
     }
   });
+  formInline.companyId = agreementInfo.value.companyId
+  findpage();
   copyDialog.value = true
 }
-
+//表格字段数据
+const fields = computed(() => [
+  {
+    label: "所属协议", model: "agreementId", type: "select", options: agreementList.value, props: { label: 'agreementTitle', value: 'id' },
+    onChange: (value: any) => {
+      formInline.agreementId = value;
+      formInline.coverRuleId = '';
+      changeAgreement()
+    }
+  },
+  {
+    label: "承保规则", model: "coverRuleId", disabled: !formInline.agreementId, type: "select", options: rulesList.value, props: { label: 'index', value: 'id' },
+  },
+  {
+    label: "险种", model: "productId", type: "select", options: getDict('insurance_type'),
+  },
+  {
+    label: "费用描述", model: "costRules", type: "input", placeholder: "输入费用描述关键字查找",
+  },
+  {
+    label: "费用状态", model: "agreementStatus", type: "select", placeholder: "选择状态", options: getDict('is_enable'),
+  },
+  {
+    label: "审核状态", model: "auditStatus", type: "select", placeholder: "选择状态", options: getDict('audit_status'),
+  },
+  {
+    label: "有效状态", model: "validState", type: "select", placeholder: "请选择状态", options: getDict('valid_status'),
+  },
+  {
+    label: "生效时间", model: "effectiveTime", 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) => {
+      console.log(value)
+      formInline.effectiveTime = value;
+    }
+  },
+  {
+    label: "失效时间", model: "failureTime", 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.failureTime = value;
+    }
+  },
+]);
+const columns1 = [
+  { prop: "companyName", label: "保险公司", width: '120', },
+  {
+    prop: "agreementAbbreviation", label: "协议信息", width: '300',
+    formatter: (row: any) => {
+      return `${row.agreementCode}\n${row.agreementTitle}-${row.agreementAbbreviation}-${row.agreementName ?? ''}`
+    }
+  },
+  {
+    prop: "ruleDescription", label: "承保规则", width: '500',
+  },
+  { prop: "productName", label: "险种", width: '120', },
+  {
+    prop: "costRules", label: "费用规则", width: '500',
+  },
+  {
+    prop: "costDescribe", label: "费用描述", width: '500',
+  },
+  {
+    prop: "isEnabled", label: "费用状态", width: '100', component: "Tag",
+    formatter: (row: any) => {
+      let name = getDict('is_enable').find(val => val.value == row.isEnabled).label
+      if (name) {
+        return { type: 'primary', text: name };
+      }
+    }
+  },
+  {
+    prop: "approved", label: "审核状态", width: '120', component: "Tag",
+    formatter: (row: any) => {
+      let name = getDict('audit_status').find(val => val.value == row.approved).label
+      if (name) {
+        return { type: 'warning', text: name };
+      }
+    }
+  },
+  { prop: "dockingPerson", label: "对接人", width: '100' },
+  { prop: "effectiveTime", label: "生效时间", width: '200' },
+  { prop: "failureTime", label: "失效时间", width: '200' },
+  { prop: "updateTime", label: "修改时间", width: '200' },
+  {
+    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)}%`
+      } else {
+        return '-';
+      }
+    }
+  },
+  {
+    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)}%`
+      } else {
+        return '-';
+      }
+    }
+  },
+  {
+    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)}%`
+      } else {
+        return '-';
+      }
+    }
+  },
+];
 const changeAgreement = () => {
-  api.agreementApi.agreementRulesList(agreementId.value).then((res: any) => {
+  api.agreementApi.agreementRulesList(formInline.agreementId).then((res: any) => {
     if (res.code == '200') {
-      rulesList.value = res.data
+      rulesList.value = res.data.map((v, i) => ({ ...v, index: '承保规则一' + (i + 1) }))
     }
   });
 }
-
+const sysUpAndDownList = ref<string[]>([])//选中id
+//多选事件
+const selectionChange = (val: any) => {
+  sysUpAndDownList.value = val;
+}
+const pageInfo = ref({
+  pageNum: 1,
+  pageSize: 20,
+  sizes: [10, 20, 30, 40, 50],
+  total: 100,
+});
+const tableData = ref([]);
+const formInline = reactive({
+  agreementId: '',//协议信息
+  productId: "",//归属
+  coverRuleId: '',//规则id
+  costRules: '',//协议类型
+  agreementStatus: "",//有效状态
+  auditStatus: "",//协议状态
+  validState: "",
+  effectiveTime: [],
+  failureTime: [],
+  updateTimeArr: [],
+  companyId: '',
+  contactPerson: "",
+})
+const resetForm = () => {
+  formInline.agreementId = '';//协议信息
+  formInline.productId = "";//归属
+  formInline.coverRuleId = '';//保险公司id
+  formInline.costRules = '';//协议类型
+  formInline.agreementStatus = "";//有效状态
+  formInline.auditStatus = "";//协议状态
+  formInline.validState = "";
+  formInline.effectiveTime = [];
+  formInline.failureTime = [];
+  formInline.contactPerson = "";
+  formInline.updateTimeArr = [];
+  findpage();
+}
+function findpage() {
+  api.agreementApi.queryByFeePage({ pages: pageInfo.value.pageNum, size: pageInfo.value.pageSize, ...formInline }).then((res: any) => {
+    if (res.code == '200') {
+      tableData.value = res.data.records;
+      pageInfo.value.pageNum = res.data.current;
+      pageInfo.value.pageSize = res.data.size;
+      pageInfo.value.total = res.data.total;
+    }
+  });
+}
+//分页事件
+function getList(item) {
+  pageInfo.value.pageNum = item.pageNum;
+  pageInfo.value.pageSize = item.pageSize;
+  findpage();
+};
 //复制费用
 const costitemCopy = () => {
-  if (!agreementId.value) {
-    ElMessage.warning('请选择协议')
-    return
-  }
-  if (!coverRuleId.value) {
-    ElMessage.warning('请选择规则')
-    return
-  }
   ElMessageBox.confirm(
     '确定要复制该费用,请确认是否复制?',
     '复制费用',
@@ -1017,8 +1168,8 @@ const costitemCopy = () => {
     }
   ).then(() => {
     const params = {
-      costIds: costIds.value,
-      agreementId: agreementId.value,
+      costIds: sysUpAndDownList.value,
+      agreementId: agreementInfo.value.id,
       coverRuleId: coverRuleId.value,
     }
     api.agreementApi.AgreementFeecopy(params).then((res: any) => {
@@ -1115,8 +1266,8 @@ const handleUpdateValidDate = () => {
     ElMessage.error('请选择费用')
     return
   }
-  effectiveTime.value=''
-  failureTime.value=''
+  effectiveTime.value = ''
+  failureTime.value = ''
   copyDialog2.value = true
 }
 const submitUpdate = () => {