teamBaseInfo.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911
  1. <template>
  2. <div class="base-container">
  3. <div class="banseLeft">
  4. <!-- <div class="num">乐团编号:dywh01</div> -->
  5. <el-form
  6. :model="topFrom"
  7. ref="topinfo"
  8. label-width="150px"
  9. :inline="true"
  10. label-position="right"
  11. >
  12. <div class="head">乐团基本信息:</div>
  13. <el-form-item
  14. label="乐团名称"
  15. prop="name"
  16. :rules="[{ required: true, message: '乐团名称不能为空' }]"
  17. >
  18. <el-input
  19. placeholder="请输入乐团名称"
  20. v-model.trim="topFrom.name"
  21. :disabled="basdisabled"
  22. ></el-input>
  23. </el-form-item>
  24. <!-- style="margin-left: 11px" -->
  25. <el-form-item
  26. label="所属分部"
  27. prop="section"
  28. :rules="[{ required: true, message: '所属分部不能为空' }]"
  29. >
  30. <el-select
  31. class="width400"
  32. v-model.trim="topFrom.section"
  33. filterable
  34. :disabled="basdisabled"
  35. @change="changeSection"
  36. clearable
  37. >
  38. <el-option
  39. v-for="(item, index) in sectionList"
  40. :key="index"
  41. :label="item.name"
  42. :value="item.id"
  43. ></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item
  47. label="收费模式"
  48. prop="courseViewType"
  49. :rules="[{ required: true, message: '收费模式不能为空' }]"
  50. >
  51. <el-select
  52. v-model.trim="topFrom.courseViewType"
  53. filterable
  54. :disabled="basdisabled"
  55. clearable
  56. >
  57. <el-option
  58. :label="item.label"
  59. :value="Number(item.value)"
  60. v-for="item in courseViewTypeList"
  61. :key="item.value"
  62. :disabled="checkCourseView(Number(item.value))"
  63. ></el-option>
  64. <!-- <el-option label="AMR收费" :value="1"></el-option>
  65. <el-option label="会员收费" :value="2"></el-option> -->
  66. </el-select>
  67. </el-form-item>
  68. <el-form-item
  69. label="合作单位"
  70. prop="school"
  71. :rules="[{ required: true, message: '合作单位不能为空' }]"
  72. >
  73. <el-select
  74. v-model.trim="topFrom.school"
  75. :disabled="!topFrom.section || basdisabled || cooperDisabled"
  76. @change="chioseSchool"
  77. filterable
  78. clearable
  79. >
  80. <el-option
  81. v-for="(item, index) in cooperationList"
  82. :key="index"
  83. :label="item.name"
  84. :value="item.id"
  85. ></el-option>
  86. </el-select>
  87. </el-form-item>
  88. <el-form-item
  89. label="教学地点"
  90. prop="address"
  91. :rules="[{ required: true, message: '教学地点不能为空' }]"
  92. >
  93. <template #label>
  94. <p style="position: relative; display: inline-block">
  95. 教学地点
  96. <el-tooltip placement="top" popper-class="mTooltip">
  97. <div slot="content">
  98. 如果已生成课表,则会修改未上课时的教学点
  99. </div>
  100. <i
  101. class="el-icon-question"
  102. style="font-size: 18px; color: #f56c6c"
  103. ></i>
  104. </el-tooltip>
  105. </p>
  106. </template>
  107. <el-select
  108. v-model.trim="topFrom.address"
  109. filterable
  110. clearable
  111. :disabled="!topFrom.section || basdisabled"
  112. >
  113. <el-option
  114. v-for="(item, index) in addList"
  115. :key="index"
  116. :label="item.name"
  117. :value="item.id"
  118. ></el-option>
  119. </el-select>
  120. </el-form-item>
  121. <!-- <el-form-item
  122. label="运营主管"
  123. prop="boss"
  124. :rules="[{ required: true, message: '运营主管不能为空' }]"
  125. >
  126. <el-select
  127. v-model.trim="topFrom.boss"
  128. :disabled="!topFrom.section || basdisabled"
  129. filterable
  130. clearable
  131. >
  132. <el-option
  133. v-for="item in bossList"
  134. :key="item.userId"
  135. :label="item.realName"
  136. :value="item.userId"
  137. >
  138. <span style="float: left">{{ item.realName }}</span>
  139. <span style="float: right; color: #8492a6; font-size: 13px">{{
  140. String(item.userId)
  141. }}</span>
  142. </el-option>
  143. </el-select>
  144. </el-form-item> -->
  145. <!-- <el-form-item
  146. label="预报名截止时间"
  147. prop="time"
  148. :rules="[{ required: true, message: '请输入预报名截止时间' }]"
  149. >
  150. <el-date-picker
  151. v-model.trim="topFrom.time"
  152. :disabled="basdisabled"
  153. type="date"
  154. value-format="yyyy-MM-dd"
  155. :picker-options="beginDate()"
  156. placeholder="选择日期"
  157. ></el-date-picker>
  158. </el-form-item> -->
  159. <!-- <el-form-item
  160. label="报名截止时间"
  161. prop="time"
  162. :rules="[{ required: true, message: '请输入报名截止时间' }]"
  163. >
  164. <el-date-picker
  165. v-model.trim="topFrom.time"
  166. :disabled="basdisabled"
  167. type="date"
  168. value-format="yyyy-MM-dd"
  169. :picker-options="beginDate()"
  170. placeholder="选择日期"
  171. ></el-date-picker>
  172. </el-form-item> -->
  173. <!-- <el-form-item
  174. label="预计开团时间"
  175. prop="startTime"
  176. :rules="[{ required: true, message: '请输入预计开团时间' }]"
  177. >
  178. <el-date-picker
  179. v-model.trim="topFrom.startTime"
  180. :disabled="basdisabled"
  181. type="date"
  182. value-format="yyyy-MM-dd"
  183. :picker-options="beginDate()"
  184. placeholder="选择日期"
  185. ></el-date-picker>
  186. </el-form-item> -->
  187. <!-- <el-form-item
  188. label="课酬结算标准"
  189. :rules="[{ required: true, message: '请选择课酬结算标准' }]"
  190. prop="salary"
  191. >
  192. <el-select
  193. v-model.trim="topFrom.salary"
  194. clearable
  195. :disabled="basdisabled"
  196. filterable
  197. >
  198. <el-option label="自定义课酬" value="TEACHER_DEFAULT"></el-option>
  199. <el-option label="标准课酬" value="GRADIENT_SALARY"></el-option>
  200. </el-select>
  201. </el-form-item> -->
  202. <el-form-item
  203. label="机构类型"
  204. prop="ownershipType"
  205. v-if="tenantId == 1"
  206. >
  207. <el-select
  208. v-model.trim="topFrom.ownershipType"
  209. :disabled="basdisabled"
  210. >
  211. <el-option label="自有" value="OWN"></el-option>
  212. <el-option label="三方" value="COOPERATION"></el-option>
  213. <!-- <el-option label="租赁"
  214. value="LEASE"></el-option>-->
  215. </el-select>
  216. </el-form-item>
  217. <el-form-item
  218. label="课外训练布置老师"
  219. prop="extracurricularTeacher"
  220. v-if="tenantId == 1"
  221. >
  222. <el-select
  223. v-model.trim="topFrom.extracurricularTeacher"
  224. :disabled="basdisabled"
  225. >
  226. <el-option label="声部班老师" value="NORMAL"></el-option>
  227. <el-option label="合奏班老师" value="MIX"></el-option>
  228. <!-- <el-option label="租赁"
  229. value="LEASE"></el-option>-->
  230. </el-select>
  231. </el-form-item>
  232. <el-form-item
  233. label="年级分部"
  234. prop="gradeType"
  235. v-if="tenantId == 1"
  236. :rules="[{ required: true, message: '请选择年级分部' }]"
  237. >
  238. <el-select
  239. v-model.trim="topFrom.gradeType"
  240. :disabled="basdisabled"
  241. @change="
  242. () => {
  243. $forceUpdate();
  244. }
  245. "
  246. >
  247. <el-option label="小学团" value="PRIMARY"></el-option>
  248. <el-option label="初中团" value="MIDDLE"></el-option>
  249. <el-option label="高中团" value="HIGH"></el-option>
  250. <el-option label="混合团" value="MIXED"></el-option>
  251. <!-- <el-option label="租赁"
  252. value="LEASE"></el-option>-->
  253. </el-select>
  254. </el-form-item>
  255. <!-- v-if="teamStatus == 'resetTeam' || teamStatus == 'teamList'" -->
  256. <div class="head">人员配置:</div>
  257. <el-form-item
  258. label="乐团主管"
  259. prop="teacher"
  260. :rules="[{ required: true, message: '乐团主管不能为空' }]"
  261. >
  262. <el-select
  263. v-model.trim="topFrom.teacher"
  264. :disabled="true"
  265. filterable
  266. clearable
  267. >
  268. <el-option
  269. v-for="(item, key) in educationList"
  270. :key="key"
  271. :label="item.userName"
  272. :value="Number(item.userId)"
  273. >
  274. <span style="float: left">{{ item.userName }}</span>
  275. <span style="float: right; color: #8492a6; font-size: 13px">{{
  276. String(item.userId)
  277. }}</span>
  278. </el-option>
  279. </el-select>
  280. </el-form-item>
  281. <el-form-item label="乐队指导" prop="head">
  282. <el-select
  283. v-model.trim="topFrom.head"
  284. filterable
  285. :disabled="!topFrom.section || basdisabled"
  286. clearable
  287. >
  288. <el-option
  289. v-for="(item, index) in teacherList"
  290. :key="index"
  291. :label="item.realName"
  292. :value="item.id"
  293. >
  294. <span style="float: left">{{ item.realName }}</span>
  295. <span style="float: right; color: #8492a6; font-size: 13px">{{
  296. String(item.id)
  297. }}</span>
  298. </el-option>
  299. </el-select>
  300. </el-form-item>
  301. <el-form-item label="维修技师" prop="repairUserId">
  302. <el-select
  303. v-model.trim="topFrom.repairUserId"
  304. :disabled="!topFrom.section || basdisabled"
  305. filterable
  306. clearable
  307. >
  308. <el-option
  309. v-for="(item, key) in technician"
  310. :key="key"
  311. :label="item.userName"
  312. :value="item.userId"
  313. >
  314. <span style="float: left">{{ item.userName }}</span>
  315. <span style="float: right; color: #8492a6; font-size: 13px">{{
  316. String(item.userId)
  317. }}</span>
  318. </el-option>
  319. </el-select>
  320. </el-form-item>
  321. <el-form-item label="衔接老师" prop="transactionTeacherId">
  322. <el-select
  323. v-model.trim="topFrom.transactionTeacherId"
  324. :disabled="!topFrom.section || basdisabled"
  325. filterable
  326. clearable
  327. >
  328. <el-option
  329. v-for="(item, key) in transactionList"
  330. :key="key"
  331. :label="item.userName"
  332. :value="item.userId"
  333. >
  334. <span style="float: left">{{ item.userName }}</span>
  335. <span style="float: right; color: #8492a6; font-size: 13px">{{
  336. String(item.userId)
  337. }}</span>
  338. </el-option>
  339. </el-select>
  340. </el-form-item>
  341. <div v-if="tenantId == 1">
  342. <div class="head">建团信息:</div>
  343. <el-form-item
  344. label="建团编制"
  345. prop="musicGroupPlanMakingId"
  346. :rules="[{ required: true, message: '建团编制不能为空' }]"
  347. >
  348. <el-select
  349. v-model.trim="topFrom.musicGroupPlanMakingId"
  350. filterable
  351. :disabled="basdisabled"
  352. clearable
  353. @change="changeType"
  354. >
  355. <el-option
  356. v-for="(item, index) in musicGroupPlanMakingList"
  357. :key="index"
  358. :label="item.name"
  359. :value="item.id"
  360. ></el-option>
  361. </el-select>
  362. </el-form-item>
  363. <el-form-item
  364. label="成团年级"
  365. prop="firstRecruitGrade"
  366. :rules="[{ required: true, message: '成团年级不能为空' }]"
  367. >
  368. <el-select
  369. v-model.trim="topFrom.firstRecruitGrade"
  370. filterable
  371. :disabled="basdisabled || !topFrom.section"
  372. clearable
  373. multiple
  374. @change="
  375. () => {
  376. topFrom.graduateGrade = null;
  377. }
  378. "
  379. >
  380. <el-option
  381. v-for="(item, index) in gradeList"
  382. :key="index"
  383. :label="item.label"
  384. :value="item.value"
  385. ></el-option>
  386. </el-select>
  387. </el-form-item>
  388. <el-form-item
  389. label="收费标准"
  390. prop="defaultChargeStandard"
  391. :rules="[
  392. { required: true, message: '收费标准不能为空' },
  393. {
  394. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  395. message: '请输入正确的金额',
  396. trigger: 'blur'
  397. }
  398. ]"
  399. >
  400. <el-input
  401. v-model.trim="topFrom.defaultChargeStandard"
  402. placeholder="请输入收费标准"
  403. :disabled="basdisabled"
  404. >
  405. <i slot="suffix" class="el-input__icon" style="padding-right: 5px"
  406. >元</i
  407. >
  408. </el-input>
  409. </el-form-item>
  410. <el-form-item
  411. label="单次训练时长"
  412. prop="singleTrainMinutes"
  413. :rules="[
  414. { required: true, message: '请输入单次训练时长' },
  415. {
  416. pattern: /(^[0-9+]*$)/,
  417. message: '请输入正确的时长'
  418. }
  419. ]"
  420. >
  421. <el-select
  422. ref="singleTrainMinutesRef"
  423. v-model.trim="topFrom.singleTrainMinutes"
  424. filterable
  425. :disabled="basdisabled"
  426. allow-create
  427. default-first-option
  428. clearable
  429. @blur="onSingleTrainMin"
  430. >
  431. <el-option
  432. v-for="(item, index) in singleTrainMinutesList"
  433. :key="index"
  434. :label="item.name"
  435. :value="item.id"
  436. ></el-option>
  437. </el-select>
  438. </el-form-item>
  439. <el-form-item
  440. label="课程配置"
  441. prop="coursePlan"
  442. :rules="[{ required: true, message: '请选择课程配置' }]"
  443. >
  444. <el-select
  445. ref="coursePlanRef"
  446. v-model.trim="topFrom.coursePlan"
  447. filterable
  448. :disabled="basdisabled"
  449. allow-create
  450. default-first-option
  451. clearable
  452. @blur="onCoursePlan"
  453. >
  454. <el-option
  455. v-for="(item, index) in coursePlanList"
  456. :key="index"
  457. :label="item.name"
  458. :value="item.id"
  459. ></el-option>
  460. </el-select>
  461. </el-form-item>
  462. <el-form-item
  463. label="毕业年级"
  464. prop="graduateGrade"
  465. :rules="[{ required: true, message: '毕业年级不能为空' }]"
  466. >
  467. <el-select
  468. v-model.trim="topFrom.graduateGrade"
  469. filterable
  470. :disabled="basdisabled || !topFrom.firstRecruitGrade"
  471. clearable
  472. >
  473. <el-option
  474. v-for="(item, index) in gradeList"
  475. :key="index"
  476. :label="item.label"
  477. :value="item.value"
  478. :disabled="
  479. item.value <=
  480. (topFrom.firstRecruitGrade.length > 0
  481. ? Math.max(...topFrom.firstRecruitGrade)
  482. : 0)
  483. "
  484. ></el-option>
  485. </el-select>
  486. </el-form-item>
  487. <el-form-item label="学生基数" prop="graduateGrade">
  488. <el-input
  489. type="number"
  490. :disabled="basdisabled"
  491. v-model="topFrom.basicStudentNum"
  492. />
  493. </el-form-item>
  494. <el-form-item label="缴费方" prop="paymentUserType">
  495. <el-select
  496. v-model.trim="topFrom.paymentUserType"
  497. filterable
  498. :disabled="basdisabled"
  499. clearable
  500. @change="
  501. () => {
  502. topFrom.chargeMode = '';
  503. }
  504. "
  505. >
  506. <el-option label="学校" value="SCHOOL"></el-option>
  507. <el-option label="学员" value="STUDENT"></el-option>
  508. <el-option label="第三方" value="THIRDPARTY"></el-option>
  509. </el-select>
  510. </el-form-item>
  511. <el-form-item
  512. label="计费方式"
  513. prop="chargeMode"
  514. v-if="topFrom.paymentUserType != 'STUDENT'"
  515. >
  516. <el-select
  517. v-model.trim="topFrom.chargeMode"
  518. filterable
  519. :disabled="basdisabled"
  520. clearable
  521. >
  522. <el-option label="学员计费" value="STUDENT"></el-option>
  523. <el-option label="老师计费" value="TEACHER"></el-option>
  524. </el-select>
  525. </el-form-item>
  526. <el-form-item label="销售活动" prop="saleActivityDesc">
  527. <el-input
  528. style="width: 300px"
  529. placeholder="请输入销售活动"
  530. :maxlength="100"
  531. v-model.trim="topFrom.saleActivityDesc"
  532. show-word-limit
  533. type="textarea"
  534. :rows="3"
  535. :disabled="basdisabled"
  536. ></el-input>
  537. </el-form-item>
  538. </div>
  539. <div class="head">乐团设置:</div>
  540. <el-form-item
  541. label="同步群消息"
  542. prop="homeworkPushFlag"
  543. label-width="200px"
  544. :rules="[{ required: true, message: '同步群消息不能为空' }]"
  545. >
  546. <template #label>
  547. <p style="position: relative; display: inline-block">
  548. 开课后作业同步群消息
  549. <el-tooltip placement="top" popper-class="mTooltip">
  550. <div slot="content">
  551. 学员提交乐团课后作业时,群聊中是否发送作业提交消息
  552. </div>
  553. <i
  554. class="el-icon-question"
  555. style="font-size: 18px; color: #f56c6c"
  556. ></i>
  557. </el-tooltip>
  558. </p>
  559. </template>
  560. <el-switch
  561. v-model="topFrom.homeworkPushFlag"
  562. :disabled="basdisabled"
  563. :active-value="1"
  564. :inactive-value="0"
  565. >
  566. </el-switch>
  567. </el-form-item>
  568. <el-form-item
  569. label="是否赠送辅件"
  570. prop="isGiveAccessories"
  571. label-width="200px"
  572. :rules="[{ required: true, message: '是否赠送辅件不能为空' }]"
  573. >
  574. <template #label>
  575. <p style="position: relative; display: inline-block">
  576. 是否赠送辅件
  577. <el-tooltip placement="top" popper-class="mTooltip">
  578. <div slot="content">购买团练宝是否赠送辅件</div>
  579. <i
  580. class="el-icon-question"
  581. style="font-size: 18px; color: #f56c6c"
  582. ></i>
  583. </el-tooltip>
  584. </p>
  585. </template>
  586. <el-switch
  587. v-model="topFrom.isGiveAccessories"
  588. :disabled="basdisabled"
  589. :active-value="'true'"
  590. :inactive-value="'false'"
  591. >
  592. </el-switch>
  593. </el-form-item>
  594. <!-- <el-form-item
  595. label="是否显示免费课程"
  596. prop="memberCourseShowFlag"
  597. label-width="200px"
  598. :rules="[{ required: true, message: '是否显示免费课程不能为空' }]"
  599. >
  600. <template #label>
  601. <p style="position: relative; display: inline-block">
  602. 是否显示免费课程
  603. <el-tooltip placement="top" popper-class="mTooltip">
  604. <div slot="content">报名时是否显示免费赠送课程</div>
  605. <i
  606. class="el-icon-question"
  607. style="font-size: 18px; color: #f56c6c"
  608. ></i>
  609. </el-tooltip>
  610. </p>
  611. </template>
  612. <el-switch
  613. v-model="topFrom.memberCourseShowFlag"
  614. :disabled="basdisabled"
  615. :active-value="1"
  616. :inactive-value="0"
  617. >
  618. </el-switch>
  619. </el-form-item> -->
  620. <!-- <el-form-item label prop="isClass">
  621. <el-checkbox v-model.trim="topFrom.isClass" :disabled="basdisabled"
  622. >课堂课乐团</el-checkbox
  623. >
  624. </el-form-item> -->
  625. <!-- <br /> -->
  626. <!-- <el-form-item label="" v-if="teamStatus == 'teamDraft'">
  627. <p style="color: red; padding-left: 50px">
  628. 修改【收费类型】会重置乐团声部与缴费信息
  629. </p>
  630. </el-form-item> -->
  631. </el-form>
  632. <div class="btnWrap">
  633. <!-- <div
  634. class="nextBtn"
  635. v-if="teamStatus == 'resetTeam'"
  636. v-permission="{
  637. child: 'musicGroup/update',
  638. parent: '/resetTeaming/teamBaseInfo',
  639. }"
  640. @click="resetSubmit"
  641. >
  642. 修改
  643. </div> -->
  644. <!-- 审批或者草稿的下一步 -->
  645. <div class="nextBtn" @click="gotoNext()" v-if="!basdisabled">
  646. {{ this.teamStatus == "teamDraft" ? "下一步" : "保存" }}
  647. </div>
  648. <div
  649. class="nextBtn"
  650. v-if="this.teamStatus == 'teamAudit'"
  651. @click="gotoNext()"
  652. >
  653. 下一步
  654. </div>
  655. </div>
  656. </div>
  657. </div>
  658. </template>
  659. <script>
  660. import {
  661. getType,
  662. getTeamBaseInfo,
  663. resetTeamBaseInfo,
  664. getEmployeeOrgan,
  665. getStudentList,
  666. musicGroupOpenPay,
  667. extensionPayment,
  668. extensionApplyExpire,
  669. getOrganRole,
  670. getTeacher,
  671. createTeam,
  672. getGradeList
  673. } from "@/api/buildTeam";
  674. import dayjs from "dayjs";
  675. import merge from "webpack-merge";
  676. import { queryByOrganId, getSchool } from "@/api/systemManage";
  677. import qrCode from "@/components/QrCode/index";
  678. import { classStatus, courseViewTypeList } from "@/utils/searchArray";
  679. import { vaildStudentUrl, vaildTeacherUrl } from "@/utils/validate";
  680. import { getMusicGroupPlanMakingList } from "@/views/baseRulesManager/api";
  681. import mergeMusic from "../components/merge-music";
  682. const singleTrainMinutesList = [
  683. { name: "90+90", id: "90+90" },
  684. { name: "90+90+45", id: "90+90+45" }
  685. ];
  686. const coursePlanList = [
  687. { name: "PlanS", id: "PlanS" },
  688. { name: "PlanA", id: "PlanA" },
  689. { name: "PlanB", id: "PlanB" },
  690. { name: "PlanC", id: "PlanC" },
  691. { name: "PlanD", id: "PlanD" },
  692. { name: "PlanE", id: "PlanE" }
  693. ];
  694. export default {
  695. components: {
  696. mergeMusic,
  697. qrCode
  698. },
  699. name: "teamBaseInfo",
  700. props: ["getTeamList"],
  701. data() {
  702. return {
  703. classStatus,
  704. courseViewTypeList,
  705. organId: null,
  706. topFrom: {
  707. type: "", // 收费类型
  708. section: "", //所属分部
  709. courseViewType: "", // 收费模式
  710. school: "", // 合作单位
  711. teacher: null, // 乐团主管
  712. name: "", //乐团名称
  713. boss: "", // 运营主管
  714. time: "", // 报名截止时间
  715. startClass: [], // 招生年级起始
  716. address: "", // 教学地点
  717. salary: "", // 收费模式
  718. head: "",
  719. homeworkPushFlag: 1, // 是否同步群消息
  720. isGiveAccessories: 0, // 是否赠送辅件 默认不赠送
  721. memberCourseShowFlag: 0,
  722. isClass: false, //是否为课堂课
  723. startTime: "",
  724. feeType: null,
  725. paymentPattern: "", // 缴费方式
  726. paymentValid: [], // 缴费有效期
  727. paymentValidStartDate: null, // 缴费有效期开始
  728. paymentValidEndDate: null, // 缴费有效期结束
  729. ownershipType: "OWN", // 合作机构类型
  730. repairUserId: null, // 维修技师
  731. transactionTeacherId: null, // 衔接老师
  732. extracurricularTeacher: "NORMAL",
  733. musicGroupPlanMakingId: "", //建团编制
  734. firstRecruitGrade: [], // 成团年级
  735. defaultChargeStandard: "", // 收费标准
  736. singleTrainMinutes: "", //单次训练时长
  737. coursePlan: "", // 课程计划
  738. graduateGrade: "", // 毕业年级
  739. saleActivityDesc: "", // 销售活动描述
  740. basicStudentNum: "", // 学生基数
  741. paymentUserType: "", // 缴费方
  742. chargeMode: "" // 计费方式
  743. },
  744. baseInfo: {},
  745. money: 580,
  746. orderInfo: {
  747. marketPrice: 0, // 原价总金额
  748. referencePrice: 0 // 现价总金额
  749. }, // 金额列表,金额计算
  750. sectionList: [], // 分部列表
  751. cooperationList: [], // 教学点列表
  752. teacherList: [], // 获取老师列表
  753. educationList: [], // 乐团主管
  754. bossList: [],
  755. transactionList: [],
  756. addList: [], // 教学地点列表
  757. activeTeam: [],
  758. gradeList: [], // 年级
  759. gradeListObj: null,
  760. teamid: "",
  761. teamStatus: "",
  762. isInit: false,
  763. technician: [],
  764. basdisabled: false,
  765. cooperDisabled: false, // 合作单位状态
  766. // 整合报名中
  767. paymentExpireDate: "",
  768. applyExpireDate: null,
  769. mergeVisible: false,
  770. team_status: "",
  771. paymentNum: 0,
  772. paymentStatus: false,
  773. paymentForm: {
  774. paymentExpireDate: null
  775. // feeType: null
  776. },
  777. paymentRules: {
  778. paymentExpireDate: [
  779. { required: true, message: "请设置缴费截止日期", trigger: "blur" }
  780. ]
  781. },
  782. extendForm: {
  783. expireDate: null
  784. },
  785. extendRule: {
  786. expireDate: [
  787. { required: true, message: "请选择延长时间", trigger: "change" }
  788. ]
  789. },
  790. isPay: false,
  791. extendPaymentStatus: false, // 延长缴费
  792. codeStatus: false,
  793. qrCodeUrl: null,
  794. codeTitle: null,
  795. tenantId: "",
  796. coursePlanList: coursePlanList,
  797. musicGroupPlanMakingList: [],
  798. singleTrainMinutesList: singleTrainMinutesList
  799. };
  800. },
  801. created() {},
  802. mounted() {
  803. if (this.$route.query.type == "newTeam") {
  804. this.onReset();
  805. }
  806. console.log("12121212");
  807. this.init();
  808. },
  809. activated() {
  810. if (
  811. (this.teamid && this.teamid != this.$route.query.id) ||
  812. this.teamStatus != this.$route.query.type
  813. ) {
  814. this.init();
  815. }
  816. if (this.$route.query.clear == "true") {
  817. this.onReset();
  818. }
  819. if (this.teamStatus == "newTeam") {
  820. this.$store.dispatch("buildIndex", 0);
  821. }
  822. if (this.teamStatus != "newTeam") {
  823. this.$store.dispatch("draftIndex", 0);
  824. }
  825. this.teamStatus = this.$route.query.type;
  826. console.log(this.$route.query.type, "teamStatus");
  827. if (
  828. this.teamStatus == "look" ||
  829. this.teamStatus == "teamAudit" ||
  830. this.teamStatus == "feeAudit" ||
  831. this.teamStatus == "APPLY" ||
  832. this.teamStatus == "PAY" ||
  833. this.teamStatus == "FEE_AUDIT_FAILED"
  834. ) {
  835. this.basdisabled = true;
  836. } else {
  837. this.basdisabled = false;
  838. }
  839. if (this.team_status == "PROGRESS" || this.team_status == "PAUSE") {
  840. this.cooperDisabled = true;
  841. } else {
  842. this.cooperDisabled = false;
  843. }
  844. },
  845. deactivated() {},
  846. // async beforeDestroy() {
  847. // await this.setStore();
  848. // // await new Promise((res, err) => {
  849. // // setTimeout(() => {
  850. // // res();
  851. // // }, 1000);
  852. // // });
  853. // },
  854. methods: {
  855. async setStore(str) {
  856. if (this.teamid) {
  857. let loadash = this.$helpers.lodash;
  858. let sotrage = JSON.parse(localStorage.getItem(`${this.teamid}base`));
  859. console.log(sotrage, this.topFrom);
  860. if (!loadash.isEqual(this.topFrom, sotrage) && sotrage) {
  861. // 提示保存
  862. return await this.$confirm("已修改当前页面数据是否保存", "提示", {
  863. confirmButtonText: "是",
  864. cancelButtonText: "否",
  865. type: "warning",
  866. closeOnClickModal: false,
  867. distinguishCancelAndClose: true
  868. })
  869. .then(async () => {
  870. // localStorage.setItem(
  871. // `${this.teamid}base`,
  872. // JSON.stringify(this.topFrom)
  873. // );
  874. let b = await this.gotoNext(str);
  875. console.log(b);
  876. return b;
  877. })
  878. .catch(e => {
  879. console.log(e);
  880. if (e == "close") {
  881. return false;
  882. } else {
  883. localStorage.removeItem(`${this.teamid}base`);
  884. return true;
  885. }
  886. // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
  887. });
  888. } else {
  889. return true;
  890. // localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
  891. }
  892. } else {
  893. localStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
  894. return true;
  895. }
  896. },
  897. onSingleTrainMin() {
  898. console.log(
  899. this.$refs.singleTrainMinutesRef,
  900. "this.$refs.singleTrainMinutesRef"
  901. );
  902. this.topFrom.singleTrainMinutes = this.$refs.singleTrainMinutesRef.selectedLabel;
  903. },
  904. onCoursePlan() {
  905. this.topFrom.coursePlan = this.$refs.coursePlanRef.selectedLabel;
  906. },
  907. //|| this.teamStatus === 'teamAudit'
  908. isNotEditing: function() {
  909. return !(
  910. this.teamStatus === "teamDraft" ||
  911. this.teamStatus === "newTeam" ||
  912. this.teamStatus === "teamList"
  913. );
  914. },
  915. changeFeeType(val) {},
  916. changePaymentValidStartDate(val) {
  917. if (val) {
  918. this.$set(this.topFrom, "paymentValidEndDate", "");
  919. }
  920. },
  921. changePaymentPattern(val) {
  922. // if (val === 2) {
  923. // // this.topFrom.paymentValidStartDate = null
  924. // this.$set(this.topFrom, 'paymentValidEndDate', '')
  925. // }
  926. },
  927. beginDate(end) {
  928. return {
  929. firstDayOfWeek: 1,
  930. disabledDate(time) {
  931. if (end) {
  932. return new Date(end).getTime() - 86400000 >= time.getTime();
  933. } else {
  934. return time.getTime() + 86400000 < Date.now();
  935. //开始时间不选时,结束时间最大值小于等于当天
  936. }
  937. }
  938. };
  939. },
  940. init() {
  941. this.isInit = true;
  942. if (this.$route.query.id) {
  943. this.teamid = this.$route.query.id;
  944. }
  945. this.teamStatus = this.$route.query.type;
  946. this.team_status = this.$route.query.team_status;
  947. this.tenantId = this.$helpers.tenantId;
  948. // if (this.teamStatus == "newTeam") {
  949. // this.$store.dispatch("buildIndex", 0);
  950. // }
  951. // if (this.teamStatus != "newTeam") {
  952. // this.$store.dispatch("draftIndex", 0);
  953. // }
  954. // 获取建团编制
  955. getMusicGroupPlanMakingList().then(res => {
  956. if (res.code == 200) {
  957. this.musicGroupPlanMakingList = res.data;
  958. }
  959. });
  960. // 传过来的乐团信息
  961. this.activeTeam = this.getTeamList;
  962. if (
  963. this.teamStatus == "look" ||
  964. this.teamStatus == "teamAudit" ||
  965. this.teamStatus == "feeAudit" ||
  966. this.teamStatus == "teamCanceled" ||
  967. this.teamStatus == "FEE_AUDIT_FAILED"
  968. ) {
  969. this.basdisabled = true;
  970. } else {
  971. this.basdisabled = false;
  972. }
  973. if (this.team_status == "PROGRESS" || this.team_status == "PAUSE") {
  974. this.cooperDisabled = true;
  975. } else {
  976. this.cooperDisabled = false;
  977. }
  978. if (this.$route.query.id) {
  979. // 单团修改
  980. this.teamid = this.$route.query.id;
  981. let sotrage = JSON.parse(
  982. localStorage.getItem(`${this.$route.query.id}base`)
  983. );
  984. if (!sotrage?.section) {
  985. getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
  986. if (res.code == 200) {
  987. // if (this.$listeners.getBaseInfo) {
  988. // this.$listeners.getBaseInfo(res.data);
  989. // }
  990. // 头部
  991. this.setBase(res);
  992. // // 循环缴费月
  993. // this.payList.chioseMonth = res.data.months;
  994. if (res.data.musicGroup.organId) {
  995. // 获取员工
  996. this.getBaseList(res.data.musicGroup.organId);
  997. }
  998. this.$emit("getBaseInfo", res.data);
  999. }
  1000. });
  1001. } else {
  1002. this.topFrom = sotrage;
  1003. // this.applyExpireDate = sotrage.time;
  1004. // this.paymentExpireDate = Storage.paymentExpireDate;
  1005. if (this.topFrom?.section) {
  1006. // 获取员工
  1007. this.getBaseList(this.topFrom.section);
  1008. }
  1009. }
  1010. } else {
  1011. // 如果是新建团
  1012. let sotrage = JSON.parse(localStorage.getItem(`newTeambase`));
  1013. sotrage ? (this.topFrom = sotrage) : this.topFrom;
  1014. if (this.topFrom?.section) {
  1015. // 获取员工
  1016. this.getBaseList(this.topFrom.section);
  1017. }
  1018. }
  1019. this.getStudentStatus();
  1020. this.$emit("getName", this.topFrom?.name);
  1021. Promise.all([getEmployeeOrgan()]).then(values => {
  1022. console.log(values, "--------");
  1023. if (values[0].code == 200) {
  1024. this.sectionList = values[0].data;
  1025. }
  1026. let arr = [];
  1027. if (this.sectionList.length <= 0) {
  1028. arr.push("organ");
  1029. } else {
  1030. if (!this.topFrom.section) {
  1031. this.$set(this.topFrom, "section", this.sectionList[0].id);
  1032. this.changeSection(this.sectionList[0].id);
  1033. }
  1034. }
  1035. this.$bus.$emit("showguide", arr);
  1036. });
  1037. // console.log('到这里来',getEmployeeOrgan())
  1038. // 缓存设置时的状态
  1039. },
  1040. changeSection(val) {
  1041. // 修改分部的时候 重置运营主管 重置乐团主管 重置乐队指导 合作单位 教学点
  1042. this.topFrom.teacher = null;
  1043. this.topFrom.boss = "";
  1044. this.topFrom.head = "";
  1045. this.topFrom.school = "";
  1046. this.topFrom.address = "";
  1047. this.topFrom.firstRecruitGrade = [];
  1048. this.topFrom.graduateGrade = "";
  1049. // 发请求 根据分部id 查询所有员工
  1050. if (val) {
  1051. this.getBaseList(val);
  1052. }
  1053. },
  1054. async getBaseList(val) {
  1055. // 合作单位
  1056. // queryByOrganId({ organId: val }).then((res) => {
  1057. // if (res.code == 200) {
  1058. // this.cooperationList = res.data;
  1059. // }
  1060. // });
  1061. // 教学点=>学校
  1062. // getSchool({ organId: val }).then((res) => {
  1063. // if (res.code == 200) {
  1064. // this.addList = res.data;
  1065. // }
  1066. // });
  1067. // 获取乐团主管
  1068. try {
  1069. const ruselt = await getOrganRole({
  1070. id: val
  1071. });
  1072. // 乐团主管
  1073. this.educationList = ruselt?.data?.EDUCATION;
  1074. // 维修技师
  1075. this.technician = ruselt?.data?.REPAIR;
  1076. // this.bossList = ruselt?.data?.TEAM_TEACHER;
  1077. // 衔接老师
  1078. this.transactionList = ruselt?.data?.JOIN_TEACHER;
  1079. } catch (e) {
  1080. console.log(e);
  1081. }
  1082. // 获取指导老师
  1083. getTeacher({ organId: val }).then(res => {
  1084. if (res.code == 200) {
  1085. this.teacherList = res.data;
  1086. }
  1087. });
  1088. // 获取年级
  1089. getGradeList({ id: val }).then(res => {
  1090. let result = res.data;
  1091. this.gradeListObj = res.data;
  1092. if (res.code == 200 && result) {
  1093. for (let i in result) {
  1094. this.gradeList.push({
  1095. value: i,
  1096. label: result[i]
  1097. });
  1098. }
  1099. }
  1100. });
  1101. Promise.all([
  1102. queryByOrganId({ organId: val }),
  1103. getSchool({ organId: val })
  1104. ]).then(values => {
  1105. if (values[0].code == 200) {
  1106. this.cooperationList = values[0].data;
  1107. }
  1108. if (values[1].code == 200) {
  1109. this.addList = values[1].data;
  1110. }
  1111. let arr = [];
  1112. if (this.cooperationList.length <= 0) {
  1113. arr.push("cooperationOrgan");
  1114. }
  1115. if (this.addList.length <= 0) {
  1116. arr.push("school");
  1117. }
  1118. if (arr.length > 0) {
  1119. this.$bus.$emit("showguide", arr);
  1120. return;
  1121. }
  1122. });
  1123. },
  1124. chioseSchool(val) {
  1125. // 清除教学点
  1126. this.topFrom.teacher = null;
  1127. if (val) {
  1128. console.log(this.cooperationList);
  1129. this.cooperationList.forEach(item => {
  1130. if (item.id == val) {
  1131. console.log(item);
  1132. this.$set(this.topFrom, "teacher", item.educationUserId);
  1133. console.log(this.topFrom);
  1134. }
  1135. });
  1136. }
  1137. console.log("chioseSchool", this.topFrom.teacher);
  1138. },
  1139. async gotoNext(str) {
  1140. let tempStatus;
  1141. return new Promise((resolve, reject) => {
  1142. this.$refs["topinfo"].validate(async (valid, object) => {
  1143. if (!valid) {
  1144. this.$message.error("请填写建团必要参数");
  1145. // return false
  1146. resolve(false);
  1147. } else {
  1148. // 判断一下是否勾选了课程类型而没有输入金额
  1149. // 验证通过
  1150. this.$store.dispatch("topinfo", this.topFrom);
  1151. if (this.teamStatus == "teamAudit") {
  1152. // 获取数据提交
  1153. this.$emit("handleClick", { name: "2" });
  1154. } else {
  1155. this.$emit("getName", this.topFrom.name);
  1156. tempStatus = await this.resetSubmit(str);
  1157. console.log(tempStatus, "tempStatus");
  1158. resolve(tempStatus);
  1159. }
  1160. }
  1161. });
  1162. });
  1163. },
  1164. async resetSubmit(str) {
  1165. return new Promise((resolve, reject) => {
  1166. this.$refs["topinfo"].validate(async (valid, object) => {
  1167. if (!valid) {
  1168. this.$message.error("请填写必要参数");
  1169. reject();
  1170. } else {
  1171. let status = null;
  1172. // 1.resetTeam 乐团修改
  1173. // 2.newTeam 新建乐团
  1174. // 3.teamList 跨团修改
  1175. // 4.teamDraft 乐团草稿
  1176. switch (this.teamStatus) {
  1177. case "resetTeam": {
  1178. status = "PROGRESS";
  1179. break;
  1180. }
  1181. case "newTeam": {
  1182. status = "DRAFT";
  1183. break;
  1184. }
  1185. case "teamList": {
  1186. status = null;
  1187. break;
  1188. }
  1189. case "teamDraft": {
  1190. status = "DRAFT";
  1191. break;
  1192. }
  1193. }
  1194. let obj = {};
  1195. // topFrom.ownershipType
  1196. // 修改 合并对象
  1197. obj.musicGroup = {
  1198. settlementType: this.topFrom.salary,
  1199. applyExpireDate: this.topFrom.time
  1200. ? dayjs(this.topFrom.time).format("YYYY-MM-DD HH:mm:ss")
  1201. : null,
  1202. cooperationOrganId: this.topFrom.school,
  1203. courseViewType: this.topFrom.courseViewType,
  1204. teamTeacherId: this.topFrom.boss,
  1205. // educationalTeacherId: this.topFrom.teacher,
  1206. // chioseSchool
  1207. enrollClasses: this.topFrom.startClass.join(","),
  1208. name: this.topFrom.name,
  1209. paymentPattern: this.topFrom.paymentPattern,
  1210. paymentValidStartDate: this.topFrom.paymentValidStartDate
  1211. ? dayjs(this.topFrom.paymentValidStartDate).format("YYYY-MM-DD")
  1212. : this.topFrom.paymentValidStartDate,
  1213. paymentValidEndDate: this.topFrom.paymentValidEndDate
  1214. ? dayjs(this.topFrom.paymentValidEndDate).format("YYYY-MM-DD")
  1215. : this.topFrom.paymentValidEndDate,
  1216. organId: this.topFrom.section,
  1217. // paymentMonths:obj.months 有待确认
  1218. schoolId: this.topFrom.address,
  1219. id: this.teamid,
  1220. directorUserId: this.topFrom.head,
  1221. isClassroomLessons: this.topFrom.isClass,
  1222. status,
  1223. expectStartGroupDate: this.topFrom.startTime,
  1224. ownershipType: this.topFrom.ownershipType,
  1225. repairUserId: this.topFrom.repairUserId || null,
  1226. feeType: this.topFrom.feeType,
  1227. transactionTeacherId: this.topFrom.transactionTeacherId,
  1228. homeworkPushFlag: this.topFrom.homeworkPushFlag,
  1229. isGiveAccessories: this.topFrom.isGiveAccessories,
  1230. memberCourseShowFlag: this.topFrom.memberCourseShowFlag,
  1231. extracurricularTeacher: this.topFrom.extracurricularTeacher,
  1232. musicGroupPlanMakingId: this.topFrom.musicGroupPlanMakingId,
  1233. firstRecruitGrade: this.topFrom.firstRecruitGrade.join(","),
  1234. defaultChargeStandard: this.topFrom.defaultChargeStandard,
  1235. singleTrainMinutes: this.topFrom.singleTrainMinutes,
  1236. coursePlan: this.topFrom.coursePlan,
  1237. graduateGrade: this.topFrom.graduateGrade,
  1238. saleActivityDesc: this.topFrom.saleActivityDesc,
  1239. basicStudentNum: this.topFrom.basicStudentNum,
  1240. paymentUserType: this.topFrom.paymentUserType,
  1241. chargeMode: this.topFrom.chargeMode,
  1242. gradeType: this.topFrom.gradeType
  1243. };
  1244. // obj.musicGroupPaymentEntities = [];
  1245. // createTeam
  1246. if (this.teamStatus != "newTeam") {
  1247. return await resetTeamBaseInfo(obj).then(async res => {
  1248. if (res.code == 200) {
  1249. localStorage.setItem(
  1250. `${this.teamid}base`,
  1251. JSON.stringify(this.topFrom)
  1252. );
  1253. this.$emit("getBaseInfo");
  1254. if (this.teamStatus == "teamDraft") {
  1255. this.$message.success("保存成功");
  1256. if (!str) {
  1257. this.$emit("handleClick", { name: "2" });
  1258. }
  1259. resolve(true);
  1260. // 跳到第二页
  1261. } else {
  1262. this.$message.success("修改乐团成功");
  1263. // this.$router.push({ path: '/teamLists', query: { id: this.teamid, name: this.topFrom.name } })
  1264. }
  1265. resolve(true);
  1266. }
  1267. });
  1268. } else {
  1269. // 发送建团申请 成功后跳到第二页
  1270. createTeam(obj).then(res => {
  1271. if (res.code == 200) {
  1272. // this.$message.success('建团成功,请设置声部信息')
  1273. // this.$emit("chiosetab", 1);
  1274. const h = this.$createElement;
  1275. this.$msgbox({
  1276. title: "提示",
  1277. message: h("p", null, [
  1278. h("p", null, "新乐团基础信息创建完成"),
  1279. h("p", null, "请设置声部信息")
  1280. ]),
  1281. type: "warning",
  1282. confirmButtonText: "是",
  1283. cancelButtonText: "否",
  1284. showCancelButton: true,
  1285. customClass: "messageBox-prompt-test"
  1286. })
  1287. .then(() => {
  1288. this.$router.push(
  1289. {
  1290. query: merge(this.$route.query, {
  1291. type: "teamDraft",
  1292. id: res.data,
  1293. team_status: "DRAFT"
  1294. })
  1295. },
  1296. router => {
  1297. console.log(router);
  1298. router.meta.title = "乐团编辑中";
  1299. }
  1300. );
  1301. this.$emit("getName", this.topFrom.name);
  1302. this.$emit("handleClick", { name: "2" });
  1303. return true;
  1304. })
  1305. .catch(() => {
  1306. this.$router.push(
  1307. {
  1308. query: merge(this.$route.query, {
  1309. type: "teamDraft",
  1310. id: res.data,
  1311. team_status: "DRAFT"
  1312. })
  1313. },
  1314. router => {
  1315. console.log(router);
  1316. router.meta.title = "乐团编辑中";
  1317. }
  1318. );
  1319. this.$emit("getName", this.topFrom.name);
  1320. this.init();
  1321. return true;
  1322. });
  1323. }
  1324. });
  1325. }
  1326. // 发请求
  1327. }
  1328. });
  1329. });
  1330. },
  1331. changeApplyTime(val) {
  1332. this.$set(this.topFrom, "paymentValidStartDate", "");
  1333. this.$set(this.topFrom, "paymentValidEndDate", "");
  1334. // this.topFrom.paymentValidStartDate = ''
  1335. // this.topFrom.paymentValidEndDate = ''
  1336. },
  1337. onReset() {
  1338. this.topFrom = {
  1339. type: "", // 收费类型
  1340. section: "", //所属分部
  1341. school: "", // 合作单位
  1342. courseViewType: "",
  1343. teacher: "", // 乐团主管
  1344. name: "", //乐团名称
  1345. boss: "", // 运营主管
  1346. time: "", // 报名截止时间
  1347. startClass: [], // 招生年级起始
  1348. paymentValid: [], // 缴费有效期时间起始
  1349. address: "", // 教学地点
  1350. salary: "", // 收费模式
  1351. head: "",
  1352. paymentPattern: "", // 缴费方式
  1353. isClass: false, //是否为课堂课
  1354. startTime: "",
  1355. ownershipType: "OWN", // 合作机构类型
  1356. feeType: null,
  1357. homeworkPushFlag: 1,
  1358. isGiveAccessories: false,
  1359. memberCourseShowFlag: 0,
  1360. extracurricularTeacher: "NORMAL",
  1361. musicGroupPlanMakingId: "",
  1362. firstRecruitGrade: [],
  1363. defaultChargeStandard: "",
  1364. singleTrainMinutes: "",
  1365. coursePlan: "",
  1366. graduateGrade: "",
  1367. saleActivityDesc: "",
  1368. paymentUserType: "",
  1369. chargeMode: "",
  1370. basicStudentNum: ""
  1371. };
  1372. this.$refs["topinfo"].resetFields();
  1373. },
  1374. onGoHome() {
  1375. if (this.paymentNum <= 0) {
  1376. this.$message.error("当前缴费人数为0,无法开团");
  1377. return;
  1378. }
  1379. this.$confirm(`是否确认开团?`, "提示", {
  1380. confirmButtonText: "确定",
  1381. cancelButtonText: "取消",
  1382. type: "warning"
  1383. })
  1384. .then(() => {
  1385. musicGroupFound({
  1386. musicGroupId: this.$route.query.id
  1387. }).then(res => {
  1388. if (res.code == 200) {
  1389. // let query = this.$route.query;
  1390. // this.$message.success("开启成功");
  1391. // this.$router.push({
  1392. // path: "/teamList",
  1393. // query: {
  1394. // ...query,
  1395. // },
  1396. // });
  1397. this.onCancel();
  1398. }
  1399. });
  1400. })
  1401. .catch(() => {});
  1402. },
  1403. payStart() {
  1404. this.paymentStatus = true;
  1405. },
  1406. getStudentStatus() {
  1407. let obj = {
  1408. musicGroupId: this.teamid,
  1409. page: 1,
  1410. rows: 9999
  1411. };
  1412. if (!this.teamid) return;
  1413. getStudentList(obj).then(res => {
  1414. if (res.code == 200) {
  1415. res.data.rows.forEach(item => {
  1416. // '未开启缴费', '开启缴费', '已缴费'
  1417. if (item.paymentStatus == 2) {
  1418. this.paymentNum += 1;
  1419. }
  1420. });
  1421. // this.rightList = res.data.rows;
  1422. // this.rules.total = res.data.total;
  1423. // return res;
  1424. }
  1425. });
  1426. },
  1427. payDate() {
  1428. let self = this;
  1429. return {
  1430. firstDayOfWeek: 1,
  1431. disabledDate(time) {
  1432. if (self.applyExpireDate) {
  1433. return (
  1434. time.getTime() <=
  1435. new Date(self.applyExpireDate.replace(/-/g, "/")).getTime()
  1436. );
  1437. } else {
  1438. return false;
  1439. }
  1440. }
  1441. };
  1442. },
  1443. onStartPayment(formName) {
  1444. // 开启缴费
  1445. this.$refs[formName].validate(valid => {
  1446. if (valid) {
  1447. musicGroupOpenPay({
  1448. musicGroupId: this.teamid,
  1449. expireDate: this.paymentForm.paymentExpireDate
  1450. // feeType: this.paymentForm.feeType
  1451. }).then(res => {
  1452. if (res.code == 200) {
  1453. this.$message.success("开启成功");
  1454. this.paymentStatus = false;
  1455. this.$store.dispatch("delVisitedViews", this.$route);
  1456. this.$router.push({ path: "/teamList" });
  1457. // this.$router.push({
  1458. // path: "/business/resetTeaming",
  1459. // query: {
  1460. // status: "PAY",
  1461. // id: this.$route.query.id,
  1462. // name: this.$route.query.name,
  1463. // },
  1464. // });
  1465. // this.team_status = "PAY";
  1466. // this.paymentExpireDate = this.paymentForm.paymentExpireDate;
  1467. // this.getList();
  1468. }
  1469. });
  1470. } else {
  1471. return false;
  1472. }
  1473. });
  1474. },
  1475. applyDate() {
  1476. let self = this;
  1477. return {
  1478. firstDayOfWeek: 1,
  1479. disabledDate(time) {
  1480. if (self.paymentExpireDate) {
  1481. return (
  1482. time.getTime() >
  1483. new Date(self.paymentExpireDate.replace(/-/g, "/")).getTime()
  1484. );
  1485. } else {
  1486. return false;
  1487. }
  1488. }
  1489. };
  1490. },
  1491. extendTime(isPay) {
  1492. this.isPay = isPay;
  1493. if (isPay) {
  1494. // 点击的延长缴费
  1495. this.extendForm.expireDate = this.paymentExpireDate;
  1496. } else {
  1497. // 点击的延长报名
  1498. this.extendForm.expireDate = this.applyExpireDate;
  1499. }
  1500. this.extendPaymentStatus = true;
  1501. },
  1502. onExtendPayment(formName, isPay) {
  1503. this.$refs[formName].validate(valid => {
  1504. if (valid) {
  1505. if (!isPay) {
  1506. extensionApplyExpire({
  1507. musicGroupId: this.teamid,
  1508. expireDate: this.extendForm.expireDate
  1509. }).then(res => {
  1510. if (res.code == 200) {
  1511. this.$message.success("延长报名成功");
  1512. this.extendPaymentStatus = false;
  1513. getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
  1514. if (res.code == 200) {
  1515. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1516. this.setBase(res);
  1517. }
  1518. });
  1519. } else {
  1520. this.$message.error(res.msg);
  1521. }
  1522. });
  1523. } else {
  1524. extensionPayment({
  1525. musicGroupId: this.teamid,
  1526. expireDate: this.extendForm.expireDate
  1527. }).then(res => {
  1528. if (res.code == 200) {
  1529. this.$message.success("延长缴费成功");
  1530. this.extendPaymentStatus = false;
  1531. getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
  1532. if (res.code == 200) {
  1533. this.paymentExpireDate =
  1534. res.data.musicGroup.paymentExpireDate;
  1535. }
  1536. });
  1537. } else {
  1538. this.$message.error(res.msg);
  1539. }
  1540. });
  1541. }
  1542. }
  1543. });
  1544. },
  1545. onCreateQRCode(type) {
  1546. // 生成报名二维码
  1547. let id = this.teamid;
  1548. this.codeStatus = true;
  1549. if (type == "payment") {
  1550. this.codeTitle = "学员报名链接";
  1551. this.qrCodeUrl = vaildStudentUrl() + "/#/login?musicGroupId=" + id;
  1552. } else if (type == "detail") {
  1553. let teamName = this.$route.query.name;
  1554. this.codeTitle = "报名缴费详情";
  1555. this.qrCodeUrl =
  1556. vaildTeacherUrl() +
  1557. "/#/order?musicGroupId=" +
  1558. id +
  1559. "&musicGroupName=" +
  1560. teamName;
  1561. } else if (type == "rePayment") {
  1562. this.codeTitle = "学生报名链接(无乐器)";
  1563. this.qrCodeUrl =
  1564. vaildStudentUrl() + "/#/login?musicGroupId=" + id + "&instrument=1";
  1565. }
  1566. },
  1567. gotoStudentList() {
  1568. this.$router.push({
  1569. query: merge(this.$route.query, { tabrouter: 7 })
  1570. });
  1571. // this.$router.replace({query:{...this.$route.query,tabrouter:7}})
  1572. },
  1573. setBase(res) {
  1574. this.topFrom.name = res.data.musicGroup.name;
  1575. this.$emit("getName", this.topFrom.name);
  1576. this.topFrom.time = res.data.musicGroup.applyExpireDate;
  1577. this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(",");
  1578. this.topFrom.paymentPattern = res.data.musicGroup.paymentPattern;
  1579. this.topFrom.paymentValidStartDate =
  1580. res.data.musicGroup.paymentValidStartDate;
  1581. this.topFrom.paymentValidEndDate =
  1582. res.data.musicGroup.paymentValidEndDate;
  1583. this.topFrom.section = res.data.musicGroup.organId;
  1584. this.topFrom.courseViewType = res.data.musicGroup.courseViewType;
  1585. this.topFrom.school = res.data.musicGroup.cooperationOrganId;
  1586. this.topFrom.teacher = res.data.musicGroup.educationalTeacherId;
  1587. // this.topFrom.boss = res.data.musicGroup.teamTeacherId;
  1588. this.topFrom.address = res.data.musicGroup.schoolId;
  1589. // this.topFrom.salary = res.data.musicGroup.settlementType;
  1590. this.topFrom.head = res.data.musicGroup.directorUserId
  1591. ? res.data.musicGroup.directorUserId
  1592. : null;
  1593. // this.topFrom.isClass = res.data.musicGroup.isClassroomLessons;
  1594. this.topFrom.startTime = res.data.musicGroup.expectStartGroupDate;
  1595. this.topFrom.ownershipType = res.data.musicGroup.ownershipType;
  1596. this.topFrom.repairUserId = res.data.musicGroup.repairUserId
  1597. ? res.data.musicGroup.repairUserId
  1598. : null;
  1599. this.topFrom.feeType = res.data.musicGroup.feeType
  1600. ? res.data.musicGroup.feeType
  1601. : null;
  1602. this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
  1603. this.applyExpireDate = res.data.musicGroup.applyExpireDate;
  1604. this.topFrom.transactionTeacherId =
  1605. res.data.musicGroup.transactionTeacherId || "";
  1606. this.topFrom.homeworkPushFlag = res.data.musicGroup.homeworkPushFlag;
  1607. this.topFrom.isGiveAccessories =
  1608. res.data.musicGroup.isGiveAccessories + "";
  1609. console.log(this.topFrom.isGiveAccessories, "isGiveAccessories");
  1610. this.topFrom.memberCourseShowFlag = res.data.musicGroup
  1611. .memberCourseShowFlag
  1612. ? 1
  1613. : 0;
  1614. this.topFrom.extracurricularTeacher =
  1615. res.data.musicGroup.extracurricularTeacher;
  1616. this.topFrom.musicGroupPlanMakingId =
  1617. res.data.musicGroup.musicGroupPlanMakingId;
  1618. this.topFrom.firstRecruitGrade = res.data.musicGroup.firstRecruitGrade
  1619. ? res.data.musicGroup.firstRecruitGrade.split(",")
  1620. : [];
  1621. this.topFrom.defaultChargeStandard =
  1622. res.data.musicGroup.defaultChargeStandard;
  1623. this.topFrom.singleTrainMinutes = res.data.musicGroup.singleTrainMinutes;
  1624. this.topFrom.coursePlan = res.data.musicGroup.coursePlan;
  1625. this.topFrom.graduateGrade = res.data.musicGroup.graduateGrade + "";
  1626. this.topFrom.saleActivityDesc = res.data.musicGroup.saleActivityDesc;
  1627. this.topFrom.basicStudentNum = res.data.musicGroup.basicStudentNum;
  1628. this.topFrom.paymentUserType = res.data.musicGroup.paymentUserType;
  1629. this.topFrom.chargeMode = res.data.musicGroup.chargeMode;
  1630. this.topFrom.gradeType = res.data.musicGroup.gradeType;
  1631. localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
  1632. },
  1633. changeType(val) {
  1634. if (val) {
  1635. localStorage.removeItem(`${this.teamid}sound`);
  1636. }
  1637. },
  1638. checkCourseView(val) {
  1639. if (this.teamStatus == "newTeam" || this.teamStatus == "teamDraft") {
  1640. return false;
  1641. } else {
  1642. if (
  1643. this.topFrom.courseViewType == 0 ||
  1644. this.topFrom.courseViewType == 1
  1645. ) {
  1646. // val ==2
  1647. return false;
  1648. } else {
  1649. return val == 0 || val == 1;
  1650. }
  1651. }
  1652. }
  1653. },
  1654. computed: {
  1655. startClassString() {
  1656. return this.topFrom.startClass
  1657. .map(item => {
  1658. for (let i in this.classStatus) {
  1659. if (item == this.classStatus[i].value) {
  1660. return this.classStatus[i].label;
  1661. }
  1662. }
  1663. // return this.classStatus[item]
  1664. })
  1665. .join(",");
  1666. },
  1667. showNext() {
  1668. const teamStatus = this.teamStatus;
  1669. return (
  1670. teamStatus == "newTeam" ||
  1671. teamStatus == "teamDraft" ||
  1672. teamStatus == "teamAudit" ||
  1673. teamStatus == "feeAudit"
  1674. );
  1675. }
  1676. }
  1677. };
  1678. </script>
  1679. <style lang="scss">
  1680. .messageBox-prompt-test {
  1681. .el-message-box__status {
  1682. top: 25% !important;
  1683. }
  1684. }
  1685. .base-container {
  1686. overflow: auto;
  1687. // display: flex;
  1688. // flex-direction: row;
  1689. // justify-content: flex-start;
  1690. // flex-wrap: nowrap;
  1691. font-size: 14px;
  1692. color: #444;
  1693. // width: fill-available;
  1694. .banseLeft {
  1695. // width: 1050px;
  1696. .head {
  1697. height: 48px;
  1698. line-height: 48px;
  1699. background-color: #edeef0;
  1700. font-size: 14px;
  1701. font-weight: bold;
  1702. color: #444;
  1703. padding: 0 11px;
  1704. margin-bottom: 20px;
  1705. }
  1706. .noMargin.head {
  1707. margin-bottom: 0;
  1708. }
  1709. .num {
  1710. padding: 15px 11px;
  1711. }
  1712. .checkRow {
  1713. min-width: 1200px;
  1714. padding-left: 28px;
  1715. display: flex;
  1716. flex-direction: row;
  1717. justify-content: flex-start;
  1718. flex-wrap: nowrap;
  1719. overflow: auto;
  1720. .el-checkbox {
  1721. line-height: 72px;
  1722. width: 120px;
  1723. }
  1724. .inputWrap {
  1725. line-height: 72px;
  1726. font-size: 14px;
  1727. color: #777;
  1728. margin-left: 65px;
  1729. input {
  1730. // border: none;
  1731. // width: 80px;
  1732. // margin-right: 10px;
  1733. // outline: none;
  1734. }
  1735. }
  1736. .inputWrap.rightFirst {
  1737. margin-left: 245px;
  1738. }
  1739. .textWrap {
  1740. display: flex;
  1741. flex-direction: row;
  1742. justify-content: flex-start;
  1743. font-size: 14px;
  1744. color: #777;
  1745. align-items: center;
  1746. span {
  1747. color: #f97215;
  1748. }
  1749. }
  1750. .selectWrap {
  1751. font-size: 14px;
  1752. padding-top: 5px;
  1753. margin-left: 100px;
  1754. margin-right: 52px;
  1755. .rowSelect {
  1756. .el-input__inner {
  1757. min-height: 69px;
  1758. }
  1759. }
  1760. }
  1761. .chioseList {
  1762. display: flex;
  1763. flex-direction: row;
  1764. justify-content: flex-start;
  1765. align-items: center;
  1766. font-size: 14px;
  1767. color: #777;
  1768. margin-left: 64px;
  1769. .chioseItem {
  1770. width: 80px;
  1771. height: 30px;
  1772. border-radius: 15px;
  1773. border: 1px solid #979797;
  1774. margin-right: 10px;
  1775. line-height: 30px;
  1776. text-align: center;
  1777. cursor: pointer;
  1778. }
  1779. .chioseItem.active {
  1780. background-color: var(--color-primary);
  1781. border: 1px solid var(--color-primary);
  1782. color: #fff;
  1783. }
  1784. }
  1785. // &:nth-child(even) {
  1786. // background-color: #c6cbd4;
  1787. // input {
  1788. // background-color: #c6cbd4;
  1789. // }
  1790. // }
  1791. }
  1792. }
  1793. .btnWrap {
  1794. margin-top: 30px;
  1795. }
  1796. .el-checkbox__input.is-checked + .el-checkbox__label {
  1797. color: #606266;
  1798. }
  1799. .subTitle {
  1800. // width: 1203px;
  1801. height: 40px;
  1802. line-height: 40px;
  1803. background-color: #fefceb;
  1804. padding: 0 25px;
  1805. box-sizing: border-box;
  1806. font-size: 16px;
  1807. color: #474747;
  1808. margin-bottom: 20px;
  1809. }
  1810. .chioseWrap {
  1811. margin-bottom: 30px;
  1812. display: flex;
  1813. flex-direction: row;
  1814. padding: 0 25px;
  1815. p {
  1816. width: 80px;
  1817. font-size: 14px;
  1818. // margin-right: 30px;
  1819. }
  1820. }
  1821. .classCheckBox {
  1822. margin-right: 10px;
  1823. }
  1824. }
  1825. </style>
  1826. <style scoped lang="scss">
  1827. .banseLeft {
  1828. :deep(.el-form--inline) {
  1829. .el-form-item__content {
  1830. display: block;
  1831. }
  1832. }
  1833. ::v-deep .el-select {
  1834. width: 300px !important;
  1835. }
  1836. ::v-deep .el-date-editor {
  1837. width: 300px !important;
  1838. }
  1839. ::v-deep .el-checkbox {
  1840. margin-left: 15px !important;
  1841. }
  1842. ::v-deep .el-input {
  1843. position: relative;
  1844. font-size: 14px;
  1845. display: inline-block;
  1846. width: 300px;
  1847. }
  1848. }
  1849. input[disabled] {
  1850. background-color: #fff;
  1851. border-color: #b3b3b3;
  1852. color: #606266;
  1853. }
  1854. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1855. background-color: #00a79d;
  1856. border-color: #00a79d;
  1857. // -webkit-box-shadow: -1px 0 0 0 rgb (19, 129, 122);
  1858. box-shadow: -1px 0 0 #00a79d;
  1859. color: #fff;
  1860. outline: none;
  1861. }
  1862. ::v-deep .el-radio-button__inner {
  1863. &:hover {
  1864. color: #00a79d;
  1865. }
  1866. outline: none;
  1867. }
  1868. ::v-deep .el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) {
  1869. -webkit-box-shadow: none;
  1870. box-shadow: none;
  1871. }
  1872. </style>