add owner's info in ticketdetail
parent
7f345af777
commit
d525f0288b
|
|
@ -1 +1,6 @@
|
|||
export type FixStatus = 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export type Info = {
|
||||
phone: string;
|
||||
name: string;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ export default class DetailFramework extends Component<
|
|||
current: true,
|
||||
notelist: true,
|
||||
showAllNotes: true,
|
||||
info: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -102,6 +103,48 @@ export default class DetailFramework extends Component<
|
|||
<View></View>
|
||||
),
|
||||
description: this.props.isInfoShow['description'] ? (
|
||||
this.props.isInfoShow['info'] ? (
|
||||
<View
|
||||
className='at-row'
|
||||
style={{ paddingTop: 10, paddingBottom: 10, width: '100%' }}
|
||||
>
|
||||
<View
|
||||
className='at-col'
|
||||
style={{
|
||||
marginLeft: 10,
|
||||
paddingRight: 5,
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
width: '50%',
|
||||
}}
|
||||
>
|
||||
<AtCard title={pt.get().ticketDetail.descTitle}>
|
||||
<View className='at-article__h3'>
|
||||
{this.state.ticketInfo.description}
|
||||
</View>
|
||||
</AtCard>
|
||||
</View>
|
||||
<View
|
||||
className='at-col'
|
||||
style={{
|
||||
marginLeft: 5,
|
||||
paddingRight: 10,
|
||||
marginTop: 10,
|
||||
marginBottom: 10,
|
||||
width: '50%',
|
||||
}}
|
||||
>
|
||||
<AtCard title={pt.get().ticketDetail.infoTitle}>
|
||||
<View className='at-article__h3'>
|
||||
{this.state.ticketInfo.info.name}
|
||||
</View>
|
||||
<View className='at-article__h3'>
|
||||
{this.state.ticketInfo.info.phone}
|
||||
</View>
|
||||
</AtCard>
|
||||
</View>
|
||||
</View>
|
||||
) : (
|
||||
<View style={{ marginTop: 10, marginBottom: 10 }}>
|
||||
<AtCard title={pt.get().ticketDetail.descTitle}>
|
||||
<View className='at-article__h3'>
|
||||
|
|
@ -109,6 +152,7 @@ export default class DetailFramework extends Component<
|
|||
</View>
|
||||
</AtCard>
|
||||
</View>
|
||||
)
|
||||
) : (
|
||||
<View></View>
|
||||
),
|
||||
|
|
|
|||
|
|
@ -243,6 +243,7 @@ export default class TicketDetail extends Component<{}, TicketDetailState> {
|
|||
device: true,
|
||||
createdTime: true,
|
||||
description: true,
|
||||
info: wechatUser.getAccess() ? true : false,
|
||||
current: true,
|
||||
notelist: true,
|
||||
showAllNotes: true,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { FixStatus } from '@/common';
|
||||
import { FixStatus, Info } from '@/common';
|
||||
|
||||
export class TicketInfo {
|
||||
id: number;
|
||||
|
|
@ -8,6 +8,7 @@ export class TicketInfo {
|
|||
description: string;
|
||||
createdTime: moment.Moment;
|
||||
status: FixStatus;
|
||||
info: Info;
|
||||
}
|
||||
|
||||
export class TicketNote {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ export interface TicketDetailText {
|
|||
statusModifyPrefix: string;
|
||||
statusModifyMessage: Map<StatusStr, string>;
|
||||
descTitle: string;
|
||||
infoTitle: string;
|
||||
tookAway: string;
|
||||
addToOreo: string;
|
||||
addNote: string;
|
||||
|
|
@ -48,6 +49,7 @@ export const ticketDetailZhCn: TicketDetailText = {
|
|||
['5', '维修成功已取回'],
|
||||
]),
|
||||
descTitle: '问题描述',
|
||||
infoTitle: '机主信息',
|
||||
tookAway: '已取回',
|
||||
addToOreo: '加入 Oreo',
|
||||
addNote: '添加评论',
|
||||
|
|
@ -86,6 +88,7 @@ export const ticketDetailEnUs: TicketDetailText = {
|
|||
['5', 'Ticket finished'],
|
||||
]),
|
||||
descTitle: 'Problem description',
|
||||
infoTitle: 'Contact the owner',
|
||||
tookAway: 'Already retrieved',
|
||||
addToOreo: 'Add to Oreo',
|
||||
addNote: 'Comment',
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ export function getTicketInfo(that: DetailFramework, id: number) {
|
|||
description: data.description,
|
||||
createdTime: moment(data.createdTime as string),
|
||||
status: data.status,
|
||||
info: {
|
||||
phone: data.phone,
|
||||
name: data.owner,
|
||||
},
|
||||
};
|
||||
const notes: Array<TicketNote> = [];
|
||||
data.notes.map((item) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue