detailsPage.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <template>
  2. <div>
  3. <div class="borderless">
  4. <div class="customer-head">
  5. <div class="customer-back">
  6. <el-button
  7. type="danger"
  8. style="border: none;background: none;color: red"
  9. icon="el-icon-arrow-left"
  10. @click="backToList"
  11. >返回列表
  12. </el-button>
  13. </div>
  14. <el-button
  15. class="el-button--small-yh add-customer-btn"
  16. type="primary"
  17. size="small"
  18. @click="editCustomer"
  19. >保存数据
  20. </el-button>
  21. </div>
  22. <containerTitle
  23. title="基础资料"
  24. style="margin-top: 60px"
  25. ></containerTitle>
  26. <basic-container>
  27. <avue-form
  28. ref="form"
  29. class="trading-form"
  30. v-model="form"
  31. :option="option"
  32. >
  33. </avue-form>
  34. </basic-container>
  35. <containerTitle title="事业编考试的记录"></containerTitle>
  36. <basic-container>
  37. <avue-crud
  38. ref="crud"
  39. :option="option2"
  40. :data="dataList"
  41. :table-loading="loading"
  42. @saveColumn="saveColumn"
  43. :cell-style="cellStyle"
  44. >
  45. <template slot="menuLeft">
  46. <el-button
  47. type="primary"
  48. @click="dataList.push({ $cellEdit: true })"
  49. size="small"
  50. :disabled="detailData.status == 1"
  51. >新增
  52. </el-button>
  53. </template>
  54. <template slot="menu" slot-scope="{ row, index }">
  55. <el-button
  56. size="small"
  57. type="text"
  58. @click="rowCell(row, index)"
  59. :disabled="detailData.status == 1"
  60. >编辑</el-button
  61. >
  62. <el-button
  63. size="small"
  64. type="text"
  65. @click="rowDel(row, index)"
  66. :disabled="detailData.status == 1"
  67. >删除</el-button
  68. >
  69. </template>
  70. </avue-crud>
  71. </basic-container>
  72. </div>
  73. </div>
  74. </template>
  75. <script>
  76. import { detail, submit, delItem } from "@/api/basicData/facultyManagement";
  77. import { addAllsalary, addAllsalary2 } from "@/util/calculate";
  78. export default {
  79. name: "index",
  80. data() {
  81. return {
  82. form: {},
  83. dataList: [],
  84. option: {
  85. menuBtn: false,
  86. labelWidth: 140,
  87. column: [
  88. {
  89. label: "姓名",
  90. prop: "cname",
  91. rules: [
  92. {
  93. required: true,
  94. message: "",
  95. trigger: "blur"
  96. }
  97. ],
  98. span: 6
  99. },
  100. {
  101. label: "身份证",
  102. prop: "idNumber",
  103. rules: [
  104. {
  105. required: true,
  106. message: "",
  107. trigger: "blur"
  108. }
  109. ],
  110. span: 6
  111. },
  112. {
  113. label: "性别",
  114. prop: "gender",
  115. type: "select",
  116. dicUrl: "/api/blade-system/dict-biz/dictionary?code=sex",
  117. props: {
  118. label: "dictValue",
  119. value: "dictValue"
  120. },
  121. span: 6
  122. },
  123. {
  124. label: "联系电话",
  125. prop: "phone",
  126. span: 6
  127. },
  128. {
  129. label: "入职时间",
  130. prop: "joiningDate",
  131. type: "date",
  132. valueFormat: "yyyy-MM-dd",
  133. span: 6
  134. },
  135. {
  136. label: "转正时间",
  137. prop: "birthdate",
  138. type: "date",
  139. valueFormat: "yyyy-MM-dd",
  140. span: 6
  141. },
  142. {
  143. label: "校龄开始日期",
  144. prop: "schoolAgeSalaryDate",
  145. type: "month",
  146. valueFormat: "yyyy-MM-dd",
  147. span: 6
  148. },
  149. {
  150. label: "校龄",
  151. prop: "schoolAge",
  152. type: "number",
  153. controls: false,
  154. precision: 0,
  155. minRows: 0,
  156. span: 6
  157. },
  158. {
  159. label: "所在部门",
  160. prop: "inSection",
  161. type: "select",
  162. dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_section",
  163. props: {
  164. label: "dictValue",
  165. value: "dictValue"
  166. },
  167. rules: [
  168. {
  169. required: true,
  170. message: "",
  171. trigger: "blur"
  172. }
  173. ],
  174. span: 6
  175. },
  176. {
  177. label: "级部",
  178. prop: "department",
  179. type: "select",
  180. dicUrl: "/api/blade-system/dict-biz/dictionary?code=department",
  181. props: {
  182. label: "dictValue",
  183. value: "dictValue"
  184. },
  185. span: 6
  186. },
  187. {
  188. label: "班级",
  189. prop: "inStaffRoom",
  190. type: "select",
  191. dicUrl: "/api/blade-system/dict-biz/dictionary?code=in_staff_room",
  192. props: {
  193. label: "dictValue",
  194. value: "dictValue"
  195. },
  196. span: 6
  197. },
  198. {
  199. label: "职务",
  200. prop: "compileCategory",
  201. type: "select",
  202. dicUrl:
  203. "/api/blade-system/dict-biz/dictionary?code=compile_category",
  204. props: {
  205. label: "dictValue",
  206. value: "dictValue"
  207. },
  208. span: 6
  209. },
  210. {
  211. label: "职工类别",
  212. prop: "staffType",
  213. type: "select",
  214. dicUrl: "/api/blade-system/dict-biz/dictionary?code=staff_type",
  215. props: {
  216. label: "dictValue",
  217. value: "dictValue"
  218. },
  219. span: 6
  220. },
  221. {
  222. label: "授课类别",
  223. prop: "classType",
  224. type: "select",
  225. dicUrl: "/api/blade-system/dict-biz/dictionary?code=class_type",
  226. props: {
  227. label: "dictValue",
  228. value: "dictValue"
  229. },
  230. row: true,
  231. span: 6
  232. },
  233. {
  234. label: "工资拨付标准",
  235. prop: "salaryWithdrawalStandard",
  236. precision: 2,
  237. type: "number",
  238. controls: false,
  239. span: 6
  240. },
  241. {
  242. label: "职级工资",
  243. prop: "rankWithdrawalStandard",
  244. precision: 2,
  245. type: "number",
  246. controls: false,
  247. span: 6
  248. },
  249. {
  250. label: "履约奖",
  251. prop: "performanceAward",
  252. precision: 2,
  253. type: "number",
  254. controls: false,
  255. span: 6
  256. },
  257. {
  258. label: "校龄工资",
  259. prop: "schoolAgeSalary",
  260. precision: 2,
  261. type: "number",
  262. controls: false,
  263. span: 6
  264. },
  265. {
  266. label: "增资",
  267. prop: "capitalIncrease",
  268. precision: 2,
  269. type: "number",
  270. controls: false,
  271. span: 6
  272. },
  273. {
  274. label: "学历工资",
  275. prop: "educationSalary",
  276. precision: 2,
  277. type: "number",
  278. controls: false,
  279. span: 6
  280. },
  281. {
  282. label: "职级等级工资",
  283. prop: "rankSalary",
  284. precision: 2,
  285. type: "number",
  286. controls: false,
  287. span: 6
  288. },
  289. {
  290. label: "工资基数工资",
  291. prop: "salaryBase",
  292. precision: 2,
  293. type: "number",
  294. controls: false,
  295. span: 6
  296. },
  297. {
  298. label: "工作量工资",
  299. prop: "workloadSalary",
  300. precision: 2,
  301. type: "number",
  302. controls: false,
  303. span: 6
  304. },
  305. {
  306. label: "双休日工作量工资标准",
  307. prop: "doubleCease",
  308. precision: 2,
  309. type: "number",
  310. controls: false,
  311. span: 6
  312. },
  313. {
  314. label: "虚拟工作量工资标准",
  315. prop: "virtualWorkloadSalary",
  316. precision: 2,
  317. type: "number",
  318. controls: false,
  319. span: 6
  320. },
  321. {
  322. label: "日常考核工资",
  323. prop: "dailyAssessmentCriteria",
  324. precision: 2,
  325. type: "number",
  326. controls: false,
  327. span: 6
  328. },
  329. {
  330. label: "日常考核等级工资",
  331. prop: "dailyAssessmentSalary",
  332. precision: 2,
  333. type: "number",
  334. controls: false,
  335. span: 6
  336. },
  337. {
  338. label: "虚拟日常考核标准",
  339. prop: "virtualDailyAssessmentCriteria",
  340. precision: 2,
  341. type: "number",
  342. controls: false,
  343. span: 6
  344. },
  345. {
  346. label: "学期绩效工资",
  347. prop: "termPerformanceSalary",
  348. precision: 2,
  349. type: "number",
  350. controls: false,
  351. span: 6
  352. },
  353. // {
  354. // label: "领导干部补贴工资",
  355. // prop: "leadingCadreSubsidy",
  356. // precision: 2,
  357. // type: "number",
  358. // controls: false,
  359. // span: 6
  360. // },
  361. {
  362. label: "领导干部考核补贴工资",
  363. prop: "assessLeadingCadreSubsidy",
  364. precision: 2,
  365. type: "number",
  366. controls: false,
  367. span: 6
  368. },
  369. // {
  370. // label: "备课组长补贴",
  371. // prop: "prepareLessons",
  372. // precision: 2,
  373. // type: "number",
  374. // controls: false,
  375. // span: 6
  376. // },
  377. {
  378. label: "备课组长考核补贴标准",
  379. prop: "assessPrepareLessons",
  380. precision: 2,
  381. type: "number",
  382. controls: false,
  383. span: 6
  384. },
  385. // {
  386. // label: "教研组长补贴",
  387. // prop: "teachingResearch",
  388. // precision: 2,
  389. // type: "number",
  390. // controls: false,
  391. // span: 6
  392. // },
  393. {
  394. label: "教研组长补贴",
  395. prop: "assessTeachingResearch",
  396. precision: 2,
  397. type: "number",
  398. controls: false,
  399. span: 6
  400. },
  401. {
  402. label: "班主任补贴标准",
  403. prop: "teacherSubsidy",
  404. precision: 2,
  405. type: "number",
  406. controls: false,
  407. span: 6
  408. },
  409. {
  410. label: "班主任考核补贴标准",
  411. prop: "teacherAssessSubsidy",
  412. precision: 2,
  413. type: "number",
  414. controls: false,
  415. row: true,
  416. span: 6
  417. },
  418. {
  419. label: "教师类别",
  420. prop: "salaryWithdrawalStandardName",
  421. type: "select",
  422. dicUrl:
  423. "/api/blade-system/dict-biz/dictionary?code=Salary_allocation_standard",
  424. props: {
  425. label: "dictValue",
  426. value: "dictValue"
  427. },
  428. rules: [
  429. {
  430. required: true,
  431. message: "",
  432. trigger: "blur"
  433. }
  434. ],
  435. span: 6
  436. },
  437. {
  438. label: "职级拨付标准",
  439. prop: "rankWithdrawalStandardName",
  440. type: "select",
  441. dicUrl:
  442. "/api/blade-system/dict-biz/dictionary?code=Level_Allocation_Criteria",
  443. props: {
  444. label: "dictValue",
  445. value: "dictValue"
  446. },
  447. span: 6
  448. },
  449. {
  450. label: "履约奖标准",
  451. prop: "performanceAwardName",
  452. type: "select",
  453. dicUrl:
  454. "/api/blade-system/dict-biz/dictionary?code=Performance_Award_Criteria",
  455. props: {
  456. label: "dictValue",
  457. value: "dictValue"
  458. },
  459. span: 6
  460. },
  461. {
  462. label: "增资标准",
  463. prop: "capitalIncreaseName",
  464. type: "select",
  465. dicUrl:
  466. "/api/blade-system/dict-biz/dictionary?code=Capital_increase_standard",
  467. props: {
  468. label: "dictValue",
  469. value: "dictValue"
  470. },
  471. span: 6
  472. },
  473. {
  474. label: "学历",
  475. prop: "code",
  476. type: "select",
  477. dicUrl: "/api/blade-system/dict-biz/dictionary?code=marital_status",
  478. props: {
  479. label: "dictValue",
  480. value: "dictValue"
  481. },
  482. span: 6
  483. },
  484. {
  485. label: "职级等级",
  486. prop: "rankSalaryName",
  487. type: "select",
  488. dicUrl: "/api/blade-system/dict-biz/dictionary?code=Grade_salary",
  489. props: {
  490. label: "dictValue",
  491. value: "dictValue"
  492. },
  493. span: 6
  494. },
  495. {
  496. label: "工资基数",
  497. prop: "salaryBaseName",
  498. type: "select",
  499. dicUrl: "/api/blade-system/dict-biz/dictionary?code=Wage_base",
  500. props: {
  501. label: "dictValue",
  502. value: "dictValue"
  503. },
  504. span: 6
  505. },
  506. {
  507. label: "工作量标准",
  508. prop: "workloadSalaryName",
  509. type: "select",
  510. dicUrl: "/api/blade-system/dict-biz/dictionary?code=Workload_Wages",
  511. props: {
  512. label: "dictValue",
  513. value: "dictValue"
  514. },
  515. span: 6
  516. },
  517. {
  518. label: "日常考核标准",
  519. prop: "dailyAssessmentCriteriaName",
  520. type: "select",
  521. dicUrl:
  522. "/api/blade-system/dict-biz/dictionary?code=Daily_Assessment_Criteria",
  523. props: {
  524. label: "dictValue",
  525. value: "dictValue"
  526. },
  527. span: 6
  528. },
  529. {
  530. label: "日常考核等级",
  531. prop: "dailyAssessmentSalaryName",
  532. type: "select",
  533. dicUrl:
  534. "/api/blade-system/dict-biz/dictionary?code=Daily_assessment_grade_salary",
  535. props: {
  536. label: "dictValue",
  537. value: "dictValue"
  538. },
  539. span: 6
  540. },
  541. {
  542. label: "学期绩效标准",
  543. prop: "termPerformanceSalaryName",
  544. type: "select",
  545. dicUrl:
  546. "/api/blade-system/dict-biz/dictionary?code=Term_Performance_Pay",
  547. props: {
  548. label: "dictValue",
  549. value: "dictValue"
  550. },
  551. span: 6
  552. },
  553. // {
  554. // label: "领导干部补贴标准",
  555. // prop: "leadingCadreSubsidyName",
  556. // type: "select",
  557. // dicUrl:
  558. // "/api/blade-system/dict-biz/dictionary?code=Standards_for_subsidies_for_leading_cadres",
  559. // props: {
  560. // label: "dictValue",
  561. // value: "dictValue"
  562. // },
  563. // span: 6
  564. // },
  565. {
  566. label: "领导干部补贴标准",
  567. prop: "assessLeadingCadreSubsidyName",
  568. type: "select",
  569. dicUrl:
  570. "/api/blade-system/dict-biz/dictionary?code=Standards_for_subsidies_for_leading_cadres",
  571. props: {
  572. label: "dictValue",
  573. value: "dictValue"
  574. },
  575. span: 6
  576. },
  577. // {
  578. // label: "备课组长补贴标准",
  579. // prop: "prepareLessonsName",
  580. // type: "select",
  581. // dicUrl:
  582. // "/api/blade-system/dict-biz/dictionary?code=Standard_for_Leader_of_Lesson_Preparation",
  583. // props: {
  584. // label: "dictValue",
  585. // value: "dictValue"
  586. // },
  587. // span: 6
  588. // },
  589. {
  590. label: "备课组长补贴标准",
  591. prop: "assessPrepareLessonsName",
  592. type: "select",
  593. dicUrl:
  594. "/api/blade-system/dict-biz/dictionary?code=Standard_for_Leader_of_Lesson_Preparation",
  595. props: {
  596. label: "dictValue",
  597. value: "dictValue"
  598. },
  599. span: 6
  600. },
  601. // {
  602. // label: "教研组长补贴标准",
  603. // prop: "teachingResearchName",
  604. // type: "select",
  605. // dicUrl:
  606. // "/api/blade-system/dict-biz/dictionary?code=Standard_for_Teacher-Leader",
  607. // props: {
  608. // label: "dictValue",
  609. // value: "dictValue"
  610. // },
  611. // span: 6
  612. // },
  613. {
  614. label: "教研组长考核补贴标准",
  615. prop: "assessTeachingResearchName",
  616. type: "select",
  617. dicUrl:
  618. "/api/blade-system/dict-biz/dictionary?code=Standard_for_Teacher-Leader",
  619. props: {
  620. label: "dictValue",
  621. value: "dictValue"
  622. },
  623. row: true,
  624. span: 6
  625. },
  626. {
  627. label: "正班、副班",
  628. prop: "doubleTeachers",
  629. type: "radio",
  630. dataType: "string",
  631. dicUrl:
  632. "/api/blade-system/dict-biz/dictionary?code=double_teachers",
  633. props: {
  634. label: "dictValue",
  635. value: "dictValue"
  636. },
  637. span: 6
  638. },
  639. {
  640. label: "是否享受公办待遇",
  641. prop: "enjoyOfficeTreatment",
  642. type: "radio",
  643. dataType: "string",
  644. dicUrl: "/api/blade-system/dict-biz/dictionary?code=TF_status",
  645. props: {
  646. label: "dictValue",
  647. value: "dictValue"
  648. },
  649. span: 6
  650. },
  651. {
  652. label: "备注",
  653. prop: "remarks",
  654. type: "textarea",
  655. span: 24,
  656. minRows: 2
  657. }
  658. ]
  659. },
  660. option2: {
  661. align: "center",
  662. addBtn: false,
  663. refreshBtn: false,
  664. editBtn: false,
  665. delBtn: false,
  666. border: true,
  667. menuWidth: 120,
  668. stripe: true,
  669. column: [
  670. {
  671. label: "考试日期",
  672. prop: "birthdate",
  673. type: "date",
  674. valueFormat: "yyyy-MM-dd",
  675. cell: true
  676. },
  677. {
  678. label: "备注",
  679. prop: "remarks",
  680. cell: true
  681. }
  682. ]
  683. }
  684. };
  685. },
  686. props: {
  687. detailData: {
  688. type: Object
  689. }
  690. },
  691. created() {
  692. if (this.detailData.id) {
  693. this.getDetail(this.detailData.id);
  694. }
  695. if (this.detailData.status == 1) {
  696. this.option.disabled = true;
  697. }
  698. },
  699. methods: {
  700. cellStyle() {
  701. return "padding:0;height:40px;";
  702. },
  703. getDetail(id) {
  704. detail(id)
  705. .then(res => {
  706. this.form = res.data.data;
  707. this.dataList = res.data.data.causeList;
  708. })
  709. .finally(() => {
  710. // this.loading = false;
  711. // this.showBut = true;
  712. // this.pageLoading = false;
  713. });
  714. },
  715. rowCell(row, index) {
  716. if (row.$cellEdit == true) {
  717. this.$set(row, "$cellEdit", false);
  718. } else {
  719. this.$set(row, "$cellEdit", true);
  720. }
  721. },
  722. rowDel(row, index) {
  723. this.$confirm("确定删除数据?", {
  724. confirmButtonText: "确定",
  725. cancelButtonText: "取消",
  726. type: "warning"
  727. }).then(() => {
  728. if (row.id) {
  729. delItem(row.id).then(res => {
  730. this.$message({
  731. type: "success",
  732. message: "删除成功!"
  733. });
  734. this.dataList.splice(index, 1);
  735. });
  736. } else {
  737. this.$message({
  738. type: "success",
  739. message: "删除成功!"
  740. });
  741. this.dataList.splice(index, 1);
  742. }
  743. });
  744. },
  745. //修改提交触发
  746. editCustomer() {
  747. this.$refs["form"].validate((valid, done) => {
  748. done();
  749. if (valid) {
  750. const num = addAllsalary(
  751. this.form.salaryWithdrawalStandard,
  752. this.form.rankWithdrawalStandard,
  753. this.form.virtualWorkloadSalary
  754. );
  755. const num2 = addAllsalary2(
  756. this.form.salaryBase,
  757. this.form.workloadSalary,
  758. this.form.dailyAssessmentCriteria,
  759. this.form.termPerformanceSalary
  760. );
  761. if (num != num2) {
  762. return this.$message.error(
  763. "拨付金额" + num + "不等于标准金额" + num2
  764. );
  765. }
  766. submit({ ...this.form, causeList: this.dataList })
  767. .then(res => {
  768. this.$message.success("保存成功");
  769. this.form = res.data.data;
  770. this.dataList = res.data.data.causeList;
  771. })
  772. .finally(() => {});
  773. } else {
  774. return false;
  775. }
  776. });
  777. },
  778. //返回列表
  779. backToList() {
  780. this.$emit("goBack");
  781. }
  782. }
  783. };
  784. </script>
  785. <style lang="scss" scoped>
  786. .trading-form ::v-deep .el-form-item {
  787. margin-bottom: 8px !important;
  788. }
  789. ::v-deep .el-form-item__error {
  790. display: none !important;
  791. }
  792. .img-form ::v-deep .el-form-item {
  793. height: 150px;
  794. line-height: 150px;
  795. margin-bottom: 8px !important;
  796. }
  797. .img-form ::v-deep .avue-upload__icon {
  798. font-size: 20px;
  799. width: 150px;
  800. height: 150px;
  801. line-height: 150px;
  802. }
  803. </style>