Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Maple
TOSTUMI
Commits
9a6d7464
Commit
9a6d7464
authored
Sep 08, 2020
by
MrShi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev分支,订单模块
parent
a4904564
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
44 deletions
+58
-44
proxy.ts
config/proxy.ts
+4
-4
orderManagement.ts
src/models/orderManagement.ts
+8
-1
OrderManagement.tsx
src/pages/OrderManagement/OrderManagement.tsx
+37
-39
orderManagement.ts
src/services/orderManagement.ts
+9
-0
No files found.
config/proxy.ts
View file @
9a6d7464
...
...
@@ -86,15 +86,15 @@ export default {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
'/tos/'
:
{
/*
'/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},
/*
'/tos/': {
},
*/
'/tos/'
:
{
target
:
'http://localhost:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
*/
},
},
};
src/models/orderManagement.ts
View file @
9a6d7464
import
{
getAdvertisement
,
delAdvertisement
,
saveAdvertisement
,
quitAndUserAd
,
uploadApk
,
checkVideo
}
from
'@/services/orderManagement'
;
import
{
get
Order
,
get
Advertisement
,
delAdvertisement
,
saveAdvertisement
,
quitAndUserAd
,
uploadApk
,
checkVideo
}
from
'@/services/orderManagement'
;
export
default
{
namespace
:
'orderManagementModel'
,
...
...
@@ -6,6 +6,13 @@ export default{
data
:
[],
},
effects
:
{
*
getOrder
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getOrder
,
payload
);
yield
put
({
type
:
"getAd"
,
});
if
(
callback
)
callback
(
response
);
},
*
getAdvertisement
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAdvertisement
,
payload
);
yield
put
({
...
...
src/pages/OrderManagement/OrderManagement.tsx
View file @
9a6d7464
...
...
@@ -221,21 +221,21 @@ class OrderManagement extends React.Component {
userPhone
:
"18813787835"
};
this
.
props
.
dispatch
({
type
:
'
tUModel/getTosUs
er'
,
type
:
'
orderManagementModel/getOrd
er'
,
payload
:
params
,
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
/*
this.setState({
data: res.rows,
total: res.total,
})
//
if(res.error_code == "0000"){
//
this.setState({
//
data: res.data.rows,
//
total: res.data.total,
//
})
//
}
})
*/
if
(
res
.
error_code
==
"0000"
){
this
.
setState
({
data
:
res
.
data
.
rows
,
total
:
res
.
data
.
total
,
})
}
if
(
res
.
error_code
==
"0001"
){
alert
(
res
.
error_msg
);
...
...
@@ -492,47 +492,45 @@ class OrderManagement extends React.Component {
/*--------------------------------------*/
//表格列名
columns
=
[
{
title
:
'Service Community'
,
dataIndex
:
'communityName'
,
key
:
'communityName'
,
},
{
title
:
'User Name'
,
dataIndex
:
'owerName'
,
key
:
'owerName'
,
dataIndex
:
'ow
n
erName'
,
key
:
'ow
n
erName'
,
},
{
title
:
'
Project
'
,
dataIndex
:
'
owerPhon
e'
,
key
:
'
owerPhon
e'
,
title
:
'
Service Type
'
,
dataIndex
:
'
serviceTyp
e'
,
key
:
'
serviceTyp
e'
,
},
{
title
:
'
Affiliated Uni
t'
,
dataIndex
:
'
buildingNumber
'
,
key
:
'
buildingNumber
'
,
title
:
'
Service Conten
t'
,
dataIndex
:
'
serviceContent
'
,
key
:
'
serviceContent
'
,
},
{
title
:
'User Status'
,
dataIndex
:
'enable'
,
key
:
'enable'
,
title
:
'Order Time'
,
dataIndex
:
'orderSendTime'
,
key
:
'orderSendTime'
,
},
{
title
:
'Appointment'
,
dataIndex
:
'orderFinishTime'
,
key
:
'orderFinishTime'
,
},
{
title
:
'Status'
,
dataIndex
:
'orderStatus'
,
key
:
'orderStatus'
,
render
:
(
text
,
record
)
=>
(
<
span
>
{
record
.
enable
==
'1'
?
"注册"
:
"未注册
"
}
</
span
>
<
span
>
{
record
.
orderStatus
==
'0'
?
"已发单"
:
"待上门
"
}
</
span
>
),
/* render: (text, record) => (
<>
{record.map(enable => {
let color = 'green';
if (enable === '1') {
color = 'volcano';
}
if (enable === '0') {
color = 'geekblue';
}
return (
<Tag color={color} key={enable}>
{enable.toUpperCase()}
</Tag>
);
}
</>
),*/
},
...
...
src/services/orderManagement.ts
View file @
9a6d7464
import
request
from
'@/utils/request'
;
export
async
function
getOrder
(
params
)
{
return
request
(
'/tos/tosOrder/get'
,
{
method
:
'POST'
,
data
:
params
,
});
}
export
async
function
getAdvertisement
(
params
)
{
return
request
(
'/api/ad/get'
,
{
method
:
'POST'
,
...
...
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