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
be7a6939
Commit
be7a6939
authored
May 29, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 问题修改
parent
778b059e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
197 additions
and
86 deletions
+197
-86
src/api/podUsOrder.ts
+9
-0
src/views/order/podUs/index.vue
+188
-86
No files found.
src/api/podUsOrder.ts
View file @
be7a6939
...
...
@@ -246,3 +246,12 @@ export function loadWarehouseListApi() {
'factoryWarehouseInfo/getAll'
,
)
}
export
function
refreshMaterialApi
(
data
:
{
orderIds
:
string
|
undefined
productIds
:
string
|
undefined
})
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
'factory/podJomallOrderProductUs/refreshDesignImages '
,
data
,
)
}
src/views/order/podUs/index.vue
View file @
be7a6939
...
...
@@ -179,9 +179,15 @@
转至待确认
<
/ElButton
>
<
/span
>
<
span
class
=
"item"
>
<
ElButton
type
=
"primary"
@
click
=
"downloadMaterial"
>
下载素材
<
/ElButton
>
<
/span
>
<
span
class
=
"item"
>
<
ElButton
type
=
"success"
@
click
=
"refreshMaterial"
>
刷新素材图
<
/ElButton
>
<
/span
>
<
/div
>
<
div
v
-
if
=
"status !== 'IN_PRODUCTION'"
...
...
@@ -197,7 +203,6 @@
:
selectionable
=
"true"
:
paginated
-
data
=
"tableData"
:
cell
-
style
=
"onCellStyle"
:
row
-
style
=
"getRowStyle"
@
selection
-
change
=
"handleSelectionChange"
>
<
template
#
goods
=
"{ row
}
"
>
...
...
@@ -223,10 +228,8 @@
<
span
class
=
"goods-item-info-item-value"
>
{{
item
.
baseSku
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.baseSku || '')"
>
<
DocumentCopy
/>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.baseSku || '')"
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
...
...
@@ -234,10 +237,11 @@
<
span
class
=
"goods-item-info-item-value"
>
{{
item
.
variantSku
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.variantSku || '')"
<
el
-
icon
class
=
"icon"
@
click
=
"copy(item.variantSku || '')"
>
<
DocumentCopy
/>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
...
...
@@ -260,8 +264,7 @@
style
=
"color: #e6a23c"
@
click
=
"handleUpdateRemark(item)"
>
<
EditPen
/>
<
EditPen
/>
<
/el-icon
>
<
/div
>
<
/div
>
...
...
@@ -278,13 +281,12 @@
class
=
"icon"
@
click
=
"copy(item.factorySubOrderNumber || '')"
>
<
DocumentCopy
/>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
第三方生产单号
:
<
/spa
n
>
第三方生产单号
:
<
/spa
n
>
<
span
class
=
"goods-item-info-item-value"
...
...
@@ -296,8 +298,7 @@
class
=
"icon"
@
click
=
"copy(item.thirdSubOrderNumber || '')"
>
<
DocumentCopy
/>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"goods-item-info-item"
>
...
...
@@ -341,19 +342,19 @@
<
div
class
=
"goods-item-info-item"
>
<
span
class
=
"goods-item-info-item-label"
>
{{
status
===
'TO_BE_CONFIRMED'
?
'未生产数量:'
:
status
===
'EXCEPTION_ORDER'
?
'数量:'
:
'已生产数量:'
}}
<
/span
>
status
===
'TO_BE_CONFIRMED'
?
'未生产数量:'
:
status
===
'EXCEPTION_ORDER'
?
'数量:'
:
'已生产数量:'
}}
<
/span
>
<
span
class
=
"goods-item-info-item-value"
>
{{
status
===
'TO_BE_CONFIRMED'
?
item
.
notPassNum
:
status
===
'EXCEPTION_ORDER'
?
item
.
num
:
item
.
passNum
?
item
.
num
:
item
.
passNum
}}
<
/span
>
<
/div
>
...
...
@@ -376,8 +377,7 @@
class
=
"icon"
@
click
=
"copy(row.factoryOrderNumber || '')"
>
<
DocumentCopy
/>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"order-detail-item"
>
...
...
@@ -388,10 +388,8 @@
>
{{
row
.
thirdOrderNumber
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.thirdOrderNumber || '')"
>
<
DocumentCopy
/>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.thirdOrderNumber || '')"
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
class
=
"order-detail-item"
>
...
...
@@ -399,27 +397,49 @@
<
span
class
=
"order-detail-item-value"
:
title
=
"row.shopNumber"
>
{{
row
.
shopNumber
}}
<
/span
>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.shopNumber || '')"
>
<
DocumentCopy
/>
<
el
-
icon
class
=
"icon"
@
click
=
"copy(row.shopNumber || '')"
>
<
DocumentCopy
/>
<
/el-icon
>
<
/div
>
<
div
v
-
if
=
"row.status!=='TO_BE_CONFIRMED'"
class
=
"order-detail-item"
>
<
div
v
-
if
=
"row.status !== 'TO_BE_CONFIRMED'"
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
生产端
:
<
/span
>
<
span
class
=
"order-detail-item-value"
:
title
=
"row.productionClient"
>
<
span
class
=
"order-detail-item-value"
:
title
=
"row.productionClient"
>
{{
row
.
productionClient
}}
<
/span
>
<
/div
>
<
div
v
-
if
=
"row.productionClient==='JOMALL' && row.status!=='TO_BE_CONFIRMED'"
class
=
"order-detail-item"
>
<
div
v
-
if
=
"
row.productionClient === 'JOMALL' &&
row.status !== 'TO_BE_CONFIRMED'
"
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
发货仓库
:
<
/span
>
<
span
class
=
"order-detail-item-value"
:
title
=
"row.warehouseName"
>
<
span
class
=
"order-detail-item-value"
:
title
=
"row.warehouseName"
>
{{
row
.
warehouseName
}}
<
/span
>
<
/div
>
<
div
v
-
if
=
"row.productionClient==='JOMALL' && row.status!=='TO_BE_CONFIRMED'"
class
=
"order-detail-item"
>
<
div
v
-
if
=
"
row.productionClient === 'JOMALL' &&
row.status !== 'TO_BE_CONFIRMED'
"
class
=
"order-detail-item"
>
<
span
class
=
"order-detail-item-label"
>
物流方式
:
<
/span
>
<
span
class
=
"order-detail-item-value"
:
title
=
"row.logisticsWayName"
>
<
span
class
=
"order-detail-item-value"
:
title
=
"row.logisticsWayName"
>
{{
row
.
logisticsWayName
}}
<
/span
>
<
/div
>
...
...
@@ -466,7 +486,10 @@
{{
row
.
totalAmount
}}
(
¥
)
<
/span
>
<
/div
>
<
div
v
-
if
=
"row.status!=='TO_BE_CONFIRMED'"
class
=
"order-price-item"
>
<
div
v
-
if
=
"row.status !== 'TO_BE_CONFIRMED'"
class
=
"order-price-item"
>
<
span
class
=
"order-price-item-label"
>
物流运费:
<
/span
>
<
span
class
=
"order-price-item-value"
>
{{
row
.
payFreight
}}
(
$
)
...
...
@@ -520,11 +543,7 @@
<
template
#
operate
=
"{ row
}
"
>
<
div
class
=
"operate-box"
>
<
span
class
=
"operate-item"
>
<
ElButton
link
type
=
"primary"
@
click
=
"confirm(row)"
>
<
ElButton
link
type
=
"primary"
@
click
=
"confirm(row)"
>
确认
<
/ElButton
>
<
ElButton
...
...
@@ -609,7 +628,7 @@
<
div
class
=
"grid-container"
>
<
div
class
=
"grid-item"
title
=
"商品名称"
>
<
span
class
=
"grid-item-value"
>
{{
cardItem
?.
productName
}}
>
{{
cardItem
?.
productName
}}
<
/span
>
<
/div
>
<
div
class
=
"grid-item"
title
=
"未生产数量"
>
...
...
@@ -677,9 +696,16 @@
<
/div
>
<
/div
>
<
right
-
menu
ref
=
"rightMenuRef"
@
change
=
"rightChange"
/>
<
el
-
dialog
v
-
model
=
"confirmDialogShow"
:
close
-
on
-
click
-
modal
=
"false"
title
=
"确认"
>
<
div
class
=
"production-client"
style
=
"margin-bottom:10px;display: flex;align-items: center;gap: 8px"
>
<
label
style
=
"white-space: nowrap;"
for
=
""
>
生产端:
<
/label
>
<
el
-
dialog
v
-
model
=
"confirmDialogShow"
:
close
-
on
-
click
-
modal
=
"false"
title
=
"确认"
>
<
div
class
=
"production-client"
style
=
"margin-bottom: 10px; display: flex; align-items: center; gap: 8px"
>
<
label
style
=
"white-space: nowrap"
for
=
""
>
生产端:
<
/label
>
<
ElSelect
v
-
model
=
"productionClientValue"
clearable
...
...
@@ -693,27 +719,58 @@
><
/ElOption
>
<
/ElSelect
>
<
/div
>
<
el
-
table
@
selection
-
change
=
"selectionChange"
height
=
"400px"
:
data
=
"confirmData"
border
>
<
el
-
table
-
column
label
=
""
width
=
"60"
align
=
"center"
type
=
"selection"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"序号"
width
=
"60"
align
=
"center"
type
=
"index"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"物流名称"
align
=
"center"
prop
=
"logisticsWayName"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"发货仓库"
align
=
"center"
prop
=
"warehouseName"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"物流编码"
align
=
"center"
prop
=
"logisticsWayCode"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"所在分区"
align
=
"center"
prop
=
"partition"
><
/el-table-column
>
<
el
-
table
@
selection
-
change
=
"selectionChange"
height
=
"400px"
:
data
=
"confirmData"
border
>
<
el
-
table
-
column
label
=
""
width
=
"60"
align
=
"center"
type
=
"selection"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"序号"
width
=
"60"
align
=
"center"
type
=
"index"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"物流名称"
align
=
"center"
prop
=
"logisticsWayName"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"发货仓库"
align
=
"center"
prop
=
"warehouseName"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"物流编码"
align
=
"center"
prop
=
"logisticsWayCode"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"所在分区"
align
=
"center"
prop
=
"partition"
><
/el-table-column
>
<
el
-
table
-
column
label
=
"状态"
align
=
"center"
>
<
template
#
default
=
"{
row
}
"
>
<
template
#
default
=
"{
row
}
"
>
<
b
v
-
if
=
"row.status"
style
=
"color: green"
>
成功
<
/b
>
<
b
v
-
else
-
if
=
"!row.status"
style
=
"color: red"
>
失败
<
/b
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"预计运费($)"
align
=
"center"
prop
=
"payFreight"
>
<!--
<
template
#
default
=
"{row
}
"
>-->
<!--
{{
row
.
payFreight
||
'0.00'
}}
-->
<!--
<
/template>--
>
<!--
<
template
#
default
=
"{row
}
"
>-->
<!--
{{
row
.
payFreight
||
'0.00'
}}
-->
<!--
<
/template>--
>
<
/el-table-column
>
<
/el-table
>
<
template
#
footer
>
<
el
-
button
@
click
=
"confirmDialogShow
=
false"
>
取消
<
/el-button
>
<
el
-
button
@
click
=
"confirmDialogShow
=
false"
>
取消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"handleConfirm"
>
确定
<
/el-button
>
<
/template
>
<
/el-dialog
>
...
...
@@ -748,7 +805,7 @@
>
<
template
#
header
>
<
div
class
=
"dialog-header"
>
<
span
style
=
"margin-right: 8px;font-size: 18px"
>
确认
<
/span
>
<
span
style
=
"margin-right: 8px;
font-size: 18px"
>
确认
<
/span
>
<
el
-
tooltip
content
=
"默认最低运费分派"
>
<
el
-
icon
color
=
"red"
>
<
WarningFilled
/>
...
...
@@ -756,8 +813,11 @@
<
/el-tooltip
>
<
/div
>
<
/template
>
<
div
class
=
"production-client"
style
=
"display: flex;align-items: center;gap: 8px"
>
<
label
style
=
"white-space: nowrap;"
for
=
""
>
生产端:
<
/label
>
<
div
class
=
"production-client"
style
=
"display: flex; align-items: center; gap: 8px"
>
<
label
style
=
"white-space: nowrap"
for
=
""
>
生产端:
<
/label
>
<
ElSelect
v
-
model
=
"productionClientValue"
clearable
...
...
@@ -800,7 +860,10 @@ import {
printPrintOrderApi
,
stockOutCheckApi
,
toBeConfirmedApi
,
loadWarehouseListApi
,
getLogisticsCalculation
,
LogisticsData
,
loadWarehouseListApi
,
getLogisticsCalculation
,
LogisticsData
,
refreshMaterialApi
,
}
from
'@/api/podUsOrder'
import
TableView
from
'@/components/TableView.vue'
import
{
...
...
@@ -829,7 +892,7 @@ import dayjs from 'dayjs'
declare
global
{
interface
Window
{
ActiveXObject
:
{
new
(
type
:
string
):
XMLHttpRequest
new
(
type
:
string
):
XMLHttpRequest
}
VBS_BinaryToArray
:
{
(
data
:
unknown
):
{
toArray
():
number
[]
}
...
...
@@ -1083,21 +1146,26 @@ const confirm = async (row: ProductList) => {
const
{
data
}
=
await
getLogisticsCalculation
(
row
.
id
)
confirmData
.
value
=
data
}
const
selectionChange
=
(
data
:
LogisticsData
[])
=>
{
const
selectionChange
=
(
data
:
LogisticsData
[])
=>
{
confirmSelectionData
.
value
=
data
}
const
handleConfirm
=
async
()
=>
{
if
(
!
productionClientValue
.
value
)
{
return
ElMessage
.
warning
(
'请选择生产端'
)
}
if
(
confirmSelectionData
.
value
.
length
!==
1
)
{
if
(
confirmSelectionData
.
value
.
length
!==
1
)
{
return
ElMessage
.
warning
(
'请选择一条物流方式'
)
}
if
(
confirmSelectionData
.
value
.
some
(
el
=>!
el
.
status
))
{
if
(
confirmSelectionData
.
value
.
some
((
el
)
=>
!
el
.
status
))
{
return
ElMessage
.
warning
(
'请选择状态为成功的物流方式'
)
}
const
id
=
confirmRowData
.
value
?.
id
const
res
=
await
confirmOrderApi
([
Number
(
id
)],
productionClientValue
.
value
,
'customize'
,
confirmSelectionData
.
value
[
0
])
const
res
=
await
confirmOrderApi
(
[
Number
(
id
)],
productionClientValue
.
value
,
'customize'
,
confirmSelectionData
.
value
[
0
],
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
confirmDialogShow
.
value
=
false
...
...
@@ -1162,7 +1230,11 @@ const submit = async () => {
const
submitConfirm
=
async
()
=>
{
const
ids
=
selection
.
value
.
map
((
item
)
=>
item
.
id
)
try
{
const
res
=
await
confirmOrderApi
(
ids
,
productionClientValue
.
value
,
'minimumCost'
)
const
res
=
await
confirmOrderApi
(
ids
,
productionClientValue
.
value
,
'minimumCost'
,
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
productionClientVisible
.
value
=
false
...
...
@@ -1356,11 +1428,9 @@ const downloadMaterial = async () => {
.
map
((
item
:
ProductList
)
=>
item
.
id
)
.
filter
((
id
):
id
is
number
=>
id
!==
undefined
)
}
else
{
selectedIds
=
selection
.
value
.
map
((
item
:
PodUsOrderListData
)
=>
item
.
productList
)
.
flat
()
.
map
((
e
)
=>
e
?.
id
)
.
filter
((
id
):
id
is
number
=>
id
!==
undefined
)
selectedIds
=
(
tableData
.
value
as
PodUsOrderListData
[]).
map
(
(
item
)
=>
item
.
id
,
)
}
if
(
selectedIds
.
length
===
0
)
{
return
ElMessage
({
...
...
@@ -1666,16 +1736,16 @@ const onFastRefresh = () => {
loadTabData
()
search
()
}
// 修改行样式方法
const
getRowStyle
=
({
row
}
:
{
row
:
PodUsOrderListData
}
)
=>
{
if
(
stockOutSuccessIds
.
value
.
includes
(
row
.
id
))
{
return
{
backgroundColor
:
'#f0f9eb'
,
color
:
'#67c23a'
,
}
}
return
{
}
}
//
//
修改行样式方法
//
const getRowStyle = (
{
row
}
:
{
row
:
PodUsOrderListData
}
)
=>
{
//
if (stockOutSuccessIds.value.includes(row.id))
{
//
return
{
//
backgroundColor: '#f0f9eb',
//
color: '#67c23a',
//
}
//
}
//
return
{
}
//
}
// 添加表格ref
const
tableRef
=
ref
()
const
warehouseList
=
ref
<
WarehouseListData
[]
>
([])
...
...
@@ -1688,6 +1758,38 @@ const loadWarehouseList = async () => {
console
.
error
(
e
)
}
}
const
refreshMaterial
=
async
()
=>
{
let
selectedIds
=
[]
const
data
:
{
orderIds
:
string
|
undefined
productIds
:
string
|
undefined
}
=
{
orderIds
:
undefined
,
productIds
:
undefined
,
}
if
(
status
.
value
==
'IN_PRODUCTION'
)
{
selectedIds
=
cardSelection
.
value
.
map
((
item
)
=>
item
.
id
)
data
.
orderIds
=
selectedIds
.
join
(
','
)
data
.
productIds
=
undefined
}
else
{
selectedIds
=
(
selection
.
value
as
PodUsOrderListData
[]).
map
(
(
item
)
=>
item
.
id
,
)
data
.
productIds
=
selectedIds
.
join
(
','
)
data
.
orderIds
=
undefined
}
if
(
selectedIds
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
try
{
const
res
=
await
refreshMaterialApi
(
data
)
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'刷新成功'
)
search
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
}
onMounted
(()
=>
{
loadTabData
()
getUserMark
()
...
...
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