Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
3a59f793
Commit
3a59f793
authored
Nov 15, 2022
by
李腾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改订单查询发货和修改物流
parent
06093497
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
27 deletions
+37
-27
index.jsx
...ingDeliveryOrder/components/MultiLogisticsModal/index.jsx
+2
-2
index.jsx
...s/orderManage/queryOrder/components/CustomTable/index.jsx
+1
-1
index.jsx
src/pages/orderManage/queryOrder/index.jsx
+34
-24
No files found.
src/pages/orderManage/pendingDeliveryOrder/components/MultiLogisticsModal/index.jsx
View file @
3a59f793
...
...
@@ -32,8 +32,8 @@ const FormComponent = (props, ref) => {
...
item
,
// 渲染所有商品选项,通过查找editData 是否存在判断是否选中
skuInfoList
:
mchOrderSkuVoList
.
map
((
skuInfo
,
index
)
=>
{
const
skuNo
=
skuInfo
.
skuNo
.
toString
();
const
editData
=
item
.
skuInfoList
.
find
(
ele
=>
ele
.
skuNo
.
toString
()
===
skuNo
);
const
skuNo
=
skuInfo
.
skuNo
?
.
toString
();
const
editData
=
item
.
skuInfoList
.
find
(
ele
=>
ele
.
skuNo
?
.
toString
()
===
skuNo
);
if
(
editData
)
{
return
{
...
editData
,
...
...
src/pages/orderManage/queryOrder/components/CustomTable/index.jsx
View file @
3a59f793
...
...
@@ -45,7 +45,7 @@ const CustomTable = props => {
subDataItem
&&
subDataItem
[
key
]
!==
undefined
?
subDataItem
[
key
]
:
dataSourceItem
[
key
];
let
rowSpan
=
1
;
// 设置了自动合并 && 只设置第一条数据的值,其他的返回<></
</
>
// 设置了自动合并 && 只设置第一条数据的值,其他的返回<></>
if
(
column
.
rowSpanMode
===
'
auto
'
&&
subData
)
{
rowSpan
=
subData
.
length
;
if
(
subDataIndex
>
0
)
{
...
...
src/pages/orderManage/queryOrder/index.jsx
View file @
3a59f793
...
...
@@ -3,14 +3,16 @@ import React, { useState, useEffect, useRef } from 'react';
import
{
PageHeaderWrapper
}
from
'
@ant-design/pro-layout
'
;
import
{
connect
}
from
'
dva
'
;
import
{
QUERY_ORDER
}
from
'
@/../config/permission.config
'
;
import
{
values
}
from
'
lodash
'
;
import
style
from
'
./index.less
'
;
import
{
CustomTable
}
from
'
./components/CustomTable/index
'
;
import
{
FormSearch
,
SEARCH_TYPE
}
from
'
./components/FormSearch/index
'
;
import
LogisticsForm
from
'
./components/LogisticsFormMode
l
'
;
import
MultiLogisticsModal
from
'
../pendingDeliveryOrder/components/MultiLogisticsModa
l
'
;
import
DetailModal
from
'
./components/DetailModal/index
'
;
import
{
queryOrderList
,
getGoods
,
getLogistics
,
queryExpress
,
queryToSend
}
from
'
./service
'
;
import
{
apiQueryOrderInfo
}
from
'
../pendingDeliveryOrder/service
'
;
import
{
ORDER_SEARCH_TYPE
,
ORDER_TYPE
,
ORDER_STATUS
}
from
'
./const
'
;
const
{
TabPane
}
=
Tabs
;
...
...
@@ -20,6 +22,7 @@ const OrderList = props => {
const
canEditable
=
permissions
[
QUERY_ORDER
.
EDITABLE
];
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
detailModalRef
=
useRef
();
const
multiLogisticsModalRef
=
useRef
();
/** @module 发货弹框 */
// 物流公司数据
...
...
@@ -101,6 +104,12 @@ const OrderList = props => {
getOrderList
();
};
const
actionRef
=
{
current
:
{
reload
,
},
};
// 获取物流公司列表
const
getCompanys
=
async
()
=>
{
const
res
=
await
queryExpress
();
...
...
@@ -267,9 +276,13 @@ const OrderList = props => {
},
{
title
:
'
配送方式
'
,
dataIndex
:
'
deliveryType
'
,
rowSpanMode
:
'
auto
'
,
dataIndex
:
'
deliveryType
List
'
,
//
rowSpanMode: 'auto',
width
:
150
,
render
:
({
value
,
subRecord
})
=>
{
console
.
log
(
value
);
return
value
?.
map
(
item
=>
<
p
>
{
item
}
</
p
>);
},
},
{
title
:
'
售后
'
,
...
...
@@ -315,19 +328,23 @@ const OrderList = props => {
<
Button
type=
"primary"
onClick=
{
async
()
=>
{
const
skuListData
=
await
getGoods
(
record
?.
orderId
);
let
logisticsData
=
[{}];
setSkuList
(
skuListData
);
const
res
=
await
getLogistics
(
record
?.
orderId
);
logisticsData
=
res
.
map
(
item
=>
({
selectedGoods
:
item
?.
skus
?.
map
(
sku
=>
sku
?.
orderSkuId
),
selectedCompany
:
item
.
expressCompanyCode
?
`${item?.expressCompanyCode}-${item?.expressCompanyName}`
:
null
,
orderNum
:
item
?.
deliveryNo
,
}));
setLogisticsData
(
logisticsData
);
handleModalVisible
(
true
);
const
res
=
await
apiQueryOrderInfo
({
orderNo
:
record
.
orderNoStr
,
});
multiLogisticsModalRef
.
current
.
open
(
{
...
record
,
orderNo
:
record
.
orderNoStr
,
mchOrderSkuVoList
:
record
.
skuVos
.
map
(
item
=>
({
...
item
,
skuNo
:
item
.
skuId
?.
toString
(),
orderNo
:
record
.
orderNoStr
,
})),
packageList
:
res
.
data
.
packageList
||
[],
},
actionRef
,
);
}
}
>
{
text
}
...
...
@@ -406,14 +423,7 @@ const OrderList = props => {
)
}
</
div
>
<
LogisticsForm
onSubmit=
{
reload
}
skuList=
{
skuList
}
companys=
{
companys
}
onCancel=
{
()
=>
handleModalVisible
(
false
)
}
modalVisible=
{
LogisticsModalVisible
}
value=
{
LogisticsData
}
/>
<
MultiLogisticsModal
companys=
{
companys
}
ref=
{
multiLogisticsModalRef
}
/>
<
DetailModal
ref=
{
detailModalRef
}
/>
</
PageHeaderWrapper
>
...
...
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