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
ca5f30a8
Commit
ca5f30a8
authored
May 31, 2022
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 开发完成
parent
a46207de
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
148 additions
and
50 deletions
+148
-50
env.config.js
config/env.config.js
+7
-7
index.jsx
src/pages/AfterSaleManage/PassAudit/index.jsx
+19
-5
index.jsx
src/pages/AfterSaleManage/Pending/index.jsx
+31
-2
recordModal.jsx
src/pages/AfterSaleManage/components/recordModal.jsx
+40
-0
data.js
src/pages/AfterSaleManage/data.js
+9
-0
index.jsx
src/pages/GoodsManage/SearchForm/index.jsx
+2
-2
index.jsx
src/pages/GoodsManage/TempleatModal/index.jsx
+19
-20
index.jsx
src/pages/GoodsManage/createModal/index.jsx
+6
-8
index.jsx
src/pages/GoodsManage/index.jsx
+5
-3
service.js
src/pages/GoodsManage/service.js
+10
-3
No files found.
config/env.config.js
View file @
ca5f30a8
...
...
@@ -2,15 +2,15 @@ const isProduction = process.env.NODE_ENV === 'production';
const
isPre
=
process
.
env
.
PRE_ENV
===
'
pre
'
;
const
envAPi
=
{
api
:
'
//backstms-test
4
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-test
4
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-test
4
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-test
4
.liangkebang.net
'
,
querysApi
:
'
https://sc-settlement-api-test
4
.liangkebang.net
'
,
api
:
'
//backstms-test
2
.liangkebang.net
'
,
kdspOpApi
:
'
https://kdsp-operation-test
2
.liangkebang.net
'
,
kdspApi
:
'
https://sc-op-api-test
2
.liangkebang.net
'
,
goodsApi
:
'
https://sc-op-api-test
2
.liangkebang.net
'
,
querysApi
:
'
https://sc-settlement-api-test
2
.liangkebang.net
'
,
// goodsApi: '//192.168.188.111:7000',
prologueDomain
:
'
https://mall-test
4
.liangkebang.net
'
,
prologueDomain
:
'
https://mall-test
2
.liangkebang.net
'
,
qiniuHost
:
'
https://appsync.lkbang.net
'
,
opapiHost
:
'
https://opapi-test
4
.liangkebang.net
'
,
opapiHost
:
'
https://opapi-test
2
.liangkebang.net
'
,
};
const
prodApi
=
{
...
...
src/pages/AfterSaleManage/PassAudit/index.jsx
View file @
ca5f30a8
...
...
@@ -9,6 +9,7 @@ import DetailTable from '../components/detailTable';
import
ProofsModal
from
'
../components/proofsModal
'
;
import
LogisticsCom
from
'
../../orderManage/pendingDeliveryOrder/components/LogisticsCom
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
RecordModal
from
'
../components/recordModal
'
;
export
default
()
=>
{
const
table
=
useRef
();
...
...
@@ -22,6 +23,7 @@ export default () => {
const
[
LogisticsComModalVisible
,
handleComModalVisible
]
=
useState
(
false
);
const
[
appealDetailModal
,
setAppealDetailModal
]
=
useState
(
false
);
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
recordVisible
,
setRecordVisible
]
=
useState
(
false
);
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
data
=
await
orderDetail
({
serviceNo
});
setDetailInfo
(
data
||
[]);
...
...
@@ -85,6 +87,9 @@ export default () => {
setAppealDetailModal
(
true
);
setSelectedRow
(
detailData
);
};
const
recordDetail
=
()
=>
{
setRecordVisible
(
true
);
};
const
columns
=
[
...
columnPassAudit
,
{
...
...
@@ -110,7 +115,7 @@ export default () => {
{
title
:
'
操作
'
,
hideInSearch
:
true
,
width
:
45
0
,
width
:
30
0
,
dataIndex
:
'
action
'
,
fixed
:
'
right
'
,
render
:
(
_
,
r
)
=>
[
...
...
@@ -122,7 +127,7 @@ export default () => {
key=
"pop"
disabled=
{
!
r
.
showRefund
}
>
<
Button
key=
"link1"
className=
"mr10"
type=
"primary"
disabled=
{
!
r
.
showRefund
}
>
<
Button
key=
"link1"
className=
"mr10
mt10
"
type=
"primary"
disabled=
{
!
r
.
showRefund
}
>
{
r
.
showRefunded
?
'
已退款
'
:
'
允许退款
'
}
</
Button
>
</
Popconfirm
>,
...
...
@@ -130,23 +135,26 @@ export default () => {
key=
"link2"
onClick=
{
()
=>
reject
(
r
)
}
type=
"primary"
className=
"mr10"
className=
"mr10
mt10
"
disabled=
{
!
r
.
showRefuse
}
>
驳回
</
Button
>,
<
Button
key=
"link3"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
className=
"mr10"
>
<
Button
key=
"link3"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
className=
"mr10
mt10
"
>
订单详情
</
Button
>,
<
Button
key=
"link4"
onClick=
{
()
=>
handleCom
(
r
)
}
type=
"primary"
className=
"mr10"
className=
"mr10
mt10
"
disabled=
{
!
r
.
showLogistics
}
>
查看物流
</
Button
>,
<
Button
key=
"link"
className=
"mr10 mt10"
onClick=
{
()
=>
recordDetail
(
r
)
}
type=
"primary"
>
查看记录
</
Button
>,
],
},
];
...
...
@@ -183,6 +191,12 @@ export default () => {
modalVisible=
{
appealDetailModal
}
onCancel=
{
closeModal
}
></
AppealDetail
>
<
RecordModal
visible=
{
recordVisible
}
onCancel=
{
()
=>
{
setRecordVisible
(
false
);
}
}
></
RecordModal
>
</
div
>
);
};
src/pages/AfterSaleManage/Pending/index.jsx
View file @
ca5f30a8
import
React
,
{
useState
,
useRef
}
from
'
react
'
;
import
{
notification
,
Button
}
from
'
antd
'
;
import
{
notification
,
Button
,
Popconfirm
}
from
'
antd
'
;
import
ProTable
from
'
@ant-design/pro-table
'
;
import
moment
from
'
moment
'
;
import
_
from
'
lodash
'
;
...
...
@@ -10,6 +10,7 @@ import DetailTable from '../components/detailTable';
import
ProofsModal
from
'
../components/proofsModal
'
;
import
{
getDetail
}
from
'
../../afterSale/appeal/services
'
;
import
AppealDetail
from
'
../../afterSale/components/detail
'
;
import
RecordModal
from
'
../components/recordModal
'
;
export
default
()
=>
{
const
table
=
useRef
();
...
...
@@ -23,7 +24,7 @@ export default () => {
const
[
selectedRow
,
setSelectedRow
]
=
useState
({});
const
[
timeString
,
setTimeString
]
=
useState
({});
const
[
time
,
setTime
]
=
useState
({});
const
[
recordVisible
,
setRecordVisible
]
=
useState
(
false
);
const
viewDetail
=
async
({
serviceNo
})
=>
{
const
data
=
await
orderDetail
({
serviceNo
});
setDetailInfo
(
data
||
[]);
...
...
@@ -90,6 +91,14 @@ export default () => {
},
1000
);
}
};
const
logistics
=
info
=>
{
console
.
log
(
info
);
// eslint-disable-next-line no-unused-expressions
table
.
current
?.
reload
?.();
};
const
recordDetail
=
()
=>
{
setRecordVisible
(
true
);
};
const
columns
=
[
{
title
:
'
审核倒计时
'
,
...
...
@@ -141,9 +150,23 @@ export default () => {
<
Button
key=
"link1"
onClick=
{
()
=>
openAudit
(
r
)
}
className=
"mr10"
type=
"primary"
>
审核
</
Button
>,
<
Popconfirm
title=
"请在48小时内完成物流包裹,确认是否需要进行物流拦截?"
onConfirm=
{
()
=>
logistics
(
r
)
}
okText=
"确认"
cancelText=
"取消"
key=
"pop"
>
<
Button
key=
"link1"
className=
"mr10"
type=
"primary"
>
物流拦截
</
Button
>
</
Popconfirm
>,
<
Button
key=
"link"
onClick=
{
()
=>
viewDetail
(
r
)
}
type=
"primary"
>
订单详情
</
Button
>,
<
Button
key=
"link"
onClick=
{
()
=>
recordDetail
(
r
)
}
type=
"primary"
>
查看记录
</
Button
>,
],
},
];
...
...
@@ -173,6 +196,12 @@ export default () => {
modalVisible=
{
appealDetailModal
}
onCancel=
{
closeModal
}
></
AppealDetail
>
<
RecordModal
visible=
{
recordVisible
}
onCancel=
{
()
=>
{
setRecordVisible
(
false
);
}
}
></
RecordModal
>
</
div
>
);
};
src/pages/AfterSaleManage/components/recordModal.jsx
0 → 100644
View file @
ca5f30a8
import
{
Modal
,
Timeline
}
from
'
antd
'
;
import
React
,
{
Component
}
from
'
react
'
;
class
RecordModal
extends
Component
{
state
=
{};
onCancel
=
()
=>
{
this
.
props
.
onCancel
();
};
render
()
{
const
{
visible
,
data
}
=
this
.
props
;
return
(
<
Modal
title=
"查看记录"
visible=
{
visible
}
onCancel=
{
()
=>
this
.
onCancel
()
}
footer=
{
null
}
width=
"500px"
>
{
data
?.
length
?
data
.
map
((
item
,
index
)
=>
(
// eslint-disable-next-line react/no-array-index-key
<
Timeline
key=
{
`${index}${item.title}`
}
>
{
item
.
detailList
?.
map
((
log
,
i
)
=>
(
// eslint-disable-next-line react/no-array-index-key
<
Timeline
.
Item
color=
{
i
>
0
?
'
gray
'
:
'
blue
'
}
key=
{
i
}
>
<
p
>
{
log
.
desc
}
</
p
>
<
p
>
{
log
.
logisticsTime
}
</
p
>
</
Timeline
.
Item
>
))
}
</
Timeline
>
))
:
'
暂无记录
'
}
</
Modal
>
);
}
}
export
default
RecordModal
;
src/pages/AfterSaleManage/data.js
View file @
ca5f30a8
...
...
@@ -54,6 +54,15 @@ export const columnSticData = [
},
width
:
100
,
},
{
title
:
'
售后类型
'
,
dataIndex
:
'
dealStatus1
'
,
hideInTable
:
true
,
valueEnum
:
{
0
:
'
仅退款
'
,
10
:
'
退货退款
'
,
},
},
{
title
:
'
收货人姓名
'
,
dataIndex
:
'
receiverName
'
,
...
...
src/pages/GoodsManage/SearchForm/index.jsx
View file @
ca5f30a8
...
...
@@ -55,8 +55,8 @@ class goodsManage extends Component {
this
.
props
.
addSpu
();
};
setArea
=
isAll
=>
{
this
.
props
.
setArea
(
isAll
);
setArea
=
(
isAll
,
type
)
=>
{
this
.
props
.
setArea
(
isAll
,
type
);
};
render
()
{
...
...
src/pages/GoodsManage/TempleatModal/index.jsx
View file @
ca5f30a8
...
...
@@ -24,24 +24,12 @@ const TempleatModal = props => {
span
:
16
,
},
};
const
handleOk
=
async
()
=>
{
validateFields
(
async
(
error
,
fieldsValue
)
=>
{
if
(
!
error
)
{
if
(
isType
===
'
distribution
'
)
{
this
.
setAfterAddress
(
fieldsValue
);
}
if
(
isType
===
'
after
'
)
{
this
.
setTemplate
(
fieldsValue
);
}
}
});
};
const
setAfterAddress
=
async
fieldsValue
=>
{
const
data
=
await
getAfterAddress
({
// isAll: isALL,
skuIds
:
selectedRowKeys
,
skuIds
:
selectedRowKeys
||
[],
afterAddressId
:
fieldsValue
.
templateId
.
key
,
});
console
.
log
(
data
);
if
(
data
.
businessCode
===
'
0000
'
)
{
notification
.
success
({
message
:
'
配置成功!
'
});
resetFields
();
...
...
@@ -60,6 +48,18 @@ const TempleatModal = props => {
props
.
onCancel
();
}
};
const
handleOk
=
async
()
=>
{
validateFields
(
async
(
error
,
fieldsValue
)
=>
{
if
(
!
error
)
{
if
(
isType
===
'
after
'
)
{
setAfterAddress
(
fieldsValue
);
}
if
(
isType
===
'
distribution
'
)
{
setTemplate
(
fieldsValue
);
}
}
});
};
const
title
=
()
=>
{
if
(
isType
===
'
distribution
'
)
{
...
...
@@ -70,17 +70,16 @@ const TempleatModal = props => {
}
if
(
isType
===
'
after
'
)
{
if
(
isALL
)
{
return
'
全部
设置不支持配送区域
'
;
return
'
全部
商品售后地址设置
'
;
}
return
'
批量设置不支持配送区域
'
;
return
'
勾选商品售后地址设置
'
;
}
return
''
;
};
useEffect
(()
=>
{},
[]);
return
(
<
Modal
title=
{
title
}
title=
{
title
()
}
visible=
{
visible
}
width=
"500px"
onCancel=
{
props
.
onCancel
}
...
...
@@ -93,13 +92,13 @@ const TempleatModal = props => {
rules
:
[{
required
:
true
,
message
:
'
请选择模板!
'
}],
})(
<
Select
placeholder=
"请选择模板"
labelInValue
allowClear
>
{
isType
===
'
after
'
&&
{
isType
===
'
distribution
'
&&
templateList
.
map
(
item
=>
(
<
Option
label=
{
item
.
templateName
}
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
templateName
}
</
Option
>
))
}
{
isType
===
'
distribution
'
&&
{
isType
===
'
after
'
&&
templateList
.
map
(
item
=>
(
<
Option
label=
{
item
.
addressName
}
value=
{
item
.
id
}
key=
{
item
.
id
}
>
{
item
.
addressName
}
...
...
src/pages/GoodsManage/createModal/index.jsx
View file @
ca5f30a8
...
...
@@ -36,7 +36,7 @@ import {
getBrandList
,
addGoods
,
editGoods
,
get
AfterAddress
,
queryAll
AfterAddress
,
}
from
'
../service
'
;
import
styles
from
'
../style.less
'
;
import
Upload
from
'
../../components/sortablUpload
'
;
...
...
@@ -82,13 +82,10 @@ class goodsManage extends Component {
// 获取售后地址
getAfterAddressData
=
async
()
=>
{
try
{
const
{
data
}
=
await
getAfterAddress
(
);
const
data
=
await
queryAllAfterAddress
();
console
.
log
(
data
);
if
(
data
)
{
this
.
setState
({
afterAddressList
:
data
});
}
}
catch
(
e
)
{
console
.
log
(
e
);
this
.
setState
({
afterAddressList
:
data
.
data
.
records
});
}
};
...
...
@@ -408,6 +405,7 @@ class goodsManage extends Component {
type
:
values
.
productType
,
specs
,
character
:
values
.
character
,
afterAddressId
:
values
.
afterAddressId
,
},
}));
const
data
=
initData
.
id
...
...
src/pages/GoodsManage/index.jsx
View file @
ca5f30a8
...
...
@@ -202,14 +202,16 @@ class goodsManage extends Component {
return
;
}
const
data
=
type
===
'
distribution
'
?
await
getTemplateList
()
:
await
queryAllAfterAddress
();
if
(
data
.
code
===
'
0000
'
&&
data
.
data
.
length
)
{
const
length
=
type
===
'
distribution
'
?
data
.
data
.
length
:
data
.
data
.
records
.
length
;
if
(
data
.
code
===
'
0000
'
&&
length
)
{
this
.
setState
({
templeatModalVisible
:
true
,
isAll
,
templateList
:
data
.
data
,
templateList
:
type
===
'
distribution
'
?
data
.
data
:
data
.
data
.
records
,
isType
:
type
,
});
}
else
{
notification
.
error
({
message
:
'
暂无
模板数据,请先添加模板
'
});
notification
.
error
({
message
:
'
暂无
数据
'
});
}
};
...
...
src/pages/GoodsManage/service.js
View file @
ca5f30a8
...
...
@@ -4,7 +4,7 @@ import config from '../../../config/env.config';
import
{
stringify
}
from
'
qs
'
;
import
_
from
'
lodash
'
;
const
{
goodsApi
}
=
config
;
const
{
goodsApi
,
kdspApi
}
=
config
;
const
headers
=
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
};
...
...
@@ -175,9 +175,16 @@ export async function getTemplateList(params) {
}
// 查询供应商售后地址
export
async
function
queryAllAfterAddress
()
{
return
request
.
get
(
'
/supplier/after/queryAllAfterAddress
'
,
{
prefix
:
goodsApi
,
const
params
=
{
pageSize
:
100
,
pageNo
:
1
,
};
const
data
=
request
.
post
(
'
/api/kdsp/supplier/after-sales-addrs-page
'
,
{
prefix
:
kdspApi
,
data
:
params
,
});
console
.
log
(
data
);
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