|
@@ -0,0 +1,282 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <div class="title-container">
|
|
|
+ <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
|
+ </div>
|
|
|
+ <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
|
|
|
+ <template slot="left">
|
|
|
+ <el-date-picker
|
|
|
+ style="margin-right: 20px;float: left;"
|
|
|
+ v-model="selectDate"
|
|
|
+ type="daterange"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ format="yyyy 年 MM 月 dd 日"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ align="right"
|
|
|
+ ></el-date-picker>
|
|
|
+ <el-input v-model="listQuery.orderId" placeholder="订单号" clearable style="width: 200px;float: left;"></el-input>
|
|
|
+ <el-input v-model="listQuery.name" placeholder="项目名称" clearable style="margin-left: 20px;width: 200px;float: left;"></el-input>
|
|
|
+ <el-input v-model="listQuery.reportNo" placeholder="报告号" clearable style="margin-left: 20px;width: 200px;float: left;"></el-input>
|
|
|
+ <el-select clearable v-model="listQuery.commissionRateId" placeholder="提成类型" style="margin-left: 20px;width: 200px;float: left;">
|
|
|
+ <el-option v-for="(c,id) in cates" :value="c.id" :label="c.name">{{ c.name }}</el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select clearable v-model="listQuery.declareType" placeholder="申报类型" style="margin-left: 20px;width: 200px;float: left;">
|
|
|
+ <el-option :value="true" label="产品">产品</el-option>
|
|
|
+ <el-option :value="false" label="订单">订单</el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select clearable v-model="listQuery.declareResult" placeholder="审核状态" style="margin-left: 20px;width: 200px;float: left;">
|
|
|
+ <el-option value="待申报" label="待申报"></el-option>
|
|
|
+ <el-option value="审核中" label="审核中"></el-option>
|
|
|
+ <el-option value="审核通过" label="审核通过"></el-option>
|
|
|
+ <el-option value="审核拒绝" label="审核拒绝"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button class="filter-item" style="margin-left:20px;float: left;" type="primary" @click="searchList" round>搜索</el-button>
|
|
|
+ <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置</el-button>
|
|
|
+ <el-button class="filter-item" round type="info" @click="majorEvaluateDeclarePageByDepartmentExport()" :disabled="exportStatus">导出</el-button>
|
|
|
+ </template>
|
|
|
+ <parentTable :data="pageData.records" slot="table" style="width: 100%;">
|
|
|
+ <el-table-column label="订单号" width="150" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.orderId }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目名称" width="160" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.name?row.name:row.orderName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="报告号" width="200" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.reportNo?row.reportNo:'--' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="产品类型" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.production }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="对象类别" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.businessObjectType }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="委托人" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.bailor }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="联系人" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.bailorContactName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="委托人电话" width="150" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.bailorContactTel }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="客户名称" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.clienteleName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="业务来源" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.clienteleSubName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="负责人" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.principal }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="下单时间" width="110" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.orderCreated}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="提成类型" width="150" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span style="color:red">{{ row.commissionType?row.commissionType:'--'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="申报类型" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span style="font-weight: bold;">{{ row.reportNo?'产品':'订单'}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="审核状态" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-tag v-if="row.declareResult == null" type="info" effect="plain">待申报</el-tag>
|
|
|
+ <el-tag v-else-if="row.declareResult == '审核中'" type="warning" effect="plain">审核中</el-tag>
|
|
|
+ <el-tag v-else-if="row.declareResult == '审核通过'" type="success" effect="plain">通过</el-tag>
|
|
|
+ <el-tag v-else-if="row.declareResult == '审核拒绝'" type="danger" effect="plain">拒绝</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </parentTable>
|
|
|
+ </y-page-list-layout>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import YPageListLayout from '@/components/YPageListLayout'
|
|
|
+import Breadcrumb from '@/components/Breadcrumb'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'declareMajorEvaluate',
|
|
|
+ components: {
|
|
|
+ Breadcrumb,
|
|
|
+ YPageListLayout,
|
|
|
+ },
|
|
|
+ filters: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ rules: {
|
|
|
+ commissionRateId: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '业务分类不能为空',
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ pageData: { records: [] },
|
|
|
+ // 时间
|
|
|
+ selectDate: [],
|
|
|
+ listQuery: {
|
|
|
+ // 开始时间
|
|
|
+ startTime: null,
|
|
|
+ // 结束时间
|
|
|
+ endTime: null,
|
|
|
+ page: 1,
|
|
|
+ size: 10,
|
|
|
+ descs: 'id',
|
|
|
+ },
|
|
|
+ cates: [],
|
|
|
+ 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])
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ exportStatus: true,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.selectDate.push(this.getDefaultStartDate())
|
|
|
+ this.selectDate.push(this.getDefaultEndDate())
|
|
|
+ if (this.$route.query.name) {
|
|
|
+ this.listQuery.name = this.$route.query.name
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$route.query.reportNo) {
|
|
|
+ this.listQuery.reportNo = this.$route.query.reportNo
|
|
|
+ }
|
|
|
+
|
|
|
+ this.getList()
|
|
|
+ this.getMajorEvaluateCate()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getDefaultStartDate() {
|
|
|
+ let currentDate = new Date()
|
|
|
+ let currentYear = currentDate.getFullYear()
|
|
|
+ var currentMonth = String(currentDate.getMonth()).padStart(2, '0')
|
|
|
+ if (currentMonth == '00') {
|
|
|
+ currentYear = currentYear - 1
|
|
|
+ currentMonth = 12
|
|
|
+ }
|
|
|
+ return currentYear + '-' + currentMonth + '-' + '23'
|
|
|
+ },
|
|
|
+ getDefaultEndDate() {
|
|
|
+ const currentDate = new Date()
|
|
|
+ const currentYear = currentDate.getFullYear()
|
|
|
+ var currentMonth = String(currentDate.getMonth() + 1).padStart(2, '0')
|
|
|
+ return currentYear + '-' + currentMonth + '-' + '22'
|
|
|
+ },
|
|
|
+ resetSearch() {
|
|
|
+ this.exportStatus = true
|
|
|
+ this.selectDate = []
|
|
|
+ this.selectDate.push(this.getDefaultStartDate())
|
|
|
+ this.selectDate.push(this.getDefaultEndDate())
|
|
|
+ this.$router.push({ query: {} })
|
|
|
+ this.orderDate = ''
|
|
|
+ this.listQuery = {
|
|
|
+ current: 1,
|
|
|
+ size: 10,
|
|
|
+ descs: 'id',
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ searchList() {
|
|
|
+ this.listQuery.current = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ getList() {
|
|
|
+ if (this.selectDate) {
|
|
|
+ this.listQuery.startTime = this.selectDate[0] + ' 00:00:00'
|
|
|
+ this.listQuery.endTime = this.selectDate[1] + ' 23:59:59'
|
|
|
+ }
|
|
|
+ this.$api.commissonDeclare.majorEvaluateDeclarePageByDepartment(this.listQuery).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.pageData = res.data
|
|
|
+ if (this.listQuery.startTime !== null && this.listQuery.endTime !== null && res.data.records.length > 0) {
|
|
|
+ this.exportStatus = false
|
|
|
+ } else {
|
|
|
+ this.exportStatus = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getMajorEvaluateCate() {
|
|
|
+ this.$api.businessCommissionRate.cateList('MAJOR_BUSINESS', 'EVALUATOR').then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.cates = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ majorEvaluateDeclarePageByDepartmentExport() {
|
|
|
+ this.$utils.exportUtil('/commissionDeclare/major/evaluate/byDepartment/export', this.listQuery, '导出')
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+/deep/.doWarehouseClass {
|
|
|
+ border-radius: 10px;
|
|
|
+}
|
|
|
+.real-amount {
|
|
|
+ /deep/ .el-form-item__label {
|
|
|
+ color: red;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|