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
ca59f685
Commit
ca59f685
authored
Jun 19, 2024
by
zhuzhequan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加ordernumber字段
parent
bb74b1fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
15 deletions
+37
-15
src/types/api/order.ts
+1
-0
src/views/order/Shipment.vue
+28
-13
src/views/order/hook/useShipment.ts
+7
-1
src/views/order/index.vue
+1
-1
No files found.
src/types/api/order.ts
View file @
ca59f685
...
...
@@ -67,6 +67,7 @@ export interface OrderData {
export
interface
ProductList
{
id
:
number
customOrderId
?:
number
orderNumber
?:
string
subOrderNumber
?:
string
shopNumber
?:
string
material
?:
string
...
...
src/views/order/Shipment.vue
View file @
ca59f685
...
...
@@ -6,20 +6,20 @@
<div
class=
"shipment-info-item-header--title"
>
<span
class=
"shipment-info-item-header__label"
>
主单号:
</span>
<span
class=
"shipment-info-item-header__value"
>
{{
o
.
orderNumber
||
'--'
}}
</span>
o
.
orderNumber
||
'--'
}}
</span>
</div>
<div
class=
"shipment-info-item-header--title"
>
<span
class=
"shipment-info-item-header__label"
>
订单类型:
</span>
<span
class=
"shipment-info-item-header__value"
>
{{
o
.
sourceType
||
'--'
}}
</span>
o
.
sourceType
||
'--'
}}
</span>
</div>
<div
class=
"shipment-info-item-header--title"
>
<span
class=
"shipment-info-item-header__label"
>
收货人:
</span>
<span
class=
"shipment-info-item-header__value"
>
{{
o
.
lanshouName
||
'--'
}}
</span>
o
.
lanshouName
||
'--'
}}
</span>
</div>
</div>
<div
class=
"shipment-info-item-content"
>
...
...
@@ -31,7 +31,7 @@
'active-row': item.subOrderNumber === currentRow.subOrderNumber,
}"
class="shipment-info-item-content-item"
@click="onRowClick(item)"
@click="onRowClick(item
,o
)"
>
<div
class=
"image"
>
<img
:src=
"item.variantImage"
/>
...
...
@@ -64,9 +64,9 @@
>
<span
class=
"label"
>
未发数:
</span>
<span
class=
"value"
>
{{
(
item
.
num
||
0
)
-
((
item
.
shipmentNum
||
0
)
-
(
item
.
notPassNum
||
0
))
}}
</span>
(
item
.
num
||
0
)
-
((
item
.
shipmentNum
||
0
)
-
(
item
.
notPassNum
||
0
))
}}
</span>
</div>
<div
class=
"shipment-info-item-content-item--info"
...
...
@@ -80,7 +80,7 @@
@
click
.
stop=
"onShipment(item)"
>
<el-icon
style=
"vertical-align: middle"
><CircleCloseFilled
><CircleCloseFilled
/></el-icon>
</span>
</div>
...
...
@@ -112,6 +112,14 @@
{{
currentRow
.
count
}}
</span>
</div>
<div
class=
"order-norm"
>
<span
class=
"order-norm-label"
style=
"margin-right: 6px"
>
订单号:
</span>
<span
class=
"order-norm-value"
:title=
"currentRow.orderNumber"
>
{{
currentRow
.
orderNumber
}}
</span>
</div>
</div>
</div>
</div>
...
...
@@ -124,6 +132,8 @@ import { OrderData, ProductList } from '@/types/api/order'
import
{
PropType
,
ref
}
from
'vue'
import
{
CircleCloseFilled
}
from
'@element-plus/icons-vue'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
a
}
from
'vite/dist/node/types.d-jgA8ss1A'
const
emit
=
defineEmits
<
{
(
e
:
'changeCurrentRow'
,
v
:
ProductList
):
void
}
>
()
...
...
@@ -134,7 +144,8 @@ defineProps({
},
currentRow
:
{
type
:
Object
as
PropType
<
ProductList
>
,
default
:
()
=>
{},
default
:
()
=>
{
},
},
})
...
...
@@ -150,7 +161,8 @@ defineExpose<ShipmentType>({
},
})
const
onRowClick
=
(
item
:
ProductList
)
=>
{
const
onRowClick
=
(
item
:
ProductList
,
o
:
OrderData
)
=>
{
item
.
orderNumber
=
o
.
orderNumber
emit
(
'changeCurrentRow'
,
item
)
}
const
onShipment
=
async
(
item
:
ProductList
)
=>
{
...
...
@@ -175,6 +187,7 @@ const onShipment = async (item: ProductList) => {
display
:
flex
;
gap
:
10px
;
}
.shipment-info
{
width
:
50%
;
border
:
1px
solid
#eee
;
...
...
@@ -202,11 +215,13 @@ const onShipment = async (item: ProductList) => {
height
:
100%
;
width
:
50px
;
border-right
:
1px
solid
#eee
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.shipment-info-item-header
{
display
:
flex
;
justify-content
:
space-between
;
...
...
src/views/order/hook/useShipment.ts
View file @
ca59f685
...
...
@@ -43,9 +43,13 @@ export default function useShipment(callback?: () => void) {
const
code1
=
code
?.
split
(
'_'
)[
0
]
for
(
const
item
of
orderList
.
value
)
{
rowData
=
item
.
productList
?.
find
((
jj
)
=>
jj
.
subOrderNumber
===
code1
)
if
(
rowData
)
break
if
(
rowData
)
{
rowData
.
orderNumber
=
item
.
orderNumber
break
}
}
if
(
rowData
)
{
currentRow
.
value
=
rowData
const
unShipmentNum
=
(
rowData
.
num
||
0
)
-
...
...
@@ -107,7 +111,9 @@ export default function useShipment(callback?: () => void) {
},
).
catch
(()
=>
{})
}
currentRow
.
value
=
item
currentRow
.
value
.
orderNumber
=
res
.
data
.
orderNumber
}
}
const
index
=
orderList
.
value
.
findIndex
(
...
...
src/views/order/index.vue
View file @
ca59f685
...
...
@@ -983,7 +983,7 @@ const confirmProduce = async () => {
try
{
const
res
=
await
confirmProductionOrder
(
ids
)
search
()
loadTabData
()
await
loadTabData
()
ElMessage
.
success
(
res
.
message
)
}
catch
(
e
)
{
showError
(
e
)
...
...
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