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
554ca8ff
Commit
554ca8ff
authored
Mar 30, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 城中分拣功能开发
parent
c61b0b9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
6 deletions
+72
-6
src/api/factoryOrderNew.ts
+22
-0
src/views/order/components/WeightDialog.vue
+41
-5
src/views/order/factoryOrderNew/index.vue
+9
-1
No files found.
src/api/factoryOrderNew.ts
View file @
554ca8ff
...
...
@@ -398,3 +398,25 @@ export function getByOperationNoLogApi(operationNo: string) {
},
)
}
export
function
listByNoPodOrderApi
(
params
:
{
type
:
string
no
:
string
logisticsCompanyCode
?:
string
})
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrder/listByNo'
,
{
params
},
)
}
export
function
orderWeighingPodOrderApi
(
params
:
unknown
,
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrder/orderWeighing'
,
params
as
{
podOrderWeighingParams
:
{
id
?:
string
;
outWarehouseWeight
?:
string
}[]
},
)
}
src/views/order/components/WeightDialog.vue
View file @
554ca8ff
...
...
@@ -110,10 +110,11 @@ interface ILogisticsList {
import
BigNumber
from
'bignumber.js'
import
weight
from
'../components/weigh.js'
import
{
listByNoApi
,
orderWeighingApi
,
listByNoApi
as
defaultListByNoApi
,
orderWeighingApi
as
defaultOrderWeighingApi
,
allErpCodeListApi
,
}
from
'@/api/podCnOrder'
import
type
{
BaseRespData
}
from
'@/types/api'
// import { logisticsCompanyAllCodelist } from '@/api/logistics.ts'
import
CustomizeTable
from
'@/components/VxeTable.tsx'
import
{
TableColumn
}
from
'@/components/VxeTable'
...
...
@@ -196,6 +197,39 @@ const tableConfig = ref<TableColumn[]>([
},
},
])
const
props
=
withDefaults
(
defineProps
<
{
/** 默认 podCN:`factory/podJomallOrderCn/listByNo` */
listByNoApi
?:
typeof
defaultListByNoApi
/** 默认 podCN:`factory/podJomallOrderCn/orderWeighing` */
orderWeighingApi
?:
(
payload
:
unknown
)
=>
Promise
<
BaseRespData
<
never
>>
/**
* 提交称重时的请求体构造;默认 `{ podCnWeighingParams: rows }`,
* 若后端字段与 podCN 分叉时可单独传入。
*/
buildOrderWeighingPayload
?:
(
rows
:
IpodCnWeighingParams
[],
)
=>
|
{
podCnWeighingParams
:
{
id
?:
string
;
outWarehouseWeight
?:
string
}[]
}
|
{
podOrderWeighingParams
:
{
id
?:
string
;
outWarehouseWeight
?:
string
}[]
}
}
>
(),
{},
)
const
resolveListByNoApi
=
()
=>
props
.
listByNoApi
??
defaultListByNoApi
const
resolveOrderWeighingApi
=
()
=>
(
props
.
orderWeighingApi
??
defaultOrderWeighingApi
)
as
(
payload
:
unknown
,
)
=>
Promise
<
BaseRespData
<
never
>>
const
resolveWeighingPayload
=
(
rows
:
IpodCnWeighingParams
[])
=>
(
props
.
buildOrderWeighingPayload
?.(
rows
)
??
{
podCnWeighingParams
:
rows
,
})
as
unknown
const
emits
=
defineEmits
<
{
(
e
:
'updateList'
):
void
}
>
()
...
...
@@ -259,7 +293,7 @@ const weightChange = async () => {
params
.
logisticsCompanyCode
=
logisticsCompanyCode
.
value
weight
.
check
(
noValue
,
listByNoApi
,
resolveListByNoApi
()
,
params
,
(
arr
)
=>
{
tableData
.
value
=
[...
arr
]
...
...
@@ -302,7 +336,8 @@ const weightGet = async () => {
background
:
'rgba(0, 0, 0, 0.3)'
,
})
try
{
orderWeighingApi
({
podCnWeighingParams
:
tableData
.
value
}).
then
((
res
)
=>
{
resolveOrderWeighingApi
()(
resolveWeighingPayload
(
tableData
.
value
)).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
weight
.
clear
()
ElMessage
.
success
(
'保存称重分拣成功'
)
...
...
@@ -313,7 +348,8 @@ const weightGet = async () => {
handleClose
()
emits
(
'updateList'
)
}
})
},
)
}
catch
(
error
)
{
console
.
log
(
error
)
}
finally
{
...
...
src/views/order/factoryOrderNew/index.vue
View file @
554ca8ff
...
...
@@ -815,7 +815,13 @@
:
is
-
new
-
order
=
"true"
@
refresh
-
table
=
"refreshCurrentView"
/>
<
WeightDialog
ref
=
"weightDialogRef"
@
update
-
list
=
"refreshCurrentView"
/>
<
WeightDialog
ref
=
"weightDialogRef"
:
list
-
by
-
no
-
api
=
"listByNoPodOrderApi"
:
order
-
weighing
-
api
=
"orderWeighingPodOrderApi"
:
build
-
order
-
weighing
-
payload
=
"(rows) => ({ podOrderWeighingParams: rows
}
)"
@
update
-
list
=
"() => refreshCurrentView({ isRefreshTree: true
}
)"
/>
<
FastProduction
v
-
model
:
detail
-
visible
=
"detailVisible"
:
detail
-
data
=
"detailData"
...
...
@@ -899,6 +905,8 @@ import {
updateRemarkApi
,
completeDeliveryApi
,
getByOperationNoLogApi
,
listByNoPodOrderApi
,
orderWeighingPodOrderApi
,
}
from
'@/api/factoryOrderNew'
import
{
filePath
}
from
'@/api/axios'
import
{
OrderData
}
from
'@/types/api/podMakeOrder'
...
...
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