123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245 |
- <template>
- <div class="mis-pageBox">
-
- <el-container>
- <el-header height="75px">
- <el-row>
- <el-col :span="24">
- <div style="display:flex;align-items:center;">
-
- <cpsLinkageArea :queryParams="queryParams" widthValue="180px"></cpsLinkageArea>
- 关 键 字: <el-input v-model="queryParams.searchText" size="small" style="width:180px;"
- placeholder="输入关键字" clearable @keyup.enter.native="clickQuery()" />
- </div>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="22">
- <div style="height:41px;display:flex;align-items:center;">
- 操作时间: <el-date-picker v-model="dprCreatedDate" type="datetimerange"
- :picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期"
- end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" align="right"
- :default-time="['00:00:00', '23:59:59']" size="small" style="width:438px;" @change="() => {
- if (this.dprCreatedDate && this.dprCreatedDate.length > 0) {
- this.queryParams.operatorDate_Start = this.dprCreatedDate[0];
- this.queryParams.operatorDate_End = this.dprCreatedDate[1];
- } else {
- this.queryParams.operatorDate_Start = undefined;
- this.queryParams.operatorDate_End = undefined;
- }
- }">
- </el-date-picker>
- <el-button type="primary" size="small" icon="el-icon-search"
- @click="clickQuery()">查询</el-button>
- </div>
- </el-col>
- <el-col :span="2" class="list-opCol">
- <el-popover placement="top-start" title="提示" width="200" trigger="hover"
- content="数据量大时等待时间可能较长,请您耐心等待!">
- <el-button slot="reference" type="info" size="small" icon="el-icon-document"
- @click="clickExport()">导出</el-button>
- </el-popover>
-
- </el-col>
- </el-row>
- </el-header>
- <el-main>
- <tfTable :table-data="dataList" :column="columns" :for-id="false" :pagination="true"
- :currentpage="pageInfo.current" :pagesize="pageInfo.size" :total="pageInfo.tableTotal" :border="true"
- :multiple="false" :fixed="true" :isdelete="false" :is-select="false" :stripe="true"
- @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"
- @sortChange="onCustomerSortChange" />
- </el-main>
- </el-container>
- </div>
- </template>
-
- <script>
- import '@/views/mis/common/assets/styles/misStyle.scss'
- import { DateHelper, FileHelper } from '@/views/mis/common/assets/scripts/utils.js'
- import { CustomerGh } from '@/views/mis/common/api/customerManagement.js'
- import tfTable from '@/components/TableAuto/index.vue'
- import cpsLinkageArea from '@/views/mis/common/components/cps-linkageArea.vue';
- export default {
- components: { cpsLinkageArea, tfTable },
- props: ['data'],
- data() {
- return {
-
- queryParams: {
- companyBranch: undefined,
- mrArea: undefined,
- mrBook: undefined,
- searchText: undefined,
- operatorDate_Start: undefined,
- operatorDate_End: undefined
- },
- pageInfo: { current: 1, size: 20, tableTotal: 1, 'orders[0].asc': 'true', 'orders[0].column': 'operatorDate' },
- columns: [
-
-
-
-
-
- {
- label: '所属表册',
- prop: 'mrBook',
- align: 'left'
- },
- {
- label: '用户编号',
- prop: 'customerNo',
- align: 'center',
- sortable: true
- },
- {
- label: '原用户姓名',
- prop: 'oldCustomerName',
- align: 'center'
- },
- {
- label: '新用户姓名',
- prop: 'newCustomerName',
- align: 'center'
- },
- {
- label: '原联系电话',
- prop: 'oldPhone',
- align: 'center'
- },
- {
- label: '新联系电话',
- prop: 'newCustomerPhone',
- align: 'center'
- },
- {
- label: '原用户地址',
- prop: 'oldCustomerAddr',
- align: 'left'
- },
- {
- label: '新用户地址',
- prop: 'newCustomerAddr',
- align: 'left'
- },
- {
- label: '操作时间',
- prop: 'operatorDate',
- align: 'center',
- sortable: true,
- formatter: function (row, column, value, index) {
- return DateHelper.formatterTime(value);
- }
- },
- {
- label: '操作人员',
- prop: 'operatorOname',
- align: 'center'
- }
- ],
- dataList: [],
- dprCreatedDate: [],
- pickerOptions: {
- shortcuts: [{
- text: '最近一周',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- }
- }
- },
- created() {
- },
- mounted() {
- this.bindList();
- },
- methods: {
-
-
- bindList() {
-
- let params = Object.assign({}, this.pageInfo, this.queryParams);
- this.dataList = []
- CustomerGh.query(params).then((res) => {
- if (res.code !== 1) {
- this.$message.error('查询失败!')
- return
- }
-
- this.pageInfo.tableTotal = res.result.total
- this.dataList = res.result.records
- }).catch((ex) => {
- this.$message.error("查询失败!");
- }).finally(() => {
- });
- },
-
-
- clickQuery() {
- this.pageInfo.current = 1
- this.bindList()
- },
- async clickExport() {
-
- let params = Object.assign({}, this.queryParams);
- await CustomerGh.exportFile(params).then((res) => {
- FileHelper.exportExcel(res, '更名过户统计.xlsx');
- }).catch((ex) => {
- this.$message.error("导出失败!");
- }).finally(() => {
- });
- },
-
-
- handleCurrentChange(current) {
- this.pageInfo.current = current
- this.bindList()
- },
-
- handleSizeChange(size) {
- this.pageInfo.size = size
- this.bindList()
- },
-
- onCustomerSortChange(arrOrder) {
- this.pageInfo['orders[0].asc'] = arrOrder[0];
- this.pageInfo['orders[0].column'] = arrOrder[1];
- this.bindList();
- }
- }
- }
- </script>
-
|