diff --git a/api/create.js b/api/create.js
index cccc390..f53c1d5 100644
--- a/api/create.js
+++ b/api/create.js
@@ -1,31 +1,52 @@
/*首页*/
-import { request, requestLogin } from "./index.js";
+import {
+ request,
+ requestLogin
+} from "./index.js";
// 登录
-export function getToken(authCode){
+export function getToken(authCode) {
return requestLogin({
method: "GET",
url: `/login?code=${authCode}`,
- data: {
- },
+ data: {},
Header1: {
-
+
}
})
}
// 获取用户信息
-export function getUser(authCode){
+export function getUser(authCode) {
return request({
method: "get",
url: "/user",
- data: {
- },
+ data: {},
})
}
// 获取绩效考勤统计
-export function getPerformanceAttendanceApi(year,month){
+export function getPerformanceAttendanceApi(year, month) {
return request({
method: "get",
url: `/performance/attendance/detail/${year}/${month}`,
})
+}
+
+// 工资条查询
+export function getPayrollSheets(year, month) {
+ return request({
+ method: "get",
+ url: `/payroll/sheets/detail/${year}/${month}`,
+ })
+}
+
+// 签字提交
+export function signatureOfMeetingMinutesApi(data) {
+ return request({
+ method: "post",
+ url: `/performance/attendance/emp/approve`,
+ data: data,
+ header: {
+ 'content-type': 'application/json' // 设置请求头为 JSON 格式
+ }
+ })
}
\ No newline at end of file
diff --git a/api/index.js b/api/index.js
index dcec410..db87b5f 100644
--- a/api/index.js
+++ b/api/index.js
@@ -1,68 +1,95 @@
-
-import allUrl from "./baseUrl.js"
+import allUrl from "./baseUrl.js"
// const baseUrl = bootUrl
-export function request ( optaions ) {
- let { url, method, data, header1 } = optaions
+export function request(optaions) {
+ let {
+ url,
+ method,
+ data,
+ header1
+ } = optaions
method = method || "GET"
data = data || {}
let newData = {}
- for( let key in data){
- if( data[key] !== null && data[key] !== ''){
+ for (let key in data) {
+ if (data[key] !== null && data[key] !== '') {
newData[key] = data[key]
}
}
data = newData || {}
- header1 = header1 || {
+ header1 = header1 || {
Authorization: 'Bearer ' + uni.getStorageSync('token')
- }
- return new Promise((reslove,reject)=>{
+ }
+ return new Promise((reslove, reject) => {
uni.request({
url: allUrl + url,
method,
header: header1,
data,
success: (res) => {
- if(res.data.errcode == 401 ){
- uni.showToast({ title: '登录已失效,即将重新登录!', icon: 'none' });
+ if (res.data.errcode == 401) {
+ uni.showToast({
+ title: '登录已失效,即将重新登录!',
+ icon: 'none'
+ });
uni.removeStorageSync('userInfo');
uni.removeStorageSync('token');
- setTimeout(()=>{
- uni.reLaunch({ url: '/pages/newHomePage/newHomePage' });
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '/pages/homePage/homePage'
+ });
}, 1000);
- }else if(res.data.errcode != 0){
+ } else if (res.data.errcode != 0) {
console.log('不正确走的')
reject(res)
- uni.showToast({ title: res.data.errmsg, icon: 'none', duration: 2000 });
- }else {
+ uni.showToast({
+ title: res.data.errmsg,
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
reslove(res.data)
}
-
+
},
fail: (err) => {
- console.log('请求失败',err)
+ console.log('请求失败', err)
uni.hideLoading()
- if(err.statusCode == 401 ){
- uni.showToast({ title: '登录已失效,即将重新登录!', icon: 'none' });
+ if (err.statusCode == 401) {
+ uni.showToast({
+ title: '登录已失效,即将重新登录!',
+ icon: 'none'
+ });
uni.removeStorageSync('userInfo');
uni.removeStorageSync('token');
- setTimeout(()=>{
- uni.reLaunch({ url: '/pages/newHomePage/newHomePage' });
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '/pages/homePage/homePage'
+ });
}, 1000);
}
- if(err.data.errcode == 401 ){
- uni.showToast({ title: '登录已失效,即将重新登录!', icon: 'none' });
+ if (err.data.errcode == 401) {
+ uni.showToast({
+ title: '登录已失效,即将重新登录!',
+ icon: 'none'
+ });
uni.removeStorageSync('userInfo');
uni.removeStorageSync('token');
- setTimeout(()=>{
- uni.reLaunch({ url: '/pages/newHomePage/newHomePage' });
+
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '/pages/homePage/homePage'
+ });
}, 1000);
- }else{
- uni.showToast({ title: err.data.errmsg, icon: 'none' });
+ } else {
+ uni.showToast({
+ title: err.data.errmsg,
+ icon: 'none'
+ });
}
reject()
},
complete: () => {
- setTimeout(()=>{
+ setTimeout(() => {
uni.hideLoading()
}, 2000)
}
@@ -71,37 +98,52 @@ export function request ( optaions ) {
}
-export function requestLogin ( optaions ) {
- let { url, method, data } = optaions
+export function requestLogin(optaions) {
+ let {
+ url,
+ method,
+ data,
+ header
+ } = optaions
method = method || "GET"
data = data || {}
let newData = {}
- for( let key in data){
- if( data[key] !== null && data[key] !== ''){
+ for (let key in data) {
+ if (data[key] !== null && data[key] !== '') {
newData[key] = data[key]
}
}
data = newData || {}
- return new Promise((reslove,reject)=>{
+ return new Promise((reslove, reject) => {
uni.request({
url: allUrl + url,
method,
data,
+ header,
success: (res) => {
- if(res.statusCode == 401 ){
- uni.showToast({ title: '登录已失效,即将返回首页!', icon: 'none' });
+ if (res.statusCode == 401) {
+ uni.showToast({
+ title: '登录已失效,即将返回首页!',
+ icon: 'none'
+ });
uni.removeStorageSync('userInfo');
uni.removeStorageSync('token');
- setTimeout(()=>{
- uni.reLaunch({ url: '/pages/newHomePage/newHomePage' });
- }, 1000);
- }else if(res.statusCode != 200){
+ // setTimeout(() => {
+ // uni.reLaunch({
+ // url: '/pages/homePage/homePage'
+ // });
+ // }, 1000);
+ } else if (res.statusCode != 200) {
reject(res)
- uni.showToast({ title: res.data.msg, icon: 'none', duration: 2000 });
- }else {
+ uni.showToast({
+ title: res.data.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ } else {
reslove(res.data)
}
-
+
},
fail: () => {
reject()
@@ -111,4 +153,4 @@ export function requestLogin ( optaions ) {
}
})
})
-}
+}
\ No newline at end of file
diff --git a/main.js b/main.js
index f9866a9..de1689f 100644
--- a/main.js
+++ b/main.js
@@ -2,14 +2,19 @@ import App from './App'
import Inputli from './components/form/input-li.vue';
import Selectli from './components/form/select-li.vue';
import Dateli from './components/form/date-li.vue';
-import { getToken,getUser } from './api/create.js'
-import { formatDate, calculator } from './com/index.js'
-
+import {
+ getToken,
+ getUser
+} from './api/create.js'
+import {
+ formatDate,
+ calculator
+} from './com/index.js'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
Vue.prototype.a = '1234456'
-const msg = (title,icon = 'none', duration = 1500, mask = false, ) => {
+const msg = (title, icon = 'none', duration = 1500, mask = false, ) => {
//统一提示方便全局修改
if (Boolean(title) === false) {
return;
@@ -22,13 +27,13 @@ const msg = (title,icon = 'none', duration = 1500, mask = false, ) => {
});
}
-const setNavigationBar = ( title = '教育平台', backgroundColor = '#ffffff') =>{
+const setNavigationBar = (title = '教育平台', backgroundColor = '#ffffff') => {
my.setNavigationBar({
- title,
- backgroundColor
+ title,
+ backgroundColor
});
}
-const navTo = (url, skip = 'navigateTo') =>{
+const navTo = (url, skip = 'navigateTo') => {
uni[skip]({
url
});
@@ -46,7 +51,7 @@ const login = () => {
uni.setStorageSync('token', res.result.token)
getUser().then(data => {
console.log(data)
- uni.setStorageSync('user',data)
+ uni.setStorageSync('user', data)
uni.hideLoading()
// uni.showToast({
// title: '登录成功',
@@ -67,22 +72,22 @@ const login = () => {
}
// 提示框 点击确定进入resolve 取消进入reject
-const showModel = (content) =>{
- return new Promise((resolve, reject)=>{
+const showModel = (content) => {
+ return new Promise((resolve, reject) => {
uni.showModal({
- title: '提示',
- content: content,
+ title: '提示',
+ content: content,
cancelText: '取消',
confirmText: '确定',
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定');
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
resolve('affirm')
- } else if (res.cancel) {
- console.log('用户点击取消');
+ } else if (res.cancel) {
+ console.log('用户点击取消');
reject('cancal')
- }
- }
+ }
+ }
});
})
}
@@ -96,14 +101,14 @@ Vue.prototype.$formatDate = formatDate // 日期格式修改
Vue.prototype.$showModel = showModel // 提示框
-
-Vue.component("Inputli",Inputli)
-Vue.component("Selectli",Selectli)
-Vue.component("Dateli",Dateli)
+
+Vue.component("Inputli", Inputli)
+Vue.component("Selectli", Selectli)
+Vue.component("Dateli", Dateli)
App.mpType = 'app'
const app = new Vue({
- ...App
+ ...App
})
app.$mount()
// #endif
@@ -112,11 +117,13 @@ app.$mount()
// #ifdef VUE3
-import { createSSRApp } from 'vue'
+import {
+ createSSRApp
+} from 'vue'
export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
+ const app = createSSRApp(App)
+ return {
+ app
+ }
}
// #endif
\ No newline at end of file
diff --git a/pages/attendanceManagement/attendanceManagement.vue b/pages/attendanceManagement/attendanceManagement.vue
index 3b388c2..71c70d5 100644
--- a/pages/attendanceManagement/attendanceManagement.vue
+++ b/pages/attendanceManagement/attendanceManagement.vue
@@ -3,125 +3,139 @@
- {{ selectedYear }}年{{ selectedMonth < 10 ? '0' + selectedMonth : selectedMonth }}月
+ {{ selectedYear }}年{{ selectedMonth < 10 ? '0' + selectedMonth : selectedMonth }}月
月度
+
+
+ {{attendanceData.status=="1"?"试用":"正式"}}
+
+
+ 打卡统计
+
+
+ 迟到
+ {{ attendanceData.late }}次
+
+
+ 严重迟到
+ {{ attendanceData.seriousLate }}次
+
+
+ 旷工
+ {{ attendanceData.absenteeism }}次
+
+
+ 早退
+ {{ attendanceData.early }}次
+
+
+ 未打卡
+ {{ attendanceData.absenceCount }}次
+
+
+ 未签到签退
+ {{ attendanceData.missedCount }}次
+
+
+ 未提交日志
+ {{ attendanceData.missingLogCount }}次
+
+
+
-
-
- 打卡统计
-
-
- 迟到
- {{ attendanceData.late }}次
+
+
+ 请假统计
+
+
+ 事假
+ {{ attendanceData.personalLeave }}小时
+
+
+ 病假
+ {{ attendanceData.sickLeave }}天
+
+
+ 婚假
+ {{ attendanceData.marriageLeave }}天
+
+
+ 产假
+ {{ attendanceData.maternityLeave }}天
+
+
+ 陪产假
+ {{ attendanceData.paternityLeave }}天
+
+
+ 丧假
+ {{ attendanceData.bereavementLeave }}天
+
+
+ 年休假
+ {{ attendanceData.annualLeave }}天
+
+
+ 年休假(管理岗)
+ {{ attendanceData.managementAnnualLeave }}天
+
-
- 严重迟到
- {{ attendanceData.seriousLate }}次
+
+
+
+
+ 加班、调休统计
+
+
+ 节假日加班
+ {{ attendanceData.holidayOvertime }}小时
+
+
+ 休息日加班
+ {{ attendanceData.restdayOvertime }}小时
+
+
+ 工作日加班
+ {{ attendanceData.workdayOvertime }}小时
+
+
-
- 旷工
- {{ attendanceData.absenteeism }}次
+
+
+
+ 说明:请核实当月考勤记录,确认无误请签字确认
+
+
+
+
+ 员工签字
+ /保留员工签字
-
- 早退
- {{ attendanceData.early }}次
-
-
- 未打卡
- {{ attendanceData.absenceCount }}次
-
-
- 未签到签退
- {{ attendanceData.missedCount }}次
-
-
- 未提交日志
- {{ attendanceData.missingLogCount }}次
+
+
+
+
+
+
+
+ 签字确认
+
-
-
- 请假统计
-
-
- 事假
- {{ attendanceData.personalLeave }}小时
-
-
- 病假
- {{ attendanceData.sickLeave }}天
-
-
- 婚假
- {{ attendanceData.marriageLeave }}天
-
-
- 产假
- {{ attendanceData.maternityLeave }}天
-
-
- 陪产假
- {{ attendanceData.paternityLeave }}天
-
-
- 丧假
- {{ attendanceData.bereavementLeave }}天
-
-
- 年休假
- {{ attendanceData.annualLeave }}天
-
-
- 年休假(管理岗)
- {{ attendanceData.managementAnnualLeave }}天
-
-
-
-
-
- 加班、调休统计
-
-
- 节假日加班
- {{ attendanceData.holidayOvertime }}小时
-
-
- 休息日加班
- {{ attendanceData.restdayOvertime }}小时
-
-
- 工作日加班
- {{ attendanceData.workdayOvertime }}小时
-
-
-
-
-
- 说明:请核实当月考勤记录,确认无误请签字确认
-
-
-
-
- 员工签字
- /保留员工签字
-
-
-
-
-
-
- 签字确认
@@ -130,7 +144,8 @@
-
+
{{ year }}年
@@ -139,7 +154,8 @@
-
+
{{ tempSelectedYear }}年{{ month < 10 ? '0' + month : month }}月
@@ -147,370 +163,415 @@
-
+
+
\ No newline at end of file
diff --git a/pages/homePage/homePage.vue b/pages/homePage/homePage.vue
index 3540bb9..6384b68 100644
--- a/pages/homePage/homePage.vue
+++ b/pages/homePage/homePage.vue
@@ -136,7 +136,7 @@ export default {
this.$navTo('/pages/attendanceManagement/attendanceManagement');
},
viewSalaryDetails(){
- this.$navTo('/pages/salaryDetails/salaryDetails');
+ this.$navTo(`/pages/salaryDetails/salaryDetails?year=${this.selectedYear}&month=${this.selectedMonth}`);
},
}
diff --git a/pages/salaryDetails/salaryDetails.vue b/pages/salaryDetails/salaryDetails.vue
index 417d4ee..ced6851 100644
--- a/pages/salaryDetails/salaryDetails.vue
+++ b/pages/salaryDetails/salaryDetails.vue
@@ -2,8 +2,8 @@
- 2025年04月实发工资
- 3000.00
+ {{dataInfo.year}}年{{dataInfo.month}}月实发工资
+ {{dataInfo.actualSalary}}
感谢您为公司的付出,辛苦了
@@ -13,43 +13,43 @@
基本工资
- 2500
+ {{dataInfo.baseSalary}}
年度绩效奖金
- 500
+ {{dataInfo.annualPerformanceBonus}}
月度绩效奖金
- 500
+ {{dataInfo.monthlyPerformanceBonus}}
其他奖金
- 1000
+ {{dataInfo.otherBonus}}
总经理补贴
- 0
+ {{dataInfo.managerAllowance}}
交通补贴
- 50
+ {{dataInfo.transportationAllowance}}
其他补贴
- 0
+ {{dataInfo.otherAllowance}}
工龄工资
- 50
+ {{dataInfo.senioritySalary}}
加班工资
- 0
+ {{dataInfo.overtimePay}}
应发小计
- 5000
+ {{dataInfo.grossPaySummary}}
@@ -60,43 +60,44 @@
年度绩效奖金
- 2500
+ {{dataInfo.annualPerformanceDeduction}}
月度绩效奖金
- 500
+ {{dataInfo.monthlyPerformanceDeduction}}
事假
- 500
+ {{dataInfo.personalLeaveDeduction}}
病假
- 1000
+ {{dataInfo.sickLeaveDeduction}}
婚假、丧假、陪产假
- 0
+ {{dataInfo.marriageLeaveDeduction}}、{{dataInfo.bereavementLeaveDeduction}}、{{dataInfo.paternityLeaveDeduction}}
迟到、早退
- 50
+ {{dataInfo.lateEarlyDeduction}}
签到、签退
- 0
+ {{dataInfo.missedCheckInOutDeduction}}
缺卡
- 50
+ {{dataInfo.absentCardDeduction}}
旷工
- 0
+ {{dataInfo.absenteeismDeduction}}
违纪
- 0
+ {{dataInfo.violationDeduction}}
@@ -107,23 +108,23 @@
基本养老
- 2500
+ {{dataInfo.basicPensionDeduction}}
失业保险
- 500
+ {{dataInfo.unemploymentInsuranceDeduction}}
基本医疗
- 500
+ {{dataInfo.basicMedicalDeduction}}
大额医疗
- 1000
+ {{dataInfo.medicalDeductionAmount}}
住房公积金
- 0
+ {{dataInfo.housingFundDeduction}}
@@ -134,127 +135,214 @@
其他扣款
- 2500
+ {{dataInfo.otherDeduction}}
个税
- 500
+ {{dataInfo.individualTaxDeduction}}
扣款小计
- 2000
+ {{deductionTotle}}
- 备注
+
+ 备注
+
+
\ No newline at end of file
diff --git a/pages/sign/sign.vue b/pages/sign/sign.vue
index ccfad5a..ac813d0 100644
--- a/pages/sign/sign.vue
+++ b/pages/sign/sign.vue
@@ -1,18 +1,9 @@
-
+
请在空白区域内横向签字
@@ -23,194 +14,214 @@
+
\ No newline at end of file