detailsPage.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208
  1. <template>
  2. <div class="borderless">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. <el-button
  14. class="el-button--small-yh add-customer-btn"
  15. type="primary"
  16. :disabled="detailData.status == 1"
  17. size="small"
  18. @click="editCustomer"
  19. >保存数据
  20. </el-button>
  21. </div>
  22. <div class="customer-main">
  23. <containerTitle title="基础资料"></containerTitle>
  24. <basic-container>
  25. <avue-form class="trading-form" ref="form" v-model="form" :option="option" />
  26. </basic-container>
  27. <containerTitle title="基础明细"></containerTitle>
  28. <basic-container>
  29. <avue-crud
  30. ref="crud"
  31. :option="optionList"
  32. :data="dataList"
  33. :search.sync="search"
  34. @search-change="searchChange"
  35. @saveColumn="saveColumn"
  36. :cell-style="cellStyle"
  37. :header-cell-class-name="headerCellClassName"
  38. >
  39. <template slot="menuLeft">
  40. <el-button
  41. type="primary"
  42. @click="dataList.push({ $cellEdit: true })"
  43. size="small"
  44. :disabled="detailData.status == 1"
  45. >新增</el-button
  46. >
  47. <el-button
  48. type="primary"
  49. size="small"
  50. icon="el-icon-bottom"
  51. @click="importExcel()"
  52. :disabled="detailData.status == 1"
  53. >导入
  54. </el-button>
  55. <el-button
  56. type="primary"
  57. size="small"
  58. icon="el-icon-bottom"
  59. @click.stop="openExport()"
  60. >导出
  61. </el-button>
  62. </template>
  63. <template slot-scope="{ row, index }" slot="menu">
  64. <el-button
  65. type="text"
  66. size="small"
  67. @click.stop="rowCell(row)"
  68. :disabled="detailData.status == 1"
  69. >
  70. 编辑
  71. </el-button>
  72. <el-button
  73. type="text"
  74. size="small"
  75. @click.stop="rowDel(row, index)"
  76. :disabled="detailData.status == 1"
  77. >
  78. 删除
  79. </el-button>
  80. </template>
  81. </avue-crud>
  82. <el-dialog
  83. title="导入教职工资料"
  84. append-to-body
  85. :visible.sync="excelBox"
  86. width="555px"
  87. v-dialog-drag
  88. >
  89. <avue-form
  90. :option="excelOption"
  91. v-model="excelForm"
  92. table-loading="excelLoading"
  93. :upload-after="uploadAfter"
  94. >
  95. <template slot="excelTemplate">
  96. <el-button type="primary" @click="derivation">
  97. 点击下载<i class="el-icon-download el-icon--right"></i>
  98. </el-button>
  99. </template>
  100. </avue-form>
  101. <p style="text-align: center;color: #DC0505">
  102. 温馨提示 第一次导入时请先下载模板
  103. </p>
  104. </el-dialog>
  105. </basic-container>
  106. </div>
  107. </div>
  108. </template>
  109. <script>
  110. import { getToken } from "@/util/auth";
  111. import { detail, submit, delItem } from "@/api/salaryManagement/primarySchool";
  112. export default {
  113. name: "detailsPage",
  114. data() {
  115. return {
  116. excelBox: false,
  117. xcelLoading: false,
  118. excelForm: {},
  119. excelOption: {
  120. submitBtn: false,
  121. emptyBtn: false,
  122. column: [
  123. {
  124. label: "模板下载",
  125. prop: "excelTemplate",
  126. formslot: true,
  127. span: 24
  128. },
  129. {
  130. label: "模板上传",
  131. prop: "excelFile",
  132. type: "upload",
  133. drag: true,
  134. loadText: "模板上传中,请稍等",
  135. span: 24,
  136. propsHttp: {
  137. res: "data"
  138. },
  139. tip: "请上传 .xls,.xlsx 标准格式文件",
  140. action: "/api/blade-school/salaryitem/import"
  141. }
  142. ]
  143. },
  144. form: {},
  145. dataList: [],
  146. allDataList: [],
  147. drawer: false,
  148. tableHeight: 0,
  149. option: {
  150. menuBtn: false,
  151. labelWidth: 100,
  152. column: [
  153. {
  154. label: "年",
  155. prop: "annual",
  156. type: "year",
  157. valueFormat: "yyyy",
  158. rules: [
  159. {
  160. required: true,
  161. message: "",
  162. trigger: "blur"
  163. }
  164. ],
  165. span: 6,
  166. change: ({ value }) => {
  167. if (value) {
  168. this.optionList.column.forEach(e => {
  169. if (e.prop == "yearUpPerformance") {
  170. e.label = value + "年上学期绩效";
  171. }
  172. if (e.prop == "yearDownPerformance") {
  173. e.label = value + "年下学期绩效";
  174. }
  175. });
  176. }
  177. }
  178. },
  179. {
  180. label: "月",
  181. prop: "moon",
  182. type: "select",
  183. filterable: true,
  184. dicUrl: "/api/blade-system/dict-biz/dictionary?code=month",
  185. props: {
  186. label: "dictValue",
  187. value: "dictKey"
  188. },
  189. span: 6,
  190. rules: [
  191. {
  192. required: true,
  193. message: "",
  194. trigger: "blur"
  195. }
  196. ],
  197. change: ({ value }) => {
  198. if (value) {
  199. this.optionList.column.forEach(e => {
  200. if (e.prop == "monthHour") {
  201. e.label = value + "月份课时";
  202. }
  203. if (e.prop == "momthWorkloadSalary") {
  204. e.label = value + "月工作量工资";
  205. }
  206. if (e.prop == "monthViceClassFee") {
  207. e.label = value + "月副班费(预留补发)";
  208. }
  209. });
  210. }
  211. }
  212. },
  213. {
  214. label: "备注",
  215. prop: "remarks",
  216. type: "textarea",
  217. span: 12,
  218. minRows: 2
  219. }
  220. ]
  221. },
  222. optionList: {
  223. searchMenuSpan: 16,
  224. addBtn: false,
  225. border: true,
  226. align: "center",
  227. index: true,
  228. viewBtn: false,
  229. editBtn: false,
  230. delBtn: false,
  231. refreshBtn: false,
  232. menuWidth: 100,
  233. column: [
  234. {
  235. label: "姓名",
  236. prop: "cname",
  237. width: 100,
  238. searchSpan: 8,
  239. search: false,
  240. cell: true
  241. },
  242. {
  243. label: "职级拨付标准",
  244. prop: "rankWithdrawalStandard",
  245. width: 100,
  246. cell: true
  247. },
  248. {
  249. label: "身份证号",
  250. prop: "idNumber",
  251. width: 100,
  252. cell: true
  253. },
  254. {
  255. label: "学科",
  256. prop: "discipline",
  257. width: 100,
  258. cell: true
  259. },
  260. {
  261. label: "类别",
  262. prop: "itemType",
  263. width: 100,
  264. cell: true
  265. },
  266. {
  267. label: "转正时间",
  268. prop: "positiveTime",
  269. type: "date",
  270. valueFormat: "yyyy-MM-dd",
  271. width: 100,
  272. cell: true
  273. },
  274. {
  275. label: "职务",
  276. prop: "position",
  277. width: 100,
  278. cell: true
  279. },
  280. {
  281. label: "工资拨付标准",
  282. prop: "salaryWithdrawalStandard",
  283. width: 100,
  284. cell: true
  285. },
  286. {
  287. label: "履约奖",
  288. prop: "performanceAward",
  289. width: 100,
  290. cell: true
  291. },
  292. {
  293. label: "校龄工资",
  294. prop: "schoolAgeSalary",
  295. width: 100,
  296. cell: true
  297. },
  298. {
  299. label: "增资",
  300. prop: "capitalIncrease",
  301. width: 100,
  302. cell: true
  303. },
  304. {
  305. label: "学历工资",
  306. prop: "educationSalary",
  307. width: 100,
  308. cell: true
  309. },
  310. {
  311. label: "职级标准",
  312. prop: "rankStandard",
  313. width: 100,
  314. cell: true
  315. },
  316. {
  317. label: "职级工资",
  318. prop: "rankSalary",
  319. width: 100,
  320. cell: true
  321. },
  322. {
  323. label: "工资基数",
  324. prop: "salaryBase",
  325. width: 100,
  326. cell: true
  327. },
  328. {
  329. label: "基础工资",
  330. prop: "basicsSalary",
  331. width: 100,
  332. cell: true
  333. },
  334. {
  335. label: "工作量工资标准",
  336. prop: "workloadSalaryCritertion",
  337. width: 120,
  338. cell: true
  339. },
  340. {
  341. label: "月份课时",
  342. prop: "monthHour",
  343. width: 100,
  344. cell: true
  345. },
  346. {
  347. label: "月工作量工资",
  348. prop: "momthWorkloadSalary",
  349. width: 120,
  350. cell: true
  351. },
  352. {
  353. label: "自定义",
  354. prop: "custom",
  355. width: 100,
  356. cell: true
  357. },
  358. {
  359. label: "自定义",
  360. prop: "customOne",
  361. width: 100,
  362. cell: true
  363. },
  364. {
  365. label: "自定义",
  366. prop: "customTwo",
  367. width: 100,
  368. cell: true
  369. },
  370. {
  371. label: "自定义",
  372. prop: "customThree",
  373. width: 100,
  374. cell: true
  375. },
  376. {
  377. label: "自定义",
  378. prop: "customFour",
  379. width: 100,
  380. cell: true
  381. },
  382. {
  383. label: "自定义",
  384. prop: "customFive",
  385. width: 100,
  386. cell: true
  387. },
  388. {
  389. label: "自定义",
  390. prop: "customSix",
  391. width: 100,
  392. cell: true
  393. },
  394. {
  395. label: "自定义",
  396. prop: "customSeven",
  397. width: 100,
  398. cell: true
  399. },
  400. {
  401. label: "自定义",
  402. prop: "customEight",
  403. width: 100,
  404. cell: true
  405. },
  406. {
  407. label: "自定义",
  408. prop: "customNine",
  409. width: 100,
  410. cell: true
  411. },
  412. {
  413. label: "工作量工资",
  414. prop: "workloadSalary",
  415. width: 100,
  416. cell: true
  417. },
  418. {
  419. label: "日常考核标准",
  420. prop: "dailyAssessmentCriteria",
  421. width: 100,
  422. cell: true
  423. },
  424. {
  425. label: "日常考核工资",
  426. prop: "dailyAssessmentSalary",
  427. width: 100,
  428. cell: true
  429. },
  430. {
  431. label: "学期绩效工资",
  432. prop: "termPerformanceSalary",
  433. width: 100,
  434. cell: true
  435. },
  436. {
  437. label: "自定义奖励",
  438. prop: "customAward",
  439. width: 100,
  440. cell: true
  441. },
  442. {
  443. label: "自定义奖励",
  444. prop: "customAwardOne",
  445. width: 100,
  446. cell: true
  447. },
  448. {
  449. label: "自定义奖励",
  450. prop: "customAwardTwo",
  451. width: 100,
  452. cell: true
  453. },
  454. {
  455. label: "自定义奖励",
  456. prop: "customAwardThree",
  457. width: 100,
  458. cell: true
  459. },
  460. {
  461. label: "自定义奖励",
  462. prop: "customAwardFour",
  463. width: 100,
  464. cell: true
  465. },
  466. {
  467. label: "自定义奖励",
  468. prop: "customAwardFive",
  469. width: 100,
  470. cell: true
  471. },
  472. {
  473. label: "自定义奖励",
  474. prop: "customAwardSix",
  475. width: 100,
  476. cell: true
  477. },
  478. {
  479. label: "自定义奖励",
  480. prop: "customAwardSeven",
  481. width: 100,
  482. cell: true
  483. },
  484. {
  485. label: "自定义奖励",
  486. prop: "customAwardEight",
  487. width: 100,
  488. cell: true
  489. },
  490. {
  491. label: "自定义奖励",
  492. prop: "customAwardNine",
  493. width: 100,
  494. cell: true
  495. },
  496. {
  497. label: "奖励工资",
  498. prop: "awardSalary",
  499. width: 100,
  500. cell: true
  501. },
  502. {
  503. label: "领导干部补贴",
  504. prop: "leadingCadreSubsidy",
  505. width: 100,
  506. cell: true
  507. },
  508. {
  509. label: "备课组长",
  510. prop: "prepareLessons",
  511. width: 100,
  512. cell: true
  513. },
  514. {
  515. label: "教研组长",
  516. prop: "teachingResearch",
  517. width: 100,
  518. cell: true
  519. },
  520. {
  521. label: "职务津贴",
  522. prop: "dutyAllowances",
  523. width: 100,
  524. cell: true
  525. },
  526. {
  527. label: "班主任费",
  528. prop: "classTeacherFee",
  529. width: 100,
  530. cell: true
  531. },
  532. {
  533. label: "班额",
  534. prop: "classes",
  535. width: 100,
  536. cell: true
  537. },
  538. {
  539. label: "班主任津贴",
  540. prop: "classTeacherSubsidy",
  541. width: 100,
  542. cell: true
  543. },
  544. {
  545. label: "微信",
  546. prop: "wx",
  547. width: 100,
  548. cell: true
  549. },
  550. {
  551. label: "产假工资",
  552. prop: "maternityLeaveSalary",
  553. width: 100,
  554. cell: true
  555. },
  556. {
  557. label: "周末加班",
  558. prop: "overtimeAtWeekend",
  559. width: 100,
  560. cell: true
  561. },
  562. {
  563. label: "年上学期绩效",
  564. prop: "yearUpPerformance",
  565. width: 130,
  566. cell: true
  567. },
  568. {
  569. label: "年下学期绩效",
  570. prop: "yearDownPerformance",
  571. width: 130,
  572. cell: true
  573. },
  574. {
  575. label: "干部补贴预留",
  576. prop: "cadreAllowanceReservation",
  577. width: 100,
  578. cell: true
  579. },
  580. {
  581. label: "假期加班费",
  582. prop: "vacationOvertimePay",
  583. width: 100,
  584. cell: true
  585. },
  586. {
  587. label: "新岗岗前培训",
  588. prop: "newPostTrain",
  589. width: 100,
  590. cell: true
  591. },
  592. {
  593. label: "期中期末考试学科优胜奖(预留发放)",
  594. prop: "winningPrize",
  595. width: 240,
  596. cell: true
  597. },
  598. {
  599. label: "级部长(预留发放)",
  600. prop: "classMinister",
  601. width: 200,
  602. cell: true
  603. },
  604. {
  605. label: "月副班费(预留补发)",
  606. prop: "monthViceClassFee",
  607. width: 160,
  608. cell: true
  609. },
  610. {
  611. label: "餐车、周五测温、周五安全岗(预留补发)",
  612. prop: "safetyFees",
  613. width: 250,
  614. cell: true
  615. },
  616. {
  617. label: "预留补发",
  618. prop: "reserveReplacement",
  619. width: 100,
  620. cell: true
  621. },
  622. {
  623. label: "调整差额",
  624. prop: "adjustTheBalance",
  625. width: 100,
  626. cell: true
  627. },
  628. {
  629. label: "自定义",
  630. prop: "customize",
  631. width: 100,
  632. cell: true
  633. },
  634. {
  635. label: "自定义",
  636. prop: "customizeOne",
  637. width: 100,
  638. cell: true
  639. },
  640. {
  641. label: "自定义",
  642. prop: "customizeTwo",
  643. width: 100,
  644. cell: true
  645. },
  646. {
  647. label: "自定义",
  648. prop: "customizeThree",
  649. width: 100,
  650. cell: true
  651. },
  652. {
  653. label: "自定义",
  654. prop: "customizeFour",
  655. width: 100,
  656. cell: true
  657. },
  658. {
  659. label: "自定义",
  660. prop: "customizeFive",
  661. width: 100,
  662. cell: true
  663. },
  664. {
  665. label: "自定义",
  666. prop: "customizeSix",
  667. width: 100,
  668. cell: true
  669. },
  670. {
  671. label: "自定义",
  672. prop: "customizeSeven",
  673. width: 100,
  674. cell: true
  675. },
  676. {
  677. label: "自定义",
  678. prop: "customizeEight",
  679. width: 100,
  680. cell: true
  681. },
  682. {
  683. label: "自定义",
  684. prop: "customizeNine",
  685. width: 100,
  686. cell: true
  687. },
  688. {
  689. label: "补贴项",
  690. prop: "subsidy",
  691. width: 100,
  692. cell: true
  693. },
  694. {
  695. label: "出勤",
  696. prop: "attendance",
  697. width: 100,
  698. cell: true
  699. },
  700. {
  701. label: "督查罚款",
  702. prop: "inspectorFines",
  703. width: 100,
  704. cell: true
  705. },
  706. {
  707. label: "电话费",
  708. prop: "telephoneBill",
  709. width: 100,
  710. cell: true
  711. },
  712. {
  713. label: "学习强国",
  714. prop: "learningPower",
  715. width: 100,
  716. cell: true
  717. },
  718. {
  719. label: "宿舍管理费",
  720. prop: "dormitoryManagementFee",
  721. width: 100,
  722. cell: true
  723. },
  724. {
  725. label: "生育津贴",
  726. prop: "childbirthAllowance",
  727. width: 100,
  728. cell: true
  729. },
  730. {
  731. label: "五险一金个人",
  732. prop: "androidIt",
  733. width: 100,
  734. cell: true
  735. },
  736. {
  737. label: "扣除项",
  738. prop: "deductions",
  739. width: 100,
  740. cell: true
  741. },
  742. {
  743. label: "保险(单位部分)",
  744. prop: "insuranceUnit",
  745. width: 120,
  746. cell: true
  747. },
  748. {
  749. label: "保险(个人部分)",
  750. prop: "insurancePersonage",
  751. width: 120,
  752. cell: true
  753. },
  754. {
  755. label: "公积金(单位部分)",
  756. prop: "reservedFundsUnit",
  757. width: 140,
  758. cell: true
  759. },
  760. {
  761. label: "公积金(个人部分)",
  762. prop: "reservedFundsPersonage",
  763. width: 140,
  764. cell: true
  765. },
  766. {
  767. label: "应发工资",
  768. prop: "salary",
  769. width: 100,
  770. cell: true
  771. },
  772. {
  773. label: "个税",
  774. prop: "personageTaxes",
  775. width: 100,
  776. cell: true
  777. },
  778. {
  779. label: "实发工资(减去个人)",
  780. prop: "fsalary",
  781. width: 150,
  782. cell: true
  783. },
  784. {
  785. label: "备注",
  786. prop: "remarks",
  787. width: 100,
  788. cell: true
  789. },
  790. {
  791. label: "自定义",
  792. prop: "ribbon",
  793. width: 100,
  794. cell: true
  795. },
  796. {
  797. label: "自定义",
  798. prop: "ribbonOne",
  799. width: 100,
  800. cell: true
  801. },
  802. {
  803. label: "自定义",
  804. prop: "ribbonTwo",
  805. width: 100,
  806. cell: true
  807. },
  808. {
  809. label: "自定义",
  810. prop: "ribbonThree",
  811. width: 100,
  812. cell: true
  813. },
  814. {
  815. label: "自定义",
  816. prop: "ribbonFour",
  817. width: 100,
  818. cell: true
  819. },
  820. {
  821. label: "自定义",
  822. prop: "ribbonFive",
  823. width: 100,
  824. cell: true
  825. },
  826. {
  827. label: "自定义",
  828. prop: "ribbonSix",
  829. width: 100,
  830. cell: true
  831. },
  832. {
  833. label: "自定义",
  834. prop: "ribbonSeven",
  835. width: 100,
  836. cell: true
  837. },
  838. {
  839. label: "自定义",
  840. prop: "ribbonEight",
  841. width: 100,
  842. cell: true
  843. },
  844. {
  845. label: "自定义",
  846. prop: "ribbonNine",
  847. width: 100,
  848. cell: true
  849. },
  850. {
  851. label: "日照银行代发最终",
  852. prop: "payrollCredit",
  853. width: 120,
  854. cell: true
  855. },
  856. {
  857. label: "已付",
  858. prop: "paid",
  859. width: 100,
  860. cell: true
  861. },
  862. {
  863. label: "冲借款",
  864. prop: "rushedToBorrow",
  865. width: 100,
  866. cell: true
  867. },
  868. {
  869. label: "现金付款",
  870. prop: "cashPayment",
  871. width: 100,
  872. cell: true
  873. },
  874. {
  875. label: "暂不付",
  876. prop: "pauseNoPay",
  877. width: 100,
  878. cell: true
  879. },
  880. {
  881. label: "暂不付1",
  882. prop: "pauseNoPayOne",
  883. width: 100,
  884. cell: true
  885. },
  886. {
  887. label: "暂不付2",
  888. prop: "pauseNoPayTwo",
  889. width: 100,
  890. cell: true
  891. },
  892. {
  893. label: "暂不付3",
  894. prop: "pauseNoPayThree",
  895. width: 100,
  896. cell: true
  897. },
  898. {
  899. label: "暂不付4",
  900. prop: "pauseNoPayFour",
  901. width: 100,
  902. cell: true
  903. },
  904. {
  905. label: "暂不付5",
  906. prop: "pauseNoPayFive",
  907. width: 100,
  908. cell: true
  909. },
  910. {
  911. label: "暂不付6",
  912. prop: "pauseNoPaySix",
  913. width: 100,
  914. cell: true
  915. },
  916. {
  917. label: "暂不付7",
  918. prop: "pauseNoPaySeven",
  919. width: 100,
  920. cell: true
  921. },
  922. {
  923. label: "暂不付8",
  924. prop: "pauseNoPayEight",
  925. width: 100,
  926. cell: true
  927. },
  928. {
  929. label: "暂不付9",
  930. prop: "pauseNoPayNine",
  931. width: 100,
  932. cell: true
  933. },
  934. {
  935. label: "备注",
  936. prop: "pauseNoPayRemark",
  937. width: 100,
  938. cell: true
  939. }
  940. ]
  941. }
  942. };
  943. },
  944. props: {
  945. detailData: {
  946. type: Object
  947. }
  948. },
  949. created() {
  950. if (this.detailData.id) {
  951. this.getDetail(this.detailData.id);
  952. }
  953. if (this.detailData.status == 1) {
  954. this.option.disabled = true;
  955. this.findObject(this.optionList.column, "cname").search=true
  956. }
  957. this.optionList.height = window.innerHeight - 380;
  958. },
  959. methods: {
  960. cellStyle() {
  961. return "padding:0;height:40px;";
  962. },
  963. headerCellClassName({ row, column, rowIndex, columnIndex }) {
  964. if (
  965. column.property == "salaryBase" ||
  966. column.property == "workloadSalary" ||
  967. column.property == "dailyAssessmentSalary" ||
  968. column.property == "awardSalary" ||
  969. column.property == "dutyAllowances" ||
  970. column.property == "classTeacherSubsidy" ||
  971. column.property == "subsidy" ||
  972. column.property == "deductions" ||
  973. column.property == "insuranceUnit" ||
  974. column.property == "insurancePersonage" ||
  975. column.property == "reservedFundsUnit" ||
  976. column.property == "reservedFundsPersonage" ||
  977. column.property == "salary" ||
  978. column.property == "personageTaxes" ||
  979. column.property == "fsalary"
  980. ) {
  981. return "headerCellClass";
  982. }
  983. },
  984. getDetail(id) {
  985. detail(id)
  986. .then(res => {
  987. this.form = res.data.data;
  988. this.dataList = res.data.data.salaryItemList;
  989. if (this.detailData.status == 1) {
  990. this.allDataList = res.data.data.salaryItemList;
  991. }
  992. })
  993. .finally(() => {
  994. // this.loading = false;
  995. // this.showBut = true;
  996. // this.pageLoading = false;
  997. });
  998. },
  999. rowCell(row, index) {
  1000. if (row.$cellEdit == true) {
  1001. this.$set(row, "$cellEdit", false);
  1002. } else {
  1003. this.$set(row, "$cellEdit", true);
  1004. }
  1005. },
  1006. rowDel(row, index) {
  1007. this.$confirm("确定删除数据?", {
  1008. confirmButtonText: "确定",
  1009. cancelButtonText: "取消",
  1010. type: "warning"
  1011. }).then(() => {
  1012. if (row.id) {
  1013. delItem(row.id).then(res => {
  1014. this.$message({
  1015. type: "success",
  1016. message: "删除成功!"
  1017. });
  1018. this.dataList.splice(index, 1);
  1019. });
  1020. } else {
  1021. this.$message({
  1022. type: "success",
  1023. message: "删除成功!"
  1024. });
  1025. this.dataList.splice(index, 1);
  1026. }
  1027. });
  1028. },
  1029. searchChange(params, done) {
  1030. if (params.cname) {
  1031. this.dataList = this.allDataList.filter(e => e.cname == params.cname);
  1032. } else {
  1033. this.dataList = this.allDataList;
  1034. }
  1035. done();
  1036. },
  1037. uploadAfter(res, done, loading, column) {
  1038. this.excelBox = false;
  1039. this.$message.success("导入成功!");
  1040. if (this.detailData.id) {
  1041. this.getDetail(this.detailData.id);
  1042. }
  1043. done();
  1044. },
  1045. //修改提交触发
  1046. editCustomer() {
  1047. this.$refs["form"].validate((valid, done) => {
  1048. done();
  1049. if (valid) {
  1050. for (let i = 0; i < this.dataList.length; i++) {
  1051. if (!this.dataList[i].cname) {
  1052. return this.$message.error(
  1053. "请完善第" + Number(1 + i) + "行的姓名"
  1054. );
  1055. }
  1056. if (!this.dataList[i].idNumber) {
  1057. return this.$message.error(
  1058. "请完善第" + Number(1 + i) + "行的身份证号"
  1059. );
  1060. }
  1061. if (!this.dataList[i].rankStandard) {
  1062. return this.$message.error(
  1063. "请完善第" + Number(1 + i) + "行的职级标准"
  1064. );
  1065. }
  1066. }
  1067. submit({ ...this.form, salaryItemList: this.dataList })
  1068. .then(res => {
  1069. this.$message.success("保存成功");
  1070. this.form = res.data.data;
  1071. this.dataList = res.data.data.salaryItemList;
  1072. })
  1073. .finally(() => {});
  1074. } else {
  1075. return false;
  1076. }
  1077. });
  1078. },
  1079. derivation() {
  1080. window.open(
  1081. `/api/blade-school/salaryitem/export/template?${
  1082. this.website.tokenHeader
  1083. }=${getToken()}`
  1084. );
  1085. },
  1086. openExport() {
  1087. if (!this.form.id) {
  1088. return this.$message.error("请先保存数据");
  1089. }
  1090. window.open(
  1091. `/api/blade-school/salaryitem/export/teacher?${
  1092. this.website.tokenHeader
  1093. }=${getToken()}&pid=${this.form.id}`
  1094. );
  1095. },
  1096. importExcel() {
  1097. if (!this.form.id) {
  1098. return this.$message.error("请先保存数据");
  1099. }
  1100. this.excelOption.column.forEach(e => {
  1101. if (e.prop == "excelFile") {
  1102. e.data = {
  1103. id: this.form.id
  1104. };
  1105. }
  1106. });
  1107. this.excelBox = true;
  1108. },
  1109. //导出全部
  1110. exportAll() {
  1111. let opt = {
  1112. title: "工资条",
  1113. column: this.optionList.column,
  1114. data: this.dataList
  1115. };
  1116. this.$Export.excel({
  1117. title: opt.title,
  1118. columns: opt.column,
  1119. data: opt.data
  1120. });
  1121. },
  1122. //导出工资条
  1123. exportSalary() {
  1124. let data = [];
  1125. for (let item in this.optionList.column) {
  1126. switch (this.optionList.column[item].prop) {
  1127. case "salaryBase":
  1128. data.push(this.optionList.column[item]);
  1129. break;
  1130. case "workloadSalary":
  1131. data.push(this.optionList.column[item]);
  1132. break;
  1133. case "dailyAssessmentSalary":
  1134. data.push(this.optionList.column[item]);
  1135. break;
  1136. case "awardSalary":
  1137. data.push(this.optionList.column[item]);
  1138. break;
  1139. case "dutyAllowances":
  1140. data.push(this.optionList.column[item]);
  1141. break;
  1142. case "classTeacherSubsidy":
  1143. data.push(this.optionList.column[item]);
  1144. break;
  1145. case "subsidy":
  1146. data.push(this.optionList.column[item]);
  1147. break;
  1148. case "deductions":
  1149. data.push(this.optionList.column[item]);
  1150. break;
  1151. case "insuranceUnit":
  1152. data.push(this.optionList.column[item]);
  1153. break;
  1154. case "insurancePersonage":
  1155. data.push(this.optionList.column[item]);
  1156. break;
  1157. case "reservedFundsUnit":
  1158. data.push(this.optionList.column[item]);
  1159. break;
  1160. case "reservedFundsPersonage":
  1161. data.push(this.optionList.column[item]);
  1162. break;
  1163. case "salary":
  1164. data.push(this.optionList.column[item]);
  1165. break;
  1166. case "personageTaxes":
  1167. data.push(this.optionList.column[item]);
  1168. break;
  1169. case "fsalary":
  1170. data.push(this.optionList.column[item]);
  1171. break;
  1172. }
  1173. }
  1174. let opt = {
  1175. title: "工资条",
  1176. column: data,
  1177. data: this.dataList
  1178. };
  1179. this.$Export.excel({
  1180. title: opt.title,
  1181. columns: opt.column,
  1182. data: opt.data
  1183. });
  1184. },
  1185. //返回列表
  1186. backToList() {
  1187. this.$emit("goBack");
  1188. }
  1189. }
  1190. };
  1191. </script>
  1192. <style>
  1193. .headerCellClass {
  1194. color: #fff !important;
  1195. background: #a4cf57 !important;
  1196. }
  1197. </style>
  1198. <style lang="scss" scoped>
  1199. .trading-form ::v-deep .el-form-item {
  1200. margin-bottom: 0px !important;
  1201. }
  1202. ::v-deep .el-form-item__error {
  1203. display: none !important;
  1204. }
  1205. </style>