index.vue 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <el-page-header
  5. @back="onCancel"
  6. content="VIP/乐理课申请"
  7. ></el-page-header>
  8. <!-- <div class="squrt" /> -->
  9. </h2>
  10. <div class="m-core">
  11. <div class="vipLeft">
  12. <el-alert
  13. title="课程信息"
  14. type="info"
  15. :closable="false"
  16. class="vipMsg"
  17. ></el-alert>
  18. <el-form
  19. ref="leftForm"
  20. :inline="true"
  21. :rules="leftFormRules"
  22. :label-position="labelPosition"
  23. label-width="110px"
  24. :model="leftForm"
  25. >
  26. <!-- <el-form-item label="课程名称" prop="name">
  27. <el-input v-model.trim="leftForm.name" />
  28. </el-form-item> -->
  29. <!-- :disabled="!leftForm.teacher || !leftForm.educationalTeacherId" -->
  30. <el-form-item label="课程分部" prop="classOrganId">
  31. <el-select
  32. v-model.trim="leftForm.classOrganId"
  33. filterable
  34. clearable
  35. @change="onClassChange"
  36. >
  37. <el-option
  38. v-for="(item, index) in selects.branchs"
  39. :key="index"
  40. :label="item.name"
  41. :value="item.id"
  42. />
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item label="科目名称" prop="subject">
  46. <el-select
  47. v-model.trim="leftForm.subject"
  48. filterable
  49. clearable
  50. @change="changeSubject"
  51. :disabled="!leftForm.classOrganId"
  52. >
  53. <el-option
  54. v-for="(item, index) in subjectList"
  55. :key="index"
  56. :value="item.id"
  57. :label="item.name"
  58. />
  59. </el-select>
  60. </el-form-item>
  61. <!-- -->
  62. <el-form-item label="指导老师" prop="teacher">
  63. <el-select
  64. v-model.trim="leftForm.teacher"
  65. filterable
  66. clearable
  67. :disabled="!leftForm.subject"
  68. @change="setSection($event)"
  69. >
  70. <el-option
  71. v-for="(item, index) in teacherList"
  72. :key="index"
  73. :label="item.realName"
  74. :value="item.id"
  75. />
  76. </el-select>
  77. </el-form-item>
  78. <!-- @change="getClassOrgan()" -->
  79. <el-form-item label="乐团主管" prop="educationalTeacherId">
  80. <el-select
  81. v-model.trim="leftForm.educationalTeacherId"
  82. filterable
  83. clearable
  84. :disabled="!leftForm.subject"
  85. >
  86. <el-option
  87. v-for="(item, index) in educationList"
  88. :key="index"
  89. :label="item.userName"
  90. :value="item.userId"
  91. />
  92. </el-select>
  93. </el-form-item>
  94. <el-form-item label="课程形式" prop="courseType">
  95. <el-select
  96. v-model.trim="leftForm.courseType"
  97. clearable
  98. filterable
  99. :disabled="!leftForm.classOrganId || !leftForm.teacher"
  100. @change="changeType"
  101. >
  102. <el-option
  103. v-for="(item, index) in courseTypeList"
  104. :key="index"
  105. :label="item.name"
  106. :value="item.id"
  107. />
  108. </el-select>
  109. </el-form-item>
  110. <el-form-item label="教学点">
  111. <el-select
  112. v-model.trim="leftForm.section"
  113. filterable
  114. clearable
  115. :disabled="!leftForm.teacher"
  116. >
  117. <el-option
  118. v-for="(item, index) in scetionList"
  119. :key="index"
  120. :value="item.id"
  121. :label="item.name"
  122. />
  123. </el-select>
  124. </el-form-item>
  125. <el-form-item label="上课学员" prop="students">
  126. <el-select
  127. v-model.trim="leftForm.students"
  128. collapse-tags
  129. multiple
  130. clearable
  131. placeholder="请输入上课学员"
  132. remote
  133. reserve-keyword
  134. @change="changeStudent"
  135. filterable
  136. :multiple-limit="studentLimit"
  137. :disabled="!leftForm.classOrganId || !leftForm.courseType"
  138. :remote-method="remoteMethod"
  139. :loading="remoteLoading"
  140. >
  141. <el-option
  142. v-for="item in studentList"
  143. :key="item.userId"
  144. :label="item.username"
  145. :value="item.userId"
  146. >
  147. <span style="float: left">{{ item.username }}</span>
  148. <span style="float: right; color: #8492a6; font-size: 13px">{{
  149. item.parentsPhone
  150. }}</span>
  151. </el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item label="活动方案" prop="activeType" v-if="isMusicTheory">
  155. <el-select
  156. v-model.trim="leftForm.activeType"
  157. filterable
  158. clearable
  159. :disabled="!leftForm.courseType || (!leftForm.students || leftForm.students && leftForm.students.length <= 0) || isMusicTheory"
  160. @change="chioseActive"
  161. >
  162. <el-option
  163. v-for="(item, index) in activeList"
  164. :key="index"
  165. :value="item.id"
  166. :label="item.name"
  167. />
  168. </el-select>
  169. </el-form-item>
  170. <el-form-item
  171. label="活动方案"
  172. prop="activeType"
  173. v-else
  174. :rules="[
  175. {
  176. required: true,
  177. message: '请选择活动方案',
  178. trigger: 'change',
  179. },
  180. ]"
  181. >
  182. <el-select
  183. v-model.trim="leftForm.activeType"
  184. filterable
  185. clearable
  186. :disabled="!leftForm.courseType || (!leftForm.students || leftForm.students && leftForm.students.length <= 0) "
  187. @change="chioseActive"
  188. >
  189. <el-option
  190. v-for="(item, index) in activeList"
  191. :key="index"
  192. :value="item.id"
  193. :label="item.name"
  194. />
  195. </el-select>
  196. </el-form-item>
  197. <el-form-item label="每课时长">
  198. <el-select
  199. v-model.trim="leftForm.classTime"
  200. :disabled="timeTable.length > 0"
  201. >
  202. <el-option
  203. v-for="(item, index) in this.classTimeList"
  204. :key="index"
  205. :value="item"
  206. :label="item"
  207. ></el-option>
  208. </el-select>
  209. </el-form-item>
  210. <el-form-item label="报名开始时间" prop="signUpStart">
  211. <!-- @change="changeStartTime" -->
  212. <el-date-picker
  213. v-model.trim="leftForm.signUpStart"
  214. type="date"
  215. :picker-options="pickerOptions"
  216. value-format="yyyy-MM-dd HH:mm:ss"
  217. placeholder="请选择时间"
  218. />
  219. <!-- <el-date-picker
  220. v-model="leftForm.signTimer"
  221. type="daterange"
  222. range-separator="至"
  223. start-placeholder="开始日期"
  224. end-placeholder="结束日期"
  225. >
  226. </el-date-picker> -->
  227. </el-form-item>
  228. <el-form-item label="报名结束时间" prop="signUpEnd">
  229. <el-date-picker
  230. v-model.trim="leftForm.signUpEnd"
  231. type="date"
  232. :picker-options="pickerOptions1"
  233. value-format="yyyy-MM-dd HH:mm:ss"
  234. placeholder="请选择时间"
  235. />
  236. </el-form-item>
  237. </el-form>
  238. </div>
  239. <div class="center">
  240. <el-alert
  241. title="排课设置"
  242. type="info"
  243. :closable="false"
  244. class="vipMsg"
  245. ></el-alert>
  246. <p
  247. class="submitP"
  248. v-if="minCourseNum && maxCourseNum && this.hotType == 'DISCOUNT'"
  249. >
  250. 该活动最小课时数:<span style="color: red">{{ minCourseNum }}</span
  251. >节 最大课时数:<span style="color: red">{{ maxCourseNum }}</span
  252. >节
  253. </p>
  254. <el-form
  255. :inline="true"
  256. :model="centerForm"
  257. label-width="100px"
  258. :label-position="labelPosition"
  259. >
  260. <el-form-item v-if="leftForm.courseStart" label="最早排课时间">
  261. <el-date-picker
  262. v-model.trim="leftForm.courseStart"
  263. disabled
  264. type="date"
  265. value-format="yyyy-MM-dd HH:mm:ss"
  266. placeholder="请选择时间"
  267. />
  268. </el-form-item>
  269. <el-form-item v-if="leftForm.courseEnd" label="最晚排课时间">
  270. <el-date-picker
  271. v-model.trim="leftForm.courseEnd"
  272. disabled
  273. type="date"
  274. value-format="yyyy-MM-dd HH:mm:ss"
  275. placeholder="请选择时间"
  276. />
  277. </el-form-item>
  278. <el-form-item v-if="hasOnline" label="线上课数">
  279. <el-input
  280. v-model.trim="centerForm.onlineCourseNum"
  281. @mousewheel.native.prevent
  282. @input="onCourseNumChange('online')"
  283. type="number"
  284. >
  285. <template slot="append">节</template>
  286. </el-input>
  287. </el-form-item>
  288. <el-form-item v-if="hasOffline" label="线下课数">
  289. <el-input
  290. v-model.trim="centerForm.offlineCourseNum"
  291. @mousewheel.native.prevent
  292. @input="onCourseNumChange('offline')"
  293. type="number"
  294. >
  295. <template slot="append">节</template>
  296. </el-input>
  297. </el-form-item>
  298. <el-form-item label="待排课数">
  299. <el-input v-model.trim="allCourseCount" disabled>
  300. <template slot="append">节</template>
  301. </el-input>
  302. </el-form-item>
  303. <el-form-item
  304. v-if="hotType == 'GIVE_CLASS' && isGiveClass"
  305. label="赠课课程类型"
  306. >
  307. <el-radio v-model.trim="centerForm.radio" label="ONLINE"
  308. >线上课</el-radio
  309. >
  310. <el-radio v-model.trim="centerForm.radio" label="OFFLINE"
  311. >线下课</el-radio
  312. >
  313. </el-form-item>
  314. <el-form-item label="">
  315. <el-button type="danger" @click="setCourse">点击排课</el-button>
  316. </el-form-item>
  317. </el-form>
  318. <!-- 排课列表开始 planList-->
  319. <div class="">
  320. <!-- <div class="planTop">
  321. <p>已排课程</p>
  322. <el-button type="text" @click="setCourse">{{
  323. id ? "新增排课" : "点击排课"
  324. }}</el-button>
  325. </div> -->
  326. <!-- <div class="planCore"> -->
  327. <el-table
  328. style="width: 100%"
  329. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  330. :data="timeTable"
  331. >
  332. <el-table-column align="center" prop="studentId" label="课程时间">
  333. <template slot-scope="scope">
  334. <div>{{ scope.row.classDate | formatTimer }}</div>
  335. </template>
  336. </el-table-column>
  337. <el-table-column
  338. align="center"
  339. prop="studentId"
  340. label="课程开始时间"
  341. >
  342. <template slot-scope="scope">
  343. <div>{{ scope.row.startClassTimeStr }}</div>
  344. </template>
  345. </el-table-column>
  346. <el-table-column
  347. align="center"
  348. prop="studentId"
  349. label="课程结束时间"
  350. >
  351. <template slot-scope="scope">
  352. <div>{{ scope.row.endClassTimeStr }}</div>
  353. </template>
  354. </el-table-column>
  355. <el-table-column align="center" prop="studentId" label="课程类型">
  356. <template slot-scope="scope">
  357. <div>{{ scope.row.teachMode | teachMode }}</div>
  358. </template>
  359. </el-table-column>
  360. </el-table>
  361. <!-- <div class="row">
  362. <div class="name">时间</div>
  363. <div class="week">开始时间</div>
  364. <div class="time">结束时间</div>
  365. <div class="time">课程类型</div>
  366. </div> -->
  367. <!-- <div
  368. v-for="(item, index) in this.timeTable"
  369. :key="index"
  370. class="row"
  371. >
  372. <div class="name">{{ item.classDate | formatTimer }}</div>
  373. <div class="week">{{ item.startClassTimeStr }}</div>
  374. <div class="time">{{ item.endClassTimeStr }}</div>
  375. <div class="time">{{ item.teachMode | teachMode }}</div>
  376. </div> -->
  377. <!-- </div> -->
  378. </div>
  379. </div>
  380. <div class="right">
  381. <el-alert
  382. title="课酬&缴费设置"
  383. type="info"
  384. :closable="false"
  385. class="vipMsg"
  386. ></el-alert>
  387. <el-form
  388. :model="rightForm"
  389. label-width="100px"
  390. :label-position="labelPosition"
  391. :inline="true"
  392. >
  393. <el-form-item v-if="hasOnline" label="线上课课酬">
  394. <el-input v-model.trim="rightForm.onlineCourse" :disabled="true">
  395. <template slot="append" v-if="!isMusicTheory">元/节</template>
  396. <template slot="append" v-else>元/人</template>
  397. </el-input>
  398. <!-- || onlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
  399. </el-form-item>
  400. <el-form-item v-if="hasOffline" label="线下课课酬">
  401. <el-input v-model.trim="rightForm.offlineCourse" :disabled="true">
  402. <template slot="append" v-if="!isMusicTheory">元/节</template>
  403. <template slot="append" v-else>元/人</template>
  404. </el-input>
  405. <!-- || offlineSalary!='TEACHER_DEFAULT' salaryReadonlyFlag==0 -->
  406. </el-form-item>
  407. <!-- <el-form-item v-if="hasOnline" label="线上课单价">
  408. <el-input
  409. v-model.trim="rightForm.onlinePrice"
  410. :disabled="paymentReadonlyFlag == 0"
  411. />
  412. </el-form-item>
  413. <el-form-item v-if="hasOffline" label="线下课单价">
  414. <el-input
  415. v-model.trim="rightForm.offlinePrice"
  416. :disabled="paymentReadonlyFlag == 0"
  417. />
  418. </el-form-item> -->
  419. <!-- <el-form-item label="课程总价">
  420. <el-input v-model.trim="rightForm.allPrice" disabled />
  421. </el-form-item> -->
  422. </el-form>
  423. <div style="width: 700px; clear: both">
  424. <el-table
  425. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  426. :data="activeStudentList"
  427. >
  428. <el-table-column align="center" prop="studentId" label="学员编号">
  429. </el-table-column>
  430. <el-table-column align="center" prop="userName" label="学员名称">
  431. </el-table-column>
  432. <el-table-column
  433. align="center"
  434. prop="studentId"
  435. v-if="hasOnline"
  436. label="线上课单价"
  437. >
  438. <template slot-scope="scope">
  439. <el-input-number
  440. :disabled="!isMusicTheory"
  441. size="mini"
  442. @change="changeStudentMoney"
  443. style="width: 90% !important"
  444. class="number-input"
  445. v-model="scope.row.onlineClassesUnitPrice"
  446. :controls="false"
  447. :min="0"
  448. placeholder="线上课单价"
  449. />
  450. </template>
  451. </el-table-column>
  452. <el-table-column
  453. align="center"
  454. prop="studentId"
  455. v-if="hasOffline"
  456. label="线下课单价"
  457. >
  458. <template slot-scope="scope">
  459. <el-input-number
  460. @change="changeStudentMoney"
  461. size="mini"
  462. style="width: 90% !important"
  463. class="number-input"
  464. :disabled="!isMusicTheory"
  465. v-model="scope.row.offlineClassesUnitPrice"
  466. :controls="false"
  467. :min="0"
  468. placeholder="线下课单价"
  469. />
  470. </template>
  471. </el-table-column>
  472. <el-table-column align="center" prop="studentId" label="缴费总额">
  473. <template slot-scope="scope">
  474. <el-input-number
  475. size="mini"
  476. style="width: 90% !important"
  477. class="number-input"
  478. v-model="scope.row.paymentPrice"
  479. :controls="false"
  480. :min="0"
  481. :disabled="true"
  482. placeholder="缴费总额"
  483. />
  484. </template>
  485. </el-table-column>
  486. </el-table>
  487. <!-- class="computeMoney" -->
  488. <div style="overflow: hidden">
  489. <el-button
  490. type="primary"
  491. class="computeMoney"
  492. @click="computational"
  493. >计算</el-button
  494. >
  495. </div>
  496. </div>
  497. </div>
  498. </div>
  499. <!-- 弹窗 -->
  500. <el-dialog
  501. title="VIP排课"
  502. ref="maskForm"
  503. width="500px"
  504. destroy-on-close
  505. :visible.sync="dialogFormVisible"
  506. >
  507. <el-form :model="maskForm" label-position="right" label-width="150px">
  508. <el-form-item label="开课时间">
  509. <!-- :picker-options="pickerOptions" -->
  510. <el-date-picker
  511. v-model.trim="maskForm.courseStartOnline"
  512. type="date"
  513. :picker-options="courseOption"
  514. placeholder="请选择开课时间"
  515. />
  516. </el-form-item>
  517. <!-- <el-form-item label="线下课开课时间">
  518. <el-date-picker
  519. v-model.trim="maskForm.courseStartOffline"
  520. type="date"
  521. :picker-options="courseOption"
  522. placeholder="请选择开课时间"
  523. />
  524. </el-form-item> -->
  525. <div
  526. class="line"
  527. style="height: 1px; background: #ccc; margin: 0 25px"
  528. ></div>
  529. <el-form-item label="课程类型" prop="type">
  530. <el-radio v-if="hasOnline" v-model.trim="maskForm.type" label="ONLINE"
  531. >线上课</el-radio
  532. >
  533. <el-radio
  534. v-if="hasOffline"
  535. v-model.trim="maskForm.type"
  536. label="OFFLINE"
  537. >线下课</el-radio
  538. >
  539. </el-form-item>
  540. <el-form-item label="循环周次" prop="week">
  541. <el-select
  542. v-model.trim="maskForm.week"
  543. style="width: 220px !important"
  544. >
  545. <el-option label="星期日" value="0" />
  546. <el-option label="星期一" value="1" />
  547. <el-option label="星期二" value="2" />
  548. <el-option label="星期三" value="3" />
  549. <el-option label="星期四" value="4" />
  550. <el-option label="星期五" value="5" />
  551. <el-option label="星期六" value="6" />
  552. </el-select>
  553. </el-form-item>
  554. <el-form-item label="上课时间" prop="startTime">
  555. <el-time-picker
  556. v-model.trim="maskForm.startTime"
  557. @change="getStartTime"
  558. format="HH:mm"
  559. value-format="HH:mm"
  560. placeholder="选择时间"
  561. />
  562. </el-form-item>
  563. <el-form-item label="下课时间" prop="endTime">
  564. <el-time-picker
  565. v-model.trim="maskForm.endTime"
  566. disabled
  567. format="HH:mm"
  568. value-format="HH:mm"
  569. :picker-options="{
  570. start: '04:30',
  571. step: '00:05',
  572. end: '23:30',
  573. }"
  574. placeholder="选择时间"
  575. />
  576. </el-form-item>
  577. </el-form>
  578. <div class="btnWrap">
  579. <div class="okBtn" @click="addWeek">确认</div>
  580. </div>
  581. <div class="planList">
  582. <div class="planTop">
  583. <p>已排课程</p>
  584. </div>
  585. <div class="planCore" v-if="this.lookList.length > 0">
  586. <div v-for="(item, index) in this.lookList" class="row" :key="index">
  587. <div class="name">{{ item.type }}</div>
  588. <div class="week">{{ item.week }}</div>
  589. <div class="time">{{ item.time }}</div>
  590. <div class="operation">
  591. <el-button type="text" @click="removeWeekCourse(item.id)"
  592. >删除</el-button
  593. >
  594. </div>
  595. </div>
  596. </div>
  597. <div class="nomore" v-else>暂无数据</div>
  598. <div slot="footer" style="margin-top: 20px" class="dialog-footer">
  599. <el-button @click="dialogFormVisible = false">取 消</el-button>
  600. <el-button type="primary" @click="setTimeTable">确 定</el-button>
  601. </div>
  602. </div>
  603. </el-dialog>
  604. <el-row>
  605. <el-col>
  606. <div class="okBtn" @click="submitInfo">{{ id ? "修改" : "确定" }}</div>
  607. </el-col>
  608. </el-row>
  609. <!-- <div class="btnWrap"> -->
  610. <!-- <div class="closeBtn">
  611. 取消
  612. </div>-->
  613. <!-- </div> -->
  614. </div>
  615. </template>
  616. <script>
  617. import {
  618. findTeacherByOrganId,
  619. getSubject,
  620. findEducationUsers,
  621. } from "@/api/buildTeam";
  622. import {
  623. vipGroupCategory,
  624. vipGroupActivityFind,
  625. getVipGroupCostCount,
  626. createVip,
  627. updateVipBaseInfo,
  628. } from "@/api/vipSeting";
  629. import { getTeachSchool, getTeacherBySubject } from "@/api/teacherManager";
  630. import axios from "axios";
  631. import { getToken } from "@/utils/auth";
  632. import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
  633. import { queryOrganStudentList } from "@/api/studentManager";
  634. import dayjs from "dayjs";
  635. export default {
  636. name: "buildVip",
  637. data() {
  638. return {
  639. dialogFormVisible: false,
  640. labelPosition: "right",
  641. leftForm: {
  642. // name: "",
  643. teacher: "",
  644. subject: "",
  645. courseType: "",
  646. activeType: "",
  647. classNum: "",
  648. classTime: "",
  649. // signTimer:[],
  650. signUpStart: "",
  651. signUpEnd: "",
  652. courseStartOnline: "",
  653. courseStartOffline: "",
  654. section: "",
  655. courseStart: "",
  656. courseEnd: "",
  657. educationalTeacherId: "",
  658. students: [],
  659. classOrganId: "", // 课程分部
  660. },
  661. activeStudentList: [],
  662. studentLimit: 0,
  663. classTimeList: [],
  664. centerForm: {
  665. allCourseNum: "",
  666. onlineCourseNum: 0,
  667. offlineCourseNum: 0,
  668. radio: "",
  669. },
  670. maskForm: {
  671. type: "",
  672. week: "",
  673. startTime: "",
  674. endTime: "",
  675. },
  676. rightForm: {
  677. onlineCourse: "",
  678. offlineCourse: "",
  679. onlinePrice: "",
  680. offlinePrice: "",
  681. allPrice: "",
  682. },
  683. remoteLoading: false,
  684. computationalBtn: false,
  685. subjectList: [], // 科目列表
  686. teacherList: [], // 老师列表
  687. educationList: [], // 教务
  688. // classOrganList: [], // 公用分部
  689. courseTypeList: [], // 课程类型集合
  690. activeList: [], //活动集合
  691. hasOnline: true,
  692. hasOffline: true,
  693. onlineSalary: "", // 线上课课酬结算方式
  694. offlineSalary: "", // 线下课课酬结算方式
  695. hotType: "",
  696. attribute1: "",
  697. attribute2: "",
  698. attribute3: "",
  699. maxCourseNum: 0,
  700. minCourseNum: 0,
  701. salaryReadonlyFlag: "", // 老师课酬是否可配
  702. paymentReadonlyFlag: "", // 课程单价是否可配
  703. lookList: [],
  704. onlinelookList: [], // 展示课表线上
  705. offlineLookList: [], // 展示课表线下
  706. timeTable: [], // 真正的课表
  707. giveNum: "",
  708. weekDay: [
  709. "星期日",
  710. "星期一",
  711. "星期二",
  712. "星期三",
  713. "星期四",
  714. "星期五",
  715. "星期六",
  716. ],
  717. scetionList: [],
  718. isGiveClass: false,
  719. activeStartTime: null,
  720. courseOption: null,
  721. pickerOptions: null,
  722. pickerOptions1: null,
  723. leftFormRules: {
  724. /**?
  725. * teacher: '',
  726. subject: '',
  727. courseType: '',
  728. activeType: '',
  729. */
  730. name: [
  731. {
  732. required: true,
  733. message: "请输入名称",
  734. trigger: "blur",
  735. },
  736. ],
  737. teacher: [
  738. {
  739. required: true,
  740. message: "请选择老师",
  741. trigger: "change",
  742. },
  743. ],
  744. educationalTeacherId: [
  745. {
  746. required: true,
  747. message: "请选择教务",
  748. trigger: "change",
  749. },
  750. ],
  751. classOrganId: [
  752. {
  753. required: true,
  754. message: "请选择课程分部",
  755. trigger: "change",
  756. },
  757. ],
  758. subject: [
  759. {
  760. required: true,
  761. message: "请选择科目",
  762. trigger: "change",
  763. },
  764. ],
  765. courseType: [
  766. {
  767. required: true,
  768. message: "请选择课程类型",
  769. trigger: "change",
  770. },
  771. ],
  772. students: [
  773. {
  774. required: true,
  775. message: "请选择上课学生",
  776. trigger: "change",
  777. },
  778. ],
  779. // activeType: [
  780. // {
  781. // required: true,
  782. // message: "请选择活动",
  783. // trigger: "change",
  784. // },
  785. // ],
  786. signUpStart: [
  787. {
  788. required: true,
  789. message: "请选择报名开始时间",
  790. trigger: "change",
  791. },
  792. ],
  793. signUpEnd: [
  794. {
  795. required: true,
  796. message: "请选择报名结束时间",
  797. trigger: "change",
  798. },
  799. ],
  800. },
  801. id: "",
  802. studentList: [],
  803. courseTimeList: [],
  804. isMusicTheory: false,
  805. };
  806. },
  807. computed: {
  808. allCourseCount() {
  809. let online, offline;
  810. this.centerForm.onlineCourseNum
  811. ? (online = this.centerForm.onlineCourseNum)
  812. : (online = 0);
  813. this.centerForm.offlineCourseNum
  814. ? (offline = this.centerForm.offlineCourseNum)
  815. : (offline = 0);
  816. let giveNum;
  817. if (this.hotType == "GIVE_CLASS") {
  818. // this.attribute1 从多少节开始送
  819. // this.attribute2 送多少节
  820. giveNum = parseInt(
  821. parseInt(offline) + parseInt(online) - this.attribute1 >= 0
  822. ? (giveNum = this.attribute2)
  823. : (giveNum = 0)
  824. );
  825. if (giveNum) {
  826. // 有赠送课时
  827. this.isGiveClass = true;
  828. }
  829. this.giveNum = giveNum || 0;
  830. return parseInt(offline) + parseInt(online) + "+" + giveNum || "";
  831. }
  832. return parseInt(offline) + parseInt(online) || "";
  833. },
  834. },
  835. created() {
  836. // this.init();
  837. },
  838. mounted() {
  839. // 获取所有老师的接口 根据声部id获取老师
  840. // 获取课程类型的接口
  841. // 获取学生列表
  842. Object.assign(this.$data, this.$options.data());
  843. setTimeout(() => {
  844. this.$refs["leftForm"].resetFields();
  845. }, 100);
  846. this.init();
  847. },
  848. activated() {
  849. // Object.assign(this.$data, this.$options.data());
  850. // setTimeout(() => {
  851. // this.$refs["leftForm"].resetFields();
  852. // }, 100);
  853. // this.init();
  854. },
  855. methods: {
  856. async init() {
  857. if (this.$route.query.rules) {
  858. this.rules = this.$route.query.rules;
  859. }
  860. if (this.$route.query.searchForm) {
  861. this.searchForm = this.$route.query.searchForm;
  862. }
  863. // 获取所有科目的接口
  864. await this.$store.dispatch("setBranchs");
  865. getSubject({
  866. tenantId: 1,
  867. }).then((res) => {
  868. if (res.code == 200) {
  869. this.subjectList = res.data;
  870. }
  871. });
  872. // 获取乐团主管
  873. this.pickerOptions = this.beginDate();
  874. this.pickerOptions1 = this.processDate();
  875. this.courseOption = this.coursesDate();
  876. },
  877. onCourseNumChange(type) {
  878. // 折扣类型,并且设置的排课数有值
  879. let centerForm = this.centerForm;
  880. if (
  881. this.hotType == "DISCOUNT" &&
  882. this.maxCourseNum &&
  883. this.minCourseNum
  884. ) {
  885. // 判断线上或线下总和大于排课次数
  886. let onlineNum = centerForm.onlineCourseNum || 0;
  887. let offlineNum = centerForm.offlineCourseNum || 0;
  888. let allNUm = parseInt(onlineNum) + parseInt(offlineNum);
  889. if (allNUm > this.maxCourseNum || allNUm < this.minCourseNum) {
  890. this.$message.error("待排课数不可超过该活动限制");
  891. return;
  892. }
  893. }
  894. },
  895. coursesDate() {
  896. let self = this;
  897. return {
  898. firstDayOfWeek: 1,
  899. disabledDate: (time) => {
  900. if (self.leftForm.courseStart) {
  901. let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
  902. let nowDate = new Date()
  903. let changeDate = date.getTime()-nowDate.getTime() >0?date:nowDate
  904. return time.getTime() < changeDate.getTime();
  905. }
  906. return;
  907. },
  908. };
  909. },
  910. beginDate() {
  911. let self = this;
  912. return {
  913. firstDayOfWeek: 1,
  914. disabledDate(time) {
  915. return time.getTime() + 86400000 <= new Date().getTime(); //开始时间不选时,结束时间最大值小于等于当天
  916. },
  917. };
  918. },
  919. processDate() {
  920. //提出结束时间必须大于提出开始时间
  921. let self = this;
  922. return {
  923. firstDayOfWeek: 1,
  924. disabledDate(time) {
  925. if (self.leftForm.signUpStart) {
  926. return (
  927. new Date(self.leftForm.signUpStart).getTime() > time.getTime()
  928. );
  929. } else {
  930. return time.getTime() > Date.now();
  931. //开始时间不选时,结束时间最大值小于等于当天
  932. }
  933. },
  934. };
  935. },
  936. changeSubject(val) {
  937. this.leftForm.teacher = "";
  938. this.leftForm.section = "";
  939. // 根据科目id获取相应的老师
  940. findTeacherByOrganId({
  941. subjectIds: val,
  942. organId: this.leftForm.classOrganId,
  943. }).then((res) => {
  944. if (res.code == 200) {
  945. this.teacherList = res.data;
  946. }
  947. });
  948. // getTeacherBySubject({ subjecId: val }).then(res => {
  949. // if (res.code == 200) {
  950. // this.teacherList = res.data;
  951. // }
  952. // })
  953. },
  954. // 选择课程类型
  955. changeType(val) {
  956. // 在这里清空默认课酬
  957. this.rightForm.offlineCourse = "";
  958. this.rightForm.onlineCourse = "";
  959. this.leftForm.activeType = "";
  960. this.leftForm.students = []; // 重置所选学生
  961. for (let i in this.courseTypeList) {
  962. if (this.courseTypeList[i].id == val) {
  963. // 学生人数
  964. this.leftForm.classNum = this.courseTypeList[i].studentNum;
  965. this.studentLimit = this.courseTypeList[i].studentNum;
  966. // 每课时长
  967. this.classTimeList = this.courseTypeList[i].singleClassMinutes.split(
  968. ","
  969. );
  970. // this.leftForm.classTime = this.courseTypeList[i].singleClassMinutes;
  971. this.leftForm.classTime = this.classTimeList[0];
  972. // 线上课单节价格
  973. this.rightForm.onlinePrice = this.courseTypeList[
  974. i
  975. ].onlineClassesUnitPrice;
  976. // 线下课单节价格
  977. this.rightForm.offlinePrice = this.courseTypeList[
  978. i
  979. ].offlineClassesUnitPrice;
  980. this.isMusicTheory = this.courseTypeList[i].musicTheory;
  981. }
  982. }
  983. },
  984. // 选择活动方案
  985. chioseActive(val) {
  986. this.rightForm.offlineCourse = "";
  987. this.rightForm.onlineCourse = "";
  988. // this.rightForm.onlinePrice = '';
  989. // this.rightForm.offlinePrice = '';
  990. this.lookList = [];
  991. this.timeTable = [];
  992. this.attribute1 = "";
  993. this.attribute2 = "";
  994. this.attribute3 = "";
  995. this.giveNum = 0;
  996. this.isGiveClass = false;
  997. this.leftForm.courseStart = "";
  998. this.leftForm.courseEnd = "";
  999. this.hasOnline = true;
  1000. this.hasOffline = true;
  1001. if (val) {
  1002. for (let i in this.courseTypeList) {
  1003. if (this.courseTypeList[i].id == this.leftForm.courseType) {
  1004. // 学生人数
  1005. this.leftForm.classNum = this.courseTypeList[i].studentNum;
  1006. // 每课时长
  1007. this.classTimeList = this.courseTypeList[
  1008. i
  1009. ].singleClassMinutes.split(",");
  1010. // this.leftForm.classTime = this.courseTypeList[i].singleClassMinutes;
  1011. this.leftForm.classTime = this.classTimeList[0];
  1012. // 线上课单节价格
  1013. this.rightForm.onlinePrice = this.courseTypeList[
  1014. i
  1015. ].onlineClassesUnitPrice;
  1016. // 线下课单节价格
  1017. this.rightForm.offlinePrice = this.courseTypeList[
  1018. i
  1019. ].offlineClassesUnitPrice;
  1020. }
  1021. }
  1022. // 根须活动id获取 相应的值
  1023. for (let i in this.activeList) {
  1024. if (this.activeList[i].id == val) {
  1025. // 如果是买赠就必须选择赠课类型
  1026. // 报名开始 报名结束 课程开始 课程结束 // 判断是否有线上,线下课 并同步状态
  1027. // this.leftForm.signUpStart = this.activeList[i].startTime;
  1028. // this.leftForm.signUpEnd = this.activeList[i].endTime;
  1029. this.maxCourseNum = this.activeList[i].maxCourseNum || 0;
  1030. this.minCourseNum = this.activeList[i].minCourseNum || 0;
  1031. this.leftForm.courseStart = this.activeList[i].coursesStartTime;
  1032. this.leftForm.courseEnd = this.activeList[i].coursesEndTime;
  1033. // 获取活动种类并保存
  1034. this.hotType = this.activeList[i].type;
  1035. // 获取买赠必要参数
  1036. this.attribute1 = this.activeList[i].attribute1;
  1037. this.attribute2 = this.activeList[i].attribute2;
  1038. this.attribute3 = this.activeList[i].attribute3;
  1039. // 存储课酬是否可配置
  1040. this.salaryReadonlyFlag = this.activeList[i].salaryReadonlyFlag;
  1041. this.paymentReadonlyFlag = this.activeList[i].paymentReadonlyFlag;
  1042. // hasOnline: false, hasOffline: false 还需要判断type类型 根据活动id获取
  1043. if (this.activeList[i].salarySettlementJson) {
  1044. let obj = JSON.parse(this.activeList[i].salarySettlementJson);
  1045. if (obj && obj.onlineSalarySettlement) {
  1046. // 有线上课
  1047. this.hasOnline = true;
  1048. this.onlineSalary =
  1049. obj.onlineSalarySettlement.salarySettlementType;
  1050. // ('线上:' + this.onlineSalary)
  1051. } else {
  1052. this.hasOnline = false;
  1053. }
  1054. if (obj && obj.offlineSalarySettlement) {
  1055. // 有线下课
  1056. this.hasOffline = true;
  1057. this.offlineSalary =
  1058. obj.offlineSalarySettlement.salarySettlementType;
  1059. // ('线下:' + this.offlineSalary)
  1060. } else {
  1061. this.hasOffline = false;
  1062. }
  1063. }
  1064. }
  1065. }
  1066. }
  1067. // 重置课程单价
  1068. },
  1069. // 点击确插入课表
  1070. addWeek() {
  1071. let courseType = this.maskForm.type;
  1072. // let week = ;this.maskForm.week
  1073. let startTime = this.maskForm.startTime;
  1074. if (!courseType || !this.maskForm.week || !startTime) {
  1075. this.$message.error("请填写完成信息");
  1076. return;
  1077. }
  1078. // 拿到相应的值插入数组
  1079. let endTime = this.MinutesTest(startTime, this.leftForm.classTime);
  1080. let str;
  1081. switch (courseType) {
  1082. case "ONLINE": {
  1083. str = "线上课";
  1084. break;
  1085. }
  1086. case "OFFLINE": {
  1087. str = "线下课";
  1088. break;
  1089. }
  1090. }
  1091. let flag = false;
  1092. for (let i in this.lookList) {
  1093. if (this.lookList[i].weekDay == this.maskForm.week) {
  1094. flag = true;
  1095. }
  1096. }
  1097. // true=> 说明有这一周 那么循环找到这一周 在判断时间
  1098. // flase=> 说明没有这一周的时间 直接添加
  1099. if (flag) {
  1100. // 有相同的周日
  1101. let arr = [];
  1102. for (let i in this.lookList) {
  1103. if (this.lookList[i].weekDay == this.maskForm.week) {
  1104. // 找到这一天的所有元素
  1105. // && !this.timeIsrange(this.lookList[i].startTime, this.lookList[i].endTime, startTime) && !this.timeIsrange(this.lookList[i].startTime, this.lookList[i].endTime, endTime)
  1106. let isStartTime = this.timeIsrange(
  1107. startTime,
  1108. endTime,
  1109. this.lookList[i].startTime
  1110. );
  1111. let isEndTime = this.timeIsrange(
  1112. startTime,
  1113. endTime,
  1114. this.lookList[i].endTime
  1115. );
  1116. arr.push(!isEndTime && !isStartTime);
  1117. }
  1118. }
  1119. let isAdd = true;
  1120. for (let j = 0; j < arr.length; j++) {
  1121. isAdd = isAdd && arr[j];
  1122. }
  1123. if (isAdd) {
  1124. this.lookList.push({
  1125. type: str,
  1126. week: this.weekDay[this.maskForm.week],
  1127. weekDay: this.maskForm.week,
  1128. startTime: startTime,
  1129. endTime: endTime,
  1130. time: startTime + "-" + endTime,
  1131. id: Date.now(),
  1132. });
  1133. } else {
  1134. this.$message.error("该时间段已排课请重选时间");
  1135. return;
  1136. }
  1137. } else {
  1138. this.lookList.push({
  1139. type: str,
  1140. week: this.weekDay[this.maskForm.week],
  1141. weekDay: this.maskForm.week,
  1142. startTime: startTime,
  1143. endTime: endTime,
  1144. time: startTime + "-" + endTime,
  1145. id: Date.now(),
  1146. });
  1147. }
  1148. // let courseType = this.maskForm.type;
  1149. // // let week = ;this.maskForm.week
  1150. // let startTime = this.maskForm.startTime;
  1151. // 根据时间排序
  1152. this.maskForm.type = "";
  1153. this.maskForm.week = "";
  1154. this.maskForm.startTime = "";
  1155. this.maskForm.endTime = "";
  1156. },
  1157. // 分钟小时相加减
  1158. MinutesTest(str, interval) {
  1159. let houer = str.split(":")[0];
  1160. let min = str.split(":")[1];
  1161. let sdate1 = new Date(1900, 1, 1, houer, min);
  1162. sdate1.setMinutes(sdate1.getMinutes() + parseInt(interval));
  1163. let H = sdate1.getHours();
  1164. let M = sdate1.getMinutes();
  1165. if (H < 10) H = "0" + H;
  1166. if (M < 10) M = "0" + M;
  1167. return H + ":" + M;
  1168. },
  1169. // 判断时间是否在时间段内
  1170. timeIsrange(beginTime, endTime, nowTime) {
  1171. var strb = beginTime.split(":");
  1172. if (strb.length != 2) {
  1173. return false;
  1174. }
  1175. var stre = endTime.split(":");
  1176. if (stre.length != 2) {
  1177. return false;
  1178. }
  1179. var strn = nowTime.split(":");
  1180. if (stre.length != 2) {
  1181. return false;
  1182. }
  1183. var b = new Date();
  1184. var e = new Date();
  1185. var n = new Date();
  1186. b.setHours(strb[0]);
  1187. b.setMinutes(strb[1]);
  1188. e.setHours(stre[0]);
  1189. e.setMinutes(stre[1]);
  1190. n.setHours(strn[0]);
  1191. n.setMinutes(strn[1]);
  1192. if (n.getTime() - b.getTime() >= 0 && n.getTime() - e.getTime() <= 0) {
  1193. // 在时间范围内
  1194. return true;
  1195. } else {
  1196. // 不在时间范围内
  1197. return false;
  1198. }
  1199. },
  1200. removeWeekCourse(id) {
  1201. for (let i in this.lookList) {
  1202. if (this.lookList[i].id == id) {
  1203. this.lookList.splice(i, 1);
  1204. }
  1205. }
  1206. },
  1207. setTimeTable() {
  1208. // 拿到线上课数与线下课数 以及
  1209. this.timeTable = [];
  1210. let online = parseInt(this.centerForm.onlineCourseNum) || 0;
  1211. let offline = parseInt(this.centerForm.offlineCourseNum) || 0;
  1212. let giveNum = this.giveNum;
  1213. let giveClassType = this.centerForm.radio;
  1214. if (giveClassType == "ONLINE") {
  1215. // 线上
  1216. online += giveNum;
  1217. } else if (giveClassType == "OFFLINE") {
  1218. offline += giveNum;
  1219. }
  1220. if (!this.maskForm.courseStartOnline) {
  1221. this.$message.error("请选择课程开始时间");
  1222. return;
  1223. }
  1224. // 这里判断是否选择了排课开始时间
  1225. // if (online && !this.maskForm.courseStartOnline) {
  1226. // this.$message.error("选择了线上课 但没有线上课开始时间");
  1227. // return;
  1228. // }
  1229. // if (offline && !this.maskForm.courseStartOffline) {
  1230. // this.$message.error("选择了线下课 但没有线下课开始时间");
  1231. // return;
  1232. // }
  1233. let date, date1;
  1234. date = new Date(this.maskForm.courseStartOnline.getTime());
  1235. date1 = new Date(this.maskForm.courseStartOnline.getTime());
  1236. // if (this.maskForm.courseStartOnline) {
  1237. // date = new Date(this.maskForm.courseStartOnline.getTime());
  1238. // }
  1239. // if (this.maskForm.courseStartOffline) {
  1240. // date1 = new Date(this.maskForm.courseStartOffline.getTime());
  1241. // }
  1242. // let startWeekday = this.maskForm.courseStart.getDay();
  1243. let onlineList = []; // 装线上课的数组
  1244. let offlineList = []; //装线下课的数组
  1245. if (this.lookList.length <= 0) {
  1246. this.$message.error("请先排课后再点击确认按钮");
  1247. return;
  1248. }
  1249. for (let i in this.lookList) {
  1250. if (this.lookList[i].type == "线上课") {
  1251. onlineList.push({
  1252. week: this.lookList[i].weekDay,
  1253. date: this.lookList[i],
  1254. });
  1255. }
  1256. if (this.lookList[i].type == "线下课") {
  1257. offlineList.push({
  1258. week: this.lookList[i].weekDay,
  1259. date: this.lookList[i],
  1260. });
  1261. }
  1262. }
  1263. // (onlineList + '----------------------------------------------------------------------------------');
  1264. // (offlineList);
  1265. if (online > 0 && onlineList.length <= 0) {
  1266. this.$message.error("选择了线上课但未排线上课");
  1267. this.timeTable = [];
  1268. return;
  1269. }
  1270. if (offline > 0 && offlineList.length <= 0) {
  1271. this.$message.error("选择了线下课但未排线下课");
  1272. this.timeTable = [];
  1273. return;
  1274. }
  1275. // 获取要排课的总数 获取每周要排多少次
  1276. while (online && online > 0) {
  1277. // 排线上课g
  1278. for (let i in onlineList) {
  1279. let num;
  1280. onlineList[i].week - date.getDay() >= 0
  1281. ? (num = onlineList[i].week - date.getDay())
  1282. : (num = onlineList[i].week - date.getDay() + 7); // +差值的天数://差值的天数+7
  1283. // (num);
  1284. let dataStr = this.getThinkDate(date, num);
  1285. this.timeTable.push({
  1286. classDate: dataStr + " 00:00:00",
  1287. actualTeacherId: this.leftForm.teacher,
  1288. startClassTimeStr: onlineList[i].date.startTime,
  1289. endClassTimeStr: onlineList[i].date.endTime,
  1290. teachMode: "ONLINE",
  1291. });
  1292. online--;
  1293. if (online == 0) break;
  1294. }
  1295. if (onlineList.length == 1 || this.isAllEqual(onlineList)) {
  1296. date.setDate(date.getDate() + 7);
  1297. }
  1298. // 加一周
  1299. }
  1300. // (date1)
  1301. while (offline && offline > 0) {
  1302. // 排线下课
  1303. for (let i in offlineList) {
  1304. let num;
  1305. offlineList[i].week - date1.getDay() >= 0
  1306. ? (num = offlineList[i].week - date1.getDay())
  1307. : (num = offlineList[i].week - date1.getDay() + 7); // +差值的天数://差值的天数+7
  1308. let dataStr = this.getThinkDate(date1, num);
  1309. this.timeTable.push({
  1310. classDate: dataStr + " 00:00:00",
  1311. actualTeacherId: this.leftForm.teacher,
  1312. startClassTimeStr: offlineList[i].date.startTime,
  1313. endClassTimeStr: offlineList[i].date.endTime,
  1314. teachMode: "OFFLINE",
  1315. });
  1316. offline--;
  1317. if (offline == 0) break;
  1318. }
  1319. // 加一周
  1320. if (offlineList.length == 1 || this.isAllEqual(offlineList)) {
  1321. date1.setDate(date1.getDate() + 7);
  1322. }
  1323. }
  1324. // (this.timeTable);
  1325. this.timeTable.sort((a, b) => {
  1326. let aStr = dayjs(
  1327. dayjs(a.classDate).format("YYYY-MM-DD") +
  1328. " " +
  1329. a.startClassTimeStr +
  1330. ":00"
  1331. ).valueOf();
  1332. let bStr = dayjs(
  1333. dayjs(b.classDate).format("YYYY-MM-DD") +
  1334. " " +
  1335. b.startClassTimeStr +
  1336. ":00"
  1337. ).valueOf();
  1338. return aStr - bStr;
  1339. });
  1340. this.dialogFormVisible = false;
  1341. },
  1342. getThinkDate(date, num) {
  1343. let Stamp = date;
  1344. Stamp.setDate(date.getDate() + num); // 获取当前月数的第几天
  1345. // (date.getMonth() + 1)
  1346. // (Stamp.getMonth() + 1)
  1347. var year = Stamp.getFullYear(); //获取完整的年份(4位,1970-????)
  1348. var month = Stamp.getMonth() + 1; //获取当前月份(0-11,0代表1月)
  1349. var mvar = "";
  1350. if (month < 10) {
  1351. mvar = "0" + month;
  1352. } else {
  1353. mvar = month + "";
  1354. }
  1355. var day = Stamp.getDate();
  1356. var dvar = "";
  1357. if (day < 10) {
  1358. dvar = "0" + day;
  1359. } else {
  1360. dvar = day + "";
  1361. }
  1362. // (year + "-" + mvar + '-' + dvar);
  1363. return year + "-" + mvar + "-" + dvar;
  1364. },
  1365. // 计算课酬
  1366. computational() {
  1367. this.computationalBtn = true;
  1368. let userId = this.leftForm.teacher || null;
  1369. let giveTeachMode = this.centerForm.radio || null;
  1370. let vipGroupCategoryId = this.leftForm.courseType || null;
  1371. let vipGroupActivityId = this.leftForm.activeType || null;
  1372. let onlineClassesUnitPrice = this.rightForm.onlinePrice || null;
  1373. let offlineClassesUnitPrice = this.rightForm.offlinePrice || null;
  1374. let onlineClassesNum = this.centerForm.onlineCourseNum || 0;
  1375. let offlineClassesNum = this.centerForm.offlineCourseNum || 0;
  1376. let singleClassMinutes = this.leftForm.classTime;
  1377. if (this.hotType == "GIVE_CLASS") {
  1378. if (this.centerForm.radio == "ONLINE") {
  1379. onlineClassesNum =
  1380. parseInt(onlineClassesNum) + parseInt(this.giveNum);
  1381. } else if (this.centerForm.radio == "OFFLINE") {
  1382. offlineClassesNum =
  1383. parseInt(offlineClassesNum) + parseInt(this.giveNum);
  1384. }
  1385. }
  1386. let onlineTeacherSalary = this.rightForm.onlineCourse || null;
  1387. let offlineTeacherSalary = this.rightForm.offlineCourse || null;
  1388. getVipGroupCostCount({
  1389. vipGroupActivityId,
  1390. onlineClassesUnitPrice,
  1391. onlineTeacherSalary,
  1392. offlineTeacherSalary,
  1393. vipGroupCategoryId,
  1394. offlineClassesUnitPrice,
  1395. onlineClassesNum,
  1396. offlineClassesNum,
  1397. userId,
  1398. giveTeachMode,
  1399. singleClassMinutes,
  1400. vipGroupStudentCoursePrices: this.activeStudentList,
  1401. }).then((res) => {
  1402. if (res.code == 200) {
  1403. this.rightForm.onlineCourse = res.data.onlineTeacherSalary;
  1404. this.rightForm.offlineCourse = res.data.offlineTeacherSalary;
  1405. this.rightForm.allPrice = res.data.totalPrice;
  1406. this.activeStudentList.forEach((stu) => {
  1407. if (res.data.hasOwnProperty(stu.studentId)) {
  1408. stu.paymentPrice = res.data[stu.studentId];
  1409. }
  1410. });
  1411. }
  1412. });
  1413. },
  1414. isAllEqual(array) {
  1415. if (array.length > 0) {
  1416. return !array.some((val, index) => {
  1417. return val.week != array[0].week;
  1418. });
  1419. } else {
  1420. return true;
  1421. }
  1422. },
  1423. submitInfo() {
  1424. if (!this.computationalBtn) {
  1425. this.$message.error("请点击计算按钮计算课酬");
  1426. return;
  1427. }
  1428. // let activeCourseType;
  1429. let flag = false;
  1430. // (this.courseTypeList,)
  1431. // this.courseTypeList.forEach((courseType) => {
  1432. // if (courseType.id == this.leftForm.courseType) {
  1433. // activeCourseType = courseType;
  1434. // }
  1435. // });
  1436. // (activeCourseType)
  1437. if (this.isMusicTheory) {
  1438. if (
  1439. this.leftForm.students.length > this.studentLimit ||
  1440. this.leftForm.students.length < 3
  1441. ) {
  1442. this.$message.error(`请选择上课学生为3-${this.studentLimit}人`);
  1443. flag = true;
  1444. }
  1445. } else {
  1446. if (this.leftForm.students.length !== this.studentLimit) {
  1447. this.$message.error(`请选择上课学生为${this.studentLimit}人`);
  1448. flag = true;
  1449. }
  1450. }
  1451. if (flag) return;
  1452. // 获取活动方案
  1453. // 判断线上课课酬和线下课课酬
  1454. let online = parseInt(this.centerForm.onlineCourseNum);
  1455. let offline = parseInt(this.centerForm.offlineCourseNum);
  1456. let giveNum = this.giveNum;
  1457. let giveClassType = this.centerForm.radio;
  1458. if (giveClassType == "ONLINE") {
  1459. // 线上
  1460. online += giveNum;
  1461. } else if (giveClassType == "OFFLINE") {
  1462. offline += giveNum;
  1463. }
  1464. let obj = {};
  1465. obj.courseSchedules = this.timeTable;
  1466. /**
  1467. *
  1468. * teacher: '',
  1469. subject: '',
  1470. courseType: '',
  1471. activeType: '',
  1472. classNum: '',
  1473. classTime: '',
  1474. signUpStart: '',
  1475. signUpEnd: '',
  1476. courseStart: '',
  1477. courseEnd: ''
  1478. */
  1479. let studentIdList = this.leftForm.students.join(",") || null;
  1480. obj.vipGroupApplyBaseInfo = {
  1481. studentIdList, // 这个不要了
  1482. vipGroupStudentCoursePrices: this.activeStudentList,
  1483. coursesExpireDate: this.leftForm.courseEnd,
  1484. teacherSchoolId: this.leftForm.section,
  1485. // name: this.leftForm.name,
  1486. offlineClassesNum: offline || 0,
  1487. onlineClassesNum: online || 0,
  1488. offlineClassesUnitPrice: this.rightForm.offlinePrice || 0,
  1489. onlineClassesUnitPrice: this.rightForm.onlinePrice || 0,
  1490. paymentExpireDate: this.leftForm.signUpEnd,
  1491. registrationStartTime: this.leftForm.signUpStart,
  1492. singleClassMinutes: this.leftForm.classTime,
  1493. studentNum: this.leftForm.classNum,
  1494. userId: this.leftForm.teacher,
  1495. vipGroupActivityId: this.leftForm.activeType,
  1496. vipGroupCategoryId: this.leftForm.courseType,
  1497. onlineTeacherSalary: this.rightForm.onlineCourse || 0,
  1498. offlineTeacherSalary: this.rightForm.offlineCourse || 0,
  1499. giveTeachMode: this.centerForm.radio,
  1500. subjectIdList: this.leftForm.subject,
  1501. educationalTeacherId: this.leftForm.educationalTeacherId,
  1502. organId: this.leftForm.classOrganId,
  1503. firstStudentId: this.leftForm.students[0] || null
  1504. };
  1505. // 新增
  1506. createVip(obj).then((res) => {
  1507. if (res.code == 200) {
  1508. if (res.data == "ING") {
  1509. this.$confirm(
  1510. "课程提交成功,已提交运营主管审批,审批通过后,课程创建成功!",
  1511. "提示",
  1512. {
  1513. confirmButtonText: "确定",
  1514. type: "warning",
  1515. }
  1516. ).then(() => {
  1517. this.$message.success("提交成功");
  1518. this.$store.dispatch("delVisitedViews", this.$route);
  1519. this.$router.push({
  1520. path: "/vipManager/vipList",
  1521. query: {
  1522. rules: this.rules,
  1523. searchForm: this.searchForm,
  1524. },
  1525. });
  1526. });
  1527. } else {
  1528. this.$message.success("恭喜您创建成功");
  1529. this.$store.dispatch("delVisitedViews", this.$route);
  1530. this.$router.push({
  1531. path: "/vipManager/vipList",
  1532. query: {
  1533. rules: this.rules,
  1534. searchForm: this.searchForm,
  1535. },
  1536. });
  1537. }
  1538. }
  1539. console.log(res)
  1540. if (res.code == 206) {
  1541. this.$confirm(res.msg, "提示", {
  1542. confirmButtonText: "确定",
  1543. type: "warning",
  1544. }).then(() => {
  1545. obj.allowOverstepActivityStudentNum = 1;
  1546. createVip(obj).then((res) => {
  1547. if (res.code == 200) {
  1548. this.$message.success("提交成功");
  1549. this.$store.dispatch("delVisitedViews", this.$route);
  1550. this.$router.push({
  1551. path: "/vipManager/vipList",
  1552. query: {
  1553. rules: this.rules,
  1554. searchForm: this.searchForm,
  1555. },
  1556. });
  1557. }
  1558. });
  1559. });
  1560. }
  1561. });
  1562. },
  1563. setSection(val) {
  1564. this.leftForm.section = "";
  1565. this.rightForm.offlineCourse = "";
  1566. this.rightForm.onlineCourse = "";
  1567. // this.leftForm.courseType = "";
  1568. if (val) {
  1569. getTeachSchool({
  1570. userId: val,
  1571. }).then((res) => {
  1572. if (res.code == 200) {
  1573. this.scetionList = res.data;
  1574. }
  1575. });
  1576. }
  1577. // for (let i in this.teacherList) {
  1578. // if (this.teacherList[i].id == val) {
  1579. // // 根据分部id去获取课程形式
  1580. // vipGroupCategory({ organId: this.teacherList[i].organId }).then(
  1581. // res => {
  1582. // if (res.code == 200) {
  1583. // this.courseTypeList = res.data;
  1584. // }
  1585. // }
  1586. // );
  1587. // }
  1588. // }
  1589. // this.getClassOrgan(); // 获取公用部分
  1590. },
  1591. // getClassOrgan() {
  1592. // // 获取公用分部
  1593. // const leftForm = this.leftForm;
  1594. // let teacher = leftForm.teacher ? leftForm.teacher : null;
  1595. // let educationalTeacherId = leftForm.educationalTeacherId
  1596. // ? leftForm.educationalTeacherId
  1597. // : null;
  1598. // leftForm.classOrganId = null; // 重置课程分部数据
  1599. // this.classOrganList = [];
  1600. // // 初始化上课学生
  1601. // this.studentList = [];
  1602. // this.leftForm.students = [];
  1603. // if (!teacher || !educationalTeacherId) {
  1604. // // 如果没有选择指导老师和乐团主管则不请求
  1605. // return;
  1606. // }
  1607. // getPublicOrgans({
  1608. // teacherId: teacher,
  1609. // eduTeacherId: educationalTeacherId,
  1610. // }).then((res) => {
  1611. // if (res.code == 200) {
  1612. // let result = res.data ? res.data : [];
  1613. // this.classOrganList = result;
  1614. // }
  1615. // });
  1616. // },
  1617. onClassChange(val) {
  1618. // 课程分部改变时
  1619. // 老师 乐团主管 都要重置
  1620. this.studentList = [];
  1621. this.$set(this.leftForm, "students", []);
  1622. this.$set(this.leftForm, "teacher", "");
  1623. this.$set(this.leftForm, "educationalTeacherId", "");
  1624. this.$set(this.leftForm, "section", "");
  1625. this.$set(this.leftForm, "activeType", "");
  1626. this.$set(this.leftForm, "classTime", "");
  1627. this.$set(this.leftForm, "subject", "");
  1628. // this.leftForm.students = [];
  1629. // this.leftForm.teacherId = "";
  1630. // this.leftForm.educationalTeacherId = "";
  1631. this.courseTypeList = [];
  1632. if (this.leftForm.courseType) {
  1633. this.$set(this.leftForm, "courseType", null);
  1634. }
  1635. // this.leftForm.courseType = null;
  1636. if (val) {
  1637. this.getOrganStudentList(val);
  1638. vipGroupCategory({
  1639. organId: val,
  1640. }).then((res) => {
  1641. if (res.code == 200) {
  1642. this.courseTypeList = res.data;
  1643. }
  1644. });
  1645. // 获取老师
  1646. // 获取乐团主管
  1647. findEducationUsers({ organId: val }).then((res) => {
  1648. if (res.code == 200) {
  1649. this.educationList = res.data;
  1650. }
  1651. });
  1652. }
  1653. },
  1654. onCancel() {
  1655. this.$store.dispatch("delVisitedViews", this.$route);
  1656. this.$router.push({
  1657. path: "/vipManager/vipList",
  1658. query: {
  1659. rules: this.rules,
  1660. searchForm: this.searchForm,
  1661. },
  1662. });
  1663. },
  1664. setCourse() {
  1665. if (
  1666. this.hotType == "GIVE_CLASS" &&
  1667. this.isGiveClass &&
  1668. !this.centerForm.radio
  1669. ) {
  1670. this.$message.error("您还未选择赠课类型");
  1671. return;
  1672. }
  1673. this.$refs["leftForm"].validate((vali) => {
  1674. if (vali) {
  1675. let centerForm = this.centerForm;
  1676. if (
  1677. this.hotType == "DISCOUNT" &&
  1678. this.maxCourseNum &&
  1679. this.minCourseNum
  1680. ) {
  1681. // 判断线上或线下总和大于排课次数
  1682. let onlineNum = centerForm.onlineCourseNum || 0;
  1683. let offlineNum = centerForm.offlineCourseNum || 0;
  1684. let allNUm = parseInt(onlineNum) + parseInt(offlineNum);
  1685. if (allNUm > this.maxCourseNum || allNUm < this.minCourseNum) {
  1686. this.$message.error("待排课数不可超过该活动限制");
  1687. return;
  1688. }
  1689. }
  1690. this.dialogFormVisible = true;
  1691. }
  1692. });
  1693. },
  1694. setVipInfo(data) {
  1695. // this.leftForm.name = data.name;
  1696. this.leftForm.subject = parseInt(data.subjectIdList);
  1697. // 激活声部下的所有老师
  1698. this.changeSubject(parseInt(data.subjectIdList));
  1699. // 设置老师
  1700. this.leftForm.teacher = data.userId;
  1701. this.setSection(data.userId);
  1702. // 课程形式
  1703. this.leftForm.courseType = data.vipGroupCategoryId;
  1704. // 获取课程形式下的活动方案
  1705. this.changeType(this.leftForm.courseType);
  1706. // 根据课程形式获取活动方案
  1707. this.leftForm.activeType = data.vipGroupActivityId;
  1708. setTimeout((res) => {
  1709. this.chioseActive(data.vipGroupActivityId);
  1710. }, 1000);
  1711. this.leftForm.section = data.teacherSchoolId;
  1712. this.leftForm.classNum = data.studentNum;
  1713. this.leftForm.classTime = data.singleClassMinutes;
  1714. this.leftForm.signUpStart = data.registrationStartTime;
  1715. this.leftForm.signUpEnd = data.paymentExpireDate;
  1716. this.centerForm.onlineCourseNum = data.onlineClassesNum;
  1717. this.centerForm.offlineCourseNum = data.offlineCourseNum;
  1718. /**
  1719. * rightForm: {
  1720. onlineCourse: '',
  1721. offlineCourse: '',
  1722. onlinePrice: '',
  1723. offlinePrice: '',
  1724. allPrice: ''
  1725. },
  1726. *
  1727. */
  1728. this.rightForm.onlineCourse = data.onlineTeacherSalary;
  1729. this.rightForm.onlinePrice = data.onlineClassesUnitPrice;
  1730. this.rightForm.offlineCourse = data.offlineTeacherSalary;
  1731. this.rightForm.offlinePrice = data.offlineClassesUnitPrice;
  1732. this.rightForm.allPrice = data.totalPrice;
  1733. //subjectIdList
  1734. },
  1735. getOrganStudentList(organId) {
  1736. if (organId) {
  1737. queryOrganStudentList({
  1738. rows: 50,
  1739. organId: organId,
  1740. }).then((res) => {
  1741. if (res.code == 200) {
  1742. this.studentList = res.data.rows;
  1743. }
  1744. });
  1745. }
  1746. },
  1747. remoteMethod(query) {
  1748. if (query !== "") {
  1749. this.remoteLoading = true;
  1750. // 发请求搜索
  1751. const url = "/api-web/studentManage/queryOrganStudentList";
  1752. const options = {
  1753. method: "get",
  1754. headers: {
  1755. Authorization: getToken(),
  1756. },
  1757. params: {
  1758. rows: 9999,
  1759. search: query,
  1760. organId: this.leftForm.classOrganId,
  1761. },
  1762. url,
  1763. };
  1764. this.remoteLoading = true;
  1765. // this.studentList = []
  1766. axios(options).then((res) => {
  1767. this.remoteLoading = false;
  1768. let result = res.data;
  1769. if (result.code == 200) {
  1770. // Array.prototype.splice.apply(this.studentList, result.data.rows);
  1771. if (result.data.rows && result.data.rows.length > 0) {
  1772. result.data.rows.forEach((item) => {
  1773. this.studentList.unshift(item);
  1774. });
  1775. this.studentList = this.deweight(this.studentList, "userId");
  1776. }
  1777. // this.studentList = this.studentList.concat(result.data.rows);
  1778. }
  1779. });
  1780. // queryStudentList({ rows: 100, search: query }).then(res => {
  1781. // if (res.code == 200) {
  1782. // this.remoteLoading = false;
  1783. // this.studentList = this.studentList.concat(res.data.rows);
  1784. // this.unique(this.studentList, "userId");
  1785. // }
  1786. // });
  1787. }
  1788. },
  1789. changeStudent(val) {
  1790. this.leftForm.activeType = "";
  1791. this.activeStudentList = [];
  1792. this.studentList.forEach((stu) => {
  1793. if (val.indexOf(stu.userId) != -1) {
  1794. this.activeStudentList.push({
  1795. studentId: stu.userId,
  1796. userName: stu.username,
  1797. onlineClassesUnitPrice: this.rightForm.onlinePrice,
  1798. offlineClassesUnitPrice: this.rightForm.offlinePrice,
  1799. paymentPrice: "",
  1800. });
  1801. }
  1802. });
  1803. if (this.leftForm.courseType && this.leftForm.teacher && this.leftForm.students && this.leftForm.students.length >= 1) {
  1804. let studentIds = this.leftForm.students.join(',')
  1805. // 根据课程类型获取活动方案
  1806. vipGroupActivityFind({
  1807. categoryId: this.leftForm.courseType,
  1808. teacherId: this.leftForm.teacher,
  1809. studentIds
  1810. }).then((res) => {
  1811. if (res.code == 200) {
  1812. this.activeList = res.data;
  1813. }
  1814. });
  1815. }
  1816. },
  1817. // 制定属性去重
  1818. deweight(arr, key) {
  1819. let res = [];
  1820. arr.forEach((item) => {
  1821. let list = [];
  1822. res.forEach((resitem) => {
  1823. list.push(resitem[key]);
  1824. });
  1825. if (list.indexOf(item[key]) === -1) {
  1826. res.push(item);
  1827. }
  1828. });
  1829. return res;
  1830. },
  1831. getStartTime(val) {
  1832. if (val) {
  1833. let date = dayjs(new Date()).format("YYYY-MM-DD");
  1834. this.maskForm.endTime = addTimerFormMinute(
  1835. date,
  1836. val,
  1837. this.leftForm.classTime
  1838. );
  1839. } else {
  1840. this.maskForm.endTime = "";
  1841. }
  1842. if (!this.maskForm.endTime) {
  1843. this.maskForm.startTime = "";
  1844. }
  1845. },
  1846. changeStudentMoney(val) {
  1847. if (val) {
  1848. this.computationalBtn = false;
  1849. }
  1850. },
  1851. },
  1852. // watch: {
  1853. // rightForm: {
  1854. // handler (newName, oldName) {
  1855. // this.computationalBtn = false
  1856. // },
  1857. // deep: true
  1858. // }
  1859. // }
  1860. };
  1861. </script>
  1862. <style lang="scss" scoped>
  1863. .computeMoney {
  1864. margin-top: 10px;
  1865. float: right;
  1866. }
  1867. .m-core {
  1868. margin-top: 30px;
  1869. // display: flex;
  1870. // flex-direction: row;
  1871. // justify-content: space-around;
  1872. .el-input {
  1873. width: 180px;
  1874. }
  1875. h4 {
  1876. font-size: 16px;
  1877. background-color: #ccc;
  1878. color: #fff;
  1879. // text-align: center;
  1880. width: 100%;
  1881. height: 40px;
  1882. line-height: 40px;
  1883. margin-bottom: 20px;
  1884. padding: 0 20px;
  1885. }
  1886. // .vipLeft {
  1887. // width: 400px;
  1888. // // h4 {
  1889. // // font-size: 16px;
  1890. // // background-color: #ccc;
  1891. // // color: #fff;
  1892. // // text-align: center;
  1893. // // width: 100%;
  1894. // // height: 40px;
  1895. // // line-height: 40px;
  1896. // // margin-bottom: 20px;
  1897. // // }
  1898. // }
  1899. // .center {
  1900. // width: 400px;
  1901. // }
  1902. .right {
  1903. margin-top: 20px;
  1904. }
  1905. }
  1906. .vipMsg {
  1907. margin-bottom: 20px;
  1908. }
  1909. .planList {
  1910. padding: 0 25px;
  1911. .planTop {
  1912. height: 40px;
  1913. line-height: 40px;
  1914. display: flex;
  1915. flex-direction: row;
  1916. justify-content: space-between;
  1917. border-bottom: 1px solid #ccc;
  1918. margin-top: 20px;
  1919. > p {
  1920. font-size: 14px;
  1921. }
  1922. }
  1923. .planCore {
  1924. .row {
  1925. width: 100%;
  1926. display: flex;
  1927. flex-direction: row;
  1928. justify-content: space-between;
  1929. flex-wrap: nowrap;
  1930. height: 40px;
  1931. line-height: 40px;
  1932. font-size: 14px;
  1933. text-align: center;
  1934. div {
  1935. width: 87px;
  1936. }
  1937. // div {
  1938. // &:nth-child(1) {
  1939. // text-align: left;
  1940. // }
  1941. // }
  1942. }
  1943. }
  1944. .nomore {
  1945. display: flex;
  1946. flex-direction: row;
  1947. justify-content: center;
  1948. align-items: center;
  1949. height: 40px;
  1950. }
  1951. }
  1952. .okBtn {
  1953. width: 120px;
  1954. height: 40px;
  1955. line-height: 40px;
  1956. text-align: center;
  1957. color: #fff;
  1958. border-radius: 4px;
  1959. margin-right: 20px;
  1960. cursor: pointer;
  1961. background-color: #f97215;
  1962. float: right;
  1963. }
  1964. .submitP {
  1965. margin-bottom: 20px;
  1966. font-size: 14px;
  1967. padding-left: 24px;
  1968. }
  1969. </style>