|
|
@ -3,7 +3,15 @@ import {Button, Form, Image, ListGroup, Tab, Table, Tabs} from "react-bootstrap" |
|
|
|
import {ManagerActivity, PageProps} from "./entity"; |
|
|
|
import {ManagerActivity, PageProps} from "./entity"; |
|
|
|
import {JSONResponse, Method, request} from "./interface"; |
|
|
|
import {JSONResponse, Method, request} from "./interface"; |
|
|
|
import {API, prefix} from "./api"; |
|
|
|
import {API, prefix} from "./api"; |
|
|
|
import {EmptyBodyTransform, FindActivityRes, FindActivityTransform, PageDataMessage, SimpleMessage} from "./result"; |
|
|
|
import { |
|
|
|
|
|
|
|
EmptyBodyTransform, |
|
|
|
|
|
|
|
FindActivityRes, |
|
|
|
|
|
|
|
FindActivityTransform, |
|
|
|
|
|
|
|
FindTimeScoreRes, |
|
|
|
|
|
|
|
PageDataMessage, |
|
|
|
|
|
|
|
ScoreTransform, |
|
|
|
|
|
|
|
SimpleMessage |
|
|
|
|
|
|
|
} from "./result"; |
|
|
|
import {MyDialog} from "./ui/MyDialog"; |
|
|
|
import {MyDialog} from "./ui/MyDialog"; |
|
|
|
import moment from "moment"; |
|
|
|
import moment from "moment"; |
|
|
|
import {Input} from "./ui/InputGroup"; |
|
|
|
import {Input} from "./ui/InputGroup"; |
|
|
@ -143,7 +151,7 @@ export class Active extends React.Component<any, { |
|
|
|
{active.helpUser != null ? |
|
|
|
{active.helpUser != null ? |
|
|
|
<ListGroup> |
|
|
|
<ListGroup> |
|
|
|
{active.helpUser.map((userId,index) => |
|
|
|
{active.helpUser.map((userId,index) => |
|
|
|
<ListGroup.Item key={'item'+index}>{userId}</ListGroup.Item>)} |
|
|
|
<ListGroup.Item key={'item'+index}>{userId}<Image onClick={()=>this.loadScore(userId,active.activityId)} className="timeScore" src={"money.svg"}/></ListGroup.Item>)} |
|
|
|
</ListGroup>:'无' |
|
|
|
</ListGroup>:'无' |
|
|
|
} |
|
|
|
} |
|
|
|
</td> |
|
|
|
</td> |
|
|
@ -200,4 +208,47 @@ export class Active extends React.Component<any, { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
加载时间币 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private loadScore(userId: string, activityId: number) { |
|
|
|
|
|
|
|
let that=this |
|
|
|
|
|
|
|
request(API.account.timeScore,Method.GET,{ |
|
|
|
|
|
|
|
userId:userId, |
|
|
|
|
|
|
|
activityId:String(activityId) |
|
|
|
|
|
|
|
},new ScoreTransform(),function (res:FindTimeScoreRes) { |
|
|
|
|
|
|
|
switch (res.customResult) { |
|
|
|
|
|
|
|
case SimpleMessage.ok: |
|
|
|
|
|
|
|
if(res.timeScore==null){ |
|
|
|
|
|
|
|
that.setState({ |
|
|
|
|
|
|
|
tipContent:<h3 className="text-center text-danger">该用户没有结算时间币记录</h3> |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
that.setState({ |
|
|
|
|
|
|
|
tipContent: <Table> |
|
|
|
|
|
|
|
<thead> |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<th>结算时间</th> |
|
|
|
|
|
|
|
<th>时间币</th> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</thead> |
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
<tr> |
|
|
|
|
|
|
|
<td>{moment(res.timeScore?.createTime).format("YYYY-MM-DD HH:mm:ss")}</td> |
|
|
|
|
|
|
|
<td>{res.timeScore?.timeScore}</td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
|
|
|
</Table> |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
case SimpleMessage.fail: |
|
|
|
|
|
|
|
that.setState({ |
|
|
|
|
|
|
|
tipContent:<h3 className="text-center text-danger">时间币查询失败,请联系管理员</h3> |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|