123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407 |
- <template>
- <div class="studentDetails">
- <el-tabs v-model="tabType" @tab-click="handleClick">
- <el-tab-pane label="学员详情" name="1">
- <div style="margin-bottom: 10px">
- <!-- 搜索框 -->
- <el-select
- v-if="false"
- style="width: 230px; margin-right: 10px"
- size="small"
- v-model="formData.studyStatus"
- clearable
- placeholder="请选择学习状态"
- >
- <el-option
- v-for="item in studyStatusList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-select
- style="width: 230px; margin-right: 10px"
- size="small"
- v-model="formData.refundStatus"
- clearable
- placeholder="请选择退款状态"
- >
- <el-option
- v-for="item in refundStatusList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- <el-input
- style="width: 230px; margin-right: 10px"
- size="small"
- v-model="formData.userName"
- placeholder="姓名"
- ></el-input>
- <el-input
- style="width: 230px; margin-right: 10px"
- size="small"
- v-model="formData.userCard"
- placeholder="身份证号"
- ></el-input>
- <el-button size="small" type="primary" @click="search"
- >查询</el-button
- >
- <el-button size="small" @click="search('init')">重置</el-button>
- <el-button v-if="ShowStatus" type="success" size="small" @click="orderCheck(1,'')"
- >学员审核通过</el-button
- >
- <el-button v-if="ShowStatus" type="danger" size="small" @click="orderCheck(2, '不')"
- >学员审核不通过</el-button
- >
- </div>
- <table-list
- ref="tableList"
- rowKey="orderGoodsId"
- :tableSets="tableSet1"
- :tableData="tableData1"
- :navText="dialogNavText1"
- >
- </table-list>
- <pagination
- :total="total"
- :pageSize.sync="formData.pageSize"
- :currentPage.sync="formData.pageNum"
- @search="search"
- />
- </el-tab-pane>
- <el-tab-pane label="操作历史" name="2">
- <table-list
- :tableSets="tableSet2"
- :tableData="tableData2"
- :navText="dialogNavText2"
- >
- </table-list>
- <pagination
- :total="total"
- :pageSize.sync="formData.pageSize"
- :currentPage.sync="formData.pageNum"
- @search="search"
- />
- </el-tab-pane>
- </el-tabs>
- </div>
- </template>
- <script>
- import tableList from "@/components/tableList";
- import pagination from "@/components/pagination";
- export default {
- name: "SaasMasterPlatformStudentDetails",
- props: {
- orderSn: {
- type: String,
- },
- orderFrom: {
- type: Number,
- },
- ShowStatus: {
- type: Boolean,
- default: false,
- },
- },
- data() {
- return {
- studyStatusList: [
- {
- label: "未开始",
- value: 0,
- },
- {
- label: "学习中",
- value: 1,
- },
- {
- label: "已结束",
- value: 2,
- },
- ],
- refundStatusList: [
- {
- label: "待审核",
- value: 0,
- },
- {
- label: "正常",
- value: 1,
- },
- {
- label: "未退款",
- value: 2,
- },
- {
- label: "已完成",
- value: 3,
- },
- {
- label: "未通过",
- value: 4,
- },
- ],
- tableSet1: [
- {
- label: "姓名",
- prop: "userName",
- hidden: true,
- },
- {
- label: "身份证号",
- prop: "userCard",
- hidden: true,
- },
- {
- label: "手机号",
- prop: "userPhone",
- hidden: true,
- },
- {
- label: "课程",
- prop: "goodsName",
- hidden: true,
- },
- {
- label: "专业",
- prop: "majorName",
- hidden: true,
- },
- {
- label: "业务",
- prop: "businessName",
- hidden: true,
- },
- {
- label: "原价(元)",
- prop: "goodsPrice",
- hidden: true,
- },
- {
- label: "单价(元)",
- prop: "goodsRealPrice",
- hidden: true,
- },
- {
- label: "学习状态",
- prop: "studyStatus",
- hidden: true,
- },
- {
- label: "审核状态",
- prop: "checkStatus",
- hidden: true,
- scope: "isOptions",
- options: [
- {
- label: "待审核",
- value: 0,
- },
- {
- label: "已通过",
- value: 1,
- },
- {
- label: "未通过",
- value: 2,
- },
- {
- label: "已撤销",
- value: 3,
- },
- {
- label: "已取消",
- value: -1,
- },
- ],
- },
- ],
- tableData1: [],
- tableSet2: [
- {
- label: "时间",
- prop: "createTime",
- hidden: true,
- scope: "aTimeList",
- },
- {
- label: "操作者",
- prop: "createBy",
- hidden: true,
- },
- {
- label: "动作",
- prop: "action",
- hidden: true,
- scope: "isOptions",
- options: [
- {
- label: "修改",
- value: "update",
- },
- {
- label: "新增",
- value: "insert",
- },
- {
- label: "删除",
- value: "delete",
- },
- ],
- },
- {
- label: "字段",
- prop: "field",
- hidden: true,
- },
- {
- label: "操作前",
- prop: "fieldBefore",
- hidden: true,
- },
- {
- label: "操作后",
- prop: "fieldAfter",
- hidden: true,
- },
- ],
- tableData2: [],
- dialogNavText1: {
- index: 0,
- num: true,
- border: true,
- choice: true,
- choiceRadio: false,
- openCheckMore: true,
- radioKey: "specTemplateId",
- radioFixed: false,
- addHide: !false,
- tableHide: true,
- dontNum: false,
- headShow: false,
- tableColor: true,
- tableColorFunc: (row, rowIndex) => {
- if (row.checkStatus === -1) {
- return "info-row";
- }
- return "";
- },
- selectableStatus: true,
- selectableFunc: (row, rowIndex) => {
- if (row.checkStatus === 0) {
- return true;
- } else {
- return false;
- }
- },
- backFatherBtn: {
- status: false,
- title: "未定义",
- },
- },
- dialogNavText2: {
- index: 0,
- num: true,
- border: true,
- choice: false,
- choiceRadio: false,
- radioKey: "specTemplateId",
- radioFixed: false,
- addHide: !false,
- tableHide: true,
- dontNum: false,
- headShow: false,
- backFatherBtn: {
- status: false,
- title: "未定义",
- },
- },
- formData: {
- pageSize: 10,
- pageNum: 1,
- },
- total: 0,
- tabType: "1",
- };
- },
- created() {
- this.search("init");
- },
- mounted() {},
- methods: {
- orderCheck(e, ch) {
- if (this.$refs.tableList.allCheckData.length === 0) {
- this.$message.error("请勾选数据");
- return;
- }
- this.$confirm(`确定学员${ch}审核通过吗?`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- this.$api
- .systemtopordercheckstudent({
- checkStatus: e,
- orderSn: this.orderSn,
- orderGoodsIds: this.$refs.tableList.allCheckData.map(
- (i) => i.orderGoodsId
- ),
- })
- .then((res) => {
- this.search("init");
- this.$message.success("操作成功");
- });
- })
- .catch(() => {});
- },
- search(e) {
- if (e === "init") {
- this.formData = {
- pageSize: 10,
- pageNum: 1,
- orderSn: this.orderSn,
- orderFrom: this.orderFrom,
- };
- this.$nextTick(() => {
- this.$refs.tableList.clearMoreActive();
- });
- }
- this.$api[
- this.tabType === "1" ? "systemtopordergoodslist" : "systemtoporderlog"
- ](this.formData).then((res) => {
- if (this.tabType === "1") {
- this.tableData1 = res.rows;
- this.total = res.total;
- }
- if (this.tabType === "2") {
- this.tableData2 = res.rows;
- this.total = res.total;
- }
- });
- },
- handleClick(tab) {
- this.search("init");
- },
- },
- components: {
- tableList,
- pagination,
- },
- };
- </script>
- <style lang="scss" scoped>
- .studentDetails {
- margin-top: 10px;
- #tableList {
- padding: 0;
- }
- }
- </style>
|