detailsPage.vue 21 KB

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