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