VIP00Apply.vue 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077
  1. <template>
  2. <div class="vipapply">
  3. <m-header v-if="statusList.headerStatus" />
  4. <div class="vip-title">课程信息</div>
  5. <van-cell-group>
  6. <!-- <van-field v-model="form.name" label="课程班名称" input-align="right" size="large" placeholder="请输入班级名称" /> -->
  7. <van-field
  8. v-model="formName.subjectListName"
  9. @click="onGetSheetList('subjectList')"
  10. label="科目名称"
  11. :readonly="true"
  12. input-align="right"
  13. is-link
  14. size="large"
  15. placeholder="请选择"
  16. />
  17. <van-field
  18. v-model="formName.vipGroupCategoryName"
  19. @click="onGetSheetList('vipGroupCategory')"
  20. label="课程形式"
  21. :readonly="true"
  22. input-align="right"
  23. is-link
  24. size="large"
  25. placeholder="请选择"
  26. />
  27. <van-field
  28. v-model="formName.educationalTeacherName"
  29. @click="onGetSheetList('teacherList')"
  30. label="乐团主管"
  31. :readonly="true"
  32. input-align="right"
  33. is-link
  34. size="large"
  35. placeholder="请选择"
  36. />
  37. <van-cell
  38. class="courseStudent"
  39. title="上课学生"
  40. @click="onCheckStudent"
  41. :readonly="true"
  42. input-align="right"
  43. :is-link="checkboxSelectDataList.length > 0 ? false : true"
  44. size="large"
  45. :value="checkboxSelectDataList.length > 0 ? '重新选择' : '请选择'"
  46. :value-class="checkboxSelectDataList.length > 0 ? 'studentColor' : null"
  47. />
  48. <div
  49. v-if="checkboxSelectDataList.length > 0"
  50. style="
  51. text-align: center;
  52. line-height: 1.8;
  53. padding: 0.05rem 0;
  54. background: #fafbff;
  55. "
  56. >
  57. <p
  58. style="color: #323233"
  59. v-for="(item, index) in checkboxSelectDataList"
  60. :key="index"
  61. >
  62. {{ item.userName }} - {{ item.phone }}
  63. </p>
  64. </div>
  65. <van-field
  66. v-model="formName.vipGroupActivityName"
  67. @click="onGetSheetList('vipGroupActivity')"
  68. label="活动方案"
  69. :readonly="true"
  70. input-align="right"
  71. is-link
  72. size="large"
  73. placeholder="请选择"
  74. />
  75. </van-cell-group>
  76. <div class="vip-title">课时组成</div>
  77. <van-cell-group>
  78. <van-field
  79. v-model="form.studentNum"
  80. label="每班人数"
  81. disabled
  82. input-align="right"
  83. size="large"
  84. placeholder="每班预计招收人数"
  85. />
  86. <van-field
  87. v-model="form.singleClassMinutes"
  88. @click="onClickSingleClass"
  89. label="每课时长"
  90. :readonly="true"
  91. input-align="right"
  92. is-link
  93. size="large"
  94. placeholder="请输入每课时长"
  95. />
  96. <!-- 判断是否选择活动方案 -->
  97. <div
  98. class="courseTips"
  99. v-if="
  100. loadData.vipGroupActivitySelect.type == 'DISCOUNT' &&
  101. loadData.vipGroupActivitySelect.maxCourseNum > 0 &&
  102. loadData.vipGroupActivitySelect.minCourseNum > 0
  103. "
  104. >
  105. 该活动最小课时数:<span>{{
  106. loadData.vipGroupActivitySelect.minCourseNum
  107. }}</span
  108. >节 最大课时数:<span>{{
  109. loadData.vipGroupActivitySelect.maxCourseNum
  110. }}</span
  111. >节
  112. </div>
  113. <van-field
  114. v-if="statusList.hasOnline"
  115. v-model="form.onlineClassesNums"
  116. @keyup="onClassKeyUp"
  117. label="线上课"
  118. input-align="right"
  119. size="large"
  120. placeholder="请输入次数"
  121. type="number"
  122. />
  123. <van-field
  124. v-if="statusList.hasOffline"
  125. v-model="form.offlineClassesNums"
  126. @keyup="onClassKeyUp('offLine')"
  127. label="线下课"
  128. input-align="right"
  129. size="large"
  130. placeholder="请输入次数"
  131. type="number"
  132. />
  133. <van-field
  134. v-if="form.offlineClassesNums > 0"
  135. v-model="formName.teacherSchoolName"
  136. @click="onGetSheetList('teacherSchool')"
  137. label="线下课地址"
  138. :readonly="true"
  139. input-align="right"
  140. is-link
  141. size="large"
  142. placeholder="请选择"
  143. />
  144. <!-- <van-field v-if="formName.vipGroupActivityName || statusList.hasOnline" v-model="form.onlineClassesNums" @keyup="onClassKeyUp" label="线上课" input-align="right" size="large" placeholder="请输入次数" type="number" />
  145. <van-field v-if="formName.vipGroupActivityName || statusList.hasOffline" v-model="form.offlineClassesNums" @keyup="onClassKeyUp" label="线下课" input-align="right" size="large" placeholder="请输入次数" type="number" /> -->
  146. <van-field
  147. v-model="form.totalClassTime"
  148. label="课时总数"
  149. disabled
  150. input-align="right"
  151. size="large"
  152. placeholder="请输入次数"
  153. />
  154. <van-field
  155. v-if="statusList.teachOnOrOff"
  156. v-model="formName.giveTeachModeName"
  157. @click="onGiveMode"
  158. label="赠课类型"
  159. :readonly="true"
  160. input-align="right"
  161. is-link
  162. size="large"
  163. placeholder="请选择"
  164. />
  165. </van-cell-group>
  166. <div class="vip-title">时间安排</div>
  167. <van-cell-group>
  168. <van-cell
  169. title="最早排课时间"
  170. :readonly="true"
  171. v-if="loadData.vipGroupActivitySelect.coursesStartTime"
  172. input-align="right"
  173. size="large"
  174. >
  175. <template #default>
  176. {{
  177. dayjs(loadData.vipGroupActivitySelect.coursesStartTime).format(
  178. "YYYY-MM-DD"
  179. )
  180. }}
  181. </template>
  182. </van-cell>
  183. <van-cell
  184. title="最晚排课时间"
  185. :readonly="true"
  186. v-if="loadData.vipGroupActivitySelect.coursesEndTime"
  187. input-align="right"
  188. size="large"
  189. >
  190. <template #default>
  191. {{
  192. dayjs(loadData.vipGroupActivitySelect.coursesEndTime).format(
  193. "YYYY-MM-DD"
  194. )
  195. }}
  196. </template>
  197. </van-cell>
  198. <!-- <van-field v-if="loadData.vipGroupActivitySelect.coursesStartTime" v-model="loadData.vipGroupActivitySelect.coursesStartTime" label="最早排课时间" disabled input-align="right" size="large" placeholder="请选择" />
  199. <van-field v-if="loadData.vipGroupActivitySelect.coursesEndTime" v-model="loadData.vipGroupActivitySelect.coursesEndTime" label="最晚排课时间" disabled input-align="right" size="large" placeholder="请选择" /> -->
  200. <van-field
  201. v-model="form.registrationStartTime"
  202. label="报名开始时间"
  203. disabled
  204. @click="onEnListShow('start', form.registrationStartTime)"
  205. input-align="right"
  206. is-link
  207. size="large"
  208. placeholder="请选择"
  209. />
  210. <van-field
  211. v-model="form.coursesExpireDate"
  212. label="报名截止时间"
  213. disabled
  214. @click="onEnListShow('end', form.coursesExpireDate)"
  215. input-align="right"
  216. is-link
  217. size="large"
  218. placeholder="请选择"
  219. />
  220. </van-cell-group>
  221. <div class="vip-title">课时安排</div>
  222. <van-cell-group>
  223. <van-field
  224. @click="dataForm.status = true"
  225. v-model="form.courseStart"
  226. label="排课开始时间"
  227. :readonly="true"
  228. input-align="right"
  229. is-link
  230. size="large"
  231. placeholder="请选择"
  232. />
  233. <van-cell
  234. title-class="title-time"
  235. v-for="(item, index) in scheduleList"
  236. :key="index"
  237. >
  238. <template slot="title">
  239. <span class="online">{{ item.type }}</span>
  240. <span class="week">{{ item.weekStr }}</span>
  241. <span class="timer">{{ item.startTime + "-" + item.endTime }}</span>
  242. </template>
  243. <template slot="default">
  244. <van-button
  245. type="warning"
  246. @click="onScheduleRemove(item)"
  247. round
  248. size="small"
  249. plain
  250. >删除</van-button
  251. >
  252. </template>
  253. </van-cell>
  254. <div class="add-plan van-cell" @click="onCourseShedule">
  255. <van-icon name="add-o" />课时安排
  256. </div>
  257. <van-field
  258. label="排课列表"
  259. v-if="scheduleList.length > 0"
  260. disabled
  261. input-align="right"
  262. @click="onShowTimeTable"
  263. is-link
  264. size="large"
  265. />
  266. </van-cell-group>
  267. <div class="vip-title">课酬设置</div>
  268. <van-cell-group>
  269. <van-field
  270. v-model="form.onlineClassesUnitPrice"
  271. label="线上课单价"
  272. type="number"
  273. input-align="right"
  274. size="large"
  275. @keyup="getCalcClass"
  276. :disabled="loadData.vipGroupActivitySelect.paymentReadonlyFlag == 0"
  277. placeholder="金额(每课时)"
  278. v-if="statusList.hasOnline"
  279. />
  280. <van-field
  281. v-model="form.offlineClassesUnitPrice"
  282. label="线下课单价"
  283. type="number"
  284. input-align="right"
  285. size="large"
  286. @keyup="getCalcClass"
  287. :disabled="loadData.vipGroupActivitySelect.paymentReadonlyFlag == 0"
  288. placeholder="金额(每课时)"
  289. v-if="statusList.hasOffline"
  290. />
  291. <van-field
  292. v-model="form.onlineTeacherSalary"
  293. label="线上课课酬"
  294. input-align="right"
  295. size="large"
  296. :disabled="loadData.vipGroupActivitySelect.salaryReadonlyFlag == 0"
  297. placeholder="金额(每课时)"
  298. v-if="statusList.hasOnline"
  299. type="number"
  300. />
  301. <!-- || other.onlineSalary !='TEACHER_DEFAULT' -->
  302. <van-field
  303. v-model="form.offlineTeacherSalary"
  304. label="线下课课酬"
  305. input-align="right"
  306. size="large"
  307. :disabled="loadData.vipGroupActivitySelect.salaryReadonlyFlag == 0"
  308. placeholder="金额(每课时)"
  309. v-if="statusList.hasOffline"
  310. type="number"
  311. />
  312. <!-- || other.offlineSalary !='TEACHER_DEFAULT' -->
  313. <van-field
  314. v-model="form.totalCount"
  315. disabled
  316. label="课程总价"
  317. input-align="right"
  318. size="large"
  319. placeholder="金额(每课时)"
  320. />
  321. </van-cell-group>
  322. <div class="button-group">
  323. <van-button type="primary" @click="onSubmit" round size="large"
  324. >确认</van-button
  325. >
  326. </div>
  327. <!-- 每课时长 -->
  328. <van-action-sheet
  329. v-model="statusList.classTimerStatus"
  330. :actions="loadData.classTimer"
  331. cancel-text="取消"
  332. @cancel="statusList.classTimerStatus = false"
  333. @select="onClassTimerSelect"
  334. />
  335. <!-- 报名开始时间&报名结束时间 -->
  336. <van-popup v-model="enlistForm.status" position="bottom">
  337. <van-datetime-picker
  338. v-model="enlistForm.currentDate"
  339. type="date"
  340. :min-date="enlistForm.minDate"
  341. :max-date="enlistForm.maxDate"
  342. :formatter="formatter"
  343. @cancel="enlistForm.status = false"
  344. @confirm="onEnlistConfirm"
  345. />
  346. </van-popup>
  347. <!-- 赠课类型 -->
  348. <van-action-sheet
  349. v-model="statusList.giveTeachModeStatus"
  350. :actions="loadData.giveTeachMode"
  351. cancel-text="取消"
  352. @cancel="statusList.giveTeachModeStatus = false"
  353. @select="onModeSelect"
  354. />
  355. <!-- 课程信息所用 :close-on-click-overlay="false" -->
  356. <van-popup v-model="sheetForm.sheetStatus" position="bottom">
  357. <van-picker
  358. :loading="sheetForm.loading"
  359. :default-index="sheetForm.index"
  360. :columns="sheetForm.columns"
  361. show-toolbar
  362. @cancel="sheetForm.sheetStatus = false"
  363. @confirm="onSheetConfirm"
  364. />
  365. </van-popup>
  366. <!-- 课时安排 -->
  367. <van-popup v-model="dataForm.status" position="bottom">
  368. <van-datetime-picker
  369. v-model="dataForm.currentDate"
  370. type="date"
  371. :min-date="dataForm.minDate"
  372. :max-date="dataForm.maxDate"
  373. :formatter="formatter"
  374. @cancel="dataForm.status = false"
  375. @confirm="onCurrentConfirm"
  376. />
  377. </van-popup>
  378. <!-- 课时安排 -->
  379. <van-popup v-model="courseForm.teachingStatus" position="bottom">
  380. <van-picker
  381. :columns="courseForm.columns"
  382. show-toolbar
  383. @cancel="courseForm.teachingStatus = false"
  384. @confirm="onTeachinConfirm"
  385. />
  386. </van-popup>
  387. <!-- 选择上课学生 -->
  388. <van-popup
  389. v-model="statusList.studentStatus"
  390. :lock-scroll="true"
  391. position="bottom"
  392. :style="{ height: '180%' }"
  393. >
  394. <van-sticky>
  395. <van-search
  396. show-action
  397. shape="round"
  398. @search="onSearch"
  399. v-model="params.search"
  400. placeholder="请输入学生名或手机号"
  401. >
  402. <template #action>
  403. <div @click="onSearch">搜索</div>
  404. </template>
  405. </van-search>
  406. </van-sticky>
  407. <div class="paddingB80">
  408. <van-list
  409. v-model="loading"
  410. class="studentContainer"
  411. v-if="dataShow"
  412. key="data"
  413. :finished="finished"
  414. finished-text=""
  415. @load="getStudent"
  416. >
  417. <van-checkbox-group v-model="checkboxSelect">
  418. <van-cell-group>
  419. <van-cell
  420. v-for="(item, index) in dataList"
  421. :key="index"
  422. @click="onCheckboxSelect(item)"
  423. class="input-cell"
  424. :center="true"
  425. >
  426. <template slot="icon">
  427. <img
  428. class="logo"
  429. v-if="item.avatar"
  430. :src="item.avatar"
  431. alt=""
  432. />
  433. <img
  434. class="logo"
  435. v-else
  436. src="@/assets/images/icon_student.png"
  437. alt=""
  438. />
  439. </template>
  440. <template slot="title">
  441. {{ item.userName }}
  442. </template>
  443. <template slot="label">
  444. <span>{{ desensitPhone(item.phone) }}</span>
  445. </template>
  446. <template slot="default">
  447. <van-checkbox :name="item.userId.toString()"></van-checkbox>
  448. </template>
  449. </van-cell>
  450. </van-cell-group>
  451. </van-checkbox-group>
  452. </van-list>
  453. <m-empty class="empty" msg="暂无学生" v-else key="data" />
  454. </div>
  455. <div class="button-group-popup">
  456. <span class="btn" @click="onPopupCancel">取消</span>
  457. <span class="btn primary" @click="onPopupSubmit">确定</span>
  458. </div>
  459. </van-popup>
  460. <!-- 课表展示 -->
  461. <van-popup v-model="statusList.classTime" position="bottom">
  462. <van-row>
  463. <van-col span="12">上课类型</van-col>
  464. <van-col span="12">上课时间</van-col>
  465. </van-row>
  466. <div class="tableContainer">
  467. <van-row v-for="(item, index) in timeTable" :key="index">
  468. <van-col span="12">
  469. {{ item.teachMode == "ONLINE" ? "线上" : "线下" }}
  470. </van-col>
  471. <van-col span="12">
  472. {{ item.classDate }} {{ item.startClassTimeStr }}
  473. </van-col>
  474. </van-row>
  475. </div>
  476. </van-popup>
  477. </div>
  478. </template>
  479. <script>
  480. /* eslint-disable */
  481. import MHeader from "@/components/MHeader";
  482. import { browser } from "@/common/common";
  483. import MEmpty from "@/components/MEmpty";
  484. import {
  485. findSubSubjects,
  486. vipGroupCategory,
  487. findByVipGroupCategory,
  488. findVipSchoolByTeacher2,
  489. findByTeacherAndCategory,
  490. vipGroupApply,
  491. findEducationUsers,
  492. queryStudentsWithTeacher,
  493. } from "@/api/teacher";
  494. import setLoading from "@/utils/loading";
  495. import dayjs from "dayjs";
  496. let minutes = []; // 分钟数
  497. for (let i = 0; i < 60; i++) {
  498. let mi = i < 10 ? "0" + i : i;
  499. minutes.push(mi + "分");
  500. }
  501. export default {
  502. name: "vipapply",
  503. components: {
  504. MHeader,
  505. MEmpty,
  506. },
  507. data() {
  508. return {
  509. dataForm: {
  510. // 时间下拉框
  511. status: false,
  512. minDate: new Date(),
  513. maxDate: new Date(2025, 10, 1),
  514. currentDate: new Date(),
  515. },
  516. enlistForm: {
  517. // 时间下拉框
  518. updateStatus: "", // 修改哪个状态
  519. status: false,
  520. minDate: new Date(),
  521. maxDate: new Date(2025, 10, 1),
  522. currentDate: new Date(),
  523. },
  524. statusList: {
  525. // 散状态集合
  526. giveTeachModeStatus: false, // 赠课弹窗状态
  527. teachOnOrOff: false, // 是否显示赠课
  528. hasOnline: false, // 是否显示线上
  529. hasOffline: false, // 是否显示线下
  530. classTime: false, // 课表展示
  531. headerStatus: false, // 头部是否展示
  532. classTimerStatus: false, // 每课时长状态
  533. studentStatus: false, // 上课学生状态
  534. },
  535. loadData: {
  536. // 下拉加载数据
  537. subjectList: [], // 声部列表
  538. subjectListSelect: [], // 选中的声部JSON
  539. vipGroupCategory: [], // 课程形式
  540. vipGroupCategorySelect: [], // 选中的课程形式JSON
  541. vipGroupActivity: [], // 活动文案
  542. vipGroupActivitySelect: [], // 选中的活动文案JSON
  543. teacherSchool: [], // 线下课地址
  544. teacherSchoolSelect: [], // 选中的线下课地址JSON
  545. teacherList: [], // 线下课地址
  546. teacherListSelect: [], // 选中的线下课地址JSON
  547. giveTeachMode: [
  548. {
  549. name: "线上课",
  550. value: "ONLINE",
  551. },
  552. {
  553. name: "线下课",
  554. value: "OFFLINE",
  555. },
  556. ], // 赠课
  557. giveTeachModeSelect: [], // 选中的赠课JSON
  558. teacherCategory: [], // 老师课酬信息
  559. classTimer: [], // 每课时长
  560. },
  561. sheetForm: {
  562. // 上拉弹窗
  563. currentType: null, // 当前选择的类型
  564. sheetStatus: false,
  565. loading: true, // 加载数据
  566. index: 0, // 选中的索引值
  567. columns: [],
  568. },
  569. courseForm: {
  570. // 排课弹窗
  571. teachingStatus: false, // 课时安排状态
  572. columns: [
  573. {
  574. // 课程选项
  575. values: ["线上", "线下"],
  576. className: "type",
  577. },
  578. {
  579. values: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
  580. className: "week",
  581. },
  582. {
  583. values: [
  584. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  585. 20, 21, 22, 23,
  586. ],
  587. className: "hours",
  588. defaultIndex: 7,
  589. },
  590. {
  591. values: minutes,
  592. className: "minutes",
  593. },
  594. ],
  595. },
  596. form: {
  597. name: null,
  598. subjectIdList: null,
  599. vipGroupCategoryId: null,
  600. vipGroupActivityId: null,
  601. teacherSchoolId: null,
  602. educationalTeacherId: null,
  603. studentNum: null,
  604. singleClassMinutes: null,
  605. onlineClassesNums: null,
  606. offlineClassesNums: null,
  607. registrationStartTime: null,
  608. coursesExpireDate: null,
  609. totalClassTime: null,
  610. courseStart: null,
  611. giveTeachMode: null,
  612. onlineClassesUnitPrice: null,
  613. offlineClassesUnitPrice: null,
  614. onlineTeacherSalary: null,
  615. offlineTeacherSalary: null,
  616. totalCount: null,
  617. },
  618. formName: {
  619. subjectListName: null, // 声部名称
  620. subjectListIndex: 0, // 声部名称
  621. vipGroupCategoryName: null, // 课程形式
  622. vipGroupCategoryIndex: 0, // 课程形式
  623. vipGroupActivityName: null, // 活动文案
  624. vipGroupActivityIndex: 0, // 活动文案
  625. teacherSchoolName: null, // 线下课地址
  626. teacherSchoolIndex: 0, // 线下课地址
  627. giveTeachModeName: null, // 赠课类型
  628. educationalTeacherName: null, // 乐团主管
  629. educationalTeacherIndex: 0,
  630. },
  631. other: {
  632. onlineSalary: null, // 线上课课酬结算方式
  633. offlineSalary: null, // 线下课课酬结算方式
  634. giveNum: 0, // 赠送课时
  635. },
  636. scheduleList: [], // 课时安排
  637. timeTable: [], // 生成的课表
  638. onSubmitStatus: true, // 点击
  639. checkboxSelect: [],
  640. checkboxSelectIds: [],
  641. checkboxSelectList: [], //选中学生列表
  642. checkboxSelectDataList: [],
  643. loading: false,
  644. finished: false,
  645. params: {
  646. search: null,
  647. page: 1,
  648. rows: 20,
  649. },
  650. dataShow: true, // 是否有数据
  651. dataList: [],
  652. salaryStatus: true, // 是否跳过课酬二次确认
  653. };
  654. },
  655. mounted() {
  656. let params = this.$route.query;
  657. if (params.Authorization) {
  658. localStorage.setItem("Authorization", decodeURI(params.Authorization));
  659. localStorage.setItem("userInfo", decodeURI(params.Authorization));
  660. }
  661. document.title = "VIP课程班申请";
  662. if (browser().android) {
  663. this.headerStatus = true;
  664. }
  665. },
  666. methods: {
  667. dayjs,
  668. onCheckStudent() {
  669. if (!this.form.vipGroupCategoryId) {
  670. // 判断是否选择了课程形式
  671. this.$toast("请选择课程形式");
  672. return;
  673. }
  674. // this.checkboxSelectIds = JSON.parse(JSON.stringify(this.checkboxSelectIds))
  675. // this.checkboxSelectDataList = JSON.parse(JSON.stringify(this.checkboxSelectDataList))
  676. this.statusList.studentStatus = true;
  677. },
  678. onGetSheetList(name) {
  679. // 获取科目列表
  680. let sheetForm = this.sheetForm;
  681. sheetForm.columns = [];
  682. console.log(this.checkboxSelectDataList);
  683. if (!this.form.vipGroupCategoryId && name == "vipGroupActivity") {
  684. this.$toast("请选择课程形式");
  685. return;
  686. } else if (
  687. (!this.checkboxSelectDataList ||
  688. (this.checkboxSelectDataList &&
  689. this.checkboxSelectDataList.length <= 0)) &&
  690. name == "vipGroupActivity"
  691. ) {
  692. // 判断是否选择了课程形式
  693. this.$toast("请选择上课学生");
  694. return;
  695. }
  696. sheetForm.sheetStatus = true;
  697. sheetForm.loading = true;
  698. sheetForm.currentType = name;
  699. sheetForm.index = 0;
  700. let arr = this.loadData[name];
  701. if (arr.length > 0) {
  702. sheetForm.columns = arr;
  703. sheetForm.index = this.formName[name + "Index"];
  704. sheetForm.loading = false;
  705. } else {
  706. this.onLoadingData(name);
  707. }
  708. },
  709. onLoadingData() {
  710. // 加载数据
  711. let sheetForm = this.sheetForm;
  712. if (sheetForm.currentType == "subjectList") {
  713. // 声部列表
  714. findSubSubjects().then((res) => {
  715. let result = res.data;
  716. if (result.code == 200 && result.data.length > 0) {
  717. let tempArr = [];
  718. result.data.forEach((item) => {
  719. item.value = item.id;
  720. item.text = item.name;
  721. tempArr.push(item);
  722. });
  723. this.loadData.subjectList = tempArr;
  724. sheetForm.columns = tempArr;
  725. sheetForm.loading = false;
  726. } else {
  727. this.$toast("暂无科目列表");
  728. sheetForm.loading = false;
  729. }
  730. });
  731. } else if (sheetForm.currentType == "vipGroupCategory") {
  732. // 课程形式
  733. vipGroupCategory().then((res) => {
  734. let result = res.data;
  735. if (result.code == 200 && result.data.length > 0) {
  736. let tempArr = [];
  737. result.data.forEach((item) => {
  738. item.value = item.id;
  739. item.text = item.name;
  740. tempArr.push(item);
  741. });
  742. this.loadData.vipGroupCategory = tempArr;
  743. sheetForm.columns = tempArr;
  744. sheetForm.loading = false;
  745. } else {
  746. this.$toast("暂无课程形式");
  747. sheetForm.loading = false;
  748. }
  749. });
  750. } else if (sheetForm.currentType == "vipGroupActivity") {
  751. // 活动文案
  752. let studentIds = [];
  753. if (
  754. this.checkboxSelectDataList &&
  755. this.checkboxSelectDataList.length > 0
  756. ) {
  757. this.checkboxSelectDataList.forEach((item) => {
  758. studentIds.push(item.userId);
  759. });
  760. }
  761. findByVipGroupCategory({
  762. categoryId: this.form.vipGroupCategoryId,
  763. studentIds: studentIds.join(","),
  764. }).then((res) => {
  765. let result = res.data;
  766. if (result.code == 200 && result.data.length > 0) {
  767. let tempArr = [];
  768. let regStr = new RegExp("双十一");
  769. result.data.forEach((item) => {
  770. if (!regStr.test(item.name)) {
  771. item.value = item.id;
  772. item.text = item.name;
  773. (item.startTime = item.startTime
  774. ? item.startTime.split(" ")[0]
  775. : null), // 报名开始时间
  776. (item.endTime = item.endTime
  777. ? item.endTime.split(" ")[0]
  778. : null); // 报名结束时间
  779. tempArr.push(item);
  780. }
  781. });
  782. this.loadData.vipGroupActivity = tempArr;
  783. sheetForm.columns = tempArr;
  784. sheetForm.loading = false;
  785. } else {
  786. this.$toast("暂无活动方案");
  787. sheetForm.loading = false;
  788. }
  789. });
  790. } else if (sheetForm.currentType == "teacherSchool") {
  791. // 教师教学点
  792. findVipSchoolByTeacher2().then((res) => {
  793. let result = res.data;
  794. if (result.code == 200 && result.data.length > 0) {
  795. let tempArr = [];
  796. result.data.forEach((item) => {
  797. item.value = item.id;
  798. item.text = item.name;
  799. tempArr.push(item);
  800. });
  801. this.loadData.teacherSchool = tempArr;
  802. sheetForm.columns = tempArr;
  803. sheetForm.loading = false;
  804. } else {
  805. this.$toast("暂无教学点");
  806. sheetForm.loading = false;
  807. }
  808. });
  809. } else if (sheetForm.currentType == "teacherList") {
  810. // 乐团主管
  811. findEducationUsers().then((res) => {
  812. let result = res.data;
  813. if (result.code == 200 && result.data.length > 0) {
  814. let tempArr = [];
  815. result.data.forEach((item) => {
  816. item.value = item.userId;
  817. item.text = item.userName;
  818. tempArr.push(item);
  819. });
  820. this.loadData.teacherList = tempArr;
  821. sheetForm.columns = tempArr;
  822. sheetForm.loading = false;
  823. } else {
  824. this.$toast("暂无乐团主管");
  825. sheetForm.loading = false;
  826. }
  827. });
  828. }
  829. },
  830. findTeacherCategory(id) {
  831. // 获取教师课酬
  832. findByTeacherAndCategory({
  833. categoryId: id,
  834. }).then((res) => {
  835. let result = res.data;
  836. if (result.code == 200) {
  837. this.loadData.teacherCategory = result.data;
  838. }
  839. });
  840. },
  841. onSheetConfirm(value, index) {
  842. // 上拉弹窗
  843. let sheetForm = this.sheetForm,
  844. form = this.form,
  845. formName = this.formName,
  846. loadData = this.loadData;
  847. if (sheetForm.currentType == "subjectList") {
  848. // 科目名称赋值
  849. form.subjectIdList = value.value;
  850. formName.subjectListName = value.text;
  851. formName.subjectListIndex = index;
  852. loadData.subjectListSelect = value;
  853. } else if (sheetForm.currentType == "vipGroupCategory") {
  854. // 课程形式赋值
  855. if (loadData.vipGroupCategorySelect.id != value.id) {
  856. // 获取教师课酬
  857. this.findTeacherCategory(value.id);
  858. }
  859. form.vipGroupCategoryId = value.value;
  860. formName.vipGroupCategoryName = value.text;
  861. formName.vipGroupCategoryIndex = index;
  862. loadData.vipGroupCategorySelect = value;
  863. form.studentNum = value.studentNum; // 每班人数
  864. // form.singleClassMinutes = value.singleClassMinutes // 每课时长
  865. form.onlineClassesUnitPrice = Math.ceil(value.onlineClassesUnitPrice);
  866. form.offlineClassesUnitPrice = Math.ceil(value.offlineClassesUnitPrice);
  867. // 每课时长赋值
  868. form.singleClassMinutes = null;
  869. loadData.classTimer = [];
  870. let tempSingle = value.singleClassMinutes.split(",");
  871. tempSingle.forEach((item) => {
  872. this.loadData.classTimer.push({
  873. name: item,
  874. value: item,
  875. });
  876. });
  877. // 重置上课学生
  878. this.checkboxSelect = [];
  879. this.checkboxSelectIds = [];
  880. this.checkboxSelectList = []; //选中学生列表
  881. this.checkboxSelectDataList = [];
  882. // 重置活动文案
  883. form.vipGroupActivityId = null;
  884. formName.vipGroupActivityName = null;
  885. formName.vipGroupActivityIndex = 0;
  886. loadData.vipGroupActivity = [];
  887. loadData.vipGroupActivitySelect = [];
  888. } else if (sheetForm.currentType == "vipGroupActivity") {
  889. // 活动方案赋值
  890. // 重置线上课,线下课次数
  891. if (form.vipGroupActivityId != value.value) {
  892. form.offlineClassesNums = null;
  893. form.onlineClassesNums = null;
  894. }
  895. form.vipGroupActivityId = value.value;
  896. formName.vipGroupActivityName = value.text;
  897. formName.vipGroupActivityIndex = index;
  898. loadData.vipGroupActivitySelect = value;
  899. // 换活动之后单价重置
  900. form.onlineClassesUnitPrice = Math.ceil(
  901. loadData.vipGroupCategorySelect.onlineClassesUnitPrice
  902. );
  903. form.offlineClassesUnitPrice = Math.ceil(
  904. loadData.vipGroupCategorySelect.offlineClassesUnitPrice
  905. );
  906. this.onCalcClassTimes(value); // 计算时间等.........
  907. this.getCalcClass(); // 课酬计算
  908. this.setTimeTable(); // 重新排课
  909. // 时间安排
  910. // form.registrationStartTime = value.startTime
  911. // form.coursesExpireDate = value.endTime
  912. } else if (sheetForm.currentType == "teacherSchool") {
  913. // 线下课地址
  914. form.teacherSchoolId = value.value;
  915. formName.teacherSchoolName = value.text;
  916. formName.teacherSchoolIndex = index;
  917. } else if (sheetForm.currentType == "teacherList") {
  918. // 乐团主管
  919. form.educationalTeacherId = value.value;
  920. formName.educationalTeacherName = value.text;
  921. formName.educationalTeacherIndex = index;
  922. }
  923. sheetForm.sheetStatus = false;
  924. },
  925. onClassKeyUp(type) {
  926. // 线上课&线下课修改时
  927. if (type == "offLine" && this.form.offlineClassesNums <= 0) {
  928. this.form.teacherSchoolId = null;
  929. this.formName.teacherSchoolName = null;
  930. this.formName.teacherSchoolIndex = 0;
  931. }
  932. let vas = this.loadData.vipGroupActivitySelect;
  933. this.onCalcClassTimes(vas);
  934. this.getCalcClass();
  935. this.setTimeTable();
  936. },
  937. onCalcClassTimes(vas) {
  938. // 计算课时总数
  939. let form = this.form,
  940. other = this.other,
  941. statusList = this.statusList;
  942. let totalCount =
  943. Number(form.onlineClassesNums) + Number(form.offlineClassesNums);
  944. // ...
  945. if (vas.salarySettlementJson) {
  946. let obj = JSON.parse(vas.salarySettlementJson);
  947. if (obj && obj.onlineSalarySettlement) {
  948. // 有线上课
  949. statusList.hasOnline = true;
  950. } else {
  951. statusList.hasOnline = false;
  952. }
  953. if (obj && obj.offlineSalarySettlement) {
  954. // 有线下课
  955. statusList.hasOffline = true;
  956. } else {
  957. statusList.hasOffline = false;
  958. }
  959. }
  960. if (vas.type == "GIVE_CLASS") {
  961. // 买赠活动
  962. this.statusList.teachOnOrOff = true; // 显示赠课
  963. if (totalCount >= Number(vas.attribute1)) {
  964. form.totalClassTime = totalCount + "+" + vas.attribute2;
  965. other.giveNum = vas.attribute2;
  966. } else {
  967. form.totalClassTime = totalCount;
  968. other.giveNum = 0;
  969. }
  970. } else {
  971. // 折扣活动
  972. form.totalClassTime = totalCount;
  973. other.giveNum = 0;
  974. this.statusList.teachOnOrOff = false; // 隐藏赠课
  975. }
  976. },
  977. onModeSelect(value) {
  978. // 赠课确认
  979. this.form.giveTeachMode = value.value;
  980. this.formName.giveTeachModeName = value.name;
  981. this.statusList.giveTeachModeStatus = false;
  982. this.getCalcClass();
  983. },
  984. onClickSingleClass() {
  985. if (!this.formName.vipGroupCategoryName) {
  986. this.$toast("请选择课程形式");
  987. return;
  988. }
  989. this.statusList.classTimerStatus = true;
  990. },
  991. onClassTimerSelect(value) {
  992. // 每课时长设置
  993. this.form.singleClassMinutes = value.value;
  994. this.statusList.classTimerStatus = false;
  995. this.getCalcClass();
  996. },
  997. onCurrentConfirm(value) {
  998. // 排课开始时间
  999. let selectDate = new Date(value);
  1000. let tempMonth =
  1001. selectDate.getMonth() + 1 >= 10
  1002. ? selectDate.getMonth() + 1
  1003. : "0" + (selectDate.getMonth() + 1);
  1004. let tempDay =
  1005. selectDate.getDate() >= 10
  1006. ? selectDate.getDate()
  1007. : "0" + selectDate.getDate();
  1008. this.form.courseStart =
  1009. selectDate.getFullYear() + "-" + tempMonth + "-" + tempDay;
  1010. this.dataForm.status = false;
  1011. },
  1012. onEnlistConfirm(value) {
  1013. // 报名开始/结束时间
  1014. let selectDate = new Date(value);
  1015. let tempMonth =
  1016. selectDate.getMonth() + 1 >= 10
  1017. ? selectDate.getMonth() + 1
  1018. : "0" + (selectDate.getMonth() + 1);
  1019. let tempDay =
  1020. selectDate.getDate() >= 10
  1021. ? selectDate.getDate()
  1022. : "0" + selectDate.getDate();
  1023. let enlistForm = this.enlistForm;
  1024. let form = this.form;
  1025. if (enlistForm.updateStatus == "start") {
  1026. form.registrationStartTime =
  1027. selectDate.getFullYear() + "-" + tempMonth + "-" + tempDay;
  1028. if (form.coursesExpireDate) {
  1029. let temps = new Date(
  1030. form.registrationStartTime.replace(/-/gi, "/")
  1031. ).getTime();
  1032. let tempe = new Date(
  1033. form.coursesExpireDate.replace(/-/gi, "/")
  1034. ).getTime();
  1035. // 如果开始时间大于结束时间,结束时间制空
  1036. if (temps > tempe) {
  1037. form.coursesExpireDate = null;
  1038. }
  1039. }
  1040. } else if (enlistForm.updateStatus == "end") {
  1041. form.coursesExpireDate =
  1042. selectDate.getFullYear() + "-" + tempMonth + "-" + tempDay;
  1043. }
  1044. enlistForm.status = false;
  1045. },
  1046. onEnListShow(type, value) {
  1047. // 报名开始/截止时间
  1048. let enlistForm = this.enlistForm;
  1049. if (type == "end") {
  1050. if (this.form.registrationStartTime) {
  1051. enlistForm.minDate = new Date(
  1052. this.form.registrationStartTime.replace(/-/gi, "/")
  1053. );
  1054. } else {
  1055. enlistForm.minDate = new Date();
  1056. }
  1057. } else if (type == "start") {
  1058. // 开始时默认为当前时间
  1059. enlistForm.minDate = new Date();
  1060. }
  1061. if (value) {
  1062. enlistForm.currentDate = new Date(value.replace(/-/gi, "/"));
  1063. } else {
  1064. enlistForm.currentDate = new Date();
  1065. }
  1066. enlistForm.updateStatus = type;
  1067. enlistForm.status = true;
  1068. },
  1069. onCourseShedule() {
  1070. // 课时安排
  1071. if (!this.form.singleClassMinutes) {
  1072. this.$toast("请选每课时长");
  1073. return;
  1074. }
  1075. if (this.other.giveNum > 0 && !this.form.giveTeachMode) {
  1076. this.$toast("请选择赠课类型");
  1077. return;
  1078. }
  1079. if (!this.form.courseStart) {
  1080. this.$toast("请选择排课开始时间");
  1081. return;
  1082. }
  1083. this.courseForm.teachingStatus = true;
  1084. },
  1085. onScheduleRemove(item) {
  1086. // 删除课程安排
  1087. let index = this.scheduleList.indexOf(item);
  1088. if (index !== -1) {
  1089. this.scheduleList.splice(index, 1);
  1090. }
  1091. },
  1092. onTeachinConfirm(value) {
  1093. // 添加课程
  1094. let scheduleList = this.scheduleList;
  1095. let startTime =
  1096. (value[2] >= 10 ? value[2] : "0" + value[2]) +
  1097. ":" +
  1098. value[3].split("分")[0];
  1099. let endTime = this.MinutesTest(
  1100. value[2],
  1101. value[3],
  1102. this.form.singleClassMinutes
  1103. );
  1104. let isAdd = true;
  1105. scheduleList.forEach((item) => {
  1106. let isStartTime = this.timeIsrange(startTime, endTime, item.startTime);
  1107. let isEndTime = this.timeIsrange(startTime, endTime, item.endTime);
  1108. if (isAdd) {
  1109. //
  1110. if (value[1] == item.weekStr) {
  1111. if (isStartTime || isEndTime) {
  1112. isAdd = false;
  1113. } else {
  1114. isAdd = true;
  1115. }
  1116. } else if (value[1] != item.weekStr) {
  1117. isAdd = true;
  1118. }
  1119. }
  1120. });
  1121. if (isAdd) {
  1122. // 判断时间范围是否有重复
  1123. scheduleList.push({
  1124. type: value[0], // 线上还是线下
  1125. weekStr: value[1],
  1126. weekIndex: this.getWeek(value[1]),
  1127. startTime: startTime,
  1128. endTime: endTime,
  1129. id: Date.now(),
  1130. });
  1131. // scheduleList.sort((a, b) => {
  1132. // return a.weekStr
  1133. // })
  1134. this.courseForm.teachingStatus = false;
  1135. this.setTimeTable();
  1136. } else {
  1137. this.$toast("该时间段已排课请重选时间");
  1138. return;
  1139. }
  1140. },
  1141. onShowTimeTable() {
  1142. // 显示排课列表
  1143. if (!this.checkCourseList()) {
  1144. return;
  1145. }
  1146. this.statusList.classTime = true;
  1147. this.setTimeTable();
  1148. },
  1149. setTimeTable() {
  1150. if (!this.checkCourseList(false)) {
  1151. return;
  1152. }
  1153. // return
  1154. // 重置排课列表
  1155. this.timeTable = [];
  1156. let form = this.form,
  1157. scheduleList = this.scheduleList;
  1158. // if(!form.courseStart) {
  1159. // this.$toast('请选择排课开始时间')
  1160. // return
  1161. // }
  1162. // 拿到线上课数与线下课数 以及
  1163. let online = parseInt(
  1164. form.onlineClassesNums ? form.onlineClassesNums : 0
  1165. );
  1166. let offline = parseInt(
  1167. form.offlineClassesNums ? form.offlineClassesNums : 0
  1168. );
  1169. let giveNum = parseInt(this.other.giveNum);
  1170. let giveClassType = form.giveTeachMode;
  1171. if (giveClassType == "ONLINE") {
  1172. // 线上
  1173. online += giveNum;
  1174. } else if (giveClassType == "OFFLINE") {
  1175. offline += giveNum;
  1176. }
  1177. // 判断是否有课程安排
  1178. if (scheduleList.length <= 0) {
  1179. return;
  1180. }
  1181. let totalCount = Number(online) + Number(offline);
  1182. let tempCourseStart = form.courseStart.replace(/-/gi, "/");
  1183. let dateOperation = new Date(tempCourseStart);
  1184. let forMark = 0;
  1185. while (totalCount && totalCount > 0) {
  1186. for (let i = 0; i < scheduleList.length; i++) {
  1187. // console.log(totalCount, scheduleList)
  1188. if (online == 0 && offline == 0) break;
  1189. let num = scheduleList[i].weekIndex - dateOperation.getDay();
  1190. // 如果是同一天一个周期会出现排课都排到一天
  1191. if (forMark > 0 && num == 0 && i == 0) {
  1192. num = num + 7;
  1193. }
  1194. if (num < 0) {
  1195. // 如果为负数则为下周
  1196. num = num + 7;
  1197. }
  1198. let dataStr = this.getThinkDate(dateOperation, num);
  1199. // 判断是否大于当前时间
  1200. let nowGetTime = new Date().getTime();
  1201. let courseTime = new Date(
  1202. dataStr.replace(/-/gi, "/") +
  1203. " " +
  1204. scheduleList[i].startTime +
  1205. ":00"
  1206. ).getTime();
  1207. if (nowGetTime < courseTime) {
  1208. let tempArr = {
  1209. classDate: dataStr,
  1210. startClassTimeStr: scheduleList[i].startTime,
  1211. endClassTimeStr: scheduleList[i].endTime,
  1212. };
  1213. // console.log(scheduleList[i].type, online, offline)
  1214. if (scheduleList[i].type == "线上" && online > 0) {
  1215. tempArr.teachMode = "ONLINE";
  1216. this.timeTable.push(tempArr);
  1217. online--;
  1218. totalCount--;
  1219. } else if (scheduleList[i].type == "线下" && offline > 0) {
  1220. tempArr.teachMode = "OFFLINE";
  1221. this.timeTable.push(tempArr);
  1222. offline--;
  1223. totalCount--;
  1224. }
  1225. // else {
  1226. // if (online > 0) {
  1227. // tempArr.teachMode = 'ONLINE'
  1228. // this.timeTable.push(tempArr)
  1229. // online--
  1230. // } else if (offline > 0) {
  1231. // tempArr.teachMode = 'OFFLINE'
  1232. // this.timeTable.push(tempArr)
  1233. // offline--
  1234. // }
  1235. // }
  1236. }
  1237. }
  1238. // 加一周
  1239. if (scheduleList.length == 1) {
  1240. dateOperation.setDate(dateOperation.getDate() + 7);
  1241. } else if (
  1242. scheduleList.every((item) => item.weekStr === scheduleList[0].weekStr)
  1243. ) {
  1244. // 标记循环次数(标记判断课程安排是不是同一天)
  1245. forMark++;
  1246. }
  1247. }
  1248. this.timeTable.sort((a, b) => {
  1249. let aStr = dayjs(
  1250. dayjs(a.classDate).format("YYYY-MM-DD") +
  1251. " " +
  1252. a.startClassTimeStr +
  1253. ":00"
  1254. ).valueOf();
  1255. let bStr = dayjs(
  1256. dayjs(b.classDate).format("YYYY-MM-DD") +
  1257. " " +
  1258. b.startClassTimeStr +
  1259. ":00"
  1260. ).valueOf();
  1261. return aStr - bStr;
  1262. });
  1263. // console.log(this.timeTable)
  1264. },
  1265. onGiveMode() {
  1266. // 赠送课改变时
  1267. this.statusList.giveTeachModeStatus = true;
  1268. this.getCalcClass();
  1269. },
  1270. getCalcClass() {
  1271. // 计算课酬
  1272. let loadData = this.loadData;
  1273. let form = this.form;
  1274. let vas = loadData.vipGroupActivitySelect, // 活动
  1275. vcs = loadData.vipGroupCategorySelect, // 课程形式
  1276. tc = loadData.teacherCategory, // 老师基本信息
  1277. oncn = form.onlineClassesNums ? form.onlineClassesNums : 0, // 线上课次数
  1278. offcn = form.offlineClassesNums ? form.offlineClassesNums : 0, // 线下课次数
  1279. giveNum = parseInt(this.other.giveNum),
  1280. giveTeachMode = form.giveTeachMode; // 线下或线下
  1281. // 优惠活动
  1282. // ...
  1283. if (vas.salarySettlementJson) {
  1284. let obj = JSON.parse(vas.salarySettlementJson);
  1285. // 获取每课时长
  1286. // 每45Min计算一些课酬
  1287. // let b = form.singleClassMinutes ? (form.singleClassMinutes / 45) : 0
  1288. let tempPrice = 0;
  1289. if (Number(oncn) + Number(offcn) > 0) {
  1290. let countPrice =
  1291. oncn * form.onlineClassesUnitPrice +
  1292. offcn * form.offlineClassesUnitPrice;
  1293. if (giveNum > 0 && !giveTeachMode) {
  1294. countPrice = 0;
  1295. }
  1296. tempPrice =
  1297. (countPrice * form.studentNum) /
  1298. (Number(oncn) + Number(offcn) + Number(giveNum));
  1299. if (vas.type == "DISCOUNT") {
  1300. tempPrice =
  1301. (tempPrice * (vas.attribute1 ? Number(vas.attribute1) : 100)) /
  1302. 100;
  1303. }
  1304. }
  1305. // 课程按课来计算
  1306. if (obj && obj.onlineSalarySettlement) {
  1307. let onss = obj.onlineSalarySettlement;
  1308. // 有线上课
  1309. if (onss.salarySettlementType == "TEACHER_DEFAULT") {
  1310. form.onlineTeacherSalary = Math.round(tc.offlineClassesSalary); // 线上课酬
  1311. } else if (onss.salarySettlementType == "RATIO_DISCOUNT") {
  1312. // 老师课酬的折扣 如果有则不打折
  1313. // form.onlineTeacherSalary = Math.round(vcs.onlineClassesUnitPrice * (onss.settlementValue ? onss.settlementValue : 100) / 100)
  1314. form.onlineTeacherSalary = Math.round(
  1315. tempPrice
  1316. ? (tempPrice *
  1317. (onss.settlementValue ? onss.settlementValue : 100)) /
  1318. 100
  1319. : 0
  1320. );
  1321. } else if (onss.salarySettlementType == "FIXED_SALARY") {
  1322. form.onlineTeacherSalary = Math.round(onss.settlementValue);
  1323. }
  1324. form.onlineTeacherSalary = Number(form.onlineTeacherSalary);
  1325. } else {
  1326. form.onlineTeacherSalary = Math.round(tc.offlineClassesSalary);
  1327. }
  1328. if (obj && obj.offlineSalarySettlement) {
  1329. let offss = obj.offlineSalarySettlement;
  1330. // 有线下课
  1331. if (offss.salarySettlementType == "TEACHER_DEFAULT") {
  1332. form.offlineTeacherSalary = Math.round(tc.offlineClassesSalary); // 线上课酬
  1333. } else if (offss.salarySettlementType == "RATIO_DISCOUNT") {
  1334. // 老师课酬的折扣
  1335. // form.offlineTeacherSalary = Math.round((vcs.offlineClassesUnitPrice * (offss.settlementValue ? offss.settlementValue : 100) / 100))
  1336. form.offlineTeacherSalary = Math.round(
  1337. tempPrice
  1338. ? (tempPrice *
  1339. (offss.settlementValue ? offss.settlementValue : 100)) /
  1340. 100
  1341. : 0
  1342. );
  1343. } else if (offss.salarySettlementType == "FIXED_SALARY") {
  1344. form.offlineTeacherSalary = Math.round(offss.settlementValue);
  1345. }
  1346. form.offlineTeacherSalary = Number(form.offlineTeacherSalary);
  1347. } else {
  1348. form.offlineTeacherSalary = Math.round(tc.offlineClassesSalary);
  1349. }
  1350. }
  1351. if (vas.type == "GIVE_CLASS" || vas.type == "BASE_ACTIVITY") {
  1352. form.totalCount = Math.round(
  1353. oncn * form.onlineClassesUnitPrice +
  1354. offcn * form.offlineClassesUnitPrice
  1355. );
  1356. } else if (vas.type == "DISCOUNT") {
  1357. form.totalCount = Math.round(
  1358. ((oncn * form.onlineClassesUnitPrice +
  1359. offcn * form.offlineClassesUnitPrice) *
  1360. Number(vas.attribute1)) /
  1361. 100
  1362. );
  1363. }
  1364. form.totalCount = Number(form.totalCount);
  1365. },
  1366. getThinkDate(date, num) {
  1367. let Stamp = date;
  1368. Stamp.setDate(date.getDate() + num); // 获取当前月数的第几天
  1369. var year = Stamp.getFullYear(); //获取完整的年份(4位,1970-????)
  1370. var month = Stamp.getMonth() + 1; //获取当前月份(0-11,0代表1月)
  1371. var mvar = "";
  1372. if (month < 10) {
  1373. mvar = "0" + month;
  1374. } else {
  1375. mvar = month + "";
  1376. }
  1377. var day = Stamp.getDate();
  1378. var dvar = "";
  1379. if (day < 10) {
  1380. dvar = "0" + day;
  1381. } else {
  1382. dvar = day + "";
  1383. }
  1384. return year + "-" + mvar + "-" + dvar;
  1385. },
  1386. // 分钟小时相加减
  1387. MinutesTest(houer, mins, interval) {
  1388. let min = mins.split("分")[0];
  1389. let sdate1 = new Date(1900, 1, 1, houer, min);
  1390. sdate1.setMinutes(sdate1.getMinutes() + parseInt(interval));
  1391. let H = sdate1.getHours();
  1392. let M = sdate1.getMinutes();
  1393. if (H < 10) H = "0" + H;
  1394. if (M < 10) M = "0" + M;
  1395. return H + ":" + M;
  1396. },
  1397. // 判断时间是否在时间段内
  1398. timeIsrange(beginTime, endTime, nowTime) {
  1399. var strb = beginTime.split(":");
  1400. if (strb.length != 2) {
  1401. return false;
  1402. }
  1403. var stre = endTime.split(":");
  1404. if (stre.length != 2) {
  1405. return false;
  1406. }
  1407. var strn = nowTime.split(":");
  1408. if (stre.length != 2) {
  1409. return false;
  1410. }
  1411. var b = new Date();
  1412. var e = new Date();
  1413. var n = new Date();
  1414. b.setHours(strb[0]);
  1415. b.setMinutes(strb[1]);
  1416. e.setHours(stre[0]);
  1417. e.setMinutes(stre[1]);
  1418. n.setHours(strn[0]);
  1419. n.setMinutes(strn[1]);
  1420. if (n.getTime() - b.getTime() >= 0 && n.getTime() - e.getTime() <= 0) {
  1421. // 在时间范围内
  1422. return true;
  1423. } else {
  1424. // 不在时间范围内
  1425. return false;
  1426. }
  1427. },
  1428. getWeek(str) {
  1429. // 获取周几索引值
  1430. let template = {
  1431. 周一: 1,
  1432. 周二: 2,
  1433. 周三: 3,
  1434. 周四: 4,
  1435. 周五: 5,
  1436. 周六: 6,
  1437. 周日: 0,
  1438. };
  1439. return template[str];
  1440. },
  1441. formatter(type, value) {
  1442. if (type === "year") {
  1443. return `${value}年`;
  1444. } else if (type === "month") {
  1445. return `${value}月`;
  1446. } else if (type === "day") {
  1447. return `${value}日`;
  1448. }
  1449. return value;
  1450. },
  1451. async onSubmit(allowOverstepActivityStudentNum) {
  1452. // 次数限制是否可以继续创建
  1453. let form = this.form;
  1454. let statusList = this.statusList;
  1455. // if (!(form.name)) {
  1456. // this.$toast('请输入课程班名称')
  1457. // return false
  1458. // }
  1459. if (!form.subjectIdList) {
  1460. this.$toast("请选择科目");
  1461. return false;
  1462. }
  1463. if (!form.vipGroupCategoryId) {
  1464. this.$toast("请选择课程形式");
  1465. return false;
  1466. }
  1467. if (!form.educationalTeacherId) {
  1468. this.$toast("请选择乐团主管");
  1469. return;
  1470. }
  1471. if (this.checkboxSelectIds.length <= 0) {
  1472. this.$toast("请选择上课学生");
  1473. return;
  1474. }
  1475. if (!form.vipGroupActivityId) {
  1476. this.$toast("请选择活动方案");
  1477. return false;
  1478. }
  1479. if (!form.singleClassMinutes) {
  1480. this.$toast("请选择每课时长");
  1481. return false;
  1482. }
  1483. let onlineClassesStatus =
  1484. !form.onlineClassesNums && form.onlineClassesNums <= 0 ? true : false;
  1485. let offlineClassesStatus =
  1486. !form.offlineClassesNums && form.offlineClassesNums <= 0 ? true : false;
  1487. if (statusList.hasOnline) {
  1488. if (onlineClassesStatus) {
  1489. this.$toast("请输入线上课次数");
  1490. return false;
  1491. }
  1492. }
  1493. if (statusList.hasOffline) {
  1494. if (offlineClassesStatus) {
  1495. this.$toast("请输入线下课次数");
  1496. return false;
  1497. }
  1498. // 判断是否有线下
  1499. if (form.offlineClassesNums > 0 && !form.teacherSchoolId) {
  1500. this.$toast("请选择线下课地址");
  1501. return false;
  1502. }
  1503. }
  1504. if (!form.registrationStartTime) {
  1505. this.$toast("请选择报名开始时间");
  1506. return false;
  1507. }
  1508. if (!form.coursesExpireDate) {
  1509. this.$toast("请选择报名结束时间");
  1510. return false;
  1511. }
  1512. let vipGroupActivitySelect = this.loadData.vipGroupActivitySelect;
  1513. if (vipGroupActivitySelect.type == "GIVE_CLASS" && !form.giveTeachMode) {
  1514. this.$toast("请选择赠课类型");
  1515. return false;
  1516. }
  1517. if (this.scheduleList.length <= 0) {
  1518. this.$toast("课时安排不能为空");
  1519. return false;
  1520. }
  1521. if (
  1522. vipGroupActivitySelect.type == "DISCOUNT" &&
  1523. vipGroupActivitySelect.minCourseNum > 0 &&
  1524. vipGroupActivitySelect.maxCourseNum > 0
  1525. ) {
  1526. // debugger
  1527. let tempCourseCount =
  1528. parseInt(form.onlineClassesNums) + parseInt(form.offlineClassesNums);
  1529. if (
  1530. vipGroupActivitySelect.minCourseNum > tempCourseCount ||
  1531. tempCourseCount > vipGroupActivitySelect.maxCourseNum
  1532. ) {
  1533. this.$toast(
  1534. `课时总数为${vipGroupActivitySelect.minCourseNum}~${vipGroupActivitySelect.maxCourseNum}节`
  1535. );
  1536. return;
  1537. }
  1538. }
  1539. if (!this.checkCourseList()) {
  1540. return;
  1541. }
  1542. // 排课
  1543. this.setTimeTable();
  1544. // 如果线上和线下课酬都为0时
  1545. if (statusList.hasOnline && statusList.hasOffline) {
  1546. if (
  1547. form.onlineClassesNums > 0 &&
  1548. form.onlineTeacherSalary <= 0 &&
  1549. form.offlineClassesNums > 0 &&
  1550. form.offlineTeacherSalary <= 0 &&
  1551. this.salaryStatus
  1552. ) {
  1553. this.$dialog
  1554. .confirm({
  1555. message: "当前课程课酬预计为0,是否继续?",
  1556. })
  1557. .then(() => {
  1558. this.salaryStatus = false;
  1559. this.onSubmit();
  1560. });
  1561. return;
  1562. }
  1563. }
  1564. if (statusList.hasOnline) {
  1565. if (!form.onlineClassesUnitPrice) {
  1566. this.$toast("请输入线上课单价");
  1567. return false;
  1568. }
  1569. if (!form.onlineTeacherSalary) {
  1570. this.$toast("请输入线上课课酬");
  1571. return false;
  1572. }
  1573. if (
  1574. form.onlineClassesNums > 0 &&
  1575. form.onlineTeacherSalary <= 0 &&
  1576. this.salaryStatus
  1577. ) {
  1578. this.$dialog
  1579. .confirm({
  1580. message: "当前课程线上课酬预计为0,是否继续?",
  1581. })
  1582. .then(() => {
  1583. this.salaryStatus = false;
  1584. this.onSubmit();
  1585. });
  1586. return;
  1587. }
  1588. }
  1589. if (statusList.hasOffline) {
  1590. if (!form.offlineClassesUnitPrice) {
  1591. this.$toast("请输入线下课单价");
  1592. return false;
  1593. }
  1594. if (!form.offlineTeacherSalary) {
  1595. this.$toast("请输入线下课课酬");
  1596. return false;
  1597. }
  1598. if (
  1599. form.offlineClassesNums > 0 &&
  1600. form.offlineTeacherSalary <= 0 &&
  1601. this.salaryStatus
  1602. ) {
  1603. this.$dialog
  1604. .confirm({
  1605. message: "当前课程线下课酬预计为0,是否继续?",
  1606. })
  1607. .then(() => {
  1608. this.salaryStatus = false;
  1609. this.onSubmit();
  1610. });
  1611. return;
  1612. }
  1613. }
  1614. if (form.giveTeachMode == "ONLINE") {
  1615. form.onlineClassesNum =
  1616. Number(form.onlineClassesNums) + Number(this.other.giveNum);
  1617. form.offlineClassesNum = Number(form.offlineClassesNums);
  1618. } else {
  1619. form.onlineClassesNum = Number(form.onlineClassesNums);
  1620. form.offlineClassesNum =
  1621. Number(form.offlineClassesNums) + Number(this.other.giveNum);
  1622. }
  1623. form.totalClassTimes =
  1624. Number(form.onlineClassesNums) +
  1625. Number(form.offlineClassesNums) +
  1626. Number(this.other.giveNum);
  1627. form.paymentExpireDate = form.coursesExpireDate;
  1628. form.studentIdList = this.checkboxSelectIds.join(",");
  1629. form.firstStudentId =
  1630. this.checkboxSelectDataList.length > 0
  1631. ? this.checkboxSelectDataList[0].userId
  1632. : null;
  1633. let params = {
  1634. courseSchedules: this.timeTable,
  1635. vipGroupApplyBaseInfo: form,
  1636. };
  1637. if (allowOverstepActivityStudentNum == 1) {
  1638. params.allowOverstepActivityStudentNum = 1;
  1639. }
  1640. if (!this.onSubmitStatus) {
  1641. return;
  1642. }
  1643. this.onSubmitStatus = false;
  1644. setLoading(true);
  1645. await vipGroupApply(params)
  1646. .then((res) => {
  1647. let result = res.data;
  1648. setLoading(false);
  1649. if (result.code == 200) {
  1650. this.$toast("申请成功");
  1651. setTimeout(() => {
  1652. this.onSubmitStatus = true;
  1653. if (browser().iPhone) {
  1654. window.webkit.messageHandlers.DAYA.postMessage(
  1655. JSON.stringify({
  1656. api: "back",
  1657. })
  1658. );
  1659. } else if (browser().android) {
  1660. DAYA.postMessage(
  1661. JSON.stringify({
  1662. api: "back",
  1663. })
  1664. );
  1665. } else {
  1666. this.$router.push("/business");
  1667. }
  1668. }, 500);
  1669. } else if (result.code == 206) {
  1670. this.onSubmitStatus = true;
  1671. this.salaryStatus = true;
  1672. this.$dialog
  1673. .confirm({
  1674. message: result.msg,
  1675. showConfirmButton: true,
  1676. showCancelButton: true,
  1677. confirmButtonText: "继续创建",
  1678. cancelButtonText: "取消",
  1679. })
  1680. .then(() => {
  1681. this.salaryStatus = false;
  1682. this.onSubmit(1);
  1683. });
  1684. return;
  1685. } else {
  1686. this.onSubmitStatus = true;
  1687. this.salaryStatus = true;
  1688. this.$toast(result.msg);
  1689. }
  1690. })
  1691. .catch(() => {
  1692. this.onSubmitStatus = true;
  1693. this.salaryStatus = true;
  1694. setLoading(false);
  1695. });
  1696. },
  1697. checkCourseList(isShowToast = true) {
  1698. let form = this.form;
  1699. let scheduleList = this.scheduleList || [];
  1700. let hasOnLine = false; // 是否有线上课时安排
  1701. let hasOffLine = false;
  1702. scheduleList.forEach((item) => {
  1703. if (item.type == "线上") {
  1704. hasOnLine = true;
  1705. }
  1706. if (item.type == "线下") {
  1707. hasOffLine = true;
  1708. }
  1709. });
  1710. let statusList = this.statusList;
  1711. let onlineClassesStatus =
  1712. !form.onlineClassesNums && form.onlineClassesNums <= 0 ? true : false;
  1713. let offlineClassesStatus =
  1714. !form.offlineClassesNums && form.offlineClassesNums <= 0 ? true : false;
  1715. // let onlineClassesStatus = false
  1716. // if(form.onlineClassesNums || form.onlineClassesNums >= 0) {
  1717. // onlineClassesStatus = true
  1718. // }
  1719. // let offlineClassesStatus = false
  1720. // if(form.offlineClassesNums || form.offlineClassesNums >= 0) {
  1721. // offlineClassesStatus = true
  1722. // }
  1723. if (statusList.hasOnline) {
  1724. if (onlineClassesStatus) {
  1725. if (isShowToast) {
  1726. this.$toast("请输入线上课次数");
  1727. }
  1728. return false;
  1729. }
  1730. if (!onlineClassesStatus && !hasOnLine && form.onlineClassesNums > 0) {
  1731. if (isShowToast) {
  1732. this.$toast("课时安排缺少线上课类型");
  1733. }
  1734. return false;
  1735. }
  1736. } else {
  1737. return false;
  1738. }
  1739. if (statusList.hasOffline) {
  1740. if (offlineClassesStatus) {
  1741. if (isShowToast) {
  1742. this.$toast("请输入线下课次数");
  1743. }
  1744. return false;
  1745. }
  1746. if (
  1747. !offlineClassesStatus &&
  1748. !hasOffLine &&
  1749. form.offlineClassesNums > 0
  1750. ) {
  1751. if (isShowToast) {
  1752. this.$toast("课时安排缺少线下课类型");
  1753. }
  1754. return false;
  1755. }
  1756. } else {
  1757. return false;
  1758. }
  1759. return true;
  1760. },
  1761. // 搜索
  1762. onSearch() {
  1763. this.params.page = 1;
  1764. this.dataList = [];
  1765. this.dataShow = true;
  1766. this.loading = true;
  1767. this.finished = false;
  1768. this.getStudent();
  1769. },
  1770. getStudent() {
  1771. let params = this.params;
  1772. queryStudentsWithTeacher(params).then((res) => {
  1773. let result = res.data;
  1774. this.loading = false;
  1775. if (result.code == 200) {
  1776. params.page = result.data.pageNo;
  1777. this.dataList = this.dataList.concat(result.data.rows);
  1778. if (params.page >= result.data.totalPage) {
  1779. this.finished = true;
  1780. }
  1781. this.params.page++;
  1782. } else {
  1783. this.finished = true;
  1784. }
  1785. // 判断是否有数据
  1786. if (this.dataList.length <= 0) {
  1787. this.dataShow = false;
  1788. }
  1789. });
  1790. },
  1791. onPopupCancel() {
  1792. // 关闭弹窗
  1793. this.statusList.studentStatus = false;
  1794. // this.params.search = null
  1795. this.checkboxSelect = [];
  1796. this.checkboxSelectList = [];
  1797. },
  1798. onPopupSubmit() {
  1799. const vipGroupCategorySelect = this.loadData.vipGroupCategorySelect;
  1800. if (this.checkboxSelect.length != vipGroupCategorySelect.studentNum) {
  1801. this.$toast(
  1802. `请选择学生${vipGroupCategorySelect.studentNum}名,当前选择${this.checkboxSelect.length}名`
  1803. );
  1804. return;
  1805. }
  1806. this.checkboxSelectDataList = JSON.parse(
  1807. JSON.stringify(this.checkboxSelectList)
  1808. );
  1809. this.checkboxSelectIds = JSON.parse(JSON.stringify(this.checkboxSelect));
  1810. this.checkboxSelect = [];
  1811. this.checkboxSelectList = [];
  1812. this.loadData.vipGroupActivity = [];
  1813. this.formName.vipGroupActivityName = null;
  1814. this.formName.vipGroupCategoryIndex = 0;
  1815. this.form.vipGroupActivityId = null;
  1816. this.statusList.studentStatus = false;
  1817. },
  1818. onCheckboxSelect(value) {
  1819. if (this.checkboxSelect.includes(value.userId.toString())) {
  1820. this.checkboxSelect.forEach((item, index) => {
  1821. if (item == value.userId.toString()) {
  1822. this.checkboxSelect.splice(index, 1);
  1823. }
  1824. });
  1825. this.checkboxSelectList.forEach((item, index) => {
  1826. if (item.userId == value.userId) {
  1827. this.checkboxSelectList.splice(index, 1);
  1828. }
  1829. });
  1830. } else {
  1831. this.checkboxSelect.push(value.userId.toString());
  1832. this.checkboxSelectList.push(value);
  1833. }
  1834. // checkboxSelect = item.userId
  1835. },
  1836. desensitPhone(phone) {
  1837. // 手机号脱敏
  1838. let first = phone.substr(0, 3);
  1839. let last = phone.substr(-4);
  1840. return first + "****" + last;
  1841. },
  1842. },
  1843. };
  1844. </script>
  1845. <style lang='less' scoped>
  1846. @import url("../../assets/commonLess/variable.less");
  1847. .vip-title {
  1848. padding: 0.06rem 0 0.04rem;
  1849. font-size: 0.12rem;
  1850. color: @mFontColor;
  1851. text-align: center;
  1852. }
  1853. .courseTips {
  1854. font-size: 0.13rem;
  1855. padding: 10px 16px;
  1856. background: #f3f4f8;
  1857. & > span {
  1858. color: red;
  1859. }
  1860. }
  1861. .add-plan {
  1862. display: flex;
  1863. align-items: center;
  1864. justify-content: center;
  1865. padding: 0.2rem 0;
  1866. font-size: 0.16rem;
  1867. color: @tFontColor;
  1868. .van-icon {
  1869. margin-right: 0.05rem;
  1870. font-size: 0.2rem;
  1871. }
  1872. }
  1873. .title-time {
  1874. display: flex;
  1875. align-items: center;
  1876. flex: 1 auto;
  1877. color: #4a4a4a;
  1878. .online {
  1879. color: @tFontColor;
  1880. }
  1881. .week {
  1882. padding-left: 0.4rem;
  1883. padding-right: 0.15rem;
  1884. }
  1885. }
  1886. // /deep/.van-field__label,
  1887. // /deep/.van-cell__value {
  1888. // // flex: 1 auto;
  1889. // }
  1890. /deep/.van-field__label {
  1891. width: 50%;
  1892. }
  1893. /deep/.van-field__control:disabled {
  1894. color: #6a6969;
  1895. }
  1896. .button-group {
  1897. margin: 0.3rem 0.26rem 0.2rem;
  1898. .van-button--primary {
  1899. background: @mColor;
  1900. border-color: @mColor;
  1901. font-size: 0.18rem;
  1902. }
  1903. }
  1904. .van-row {
  1905. line-height: 0.4rem;
  1906. border-top: 1px solid #edeef0;
  1907. text-align: center;
  1908. font-size: 0.14rem;
  1909. &:first-child {
  1910. border-top: 0;
  1911. background: #edeef0;
  1912. color: #444;
  1913. font-size: 0.15rem;
  1914. }
  1915. }
  1916. .tableContainer {
  1917. max-height: 2.44rem;
  1918. overflow: auto;
  1919. .van-row {
  1920. color: #444;
  1921. &:first-child {
  1922. border-top: 0;
  1923. background: #fff;
  1924. font-size: 0.14rem;
  1925. }
  1926. }
  1927. }
  1928. .studentContainer {
  1929. /deep/.van-cell__title {
  1930. font-size: 0.14rem;
  1931. color: @mFontColor;
  1932. flex: 1 auto;
  1933. }
  1934. .logo {
  1935. width: 0.35rem;
  1936. height: 0.35rem;
  1937. margin-right: 0.12rem;
  1938. border-radius: 100%;
  1939. }
  1940. .input-cell {
  1941. padding: 0.12rem 0.16rem 0.2rem;
  1942. .van-checkbox {
  1943. justify-content: flex-end;
  1944. }
  1945. }
  1946. /deep/.van-cell__value {
  1947. height: 0.2rem;
  1948. }
  1949. /deep/.van-checkbox__icon .van-icon {
  1950. border-color: @sFontColor;
  1951. }
  1952. // /deep/.van-checkbox__icon--checked {
  1953. // .van-icon {
  1954. // border-color: @orangeColor;
  1955. // background: @orangeColor;
  1956. // }
  1957. // }
  1958. .van-tag {
  1959. margin-left: 0.08rem;
  1960. }
  1961. }
  1962. .paddingB80 {
  1963. padding-bottom: 0.8rem;
  1964. }
  1965. .button-group-popup {
  1966. position: fixed;
  1967. bottom: 0;
  1968. padding: 0.2rem 0;
  1969. width: 100%;
  1970. text-align: center;
  1971. background-color: #ffffff;
  1972. .btn {
  1973. padding: 0 0.45rem;
  1974. line-height: 0.4rem;
  1975. display: inline-block;
  1976. border: 1px solid @mColor;
  1977. border-radius: 1rem;
  1978. color: @mColor;
  1979. background: #fff;
  1980. font-size: 0.18rem;
  1981. &.primary {
  1982. color: #fff;
  1983. background: @mColor;
  1984. }
  1985. }
  1986. .btn + .btn {
  1987. margin-left: 0.1rem;
  1988. }
  1989. }
  1990. .studentColor {
  1991. color: @mColor;
  1992. }
  1993. /deep/.van-field--disabled .van-field__label,
  1994. /deep/.van-field__label {
  1995. color: #323233;
  1996. }
  1997. .courseStudent {
  1998. .van-cell__value {
  1999. color: #b2b2b2;
  2000. font-size: 0.16rem;
  2001. }
  2002. }
  2003. </style>