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
334b94ea
Commit
334b94ea
authored
Apr 09, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 拣胚失败字段取值修改
parent
3ba91595
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
46 deletions
+59
-46
src/types/api/factoryOrderNew.ts
+1
-0
src/views/order/factoryOrderNew/component/PickFailDialog.vue
+58
-46
No files found.
src/types/api/factoryOrderNew.ts
View file @
334b94ea
...
@@ -240,6 +240,7 @@ export interface PickCompleteData {
...
@@ -240,6 +240,7 @@ export interface PickCompleteData {
pickingStatus
?:
string
pickingStatus
?:
string
availableOrderIds
?:
number
[]
availableOrderIds
?:
number
[]
allOrderIds
:
number
[]
allOrderIds
:
number
[]
freezeInventory
?:
number
}
}
export
interface
PickFailData
{
export
interface
PickFailData
{
...
...
src/views/order/factoryOrderNew/component/PickFailDialog.vue
View file @
334b94ea
...
@@ -38,14 +38,6 @@
...
@@ -38,14 +38,6 @@
row
.
producingQuantity
row
.
producingQuantity
}}
</span>
}}
</span>
</
template
>
</
template
>
<
template
#
suggestOutQuantity=
"{ row }"
>
<span
style=
"color: #f56c6c; font-weight: bold"
>
{{
row
.
suggestOutQuantity
}}
</span>
</
template
>
<
template
#
afterOutStock=
"{ row }"
>
<span
style=
"color: #f56c6c"
>
{{
row
.
afterOutStock
}}
</span>
</
template
>
</TableView>
</TableView>
</div>
</div>
...
@@ -76,22 +68,47 @@
...
@@ -76,22 +68,47 @@
<
script
setup
lang=
"tsx"
>
<
script
setup
lang=
"tsx"
>
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
,
ElLoading
}
from
'element-plus'
import
{
applyForReplenishByIdApi
}
from
'@/api/factoryOrderNew'
import
BigNumber
from
'bignumber.js'
import
type
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
import
{
pickCompleteByIdsDataApi
}
from
'@/api/factoryOrderNew'
import
type
{
PickCompleteData
}
from
'@/types/api/factoryOrderNew'
import
TableView
from
'@/components/TableView.vue'
import
TableView
from
'@/components/TableView.vue'
import
_
from
'lodash'
import
_
from
'lodash'
import
CreateOutboundDialog
from
'./CreateOutboundDialog.vue'
import
CreateOutboundDialog
from
'./CreateOutboundDialog.vue'
/** 当前可用库存 = 当前库存数量 − 占用 − 冻结 */
function
getCurrentAvailableInventory
(
row
:
PickCompleteData
):
BigNumber
{
return
new
BigNumber
(
row
.
inventory
??
0
)
.
minus
(
row
.
occupyInventory
??
0
)
.
minus
(
row
.
freezeInventory
??
0
)
}
/** 建议出库数量 = 当前库存 − 生产中数量 */
function
getSuggestOutQuantity
(
row
:
PickCompleteData
):
BigNumber
{
return
new
BigNumber
(
row
.
inventory
??
0
).
minus
(
row
.
producingQuantity
??
0
)
}
/** 出库后库存数量 = 当前库存 − 建议出库数量 */
function
getAfterOutStock
(
row
:
PickCompleteData
):
BigNumber
{
return
new
BigNumber
(
row
.
inventory
??
0
).
minus
(
getSuggestOutQuantity
(
row
))
}
/** 出库后可用库存 = 出库后库存 − 占用 − 冻结 */
function
getAfterOutAvailable
(
row
:
PickCompleteData
):
BigNumber
{
return
getAfterOutStock
(
row
)
.
minus
(
row
.
occupyInventory
??
0
)
.
minus
(
row
.
freezeInventory
??
0
)
}
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
success
:
[]
success
:
[]
}
>
()
}
>
()
const
visible
=
ref
(
false
)
const
visible
=
ref
(
false
)
const
tableData
=
ref
<
operateOrderList
Data
[]
>
([])
const
tableData
=
ref
<
PickComplete
Data
[]
>
([])
const
orderIds
=
ref
<
(
number
|
string
)[]
>
([])
const
orderIds
=
ref
<
(
number
|
string
)[]
>
([])
const
dialogTitle
=
ref
(
'拣胚失败'
)
const
dialogTitle
=
ref
(
'拣胚失败'
)
const
selections
=
ref
<
operateOrderList
Data
[]
>
([])
const
selections
=
ref
<
PickComplete
Data
[]
>
([])
const
columns
=
[
const
columns
=
[
{
{
key
:
'warehouseName'
,
key
:
'warehouseName'
,
...
@@ -114,8 +131,7 @@ const columns = [
...
@@ -114,8 +131,7 @@ const columns = [
showOverflowTooltip
:
true
,
showOverflowTooltip
:
true
,
},
},
{
{
key
:
'batchArrangeNumber'
,
prop
:
'supplierProductNo'
,
prop
:
'batchArrangeNumber'
,
label
:
'款号'
,
label
:
'款号'
,
width
:
140
,
width
:
140
,
align
:
'center'
,
align
:
'center'
,
...
@@ -139,10 +155,14 @@ const columns = [
...
@@ -139,10 +155,14 @@ const columns = [
align
:
'right'
,
align
:
'right'
,
},
},
{
{
prop
:
'inventory'
,
key
:
'currentAvailableInventory'
,
prop
:
'currentAvailableInventory'
,
label
:
'当前可用库存'
,
label
:
'当前可用库存'
,
minWidth
:
120
,
minWidth
:
120
,
align
:
'right'
,
align
:
'right'
,
render
:
(
row
:
PickCompleteData
)
=>
{
return
<
span
>
{
getCurrentAvailableInventory
(
row
).
toNumber
()}
<
/span
>
},
},
},
{
{
prop
:
'producingQuantity'
,
prop
:
'producingQuantity'
,
...
@@ -152,31 +172,35 @@ const columns = [
...
@@ -152,31 +172,35 @@ const columns = [
slot
:
'producingQuantity'
,
slot
:
'producingQuantity'
,
},
},
{
{
key
:
'suggestOutQuantity'
,
prop
:
'suggestOutQuantity'
,
prop
:
'suggestOutQuantity'
,
label
:
'建议出库数量'
,
label
:
'建议出库数量'
,
minWidth
:
120
,
minWidth
:
120
,
align
:
'right'
,
align
:
'right'
,
slot
:
'suggestOutQuantity'
,
render
:
(
row
:
PickCompleteData
)
=>
{
render
:
(
row
:
operateOrderListData
)
=>
{
return
(
return
(
<
span
style
=
"color: #f56c6c; font-weight: bold"
>
<
span
style
=
"color: #f56c6c; font-weight: bold"
>
{
_
.
subtract
(
{
getSuggestOutQuantity
(
row
).
toNumber
()}
Number
(
row
.
inventory
??
0
),
Number
(
row
.
producingQuantity
??
0
),
)}
<
/span
>
<
/span
>
)
)
},
},
},
},
{
{
prop
:
'producingQuantity'
,
key
:
'afterOutStock'
,
prop
:
'afterOutStock'
,
label
:
'出库后库存数量'
,
label
:
'出库后库存数量'
,
minWidth
:
130
,
minWidth
:
130
,
align
:
'center'
,
align
:
'right'
,
slot
:
'right'
,
render
:
(
row
:
PickCompleteData
)
=>
{
return
(
<
span
style
=
"color: #e6a23c; font-weight: bold"
>
{
getAfterOutStock
(
row
).
toNumber
()}
<
/span
>
)
},
},
},
{
{
prop
:
'
i
nventory'
,
prop
:
'
occupyI
nventory'
,
label
:
'出库后占用数量'
,
label
:
'出库后占用数量'
,
minWidth
:
130
,
minWidth
:
130
,
align
:
'right'
,
align
:
'right'
,
...
@@ -186,23 +210,17 @@ const columns = [
...
@@ -186,23 +210,17 @@ const columns = [
label
:
'出库后可用库存'
,
label
:
'出库后可用库存'
,
minWidth
:
130
,
minWidth
:
130
,
align
:
'right'
,
align
:
'right'
,
render
:
(
row
:
operateOrderList
Data
)
=>
{
render
:
(
row
:
PickComplete
Data
)
=>
{
return
(
return
(
<
span
style
=
"color: #f56c6c; font-weight: bold"
>
<
span
style
=
"color: #f56c6c; font-weight: bold"
>
{
_
.
subtract
(
{
getAfterOutAvailable
(
row
).
toNumber
()}
_
.
subtract
(
Number
(
row
.
producingQuantity
??
0
),
Number
(
row
.
inventory
??
0
),
),
Number
(
row
.
freezeInventory
??
0
),
)}
<
/span
>
<
/span
>
)
)
},
},
},
},
]
]
const
handleSelectionChange
=
(
selection
:
operateOrderList
Data
[])
=>
{
const
handleSelectionChange
=
(
selection
:
PickComplete
Data
[])
=>
{
selections
.
value
=
selection
selections
.
value
=
selection
}
}
...
@@ -218,11 +236,8 @@ const open = async (
...
@@ -218,11 +236,8 @@ const open = async (
background
:
'rgba(0, 0, 0, 0.3)'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
})
})
try
{
try
{
const
res
=
await
applyForReplenishByIdApi
(
const
res
=
await
pickCompleteByIdsDataApi
(
ids
)
ids
,
tableData
.
value
=
res
.
data
?.
pickingSituationList
||
[]
'factory/podOrderOperation/listByIds'
,
)
tableData
.
value
=
res
.
data
||
[]
}
catch
(
_e
)
{
}
catch
(
_e
)
{
tableData
.
value
=
[]
tableData
.
value
=
[]
}
finally
{
}
finally
{
...
@@ -256,14 +271,14 @@ const handleCreateOutbound = () => {
...
@@ -256,14 +271,14 @@ const handleCreateOutbound = () => {
}
}
const
warehouseId
=
warehouseIds
[
0
]
as
number
|
string
const
warehouseId
=
warehouseIds
[
0
]
as
number
|
string
const
firstSelection
=
selections
.
value
[
0
]
as
operateOrderList
Data
&
{
const
firstSelection
=
selections
.
value
[
0
]
as
PickComplete
Data
&
{
warehouseName
?:
string
warehouseName
?:
string
}
}
const
warehouseName
=
firstSelection
.
warehouseName
const
warehouseName
=
firstSelection
.
warehouseName
const
items
=
selections
.
value
const
items
=
selections
.
value
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
const
row
=
item
as
operateOrderList
Data
&
{
const
row
=
item
as
PickComplete
Data
&
{
thirdSkuCode
?:
string
thirdSkuCode
?:
string
inventory
?:
number
inventory
?:
number
producingQuantity
?:
number
producingQuantity
?:
number
...
@@ -271,10 +286,7 @@ const handleCreateOutbound = () => {
...
@@ -271,10 +286,7 @@ const handleCreateOutbound = () => {
return
{
return
{
thirdSkuCode
:
row
.
thirdSkuCode
||
''
,
thirdSkuCode
:
row
.
thirdSkuCode
||
''
,
suggestOutQuantity
:
_
.
subtract
(
suggestOutQuantity
:
getSuggestOutQuantity
(
row
).
toNumber
(),
Number
(
row
.
inventory
??
0
),
Number
(
row
.
producingQuantity
??
0
),
),
}
}
})
})
.
filter
((
item
)
=>
item
.
suggestOutQuantity
!==
0
)
.
filter
((
item
)
=>
item
.
suggestOutQuantity
!==
0
)
...
...
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