请求处理代理

商品管理
商品分类
用户管理
桌台
代客下单
进销存
交班
预定座位
充值管理
存酒管理
This commit is contained in:
2024-09-03 11:30:27 +08:00
parent e4835d0d27
commit da5f7ca916
348 changed files with 47437 additions and 186 deletions

View File

@@ -0,0 +1,32 @@
function getDayArea(date = new Date(), type) {
const now = date
if (type === 'start') {
const startOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate());
return startOfDay
}
if (type === 'end') {
const endOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
return endOfDay;
}
return `${startOfDay}-${endOfDay}`
}
function getMonthArea(date = new Date(), type) {
let now = date
let currentMonthStart = new Date(now.getFullYear(), now.getMonth(), 1);
let currentMonthEnd = new Date(now.getFullYear(), now.getMonth() + 1, 0 , 23, 59, 59, 999);
if (type === 'start') {
return currentMonthStart
}
if (type === 'end') {
return currentMonthEnd;
}
return {
start: currentMonthStart,
end: currentMonthEnd
};
}
export default {
getDayArea, getMonthArea
}