teamBaseInfo.vue 59 KB

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