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
95a49edc
Commit
95a49edc
authored
Jun 17, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into linjinhong
parents
b3d0599d
7190baff
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
571 additions
and
279 deletions
+571
-279
components.d.ts
+1
-1
src/api/axios.ts
+1
-1
src/api/podUsOrder.ts
+77
-0
src/components/RightClickMenu.vue
+48
-38
src/components/TableView.vue
+5
-17
src/types/api/podUsOrder.ts
+1
-0
src/views/order/index.vue
+40
-34
src/views/order/pod/index.vue
+69
-22
src/views/order/pod/rightMenu.vue
+0
-110
src/views/order/podUs/components/updateAddress.vue
+100
-0
src/views/order/podUs/index.vue
+185
-36
src/views/warehouse/receiptDoc.vue
+44
-20
No files found.
components.d.ts
View file @
95a49edc
...
...
@@ -59,13 +59,13 @@ declare module 'vue' {
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
NavMenu
:
typeof
import
(
'./src/components/NavMenu.vue'
)[
'default'
]
RenderColumn
:
typeof
import
(
'./src/components/RenderColumn.vue'
)[
'default'
]
RightClickMenu
:
typeof
import
(
'./src/components/RightClickMenu.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
Select
:
typeof
import
(
'./src/components/Form/Select.vue'
)[
'default'
]
ShipmentOrderDetail
:
typeof
import
(
'./src/components/ShipmentOrderDetail.vue'
)[
'default'
]
SplitDiv
:
typeof
import
(
'./src/components/splitDiv/splitDiv.vue'
)[
'default'
]
'Switch '
:
typeof
import
(
'./src/components/Form/Switch .vue'
)[
'default'
]
TableRightClickMenu
:
typeof
import
(
'./src/components/TableRightClickMenu.vue'
)[
'default'
]
TableView
:
typeof
import
(
'./src/components/TableView.vue'
)[
'default'
]
UploadExcel
:
typeof
import
(
'./src/components/UploadExcel.vue'
)[
'default'
]
UploadImage
:
typeof
import
(
'./src/components/UploadImage.vue'
)[
'default'
]
...
...
src/api/axios.ts
View file @
95a49edc
...
...
@@ -4,7 +4,7 @@ import { showError } from '@/utils/ui.ts'
const
axios
=
Axios
.
create
({
baseURL
:
import
.
meta
.
env
.
VITE_API_BASE
,
timeout
:
30000
,
timeout
:
30000
0
,
//凯哥让改的超时时间
})
const
TOKEN_KEY
=
'token'
...
...
src/api/podUsOrder.ts
View file @
95a49edc
...
...
@@ -10,6 +10,20 @@ import {
}
from
'@/types/api/podUsOrder'
import
axios
from
'./axios'
import
{
PodMakeOrderData
}
from
'@/types/api/podMakeOrder'
export
interface
AddressInfo
{
id
?:
string
receiverName
:
string
,
receiverPhone
:
string
,
receiverCountry
:
string
,
receiverProvince
:
string
,
receiverCity
:
string
,
receiverDistrict
:
string
,
receiverAddress1
:
string
,
receiverAddress2
:
string
,
receiverPostCode
:
string
,
}
export
interface
LogisticsData
{
logisticsWayName
:
string
// 物流名称
warehouseName
:
string
// 发货仓库
...
...
@@ -18,11 +32,13 @@ export interface LogisticsData {
partition
:
string
// 所在分区
logisticsWayId
?:
number
|
null
}
export
function
getOrderTabData
()
{
return
axios
.
get
<
never
,
BaseRespData
<
Tab
[]
>>
(
'/factory/podJomallOrderUs/findStateGroupList'
,
)
}
export
function
getOrderList
(
params
:
SearchForm
,
currentPage
:
number
,
...
...
@@ -37,12 +53,14 @@ export function getOrderList(
},
)
}
export
function
handleExceptionOrderApi
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/processExceptionOrders'
,
orderIds
,
)
}
export
function
getCardOrderList
(
params
:
SearchForm
,
currentPage
:
number
,
...
...
@@ -57,6 +75,7 @@ export function getCardOrderList(
},
)
}
export
function
confirmOrderApi
(
data
:
number
[],
productionClient
:
string
,
...
...
@@ -73,11 +92,13 @@ export function confirmOrderApi(
},
)
}
export
function
getProductionClientApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
ProductionClient
[]
>>
(
'factory/podJomallOrderUs/getProductionClientList'
,
)
}
export
function
updateExceptionOrderApi
(
data
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/updateExceptionOrders'
,
...
...
@@ -86,6 +107,15 @@ export function updateExceptionOrderApi(data: number[]) {
},
)
}
// 同步收货地址
export
function
syncReceiverAddress
(
data
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/syncReceiverAddress'
,
data
,
)
}
export
function
changeExceptionOrderApi
(
url
:
string
,
ids
:
number
[],
...
...
@@ -98,6 +128,7 @@ export function changeExceptionOrderApi(
exceptionReason
:
value
,
})
}
export
function
cancelOrderApi
(
ids
:
number
[],
value
:
string
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/cancelOrders'
,
...
...
@@ -107,11 +138,13 @@ export function cancelOrderApi(ids: number[], value: string) {
},
)
}
export
function
getOperationLogApi
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
LogListData
[]
>>
(
`factory/podJomallOrderUsLog/getPodJomallOrderUsLog?id=
${
id
}
`
,
)
}
export
function
getSubOrderBySubOrderNumber
(
factorySubOrderNumber
:
string
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ProductList
>>
(
'factory/podJomallOrderProductUs/getProductUsByFactorySubOrderNumber'
,
...
...
@@ -122,12 +155,14 @@ export function getSubOrderBySubOrderNumber(factorySubOrderNumber: string) {
},
)
}
export
function
downloadMaterialApi
(
id
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderProductUs/downloadDesignImages'
,
id
,
)
}
export
function
productionQueryApi
(
id
:
number
,
podJomallOrderUsId
:
number
)
{
return
axios
.
post
<
never
,
BasePaginationData
<
never
>>
(
'factory/podJomallOrderProductUs/completeDelivery'
,
...
...
@@ -137,12 +172,14 @@ export function productionQueryApi(id: number, podJomallOrderUsId: number) {
},
)
}
export
function
printProductionOrderApi
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/printProducePdf'
,
orderIds
,
)
}
export
function
printPrintOrderApi
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/printPickPdf'
,
...
...
@@ -151,6 +188,7 @@ export function printPrintOrderApi(orderIds: number[]) {
},
)
}
export
function
printPickingOrderApi
(
orderIds
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
string
>>
(
'factory/podJomallOrderUs/pickingComplete'
,
...
...
@@ -159,11 +197,13 @@ export function printPickingOrderApi(orderIds: number[]) {
},
)
}
export
function
stockOutCheckApi
(
orderIds
:
number
[])
{
return
axios
.
get
<
never
,
BaseRespData
<
number
[]
>>
(
`factory/podJomallOrderUs/replenishVerify?ids=
${
orderIds
.
join
(
','
)}
`
,
)
}
export
function
toBePickingApi
(
orderIds
:
number
[])
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/updateStockOutOrderToPicking?ids=
${
orderIds
.
join
(
...
...
@@ -171,11 +211,13 @@ export function toBePickingApi(orderIds: number[]) {
)}
`
,
)
}
export
function
getOrderDetailById
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
ProductList
>>
(
`factory/podJomallOrderProductUs/getProductUsById?id=
${
id
}
`
,
)
}
export
function
getPackingDataApi
(
code
:
string
,
factoryNo
:
number
,
...
...
@@ -194,6 +236,7 @@ export function getPackingDataApi(
},
)
}
export
function
getPodBoxListApi
(
factoryNo
:
number
|
string
,
warehouseId
:
number
|
string
,
...
...
@@ -218,6 +261,7 @@ export function submitInspectionApi(
},
)
}
export
function
clearBoxApi
(
factoryNo
:
number
,
box
:
number
|
null
,
...
...
@@ -230,11 +274,13 @@ export function clearBoxApi(
},
)
}
export
function
clearAllBoxApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/delPodBoxOrderDetails'
,
)
}
export
function
updateRemarkApi
(
id
:
number
,
content
:
string
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/addRemark'
,
...
...
@@ -242,23 +288,40 @@ export function updateRemarkApi(id: number, content: string) {
)
}
export
function
refreshAddressApi
(
idList
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/syncReceiverAddress'
,
idList
,
)
}
export
function
updateAddressApi
(
data
:
PodUsOrderListData
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/updateReceiverAddress'
,
data
,
)
}
export
function
getLogisticsCalculation
(
id
:
number
)
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/getLogisticsCalculation'
,
{
params
:
{
id
}
},
)
}
export
function
loadWarehouseListApi
()
{
return
axios
.
get
<
never
,
BaseRespData
<
WarehouseListData
[]
>>
(
'factoryWarehouseInfo/getAll'
,
)
}
export
function
refreshMaterialApi
(
orderIds
:
string
)
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderProductUs/refreshDesignImages '
,
{
orderIds
},
)
}
// 获取跟踪号
export
function
getTrackingNumberApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
...
...
@@ -266,6 +329,7 @@ export function getTrackingNumberApi(orderIds: (string | number)[]) {
orderIds
,
)
}
// 获取打印面单
export
function
getfaceSimplexFileApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
...
...
@@ -273,6 +337,7 @@ export function getfaceSimplexFileApi(orderIds: (string | number)[]) {
orderIds
,
)
}
// 取消物流订单
export
function
cancelLogisticsOrderApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
...
...
@@ -280,6 +345,7 @@ export function cancelLogisticsOrderApi(orderIds: (string | number)[]) {
orderIds
,
)
}
// 更改物流
export
function
changeLogisticsApi
(
params
:
{
updateByIdParam
:
{
...
...
@@ -293,6 +359,7 @@ export function changeLogisticsApi(params: {
params
,
)
}
// 创建物流
export
function
createLogisticsOrderApi
(
params
:
{
updateByIdParam
:
{
...
...
@@ -306,6 +373,15 @@ export function createLogisticsOrderApi(params: {
params
,
)
}
// 更改物流
export
function
composingDesignImages
(
data
:
number
[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderUs/composingDesignImages'
,
data
,
)
}
// 转至待拣胚
export
function
updateLogisticsToPickingApi
(
params
:
{
ids
:
string
})
{
return
axios
.
get
<
never
,
BaseRespData
<
never
>>
(
...
...
@@ -315,6 +391,7 @@ export function updateLogisticsToPickingApi(params: { ids: string }) {
},
)
}
//创建物流订单
export
function
createLogisticsOrdersApi
(
orderIds
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
...
...
src/components/
Table
RightClickMenu.vue
→
src/components/RightClickMenu.vue
View file @
95a49edc
...
...
@@ -4,48 +4,54 @@
class=
"right-click-menu"
:style=
"
{ left: position.x + 'px', top: position.y + 'px' }"
>
<div
class=
"menu-item"
@
click=
"handleSelectAll"
>
全选
</div>
<div
class=
"menu-item"
@
click=
"handleUnselectAll"
>
取消全选
</div>
<div
class=
"menu-item"
@
click=
"onChangeCopy('shop-numbers')"
>
<div
class=
"menu-item"
@
click=
"onChangeCopy('select-all')"
>
全部选择
</div>
<div
class=
"menu-item"
@
click=
"onChangeCopy('cancel-select')"
>
取消选择
</div>
<div
v-if=
"showCopySubShopNumber"
class=
"menu-item"
@
click=
"onChangeCopy('copy_code')"
>
复制生产单号
</div>
<div
v-if=
"showCopyShopNumber"
class=
"menu-item"
@
click=
"onChangeCopy('copy_shopNumber')"
>
复制店铺单号
</div>
<div
v-if=
"showCopyCount"
class=
"menu-item"
@
click=
"onChangeCopy('count')"
>
统计数量
</div>
<slot></slot>
</div>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
defineExpose
,
onMounted
,
onUnmounted
}
from
'vue'
import
type
{
TableInstance
}
from
'element-plus'
const
visible
=
ref
(
false
)
const
position
=
ref
({
x
:
0
,
y
:
0
})
const
tableRef
=
ref
<
TableInstance
>
()
const
emit
=
defineEmits
([
'onChange'
])
const
setPosition
=
({
x
,
y
,
el
,
}:
{
x
:
number
y
:
number
el
:
TableInstance
})
=>
{
position
.
value
=
{
x
,
y
}
visible
.
value
=
true
tableRef
.
value
=
el
}
const
handleSelectAll
=
()
=>
{
if
(
tableRef
.
value
)
{
tableRef
.
value
.
toggleAllSelection
()
}
visible
.
value
=
false
}
defineProps
({
showCopyShopNumber
:
{
type
:
Boolean
,
default
:
true
,
},
showCopyCount
:
{
type
:
Boolean
,
default
:
true
,
},
showCopySubShopNumber
:
{
type
:
Boolean
,
default
:
true
,
},
})
const
handleUnselectAll
=
()
=>
{
if
(
tableRef
.
value
)
{
tableRef
.
value
.
clearSelection
()
}
visible
.
value
=
false
const
setPosition
=
({
x
,
y
}:
{
x
:
number
;
y
:
number
})
=>
{
position
.
value
=
{
x
,
y
}
visible
.
value
=
true
}
const
onChangeCopy
=
(
value
:
string
)
=>
{
...
...
@@ -74,7 +80,7 @@ defineExpose({
})
</
script
>
<
style
scoped
>
<
style
scoped
lang=
"scss"
>
.right-click-menu
{
position
:
fixed
;
background
:
white
;
...
...
@@ -84,15 +90,19 @@ defineExpose({
z-index
:
3000
;
}
.menu-item
{
padding
:
8px
16px
;
cursor
:
pointer
;
font-size
:
14px
;
color
:
#606266
;
.right-click-menu
{
:deep(.menu-item)
{
padding
:
8px
16px
;
cursor
:
pointer
;
font-size
:
14px
;
color
:
#606266
;
}
}
.menu-item
:hover
{
background-color
:
#f5f7fa
;
color
:
#409eff
;
.right-click-menu
{
:deep(.menu-item):hover
{
background-color
:
#f5f7fa
;
color
:
#409eff
;
}
}
</
style
>
src/components/TableView.vue
View file @
95a49edc
...
...
@@ -8,7 +8,6 @@
v-bind=
"attrs"
header-align=
"center"
height=
"100%"
@
contextmenu
.
prevent=
"handleContextMenu"
>
<ElTableColumn
v-if=
"selectionable"
...
...
@@ -58,19 +57,16 @@
</RenderColumn>
</template>
</ElTable>
<RightClickMenu
ref=
"rightMenuRef"
@
on-change=
"onChange"
/>
</div>
</template>
<
script
setup
lang=
"tsx"
generic=
"T"
>
import
{
type
Slot
,
useAttrs
,
useSlots
,
type
PropType
,
shallowRef
}
from
'vue'
import
type
{
CustomColumn
}
from
'@/types/table'
import
RenderColumn
from
'./RenderColumn.vue'
import
RightClickMenu
from
'./TableRightClickMenu.vue'
import
{
ElTable
}
from
'element-plus'
import
type
{
TableInstance
}
from
'element-plus'
const
tableRef
=
shallowRef
<
TableInstance
>
()
const
rightMenuRef
=
shallowRef
<
InstanceType
<
typeof
RightClickMenu
>>
()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
defineProps
({
...
...
@@ -98,19 +94,7 @@ defineProps({
const
attrs
=
useAttrs
()
const
slots
=
useSlots
()
as
Record
<
string
,
Slot
>
const
emit
=
defineEmits
([
'onChange'
])
const
handleContextMenu
=
(
e
:
MouseEvent
)
=>
{
if
(
rightMenuRef
.
value
&&
tableRef
.
value
)
{
rightMenuRef
.
value
.
setPosition
({
x
:
e
.
clientX
,
y
:
e
.
clientY
,
el
:
tableRef
.
value
,
})
}
}
const
onChange
=
(
type
:
string
)
=>
{
emit
(
'onChange'
,
type
)
}
const
setCurrentRow
=
(
row
:
T
)
=>
{
tableRef
.
value
?.
setCurrentRow
(
row
)
}
...
...
@@ -122,12 +106,16 @@ const toggleRowSelection = (row: T, selected: boolean = true) => {
const
clearSelection
=
()
=>
{
tableRef
.
value
?.
clearSelection
()
}
const
toggleAllSelection
=
()
=>
{
tableRef
.
value
?.
toggleAllSelection
()
}
defineExpose
({
tableRef
,
setCurrentRow
,
toggleRowSelection
,
clearSelection
,
toggleAllSelection
,
})
</
script
>
...
...
src/types/api/podUsOrder.ts
View file @
95a49edc
...
...
@@ -6,6 +6,7 @@ export interface Tab {
export
interface
SearchForm
{
timeType
:
number
|
null
shopNumber
:
string
shipmentType
:
string
userMark
:
string
logisticsTracking
:
string
baseSku
:
string
...
...
src/views/order/index.vue
View file @
95a49edc
...
...
@@ -976,11 +976,12 @@
>
<
OrderDetail
:
order
-
detail
-
data
=
"orderDetailData"
/>
<
/ElDrawer
>
<
RightMenu
<
Right
Click
Menu
ref
=
"rightMenuRef"
:
show
-
copy
-
shop
-
number
=
"true"
:
show
-
copy
-
count
=
"false"
:
show
-
copy
-
sub
-
shop
-
number
=
"
statusCode !== 6
"
@
change
=
"on
Change"
:
show
-
copy
-
sub
-
shop
-
number
=
"
true
"
@
on
-
change
=
"right
Change"
/>
<
/template
>
<
script
setup
lang
=
"ts"
>
...
...
@@ -1037,7 +1038,7 @@ import OrderDetail from './OrderDetail.vue'
import
useShipment
from
'./hook/useShipment'
import
useQuarantine
from
'./hook/useQuarantine'
import
Quarantine
from
'./Quarantine.vue'
import
Right
Menu
from
'./pod/right
Menu.vue'
import
Right
ClickMenu
from
'@/components/RightClick
Menu.vue'
const
[
searchForm
]
=
useValue
<
SearchForm
>
({
mainSku
:
''
,
...
...
@@ -1670,52 +1671,57 @@ const handleContextMenu = (e: MouseEvent) => {
}
const
tableQaRef
=
ref
()
const
tableRef
=
ref
()
const
on
Change
=
(
key
:
string
)
=>
{
if
(
key
===
'
check_
all'
)
{
const
right
Change
=
(
key
:
string
)
=>
{
if
(
key
===
'
select-
all'
)
{
if
(
statusCode
.
value
===
6
)
{
tableQaRef
.
value
?.
toggleAllSelection
()
}
else
{
tableRef
.
value
?.
toggleAllSelection
()
}
}
else
if
(
key
===
'c
lear_check
'
)
{
}
else
if
(
key
===
'c
ancel-select
'
)
{
if
(
statusCode
.
value
===
6
)
{
tableQaRef
.
value
?.
clearSelection
()
}
else
{
tableRef
.
value
?.
clearSelection
()
}
}
else
if
(
key
===
'copy_code'
)
{
const
shopNumberList
:
string
[]
=
[]
for
(
const
item
of
selection
.
value
)
{
item
.
productList
?.
forEach
((
el
)
=>
{
if
(
el
.
shopNumber
)
{
shopNumberList
.
push
(
el
.
shopNumber
)
}
}
)
}
else
if
(
key
===
'copy_shopNumber'
)
{
let
shopNumberList
:
string
[]
=
[]
if
(
statusCode
.
value
===
6
)
{
shopNumberList
=
tableData
.
value
.
map
((
item
)
=>
item
.
detailList
)
.
flat
()
.
map
((
e
)
=>
e
?.
shopNumber
)
.
filter
((
shopNumber
):
shopNumber
is
string
=>
shopNumber
!==
undefined
)
}
else
{
shopNumberList
=
tableData
.
value
.
map
((
item
)
=>
item
.
productList
)
.
flat
()
.
map
((
e
)
=>
e
?.
shopNumber
)
.
filter
((
shopNumber
):
shopNumber
is
string
=>
shopNumber
!==
undefined
)
}
copy
(
shopNumberList
.
join
(
','
))
}
else
if
(
key
===
'copy_
shopNumber
'
)
{
cons
t
subOrderNumber
:
string
[]
=
[]
}
else
if
(
key
===
'copy_
code
'
)
{
le
t
subOrderNumber
:
string
[]
=
[]
if
(
statusCode
.
value
===
6
)
{
for
(
const
item
of
selection
.
value
)
{
item
.
detailList
?.
forEach
((
el
)
=>
{
if
(
el
.
shopNumber
)
{
subOrderNumber
.
push
(
el
.
shopNumber
||
''
)
}
}
)
}
subOrderNumber
=
tableData
.
value
.
map
((
item
)
=>
item
.
detailList
)
.
flat
()
.
map
((
e
)
=>
e
?.
subOrderNumber
)
.
filter
(
(
subOrderNumber
):
subOrderNumber
is
string
=>
subOrderNumber
!==
undefined
,
)
}
else
{
for
(
const
item
of
selection
.
value
)
{
item
.
productList
?.
forEach
((
el
)
=>
{
if
(
el
.
subOrderNumber
)
{
subOrderNumber
.
push
(
el
.
subOrderNumber
)
}
}
)
}
subOrderNumber
=
tableData
.
value
.
map
((
item
)
=>
item
.
productList
)
.
flat
()
.
map
((
e
)
=>
e
?.
subOrderNumber
)
.
filter
(
(
subOrderNumber
):
subOrderNumber
is
string
=>
subOrderNumber
!==
undefined
,
)
}
copy
(
subOrderNumber
.
join
(
','
))
}
else
if
(
key
===
'count'
)
{
const
count
=
selection
.
value
.
length
copy
(
count
.
toString
())
}
}
const
onChangeCurrentRow
=
(
item
:
ProductList
)
=>
{
...
...
src/views/order/pod/index.vue
View file @
95a49edc
...
...
@@ -590,8 +590,10 @@
v
-
loading
=
"loading"
element
-
loading
-
text
=
"加载中..."
class
=
"order-list flex-1 overflow-hidden"
@
contextmenu
.
prevent
=
"(v) => rightClick(v, null)"
>
<
TableView
ref
=
"tableRef"
:
paginated
-
data
=
"tableData"
:
columns
=
"tableColumns"
:
selectionable
=
"true"
...
...
@@ -973,15 +975,20 @@
基版
<
b
>
{{
cardItem
?.
baseSku
}}
<
/b> 的统计数量为:<b> {{ count
}}
</
b
>
<
/p
>
<
/el-dialog
>
<
right
-
m
enu
<
RightClickM
enu
ref
=
"rightMenuRef"
:
show
-
copy
-
shop
-
number
=
"
['IN_PRODUCTION', 'TO_BE_CONFIRMED', 'WAIT_SHIPMENT'].includes(status)
"
:
show
-
copy
-
shop
-
number
=
"true"
:
show
-
copy
-
count
=
"
['IN_PRODUCTION', 'TO_BE_CONFIRMED', 'WAIT_SHIPMENT'].includes(status)
[
'IN_PRODUCTION',
'TO_BE_CONFIRMED',
'WAIT_SHIPMENT',
'TO_BE_REPLENISHMENT',
'INVALID',
].includes(status)
"
@
change
=
"rightChange"
:
show
-
copy
-
sub
-
shop
-
number
=
"true"
@
on
-
change
=
"rightChange"
/>
<
fastProduction
v
-
model
:
detailVisible
=
"detailVisible"
...
...
@@ -1058,7 +1065,6 @@
<
/template
>
<
script
setup
lang
=
"tsx"
>
// refreshJMProductInfo,reasonInvalidationApi,
import
RightMenu
from
'./rightMenu.vue'
import
{
getOrderTabData
,
getOrderList
,
...
...
@@ -1120,6 +1126,7 @@ import { filePath } from '@/api/axios'
import
{
CustomColumn
}
from
'@/types/table'
import
LogList
from
'@/components/LogList.vue'
import
CommonCard
from
'@/components/CommonCard.vue'
import
RightClickMenu
from
'@/components/RightClickMenu.vue'
const
tableRef
=
ref
()
const
loading
=
ref
(
false
)
const
currentPage
=
ref
(
1
)
...
...
@@ -1154,13 +1161,14 @@ const completeShipmentForm = ref({
logisticsTracking
:
''
,
// 物流跟踪号
carriageAmount
:
''
,
// 物流费用
}
)
const
rightClick
=
(
e
:
MouseEvent
,
item
:
PodProductList
|
CardOrderData
)
=>
{
cardItem
.
value
=
item
const
rightClick
=
(
e
:
MouseEvent
,
item
:
PodProductList
|
CardOrderData
|
null
,
)
=>
{
cardItem
.
value
=
item
||
undefined
rightMenuRef
.
value
.
setPosition
({
x
:
e
.
clientX
,
y
:
e
.
clientY
,
cardItem
:
e
.
clientY
,
el
:
e
,
}
)
}
const
handleSizeChange
=
(
size
:
number
)
=>
{
...
...
@@ -1172,10 +1180,14 @@ const handleCurrentChange = (page: number) => {
loadDiffList
()
}
const
rightChange
=
async
(
code
:
string
)
=>
{
const
flag
=
[
'IN_PRODUCTION'
,
'TO_BE_CONFIRMED'
,
'WAIT_SHIPMENT'
].
includes
(
status
.
value
,
)
if
(
code
===
'check_all'
)
{
const
flag
=
[
'IN_PRODUCTION'
,
'TO_BE_CONFIRMED'
,
'WAIT_SHIPMENT'
,
'TO_BE_REPLENISHMENT'
,
'INVALID'
,
].
includes
(
status
.
value
)
if
(
code
===
'select-all'
)
{
if
(
flag
)
{
selection
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
CardOrderList
.
value
))
}
else
{
...
...
@@ -1184,17 +1196,35 @@ const rightChange = async (code: string) => {
}
// selection.value = JSON.parse(JSON.stringify(tableData.value))
}
}
else
if
(
code
===
'c
lear_check
'
)
{
}
else
if
(
code
===
'c
ancel-select
'
)
{
selection
.
value
=
[]
tableRef
.
value
?.
tableRef
.
toggleAllSelection
()
}
else
if
(
code
===
'copy_code'
)
{
const
str
=
selection
.
value
.
map
((
item
)
=>
item
.
factorySubOrderNumber
||
item
.
factoryOrderNumber
)
.
join
()
navigator
.
clipboard
.
writeText
(
str
)
let
str
if
(
flag
)
{
str
=
CardOrderList
.
value
.
map
((
item
)
=>
item
.
factorySubOrderNumber
).
join
()
}
else
{
str
=
tableData
.
value
.
map
((
item
)
=>
item
.
productList
)
.
flat
()
.
map
((
item
)
=>
item
?.
factorySubOrderNumber
)
.
filter
((
item
)
=>
item
)
.
join
()
}
navigator
.
clipboard
.
writeText
(
str
||
''
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'copy_shopNumber'
)
{
const
str
=
selection
.
value
.
map
((
item
)
=>
item
.
shopNumber
).
join
()
let
str
if
(
flag
)
{
str
=
CardOrderList
.
value
.
map
((
item
)
=>
item
.
shopNumber
).
join
()
}
else
{
str
=
tableData
.
value
.
map
((
item
)
=>
item
.
productList
)
.
flat
()
.
map
((
item
)
=>
item
?.
shopNumber
)
.
filter
((
item
)
=>
item
)
.
join
()
}
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'count'
)
{
...
...
@@ -1342,6 +1372,7 @@ const saveCompleteShipment = async () => {
const
CardOrderList
=
ref
<
(
PodProductList
|
CardOrderData
)[]
>
([])
const
loadCardList
=
async
()
=>
{
loading
.
value
=
true
try
{
const
res
=
await
getCardOrderList
(
{
...
...
@@ -1380,7 +1411,17 @@ const loadCardList = async () => {
item
.
images
=
images
}
else
{
if
(
item
.
imageAry
)
{
const
images
=
JSON
.
parse
(
item
.
imageAry
as
string
)
console
.
log
(
item
.
imageAry
)
let
images
if
(
typeof
item
.
imageAry
===
'string'
&&
item
.
imageAry
.
startsWith
(
'https'
)
)
{
images
=
[]
}
else
{
images
=
JSON
.
parse
(
item
.
imageAry
as
string
)
}
if
(
Array
.
isArray
(
images
))
{
item
.
images
=
images
.
map
((
e
:
imageAryInter
)
=>
{
return
{
...
...
@@ -1396,10 +1437,14 @@ const loadCardList = async () => {
}
)
total
.
value
=
res
.
data
.
total
}
catch
(
error
)
{
console
.
error
(
error
)
// showError(error)
}
finally
{
loading
.
value
=
false
}
}
const
loadOrderList
=
async
()
=>
{
loading
.
value
=
true
try
{
const
res
=
await
getOrderList
(
{
...
...
@@ -1422,6 +1467,8 @@ const loadOrderList = async () => {
total
.
value
=
res
.
data
.
total
}
catch
(
error
)
{
// showError(error)
}
finally
{
loading
.
value
=
false
}
}
const
currentImage
=
ref
(
''
)
...
...
src/views/order/pod/rightMenu.vue
deleted
100644 → 0
View file @
b3d0599d
<
template
>
<!--
<div
class=
"wrap"
@
click=
"close"
>
-->
<div
v-if=
"show"
ref=
"right_menu"
class=
"right_menu"
>
<button
@
click=
"$emit('change', 'check_all')"
>
全部选择
</button>
<button
@
click=
"$emit('change', 'clear_check')"
>
取消选择
</button>
<button
v-if=
"showCopySubShopNumber"
@
click=
"$emit('change', 'copy_code')"
>
复制选中生产单号
</button>
<button
v-if=
"showCopyShopNumber"
@
click=
"$emit('change', 'copy_shopNumber')"
>
复制选中店铺单号
</button>
<button
v-if=
"showCopyCount"
@
click=
"$emit('change', 'count')"
>
统计数量
</button>
</div>
<!--
</div>
-->
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
defineProps
,
defineExpose
}
from
'vue'
interface
E
{
x
:
number
el
:
HTMLElement
y
:
number
}
defineProps
({
showCopyShopNumber
:
{
type
:
Boolean
,
default
:
true
,
},
showCopyCount
:
{
type
:
Boolean
,
default
:
true
,
},
showCopySubShopNumber
:
{
type
:
Boolean
,
default
:
true
,
},
})
const
row
=
ref
()
const
show
=
ref
(
false
)
const
right_menu
=
ref
<
HTMLElement
>
()
const
close
=
()
=>
{
show
.
value
=
false
document
.
body
.
onclick
=
null
}
const
setPosition
=
(
o
:
E
)
=>
{
console
.
log
(
o
)
show
.
value
=
true
const
clientX
=
o
.
x
const
x
=
document
.
body
.
clientWidth
-
clientX
document
.
body
.
onclick
=
function
()
{
close
()
}
row
.
value
=
setTimeout
(()
=>
{
if
(
!
right_menu
.
value
)
return
if
(
x
<
150
)
{
right_menu
.
value
.
style
.
cssText
=
`top:
${
o
.
y
}
px;right:
${
x
}
px`
}
else
{
right_menu
.
value
.
style
.
cssText
=
`top:
${
o
.
y
}
px;left:
${
o
.
x
}
px`
}
},
1
)
}
defineExpose
({
setPosition
,
})
</
script
>
<
style
scoped
>
.wrap
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
}
.right_menu
{
position
:
fixed
;
max-width
:
200px
;
min-height
:
50px
;
background
:
#fff
;
box-shadow
:
1px
1px
10px
1px
rgba
(
0
,
0
,
0
,
0.5
);
border-radius
:
5px
;
overflow
:
hidden
;
z-index
:
999
;
/* left: -500px; */
top
:
-500px
;
}
.right_menu
button
{
display
:
block
;
line-height
:
30px
;
font-size
:
14px
;
padding
:
0
15px
;
text-align
:
left
;
width
:
100%
;
cursor
:
pointer
;
}
.right_menu
button
:hover
{
background
:
rgb
(
65
,
192
,
251
);
color
:
white
;
}
button
{
outline
:
none
;
border
:
none
;
}
</
style
>
src/views/order/podUs/components/updateAddress.vue
0 → 100644
View file @
95a49edc
<
script
setup
lang=
"ts"
>
import
{
defineModel
}
from
'vue'
import
{
updateAddressApi
,
AddressInfo
}
from
'@/api/podUsOrder.ts'
const
emits
=
defineEmits
([
'success'
])
defineProps
<
{
countryList
:
{
countryCode
:
string
}[]
}
>
()
const
visible
=
defineModel
<
boolean
>
(
'visible'
)
const
form
=
defineModel
<
AddressInfo
>
(
'form'
,
{
default
:
{
receiverName
:
''
,
receiverPhone
:
''
,
receiverCountry
:
''
,
receiverProvince
:
''
,
receiverCity
:
''
,
receiverDistrict
:
''
,
receiverAddress1
:
''
,
receiverAddress2
:
''
,
receiverPostCode
:
''
,
},
})
const
formRef
=
ref
()
const
rules
=
{
receiverName
:
[{
required
:
true
,
message
:
'请输入姓名'
,
trigger
:
'blur'
}],
receiverPhone
:
[{
required
:
true
,
message
:
'请输入电话'
,
trigger
:
'blur'
}],
receiverCountry
:
[{
required
:
true
,
message
:
'请输入国家'
,
trigger
:
'blur'
}],
receiverProvince
:
[{
required
:
true
,
message
:
'请输入省/州'
,
trigger
:
'blur'
}],
receiverCity
:
[{
required
:
true
,
message
:
'请输入市'
,
trigger
:
'blur'
}],
receiverAddress1
:
[{
required
:
true
,
message
:
'请输入地址1'
,
trigger
:
'blur'
}],
receiverPostCode
:
[{
required
:
true
,
message
:
'请输入邮政编码'
,
trigger
:
'blur'
}],
}
const
submitForm
=
async
()
=>
{
formRef
?.
value
.
validate
(
async
(
valid
:
boolean
)
=>
{
if
(
valid
)
{
await
updateAddressApi
(
form
.
value
as
never
)
visible
.
value
=
false
emits
(
'success'
)
await
ElMessageBox
.
alert
(
'请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。'
,
'提示'
,
{
type
:
'warning'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
showCancelButton
:
true
,
})
}
})
}
</
script
>
<
template
>
<el-dialog
v-model=
"visible"
:close-on-click-modal=
"false"
title=
"修改揽收信息"
width=
"50%"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"姓名"
prop=
"receiverName"
>
<el-input
v-model=
"form.receiverName"
clearable
placeholder=
"请输入姓名"
/>
</el-form-item>
<el-form-item
label=
"电话"
prop=
"receiverPhone"
>
<el-input
v-model=
"form.receiverPhone"
clearable
placeholder=
"请输入电话"
/>
</el-form-item>
<el-form-item
label=
"国家"
prop=
"receiverCountry"
>
<el-select
v-model=
"form.receiverCountry"
clearable
filterable
>
<el-option
v-for=
"it in countryList"
:key=
"it.countryCode"
:label=
"it.countryCode"
:value=
"it.countryCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"省/州"
prop=
"receiverProvince"
>
<el-input
v-model=
"form.receiverProvince"
clearable
placeholder=
"请输入省/州"
/>
</el-form-item>
<el-form-item
label=
"市"
prop=
"receiverCity"
>
<el-input
v-model=
"form.receiverCity"
clearable
placeholder=
"请输入市"
/>
</el-form-item>
<el-form-item
label=
"区/县"
prop=
"receiverDistrict"
>
<el-input
v-model=
"form.receiverDistrict"
clearable
placeholder=
"请输入区/县"
/>
</el-form-item>
<el-form-item
label=
"地址1"
prop=
"receiverAddress1"
>
<el-input
v-model=
"form.receiverAddress1"
clearable
placeholder=
"请输入地址1"
/>
</el-form-item>
<el-form-item
label=
"地址2"
prop=
"receiverAddress2"
>
<el-input
v-model=
"form.receiverAddress2"
clearable
placeholder=
"请输入地址2"
/>
</el-form-item>
<el-form-item
label=
"邮政编码"
prop=
"receiverPostCode"
>
<el-input
v-model=
"form.receiverPostCode"
clearable
placeholder=
"请输入邮政编码"
/>
</el-form-item>
</el-form>
<template
#
footer
>
<el-button
@
click=
"visible=false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
提交
</el-button>
</
template
>
</el-dialog>
</template>
<
style
scoped
lang=
"scss"
>
</
style
>
src/views/order/podUs/index.vue
View file @
95a49edc
...
...
@@ -145,7 +145,21 @@
style=
"width: 150px"
/>
</ElFormItem>
<ElFormItem
label=
"物流类型"
>
<ElSelect
v-model=
"searchForm.shipmentType"
placeholder=
"物流类型"
clearable
style=
"width: 130px"
>
<ElOption
v-for=
"(item, index) in ['自有物流','工厂物流']"
:key=
"index"
:value=
"index"
:label=
"item"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem>
<ElButton
type=
"primary"
@
click=
"search"
>
查询
</ElButton>
</ElFormItem>
...
...
@@ -230,12 +244,18 @@
</div>
</div>
<div
class=
"operation-box mb-10"
>
<span
v-if=
"status === 'PICKING'"
class=
"item"
>
<ElButton
:loading=
"downloadLoading"
type=
"warning"
@
click=
"downloadTif"
>
排版
</ElButton>
</span>
<span
v-if=
"status === 'TO_BE_CONFIRMED'"
class=
"item"
>
<ElButton
type=
"success"
@
click=
"confirmOrder"
>
确认
</ElButton>
</span>
<span
v-if=
"status === 'EXCEPTION_ORDER'"
class=
"item"
>
<ElButton
type=
"success"
@
click=
"updateOrder"
>
转至待确认
</ElButton>
</span>
<span
v-if=
"status === 'EXCEPTION_ORDER' && exceptionStatus === 3"
class=
"item"
>
<ElButton
type=
"success"
@
click=
"asyncOrderAddress"
>
同步收货地址
</ElButton>
</span>
<span
v-if=
"status === 'EXCEPTION_ORDER' && exceptionStatus === 1"
class=
"item"
...
...
@@ -354,6 +374,7 @@
v-loading=
"loading"
element-loading-text=
"加载中..."
class=
"table-wrapper flex-1 flex-column overflow-hidden"
@
contextmenu
.
prevent=
"(v) => rightClick(v)"
>
<TableView
ref=
"tableRef"
...
...
@@ -364,7 +385,6 @@
:paginated-data=
"tableData"
:cell-style=
"onCellStyle"
@
selection-change=
"handleSelectionChange"
@
on-change=
"onChange"
>
<
template
#
goods=
"{ row }"
>
<div
class=
"goods-info-box"
>
...
...
@@ -574,6 +594,12 @@
</el-icon>
</div>
<div
class=
"order-detail-item"
>
<span
class=
"order-detail-item-label"
>
物流类型:
</span>
<span
class=
"order-detail-item-value"
>
{{
[
'自有物流'
,
'工厂物流'
][
row
.
shipmentType
]
}}
</span>
</div>
<div
class=
"order-detail-item"
>
<span
class=
"order-detail-item-label"
>
物流跟踪号:
</span>
<span
class=
"order-detail-item-value"
>
<el-button
...
...
@@ -749,21 +775,38 @@
<
/template
>
<
template
#
operate
=
"{ row
}
"
>
<
div
class
=
"operate-box"
>
<
span
class
=
"operate-item"
>
<
span
class
=
"operate-item"
style
=
"display: flex;flex-direction: column"
>
<
ElButton
v
-
if
=
"!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
link
type
=
"primary"
@
click
=
"
confirm(row
)"
@
click
=
"
operationLog(row.id, null
)"
>
操作日志
<
/ElButton
>
<
ElButton
v
-
if
=
"!row.expressSheet && row.status === 'TO_BE_CONFIRMED'"
link
type
=
"primary"
@
click
=
"confirm(row)"
>
确认
<
/ElButton
>
<
ElButton
v
-
if
=
"row.shipmentType===1 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)"
link
type
=
"primary"
@
click
=
"
operationLog(row.id, null
)"
@
click
=
"
handleUpdateAddress(row
)"
>
操作日志
修改地址
<
/ElButton
>
<
ElButton
v
-
if
=
"row.shipmentType===0 && ['CREATE_LOGISTICS','WAIT_SHIPMENT'].includes(status)"
link
type
=
"primary"
@
click
=
"handleRefreshAddress(row)"
>
刷新地址
<
/ElButton
>
<
/span
>
<
/div
>
...
...
@@ -907,11 +950,18 @@
><
/ElPagination
>
<
/div
>
<
/div
>
<
right
-
m
enu
<
RightClickM
enu
ref
=
"rightMenuRef"
:
show
-
copy
-
count
=
"false"
@
change
=
"rightChange"
/>
:
show
-
copy
-
sub
-
shop
-
number
=
"false"
@
on
-
change
=
"rightChange"
>
<
template
#
default
><
div
class
=
"menu-item"
@
click
=
"rightChange('order-number')"
>
复制订单号
<
/div
>
<
/template
>
<
/RightClickMenu
>
<
el
-
dialog
v
-
model
=
"confirmDialogShow"
:
close
-
on
-
click
-
modal
=
"false"
...
...
@@ -1122,7 +1172,7 @@
<
/el-button
>
<
/template
>
<
/el-dialog
>
<
UpdateAddress
v
-
if
=
"updateAddVisible"
v
-
model
:
form
=
"currentRow"
v
-
model
:
visible
=
"updateAddVisible"
:
country
-
list
=
"countryList"
@
success
=
"search"
><
/UpdateAddress
>
<
ElDialog
v
-
model
=
"exceptionDialogVisible"
title
=
"转为异常单"
...
...
@@ -1183,8 +1233,8 @@
<
/ElDialog
>
<
/template
>
<
script
setup
lang
=
"ts"
>
import
{
getUserMarkList
}
from
'@/api/common'
import
{
getUserMarkList
}
from
'@/api/common'
import
{
ArrowDown
,
WarningFilled
}
from
'@element-plus/icons-vue'
import
{
getCardOrderList
,
...
...
@@ -1211,14 +1261,15 @@ import {
getTrackingNumberApi
,
getfaceSimplexFileApi
,
cancelLogisticsOrderApi
,
composingDesignImages
,
changeLogisticsApi
,
createLogisticsOrderApi
,
updateLogisticsToPickingApi
,
createLogisticsOrdersApi
,
createLogisticsOrdersApi
,
syncReceiverAddress
,
refreshAddressApi
,
AddressInfo
,
// handleExceptionOrderApi,
}
from
'@/api/podUsOrder'
import
{
BaseRespData
}
from
'@/types/api'
import
UpdateAddress
from
'./components/updateAddress.vue'
import
TableView
from
'@/components/TableView.vue'
import
{
LogListData
,
...
...
@@ -1242,10 +1293,11 @@ import PodMakeOrder from './PodMakeOrder.vue'
import
{
OrderData
}
from
'@/types/api/podMakeOrder'
import
useLodop
,
{
LODOPObject
}
from
'@/utils/hooks/useLodop'
import
dayjs
from
'dayjs'
import
rightMenu
from
'../pod/right
Menu.vue'
import
RightClickMenu
from
'@/components/RightClick
Menu.vue'
import
ResultInfo
from
'./components/ResultInfo.vue'
import
{
isArray
,
isString
}
from
'@/utils/validate'
import
platformJson
from
'../../../json/platform.json'
import
{
getAllCountryApi
}
from
'@/api/logistics.ts'
declare
global
{
interface
Window
{
ActiveXObject
:
{
...
...
@@ -1260,12 +1312,26 @@ declare global {
responseBody
?:
unknown
}
}
const
updateAddVisible
=
ref
(
false
)
const
tabsNav
=
ref
<
Tab
[]
>
()
const
countryList
=
ref
([])
const
resultRefs
=
ref
<
InstanceType
<
typeof
ResultInfo
>
|
null
>
(
null
)
const
confirmDialogShow
=
ref
(
false
)
const
downloadLoading
=
ref
(
false
)
const
isChangeWay
=
ref
(
false
)
const
confirmData
=
ref
([])
const
logisticsWayData
=
ref
([])
const
currentRow
=
ref
<
AddressInfo
>
({
receiverName
:
''
,
receiverPhone
:
''
,
receiverCountry
:
''
,
receiverProvince
:
''
,
receiverCity
:
''
,
receiverDistrict
:
''
,
receiverAddress1
:
''
,
receiverAddress2
:
''
,
receiverPostCode
:
''
,
}
)
const
confirmSelectionData
=
ref
<
LogisticsData
[]
>
([])
const
confirmRowData
=
ref
<
ProductList
|
null
>
(
null
)
const
status
=
ref
(
'TO_BE_CONFIRMED'
)
...
...
@@ -1273,6 +1339,7 @@ const detailData = ref({})
const
[
searchForm
]
=
useValue
<
SearchForm
>
({
timeType
:
null
,
shopNumber
:
''
,
shipmentType
:
''
,
userMark
:
''
,
logisticsTracking
:
''
,
baseSku
:
''
,
...
...
@@ -1359,6 +1426,30 @@ const getWeekRange = (weeks = 0, type: 'past' | 'future' = 'past') => {
type
===
'past'
?
now
.
subtract
(
weeks
,
'week'
)
:
now
.
add
(
weeks
,
'week'
)
return
[
start
.
startOf
(
'week'
).
toDate
(),
start
.
endOf
(
'week'
).
toDate
()]
}
const
handleRefreshAddress
=
async
(
row
:
PodUsOrderListData
)
=>
{
try
{
await
showConfirm
(
'确定刷新地址吗?'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
}
catch
{
return
}
await
refreshAddressApi
([
row
.
id
])
await
ElMessageBox
.
alert
(
'请修改/刷新地址后取消物流重新创建物流订单、获取跟踪号、获取打印面单。'
,
'提示'
,
{
type
:
'warning'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
showCancelButton
:
true
,
}
)
}
const
handleUpdateAddress
=
async
(
row
:
PodUsOrderListData
)
=>
{
const
{
data
}
=
await
getAllCountryApi
()
countryList
.
value
=
data
currentRow
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
row
))
updateAddVisible
.
value
=
true
}
const
tableColumns
=
computed
(()
=>
[
{
label
:
'商品'
,
...
...
@@ -1391,6 +1482,10 @@ const tableColumns = computed(() => [
slot
:
'innerLabel'
,
width
:
300
,
prop
:
'innerLabel'
,
}
,{
label
:
'异常原因'
,
width
:
300
,
prop
:
'exceptionReason'
,
}
,
{
label
:
'操作'
,
...
...
@@ -1406,8 +1501,6 @@ const rightClick = (e: MouseEvent) => {
rightMenuRef
.
value
.
setPosition
({
x
:
e
.
clientX
,
y
:
e
.
clientY
,
cardItem
:
e
.
clientY
,
el
:
e
,
}
)
}
...
...
@@ -1593,6 +1686,23 @@ const confirmOrder = async () => {
productionClientValue
.
value
=
''
productionClientVisible
.
value
=
true
}
const
downloadTif
=
async
()
=>
{
if
(
!
selection
.
value
.
length
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
downloadLoading
.
value
=
true
try
{
const
res
=
await
composingDesignImages
(
selection
.
value
.
map
(
el
=>
el
.
id
))
window
.
open
(
'http://ps.jomalls.com/tiff/'
+
res
.
message
,
'_blank'
)
downloadLoading
.
value
=
false
}
catch
(
e
){
console
.
log
(
e
)
downloadLoading
.
value
=
false
}
}
const
loadProductionClient
=
async
()
=>
{
try
{
const
res
=
await
getProductionClientApi
()
...
...
@@ -1657,6 +1767,37 @@ const updateOrder = async () => {
loading
.
close
()
}
}
const
asyncOrderAddress
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
try
{
await
showConfirm
(
'确定同步收货地址吗?'
,
{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
}
catch
{
return
}
const
ids
=
selection
.
value
.
map
((
item
)
=>
item
.
id
)
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
syncReceiverAddress
(
ids
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'同步成功'
)
search
()
await
loadTabData
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
const
assignOrder
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
...
...
@@ -1872,18 +2013,29 @@ const isSelectStatused = (data: ProductList) => {
return
index
!==
-
1
}
const
rightChange
=
async
(
code
:
string
)
=>
{
if
(
code
===
'check_all'
)
{
cardSelection
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tableData
.
value
))
}
else
if
(
code
===
'clear_check'
)
{
cardSelection
.
value
=
[]
}
else
if
(
code
===
'copy_code'
)
{
const
str
=
cardSelection
.
value
.
map
((
item
)
=>
item
.
factorySubOrderNumber
)
const
flat
=
status
.
value
!==
'IN_PRODUCTION'
if
(
code
===
'select-all'
)
{
if
(
flat
)
{
tableRef
.
value
?.
toggleAllSelection
()
}
else
{
cardSelection
.
value
=
JSON
.
parse
(
JSON
.
stringify
(
tableData
.
value
))
}
}
else
if
(
code
===
'cancel-select'
)
{
if
(
flat
)
{
tableRef
.
value
?.
clearSelection
()
}
else
{
cardSelection
.
value
=
[]
}
}
else
if
(
code
===
'copy_shopNumber'
)
{
const
str
=
(
tableData
.
value
as
ProductList
[]
|
PodUsOrderListData
[])
.
map
((
item
)
=>
item
?.
shopNumber
)
.
join
()
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'copy_shopNumber'
)
{
const
str
=
cardSelection
.
value
.
map
((
item
)
=>
item
.
shopNumber
).
join
()
}
else
if
(
code
===
'order-number'
)
{
const
str
=
(
tableData
.
value
as
ProductList
[]
|
PodUsOrderListData
[])
.
map
((
item
)
=>
item
?.
factoryOrderNumber
)
.
join
()
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
...
...
@@ -2495,16 +2647,7 @@ onMounted(() => {
loadProductionClient
()
loadWarehouseList
()
}
)
const
onChange
=
(
value
:
string
)
=>
{
if
(
value
===
'shop-numbers'
)
{
const
shopNumbers
=
(
tableData
.
value
as
PodUsOrderListData
[])
.
map
((
item
)
=>
item
.
shopNumber
)
.
join
(
','
)
navigator
.
clipboard
.
writeText
(
shopNumbers
).
then
(()
=>
{
ElMessage
.
success
(
'店铺单号已复制到剪贴板'
)
}
)
}
}
const
handleExceptionCommand
=
(
command
:
number
)
=>
{
exceptionStatus
.
value
=
command
search
()
...
...
@@ -2600,6 +2743,12 @@ const handleExceptionCommand = (command: number) => {
height
:
100
%
;
overflow
-
y
:
auto
;
}
.
operate
-
item
{
.
el
-
button
{
margin
-
left
:
0
!
important
;
margin
-
top
:
20
px
!
important
;
}
}
.
tabs
-
node_count
{
display
:
inline
-
block
;
min
-
width
:
20
px
;
...
...
src/views/warehouse/receiptDoc.vue
View file @
95a49edc
...
...
@@ -117,7 +117,7 @@
>
删除
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"handleExport"
>
导出
<
/el-button
>
<
el
-
button
type
=
"success"
@
click
=
"handleExport"
>
导出
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"printProductTag"
>
打印商品
SKU
标签
<
/el-button
>
...
...
@@ -267,7 +267,7 @@
>
<
template
#
default
=
"{ row
}
"
>
<
ElButton
type
=
"primary"
link
@
click
=
"addDialog(2, row)"
>
编辑
>
编辑
<
/ElButton
>
<
/template
>
<
/ElTableColumn
>
...
...
@@ -414,8 +414,8 @@
{{
item
.
createdTime
}}
&
emsp
;
&
emsp
;
<
/span
>
<
span
style
=
"display: inline-block"
>
{{
item
.
description
}}
<
/span
>
item
.
description
}}
<
/span
>
<
/li
>
<
/ul
>
<
/el-tab-pane
>
...
...
@@ -609,7 +609,7 @@
><
/el-input
>
<
el
-
popover
placement
=
"top-start"
width
=
"1000"
trigger
=
"click"
>
<
div
v
-
if
=
"skuData.length > 0"
style
=
"height: 50vh"
>
<
ElTable
size
=
"small"
:
data
=
"
s
kuData"
height
=
"100%"
border
>
<
ElTable
size
=
"small"
:
data
=
"
filterS
kuData"
height
=
"100%"
border
>
<
ElTableColumn
show
-
overflow
-
tooltip
width
=
"60"
...
...
@@ -670,8 +670,10 @@
>
<
template
#
default
=
"{ row
}
"
>
<
el
-
icon
:
size
=
"32"
color
=
"#67C23A"
class
=
"cursor-pointer"
><
CirclePlusFilled
@
click
=
"skudblclick(row)"
/><
/el-icon
>
>
<
CirclePlusFilled
@
click
=
"skudblclick(row)"
/>
<
/el-icon
>
<
/template
>
<
/ElTableColumn
>
<
/ElTable
>
...
...
@@ -742,7 +744,7 @@
<
/el-radio-group
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
""
>
<
el
-
checkbox
v
-
model
=
"exportForm.delivery"
>
包含详情
<
/el-checkbox
>
<
el
-
checkbox
v
-
model
=
"exportForm.delivery"
>
包含详情
<
/el-checkbox
>
<
/el-form-item
>
<
/el-form
>
<
template
#
footer
>
...
...
@@ -979,6 +981,7 @@ const pickerOptions = {
}
,
],
}
function
getStartTime
()
{
const
date
=
new
Date
()
const
year
=
date
.
getFullYear
()
...
...
@@ -986,6 +989,7 @@ function getStartTime() {
const
day
=
date
.
getDate
()
return
`${year
}
-${month
}
-${day
}
00:00:00`
}
const
selectSku
=
ref
(
''
)
const
treeData
=
ref
<
InterWarehouseTree
[]
>
()
const
[
searchForm
,
resetSearchForm
]
=
useValue
<
warehouseSearchForm
>
({
}
)
...
...
@@ -1075,6 +1079,7 @@ const printProductTag = async () => {
console
.
error
(
e
)
}
}
async
function
handlePrintProductTag
()
{
const
flag
=
printData
.
value
.
every
(
(
el
:
InterWarehousePage
)
=>
el
.
number
&&
el
.
number
!=
'0'
,
...
...
@@ -1084,12 +1089,12 @@ async function handlePrintProductTag() {
}
const
list
=
printData
.
value
.
map
(
({
skuName
=
''
,
warehouseSku
=
''
,
supplierItemNo
=
''
,
number
=
''
,
locationName
=
''
,
}
)
=>
({
skuName
=
''
,
warehouseSku
=
''
,
supplierItemNo
=
''
,
number
=
''
,
locationName
=
''
,
}
)
=>
({
skuName
,
warehouseSku
,
supplierItemNo
,
...
...
@@ -1104,6 +1109,7 @@ async function handlePrintProductTag() {
showPrintDialog
.
value
=
false
window
.
open
(
filePath
+
res
.
message
,
'_blank'
)
}
const
batchAddCommodity
=
async
(
sku
:
string
):
Promise
<
InterskuList
[]
>
=>
{
if
(
!
editForm
.
value
.
warehouseId
)
{
ElMessage
.
error
(
'请选择仓库'
)
...
...
@@ -1129,11 +1135,14 @@ const batchAddCommodity = async (sku: string): Promise<InterskuList[]> => {
return
[]
}
}
interface
InterImportData
{
warehouseSku
:
string
remark
?:
string
|
null
[
key
:
string
]:
unknown
}
// 前端导入Excel
const
excelFieldMap
:
Record
<
string
,
keyof
InterProductList
>
=
{
// SKU图片: 'skuImage',
...
...
@@ -1147,9 +1156,9 @@ const excelFieldMap: Record<string, keyof InterProductList> = {
}
const
handleLocalImport
=
async
({
path
,
data
,
}
:
{
path
,
data
,
}
:
{
path
:
string
data
:
InterImportData
[]
}
)
=>
{
...
...
@@ -1168,8 +1177,8 @@ const handleLocalImport = async ({
typeof
value
===
'string'
?
value
:
value
===
null
||
value
===
undefined
?
null
:
String
(
value
)
?
null
:
String
(
value
)
}
else
if
(
field
===
'buyStored'
)
{
// 确保 value 是一个有效的数字或数字字符串,否则设置为 null
if
(
...
...
@@ -1537,6 +1546,12 @@ const addOtherCurrency = async () => {
upSection
()
}
}
const
filterSkuData
=
computed
(()
=>
{
const
skuList
=
otherPurchaseData
.
value
.
map
(
el
=>
el
.
warehouseSku
)
console
.
log
(
skuList
,
skuData
.
value
)
return
skuData
.
value
.
filter
(
el
=>
!
skuList
.
includes
(
el
.
sku
))
}
)
const
addSection
=
async
()
=>
{
const
params
=
{
...
editForm
.
value
}
params
.
productList
=
otherPurchaseData
.
value
...
...
@@ -1599,9 +1614,10 @@ const upSection = async () => {
}
}
const
addPurchaseVisible
=
ref
(
false
)
const
purchaseTextarea
=
ref
(
null
)
const
purchaseTextarea
=
ref
(
''
)
const
addPurchase
=
async
()
=>
{
addPurchaseVisible
.
value
=
true
purchaseTextarea
.
value
=
''
}
const
submitPurchase
=
async
()
=>
{
if
(
!
purchaseTextarea
.
value
)
{
...
...
@@ -1736,20 +1752,24 @@ onMounted(() => {
width
:
500
px
;
text
-
align
:
center
;
}
.
cursor
-
pointer
{
cursor
:
pointer
;
}
.
header
-
filter
-
form
{
:
deep
(.
el
-
form
-
item
)
{
margin
-
right
:
14
px
;
margin
-
bottom
:
10
px
;
}
}
.
product
-
dialog
-
footer
{
display
:
flex
;
justify
-
content
:
space
-
between
;
margin
:
8
px
0
;
}
$border
:
solid
1
px
#
ddd
;
.
send
-
order
-
list
{
...
...
@@ -1797,10 +1817,12 @@ $border: solid 1px #ddd;
.
left
{
width
:
160
px
;
:
deep
(.
el
-
tree
-
node__content
)
{
height
:
30
px
;
line
-
height
:
30
px
;
}
:
deep
(.
el
-
tree
-
node__label
)
{
font
-
size
:
13
px
;
cursor
:
pointer
;
...
...
@@ -1892,6 +1914,7 @@ $border: solid 1px #ddd;
height
:
5
px
;
background
:
#
eff3f6
;
}
.
btn
-
list
{
margin
-
bottom
:
10
px
;
}
...
...
@@ -1923,6 +1946,7 @@ $border: solid 1px #ddd;
}
}
}
.
delivery
-
note
-
page
{
:
deep
(
#
top
)
{
height
:
100
%
;
...
...
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