修改请假日期判断

This commit is contained in:
yangzhq68909 2025-02-07 10:26:15 +08:00
parent 7d871f7151
commit 71cdfa3116
5 changed files with 171 additions and 141 deletions

View File

@ -1,3 +1,3 @@
# 开发环境
# 请求接口地址
VITE_REQUEST_BASE_URL = http://10.75.166.6:8080
VITE_REQUEST_BASE_URL = http://10.75.15.249:8080

View File

@ -27,3 +27,13 @@ export function qjQueryByIdApi(config) { // 通过id查询请假数据 流程用
data: config
})
}
export function queryHisDateApi(username) { // 根据username获取最新请假结束日期
return https({
url: '/CxcQxj/cxcQxj/queryHisDate',
method: 'get',
data: {
username
}
})
}

View File

@ -1,36 +1,36 @@
{
"name": "数智产销",
"appid": "__UNI__9F097F0",
"description": "",
"versionName": "1.1.4",
"versionCode": 20250121,
"transformPx": false,
"name" : "数智产销",
"appid" : "__UNI__9F097F0",
"description" : "",
"versionName" : "1.1.6",
"versionCode" : 20250207,
"transformPx" : false,
/* 5+App */
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
"compatible": {
"ignoreVersion": true
"compatible" : {
"ignoreVersion" : true
},
/* */
"modules": {
"Geolocation": {},
"Fingerprint": {},
"Camera": {},
"Barcode": {}
"modules" : {
"Geolocation" : {},
"Fingerprint" : {},
"Camera" : {},
"Barcode" : {}
},
/* */
"distribute": {
"distribute" : {
/* android */
"android": {
"permissions": [
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -49,74 +49,75 @@
]
},
/* ios */
"ios": {
"dSYMs": false
"ios" : {
"dSYMs" : false
},
/* SDK */
"sdkConfigs": {
"ad": {},
"geolocation": {
"system": {
"__platform__": ["android"]
"sdkConfigs" : {
"ad" : {},
"geolocation" : {
"system" : {
"__platform__" : [ "android" ]
}
}
},
"icons": {
"android": {
"hdpi": "unpackage/res/icons/72x72.png",
"xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi": "unpackage/res/icons/192x192.png"
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios": {
"appstore": "unpackage/res/icons/1024x1024.png",
"ipad": {
"app": "unpackage/res/icons/76x76.png",
"app@2x": "unpackage/res/icons/152x152.png",
"notification": "unpackage/res/icons/20x20.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x": "unpackage/res/icons/167x167.png",
"settings": "unpackage/res/icons/29x29.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x": "unpackage/res/icons/80x80.png"
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone": {
"app@2x": "unpackage/res/icons/120x120.png",
"app@3x": "unpackage/res/icons/180x180.png",
"notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x": "unpackage/res/icons/120x120.png"
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* */
"quickapp": {},
"quickapp" : {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents": true
"usingComponents" : true
},
"mp-alipay": {
"usingComponents": true
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu": {
"usingComponents": true
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao": {
"usingComponents": true
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
},
"vueVersion": "3"
"vueVersion" : "3"
}
/* */

View File

@ -109,7 +109,8 @@
} from '@/api/api.js';
import {
qjAddApi,
queryZwmcAndExaApi
queryZwmcAndExaApi,
queryHisDateApi
} from '@/api/pages.js';
import {
queryDepByCode,
@ -177,7 +178,7 @@
}
onLoad(() => {
loadData()
getTomorrowDate()
// getTomorrowDate()
})
const select = (e) => {
@ -274,21 +275,39 @@
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) => {
typeIndex.value = e.detail.value
}
const getTomorrowDate = () => {
let today = new Date();
let tomorrow = new Date(today);
tomorrow.setDate(today.getDate() + 1);
// yyyy-mm-dd
let year = tomorrow.getFullYear();
let month = String(tomorrow.getMonth() + 1).padStart(2, '0'); // 01
let day = String(tomorrow.getDate()).padStart(2, '0');
beginTime.value = year + '-' + month + '-' + day;
const getTomorrowDate = (e) => {
let tomorrow;
if (e) {
// Date
const dateParts = e.split('-').map(Number);
tomorrow = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
} else {
// 使
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>

View File

@ -98,17 +98,17 @@
});
/*生产环境 begin */
// loginApi({
// username: un,
// password: pw,
// ip: getDeviceIp()
loginApi({
username: un,
password: pw,
ip: getDeviceIp()
/*生产环境 end */
/*开发环境 begin */
localLoginApi({
username: username.value,
password: password.value,
captcha: 'app'
// localLoginApi({
// username: username.value,
// password: password.value,
// captcha: 'app'
/*开发环境 end */
}).then((loginres) => {
if (loginres.success) {