| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <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="getList"></fromRow>
- </div>
- <standard-table
- bordered
- :columns="columns"
- :dataSource="tableList"
- :pagination="pagination"
- @clear="onClear"
- @change="onChange"
- :loading="loading"
- >
- <div slot="qutationCount" slot-scope="{ text }">
- {{ text + "条" }}
- </div>
- <div slot="quotationRate" slot-scope="{ text }">
- {{ (text * 100).toFixed(2) + "%" }}
- </div>
- </standard-table>
- </div>
- </template>
-
- <script>
- import StandardTable from "@/components/table/StandardTable";
- import fromRow from "@/components/form/FormRow";
- import mixin from "../../minins/mixin";
- const columns = [
- {
- title: "归属机构",
- dataIndex: "deptName",
- // scopedSlots: { customRender: "qutationCount" },
- },
- {
- 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: { customRender: "quotationRate" },
- },
- {
- title: "承保率",
- dataIndex: "closeRate",
- scopedSlots: { customRender: "quotationRate" },
- },
- {
- title: "核保通过率",
- dataIndex: "contributionRate",
- scopedSlots: { customRender: "quotationRate" },
- },
- ];
- 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,
- 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: [],
- };
- },
- watch: {
- "formState.days"() {
- this.getList();
- },
- },
- mounted() {
- this.getList();
- // setTimeout(() => {
- // }, 1000);
- },
- methods: {
- handleFinish() {
- //
- },
- getList(val) {
- this.loading = true;
- this.$API.task
- .getTaskStatistics({
- pageNum: this.pagination.current,
- pageSize: this.pagination.defaultPageSize,
- ...this.formState,
- ...val,
- })
- .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("您清空了勾选的所有行");
- },
- onChangeTime(val) {
- // console.log(val);
- this.formState.beginDate = val[0];
- this.formState.endDate = val[1];
- this.formState.days = undefined;
- this.getList();
- },
- onChange(pagination, filters, sorter, { currentDataSource }) {
- // this.$message.info('表格状态改变了')
- console.log(pagination, filters, sorter, { currentDataSource });
- this.pagination = {
- current: pagination.current,
- defaultPageSize: pagination.pageSize,
- total: pagination.total,
- };
- this.getList();
- },
- },
- };
- </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;
- }
- }
- }
- }
- </style>
|