|
@@ -0,0 +1,350 @@
|
|
|
+ <!-- -->
|
|
|
+<template>
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 合作单位缴费
|
|
|
+ </h2>
|
|
|
+ <div class="m-core">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ ref="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ >
|
|
|
+ <el-form-item prop="organId">
|
|
|
+ <el-select
|
|
|
+ class="multiple"
|
|
|
+ v-model.trim="searchForm.organId"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ placeholder="请选择分部"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in selects.branchs"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="cooperationId">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.cooperationId"
|
|
|
+ :disabled="!searchForm.organId"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="请选择合作单位"
|
|
|
+ @change="changeCooper"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in cooperationList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="danger">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="exportBack"
|
|
|
+ v-permission="'export/userCashAccountLog'"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="tableList"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="id"
|
|
|
+ label="退费编号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="学员">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <p>{{ scope.row.username }}</p>
|
|
|
+ <p>{{ scope.row.userId }}</p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="organName"
|
|
|
+ label="分部"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="groupId"
|
|
|
+ label="课程组编号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="退费金额">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.amount | moneyFormat }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="退费类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.returnFeeType | backType }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="退费时间"
|
|
|
+ width="100px"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.createTime }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="transNo"
|
|
|
+ label="交易流水号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="payTime"
|
|
|
+ label="打款时间"
|
|
|
+ width="100px"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="退费状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.transNo ? "已打款" : "未打款" }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <auth auths="userCashAccountLog/update">
|
|
|
+ <el-button type="text" @click="resetBackForm(scope.row)"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ </auth>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ sync
|
|
|
+ :total.sync="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog :visible.sync="resetVisible" title="修改退费记录" width="400px">
|
|
|
+ <el-form
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ :inline="true"
|
|
|
+ label-width="100px"
|
|
|
+ class="form"
|
|
|
+ ref="form"
|
|
|
+ >
|
|
|
+ <el-form-item label="编号"
|
|
|
+ ><el-input :disabled="true" v-model="form.id"></el-input
|
|
|
+ ></el-form-item>
|
|
|
+ <el-form-item label="学员"
|
|
|
+ ><el-input :disabled="true" v-model="form.username"></el-input
|
|
|
+ ></el-form-item>
|
|
|
+ <el-form-item label="课程组编号"
|
|
|
+ ><el-input :disabled="true" v-model="form.groupId"></el-input
|
|
|
+ ></el-form-item>
|
|
|
+ <el-form-item label="金额"
|
|
|
+ ><el-input
|
|
|
+ :disabled="true"
|
|
|
+ :value="form.amount | moneyFormat"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="交易流水号"
|
|
|
+ ><el-input v-model="form.transNo"></el-input
|
|
|
+ ></el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="form.transNo"
|
|
|
+ prop="payTime"
|
|
|
+ label="打款时间"
|
|
|
+ :rules="[{ required: true, message: '请选择打款时间' }]"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.payTime"
|
|
|
+ clearable
|
|
|
+ type="datetime"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :picker-options="{ firstDayOfWeek: 1 }"
|
|
|
+ placeholder="打款时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="退费时间">
|
|
|
+ <el-input :disabled="true" v-model="form.createTime"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="resetVisible = false">取 消</el-button>
|
|
|
+
|
|
|
+ <el-button @click="resetRorm" type="primary">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import axios from "axios";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import { getTimes } from "@/utils";
|
|
|
+import load from "@/utils/loading";
|
|
|
+import { backTypeList } from "@/utils/searchArray";
|
|
|
+import { getUserCashAccountLog, resetUserCashAccountLog } from "./api";
|
|
|
+import { Export } from "@/utils/downLoadFile";
|
|
|
+import qs from "qs";
|
|
|
+export default {
|
|
|
+ components: { pagination },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ searchForm: {
|
|
|
+ search: null,
|
|
|
+ returnFeeType: null,
|
|
|
+ organId: [],
|
|
|
+ backTime: [],
|
|
|
+ payTime: [],
|
|
|
+ returnFeeFlag:null
|
|
|
+ },
|
|
|
+ backTypeList,
|
|
|
+ tableList: [],
|
|
|
+ cooperationList: [],
|
|
|
+ activeRow: null,
|
|
|
+ rules: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ form: {
|
|
|
+ id: null,
|
|
|
+ },
|
|
|
+ resetVisible: false,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {},
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ async mounted() {
|
|
|
+ // 获取分部
|
|
|
+ await this.$store.dispatch("setBranchs");
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+ let { backTime, payTime, organId, ...rest } = this.searchForm;
|
|
|
+ let params = {
|
|
|
+ ...rest,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ organId: organId.join(","),
|
|
|
+ ...getTimes(backTime, ["createStartTime", "createEndTime"]),
|
|
|
+ ...getTimes(payTime, ["payStartTime", "payEndTime"]),
|
|
|
+ };
|
|
|
+ try {
|
|
|
+ const res = await getUserCashAccountLog(params);
|
|
|
+ this.tableList = res.data.rows;
|
|
|
+ this.rules.total = res.data.total;
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ search() {
|
|
|
+ this.rules.page = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ onReSet() {
|
|
|
+ this.$refs["searchForm"].resetFields();
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ resetBackForm(row) {
|
|
|
+ this.activeRow = row;
|
|
|
+ this.form = { ...row };
|
|
|
+ this.resetVisible = true;
|
|
|
+ },
|
|
|
+ resetRorm() {
|
|
|
+ this.$refs.form.validate(async (flag) => {
|
|
|
+ if (flag) {
|
|
|
+ try {
|
|
|
+ if(!this.form.transNo){
|
|
|
+ this.form.payTime = null;
|
|
|
+ }
|
|
|
+ const res = await resetUserCashAccountLog(this.form);
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.resetVisible = false;
|
|
|
+ this.getList();
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ exportBack() {
|
|
|
+ let { backTime, payTime, organId, ...rest } = this.searchForm;
|
|
|
+ let params = {
|
|
|
+ ...rest,
|
|
|
+ page: this.rules.page,
|
|
|
+ rows: this.rules.limit,
|
|
|
+ organId: organId.join(","),
|
|
|
+ ...getTimes(backTime, ["createStartTime", "createEndTime"]),
|
|
|
+ ...getTimes(payTime, ["payStartTime", "payEndTime"]),
|
|
|
+ };
|
|
|
+ Export(
|
|
|
+ this,
|
|
|
+ {
|
|
|
+ url: "/api-web/export/userCashAccountLog",
|
|
|
+ fileName: "退费列表.xls",
|
|
|
+ method: "post",
|
|
|
+ params: qs.stringify(params),
|
|
|
+ },
|
|
|
+ "您确定导出退费列表?"
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang='scss' scoped>
|
|
|
+.search {
|
|
|
+ ::v-deep .el-input__inner {
|
|
|
+ width: 260px !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+.form {
|
|
|
+ ::v-deep .el-input {
|
|
|
+ width: 220px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|