|
@@ -0,0 +1,305 @@
|
|
|
+<template>
|
|
|
+ <div id="examdataConfig">
|
|
|
+ <search-box-new
|
|
|
+ ref="searchBox"
|
|
|
+ :formData="formData"
|
|
|
+ :formList="formList"
|
|
|
+ @search="search"
|
|
|
+ @init="init"
|
|
|
+ :shType="shType"
|
|
|
+ >
|
|
|
+ </search-box-new>
|
|
|
+ <table-list
|
|
|
+ ref="tableList"
|
|
|
+ :tableSets="tableSet"
|
|
|
+ :tableData="tableData"
|
|
|
+ :navText="navText"
|
|
|
+ @addClick="addClick"
|
|
|
+ :loading="loading"
|
|
|
+ @editInfo="editInfo"
|
|
|
+ >
|
|
|
+ <template
|
|
|
+ slot="customize"
|
|
|
+ v-if="formData.checkStatus == 0 || formData.checkStatus == ''"
|
|
|
+ >
|
|
|
+ <el-button size="small" type="success" @click="audits(1)"
|
|
|
+ >批量审核通过</el-button
|
|
|
+ ><el-button size="small" type="danger" @click="audits(2)"
|
|
|
+ >批量审核不通过</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template slot="btn" slot-scope="props">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ v-if="props.scope.row.checkStatus == 0"
|
|
|
+ @click="audit(props.scope.row, 1)"
|
|
|
+ >审核通过</el-button
|
|
|
+ ><el-button
|
|
|
+ type="text"
|
|
|
+ v-if="props.scope.row.checkStatus == 0"
|
|
|
+ @click="audit(props.scope.row, 2)"
|
|
|
+ >审核不通过</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </table-list>
|
|
|
+ <pagination
|
|
|
+ :total="total"
|
|
|
+ :pageSize="formData.pageSize"
|
|
|
+ :currentPage="formData.pageNum"
|
|
|
+ @handleSizeChange="handleSizeChange"
|
|
|
+ @handleCurrentChange="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+ <script>
|
|
|
+import searchBoxNew from "@/components/searchBoxNew";
|
|
|
+import tableList from "@/components/tableList";
|
|
|
+import pagination from "@/components/pagination";
|
|
|
+export default {
|
|
|
+ name: "examdataConfig",
|
|
|
+ components: { searchBoxNew, tableList, pagination },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ shType: true,
|
|
|
+ loading: false, //当前表单加载是否加载动画
|
|
|
+ navText: {
|
|
|
+ title: "待审线下订单",
|
|
|
+ index: 0,
|
|
|
+ ch: "条",
|
|
|
+ num: true,
|
|
|
+ border: true,
|
|
|
+ choice: true,
|
|
|
+ addHide: true,
|
|
|
+ backFatherBtn: {
|
|
|
+ status: false,
|
|
|
+ title: "未定义",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ //搜索
|
|
|
+ formList: [
|
|
|
+ {
|
|
|
+ prop: "userName",
|
|
|
+ placeholder: "请输入学员姓名",
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // prop: "userPhone",
|
|
|
+ // placeholder: "请输入学员手机号",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "userCard",
|
|
|
+ // placeholder: "请输入学员身份证",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: "companyName",
|
|
|
+ // placeholder: "请输入学员公司名",
|
|
|
+ // },
|
|
|
+ ],
|
|
|
+ formData: {
|
|
|
+ checkStatus: 0,
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ },
|
|
|
+ // 表单
|
|
|
+ tableSet: [
|
|
|
+ {
|
|
|
+ label: "学员姓名",
|
|
|
+ prop: "userName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: "学员身份证",
|
|
|
+ prop: "userCard",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "绑定手机号",
|
|
|
+ prop: "userPhone",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "公司名称",
|
|
|
+ prop: "companyName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "所购商品",
|
|
|
+ hidden: true,
|
|
|
+ prop: "goodsName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审核状态",
|
|
|
+ prop: "checkStatus",
|
|
|
+ hidden: true,
|
|
|
+ scope: "isOptions",
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ label: "通过",
|
|
|
+ value: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "待审核",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "不通过",
|
|
|
+ value: 2,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: "申请时间",
|
|
|
+ prop: "createTime",
|
|
|
+ hidden: true,
|
|
|
+ scope: "aTimeList",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务类型",
|
|
|
+ prop: "businessName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "预约考试名称",
|
|
|
+ prop: "examApplyName",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "订单价格(元)",
|
|
|
+ prop: "orderPrice",
|
|
|
+ hidden: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableData: [], //表单数据
|
|
|
+ total: 0, //一共多少条
|
|
|
+ DCLIST: [
|
|
|
+ { label: "全部", value: "" },
|
|
|
+ { label: "待审核", value: 0 },
|
|
|
+ { label: "审核通过", value: 1 },
|
|
|
+ { label: "审核不通过", value: 2 },
|
|
|
+ ], //导出按钮列表
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ async activated() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ audits(status) {
|
|
|
+ if (this.$refs.tableList.allCheckData.length == 0) {
|
|
|
+ this.$message.error("请勾选需要批量操作的订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var cL = this.$refs.tableList.allCheckData.filter(
|
|
|
+ (f) => f.checkStatus === 0
|
|
|
+ );
|
|
|
+ console.log("231", cL);
|
|
|
+ var ids = cL.map((item) => {
|
|
|
+ return item.orderSn;
|
|
|
+ });
|
|
|
+ if (ids.length==0) {
|
|
|
+ this.$message.error("请勾选待审核的订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm(
|
|
|
+ "您确定对选中的待审核订单审核" +
|
|
|
+ (status == 1 ? "通过" : "不通过") +
|
|
|
+ "吗?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then((_) => {
|
|
|
+ this.saveaudit({ orderSnList: ids, checkResult: status });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ //点击了取消按钮
|
|
|
+ });
|
|
|
+ },
|
|
|
+ audit(row, status) {
|
|
|
+ this.$confirm(
|
|
|
+ "您确定对订单【" +
|
|
|
+ row.orderSn +
|
|
|
+ "】审核" +
|
|
|
+ (status == 1 ? "通过" : "不通过") +
|
|
|
+ "吗?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then((_) => {
|
|
|
+ this.saveaudit({ orderSnList: [row.orderSn], checkResult: status });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ //点击了取消按钮
|
|
|
+ });
|
|
|
+ },
|
|
|
+ saveaudit(data) {
|
|
|
+ console.log(data, "data");
|
|
|
+ this.$api
|
|
|
+ .orderofflinecheck(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.$message.success("提交成功");
|
|
|
+ this.search();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.$message.error(err.msg);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ search(int) {
|
|
|
+ this.loading = true;
|
|
|
+ this.formData.checkStatus =
|
|
|
+ this.formData.status == 2
|
|
|
+ ? 0
|
|
|
+ : this.formData.status == 3
|
|
|
+ ? 2
|
|
|
+ : this.formData.status == 1
|
|
|
+ ? 1
|
|
|
+ : "";
|
|
|
+ if (int === 1) {
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ }
|
|
|
+ if (int === 2) {
|
|
|
+ this.formData = {
|
|
|
+ status: 0,
|
|
|
+ checkStatus: 0,
|
|
|
+ pageSize: 10,
|
|
|
+ pageNum: 1,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ var data = JSON.parse(JSON.stringify(this.formData));
|
|
|
+ console.log(this.formData, "data");
|
|
|
+
|
|
|
+ this.$api
|
|
|
+ .orderofflinelist(data)
|
|
|
+ .then((res) => {
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ this.navText.index = res.total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ init() {
|
|
|
+ this.search(2);
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSizeChange(v) {
|
|
|
+ this.formData.pageSize = v;
|
|
|
+ this.formData.pageNum = 1;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ handleCurrentChange(v) {
|
|
|
+ this.formData.pageNum = v;
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|