teamBaseInfo.vue 31 KB

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