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
0
Merge Requests
0
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
dc5cad3f
Commit
dc5cad3f
authored
Jun 17, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!220
parents
44e59537
4c093b77
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1019 additions
and
52 deletions
+1019
-52
components.d.ts
+1
-0
src/api/factoryOrderNew.ts
+19
-0
src/api/order.ts
+114
-21
src/api/podUsOrder.ts
+8
-4
src/router/index.ts
+10
-4
src/router/menu.ts
+5
-0
src/types/api/factoryOrderNew/index.ts
+19
-0
src/types/api/order.ts
+46
-0
src/types/api/podMakeOrder.ts
+3
-0
src/utils/index.ts
+9
-0
src/views/order/allocationSortingRule/components/addDialog.vue
+0
-0
src/views/order/allocationSortingRule/index.vue
+336
-0
src/views/order/factoryOrderNew/component/CardLayout.vue
+29
-0
src/views/order/factoryOrderNew/component/CreateOutboundDialog.vue
+5
-5
src/views/order/factoryOrderNew/component/OrderInventoryDialog.vue
+339
-0
src/views/order/factoryOrderNew/index.vue
+76
-18
src/views/order/podUs/PodMakeOrder.vue
+0
-0
No files found.
components.d.ts
View file @
dc5cad3f
...
@@ -23,6 +23,7 @@ declare module 'vue' {
...
@@ -23,6 +23,7 @@ declare module 'vue' {
ElDescriptions
:
typeof
import
(
'element-plus/es'
)[
'ElDescriptions'
]
ElDescriptions
:
typeof
import
(
'element-plus/es'
)[
'ElDescriptions'
]
ElDescriptionsItem
:
typeof
import
(
'element-plus/es'
)[
'ElDescriptionsItem'
]
ElDescriptionsItem
:
typeof
import
(
'element-plus/es'
)[
'ElDescriptionsItem'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDialog
:
typeof
import
(
'element-plus/es'
)[
'ElDialog'
]
ElDivider
:
typeof
import
(
'element-plus/es'
)[
'ElDivider'
]
ElDrawer
:
typeof
import
(
'element-plus/es'
)[
'ElDrawer'
]
ElDrawer
:
typeof
import
(
'element-plus/es'
)[
'ElDrawer'
]
ElDropdown
:
typeof
import
(
'element-plus/es'
)[
'ElDropdown'
]
ElDropdown
:
typeof
import
(
'element-plus/es'
)[
'ElDropdown'
]
ElDropdownItem
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownItem'
]
ElDropdownItem
:
typeof
import
(
'element-plus/es'
)[
'ElDropdownItem'
]
...
...
src/api/factoryOrderNew.ts
View file @
dc5cad3f
...
@@ -5,6 +5,7 @@ import type {
...
@@ -5,6 +5,7 @@ import type {
FactoryOrderNewListData
,
FactoryOrderNewListData
,
LogListData
,
LogListData
,
operateOrderListData
,
operateOrderListData
,
OrderInventoryData
,
PickCompleteData
,
PickCompleteData
,
ProductListData
,
ProductListData
,
RestockData
,
RestockData
,
...
@@ -661,3 +662,21 @@ export function interceptSuccessApi(
...
@@ -661,3 +662,21 @@ export function interceptSuccessApi(
data
,
data
,
)
)
}
}
export
function
getOrderInventoryListApi
(
data
:
Record
<
string
,
unknown
>
,
currentPage
:
number
,
pageSize
:
number
,
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
OrderInventoryData
>>
(
'factory/podOrder/outOfStock/stock-out-statistics'
,
{
...
data
,
currentPage
,
pageSize
},
)
}
export
function
exportOrderInventoryApi
(
data
:
Record
<
string
,
unknown
>
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podOrder/outOfStock/export-stock-out-statistics'
,
data
,
)
}
src/api/order.ts
View file @
dc5cad3f
...
@@ -12,6 +12,9 @@ import {
...
@@ -12,6 +12,9 @@ import {
InspectionData
,
InspectionData
,
PaymentForm
,
PaymentForm
,
RejectParams
,
RejectParams
,
SortingList
,
SortingRuleDetail
,
OperatorList
,
}
from
'@/types/api/order'
}
from
'@/types/api/order'
import
{
import
{
apiSubmitPodOrderForm
,
apiSubmitPodOrderForm
,
...
@@ -22,7 +25,8 @@ import {
...
@@ -22,7 +25,8 @@ import {
ProductionOrder
,
ProductionOrder
,
ShipmentOrderDetailData
,
ShipmentOrderDetailData
,
updatePriceForm
,
updatePriceForm
,
IUpdatePrice
,
PodUsDetailData
,
IUpdatePrice
,
PodUsDetailData
,
}
from
'@/types/api/deliveryNote'
}
from
'@/types/api/deliveryNote'
import
{
import
{
AccountStatementNote
,
AccountStatementNote
,
...
@@ -30,7 +34,9 @@ import {
...
@@ -30,7 +34,9 @@ import {
BillOrderDetailData
,
BillOrderDetailData
,
ConfirmOrderForm
,
ConfirmOrderForm
,
CountStatus
,
CountStatus
,
LogList
,
OrderDetails
,
ProductDetails
,
LogList
,
OrderDetails
,
ProductDetails
,
}
from
'@/types/api/billOrder'
}
from
'@/types/api/billOrder'
export
function
getOrderList
(
export
function
getOrderList
(
...
@@ -148,11 +154,11 @@ export function qaFinishedApi(data: InspectionData[]) {
...
@@ -148,11 +154,11 @@ export function qaFinishedApi(data: InspectionData[]) {
}
}
export
function
apiSetCraftData
({
export
function
apiSetCraftData
({
id
,
id
,
craftTotalPrice
,
craftTotalPrice
,
recNumber
,
recNumber
,
craftPriceList
,
craftPriceList
,
}:
{
}:
{
id
:
number
|
undefined
id
:
number
|
undefined
craftTotalPrice
:
number
|
undefined
craftTotalPrice
:
number
|
undefined
recNumber
:
string
|
undefined
recNumber
:
string
|
undefined
...
@@ -509,7 +515,7 @@ export function getPodUsDetailData(id?: number | string) {
...
@@ -509,7 +515,7 @@ export function getPodUsDetailData(id?: number | string) {
export
function
delPodUsOrderData
(
ids
?:
number
|
string
[])
{
export
function
delPodUsOrderData
(
ids
?:
number
|
string
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'pod_us/reconciliation/delItem'
,
'pod_us/reconciliation/delItem'
,
{
ids
},
{
ids
},
)
)
}
}
...
@@ -555,7 +561,10 @@ export function updateRecPrice(data: updatePriceForm) {
...
@@ -555,7 +561,10 @@ export function updateRecPrice(data: updatePriceForm) {
)
)
}
}
export
function
updatePodUsCarriageAmount
(
data
:
{
ids
:
number
[],
carriage_amount
:
number
})
{
export
function
updatePodUsCarriageAmount
(
data
:
{
ids
:
number
[]
carriage_amount
:
number
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'pod_us/reconciliation/updateCarriage'
,
'pod_us/reconciliation/updateCarriage'
,
data
,
data
,
...
@@ -563,11 +572,11 @@ export function updatePodUsCarriageAmount(data: { ids: number[], carriage_amount
...
@@ -563,11 +572,11 @@ export function updatePodUsCarriageAmount(data: { ids: number[], carriage_amount
}
}
interface
BatchUpdatePrice
{
interface
BatchUpdatePrice
{
info_id
?:
number
|
string
|
undefined
,
info_id
?:
number
|
string
|
undefined
itemList
:
{
itemList
:
{
id
:
number
|
string
,
id
:
number
|
string
craft_price
:
number
|
string
,
craft_price
:
number
|
string
template_price
:
number
|
string
template_price
:
number
|
string
}[]
}[]
}
}
...
@@ -647,10 +656,10 @@ export function confirmPodUsOrderApi(data: ConfirmOrderForm) {
...
@@ -647,10 +656,10 @@ export function confirmPodUsOrderApi(data: ConfirmOrderForm) {
}
}
export
function
apiRejectionOfReview
({
export
function
apiRejectionOfReview
({
ids
,
ids
,
description
,
description
,
recNumbers
,
recNumbers
,
}:
{
}:
{
ids
:
string
ids
:
string
recNumbers
:
string
recNumbers
:
string
description
:
string
description
:
string
...
@@ -673,10 +682,10 @@ export function apiBillPodPayment(data: PaymentForm) {
...
@@ -673,10 +682,10 @@ export function apiBillPodPayment(data: PaymentForm) {
}
}
export
function
rejectOrderApi
({
export
function
rejectOrderApi
({
ids
,
ids
,
description
,
description
,
pass
,
pass
,
}:
{
}:
{
ids
:
string
ids
:
string
pass
:
number
pass
:
number
description
:
string
description
:
string
...
@@ -687,3 +696,87 @@ export function rejectOrderApi({
...
@@ -687,3 +696,87 @@ export function rejectOrderApi({
pass
,
pass
,
})
})
}
}
// 配货分拣 获取功能开关
export
function
getConfigApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
{
enable
:
boolean
;
id
:
number
}
>>
(
'allocation-sorting-rule/config'
,
)
}
// 配货分拣 更新功能开关
export
function
updateConfighApi
(
data
:
{
id
:
number
;
enable
:
boolean
})
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'allocation-sorting-rule/enable-config'
,
{
params
:
data
},
)
}
// 配货分拣 列表
export
function
getSortingRuleListApi
(
data
?:
{
warehouseId
?:
number
})
{
return
axios
.
post
<
never
,
BasePaginationData
<
SortingList
>>
(
'allocation-sorting-rule/list_page'
,
data
,
)
}
// 配货分拣 详情
export
function
getAreaInfoApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
SortingRuleDetail
>>
(
'allocation-sorting-rule/get'
,
{
params
:
{
id
}
},
)
}
// 配货分拣 新增
export
function
addAreaApi
(
data
:
SortingRuleDetail
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'allocation-sorting-rule/add'
,
data
,
)
}
// 配货分拣 编辑
export
function
editAreaApi
(
data
:
SortingRuleDetail
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'allocation-sorting-rule/update'
,
data
,
)
}
// 配货分拣 删除
export
function
deleteAreaApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'allocation-sorting-rule/delete'
,
{
params
:
{
id
}
},
)
}
// 配货分拣 查询可用配货区
export
function
getAreaListApi
(
warehouseId
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
OperatorList
[]
>>
(
'allocation-sorting-rule/area-list'
,
{
params
:
{
warehouseId
}
},
)
}
// 配货分拣 配货规则 条件
export
function
getConditionTypeListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
OperatorList
[]
>>
(
'allocation-sorting-rule/condition-type'
,
)
}
// 配货分拣 配货规则 操作符
export
function
getOperatorListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
OperatorList
[]
>>
(
'allocation-sorting-rule/operator-list'
,
)
}
// 配货分拣 操作日志
export
function
getSortingLogApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
LogListData
[]
>>
(
'sorting/getLog'
,
{
params
:
{
id
},
})
}
src/api/podUsOrder.ts
View file @
dc5cad3f
...
@@ -263,9 +263,10 @@ export function getPodBoxListApi(
...
@@ -263,9 +263,10 @@ export function getPodBoxListApi(
url
:
string
,
url
:
string
,
factoryNo
:
number
|
string
|
undefined
,
factoryNo
:
number
|
string
|
undefined
,
warehouseId
:
number
|
string
,
warehouseId
:
number
|
string
,
sortingAreaId
?:
number
|
string
,
)
{
)
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
url
,
{
return
axios
.
get
<
never
,
BaseRespData
<
PodMakeOrderData
[]
>>
(
url
,
{
params
:
{
factoryNo
,
warehouseId
},
params
:
{
factoryNo
,
warehouseId
,
packingId
:
sortingAreaId
},
})
})
}
}
...
@@ -276,9 +277,10 @@ export function submitInspectionApi(
...
@@ -276,9 +277,10 @@ export function submitInspectionApi(
},
},
boxIndex
:
number
|
null
,
boxIndex
:
number
|
null
,
warehouseId
:
number
|
string
,
warehouseId
:
number
|
string
,
sortingAreaId
?:
number
|
string
,
)
{
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`
${
url
}
?box=
${
boxIndex
}
&warehouseId=
${
warehouseId
}
`
,
`
${
url
}
?box=
${
boxIndex
}
&warehouseId=
${
warehouseId
}
&packingId=
${
sortingAreaId
}
`
,
params
,
params
,
)
)
}
}
...
@@ -287,18 +289,20 @@ export function clearBoxApi(
...
@@ -287,18 +289,20 @@ export function clearBoxApi(
factoryNo
:
number
,
factoryNo
:
number
,
box
:
number
|
null
,
box
:
number
|
null
,
warehouseId
:
number
|
string
,
warehouseId
:
number
|
string
,
sortingAreaId
?:
number
|
string
,
)
{
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
url
,
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
url
,
{
params
:
{
factoryNo
,
box
,
warehouseId
},
params
:
{
factoryNo
,
box
,
warehouseId
,
packingId
:
sortingAreaId
},
})
})
}
}
export
function
clearAllBoxApi
(
export
function
clearAllBoxApi
(
url
:
string
,
url
:
string
,
warehouseId
:
string
|
number
,
warehouseId
:
string
|
number
,
factoryNo
:
string
|
number
|
undefined
,
factoryNo
:
string
|
number
|
undefined
,
sortingAreaId
?:
number
|
string
,
)
{
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
url
,
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
url
,
{
params
:
{
warehouseId
,
factoryNo
},
params
:
{
warehouseId
,
factoryNo
,
packingId
:
sortingAreaId
},
})
})
}
}
export
function
updateRemarkApi
(
id
:
number
,
content
:
string
)
{
export
function
updateRemarkApi
(
id
:
number
,
content
:
string
)
{
...
...
src/router/index.ts
View file @
dc5cad3f
...
@@ -103,16 +103,22 @@ const router = createRouter({
...
@@ -103,16 +103,22 @@ const router = createRouter({
meta
:
{
meta
:
{
title
:
'工厂订单(NEW)'
,
title
:
'工厂订单(NEW)'
,
},
},
component
:
()
=>
component
:
()
=>
import
(
'@/views/order/factoryOrderNew/index.vue'
),
import
(
'@/views/order/factoryOrderNew/index.vue'
),
},
},
{
{
path
:
'/order/cancel-order-process'
,
path
:
'/order/cancel-order-process'
,
meta
:
{
meta
:
{
title
:
'取消后订单处理'
,
title
:
'取消后订单处理'
,
},
},
component
:
()
=>
import
(
'@/views/order/cancelOrderProcess/index.vue'
),
},
{
path
:
'/order/allocation-sorting-rule'
,
meta
:
{
title
:
'配货分拣规则'
,
},
component
:
()
=>
component
:
()
=>
import
(
'@/views/order/
cancelOrderProcess
/index.vue'
),
import
(
'@/views/order/
allocationSortingRule
/index.vue'
),
},
},
{
{
path
:
'/pod-cn-order/orderTracking'
,
path
:
'/pod-cn-order/orderTracking'
,
...
...
src/router/menu.ts
View file @
dc5cad3f
...
@@ -156,6 +156,11 @@ const menu: MenuItem[] = [
...
@@ -156,6 +156,11 @@ const menu: MenuItem[] = [
id
:
13
,
id
:
13
,
label
:
'取消后订单处理'
,
label
:
'取消后订单处理'
,
},
},
{
index
:
'/order/allocation-sorting-rule'
,
id
:
14
,
label
:
'配货分拣规则'
,
},
],
],
},
},
{
{
...
...
src/types/api/factoryOrderNew/index.ts
View file @
dc5cad3f
...
@@ -278,3 +278,22 @@ export type CardLayoutListFetcher = (
...
@@ -278,3 +278,22 @@ export type CardLayoutListFetcher = (
currentPage
:
number
,
currentPage
:
number
,
pageSize
:
number
,
pageSize
:
number
,
)
=>
Promise
<
PaginationData
<
operateOrderListData
>>
)
=>
Promise
<
PaginationData
<
operateOrderListData
>>
export
interface
OrderInventoryData
{
id
?:
number
image
?:
string
warehouseName
?:
string
locationCode
?:
string
warehouseSku
?:
string
productNo
?:
string
skuName
?:
string
shortageQuantity
?:
number
salesNum
?:
number
demandQuantity
?:
number
usableQuantity
?:
number
inventory
?:
number
occupyInventory
?:
number
freezeInventory
?:
number
variantImage
?:
string
inventoryStatus
?:
number
}
src/types/api/order.ts
View file @
dc5cad3f
...
@@ -292,3 +292,49 @@ export interface RejectParams {
...
@@ -292,3 +292,49 @@ export interface RejectParams {
ids
?:
string
ids
?:
string
pass
?:
number
pass
?:
number
}
}
// 配货分拣 列表
export
interface
SortingList
{
id
:
number
sortNo
:
number
areaDesc
:
string
areaName
:
string
areaCode
:
string
warehouseId
:
number
warehouseName
:
string
autoPrint
:
boolean
defaultWarehouse
:
0
|
1
}
// 配货分拣 详情
export
interface
SortingRuleDetail
{
id
?:
number
sortNo
:
number
// 分拣序号
areaDesc
:
string
// 分拣区描述
areaCode
:
string
// 分拣区编码
areaName
?:
string
// 分拣区名称
warehouseId
:
number
warehouseName
:
string
matchType
:
1
|
2
//匹配类型:1=所有条件(且) 2=任一条件(或)
autoPrint
:
boolean
// 自动打单
defaultFlag
:
boolean
// 默认分拣区
secondScan
:
boolean
// 二次扫码
conditions
:
SortingRuleCondition
[]
// 配货规则
}
// 配货分拣 配货规则
export
interface
SortingRuleCondition
{
id
?:
number
ruleId
?:
number
conditionType
:
string
// 条件
operator
:
string
// 操作符
conditionValue
?:
string
|
number
|
string
[]
}
// 配货分拣 配货区/操作符/条件
export
interface
OperatorList
{
desc
:
string
code
:
string
used
?:
boolean
def
?:
boolean
}
src/types/api/podMakeOrder.ts
View file @
dc5cad3f
...
@@ -4,6 +4,9 @@ export interface PodMakeOrderData {
...
@@ -4,6 +4,9 @@ export interface PodMakeOrderData {
fromUser
?:
number
|
string
fromUser
?:
number
|
string
box
?:
number
box
?:
number
addDate
?:
string
addDate
?:
string
packingId
?:
number
|
string
factoryNo
?:
number
|
string
autoPrint
?:
boolean
}
}
export
interface
OrderData
{
export
interface
OrderData
{
...
...
src/utils/index.ts
View file @
dc5cad3f
...
@@ -56,3 +56,12 @@ export function isPermissionBtn(key: string) {
...
@@ -56,3 +56,12 @@ export function isPermissionBtn(key: string) {
if
(
!
permissionBtns
)
return
false
if
(
!
permissionBtns
)
return
false
return
permissionBtns
.
includes
(
key
)
return
permissionBtns
.
includes
(
key
)
}
}
export
function
downloadByUrl
(
url
:
string
,
filename
?:
string
)
{
const
a
=
document
.
createElement
(
'a'
)
a
.
href
=
url
a
.
download
=
filename
||
url
.
split
(
'/'
).
pop
()
||
'download'
document
.
body
.
appendChild
(
a
)
a
.
click
()
document
.
body
.
removeChild
(
a
)
}
src/views/order/allocationSortingRule/components/addDialog.vue
0 → 100644
View file @
dc5cad3f
This diff is collapsed.
Click to expand it.
src/views/order/allocationSortingRule/index.vue
0 → 100644
View file @
dc5cad3f
<
template
>
<div
class=
"page card h-100 flex-gap-10 overflow-hidden flex"
>
<div
class=
"search-form flex flex-column w-100 flex-1 overflow-hidden"
>
<el-form
:model=
"searchForm"
inline
>
<el-form-item
label=
"仓库"
>
<el-select
v-model=
"searchForm.warehouseId"
placeholder=
"请选择仓库"
style=
"width: 180px"
filterable
@
change=
"handleWarehouseChange"
>
<el-option
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<ElFormItem>
<ElButton
type=
"primary"
@
click=
"() => search()"
>
查询
</ElButton>
</ElFormItem>
</el-form>
<div
class=
"picking-sort-info flex flex-align-center"
>
<el-switch
v-model=
"isEnableSorting"
size=
"large"
class=
"mr-10"
:before-change=
"updateConfig"
/>
<div
class=
"text-xs"
>
配货分拣
</div>
<el-divider
direction=
"vertical"
/>
<div
v-if=
"!isEnableSorting"
class=
"info"
>
关闭时,直接使用配货打单功能配货
</div>
<div
v-else
class=
"info"
>
开启时,支持设置分拣规则,根据分拣规则分配配货区,使用配货分拣功能配货。
</div>
</div>
<div
v-if=
"isEnableSorting"
class=
"sorting-content mt-10 w-100"
>
<el-button
type=
"success"
@
click=
"addArea()"
>
新增
</el-button>
<div
v-loading=
"loading"
element-loading-text=
"加载中..."
class=
"table-container"
>
<TableView
:paginated-data=
"sortingList"
:columns=
"columns"
>
<template
#
autoPrint=
"
{ row }">
{{
row
.
autoPrint
?
'开启'
:
'关闭'
}}
</
template
>
<
template
#
operation=
"{ row }"
>
<el-button
type=
"primary"
link
@
click=
"addArea(row)"
>
编辑
</el-button>
<el-button
v-if=
"row.areaCode !== 'AREA_0'"
type=
"danger"
link
@
click=
"deleteArea(row.id)"
>
删除
</el-button>
<!--
<el-button
type=
"success"
link
@
click=
"viewLog(row.id)"
>
查看日志
</el-button>
-->
</
template
>
</TableView>
</div>
</div>
</div>
<AddAreaDialog
v-if=
"addAreaDialogVisible"
v-model=
"addAreaDialogVisible"
:is-edit=
"isEdit"
:is-disabled=
"isDisabled"
:edit-data=
"editData"
:warehouse-id=
"searchForm.warehouseId"
:warehouse-name=
"searchForm.warehouseName"
@
submit=
"getSortingRuleList"
/>
<el-dialog
v-model=
"logVisible"
title=
"操作日志"
width=
"1000px"
:close-on-click-modal=
"false"
>
<LogList
:log-list=
"logList"
/>
</el-dialog>
</div>
</template>
<
script
setup
lang=
"ts"
>
import
{
onMounted
,
ref
}
from
'vue'
import
{
loadWarehouseListApi
}
from
'@/api/common'
import
type
{
WarehouseListData
}
from
'@/types'
import
type
{
LogListData
,
SortingList
,
SortingRuleDetail
,
}
from
'@/types/api/order'
import
type
{
CustomColumn
}
from
'@/types/table'
import
{
getSortingRuleListApi
,
deleteAreaApi
,
getConfigApi
,
updateConfighApi
,
getAreaInfoApi
,
}
from
'@/api/order'
import
TableView
from
'@/components/TableView.vue'
import
LogList
from
'@/components/LogList.vue'
import
AddAreaDialog
from
'./components/addDialog.vue'
const
columns
:
CustomColumn
<
SortingList
>
[]
=
[
{
key
:
'sortNo'
,
prop
:
'sortNo'
,
label
:
'序号'
,
width
:
80
,
align
:
'center'
,
},
{
key
:
'conditionsText'
,
prop
:
'conditionsText'
,
label
:
'配货规则'
,
minWidth
:
250
,
align
:
'left'
,
},
{
key
:
'areaName'
,
prop
:
'areaName'
,
label
:
'配货区'
,
width
:
100
,
align
:
'center'
,
},
{
key
:
'areaDesc'
,
prop
:
'areaDesc'
,
label
:
'配货区说明'
,
minWidth
:
200
,
align
:
'left'
,
},
{
key
:
'autoPrint'
,
prop
:
'autoPrint'
,
label
:
'自动打单'
,
width
:
100
,
align
:
'center'
,
slot
:
'autoPrint'
,
},
{
key
:
'warehouseName'
,
prop
:
'warehouseName'
,
label
:
'仓库'
,
width
:
180
,
align
:
'center'
,
},
{
key
:
'operation'
,
label
:
'操作'
,
width
:
140
,
align
:
'center'
,
slot
:
'operation'
,
},
]
const
warehouseList
=
ref
<
WarehouseListData
[]
>
([])
// 仓库列表
const
sortingList
=
ref
<
SortingList
[]
>
([])
// 规则列表
const
isEnableSorting
=
ref
(
false
)
// 是否开启配货分拣
const
currentId
=
ref
(
0
)
// 当前操作id
const
isEdit
=
ref
(
false
)
// 是否编辑
const
isDisabled
=
ref
(
false
)
// 是否可编辑 (0号配货区禁止编辑)
const
editData
=
ref
<
SortingRuleDetail
>
()
const
addAreaDialogVisible
=
ref
(
false
)
const
logVisible
=
ref
(
false
)
const
logList
=
ref
<
LogListData
[]
>
([])
const
loading
=
ref
(
false
)
const
searchForm
=
ref
({
warehouseId
:
0
,
warehouseName
:
''
,
})
// 加载仓库列表
const
loadWarehouseList
=
async
()
=>
{
try
{
const
res
=
await
loadWarehouseListApi
()
if
(
res
.
code
!==
200
)
return
warehouseList
.
value
=
res
.
data
||
[]
// 默认选中默认仓库
searchForm
.
value
.
warehouseId
=
warehouseList
.
value
.
find
((
item
)
=>
item
.
defaulted
===
1
)?.
id
??
0
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
const
handleWarehouseChange
=
(
warehouseId
:
number
)
=>
{
searchForm
.
value
.
warehouseId
=
warehouseId
if
(
!
isEnableSorting
.
value
)
return
getSortingRuleList
()
}
const
search
=
()
=>
{
getSortingRuleList
()
}
// 获取功能开关
const
getFunctionSwitch
=
async
()
=>
{
const
res
=
await
getConfigApi
()
if
(
res
.
code
!==
200
)
return
isEnableSorting
.
value
=
res
.
data
.
enable
currentId
.
value
=
res
.
data
.
id
}
// 切换功能
const
updateConfig
=
async
()
=>
{
try
{
ElMessageBox
.
confirm
(
'是否确定切换功能?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(
async
()
=>
{
const
res
=
await
updateConfighApi
({
id
:
currentId
.
value
,
enable
:
!
isEnableSorting
.
value
,
})
if
(
res
.
code
!==
200
)
return
isEnableSorting
.
value
=
!
isEnableSorting
.
value
await
getSortingRuleList
()
})
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
// 查询列表
const
getSortingRuleList
=
async
()
=>
{
loading
.
value
=
true
const
res
=
await
getSortingRuleListApi
({
warehouseId
:
searchForm
.
value
.
warehouseId
,
})
if
(
res
.
code
!==
200
)
return
sortingList
.
value
=
res
.
data
.
records
loading
.
value
=
false
}
// 新增/编辑
const
addArea
=
async
(
row
?:
SortingList
)
=>
{
searchForm
.
value
.
warehouseName
=
warehouseList
.
value
.
find
((
item
)
=>
item
.
id
===
searchForm
.
value
.
warehouseId
)
?.
name
??
''
if
(
row
)
{
isEdit
.
value
=
true
isDisabled
.
value
=
row
.
areaCode
===
'AREA_0'
const
res
=
await
getAreaInfoApi
(
row
.
id
)
if
(
res
.
code
!==
200
)
return
editData
.
value
=
res
.
data
}
else
{
isDisabled
.
value
=
false
isEdit
.
value
=
false
editData
.
value
=
undefined
}
addAreaDialogVisible
.
value
=
true
}
// 删除配货区
const
deleteArea
=
async
(
id
:
number
)
=>
{
await
ElMessageBox
.
confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
})
.
then
(
async
()
=>
{
loading
.
value
=
true
const
res
=
await
deleteAreaApi
(
id
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'删除成功'
)
await
getSortingRuleList
()
})
.
finally
(()
=>
{
loading
.
value
=
false
})
}
// 查看日志
// const viewLog = async (id: number) => {
// try {
// const res = await getSortingLogApi(id)
// logList.value = res.data
// logVisible.value = true
// } catch (e) {
// console.error(e)
// }
// }
onMounted
(
async
()
=>
{
await
loadWarehouseList
()
await
getFunctionSwitch
()
await
getSortingRuleList
()
})
</
script
>
<
style
scoped
lang=
"scss"
>
.search-form
{
min-height
:
0
;
}
.picking-sort-info
{
font-size
:
14px
;
color
:
#555
;
font-weight
:
500
;
.info
{
font-size
:
12px
;
color
:
#999
;
}
}
.sorting-content
{
flex
:
1
;
min-height
:
0
;
overflow
:
hidden
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
flex-start
;
.table-container
{
width
:
100%
;
flex
:
1
;
min-height
:
0
;
overflow
:
hidden
;
margin-top
:
10px
;
}
}
</
style
>
src/views/order/factoryOrderNew/component/CardLayout.vue
View file @
dc5cad3f
...
@@ -532,6 +532,14 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
...
@@ -532,6 +532,14 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
.operation-number
{
.operation-number
{
font-size
:
12px
;
font-size
:
12px
;
cursor
:
pointer
;
cursor
:
pointer
;
background
:
rgba
(
255
,
255
,
255
,
0.75
);
padding
:
2px
6px
;
border-radius
:
4px
;
max-width
:
100%
;
display
:
inline-block
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
.quantity-badge
{
.quantity-badge
{
...
@@ -657,4 +665,25 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
...
@@ -657,4 +665,25 @@ defineExpose({ clearSelection, getSelectedIds, refresh })
.flex-row-gap6
{
.flex-row-gap6
{
gap
:
6px
;
gap
:
6px
;
}
}
@media
(
max-width
:
1920px
)
{
.card-grid
{
grid-template-columns
:
repeat
(
5
,
minmax
(
0
,
1
fr
));
}
}
@media
(
max-width
:
1750px
)
{
.card-grid
{
grid-template-columns
:
repeat
(
4
,
minmax
(
0
,
1
fr
));
}
.card-info-grid
{
grid-template-columns
:
1
fr
180px
;
}
}
@media
(
max-width
:
1550px
)
{
.card-grid
{
grid-template-columns
:
repeat
(
3
,
minmax
(
0
,
1
fr
));
}
.card-info-grid
{
grid-template-columns
:
1
fr
200px
;
}
}
</
style
>
</
style
>
src/views/order/factoryOrderNew/component/CreateOutboundDialog.vue
View file @
dc5cad3f
...
@@ -325,11 +325,11 @@ const addOtherCurrency = async () => {
...
@@ -325,11 +325,11 @@ const addOtherCurrency = async () => {
ElMessage
.
error
(
'请输入出库数量'
)
ElMessage
.
error
(
'请输入出库数量'
)
return
return
}
}
const
usableInventory
=
arr
[
i
].
usableInventory
||
0
//
const usableInventory = arr[i].usableInventory || 0
if
((
arr
[
i
].
outCount
as
number
)
>
usableInventory
)
{
//
if ((arr[i].outCount as number) > usableInventory) {
ElMessage
.
error
(
'出库数量不能大于可用库存数量'
)
//
ElMessage.error('出库数量不能大于可用库存数量')
return
//
return
}
//
}
if
(
!
arr
[
i
].
locationId
)
{
if
(
!
arr
[
i
].
locationId
)
{
ElMessage
.
error
(
'请选择库位'
)
ElMessage
.
error
(
'请选择库位'
)
return
return
...
...
src/views/order/factoryOrderNew/component/OrderInventoryDialog.vue
0 → 100644
View file @
dc5cad3f
<
template
>
<ElDialog
v-model=
"visible"
title=
"订单库存明细"
width=
"1500px"
:close-on-click-modal=
"false"
>
<div
class=
"inventory-dialog-content"
>
<div
class=
"search-bar"
>
<ElForm
:inline=
"true"
:model=
"filterForm"
size=
"default"
class=
"search-form"
>
<ElFormItem
label=
"仓库"
>
<ElSelect
v-model=
"filterForm.warehouseId"
placeholder=
"请选择仓库"
clearable
style=
"width: 150px"
>
<ElOption
v-for=
"item in warehouseList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</ElSelect>
</ElFormItem>
<ElFormItem
label=
"库存SKU"
>
<ElInput
v-model=
"filterForm.warehouseSku"
placeholder=
"请输入库存SKU"
clearable
style=
"width: 160px"
/>
</ElFormItem>
<ElFormItem
label=
"款号"
>
<ElInput
v-model=
"filterForm.productNo"
placeholder=
"请输入款号"
clearable
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"库存状况"
>
<ElSelect
v-model=
"filterForm.inventoryStatus"
placeholder=
"请选择库存状况"
clearable
style=
"width: 160px"
>
<ElOption
v-for=
"item in stockStatusOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</ElSelect>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"primary"
@
click=
"handleSearch"
>
查询
</ElButton>
<ElButton
type=
"success"
@
click=
"handleExport"
>
导出
</ElButton>
</ElFormItem>
</ElForm>
</div>
<div
v-loading=
"loading"
class=
"inventory-table"
>
<TableView
:paginated-data=
"data"
:columns=
"columns"
serial-numberable
selectionable
/>
</div>
<ElPagination
v-model:current-page=
"currentPage"
v-model:page-size=
"pageSize"
:page-sizes=
"[20, 50, 100, 200]"
background
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
style=
"margin: 10px auto 0"
@
size-change=
"onPageSizeChange"
@
current-change=
"onCurrentPageChange"
/>
</div>
</ElDialog>
</
template
>
<
script
setup
lang=
"tsx"
>
import
{
ElMessage
}
from
'element-plus'
import
type
{
WarehouseListData
}
from
'@/types'
import
type
{
FactoryOrderNewListData
,
OrderInventoryData
,
}
from
'@/types/api/factoryOrderNew'
import
TableView
from
'@/components/TableView.vue'
import
usePageList
from
'@/utils/hooks/usePageList'
import
{
getOrderInventoryListApi
,
exportOrderInventoryApi
,
}
from
'@/api/factoryOrderNew'
import
BigNumber
from
'bignumber.js'
const
props
=
defineProps
<
{
visible
:
boolean
selectedRows
:
FactoryOrderNewListData
[]
warehouseList
:
WarehouseListData
[]
}
>
()
const
stockStatusOptions
=
[
{
label
:
'缺货商品'
,
value
:
1
},
{
label
:
'不缺货商品'
,
value
:
2
},
{
label
:
'未入过库的商品'
,
value
:
3
},
]
const
emit
=
defineEmits
<
{
(
e
:
'update:visible'
,
value
:
boolean
):
void
}
>
()
const
visible
=
computed
({
get
()
{
return
props
.
visible
},
set
(
value
:
boolean
)
{
emit
(
'update:visible'
,
value
)
},
})
watch
(
visible
,
(
newVal
)
=>
{
if
(
newVal
)
{
filterForm
.
value
=
{
warehouseId
:
undefined
,
warehouseSku
:
''
,
productNo
:
''
,
inventoryStatus
:
undefined
,
}
refresh
()
}
})
const
filterForm
=
ref
({
warehouseId
:
undefined
as
number
|
undefined
,
warehouseSku
:
''
,
productNo
:
''
,
inventoryStatus
:
undefined
as
number
|
undefined
,
})
const
buildQueryParams
=
()
=>
({
orderIds
:
props
.
selectedRows
.
map
((
row
)
=>
row
.
id
),
warehouseId
:
filterForm
.
value
.
warehouseId
||
undefined
,
warehouseSku
:
filterForm
.
value
.
warehouseSku
||
undefined
,
productNo
:
filterForm
.
value
.
productNo
||
undefined
,
inventoryStatus
:
filterForm
.
value
.
inventoryStatus
||
undefined
,
})
const
{
loading
,
currentPage
,
pageSize
,
total
,
data
,
onCurrentPageChange
,
onPageSizeChange
,
refresh
,
}
=
usePageList
<
OrderInventoryData
>
({
initPageSize
:
20
,
initLoad
:
false
,
query
:
async
(
current
,
size
)
=>
{
const
res
=
await
getOrderInventoryListApi
(
buildQueryParams
(),
current
,
size
,
)
return
res
.
data
},
})
/** 可用数量 = 库存数量 - 占用数量 - 冻结数量 */
function
getAvailableQuantity
(
row
:
OrderInventoryData
):
number
{
return
new
BigNumber
(
row
.
inventory
??
0
)
.
minus
(
row
.
occupyInventory
??
0
)
.
minus
(
row
.
freezeInventory
??
0
)
.
toNumber
()
}
function
getShortageQuantity
(
row
:
OrderInventoryData
):
number
{
const
shortage
=
new
BigNumber
(
row
.
salesNum
??
0
)
.
minus
(
getAvailableQuantity
(
row
))
.
toNumber
()
return
Math
.
max
(
0
,
shortage
)
}
const
columns
=
[
{
label
:
'图片'
,
width
:
70
,
align
:
'center'
,
render
:
(
row
:
OrderInventoryData
)
=>
(
<
el
-
image
src
=
{
row
.
variantImage
??
''
}
style
=
{{
width
:
'40px'
,
height
:
'40px'
}}
preview
-
src
-
list
=
{
row
.
variantImage
?
[
row
.
variantImage
]
:
[]}
preview
-
teleported
fit
=
"cover"
/>
),
},
{
prop
:
'warehouseName'
,
label
:
'仓库名称'
,
minWidth
:
120
,
},
{
prop
:
'locationCode'
,
label
:
'库位'
,
width
:
100
,
align
:
'center'
,
},
{
prop
:
'warehouseSku'
,
label
:
'库存SKU'
,
minWidth
:
180
,
align
:
'center'
,
},
{
prop
:
'productNo'
,
label
:
'款号'
,
width
:
100
,
align
:
'center'
,
},
{
prop
:
'skuName'
,
label
:
'商品名称'
,
minWidth
:
140
,
showOverflowTooltip
:
true
,
},
{
label
:
'缺货数量'
,
width
:
100
,
align
:
'right'
,
render
:
(
row
:
OrderInventoryData
)
=>
{
const
v
=
getShortageQuantity
(
row
)
if
(
v
>
0
)
{
return
<
span
style
=
"color: #f56c6c; font-weight: bold"
>
{
v
}
<
/span
>
}
return
<
span
>
{
v
}
<
/span
>
},
},
{
prop
:
'salesNum'
,
label
:
'需求数量'
,
width
:
100
,
align
:
'right'
,
render
:
(
row
:
OrderInventoryData
)
=>
{
return
(
<
span
style
=
{{
color
:
!
row
.
locationCode
?
'#E6A23C'
:
''
,
fontWeight
:
!
row
.
locationCode
?
'bold'
:
''
,
}}
>
{
row
.
salesNum
||
0
}
<
/span
>
)
},
},
{
prop
:
'usableQuantity'
,
label
:
'可用数量'
,
width
:
100
,
align
:
'right'
,
render
:
(
row
:
OrderInventoryData
)
=>
{
return
<
span
>
{
getAvailableQuantity
(
row
)}
<
/span
>
},
},
{
prop
:
'inventory'
,
label
:
'库存数量'
,
width
:
100
,
align
:
'right'
,
},
{
prop
:
'occupyInventory'
,
label
:
'占用数量'
,
width
:
100
,
align
:
'right'
,
render
:
(
row
:
OrderInventoryData
)
=>
{
return
<
span
>
{
row
.
occupyInventory
||
0
}
<
/span
>
},
},
{
prop
:
'freezeInventory'
,
label
:
'冻结数量'
,
width
:
100
,
align
:
'right'
,
},
]
const
handleSearch
=
()
=>
{
refresh
()
}
const
handleExport
=
async
()
=>
{
try
{
await
exportOrderInventoryApi
(
buildQueryParams
())
ElMessage
.
success
(
'请求成功,请稍后到右上角[我的下载]中查看'
)
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.inventory-dialog-content
{
display
:
flex
;
flex-direction
:
column
;
height
:
68vh
;
}
.search-bar
{
flex-shrink
:
0
;
padding-bottom
:
10px
;
}
.search-form
{
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
gap
:
0
;
:deep(.el-form-item)
{
margin-right
:
10px
;
margin-bottom
:
10px
;
}
}
.inventory-table
{
flex
:
1
;
overflow
:
hidden
;
}
</
style
>
src/views/order/factoryOrderNew/index.vue
View file @
dc5cad3f
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
>
>
<
ElInput
<
ElInput
v
-
model
.
trim
=
"searchForm.operationNo"
v
-
model
.
trim
=
"searchForm.operationNo"
placeholder
=
"
操作单号
"
placeholder
=
"
多个操作单号,分隔
"
clearable
clearable
style
=
"width: 140px"
style
=
"width: 140px"
/>
/>
...
@@ -512,11 +512,6 @@
...
@@ -512,11 +512,6 @@
转至待排单
转至待排单
<
/ElButton
>
<
/ElButton
>
<
/span
>
<
/span
>
<!--
<
span
v
-
if
=
"status === 'PENDING_RECEIVE'"
class
=
"item"
>
<
ElButton
type
=
"warning"
@
click
=
"handleTransferOldFlow"
>
转旧流程
<
/ElButto
n
>
<
/span> --
>
<
span
v
-
if
=
"status === 'PENDING_SCHEDULE'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'PENDING_SCHEDULE'"
class
=
"item"
>
<
ElButton
type
=
"primary"
@
click
=
"handleArrange"
>
排单
<
/ElButton
>
<
ElButton
type
=
"primary"
@
click
=
"handleArrange"
>
排单
<
/ElButton
>
<
/span
>
<
/span
>
...
@@ -580,8 +575,19 @@
...
@@ -580,8 +575,19 @@
>
补胚失败
<
/ElButto
n
>
补胚失败
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'PENDING_PACKING'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION' && isEnableSorting"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"handleSeedingWall"
<
ElButton
type
=
"primary"
@
click
=
"handleSeedingWall('sort')"
>
配货分拣
<
/ElButto
n
>
<
/span
>
<
span
v
-
if
=
"
status === 'PENDING_PACKING' ||
(status === 'IN_PRODUCTION' && !isEnableSorting)
"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"handleSeedingWall('print')"
>
配货打单
<
/ElButto
n
>
配货打单
<
/ElButto
n
>
>
<
/span
>
<
/span
>
...
@@ -605,7 +611,7 @@
...
@@ -605,7 +611,7 @@
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
<
span
v
-
if
=
"status === 'IN_PRODUCTION'"
class
=
"item"
>
<
ElButton
type
=
"
success
"
@
click
=
"handleProductionComplete"
<
ElButton
type
=
"
warning
"
@
click
=
"handleProductionComplete"
>
生产完成
<
/ElButto
n
>
生产完成
<
/ElButto
n
>
>
<
/span
>
<
/span
>
...
@@ -705,6 +711,17 @@
...
@@ -705,6 +711,17 @@
>
刷新商品信息
<
/ElButto
n
>
刷新商品信息
<
/ElButto
n
>
>
<
/span
>
<
/span
>
<
span
v
-
if
=
"
status === 'PENDING_RECEIVE' &&
pendingAcceptSubTab === 'ACCEPT_FAIL_OUT_OF_STOCK'
"
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"handleGetOrderInventoryDetail"
>
订单库存明细
<
/ElButto
n
>
<
/span
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"status === 'SUSPEND'"
class
=
"status-subtabs"
>
<
div
v
-
if
=
"status === 'SUSPEND'"
class
=
"status-subtabs"
>
<
div
<
div
...
@@ -1039,9 +1056,15 @@
...
@@ -1039,9 +1056,15 @@
v
-
model
=
"podOrderVisible"
v
-
model
=
"podOrderVisible"
:
print
-
order
=
"printOrder"
:
print
-
order
=
"printOrder"
:
warehouse
-
list
=
"warehouseList"
:
warehouse
-
list
=
"warehouseList"
:
title
=
"wallType === 'print' ? '配货打单' : '配货分拣'"
:
is
-
new
-
order
=
"true"
:
is
-
new
-
order
=
"true"
ws
-
open
-
code
=
"STARTORDERNEWPOD"
:
wall
-
type
=
"wallType"
ws
-
close
-
code
=
"ENDORDERNEWPOD"
:
ws
-
open
-
code
=
"
wallType === 'print' ? 'STARTORDERNEWPOD' : 'STARTORDERNEWPODTOP'
"
:
ws
-
close
-
code
=
"
wallType === 'print' ? 'ENDORDERNEWPOD' : 'ENDORDERNEWPODTOP'
"
init
-
url
=
"factory/podOrderPacking/local/getPodBoxOrderDetails"
init
-
url
=
"factory/podOrderPacking/local/getPodBoxOrderDetails"
@
set
-
printer
=
"handlePrinterChange"
@
set
-
printer
=
"handlePrinterChange"
@
set
-
warehouse
-
id
=
"handleWarehouseIdChange"
@
set
-
warehouse
-
id
=
"handleWarehouseIdChange"
...
@@ -1150,6 +1173,11 @@
...
@@ -1150,6 +1173,11 @@
<
/span
>
<
/span
>
<
/template
>
<
/template
>
<
/ElDialog
>
<
/ElDialog
>
<
OrderInventoryDetailDialog
v
-
model
:
visible
=
"orderInventoryDetailVisible"
:
warehouse
-
list
=
"warehouseList"
:
selected
-
rows
=
"selectedRows"
/>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -1209,6 +1237,7 @@ import {
...
@@ -1209,6 +1237,7 @@ import {
interceptUpdateApi
,
interceptUpdateApi
,
interceptSuccessApi
,
interceptSuccessApi
,
}
from
'@/api/factoryOrderNew'
}
from
'@/api/factoryOrderNew'
import
{
getConfigApi
}
from
'@/api/order'
import
{
getLogisticsWayApi
}
from
'@/api/podUsOrder'
import
{
getLogisticsWayApi
}
from
'@/api/podUsOrder'
import
BigNumber
from
'bignumber.js'
import
BigNumber
from
'bignumber.js'
import
{
filePath
}
from
'@/api/axios'
import
{
filePath
}
from
'@/api/axios'
...
@@ -1243,7 +1272,9 @@ import { useOrderSearchForm } from './hooks/useOrderSearchForm'
...
@@ -1243,7 +1272,9 @@ import { useOrderSearchForm } from './hooks/useOrderSearchForm'
import
{
useOrderStatusTree
}
from
'./hooks/useOrderStatusTree'
import
{
useOrderStatusTree
}
from
'./hooks/useOrderStatusTree'
import
{
useOrderListAndDetail
}
from
'./hooks/useOrderListAndDetail'
import
{
useOrderListAndDetail
}
from
'./hooks/useOrderListAndDetail'
import
{
useOrderBatchActions
}
from
'./hooks/useOrderBatchActions'
import
{
useOrderBatchActions
}
from
'./hooks/useOrderBatchActions'
import
{
ElTag
}
from
'element-plus'
import
{
ElButton
,
ElTag
}
from
'element-plus'
import
OrderInventoryDetailDialog
from
'./component/OrderInventoryDialog.vue'
import
{
downloadByUrl
}
from
'@/utils/index.ts'
const
resultInfo
=
ref
<
ResultInfoDataItem
[]
>
([])
const
resultInfo
=
ref
<
ResultInfoDataItem
[]
>
([])
const
resultRefs
=
ref
()
const
resultRefs
=
ref
()
...
@@ -1252,7 +1283,7 @@ const statusSidebarCollapsed = ref(false)
...
@@ -1252,7 +1283,7 @@ const statusSidebarCollapsed = ref(false)
const
toggleStatusSidebar
=
()
=>
{
const
toggleStatusSidebar
=
()
=>
{
statusSidebarCollapsed
.
value
=
!
statusSidebarCollapsed
.
value
statusSidebarCollapsed
.
value
=
!
statusSidebarCollapsed
.
value
}
}
const
orderInventoryDetailVisible
=
ref
(
false
)
const
batchManageRef
=
ref
<
InstanceType
<
typeof
BatchManageTable
>>
()
const
batchManageRef
=
ref
<
InstanceType
<
typeof
BatchManageTable
>>
()
const
waitingRestockRef
=
ref
<
InstanceType
<
typeof
WaitingRestockTable
>>
()
const
waitingRestockRef
=
ref
<
InstanceType
<
typeof
WaitingRestockTable
>>
()
const
cardLayoutRef
=
ref
<
InstanceType
<
typeof
CardLayout
>>
()
const
cardLayoutRef
=
ref
<
InstanceType
<
typeof
CardLayout
>>
()
...
@@ -2521,8 +2552,16 @@ const handlePrinterChange = (value: string) => {
...
@@ -2521,8 +2552,16 @@ const handlePrinterChange = (value: string) => {
sheetPrinter
.
value
=
value
sheetPrinter
.
value
=
value
localStorage
.
setItem
(
'sheetPrinter'
,
JSON
.
stringify
(
value
))
localStorage
.
setItem
(
'sheetPrinter'
,
JSON
.
stringify
(
value
))
}
}
const
handleWarehouseIdChange
=
(
value
:
string
)
=>
{
const
handleWarehouseIdChange
=
(
localStorage
.
setItem
(
'localNewWarehouseId'
,
JSON
.
stringify
(
value
))
value
:
|
string
|
{
warehouseId
:
string
|
number
;
sortingAreaId
:
string
|
number
}
,
)
=>
{
if
(
wallType
.
value
===
'print'
)
{
localStorage
.
setItem
(
'localNewWarehouseId'
,
JSON
.
stringify
(
value
))
}
else
if
(
wallType
.
value
===
'sort'
)
{
localStorage
.
setItem
(
'localSortingAreaId'
,
JSON
.
stringify
(
value
))
}
}
}
const
mapOrderParamListToSubmitItems
=
(
const
mapOrderParamListToSubmitItems
=
(
orderParamList
:
{
id
:
number
;
dataVersion
?:
number
}
[],
orderParamList
:
{
id
:
number
;
dataVersion
?:
number
}
[],
...
@@ -2543,7 +2582,9 @@ const getPrintLogisticLabelFactory = (id?: number) =>
...
@@ -2543,7 +2582,9 @@ const getPrintLogisticLabelFactory = (id?: number) =>
getfaceSimplexFileApi
([
id
??
0
])
getfaceSimplexFileApi
([
id
??
0
])
const
{
getCLodop
}
=
useLodop
()
const
{
getCLodop
}
=
useLodop
()
const
handleSeedingWall
=
()
=>
{
const
wallType
=
ref
<
'print'
|
'sort'
>
(
'print'
)
const
handleSeedingWall
=
(
type
:
'print'
|
'sort'
)
=>
{
wallType
.
value
=
type
const
lodop
=
getCLodop
(
null
,
null
)
const
lodop
=
getCLodop
(
null
,
null
)
if
(
!
lodop
)
return
if
(
!
lodop
)
return
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
sheetPrinter
.
value
=
lodop
.
GET_PRINTER_NAME
(
0
)
...
@@ -2760,7 +2801,10 @@ const handleDownloadMaterial = async () => {
...
@@ -2760,7 +2801,10 @@ const handleDownloadMaterial = async () => {
?
await
downloadMaterialApi
(
ids
as
number
[])
?
await
downloadMaterialApi
(
ids
as
number
[])
:
await
downloadOperationMaterialApi
(
ids
as
number
[])
:
await
downloadOperationMaterialApi
(
ids
as
number
[])
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
downloadByUrl
(
filePath
+
res
.
message
,
res
.
message
?.
split
(
'/'
).
pop
()
||
'download'
,
)
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
finally
{
}
finally
{
...
@@ -2776,7 +2820,10 @@ const handleDownloadMaterialByProduct = async (row: ProductListData) => {
...
@@ -2776,7 +2820,10 @@ const handleDownloadMaterialByProduct = async (row: ProductListData) => {
try
{
try
{
const
res
=
await
downloadOperationMaterialApi
([
row
.
id
])
const
res
=
await
downloadOperationMaterialApi
([
row
.
id
])
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
downloadByUrl
(
filePath
+
res
.
message
,
res
.
message
?.
split
(
'/'
).
pop
()
||
'download'
,
)
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
finally
{
}
finally
{
...
@@ -3116,12 +3163,23 @@ const handleInterceptionFail = async (row?: FactoryOrderNewListData) => {
...
@@ -3116,12 +3163,23 @@ const handleInterceptionFail = async (row?: FactoryOrderNewListData) => {
}
,
}
,
}
)
}
)
}
}
const
handleGetOrderInventoryDetail
=
async
()
=>
{
orderInventoryDetailVisible
.
value
=
true
}
const
isEnableSorting
=
ref
(
false
)
// 获取功能开关
const
getFunctionSwitch
=
async
()
=>
{
const
res
=
await
getConfigApi
()
if
(
res
.
code
!==
200
)
return
isEnableSorting
.
value
=
res
.
data
.
enable
}
onMounted
(()
=>
{
onMounted
(()
=>
{
loadStatusTreeCounts
()
loadStatusTreeCounts
()
loadAllDictionaries
()
loadAllDictionaries
()
getLogisticsWay
()
getLogisticsWay
()
getReceiverCountryList
()
getReceiverCountryList
()
loadWarehouseList
()
loadWarehouseList
()
getFunctionSwitch
()
void
treeRef
.
value
void
treeRef
.
value
void
tableRef
.
value
void
tableRef
.
value
if
(
status
.
value
===
'PENDING_RECEIVE'
)
{
if
(
status
.
value
===
'PENDING_RECEIVE'
)
{
...
...
src/views/order/podUs/PodMakeOrder.vue
View file @
dc5cad3f
This diff is collapsed.
Click to expand it.
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