| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552 |
- <template>
- <div class="back-line-main">
- <div class="back-line-header">
- <div class="back-line-header-title">
- <h2>保险公司</h2>
- <div class="area-city">
- <div>
- 省份:<a-select
- style="width: 200px"
- @change="getList()"
- v-model="formState.provinceId"
- allowClear
- >
- <a-select-option
- v-for="item in areaList"
- :key="item.areaCode"
- :label="item.areaCname"
- :value="item.areaCode"
- >
- {{ item.areaCname }}
- </a-select-option>
- </a-select>
- </div>
- <div>
- <span>城市:</span>
- <a-select
- style="width: 200px"
- v-model="formState.cityId"
- @change="getList()"
- allowClear
- >
- <a-select-option
- v-for="item in cityList"
- :key="item.areaCode"
- :label="item.areaCname"
- :value="item.areaCode"
- >
- {{ item.areaCname }}
- </a-select-option>
- </a-select>
- </div>
- </div>
- <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>
- <a-row class="insurer-list">
- <a-button shape="circle" icon="left" class="left btn" @click="prev">
- </a-button>
- <a-col
- :span="5"
- v-for="item in companyList.slice(
- (this.companyPage.page - 1) * this.companyPage.size,
- this.companyPage.size * this.companyPage.page
- )"
- :key="item.insuranceCompanyId"
- @click="chooseInsurer(item)"
- >
- <div
- class="insurer"
- :class="companyId === item.insuranceCompanyId ? 'on' : 'insurer'"
- >
- <div>
- <img :width="50" :height="50" :src="item.logo" />
- </div>
- <div>
- <p>{{ item.namesimple }}</p>
- <!-- <p>保险公司</p> -->
- </div>
- </div>
- </a-col>
- <a-button shape="circle" icon="right" class="right btn" @click="next">
- </a-button>
- </a-row>
- </div>
- <div class="btn-opreation">
- <a-button type="primary" @click="exportList">导出</a-button>
- </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 mixin from "../../minins/mixin";
- const columns = [
- {
- title: "保险公司",
- dataIndex: "insuranceCompanyName",
- // scopedSlots: { customRender: "qutationCount" },
- },
- {
- title: "合作公司",
- dataIndex: "partnerCompaniesName",
- // 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: "contributionRate",
- // scopedSlots: { customRender: "quotationRate" },
- // },
- // {
- // title: "核保通过率",
- // dataIndex: "passingRate",
- // scopedSlots: { customRender: "quotationRate" },
- // },
- ];
- import moment from "moment";
- export default {
- components: {
- StandardTable,
- },
- mixins: [mixin],
- data() {
- return {
- formState: {
- cityId: 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: [],
- companyPage: {
- page: 1,
- size: 15,
- total: 0,
- perPage: 0,
- },
- companyId: "",
- process: process.env.VUE_APP_API_BASE_URL,
- city: [],
- };
- },
- watch: {
- "formState.days"() {
- this.getBackLinePersonnel();
- },
- "formState.provinceId"(val) {
- console.log(val);
- if (val != undefined) {
- this.cityList = [...this.city];
- } else {
- this.formState.cityId = undefined;
- this.cityList = [];
- }
- },
- },
- mounted() {
- this.getBackLinePersonnel();
- this.getAreaList();
- // setTimeout(() => {
- // }, 1000);
- this.getCompanyList();
- },
- methods: {
- getList() {
- this.pagination.current = 1;
- this.getBackLinePersonnel();
- },
- getAreaList() {
- this.$API.personnel.getAreaList().then((res) => {
- // console.log(res);
- if (res.data.code === 200) {
- let arr = [];
- res.data.data.map((item) => {
- if (item.areaCname === "山西省") {
- arr.push(item);
- }
- });
- this.areaList = [...arr];
- // this.cityList = [...arr[0].child];
- this.city = [...arr[0].child];
- }
- });
- },
- exportList() {
- delete this.formState.time;
- this.$API.task
- .exportInsurancelList({
- ...this.formState,
- })
- .then((res) => {
- console.log(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);
- }
- });
- },
- prev() {
- if (this.companyPage.page != 1) this.companyPage.page -= 1;
- },
- next() {
- this.companyPage.page += 1;
- // this.getCompanyList();
- if (this.companyPage.page >= this.companyPage.perPage) {
- this.companyPage.page = this.companyPage.perPage;
- }
- // console.log(this.companyPage.page);
- },
- chooseInsurer(item) {
- this.companyId = item.insuranceCompanyId;
- // // console.log(item,this.companyId)
- this.getBackLinePersonnel();
- },
- onChangeTime(val) {
- // console.log(val);
- this.formState.beginDate = val[0];
- this.formState.endDate = val[1];
- this.pagination.current = 1;
- this.formState.days = undefined;
- this.getBackLinePersonnel();
- },
- getCompanyList() {
- this.$API.agreement
- .getCompanyList({
- areaId: "",
- deptId: "",
- partnerCompaniesId: "",
- warningDay: "",
- warningStatus: "",
- })
- .then((res) => {
- if (res.data.code === 200) {
- this.companyList = res.data.data;
- this.companyPage.perPage = Math.ceil(
- res.data.data.length / this.companyPage.size
- );
- // console.log(this.companyPage);
- this.companyPage.total = res.data.data.length;
- }
- });
- },
- handleFinish() {
- //
- },
- getBackLinePersonnel() {
- this.loading = true;
- this.$API.task
- .getCompanyList({
- pageNum: this.pagination.current,
- pageSize: this.pagination.defaultPageSize,
- ...this.formState,
- companyId: this.companyId,
- })
- .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,
- };
- } else {
- this.loading = false;
- this.tableList = [];
- this.$message.error(res.data.msg);
- }
- });
- },
- onClear() {
- this.$message.info("您清空了勾选的所有行");
- },
- 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.getBackLinePersonnel();
- },
- },
- };
- </script>
- <style lang='less' scoped>
- .back-line-main {
- display: flex;
- flex-direction: column;
- .back-line-header {
- padding: 15px;
- box-sizing: border-box;
- position: relative;
- // padding: 0px 35px;
- box-sizing: border-box;
- .insurer-list {
- // display:flex;
- // flex-wrap: wrap;
- width: 100%;
- // justify-content: stretch;
- position: relative;
- padding: 0px 35px;
- box-sizing: border-box;
- .btn {
- position: absolute;
- top: 50%;
- transform: translate(-50%, -50%);
- z-index: 999;
- }
- .btn.left {
- left: 20px;
- }
- .btn.right {
- right: -10px;
- }
- .ant-col {
- height: 90px;
- flex: none;
- // width: 18%;
- padding: 5px 10px;
- margin-bottom: 15px;
- box-sizing: border-box;
- width: 20%;
- }
- .insurer {
- width: 100%;
- height: 100%;
- background: #fff;
- border-radius: 3px;
- display: flex;
- align-items: center;
- // justify-content: space-between;
- padding: 0 15px;
- box-shadow: 0px 2px 8px 0px rgba(42, 85, 229, 0.15);
- border-radius: 8px 8px 8px 8px;
- border: 2px solid rgba(255, 255, 255, 0.2);
- > a-image {
- display: block;
- }
- p {
- margin: 0;
- }
- > div:first-child {
- background: #000;
- width: 50px;
- height: 50px;
- }
- > div:last-child {
- padding-left: 30px;
- box-sizing: border-box;
- font-size: 16px;
- font-style: "PingFang SC-Medium";
- color: #181818;
- }
- }
- .on {
- background: rgb(234, 238, 253);
- }
- }
- .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.area-city {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- > div {
- // flex: 1;
- display: flex;
- align-items: center;
- > span {
- margin-left: 10px;
- }
- }
- }
- > div:last-child {
- flex: none;
- 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;
- }
- }
- }
- }
- .btn-opreation {
- display: flex;
- justify-content: flex-end;
- padding: 0 15px;
- box-sizing: border-box;
- }
- </style>
|