teamBaseInfo.vue 37 KB

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