|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
<div class="m-core">
|
|
|
<save-form
|
|
|
+ ref="searchForm"
|
|
|
:inline="true"
|
|
|
:model="searchForm"
|
|
|
@submit="search"
|
|
@@ -29,22 +30,13 @@
|
|
|
placeholder="用户姓名/手机号"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="organId" style="margin-bottom: 0;">
|
|
|
- <el-select
|
|
|
- class="multiple"
|
|
|
- style="width: 180px !important"
|
|
|
- v-model.trim="searchForm.organId"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
+ <el-form-item prop="citys" style="margin-bottom: 0;">
|
|
|
+ <el-cascader
|
|
|
+ v-model="searchForm.citys"
|
|
|
+ :options="areaList"
|
|
|
placeholder="请选择城市"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in selects.branchs"
|
|
|
- :key="index"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ :props="{ expandTrigger: 'hover', value: 'value', label: 'text'}"
|
|
|
+ @change="handleChange"></el-cascader>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="paymentStatus" style="margin-bottom: 0;">
|
|
|
<el-select
|
|
@@ -177,7 +169,8 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="buyAmount" label="缴费金额">
|
|
|
<template slot-scope="scope">
|
|
|
- <div>{{ scope.row.paymentAmount | moneyFormat }}元</div>
|
|
|
+ <div v-if="scope.row.paymentStatus !== 'NO'">{{ scope.row.paymentAmount | moneyFormat }}元</div>
|
|
|
+ <div v-else>--</div>
|
|
|
</template></el-table-column
|
|
|
>
|
|
|
<el-table-column
|
|
@@ -207,6 +200,7 @@ import { getCountCloudTeacherList } from "./api";
|
|
|
import { Export } from "@/utils/downLoadFile";
|
|
|
import cleanDeep from "clean-deep";
|
|
|
import qs from "qs";
|
|
|
+import { useCascaderAreaData } from './area'
|
|
|
import { areaQueryTree } from '../organManager/api'
|
|
|
import { api_tempDirectorTrainingDetailCampPage, api_tempDirectorTrainingDetailCampPageStat, api_tempDirectorTrainingDetailCampExport } from './api'
|
|
|
export default {
|
|
@@ -214,7 +208,12 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
name: this.$route.query.name,
|
|
|
+ areaList: [],
|
|
|
searchForm: {
|
|
|
+ citys: null,
|
|
|
+ provinceCode: null,
|
|
|
+ cityCode: null,
|
|
|
+ regionCode: null,
|
|
|
search: null,
|
|
|
paymentStatus: null,
|
|
|
},
|
|
@@ -235,6 +234,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async mounted() {
|
|
|
+ this.areaList = useCascaderAreaData()
|
|
|
// this.getArea()
|
|
|
this.getListStat()
|
|
|
this.getList();
|
|
@@ -250,10 +250,17 @@ export default {
|
|
|
},
|
|
|
async getListStat() {
|
|
|
try {
|
|
|
- const { data } = await api_tempDirectorTrainingDetailCampPageStat({
|
|
|
+ const { citys, ...more } = this.searchForm
|
|
|
+ const params = {
|
|
|
tempDirectorTrainingCampId: this.$route.query.id,
|
|
|
- ...this.searchForm
|
|
|
- });
|
|
|
+ ...more
|
|
|
+ }
|
|
|
+ if(citys.length > 0) {
|
|
|
+ params.provinceCode = citys[0]
|
|
|
+ params.cityCode = citys[1]
|
|
|
+ params.regionCode = citys[2]
|
|
|
+ }
|
|
|
+ const { data } = await api_tempDirectorTrainingDetailCampPageStat(params);
|
|
|
this.head = {
|
|
|
applyCount: data.applyCount || 0,
|
|
|
payCount: data.payCount || 0,
|
|
@@ -266,10 +273,17 @@ export default {
|
|
|
},
|
|
|
async getList() {
|
|
|
try {
|
|
|
- const res = await api_tempDirectorTrainingDetailCampPage({
|
|
|
+ const { citys, ...more } = this.searchForm
|
|
|
+ const params = {
|
|
|
tempDirectorTrainingCampId: this.$route.query.id,
|
|
|
- ...this.searchForm
|
|
|
- });
|
|
|
+ ...more
|
|
|
+ }
|
|
|
+ if(citys.length > 0) {
|
|
|
+ params.provinceCode = citys[0]
|
|
|
+ params.cityCode = citys[1]
|
|
|
+ params.regionCode = citys[2]
|
|
|
+ }
|
|
|
+ const res = await api_tempDirectorTrainingDetailCampPage(params);
|
|
|
this.tableList = res.data.rows;
|
|
|
this.rules.total = res.data.total || 0
|
|
|
} catch (e) {
|
|
@@ -282,9 +296,10 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
onReSet() {
|
|
|
- this.searchForm.search = null
|
|
|
- this.searchForm.paymentStatus = null
|
|
|
- this.search();
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.search();
|
|
|
+ });
|
|
|
},
|
|
|
async onExport() {
|
|
|
|