detailsPage.vue 21 KB

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