|
@@ -0,0 +1,277 @@
|
|
|
+<template>
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 扣费记录
|
|
|
+ </h2>
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ class="searchForm"
|
|
|
+ ref="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="reset"
|
|
|
+ :saveKey="'tenantTradeManager'"
|
|
|
+ :model.sync="searchForm"
|
|
|
+ >
|
|
|
+ <el-form-item prop="transNo">
|
|
|
+ <el-input
|
|
|
+ placeholder="课程名/编号"
|
|
|
+ clearable
|
|
|
+ type="text"
|
|
|
+ v-model.trim="searchForm.transNo"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="orgin">
|
|
|
+ <el-select
|
|
|
+ class="multiple"
|
|
|
+ v-model.trim="searchForm.orgin"
|
|
|
+ filterable
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ clearable
|
|
|
+ placeholder="请选择分部"
|
|
|
+ @change="onBranchChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in organList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item prop="orderType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.orderType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('orderType')"
|
|
|
+ placeholder="课程类型"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in tenantStatus"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="orderType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.orderType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('orderType')"
|
|
|
+ placeholder="老师"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in tenantStatus"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item prop="orderType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.orderType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('orderType')"
|
|
|
+ placeholder="课程状态"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in tenantStatus"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="orderState">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.orderState"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @clear="onClear('orderState')"
|
|
|
+ placeholder="扣费状态"
|
|
|
+ >
|
|
|
+ <el-option label="待支付" :value="0"></el-option>
|
|
|
+ <el-option label="已支付" :value="1"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="createTimer">
|
|
|
+ <el-date-picker
|
|
|
+ v-model.trim="searchForm.createTimer"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="课程开始时间"
|
|
|
+ end-placeholder="课程结束时间"
|
|
|
+ :picker-options="{ firstDayOfWeek: 1 }"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="danger">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="primary">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
+ <div style="font-size: 14px; padding-bottom: 10px">
|
|
|
+ 扣费总额:<span style="color: var(--color-primary)">1,000元</span>
|
|
|
+ <i style="width: 10px; display: inline-block"></i>
|
|
|
+ 冻结金额:<span style="color: var(--color-primary)">1,000元</span>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ :data="tableList"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ >
|
|
|
+ <el-table-column align="center" label="课程编号" prop="transNo">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="所属分部" prop="orderNo">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="课程类型" prop="createdTime">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="姓名" prop="tenantId">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="老师" prop="tenantName">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="课程人数">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.orderType | tenantStatus }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="课程时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.expectAmount | moneyFormat }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column align="center" label="网络教室剩余时长" prop="productName">
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column align="center" label="课程状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.actualAmount | moneyFormat }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="扣费状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.orderState | tenantOrderStatus }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="冻结金额(元)">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.orderState | tenantOrderStatus }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ :saveKey="'tenantTradeManager'"
|
|
|
+ sync
|
|
|
+ :total.sync="pageInfo.total"
|
|
|
+ :page.sync="pageInfo.page"
|
|
|
+ :limit.sync="pageInfo.limit"
|
|
|
+ :page-sizes="pageInfo.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog title="订单详情" :visible.sync="orderVisible" width="1200px">
|
|
|
+ <order-info />
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { tenantInfoQueryPage } from "../organManager/api";
|
|
|
+import { tenantOrderRecordQueryPage } from "./api";
|
|
|
+import { tenantStatus, dealStatus } from "@/utils/searchArray";
|
|
|
+import OrderInfo from './model/orderInfo'
|
|
|
+import { getTimes } from "@/utils";
|
|
|
+const initSearch = {
|
|
|
+ transNo: null,
|
|
|
+ orderNo: null,
|
|
|
+ tenantId: [],
|
|
|
+ orderType: null,
|
|
|
+ orderState: null,
|
|
|
+ createTimer: [],
|
|
|
+};
|
|
|
+export default {
|
|
|
+ components: { pagination, OrderInfo },
|
|
|
+ data() {
|
|
|
+ const baseTenantId = sessionStorage.getItem('baseTenantId')
|
|
|
+ return {
|
|
|
+ baseTenantId,
|
|
|
+ tenantStatus,
|
|
|
+ dealStatus,
|
|
|
+ tableList: [],
|
|
|
+ orderVisible: false,
|
|
|
+ pageInfo: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ searchForm: { ...initSearch },
|
|
|
+ tenantList: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ await this.getTenant()
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async getTenant() {
|
|
|
+ try {
|
|
|
+ const res = await tenantInfoQueryPage({ page: 1, rows: 999 }, )
|
|
|
+ this.tenantList = res.data?.rows || []
|
|
|
+ } catch(e) {}
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ try {
|
|
|
+ let { createTimer, tenantId, ...reset } = this.searchForm;
|
|
|
+ const res = await tenantOrderRecordQueryPage({
|
|
|
+ ...reset,
|
|
|
+ tenantId: tenantId.join(','),
|
|
|
+ ...getTimes(createTimer, ["startDate", "endDate"], "YYYY-MM-DD"),
|
|
|
+ page: this.pageInfo.page,
|
|
|
+ rows: this.pageInfo.limit,
|
|
|
+ });
|
|
|
+ this.pageInfo.total = res.total;
|
|
|
+ this.tableList = res.rows;
|
|
|
+ } catch (e) {}
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ this.pageInfo.page = 1;
|
|
|
+ this.$refs.searchForm.save(this.searchForm);
|
|
|
+ this.$refs.searchForm.save(this.pageInfo, "page");
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ reset() {
|
|
|
+ this.searchForm = { ...initSearch };
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ openService(row) {
|
|
|
+ this.orderVisible = true
|
|
|
+ },
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ tenantOrderStatus(val) {
|
|
|
+ const template = {
|
|
|
+ 0: "待支付",
|
|
|
+ 1: "已支付",
|
|
|
+ 2: "支付失败"
|
|
|
+ }
|
|
|
+ return template[val]
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.courseMask .el-dialog__body {
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+</style>
|