| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658 |
- <template>
- <div class="back-line-main">
- <div class="back-line-header">
- <div class="back-line-header-title">
- <h2>代理人数据</h2>
- <div>
- <span>时间筛选</span>
- <a-range-picker
- @change="onChangeTime"
- v-model="formState.time"
- valueFormat="YYYY-MM-DD"
- >
- <a-icon slot="suffixIcon" type="calendar" />
- </a-range-picker>
- <a-radio-group
- default-value="0"
- button-style="solid"
- v-model="formState.days"
- >
- <a-radio-button
- value="1"
- @click="
- (formState.time = []),
- (formState.beginDate = ''),
- (formState.endDate = '')
- "
- >
- 当天
- </a-radio-button>
- <a-radio-button
- value="7"
- @click="
- (formState.time = []),
- (formState.beginDate = ''),
- (formState.endDate = '')
- "
- >
- 近7天
- </a-radio-button>
- <a-radio-button
- value="30"
- @click="
- (formState.time = []),
- (formState.beginDate = ''),
- (formState.endDate = '')
- "
- >
- 近30天
- </a-radio-button>
- </a-radio-group>
- </div>
- </div>
- <fromRow
- :formState="formState"
- @getList="getBackLinePersonnel"
- :exportExcel="true"
- @exportList="exportList"
- ></fromRow>
- </div>
- <standard-table
- bordered
- :columns="columns"
- :dataSource="tableList"
- :pagination="pagination"
- @clear="onClear"
- @change="onChange"
- :loading="loading"
- :scroll="{ x: 2200 }"
- >
- <div slot="qutationCount" slot-scope="{ text }">
- {{ text + "条" }}
- </div>
- <div slot="quotationRate" slot-scope="{ text }">
- {{ (text * 100).toFixed(2) + "%" }}
- </div>
- <span slot="title_slot">
- 报价率
- <a-tooltip
- placement="topLeft"
- title="报价中 / 报价数"
- arrow-point-at-center
- >
- <a-icon type="question-circle" />
- </a-tooltip>
- </span>
- <span slot="title_slot2">
- 承保率
- <a-tooltip
- placement="topLeft"
- title="承保数 / 报价数"
- arrow-point-at-center
- >
- <a-icon type="question-circle" />
- </a-tooltip>
- </span>
- <span slot="title_slot3">
- 核保通过率
- <a-tooltip
- placement="topLeft"
- title="(承保数+ 核保数) / 报价数"
- arrow-point-at-center
- >
- <a-icon type="question-circle" />
- </a-tooltip>
- </span>
- <div slot="operation" slot-scope="{ record }">
- <a-button type="link" @click="watchMessage(record)">详情</a-button>
- </div>
- </standard-table>
- <a-drawer
- :width="1300"
- :placement="'right'"
- :visible="visible"
- :headerStyle="headerStyle"
- :closable="false"
- >
- <template slot="title">
- <div class="custom-title" :style="headerStyle">
- <div>
- <a-icon type="close" @click="onClose" />
- 渠道详情
- </div>
- <div>
- <a-button style="margin-right: 8px" @click="onClose">取消</a-button>
- <a-button type="primary" @click="onClose">确认</a-button>
- </div>
- </div>
- <div>
- <dl>
- <dt>
- <img
- v-show="detailsObj.logo"
- :src="process + detailsObj.logo"
- alt=""
- />
- <img
- v-if="!detailsObj.logo && detailsObj.sex == 'M'"
- src="../../assets/img/man.png"
- alt=""
- />
- <img
- v-if="!detailsObj.logo && detailsObj.sex == 'F'"
- src="../../assets/img/woman.png"
- alt=""
- />
- <img
- v-if="!detailsObj.logo && !detailsObj.sex"
- src="../../assets/img/man.png"
- alt=""
- />
- </dt>
- <dd>
- <p>
- <span> {{ detailsObj.userName }} </span>({{
- detailsObj.userId
- }})
- </p>
- <p>归属机构:{{ detailsObj.deptName }}</p>
- </dd>
- </dl>
- </div>
- <standard-table
- bordered
- :columns="columns1"
- :dataSource="detailList"
- :pagination="pageInfo"
- @change="detailsChange"
- :loading="loading"
- :scroll="{ x: 2200 }"
- >
- <div slot="qutationCount" slot-scope="{ text }">
- {{ text + "条" }}
- </div>
- <div slot="quotationRate" slot-scope="{ text }">
- {{ (text * 100).toFixed(2) + "%" }}
- </div>
- <span slot="title_slot">
- 报价率
- <a-tooltip
- placement="topLeft"
- title="报价中 / 报价数"
- arrow-point-at-center
- >
- <a-icon type="question-circle" />
- </a-tooltip>
- </span>
- <span slot="title_slot2">
- 承保率
- <a-tooltip
- placement="topLeft"
- title="承保数 / 报价数"
- arrow-point-at-center
- >
- <a-icon type="question-circle" />
- </a-tooltip>
- </span>
- <span slot="title_slot3">
- 核保通过率
- <a-tooltip
- placement="topLeft"
- title="(承保数+ 核保数) / 报价数"
- arrow-point-at-center
- >
- <a-icon type="question-circle" />
- </a-tooltip>
- </span>
- </standard-table>
- </template>
- </a-drawer>
- </div>
- </template>
-
- <script>
- import StandardTable from "@/components/table/StandardTable";
- import mixin from "../../minins/mixin";
- const columns = [
- {
- title: "二级机构",
- dataIndex: "provinceName",
- },
- {
- title: "三级机构",
- dataIndex: "cityName",
- },
- {
- title: "四级机构",
- dataIndex: "districtName",
- },
- {
- title: "五级机构",
- dataIndex: "storeDeptName",
- },
- {
- title: "归属机构",
- dataIndex: "deptName",
- // scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "管理人",
- dataIndex: "leaderName",
- },
- {
- title: "业务员姓名",
- dataIndex: "userName",
- // scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "业务员工号",
- dataIndex: "userId",
- // scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "报价中",
- dataIndex: "qutationCount",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "待审核",
- dataIndex: "auditOrder",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "已核保待缴费",
- dataIndex: "underwritingCount",
- scopedSlots: { customRender: "qutationCount" },
- // sorter: true,
- needTotal: true,
- },
- {
- title: "已承保",
- dataIndex: "qutationInsureCount",
- needTotal: true,
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "核保退回",
- dataIndex: "underwritingReturn",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- // title: "报价率",
- dataIndex: "quotationRate",
- scopedSlots: { title: "title_slot", customRender: "quotationRate" },
- },
- {
- // title: "承保率",
- dataIndex: "closeRate",
- scopedSlots: { title: "title_slot2", customRender: "quotationRate" },
- },
- {
- // title: "核保通过率",
- dataIndex: "contributionRate",
- scopedSlots: { title: "title_slot3", customRender: "quotationRate" },
- },
- {
- title: "操作",
- dataIndex: "operation",
- fixed: "right",
- width: 100,
- scopedSlots: { customRender: "operation" },
- },
- ];
- const columns1 = [
- {
- title: "保险公司",
- dataIndex: "inscompany",
- },
- {
- title: "报价中(PC)",
- dataIndex: "pcOrderSource",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "报价中(APP)",
- dataIndex: "appOrderSource",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "待审核",
- dataIndex: "auditOrder",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "已核保待缴费",
- dataIndex: "underwritingCount",
- scopedSlots: { customRender: "qutationCount" },
- // sorter: true,
- needTotal: true,
- },
- {
- title: "已承保",
- dataIndex: "qutationInsureCount",
- needTotal: true,
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "核保退回",
- dataIndex: "underwritingReturn",
- scopedSlots: { customRender: "qutationCount" },
- },
- {
- // title: "报价率",
- dataIndex: "quotationRate",
- scopedSlots: { title: "title_slot", customRender: "quotationRate" },
- },
- {
- // title: "承保率",
- dataIndex: "closeRate",
- scopedSlots: { title: "title_slot2", customRender: "quotationRate" },
- },
- {
- dataIndex: "contributionRate",
- scopedSlots: { title: "title_slot3", customRender: "quotationRate" },
- },
- ];
- import fromRow from "@/components/form/FormRow";
- import moment from "moment";
- export default {
- components: {
- StandardTable,
- fromRow,
- },
- mixins: [mixin],
- data() {
- return {
- formState: {
- whole: undefined,
- cityId: undefined,
- countyId: undefined,
- houseId: undefined,
- provinceId: undefined,
- days: undefined,
- time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")],
- endDate: moment().format("YYYY-MM-DD"),
- beginDate: moment().format("YYYY-MM-DD"),
- },
- backLinePersonnel: {},
- columns: columns,
- columns1: columns1,
- companyList: [],
- tableList: [],
- pagination: {
- current: 1,
- defaultPageSize: 10,
- total: 0,
- pagesize0ptions: ["10", "20", "30", "50", "100"],
- hideOnSinglePage: false,
- showQuickJumper: true, //
- showSizeChanger: true, //是否可以改变pagesize
- showTotal: (total) => `共 ${total} 条数据`,
- },
- loading: false,
- wholeList: [],
- provinceList: [],
- cityList: [],
- areaList: [],
- storeList: [],
- process: process.env.VUE_APP_API_BASE_URL,
- visible: false,
- headerStyle: {
- display: "flex",
- "align-items": "center",
- "justify-content": "space-between",
- },
- pageInfo: {
- current: 1,
- defaultPageSize: 10,
- total: 0,
- pagesize0ptions: ["10", "20", "30", "50", "100"],
- hideOnSinglePage: false,
- showQuickJumper: true, //
- showSizeChanger: true, //是否可以改变pagesize
- showTotal: (total) => `共 ${total} 条数据`,
- },
- detailsObj: {},
- detailList: [],
- };
- },
- watch: {
- "formState.days"() {
- this.getBackLinePersonnel();
- },
- },
- mounted() {
- this.getBackLinePersonnel();
- // setTimeout(() => {
- // }, 1000);
- },
- methods: {
- watchMessage(item) {
- //
- this.detailsObj = { ...item };
- this.visible = true;
- this.getDetailsList(item);
- },
- getDetailsList(item) {
- this.detailList = [];
- this.$API.task
- .getChannelAgentDetails({
- pageNum: this.pageInfo.current,
- pageSize: this.pageInfo.defaultPageSize,
- userId: item.userId,
- beginDate: this.formState.beginDate,
- endDate: this.formState.endDate,
- })
- .then((res) => {
- if (res.data.code === 200) {
- this.detailList = res.data.data.records;
- this.pageInfo = {
- current: res.data.data.current,
- defaultPageSize: res.data.data.size,
- total: res.data.data.total,
- };
- }
- });
- },
- onClose() {
- //
- this.visible = false;
- },
- exportList() {
- delete this.formState.time;
- this.$API.task
- .exportAgentlList({
- ...this.formState,
- })
- .then((res) => {
- if (res.data.code == 200) {
- let url = this.process + res.data.data; // 3.创建一个临时的url指向blob对象
- let a = document.createElement("a");
- a.href = url;
- a.download = "导出文件.xlsx";
- a.click();
- window.URL.revokeObjectURL(url);
- } else {
- this.$message.error(res.msg);
- }
- });
- },
- onChangeTime(val) {
- // console.log(val);
- this.formState.beginDate = val[0];
- this.formState.endDate = val[1];
- this.formState.days = undefined;
- this.getBackLinePersonnel();
- },
- handleFinish() {
- //
- },
- // wholeHandleChange() {
- // this.getProvinceList(this.formState.whole);
- // },
- // provinceHandleChange() {
- // this.getCityList(this.formState.provinceId);
- // },
- // cityHandleChange() {
- // this.getAreaList(this.formState.cityId);
- // },
- // countyHandleChange() {
- // this.getStoreList(this.formState.countyId);
- // },
- getBackLinePersonnel() {
- this.loading = true;
- this.$API.task
- .getAgentList({
- pageNum: this.pagination.current,
- pageSize: this.pagination.defaultPageSize,
- ...this.formState,
- })
- .then((res) => {
- if (res.data.code === 200) {
- this.loading = false;
- this.tableList = res.data.data.records;
- this.pagination = {
- current: res.data.data.current,
- defaultPageSize: res.data.data.size,
- total: res.data.data.total,
- };
- }
- });
- },
- onClear() {
- this.$message.info("您清空了勾选的所有行");
- },
- onChange(pagination) {
- // this.$message.info('表格状态改变了')
- this.pagination = {
- current: pagination.current,
- defaultPageSize: pagination.pageSize,
- total: pagination.total,
- };
- this.getBackLinePersonnel();
- },
- detailsChange(pageInfo) {
- this.pageInfo = {
- current: pageInfo.current,
- defaultPageSize: pageInfo.pageSize,
- total: pageInfo.total,
- };
- this.getDetailsList(this.detailsObj);
- },
- },
- };
- </script>
- <style lang='less' scoped>
- .back-line-main {
- display: flex;
- flex-direction: column;
- .back-line-header {
- padding: 15px;
- box-sizing: border-box;
- .back-line-header-title {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-bottom: 15px;
- border-bottom: 1px solid #f0f0f0;
- box-sizing: border-box;
- h2 {
- margin: 0;
- }
- > div {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- }
- span {
- display: block;
- margin-right: 15px;
- }
- /deep/.ant-calendar-picker {
- width: 300px;
- }
- }
- }
- > div {
- // height: 152px;
- background: #fff;
- .ant-form {
- display: flex;
- > .ant-form-item {
- flex: 1;
- /deep/.ant-form-item-control-wrapper {
- width: 100%;
- }
- }
- }
- .form-item-search {
- // display: flex;
- // justify-content: flex-end;
- /deep/ .ant-form-item-control {
- display: flex;
- justify-content: flex-end;
- }
- }
- }
- }
- /deep/.ant-drawer-title {
- width: 100%;
- }
- /deep/.custom-title {
- display: flex;
- > i {
- cursor: pointer;
- }
- }
- dl {
- width: 346px;
- height: 78px;
- background: #ffffff;
- border-radius: 4px 4px 4px 4px;
- border: 1px solid #f87f2c;
- display: flex;
- margin-left: 15px;
- span {
- color: #f87f2c;
- }
- dt {
- width: 64px;
- height: 100%;
- background: #fff9f7;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 4px 0 0 4px;
- img {
- width: 40px;
- height: 40px;
- }
- }
- dd {
- padding: 8px 0;
- box-sizing: border-box;
- margin-left: 10px;
- p {
- margin: 0;
- }
- p:first-child {
- color: #aaa;
- }
- display: flex;
- flex-direction: column;
- // align-items: ;
- justify-content: space-between;
- }
- }
- </style>
|