123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <!-- 合同统计 -->
- <template>
- <div class="contract">
- <template v-if="!annualReportVisible">
- <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
- <el-form-item label="名称">
- <el-input v-model="dataForm.customerName" placeholder="客户名称" clearable/>
- </el-form-item>
- <el-form-item>
- <el-button @click="search()">查询</el-button>
- <el-button v-if="isAuth('cus:contractCensus:info')" type="primary" @click="annualReportHandle()">年度合同统计</el-button>
- </el-form-item>
- </el-form>
- <el-table
- :data="dataList"
- border
- v-loading="dataListLoading"
- style="width: 100%;">
- <el-table-column
- label="序号"
- type="index"
- width="50"
- align="center">
- </el-table-column>
- <el-table-column
- prop="customerName"
- header-align="center"
- align="center"
- min-width="140"
- :show-tooltip-when-overflow="true"
- label="客户名称">
- </el-table-column>
- <el-table-column
- prop="bizManagerName"
- header-align="center"
- align="center"
- min-width="120"
- :show-tooltip-when-overflow="true"
- label="业务员">
- </el-table-column>
- <el-table-column
- prop="monthNum"
- header-align="center"
- align="center"
- min-width="140"
- :show-overflow-tooltip="true"
- label="本月合同总数">
- </el-table-column>
- <el-table-column
- prop="monthTotalAmount"
- header-align="center"
- align="center"
- min-width="140"
- :show-overflow-tooltip="true"
- label="本月合同总金额">
- </el-table-column>
- <el-table-column
- prop="historyNum"
- header-align="center"
- align="center"
- min-width="100"
- label="历史合同总数">
- </el-table-column>
- <el-table-column
- prop="historyTotalAmount"
- header-align="center"
- align="center"
- min-width="120"
- label="历史任务单合同总金额">
- </el-table-column>
- <el-table-column
- prop="notes"
- header-align="center"
- align="center"
- min-width="180"
- :show-overflow-tooltip="true"
- label="备注">
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="sizeChangeHandle"
- @current-change="currentChangeHandle"
- :current-page="pageIndex"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="pageSize"
- :total="totalPage"
- layout="total, sizes, prev, pager, next, jumper">
- </el-pagination>
- </template>
- <report v-if="annualReportVisible" ref="reportPage" @onChose="onChose"/>
- </div>
- </template>
- <script>
- import Report from './contract-statistics-annual-report'
- import { getStatList } from '@/api/cus'
- export default {
- name: 'contract-statistics',
- components: {
- Report
- },
- data () {
- return {
- annualReportVisible: false,
- dataForm: {},
- dataList: [],
- pageIndex: 1,
- pageSize: 10,
- totalPage: 0,
- dataListLoading: false,
- dataListSelections: []
- }
- },
- created () {
- this.getDataList()
- },
- methods: {
- onChose () {
- this.annualReportVisible = false
- },
- // 查询
- search () {
- this.pageIndex = 1
- this.getDataList()
- },
- // 获取数据列表
- getDataList () {
- this.dataListLoading = true
- let params = {
- 'current': this.pageIndex,
- 'size': this.pageSize,
- 'customerName': this.dataForm.customerName ? this.dataForm.customerName : null
- }
- getStatList(params).then(({data}) => {
- if (data && data.code === '200') {
- this.dataList = data.data.records
- this.totalPage = Number(data.data.total)
- } else {
- this.dataList = []
- this.totalPage = 0
- }
- this.dataListLoading = false
- })
- },
- // 每页数
- sizeChangeHandle (val) {
- this.pageSize = val
- this.pageIndex = 1
- this.getDataList()
- },
- // 当前页
- currentChangeHandle (val) {
- this.pageIndex = val
- this.getDataList()
- },
- // 多选
- selectionChangeHandle (val) {
- this.dataListSelections = val
- },
- // 年度合同统计
- annualReportHandle () {
- this.annualReportVisible = true
- this.$nextTick(() => {
- this.$refs.reportPage.init()
- })
- }
- }
- }
- </script>
- <style scoped>
- </style>
|