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
63026784
Commit
63026784
authored
Jan 21, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 备货完成功能开发
parent
e212c47d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
38 deletions
+134
-38
src/api/stockingOrder.ts
+32
-0
src/types/api/supply/stockingOrder.ts
+7
-0
src/views/supply/stockingOrder/AddStockingOrderDialog.vue
+56
-5
src/views/supply/stockingOrder/SupplierDispatchOrder.vue
+0
-27
src/views/supply/stockingOrder/SupplierDispatchOrderDialog.vue
+0
-0
src/views/supply/stockingOrder/index.vue
+39
-6
No files found.
src/api/stockingOrder.ts
View file @
63026784
...
@@ -81,3 +81,35 @@ export function submitStockingOrderAuditApi(ids: string) {
...
@@ -81,3 +81,35 @@ export function submitStockingOrderAuditApi(ids: string) {
},
},
)
)
}
}
export
function
rejectedStockingOrderApi
(
params
:
{
id
:
number
|
string
turnDownReason
:
string
})
{
return
axios
.
get
<
never
,
BaseRespData
<
void
>>
(
'factory/supply/stockingUpManage/rejected'
,
{
params
,
},
)
}
export
function
supplierDispatchApi
(
data
:
{
manageId
:
number
|
string
manageNo
:
string
warehouseId
:
number
|
string
warehouseName
:
string
expectDeliveryTime
:
string
detailsList
:
StockingOrderProduct
[]
})
{
return
axios
.
post
<
never
,
BaseRespData
<
void
>>
(
'factory/supply/stockingUpWarehouseApply/add'
,
data
,
)
}
export
function
stockingCompleteApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
void
>>
(
`factory/supply/stockingUpManage/delivery?id=
${
id
}
`
,
)
}
src/types/api/supply/stockingOrder.ts
View file @
63026784
...
@@ -83,7 +83,10 @@ export interface AddStockingOrderForm {
...
@@ -83,7 +83,10 @@ export interface AddStockingOrderForm {
currencyName
?:
string
currencyName
?:
string
remark
?:
string
remark
?:
string
status
?:
number
status
?:
number
submission
?:
boolean
detailsList
?:
StockingOrderProduct
[]
detailsList
?:
StockingOrderProduct
[]
examineStatus
?:
number
// 审核状态:1通过,0驳回
rejectReason
?:
string
// 驳回原因
}
}
// 备货单商品
// 备货单商品
...
@@ -99,6 +102,10 @@ export interface StockingOrderProduct {
...
@@ -99,6 +102,10 @@ export interface StockingOrderProduct {
currencyName
?:
string
currencyName
?:
string
totalPrice
?:
number
|
string
totalPrice
?:
number
|
string
shipmentQuantity
?:
number
|
string
shipmentQuantity
?:
number
|
string
buyStored
?:
number
// 供应商发货相关字段
remainingQuantity
?:
number
// 剩余待发货数量
currentShipQuantity
?:
number
|
string
// 本次发货数量
}
}
export
interface
RelatedDocumentList
{}
export
interface
RelatedDocumentList
{}
...
...
src/views/supply/stockingOrder/AddStockingOrderDialog.vue
View file @
63026784
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
v-if=
"editOrderType === 'add' || editOrderType === 'edit'"
v-if=
"editOrderType === 'add' || editOrderType === 'edit'"
size=
"large"
size=
"large"
type=
"primary"
type=
"primary"
@
click=
"handleSave"
@
click=
"handleSave
(false)
"
>
保存
</ElButton
>
保存
</ElButton
>
>
<ElButton
<ElButton
...
@@ -243,10 +243,14 @@
...
@@ -243,10 +243,14 @@
v-if=
"editOrderType === 'audit'"
v-if=
"editOrderType === 'audit'"
size=
"large"
size=
"large"
type=
"success"
type=
"success"
@
click=
"handleSave"
@
click=
"handleSave
(false)
"
>
审核通过
</ElButton
>
审核通过
</ElButton
>
>
<ElButton
v-if=
"editOrderType === 'audit'"
size=
"large"
type=
"danger"
<ElButton
v-if=
"editOrderType === 'audit'"
size=
"large"
type=
"danger"
@
click=
"handleReject"
>
审核驳回
</ElButton
>
审核驳回
</ElButton
>
>
</div>
</div>
...
@@ -268,6 +272,7 @@ import {
...
@@ -268,6 +272,7 @@ import {
addStockingOrderApi
,
addStockingOrderApi
,
getProductBySkuApi
,
getProductBySkuApi
,
getStockingOrderDetailByIdApi
,
getStockingOrderDetailByIdApi
,
rejectedStockingOrderApi
,
}
from
'@/api/stockingOrder'
}
from
'@/api/stockingOrder'
import
ImageView
from
'@/components/ImageView.vue'
import
ImageView
from
'@/components/ImageView.vue'
import
{
BigNumber
}
from
'bignumber.js'
import
{
BigNumber
}
from
'bignumber.js'
...
@@ -528,7 +533,7 @@ const handleCancel = () => {
...
@@ -528,7 +533,7 @@ const handleCancel = () => {
visible
.
value
=
false
visible
.
value
=
false
}
}
const
handleSave
=
async
()
=>
{
const
handleSave
=
async
(
isSubmit
:
boolean
=
false
)
=>
{
if
(
!
formRef
.
value
)
return
if
(
!
formRef
.
value
)
return
try
{
try
{
...
@@ -573,6 +578,7 @@ const handleSave = async () => {
...
@@ -573,6 +578,7 @@ const handleSave = async () => {
warehouseName
,
warehouseName
,
stockingUpUserName
,
stockingUpUserName
,
totalPrice
:
totalAmount
.
value
,
totalPrice
:
totalAmount
.
value
,
submission
:
props
.
editOrderType
===
'audit'
?
undefined
:
isSubmit
,
})
})
if
(
res
.
code
!==
200
)
{
if
(
res
.
code
!==
200
)
{
ElMessage
.
warning
(
res
.
message
)
ElMessage
.
warning
(
res
.
message
)
...
@@ -588,7 +594,52 @@ const handleSave = async () => {
...
@@ -588,7 +594,52 @@ const handleSave = async () => {
}
}
}
}
const
handleSaveAndSubmit
=
async
()
=>
{}
const
handleSaveAndSubmit
=
async
()
=>
{
await
handleSave
(
true
)
}
const
handleReject
=
async
()
=>
{
if
(
!
props
.
editId
)
return
try
{
const
{
value
:
rejectReason
}
=
await
ElMessageBox
.
prompt
(
'请输入驳回原因'
,
'审核驳回'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
inputType
:
'textarea'
,
inputPlaceholder
:
'请输入驳回原因'
,
inputValidator
:
(
val
)
=>
{
if
(
!
val
||
!
val
.
trim
())
{
return
'驳回原因不能为空'
}
return
true
},
},
)
const
loading
=
ElLoading
.
service
({
lock
:
true
,
text
:
'加载中...'
,
background
:
'rgba(0, 0, 0, 0.7)'
,
})
try
{
const
res
=
await
rejectedStockingOrderApi
({
id
:
props
.
editId
,
turnDownReason
:
rejectReason
.
trim
(),
})
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'驳回成功'
)
emit
(
'refresh'
)
visible
.
value
=
false
}
finally
{
loading
.
close
()
}
}
catch
{
// 用户取消操作,不做处理
}
}
const
resetForm
=
()
=>
{
const
resetForm
=
()
=>
{
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
...
...
src/views/supply/stockingOrder/SupplierDispatchOrder.vue
deleted
100644 → 0
View file @
e212c47d
<
template
>
<ElDialog
v-model=
"visible"
title=
"供应商发货"
width=
"1400px"
top=
"15vh"
:close-on-click-modal=
"false"
destroy-on-close
>
<div
class=
"supplier-dispatch-order-page card h-100 flex overflow-hidden"
></div>
</ElDialog>
</
template
>
<
script
setup
lang=
"tsx"
>
const
props
=
defineProps
<
{
visible
:
boolean
}
>
()
const
emit
=
defineEmits
<
{
(
e
:
'update:visible'
,
value
:
boolean
):
void
(
e
:
'refresh'
):
void
}
>
()
const
visible
=
computed
({
get
:
()
=>
props
.
visible
,
set
:
(
val
)
=>
emit
(
'update:visible'
,
val
),
})
</
script
>
src/views/supply/stockingOrder/SupplierDispatchOrderDialog.vue
0 → 100644
View file @
63026784
This diff is collapsed.
Click to expand it.
src/views/supply/stockingOrder/index.vue
View file @
63026784
...
@@ -161,9 +161,7 @@
...
@@ -161,9 +161,7 @@
>
提交审核
<
/ElButto
n
>
提交审核
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'STOCKING_UP'"
class
=
"item"
>
<
ElButton
type
=
"warning"
>
备货完成
<
/ElButton
>
<
/span
>
<
span
class
=
"item"
>
<
span
class
=
"item"
>
<
ElButton
type
=
"success"
>
添加内部便签
<
/ElButton
>
<
ElButton
type
=
"success"
>
添加内部便签
<
/ElButton
>
<
/span
>
<
/span
>
...
@@ -221,9 +219,10 @@
...
@@ -221,9 +219,10 @@
:
edit
-
id
=
"selectedRow?.id"
:
edit
-
id
=
"selectedRow?.id"
@
refresh
=
"onRefresh"
@
refresh
=
"onRefresh"
/>
/>
<
SupplierDispatchOrder
<
SupplierDispatchOrder
Dialog
v
-
model
:
visible
=
"supplierDispatchOrderVisible"
v
-
model
:
visible
=
"supplierDispatchOrderVisible"
:
selected
-
row
=
"selectedRow"
:
selected
-
row
=
"selectedRow"
:
warehouse
-
list
=
"warehouseList"
@
refresh
=
"onRefresh"
@
refresh
=
"onRefresh"
/>
/>
<
/div
>
<
/div
>
...
@@ -232,12 +231,13 @@
...
@@ -232,12 +231,13 @@
import
{
computed
,
ref
}
from
'vue'
import
{
computed
,
ref
}
from
'vue'
import
{
import
{
getStockingOrderListApi
,
getStockingOrderListApi
,
stockingCompleteApi
,
submitStockingOrderAuditApi
,
submitStockingOrderAuditApi
,
}
from
'@/api/stockingOrder'
}
from
'@/api/stockingOrder'
import
TableView
from
'@/components/TableView.vue'
import
TableView
from
'@/components/TableView.vue'
import
StockingOrderDetailTabs
from
'./StockingOrderDetailTabs.vue'
import
StockingOrderDetailTabs
from
'./StockingOrderDetailTabs.vue'
import
AddStockingOrderDialog
from
'./AddStockingOrderDialog.vue'
import
AddStockingOrderDialog
from
'./AddStockingOrderDialog.vue'
import
SupplierDispatchOrder
from
'./SupplierDispatchOrder
.vue'
import
SupplierDispatchOrder
Dialog
from
'./SupplierDispatchOrderDialog
.vue'
import
{
import
{
TreeData
,
TreeData
,
SearchForm
,
SearchForm
,
...
@@ -394,7 +394,7 @@ const tableColumns = computed(() => {
...
@@ -394,7 +394,7 @@ const tableColumns = computed(() => {
{
{
label
:
'操作'
,
label
:
'操作'
,
prop
:
'operation'
,
prop
:
'operation'
,
width
:
1
4
0
,
width
:
1
8
0
,
align
:
'center'
,
align
:
'center'
,
fixed
:
'right'
,
fixed
:
'right'
,
render
:
(
row
:
TableData
)
=>
{
render
:
(
row
:
TableData
)
=>
{
...
@@ -427,6 +427,15 @@ const tableColumns = computed(() => {
...
@@ -427,6 +427,15 @@ const tableColumns = computed(() => {
供应商发货
供应商发货
<
/ElButton
>
<
/ElButton
>
)
}
)
}
{
row
.
status
===
'STOCKING_UP'
&&
(
<
ElButton
link
type
=
"warning"
onClick
=
{()
=>
stockingComplete
(
row
)
}
>
备货完成
<
/ElButton
>
)
}
<
/span
>
<
/span
>
)
)
}
,
}
,
...
@@ -562,6 +571,30 @@ const handleSupplierDispatchOrder = (row: TableData) => {
...
@@ -562,6 +571,30 @@ const handleSupplierDispatchOrder = (row: TableData) => {
selectedRow
.
value
=
row
selectedRow
.
value
=
row
supplierDispatchOrderVisible
.
value
=
true
supplierDispatchOrderVisible
.
value
=
true
}
}
const
stockingComplete
=
async
(
row
:
TableData
)
=>
{
try
{
await
ElMessageBox
.
confirm
(
'备货完成将把未完成入库申请单自动取消,是否继续对选中的订单操作备货完成?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
,
)
}
catch
{
return
}
try
{
const
res
=
await
stockingCompleteApi
(
row
.
id
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'备货完成成功'
)
search
()
loadTreeData
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
// 新增备货单弹窗
// 新增备货单弹窗
const
addDialogVisible
=
ref
(
false
)
const
addDialogVisible
=
ref
(
false
)
const
handleAddOrder
=
()
=>
{
const
handleAddOrder
=
()
=>
{
...
...
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