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.

single.vue 18 KiB

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