Commit fc2f3c04 by wuqian Committed by wusiyi

发货时效向下取整

parent 9456b500
...@@ -428,11 +428,11 @@ function getShippingAge(row: ILogisticsCompany): number { ...@@ -428,11 +428,11 @@ function getShippingAge(row: ILogisticsCompany): number {
return msToDays(now - create) return msToDays(now - create)
} }
/** 毫秒 → 天数(≥12h 向取整) */ /** 毫秒 → 天数(≥12h 向取整) */
function msToDays(ms: number): number { function msToDays(ms: number): number {
const hours = ms / (1000 * 60 * 60) const hours = ms / (1000 * 60 * 60)
if (hours < 12) return 0 if (hours < 12) return 0
return Math.ceil(hours / 24) return Math.floor(hours / 24)
} }
// 列表查询 // 列表查询
async function getData() { async function getData() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment