|
|
@@ -1,117 +1,282 @@
|
|
|
<template>
|
|
|
- <div class="logDetail">
|
|
|
- <el-descriptions :column="2">
|
|
|
- <template #title>
|
|
|
- <div class="title">
|
|
|
- <div class="icon">
|
|
|
- <el-icon><List /></el-icon>
|
|
|
- </div>
|
|
|
- <p>{{ detailData?.operationContent }}</p>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <el-descriptions-item label="操作功能:" label-align="right" align="left" label-width="100">{{ detailData?.moduleName }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="操作类型:" label-align="right" align="left" label-width="100">{{ detailData?.operatorName }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="操作人:" label-align="right" align="left" label-width="100">{{ detailData?.createBy }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="操作时间:" label-align="right" align="left" label-width="100">{{ detailData?.createTime }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- <el-row :gutter="20" class="content">
|
|
|
- <el-col :span="11">
|
|
|
- <p>变更前</p>
|
|
|
- <div class="list">
|
|
|
- <el-row class="list-item" :gutter="20" v-for="item in detailData?.compareResultList" :key="item">
|
|
|
- <el-col :span="6">{{ item.name }}</el-col>
|
|
|
- <el-col :span="18" style="color: #606266">{{ item.fieldContent }}</el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-divider direction="vertical" style="height: 100%"></el-divider>
|
|
|
- <el-col :span="11">
|
|
|
- <p>变更后</p>
|
|
|
- <div class="list">
|
|
|
- <el-row class="list-item" :gutter="20" v-for="item in detailData?.compareResultList" :key="item">
|
|
|
- <el-col :span="6">{{ item.name }}</el-col>
|
|
|
- <el-col :span="18" style="color: #606266">{{ item.newFieldContent }}</el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <div class="log">
|
|
|
+ <div class='btn-box'>
|
|
|
+ <el-button type="primary" plain class='query-btn'
|
|
|
+ @click='dialogShow'>{{selectedKeys.length?`已选${selectedKeys.length}项`:'筛选条件'}}</el-button>
|
|
|
+ <div class='query-btn'>
|
|
|
+ <DowButton @endAnim='downloadFile'></DowButton>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <QueryForm :option="listOption" @query='query' @delSelect='delSelect' ref='queryFormRef'></QueryForm>
|
|
|
+
|
|
|
+ <!-- 表格 -->
|
|
|
+ <el-table :data="tableData" border style="width: 100%" :header-cell-style="tableHeaderColor">
|
|
|
+ <el-table-column prop="insuranceCompany" label="保险公司" align='center' width='200' fixed />
|
|
|
+ <el-table-column prop="region" label="地区" align='center' width='200' fixed>
|
|
|
+ <template #default="props">
|
|
|
+ <div style='{background:red}'>22{{props.row.region}}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="应收" align='center'>
|
|
|
+ <el-table-column prop="receivableTotal" label="总计" align='center' width='200' />
|
|
|
+ <el-table-column prop="receivableServiceFee" label="手续费" align='center' width='200' />
|
|
|
+ <el-table-column prop="receivableFollowFee" label="跟单费" align='center' width='200' />
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="未开票" align='center'>
|
|
|
+ <el-table-column prop="uninvoicedTotal" label="总计" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedServiceFee" label="手续费" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedFollowFee" label="跟单费" align='center' width='200' />
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="已开票" align='center'>
|
|
|
+ <el-table-column prop="uninvoicedTotal" label="总计" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedServiceFee" label="手续费" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedFollowFee" label="跟单费" align='center' width='200' />
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="未结算" align='center'>
|
|
|
+ <el-table-column prop="uninvoicedTotal" label="总计" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedServiceFee" label="手续费" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedFollowFee" label="跟单费" align='center' width='200' />
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="已结算" align='center'>
|
|
|
+ <el-table-column prop="uninvoicedTotal" label="总计" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedServiceFee" label="手续费" align='center' width='200' />
|
|
|
+ <el-table-column prop="uninvoicedFollowFee" label="跟单费" align='center' width='200' />
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <FilterDialog :show='isShow' @close='isShow=false' @sure='filterSure' ref='filterDialogRef' @selectedKeys='selected'
|
|
|
+ routerKey='routerKey'>
|
|
|
+ </FilterDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import api from '@/api'
|
|
|
-import { useRoute, useRouter } from 'vue-router'
|
|
|
+import { useRouter } from "vue-router";
|
|
|
+import api from "@/api";
|
|
|
+import QueryForm from "../../components/queryForm.vue";
|
|
|
+import FilterDialog from "../../components/filterDialog.vue";
|
|
|
+import DowButton from "../../components/button.vue";
|
|
|
+import Sort from "../../components/sort.vue";
|
|
|
+import useUserStore from "@/store/modules/message";
|
|
|
+import PageInfo from "@/api/types/agreementTypes";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
|
|
|
-const myRoute = useRoute()
|
|
|
-const myRouter = useRouter()
|
|
|
-
|
|
|
-let detailData = ref(undefined)
|
|
|
-
|
|
|
-const initDetail = () => {
|
|
|
- api.logApi.selectById(myRoute.query.id).then((res: any) => {
|
|
|
- if(res.code == 200) {
|
|
|
- detailData.value = res.data
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+const router = useRouter();
|
|
|
+const userStore = useUserStore();
|
|
|
+const isShow = ref(false);
|
|
|
+
|
|
|
+const isSort = ref();
|
|
|
+const pageInfo = ref({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ sizes: [10, 20, 30, 40, 50],
|
|
|
+ total: 0,
|
|
|
+});
|
|
|
+const listOption = reactive({
|
|
|
+ rowKey: "receivableDelId",
|
|
|
+ //查询
|
|
|
+ queryFormFields: [],
|
|
|
+});
|
|
|
+
|
|
|
+const selectedKeys = ref([]);
|
|
|
+const selected = function (val) {
|
|
|
+ selectedKeys.value = val;
|
|
|
+};
|
|
|
+
|
|
|
+let label = ["保险公司", "应收", "已开票", "已结算"];
|
|
|
+const tableHeaderColor = ({ row, column, rowIndex, columnIndex }) => {
|
|
|
+ if (!label.includes(column.label)) {
|
|
|
+ return {
|
|
|
+ backgroundColor: "#FFF",
|
|
|
+ };
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+//查询数据
|
|
|
+const phone = JSON.parse(localStorage.getItem("userInfo")).username;
|
|
|
+
|
|
|
+//获取默认选择数据
|
|
|
+const queryFormRes = ref();
|
|
|
+const routerKey = ref("receivableDataDetail");
|
|
|
+const defaultList = ref();
|
|
|
+const pageHiddenList = ref([]); //页面不显示的数据
|
|
|
+const initDefaultList = async () => {
|
|
|
+ const { data } = await api.manageApi.getSearchDefaultList({
|
|
|
+ routerKey: routerKey.value,
|
|
|
+ userId: phone,
|
|
|
+ });
|
|
|
+ listOption.queryFormFields = data.filter((e) => e.showFlag);
|
|
|
+
|
|
|
+ pageHiddenList.value = data.filter((e) => !e.showFlag);
|
|
|
+ defaultList.value = data.map((e) => e.id);
|
|
|
+ selectedKeys.value = defaultList.value;
|
|
|
+ queryFormRes.value = queryFormRef.value?.initDefaultSaveForm();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+
|
|
|
+//删除
|
|
|
+const filterDialogRef = ref();
|
|
|
+const delSelect = (id) => {
|
|
|
+ listOption.queryFormFields = listOption.queryFormFields.filter(
|
|
|
+ (item) => item.id != id
|
|
|
+ );
|
|
|
+ filterDialogRef.value.initList(
|
|
|
+ [...listOption.queryFormFields, ...pageHiddenList.value],
|
|
|
+ defaultList.value
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+//打开dialogShow
|
|
|
+const dialogShow = function () {
|
|
|
+ isShow.value = true;
|
|
|
+ filterDialogRef.value.initList(
|
|
|
+ [...listOption.queryFormFields, ...pageHiddenList.value],
|
|
|
+ defaultList.value
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
+//确定
|
|
|
+const queryFormRef = ref();
|
|
|
+const filterSure = (item, index) => {
|
|
|
+ isShow.value = false;
|
|
|
+ const secondGroupIds = item.list.map((item) => item.id);
|
|
|
+ const oldList = listOption.queryFormFields.filter((item) =>
|
|
|
+ secondGroupIds.includes(item.id)
|
|
|
+ );
|
|
|
+ const firstGroupIds = listOption.queryFormFields.map((item) => item.id);
|
|
|
+ let newList = item.list.filter((item) => !firstGroupIds.includes(item.id));
|
|
|
+
|
|
|
+ //过滤掉默认不显示的数据
|
|
|
+ const hiddenList = new Set(pageHiddenList.value.map((item) => item.id));
|
|
|
+ const filterList = newList.filter((item) => !hiddenList.has(item.id));
|
|
|
+
|
|
|
+ listOption.queryFormFields = [...oldList, ...filterList];
|
|
|
+ queryFormRef.value?.initDefaultSaveForm();
|
|
|
+ selectedKeys.value = item.list.filter((item) => item.id);
|
|
|
+};
|
|
|
+
|
|
|
+const globalSortKey = ref("");
|
|
|
+const globalSortOrder = ref<"asc" | "desc">("asc");
|
|
|
+// 处理子组件传递的排序更新
|
|
|
+const handleSortUpdate = (sortInfo: {
|
|
|
+ key: string;
|
|
|
+ order: string;
|
|
|
+ name: string;
|
|
|
+}) => {
|
|
|
+ globalSortKey.value = sortInfo.key;
|
|
|
+ globalSortOrder.value = sortInfo.order;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+
|
|
|
+//查询
|
|
|
+const query = (item) => {
|
|
|
+ queryFormRes.value = item;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+
|
|
|
+//数据查询
|
|
|
+const tableData = ref([
|
|
|
+ {
|
|
|
+ insuranceCompany: "华泰财险",
|
|
|
+ region: "华泰财险",
|
|
|
+ receivableTotal: "32,799,333.89",
|
|
|
+ receivableServiceFee: "997,993.89",
|
|
|
+ receivableFollowFee: "329,333.89",
|
|
|
+ uninvoicedTotal: "329,333.89",
|
|
|
+ uninvoicedServiceFee: "329,333.89",
|
|
|
+ uninvoicedFollowFee: "329,333.89",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ insuranceCompany: "华泰财险",
|
|
|
+ region: "华泰财险",
|
|
|
+ receivableTotal: "32,799,333.89",
|
|
|
+ receivableServiceFee: "327,333.89",
|
|
|
+ receivableFollowFee: "329,333.89",
|
|
|
+ uninvoicedTotal: "329,333.89",
|
|
|
+ uninvoicedServiceFee: "329,333.89",
|
|
|
+ uninvoicedFollowFee: "329,333.89",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ insuranceCompany: "华泰财险",
|
|
|
+ region: "华泰财险",
|
|
|
+ receivableTotal: "32,799,333.89",
|
|
|
+ receivableServiceFee: "799,333.89",
|
|
|
+ receivableFollowFee: "329,333.89",
|
|
|
+ uninvoicedTotal: "329,333.89",
|
|
|
+ uninvoicedServiceFee: "329,333.89",
|
|
|
+ uninvoicedFollowFee: "329,333.89",
|
|
|
+ },
|
|
|
+]);
|
|
|
+const queryList = async () => {
|
|
|
+ let query = { ...queryFormRes.value };
|
|
|
+ const { data } = await api.manageApi.companyDataManageDetailPageList({
|
|
|
+ pageNo: pageInfo.value.pageNum,
|
|
|
+ pageSize: pageInfo.value.pageSize,
|
|
|
+ routerKey: routerKey.value,
|
|
|
+ userId: phone,
|
|
|
+ orderType: globalSortKey.value
|
|
|
+ ? globalSortKey.value + " " + globalSortOrder.value
|
|
|
+ : "",
|
|
|
+ ...query,
|
|
|
+ });
|
|
|
+ // tableData.value = data.records;
|
|
|
+ // pageInfo.value.pageNum = data.current;
|
|
|
+ // pageInfo.value.pageSize = data.size;
|
|
|
+ // pageInfo.value.total = data.total;
|
|
|
+};
|
|
|
+
|
|
|
+//分页事件
|
|
|
+function getList(item: PageInfo) {
|
|
|
+ pageInfo.value.pageNum = item.pageNum;
|
|
|
+ pageInfo.value.pageSize = item.pageSize;
|
|
|
+ queryList();
|
|
|
}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- initDetail()
|
|
|
-})
|
|
|
+//导出
|
|
|
+const downloadFile = async () => {
|
|
|
+ let query = { ...queryFormRes.value };
|
|
|
+ const { data, msg } = await api.manageApi.companyDataManageDetailToTask({
|
|
|
+ pageNo: pageInfo.value.pageNum,
|
|
|
+ pageSize: pageInfo.value.pageSize,
|
|
|
+ routerKey: routerKey.value,
|
|
|
+ userId: phone,
|
|
|
+ orderType: globalSortKey.value
|
|
|
+ ? globalSortKey.value + " " + globalSortOrder.value
|
|
|
+ : "",
|
|
|
+ ...query,
|
|
|
+ });
|
|
|
+ ElMessage({
|
|
|
+ message: msg,
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ userStore.count++;
|
|
|
+};
|
|
|
|
|
|
+onMounted(() => {
|
|
|
+ initDefaultList();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.logDetail{
|
|
|
- padding: 24px;
|
|
|
- background: #FFFFFF;
|
|
|
+.log {
|
|
|
width: 100%;
|
|
|
height: calc(100vh - 120px);
|
|
|
- .title{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: flex-start;
|
|
|
- .icon{
|
|
|
- width: 30px;
|
|
|
- height: 30px;
|
|
|
- border-radius: 50%;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- background: #1A85FA;
|
|
|
- color: #FFFFFF;
|
|
|
- font-size: 20px;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
- .content{
|
|
|
- height: calc(100% - 120px);
|
|
|
- overflow: hidden;
|
|
|
- p{
|
|
|
- text-align: center;
|
|
|
- background: #F0F0F0;
|
|
|
- margin: 0;
|
|
|
- padding: 16px 0;
|
|
|
- }
|
|
|
- .list{
|
|
|
- height: calc(100% - 80px);
|
|
|
- overflow-y: auto;
|
|
|
- overflow-x: hidden;
|
|
|
- .list-item{
|
|
|
- margin: 14px 0;
|
|
|
- padding: 0 20px;
|
|
|
- display: flex;
|
|
|
- }
|
|
|
- }
|
|
|
+ background: #ffffff;
|
|
|
+ padding: 24px;
|
|
|
+ overflow-y: auto;
|
|
|
+ .query-btn {
|
|
|
+ margin-left: 20px;
|
|
|
}
|
|
|
- :deep(.el-descriptions) {
|
|
|
- width: 50%;
|
|
|
+ .btn-box {
|
|
|
+ padding-bottom: 15px;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ border-bottom: 1px solid #eeeeee;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
|
}
|
|
|
+:deep(.caret-wrapper) {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
</style>
|