teamBaseInfo.vue 29 KB

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