asPlanned.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. <template>
  2. <div id="asPlanned">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. />
  10. <table-list
  11. :tableSets="tableSet"
  12. :tableData="tableData"
  13. :navText="navText"
  14. @addClick="addClick"
  15. :loading="loading"
  16. @editInfo="editInfo"
  17. ref="tableList"
  18. >
  19. <template slot="customize">
  20. <el-button :size="size" type="warning" @click="moreActive(2)"
  21. >取消预约</el-button
  22. >
  23. <el-button :size="size" type="primary" @click="moreActive(5)"
  24. >前培账号标记</el-button
  25. >
  26. <el-button :size="size" type="primary" @click="moreActive(3)"
  27. >考试登记</el-button
  28. >
  29. <!-- <el-button :size="size" type="primary" @click="moreActive(4)"
  30. >批量:成绩证书登记</el-button
  31. > -->
  32. <el-button :size="size" type="success" @click="moreActive(1)"
  33. >批量导入</el-button
  34. >
  35. </template>
  36. <template slot="btn" slot-scope="props">
  37. <el-button
  38. type="text"
  39. @click="examBox(props.scope.row, 2)"
  40. :disabled="props.scope.row.subscribeStatus === 2"
  41. >考试登记</el-button
  42. >
  43. <el-button
  44. type="text"
  45. @click="openZS(props.scope.row, 2)"
  46. :disabled="props.scope.row.subscribeStatus === 2"
  47. >成绩和证书登记</el-button
  48. >
  49. </template>
  50. </table-list>
  51. <pagination
  52. :total="total"
  53. :pageSize="formData.pageSize"
  54. :currentPage="formData.pageNum"
  55. @handleSizeChange="handleSizeChange"
  56. @handleCurrentChange="handleCurrentChange"
  57. />
  58. <el-dialog
  59. :visible.sync="dialogCG"
  60. width="560px"
  61. :show-close="false"
  62. :close-on-click-modal="false"
  63. >
  64. <div slot="title" class="hearders">
  65. <div class="leftTitle">考试登记</div>
  66. <div class="rightBoxs">
  67. <img
  68. src="@/assets/images/Close@2x.png"
  69. alt=""
  70. @click="dialogCG = false"
  71. />
  72. </div>
  73. </div>
  74. <div>
  75. <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
  76. <ul v-if="ints === 2">
  77. <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
  78. {{ item.realname }}
  79. <i
  80. v-if="peopleList.length > 1"
  81. class="el-icon-error clsw"
  82. @click="peopleList.splice(index, 1)"
  83. ></i>
  84. </li>
  85. <div style="clear: both"></div>
  86. </ul>
  87. <el-form
  88. :model="listData"
  89. label-width="120px"
  90. class="demo-ruleForm"
  91. :rules="rules"
  92. ref="listData"
  93. >
  94. <el-form-item label="考试登记状态" prop="examStatus">
  95. <el-radio-group v-model="listData.examStatus">
  96. <el-radio :label="1">正常</el-radio>
  97. <el-radio :label="2">缺考</el-radio>
  98. <el-radio :label="3">作弊</el-radio>
  99. <el-radio :label="4">替考</el-radio>
  100. </el-radio-group>
  101. </el-form-item>
  102. <el-form-item label="考试登记补充" prop="remark">
  103. <el-input
  104. v-model="listData.remark"
  105. type="textarea"
  106. :rows="4"
  107. ></el-input>
  108. </el-form-item>
  109. </el-form>
  110. </div>
  111. <span slot="footer" class="dialog-footer">
  112. <el-button @click="dialogCG = false">取消</el-button>
  113. <el-button type="primary" @click="submitChecks('listData')"
  114. >确定</el-button
  115. >
  116. </span>
  117. </el-dialog>
  118. <el-dialog
  119. :visible.sync="dialogDJ"
  120. width="560px"
  121. :show-close="false"
  122. :close-on-click-modal="false"
  123. >
  124. <div slot="title" class="hearders">
  125. <div class="leftTitle">取消预约</div>
  126. <div class="rightBoxs">
  127. <img
  128. src="@/assets/images/Close@2x.png"
  129. alt=""
  130. @click="dialogDJ = false"
  131. />
  132. </div>
  133. </div>
  134. <div>
  135. <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
  136. <ul v-if="ints === 2">
  137. <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
  138. {{ item.realname }}
  139. <i
  140. v-if="peopleList.length > 1"
  141. class="el-icon-error clsw"
  142. @click="peopleList.splice(index, 1)"
  143. ></i>
  144. </li>
  145. <div style="clear: both"></div>
  146. </ul>
  147. <p style="margin: 0px">您确定要取消所选学员的考试预约吗?</p>
  148. <p style="margin: 0px">取消后将无法恢复,请慎重考虑!</p>
  149. </div>
  150. <span slot="footer" class="dialog-footer">
  151. <el-button @click="dialogDJ = false">取消</el-button>
  152. <el-button type="primary" @click="submitChecksDJ">确定</el-button>
  153. </span>
  154. </el-dialog>
  155. <el-dialog
  156. :visible.sync="dialogQP"
  157. width="460px"
  158. :show-close="false"
  159. :close-on-click-modal="false"
  160. >
  161. <div slot="title" class="hearders">
  162. <div class="leftTitle">前培账号已开通标记</div>
  163. <div class="rightBoxs">
  164. <img
  165. src="@/assets/images/Close@2x.png"
  166. alt=""
  167. @click="dialogQP = false"
  168. />
  169. </div>
  170. </div>
  171. <div>
  172. <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
  173. <ul v-if="ints === 2" style="margin: 0px">
  174. <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
  175. {{ item.realname }}
  176. <i
  177. v-if="peopleList.length > 1"
  178. class="el-icon-error clsw"
  179. @click="peopleList.splice(index, 1)"
  180. ></i>
  181. </li>
  182. <div style="clear: both"></div>
  183. </ul>
  184. <el-select
  185. size="small"
  186. v-model="plan"
  187. placeholder="请选择前培计划"
  188. style="margin-bottom: 12px"
  189. >
  190. <el-option
  191. v-for="item in optionsList"
  192. :key="item.beforeId"
  193. :label="item.beforeName"
  194. :value="item.beforeId"
  195. >
  196. </el-option>
  197. </el-select>
  198. <p style="margin: 0px">所选学员的前培账号标记为【已开通】吗?</p>
  199. <div style="text-align: center; margin-top: 12px">
  200. <el-radio-group v-model="beforeStatus">
  201. <el-radio :label="1">是</el-radio>
  202. <el-radio :label="2">否</el-radio>
  203. </el-radio-group>
  204. </div>
  205. </div>
  206. <span slot="footer" class="dialog-footer">
  207. <el-button @click="dialogQP = false">取消</el-button>
  208. <el-button type="primary" @click="submitChecksQP">确定</el-button>
  209. </span>
  210. </el-dialog>
  211. <el-dialog
  212. :visible.sync="dialogPLS"
  213. width="460px"
  214. :show-close="false"
  215. :close-on-click-modal="false"
  216. >
  217. <div slot="title" class="hearders">
  218. <div class="leftTitle">成绩和证书登记</div>
  219. <div class="rightBoxs">
  220. <img
  221. src="@/assets/images/Close@2x.png"
  222. alt=""
  223. @click="dialogPLS = false"
  224. />
  225. </div>
  226. </div>
  227. <div>
  228. <div v-for="(item, index) in peopleList" :key="index">
  229. <div class="aListBottom">
  230. {{ item.realname }}
  231. <i
  232. v-if="peopleList.length > 1"
  233. class="el-icon-error clsw"
  234. @click="peopleList.splice(index, 1)"
  235. ></i>
  236. </div>
  237. <el-form label-width="100px">
  238. <el-form-item label="考试成绩" required>
  239. <el-input-number
  240. :controls="false"
  241. v-model="item.performance"
  242. :min="0"
  243. ></el-input-number
  244. >分
  245. </el-form-item>
  246. <el-form-item label="考试结果" required>
  247. <el-radio-group v-model="item.result">
  248. <el-radio :label="1">通过</el-radio>
  249. <el-radio :label="0">不通过</el-radio>
  250. </el-radio-group>
  251. </el-form-item>
  252. <el-form-item label="证书编号">
  253. <el-input v-model="item.certificateCode"></el-input>
  254. </el-form-item>
  255. <el-form-item label="登记补充">
  256. <el-input
  257. v-model="item.remark"
  258. type="textarea"
  259. :rows="4"
  260. ></el-input>
  261. </el-form-item>
  262. </el-form>
  263. </div>
  264. </div>
  265. <span slot="footer" class="dialog-footer">
  266. <el-button @click="dialogPLS = false">取消</el-button>
  267. <el-button type="primary" @click="submitChecksPals">确定</el-button>
  268. </span>
  269. </el-dialog>
  270. <el-dialog
  271. :visible.sync="dialogDR"
  272. width="660px"
  273. :show-close="false"
  274. :close-on-click-modal="false"
  275. >
  276. <div slot="title" class="hearders">
  277. <div class="leftTitle">导入</div>
  278. <div class="rightBoxs">
  279. <img
  280. src="@/assets/images/Close@2x.png"
  281. alt=""
  282. @click="dialogDR = false"
  283. />
  284. </div>
  285. </div>
  286. <div>
  287. <div class="swq">
  288. <img
  289. style="width: 182px; height: 168px"
  290. src="@/assets/images/dr.png"
  291. alt=""
  292. />
  293. </div>
  294. <div style="padding-left: 100px">
  295. <p>第一步:下载导入模板</p>
  296. <p style="padding-left: 50px">
  297. <i class="el-icon-upload"></i
  298. ><span class="dowmStys" @click="getDowm">下载模板</span>
  299. </p>
  300. <p>
  301. 第二步:(批量新增):适用于新增预约考试;使用模版整理文件,点击“上传Excel”完成导入
  302. </p>
  303. <label
  304. for="mobles"
  305. class="el-button el-button--primary"
  306. style="margin-left: 50px; padding: 10px 20px"
  307. >上传Excel</label
  308. ><input
  309. style="display: none"
  310. type="file"
  311. id="mobles"
  312. ref="input1"
  313. @change="importMobleadd"
  314. />
  315. <p>
  316. (批量修改):适用于修改预约、分数登记;使用模版整理文件,点击“上传Excel”完成导入
  317. </p>
  318. <label
  319. for="moblest"
  320. class="el-button el-button--primary"
  321. style="margin-left: 50px; padding: 10px 20px"
  322. >上传Excel</label
  323. ><input
  324. style="display: none"
  325. type="file"
  326. id="moblest"
  327. ref="input2"
  328. @change="importMobleEdit"
  329. />
  330. </div>
  331. </div>
  332. <span slot="footer" class="dialog-footer">
  333. <el-button @click="dialogDR = false">取消</el-button>
  334. <!-- <el-button type="primary" @click="submitChecksDR">确定</el-button> -->
  335. </span>
  336. </el-dialog>
  337. </div>
  338. </template>
  339. <script>
  340. import * as baseUrls from "@/utils/request.js";
  341. import searchBoxNew from "@/components/searchBoxNew";
  342. import tableList from "@/components/tableList";
  343. import pagination from "@/components/pagination";
  344. export default {
  345. name: "AsPlanned",
  346. components: { searchBoxNew, tableList, pagination },
  347. data() {
  348. return {
  349. size: "small",
  350. plan: "",
  351. loading: false, //当前表单加载是否加载动画
  352. navText: {
  353. border: true,
  354. title: "计划",
  355. index: 0,
  356. ch: "条",
  357. num: false,
  358. choice: true,
  359. changeWidth: "240px",
  360. addHide: true,
  361. backFatherBtn: {
  362. status: false,
  363. title: "未定义",
  364. },
  365. },
  366. //搜索
  367. formList: [
  368. {
  369. prop: "subscribeStatus",
  370. placeholder: "预约状态",
  371. scope: "select",
  372. options: [
  373. { label: "正常", value: 1 },
  374. { label: "取消", value: 2 },
  375. ],
  376. },
  377. {
  378. prop: "applyId",
  379. placeholder: "考试标题",
  380. scope: "examList",
  381. },
  382. {
  383. prop: "beforeId",
  384. placeholder: "前培标题",
  385. scope: "beforeList",
  386. },
  387. {
  388. prop: "studentType",
  389. placeholder: "学员报名类型",
  390. scope: "select",
  391. options: [
  392. { label: "非补考学员", value: 1 },
  393. { label: "补考学员", value: 2 },
  394. ],
  395. },
  396. {
  397. prop: "examStatus",
  398. placeholder: "考试登记类型",
  399. scope: "select",
  400. options: [
  401. { label: "待登记", value: 0 },
  402. { label: "正常", value: 1 },
  403. { label: "缺考", value: 2 },
  404. { label: "作弊", value: 3 },
  405. { label: "替考", value: 4 },
  406. ],
  407. },
  408. {
  409. prop: "majorId",
  410. placeholder: "所报专业",
  411. scope: "ProfessionalList",
  412. },
  413. {
  414. prop: "realname",
  415. placeholder: "请输入用户名",
  416. },
  417. ],
  418. formData: {
  419. pageSize: 10,
  420. pageNum: 1,
  421. applyId: "",
  422. beforeId: "",
  423. },
  424. // 表单
  425. tableSet: [
  426. {
  427. label: "预约状态",
  428. prop: "subscribeStatus",
  429. hidden: true,
  430. width: "130px",
  431. scope: "isOptions",
  432. options: [
  433. {
  434. label: "正常",
  435. value: 1,
  436. },
  437. {
  438. label: "取消",
  439. value: 2,
  440. },
  441. ],
  442. },
  443. {
  444. label: "前培标记",
  445. prop: "beforeStatus",
  446. hidden: true,
  447. width: "130px",
  448. scope: "isOptions",
  449. options: [
  450. {
  451. label: "已开通",
  452. value: 1,
  453. },
  454. ],
  455. },
  456. {
  457. label: "考试登记",
  458. prop: "examStatus",
  459. hidden: true,
  460. width: "130px",
  461. scope: "isOptionsDZYQ",
  462. options: [
  463. {
  464. label: "待登记",
  465. value: 0,
  466. },
  467. {
  468. label: "正常",
  469. value: 1,
  470. },
  471. {
  472. label: "缺考",
  473. value: 2,
  474. },
  475. {
  476. label: "作弊",
  477. value: 3,
  478. },
  479. {
  480. label: "替考",
  481. value: 4,
  482. },
  483. ],
  484. },
  485. {
  486. label: "考试成绩和结果",
  487. prop1: "performance",
  488. prop2: "result",
  489. hidden: true,
  490. width: "130px",
  491. scope: "resultType",
  492. },
  493. {
  494. label: "证书编号",
  495. prop: "certificateCode",
  496. hidden: true,
  497. width: "130px",
  498. },
  499. {
  500. label: "考试标题",
  501. prop: "applyName",
  502. hidden: true,
  503. width: "130px",
  504. },
  505. {
  506. label: "前培标题",
  507. prop: "beforeName",
  508. hidden: true,
  509. width: "130px",
  510. },
  511. {
  512. label: "学员姓名",
  513. prop: "realname",
  514. hidden: true,
  515. width: "130px",
  516. },
  517. {
  518. label: "学员身份证",
  519. prop: "idCard",
  520. hidden: true,
  521. width: "170px",
  522. },
  523. {
  524. label: "所购商品",
  525. prop1: "goodsCode",
  526. prop2: "goodsName",
  527. prop3: "standPrice",
  528. hidden: true,
  529. width: "220px",
  530. scope: "goodsInfos",
  531. },
  532. {
  533. label: "学员报考类型",
  534. prop: "studentType",
  535. hidden: true,
  536. width: "130px",
  537. scope: "isOptions",
  538. options: [
  539. {
  540. label: "非补考学员",
  541. value: 1,
  542. },
  543. {
  544. label: "补考学员",
  545. value: 2,
  546. },
  547. ],
  548. },
  549. {
  550. label: "所报专业",
  551. prop: "categoryName",
  552. hidden: true,
  553. width: "130px",
  554. },
  555. {
  556. label: "预约场次(考试地点和时间)",
  557. prop1: "applySiteAddress",
  558. prop2: "applySiteExamTime",
  559. prop3: "applySiteStartTime",
  560. prop4: "applySiteEndTime",
  561. hidden: true,
  562. width: "280px",
  563. scope: "changAdress",
  564. },
  565. {
  566. label: "考试次数消耗",
  567. prop: "examExpend",
  568. hidden: true,
  569. width: "130px",
  570. },
  571. {
  572. label: "预约场次(考培地点和时间)",
  573. prop1: "applySiteAddressTrain",
  574. prop2: "applySiteExamTrainTime",
  575. prop3: "applySiteStartTrainTime",
  576. prop4: "applySiteEndTrainTime",
  577. hidden: true,
  578. width: "280px",
  579. scope: "changAdress",
  580. },
  581. {
  582. label: "前培次数消耗",
  583. prop: "beforeExpend",
  584. hidden: true,
  585. width: "130px",
  586. },
  587. {
  588. label: "创建时间",
  589. prop: "createTime",
  590. hidden: true,
  591. scope: "aTimeList",
  592. width: "160px",
  593. },
  594. ],
  595. tableData: [], //表单数据
  596. total: 0, //一共多少条
  597. dialogCG: false,
  598. dialogDJ: false,
  599. dialogQP: false,
  600. dialogPLS: false,
  601. dialogDR: false,
  602. listData: {},
  603. rules: {
  604. examStatus: [
  605. { required: true, message: "请选择考试登记状态", trigger: "change" },
  606. ],
  607. },
  608. ints: 0, //1单选2多选
  609. peopleList: [],
  610. optionsList: [],
  611. beforeStatus: "", //1已开通0未开通
  612. };
  613. },
  614. mounted() {
  615. if (this.$route.query.type == 1) {
  616. this.formData.applyId = Number(this.$route.query.id);
  617. }
  618. if (this.$route.query.type == 2) {
  619. this.formData.beforeId = Number(this.$route.query.id);
  620. }
  621. this.search();
  622. this.getQP();
  623. },
  624. activated() {
  625. this.search();
  626. this.getQP();
  627. },
  628. methods: {
  629. getDowm() {
  630. let url = baseUrls.BASE_IMG_URL + "/oss/images/file/20211228.xls";
  631. let link = document.createElement("a");
  632. let fileName = "导入模板" + ".xlsx";
  633. document.body.appendChild(link);
  634. link.href = url;
  635. link.dowmload = fileName;
  636. link.click();
  637. link.remove();
  638. },
  639. importMobleadd(e) {
  640. var self = this;
  641. var file = e.target.files[0];
  642. let formData = new FormData();
  643. formData.append("file", file);
  644. this.$api
  645. .editsystemimportDatae(formData)
  646. .then((res) => {
  647. if (res.msg) {
  648. let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
  649. let link = document.createElement("a");
  650. let fileName = "失败原因" + ".xlsx";
  651. document.body.appendChild(link);
  652. link.href = url;
  653. link.dowmload = fileName;
  654. link.click();
  655. link.remove();
  656. self.$message.warning("导出失败,请看失败xlsx原因");
  657. } else {
  658. self.$message.success("导入成功");
  659. }
  660. self.search();
  661. })
  662. .finally(() => {
  663. e.target.value = "";
  664. });
  665. },
  666. importMobleEdit(e) {
  667. var self = this;
  668. var file = e.target.files[0];
  669. let formData = new FormData();
  670. formData.append("file", file);
  671. this.$api
  672. .editsystemimportUpdateData(formData)
  673. .then((res) => {
  674. if (res.msg) {
  675. let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
  676. let link = document.createElement("a");
  677. let fileName = "失败原因" + ".xlsx";
  678. document.body.appendChild(link);
  679. link.href = url;
  680. link.dowmload = fileName;
  681. link.click();
  682. link.remove();
  683. self.$message.warning("导出失败,请看失败xlsx原因");
  684. } else {
  685. self.$message.success("导入成功");
  686. }
  687. self.search();
  688. })
  689. .finally(() => {
  690. e.target.value = "";
  691. });
  692. },
  693. openZS(row, int) {
  694. if (row.examStatus !== 1) {
  695. this.$message.warning("考试登记状态为正常的计划才可执行该操作");
  696. return;
  697. }
  698. this.ints = 1;
  699. this.peopleList = [JSON.parse(JSON.stringify(row))];
  700. this.dialogPLS = true;
  701. },
  702. //证书
  703. submitChecksPals() {
  704. for (let i = 0; i < this.peopleList.length; i++) {
  705. if (
  706. !this.peopleList[i].performance &&
  707. this.peopleList[i].performance !== 0
  708. ) {
  709. this.$message.warning(
  710. `第${i + 1}条数据未填写考试成绩,请填写考试成绩!`
  711. );
  712. return;
  713. }
  714. if (!this.peopleList[i].result && this.peopleList[i].result !== 0) {
  715. this.$message.warning(
  716. `第${i + 1}条数据未选择考试结果,请选择考试结果!`
  717. );
  718. return;
  719. }
  720. }
  721. this.$api.appsystemsubscribe(this.peopleList).then((res) => {
  722. if (this.ints === 1) {
  723. this.$message.success("已修改成绩和证书登记");
  724. }
  725. if (this.ints === 2) {
  726. this.$message.success("已批量修改成绩和证书登记");
  727. }
  728. this.search();
  729. this.dialogPLS = false;
  730. });
  731. },
  732. getQP() {
  733. this.$api.inquiresystembefore({ status: 1 }).then((res) => {
  734. this.optionsList = res.rows;
  735. });
  736. },
  737. submitChecksDR() {},
  738. moreActive(int) {
  739. if (int === 1) {
  740. this.$router.push({
  741. path: "bulkImportPlan",
  742. });
  743. return;
  744. }
  745. if (int === 2) {
  746. this.$router.push({
  747. path: "cancelAppointMent",
  748. });
  749. return;
  750. }
  751. if (int === 3) {
  752. this.$router.push({
  753. path: "examRegistration",
  754. });
  755. return;
  756. }
  757. if (int === 5) {
  758. this.$router.push({
  759. path: "formerAccount",
  760. });
  761. return;
  762. }
  763. if (int === 1) {
  764. this.dialogDR = true;
  765. return;
  766. }
  767. if (!this.$refs.tableList.allCheckData.length) {
  768. this.$message.warning("请勾选需要操作的计划");
  769. return;
  770. }
  771. if (int === 2) {
  772. this.$router.push({
  773. path: "cancelAppointMent",
  774. });
  775. return;
  776. this.peopleList = JSON.parse(
  777. JSON.stringify(this.$refs.tableList.allCheckData)
  778. );
  779. var ast = this.peopleList.every((item) => {
  780. return (
  781. item.subscribeStatus === 1 &&
  782. item.beforeStatus !== 1 &&
  783. item.examStatus === 0 &&
  784. !item.examExpend
  785. );
  786. });
  787. if (ast) {
  788. this.listData = {};
  789. this.ints = 2;
  790. this.dialogDJ = true;
  791. } else {
  792. this.$message({
  793. type: "warning",
  794. duration: 7000,
  795. showClose: true,
  796. message:
  797. "请勾选预约考试为正常和前培标记【空】以及考试登记状态为待登记和没有消耗过考试次数的计划",
  798. });
  799. return;
  800. }
  801. }
  802. if (int === 3) {
  803. this.peopleList = JSON.parse(
  804. JSON.stringify(this.$refs.tableList.allCheckData)
  805. );
  806. var ast = this.peopleList.every((item) => {
  807. return item.subscribeStatus === 1;
  808. });
  809. if (ast) {
  810. this.listData = {};
  811. this.ints = 2;
  812. this.dialogCG = true;
  813. } else {
  814. this.$message.warning("请勾选预约状态为正常的计划");
  815. return;
  816. }
  817. }
  818. if (int === 4) {
  819. this.peopleList = JSON.parse(
  820. JSON.stringify(this.$refs.tableList.allCheckData)
  821. );
  822. var ast = this.peopleList.every((item) => {
  823. return item.examStatus === 1 && item.subscribeStatus === 1;
  824. });
  825. if (ast) {
  826. this.listData = {};
  827. this.ints = 2;
  828. this.dialogPLS = true;
  829. } else {
  830. this.$message.warning("请勾选考试登记状态以及预约状态为正常的计划");
  831. return;
  832. }
  833. }
  834. if (int === 5) {
  835. this.peopleList = JSON.parse(
  836. JSON.stringify(this.$refs.tableList.allCheckData)
  837. );
  838. var ast = this.peopleList.every((item) => {
  839. return (
  840. item.examStatus === 0 && item.subscribeStatus === 1
  841. // && item.beforeCount
  842. );
  843. });
  844. if (ast) {
  845. this.listData = {};
  846. this.ints = 2;
  847. this.plan = "";
  848. this.beforeStatus = "";
  849. this.dialogQP = true;
  850. } else {
  851. this.$message({
  852. type: "warning",
  853. duration: 7000,
  854. showClose: true,
  855. message:
  856. "请勾选考试登记为待登记和预约状态为正常以及存在预约前培场次",
  857. });
  858. return;
  859. }
  860. }
  861. },
  862. examBox(row) {
  863. this.ints = 1;
  864. this.listData = JSON.parse(JSON.stringify(row));
  865. this.dialogCG = true;
  866. },
  867. editInfo(v) {
  868. this.addClick(v, 2);
  869. },
  870. submitChecks(formName) {
  871. this.$refs[formName].validate((valid) => {
  872. if (valid) {
  873. if (!this.listData.examStatus) {
  874. this.$message.warning("请选择考试登记状态");
  875. return;
  876. }
  877. this.submitForm();
  878. } else {
  879. console.log("error submit!!");
  880. return false;
  881. }
  882. });
  883. },
  884. submitChecksDJ() {
  885. if (this.ints === 1) {
  886. var data = JSON.parse(JSON.stringify(this.listData));
  887. data.subscribeId = [data.subscribeId];
  888. data.subscribeStatus = 2;
  889. this.$api.editsystemsubscribe(data).then((res) => {
  890. this.$message.success("已取消预约");
  891. this.dialogDJ = false;
  892. this.search();
  893. });
  894. }
  895. if (this.ints === 2) {
  896. var data = JSON.parse(JSON.stringify(this.listData));
  897. var arrays = [];
  898. this.peopleList.forEach((item) => {
  899. arrays.push(item.subscribeId);
  900. });
  901. data.subscribeId = arrays;
  902. data.subscribeStatus = 2;
  903. this.$api.editsystemsubscribe(data).then((res) => {
  904. this.$message.success("已批量取消预约");
  905. this.dialogDJ = false;
  906. this.search();
  907. });
  908. }
  909. },
  910. submitForm() {
  911. if (this.ints === 1) {
  912. var data = JSON.parse(JSON.stringify(this.listData));
  913. data.subscribeId = [data.subscribeId];
  914. this.$api.editsystemsubscribe(data).then((res) => {
  915. this.$message.success("考试登记修改成功");
  916. this.dialogCG = false;
  917. this.search();
  918. });
  919. }
  920. if (this.ints === 2) {
  921. var data = JSON.parse(JSON.stringify(this.listData));
  922. var arrays = [];
  923. this.peopleList.forEach((item) => {
  924. arrays.push(item.subscribeId);
  925. });
  926. data.subscribeId = arrays;
  927. this.$api.editsystemsubscribe(data).then((res) => {
  928. this.$message.success("批量考试登记修改成功");
  929. this.dialogCG = false;
  930. this.search();
  931. });
  932. }
  933. },
  934. submitChecksQP() {
  935. var data = JSON.parse(JSON.stringify(this.listData));
  936. if (!this.plan && this.beforeStatus === 1) {
  937. this.$message.warning("请选择前培计划");
  938. return;
  939. }
  940. if (!this.beforeStatus) {
  941. this.$message.warning("请选择是或否");
  942. return;
  943. }
  944. var arrays = [];
  945. this.peopleList.forEach((item) => {
  946. arrays.push(item.subscribeId);
  947. });
  948. data.subscribeId = arrays;
  949. if (this.beforeStatus === 1) {
  950. data.beforeStatus = 1;
  951. data.beforeId = this.plan;
  952. }
  953. if (this.beforeStatus === 2) {
  954. data.beforeStatus = 0;
  955. data.beforeId = "";
  956. }
  957. this.$api.editsystemsubscribe(data).then((res) => {
  958. this.$message.success("前培账号已开通标记修改成功");
  959. this.dialogQP = false;
  960. this.search();
  961. });
  962. },
  963. search(int) {
  964. this.loading = true;
  965. if (int === 1) {
  966. this.formData.pageNum = 1;
  967. }
  968. if (int === 2) {
  969. this.formData = {
  970. pageSize: 10,
  971. pageNum: 1,
  972. };
  973. }
  974. this.$api
  975. .inquiresystemsubscribelist(this.formData)
  976. .then((res) => {
  977. this.$refs.tableList.allCheckData = [];
  978. this.tableData = res.rows;
  979. this.total = res.total;
  980. this.navText.index = res.total;
  981. })
  982. .finally(() => {
  983. this.loading = false;
  984. });
  985. },
  986. init() {
  987. this.search(2);
  988. },
  989. del(v) {
  990. this.$alert(
  991. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  992. "提示",
  993. {
  994. dangerouslyUseHTMLString: true,
  995. }
  996. )
  997. .then(() => {
  998. var data = {
  999. gradeId: v.gradeId,
  1000. status: -1,
  1001. };
  1002. this.$api.editGradegrade(data).then((res) => {
  1003. this.$message.success("删除成功");
  1004. this.search();
  1005. });
  1006. })
  1007. .catch(() => {
  1008. this.$message({
  1009. type: "info",
  1010. message: "已取消删除",
  1011. });
  1012. });
  1013. },
  1014. addClick(v, int) {
  1015. console.log(v);
  1016. // int = 2详情 3学员管理
  1017. if (v === undefined) {
  1018. // 添加班级
  1019. this.$router.push({
  1020. path: "addClass",
  1021. });
  1022. } else {
  1023. if (int === 2) {
  1024. //班级详情
  1025. this.$router.push({
  1026. path: "manageClass",
  1027. query: {
  1028. id: v.gradeId,
  1029. },
  1030. });
  1031. }
  1032. if (int === 3) {
  1033. // 学员管理
  1034. this.$router.push({
  1035. path: "studentMenu",
  1036. query: {
  1037. id: v.gradeId,
  1038. goodsId: v.goodsList[0].goodsId,
  1039. },
  1040. });
  1041. }
  1042. }
  1043. },
  1044. handleSizeChange(v) {
  1045. this.formData.pageSize = v;
  1046. this.formData.pageNum = 1;
  1047. this.search();
  1048. },
  1049. handleCurrentChange(v) {
  1050. this.formData.pageNum = v;
  1051. this.search();
  1052. },
  1053. },
  1054. };
  1055. </script>
  1056. <style lang="less" scoped>
  1057. /deep/.el-button {
  1058. border-radius: 8px;
  1059. }
  1060. /deep/.el-dialog {
  1061. border-radius: 8px;
  1062. .el-dialog__header {
  1063. padding: 0;
  1064. .hearders {
  1065. height: 40px;
  1066. display: flex;
  1067. align-items: center;
  1068. justify-content: space-between;
  1069. padding: 0px 18px 0px 20px;
  1070. border-bottom: 1px solid #e2e2e2;
  1071. .leftTitle {
  1072. font-size: 14px;
  1073. font-weight: bold;
  1074. color: #2f4378;
  1075. }
  1076. .rightBoxs {
  1077. display: flex;
  1078. align-items: center;
  1079. img {
  1080. width: 14px;
  1081. height: 14px;
  1082. margin-left: 13px;
  1083. cursor: pointer;
  1084. }
  1085. }
  1086. }
  1087. }
  1088. .el-dialog__footer {
  1089. padding: 0;
  1090. .dialog-footer {
  1091. padding: 0px 40px;
  1092. height: 70px;
  1093. border-top: 1px solid #e2e2e2;
  1094. display: flex;
  1095. align-items: center;
  1096. justify-content: flex-end;
  1097. }
  1098. }
  1099. }
  1100. .imgBox {
  1101. width: 100%;
  1102. // height: 210px;
  1103. border: 1px solid #e2e2e2;
  1104. border-radius: 8px;
  1105. padding: 8px 8px 3px;
  1106. display: flex;
  1107. flex-direction: column;
  1108. align-items: center;
  1109. .imgLabel {
  1110. flex: 1;
  1111. width: 100%;
  1112. border: 1px dotted #e2e2e2;
  1113. color: #999;
  1114. font-size: 14px;
  1115. cursor: pointer;
  1116. border-radius: 8px;
  1117. .msPhoto {
  1118. display: flex;
  1119. justify-content: center;
  1120. align-items: center;
  1121. max-width: 100%;
  1122. max-height: 270px;
  1123. img {
  1124. max-width: 100%;
  1125. max-height: 270px;
  1126. }
  1127. }
  1128. .imgbbx {
  1129. display: flex;
  1130. flex-direction: column;
  1131. align-items: center;
  1132. justify-content: center;
  1133. width: 100%;
  1134. height: 100%;
  1135. i {
  1136. font-weight: bold;
  1137. margin: 14px 0;
  1138. font-size: 24px;
  1139. }
  1140. }
  1141. }
  1142. p {
  1143. margin: 5px 0px;
  1144. }
  1145. }
  1146. .aListBottom {
  1147. margin-left: 20px;
  1148. padding: 0px 6px;
  1149. border: 1px solid #999;
  1150. border-radius: 4px;
  1151. height: 30px;
  1152. line-height: 30px;
  1153. display: inline-block;
  1154. }
  1155. .liBVS {
  1156. margin-right: 20px;
  1157. margin-bottom: 12px;
  1158. padding: 0px 6px;
  1159. border: 1px solid #999;
  1160. border-radius: 4px;
  1161. height: 30px;
  1162. line-height: 30px;
  1163. display: inline-block;
  1164. float: left;
  1165. }
  1166. .clsw {
  1167. margin-left: 4px;
  1168. cursor: pointer;
  1169. color: #f56c6c;
  1170. }
  1171. .swq {
  1172. text-align: center;
  1173. border-bottom: 1px solid #eee;
  1174. }
  1175. .dowmStys {
  1176. color: blue;
  1177. cursor: pointer;
  1178. }
  1179. </style>