asPlanned.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  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. <template slot="month">
  11. <el-select
  12. size="small"
  13. v-model="month"
  14. placeholder="月份"
  15. @change="getCanActiveApplyMonth"
  16. >
  17. <el-option
  18. v-for="item in monthList"
  19. :key="item.value"
  20. :label="item.label"
  21. :value="item.value"
  22. >
  23. </el-option>
  24. </el-select>
  25. <el-select
  26. style="margin-left: 10px"
  27. size="small"
  28. v-model="day"
  29. v-if="month"
  30. placeholder="日期"
  31. @change="getCanActiveApply"
  32. >
  33. <el-option
  34. v-for="item in dayList"
  35. :key="item.value"
  36. :label="item.label"
  37. :value="item.value"
  38. >
  39. </el-option>
  40. </el-select>
  41. <el-select
  42. style="margin-left: 10px"
  43. v-if="month || day"
  44. size="small"
  45. v-model="monthApplyIndex"
  46. placeholder="考试场次"
  47. >
  48. <el-option
  49. v-for="(item, index) in monthApplyList"
  50. :key="index"
  51. :label="item.examSession"
  52. :value="index"
  53. >
  54. </el-option>
  55. </el-select>
  56. </template>
  57. </search-box-new>
  58. <table-list
  59. rowKey="subscribeId"
  60. :tableSets="tableSet"
  61. :tableData="tableData"
  62. :navText="navText"
  63. @addClick="addClick"
  64. :loading="loading"
  65. @editInfo="editInfo"
  66. ref="tableList"
  67. >
  68. <template slot="customize">
  69. <el-popover title="" width="200" trigger="click">
  70. <div>
  71. <el-button size="small" type="primary" @click="controlsType(1)"
  72. >快捷筛选</el-button
  73. >
  74. <el-button size="small" type="primary" @click="controlsType(2)"
  75. >开通题库</el-button
  76. >
  77. </div>
  78. <el-button
  79. v-if="false"
  80. :size="size"
  81. slot="reference"
  82. type="success"
  83. style="margin-right: 10px"
  84. >更多</el-button
  85. >
  86. </el-popover>
  87. <el-button size="small" type="primary" @click="openBank"
  88. >开通题库</el-button
  89. >
  90. <el-button :size="size" type="warning" @click="moreActive(2)"
  91. >取消预约</el-button
  92. >
  93. <el-button :size="size" type="primary" @click="moreActive(5)"
  94. >前培账号标记</el-button
  95. >
  96. <el-button :size="size" type="primary" @click="moreActive(3)"
  97. >考试登记</el-button
  98. >
  99. <!-- <el-button :size="size" type="primary" @click="moreActive(4)"
  100. >批量:成绩证书登记</el-button
  101. > -->
  102. <el-button :size="size" type="success" @click="moreActive(1)"
  103. >批量导入</el-button
  104. >
  105. </template>
  106. <template slot="btn" slot-scope="props">
  107. <el-button
  108. type="text"
  109. @click="examBox(props.scope.row, 2)"
  110. :disabled="props.scope.row.subscribeStatus === 2"
  111. >考试登记</el-button
  112. >
  113. <el-button
  114. type="text"
  115. @click="openZS(props.scope.row, 2)"
  116. :disabled="props.scope.row.subscribeStatus === 2"
  117. >成绩和证书登记</el-button
  118. >
  119. </template>
  120. </table-list>
  121. <pagination
  122. :total="total"
  123. :pageSize="formData.pageSize"
  124. :currentPage="formData.pageNum"
  125. @handleSizeChange="handleSizeChange"
  126. @handleCurrentChange="handleCurrentChange"
  127. />
  128. <el-dialog
  129. :visible.sync="dialogCG"
  130. width="560px"
  131. :show-close="false"
  132. :close-on-click-modal="false"
  133. >
  134. <div slot="title" class="hearders">
  135. <div class="leftTitle">考试登记</div>
  136. <div class="rightBoxs">
  137. <img
  138. src="@/assets/images/Close@2x.png"
  139. alt=""
  140. @click="dialogCG = false"
  141. />
  142. </div>
  143. </div>
  144. <div>
  145. <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
  146. <ul v-if="ints === 2">
  147. <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
  148. {{ item.realname }}
  149. <i
  150. v-if="peopleList.length > 1"
  151. class="el-icon-error clsw"
  152. @click="peopleList.splice(index, 1)"
  153. ></i>
  154. </li>
  155. <div style="clear: both"></div>
  156. </ul>
  157. <el-form
  158. :model="listData"
  159. label-width="120px"
  160. class="demo-ruleForm"
  161. :rules="rules"
  162. ref="listData"
  163. >
  164. <el-form-item label="考试登记状态" prop="examStatus">
  165. <el-radio-group v-model="listData.examStatus">
  166. <el-radio :label="1">正常</el-radio>
  167. <el-radio :label="2">缺考</el-radio>
  168. <el-radio :label="3">作弊</el-radio>
  169. <el-radio :label="4">替考</el-radio>
  170. </el-radio-group>
  171. </el-form-item>
  172. <el-form-item label="考试登记补充" prop="remark">
  173. <el-input
  174. v-model="listData.remark"
  175. type="textarea"
  176. :rows="4"
  177. ></el-input>
  178. </el-form-item>
  179. </el-form>
  180. </div>
  181. <span slot="footer" class="dialog-footer">
  182. <el-button @click="dialogCG = false">取消</el-button>
  183. <el-button type="primary" @click="submitChecks('listData')"
  184. >确定</el-button
  185. >
  186. </span>
  187. </el-dialog>
  188. <el-dialog
  189. :visible.sync="dialogDJ"
  190. width="560px"
  191. :show-close="false"
  192. :close-on-click-modal="false"
  193. >
  194. <div slot="title" class="hearders">
  195. <div class="leftTitle">取消预约</div>
  196. <div class="rightBoxs">
  197. <img
  198. src="@/assets/images/Close@2x.png"
  199. alt=""
  200. @click="dialogDJ = false"
  201. />
  202. </div>
  203. </div>
  204. <div>
  205. <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
  206. <ul v-if="ints === 2">
  207. <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
  208. {{ item.realname }}
  209. <i
  210. v-if="peopleList.length > 1"
  211. class="el-icon-error clsw"
  212. @click="peopleList.splice(index, 1)"
  213. ></i>
  214. </li>
  215. <div style="clear: both"></div>
  216. </ul>
  217. <p style="margin: 0px">您确定要取消所选学员的考试预约吗?</p>
  218. <p style="margin: 0px">取消后将无法恢复,请慎重考虑!</p>
  219. </div>
  220. <span slot="footer" class="dialog-footer">
  221. <el-button @click="dialogDJ = false">取消</el-button>
  222. <el-button type="primary" @click="submitChecksDJ">确定</el-button>
  223. </span>
  224. </el-dialog>
  225. <el-dialog
  226. :visible.sync="dialogQP"
  227. width="460px"
  228. :show-close="false"
  229. :close-on-click-modal="false"
  230. >
  231. <div slot="title" class="hearders">
  232. <div class="leftTitle">前培账号已开通标记</div>
  233. <div class="rightBoxs">
  234. <img
  235. src="@/assets/images/Close@2x.png"
  236. alt=""
  237. @click="dialogQP = false"
  238. />
  239. </div>
  240. </div>
  241. <div>
  242. <div v-if="ints === 1" class="aListBottom">{{ listData.realname }}</div>
  243. <ul v-if="ints === 2" style="margin: 0px">
  244. <li class="liBVS" v-for="(item, index) in peopleList" :key="index">
  245. {{ item.realname }}
  246. <i
  247. v-if="peopleList.length > 1"
  248. class="el-icon-error clsw"
  249. @click="peopleList.splice(index, 1)"
  250. ></i>
  251. </li>
  252. <div style="clear: both"></div>
  253. </ul>
  254. <el-select
  255. size="small"
  256. v-model="plan"
  257. placeholder="请选择前培计划"
  258. style="margin-bottom: 12px"
  259. >
  260. <el-option
  261. v-for="item in optionsList"
  262. :key="item.beforeId"
  263. :label="item.beforeName"
  264. :value="item.beforeId"
  265. >
  266. </el-option>
  267. </el-select>
  268. <p style="margin: 0px">所选学员的前培账号标记为【已开通】吗?</p>
  269. <div style="text-align: center; margin-top: 12px">
  270. <el-radio-group v-model="beforeStatus">
  271. <el-radio :label="1">是</el-radio>
  272. <el-radio :label="2">否</el-radio>
  273. </el-radio-group>
  274. </div>
  275. </div>
  276. <span slot="footer" class="dialog-footer">
  277. <el-button @click="dialogQP = false">取消</el-button>
  278. <el-button type="primary" @click="submitChecksQP">确定</el-button>
  279. </span>
  280. </el-dialog>
  281. <el-dialog
  282. :visible.sync="dialogPLS"
  283. width="460px"
  284. :show-close="false"
  285. :close-on-click-modal="false"
  286. >
  287. <div slot="title" class="hearders">
  288. <div class="leftTitle">成绩和证书登记</div>
  289. <div class="rightBoxs">
  290. <img
  291. src="@/assets/images/Close@2x.png"
  292. alt=""
  293. @click="dialogPLS = false"
  294. />
  295. </div>
  296. </div>
  297. <div>
  298. <div v-for="(item, index) in peopleList" :key="index">
  299. <div class="aListBottom">
  300. {{ item.realname }}
  301. <i
  302. v-if="peopleList.length > 1"
  303. class="el-icon-error clsw"
  304. @click="peopleList.splice(index, 1)"
  305. ></i>
  306. </div>
  307. <el-form label-width="100px">
  308. <el-form-item label="考试成绩" required>
  309. <el-input-number
  310. :controls="false"
  311. v-model="item.performance"
  312. :min="0"
  313. ></el-input-number
  314. >分
  315. </el-form-item>
  316. <el-form-item label="考试结果" required>
  317. <el-radio-group v-model="item.result">
  318. <el-radio :label="1">通过</el-radio>
  319. <el-radio :label="0">不通过</el-radio>
  320. </el-radio-group>
  321. </el-form-item>
  322. <el-form-item label="证书编号">
  323. <el-input v-model="item.certificateCode"></el-input>
  324. </el-form-item>
  325. <el-form-item label="登记补充">
  326. <el-input
  327. v-model="item.remark"
  328. type="textarea"
  329. :rows="4"
  330. ></el-input>
  331. </el-form-item>
  332. </el-form>
  333. </div>
  334. </div>
  335. <span slot="footer" class="dialog-footer">
  336. <el-button @click="dialogPLS = false">取消</el-button>
  337. <el-button type="primary" @click="submitChecksPals">确定</el-button>
  338. </span>
  339. </el-dialog>
  340. <el-dialog
  341. :visible.sync="dialogDR"
  342. width="660px"
  343. :show-close="false"
  344. :close-on-click-modal="false"
  345. >
  346. <div slot="title" class="hearders">
  347. <div class="leftTitle">导入</div>
  348. <div class="rightBoxs">
  349. <img
  350. src="@/assets/images/Close@2x.png"
  351. alt=""
  352. @click="dialogDR = false"
  353. />
  354. </div>
  355. </div>
  356. <div>
  357. <div class="swq">
  358. <img
  359. style="width: 182px; height: 168px"
  360. src="@/assets/images/dr.png"
  361. alt=""
  362. />
  363. </div>
  364. <div style="padding-left: 100px">
  365. <p>第一步:下载导入模板</p>
  366. <p style="padding-left: 50px">
  367. <i class="el-icon-upload"></i
  368. ><span class="dowmStys" @click="getDowm">下载模板</span>
  369. </p>
  370. <p>
  371. 第二步:(批量新增):适用于新增预约考试;使用模版整理文件,点击“上传Excel”完成导入
  372. </p>
  373. <label
  374. for="mobles"
  375. class="el-button el-button--primary"
  376. style="margin-left: 50px; padding: 10px 20px"
  377. >上传Excel</label
  378. ><input
  379. style="display: none"
  380. type="file"
  381. id="mobles"
  382. ref="input1"
  383. @change="importMobleadd"
  384. />
  385. <p>
  386. (批量修改):适用于修改预约、分数登记;使用模版整理文件,点击“上传Excel”完成导入
  387. </p>
  388. <label
  389. for="moblest"
  390. class="el-button el-button--primary"
  391. style="margin-left: 50px; padding: 10px 20px"
  392. >上传Excel</label
  393. ><input
  394. style="display: none"
  395. type="file"
  396. id="moblest"
  397. ref="input2"
  398. @change="importMobleEdit"
  399. />
  400. </div>
  401. </div>
  402. <span slot="footer" class="dialog-footer">
  403. <el-button @click="dialogDR = false">取消</el-button>
  404. <!-- <el-button type="primary" @click="submitChecksDR">确定</el-button> -->
  405. </span>
  406. </el-dialog>
  407. <goodsList ref="goodsList" @backMsg="search(3)" />
  408. <batch-import-dialoga
  409. :dialogVisible.sync="dialogVisible"
  410. temUrl="/oss/images/file/20230908/1694137357751.xls"
  411. apiKey="importorderquestionopen"
  412. :isCheck="false"
  413. :isShowTip="false"
  414. :isSuccessBack="true"
  415. @success="search"
  416. type="Excel"
  417. ></batch-import-dialoga>
  418. </div>
  419. </template>
  420. <script>
  421. import batchImportDialoga from "./batchImportDialog.vue";
  422. import goodsList from "./goodsListOpen";
  423. import * as baseUrls from "@/utils/request.js";
  424. import searchBoxNew from "@/components/searchBoxNew";
  425. import tableList from "@/components/tableList";
  426. import pagination from "@/components/pagination";
  427. export default {
  428. name: "AsPlanned",
  429. components: { batchImportDialoga,searchBoxNew, tableList, pagination, goodsList },
  430. data() {
  431. return {
  432. dialogVisible:false,
  433. month: "",
  434. monthList: [
  435. { label: "一月", value: "01" },
  436. { label: "二月", value: "02" },
  437. { label: "三月", value: "03" },
  438. { label: "四月", value: "04" },
  439. { label: "五月", value: "05" },
  440. { label: "六月", value: "06" },
  441. { label: "七月", value: "07" },
  442. { label: "八月", value: "08" },
  443. { label: "九月", value: "09" },
  444. { label: "十月", value: "10" },
  445. { label: "十一月", value: "11" },
  446. { label: "十二月", value: "12" },
  447. ],
  448. day: "",
  449. dayList: [],
  450. monthApplyIndex: "",
  451. monthApplyList: [],
  452. size: "small",
  453. plan: "",
  454. loading: false, //当前表单加载是否加载动画
  455. navText: {
  456. border: true,
  457. title: "计划",
  458. index: 0,
  459. ch: "条",
  460. num: false,
  461. tableHide: true,
  462. choice: true,
  463. changeWidth: "240px",
  464. openCheckMore: true,
  465. addHide: true,
  466. backFatherBtn: {
  467. status: false,
  468. title: "未定义",
  469. },
  470. },
  471. //搜索
  472. formList: [
  473. {
  474. prop: "educationTypeId",
  475. placeholder: "教育类型",
  476. scope: "educationType",
  477. },
  478. {
  479. prop: "businessId",
  480. placeholder: "业务层次",
  481. scope: "businessLevel",
  482. edu: "educationTypeId",
  483. },
  484. {
  485. prop: "subscribeStatus",
  486. placeholder: "预约状态",
  487. scope: "select",
  488. options: [
  489. { label: "正常", value: 1 },
  490. { label: "取消", value: 2 },
  491. ],
  492. },
  493. {
  494. prop: "applyId",
  495. placeholder: "考试标题",
  496. scope: "examLists",
  497. },
  498. {
  499. prop: "beforeId",
  500. placeholder: "前培标题",
  501. scope: "beforeList",
  502. },
  503. {
  504. prop: "syncStatus",
  505. placeholder: "同步状态",
  506. scope: "select",
  507. options: [
  508. { label: "未同步", value: 0 },
  509. { label: "成功", value: 1 },
  510. { label: "失败", value: 2 },
  511. ],
  512. },
  513. {
  514. prop: "studentType",
  515. placeholder: "学员报名类型",
  516. scope: "select",
  517. options: [
  518. { label: "新考学员", value: 1 },
  519. { label: "补考学员", value: 2 },
  520. ],
  521. },
  522. {
  523. prop: "examStatus",
  524. placeholder: "考试登记类型",
  525. scope: "select",
  526. options: [
  527. { label: "待登记", value: 0 },
  528. { label: "正常", value: 1 },
  529. { label: "缺考", value: 2 },
  530. { label: "作弊", value: 3 },
  531. { label: "替考", value: 4 },
  532. ],
  533. },
  534. {
  535. prop: "majorId",
  536. placeholder: "所报专业",
  537. scope: "ProfessionalList",
  538. },
  539. {
  540. prop: "realname",
  541. placeholder: "请输入用户名",
  542. },
  543. {
  544. prop: "month",
  545. placeholder: "月份",
  546. scope: "slot",
  547. slotName: "month",
  548. },
  549. ],
  550. formData: {
  551. pageSize: 10,
  552. pageNum: 1,
  553. applyId: "",
  554. beforeId: "",
  555. },
  556. // 表单
  557. tableSet: [
  558. {
  559. label: "教育类型",
  560. prop: "educationTypeName",
  561. hidden: true,
  562. },
  563. {
  564. label: "业务层次",
  565. prop1: "projectName",
  566. prop2: "businessName",
  567. hidden: true,
  568. scope: "InfoMore",
  569. },
  570. {
  571. label: "考试机会",
  572. prop1: "examNumber",
  573. prop2: "expendNumber",
  574. hidden: true,
  575. scope: "chance",
  576. },
  577. {
  578. label: "前培机会",
  579. prop1: "doNumber",
  580. prop2: "expendBefore",
  581. hidden: true,
  582. scope: "chance",
  583. },
  584. {
  585. label: "预约状态",
  586. prop: "subscribeStatus",
  587. hidden: true,
  588. scope: "isOptions",
  589. options: [
  590. {
  591. label: "正常",
  592. value: 1,
  593. },
  594. {
  595. label: "取消",
  596. value: 2,
  597. },
  598. ],
  599. },
  600. {
  601. label: "前培标记",
  602. prop: "beforeStatus",
  603. hidden: true,
  604. scope: "isOptions",
  605. options: [
  606. {
  607. label: "已开通",
  608. value: 1,
  609. },
  610. ],
  611. },
  612. {
  613. label: "考试登记",
  614. prop: "examStatus",
  615. hidden: true,
  616. scope: "isOptionsDZYQ",
  617. options: [
  618. {
  619. label: "待登记",
  620. value: 0,
  621. },
  622. {
  623. label: "正常",
  624. value: 1,
  625. },
  626. {
  627. label: "缺考",
  628. value: 2,
  629. },
  630. {
  631. label: "作弊",
  632. value: 3,
  633. },
  634. {
  635. label: "替考",
  636. value: 4,
  637. },
  638. ],
  639. },
  640. {
  641. label: "考试成绩和结果",
  642. prop1: "performance",
  643. prop2: "result",
  644. hidden: true,
  645. scope: "resultType",
  646. },
  647. {
  648. label: "证书编号",
  649. prop: "certificateCode",
  650. hidden: true,
  651. },
  652. {
  653. label: "考试标题",
  654. prop: "applyName",
  655. hidden: true,
  656. },
  657. {
  658. label: "前培标题",
  659. prop: "beforeName",
  660. hidden: true,
  661. },
  662. {
  663. label: "学员姓名",
  664. prop: "realname",
  665. hidden: true,
  666. },
  667. {
  668. label: "学员身份证",
  669. prop: "idCard",
  670. hidden: true,
  671. },
  672. {
  673. label: "所购商品",
  674. prop1: "goodsCode",
  675. prop2: "goodsName",
  676. prop3: "standPrice",
  677. hidden: true,
  678. scope: "goodsInfos",
  679. },
  680. {
  681. label: "学员报考类型",
  682. prop: "studentType",
  683. hidden: true,
  684. scope: "isOptions",
  685. options: [
  686. {
  687. label: "新考学员",
  688. value: 1,
  689. },
  690. {
  691. label: "补考学员",
  692. value: 2,
  693. },
  694. ],
  695. },
  696. {
  697. label: "所报专业",
  698. prop: "categoryName",
  699. hidden: true,
  700. },
  701. {
  702. label: "预约场次(考试地点和时间)",
  703. prop1: "applySiteAddress",
  704. prop2: "applySiteExamTime",
  705. prop3: "applySiteStartTime",
  706. prop4: "applySiteEndTime",
  707. prop5: "examineeCode",
  708. prop6: "seatNumber",
  709. prop7: "syncStatus",
  710. hidden: true,
  711. scope: "changAdress",
  712. },
  713. {
  714. label: "考试次数消耗",
  715. prop: "examExpend",
  716. hidden: true,
  717. },
  718. {
  719. label: "预约场次(考培地点和时间)",
  720. prop1: "applySiteAddressTrain",
  721. prop2: "applySiteExamTrainTime",
  722. prop3: "applySiteStartTrainTime",
  723. prop4: "applySiteEndTrainTime",
  724. hidden: true,
  725. scope: "changAdressKP",
  726. },
  727. {
  728. label: "前培次数消耗",
  729. prop: "beforeExpend",
  730. hidden: true,
  731. },
  732. {
  733. label: "创建时间",
  734. prop: "createTime",
  735. hidden: true,
  736. scope: "aTimeList",
  737. },
  738. ],
  739. tableData: [], //表单数据
  740. total: 0, //一共多少条
  741. dialogCG: false,
  742. dialogDJ: false,
  743. dialogQP: false,
  744. dialogPLS: false,
  745. dialogDR: false,
  746. listData: {},
  747. rules: {
  748. examStatus: [
  749. { required: true, message: "请选择考试登记状态", trigger: "change" },
  750. ],
  751. },
  752. ints: 0, //1单选2多选
  753. peopleList: [],
  754. optionsList: [],
  755. beforeStatus: "", //1已开通0未开通
  756. };
  757. },
  758. mounted() {
  759. // if (this.$route.params.educationId && this.$route.params.businessId) {
  760. // this.$set(
  761. // this.formData,
  762. // "educationTypeId",
  763. // this.$route.params.educationId
  764. // );
  765. // this.$set(this.formData, "businessId", this.$route.params.businessId);
  766. // this.$refs.searchBox.changeEducationType(
  767. // this.$route.params.educationId,
  768. // true
  769. // );
  770. // this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
  771. // }
  772. if (this.$route.query.type == 1) {
  773. this.formData.applyId = Number(this.$route.query.id);
  774. }
  775. if (this.$route.query.type == 2) {
  776. this.formData.beforeId = Number(this.$route.query.id);
  777. }
  778. if (this.$route.params.type == 3) {
  779. this.formData.applyId = Number(this.$route.params.id);
  780. this.formData.syncStatus = 2;
  781. }
  782. this.search();
  783. this.getQP();
  784. },
  785. activated() {
  786. this.search();
  787. this.getQP();
  788. },
  789. methods: {
  790. /**
  791. * 默认选择考前培训-施工七大员
  792. */
  793. moRenBus() {
  794. return new Promise((resolve, reject) => {
  795. this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
  796. for (let i = 0; i < res.rows.length; i++) {
  797. if (res.rows[i].educationName === "考前培训") {
  798. this.$set(this.formData, "educationTypeId", res.rows[i].id);
  799. this.$refs.searchBox.changeEducationType(res.rows[i].id, true);
  800. this.$api
  801. .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
  802. .then((result) => {
  803. for (let j = 0; j < result.rows.length; j++) {
  804. if (
  805. result.rows[j].projectName === "施工现场专业人员" &&
  806. result.rows[j].businessName === "七大员"
  807. ) {
  808. this.$set(this.formData, "businessId", result.rows[j].id);
  809. this.$refs.searchBox.changeBusinessLevel(
  810. result.rows[j].id
  811. );
  812. resolve();
  813. break;
  814. }
  815. }
  816. });
  817. break;
  818. }
  819. }
  820. });
  821. });
  822. },
  823. openBank() {
  824. this.dialogVisible = true
  825. },
  826. async controlsType(type) {
  827. if (type == 1) {
  828. await this.moRenBus();
  829. this.$set(this.formData, "subscribeStatus", 1);
  830. this.search(1);
  831. this.$refs.tableList.clearMoreActive();
  832. }
  833. if (type == 2) {
  834. if (this.$refs.tableList.allCheckData.length === 0) {
  835. this.$message.warning("请选择需要开通题库的数据");
  836. return;
  837. }
  838. const STATUS = this.$refs.tableList.allCheckData.every((i) => {
  839. return (
  840. i.subscribeStatus == 1 &&
  841. i.educationTypeName == "考前培训" &&
  842. i.projectName == "施工现场专业人员" &&
  843. i.businessName == "七大员"
  844. );
  845. });
  846. if (STATUS) {
  847. this.$refs.goodsList.showBox(
  848. this.$refs.tableList.allCheckData.map((i) => i.subscribeId)
  849. );
  850. } else {
  851. this.$message.error(
  852. `请选择业务类型为《考前培训-施工现场专业人员-七大员》及预约状态为正常的数据`
  853. );
  854. return;
  855. }
  856. }
  857. },
  858. getMonthDays(target) {
  859. let date = new Date(target + "-01"); // 移动端使用格式要转成: "2018/10/01"
  860. date.setMonth(date.getMonth() + 1); // 先设置为下个月
  861. date.setDate(0); // 再置0,变成当前月最后一天
  862. return date.getDate(); // 当前月最后一天即当前月拥有的天数
  863. },
  864. getCanActiveApplyMonth() {
  865. this.day = "";
  866. var year = new Date().getFullYear();
  867. var num = this.getMonthDays(year + "-" + this.month);
  868. var list = [];
  869. for (let i = 0; i < num; i++) {
  870. list.push({
  871. label: i + 1 + "号",
  872. value: i < 10 ? "0" + (i + 1) : i + 1,
  873. });
  874. }
  875. this.dayList = list || [];
  876. var a = year + this.month + this.day;
  877. this.getSearchApply(a);
  878. },
  879. getCanActiveApply() {
  880. var year = new Date().getFullYear();
  881. var a = year + "" + this.month + "" + this.day;
  882. this.getSearchApply(a);
  883. },
  884. getSearchApply(i) {
  885. this.monthApplyIndex = "";
  886. this.$api
  887. .obtainsystemsubscribesessiondata(i)
  888. .then((res) => {
  889. this.monthApplyList = res.data;
  890. })
  891. .catch(() => {
  892. this.monthApplyList = [];
  893. });
  894. },
  895. getDowm() {
  896. let url =
  897. baseUrls.BASE_IMG_URL +
  898. "/oss/images/file/20211228.xls" +
  899. `?time=${this.$methodsTools.getNewTime()}`;
  900. let link = document.createElement("a");
  901. let fileName = "导入模板" + ".xlsx";
  902. document.body.appendChild(link);
  903. link.href = url;
  904. link.dowmload = fileName;
  905. link.click();
  906. link.remove();
  907. },
  908. importMobleadd(e) {
  909. var self = this;
  910. var file = e.target.files[0];
  911. let formData = new FormData();
  912. formData.append("file", file);
  913. this.$api
  914. .editsystemsubscribeimportData(formData)
  915. .then((res) => {
  916. if (res.msg) {
  917. let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
  918. let link = document.createElement("a");
  919. let fileName = "失败原因" + ".xlsx";
  920. document.body.appendChild(link);
  921. link.href = url;
  922. link.dowmload = fileName;
  923. link.click();
  924. link.remove();
  925. self.$message.warning("导出失败,请看失败xlsx原因");
  926. } else {
  927. self.$message.success("导入成功");
  928. }
  929. self.search();
  930. })
  931. .finally(() => {
  932. e.target.value = "";
  933. });
  934. },
  935. importMobleEdit(e) {
  936. var self = this;
  937. var file = e.target.files[0];
  938. let formData = new FormData();
  939. formData.append("file", file);
  940. this.$api
  941. .editsystemimportUpdateData(formData)
  942. .then((res) => {
  943. if (res.msg) {
  944. let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
  945. let link = document.createElement("a");
  946. let fileName = "失败原因" + ".xlsx";
  947. document.body.appendChild(link);
  948. link.href = url;
  949. link.dowmload = fileName;
  950. link.click();
  951. link.remove();
  952. self.$message.warning("导出失败,请看失败xlsx原因");
  953. } else {
  954. self.$message.success("导入成功");
  955. }
  956. self.search();
  957. })
  958. .finally(() => {
  959. e.target.value = "";
  960. });
  961. },
  962. openZS(row, int) {
  963. if (row.examStatus !== 1) {
  964. this.$message.warning("考试登记状态为正常的计划才可执行该操作");
  965. return;
  966. }
  967. this.ints = 1;
  968. this.peopleList = [JSON.parse(JSON.stringify(row))];
  969. this.dialogPLS = true;
  970. },
  971. //证书
  972. submitChecksPals() {
  973. for (let i = 0; i < this.peopleList.length; i++) {
  974. if (
  975. !this.peopleList[i].performance &&
  976. this.peopleList[i].performance !== 0
  977. ) {
  978. this.$message.warning(
  979. `第${i + 1}条数据未填写考试成绩,请填写考试成绩!`
  980. );
  981. return;
  982. }
  983. if (!this.peopleList[i].result && this.peopleList[i].result !== 0) {
  984. this.$message.warning(
  985. `第${i + 1}条数据未选择考试结果,请选择考试结果!`
  986. );
  987. return;
  988. }
  989. }
  990. this.$api.appsystemsubscribe(this.peopleList).then((res) => {
  991. if (this.ints === 1) {
  992. this.$message.success("已修改成绩和证书登记");
  993. }
  994. if (this.ints === 2) {
  995. this.$message.success("已批量修改成绩和证书登记");
  996. }
  997. this.search();
  998. this.dialogPLS = false;
  999. });
  1000. },
  1001. getQP() {
  1002. this.$api.inquiresystembefore({ status: 1 }).then((res) => {
  1003. this.optionsList = res.rows;
  1004. });
  1005. },
  1006. submitChecksDR() {},
  1007. moreActive(int) {
  1008. if (int === 1) {
  1009. this.$router.push({
  1010. path: "bulkImportPlan",
  1011. });
  1012. return;
  1013. }
  1014. if (int === 2) {
  1015. this.$router.push({
  1016. path: "cancelAppointMent",
  1017. });
  1018. return;
  1019. }
  1020. if (int === 3) {
  1021. this.$router.push({
  1022. path: "examRegistration",
  1023. });
  1024. return;
  1025. }
  1026. if (int === 5) {
  1027. this.$router.push({
  1028. path: "formerAccount",
  1029. });
  1030. return;
  1031. }
  1032. if (int === 1) {
  1033. this.dialogDR = true;
  1034. return;
  1035. }
  1036. if (!this.$refs.tableList.allCheckData.length) {
  1037. this.$message.warning("请勾选需要操作的计划");
  1038. return;
  1039. }
  1040. if (int === 2) {
  1041. this.$router.push({
  1042. path: "cancelAppointMent",
  1043. });
  1044. return;
  1045. this.peopleList = JSON.parse(
  1046. JSON.stringify(this.$refs.tableList.allCheckData)
  1047. );
  1048. var ast = this.peopleList.every((item) => {
  1049. return (
  1050. item.subscribeStatus === 1 &&
  1051. item.beforeStatus !== 1 &&
  1052. item.examStatus === 0 &&
  1053. !item.examExpend
  1054. );
  1055. });
  1056. if (ast) {
  1057. this.listData = {};
  1058. this.ints = 2;
  1059. this.dialogDJ = true;
  1060. } else {
  1061. this.$message({
  1062. type: "warning",
  1063. duration: 7000,
  1064. showClose: true,
  1065. message:
  1066. "请勾选预约考试为正常和前培标记【空】以及考试登记状态为待登记和没有消耗过考试次数的计划",
  1067. });
  1068. return;
  1069. }
  1070. }
  1071. if (int === 3) {
  1072. this.peopleList = JSON.parse(
  1073. JSON.stringify(this.$refs.tableList.allCheckData)
  1074. );
  1075. var ast = this.peopleList.every((item) => {
  1076. return item.subscribeStatus === 1;
  1077. });
  1078. if (ast) {
  1079. this.listData = {};
  1080. this.ints = 2;
  1081. this.dialogCG = true;
  1082. } else {
  1083. this.$message.warning("请勾选预约状态为正常的计划");
  1084. return;
  1085. }
  1086. }
  1087. if (int === 4) {
  1088. this.peopleList = JSON.parse(
  1089. JSON.stringify(this.$refs.tableList.allCheckData)
  1090. );
  1091. var ast = this.peopleList.every((item) => {
  1092. return item.examStatus === 1 && item.subscribeStatus === 1;
  1093. });
  1094. if (ast) {
  1095. this.listData = {};
  1096. this.ints = 2;
  1097. this.dialogPLS = true;
  1098. } else {
  1099. this.$message.warning("请勾选考试登记状态以及预约状态为正常的计划");
  1100. return;
  1101. }
  1102. }
  1103. if (int === 5) {
  1104. this.peopleList = JSON.parse(
  1105. JSON.stringify(this.$refs.tableList.allCheckData)
  1106. );
  1107. var ast = this.peopleList.every((item) => {
  1108. return (
  1109. item.examStatus === 0 && item.subscribeStatus === 1
  1110. // && item.beforeCount
  1111. );
  1112. });
  1113. if (ast) {
  1114. this.listData = {};
  1115. this.ints = 2;
  1116. this.plan = "";
  1117. this.beforeStatus = "";
  1118. this.dialogQP = true;
  1119. } else {
  1120. this.$message({
  1121. type: "warning",
  1122. duration: 7000,
  1123. showClose: true,
  1124. message:
  1125. "请勾选考试登记为待登记和预约状态为正常以及存在预约前培场次",
  1126. });
  1127. return;
  1128. }
  1129. }
  1130. },
  1131. examBox(row) {
  1132. this.ints = 1;
  1133. this.listData = JSON.parse(JSON.stringify(row));
  1134. this.dialogCG = true;
  1135. },
  1136. editInfo(v) {
  1137. this.addClick(v, 2);
  1138. },
  1139. submitChecks(formName) {
  1140. this.$refs[formName].validate((valid) => {
  1141. if (valid) {
  1142. if (!this.listData.examStatus) {
  1143. this.$message.warning("请选择考试登记状态");
  1144. return;
  1145. }
  1146. this.submitForm();
  1147. } else {
  1148. console.log("error submit!!");
  1149. return false;
  1150. }
  1151. });
  1152. },
  1153. submitChecksDJ() {
  1154. if (this.ints === 1) {
  1155. var data = JSON.parse(JSON.stringify(this.listData));
  1156. data.subscribeId = [data.subscribeId];
  1157. data.subscribeStatus = 2;
  1158. this.$api.editsystemsubscribe(data).then((res) => {
  1159. this.$message.success("已取消预约");
  1160. this.dialogDJ = false;
  1161. this.search();
  1162. });
  1163. }
  1164. if (this.ints === 2) {
  1165. var data = JSON.parse(JSON.stringify(this.listData));
  1166. var arrays = [];
  1167. this.peopleList.forEach((item) => {
  1168. arrays.push(item.subscribeId);
  1169. });
  1170. data.subscribeId = arrays;
  1171. data.subscribeStatus = 2;
  1172. this.$api.editsystemsubscribe(data).then((res) => {
  1173. this.$message.success("已批量取消预约");
  1174. this.dialogDJ = false;
  1175. this.search();
  1176. });
  1177. }
  1178. },
  1179. submitForm() {
  1180. if (this.ints === 1) {
  1181. var data = JSON.parse(JSON.stringify(this.listData));
  1182. data.subscribeId = [data.subscribeId];
  1183. this.$api.editsystemsubscribe(data).then((res) => {
  1184. this.$message.success("考试登记修改成功");
  1185. this.dialogCG = false;
  1186. this.search();
  1187. });
  1188. }
  1189. if (this.ints === 2) {
  1190. var data = JSON.parse(JSON.stringify(this.listData));
  1191. var arrays = [];
  1192. this.peopleList.forEach((item) => {
  1193. arrays.push(item.subscribeId);
  1194. });
  1195. data.subscribeId = arrays;
  1196. this.$api.editsystemsubscribe(data).then((res) => {
  1197. this.$message.success("批量考试登记修改成功");
  1198. this.dialogCG = false;
  1199. this.search();
  1200. });
  1201. }
  1202. },
  1203. submitChecksQP() {
  1204. var data = JSON.parse(JSON.stringify(this.listData));
  1205. if (!this.plan && this.beforeStatus === 1) {
  1206. this.$message.warning("请选择前培计划");
  1207. return;
  1208. }
  1209. if (!this.beforeStatus) {
  1210. this.$message.warning("请选择是或否");
  1211. return;
  1212. }
  1213. var arrays = [];
  1214. this.peopleList.forEach((item) => {
  1215. arrays.push(item.subscribeId);
  1216. });
  1217. data.subscribeId = arrays;
  1218. if (this.beforeStatus === 1) {
  1219. data.beforeStatus = 1;
  1220. data.beforeId = this.plan;
  1221. }
  1222. if (this.beforeStatus === 2) {
  1223. data.beforeStatus = 0;
  1224. data.beforeId = "";
  1225. }
  1226. this.$api.editsystemsubscribe(data).then((res) => {
  1227. this.$message.success("前培账号已开通标记修改成功");
  1228. this.dialogQP = false;
  1229. this.search();
  1230. });
  1231. },
  1232. search(int) {
  1233. this.loading = true;
  1234. if (int === 1) {
  1235. this.formData.pageNum = 1;
  1236. }
  1237. if (int === 2) {
  1238. this.formData = {
  1239. pageSize: 10,
  1240. pageNum: 1,
  1241. };
  1242. }
  1243. if (int == 3) {
  1244. this.$refs.tableList.clearMoreActive();
  1245. }
  1246. var data = JSON.parse(JSON.stringify(this.formData));
  1247. if (this.month) {
  1248. var year = new Date().getFullYear();
  1249. var a = year + "" + this.month;
  1250. if (this.day) {
  1251. a = year + "" + this.month + "" + this.day;
  1252. }
  1253. data.ApplyDateTime = a;
  1254. }
  1255. if (this.monthApplyIndex) {
  1256. data.applySiteExamTime =
  1257. this.monthApplyList[this.monthApplyIndex].examTime;
  1258. data.applySiteStartTime =
  1259. this.monthApplyList[this.monthApplyIndex].examStartTime;
  1260. data.applySiteEndTime =
  1261. this.monthApplyList[this.monthApplyIndex].examEndTime;
  1262. }
  1263. this.$api
  1264. .inquiresystemsubscribelist(data)
  1265. .then((res) => {
  1266. this.tableData = res.rows;
  1267. this.total = res.total;
  1268. this.navText.index = res.total;
  1269. })
  1270. .finally(() => {
  1271. this.loading = false;
  1272. });
  1273. },
  1274. init() {
  1275. this.month = "";
  1276. this.monthApplyIndex = "";
  1277. this.search(2);
  1278. },
  1279. del(v) {
  1280. this.$alert(
  1281. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  1282. "提示",
  1283. {
  1284. dangerouslyUseHTMLString: true,
  1285. }
  1286. )
  1287. .then(() => {
  1288. var data = {
  1289. gradeId: v.gradeId,
  1290. status: -1,
  1291. };
  1292. this.$api.editGradegrade(data).then((res) => {
  1293. this.$message.success("删除成功");
  1294. this.search();
  1295. });
  1296. })
  1297. .catch(() => {
  1298. this.$message({
  1299. type: "info",
  1300. message: "已取消删除",
  1301. });
  1302. });
  1303. },
  1304. addClick(v, int) {
  1305. // int = 2详情 3学员管理
  1306. if (v === undefined) {
  1307. // 添加班级
  1308. this.$router.push({
  1309. path: "addClass",
  1310. });
  1311. } else {
  1312. if (int === 2) {
  1313. //班级详情
  1314. this.$router.push({
  1315. path: "manageClass",
  1316. query: {
  1317. id: v.gradeId,
  1318. },
  1319. });
  1320. }
  1321. if (int === 3) {
  1322. // 学员管理
  1323. this.$router.push({
  1324. path: "studentMenu",
  1325. query: {
  1326. id: v.gradeId,
  1327. goodsId: v.goodsList[0].goodsId,
  1328. },
  1329. });
  1330. }
  1331. }
  1332. },
  1333. handleSizeChange(v) {
  1334. this.formData.pageSize = v;
  1335. this.formData.pageNum = 1;
  1336. this.search();
  1337. },
  1338. handleCurrentChange(v) {
  1339. this.formData.pageNum = v;
  1340. this.search();
  1341. },
  1342. },
  1343. };
  1344. </script>
  1345. <style lang="less" scoped>
  1346. /deep/.el-button {
  1347. border-radius: 8px;
  1348. }
  1349. /deep/.el-dialog {
  1350. border-radius: 8px;
  1351. .el-dialog__header {
  1352. padding: 0;
  1353. .hearders {
  1354. height: 40px;
  1355. display: flex;
  1356. align-items: center;
  1357. justify-content: space-between;
  1358. padding: 0px 18px 0px 20px;
  1359. border-bottom: 1px solid #e2e2e2;
  1360. .leftTitle {
  1361. font-size: 14px;
  1362. font-weight: bold;
  1363. color: #2f4378;
  1364. }
  1365. .rightBoxs {
  1366. display: flex;
  1367. align-items: center;
  1368. img {
  1369. width: 14px;
  1370. height: 14px;
  1371. margin-left: 13px;
  1372. cursor: pointer;
  1373. }
  1374. }
  1375. }
  1376. }
  1377. .el-dialog__footer {
  1378. padding: 0;
  1379. .dialog-footer {
  1380. padding: 0px 40px;
  1381. height: 70px;
  1382. border-top: 1px solid #e2e2e2;
  1383. display: flex;
  1384. align-items: center;
  1385. justify-content: flex-end;
  1386. }
  1387. }
  1388. }
  1389. .imgBox {
  1390. width: 100%;
  1391. // height: 210px;
  1392. border: 1px solid #e2e2e2;
  1393. border-radius: 8px;
  1394. padding: 8px 8px 3px;
  1395. display: flex;
  1396. flex-direction: column;
  1397. align-items: center;
  1398. .imgLabel {
  1399. flex: 1;
  1400. width: 100%;
  1401. border: 1px dotted #e2e2e2;
  1402. color: #999;
  1403. font-size: 14px;
  1404. cursor: pointer;
  1405. border-radius: 8px;
  1406. .msPhoto {
  1407. display: flex;
  1408. justify-content: center;
  1409. align-items: center;
  1410. max-width: 100%;
  1411. max-height: 270px;
  1412. img {
  1413. max-width: 100%;
  1414. max-height: 270px;
  1415. }
  1416. }
  1417. .imgbbx {
  1418. display: flex;
  1419. flex-direction: column;
  1420. align-items: center;
  1421. justify-content: center;
  1422. width: 100%;
  1423. height: 100%;
  1424. i {
  1425. font-weight: bold;
  1426. margin: 14px 0;
  1427. font-size: 24px;
  1428. }
  1429. }
  1430. }
  1431. p {
  1432. margin: 5px 0px;
  1433. }
  1434. }
  1435. .aListBottom {
  1436. margin-left: 20px;
  1437. padding: 0px 6px;
  1438. border: 1px solid #999;
  1439. border-radius: 4px;
  1440. height: 30px;
  1441. line-height: 30px;
  1442. display: inline-block;
  1443. }
  1444. .liBVS {
  1445. margin-right: 20px;
  1446. margin-bottom: 12px;
  1447. padding: 0px 6px;
  1448. border: 1px solid #999;
  1449. border-radius: 4px;
  1450. height: 30px;
  1451. line-height: 30px;
  1452. display: inline-block;
  1453. float: left;
  1454. }
  1455. .clsw {
  1456. margin-left: 4px;
  1457. cursor: pointer;
  1458. color: #f56c6c;
  1459. }
  1460. .swq {
  1461. text-align: center;
  1462. border-bottom: 1px solid #eee;
  1463. }
  1464. .dowmStys {
  1465. color: blue;
  1466. cursor: pointer;
  1467. }
  1468. </style>