Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
bf335f0e
Commit
bf335f0e
authored
Mar 19, 2026
by
sunhaiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存账本页面添加到期时间和提前预警天数字段
parent
eae30358
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
xjrsoft-vue3/src/views/ckgl/kczb/index.vue
+8
-2
No files found.
xjrsoft-vue3/src/views/ckgl/kczb/index.vue
View file @
bf335f0e
...
...
@@ -321,9 +321,15 @@
const
timeDiff
=
dqsjDate
.
getTime
()
-
now
.
getTime
();
const
dayDiff
=
Math
.
ceil
(
timeDiff
/
(
1000
*
60
*
60
*
24
));
// 向上取整(比如剩余1.2天算2天)
// 5. 判断:天数差
<
提前预警天数
→
需要预警(变红)
// 5. 判断:天数差
<
提前预警天数
且数量
>
0
→
需要预警(变红)
// 补充:如果到期时间已过(dayDiff
<
0
),也强制变红
return
dayDiff
<
record
.
tqyjts
||
dayDiff
<
0
;
let
isNeedWarn
=
false
;
if
(
record
.
sl
&&
record
.
sl
>
0
)
{
if
(
dayDiff
<
record
.
tqyjts
||
dayDiff
<
0
)
{
isNeedWarn
=
true
;
}
}
return
isNeedWarn
;
}
function
handleSuccess
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment