teamBaseInfo.vue 30 KB

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