master
wanglei 6 months ago
parent 1794642b5f
commit 9cbf542841

@ -4,7 +4,7 @@ import request from '@/utils/request'
// 查询个人工资 // 查询个人工资
export function getSalary(query) { export function getSalary(query) {
return request({ return request({
url: '/wx/emp/salary', url: '/pay/wx/emp/salary',
method: 'get', method: 'get',
data: query data: query
}) })
@ -13,7 +13,7 @@ export function getSalary(query) {
// 查询月包活 // 查询月包活
export function getBaohuo(query) { export function getBaohuo(query) {
return request({ return request({
url: '/secure/wocheck/getbaohuo', url: '/pay/wocheck/getbaohuo',
method: 'get', method: 'get',
data: query data: query
}) })
@ -22,7 +22,7 @@ export function getBaohuo(query) {
// 查询日工工时 // 查询日工工时
export function listDwhours(query) { export function listDwhours(query) {
return request({ return request({
url: '/wx/emp/dayWork', url: '/pay/wx/emp/dayWork',
method: 'get', method: 'get',
data: query data: query
}) })
@ -31,7 +31,7 @@ export function listDwhours(query) {
// 查询月帮工 // 查询月帮工
export function getBanggong(query) { export function getBanggong(query) {
return request({ return request({
url: '/secure/wocheck/getbanggong', url: '/pay/wocheck/getbanggong',
method: 'get', method: 'get',
data: query data: query
}) })

@ -1,6 +1,6 @@
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
baseUrl: 'http://172.16.9.9:8090', baseUrl: 'https://payroll.ruanfa.com.cn/prod-api',
// baseUrl: 'http://localhost:8090', // baseUrl: 'http://localhost:8090',
// 应用信息 // 应用信息
appInfo: { appInfo: {

@ -138,9 +138,10 @@
methods: { methods: {
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data this.user = response.data.user
this.queryParams.empName = this.user.nickName this.queryParams.empName = this.user.nickName
this.queryParams.date = this.date this.queryParams.date = this.date
this.queryParams.tenantId = this.user.tenantId
this.getBaohuolist(); this.getBaohuolist();
this.getBgList(); this.getBgList();
}) })
@ -151,6 +152,7 @@
this.user = {} this.user = {}
this.queryParams.empName = '' this.queryParams.empName = ''
this.queryParams.date = this.date this.queryParams.date = this.date
this.queryParams.tenantId = ''
this.bhgongziList = [] this.bhgongziList = []
this.baohuoList = [] this.baohuoList = []
this.bhhelpList = [] this.bhhelpList = []

@ -128,8 +128,9 @@
// //
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data this.user = response.data.user
this.queryParams.empName = this.user.nickName this.queryParams.empName = this.user.nickName
this.queryParams.tenantId = this.user.tenantId
this.getDwhourslist(); this.getDwhourslist();
}) })
}, },
@ -138,6 +139,7 @@
this.date = e.detail.value; this.date = e.detail.value;
this.user = {} this.user = {}
this.queryParams.empName = '' this.queryParams.empName = ''
this.queryParams.tenantId = ''
this.queryParams.dwYearMonth = this.date this.queryParams.dwYearMonth = this.date
this.dwhoursList = [] this.dwhoursList = []
this.getUser(); this.getUser();

@ -162,8 +162,9 @@
// //
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data this.user = response.data.user
this.queryParams.employeeName = this.user.nickName this.queryParams.employeeName = this.user.nickName
this.queryParams.tenantId = this.user.tenantId
this.queryParams.year = new Date(this.date).toISOString().slice(0,4) this.queryParams.year = new Date(this.date).toISOString().slice(0,4)
this.queryParams.month = new Date(this.date).toISOString().slice(5,7) this.queryParams.month = new Date(this.date).toISOString().slice(5,7)
this.getSalarylist() this.getSalarylist()
@ -176,6 +177,7 @@
this.queryParams.employeeName = '' this.queryParams.employeeName = ''
this.queryParams.year = '' this.queryParams.year = ''
this.queryParams.month = '' this.queryParams.month = ''
this.queryParams.tenantId=''
this.salarylist = [] this.salarylist = []
this.getUser() this.getUser()
}, },

@ -64,7 +64,7 @@
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
if (this.captchaEnabled) { if (this.captchaEnabled) {
this.codeUrl = 'data:image/gif;base64,' + res.data.img this.codeUrl = 'data:image/gif;base64,' + res.data.img
this.loginForm.uuid = res.uuid this.loginForm.uuid = res.data.uuid
} }
}) })
}, },

@ -107,6 +107,9 @@
return uni.getSystemInfoSync().windowHeight - 50 return uni.getSystemInfoSync().windowHeight - 50
} }
}, },
created() {
console.log(this.$store.state.user,55555)
},
methods: { methods: {
handleToInfo() { handleToInfo() {
this.$tab.navigateTo('/pages/mine/info/index') this.$tab.navigateTo('/pages/mine/info/index')

@ -28,7 +28,7 @@
methods: { methods: {
getUser() { getUser() {
getUserProfile().then(response => { getUserProfile().then(response => {
this.user = response.data this.user = response.data.user
this.roleGroup = response.roleGroup this.roleGroup = response.roleGroup
this.postGroup = response.postGroup this.postGroup = response.postGroup
}) })

@ -46,8 +46,8 @@ const user = {
const uuid = userInfo.uuid const uuid = userInfo.uuid
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => { login(username, password, code, uuid).then(res => {
setToken(res.token) setToken(res.data.token)
commit('SET_TOKEN', res.token) commit('SET_TOKEN', res.data.token)
resolve() resolve()
}).catch(error => { }).catch(error => {
reject(error) reject(error)
@ -59,7 +59,7 @@ const user = {
GetInfo({ commit, state }) { GetInfo({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getInfo().then(res => { getInfo().then(res => {
const user = res.user const user = res.data.user
const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar
const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
if (res.roles && res.roles.length > 0) { if (res.roles && res.roles.length > 0) {

Loading…
Cancel
Save