Commit 06fcf5cb by zqm

update: 更新最新修改

parent 841b7d5d
Pipeline #24829 canceled with stage
in 0 seconds
// const testToken = 'T3353641990669312' // const testToken = 'T3353641990669312'
const basePreUrl = 'hr.hrself.' const basePreUrl = 'hr.hrself.';
// export const SetToken = function (val) { // export const SetToken = function (val) {
// let env = process.env.NODE_ENV; // let env = process.env.NODE_ENV;
...@@ -14,25 +14,24 @@ const basePreUrl = 'hr.hrself.' ...@@ -14,25 +14,24 @@ const basePreUrl = 'hr.hrself.'
// }) // })
// } // }
// } // }
//我要请假小程序appid
export const LeaveAppId = process.env.PACK_VENV === 'vprod' ? '500000125' : '500000125'
export default { export default {
LoginUrl: basePreUrl + 'loginSelf', LoginUrl: basePreUrl + "loginSelf",
AnnRollUrl: basePreUrl + 'annRollListSelf', AnnRollUrl: basePreUrl + "annRollListSelf",
PayRollUrl: basePreUrl + 'payRollListSelf', PayRollUrl: basePreUrl + "payRollListSelf",
PayRolDetailUrl: basePreUrl + 'payRollInfoSelf', PayRolDetailUrl: basePreUrl + "payRollInfoSelf",
InsurelUrl: basePreUrl + 'insRecordInfoSelf', InsurelUrl: basePreUrl + "insRecordInfoSelf",
FundUrl: basePreUrl + 'fundRecordInfoSelf', FundUrl: basePreUrl + "fundRecordInfoSelf",
AwardUrl: basePreUrl + 'awardListSelf', AwardUrl: basePreUrl + "awardListSelf",
RewUrl: basePreUrl + 'rewProvideListSelf', RewUrl: basePreUrl + "rewProvideListSelf",
UserInfoUrl: basePreUrl + 'userInfoSelf', UserInfoUrl: basePreUrl + "userInfoSelf",
UserModifyUrl: basePreUrl + 'modifyUserInfoSelf', UserModifyUrl: basePreUrl + "modifyUserInfoSelf",
AddCodeUrl: basePreUrl + 'getCodeSelf', AddCodeUrl: basePreUrl + "getCodeSelf",
HomeListUrl: basePreUrl + 'homeListSelf', HomeListUrl: basePreUrl + "homeListSelf",
HomeInfoUrl: basePreUrl + 'homeInfoSelf', HomeInfoUrl: basePreUrl + "homeInfoSelf",
HomeModifyUrl: basePreUrl + 'modifyHomeInfoSelf', HomeModifyUrl: basePreUrl + "modifyHomeInfoSelf",
DiamondUrl: basePreUrl + 'diamondLifeV', DiamondUrl: basePreUrl + "diamondLifeV",
UpdatePassword: basePreUrl + 'updatePassword', UpdatePassword: basePreUrl + "updatePassword",
SendCodeByUserName: basePreUrl + 'sendCodeByUserName', SendCodeByUserName: basePreUrl + "sendCodeByUserName",
UpdatePasswordByCode: basePreUrl + 'updatePasswordByCode' UpdatePasswordByCode: basePreUrl + "updatePasswordByCode"
} }
...@@ -17,8 +17,13 @@ const masConfig = process.env.PACK_VENV === 'vprod' ...@@ -17,8 +17,13 @@ const masConfig = process.env.PACK_VENV === 'vprod'
const mas = MAS.getInstance().config(masConfig) const mas = MAS.getInstance().config(masConfig)
Vue.prototype.$mas = mas Vue.prototype.$mas = mas
const debugToken = 'yzj_68ab62e08529511f15d5797337c1298f' // const debugToken = 'T5572008802649088'
const debugUsername = 'hqhuang@cndrealty.com' // const debugUsername = 'hqhuang@cndrealty.com'
const debugToken = 'T6159949480150016'
// const debugUsername = 'wusm@cndrealty.com'
const debugUsername = 'panxq@cndrealty.com'
// const debugUsername = 'zhxlin@cndrealty.com'
// const debugUsername = 'zhout@cndrealty.com'
// 调试模式下,为非V+包环境 // 调试模式下,为非V+包环境
const debug = process.env.NODE_ENV === 'development' const debug = process.env.NODE_ENV === 'development'
......
...@@ -93,4 +93,8 @@ export const MAS_CODES = { ...@@ -93,4 +93,8 @@ export const MAS_CODES = {
StartWorkFlow: 'h3.workflow.startworkflow', // h3发起流程 StartWorkFlow: 'h3.workflow.startworkflow', // h3发起流程
GetAuthToken: 'h3.workflow.getAuthToken', // 获取流程平台接口鉴权 GetAuthToken: 'h3.workflow.getAuthToken', // 获取流程平台接口鉴权
GetYearBonusDetail: 'shr.tomcat.actionGetYearBonusDetail', // 获取员工年终奖明细接口
JudgeIsLeader: 'shr.tomcat.judgeIsLeader', // 根据员工编码判断是否干部
} }
...@@ -103,3 +103,17 @@ export async function getSettleAccountsSpecial (params) { ...@@ -103,3 +103,17 @@ export async function getSettleAccountsSpecial (params) {
export async function getSettleAccountsMonth (params) { export async function getSettleAccountsMonth (params) {
return mas.proxy(MAS_CODES.GetSettleAccountsMonth, params) return mas.proxy(MAS_CODES.GetSettleAccountsMonth, params)
} }
/**
* @description: 获取员工年终奖明细
*/
export async function getYearBonusDetail (params) {
return mas.proxy(MAS_CODES.GetYearBonusDetail, params)
}
/**
* 根据员工编码判断是否干部
*/
export async function judgeIsLeader (params) {
return mas.proxy(MAS_CODES.JudgeIsLeader, params)
}
...@@ -68,10 +68,10 @@ export default { ...@@ -68,10 +68,10 @@ export default {
}, },
created() { created() {
// 初始化 token // 初始化 token
// await Api.setToken(this) Api.setToken(this)
// 修改导航条颜色 // 修改导航条颜色
// this.$nativeApi.system.statusBarColor([255, 255, 255, 1]) this.$nativeApi.system.statusBarColor([255, 255, 255, 1])
// 监听路由变化 // 监听路由变化
this.$router.beforeEach((to, from, next) => { this.$router.beforeEach((to, from, next) => {
......
<template> <template>
<div class='view-content has-header bg'> <div class="view-content has-header bg flex flex-dir-column">
<div class='user_info'> <div class="user_info">
<div> <div>
<h2>{{ userName }}</h2> <h2>{{userName}}</h2>
<p>您已入职{{ dayCount }}</p> <p>您已入职{{dayCount}}</p>
<!-- <p>新的一天,新开始的开始!</p> --> <!-- <p>新的一天,新开始的开始!</p> -->
</div> </div>
<div class='photoWrapper'> <div class="photoWrapper">
<img :src='photoUrl' class='round_icon' /> <img :src="photoUrl" class="round_icon" />
</div> </div>
</div> </div>
<!-- 钻石人生-入口 (暂时隐藏)--> <!-- 钻石人生-入口 (暂时隐藏)-->
<div class='banner' @click='onBannerClick'> <div class="banner" @click="onBannerClick">
<img class='bannerImg' src='../../assets/images/life_banner@2x.png' alt='life'> <img class="bannerImg" src="../../assets/images/life_banner@2x.png" alt="life">
</div> </div>
<group gutter='0'> <group gutter="0">
<cell :is-link='true' @click.native='clickMyInfo' class='border-top'> <cell :is-link="true" @click.native="clickMyInfo" class="border-top">
<p class='cell-title' slot='title'>个人信息修改</p> <p class="cell-title" slot="title">个人信息修改</p>
<font-icon slot='icon' class='margin-r-8' type='ic_me' /> <font-icon slot="icon" class="margin-r-8" type="ic_me" />
<!-- <span slot="value" style="color:#D23930">完整度 {{percent}}</span> --> <!-- <span slot="value" style="color:#D23930">完整度 {{percent}}</span> -->
</cell> </cell>
<cell :is-link='true' @click.native='clickLeave' class='border-top'> <cell :is-link="true" @click.native="clickLeave" class="border-top">
<p class='cell-title' slot='title'>请假</p> <p class="cell-title" slot="title">请假</p>
<font-icon slot='icon' class='margin-r-8' type='ic_qingjia' /> <font-icon slot="icon" class="margin-r-8" type="ic_qingjia" />
</cell> </cell>
<cell :is-link='true' @click.native='clickSalary' class='border-top'> <cell :is-link="true" @click.native="clickSalary" class="border-top">
<p class='cell-title' slot='title'>薪资查询</p> <p class="cell-title" slot="title">薪资查询</p>
<font-icon slot='icon' class='margin-r-8' type='ic_xinzi' /> <font-icon slot="icon" class="margin-r-8" type="ic_xinzi" />
</cell> </cell>
<cell :is-link='true' @click.native='clickProve' class='border-top border-bottom'> <cell :is-link="true" @click.native="clickProve" class="border-top border-bottom">
<p class='cell-title' slot='title'>开具证明</p> <p class="cell-title" slot="title">开具证明</p>
<font-icon slot='icon' class='margin-r-8' type='ic_zhengming' /> <font-icon slot="icon" class="margin-r-8" type="ic_zhengming" />
</cell> </cell>
<!-- <cell v-if="isLogined && !isLeader" :is-link="true" @click.native="clickYearEndBonus" class="border-bottom">
<p class="cell-title" slot="title">全年收入查询</p>
<img slot="icon" :src="require('@/assets/images/year-end-bonus.png')" class="margin-r-8" width="14" height="16" />
</cell> -->
</group> </group>
<img :src="require('../../assets/images/bg_bottom@2x.png')" class='bottom-img' /> <div class="flex-item-gsb-1"></div>
<login-dialog ref='dialogOA' v-on:loginSuccess='doLogin' /> <img :src="require('../../assets/images/bg_bottom@2x.png')" class="bottom-img"/>
<half-year-dialog ref='halfYearDialog' @onButtonClick='gotoChange' /> <login-dialog ref="dialogOA" v-on:loginSuccess="doLogin" />
<half-year-dialog ref="halfYearDialog" @onButtonClick="gotoChange" />
</div> </div>
</template> </template>
...@@ -45,7 +50,6 @@ import FontIcon from '@/components/commom/FontIcon' ...@@ -45,7 +50,6 @@ import FontIcon from '@/components/commom/FontIcon'
import { mapState, mapActions, mapMutations } from 'vuex' import { mapState, mapActions, mapMutations } from 'vuex'
import LoginDialog from './login' import LoginDialog from './login'
import HalfYearDialog from '@/components/commom/halfYearDialog' import HalfYearDialog from '@/components/commom/halfYearDialog'
import { LeaveAppId } from '@/api'
export default { export default {
components: { components: {
...@@ -56,22 +60,12 @@ export default { ...@@ -56,22 +60,12 @@ export default {
LoginDialog, LoginDialog,
HalfYearDialog HalfYearDialog
}, },
activated() { activated () {
this.init() this.init()
/* 用自定义事件重新document事件
document.addEventListener('backbutton', this.onBackKeyDown) document.addEventListener('backbutton', this.onBackKeyDown)
*/
this._onBackKeyDown = () => {
this.onBackKeyDown()
}
customEvt.addEventListener('backbutton', this._onBackKeyDown)
}, },
deactivated() { deactivated () {
/* 用自定义事件重新document事件
document.removeEventListener('backbutton', this.onBackKeyDown) document.removeEventListener('backbutton', this.onBackKeyDown)
*/
customEvt.removeEventListener('backbutton', this._onBackKeyDown)
this._onBackKeyDown = null
}, },
data() { data() {
return { return {
...@@ -80,7 +74,7 @@ export default { ...@@ -80,7 +74,7 @@ export default {
} }
}, },
watch: { watch: {
username() { username () {
// V+延时触发 // V+延时触发
if (this.username) { if (this.username) {
this.init() this.init()
...@@ -90,20 +84,21 @@ export default { ...@@ -90,20 +84,21 @@ export default {
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'isLogined', 'isLogined',
'isLeader',
'userInfo', 'userInfo',
'username', 'username',
'userid' 'userid'
]), ]),
userName() { userName () {
return this.userInfo.name return this.userInfo.name
}, },
dayCount() { dayCount () {
return this.userInfo.enterDay return this.userInfo.enterDay
}, },
percent() { percent () {
return this.userInfo.infoPercent return this.userInfo.infoPercent
}, },
photoUrl() { photoUrl () {
return this.userInfo.personPhoto ? (`data:image/jpeg;base64,${this.userInfo.personPhoto}`) : require('../../assets/images/avatar.png') return this.userInfo.personPhoto ? (`data:image/jpeg;base64,${this.userInfo.personPhoto}`) : require('../../assets/images/avatar.png')
} }
}, },
...@@ -119,7 +114,7 @@ export default { ...@@ -119,7 +114,7 @@ export default {
'updateIncumbencyProveInfo', 'updateIncumbencyProveInfo',
'updateIncomeProveInfo' 'updateIncomeProveInfo'
]), ]),
init() { init () {
// 移动端触发 // 移动端触发
if (this.username) { if (this.username) {
// 未登录,弹出登录对话框 // 未登录,弹出登录对话框
...@@ -130,26 +125,26 @@ export default { ...@@ -130,26 +125,26 @@ export default {
this.$mas.userName = this.username this.$mas.userName = this.username
} }
}, },
clickMyInfo() { clickMyInfo () {
this.$router.push({ name: 'myInfo' }) this.$router.push({ name: 'myInfo' })
}, },
clickSalary() { clickSalary () {
this.$router.push({ name: 'salaryList' }) this.$router.push({ name: 'salaryList' })
}, },
clickLeave() { clickLeave () {
// this.$nativeApi.navigator.showWidget(['com.cnd.hr.leave']) this.$nativeApi.navigator.showWidget(['com.cnd.hr.leave'])
qing.call('gotoLightApp', {
urlParam: 'cloudhub://miniapp?appid=' + LeaveAppId + '&path=index.html'
})
}, },
clickProve() { clickProve () {
// 清空缓存的证明数据 // 清空缓存的证明数据
this.updateIncumbencyProveInfo({}) this.updateIncumbencyProveInfo({})
this.updateIncomeProveInfo({}) this.updateIncomeProveInfo({})
this.$router.push({ name: 'prove' }) this.$router.push({ name: 'prove' })
}, },
onBackKeyDown(e) { // 全年收入查询
clickYearEndBonus() {
this.$router.push({ name: 'yearEndBonus' })
},
onBackKeyDown (e) {
// 安卓点击返回键退出 // 安卓点击返回键退出
if (this.$router.currentRoute.name === 'homepage') { if (this.$router.currentRoute.name === 'homepage') {
this.$nativeApi.navigator.exit() this.$nativeApi.navigator.exit()
...@@ -172,7 +167,7 @@ export default { ...@@ -172,7 +167,7 @@ export default {
this.showHalfYearDialog() this.showHalfYearDialog()
} }
}, },
isNeedShowHalfYearDialog() { isNeedShowHalfYearDialog () {
let show = false let show = false
let isNeedCleanDate = false let isNeedCleanDate = false
// 上次确认状态 // 上次确认状态
...@@ -189,8 +184,8 @@ export default { ...@@ -189,8 +184,8 @@ export default {
let lastMonth = last.getMonth() + 1 let lastMonth = last.getMonth() + 1
let lastDay = last.getDate() let lastDay = last.getDate()
// 如果时间到了指定的日期,则需要再次弹出确认弹窗 // 如果时间到了指定的日期,则需要再次弹出确认弹窗
if (month === this.alertMonth && day === this.alertDay) { if (month === this.alertMonth && day === this.alertDay) {
if (lastYear === year && lastMonth === month) { if ( lastYear === year && lastMonth === month ) {
isNeedCleanDate = false isNeedCleanDate = false
// console.log('同年同月,不清除') // console.log('同年同月,不清除')
} else { } else {
...@@ -215,15 +210,15 @@ export default { ...@@ -215,15 +210,15 @@ export default {
} }
return show return show
}, },
showHalfYearDialog() { showHalfYearDialog () {
// 显示半年提示框(显示员工信息确认提示框) // 显示半年提示框(显示员工信息确认提示框)
// window.localStorage.setItem('lastShowDate_' + this.$store.state.shareStore.userid, new Date().getTime()) // window.localStorage.setItem('lastShowDate_' + this.$store.state.shareStore.userid, new Date().getTime())
this.$refs.halfYearDialog.showDialog() this.$refs.halfYearDialog.showDialog()
}, },
gotoChange() { gotoChange () {
this.clickMyInfo() this.clickMyInfo()
}, },
isNeedShowDiamondLife() { isNeedShowDiamondLife () {
// 新的一年里,第一次登录,自动打开钻石人生页面 // 新的一年里,第一次登录,自动打开钻石人生页面
let show = false let show = false
let lastDate = window.localStorage.getItem('newYear_' + this.$store.state.shareStore.userid) let lastDate = window.localStorage.getItem('newYear_' + this.$store.state.shareStore.userid)
...@@ -240,86 +235,79 @@ export default { ...@@ -240,86 +235,79 @@ export default {
} }
return show return show
}, },
showDiamondLife() { showDiamondLife () {
// 显示钻石人生 // 显示钻石人生
window.localStorage.setItem('newYear_' + this.$store.state.shareStore.userid, new Date().getTime()) window.localStorage.setItem('newYear_' + this.$store.state.shareStore.userid, new Date().getTime())
this.onBannerClick() this.onBannerClick()
}, },
onBannerClick() { onBannerClick () {
return return
// 钻石人生 // 钻石人生
this.$router.push({ name: 'diamondLife' }) this.$router.push({ name: 'diamondLife' })
} }
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
if (from.name === 'forgotPsw' || from.name === 'resetPsw') { if (from.name === 'forgotPsw' || from.name === 'resetPsw') {
// 再次显示登录对话框 // 再次显示登录对话框
vm.showLogin() vm.showLogin()
} }
}) });
} }
} }
</script> </script>
<!-- 全局样式 --> <!-- 全局样式 -->
<style lang='less'> <style lang="less">
.vux-header { .vux-header {
background-color: #fff !important; background-color: #fff!important;
.vux-header-left { .vux-header-left {
color: #333333 !important; color: #333333!important;
.left-arrow:before { .left-arrow:before {
border-color: #333333 !important; border-color: #333333!important;
} }
} }
} }
.bg { .bg {
background-color: #ffffff !important; background-color: #ffffff!important;
} }
.weui-cells:before, .weui-cells:before,
.weui-cell:before { .weui-cell:before {
border-top: none !important; border-top: none!important;
} }
.weui-cells:after { .weui-cells:after {
border-bottom: none !important; border-bottom: none!important;
} }
.margin-r-8 { .margin-r-8 {
margin-right: 8px; margin-right: 8px;
} }
.border-top { .border-top {
border-top: 1px solid #D9D9D9; border-top: 1px solid #D9D9D9;
} }
.border-bottom { .border-bottom {
border-bottom: 1px solid #D9D9D9; border-bottom: 1px solid #D9D9D9;
} }
</style> </style>
<style lang='less' scoped> <style lang="less" scoped>
.user_info { .user_info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0 28px; padding: 0 28px;
flex-shrink: 0;
h2 { h2 {
color: #333333; color: #333333;
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
} }
p { p {
color: #666666; color: #666666;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
} }
.photoWrapper { .photoWrapper {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -329,29 +317,26 @@ export default { ...@@ -329,29 +317,26 @@ export default {
height: 72px; height: 72px;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
.round_icon { .round_icon {
width: 100%; width: 100%;
position: absolute; position: absolute;
left: 50%; left:50%;
top: 50%; top:50%;
transform: translate(-50%, -50%); transform:translate(-50%,-50%);
} }
} }
} }
.cell-title { .cell-title {
font-size: 20px; font-size: 20px;
} }
.weui-cell { .weui-cell {
padding: 15px; padding: 15px;
} }
.banner { .banner {
position: relative; position: relative;
width: 100%; width: 100%;
height: auto; height: auto;
flex-shrink: 0;
.bannerImg { .bannerImg {
width: 100%; width: 100%;
...@@ -361,10 +346,9 @@ export default { ...@@ -361,10 +346,9 @@ export default {
padding: 12px 15px; padding: 12px 15px;
} }
} }
.bottom-img { .bottom-img {
position: absolute; // position: absolute;
width: 100%; width: 100%;
bottom: 0; // bottom: 0;
} }
</style> </style>
<template> <template>
<div class="view-content has-header"> <div class="view-content has-header">
<div class="banner" ref="banner"> <div
<img id="bannerImg" src="../../assets/images/banner.png" class="bannerImg" /> class="banner"
<div class="bannerContain" :style="{ height: divHeight + 'px'}"> ref="banner"
<div class="bannerContent" v-if="positionName" style="visibility:hidden">{{positionName}}</div> >
<div class="bannerTitle" v-if="name">{{name}} <img
id="bannerImg"
src="../../assets/images/banner.png"
class="bannerImg"
/>
<div
class="bannerContain"
:style="{ height: divHeight + 'px'}"
>
<div
class="bannerContent"
v-if="positionName"
style="visibility:hidden"
>{{ positionName }}
</div>
<div
class="bannerTitle"
v-if="name"
>{{ name }}
<span style="color:#eeef00">de</span><br> <span style="color:#eeef00">de</span><br>
<div style="text-indent: 2em">钻石人生</div> <div style="text-indent: 2em">钻石人生</div>
</div> </div>
<div class="bannerContent" v-if="positionName">{{positionName}}</div> <div
class="bannerContent"
v-if="positionName"
>{{ positionName }}
</div>
</div> </div>
</div> </div>
<group gutter="0px"> <group gutter="0px">
<cell v-for="(item,index) in group1Data" :key="index" is-link @click.native="clickGrou1(index)"> <cell
<span slot="title" class="cellTitle">{{item.title}}</span> v-for="(item,index) in group1Data"
<img slot="icon" width="40" style="display:block;margin-right:10px;" :src="item.icon"> :key="index"
is-link
@click.native="clickGrou1(index)"
>
<span
slot="title"
class="cellTitle"
>{{ item.title }}</span>
<img
slot="icon"
width="40"
style="display:block;margin-right:10px;"
:src="item.icon"
>
</cell> </cell>
</group> </group>
<group> <group>
<cell v-for="(item,index) in group2Data" :key="index" is-link @click.native="clickReimburse"> <cell
<span slot="title" class="cellTitle">{{item.title}}</span> v-for="(item,index) in group2Data"
<img slot="icon" width="40" style="display:block;margin-right:10px;" :src="item.icon"> :key="index"
is-link
@click.native="clickReimburse"
>
<span
slot="title"
class="cellTitle"
>{{ item.title }}</span>
<img
slot="icon"
width="40"
style="display:block;margin-right:10px;"
:src="item.icon"
>
</cell> </cell>
</group> </group>
<group v-if="group3Data.length"> <group v-if="group3Data.length">
<cell v-for="(item,index) in group3Data" :key="index" is-link @click.native="clickLeave"> <cell
<span slot="title" class="cellTitle">{{item.title}}</span> v-for="(item,index) in group3Data"
<img slot="icon" width="40" style="display:block;margin-right:10px;" :src="item.icon"> :key="index"
is-link
@click.native="clickLeave"
>
<span
slot="title"
class="cellTitle"
>{{ item.title }}</span>
<img
slot="icon"
width="40"
style="display:block;margin-right:10px;"
:src="item.icon"
>
</cell> </cell>
</group> </group>
<group> <group>
<cell v-for="(item,index) in group4Data" :key="index" is-link @click.native="clickGrou4(index)"> <cell
<span slot="title" class="cellTitle">{{item.title}}</span> v-for="(item,index) in group4Data"
<img slot="icon" width="40" style="display:block;margin-right:10px;" :src="item.icon"> :key="index"
is-link
@click.native="clickGrou4(index)"
>
<span
slot="title"
class="cellTitle"
>{{ item.title }}</span>
<img
slot="icon"
width="40"
style="display:block;margin-right:10px;"
:src="item.icon"
>
</cell> </cell>
</group> </group>
<group> <group>
<cell-box style="justify-content:center" @click.native="clickDiamond"> <cell-box
<img width="25" :src="require('@/assets/images/diamond.png')"> style="justify-content:center"
@click.native="clickDiamond"
>
<img
width="25"
:src="require('@/assets/images/diamond.png')"
>
<span style="line-height:35px;margin-left:15px;color:#4c4c4c;">钻石人生</span> <span style="line-height:35px;margin-left:15px;color:#4c4c4c;">钻石人生</span>
</cell-box> </cell-box>
</group> </group>
<login-dialog ref="dialogOA" v-on:loginSuccess="doLogin" /> <login-dialog
ref="dialogOA"
v-on:loginSuccess="doLogin"
/>
</div> </div>
</template> </template>
<script> <script>
import { Group, Cell, CellBox } from 'vux' import {Group, Cell, CellBox} from 'vux'
import LoginDialog from './login' import LoginDialog from './login'
import Api from '@/api' import Api from '@/api'
...@@ -59,7 +142,7 @@ export default { ...@@ -59,7 +142,7 @@ export default {
CellBox, CellBox,
LoginDialog LoginDialog
}, },
data: function() { data: function () {
return { return {
group1Data: [], group1Data: [],
group2Data: [], group2Data: [],
...@@ -73,13 +156,13 @@ export default { ...@@ -73,13 +156,13 @@ export default {
} }
}, },
methods: { methods: {
initData: function() { initData: function () {
this.initGroup1Data() this.initGroup1Data()
this.initGroup2Data() this.initGroup2Data()
this.initGroup3Data() this.initGroup3Data()
this.initGroup4Data() this.initGroup4Data()
}, },
initGroup1Data: function() { initGroup1Data: function () {
let titleArray = ['薪资', '社保', '公积金', '企业年金', '奖励'] let titleArray = ['薪资', '社保', '公积金', '企业年金', '奖励']
for (let i = 0; i < titleArray.length; i++) { for (let i = 0; i < titleArray.length; i++) {
this.group1Data.push({ this.group1Data.push({
...@@ -88,19 +171,19 @@ export default { ...@@ -88,19 +171,19 @@ export default {
}) })
} }
}, },
initGroup2Data: function() { initGroup2Data: function () {
this.group2Data.push({ this.group2Data.push({
title: '报销查询', title: '报销查询',
icon: require('@/assets/images/icon7.png') icon: require('@/assets/images/icon7.png')
}) })
}, },
initGroup3Data: function() { initGroup3Data: function () {
this.group3Data.push({ this.group3Data.push({
title: '我要请假', title: '我要请假',
icon: require('@/assets/images/icon8.png') icon: require('@/assets/images/icon8.png')
}) })
}, },
initGroup4Data: function() { initGroup4Data: function () {
// let titleArray = ['个人简历', '修改个人信息'] // let titleArray = ['个人简历', '修改个人信息']
// for (let i = 0; i < titleArray.length; i++) { // for (let i = 0; i < titleArray.length; i++) {
// this.group4Data.push({ // this.group4Data.push({
...@@ -113,13 +196,13 @@ export default { ...@@ -113,13 +196,13 @@ export default {
icon: require("@/assets/images/icon9.png") icon: require("@/assets/images/icon9.png")
}); });
}, },
addRiskFund: function() { addRiskFund: function () {
this.group1Data.push({ this.group1Data.push({
title: '风险金查询', title: '风险金查询',
icon: require('@/assets/images/icon6.png') icon: require('@/assets/images/icon6.png')
}) })
}, },
clickGrou1: function(index) { clickGrou1: function (index) {
let routeName = '' let routeName = ''
switch (index) { switch (index) {
case 0: case 0:
...@@ -143,9 +226,9 @@ export default { ...@@ -143,9 +226,9 @@ export default {
default: default:
break break
} }
this.$router.push({ name: routeName }) this.$router.push({name: routeName})
}, },
clickReimburse: function() { clickReimburse: function () {
this.$nativeApi.navigator.showWidget(['com.cnd.expenses']).then( this.$nativeApi.navigator.showWidget(['com.cnd.expenses']).then(
function success(result) { function success(result) {
console.log(result) console.log(result)
...@@ -155,7 +238,7 @@ export default { ...@@ -155,7 +238,7 @@ export default {
} }
) )
}, },
clickLeave: function() { clickLeave: function () {
this.$nativeApi.navigator.showWidget(['com.cnd.hr.leave']).then( this.$nativeApi.navigator.showWidget(['com.cnd.hr.leave']).then(
function success(result) { function success(result) {
console.log(result) console.log(result)
...@@ -165,35 +248,33 @@ export default { ...@@ -165,35 +248,33 @@ export default {
} }
) )
}, },
clickGrou4: function(index) { clickGrou4: function (index) {
switch (index) { switch (index) {
case 0: case 0: {
{
this.$nativeApi.navigator.showWidget([ this.$nativeApi.navigator.showWidget([
'com.cnd.hr.resume', 'com.cnd.hr.resume',
this.userInfoStr this.userInfoStr
]) ])
} }
break break
case 1: case 1: {
{ this.$router.push({name: 'userInfo'})
this.$router.push({ name: 'userInfo' })
} }
break break
default: default:
break break
} }
}, },
clickDiamond: function() { clickDiamond: function () {
// this.$router.push({ name: 'diamondLife' }) // this.$router.push({ name: 'diamondLife' })
}, },
showLogin: function() { showLogin: function () {
this.$refs.dialogOA.showDialog(this.userName) this.$refs.dialogOA.showDialog(this.userName)
}, },
doLogin: function() { doLogin: function () {
this.getUserInfo() this.getUserInfo()
}, },
setBannerHeight: function() { setBannerHeight: function () {
let oriWidth = document.getElementById('bannerImg').naturalWidth let oriWidth = document.getElementById('bannerImg').naturalWidth
let oriHeight = document.getElementById('bannerImg').naturalHeight let oriHeight = document.getElementById('bannerImg').naturalHeight
let screenWidth = document.body.clientWidth let screenWidth = document.body.clientWidth
...@@ -201,8 +282,8 @@ export default { ...@@ -201,8 +282,8 @@ export default {
this.divHeight = realHeight this.divHeight = realHeight
console.log(this.divHeight) console.log(this.divHeight)
}, },
getUserInfo: function() { getUserInfo: function () {
let parm = { userid: this.$store.state.shareStore.userid } let parm = {userid: this.$store.state.shareStore.userid}
let that = this let that = this
Promise.all([ Promise.all([
this.$mas.proxy(Api.UserInfoUrl, parm), this.$mas.proxy(Api.UserInfoUrl, parm),
...@@ -230,11 +311,12 @@ export default { ...@@ -230,11 +311,12 @@ export default {
}) })
}) })
}, },
initCompeleteFun: function() { initCompeleteFun: function () {
this.initData() this.initData()
let that = this let that = this
if (this.$store.state.shareStore.userid.length == 0) { if (this.$store.state.shareStore.userid.length == 0) {
this.$nativeApi.account.getUser().then(data => { this.$nativeApi.account.getUser().then(data => {
console.log('data>>', data)
that.userInfoStr = JSON.stringify(data) that.userInfoStr = JSON.stringify(data)
that.userName = data.uid that.userName = data.uid
that.$mas.userName = data.uid that.$mas.userName = data.uid
...@@ -245,20 +327,20 @@ export default { ...@@ -245,20 +327,20 @@ export default {
} }
} }
}, },
mounted: function() { mounted: function () {
this.initCompeleteFun() this.initCompeleteFun()
let that = this; let that = this;
window.onresize = function(){ window.onresize = function () {
that.setBannerHeight(); that.setBannerHeight();
} }
}, },
activated: function() { activated: function () {
this.$store.commit('setNavTitle', '员工自助') this.$store.commit('setNavTitle', '员工自助')
this.$nextTick(() => { this.$nextTick(() => {
this.setBannerHeight() this.setBannerHeight()
}) })
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
if (from.name === 'forgotPsw' || from.name === 'resetPsw') { if (from.name === 'forgotPsw' || from.name === 'resetPsw') {
// 再次显示登录对话框 // 再次显示登录对话框
......
...@@ -5,11 +5,13 @@ ...@@ -5,11 +5,13 @@
v-for="(item,index) in listData" v-for="(item,index) in listData"
:key="index" :key="index"
is-link is-link
v-show="item.alias !== 'yearEndBonus' || (isLogined && !isLeader)"
:border-intent="false" :border-intent="false"
:class="['border-bottom', index === 0 ? 'border-top' : '']" :class="['border-bottom', index === 0 ? 'border-top' : '']"
@click.native="handleItemClick(item.alias)"> @click.native="handleItemClick(item.alias)">
<p class="cell-title" slot="title">{{item.title}}</p> <p class="cell-title" slot="title">{{item.title}}</p>
<font-icon slot="icon" class="margin-r-8" :type="item.icon" /> <font-icon v-show="item.alias !== 'yearEndBonus'" slot="icon" class="margin-r-8" :type="item.icon" />
<img v-show="item.alias === 'yearEndBonus'" slot="icon" :src="require('@/assets/images/year-end-bonus.png')" class="margin-r-8" width="14" height="16" />
</cell> </cell>
</group> </group>
</div> </div>
...@@ -39,7 +41,7 @@ export default { ...@@ -39,7 +41,7 @@ export default {
items: [ items: [
{ {
alias: 'salary', alias: 'salary',
title: '资查询', title: '资查询',
icon: 'ic_xinzi' icon: 'ic_xinzi'
}, },
{ {
...@@ -63,6 +65,11 @@ export default { ...@@ -63,6 +65,11 @@ export default {
icon: 'ic_jiangjin' icon: 'ic_jiangjin'
}, },
{ {
alias: 'yearEndBonus',
title: '全年收入查询',
icon: 'year-end-bonus',
},
{
alias: 'yearEnd', alias: 'yearEnd',
title: '我的薪资福利', title: '我的薪资福利',
icon: 'ic_nianzhon' icon: 'ic_nianzhon'
...@@ -77,6 +84,8 @@ export default { ...@@ -77,6 +84,8 @@ export default {
}, },
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'isLogined',
'isLeader',
'hasRew' 'hasRew'
]), ]),
listData () { listData () {
......
...@@ -305,8 +305,8 @@ export default { ...@@ -305,8 +305,8 @@ export default {
}) })
params = { params = {
finishStart: true, // 是否提交发起节点 finishStart: true, // 是否提交发起节点
// workflowCode: 'CT_HR_FLOW_ZZZM_001', // 流程模板编码 workflowCode: 'CT_HR_FLOW_ZZZM_001', // 流程模板编码
workflowCode: 'CT_HR_FLOW_CERTIFICATIONBILL', // 流程模板编码--旧 // workflowCode: 'CT_HR_FLOW_CERTIFICATIONBILL', // 流程模板编码--旧
userCode: this.proveUpdateList.hrUserAccount, // 用户账号 userCode: this.proveUpdateList.hrUserAccount, // 用户账号
workflowInstanceId: null, // 流程实例ID workflowInstanceId: null, // 流程实例ID
data: { data: {
...@@ -346,8 +346,8 @@ export default { ...@@ -346,8 +346,8 @@ export default {
}) })
params = { params = {
finishStart: true, // 是否提交发起节点 finishStart: true, // 是否提交发起节点
// workflowCode: 'CT_HR_FLOW_SRZM_001', // 流程模板编码 workflowCode: 'CT_HR_FLOW_SRZM_001', // 流程模板编码
workflowCode: 'CT_HR_FLOW_INCOMEVERIFICATIO', // 流程模板编码--旧 // workflowCode: 'CT_HR_FLOW_INCOMEVERIFICATIO', // 流程模板编码--旧
userCode: this.proveUpdateIncomeList.hrUserAccount, // 用户账号 userCode: this.proveUpdateIncomeList.hrUserAccount, // 用户账号
workflowInstanceId: null, // 流程实例ID workflowInstanceId: null, // 流程实例ID
data: { data: {
......
<template>
<div class="view-content bg">
<x-header
class="header"
:left-options="{backText: ''}"
title="全年收入查询"
style="z-index:500;"
>
<div
style="text-align:right;margin-top:-14px;"
slot="right"
@click="showDateTimeChoose=true"
>
<datetime
v-model="dateTime"
:default-selected-value="defaultSelectedValue"
confirm-text="确定"
cancel-text="取消"
clear-text="请选择年份"
format="YYYY"
year-row="{value}年"
:min-year='2023'
:max-year="thisYear"
:show.sync="showDateTimeChoose"
@on-change="dateTimeChoose"
>
<div
class="flex flex-c"
style="margin-right:-20px;"
>
<span
class="c0 fs14 bold-500"
style="margin-right:4px;"
>{{ year }}</span>
<x-icon type="ios-arrow-down"></x-icon>
</div>
</datetime>
</div>
</x-header>
<div
v-if="detailInfo && detailInfo.yearendBonus"
class=""
style="padding-top: 46px; background-color: #FEFEFE;"
>
<div class="card">
<div class="flex1">
<p class="c3">年终奖</p>
<p class="c6">
<!-- <span class="drak-red bold-700 f18">{{ detailInfo.yearendBonus && getTotal(formatMoney(detailInfo.yearendBonus.rewardTax), formatMoney(detailInfo.yearendBonus.rewardAfterTax)) }}</span> 万元-->
<span class="drak-red bold-700 f18">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.reward) }}</span> 万元
</p>
</div>
<div class="flex1">
<p class="c3">年度收入</p>
<p class="c6">
<span class="drak-red bold-700 f18">
<!-- 年度收入 = 已发收入+奖金(税前)+税前奖金中专项奖-->
{{ detailInfo.yearendBonus && getTotal4(formatMoney(detailInfo.yearendBonus.incomepaid), formatMoney(detailInfo.yearendBonus.reward), 0, 0) }}
</span> 万元</p>
</div>
</div>
<div class="block-title-bar">
<span class="title bold-500">绩效评定</span>
</div>
<div class="table">
<div class="table-header">
<div
class="flex flex-center"
style="flex:7;"
>年度绩效
</div>
<div
class="flex flex-center"
style="flex:3;"
>{{ detailInfo.yearendBonus && detailInfo.yearendBonus.annualeval }}
</div>
</div>
<div class="table-col-title">
<div
class="flex flex-center"
style="flex:2;"
>月份
</div>
<div
class="flex flex-center"
style="flex:3;"
>绩效结果
</div>
<div
class="flex flex-center"
style="flex:2;"
>月份
</div>
<div
class="flex flex-center"
style="flex:3;"
>绩效结果
</div>
</div>
<div class="table-row border-bottom">
<div
class="flex flex-center border-right"
style="flex:2;"
>1月
</div>
<div
class="flex flex-center border-right c3 bold-500"
style="flex:3;"
>{{ getPerformance('1月') }}
</div>
<div
class="flex flex-center border-right"
style="flex:2;"
>7月
</div>
<div
class="flex flex-center c3 bold-500"
style="flex:3;"
>{{ getPerformance('7月') }}
</div>
</div>
<div class="table-row border-bottom">
<div
class="flex flex-center border-right"
style="flex:2;"
>2月
</div>
<div
class="flex flex-center border-right c3 bold-500"
style="flex:3;"
>{{ getPerformance('2月') }}
</div>
<div
class="flex flex-center border-right"
style="flex:2;"
>8月
</div>
<div
class="flex flex-center c3 bold-500"
style="flex:3;"
>{{ getPerformance('8月') }}
</div>
</div>
<div class="table-row border-bottom">
<div
class="flex flex-center border-right"
style="flex:2;"
>3月
</div>
<div
class="flex flex-center border-right c3 bold-500"
style="flex:3;"
>{{ getPerformance('3月') }}
</div>
<div
class="flex flex-center border-right"
style="flex:2;"
>9月
</div>
<div
class="flex flex-center c3 bold-500"
style="flex:3;"
>{{ getPerformance('9月') }}
</div>
</div>
<div class="table-row border-bottom">
<div
class="flex flex-center border-right"
style="flex:2;"
>4月
</div>
<div
class="flex flex-center border-right c3 bold-500"
style="flex:3;"
>{{ getPerformance('4月') }}
</div>
<div
class="flex flex-center border-right"
style="flex:2;"
>10月
</div>
<div
class="flex flex-center c3 bold-500"
style="flex:3;"
>{{ getPerformance('10月') }}
</div>
</div>
<div class="table-row border-bottom">
<div
class="flex flex-center border-right"
style="flex:2;"
>5月
</div>
<div
class="flex flex-center border-right c3 bold-500"
style="flex:3;"
>{{ getPerformance('5月') }}
</div>
<div
class="flex flex-center border-right"
style="flex:2;"
>11月
</div>
<div
class="flex flex-center c3 bold-500"
style="flex:3;"
>{{ getPerformance('11月') }}
</div>
</div>
<div class="table-row">
<div
class="flex flex-center border-right"
style="flex:2;"
>6月
</div>
<div
class="flex flex-center border-right c3 bold-500"
style="flex:3;"
>{{ getPerformance('6月') }}
</div>
<div
class="flex flex-center border-right"
style="flex:2;"
>12月
</div>
<div
class="flex flex-center c3 bold-500"
style="flex:3;"
>{{ getPerformance('12月') }}
</div>
</div>
</div>
<div class="block-title-bar">
<p class="title bold-500">
年终奖<!--<img :src="require('@/assets/images/icon-question.png')" style="margin-left:5px;" width="12" height="12" @click="showTip('年终奖')" />-->
</p>
<span class="c9 fs12">金额 (万元)</span>
</div>
<div class="cell border-bottom">
<span>在岗时间</span>
<span class="value">{{ detailInfo.yearendBonus && detailInfo.yearendBonus.ondutyMonth }}</span>
</div>
<div class="cell border-bottom">
<span>奖金(税前)</span>
<span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.reward) }}</span>
<!-- <span class="value">{{ detailInfo.yearendBonus && getTotal(formatMoney(detailInfo.yearendBonus.rewardTax), formatMoney(detailInfo.yearendBonus.rewardAfterTax)) }}</span>-->
</div>
<div class="cell border-bottom">
<span>奖金个税</span>
<!-- <span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.rewardTax) }}</span>-->
<span class="value">{{ detailInfo.yearendBonus && (formatMoney(detailInfo.yearendBonus.reward) - formatMoney(detailInfo.yearendBonus.rewardAfterTax)).toFixed(2) }}</span>
</div>
<div class="cell border-bottom">
<span>奖金实发</span>
<span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.rewardAfterTax) }}</span>
</div>
<div
class="block-title-bar"
style="margin-top:20px;"
>
<p class="title bold-500">
年收入<!--<img :src="require('@/assets/images/icon-question.png')" style="margin-left:5px;" width="12" height="12" @click="showTip('年收入')" /> -->
</p>
<span class="c9 fs12">金额 (万元)</span>
</div>
<div class="cell">
<span>已发收入</span>
<span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.incomepaid) }}</span>
</div>
<div class="cell">
<span class="ml-10">其中:全年工资</span>
<span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.salarypaid) }}</span>
</div>
<div class="cell border-bottom">
<span class="ml-10">其中:已发奖励</span>
<span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.rewardpaid) }}</span>
</div>
<div class="cell border-bottom">
<span>税前奖金中专项奖</span>
<span class="value">{{ detailInfo.yearendBonus && formatMoney(detailInfo.yearendBonus.backAndSpecialTopaid) }}</span>
</div>
<div
class="cell border-bottom"
style="margin-bottom:20px;"
>
<span>全年收入</span> <span class="value">
<!-- 已发收入+奖金(税前)-->
{{ detailInfo.yearendBonus && getTotal4(formatMoney(detailInfo.yearendBonus.incomepaid), formatMoney(detailInfo.yearendBonus.reward), 0, 0) }}
</span>
</div>
</div>
<div
v-else-if="loaded"
style="padding-top: 46px; background-color: #FEFEFE;"
>
<div
class="flex flex-dir-column flex-cross-center"
style="margin-top:57px;"
>
<img
:src="require('@/assets/images/empty@2x.png')"
width="200"
height="136"
/>
<p class="f18 c0 bold-500">暂无查询数据</p>
<p
v-if="errorInfo"
class="f12 c6"
>{{ errorInfo }}</p>
</div>
</div>
</div>
</template>
<script>
import {XHeader, Datetime, Msg} from 'vux'
import FontIcon from '@/components/commom/FontIcon'
import {mapActions, mapState} from 'vuex';
import {setWaterMark, removeWatermark} from '@/watermarks'
import dayjs from "dayjs";
/**
* 全年收入查询
*/
export default {
name: 'year-end-bouns',
components: {
'x-header': XHeader,
FontIcon,
Datetime,
Msg,
},
data: function () {
return {
loaded: false, // 首次加载完成
year: '',
dateTime: '',
defaultSelectedValue: '' + (new Date().getFullYear() - 1),
showDateTimeChoose: false, // 时间日期选择弹窗
detailInfo: null,
errorInfo: null,
}
},
computed: {
...mapState('user', ['userInfo']),
userNumber() {
return this.userInfo.number
},
thisYear: function () {
return new Date().getFullYear()
},
},
methods: {
...mapActions('user', [
'getYearBonusDetail'
]),
goBack() {
this.$router.goBack()
},
dateTimeChoose(val) {
this.year = val
this.getDetail()
},
getPerformance(month) {
if (this.detailInfo && this.detailInfo.performances && this.detailInfo.performances.length > 0) {
const obj = this.detailInfo.performances.find(it => it.month === month)
return (obj && obj.performance) || ''
}
return ''
},
getTotal(v1, v2) {
let num = v1 * 100 + v2 * 100 // 先×100避免二进制计算产生误差
return Math.floor(num) / 100;
},
getTotal4(v1, v2, v3, v4) {
let num = v1 * 100 + v2 * 100 + v3 * 100 + v4 * 100 // 先×100避免二进制计算产生误差
return Math.floor(num) / 100;
},
formatMoney(value) {
if (!value) return ''
// const formater = new Intl.NumberFormat('en-US')
const amount1 = parseInt(value * 1 / 100) // 去除百位
const amount2 = amount1 * 1 / 100 // 转成万元
return amount2
},
getTax(a, b) {
return (a - b).toFixed(2);
},
showTip(text) {
// this.$vux.alert.show({
// content: '提示'
// })
// this.$vux.confirm.show({
// content: text,
// showCancelButton: false
// })
},
getDetail() {
const params = {
year: this.year,
number: this.userInfo && this.userInfo.number
}
// this.detailInfo = null
// this.errorInfo = null
this.loaded = false
this.getYearBonusDetail(params).then(res => {
if (res.code === 200) {
this.detailInfo = res.data
this.errorInfo = res.message
} else {
this.detailInfo = null
this.errorInfo = null
}
this.loaded = true
})
},
},
mounted: function () {
this.$store.commit("setNavTitle", "全年收入查询")
this.year = this.thisYear - 1//默认显示去年的
console.log('defaultSelectedValue>>', this.defaultSelectedValue)
console.log('dateTime>>', this.dateTime)
this.getDetail()
console.log('userName>>', this.$mas.userName)
setWaterMark(`${this.userInfo.name} ${dayjs().format('YYYY-MM-DD HH:mm:ss')}`);
},
beforeDestroy() {
removeWatermark();
}
}
</script>
<style
lang="less"
scoped
>
.header {
position: fixed;
width: 100%;
.left {
width: 30px;
height: 30px;
}
}
.c0 {
color: #000000;
}
.c3 {
color: #333333;
}
.c6 {
color: #666666;
}
.c9 {
color: #999999;
}
.drak-red {
color: #D13830;
}
.bold-500 {
font-weight: bold;
}
.bold-700 {
font-weight: 700;
}
.f12 {
font-size: 12px;
}
.f14 {
font-size: 14px;
}
.f18 {
font-size: 18px;
}
.card {
margin: 10px 12px 20px 12px;
background: #ffffff;
padding: 12px;
border-radius: 8px;
display: flex;
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.08);
font-size: 12px;
}
.flex1 {
flex: 1;
}
.block-title-bar {
background-color: #F2F2F2;
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 10px;
padding-right: 10px;
color: #333333;
font-size: 14px;
&::before {
position: absolute;
display: inline-block;
content: '';
width: 3px;
height: 12px;
background: #D13830;
}
.title {
margin-left: 8px;
}
}
.table {
margin: 10px 12px 20px 12px;
border: 1px solid #F0F0F0;
.table-header {
background: #F0F0F0;
height: 40px;
display: flex;
color: #333333;
font-size: 14px;
font-weight: bold;
}
.table-col-title {
background: #F8F8F8;
height: 40px;
display: flex;
color: #333333;
font-size: 14px;
font-weight: bold;
}
.table-row {
background: #ffffff;
height: 40px;
display: flex;
color: #666666;
font-size: 14px;
font-weight: 400;
}
.border-left {
border-left: 1px solid #F0F0F0;
}
.border-right {
border-right: 1px solid #F0F0F0;
}
.border-bottom {
border-bottom: 1px solid #F0F0F0;
}
}
.cell {
height: 50px;
background: #ffffff;
margin: 0 15px;
color: #333333;
font-size: 14px;
font-weight: 400;
display: flex;
justify-content: space-between;
align-items: center;
.value {
color: #000000;
font-size: 15px;
font-weight: bold;
}
.border-bottom {
border-bottom: 1px solid #EEEEEE;
}
}
.ml-10 {
margin-left: 10px;
}
</style>
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import './polyfill/index'
import Vue from 'vue' import Vue from 'vue'
import router from './router' import router from './router'
import App from './app.vue' import App from './app.vue'
import store from './store' import store from './store'
import plugin from './plugin' import plugin from './plugin'
import routerStore from '../libraries/plugins/RouterStore' import routerStore from '../libraries/plugins/RouterStore'
import * as Api from '@/api/index' import VConsole from 'vconsole'
// import VConsole from 'vconsole' if(process.env.PACK_VENV==='vtest'){
// let vconsole = new VConsole() new VConsole()
}
Vue.use(routerStore, store, router) Vue.use(routerStore, store, router)
Vue.config.debug = process.env.NODE_ENV !== 'production' Vue.config.debug = process.env.NODE_ENV !== 'production'
Vue.config.productionTip = false Vue.config.productionTip = false
const vm = new Vue({ /* eslint-disable no-new */
new Vue({
el: '#app',
store, store,
router, router,
plugin, plugin,
template: '<App/>', template: '<App/>',
components: { App } components: { App }
}) })
window.qing.ready(async () => {
// 初始化 token
await Api.setToken(vm)
vm.$mount('#app')
})
...@@ -35,6 +35,7 @@ import Submission from '~com/prove/Submission.vue' ...@@ -35,6 +35,7 @@ import Submission from '~com/prove/Submission.vue'
import Printtemplate from '~com/prove/printtemplate.vue' import Printtemplate from '~com/prove/printtemplate.vue'
import SocialAppointments from '~com/socialAppointments/' import SocialAppointments from '~com/socialAppointments/'
import workexPerience from '~com/workexperience/' import workexPerience from '~com/workexperience/'
import yearEndBonus from '~com/yearEndBonus'
Vue.use(VueRouter) Vue.use(VueRouter)
...@@ -179,9 +180,7 @@ routes = routes.concat([{ ...@@ -179,9 +180,7 @@ routes = routes.concat([{
{ {
path: '/input', path: '/input',
name: 'input', name: 'input',
component: function (resolve) { component: resolve => require(['@/components/commom/c-input'], resolve)
return require(['@/components/commom/c-input'], resolve)
}
}, },
{ {
path: '/userFamily', path: '/userFamily',
...@@ -223,9 +222,7 @@ routes = routes.concat([{ ...@@ -223,9 +222,7 @@ routes = routes.concat([{
},{ },{
path:'/addressChoose', // 籍贯、户口所在地、出生地、生源地--选择页 path:'/addressChoose', // 籍贯、户口所在地、出生地、生源地--选择页
name:'addressChoose', name:'addressChoose',
component: function (resolve) { component: resolve => require(['@/components/commom/addressChoose'], resolve)
return require(['@/components/commom/addressChoose'], resolve)
}
},{ },{
path:'/socialRelation', // 社会信息-添加/删除/编辑 path:'/socialRelation', // 社会信息-添加/删除/编辑
name:'socialRelation', name:'socialRelation',
...@@ -237,9 +234,11 @@ routes = routes.concat([{ ...@@ -237,9 +234,11 @@ routes = routes.concat([{
},{ // 公司选择,支持搜索 },{ // 公司选择,支持搜索
path:'/companyChoose', path:'/companyChoose',
name:'companyChoose', name:'companyChoose',
component: function (resolve) { component: resolve => require(['@/components/commom/companyChoose'], resolve)
return require(['@/components/commom/companyChoose'], resolve) },{ // 全年收入查询
} path: '/yearEndBonus',
name: 'yearEndBonus',
component: yearEndBonus
} }
]) ])
......
...@@ -254,11 +254,9 @@ export default { ...@@ -254,11 +254,9 @@ export default {
} }
}) })
.catch(err => { .catch(err => {
console.log('报错了1>>',err)
commit('networkError', err, { root: true }) commit('networkError', err, { root: true })
}) })
} catch (error) { } catch (error) {
console.log('报错了2>>',err)
commit('networkError', error, { root: true }) commit('networkError', error, { root: true })
} }
}, },
......
...@@ -6,6 +6,8 @@ import { ...@@ -6,6 +6,8 @@ import {
viewEmployeeRecord, viewEmployeeRecord,
viewPerformanceInfo, viewPerformanceInfo,
viewRewardAndPuni, viewRewardAndPuni,
judgeIsLeader,
getYearBonusDetail,
getSettleAccountsYears, getSettleAccountsYears,
getSettleAccountsTotal, getSettleAccountsTotal,
getSettleAccountsSpecial, getSettleAccountsSpecial,
...@@ -28,6 +30,7 @@ export default { ...@@ -28,6 +30,7 @@ export default {
isLogined: false, isLogined: false,
username: '', username: '',
userInfo: {}, userInfo: {},
isLeader: false, // 是否干部领导
hasRew: false, // 是否有风险金 hasRew: false, // 是否有风险金
mySalaryToNow: {}, // 我的薪资福利 mySalaryToNow: {}, // 我的薪资福利
employeeRecord: [], // 任职记录 employeeRecord: [], // 任职记录
...@@ -52,6 +55,9 @@ export default { ...@@ -52,6 +55,9 @@ export default {
updateUserInfo (state, payload) { updateUserInfo (state, payload) {
state.userInfo = payload || {} state.userInfo = payload || {}
}, },
isLeader (state, payload) {
state.isLeader = payload
},
updateRewState (state, payload) { updateRewState (state, payload) {
state.hasRew = payload state.hasRew = payload
}, },
...@@ -111,7 +117,7 @@ export default { ...@@ -111,7 +117,7 @@ export default {
commit('networkError', error, { root: true }) commit('networkError', error, { root: true })
} }
}, },
async getUserInfo ({ commit, state }, payload) { async getUserInfo ({ commit, state, dispatch }, payload) {
try { try {
let param = { userEmail: state.username } let param = { userEmail: state.username }
let arr = [] let arr = []
...@@ -121,6 +127,10 @@ export default { ...@@ -121,6 +127,10 @@ export default {
.then(resultArr => { .then(resultArr => {
if (resultArr[0].success) { if (resultArr[0].success) {
commit('updateUserInfo', {...resultArr[0].infoMap}) commit('updateUserInfo', {...resultArr[0].infoMap})
// 判断是否干部
if (resultArr[0].infoMap && resultArr[0].infoMap.number) {
dispatch('judgeIsLeader', { number: resultArr[0].infoMap.number })
}
} }
if (resultArr[1].success) { if (resultArr[1].success) {
commit('updateUserInfo', {...state.userInfo, enterDay: resultArr[1].enterDay, infoPercent: resultArr[1].infoPercent}) commit('updateUserInfo', {...state.userInfo, enterDay: resultArr[1].enterDay, infoPercent: resultArr[1].infoPercent})
...@@ -365,5 +375,24 @@ export default { ...@@ -365,5 +375,24 @@ export default {
commit('networkError', error, { root: true }) commit('networkError', error, { root: true })
} }
}, },
// 根据员工编码判断是否干部
async judgeIsLeader ({ commit }, payload) {
try {
const response = await judgeIsLeader(payload)
commit('isLeader', !!response.data)
return response
} catch (error) {
commit('networkError', error, { root: true })
}
},
async getYearBonusDetail ({ commit }, payload) {
// 年终奖明细查询
try {
const response = await getYearBonusDetail(payload)
return response
} catch (error) {
commit('networkError', error, { root: true })
}
},
} }
} }
/** 水印添加方法 */
const setWatermarkFn = (str1, str2, show) => {
let winW = document.documentElement.clientWidth || document.body.clientWidth
let winH = document.documentElement.clientHeight || document.body.clientHeight
const id = 'waterMark'
if (document.getElementById(id) !== null) {
document.body.removeChild(document.getElementById(id))
}
const can = document.createElement('canvas')
// 设置canvas画布大小
console.log('winW>>', winW)
can.width = (winW-48)/2
// can.width = 190
can.height = 195
const cans = can.getContext('2d')
cans.rotate(-40 * Math.PI / 180) // 水印旋转角度
cans.font = '16px 微软雅黑'
cans.fillStyle = '#999'
cans.textAlign = 'center'
cans.textBaseline = 'middle'
// cans.fillText(str1, can.width / 2, can.height) // 水印在画布的位置x,y轴
cans.fillText(str1, 10, can.height-40) // 水印在画布的位置x,y轴
// cans.fillText(str2, can.width / 2, can.height + 25)
const div = document.createElement('div')
div.id = id
div.style.pointerEvents = 'none'
div.style.top = '-60px'
div.style.left = '-10px'
if (show) {
div.style.opacity = '0'
} else {
div.style.opacity = '0.3'
}
div.style.position = 'fixed'
div.style.zIndex = '1000'
div.style.width = winW + 'px'
div.style.height = winH + 'px'
div.style.background = 'url(' + can.toDataURL('image/png') + ') left top repeat'
document.body.appendChild(div)
return id
}
// 添加水印方法
export const setWaterMark = (str1, str2) => {
let id = setWatermarkFn(str1, str2)
if (document.getElementById(id) === null) {
id = setWatermarkFn(str1, str2)
}
}
// 移除水印方法
export const removeWatermark = () => {
const id = 'waterMark'
if (document.getElementById(id) !== null) {
document.body.removeChild(document.getElementById(id))
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment