salarySet.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. <template>
  2. <div class="salarySet">
  3. <!-- <h4>单次课次参考时长:30min</h4> -->
  4. <div class="tableList">
  5. <div class="left">
  6. <el-table :data="teamTable"
  7. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  8. <el-table-column label="乐团课课酬课时结算">
  9. <template slot-scope="scope">{{ scope.row.courseScheduleType | coursesType }}</template>
  10. </el-table-column>
  11. <!-- <el-table-column label="自定义课酬-主教">
  12. <template slot-scope="scope">
  13. <el-input type="number"
  14. @mousewheel.native.prevent
  15. v-model.trim="scope.row.mainTeacher30MinSalary"
  16. placeholder="请输入课酬">
  17. <template slot="append"
  18. v-if="scope.row.courseScheduleType == 'HIGH'">元/人</template>
  19. <template slot="append"
  20. v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
  21. <template slot="append"
  22. v-else>元/30分钟</template>
  23. </el-input>
  24. </template>
  25. </el-table-column>
  26. <el-table-column label="自定义课酬-助教">
  27. <template slot-scope="scope">
  28. <el-input type="number"
  29. @mousewheel.native.prevent
  30. v-model.trim="scope.row.assistantTeacher30MinSalary"
  31. placeholder="请输入课酬">
  32. <template slot="append"
  33. v-if="scope.row.courseScheduleType == 'HIGH'">元/人</template>
  34. <template slot="append"
  35. v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
  36. <template slot="append"
  37. v-else>元/30分钟</template>
  38. </el-input>
  39. </template>
  40. </el-table-column> -->
  41. <el-table-column label="标准课酬-主教">
  42. <template slot-scope="scope">
  43. <el-input type="number"
  44. @mousewheel.native.prevent
  45. v-model.trim="scope.row.mainTeacher90MinSalary"
  46. placeholder="请输入课酬">
  47. <template slot="append"
  48. v-if="scope.row.courseScheduleType == 'HIGH'">元/人</template>
  49. <template slot="append"
  50. v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
  51. <template slot="append"
  52. v-else>元/90分钟</template>
  53. <!-- <template slot="append">元/{{ (scope.row.courseScheduleType == 'HIGH' || scope.row.courseScheduleType == 'CLASSROOM') ? 45 : 90 }}分钟</template> -->
  54. </el-input>
  55. </template>
  56. </el-table-column>
  57. <el-table-column label="标准课酬-助教">
  58. <template slot-scope="scope">
  59. <el-input type="number"
  60. @mousewheel.native.prevent
  61. v-model.trim="scope.row.assistantTeacher90MinSalary"
  62. placeholder="请输入课酬">
  63. <template slot="append"
  64. v-if="scope.row.courseScheduleType == 'HIGH'">元/人</template>
  65. <template slot="append"
  66. v-else-if="scope.row.courseScheduleType == 'CLASSROOM'">元/40分钟</template>
  67. <template slot="append"
  68. v-else>元/90分钟</template>
  69. <!-- <template slot="append">元/{{ (scope.row.courseScheduleType == 'HIGH' || scope.row.courseScheduleType == 'CLASSROOM') ? 45 : 90 }}分钟</template> -->
  70. </el-input>
  71. </template>
  72. </el-table-column>
  73. </el-table>
  74. <el-table :data="teamSmallTable"
  75. style=" margin-top: 15px;"
  76. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  77. <el-table-column label="">
  78. <template slot-scope="scope">{{ scope.row.courseScheduleType | coursesType }}</template>
  79. </el-table-column>
  80. <el-table-column label="1V1">
  81. <template slot-scope="scope">
  82. <el-input type="number"
  83. @mousewheel.native.prevent
  84. v-model.trim="scope.row.v1"
  85. placeholder="请输入课酬">
  86. <template slot="append">元/节</template>
  87. </el-input>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="1V2">
  91. <template slot-scope="scope">
  92. <el-input type="number"
  93. @mousewheel.native.prevent
  94. v-model.trim="scope.row.v2"
  95. placeholder="请输入课酬">
  96. <template slot="append">元/节</template>
  97. </el-input>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="1V3">
  101. <template slot-scope="scope">
  102. <el-input type="number"
  103. @mousewheel.native.prevent
  104. v-model.trim="scope.row.v3"
  105. placeholder="请输入课酬">
  106. <template slot="append">元/节</template>
  107. </el-input>
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="1V4">
  111. <template slot-scope="scope">
  112. <el-input type="number"
  113. @mousewheel.native.prevent
  114. v-model.trim="scope.row.v4"
  115. placeholder="请输入课酬">
  116. <template slot="append">元/节</template>
  117. </el-input>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="1V5">
  121. <template slot-scope="scope">
  122. <el-input type="number"
  123. @mousewheel.native.prevent
  124. v-model.trim="scope.row.v5"
  125. placeholder="请输入课酬">
  126. <template slot="append">元/节</template>
  127. </el-input>
  128. </template>
  129. </el-table-column>
  130. </el-table>
  131. <el-table :data="vipTable"
  132. style="width: 70%; margin-top: 15px;"
  133. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  134. <el-table-column label="VIP课课酬参考值"
  135. prop="vipGroupCategoryName"></el-table-column>
  136. <!-- <el-table-column label="线上课">
  137. <template slot-scope="scope">
  138. <el-input
  139. type="number"
  140. @mousewheel.native.prevent
  141. v-model.trim="scope.row.onlineClassesSalary"
  142. placeholder="请输入内容"
  143. >
  144. <template slot="append">元/45分钟</template>
  145. </el-input>
  146. </template>
  147. </el-table-column> -->
  148. <el-table-column label="">
  149. <template slot-scope="scope">
  150. <div>
  151. <el-input type="number"
  152. @mousewheel.native.prevent
  153. v-model.trim="scope.row.offlineClassesSalary"
  154. placeholder="请输入内容">
  155. <template slot="append"> 元/节</template>
  156. <!-- <template slot="append" v-else>节/人</template> v-if="scope.row.musicTheory" -->
  157. </el-input>
  158. </div>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. <el-table :data="accompanyTable"
  163. style="width: 35%; margin-top: 15px;"
  164. :header-cell-style="{background:'#EDEEF0',color:'#444'}">
  165. <el-table-column label="网管课">
  166. <template slot-scope="scope">
  167. <el-input type="number"
  168. style="width:195px"
  169. @mousewheel.native.prevent
  170. v-model.trim="scope.row.mainTeacherSalary">
  171. <template slot="append">元/{{scope.row.minutes}}分钟</template>
  172. </el-input>
  173. </template>
  174. </el-table-column>
  175. </el-table>
  176. <el-form style="margin-top: 20px;" ref="salaryForm" :model="updateForm" :rules="rules">
  177. <el-form-item label="是否结算课酬" label-width="120px" prop="isSettlementSalary" :rules="[{ required: true, message: '请选择是否结算课酬', trigger: 'change'}]">
  178. <el-select v-model.trim="updateForm.isSettlementSalary" style="width: 220px !important;">
  179. <el-option label="是" :value="1"></el-option>
  180. <el-option label="否" :value="0"></el-option>
  181. </el-select>
  182. <div style="display: inline; color: red; padding-left: 10px;">说明:老师是否结算课酬;</div>
  183. </el-form-item>
  184. <el-form-item label="生效日期" label-width="120px" prop="startDate" :rules="[{ required: true, message: '请选择生效日期', trigger: 'change'}]">
  185. <el-date-picker v-model.trim="updateForm.startDate"
  186. type="date"
  187. value-format="yyyy-MM-dd"
  188. :picker-options="pickerOptions"
  189. placeholder="选择日期"></el-date-picker>
  190. <div style="display: inline; color: red; padding-left: 10px;">说明:本次调整只对生效日期之后(包含当天)且未结算的课程生效;</div>
  191. </el-form-item>
  192. </el-form>
  193. <!-- v-permission="pageType == 'create' ? {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherAdd/batchUpset'} : {child: 'teacherDefaultMusicGroupSalary/batchUpset', parent: 'teacherUpdate/batchUpset'}" -->
  194. <div style="padding-top: 10px;">
  195. <auth :auths="pageType == 'create' ? ['/teacherOperationAdd', 'teacherDefaultCreateSave'] : ['/teacherOperationUpdate', 'teacherDefaultUpdateSave']" mulit>
  196. <el-button @click="onSave()" type="primary">保存</el-button>
  197. </auth>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </template>
  203. <script>
  204. import {
  205. vipGroupSalaryList,
  206. vipGroupSalarySet,
  207. teacherSalaryList,
  208. teacherSalaryBatchUpset,
  209. teacherDefaultPracticeGroupSalary,
  210. PracticeGroupSalaryUpdate,
  211. teacherGet,
  212. teacherUpdate1
  213. } from "@/api/teacherManager";
  214. import { sysConfigList } from "@/api/generalSettings";
  215. import { findTeacherDefaultSalary } from "@/api/vipSeting";
  216. let nowTime = new Date();
  217. let checkTime =
  218. nowTime.getFullYear() +
  219. "-" +
  220. (nowTime.getMonth() + 1) +
  221. "-" +
  222. nowTime.getDate();
  223. export default {
  224. props: ["teacherId"],
  225. name: "salarySet",
  226. data () {
  227. return {
  228. pageType: this.$route.query.type, // 页面类型
  229. // teacherId: this.teacherId ? this.teacherId : this.$route.query.teacherId,
  230. teamTable: [
  231. {
  232. assistantTeacher30MinSalary: 0,
  233. assistantTeacher90MinSalary: 0,
  234. courseScheduleType: "SINGLE",
  235. mainTeacher30MinSalary: 0,
  236. mainTeacher90MinSalary: 0,
  237. userId: this.teacherId
  238. },
  239. {
  240. assistantTeacher30MinSalary: 0,
  241. assistantTeacher90MinSalary: 0,
  242. courseScheduleType: "MIX",
  243. mainTeacher30MinSalary: 0,
  244. mainTeacher90MinSalary: 0,
  245. userId: this.teacherId
  246. },
  247. {
  248. assistantTeacher30MinSalary: 0,
  249. assistantTeacher90MinSalary: 0,
  250. courseScheduleType: "COMPREHENSIVE",
  251. mainTeacher30MinSalary: 0,
  252. mainTeacher90MinSalary: 0,
  253. userId: this.teacherId
  254. },
  255. {
  256. assistantTeacher30MinSalary: 0,
  257. assistantTeacher90MinSalary: 0,
  258. courseScheduleType: "TRAINING_SINGLE",
  259. mainTeacher30MinSalary: 0,
  260. mainTeacher90MinSalary: 0,
  261. userId: this.teacherId
  262. },
  263. {
  264. assistantTeacher30MinSalary: 0,
  265. assistantTeacher90MinSalary: 0,
  266. courseScheduleType: "TRAINING_MIX",
  267. mainTeacher30MinSalary: 0,
  268. mainTeacher90MinSalary: 0,
  269. userId: this.teacherId
  270. },
  271. {
  272. assistantTeacher30MinSalary: 0,
  273. assistantTeacher90MinSalary: 0,
  274. courseScheduleType: "HIGH",
  275. mainTeacher30MinSalary: 0,
  276. mainTeacher90MinSalary: 0,
  277. userId: this.teacherId
  278. },
  279. {
  280. assistantTeacher30MinSalary: 0,
  281. assistantTeacher90MinSalary: 0,
  282. courseScheduleType: "CLASSROOM",
  283. mainTeacher30MinSalary: 0,
  284. mainTeacher90MinSalary: 0,
  285. userId: this.teacherId
  286. }
  287. ],
  288. // salaryRuleJson: { 3: 0, 4: 0, 5: 0 },
  289. // userId: this.teacherId
  290. teamSmallTable: [
  291. {
  292. courseScheduleType: "HIGH_ONLINE",
  293. // salaryRuleJson: { 3: 0, 4: 0, 5: 0 },
  294. v1: 0,
  295. v2: 0,
  296. v3: 0,
  297. v4: 0,
  298. v5: 0,
  299. assistantTeacher30MinSalary: 0,
  300. assistantTeacher90MinSalary: 0,
  301. mainTeacher30MinSalary: 0,
  302. mainTeacher90MinSalary: 0,
  303. userId: this.teacherId
  304. },
  305. {
  306. courseScheduleType: "MUSIC_NETWORK",
  307. // salaryRuleJson: { 3: 0, 4: 0, 5: 0 },
  308. v1: 0,
  309. v2: 0,
  310. v3: 0,
  311. v4: 0,
  312. v5: 0,
  313. assistantTeacher30MinSalary: 0,
  314. assistantTeacher90MinSalary: 0,
  315. mainTeacher30MinSalary: 0,
  316. mainTeacher90MinSalary: 0,
  317. userId: this.teacherId
  318. }
  319. ],
  320. vipTable: [],
  321. musicGroupTable: [],
  322. ruleList: [],
  323. vipList: [],
  324. updateForm: {
  325. startDate: null,
  326. isSettlementSalary: 1,
  327. },
  328. rules: {},
  329. accompanyTable: [
  330. {
  331. assistantTeacherSalary: 30,
  332. minutes: 25,
  333. userId: this.teacherId,
  334. mainTeacherSalary: 0
  335. }
  336. ],
  337. pickerOptions: {
  338. disabledDate (time) {
  339. return time.getTime() > Date.now();
  340. },
  341. firstDayOfWeek: 1
  342. }
  343. };
  344. },
  345. created () { },
  346. mounted () {
  347. // this.pageType = this.$route.query.type;
  348. this.__init();
  349. },
  350. // activated () {
  351. // this.pageType = this.$route.query.type;
  352. // this.__init();
  353. // },
  354. methods: {
  355. __init () {
  356. if (this.$route.query.search) {
  357. this.Fsearch = this.$route.query.search;
  358. }
  359. if (this.$route.query.rules) {
  360. this.Frules = this.$route.query.rules;
  361. }
  362. teacherGet({ teacherId: this.teacherId }).then((res) => {
  363. if (res.code == 200) {
  364. let result = res.data;
  365. this.updateForm.isSettlementSalary = result.isSettlementSalary ? 1 : 0
  366. }
  367. });
  368. // 获取课程形态 设置vip课酬
  369. findTeacherDefaultSalary({ userId: this.teacherId }).then(res => {
  370. if (res.code == 200 && res.data.length > 0) {
  371. let vipData = [];
  372. res.data.forEach(item => {
  373. vipData.push({
  374. offlineClassesSalary: null,
  375. onlineClassesSalary: null,
  376. vipGroupCategoryId: item.id,
  377. vipGroupCategoryName: item.name,
  378. userId: this.teacherId,
  379. musicTheory:item.musicTheory
  380. });
  381. });
  382. // VIP课列表
  383. vipGroupSalaryList({
  384. rows: 9999,
  385. page: 1,
  386. search: this.teacherId
  387. }).then(res => {
  388. if (res.code == 200) {
  389. let rows = res.data.rows;
  390. this.vipListCompare(vipData, rows);
  391. }
  392. });
  393. }
  394. });
  395. // 乐团
  396. teacherSalaryList({
  397. rows: 9999,
  398. page: 1,
  399. teacherId: this.teacherId
  400. // settlementType: 'FIXED_SALARY'
  401. }).then(res => {
  402. if (res.code == 200) {
  403. // this.teamTable = res.data.rows
  404. let rows = res.data.rows;
  405. this.teacherSalaryMoney(rows);
  406. }
  407. });
  408. // 网管课
  409. teacherDefaultPracticeGroupSalary({ teacherId: this.teacherId }).then(
  410. res => {
  411. if (res.code == 200 && res.data.length > 0) {
  412. this.accompanyTable = res.data;
  413. }
  414. }
  415. );
  416. },
  417. vipListCompare (vipData, rows) {
  418. // vip 做对比
  419. if (!rows) {
  420. // 判断是否有数据
  421. this.vipTable = vipData;
  422. return;
  423. }
  424. let result = [];
  425. vipData.forEach(item => {
  426. rows.forEach(c => {
  427. if (item.vipGroupCategoryId == c.vipGroupCategoryId) {
  428. item.checked = true;
  429. result.push({
  430. vipGroupCategoryId: c.vipGroupCategoryId,
  431. offlineClassesSalary: c.offlineClassesSalary,
  432. onlineClassesSalary: c.onlineClassesSalary,
  433. vipGroupCategoryName: c.vipGroupCategoryName,
  434. userId: c.userId,
  435. musicTheory:c.musicTheory
  436. });
  437. }
  438. });
  439. });
  440. if (result.length > 0) {
  441. vipData.forEach(item => {
  442. if (!item.checked) {
  443. result.push(item);
  444. }
  445. });
  446. } else {
  447. result = vipData;
  448. }
  449. this.vipTable = result;
  450. },
  451. teacherSalaryMoney (rows) {
  452. // 判断是否有数据
  453. if (!rows || rows.length <= 0) return;
  454. let teamTable = this.teamTable;
  455. let result = [];
  456. teamTable.forEach(item => {
  457. rows.forEach(c => {
  458. if (item.courseScheduleType == c.courseScheduleType) {
  459. item.checked = true;
  460. result.push({
  461. mainTeacher30MinSalary: c.mainTeacher30MinSalary,
  462. mainTeacher90MinSalary: c.mainTeacher90MinSalary,
  463. assistantTeacher30MinSalary: c.assistantTeacher30MinSalary,
  464. assistantTeacher90MinSalary: c.assistantTeacher90MinSalary,
  465. courseScheduleType: c.courseScheduleType,
  466. userId: this.teacherId
  467. });
  468. }
  469. });
  470. });
  471. if (result.length > 0) {
  472. teamTable.forEach(item => {
  473. if (!item.checked) {
  474. result.push(item);
  475. }
  476. });
  477. } else {
  478. result = teamTable;
  479. }
  480. this.teamTable = result;
  481. let smallResult = []
  482. let teamSmallTable = this.teamSmallTable
  483. teamSmallTable.forEach(item => {
  484. rows.forEach(c => {
  485. if (item.courseScheduleType == c.courseScheduleType) {
  486. item.checked = true;
  487. let tempJson = c.salaryRuleJson ? JSON.parse(c.salaryRuleJson) : { 1: 0, 2: 0, 3: 0, 4: 0, 5: 0 }
  488. // console.log(tempJson)
  489. smallResult.push({
  490. mainTeacher30MinSalary: c.mainTeacher30MinSalary,
  491. mainTeacher90MinSalary: c.mainTeacher90MinSalary,
  492. assistantTeacher30MinSalary: c.assistantTeacher30MinSalary,
  493. assistantTeacher90MinSalary: c.assistantTeacher90MinSalary,
  494. salaryRuleJson: tempJson,
  495. v1: tempJson[1] ? tempJson[1] : 0,
  496. v2: tempJson[2] ? tempJson[2] : 0,
  497. v3: tempJson[3] ? tempJson[3] : 0,
  498. v4: tempJson[4] ? tempJson[4] : 0,
  499. v5: tempJson[5] ? tempJson[5] : 0,
  500. courseScheduleType: c.courseScheduleType,
  501. userId: this.teacherId
  502. });
  503. }
  504. });
  505. })
  506. if (smallResult.length > 0) {
  507. teamSmallTable.forEach(item => {
  508. if (!item.checked) {
  509. smallResult.push(item);
  510. }
  511. });
  512. } else {
  513. smallResult = teamSmallTable;
  514. }
  515. this.teamSmallTable = smallResult;
  516. },
  517. onSave () {
  518. let teamTable = this.teamTable;
  519. let checkStatus = true;
  520. teamTable.forEach(item => {
  521. if (
  522. item.assistantTeacher30MinSalary < 0 ||
  523. item.assistantTeacher90MinSalary < 0 ||
  524. item.mainTeacher30MinSalary < 0 ||
  525. item.mainTeacher90MinSalary < 0
  526. ) {
  527. this.$message.error("输入课酬不能为负数");
  528. checkStatus = false;
  529. return;
  530. }
  531. });
  532. let temps = []
  533. this.teamSmallTable.forEach(item => {
  534. if (item.v1 < 0 || item.v2 < 0 || item.v3 < 0 || item.v4 < 0 || item.v5 < 0) {
  535. this.$message.error("输入课酬不能为负数");
  536. checkStatus = false;
  537. return;
  538. }
  539. temps.push({
  540. courseScheduleType: item.courseScheduleType,
  541. salaryRuleJson: JSON.stringify({ 1: Number(item.v1), 2: Number(item.v2), 3: Number(item.v3), 4: Number(item.v4), 5: Number(item.v5) }),
  542. assistantTeacher30MinSalary: 0,
  543. assistantTeacher90MinSalary: 0,
  544. mainTeacher30MinSalary: 0,
  545. mainTeacher90MinSalary: 0,
  546. userId: item.userId
  547. })
  548. })
  549. this.vipTable.forEach(item => {
  550. // console.log(item)
  551. if (item.offlineClassesSalary < 0 || item.onlineClassesSalary < 0) {
  552. this.$message.error("输入课酬不能为负数");
  553. checkStatus = false;
  554. return;
  555. }
  556. });
  557. this.accompanyTable.forEach(item => {
  558. if (item.mainTeacherSalary < 0) {
  559. this.$message.error("输入课酬不能为负数");
  560. checkStatus = false;
  561. return;
  562. }
  563. if (!item.mainTeacherSalary.toString()) {
  564. this.$message.error("输入网管课课酬");
  565. checkStatus = false;
  566. return;
  567. }
  568. });
  569. if (!checkStatus) {
  570. return
  571. }
  572. this.$refs['salaryForm'].validate((valid) => {
  573. if(valid) {
  574. this.$confirm("您确定更改老师课酬", "提示", {
  575. confirmButtonText: "确定",
  576. cancelButtonText: "取消",
  577. type: "warning"
  578. })
  579. .then(async () => {
  580. let params = teamTable.concat(temps)
  581. let updateForm = this.updateForm
  582. let res = await teacherUpdate1({ id: this.teacherId, isSettlementSalary: updateForm.isSettlementSalary })
  583. if(res.code != 200) {
  584. this.$message.error(res.msg)
  585. return
  586. }
  587. teacherSalaryBatchUpset({
  588. teacherDefaultMusicGroupSalaries: params,
  589. startDate: updateForm.startDate
  590. }).then(res => {
  591. if (res.code == 200) {
  592. // 判断输入的值是否正确
  593. vipGroupSalarySet({
  594. teacherDefaultVipGroupSalaries: this.vipTable,
  595. startDate: updateForm.startDate
  596. }).then(res => {
  597. if (res.code == 200) {
  598. PracticeGroupSalaryUpdate({
  599. startDate: updateForm.startDate,
  600. teacherDefaultPracticeGroupSalaries: this.accompanyTable
  601. }).then(res => {
  602. if (res.code == 200) {
  603. this.$message.success("保存成功");
  604. this.$store.dispatch('delVisitedViews', this.$route)
  605. this.$router.push({
  606. path: "/teacherManager/teacherList",
  607. query: { rules: this.Frules, search: this.Fsearch }
  608. });
  609. }
  610. });
  611. }
  612. });
  613. }
  614. });
  615. })
  616. .catch(() => { });
  617. }
  618. })
  619. // 判断输入的值是否正确
  620. // if (!this.startDate) {
  621. // this.$message.error("请填写生效日期");
  622. // return;
  623. // }
  624. }
  625. }
  626. };
  627. </script>
  628. <style lang="scss" scoped>
  629. .salarySet {
  630. h3 {
  631. margin-top: 10px;
  632. margin-bottom: 10px;
  633. font-size: 14px;
  634. color: #444;
  635. font-weight: normal;
  636. }
  637. .tableList {
  638. .left,
  639. .right {
  640. float: left;
  641. }
  642. .left {
  643. width: 100%;
  644. }
  645. .right {
  646. width: 56%;
  647. margin-left: 2%;
  648. }
  649. }
  650. }
  651. /deep/.el-table__body {
  652. tr {
  653. td:nth-child(3) {
  654. border-right: 1px solid #ebeef5;
  655. }
  656. }
  657. }
  658. /deep/.el-input-group__append {
  659. min-width: 103px;
  660. background-color: #f5f7fa;
  661. text-align: center;
  662. color: #909399;
  663. vertical-align: middle;
  664. display: table-cell;
  665. position: relative;
  666. border: 1px solid #dcdfe6;
  667. border-left: 0;
  668. }
  669. </style>