Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
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
qinjianhui
factory_front
Commits
3c055896
Commit
3c055896
authored
Nov 19, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缺货统计修改
parent
c3f5b1f4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
15 deletions
+45
-15
src/types/api/outOfStockStatistics.ts
+2
-2
src/views/setting/settingIndex.vue
+7
-2
src/views/supply/OutOfStockStatistics.vue
+2
-2
src/views/warehouse/warning.vue
+34
-9
No files found.
src/types/api/outOfStockStatistics.ts
View file @
3c055896
...
@@ -8,8 +8,8 @@ export interface OutOfStockItem {
...
@@ -8,8 +8,8 @@ export interface OutOfStockItem {
skuName
?:
string
skuName
?:
string
currency
?:
string
currency
?:
string
costPrice
?:
number
costPrice
?:
number
outOfStockQuantity
?:
number
stockOutNum
?:
number
sales
Quantity
?:
number
sales
Num
?:
number
warehouseSpu
?:
string
warehouseSpu
?:
string
inventory
?:
number
inventory
?:
number
occupyInventory
?:
number
occupyInventory
?:
number
...
...
src/views/setting/settingIndex.vue
View file @
3c055896
...
@@ -165,7 +165,7 @@ interface formType {
...
@@ -165,7 +165,7 @@ interface formType {
}
}
const
formRef
=
ref
()
const
formRef
=
ref
()
const
inventoryLowerLimit
=
ref
<
number
|
null
>
(
null
)
const
inventoryLowerLimit
=
ref
<
number
|
null
>
(
100
)
const
logList
=
ref
([])
const
logList
=
ref
([])
async
function
saveConfiguration
(
item
:
formType
,
index
:
number
)
{
async
function
saveConfiguration
(
item
:
formType
,
index
:
number
)
{
let
loading
let
loading
...
@@ -263,8 +263,13 @@ const saveInventoryLowerLimit = async () => {
...
@@ -263,8 +263,13 @@ const saveInventoryLowerLimit = async () => {
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
return
return
}
}
ElMessage
.
success
(
'保存配置成功'
)
await
ElMessageBox
.
confirm
(
'保存配置成功!!需重新登录才能生效'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
showCancelButton
:
false
,
type
:
'success'
,
})
getInventoryLowerLimit
()
getInventoryLowerLimit
()
handleClick
()
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
}
}
...
...
src/views/supply/OutOfStockStatistics.vue
View file @
3c055896
...
@@ -169,13 +169,13 @@ const tableColumns = computed(() => {
...
@@ -169,13 +169,13 @@ const tableColumns = computed(() => {
},
},
{
{
label
:
'缺货数量'
,
label
:
'缺货数量'
,
prop
:
'
outOfStockQuantity
'
,
prop
:
'
stockOutNum
'
,
width
:
100
,
width
:
100
,
align
:
'right'
,
align
:
'right'
,
},
},
{
{
label
:
'销售数量'
,
label
:
'销售数量'
,
prop
:
'sales
Quantity
'
,
prop
:
'sales
Num
'
,
width
:
100
,
width
:
100
,
align
:
'right'
,
align
:
'right'
,
},
},
...
...
src/views/warehouse/warning.vue
View file @
3c055896
...
@@ -20,6 +20,7 @@ import { ref, computed } from 'vue'
...
@@ -20,6 +20,7 @@ import { ref, computed } from 'vue'
import
SplitDiv
from
'@/components/splitDiv/splitDiv.vue'
import
SplitDiv
from
'@/components/splitDiv/splitDiv.vue'
import
{
filePath
}
from
'@/api/axios.ts'
import
{
filePath
}
from
'@/api/axios.ts'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
import
{
useEnterKeyTrigger
}
from
'@/utils/hooks/useEnterKeyTrigger.ts'
import
{
getInventoryLowerLimitApi
}
from
'@/api/externalAuth'
const
searchForm
=
ref
({
const
searchForm
=
ref
({
warehouseId
:
''
,
warehouseId
:
''
,
...
@@ -173,8 +174,16 @@ async function getData() {
...
@@ -173,8 +174,16 @@ async function getData() {
...
searchForm
.
value
,
...
searchForm
.
value
,
})
})
const
sortedRecords
=
res
.
data
.
records
.
sort
((
a
,
b
)
=>
{
const
sortedRecords
=
res
.
data
.
records
.
sort
((
a
,
b
)
=>
{
const
aUsable
=
Number
((
a
as
WarehouseWarning
&
{
usableInventory
?:
number
|
string
}).
usableInventory
)
||
0
const
aUsable
=
const
bUsable
=
Number
((
b
as
WarehouseWarning
&
{
usableInventory
?:
number
|
string
}).
usableInventory
)
||
0
Number
(
(
a
as
WarehouseWarning
&
{
usableInventory
?:
number
|
string
})
.
usableInventory
,
)
||
0
const
bUsable
=
Number
(
(
b
as
WarehouseWarning
&
{
usableInventory
?:
number
|
string
})
.
usableInventory
,
)
||
0
const
aIsLow
=
aUsable
<
100
const
aIsLow
=
aUsable
<
100
const
bIsLow
=
bUsable
<
100
const
bIsLow
=
bUsable
<
100
if
(
aIsLow
&&
!
bIsLow
)
return
-
1
if
(
aIsLow
&&
!
bIsLow
)
return
-
1
...
@@ -303,17 +312,16 @@ const getWarehouse = async () => {
...
@@ -303,17 +312,16 @@ const getWarehouse = async () => {
}
}
const
getRowClassName
=
(
row
:
{
row
:
WarehouseWarning
})
=>
{
const
getRowClassName
=
(
row
:
{
row
:
WarehouseWarning
})
=>
{
const
rowData
=
row
.
row
as
WarehouseWarning
&
{
usableInventory
?:
number
|
string
}
const
rowData
=
row
.
row
as
WarehouseWarning
&
{
usableInventory
?:
number
|
string
}
const
usableInventory
=
Number
(
rowData
.
usableInventory
)
||
0
const
usableInventory
=
Number
(
rowData
.
usableInventory
)
||
0
if
(
usableInventory
<
100
)
{
if
(
usableInventory
<
inventoryLowerLimit
.
value
)
{
return
'low-inventory-row'
return
'low-inventory-row'
}
}
return
''
return
''
}
}
getData
()
getWarehouse
()
/**
/**
* @description: 页面添加回车监听
* @description: 页面添加回车监听
*/
*/
...
@@ -329,6 +337,23 @@ useEnterKeyTrigger({
...
@@ -329,6 +337,23 @@ useEnterKeyTrigger({
getData
()
getData
()
},
},
})
})
const
inventoryLowerLimit
=
ref
<
number
>
(
100
)
const
getInventoryLowerLimit
=
async
()
=>
{
try
{
const
res
=
await
getInventoryLowerLimitApi
()
if
(
res
.
code
!==
200
)
{
return
}
inventoryLowerLimit
.
value
=
res
.
data
}
catch
(
error
)
{
console
.
log
(
error
)
}
}
onMounted
(
async
()
=>
{
getData
()
getWarehouse
()
getInventoryLowerLimit
()
})
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -857,12 +882,12 @@ useEnterKeyTrigger({
...
@@ -857,12 +882,12 @@ useEnterKeyTrigger({
background-color
:
#f56c6c
!important
;
background-color
:
#f56c6c
!important
;
color
:
#fff
!important
;
color
:
#fff
!important
;
}
}
td
{
td
{
background-color
:
#f56c6c
!important
;
background-color
:
#f56c6c
!important
;
color
:
#fff
!important
;
color
:
#fff
!important
;
}
}
&
:hover
td
{
&
:hover
td
{
background-color
:
#f56c6c
!important
;
background-color
:
#f56c6c
!important
;
color
:
#fff
!important
;
color
:
#fff
!important
;
...
...
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