修改请假日期判断
This commit is contained in:
parent
7d871f7151
commit
71cdfa3116
@ -1,3 +1,3 @@
|
|||||||
# 开发环境
|
# 开发环境
|
||||||
# 请求接口地址
|
# 请求接口地址
|
||||||
VITE_REQUEST_BASE_URL = http://10.75.166.6:8080
|
VITE_REQUEST_BASE_URL = http://10.75.15.249:8080
|
||||||
|
10
api/pages.js
10
api/pages.js
@ -27,3 +27,13 @@ export function qjQueryByIdApi(config) { // 通过id查询请假数据 流程用
|
|||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function queryHisDateApi(username) { // 根据username获取最新请假结束日期
|
||||||
|
return https({
|
||||||
|
url: '/CxcQxj/cxcQxj/queryHisDate',
|
||||||
|
method: 'get',
|
||||||
|
data: {
|
||||||
|
username
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
@ -2,8 +2,8 @@
|
|||||||
"name" : "数智产销",
|
"name" : "数智产销",
|
||||||
"appid" : "__UNI__9F097F0",
|
"appid" : "__UNI__9F097F0",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName": "1.1.4",
|
"versionName" : "1.1.6",
|
||||||
"versionCode": 20250121,
|
"versionCode" : 20250207,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@ -120,3 +120,4 @@
|
|||||||
"vueVersion" : "3"
|
"vueVersion" : "3"
|
||||||
}
|
}
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
|
|
||||||
|
@ -109,7 +109,8 @@
|
|||||||
} from '@/api/api.js';
|
} from '@/api/api.js';
|
||||||
import {
|
import {
|
||||||
qjAddApi,
|
qjAddApi,
|
||||||
queryZwmcAndExaApi
|
queryZwmcAndExaApi,
|
||||||
|
queryHisDateApi
|
||||||
} from '@/api/pages.js';
|
} from '@/api/pages.js';
|
||||||
import {
|
import {
|
||||||
queryDepByCode,
|
queryDepByCode,
|
||||||
@ -177,7 +178,7 @@
|
|||||||
}
|
}
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
loadData()
|
loadData()
|
||||||
getTomorrowDate()
|
// getTomorrowDate()
|
||||||
})
|
})
|
||||||
|
|
||||||
const select = (e) => {
|
const select = (e) => {
|
||||||
@ -274,21 +275,39 @@
|
|||||||
proxy.$toast(res.message);
|
proxy.$toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
queryHisDateApi(store.userinfo.username).then((res) => { // 最新请假结束日期
|
||||||
|
if (res) {
|
||||||
|
console.log('--0', res)
|
||||||
|
getTomorrowDate(res);
|
||||||
|
} else {
|
||||||
|
console.log('--1', res)
|
||||||
|
getTomorrowDate();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const bindType = (e) => {
|
const bindType = (e) => {
|
||||||
typeIndex.value = e.detail.value
|
typeIndex.value = e.detail.value
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTomorrowDate = () => {
|
const getTomorrowDate = (e) => {
|
||||||
let today = new Date();
|
let tomorrow;
|
||||||
let tomorrow = new Date(today);
|
if (e) {
|
||||||
tomorrow.setDate(today.getDate() + 1);
|
// 将传入的日期字符串转换为Date对象
|
||||||
// 格式化日期为 yyyy-mm-dd
|
const dateParts = e.split('-').map(Number);
|
||||||
let year = tomorrow.getFullYear();
|
tomorrow = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
|
||||||
let month = String(tomorrow.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1
|
} else {
|
||||||
let day = String(tomorrow.getDate()).padStart(2, '0');
|
// 如果没有提供日期,则使用当前日期
|
||||||
beginTime.value = year + '-' + month + '-' + day;
|
tomorrow = new Date();
|
||||||
|
}
|
||||||
|
// 设置为明天的日期
|
||||||
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||||
|
// 格式化日期
|
||||||
|
const year = tomorrow.getFullYear();
|
||||||
|
const month = (tomorrow.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
const day = tomorrow.getDate().toString().padStart(2, '0');
|
||||||
|
beginTime.value = `${year}-${month}-${day}`;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -98,17 +98,17 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/*生产环境 begin */
|
/*生产环境 begin */
|
||||||
// loginApi({
|
loginApi({
|
||||||
// username: un,
|
username: un,
|
||||||
// password: pw,
|
password: pw,
|
||||||
// ip: getDeviceIp()
|
ip: getDeviceIp()
|
||||||
/*生产环境 end */
|
/*生产环境 end */
|
||||||
|
|
||||||
/*开发环境 begin */
|
/*开发环境 begin */
|
||||||
localLoginApi({
|
// localLoginApi({
|
||||||
username: username.value,
|
// username: username.value,
|
||||||
password: password.value,
|
// password: password.value,
|
||||||
captcha: 'app'
|
// captcha: 'app'
|
||||||
/*开发环境 end */
|
/*开发环境 end */
|
||||||
}).then((loginres) => {
|
}).then((loginres) => {
|
||||||
if (loginres.success) {
|
if (loginres.success) {
|
||||||
|
Loading…
Reference in New Issue
Block a user