teamBaseInfo.vue 29 KB

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