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
d4d42900
Commit
d4d42900
authored
Sep 06, 2022
by
武广
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.quantgroup.cn:ui/merchant-manage-ui into feature/right20220906
parents
9c4a5427
ec6e8de8
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1424 additions
and
83 deletions
+1424
-83
config.js
config/config.js
+6
-0
index.jsx
src/components/BaiduMap/index.jsx
+27
-2
index.jsx
src/pages/AfterSaleManage/PassAudit/index.jsx
+46
-38
index.jsx
src/pages/AfterSaleManage/Pending/index.jsx
+27
-19
storeModal.jsx
src/pages/chainStoreManage/components/storeModal.jsx
+27
-4
index.jsx
src/pages/chainStoreManage/index.jsx
+15
-19
document.ejs
src/pages/document.ejs
+4
-0
LogisticsForm.jsx
...rManage/pendingDeliveryOrder/components/LogisticsForm.jsx
+1
-1
index.jsx
...s/orderManage/queryOrder/components/CustomTable/index.jsx
+156
-0
index.less
.../orderManage/queryOrder/components/CustomTable/index.less
+48
-0
readme.md
...s/orderManage/queryOrder/components/CustomTable/readme.md
+0
-0
index.jsx
...s/orderManage/queryOrder/components/DetailModal/index.jsx
+187
-0
index.less
.../orderManage/queryOrder/components/DetailModal/index.less
+44
-0
index.jsx
...es/orderManage/queryOrder/components/FormSearch/index.jsx
+162
-0
index.less
...s/orderManage/queryOrder/components/FormSearch/index.less
+32
-0
index.jsx
...Manage/queryOrder/components/LogisticsFormModel/index.jsx
+8
-0
const.js
src/pages/orderManage/queryOrder/const.js
+85
-0
index.jsx
src/pages/orderManage/queryOrder/index.jsx
+415
-0
index.less
src/pages/orderManage/queryOrder/index.less
+57
-0
service.js
src/pages/orderManage/queryOrder/service.js
+77
-0
No files found.
config/config.js
View file @
d4d42900
...
...
@@ -91,6 +91,12 @@ export default {
path
:
'
/
'
,
component
:
'
./Admin
'
,
},
{
title
:
'
商户管理后台
'
,
path
:
'
/orderManage/queryOrder
'
,
name
:
'
queryOrder
'
,
component
:
'
./orderManage/queryOrder
'
,
},
{
title
:
'
商户管理后台
'
,
path
:
'
/orderManage/pendingDeliveryOrder
'
,
...
...
src/components/BaiduMap/index.jsx
View file @
d4d42900
import
React
,
{
useState
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Map
,
Marker
,
ZoomControl
,
CityListControl
}
from
'
react-bmapgl
'
;
import
{
Modal
,
Input
}
from
'
antd
'
;
export
default
props
=>
{
const
{
visible
,
onSetPoint
,
onCancel
,
lngLat
}
=
props
;
const
{
visible
,
onSetPoint
,
onCancel
,
lngLat
,
addrInfo
}
=
props
;
let
defaultLnglat
=
{
lng
:
116.404449
,
lat
:
39.914889
};
if
(
lngLat
)
{
defaultLnglat
=
lngLat
;
...
...
@@ -27,6 +27,31 @@ export default props => {
setLnglatText
(
`
${
e
.
latlng
.
lng
}
,
${
e
.
latlng
.
lat
}
`
);
};
// const translateCallback = obj => {
// console.log('obj :>> ', obj);
// setLnglat(obj.points[0]);
// };
const
getPoint
=
()
=>
{
// const convertor = new window.BMapGL.Convertor();
const
myGeo
=
new
window
.
BMapGL
.
Geocoder
();
// 将地址解析结果显示在地图上,并调整地图视野
myGeo
.
getPoint
(
addrInfo
.
address
||
''
,
point
=>
{
if
(
point
)
{
// convertor.translate([point], 1, 5, translateCallback);
setLnglat
(
point
);
}
},
addrInfo
.
provice
||
'
北京市
'
,
);
};
useEffect
(()
=>
{
if
(
visible
)
getPoint
();
},
[
visible
]);
return
(
<
Modal
title=
"门店信息"
...
...
src/pages/AfterSaleManage/PassAudit/index.jsx
View file @
d4d42900
...
...
@@ -125,44 +125,52 @@ export default () => {
width
:
300
,
dataIndex
:
'
action
'
,
fixed
:
'
right
'
,
render
:
(
_
,
r
)
=>
[
<
Popconfirm
title=
"确定允许退款?"
onConfirm=
{
()
=>
refund
(
r
)
}
okText=
"确认"
cancelText=
"取消"
key=
"pop"
disabled=
{
!
r
.
showRefund
}
>
<
Button
key=
"link1"
className=
"mr10 mt10"
type=
"primary"
disabled=
{
!
r
.
showRefund
}
>
{
r
.
showRefunded
?
'
已退款
'
:
'
允许退款
'
}
</
Button
>
</
Popconfirm
>,
<
Button
key=
"link2"
onClick=
{
()
=>
reject
(
r
)
}
type=
"primary"
className=
"mr10 mt10"
disabled=
{
!
r
.
showRefuse
}
>
驳回
</
Button
>,
<
Button
key=
"link3"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
className=
"mr10 mt10"
>
订单详情
</
Button
>,
<
Button
key=
"link4"
onClick=
{
()
=>
handleCom
(
r
)
}
type=
"primary"
className=
"mr10 mt10"
disabled=
{
!
r
.
showLogistics
}
>
查看物流
</
Button
>,
<
Button
className=
"mr10 mt10"
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
],
render
:
(
_
,
r
)
=>
{
const
operations
=
[
<
Popconfirm
title=
"确定允许退款?"
onConfirm=
{
()
=>
refund
(
r
)
}
okText=
"确认"
cancelText=
"取消"
key=
"pop"
disabled=
{
!
r
.
showRefund
}
>
<
Button
key=
"link1"
className=
"mr10 mt10"
type=
"primary"
disabled=
{
!
r
.
showRefund
}
>
{
r
.
showRefunded
?
'
已退款
'
:
'
允许退款
'
}
</
Button
>
</
Popconfirm
>,
<
Button
key=
"link2"
onClick=
{
()
=>
reject
(
r
)
}
type=
"primary"
className=
"mr10 mt10"
disabled=
{
!
r
.
showRefuse
}
>
驳回
</
Button
>,
<
Button
key=
"link3"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
className=
"mr10 mt10"
>
订单详情
</
Button
>,
<
Button
key=
"link4"
onClick=
{
()
=>
handleCom
(
r
)
}
type=
"primary"
className=
"mr10 mt10"
disabled=
{
!
r
.
showLogistics
}
>
查看物流
</
Button
>,
<
Button
className=
"mr10 mt10"
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
];
// 服务订单删除物流拦截
if
(
!
[
'
vip
'
,
'
self
'
].
includes
(
r
.
supplierType
))
{
operations
.
splice
(
3
,
1
);
}
return
operations
;
},
},
];
return
(
...
...
src/pages/AfterSaleManage/Pending/index.jsx
View file @
d4d42900
...
...
@@ -146,25 +146,33 @@ export default () => {
dataIndex
:
'
action
'
,
width
:
250
,
fixed
:
'
right
'
,
render
:
(
val
,
r
)
=>
[
<
Button
key=
"link1"
onClick=
{
()
=>
openAudit
(
r
)
}
className=
"mr10"
type=
"primary"
>
审核
</
Button
>,
<
Button
disabled=
{
r
.
serviceType
!==
1
||
(
r
.
serviceType
===
1
&&
r
.
intercept
)
}
onClick=
{
()
=>
openLogistics
(
r
)
}
className=
"mr10"
type=
"primary"
>
物流拦截
</
Button
>,
<
Button
className=
"mr10 mt10"
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
订单详情
</
Button
>,
<
Button
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
],
render
:
(
val
,
r
)
=>
{
const
operations
=
[
<
Button
key=
"link1"
onClick=
{
()
=>
openAudit
(
r
)
}
className=
"mr10 mt10"
type=
"primary"
>
审核
</
Button
>,
<
Button
disabled=
{
r
.
serviceType
!==
1
||
(
r
.
serviceType
===
1
&&
r
.
intercept
)
}
onClick=
{
()
=>
openLogistics
(
r
)
}
className=
"mr10 mt10"
type=
"primary"
>
物流拦截
</
Button
>,
<
Button
className=
"mr10 mt10"
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
订单详情
</
Button
>,
<
Button
className=
"mr10 mt10"
type=
"primary"
onClick=
{
()
=>
viewLog
(
r
)
}
>
查看记录
</
Button
>,
];
// 服务订单删除物流拦截
if
(
!
[
'
vip
'
,
'
self
'
].
includes
(
r
.
supplierType
))
{
operations
.
splice
(
1
,
1
);
}
return
operations
;
},
},
];
return
(
...
...
src/pages/chainStoreManage/components/storeModal.jsx
View file @
d4d42900
...
...
@@ -24,13 +24,17 @@ const StoreModal = props => {
const
{
visible
,
onCancel
,
form
:
{
getFieldDecorator
,
setFieldsValue
,
validateFields
,
resetFields
},
form
:
{
getFieldDecorator
,
setFieldsValue
,
getFieldsValue
,
validateFields
,
resetFields
},
formInfo
,
}
=
props
;
const
[
areaAddr
,
setAreaAddr
]
=
useState
([]);
const
[
visibleMap
,
setVisibleMap
]
=
useState
(
false
);
const
[
times
,
setTimes
]
=
useState
([{
name
:
'
time0
'
}]);
const
[
formData
,
setFormData
]
=
useState
({});
const
[
mapInfo
,
setMapInfo
]
=
useState
({
provice
:
''
,
address
:
''
,
});
const
divDom
=
useRef
();
...
...
@@ -82,7 +86,22 @@ const StoreModal = props => {
};
// 显示地图
const
openMap
=
v
=>
setVisibleMap
(
v
);
const
openMap
=
v
=>
{
const
values
=
getFieldsValue
();
let
provice
=
'
北京市
'
;
if
(
values
.
addr
.
length
>
0
)
{
areaAddr
.
forEach
(
item
=>
{
if
(
item
.
value
===
values
.
addr
[
0
])
{
provice
=
item
.
label
;
}
});
}
setMapInfo
({
provice
,
address
:
values
.
address
,
});
setVisibleMap
(
v
);
};
// 获取地址省
const
getAreaAddr
=
async
id
=>
{
...
...
@@ -162,7 +181,7 @@ const StoreModal = props => {
};
useEffect
(()
=>
{
if
(
props
.
visible
)
{
if
(
visible
)
{
resetFields
();
const
info
=
Object
.
assign
({},
formInfo
);
if
(
info
&&
info
.
id
)
{
...
...
@@ -186,7 +205,9 @@ const StoreModal = props => {
setFormData
(
info
);
getLazyAddr
(
info
);
}
else
{
getAreaAddr
(
0
);
if
(
areaAddr
.
length
<
1
)
{
getAreaAddr
();
}
setFormData
({});
}
}
...
...
@@ -197,6 +218,7 @@ const StoreModal = props => {
title=
"门店信息"
visible=
{
visible
}
width=
"800px"
maskClosable=
{
false
}
onOk=
{
()
=>
onSubmit
()
}
onCancel=
{
()
=>
handleCancel
()
}
>
...
...
@@ -293,6 +315,7 @@ const StoreModal = props => {
</
Form
>
<
MapModal
visible=
{
visibleMap
}
addrInfo=
{
mapInfo
}
onCancel=
{
()
=>
openMap
(
false
)
}
onSetPoint=
{
e
=>
onSetPoint
(
e
)
}
></
MapModal
>
...
...
src/pages/chainStoreManage/index.jsx
View file @
d4d42900
...
...
@@ -14,18 +14,8 @@ export default () => {
const
[
pageNo
,
setPageNo
]
=
useState
(
1
);
const
[
totalNum
,
setTotalNum
]
=
useState
(
0
);
const
[
pageSize
,
setPageSize
]
=
useState
(
20
);
const
table
=
useRef
();
const
refSearch
=
useRef
();
const
divDom
=
useRef
();
const
onEnableState
=
async
({
id
,
state
})
=>
{
const
enable
=
+
state
===
1
?
0
:
1
;
const
res
=
await
apiEnableStore
({
id
,
state
:
enable
});
if
(
res
===
'
0000
'
)
{
notification
.
success
({
message
:
`已
${
state
?
'
禁用
'
:
'
启用
'
}
`
});
// eslint-disable-next-line no-unused-expressions
table
.
current
?.
reload
?.();
}
};
const
onCreate
=
()
=>
{
setStoreInfo
({});
setVisible
(
true
);
...
...
@@ -34,13 +24,6 @@ export default () => {
setStoreInfo
(
info
);
setVisible
(
true
);
};
const
closeModal
=
isReload
=>
{
if
(
isReload
===
true
)
{
// eslint-disable-next-line no-unused-expressions
table
.
current
?.
reload
?.();
}
setVisible
(
false
);
};
// 获取市区街道
const
loadData
=
async
selectedOptions
=>
{
...
...
@@ -111,6 +94,21 @@ export default () => {
}
getList
(
params
);
};
const
closeModal
=
isReload
=>
{
if
(
isReload
)
{
onSearch
(
refSearch
.
current
?.
getFieldValue
?.()
||
{});
}
setStoreInfo
({});
setVisible
(
false
);
};
const
onEnableState
=
async
({
id
,
state
})
=>
{
const
enable
=
+
state
===
1
?
0
:
1
;
const
res
=
await
apiEnableStore
({
id
,
state
:
enable
});
if
(
res
===
'
0000
'
)
{
notification
.
success
({
message
:
`已
${
state
?
'
禁用
'
:
'
启用
'
}
`
});
onSearch
(
refSearch
.
current
?.
getFieldValue
?.()
||
{});
}
};
const
onReset
=
()
=>
{
if
(
refSearch
.
current
&&
refSearch
.
current
.
resetFields
)
{
...
...
@@ -284,9 +282,7 @@ export default () => {
columns=
{
columns
}
rowKey=
{
record
=>
record
.
id
}
pagination=
{
false
}
// className={styles.tabletop}
scroll=
{
{
x
:
'
100%
'
}
}
// rowSelection={rowSelection}
/>
{
dataList
&&
dataList
.
length
&&
(
<
div
className=
{
style
.
pageBox
}
>
...
...
src/pages/document.ejs
View file @
d4d42900
...
...
@@ -8,6 +8,10 @@
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
/>
<title>
量星球商户管理系统
</title>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/api?v=3.0&ak=5gZyih0oAhiNdbbdPKTc9ZGYOwel8bYN&type=webgl"
></script>
<link
rel=
"icon"
href=
"/favicon.png"
type=
"image/x-icon"
/>
</head>
<body>
...
...
src/pages/orderManage/pendingDeliveryOrder/components/LogisticsForm.jsx
View file @
d4d42900
...
...
@@ -147,7 +147,7 @@ const LogisticsForm = props => {
message
:
'
请填写物流单号!
'
,
},
],
})(<
Input
placeholder=
"请填写物流单号"
/>)
}
})(<
Input
maxLength=
{
30
}
placeholder=
"请填写物流单号"
/>)
}
</
FormItem
>
<
FormItem
>
{
getFieldDecorator
(
`${i}-serialNumber`
,
{
...
...
src/pages/orderManage/queryOrder/components/CustomTable/index.jsx
0 → 100644
View file @
d4d42900
import
React
,
{
useMemo
}
from
'
react
'
;
import
{
Spin
,
Empty
}
from
'
antd
'
;
import
style
from
'
./index.less
'
;
const
CustomTable
=
props
=>
{
const
{
columns
,
dataSource
,
rowKey
,
bordered
,
eachRowHeadRender
=
null
,
subDataField
=
null
,
loading
=
null
,
align
=
'
left
'
,
}
=
props
;
const
colLength
=
columns
.
length
;
const
baseColumns
=
useMemo
(()
=>
columns
,
[
columns
]);
const
baseDataSource
=
useMemo
(()
=>
dataSource
,
[
dataSource
]);
const
ColElement
=
()
=>
baseColumns
.
map
((
column
,
index
)
=>
{
const
key
=
column
.
dataIndex
||
index
.
toString
();
const
styleWidth
=
column
.
width
?
{
width
:
column
.
width
}
:
{};
return
<
col
key=
{
key
}
style=
{
styleWidth
}
></
col
>;
});
/** @name thead内容 */
const
TheadElement
=
()
=>
(
<
tr
>
{
baseColumns
.
map
((
column
,
index
)
=>
{
const
key
=
column
.
dataIndex
||
index
;
return
<
th
key=
{
key
}
>
{
column
.
title
}
</
th
>;
})
}
</
tr
>
);
/** @name 获取td元素数据 */
const
getTdElement
=
({
dataSourceItem
,
dataSourceIndex
,
subData
,
subDataItem
,
subDataIndex
})
=>
baseColumns
.
map
((
column
,
index
)
=>
{
const
{
render
,
dataIndex
,
align
:
itemAlign
=
null
}
=
column
;
const
key
=
dataIndex
||
index
;
// 子集不存在的属性去顶级查找
const
currentData
=
subDataItem
&&
subDataItem
[
key
]
!==
undefined
?
subDataItem
[
key
]
:
dataSourceItem
[
key
];
let
rowSpan
=
1
;
// 设置了自动合并 && 只设置第一条数据的值,其他的返回<></</>
if
(
column
.
rowSpanMode
===
'
auto
'
&&
subData
)
{
rowSpan
=
subData
.
length
;
if
(
subDataIndex
>
0
)
{
return
<></>;
}
}
const
renderParams
=
{
value
:
currentData
,
record
:
dataSourceItem
,
index
:
dataSourceIndex
,
subRecord
:
subDataItem
,
subIndex
:
subDataIndex
,
};
return
(
<
td
rowSpan=
{
rowSpan
}
key=
{
key
}
align=
{
itemAlign
||
align
}
>
<
div
className=
{
style
[
'
td-box
'
]
}
>
{
render
?
render
(
renderParams
)
:
currentData
}
</
div
>
</
td
>
);
});
/** @name 每一行的头部自定义渲染 */
const
EachRowHeadElement
=
dataSourceItem
=>
(
<
tr
>
<
td
className=
{
style
[
'
thead-render
'
]
}
colSpan=
{
colLength
}
>
{
'
'
}
{
eachRowHeadRender
(
dataSourceItem
)
}
</
td
>
</
tr
>
);
/** @name tbody内容 */
const
TbodyElement
=
()
=>
baseDataSource
.
map
((
dataSourceItem
,
dataSourceIndex
)
=>
{
const
subData
=
subDataField
?
dataSourceItem
[
subDataField
]
:
dataSourceItem
;
let
tbodyElement
=
''
;
if
(
Array
.
isArray
(
subData
))
{
tbodyElement
=
subData
.
map
((
subDataItem
,
subDataIndex
)
=>
{
const
key
=
subDataItem
[
rowKey
]
||
subDataIndex
.
toString
();
return
(
<
tr
key=
{
key
}
>
{
getTdElement
({
dataSourceItem
,
dataSourceIndex
,
subData
,
subDataItem
,
subDataIndex
,
})
}
</
tr
>
);
});
}
else
{
const
key
=
subData
[
rowKey
]
||
dataSourceIndex
.
toString
();
tbodyElement
=
(
<
tr
key=
{
key
}
>
{
getTdElement
({
dataSourceItem
,
dataSourceIndex
,
subData
})
}
</
tr
>
);
}
return
(
<
React
.
Fragment
key=
{
dataSourceIndex
.
toString
()
}
>
{
eachRowHeadRender
?
(
<
EachRowHeadElement
key=
{
dataSourceIndex
.
toString
()
}
{
...
dataSourceItem
}
/>
)
:
(
''
)
}
{
tbodyElement
}
</
React
.
Fragment
>
);
});
const
EmptyElement
=
()
=>
{
if
(
!
dataSource
||
dataSource
.
length
===
0
)
{
return
(
<
div
className=
{
style
[
'
custom-table-empty
'
]
}
>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
</
div
>
);
}
return
<></>;
};
const
memoTable
=
useMemo
(
()
=>
(
<
table
>
<
colgroup
>
<
ColElement
/>
</
colgroup
>
<
thead
className=
{
style
[
'
custom-table-thead
'
]
}
>
<
TheadElement
/>
</
thead
>
<
tbody
className=
{
style
[
'
custom-table-tbody
'
]
}
>
<
TbodyElement
/>
</
tbody
>
</
table
>
),
[
props
.
dataSource
],
);
return
(
<
div
className=
{
`${style['custom-table']} ${bordered ? style['custom-table-bordered'] : ''}`
}
>
<
Spin
spinning=
{
loading
}
>
{
memoTable
}
<
EmptyElement
/>
</
Spin
>
</
div
>
);
};
export
{
CustomTable
};
src/pages/orderManage/queryOrder/components/CustomTable/index.less
0 → 100644
View file @
d4d42900
.custom-table {
width: 100%;
background: #fff;
table {
width: 100%;
}
}
.custom-table-thead {
background: #fafafa;
> tr > th {
padding: 16px 16px;
overflow-wrap: break-word;
}
}
.custom-table-tbody {
> tr > td {
padding: 16px 16px;
> .td-box {
word-break: break-all;
}
&.thead-render {
padding: 0;
}
}
}
// bordered
.custom-table-bordered {
> table,
.custom-table-tbody,
.custom-table-thead {
> tr > td,
> tr > th {
border: 1px solid #e8e8e8;
}
}
}
// empt
.custom-table-empty {
margin: 0 auto;
overflow: hidden;
text-align: center;
border: 1px solid #e8e8e8;
border-top: none;
}
src/pages/orderManage/queryOrder/components/CustomTable/readme.md
0 → 100644
View file @
d4d42900
src/pages/orderManage/queryOrder/components/DetailModal/index.jsx
0 → 100644
View file @
d4d42900
import
React
,
{
useState
,
useEffect
,
forwardRef
,
useImperativeHandle
}
from
'
react
'
;
import
{
Modal
,
Table
}
from
'
antd
'
;
// import { queryOrderDetail } from '../../service';
import
{
COUPON_CODE_STATUS
}
from
'
../../const
'
;
import
style
from
'
./index.less
'
;
const
DetailModal
=
(
props
,
ref
)
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
modalProps
=
{
visible
,
width
:
'
1000px
'
,
title
:
'
订单详情
'
,
footer
:
null
,
onCancel
:
()
=>
{
setVisible
(
false
);
},
};
// const getDetail = async orderNo => {
// const params = {
// orderNo,
// };
// const res = await queryOrderDetail(params);
// console.log(res);
// };
/** @module 基本信息 */
const
[
baseInfo
,
setBaseInfo
]
=
useState
({});
/** @module 商品table */
const
[
goodData
,
setGoodData
]
=
useState
([]);
const
goodColumns
=
[
{
title
:
'
商品
'
,
dataIndex
:
'
spuName
'
,
width
:
350
,
render
:
(
value
,
record
)
=>
{
const
{
primaryImage
,
skuSpec
,
spuId
}
=
record
;
return
(
<
div
className=
{
style
[
'
sku-info
'
]
}
>
<
img
src=
{
primaryImage
}
width=
"50px"
height=
"50px"
alt=
""
/>
<
div
className=
{
style
[
'
sku-info__box
'
]
}
>
<
p
className=
{
style
[
'
sku-info__box--name
'
]
}
>
{
value
}
</
p
>
{
/* <p className={style['sku-info__box--spec']}>规格:{skuSpec}</p>
<p className={style['sku-info__box--id']}>商品id: {spuId}</p> */
}
</
div
>
</
div
>
);
},
},
{
title
:
'
单价(元)
'
,
dataIndex
:
'
supplyPrice
'
,
width
:
150
,
},
{
title
:
'
数量
'
,
dataIndex
:
'
count
'
,
width
:
150
,
},
{
title
:
'
小计
'
,
dataIndex
:
'
subTotal
'
,
width
:
150
,
render
:
(
value
,
record
)
=>
{
const
{
supplyPrice
,
count
}
=
record
;
return
(
supplyPrice
*
count
).
toFixed
(
2
);
},
},
{
title
:
'
售后状态
'
,
width
:
150
,
dataIndex
:
'
afterServiceStatusDesc
'
,
render
:
value
=>
value
||
'
-
'
,
},
];
/** @module 券码 */
const
[
couponData
,
setCouponData
]
=
useState
([]);
const
couponColumns
=
[
{
title
:
'
券码
'
,
width
:
150
,
render
:
(
value
,
record
,
index
)
=>
`券码
${
index
+
1
}
`
,
},
{
title
:
'
有效期
'
,
dataIndex
:
'
useStartTime
'
,
width
:
350
,
render
:
(
value
,
record
)
=>
{
const
{
useEndTime
}
=
record
;
return
`
${
value
}
-
${
useEndTime
}
`
;
},
},
{
title
:
'
核销时间
'
,
dataIndex
:
'
useTime
'
,
width
:
200
,
render
:
value
=>
value
||
'
-
'
,
},
{
title
:
'
核销人
'
,
dataIndex
:
'
usedByShopName
'
,
width
:
150
,
render
:
value
=>
value
||
'
-
'
,
},
{
title
:
'
状态
'
,
dataIndex
:
'
codeStatus
'
,
width
:
150
,
render
:
value
=>
COUPON_CODE_STATUS
[
value
],
},
];
const
open
=
record
=>
{
console
.
log
(
record
);
setVisible
(
true
);
const
{
skuVos
,
couponCodeVos
,
receiverName
,
receiverMobile
,
fullAddress
,
orderNo
,
orderTime
,
payTime
,
}
=
record
;
setGoodData
(
skuVos
);
setCouponData
(
couponCodeVos
);
setBaseInfo
({
receiverName
,
receiverMobile
,
fullAddress
,
orderNo
,
orderTime
,
payTime
,
});
// getDetail(orderNo);
};
useImperativeHandle
(
ref
,
()
=>
({
open
,
}));
return
(
<
Modal
{
...
modalProps
}
>
<
div
className=
{
style
[
'
order-info
'
]
}
>
<
div
className=
{
style
[
'
order-info--item
'
]
}
>
<
div
className=
{
style
[
'
order-info--item__title
'
]
}
>
收货人信息
</
div
>
<
ul
className=
{
style
[
'
order-info--item__ul
'
]
}
>
<
li
>
姓名:
{
baseInfo
.
receiverName
}
</
li
>
<
li
>
手机号:
{
baseInfo
.
receiverMobile
}
</
li
>
<
li
>
地址:
{
baseInfo
.
fullAddress
}
</
li
>
</
ul
>
</
div
>
<
div
className=
{
style
[
'
order-info--item
'
]
}
>
<
div
className=
{
style
[
'
order-info--item__title
'
]
}
>
订单信息
</
div
>
<
ul
className=
{
style
[
'
order-info--item__ul
'
]
}
>
<
li
>
订单号:
{
baseInfo
.
orderNo
}
</
li
>
<
li
>
下单时间:
{
baseInfo
.
orderTime
}
</
li
>
<
li
>
付款时间:
{
baseInfo
.
payTime
}
</
li
>
</
ul
>
</
div
>
</
div
>
{
/* 商品 */
}
<
div
className=
{
style
[
'
good-table
'
]
}
>
<
Table
pagination=
{
false
}
rowKey=
"orderSkuId"
bordered
columns=
{
goodColumns
}
dataSource=
{
goodData
}
></
Table
>
</
div
>
{
/* 券码 */
}
<
div
className=
{
style
[
'
coupon-table
'
]
}
>
<
Table
pagination=
{
false
}
bordered
columns=
{
couponColumns
}
dataSource=
{
couponData
}
></
Table
>
</
div
>
</
Modal
>
);
};
export
default
forwardRef
(
DetailModal
);
src/pages/orderManage/queryOrder/components/DetailModal/index.less
0 → 100644
View file @
d4d42900
.order-info {
display: flex;
padding: 20px;
background: #fafafa;
&--item {
flex: 1;
&__title {
height: 40px;
font-weight: bold;
font-size: 16px;
}
&__ul {
margin: 0;
padding: 0;
font-size: 14px;
li {
line-height: 30px;
}
}
}
}
.sku-info {
display: flex;
.sku-info__box {
margin-left: 10px;
p {
margin: 0;
padding: 0;
}
&--spec {
color: #999;
}
&--id {
color: #999;
}
}
}
.good-table,
.coupon-table {
margin-top: 20px;
}
src/pages/orderManage/queryOrder/components/FormSearch/index.jsx
0 → 100644
View file @
d4d42900
import
React
from
'
react
'
;
import
{
Form
,
Input
,
Select
,
DatePicker
,
Button
,
Space
,
notification
}
from
'
antd
'
;
import
{
sub
}
from
'
date-fns
'
;
import
style
from
'
./index.less
'
;
const
{
Option
}
=
Select
;
const
{
RangePicker
}
=
DatePicker
;
const
SEARCH_TYPE
=
{
SELECT
:
'
select
'
,
RANGE_PICKER
:
'
range_picker
'
,
INPUT
:
'
input
'
,
};
const
FormSearch
=
props
=>
{
const
{
width
=
'
100%
'
,
form
,
initialValues
=
{},
onFinish
=
()
=>
{},
formConfig
,
formOptions
,
btnConfig
,
}
=
props
;
const
FormItemBox
=
({
bindKey
,
label
,
column
,
children
,
afterRender
})
=>
{
const
columnValue
=
column
;
// if (afterRender) {
// columnValue = '';
// }
return
(
<
Form
.
Item
className=
{
style
[
'
custom-form-item
'
]
}
column=
{
columnValue
}
name=
{
bindKey
}
label=
{
label
}
>
{
children
}
</
Form
.
Item
>
);
};
// 下拉框类型
const
FormItemSelect
=
config
=>
{
const
{
bindKey
,
options
:
configOptions
=
[],
originOptions
=
{},
afterRender
=
null
,
afterOptions
=
{},
column
,
}
=
config
;
// 提取公共部分
const
BaseSelectElement
=
()
=>
(
<
FormItemBox
{
...
config
}
>
<
Select
name=
{
bindKey
}
className=
{
style
[
'
form-item-tag
'
]
}
{
...
originOptions
}
>
{
configOptions
.
map
(
option
=>
(
<
Option
key=
{
option
.
value
}
value=
{
option
.
value
}
>
{
option
.
name
}
</
Option
>
))
}
</
Select
>
</
FormItemBox
>
);
if
(
afterRender
)
{
return
(
<>
{
/* // <div className={style['custom-form-item-group']}> */
}
<
BaseSelectElement
/>
<
FormItemBox
column=
{
column
}
{
...
afterOptions
}
>
{
afterRender
()
}
</
FormItemBox
>
{
/* // </div> */
}
</>
);
}
return
<
BaseSelectElement
/>;
};
// 选择日期范围类型
const
FormItemRangePicker
=
config
=>
{
const
{
originOptions
=
{}
}
=
config
;
return
(
<
FormItemBox
{
...
config
}
>
<
RangePicker
className=
{
style
[
'
form-item-tag
'
]
}
{
...
originOptions
}
/>
</
FormItemBox
>
);
};
// 选择日期
// 多级联动
// 输入框类型
const
FormItemInput
=
config
=>
{
const
{
originOptions
=
{}
}
=
config
;
return
(
<
FormItemBox
{
...
config
}
>
<
Input
className=
{
style
[
'
form-item-tag
'
]
}
{
...
originOptions
}
/>
</
FormItemBox
>
);
};
// 表单内容元素
const
FormItemElement
=
()
=>
formConfig
.
map
(
config
=>
{
const
{
type
}
=
config
;
switch
(
type
)
{
case
SEARCH_TYPE
.
SELECT
:
return
<
FormItemSelect
key=
{
config
.
bindKey
}
{
...
config
}
/>;
case
SEARCH_TYPE
.
RANGE_PICKER
:
return
<
FormItemRangePicker
key=
{
config
.
bindKey
}
{
...
config
}
/>;
case
SEARCH_TYPE
.
INPUT
:
return
<
FormItemInput
key=
{
config
.
bindKey
}
{
...
config
}
/>;
default
:
return
<></>;
}
});
/**
* @module 按钮操作
*/
const
FormItemButton
=
()
=>
(
<
Space
size=
{
10
}
>
{
btnConfig
.
map
(
config
=>
{
const
{
label
,
onClick
=
()
=>
{},
type
=
'
primary
'
,
clickType
=
'
search
'
}
=
config
;
const
htmlType
=
clickType
===
'
reset
'
?
'
reset
'
:
'
submit
'
;
const
callback
=
()
=>
{
setTimeout
(()
=>
{
onClick
({
type
:
clickType
,
params
:
form
.
getFieldValue
()
});
});
};
return
(
<
Button
key=
{
clickType
}
type=
{
type
}
htmlType=
{
htmlType
}
onClick=
{
callback
}
>
{
label
}
</
Button
>
);
})
}
</
Space
>
);
return
(
<
div
className=
{
style
[
'
form-search
'
]
}
>
<
Form
style=
{
{
width
}
}
layout=
"inline"
form=
{
form
}
initialValues=
{
initialValues
}
onFinish=
{
onFinish
}
{
...
formOptions
}
>
<
FormItemElement
></
FormItemElement
>
<
Form
.
Item
>
<
FormItemButton
></
FormItemButton
>
</
Form
.
Item
>
</
Form
>
</
div
>
);
};
export
{
FormSearch
,
SEARCH_TYPE
};
src/pages/orderManage/queryOrder/components/FormSearch/index.less
0 → 100644
View file @
d4d42900
.form-search {
padding: 15px;
background: #fff;
}
.custom-form-item {
min-width: 320px;
margin-bottom: 20px !important;
&[column='1'] {
width: 100%;
}
&[column='2'] {
width: calc(50% - 16px);
}
&[column='3'] {
width: calc(33.3333% - 32px);
}
&[column='4'] {
width: calc(25% - 48px);
}
&[column='5'] {
width: calc(20% - 54px);
}
}
.form-item-tag {
width: 100%;
}
// .custom-form-item-group {
// display: flex;
// }
src/pages/orderManage/queryOrder/components/LogisticsFormModel/index.jsx
0 → 100644
View file @
d4d42900
import
LogisticsForm
from
'
../../../pendingDeliveryOrder/components/LogisticsForm
'
;
const
LogisticsFormModal
=
props
=>
(
// eslint-disable-next-line react/react-in-jsx-scope
<
LogisticsForm
{
...
props
}
/>
);
export
default
LogisticsFormModal
;
src/pages/orderManage/queryOrder/const.js
0 → 100644
View file @
d4d42900
// 搜索类型
export
const
ORDER_SEARCH_TYPE
=
[
{
value
:
'
orderNo
'
,
name
:
'
订单编号
'
,
},
{
value
:
'
spuId
'
,
name
:
'
商品id
'
,
},
{
value
:
'
channelOrderNo
'
,
name
:
'
外部订单
'
,
},
{
value
:
'
receiverName
'
,
name
:
'
收货人姓名
'
,
},
{
value
:
'
userMobile
'
,
name
:
'
买家手机号
'
,
},
{
value
:
'
userMobile4
'
,
name
:
'
买家手机号后四位
'
,
},
{
value
:
'
receiverMobile
'
,
name
:
'
收货人手机号
'
,
},
{
value
:
'
receiverMobile4
'
,
name
:
'
收货人手机号后四位
'
,
},
];
// 订单类型
export
const
ORDER_TYPE
=
[
{
value
:
''
,
name
:
'
全部
'
,
},
{
value
:
1
,
name
:
'
普通订单
'
,
},
{
value
:
4
,
name
:
'
服务订单
'
,
},
];
// 订单状态
export
const
ORDER_STATUS
=
[
{
value
:
''
,
name
:
'
全部
'
,
},
{
value
:
1
,
name
:
'
未支付
'
,
},
{
value
:
2
,
name
:
'
待发货
'
,
},
{
value
:
3
,
name
:
'
已发货
'
,
},
{
value
:
4
,
name
:
'
已完成
'
,
},
{
value
:
5
,
name
:
'
已关闭
'
,
},
];
export
const
COUPON_CODE_STATUS
=
{
1
:
'
未使用
'
,
2
:
'
已使用
'
,
3
:
'
已退款
'
,
};
src/pages/orderManage/queryOrder/index.jsx
0 → 100644
View file @
d4d42900
This diff is collapsed.
Click to expand it.
src/pages/orderManage/queryOrder/index.less
0 → 100644
View file @
d4d42900
.table-item-header {
display: flex;
padding: 0 20px;
line-height: 40px;
background-color: #f7f8f9;
&--info {
flex: 1;
span {
margin-right: 20px;
}
}
&--btn {
padding: 0 10px;
color: #61b0ff;
}
}
.white-box {
background-color: #fff;
}
.tab-box {
margin-top: 20px;
background-color: #fff;
}
.table-pagination {
margin-bottom: 30px;
padding: 20px 30px;
text-align: right;
}
.sku-info {
display: flex;
.sku-info__box {
margin-left: 10px;
p {
margin: 0;
padding: 0;
}
&--spec {
color: #999;
}
&--id {
color: #999;
}
}
}
.blue {
color: #61b0ff;
}
.after-status-box {
margin: 5px 0;
}
src/pages/orderManage/queryOrder/service.js
0 → 100644
View file @
d4d42900
import
{
stringify
}
from
'
querystring
'
;
import
_
from
'
lodash
'
;
import
request
from
'
@/utils/request
'
;
import
{
saveAs
}
from
'
file-saver
'
;
import
{
format
}
from
'
date-fns
'
;
import
config
from
'
../../../../config/env.config
'
;
// 查询订单列表
export
async
function
queryOrderList
(
params
)
{
return
request
.
post
(
'
/api/kdsp/queryOrderList
'
,
{
prefix
:
config
.
kdspApi
,
data
:
params
,
});
}
// 订单详情
export
async
function
queryOrderDetail
(
params
)
{
return
request
.
post
(
'
/api/kdsp/queryOrderDetail
'
,
{
prefix
:
config
.
kdspApi
,
data
:
params
,
});
}
// 待发货订单
export
async
function
queryToSend
(
params
)
{
try
{
const
{
data
:
{
current
,
records
,
total
,
size
},
}
=
await
request
.
post
(
'
/api/kdsp/op/mch-order/list-v2
'
,
{
prefix
:
config
.
kdspApi
,
data
:
stringify
(
_
.
omitBy
(
params
,
v
=>
!
v
)),
headers
:
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
},
});
return
{
current
,
data
:
records
.
map
(
v
=>
({
...
v
,
logisticsStatus
:
`_
${
v
.
logisticsStatus
}
`
})),
total
,
pageSize
:
size
,
};
}
catch
(
error
)
{
return
{};
}
}
// 发货/更新物流
export
async
function
updateExpress
(
params
)
{
return
request
.
post
(
'
/api/kdsp/op/mch-order/update-express-info
'
,
{
prefix
:
config
.
kdspApi
,
data
:
params
,
});
}
// 快递公司
export
async
function
queryExpress
()
{
try
{
const
{
data
}
=
await
request
.
get
(
'
/api/kdsp/op/express/list
'
,
{
prefix
:
config
.
kdspApi
,
});
return
data
;
}
catch
(
error
)
{
return
{};
}
}
export
async
function
getGoods
(
orderId
)
{
const
{
data
}
=
await
request
.
get
(
`/api/kdsp/op/mch-order/skus?orderId=
${
orderId
}
`
,
{
prefix
:
config
.
kdspApi
,
});
return
data
;
}
export
async
function
getLogistics
(
orderId
)
{
const
{
data
}
=
await
request
.
get
(
`/api/kdsp/op/mch-order/logistics-skus?orderId=
${
orderId
}
`
,
{
prefix
:
config
.
kdspApi
,
});
return
data
;
}
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