You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

584 lines
18 KiB

  1. <template>
  2. <view class="page">
  3. <view v-if="ready">
  4. <view class="item-title">基本信息</view>
  5. <l-input
  6. @input="setValue('WelfarePosition.EmpName', $event)"
  7. :value="getValue('WelfarePosition.EmpName')"
  8. :disabled="!edit"
  9. title="姓名"
  10. />
  11. <l-input
  12. @input="setValue('WelfarePosition.IdCardNo', $event)"
  13. :value="getValue('WelfarePosition.IdCardNo')"
  14. :disabled="!edit"
  15. title="身份证号"
  16. />
  17. <l-input
  18. @input="setValue('WelfarePosition.WageCardNo', $event)"
  19. :value="getValue('WelfarePosition.WageCardNo')"
  20. :disabled="!edit"
  21. title="工资卡号"
  22. />
  23. <l-input
  24. @input="setValue('WelfarePosition.PeopleType', $event)"
  25. :value="getValue('WelfarePosition.PeopleType')"
  26. :disabled="!edit"
  27. title="人员类别"
  28. />
  29. <l-input
  30. @input="setValue('WelfarePosition.PostType', $event)"
  31. :value="getValue('WelfarePosition.PostType')"
  32. :disabled="!edit"
  33. title="岗位等级"
  34. />
  35. <l-input
  36. @input="setValue('WelfarePosition.PayGrade', $event)"
  37. :value="getValue('WelfarePosition.PayGrade')"
  38. :disabled="!edit"
  39. title="薪级"
  40. />
  41. <l-input
  42. @input="setValue('WelfarePosition.TotalGrossPay', $event)"
  43. :value="getValue('WelfarePosition.TotalGrossPay')"
  44. :disabled="!edit"
  45. title="应发合计"
  46. />
  47. <view class="item-title">基本工资</view>
  48. <l-input
  49. @input="setValue('WelfarePosition.PostWage', $event)"
  50. :value="getValue('WelfarePosition.PostWage')"
  51. :disabled="!edit"
  52. title="岗位工资"
  53. />
  54. <l-input
  55. @input="setValue('WelfarePosition.PayGradeWage', $event)"
  56. :value="getValue('WelfarePosition.PayGradeWage')"
  57. :disabled="!edit"
  58. title="薪级工资"
  59. />
  60. <l-input
  61. @input="setValue('WelfarePosition.TenPercent', $event)"
  62. :value="getValue('WelfarePosition.TenPercent')"
  63. :disabled="!edit"
  64. title="百分之十"
  65. />
  66. <!-- <l-input
  67. @input="setValue('WelfarePosition.BasePay', $event)"
  68. :value="getValue('WelfarePosition.BasePay')"
  69. :disabled="!edit"
  70. title="小计"
  71. /> -->
  72. <view class="item-title">津贴补贴</view>
  73. <l-input
  74. @input="setValue('WelfarePosition.RoughEdgeAllowance', $event)"
  75. :value="getValue('WelfarePosition.RoughEdgeAllowance')"
  76. :disabled="!edit"
  77. title="艰边津贴"
  78. />
  79. <l-input
  80. @input="setValue('WelfarePosition.NationAllowance', $event)"
  81. :value="getValue('WelfarePosition.NationAllowance')"
  82. :disabled="!edit"
  83. title="民族津贴"
  84. />
  85. <l-input
  86. @input="setValue('WelfarePosition.TeachAllowance', $event)"
  87. :value="getValue('WelfarePosition.TeachAllowance')"
  88. :disabled="!edit"
  89. title="教师津贴"
  90. />
  91. <!-- <l-input
  92. @input="setValue('WelfarePosition.SubsidiesAllowances', $event)"
  93. :value="getValue('WelfarePosition.SubsidiesAllowances')"
  94. :disabled="!edit"
  95. title="小计"
  96. /> -->
  97. <l-input
  98. class="top-15"
  99. @input="setValue('WelfarePosition.BasicsPerformance', $event)"
  100. :value="getValue('WelfarePosition.BasicsPerformance')"
  101. :disabled="!edit"
  102. title="基础性绩效"
  103. />
  104. <l-input
  105. class="top-15"
  106. @input="setValue('WelfarePosition.GirlStaffSanitation', $event)"
  107. :value="getValue('WelfarePosition.GirlStaffSanitation')"
  108. :disabled="!edit"
  109. title="女职工卫生费"
  110. />
  111. <view class="item-title">改革性补贴</view>
  112. <l-input
  113. @input="setValue('WelfarePosition.Transportation', $event)"
  114. :value="getValue('WelfarePosition.Transportation')"
  115. :disabled="!edit"
  116. title="交通补贴"
  117. />
  118. <l-input
  119. @input="setValue('WelfarePosition.RealeState', $event)"
  120. :value="getValue('WelfarePosition.RealeState')"
  121. :disabled="!edit"
  122. title="物业补贴"
  123. />
  124. <l-input
  125. @input="setValue('WelfarePosition.WorkKeep', $event)"
  126. :value="getValue('WelfarePosition.WorkKeep')"
  127. :disabled="!edit"
  128. title="工改保留补贴"
  129. />
  130. <!-- <l-input
  131. @input="setValue('WelfarePosition.ReformSubsidySum', $event)"
  132. :value="getValue('WelfarePosition.ReformSubsidySum')"
  133. :disabled="!edit"
  134. title="小计"
  135. /> -->
  136. <l-input
  137. class="top-15"
  138. @input="setValue('WelfarePosition.HousingAllowance', $event)"
  139. :value="getValue('WelfarePosition.HousingAllowance')"
  140. :disabled="!edit"
  141. title="住房补贴"
  142. />
  143. <l-input
  144. class="top-15"
  145. @input="setValue('WelfarePosition.ProvidentFundPayment', $event)"
  146. :value="getValue('WelfarePosition.ProvidentFundPayment')"
  147. :disabled="!edit"
  148. title="公积金"
  149. />
  150. <l-input
  151. class="top-15"
  152. @input="setValue('WelfarePosition.AssessmentWages', $event)"
  153. :value="getValue('WelfarePosition.AssessmentWages')"
  154. :disabled="!edit"
  155. title="考核工资"
  156. />
  157. <!-- <l-input
  158. class="top-15"
  159. @input="setValue('WelfarePosition.TeacherAndTown', $event)"
  160. :value="getValue('WelfarePosition.TeacherAndTown')"
  161. :disabled="!edit"
  162. title="特级教师津贴和乡镇补贴"
  163. /> -->
  164. <view class="item-title">扣款</view>
  165. <l-input
  166. @input="setValue('WelfarePosition.DeductionsCombined', $event)"
  167. :value="getValue('WelfarePosition.DeductionsCombined')"
  168. :disabled="!edit"
  169. title="扣款合计"
  170. />
  171. <l-input
  172. @input="setValue('WelfarePosition.HousingFundAllowance', $event)"
  173. :value="getValue('WelfarePosition.HousingFundAllowance')"
  174. :disabled="!edit"
  175. title="(缴纳)公积金"
  176. />
  177. <l-input
  178. @input="setValue('WelfarePosition.LaborUnionWage', $event)"
  179. :value="getValue('WelfarePosition.LaborUnionWage')"
  180. :disabled="!edit"
  181. title="工会工费"
  182. />
  183. <l-input
  184. @input="setValue('WelfarePosition.PersonalIncomeTax', $event)"
  185. :value="getValue('WelfarePosition.PersonalIncomeTax')"
  186. :disabled="!edit"
  187. title="所得税"
  188. />
  189. <l-input
  190. @input="setValue('WelfarePosition.EndowmentInsurance', $event)"
  191. :value="getValue('WelfarePosition.EndowmentInsurance')"
  192. :disabled="!edit"
  193. title="养老保险"
  194. />
  195. <!-- <l-input
  196. @input="setValue('WelfarePosition.OccupationalAnnuities', $event)"
  197. :value="getValue('WelfarePosition.OccupationalAnnuities')"
  198. :disabled="!edit"
  199. title="职业年金"
  200. /> -->
  201. <l-input
  202. @input="setValue('WelfarePosition.MedicalInsurance', $event)"
  203. :value="getValue('WelfarePosition.MedicalInsurance')"
  204. :disabled="!edit"
  205. title="医疗保险"
  206. />
  207. <l-input
  208. @input="setValue('WelfarePosition.UnemploymentInsurance', $event)"
  209. :value="getValue('WelfarePosition.UnemploymentInsurance')"
  210. :disabled="!edit"
  211. title="失业保险"
  212. />
  213. <l-input
  214. @input="setValue('WelfarePosition.Other', $event)"
  215. :value="getValue('WelfarePosition.Other')"
  216. :disabled="!edit"
  217. title="其他"
  218. />
  219. <!-- <l-textarea
  220. @input="setValue('WelfarePosition.Other', $event)"
  221. :value="getValue('WelfarePosition.Other')"
  222. :disabled="!edit"
  223. title="其他"
  224. placeholder="不可编辑状态"
  225. /> -->
  226. <!-- <l-input
  227. class="top-15"
  228. @input="setValue('WelfarePosition.FiscalDirect', $event)"
  229. :value="getValue('WelfarePosition.FiscalDirect')"
  230. :disabled="!edit"
  231. title="财政直达"
  232. />
  233. <l-input
  234. class="top-15"
  235. @input="setValue('WelfarePosition.BankWithholding', $event)"
  236. :value="getValue('WelfarePosition.BankWithholding')"
  237. :disabled="!edit"
  238. title="银行代扣"
  239. /> -->
  240. <l-input
  241. class="top-15"
  242. @input="setValue('WelfarePosition.NetCombined', $event)"
  243. :value="getValue('WelfarePosition.NetCombined')"
  244. :disabled="!edit"
  245. title="实发合计"
  246. />
  247. <!-- <l-input
  248. class="top-15"
  249. @input="setValue('WelfarePosition.CreateUser', $event)"
  250. :value="getValue('WelfarePosition.CreateUser')"
  251. :disabled="!edit"
  252. title="创建用户"
  253. />
  254. <l-datetime-picker
  255. class="top-15"
  256. @input="setValue('WelfarePosition.CreateTime', $event)"
  257. :value="getValue('WelfarePosition.CreateTime')"
  258. :disabled="!edit"
  259. title="创建时间"
  260. /> -->
  261. <l-input
  262. class="top-15"
  263. @input="setValue('WelfarePosition.IssueMonth', $event)"
  264. :value="getValue('WelfarePosition.IssueMonth')"
  265. :disabled="!edit"
  266. title="发放月份"
  267. />
  268. <l-input
  269. class="top-15"
  270. @input="setValue('WelfarePosition.IssueYear', $event)"
  271. :value="getValue('WelfarePosition.IssueYear')"
  272. :disabled="!edit"
  273. title="发放年份"
  274. />
  275. <!-- <l-select
  276. @input="setValue('JournalSend.JTypeId', $event)"
  277. :value="getValue('JournalSend.JTypeId')"
  278. :disabled="!edit"
  279. :range="dataSource.JournalSend.JTypeId"
  280. title="日志类型"
  281. />
  282. <l-organize-picker
  283. @input="setValue('JournalSend.JReceiveId', $event)"
  284. :value="getValue('JournalSend.JReceiveId')"
  285. :readonly="!edit"
  286. type="user"
  287. title="接收人"
  288. />
  289. <l-textarea
  290. @input="setValue('JournalSend.JContent', $event)"
  291. :value="getValue('JournalSend.JContent')"
  292. :readonly="!edit"
  293. title="日志内容"
  294. /> -->
  295. </view>
  296. <!-- <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
  297. <l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block>
  298. 提交保存
  299. </l-button>
  300. <l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
  301. 编辑本页
  302. </l-button>
  303. <l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block>
  304. 取消编辑
  305. </l-button>
  306. <l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
  307. 删除
  308. </l-button>
  309. </view> -->
  310. </view>
  311. </template>
  312. <script>
  313. /*
  314. * 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
  315. * Copyright (c) 2013-2020 上海力软信息技术有限公司
  316. * 创建人:超级管理员
  317. * 日 期:2020-10-16 15:39
  318. * 描 述:工作日志
  319. */
  320. /**
  321. * 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
  322. * 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
  323. * { "path": "pages/WelfarePositionSend/single", "style": { "navigationBarTitleText": "表单详情页" } }
  324. *
  325. * (navigationBarTitleText 字段为本页面的标题文本,可以修改)
  326. * (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
  327. */
  328. import get from 'lodash/get'
  329. import set from 'lodash/set'
  330. import moment from 'moment'
  331. import customPageMixins from '@/common/custompage.js'
  332. export default {
  333. mixins: [customPageMixins],
  334. data() {
  335. return {
  336. // 页面相关参数
  337. id: null,
  338. mode: null,
  339. edit: null,
  340. ready: false,
  341. // 表单数据
  342. current: {},
  343. origin: {},
  344. // 表单项数据结构
  345. scheme: {
  346. WelfarePosition: {
  347. // JTitle: { type: 'text', title: '日志主题' },
  348. // JTypeId: { type: 'select', title: '日志类型', dataSource: '0' },
  349. // JReceiveId: { type: 'organize', title: '接收人', dataType: 'user' },
  350. // JContent: { type: 'textarea', title: '日志内容' },
  351. // Id
  352. // 序号No
  353. No: { type: 'text', title: '序号' },
  354. // 姓名EmpName
  355. EmpName: { type: 'text', title: '姓名' },
  356. // 账号/身份证号IdCardNo
  357. IdCardNo: { type: 'text', title: '账号/身份证号' },
  358. // 人员类别PeopleType
  359. PeopleType: { type: 'text', title: '人员类别' },
  360. // 岗位等级PostType
  361. PostType: { type: 'text', title: '岗位等级'},
  362. // 薪级PayGrade
  363. PayGrade: { type: 'text', title: '薪级'},
  364. // 应发合计TotalGrossPay
  365. TotalGrossPay: { type: 'text', title: '应发合计'},
  366. // 岗位工资PostWage
  367. PostWage: { type: 'text', title: '岗位工资'},
  368. // 薪级工资PayGradeWage
  369. PayGradeWage: { type: 'text', title: '薪级工资'},
  370. // 百分之十TenPercent
  371. TenPercent: { type: 'text', title: '百分之十'},
  372. // 基本工资小计BasePay
  373. // BasePay: { type: 'text', title: '基本工资小计'},
  374. // 艰边津贴RoughEdgeAllowance
  375. RoughEdgeAllowance: { type: 'text', title: '艰边津贴'},
  376. // 民族津贴NationAllowance
  377. NationAllowance: { type: 'text', title: '民族津贴'},
  378. // 教师津贴TeachAllowance
  379. TeachAllowance: { type: 'text', title: '教师津贴'},
  380. // 津贴补贴小计SubsidiesAllowances
  381. // SubsidiesAllowances: { type: 'text', title: '津贴补贴小计'},
  382. // 基础性绩效BasicsPerformance
  383. BasicsPerformance: { type: 'text', title: '基础性绩效'},
  384. // 女职工卫生费GirlStaffSanitation
  385. GirlStaffSanitation: { type: 'text', title: 'http://cyzjzx.gnway.cc:29904'},
  386. // 交通补贴Transportation
  387. Transportation: { type: 'text', title: '交通补贴'},
  388. // 物业补贴RealeState
  389. BasicsPerformance: { type: 'text', title: '基础性绩效'},
  390. // 工改保留补贴WorkKeep
  391. WorkKeep: { type: 'text', title: '工改保留补贴'},
  392. // 改革性补贴小计ReformSubsidySum
  393. // ReformSubsidySum: { type: 'text', title: '改革性补贴小计'},
  394. // 住房补贴HousingAllowance
  395. HousingAllowance: { type: 'text', title: '住房补贴'},
  396. // 公积金ProvidentFundPayment
  397. ProvidentFundPayment: { type: 'text', title: '公积金'},
  398. // 考核工资AssessmentWages
  399. AssessmentWages: { type: 'text', title: '考核工资'},
  400. // 特级教师津贴和乡镇补贴TeacherAndTown
  401. // TeacherAndTown: { type: 'text', title: '特级教师津贴和乡镇补贴'},
  402. // 扣款小计DeductionsCombined
  403. DeductionsCombined: { type: 'text', title: '扣款合计'},
  404. // 公积金ProvidentFundPayment
  405. HousingFundAllowance: { type: 'text', title: '(缴纳)公积金'},
  406. // 工会工费LaborUnionWage
  407. LaborUnionWage: { type: 'text', title: '工会工费'},
  408. // 个人所得税PersonalIncomeTax
  409. PersonalIncomeTax: { type: 'text', title: '所得税'},
  410. // 养老保险EndowmentInsurance
  411. EndowmentInsurance: { type: 'text', title: '养老保险'},
  412. // 职业年金OccupationalAnnuities
  413. // OccupationalAnnuities: { type: 'text', title: '职业年金'},
  414. // 医疗保险MedicalInsurance
  415. MedicalInsurance: { type: 'text', title: '医疗保险'},
  416. // 失业保险UnemploymentInsurance
  417. UnemploymentInsurance: { type: 'text', title: '失业保险'},
  418. // 其他Other
  419. Other: { type: 'text', title: '其他'},
  420. // 财政直达FiscalDirect
  421. // FiscalDirect: { type: 'text', title: '财政直达'},
  422. // 银行代扣BankWithholding
  423. // BankWithholding: { type: 'text', title: '银行代扣'},
  424. // 实发合计NetCombined
  425. NetCombined: { type: 'text', title: '实发合计'},
  426. // 工资卡号WageCardNo
  427. WageCardNo: { type: 'text', title: '工资卡号'},
  428. // CreateUser
  429. // CreateUser: { type: 'text', title: '创建用户'},
  430. // CreateTime
  431. // CreateTime: { type: 'text', title: '创建时间'},
  432. // UpdateUser
  433. // UpdateTime
  434. // 发放月份IssueMonth
  435. IssueMonth: { type: 'text', title: '发放月份'},
  436. // 发放年份IssueYear
  437. IssueYear: { type: 'text', title: '发放年份'},
  438. },
  439. },
  440. // 数据源
  441. dataSource: {
  442. JournalSend: {
  443. JTypeId: [],
  444. },
  445. }
  446. }
  447. },
  448. async onLoad({ type, id }) {
  449. await this.init(type, id)
  450. },
  451. methods: {
  452. // 页面初始化
  453. async init(type, id) {
  454. this.LOADING('加载数据中...')
  455. this.id = id
  456. this.mode = type
  457. // this.edit = ['create', 'edit'].includes(this.mode)
  458. // 拉取表单数据,同时拉取所有来自数据源的选单数据
  459. await Promise.all([
  460. () => {}
  461. ])
  462. await this.fetchForm()
  463. this.ready = true
  464. this.HIDE_LOADING()
  465. },
  466. // 加载表单数据
  467. async fetchForm() {
  468. if (this.mode === 'create') {
  469. this.origin = await this.getDefaultForm()
  470. } else {
  471. const result = await this.HTTP_GET('learun/adms/WelfarePosition/form', this.id)
  472. this.origin = await this.formatFormData(result)
  473. }
  474. this.current = this.COPY(this.origin)
  475. },
  476. // 点击 「编辑」、「重置」、「保存」、「删除」 按钮
  477. async action(type) {
  478. switch (type) {
  479. case 'edit':
  480. this.edit = true
  481. break
  482. case 'reset':
  483. this.current = this.COPY(this.origin)
  484. this.edit = false
  485. break
  486. case 'save':
  487. const verifyResult = this.verifyForm()
  488. if (verifyResult.length > 0) {
  489. this.CONFIRM('表单验证失败', verifyResult.join('\n'))
  490. return
  491. }
  492. if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) {
  493. return
  494. }
  495. this.LOADING('正在提交...')
  496. const postData = await this.getPostData(this.id)
  497. this.HTTP_POST('learun/adms/WelfarePosition/save', postData, '表单提交保存失败').then(success => {
  498. this.HIDE_LOADING()
  499. if (!success) {
  500. return
  501. }
  502. this.EMIT('EducationalAdministrationJournalSend-list-change')
  503. this.NAV_BACK()
  504. this.TOAST('提交保存成功')
  505. })
  506. break
  507. case 'delete':
  508. if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) {
  509. return
  510. }
  511. this.LOADING('提交删除中...')
  512. this.HTTP_POST('learun/adms/WelfarePosition/delete', this.id, '删除失败').then(success => {
  513. this.HIDE_LOADING()
  514. if (!success) {
  515. return
  516. }
  517. this.EMIT('EducationalAdministrationJournalSend-list-change')
  518. this.NAV_BACK()
  519. this.this.TOAST('删除成功', 'success')
  520. })
  521. break
  522. default: break
  523. }
  524. },
  525. // 获取表单值
  526. getValue(path) {
  527. return get(this.current, path)
  528. },
  529. // 设置表单值
  530. setValue(path, val) {
  531. set(this.current, path, val)
  532. }
  533. }
  534. }
  535. </script>
  536. <style>
  537. .item-title{
  538. color: #000;
  539. font-size: 16px;
  540. line-height: 36px;
  541. padding-left: 15px;
  542. }
  543. .top-15{
  544. margin-top: 8px;
  545. }
  546. </style>