studentDetails.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <template>
  2. <div class="studentDetails">
  3. <el-tabs v-model="tabType" @tab-click="handleClick">
  4. <el-tab-pane label="学员详情" name="1">
  5. <div style="margin-bottom: 10px">
  6. <!-- 搜索框 -->
  7. <el-select
  8. v-if="false"
  9. style="width: 230px; margin-right: 10px"
  10. size="small"
  11. v-model="formData.studyStatus"
  12. clearable
  13. placeholder="请选择学习状态"
  14. >
  15. <el-option
  16. v-for="item in studyStatusList"
  17. :key="item.value"
  18. :label="item.label"
  19. :value="item.value"
  20. >
  21. </el-option>
  22. </el-select>
  23. <el-select
  24. style="width: 230px; margin-right: 10px"
  25. size="small"
  26. v-model="formData.refundStatus"
  27. clearable
  28. placeholder="请选择退款状态"
  29. >
  30. <el-option
  31. v-for="item in refundStatusList"
  32. :key="item.value"
  33. :label="item.label"
  34. :value="item.value"
  35. >
  36. </el-option>
  37. </el-select>
  38. <el-input
  39. style="width: 230px; margin-right: 10px"
  40. size="small"
  41. v-model="formData.userName"
  42. placeholder="姓名"
  43. ></el-input>
  44. <el-input
  45. style="width: 230px; margin-right: 10px"
  46. size="small"
  47. v-model="formData.userCard"
  48. placeholder="身份证号"
  49. ></el-input>
  50. <el-button size="small" type="primary" @click="search"
  51. >查询</el-button
  52. >
  53. <el-button size="small" @click="search('init')">重置</el-button>
  54. <el-button v-if="ShowStatus" type="success" size="small" @click="orderCheck(1,'')"
  55. >学员审核通过</el-button
  56. >
  57. <el-button v-if="ShowStatus" type="danger" size="small" @click="orderCheck(2, '不')"
  58. >学员审核不通过</el-button
  59. >
  60. </div>
  61. <table-list
  62. ref="tableList"
  63. rowKey="orderGoodsId"
  64. :tableSets="tableSet1"
  65. :tableData="tableData1"
  66. :navText="dialogNavText1"
  67. >
  68. </table-list>
  69. <pagination
  70. :total="total"
  71. :pageSize.sync="formData.pageSize"
  72. :currentPage.sync="formData.pageNum"
  73. @search="search"
  74. />
  75. </el-tab-pane>
  76. <el-tab-pane label="操作历史" name="2">
  77. <table-list
  78. :tableSets="tableSet2"
  79. :tableData="tableData2"
  80. :navText="dialogNavText2"
  81. >
  82. </table-list>
  83. <pagination
  84. :total="total"
  85. :pageSize.sync="formData.pageSize"
  86. :currentPage.sync="formData.pageNum"
  87. @search="search"
  88. />
  89. </el-tab-pane>
  90. </el-tabs>
  91. </div>
  92. </template>
  93. <script>
  94. import tableList from "@/components/tableList";
  95. import pagination from "@/components/pagination";
  96. export default {
  97. name: "SaasMasterPlatformStudentDetails",
  98. props: {
  99. orderSn: {
  100. type: String,
  101. },
  102. orderFrom: {
  103. type: Number,
  104. },
  105. ShowStatus: {
  106. type: Boolean,
  107. default: false,
  108. },
  109. },
  110. data() {
  111. return {
  112. studyStatusList: [
  113. {
  114. label: "未开始",
  115. value: 0,
  116. },
  117. {
  118. label: "学习中",
  119. value: 1,
  120. },
  121. {
  122. label: "已结束",
  123. value: 2,
  124. },
  125. ],
  126. refundStatusList: [
  127. {
  128. label: "待审核",
  129. value: 0,
  130. },
  131. {
  132. label: "正常",
  133. value: 1,
  134. },
  135. {
  136. label: "未退款",
  137. value: 2,
  138. },
  139. {
  140. label: "已完成",
  141. value: 3,
  142. },
  143. {
  144. label: "未通过",
  145. value: 4,
  146. },
  147. ],
  148. tableSet1: [
  149. {
  150. label: "姓名",
  151. prop: "userName",
  152. hidden: true,
  153. },
  154. {
  155. label: "身份证号",
  156. prop: "userCard",
  157. hidden: true,
  158. },
  159. {
  160. label: "手机号",
  161. prop: "userPhone",
  162. hidden: true,
  163. },
  164. {
  165. label: "课程",
  166. prop: "goodsName",
  167. hidden: true,
  168. },
  169. {
  170. label: "专业",
  171. prop: "majorName",
  172. hidden: true,
  173. },
  174. {
  175. label: "业务",
  176. prop: "businessName",
  177. hidden: true,
  178. },
  179. {
  180. label: "原价(元)",
  181. prop: "goodsPrice",
  182. hidden: true,
  183. },
  184. {
  185. label: "单价(元)",
  186. prop: "goodsRealPrice",
  187. hidden: true,
  188. },
  189. {
  190. label: "学习状态",
  191. prop: "studyStatus",
  192. hidden: true,
  193. },
  194. {
  195. label: "审核状态",
  196. prop: "checkStatus",
  197. hidden: true,
  198. scope: "isOptions",
  199. options: [
  200. {
  201. label: "待审核",
  202. value: 0,
  203. },
  204. {
  205. label: "已通过",
  206. value: 1,
  207. },
  208. {
  209. label: "未通过",
  210. value: 2,
  211. },
  212. {
  213. label: "已撤销",
  214. value: 3,
  215. },
  216. {
  217. label: "已取消",
  218. value: -1,
  219. },
  220. ],
  221. },
  222. ],
  223. tableData1: [],
  224. tableSet2: [
  225. {
  226. label: "时间",
  227. prop: "createTime",
  228. hidden: true,
  229. scope: "aTimeList",
  230. },
  231. {
  232. label: "操作者",
  233. prop: "createBy",
  234. hidden: true,
  235. },
  236. {
  237. label: "动作",
  238. prop: "action",
  239. hidden: true,
  240. scope: "isOptions",
  241. options: [
  242. {
  243. label: "修改",
  244. value: "update",
  245. },
  246. {
  247. label: "新增",
  248. value: "insert",
  249. },
  250. {
  251. label: "删除",
  252. value: "delete",
  253. },
  254. ],
  255. },
  256. {
  257. label: "字段",
  258. prop: "field",
  259. hidden: true,
  260. },
  261. {
  262. label: "操作前",
  263. prop: "fieldBefore",
  264. hidden: true,
  265. },
  266. {
  267. label: "操作后",
  268. prop: "fieldAfter",
  269. hidden: true,
  270. },
  271. ],
  272. tableData2: [],
  273. dialogNavText1: {
  274. index: 0,
  275. num: true,
  276. border: true,
  277. choice: true,
  278. choiceRadio: false,
  279. openCheckMore: true,
  280. radioKey: "specTemplateId",
  281. radioFixed: false,
  282. addHide: !false,
  283. tableHide: true,
  284. dontNum: false,
  285. headShow: false,
  286. tableColor: true,
  287. tableColorFunc: (row, rowIndex) => {
  288. if (row.checkStatus === -1) {
  289. return "info-row";
  290. }
  291. return "";
  292. },
  293. selectableStatus: true,
  294. selectableFunc: (row, rowIndex) => {
  295. if (row.checkStatus === 0) {
  296. return true;
  297. } else {
  298. return false;
  299. }
  300. },
  301. backFatherBtn: {
  302. status: false,
  303. title: "未定义",
  304. },
  305. },
  306. dialogNavText2: {
  307. index: 0,
  308. num: true,
  309. border: true,
  310. choice: false,
  311. choiceRadio: false,
  312. radioKey: "specTemplateId",
  313. radioFixed: false,
  314. addHide: !false,
  315. tableHide: true,
  316. dontNum: false,
  317. headShow: false,
  318. backFatherBtn: {
  319. status: false,
  320. title: "未定义",
  321. },
  322. },
  323. formData: {
  324. pageSize: 10,
  325. pageNum: 1,
  326. },
  327. total: 0,
  328. tabType: "1",
  329. };
  330. },
  331. created() {
  332. this.search("init");
  333. },
  334. mounted() {},
  335. methods: {
  336. orderCheck(e, ch) {
  337. if (this.$refs.tableList.allCheckData.length === 0) {
  338. this.$message.error("请勾选数据");
  339. return;
  340. }
  341. this.$confirm(`确定学员${ch}审核通过吗?`, "提示", {
  342. confirmButtonText: "确定",
  343. cancelButtonText: "取消",
  344. type: "warning",
  345. })
  346. .then(() => {
  347. this.$api
  348. .systemtopordercheckstudent({
  349. checkStatus: e,
  350. orderSn: this.orderSn,
  351. orderGoodsIds: this.$refs.tableList.allCheckData.map(
  352. (i) => i.orderGoodsId
  353. ),
  354. })
  355. .then((res) => {
  356. this.search("init");
  357. this.$message.success("操作成功");
  358. });
  359. })
  360. .catch(() => {});
  361. },
  362. search(e) {
  363. if (e === "init") {
  364. this.formData = {
  365. pageSize: 10,
  366. pageNum: 1,
  367. orderSn: this.orderSn,
  368. orderFrom: this.orderFrom,
  369. };
  370. this.$nextTick(() => {
  371. this.$refs.tableList.clearMoreActive();
  372. });
  373. }
  374. this.$api[
  375. this.tabType === "1" ? "systemtopordergoodslist" : "systemtoporderlog"
  376. ](this.formData).then((res) => {
  377. if (this.tabType === "1") {
  378. this.tableData1 = res.rows;
  379. this.total = res.total;
  380. }
  381. if (this.tabType === "2") {
  382. this.tableData2 = res.rows;
  383. this.total = res.total;
  384. }
  385. });
  386. },
  387. handleClick(tab) {
  388. this.search("init");
  389. },
  390. },
  391. components: {
  392. tableList,
  393. pagination,
  394. },
  395. };
  396. </script>
  397. <style lang="scss" scoped>
  398. .studentDetails {
  399. margin-top: 10px;
  400. #tableList {
  401. padding: 0;
  402. }
  403. }
  404. </style>