Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
a454ef41
提交
a454ef41
authored
5月 06, 2019
作者:
sin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 添加 退货订单列表 未完成
上级
87ab3a6c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
172 行增加
和
6 行删除
+172
-6
orderRefunds.js
admin-web/src/models/orderRefunds/orderRefunds.js
+35
-0
OrderRefundsList.js
admin-web/src/pages/OrderRefunds/OrderRefundsList.js
+115
-3
TableSearch.js
admin-web/src/pages/OrderRefunds/TableSearch.js
+2
-3
orderRefunds.js
admin-web/src/services/orderRefunds.js
+15
-0
dictionary.js
admin-web/src/utils/dictionary.js
+5
-0
没有找到文件。
admin-web/src/models/orderRefunds/orderRefunds.js
0 → 100644
浏览文件 @
a454ef41
import
{
list
}
from
'../../services/orderRefunds'
;
export
default
{
namespace
:
'orderRefunds'
,
state
:
{
index
:
0
,
totalCount
:
0
,
pageSize
:
20
,
list
:
[],
},
effects
:
{
*
list
({
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
list
,
payload
);
yield
put
({
type
:
'listSuccess'
,
payload
:
response
.
data
,
});
},
},
reducers
:
{
listSuccess
(
state
,
{
payload
})
{
const
{
index
,
totalCount
,
pageSize
,
data
}
=
payload
;
return
{
...
state
,
index
,
totalCount
,
pageSize
,
list
:
data
,
};
},
},
};
admin-web/src/pages/OrderRefunds/OrderRefundsList.js
浏览文件 @
a454ef41
import
React
,
{
PureComponent
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
Card
,
Tabs
}
from
'antd'
;
import
moment
from
'moment'
;
import
{
Card
,
Tabs
,
Table
}
from
'antd'
;
import
PageHeaderWrapper
from
'../../components/PageHeaderWrapper'
;
import
DictionaryText
from
'../../components/Dictionary/DictionaryText'
;
import
TableSearch
from
'./TableSearch'
;
import
styles
from
'../List/TableList.less'
;
import
dictionary
from
'../../utils/dictionary'
;
/**
* 订单售后列表
*/
@
connect
(({
loading
})
=>
({
loading
:
loading
.
models
.
orderList
,
@
connect
(({
orderRefunds
,
loading
})
=>
({
orderRefunds
,
loading
:
loading
.
models
.
orderRefunds
,
}))
class
OrderRefundsList
extends
PureComponent
{
componentDidMount
()
{
// 查询 list
this
.
queryList
({
index
:
1
});
}
queryList
=
({
index
=
0
,
pageSize
=
10
},
searchParams
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'orderRefunds/list'
,
payload
:
{
index
,
pageSize
,
...
searchParams
,
},
});
};
handleTabsChange
=
value
=>
{
console
.
log
(
value
);
};
handleTableChange
=
pagination
=>
{
const
{
pageSize
,
current
}
=
pagination
;
this
.
queryList
({
pageSize
,
index
:
current
});
};
render
()
{
const
{
orderRefunds
}
=
this
.
props
;
const
{
list
,
totalCount
,
index
,
pageSize
}
=
orderRefunds
;
const
columns
=
[
{
title
:
'服务编号'
,
dataIndex
:
'serviceNumber'
,
key
:
'serviceNumber'
,
},
{
title
:
'服务类型'
,
dataIndex
:
'serviceType'
,
key
:
'serviceType'
,
render
(
serviceType
)
{
return
(
<
DictionaryText
dicKey
=
{
dictionary
.
ORDER_RETURN_SERVICE_TYPE
}
dicValue
=
{
serviceType
}
/
>
);
},
},
{
title
:
'退货原因'
,
dataIndex
:
'reason'
,
key
:
'reason'
,
render
(
reason
)
{
return
<
DictionaryText
dicKey
=
{
dictionary
.
ORDER_RETURN_REASON
}
dicValue
=
{
reason
}
/>
;
},
},
{
title
:
'备注'
,
dataIndex
:
'describe'
,
key
:
'describe'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
(
status
)
{
return
<
DictionaryText
dicKey
=
{
dictionary
.
ORDER_RETURN_STATUS
}
dicValue
=
{
status
}
/>
;
},
},
{
title
:
'同意时间'
,
dataIndex
:
'approvalTime'
,
key
:
'approvalTime'
,
render
(
approvalTime
)
{
if
(
approvalTime
)
{
return
<
div
>
{
moment
(
approvalTime
).
format
(
'YYYY-MM-DD HH:mm'
)}
<
/div>
;
}
return
<
div
>
无
<
/div>
;
},
},
{
title
:
'申请时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
render
(
createTime
)
{
return
<
div
>
{
moment
(
createTime
).
format
(
'YYYY-MM-DD HH:mm'
)}
<
/div>
;
},
},
{
title
:
'操作'
,
render
()
{
return
(
<
div
>
<
a
>
同意
<
/a
>
<
/div
>
);
},
},
];
const
pagination
=
{
total
:
totalCount
,
index
,
pageSize
,
};
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
@@ -30,6 +134,14 @@ class OrderRefundsList extends PureComponent {
<
Tabs
.
TabPane
tab
=
"已处理"
key
=
{
2
}
/
>
<
Tabs
.
TabPane
tab
=
"已完成"
key
=
{
4
}
/
>
<
/Tabs
>
<
Table
rowKey
=
"id"
dataSource
=
{
list
}
columns
=
{
columns
}
pagination
=
{
pagination
}
onChange
=
{
this
.
handleTableChange
}
/
>
<
/Card
>
<
/PageHeaderWrapper
>
);
...
...
admin-web/src/pages/OrderRefunds/TableSearch.js
浏览文件 @
a454ef41
...
...
@@ -10,7 +10,6 @@ const FormItem = Form.Item;
*/
const
TableSearch
=
Form
.
create
()(
props
=>
{
const
{
getFieldDecorator
}
=
props
.
form
;
console
.
log
(
'props.form'
,
props
.
form
);
function
onSubmit
()
{}
...
...
@@ -20,8 +19,8 @@ const TableSearch = Form.create()(props => {
<
Form
onSubmit
=
{
onSubmit
}
layout
=
"inline"
>
<
Row
gutter
=
{{
md
:
8
,
lg
:
24
,
xl
:
48
}}
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
<
FormItem
label
=
"订单
id
"
>
{
getFieldDecorator
(
'id'
)(
<
Input
placeholder
=
"请输入订单
id
"
/>
)}
<
FormItem
label
=
"订单
ID
"
>
{
getFieldDecorator
(
'id'
)(
<
Input
placeholder
=
"请输入订单
ID
"
/>
)}
<
/FormItem
>
<
/Col
>
<
Col
md
=
{
8
}
sm
=
{
24
}
>
...
...
admin-web/src/services/orderRefunds.js
0 → 100644
浏览文件 @
a454ef41
import
{
stringify
}
from
'@/utils/request.qs'
;
import
request
from
'@/utils/request'
;
// order
export
async
function
list
(
params
)
{
return
request
(
`/order-api/admins/order_return/list?
${
stringify
(
params
)}
`
,
{
method
:
'GET'
,
});
}
export
async
function
orderPage
(
params
)
{
return
request
(
`/order-api/admins/order/page?
${
stringify
(
params
)}
`
,
{
method
:
'GET'
,
});
}
admin-web/src/utils/dictionary.js
浏览文件 @
a454ef41
...
...
@@ -5,6 +5,11 @@ const DictionaryConstants = {
ORDER_STATUS
:
'order_status'
,
ORDER_CANCEL_REASONS
:
'order_cancel_reasons'
,
LOGISTICS_COMPANY
:
'logistics_company'
,
// order return
ORDER_RETURN_STATUS
:
'order_return_status'
,
ORDER_RETURN_REASON
:
'order_return_reason'
,
ORDER_RETURN_SERVICE_TYPE
:
'order_return_service_type'
,
};
export
default
DictionaryConstants
;
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论