@@ -1090,11 +1090,47 @@ | |||
"style": { | |||
"navigationBarTitleText": "详情" | |||
} | |||
}, | |||
// 财政工资条 | |||
{ | |||
"path": "pages/Payslip/Payslip/list", | |||
"style": { | |||
"navigationBarTitleText": "财政工资条" | |||
} | |||
}, | |||
{ | |||
"path": "pages/Payslip/Payslip/single", | |||
"style": { | |||
"navigationBarTitleText": "详情" | |||
} | |||
}, | |||
// 外聘工资条 | |||
{ | |||
"path": "pages/Payslip/recruitPayslip/list", | |||
"style": { | |||
"navigationBarTitleText": "外聘工资条" | |||
} | |||
}, | |||
{ | |||
"path": "pages/Payslip/recruitPayslip/single", | |||
"style": { | |||
"navigationBarTitleText": "详情" | |||
} | |||
}, | |||
// 公益性岗位工资条 | |||
{ | |||
"path": "pages/Payslip/welfarePayslip/list", | |||
"style": { | |||
"navigationBarTitleText": "公益性岗位" | |||
} | |||
}, | |||
{ | |||
"path": "pages/Payslip/welfarePayslip/single", | |||
"style": { | |||
"navigationBarTitleText": "详情" | |||
} | |||
} | |||
], | |||
// 全局样式 | |||
@@ -0,0 +1,268 @@ | |||
<template> | |||
<view class="page"> | |||
<!-- 主列表页 --> | |||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;"> | |||
<!-- 顶部条目/分页信息栏 --> | |||
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner> | |||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||
<l-customlist :tips="loadState" showTips> | |||
<!-- 单条记录 --> | |||
<view class="customlist-item" v-for="item of list" :key="item.F_InvoiceId"> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">发放年份:</text> | |||
{{ displayListItem(item, 'IssueYear') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">发放月份:</text> | |||
{{ displayListItem(item, 'IssueMonth') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">应发合计:</text> | |||
{{ displayListItem(item, 'TotalGrossPay') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">实发合计:</text> | |||
{{ displayListItem(item, 'NetCombined') }} | |||
</view> | |||
<!-- 操作按钮组 --> | |||
<l-customlist-action @view="action('view', item)" @edit="action('edit', item)" :showEdit="false" /> | |||
</view> | |||
</l-customlist> | |||
</l-scroll-list> | |||
</view> | |||
<!-- 关闭筛选栏按钮 --> | |||
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose"> | |||
<l-icon type="pullright" color="blue" /> | |||
</view> | |||
<!-- 侧边栏 --> | |||
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> | |||
<view v-if="ready" class="padding"> | |||
<l-input v-model="queryData.IssueYear" @change="searchChange()" title="年份" placeholder="按年份筛选" /> | |||
<l-input v-model="queryData.IssueMonth" @change="searchChange()" title="月份" placeholder="按月份筛选" /> | |||
<l-input v-model="queryData.EmpName" @change="searchChange()" title="姓名" placeholder="按姓名筛选" /> | |||
<l-input v-model="queryData.PeopleType" @change="searchChange()" title="人员类别" placeholder="按人员类别筛选" /> | |||
<view class="padding-tb"> | |||
<l-button @click="reset" line="orange" class="block" block>重置筛选条件</l-button> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
<!-- 添加按钮 --> | |||
<!-- <l-customlist-add v-if="!sideOpen" @click="action('create')" /> --> | |||
</view> | |||
</template> | |||
<script> | |||
import moment from 'moment' | |||
import get from 'lodash/get' | |||
import set from 'lodash/set' | |||
import pickBy from 'lodash/pickBy' | |||
import mapValues from 'lodash/mapValues' | |||
export default { | |||
data() { | |||
return { | |||
// 表单结构 | |||
scheme: { | |||
// F_CustomerId: { type: 'select', dataSource: '1', dataSourceId: 'crmCustomer,f_fullname,f_customerid' }, | |||
// F_InvoiceContent: { type: 'texteditor' }, | |||
// 发放年份IssueYear | |||
IssueYear: { type: 'text' }, | |||
// 发放月份IssueMonth | |||
IssueMonth: { type: 'text' }, | |||
// 应发合计TotalGrossPay | |||
TotalGrossPay: { type: 'text' }, | |||
// 实发合计NetCombined | |||
NetCombined: { type: 'text' }, | |||
}, | |||
// 筛选菜单值 | |||
searchData: {}, | |||
defaultQueryData: {}, | |||
queryData: { | |||
keyword: '' | |||
}, | |||
// 数据源 | |||
dataSource: { | |||
F_CustomerId: [] | |||
}, | |||
// 页面相关参数 | |||
ready: false, | |||
tips: '加载中…', | |||
loadState: '向下翻以加载更多', | |||
sideOpen: false, | |||
// 列表条目与分页信息 | |||
page: 1, | |||
total: 2, | |||
list: [] | |||
} | |||
}, | |||
async onLoad() { | |||
await this.init() | |||
}, | |||
onUnload() { | |||
this.OFF('invoice-list-change') | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init() { | |||
this.ON('invoice-list-change', this.refreshList) | |||
await Promise.all([ | |||
// 加载 F_CustomerId 字段的数据源:客户信息 | |||
// this.FETCH_DATASOURCE('crmCustomer').then(result => { | |||
// this.dataSource.F_CustomerId = result.data.map(t => ({ text: t.f_fullname, value: t.f_customerid })) | |||
// }), | |||
// 拉取列表信息 | |||
this.fetchList() | |||
]) | |||
this.defaultQueryData = this.COPY(this.queryData) | |||
this.ready = true | |||
}, | |||
// 拉取列表 | |||
async fetchList(isConcat=true) { | |||
if (this.page > this.total) { | |||
return | |||
} | |||
const result = await this.HTTP_GET( | |||
'learun/adms/WageSchedule/getlist', | |||
{ | |||
pagination: { rows: 10, page: this.page, sidx: 'CreateTime', sord: 'DESC' }, | |||
queryJson: JSON.stringify(this.searchData) | |||
}, | |||
'加载数据时出错' | |||
) | |||
if (!result) { | |||
return | |||
} | |||
this.total = result.total | |||
this.page = result.page + 1 | |||
this.list = isConcat?this.list.concat(result.rows):result.rows; | |||
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | |||
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | |||
}, | |||
// 刷新清空列表 | |||
async refreshList(isConcat=true) { | |||
this.page = 1 | |||
this.total = 2 | |||
this.list = [] | |||
await this.fetchList(isConcat); | |||
}, | |||
// 列表下拉 | |||
pullDown() { | |||
this.refreshList().then(() => { | |||
this.$refs.list.stopPullDown() | |||
}) | |||
}, | |||
// 点击「编辑」、「查看」、「添加」、「删除」按钮 | |||
action(type, item) { | |||
switch (type) { | |||
default: | |||
case 'create': | |||
this.NAV_TO('./single?type=create') | |||
return | |||
case 'view': | |||
this.NAV_TO('./single?type=view&&id='+item.Id, item, true) | |||
return | |||
case 'edit': | |||
this.NAV_TO('./single?type=edit', item, true) | |||
return | |||
} | |||
}, | |||
// 显示列表中的标题项 | |||
displayListItem(item, field) { | |||
const fieldItem = this.scheme[field] | |||
const value = item[field] | |||
switch (fieldItem.type) { | |||
case 'currentInfo': | |||
case 'organize': | |||
switch (fieldItem.dataType) { | |||
case 'user': | |||
return get(this.GET_GLOBAL('user'), `${value}.name`, '') | |||
case 'department': | |||
return get(this.GET_GLOBAL('department'), `${value}.name`, '') | |||
case 'company': | |||
return get(this.GET_GLOBAL('company'), `${value}.name`, '') | |||
default: | |||
return value || '' | |||
} | |||
case 'radio': | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === value) | |||
return get(selectItem, 'text', '') | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
return '' | |||
} | |||
const checkboxItems = value.split(',') | |||
return this.dataSource[field] | |||
.filter(t => checkboxItems.includes(t.value)) | |||
.map(t => t.text) | |||
.join(',') | |||
case 'datetime': | |||
if (!value) { | |||
return '' | |||
} | |||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm') | |||
default: | |||
return value || '' | |||
} | |||
}, | |||
// 设置搜索条件 | |||
async searchChange() { | |||
const result = {} | |||
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) | |||
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | |||
this.searchData = result | |||
await this.refreshList(false); | |||
}, | |||
// 点击「清空搜索条件」按钮 | |||
reset() { | |||
this.queryData = this.COPY(this.defaultQueryData) | |||
this.searchChange() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
@import '~@/common/css/sidepage.less'; | |||
@import '~@/common/css/customlist.less'; | |||
</style> |
@@ -0,0 +1,560 @@ | |||
<template> | |||
<view class="page"> | |||
<view v-if="ready"> | |||
<view class="item-title">基本信息</view> | |||
<l-input | |||
@input="setValue('WageSchedule.EmpName', $event)" | |||
:value="getValue('WageSchedule.EmpName')" | |||
:disabled="!edit" | |||
title="姓名" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.IdCardNo', $event)" | |||
:value="getValue('WageSchedule.IdCardNo')" | |||
:disabled="!edit" | |||
title="身份证号" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PeopleType', $event)" | |||
:value="getValue('WageSchedule.PeopleType')" | |||
:disabled="!edit" | |||
title="人员类别" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PostType', $event)" | |||
:value="getValue('WageSchedule.PostType')" | |||
:disabled="!edit" | |||
title="岗位等级" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PayGrade', $event)" | |||
:value="getValue('WageSchedule.PayGrade')" | |||
:disabled="!edit" | |||
title="薪级" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TotalGrossPay', $event)" | |||
:value="getValue('WageSchedule.TotalGrossPay')" | |||
:disabled="!edit" | |||
title="应发合计" | |||
/> | |||
<view class="item-title">基本工资</view> | |||
<l-input | |||
@input="setValue('WageSchedule.PostWage', $event)" | |||
:value="getValue('WageSchedule.PostWage')" | |||
:disabled="!edit" | |||
title="岗位工资" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PayGradeWage', $event)" | |||
:value="getValue('WageSchedule.PayGradeWage')" | |||
:disabled="!edit" | |||
title="薪级工资" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TenPercent', $event)" | |||
:value="getValue('WageSchedule.TenPercent')" | |||
:disabled="!edit" | |||
title="百分之十" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.BasePay', $event)" | |||
:value="getValue('WageSchedule.BasePay')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<view class="item-title">津贴补贴</view> | |||
<l-input | |||
@input="setValue('WageSchedule.RoughEdgeAllowance', $event)" | |||
:value="getValue('WageSchedule.RoughEdgeAllowance')" | |||
:disabled="!edit" | |||
title="艰边津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.NationAllowance', $event)" | |||
:value="getValue('WageSchedule.NationAllowance')" | |||
:disabled="!edit" | |||
title="民族津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TeachAllowance', $event)" | |||
:value="getValue('WageSchedule.TeachAllowance')" | |||
:disabled="!edit" | |||
title="教师津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.SubsidiesAllowances', $event)" | |||
:value="getValue('WageSchedule.SubsidiesAllowances')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.BasicsPerformance', $event)" | |||
:value="getValue('WageSchedule.BasicsPerformance')" | |||
:disabled="!edit" | |||
title="基础性绩效" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.GirlStaffSanitation', $event)" | |||
:value="getValue('WageSchedule.GirlStaffSanitation')" | |||
:disabled="!edit" | |||
title="女职工卫生费" | |||
/> | |||
<view class="item-title">改革性补贴</view> | |||
<l-input | |||
@input="setValue('WageSchedule.Transportation', $event)" | |||
:value="getValue('WageSchedule.Transportation')" | |||
:disabled="!edit" | |||
title="交通补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.RealeState', $event)" | |||
:value="getValue('WageSchedule.RealeState')" | |||
:disabled="!edit" | |||
title="物业补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.WorkKeep', $event)" | |||
:value="getValue('WageSchedule.WorkKeep')" | |||
:disabled="!edit" | |||
title="工改保留补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.ReformSubsidySum', $event)" | |||
:value="getValue('WageSchedule.ReformSubsidySum')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.HousingAllowance', $event)" | |||
:value="getValue('WageSchedule.HousingAllowance')" | |||
:disabled="!edit" | |||
title="住房补贴" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.HousingFundAllowance', $event)" | |||
:value="getValue('WageSchedule.HousingFundAllowance')" | |||
:disabled="!edit" | |||
title="住房公积金" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.TeacherAndTown', $event)" | |||
:value="getValue('WageSchedule.TeacherAndTown')" | |||
:disabled="!edit" | |||
title="特级教师津贴和乡镇补贴" | |||
/> | |||
<view class="item-title">扣款</view> | |||
<l-input | |||
@input="setValue('WageSchedule.DeductionsSubtotal', $event)" | |||
:value="getValue('WageSchedule.DeductionsSubtotal')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.AccumulationFund', $event)" | |||
:value="getValue('WageSchedule.AccumulationFund')" | |||
:disabled="!edit" | |||
title="公积金" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.LaborUnionWage', $event)" | |||
:value="getValue('WageSchedule.LaborUnionWage')" | |||
:disabled="!edit" | |||
title="工会工费" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PersonalIncomeTax', $event)" | |||
:value="getValue('WageSchedule.PersonalIncomeTax')" | |||
:disabled="!edit" | |||
title="个人所得税" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.EndowmentInsurance', $event)" | |||
:value="getValue('WageSchedule.EndowmentInsurance')" | |||
:disabled="!edit" | |||
title="养老保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.OccupationalAnnuities', $event)" | |||
:value="getValue('WageSchedule.OccupationalAnnuities')" | |||
:disabled="!edit" | |||
title="职业年金" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.MedicalInsurance', $event)" | |||
:value="getValue('WageSchedule.MedicalInsurance')" | |||
:disabled="!edit" | |||
title="医疗保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.UnemploymentInsurance', $event)" | |||
:value="getValue('WageSchedule.UnemploymentInsurance')" | |||
:disabled="!edit" | |||
title="失业保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.Other', $event)" | |||
:value="getValue('WageSchedule.Other')" | |||
:disabled="!edit" | |||
title="其他" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.FiscalDirect', $event)" | |||
:value="getValue('WageSchedule.FiscalDirect')" | |||
:disabled="!edit" | |||
title="财政直达" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.BankWithholding', $event)" | |||
:value="getValue('WageSchedule.BankWithholding')" | |||
:disabled="!edit" | |||
title="银行代扣" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.NetCombined', $event)" | |||
:value="getValue('WageSchedule.NetCombined')" | |||
:disabled="!edit" | |||
title="实发合计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.WageCardNo', $event)" | |||
:value="getValue('WageSchedule.WageCardNo')" | |||
:disabled="!edit" | |||
title="工资卡号" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.CreateUser', $event)" | |||
:value="getValue('WageSchedule.CreateUser')" | |||
:disabled="!edit" | |||
title="创建用户" | |||
/> | |||
<l-datetime-picker | |||
class="top-15" | |||
@input="setValue('WageSchedule.CreateTime', $event)" | |||
:value="getValue('WageSchedule.CreateTime')" | |||
:disabled="!edit" | |||
title="创建时间" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.IssueMonth', $event)" | |||
:value="getValue('WageSchedule.IssueMonth')" | |||
:disabled="!edit" | |||
title="发放月份" | |||
/> | |||
<!-- <l-select | |||
@input="setValue('JournalSend.JTypeId', $event)" | |||
:value="getValue('JournalSend.JTypeId')" | |||
:disabled="!edit" | |||
:range="dataSource.JournalSend.JTypeId" | |||
title="日志类型" | |||
/> | |||
<l-organize-picker | |||
@input="setValue('JournalSend.JReceiveId', $event)" | |||
:value="getValue('JournalSend.JReceiveId')" | |||
:readonly="!edit" | |||
type="user" | |||
title="接收人" | |||
/> | |||
<l-textarea | |||
@input="setValue('JournalSend.JContent', $event)" | |||
:value="getValue('JournalSend.JContent')" | |||
:readonly="!edit" | |||
title="日志内容" | |||
/> --> | |||
</view> | |||
<!-- <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | |||
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | |||
提交保存 | |||
</l-button> | |||
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> | |||
编辑本页 | |||
</l-button> | |||
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> | |||
取消编辑 | |||
</l-button> | |||
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block> | |||
删除 | |||
</l-button> | |||
</view> --> | |||
</view> | |||
</template> | |||
<script> | |||
/* | |||
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 上海力软信息技术有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-10-16 15:39 | |||
* 描 述:工作日志 | |||
*/ | |||
/** | |||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||
* { "path": "pages/EducationalAdministration/JournalSend/single", "style": { "navigationBarTitleText": "表单详情页" } } | |||
* | |||
* (navigationBarTitleText 字段为本页面的标题文本,可以修改) | |||
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) | |||
*/ | |||
import get from 'lodash/get' | |||
import set from 'lodash/set' | |||
import moment from 'moment' | |||
import customPageMixins from '@/common/custompage.js' | |||
export default { | |||
mixins: [customPageMixins], | |||
data() { | |||
return { | |||
// 页面相关参数 | |||
id: null, | |||
mode: null, | |||
edit: null, | |||
ready: false, | |||
// 表单数据 | |||
current: {}, | |||
origin: {}, | |||
// 表单项数据结构 | |||
scheme: { | |||
WageSchedule: { | |||
// JTitle: { type: 'text', title: '日志主题' }, | |||
// JTypeId: { type: 'select', title: '日志类型', dataSource: '0' }, | |||
// JReceiveId: { type: 'organize', title: '接收人', dataType: 'user' }, | |||
// JContent: { type: 'textarea', title: '日志内容' }, | |||
// Id | |||
// 序号No | |||
No: { type: 'text', title: '序号' }, | |||
// 姓名EmpName | |||
EmpName: { type: 'text', title: '姓名' }, | |||
// 账号/身份证号IdCardNo | |||
IdCardNo: { type: 'text', title: '账号/身份证号' }, | |||
// 人员类别PeopleType | |||
PeopleType: { type: 'text', title: '人员类别' }, | |||
// 岗位等级PostType | |||
PostType: { type: 'text', title: '岗位等级'}, | |||
// 薪级PayGrade | |||
PayGrade: { type: 'text', title: '薪级'}, | |||
// 应发合计TotalGrossPay | |||
TotalGrossPay: { type: 'text', title: '应发合计'}, | |||
// 岗位工资PostWage | |||
PostWage: { type: 'text', title: '岗位工资'}, | |||
// 薪级工资PayGradeWage | |||
PayGradeWage: { type: 'text', title: '薪级工资'}, | |||
// 百分之十TenPercent | |||
TenPercent: { type: 'text', title: '百分之十'}, | |||
// 基本工资小计BasePay | |||
BasePay: { type: 'text', title: '基本工资小计'}, | |||
// 艰边津贴RoughEdgeAllowance | |||
RoughEdgeAllowance: { type: 'text', title: '艰边津贴'}, | |||
// 民族津贴NationAllowance | |||
NationAllowance: { type: 'text', title: '民族津贴'}, | |||
// 教师津贴TeachAllowance | |||
TeachAllowance: { type: 'text', title: '教师津贴'}, | |||
// 津贴补贴小计SubsidiesAllowances | |||
SubsidiesAllowances: { type: 'text', title: '津贴补贴小计'}, | |||
// 基础性绩效BasicsPerformance | |||
BasicsPerformance: { type: 'text', title: '基础性绩效'}, | |||
// 女职工卫生费GirlStaffSanitation | |||
GirlStaffSanitation: { type: 'text', title: 'http://cyzjzx.gnway.cc:29904'}, | |||
// 交通补贴Transportation | |||
Transportation: { type: 'text', title: '交通补贴'}, | |||
// 物业补贴RealeState | |||
BasicsPerformance: { type: 'text', title: '基础性绩效'}, | |||
// 工改保留补贴WorkKeep | |||
WorkKeep: { type: 'text', title: '工改保留补贴'}, | |||
// 改革性补贴小计ReformSubsidySum | |||
ReformSubsidySum: { type: 'text', title: '改革性补贴小计'}, | |||
// 住房补贴HousingAllowance | |||
HousingAllowance: { type: 'text', title: '住房补贴'}, | |||
// 住房公积金HousingFundAllowance | |||
HousingFundAllowance: { type: 'text', title: '住房公积金'}, | |||
// 特级教师津贴和乡镇补贴TeacherAndTown | |||
TeacherAndTown: { type: 'text', title: '特级教师津贴和乡镇补贴'}, | |||
// 扣款小计DeductionsSubtotal | |||
DeductionsSubtotal: { type: 'text', title: '扣款小计'}, | |||
// 公积金AccumulationFund | |||
AccumulationFund: { type: 'text', title: '公积金'}, | |||
// 工会工费LaborUnionWage | |||
LaborUnionWage: { type: 'text', title: '工会工费'}, | |||
// 个人所得税PersonalIncomeTax | |||
PersonalIncomeTax: { type: 'text', title: '个人所得税'}, | |||
// 养老保险EndowmentInsurance | |||
EndowmentInsurance: { type: 'text', title: '养老保险'}, | |||
// 职业年金OccupationalAnnuities | |||
OccupationalAnnuities: { type: 'text', title: '职业年金'}, | |||
// 医疗保险MedicalInsurance | |||
MedicalInsurance: { type: 'text', title: '医疗保险'}, | |||
// 失业保险UnemploymentInsurance | |||
UnemploymentInsurance: { type: 'text', title: '失业保险'}, | |||
// 其他Other | |||
Other: { type: 'text', title: '其他'}, | |||
// 财政直达FiscalDirect | |||
FiscalDirect: { type: 'text', title: '财政直达'}, | |||
// 银行代扣BankWithholding | |||
BankWithholding: { type: 'text', title: '银行代扣'}, | |||
// 实发合计NetCombined | |||
NetCombined: { type: 'text', title: '实发合计'}, | |||
// 工资卡号WageCardNo | |||
WageCardNo: { type: 'text', title: '工资卡号'}, | |||
// CreateUser | |||
// CreateTime | |||
// UpdateUser | |||
// UpdateTime | |||
// 发放月份IssueMonth | |||
IssueMonth: { type: 'text', title: '发放月份'}, | |||
// 发放年份IssueYear | |||
IssueYear: { type: 'text', title: '发放年份'}, | |||
}, | |||
}, | |||
// 数据源 | |||
dataSource: { | |||
JournalSend: { | |||
JTypeId: [], | |||
}, | |||
} | |||
} | |||
}, | |||
async onLoad({ type, id }) { | |||
await this.init(type, id) | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init(type, id) { | |||
this.LOADING('加载数据中...') | |||
this.id = id | |||
this.mode = type | |||
// this.edit = ['create', 'edit'].includes(this.mode) | |||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | |||
await Promise.all([ | |||
() => {} | |||
]) | |||
await this.fetchForm() | |||
this.ready = true | |||
this.HIDE_LOADING() | |||
}, | |||
// 加载表单数据 | |||
async fetchForm() { | |||
if (this.mode === 'create') { | |||
this.origin = await this.getDefaultForm() | |||
} else { | |||
const result = await this.HTTP_GET('learun/adms/WageSchedule/form', this.id) | |||
this.origin = await this.formatFormData(result) | |||
} | |||
this.current = this.COPY(this.origin) | |||
}, | |||
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮 | |||
async action(type) { | |||
switch (type) { | |||
case 'edit': | |||
this.edit = true | |||
break | |||
case 'reset': | |||
this.current = this.COPY(this.origin) | |||
this.edit = false | |||
break | |||
case 'save': | |||
const verifyResult = this.verifyForm() | |||
if (verifyResult.length > 0) { | |||
this.CONFIRM('表单验证失败', verifyResult.join('\n')) | |||
return | |||
} | |||
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) { | |||
return | |||
} | |||
this.LOADING('正在提交...') | |||
const postData = await this.getPostData(this.id) | |||
this.HTTP_POST('learun/adms/EducationalAdministration/Journal/save', postData, '表单提交保存失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (!success) { | |||
return | |||
} | |||
this.EMIT('EducationalAdministrationJournalSend-list-change') | |||
this.NAV_BACK() | |||
this.TOAST('提交保存成功') | |||
}) | |||
break | |||
case 'delete': | |||
if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) { | |||
return | |||
} | |||
this.LOADING('提交删除中...') | |||
this.HTTP_POST('learun/adms/EducationalAdministration/Journal/delete', this.id, '删除失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (!success) { | |||
return | |||
} | |||
this.EMIT('EducationalAdministrationJournalSend-list-change') | |||
this.NAV_BACK() | |||
this.this.TOAST('删除成功', 'success') | |||
}) | |||
break | |||
default: break | |||
} | |||
}, | |||
// 获取表单值 | |||
getValue(path) { | |||
return get(this.current, path) | |||
}, | |||
// 设置表单值 | |||
setValue(path, val) { | |||
set(this.current, path, val) | |||
} | |||
} | |||
} | |||
</script> | |||
<style> | |||
.item-title{ | |||
color: #000; | |||
font-size: 16px; | |||
line-height: 36px; | |||
padding-left: 15px; | |||
} | |||
.top-15{ | |||
margin-top: 8px; | |||
} | |||
</style> |
@@ -0,0 +1,268 @@ | |||
<template> | |||
<view class="page"> | |||
<!-- 主列表页 --> | |||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;"> | |||
<!-- 顶部条目/分页信息栏 --> | |||
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner> | |||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||
<l-customlist :tips="loadState" showTips> | |||
<!-- 单条记录 --> | |||
<view class="customlist-item" v-for="item of list" :key="item.F_InvoiceId"> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">发放年份:</text> | |||
{{ displayListItem(item, 'IssueYear') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">发放月份:</text> | |||
{{ displayListItem(item, 'IssueMonth') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">应发合计:</text> | |||
{{ displayListItem(item, 'TotalGrossPay') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">实发合计:</text> | |||
{{ displayListItem(item, 'NetCombined') }} | |||
</view> | |||
<!-- 操作按钮组 --> | |||
<l-customlist-action @view="action('view', item)" @edit="action('edit', item)" :showEdit="false" /> | |||
</view> | |||
</l-customlist> | |||
</l-scroll-list> | |||
</view> | |||
<!-- 关闭筛选栏按钮 --> | |||
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose"> | |||
<l-icon type="pullright" color="blue" /> | |||
</view> | |||
<!-- 侧边栏 --> | |||
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> | |||
<view v-if="ready" class="padding"> | |||
<l-input v-model="queryData.IssueYear" @change="searchChange()" title="年份" placeholder="按年份筛选" /> | |||
<l-input v-model="queryData.IssueMonth" @change="searchChange()" title="月份" placeholder="按月份筛选" /> | |||
<l-input v-model="queryData.EmpName" @change="searchChange()" title="姓名" placeholder="按姓名筛选" /> | |||
<l-input v-model="queryData.PeopleType" @change="searchChange()" title="人员类别" placeholder="按人员类别筛选" /> | |||
<view class="padding-tb"> | |||
<l-button @click="reset" line="orange" class="block" block>重置筛选条件</l-button> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
<!-- 添加按钮 --> | |||
<!-- <l-customlist-add v-if="!sideOpen" @click="action('create')" /> --> | |||
</view> | |||
</template> | |||
<script> | |||
import moment from 'moment' | |||
import get from 'lodash/get' | |||
import set from 'lodash/set' | |||
import pickBy from 'lodash/pickBy' | |||
import mapValues from 'lodash/mapValues' | |||
export default { | |||
data() { | |||
return { | |||
// 表单结构 | |||
scheme: { | |||
// F_CustomerId: { type: 'select', dataSource: '1', dataSourceId: 'crmCustomer,f_fullname,f_customerid' }, | |||
// F_InvoiceContent: { type: 'texteditor' }, | |||
// 发放年份IssueYear | |||
IssueYear: { type: 'text' }, | |||
// 发放月份IssueMonth | |||
IssueMonth: { type: 'text' }, | |||
// 应发合计TotalGrossPay | |||
TotalGrossPay: { type: 'text' }, | |||
// 实发合计NetCombined | |||
NetCombined: { type: 'text' }, | |||
}, | |||
// 筛选菜单值 | |||
searchData: {}, | |||
defaultQueryData: {}, | |||
queryData: { | |||
keyword: '' | |||
}, | |||
// 数据源 | |||
dataSource: { | |||
F_CustomerId: [] | |||
}, | |||
// 页面相关参数 | |||
ready: false, | |||
tips: '加载中…', | |||
loadState: '向下翻以加载更多', | |||
sideOpen: false, | |||
// 列表条目与分页信息 | |||
page: 1, | |||
total: 2, | |||
list: [] | |||
} | |||
}, | |||
async onLoad() { | |||
await this.init() | |||
}, | |||
onUnload() { | |||
this.OFF('invoice-list-change') | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init() { | |||
this.ON('invoice-list-change', this.refreshList) | |||
await Promise.all([ | |||
// 加载 F_CustomerId 字段的数据源:客户信息 | |||
// this.FETCH_DATASOURCE('crmCustomer').then(result => { | |||
// this.dataSource.F_CustomerId = result.data.map(t => ({ text: t.f_fullname, value: t.f_customerid })) | |||
// }), | |||
// 拉取列表信息 | |||
this.fetchList() | |||
]) | |||
this.defaultQueryData = this.COPY(this.queryData) | |||
this.ready = true | |||
}, | |||
// 拉取列表 | |||
async fetchList(isConcat=true) { | |||
if (this.page > this.total) { | |||
return | |||
} | |||
const result = await this.HTTP_GET( | |||
'learun/adms/WageSchedule/getlist', | |||
{ | |||
pagination: { rows: 10, page: this.page, sidx: 'CreateTime', sord: 'DESC' }, | |||
queryJson: JSON.stringify(this.searchData) | |||
}, | |||
'加载数据时出错' | |||
) | |||
if (!result) { | |||
return | |||
} | |||
this.total = result.total | |||
this.page = result.page + 1 | |||
this.list = isConcat?this.list.concat(result.rows):result.rows; | |||
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | |||
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | |||
}, | |||
// 刷新清空列表 | |||
async refreshList(isConcat=true) { | |||
this.page = 1 | |||
this.total = 2 | |||
this.list = [] | |||
await this.fetchList(isConcat); | |||
}, | |||
// 列表下拉 | |||
pullDown() { | |||
this.refreshList().then(() => { | |||
this.$refs.list.stopPullDown() | |||
}) | |||
}, | |||
// 点击「编辑」、「查看」、「添加」、「删除」按钮 | |||
action(type, item) { | |||
switch (type) { | |||
default: | |||
case 'create': | |||
this.NAV_TO('./single?type=create') | |||
return | |||
case 'view': | |||
this.NAV_TO('./single?type=view&&id='+item.Id, item, true) | |||
return | |||
case 'edit': | |||
this.NAV_TO('./single?type=edit', item, true) | |||
return | |||
} | |||
}, | |||
// 显示列表中的标题项 | |||
displayListItem(item, field) { | |||
const fieldItem = this.scheme[field] | |||
const value = item[field] | |||
switch (fieldItem.type) { | |||
case 'currentInfo': | |||
case 'organize': | |||
switch (fieldItem.dataType) { | |||
case 'user': | |||
return get(this.GET_GLOBAL('user'), `${value}.name`, '') | |||
case 'department': | |||
return get(this.GET_GLOBAL('department'), `${value}.name`, '') | |||
case 'company': | |||
return get(this.GET_GLOBAL('company'), `${value}.name`, '') | |||
default: | |||
return value || '' | |||
} | |||
case 'radio': | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === value) | |||
return get(selectItem, 'text', '') | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
return '' | |||
} | |||
const checkboxItems = value.split(',') | |||
return this.dataSource[field] | |||
.filter(t => checkboxItems.includes(t.value)) | |||
.map(t => t.text) | |||
.join(',') | |||
case 'datetime': | |||
if (!value) { | |||
return '' | |||
} | |||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm') | |||
default: | |||
return value || '' | |||
} | |||
}, | |||
// 设置搜索条件 | |||
async searchChange() { | |||
const result = {} | |||
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) | |||
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | |||
this.searchData = result | |||
await this.refreshList(false); | |||
}, | |||
// 点击「清空搜索条件」按钮 | |||
reset() { | |||
this.queryData = this.COPY(this.defaultQueryData) | |||
this.searchChange() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
@import '~@/common/css/sidepage.less'; | |||
@import '~@/common/css/customlist.less'; | |||
</style> |
@@ -0,0 +1,560 @@ | |||
<template> | |||
<view class="page"> | |||
<view v-if="ready"> | |||
<view class="item-title">基本信息</view> | |||
<l-input | |||
@input="setValue('WageSchedule.EmpName', $event)" | |||
:value="getValue('WageSchedule.EmpName')" | |||
:disabled="!edit" | |||
title="姓名" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.IdCardNo', $event)" | |||
:value="getValue('WageSchedule.IdCardNo')" | |||
:disabled="!edit" | |||
title="身份证号" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PeopleType', $event)" | |||
:value="getValue('WageSchedule.PeopleType')" | |||
:disabled="!edit" | |||
title="人员类别" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PostType', $event)" | |||
:value="getValue('WageSchedule.PostType')" | |||
:disabled="!edit" | |||
title="岗位等级" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PayGrade', $event)" | |||
:value="getValue('WageSchedule.PayGrade')" | |||
:disabled="!edit" | |||
title="薪级" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TotalGrossPay', $event)" | |||
:value="getValue('WageSchedule.TotalGrossPay')" | |||
:disabled="!edit" | |||
title="应发合计" | |||
/> | |||
<view class="item-title">基本工资</view> | |||
<l-input | |||
@input="setValue('WageSchedule.PostWage', $event)" | |||
:value="getValue('WageSchedule.PostWage')" | |||
:disabled="!edit" | |||
title="岗位工资" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PayGradeWage', $event)" | |||
:value="getValue('WageSchedule.PayGradeWage')" | |||
:disabled="!edit" | |||
title="薪级工资" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TenPercent', $event)" | |||
:value="getValue('WageSchedule.TenPercent')" | |||
:disabled="!edit" | |||
title="百分之十" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.BasePay', $event)" | |||
:value="getValue('WageSchedule.BasePay')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<view class="item-title">津贴补贴</view> | |||
<l-input | |||
@input="setValue('WageSchedule.RoughEdgeAllowance', $event)" | |||
:value="getValue('WageSchedule.RoughEdgeAllowance')" | |||
:disabled="!edit" | |||
title="艰边津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.NationAllowance', $event)" | |||
:value="getValue('WageSchedule.NationAllowance')" | |||
:disabled="!edit" | |||
title="民族津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TeachAllowance', $event)" | |||
:value="getValue('WageSchedule.TeachAllowance')" | |||
:disabled="!edit" | |||
title="教师津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.SubsidiesAllowances', $event)" | |||
:value="getValue('WageSchedule.SubsidiesAllowances')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.BasicsPerformance', $event)" | |||
:value="getValue('WageSchedule.BasicsPerformance')" | |||
:disabled="!edit" | |||
title="基础性绩效" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.GirlStaffSanitation', $event)" | |||
:value="getValue('WageSchedule.GirlStaffSanitation')" | |||
:disabled="!edit" | |||
title="女职工卫生费" | |||
/> | |||
<view class="item-title">改革性补贴</view> | |||
<l-input | |||
@input="setValue('WageSchedule.Transportation', $event)" | |||
:value="getValue('WageSchedule.Transportation')" | |||
:disabled="!edit" | |||
title="交通补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.RealeState', $event)" | |||
:value="getValue('WageSchedule.RealeState')" | |||
:disabled="!edit" | |||
title="物业补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.WorkKeep', $event)" | |||
:value="getValue('WageSchedule.WorkKeep')" | |||
:disabled="!edit" | |||
title="工改保留补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.ReformSubsidySum', $event)" | |||
:value="getValue('WageSchedule.ReformSubsidySum')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.HousingAllowance', $event)" | |||
:value="getValue('WageSchedule.HousingAllowance')" | |||
:disabled="!edit" | |||
title="住房补贴" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.HousingFundAllowance', $event)" | |||
:value="getValue('WageSchedule.HousingFundAllowance')" | |||
:disabled="!edit" | |||
title="住房公积金" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.TeacherAndTown', $event)" | |||
:value="getValue('WageSchedule.TeacherAndTown')" | |||
:disabled="!edit" | |||
title="特级教师津贴和乡镇补贴" | |||
/> | |||
<view class="item-title">扣款</view> | |||
<l-input | |||
@input="setValue('WageSchedule.DeductionsSubtotal', $event)" | |||
:value="getValue('WageSchedule.DeductionsSubtotal')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.AccumulationFund', $event)" | |||
:value="getValue('WageSchedule.AccumulationFund')" | |||
:disabled="!edit" | |||
title="公积金" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.LaborUnionWage', $event)" | |||
:value="getValue('WageSchedule.LaborUnionWage')" | |||
:disabled="!edit" | |||
title="工会工费" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PersonalIncomeTax', $event)" | |||
:value="getValue('WageSchedule.PersonalIncomeTax')" | |||
:disabled="!edit" | |||
title="个人所得税" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.EndowmentInsurance', $event)" | |||
:value="getValue('WageSchedule.EndowmentInsurance')" | |||
:disabled="!edit" | |||
title="养老保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.OccupationalAnnuities', $event)" | |||
:value="getValue('WageSchedule.OccupationalAnnuities')" | |||
:disabled="!edit" | |||
title="职业年金" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.MedicalInsurance', $event)" | |||
:value="getValue('WageSchedule.MedicalInsurance')" | |||
:disabled="!edit" | |||
title="医疗保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.UnemploymentInsurance', $event)" | |||
:value="getValue('WageSchedule.UnemploymentInsurance')" | |||
:disabled="!edit" | |||
title="失业保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.Other', $event)" | |||
:value="getValue('WageSchedule.Other')" | |||
:disabled="!edit" | |||
title="其他" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.FiscalDirect', $event)" | |||
:value="getValue('WageSchedule.FiscalDirect')" | |||
:disabled="!edit" | |||
title="财政直达" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.BankWithholding', $event)" | |||
:value="getValue('WageSchedule.BankWithholding')" | |||
:disabled="!edit" | |||
title="银行代扣" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.NetCombined', $event)" | |||
:value="getValue('WageSchedule.NetCombined')" | |||
:disabled="!edit" | |||
title="实发合计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.WageCardNo', $event)" | |||
:value="getValue('WageSchedule.WageCardNo')" | |||
:disabled="!edit" | |||
title="工资卡号" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.CreateUser', $event)" | |||
:value="getValue('WageSchedule.CreateUser')" | |||
:disabled="!edit" | |||
title="创建用户" | |||
/> | |||
<l-datetime-picker | |||
class="top-15" | |||
@input="setValue('WageSchedule.CreateTime', $event)" | |||
:value="getValue('WageSchedule.CreateTime')" | |||
:disabled="!edit" | |||
title="创建时间" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.IssueMonth', $event)" | |||
:value="getValue('WageSchedule.IssueMonth')" | |||
:disabled="!edit" | |||
title="发放月份" | |||
/> | |||
<!-- <l-select | |||
@input="setValue('JournalSend.JTypeId', $event)" | |||
:value="getValue('JournalSend.JTypeId')" | |||
:disabled="!edit" | |||
:range="dataSource.JournalSend.JTypeId" | |||
title="日志类型" | |||
/> | |||
<l-organize-picker | |||
@input="setValue('JournalSend.JReceiveId', $event)" | |||
:value="getValue('JournalSend.JReceiveId')" | |||
:readonly="!edit" | |||
type="user" | |||
title="接收人" | |||
/> | |||
<l-textarea | |||
@input="setValue('JournalSend.JContent', $event)" | |||
:value="getValue('JournalSend.JContent')" | |||
:readonly="!edit" | |||
title="日志内容" | |||
/> --> | |||
</view> | |||
<!-- <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | |||
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | |||
提交保存 | |||
</l-button> | |||
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> | |||
编辑本页 | |||
</l-button> | |||
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> | |||
取消编辑 | |||
</l-button> | |||
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block> | |||
删除 | |||
</l-button> | |||
</view> --> | |||
</view> | |||
</template> | |||
<script> | |||
/* | |||
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 上海力软信息技术有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-10-16 15:39 | |||
* 描 述:工作日志 | |||
*/ | |||
/** | |||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||
* { "path": "pages/EducationalAdministration/JournalSend/single", "style": { "navigationBarTitleText": "表单详情页" } } | |||
* | |||
* (navigationBarTitleText 字段为本页面的标题文本,可以修改) | |||
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) | |||
*/ | |||
import get from 'lodash/get' | |||
import set from 'lodash/set' | |||
import moment from 'moment' | |||
import customPageMixins from '@/common/custompage.js' | |||
export default { | |||
mixins: [customPageMixins], | |||
data() { | |||
return { | |||
// 页面相关参数 | |||
id: null, | |||
mode: null, | |||
edit: null, | |||
ready: false, | |||
// 表单数据 | |||
current: {}, | |||
origin: {}, | |||
// 表单项数据结构 | |||
scheme: { | |||
WageSchedule: { | |||
// JTitle: { type: 'text', title: '日志主题' }, | |||
// JTypeId: { type: 'select', title: '日志类型', dataSource: '0' }, | |||
// JReceiveId: { type: 'organize', title: '接收人', dataType: 'user' }, | |||
// JContent: { type: 'textarea', title: '日志内容' }, | |||
// Id | |||
// 序号No | |||
No: { type: 'text', title: '序号' }, | |||
// 姓名EmpName | |||
EmpName: { type: 'text', title: '姓名' }, | |||
// 账号/身份证号IdCardNo | |||
IdCardNo: { type: 'text', title: '账号/身份证号' }, | |||
// 人员类别PeopleType | |||
PeopleType: { type: 'text', title: '人员类别' }, | |||
// 岗位等级PostType | |||
PostType: { type: 'text', title: '岗位等级'}, | |||
// 薪级PayGrade | |||
PayGrade: { type: 'text', title: '薪级'}, | |||
// 应发合计TotalGrossPay | |||
TotalGrossPay: { type: 'text', title: '应发合计'}, | |||
// 岗位工资PostWage | |||
PostWage: { type: 'text', title: '岗位工资'}, | |||
// 薪级工资PayGradeWage | |||
PayGradeWage: { type: 'text', title: '薪级工资'}, | |||
// 百分之十TenPercent | |||
TenPercent: { type: 'text', title: '百分之十'}, | |||
// 基本工资小计BasePay | |||
BasePay: { type: 'text', title: '基本工资小计'}, | |||
// 艰边津贴RoughEdgeAllowance | |||
RoughEdgeAllowance: { type: 'text', title: '艰边津贴'}, | |||
// 民族津贴NationAllowance | |||
NationAllowance: { type: 'text', title: '民族津贴'}, | |||
// 教师津贴TeachAllowance | |||
TeachAllowance: { type: 'text', title: '教师津贴'}, | |||
// 津贴补贴小计SubsidiesAllowances | |||
SubsidiesAllowances: { type: 'text', title: '津贴补贴小计'}, | |||
// 基础性绩效BasicsPerformance | |||
BasicsPerformance: { type: 'text', title: '基础性绩效'}, | |||
// 女职工卫生费GirlStaffSanitation | |||
GirlStaffSanitation: { type: 'text', title: 'http://cyzjzx.gnway.cc:29904'}, | |||
// 交通补贴Transportation | |||
Transportation: { type: 'text', title: '交通补贴'}, | |||
// 物业补贴RealeState | |||
BasicsPerformance: { type: 'text', title: '基础性绩效'}, | |||
// 工改保留补贴WorkKeep | |||
WorkKeep: { type: 'text', title: '工改保留补贴'}, | |||
// 改革性补贴小计ReformSubsidySum | |||
ReformSubsidySum: { type: 'text', title: '改革性补贴小计'}, | |||
// 住房补贴HousingAllowance | |||
HousingAllowance: { type: 'text', title: '住房补贴'}, | |||
// 住房公积金HousingFundAllowance | |||
HousingFundAllowance: { type: 'text', title: '住房公积金'}, | |||
// 特级教师津贴和乡镇补贴TeacherAndTown | |||
TeacherAndTown: { type: 'text', title: '特级教师津贴和乡镇补贴'}, | |||
// 扣款小计DeductionsSubtotal | |||
DeductionsSubtotal: { type: 'text', title: '扣款小计'}, | |||
// 公积金AccumulationFund | |||
AccumulationFund: { type: 'text', title: '公积金'}, | |||
// 工会工费LaborUnionWage | |||
LaborUnionWage: { type: 'text', title: '工会工费'}, | |||
// 个人所得税PersonalIncomeTax | |||
PersonalIncomeTax: { type: 'text', title: '个人所得税'}, | |||
// 养老保险EndowmentInsurance | |||
EndowmentInsurance: { type: 'text', title: '养老保险'}, | |||
// 职业年金OccupationalAnnuities | |||
OccupationalAnnuities: { type: 'text', title: '职业年金'}, | |||
// 医疗保险MedicalInsurance | |||
MedicalInsurance: { type: 'text', title: '医疗保险'}, | |||
// 失业保险UnemploymentInsurance | |||
UnemploymentInsurance: { type: 'text', title: '失业保险'}, | |||
// 其他Other | |||
Other: { type: 'text', title: '其他'}, | |||
// 财政直达FiscalDirect | |||
FiscalDirect: { type: 'text', title: '财政直达'}, | |||
// 银行代扣BankWithholding | |||
BankWithholding: { type: 'text', title: '银行代扣'}, | |||
// 实发合计NetCombined | |||
NetCombined: { type: 'text', title: '实发合计'}, | |||
// 工资卡号WageCardNo | |||
WageCardNo: { type: 'text', title: '工资卡号'}, | |||
// CreateUser | |||
// CreateTime | |||
// UpdateUser | |||
// UpdateTime | |||
// 发放月份IssueMonth | |||
IssueMonth: { type: 'text', title: '发放月份'}, | |||
// 发放年份IssueYear | |||
IssueYear: { type: 'text', title: '发放年份'}, | |||
}, | |||
}, | |||
// 数据源 | |||
dataSource: { | |||
JournalSend: { | |||
JTypeId: [], | |||
}, | |||
} | |||
} | |||
}, | |||
async onLoad({ type, id }) { | |||
await this.init(type, id) | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init(type, id) { | |||
this.LOADING('加载数据中...') | |||
this.id = id | |||
this.mode = type | |||
// this.edit = ['create', 'edit'].includes(this.mode) | |||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | |||
await Promise.all([ | |||
() => {} | |||
]) | |||
await this.fetchForm() | |||
this.ready = true | |||
this.HIDE_LOADING() | |||
}, | |||
// 加载表单数据 | |||
async fetchForm() { | |||
if (this.mode === 'create') { | |||
this.origin = await this.getDefaultForm() | |||
} else { | |||
const result = await this.HTTP_GET('learun/adms/WageSchedule/form', this.id) | |||
this.origin = await this.formatFormData(result) | |||
} | |||
this.current = this.COPY(this.origin) | |||
}, | |||
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮 | |||
async action(type) { | |||
switch (type) { | |||
case 'edit': | |||
this.edit = true | |||
break | |||
case 'reset': | |||
this.current = this.COPY(this.origin) | |||
this.edit = false | |||
break | |||
case 'save': | |||
const verifyResult = this.verifyForm() | |||
if (verifyResult.length > 0) { | |||
this.CONFIRM('表单验证失败', verifyResult.join('\n')) | |||
return | |||
} | |||
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) { | |||
return | |||
} | |||
this.LOADING('正在提交...') | |||
const postData = await this.getPostData(this.id) | |||
this.HTTP_POST('learun/adms/EducationalAdministration/Journal/save', postData, '表单提交保存失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (!success) { | |||
return | |||
} | |||
this.EMIT('EducationalAdministrationJournalSend-list-change') | |||
this.NAV_BACK() | |||
this.TOAST('提交保存成功') | |||
}) | |||
break | |||
case 'delete': | |||
if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) { | |||
return | |||
} | |||
this.LOADING('提交删除中...') | |||
this.HTTP_POST('learun/adms/EducationalAdministration/Journal/delete', this.id, '删除失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (!success) { | |||
return | |||
} | |||
this.EMIT('EducationalAdministrationJournalSend-list-change') | |||
this.NAV_BACK() | |||
this.this.TOAST('删除成功', 'success') | |||
}) | |||
break | |||
default: break | |||
} | |||
}, | |||
// 获取表单值 | |||
getValue(path) { | |||
return get(this.current, path) | |||
}, | |||
// 设置表单值 | |||
setValue(path, val) { | |||
set(this.current, path, val) | |||
} | |||
} | |||
} | |||
</script> | |||
<style> | |||
.item-title{ | |||
color: #000; | |||
font-size: 16px; | |||
line-height: 36px; | |||
padding-left: 15px; | |||
} | |||
.top-15{ | |||
margin-top: 8px; | |||
} | |||
</style> |
@@ -0,0 +1,268 @@ | |||
<template> | |||
<view class="page"> | |||
<!-- 主列表页 --> | |||
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;"> | |||
<!-- 顶部条目/分页信息栏 --> | |||
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner> | |||
<!-- 滚动列表,跨端支持上拉/下拉 --> | |||
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list"> | |||
<l-customlist :tips="loadState" showTips> | |||
<!-- 单条记录 --> | |||
<view class="customlist-item" v-for="item of list" :key="item.F_InvoiceId"> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">发放年份:</text> | |||
{{ displayListItem(item, 'IssueYear') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">发放月份:</text> | |||
{{ displayListItem(item, 'IssueMonth') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">应发合计:</text> | |||
{{ displayListItem(item, 'TotalGrossPay') }} | |||
</view> | |||
<view class="customlist-item-field"> | |||
<text class="customlist-item-field-title">实发合计:</text> | |||
{{ displayListItem(item, 'NetCombined') }} | |||
</view> | |||
<!-- 操作按钮组 --> | |||
<l-customlist-action @view="action('view', item)" @edit="action('edit', item)" :showEdit="false" /> | |||
</view> | |||
</l-customlist> | |||
</l-scroll-list> | |||
</view> | |||
<!-- 关闭筛选栏按钮 --> | |||
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose"> | |||
<l-icon type="pullright" color="blue" /> | |||
</view> | |||
<!-- 侧边栏 --> | |||
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y> | |||
<view v-if="ready" class="padding"> | |||
<l-input v-model="queryData.IssueYear" @change="searchChange()" title="年份" placeholder="按年份筛选" /> | |||
<l-input v-model="queryData.IssueMonth" @change="searchChange()" title="月份" placeholder="按月份筛选" /> | |||
<l-input v-model="queryData.EmpName" @change="searchChange()" title="姓名" placeholder="按姓名筛选" /> | |||
<l-input v-model="queryData.PeopleType" @change="searchChange()" title="人员类别" placeholder="按人员类别筛选" /> | |||
<view class="padding-tb"> | |||
<l-button @click="reset" line="orange" class="block" block>重置筛选条件</l-button> | |||
</view> | |||
</view> | |||
</scroll-view> | |||
<!-- 添加按钮 --> | |||
<!-- <l-customlist-add v-if="!sideOpen" @click="action('create')" /> --> | |||
</view> | |||
</template> | |||
<script> | |||
import moment from 'moment' | |||
import get from 'lodash/get' | |||
import set from 'lodash/set' | |||
import pickBy from 'lodash/pickBy' | |||
import mapValues from 'lodash/mapValues' | |||
export default { | |||
data() { | |||
return { | |||
// 表单结构 | |||
scheme: { | |||
// F_CustomerId: { type: 'select', dataSource: '1', dataSourceId: 'crmCustomer,f_fullname,f_customerid' }, | |||
// F_InvoiceContent: { type: 'texteditor' }, | |||
// 发放年份IssueYear | |||
IssueYear: { type: 'text' }, | |||
// 发放月份IssueMonth | |||
IssueMonth: { type: 'text' }, | |||
// 应发合计TotalGrossPay | |||
TotalGrossPay: { type: 'text' }, | |||
// 实发合计NetCombined | |||
NetCombined: { type: 'text' }, | |||
}, | |||
// 筛选菜单值 | |||
searchData: {}, | |||
defaultQueryData: {}, | |||
queryData: { | |||
keyword: '' | |||
}, | |||
// 数据源 | |||
dataSource: { | |||
F_CustomerId: [] | |||
}, | |||
// 页面相关参数 | |||
ready: false, | |||
tips: '加载中…', | |||
loadState: '向下翻以加载更多', | |||
sideOpen: false, | |||
// 列表条目与分页信息 | |||
page: 1, | |||
total: 2, | |||
list: [] | |||
} | |||
}, | |||
async onLoad() { | |||
await this.init() | |||
}, | |||
onUnload() { | |||
this.OFF('invoice-list-change') | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init() { | |||
this.ON('invoice-list-change', this.refreshList) | |||
await Promise.all([ | |||
// 加载 F_CustomerId 字段的数据源:客户信息 | |||
// this.FETCH_DATASOURCE('crmCustomer').then(result => { | |||
// this.dataSource.F_CustomerId = result.data.map(t => ({ text: t.f_fullname, value: t.f_customerid })) | |||
// }), | |||
// 拉取列表信息 | |||
this.fetchList() | |||
]) | |||
this.defaultQueryData = this.COPY(this.queryData) | |||
this.ready = true | |||
}, | |||
// 拉取列表 | |||
async fetchList(isConcat=true) { | |||
if (this.page > this.total) { | |||
return | |||
} | |||
const result = await this.HTTP_GET( | |||
'learun/adms/WageSchedule/getlist', | |||
{ | |||
pagination: { rows: 10, page: this.page, sidx: 'CreateTime', sord: 'DESC' }, | |||
queryJson: JSON.stringify(this.searchData) | |||
}, | |||
'加载数据时出错' | |||
) | |||
if (!result) { | |||
return | |||
} | |||
this.total = result.total | |||
this.page = result.page + 1 | |||
this.list = isConcat?this.list.concat(result.rows):result.rows; | |||
this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项` | |||
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多' | |||
}, | |||
// 刷新清空列表 | |||
async refreshList(isConcat=true) { | |||
this.page = 1 | |||
this.total = 2 | |||
this.list = [] | |||
await this.fetchList(isConcat); | |||
}, | |||
// 列表下拉 | |||
pullDown() { | |||
this.refreshList().then(() => { | |||
this.$refs.list.stopPullDown() | |||
}) | |||
}, | |||
// 点击「编辑」、「查看」、「添加」、「删除」按钮 | |||
action(type, item) { | |||
switch (type) { | |||
default: | |||
case 'create': | |||
this.NAV_TO('./single?type=create') | |||
return | |||
case 'view': | |||
this.NAV_TO('./single?type=view&&id='+item.Id, item, true) | |||
return | |||
case 'edit': | |||
this.NAV_TO('./single?type=edit', item, true) | |||
return | |||
} | |||
}, | |||
// 显示列表中的标题项 | |||
displayListItem(item, field) { | |||
const fieldItem = this.scheme[field] | |||
const value = item[field] | |||
switch (fieldItem.type) { | |||
case 'currentInfo': | |||
case 'organize': | |||
switch (fieldItem.dataType) { | |||
case 'user': | |||
return get(this.GET_GLOBAL('user'), `${value}.name`, '') | |||
case 'department': | |||
return get(this.GET_GLOBAL('department'), `${value}.name`, '') | |||
case 'company': | |||
return get(this.GET_GLOBAL('company'), `${value}.name`, '') | |||
default: | |||
return value || '' | |||
} | |||
case 'radio': | |||
case 'select': | |||
const selectItem = this.dataSource[field].find(t => t.value === value) | |||
return get(selectItem, 'text', '') | |||
case 'checkbox': | |||
if (!value || value.split(',').length <= 0) { | |||
return '' | |||
} | |||
const checkboxItems = value.split(',') | |||
return this.dataSource[field] | |||
.filter(t => checkboxItems.includes(t.value)) | |||
.map(t => t.text) | |||
.join(',') | |||
case 'datetime': | |||
if (!value) { | |||
return '' | |||
} | |||
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm') | |||
default: | |||
return value || '' | |||
} | |||
}, | |||
// 设置搜索条件 | |||
async searchChange() { | |||
const result = {} | |||
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t)) | |||
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t))) | |||
this.searchData = result | |||
await this.refreshList(false); | |||
}, | |||
// 点击「清空搜索条件」按钮 | |||
reset() { | |||
this.queryData = this.COPY(this.defaultQueryData) | |||
this.searchChange() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
@import '~@/common/css/sidepage.less'; | |||
@import '~@/common/css/customlist.less'; | |||
</style> |
@@ -0,0 +1,560 @@ | |||
<template> | |||
<view class="page"> | |||
<view v-if="ready"> | |||
<view class="item-title">基本信息</view> | |||
<l-input | |||
@input="setValue('WageSchedule.EmpName', $event)" | |||
:value="getValue('WageSchedule.EmpName')" | |||
:disabled="!edit" | |||
title="姓名" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.IdCardNo', $event)" | |||
:value="getValue('WageSchedule.IdCardNo')" | |||
:disabled="!edit" | |||
title="身份证号" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PeopleType', $event)" | |||
:value="getValue('WageSchedule.PeopleType')" | |||
:disabled="!edit" | |||
title="人员类别" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PostType', $event)" | |||
:value="getValue('WageSchedule.PostType')" | |||
:disabled="!edit" | |||
title="岗位等级" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PayGrade', $event)" | |||
:value="getValue('WageSchedule.PayGrade')" | |||
:disabled="!edit" | |||
title="薪级" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TotalGrossPay', $event)" | |||
:value="getValue('WageSchedule.TotalGrossPay')" | |||
:disabled="!edit" | |||
title="应发合计" | |||
/> | |||
<view class="item-title">基本工资</view> | |||
<l-input | |||
@input="setValue('WageSchedule.PostWage', $event)" | |||
:value="getValue('WageSchedule.PostWage')" | |||
:disabled="!edit" | |||
title="岗位工资" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PayGradeWage', $event)" | |||
:value="getValue('WageSchedule.PayGradeWage')" | |||
:disabled="!edit" | |||
title="薪级工资" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TenPercent', $event)" | |||
:value="getValue('WageSchedule.TenPercent')" | |||
:disabled="!edit" | |||
title="百分之十" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.BasePay', $event)" | |||
:value="getValue('WageSchedule.BasePay')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<view class="item-title">津贴补贴</view> | |||
<l-input | |||
@input="setValue('WageSchedule.RoughEdgeAllowance', $event)" | |||
:value="getValue('WageSchedule.RoughEdgeAllowance')" | |||
:disabled="!edit" | |||
title="艰边津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.NationAllowance', $event)" | |||
:value="getValue('WageSchedule.NationAllowance')" | |||
:disabled="!edit" | |||
title="民族津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.TeachAllowance', $event)" | |||
:value="getValue('WageSchedule.TeachAllowance')" | |||
:disabled="!edit" | |||
title="教师津贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.SubsidiesAllowances', $event)" | |||
:value="getValue('WageSchedule.SubsidiesAllowances')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.BasicsPerformance', $event)" | |||
:value="getValue('WageSchedule.BasicsPerformance')" | |||
:disabled="!edit" | |||
title="基础性绩效" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.GirlStaffSanitation', $event)" | |||
:value="getValue('WageSchedule.GirlStaffSanitation')" | |||
:disabled="!edit" | |||
title="女职工卫生费" | |||
/> | |||
<view class="item-title">改革性补贴</view> | |||
<l-input | |||
@input="setValue('WageSchedule.Transportation', $event)" | |||
:value="getValue('WageSchedule.Transportation')" | |||
:disabled="!edit" | |||
title="交通补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.RealeState', $event)" | |||
:value="getValue('WageSchedule.RealeState')" | |||
:disabled="!edit" | |||
title="物业补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.WorkKeep', $event)" | |||
:value="getValue('WageSchedule.WorkKeep')" | |||
:disabled="!edit" | |||
title="工改保留补贴" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.ReformSubsidySum', $event)" | |||
:value="getValue('WageSchedule.ReformSubsidySum')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.HousingAllowance', $event)" | |||
:value="getValue('WageSchedule.HousingAllowance')" | |||
:disabled="!edit" | |||
title="住房补贴" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.HousingFundAllowance', $event)" | |||
:value="getValue('WageSchedule.HousingFundAllowance')" | |||
:disabled="!edit" | |||
title="住房公积金" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.TeacherAndTown', $event)" | |||
:value="getValue('WageSchedule.TeacherAndTown')" | |||
:disabled="!edit" | |||
title="特级教师津贴和乡镇补贴" | |||
/> | |||
<view class="item-title">扣款</view> | |||
<l-input | |||
@input="setValue('WageSchedule.DeductionsSubtotal', $event)" | |||
:value="getValue('WageSchedule.DeductionsSubtotal')" | |||
:disabled="!edit" | |||
title="小计" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.AccumulationFund', $event)" | |||
:value="getValue('WageSchedule.AccumulationFund')" | |||
:disabled="!edit" | |||
title="公积金" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.LaborUnionWage', $event)" | |||
:value="getValue('WageSchedule.LaborUnionWage')" | |||
:disabled="!edit" | |||
title="工会工费" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.PersonalIncomeTax', $event)" | |||
:value="getValue('WageSchedule.PersonalIncomeTax')" | |||
:disabled="!edit" | |||
title="个人所得税" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.EndowmentInsurance', $event)" | |||
:value="getValue('WageSchedule.EndowmentInsurance')" | |||
:disabled="!edit" | |||
title="养老保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.OccupationalAnnuities', $event)" | |||
:value="getValue('WageSchedule.OccupationalAnnuities')" | |||
:disabled="!edit" | |||
title="职业年金" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.MedicalInsurance', $event)" | |||
:value="getValue('WageSchedule.MedicalInsurance')" | |||
:disabled="!edit" | |||
title="医疗保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.UnemploymentInsurance', $event)" | |||
:value="getValue('WageSchedule.UnemploymentInsurance')" | |||
:disabled="!edit" | |||
title="失业保险" | |||
/> | |||
<l-input | |||
@input="setValue('WageSchedule.Other', $event)" | |||
:value="getValue('WageSchedule.Other')" | |||
:disabled="!edit" | |||
title="其他" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.FiscalDirect', $event)" | |||
:value="getValue('WageSchedule.FiscalDirect')" | |||
:disabled="!edit" | |||
title="财政直达" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.BankWithholding', $event)" | |||
:value="getValue('WageSchedule.BankWithholding')" | |||
:disabled="!edit" | |||
title="银行代扣" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.NetCombined', $event)" | |||
:value="getValue('WageSchedule.NetCombined')" | |||
:disabled="!edit" | |||
title="实发合计" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.WageCardNo', $event)" | |||
:value="getValue('WageSchedule.WageCardNo')" | |||
:disabled="!edit" | |||
title="工资卡号" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.CreateUser', $event)" | |||
:value="getValue('WageSchedule.CreateUser')" | |||
:disabled="!edit" | |||
title="创建用户" | |||
/> | |||
<l-datetime-picker | |||
class="top-15" | |||
@input="setValue('WageSchedule.CreateTime', $event)" | |||
:value="getValue('WageSchedule.CreateTime')" | |||
:disabled="!edit" | |||
title="创建时间" | |||
/> | |||
<l-input | |||
class="top-15" | |||
@input="setValue('WageSchedule.IssueMonth', $event)" | |||
:value="getValue('WageSchedule.IssueMonth')" | |||
:disabled="!edit" | |||
title="发放月份" | |||
/> | |||
<!-- <l-select | |||
@input="setValue('JournalSend.JTypeId', $event)" | |||
:value="getValue('JournalSend.JTypeId')" | |||
:disabled="!edit" | |||
:range="dataSource.JournalSend.JTypeId" | |||
title="日志类型" | |||
/> | |||
<l-organize-picker | |||
@input="setValue('JournalSend.JReceiveId', $event)" | |||
:value="getValue('JournalSend.JReceiveId')" | |||
:readonly="!edit" | |||
type="user" | |||
title="接收人" | |||
/> | |||
<l-textarea | |||
@input="setValue('JournalSend.JContent', $event)" | |||
:value="getValue('JournalSend.JContent')" | |||
:readonly="!edit" | |||
title="日志内容" | |||
/> --> | |||
</view> | |||
<!-- <view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;"> | |||
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block> | |||
提交保存 | |||
</l-button> | |||
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block> | |||
编辑本页 | |||
</l-button> | |||
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block> | |||
取消编辑 | |||
</l-button> | |||
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block> | |||
删除 | |||
</l-button> | |||
</view> --> | |||
</view> | |||
</template> | |||
<script> | |||
/* | |||
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 上海力软信息技术有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-10-16 15:39 | |||
* 描 述:工作日志 | |||
*/ | |||
/** | |||
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用 | |||
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录: | |||
* { "path": "pages/EducationalAdministration/JournalSend/single", "style": { "navigationBarTitleText": "表单详情页" } } | |||
* | |||
* (navigationBarTitleText 字段为本页面的标题文本,可以修改) | |||
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件) | |||
*/ | |||
import get from 'lodash/get' | |||
import set from 'lodash/set' | |||
import moment from 'moment' | |||
import customPageMixins from '@/common/custompage.js' | |||
export default { | |||
mixins: [customPageMixins], | |||
data() { | |||
return { | |||
// 页面相关参数 | |||
id: null, | |||
mode: null, | |||
edit: null, | |||
ready: false, | |||
// 表单数据 | |||
current: {}, | |||
origin: {}, | |||
// 表单项数据结构 | |||
scheme: { | |||
WageSchedule: { | |||
// JTitle: { type: 'text', title: '日志主题' }, | |||
// JTypeId: { type: 'select', title: '日志类型', dataSource: '0' }, | |||
// JReceiveId: { type: 'organize', title: '接收人', dataType: 'user' }, | |||
// JContent: { type: 'textarea', title: '日志内容' }, | |||
// Id | |||
// 序号No | |||
No: { type: 'text', title: '序号' }, | |||
// 姓名EmpName | |||
EmpName: { type: 'text', title: '姓名' }, | |||
// 账号/身份证号IdCardNo | |||
IdCardNo: { type: 'text', title: '账号/身份证号' }, | |||
// 人员类别PeopleType | |||
PeopleType: { type: 'text', title: '人员类别' }, | |||
// 岗位等级PostType | |||
PostType: { type: 'text', title: '岗位等级'}, | |||
// 薪级PayGrade | |||
PayGrade: { type: 'text', title: '薪级'}, | |||
// 应发合计TotalGrossPay | |||
TotalGrossPay: { type: 'text', title: '应发合计'}, | |||
// 岗位工资PostWage | |||
PostWage: { type: 'text', title: '岗位工资'}, | |||
// 薪级工资PayGradeWage | |||
PayGradeWage: { type: 'text', title: '薪级工资'}, | |||
// 百分之十TenPercent | |||
TenPercent: { type: 'text', title: '百分之十'}, | |||
// 基本工资小计BasePay | |||
BasePay: { type: 'text', title: '基本工资小计'}, | |||
// 艰边津贴RoughEdgeAllowance | |||
RoughEdgeAllowance: { type: 'text', title: '艰边津贴'}, | |||
// 民族津贴NationAllowance | |||
NationAllowance: { type: 'text', title: '民族津贴'}, | |||
// 教师津贴TeachAllowance | |||
TeachAllowance: { type: 'text', title: '教师津贴'}, | |||
// 津贴补贴小计SubsidiesAllowances | |||
SubsidiesAllowances: { type: 'text', title: '津贴补贴小计'}, | |||
// 基础性绩效BasicsPerformance | |||
BasicsPerformance: { type: 'text', title: '基础性绩效'}, | |||
// 女职工卫生费GirlStaffSanitation | |||
GirlStaffSanitation: { type: 'text', title: 'http://cyzjzx.gnway.cc:29904'}, | |||
// 交通补贴Transportation | |||
Transportation: { type: 'text', title: '交通补贴'}, | |||
// 物业补贴RealeState | |||
BasicsPerformance: { type: 'text', title: '基础性绩效'}, | |||
// 工改保留补贴WorkKeep | |||
WorkKeep: { type: 'text', title: '工改保留补贴'}, | |||
// 改革性补贴小计ReformSubsidySum | |||
ReformSubsidySum: { type: 'text', title: '改革性补贴小计'}, | |||
// 住房补贴HousingAllowance | |||
HousingAllowance: { type: 'text', title: '住房补贴'}, | |||
// 住房公积金HousingFundAllowance | |||
HousingFundAllowance: { type: 'text', title: '住房公积金'}, | |||
// 特级教师津贴和乡镇补贴TeacherAndTown | |||
TeacherAndTown: { type: 'text', title: '特级教师津贴和乡镇补贴'}, | |||
// 扣款小计DeductionsSubtotal | |||
DeductionsSubtotal: { type: 'text', title: '扣款小计'}, | |||
// 公积金AccumulationFund | |||
AccumulationFund: { type: 'text', title: '公积金'}, | |||
// 工会工费LaborUnionWage | |||
LaborUnionWage: { type: 'text', title: '工会工费'}, | |||
// 个人所得税PersonalIncomeTax | |||
PersonalIncomeTax: { type: 'text', title: '个人所得税'}, | |||
// 养老保险EndowmentInsurance | |||
EndowmentInsurance: { type: 'text', title: '养老保险'}, | |||
// 职业年金OccupationalAnnuities | |||
OccupationalAnnuities: { type: 'text', title: '职业年金'}, | |||
// 医疗保险MedicalInsurance | |||
MedicalInsurance: { type: 'text', title: '医疗保险'}, | |||
// 失业保险UnemploymentInsurance | |||
UnemploymentInsurance: { type: 'text', title: '失业保险'}, | |||
// 其他Other | |||
Other: { type: 'text', title: '其他'}, | |||
// 财政直达FiscalDirect | |||
FiscalDirect: { type: 'text', title: '财政直达'}, | |||
// 银行代扣BankWithholding | |||
BankWithholding: { type: 'text', title: '银行代扣'}, | |||
// 实发合计NetCombined | |||
NetCombined: { type: 'text', title: '实发合计'}, | |||
// 工资卡号WageCardNo | |||
WageCardNo: { type: 'text', title: '工资卡号'}, | |||
// CreateUser | |||
// CreateTime | |||
// UpdateUser | |||
// UpdateTime | |||
// 发放月份IssueMonth | |||
IssueMonth: { type: 'text', title: '发放月份'}, | |||
// 发放年份IssueYear | |||
IssueYear: { type: 'text', title: '发放年份'}, | |||
}, | |||
}, | |||
// 数据源 | |||
dataSource: { | |||
JournalSend: { | |||
JTypeId: [], | |||
}, | |||
} | |||
} | |||
}, | |||
async onLoad({ type, id }) { | |||
await this.init(type, id) | |||
}, | |||
methods: { | |||
// 页面初始化 | |||
async init(type, id) { | |||
this.LOADING('加载数据中...') | |||
this.id = id | |||
this.mode = type | |||
// this.edit = ['create', 'edit'].includes(this.mode) | |||
// 拉取表单数据,同时拉取所有来自数据源的选单数据 | |||
await Promise.all([ | |||
() => {} | |||
]) | |||
await this.fetchForm() | |||
this.ready = true | |||
this.HIDE_LOADING() | |||
}, | |||
// 加载表单数据 | |||
async fetchForm() { | |||
if (this.mode === 'create') { | |||
this.origin = await this.getDefaultForm() | |||
} else { | |||
const result = await this.HTTP_GET('learun/adms/WageSchedule/form', this.id) | |||
this.origin = await this.formatFormData(result) | |||
} | |||
this.current = this.COPY(this.origin) | |||
}, | |||
// 点击 「编辑」、「重置」、「保存」、「删除」 按钮 | |||
async action(type) { | |||
switch (type) { | |||
case 'edit': | |||
this.edit = true | |||
break | |||
case 'reset': | |||
this.current = this.COPY(this.origin) | |||
this.edit = false | |||
break | |||
case 'save': | |||
const verifyResult = this.verifyForm() | |||
if (verifyResult.length > 0) { | |||
this.CONFIRM('表单验证失败', verifyResult.join('\n')) | |||
return | |||
} | |||
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) { | |||
return | |||
} | |||
this.LOADING('正在提交...') | |||
const postData = await this.getPostData(this.id) | |||
this.HTTP_POST('learun/adms/EducationalAdministration/Journal/save', postData, '表单提交保存失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (!success) { | |||
return | |||
} | |||
this.EMIT('EducationalAdministrationJournalSend-list-change') | |||
this.NAV_BACK() | |||
this.TOAST('提交保存成功') | |||
}) | |||
break | |||
case 'delete': | |||
if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) { | |||
return | |||
} | |||
this.LOADING('提交删除中...') | |||
this.HTTP_POST('learun/adms/EducationalAdministration/Journal/delete', this.id, '删除失败').then(success => { | |||
this.HIDE_LOADING() | |||
if (!success) { | |||
return | |||
} | |||
this.EMIT('EducationalAdministrationJournalSend-list-change') | |||
this.NAV_BACK() | |||
this.this.TOAST('删除成功', 'success') | |||
}) | |||
break | |||
default: break | |||
} | |||
}, | |||
// 获取表单值 | |||
getValue(path) { | |||
return get(this.current, path) | |||
}, | |||
// 设置表单值 | |||
setValue(path, val) { | |||
set(this.current, path, val) | |||
} | |||
} | |||
} | |||
</script> | |||
<style> | |||
.item-title{ | |||
color: #000; | |||
font-size: 16px; | |||
line-height: 36px; | |||
padding-left: 15px; | |||
} | |||
.top-15{ | |||
margin-top: 8px; | |||
} | |||
</style> |