提交 ee17343c authored 作者: lidongxu's avatar lidongxu

Merge branch 'ldx' into dev

...@@ -14,8 +14,5 @@ VITE_APP_REDIRECT_URL = 'https://sfa-qa.wxl66.cn/' ...@@ -14,8 +14,5 @@ VITE_APP_REDIRECT_URL = 'https://sfa-qa.wxl66.cn/'
# 积木报表服务地址 # 积木报表服务地址
VITE_APP_REPORT_URL = 'https://sfa-qa.wxl66.cn' VITE_APP_REPORT_URL = 'https://sfa-qa.wxl66.cn'
# 模板表格 # 模板表格
VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF3.0.xlsx' VITE_APP_PLAN_TEMPLATE_EXCEL = 'https://link-promotion.oss-cn-shanghai.aliyuncs.com/file/%E6%96%B0%E5%A2%9E%E6%88%96%E4%BF%AE%E6%94%B9%E8%AE%A1%E5%88%92-%E6%A8%A1%E6%9D%BF3.0.xlsx'
\ No newline at end of file
...@@ -5,12 +5,22 @@ import { parseTime } from '@/utils' ...@@ -5,12 +5,22 @@ import { parseTime } from '@/utils'
* @returns boolean true 可变更/删除,false 不可变更/删除 * @returns boolean true 可变更/删除,false 不可变更/删除
*/ */
export const checkPlanExpire = (row) => { export const checkPlanExpire = (row) => {
// 1. 计划已经开始,不可变更/删除 // 1. 计划已经开始,不可编辑/删除
// 2. 计划未开始,但是上班时间已经 1 小时后,不可变更/删除 if (row.planStatus === 0) {
return false
}
// 2. 计划未开始,但是上班时间已经 1 小时后,不可编辑/删除
const date = new Date() const date = new Date()
const rowDate = new Date(row.clockInTime) const rowDate = new Date(row.clockInTime)
rowDate.setHours(rowDate.getHours() + 1) rowDate.setHours(rowDate.getHours() + 1)
return !(rowDate < date || row.planStatus === 1) if (row.planStatus === 1 && rowDate < date) {
return false
}
// 3. 计划为 2 和 3(审核中/审核拒绝),不可编辑/删除
if (row.planStatus === 2 || row.planStatus === 3) {
return false
}
} }
/** /**
......
...@@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => { ...@@ -31,7 +31,7 @@ export default defineConfig(({ mode, command }) => {
'/promotion-api': { '/promotion-api': {
target: 'https://sfa-qa.wxl66.cn/promotion-api', target: 'https://sfa-qa.wxl66.cn/promotion-api',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/promotion-api/, '') rewrite: (p) => p.replace(/^\/dev-promotion-api/, '')
}, },
'/ql_local': { '/ql_local': {
target: 'http://192.168.131.48', target: 'http://192.168.131.48',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论