teamBaseInfo.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  1. <template>
  2. <div class="base-container">
  3. <div class="banseLeft">
  4. <div class="head">乐团基本信息:</div>
  5. <!-- <div class="num">乐团编号:dywh01</div> -->
  6. <el-form
  7. :model="topFrom"
  8. :inline="true"
  9. ref="topinfo"
  10. label-width="120px"
  11. style="margin-left: 11px"
  12. >
  13. <el-form-item
  14. label="所属分部"
  15. prop="section"
  16. :rules="[{ required: true, message: '所属分部不能为空' }]"
  17. >
  18. <el-select
  19. v-model.trim="topFrom.section"
  20. filterable
  21. :disabled="basdisabled"
  22. @change="changeSection"
  23. clearable
  24. >
  25. <el-option
  26. v-for="(item, index) in sectionList"
  27. :key="index"
  28. :label="item.name"
  29. :value="item.id"
  30. ></el-option>
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item
  34. label="收费类型"
  35. prop="type"
  36. :rules="[{ required: true, message: '收费类型不能为空' }]"
  37. >
  38. <el-select
  39. v-model.trim="topFrom.type"
  40. filterable
  41. :disabled="basdisabled"
  42. clearable
  43. >
  44. <el-option
  45. v-for="(item, index) in typeList"
  46. :key="index"
  47. :label="item.name"
  48. :value="item.id"
  49. ></el-option>
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item
  53. label="合作单位"
  54. prop="school"
  55. :rules="[{ required: true, message: '合作单位不能为空' }]"
  56. >
  57. <el-select
  58. v-model.trim="topFrom.school"
  59. :disabled="!topFrom.section || basdisabled"
  60. @change="chioseSchool"
  61. filterable
  62. clearable
  63. >
  64. <el-option
  65. v-for="(item, index) in cooperationList"
  66. :key="index"
  67. :label="item.name"
  68. :value="item.id"
  69. ></el-option>
  70. </el-select>
  71. </el-form-item>
  72. <el-form-item
  73. label="教学地点"
  74. prop="address"
  75. :rules="[{ required: true, message: '教学地点不能为空' }]"
  76. >
  77. <template #label>
  78. <p style="position: relative; display: inline-block">
  79. 教学地点
  80. <el-tooltip placement="top" popper-class="mTooltip">
  81. <div slot="content">
  82. 如果已生成课表,则会修改未上课时的教学点
  83. </div>
  84. <i
  85. class="el-icon-question"
  86. style="font-size: 18px; color: #f56c6c"
  87. ></i>
  88. </el-tooltip>
  89. </p>
  90. </template>
  91. <el-select
  92. v-model.trim="topFrom.address"
  93. filterable
  94. clearable
  95. :disabled="!topFrom.section || basdisabled"
  96. >
  97. <el-option
  98. v-for="(item, index) in addList"
  99. :key="index"
  100. :label="item.name"
  101. :value="item.id"
  102. ></el-option>
  103. </el-select>
  104. </el-form-item>
  105. <el-form-item
  106. label="乐团名称"
  107. prop="name"
  108. :rules="[{ required: true, message: '乐团名称不能为空' }]"
  109. >
  110. <el-input
  111. placeholder="请输入乐团名称"
  112. v-model.trim="topFrom.name"
  113. :disabled="basdisabled"
  114. ></el-input>
  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, index) in orgianList"
  129. :key="index"
  130. :label="item.realName"
  131. :value="item.id"
  132. ></el-option>
  133. </el-select>
  134. </el-form-item>
  135. <el-form-item
  136. label="乐团主管"
  137. prop="teacher"
  138. :rules="[{ required: true, message: '乐团主管不能为空' }]"
  139. >
  140. <el-select
  141. v-model.trim="topFrom.teacher"
  142. :disabled="!topFrom.section || basdisabled"
  143. filterable
  144. clearable
  145. >
  146. <el-option
  147. v-for="(item, index) in orgianList"
  148. :key="index"
  149. :label="item.realName"
  150. :value="item.id"
  151. ></el-option>
  152. </el-select>
  153. </el-form-item>
  154. <el-form-item label="维修技师" prop="repairUserId">
  155. <el-select
  156. v-model.trim="topFrom.repairUserId"
  157. :disabled="!topFrom.section || basdisabled"
  158. filterable
  159. clearable
  160. >
  161. <el-option
  162. v-for="(item, index) in technician"
  163. :key="index"
  164. :label="item.userName"
  165. :value="item.userId"
  166. ></el-option>
  167. </el-select>
  168. </el-form-item>
  169. <!-- <el-form-item
  170. label="预报名截止时间"
  171. prop="time"
  172. :rules="[{ required: true, message: '请输入预报名截止时间' }]"
  173. >
  174. <el-date-picker
  175. v-model.trim="topFrom.time"
  176. :disabled="basdisabled"
  177. type="date"
  178. value-format="yyyy-MM-dd"
  179. :picker-options="beginDate()"
  180. placeholder="选择日期"
  181. ></el-date-picker>
  182. </el-form-item> -->
  183. <el-form-item
  184. label="报名截止时间"
  185. prop="time"
  186. :rules="[{ required: true, message: '请输入报名截止时间' }]"
  187. >
  188. <el-date-picker
  189. v-model.trim="topFrom.time"
  190. :disabled="basdisabled"
  191. type="date"
  192. value-format="yyyy-MM-dd"
  193. :picker-options="beginDate()"
  194. placeholder="选择日期"
  195. ></el-date-picker>
  196. </el-form-item>
  197. <el-form-item
  198. label="预计开团时间"
  199. prop="startTime"
  200. :rules="[{ required: true, message: '请输入预计开团时间' }]"
  201. >
  202. <el-date-picker
  203. v-model.trim="topFrom.startTime"
  204. :disabled="basdisabled"
  205. type="date"
  206. value-format="yyyy-MM-dd"
  207. :picker-options="beginDate()"
  208. placeholder="选择日期"
  209. ></el-date-picker>
  210. </el-form-item>
  211. <el-form-item label="招生年级" v-if="basdisabled">
  212. <el-tooltip
  213. class="item"
  214. effect="dark"
  215. :content="startClassString"
  216. placement="top-start"
  217. >
  218. <div style="width: 180px; overflow: hidden">
  219. {{ startClassString }}
  220. </div>
  221. </el-tooltip>
  222. </el-form-item>
  223. <el-form-item
  224. label="招生年级"
  225. v-else
  226. prop="startClass"
  227. :rules="[{ required: true, message: '请选择招生年纪' }]"
  228. >
  229. <el-select
  230. placeholder="起始年级"
  231. clearable
  232. multiple
  233. collapse-tags
  234. filterable
  235. v-model.trim="topFrom.startClass"
  236. >
  237. <el-option
  238. v-for="item in classStatus"
  239. :value="item.value"
  240. :label="item.label"
  241. :key="item.value"
  242. ></el-option>
  243. </el-select>
  244. </el-form-item>
  245. <el-form-item
  246. label="课酬结算标准"
  247. :rules="[{ required: true, message: '请选择课酬结算标准' }]"
  248. prop="salary"
  249. >
  250. <el-select
  251. v-model.trim="topFrom.salary"
  252. clearable
  253. :disabled="basdisabled"
  254. filterable
  255. >
  256. <el-option label="默认课酬" value="TEACHER_DEFAULT"></el-option>
  257. <el-option label="3.0课酬" value="GRADIENT_SALARY"></el-option>
  258. <!-- <el-option label="课堂课酬" value="CLASSROOM_SALARY"></el-option> -->
  259. </el-select>
  260. </el-form-item>
  261. <el-form-item label="机构类型" prop="ownershipType">
  262. <el-select
  263. v-model.trim="topFrom.ownershipType"
  264. :disabled="basdisabled"
  265. >
  266. <el-option label="自有" value="OWN"></el-option>
  267. <el-option label="三方" value="COOPERATION"></el-option>
  268. <!-- <el-option label="租赁"
  269. value="LEASE"></el-option>-->
  270. </el-select>
  271. </el-form-item>
  272. <!-- v-if="teamStatus == 'resetTeam' || teamStatus == 'teamList'" -->
  273. <el-form-item label="乐队指导" prop="head">
  274. <el-select
  275. v-model.trim="topFrom.head"
  276. filterable
  277. :disabled="basdisabled"
  278. clearable
  279. >
  280. <el-option
  281. v-for="(item, index) in orgianList"
  282. :key="index"
  283. :label="item.realName"
  284. :value="item.id"
  285. ></el-option>
  286. </el-select>
  287. </el-form-item>
  288. <el-form-item label prop="isClass">
  289. <el-checkbox v-model.trim="topFrom.isClass" :disabled="basdisabled"
  290. >课堂课乐团</el-checkbox
  291. >
  292. </el-form-item>
  293. <br />
  294. <el-form-item label="" v-if="teamStatus == 'teamDraft'">
  295. <p style="color: red; padding-left: 50px">
  296. 修改【收费类型】会重置乐团声部与缴费信息
  297. </p>
  298. </el-form-item>
  299. </el-form>
  300. <div class="btnWrap">
  301. <div
  302. class="nextBtn"
  303. v-if="teamStatus == 'resetTeam'"
  304. v-permission="{
  305. child: 'musicGroup/update',
  306. parent: '/resetTeaming/teamBaseInfo',
  307. }"
  308. @click="resetSubmit"
  309. >
  310. 修改
  311. </div>
  312. <!-- 审批或者草稿的下一步 -->
  313. <div class="nextBtn" @click="gotoNext(1)" v-if="showNext">下一步</div>
  314. </div>
  315. </div>
  316. </div>
  317. </template>
  318. <script>
  319. import merge from "webpack-merge";
  320. import {
  321. getSection,
  322. getType,
  323. getCooperation,
  324. getTeacher,
  325. getAddress,
  326. getPayMaster,
  327. getPayStatus,
  328. getTeamBaseInfo,
  329. resetTeamBaseInfo,
  330. getEmployeeOrgan,
  331. } from "@/api/buildTeam";
  332. import { findTechnician } from "@/api/repairManager";
  333. import dayjs from "dayjs";
  334. import {
  335. queryEmployByOrganId,
  336. queryByOrganId,
  337. getSchool,
  338. } from "@/api/systemManage";
  339. import { classStatus } from "@/utils/searchArray";
  340. import store from "@/store";
  341. import numeral from "numeral";
  342. import { formatData } from "@/utils/utils";
  343. import qs from "qs";
  344. import MusicStore from "@/views/resetTeaming/store";
  345. export default {
  346. name: "teamBaseInfo",
  347. props: ["getTeamList"],
  348. data() {
  349. return {
  350. classStatus,
  351. organId: null,
  352. topFrom: {
  353. type: "", // 收费类型
  354. section: "", //所属分部
  355. school: "", // 合作单位
  356. teacher: "", // 乐团主管
  357. name: "", //乐团名称
  358. boss: "", // 运营主管
  359. time: "", // 报名截止时间
  360. startClass: [], // 招生年级起始
  361. address: "", // 教学地点
  362. salary: "", // 收费模式
  363. head: "",
  364. isClass: false, //是否为课堂课
  365. startTime: "",
  366. feeType: null,
  367. paymentPattern: "", // 缴费方式
  368. paymentValid: [], // 缴费有效期
  369. paymentValidStartDate: null, // 缴费有效期开始
  370. paymentValidEndDate: null, // 缴费有效期结束
  371. ownershipType: "OWN", // 合作机构类型
  372. repairUserId: null, // 维修技师
  373. },
  374. checkList: {
  375. soundInfo: {
  376. // 声部
  377. ischeck: false,
  378. value: "",
  379. checkBuy: false,
  380. isNew: 0,
  381. isStatus: false,
  382. },
  383. allInfo: {
  384. // 合奏
  385. ischeck: false,
  386. value: "",
  387. checkBuy: false,
  388. isNew: 0,
  389. isStatus: false,
  390. },
  391. baseInfo: {
  392. // 基础
  393. ischeck: false,
  394. value: "",
  395. checkBuy: false,
  396. isNew: 0,
  397. isStatus: false,
  398. },
  399. holidayInfo: {
  400. // 假期
  401. ischeck: false,
  402. value: "",
  403. checkBuy: false,
  404. isNew: 0,
  405. isStatus: false,
  406. },
  407. networkInfo: {
  408. ischeck: false,
  409. value: "",
  410. checkBuy: false,
  411. isNew: 0,
  412. isStatus: false,
  413. },
  414. submit: {
  415. ischeck: false,
  416. value:
  417. "年度安排个月共xxx课时,课时,原价xxx元,现价xxxx元/月(约 xxxx元/课时 )",
  418. },
  419. }, // 选中的集合
  420. newStudentList: {
  421. baseInfo: {
  422. ischeck: false,
  423. value: "",
  424. checkBuy: true,
  425. nowValue: "",
  426. isNew: 1,
  427. isStatus: false,
  428. },
  429. },
  430. baseInfo: {},
  431. money: 580,
  432. orderInfo: {
  433. marketPrice: 0, // 原价总金额
  434. referencePrice: 0, // 现价总金额
  435. }, // 金额列表,金额计算
  436. sectionList: [], // 分部列表
  437. typeList: [], // 收费类型列表
  438. cooperationList: [], // 教学点列表
  439. teacherList: [], // 获取老师列表
  440. addList: [], // 教学地点列表
  441. payList: {
  442. school: {
  443. ischeck: false,
  444. value: "",
  445. price: "",
  446. chiose: "",
  447. },
  448. company: {
  449. ischeck: false,
  450. value: "",
  451. price: "",
  452. chiose: "",
  453. },
  454. student: {
  455. ischeck: true,
  456. chiose: "loop",
  457. },
  458. chioseMonth: [], // 选中的月份
  459. },
  460. activeTeam: [],
  461. teamid: "",
  462. teamStatus: "",
  463. orgianList: [],
  464. isInit: false,
  465. technician: [],
  466. basdisabled: false,
  467. };
  468. },
  469. created() {},
  470. mounted() {
  471. if (this.$route.query.id) {
  472. this.teamid = this.$route.query.id;
  473. }
  474. if (this.$route.query.type == "newTeam") {
  475. this.onReset();
  476. }
  477. console.log(this.$route.query)
  478. this.init();
  479. // this.$forceUpdate();
  480. },
  481. activated() {
  482. console.log(this.$route.query.type)
  483. // console.log('直接进编辑')
  484. if (this.teamid && this.teamid != this.$route.query.id) {
  485. this.init();
  486. }
  487. if (this.$route.query.clear == 'true') {
  488. this.onReset();
  489. this.$router.push({
  490. query: merge(this.$route.query, { clear: false }),
  491. });
  492. }
  493. if (this.teamStatus == "newTeam") {
  494. this.$store.dispatch("buildIndex", 0);
  495. }
  496. if (this.teamStatus != "newTeam") {
  497. this.$store.dispatch("draftIndex", 0);
  498. }
  499. this.teamStatus = this.$route.query.type;
  500. if (
  501. this.teamStatus == "look" ||
  502. this.teamStatus == "teamAudit" ||
  503. this.teamStatus == "feeAudit"
  504. ) {
  505. this.basdisabled = true;
  506. } else {
  507. this.basdisabled = false;
  508. }
  509. },
  510. methods: {
  511. //|| this.teamStatus === 'teamAudit'
  512. isNotEditing: function () {
  513. return !(
  514. this.teamStatus === "teamDraft" ||
  515. this.teamStatus === "newTeam" ||
  516. this.teamStatus === "teamList"
  517. );
  518. },
  519. changeFeeType(val) {},
  520. changePaymentValidStartDate(val) {
  521. if (val) {
  522. this.$set(this.topFrom, "paymentValidEndDate", "");
  523. }
  524. },
  525. changePaymentPattern(val) {
  526. // if (val === 2) {
  527. // // this.topFrom.paymentValidStartDate = null
  528. // this.$set(this.topFrom, 'paymentValidEndDate', '')
  529. // }
  530. },
  531. beginDate(end) {
  532. return {
  533. firstDayOfWeek: 1,
  534. disabledDate(time) {
  535. if (end) {
  536. return new Date(end).getTime() - 86400000 >= time.getTime();
  537. } else {
  538. return time.getTime() + 86400000 < Date.now();
  539. //开始时间不选时,结束时间最大值小于等于当天
  540. }
  541. },
  542. };
  543. },
  544. init() {
  545. this.isInit = true;
  546. // 分为3种 this.teamStatus
  547. // 1.resetTeam 乐团修改
  548. // 2. newTeam 新建乐团
  549. // 3.teamList 跨团修改
  550. // 4.teamDraft 乐团草稿
  551. this.teamStatus = this.$route.query.type;
  552. if (this.teamStatus == "newTeam") {
  553. this.$store.dispatch("buildIndex", 0);
  554. }
  555. if (this.teamStatus != "newTeam") {
  556. this.$store.dispatch("draftIndex", 0);
  557. }
  558. // 传过来的乐团信息
  559. this.activeTeam = this.getTeamList;
  560. if (
  561. this.teamStatus == "look" ||
  562. this.teamStatus == "teamAudit" ||
  563. this.teamStatus == "feeAudit"
  564. ) {
  565. this.basdisabled = true;
  566. } else {
  567. this.basdisabled = false;
  568. }
  569. if (this.$route.query.id) {
  570. // 单团修改
  571. this.teamid = this.$route.query.id;
  572. getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
  573. if (res.code == 200) {
  574. // if (this.$listeners.getBaseInfo) {
  575. // this.$listeners.getBaseInfo(res.data);
  576. // }
  577. // 头部
  578. this.topFrom.name = res.data.musicGroup.name;
  579. this.$emit("getName", this.topFrom.name);
  580. this.topFrom.time = res.data.musicGroup.applyExpireDate;
  581. this.topFrom.type = res.data.musicGroup.chargeTypeId;
  582. this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(
  583. ","
  584. );
  585. this.topFrom.paymentPattern = res.data.musicGroup.paymentPattern;
  586. this.topFrom.paymentValidStartDate =
  587. res.data.musicGroup.paymentValidStartDate;
  588. this.topFrom.paymentValidEndDate =
  589. res.data.musicGroup.paymentValidEndDate;
  590. this.topFrom.section = res.data.musicGroup.organId;
  591. this.topFrom.school = res.data.musicGroup.cooperationOrganId;
  592. this.topFrom.teacher = res.data.musicGroup.educationalTeacherId;
  593. this.topFrom.boss = res.data.musicGroup.teamTeacherId;
  594. this.topFrom.address = res.data.musicGroup.schoolId;
  595. this.topFrom.salary = res.data.musicGroup.settlementType;
  596. this.topFrom.head = res.data.musicGroup.directorUserId
  597. ? res.data.musicGroup.directorUserId
  598. : null;
  599. this.topFrom.isClass = res.data.musicGroup.isClassroomLessons;
  600. this.topFrom.startTime = res.data.musicGroup.expectStartGroupDate;
  601. this.topFrom.ownershipType = res.data.musicGroup.ownershipType;
  602. this.topFrom.repairUserId = res.data.musicGroup.repairUserId
  603. ? res.data.musicGroup.repairUserId
  604. : null;
  605. this.topFrom.feeType = res.data.musicGroup.feeType
  606. ? res.data.musicGroup.feeType
  607. : null;
  608. // // 循环缴费月
  609. // this.payList.chioseMonth = res.data.months;
  610. if (res.data.musicGroup.organId) {
  611. // 获取员工
  612. queryEmployByOrganId({
  613. organId: res.data.musicGroup.organId,
  614. rows: 1000,
  615. }).then((res) => {
  616. if (res.code == 200) {
  617. this.orgianList = res.data.rows;
  618. }
  619. });
  620. // 获取合作单位
  621. queryByOrganId({ organId: res.data.musicGroup.organId }).then(
  622. (res) => {
  623. if (res.code == 200) {
  624. this.cooperationList = res.data;
  625. }
  626. }
  627. );
  628. // 获取教学点
  629. getSchool({ organId: res.data.musicGroup.organId }).then(
  630. (res) => {
  631. if (res.code == 200) {
  632. this.addList = res.data;
  633. this.isInit = false;
  634. }
  635. }
  636. );
  637. // 获取维修技师
  638. findTechnician().then((res) => {
  639. if (res.code == 200) {
  640. this.technician = res.data;
  641. }
  642. });
  643. }
  644. this.$emit("getBaseInfo", res.data);
  645. }
  646. });
  647. } else {
  648. }
  649. getEmployeeOrgan().then((res) => {
  650. if (res.code == 200) {
  651. this.sectionList = res.data;
  652. }
  653. });
  654. // 2.获取收费类型选项卡
  655. getType({ rows: 1000 }).then((res) => {
  656. if (res.code == 200) {
  657. this.typeList = res.data.rows;
  658. }
  659. });
  660. // 缓存设置时的状态
  661. },
  662. changeSection(val) {
  663. // 修改分部的时候 重置运营主管 重置乐团主管 重置乐队指导 合作单位 教学点
  664. this.topFrom.teacher = "";
  665. this.topFrom.boss = "";
  666. this.topFrom.head = "";
  667. this.topFrom.school = "";
  668. this.topFrom.address = "";
  669. // 发请求 根据分部id 查询所有员工
  670. queryEmployByOrganId({ organId: val, rows: 1000 }).then((res) => {
  671. if (res.code == 200) {
  672. this.orgianList = res.data.rows;
  673. }
  674. });
  675. // 合作单位
  676. queryByOrganId({ organId: val }).then((res) => {
  677. if (res.code == 200) {
  678. this.cooperationList = res.data;
  679. }
  680. });
  681. // 教学点=>学校
  682. getSchool({ organId: val }).then((res) => {
  683. if (res.code == 200) {
  684. this.addList = res.data;
  685. }
  686. });
  687. // 获取维修技师
  688. findTechnician().then((res) => {
  689. if (res.code == 200) {
  690. this.technician = res.data;
  691. }
  692. });
  693. },
  694. chioseSchool(val) {},
  695. gotoNext(num) {
  696. this.$refs["topinfo"].validate((valid, object) => {
  697. if (!valid) {
  698. this.$message.error("请填写建团必要参数");
  699. } else {
  700. // 判断一下是否勾选了课程类型而没有输入金额
  701. // 验证通过
  702. this.$store.dispatch("topinfo", this.topFrom);
  703. if (this.teamStatus == "teamDraft") {
  704. // 获取数据提交
  705. this.resetSubmit();
  706. } else {
  707. // this.resetSubmit();
  708. this.$emit("chiosetab", num);
  709. }
  710. }
  711. });
  712. },
  713. resetSubmit() {
  714. this.$refs["topinfo"].validate((valid, object) => {
  715. if (!valid) {
  716. this.$message.error("请填写必要参数");
  717. } else {
  718. let status = null;
  719. // 1.resetTeam 乐团修改
  720. // 2.newTeam 新建乐团
  721. // 3.teamList 跨团修改
  722. // 4.teamDraft 乐团草稿
  723. switch (this.teamStatus) {
  724. case "resetTeam": {
  725. status = "PROGRESS";
  726. break;
  727. }
  728. case "newTeam": {
  729. status = null;
  730. break;
  731. }
  732. case "teamList": {
  733. status = null;
  734. break;
  735. }
  736. case "teamDraft": {
  737. status = "DRAFT";
  738. break;
  739. }
  740. }
  741. let obj = {};
  742. // topFrom.ownershipType
  743. // 修改 合并对象
  744. obj.musicGroup = {
  745. settlementType: this.topFrom.salary,
  746. applyExpireDate: dayjs(this.topFrom.time).format(
  747. "YYYY-MM-DD HH:mm:ss"
  748. ),
  749. chargeTypeId: this.topFrom.type,
  750. cooperationOrganId: this.topFrom.school,
  751. teamTeacherId: this.topFrom.boss,
  752. educationalTeacherId: this.topFrom.teacher,
  753. enrollClasses: this.topFrom.startClass.join(","),
  754. name: this.topFrom.name,
  755. paymentPattern: this.topFrom.paymentPattern,
  756. paymentValidStartDate: this.topFrom.paymentValidStartDate
  757. ? dayjs(this.topFrom.paymentValidStartDate).format("YYYY-MM-DD")
  758. : this.topFrom.paymentValidStartDate,
  759. paymentValidEndDate: this.topFrom.paymentValidEndDate
  760. ? dayjs(this.topFrom.paymentValidEndDate).format("YYYY-MM-DD")
  761. : this.topFrom.paymentValidEndDate,
  762. organId: this.topFrom.section,
  763. // paymentMonths:obj.months 有待确认
  764. schoolId: this.topFrom.address,
  765. id: this.teamid,
  766. directorUserId: this.topFrom.head,
  767. isClassroomLessons: this.topFrom.isClass,
  768. status,
  769. expectStartGroupDate: this.topFrom.startTime,
  770. ownershipType: this.topFrom.ownershipType,
  771. repairUserId: this.topFrom.repairUserId || null,
  772. feeType: this.topFrom.feeType,
  773. };
  774. obj.musicGroupPaymentEntities = [];
  775. // 发请求
  776. resetTeamBaseInfo(obj).then((res) => {
  777. if (res.code == 200) {
  778. if (this.teamStatus == "teamDraft") {
  779. this.$message.success("保存成功");
  780. // 跳到第二页
  781. this.$emit("chiosetab", 1);
  782. } else {
  783. this.$message.success("修改乐团成功");
  784. // this.$router.push({ path: '/business/teamDetails', query: { id: this.teamid, name: this.topFrom.name } })
  785. }
  786. this.init();
  787. }
  788. });
  789. }
  790. });
  791. },
  792. changeApplyTime(val) {
  793. this.$set(this.topFrom, "paymentValidStartDate", "");
  794. this.$set(this.topFrom, "paymentValidEndDate", "");
  795. // this.topFrom.paymentValidStartDate = ''
  796. // this.topFrom.paymentValidEndDate = ''
  797. },
  798. onReset() {
  799. this.topFrom = {
  800. type: "", // 收费类型
  801. section: "", //所属分部
  802. school: "", // 合作单位
  803. courseViewType: "",
  804. teacher: "", // 乐团主管
  805. name: "", //乐团名称
  806. boss: "", // 运营主管
  807. time: "", // 报名截止时间
  808. startClass: [], // 招生年级起始
  809. paymentValid: [], // 缴费有效期时间起始
  810. address: "", // 教学地点
  811. salary: "", // 收费模式
  812. head: "",
  813. paymentPattern: "", // 缴费方式
  814. isClass: false, //是否为课堂课
  815. startTime: "",
  816. ownershipType: "OWN", // 合作机构类型
  817. feeType: null,
  818. };
  819. this.$refs["topinfo"].resetFields();
  820. },
  821. },
  822. computed: {
  823. startClassString() {
  824. return this.topFrom.startClass
  825. .map((item) => {
  826. for (let i in this.classStatus) {
  827. if (item == this.classStatus[i].value) {
  828. return this.classStatus[i].label;
  829. }
  830. }
  831. // return this.classStatus[item]
  832. })
  833. .join(",");
  834. },
  835. showNext() {
  836. const teamStatus = this.teamStatus;
  837. return (
  838. teamStatus == "newTeam" ||
  839. teamStatus == "teamDraft" ||
  840. teamStatus == "teamAudit" ||
  841. teamStatus == "feeAudit"
  842. );
  843. },
  844. },
  845. };
  846. </script>
  847. <style lang="scss" >
  848. .base-container {
  849. overflow: auto;
  850. // display: flex;
  851. // flex-direction: row;
  852. // justify-content: flex-start;
  853. // flex-wrap: nowrap;
  854. font-size: 14px;
  855. color: #444;
  856. // width: fill-available;
  857. .banseLeft {
  858. // width: 1050px;
  859. .head {
  860. height: 48px;
  861. line-height: 48px;
  862. background-color: #edeef0;
  863. font-size: 14px;
  864. font-weight: bold;
  865. color: #444;
  866. padding: 0 11px;
  867. margin-bottom: 20px;
  868. }
  869. .noMargin.head {
  870. margin-bottom: 0;
  871. }
  872. .num {
  873. padding: 15px 11px;
  874. }
  875. .checkRow {
  876. min-width: 1200px;
  877. padding-left: 28px;
  878. display: flex;
  879. flex-direction: row;
  880. justify-content: flex-start;
  881. flex-wrap: nowrap;
  882. overflow: auto;
  883. .el-checkbox {
  884. line-height: 72px;
  885. width: 120px;
  886. }
  887. .inputWrap {
  888. line-height: 72px;
  889. font-size: 14px;
  890. color: #777;
  891. margin-left: 65px;
  892. input {
  893. // border: none;
  894. // width: 80px;
  895. // margin-right: 10px;
  896. // outline: none;
  897. }
  898. }
  899. .inputWrap.rightFirst {
  900. margin-left: 245px;
  901. }
  902. .textWrap {
  903. display: flex;
  904. flex-direction: row;
  905. justify-content: flex-start;
  906. font-size: 14px;
  907. color: #777;
  908. align-items: center;
  909. span {
  910. color: #f97215;
  911. }
  912. }
  913. .selectWrap {
  914. font-size: 14px;
  915. padding-top: 5px;
  916. margin-left: 100px;
  917. margin-right: 52px;
  918. .rowSelect {
  919. .el-input__inner {
  920. min-height: 69px;
  921. }
  922. }
  923. }
  924. .chioseList {
  925. display: flex;
  926. flex-direction: row;
  927. justify-content: flex-start;
  928. align-items: center;
  929. font-size: 14px;
  930. color: #777;
  931. margin-left: 64px;
  932. .chioseItem {
  933. width: 80px;
  934. height: 30px;
  935. border-radius: 15px;
  936. border: 1px solid #979797;
  937. margin-right: 10px;
  938. line-height: 30px;
  939. text-align: center;
  940. cursor: pointer;
  941. }
  942. .chioseItem.active {
  943. background-color: #14928a;
  944. border: 1px solid #14928a;
  945. color: #fff;
  946. }
  947. }
  948. // &:nth-child(even) {
  949. // background-color: #c6cbd4;
  950. // input {
  951. // background-color: #c6cbd4;
  952. // }
  953. // }
  954. }
  955. }
  956. .btnWrap {
  957. margin-top: 30px;
  958. }
  959. .el-checkbox__input.is-checked + .el-checkbox__label {
  960. color: #606266;
  961. }
  962. .subTitle {
  963. // width: 1203px;
  964. height: 40px;
  965. line-height: 40px;
  966. background-color: #fefceb;
  967. padding: 0 25px;
  968. box-sizing: border-box;
  969. font-size: 16px;
  970. color: #474747;
  971. margin-bottom: 20px;
  972. }
  973. .chioseWrap {
  974. margin-bottom: 30px;
  975. display: flex;
  976. flex-direction: row;
  977. padding: 0 25px;
  978. p {
  979. width: 80px;
  980. font-size: 14px;
  981. // margin-right: 30px;
  982. }
  983. }
  984. .classCheckBox {
  985. margin-right: 10px;
  986. }
  987. }
  988. </style>
  989. <style lang="scss" scoped>
  990. /deep/.el-date-editor {
  991. width: 180px !important;
  992. }
  993. /deep/.el-checkbox {
  994. margin-left: 15px !important;
  995. }
  996. /deep/.el-input {
  997. position: relative;
  998. font-size: 14px;
  999. display: inline-block;
  1000. width: 180px;
  1001. }
  1002. input[disabled] {
  1003. background-color: #fff;
  1004. border-color: #b3b3b3;
  1005. color: #606266;
  1006. }
  1007. /deep/.el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1008. background-color: rgb(19, 129, 122);
  1009. border-color: rgb(19, 129, 122);
  1010. // -webkit-box-shadow: -1px 0 0 0 rgb (19, 129, 122);
  1011. box-shadow: -1px 0 0 rgb(19, 129, 122);
  1012. color: #fff;
  1013. outline: none;
  1014. }
  1015. /deep/.el-radio-button__inner {
  1016. &:hover {
  1017. color: rgb(19, 129, 122);
  1018. }
  1019. outline: none;
  1020. }
  1021. /deep/.el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) {
  1022. -webkit-box-shadow: none;
  1023. box-shadow: none;
  1024. }
  1025. </style>