Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
陈智峰
jinfa-platform
Commits
5b876107
Commit
5b876107
authored
Dec 24, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复内外部状态字段
parent
e035996a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
254 additions
and
252 deletions
+254
-252
index.tsx
.../afterService/components/OuterCirculationRecord/index.tsx
+90
-89
index.tsx
...fterService/repairManage/components/FlowRecords/index.tsx
+164
-163
No files found.
src/pages/afterService/components/OuterCirculationRecord/index.tsx
View file @
5b876107
/*
/*
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-09-29 15:04:46
* @Date: 2020-09-29 15:04:46
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
11 16:39:17
* @LastEditTime: 2020-12-
24 10:55:51
* @Description: 外部流转记录
* @Description: 外部流转记录
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
REPAIR_OUTER_STATUS
}
from
'@/constants'
;
import
{
REPAIR_OUTER_STATUS
}
from
'@/constants'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
REPAIR_OUTER_STATUS_TAG_MAP
}
from
'../../constants'
;
import
{
REPAIR_OUTER_STATUS_TAG_MAP
}
from
'../../constants'
;
interface
OuterCirculationRecordProps
{
interface
OuterCirculationRecordProps
{
dataSource
:
{
dataSource
:
{
roleName
:
string
,
roleName
:
string
,
status
:
number
|
string
,
status
:
number
|
string
,
operate
:
string
,
operate
:
string
,
operateTime
:
string
,
operateTime
:
string
,
opinion
:
string
,
opinion
:
string
,
}[];
}[];
onPaginationChange
?:
(
page
:
number
,
size
:
number
)
=>
void
;
onPaginationChange
?:
(
page
:
number
,
size
:
number
)
=>
void
;
};
};
const
OuterCirculationRecord
:
React
.
FC
<
OuterCirculationRecordProps
>
=
({
const
OuterCirculationRecord
:
React
.
FC
<
OuterCirculationRecordProps
>
=
({
dataSource
=
[],
dataSource
=
[],
onPaginationChange
,
onPaginationChange
,
})
=>
{
})
=>
{
const
columns
:
EditableColumns
[]
=
[
const
columns
:
EditableColumns
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'order'
,
dataIndex
:
'order'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
},
},
{
{
title
:
'操作角色'
,
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'状态'
,
title
:
'状态'
,
dataIndex
:
'status
Name'
,
dataIndex
:
'status
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
status
]
}
title=
{
text
}
/>
render
:
(
text
,
record
)
=>
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
status
Code
]
}
title=
{
text
}
/>
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
},
},
{
{
title
:
'操作时间'
,
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'审核意见'
,
title
:
'审核意见'
,
dataIndex
:
'opinion'
,
dataIndex
:
'opinion'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
},
},
];
];
const
handlePaginationChange
=
(
page
,
size
)
=>
{
const
handlePaginationChange
=
(
page
,
size
)
=>
{
if
(
onPaginationChange
)
{
if
(
onPaginationChange
)
{
onPaginationChange
(
page
,
size
);
onPaginationChange
(
page
,
size
);
}
}
};
};
return
(
return
(
<
MellowCard
<
MellowCard
title=
"外部流转记录"
title=
"外部流转记录"
>
>
<
PolymericTable
<
PolymericTable
rowKey=
"operateTime"
rowKey=
"operateTime"
dataSource=
{
dataSource
}
dataSource=
{
dataSource
}
columns=
{
columns
}
columns=
{
columns
}
loading=
{
false
}
loading=
{
false
}
pagination=
{
null
}
pagination=
{
null
}
/>
/>
</
MellowCard
>
</
MellowCard
>
);
);
};
};
export
default
OuterCirculationRecord
;
export
default
OuterCirculationRecord
;
\ No newline at end of file
src/pages/afterService/repairManage/components/FlowRecords/index.tsx
View file @
5b876107
/*
/*
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-04 18:22:57
* @Date: 2020-11-04 18:22:57
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
11 17:15:08
* @LastEditTime: 2020-12-
24 10:55:25
* @Description: 内、外部流转记录
* @Description: 内、外部流转记录
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
import
{
Tabs
,
Tabs
,
Badge
,
Badge
,
}
from
'antd'
;
}
from
'antd'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
import
{
REPAIR_OUTER_STATUS_TAG_MAP
,
REPAIR_OUTER_STATUS_TAG_MAP
,
REPAIR_INNER_STATUS_BADGE_MAP
,
REPAIR_INNER_STATUS_BADGE_MAP
,
}
from
'../../../constants'
;
}
from
'../../../constants'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
export
interface
InnerHistoryItem
{
export
interface
InnerHistoryItem
{
step
:
number
;
step
:
number
;
operator
:
string
;
operator
:
string
;
department
:
string
;
department
:
string
;
jobTitle
:
string
;
jobTitle
:
string
;
status
:
string
;
status
:
string
;
operate
:
string
;
operate
:
string
;
operateTime
:
string
,
operateTime
:
string
,
opinion
:
string
;
opinion
:
string
;
};
};
export
interface
OuterHistoryItem
{
export
interface
OuterHistoryItem
{
roleName
:
string
;
roleName
:
string
;
status
:
string
;
status
:
string
;
operate
:
string
;
operate
:
string
;
operateTime
:
string
;
operateTime
:
string
;
opinion
:
string
;
opinion
:
string
;
};
};
interface
FlowRecordsProps
{
interface
FlowRecordsProps
{
outerHistory
?:
OuterHistoryItem
[];
outerHistory
?:
OuterHistoryItem
[];
innerHistory
:
InnerHistoryItem
[];
innerHistory
:
InnerHistoryItem
[];
};
};
const
FlowRecords
:
React
.
FC
<
FlowRecordsProps
>
=
({
outerHistory
=
[],
innerHistory
})
=>
{
const
FlowRecords
:
React
.
FC
<
FlowRecordsProps
>
=
({
outerHistory
=
[],
innerHistory
})
=>
{
const
outerColumns
:
EditableColumns
[]
=
[
const
outerColumns
:
EditableColumns
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'index'
,
dataIndex
:
'index'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
render
:
(
_
,
record
,
index
)
=>
index
+
1
,
},
},
{
{
title
:
'操作角色'
,
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'状态'
,
title
:
'状态'
,
dataIndex
:
'status
Name'
,
dataIndex
:
'status
'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
status
]
}
title=
{
text
}
/>
<
StatusTag
type=
{
REPAIR_OUTER_STATUS_TAG_MAP
[
record
.
status
Code
]
}
title=
{
text
}
/>
),
),
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'操作时间'
,
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
},
},
{
{
title
:
'审核意见'
,
title
:
'审核意见'
,
dataIndex
:
'opinion'
,
dataIndex
:
'opinion'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
},
},
];
];
const
innerColumns
:
EditableColumns
[]
=
[
const
innerColumns
:
EditableColumns
[]
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
dataIndex
:
'step'
,
dataIndex
:
'step'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'操作人'
,
title
:
'操作人'
,
dataIndex
:
'operator'
,
dataIndex
:
'operator'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'部门'
,
title
:
'部门'
,
dataIndex
:
'department'
,
dataIndex
:
'department'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'职位'
,
title
:
'职位'
,
dataIndex
:
'jobTitle'
,
dataIndex
:
'jobTitle'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'状态'
,
title
:
'状态'
,
dataIndex
:
'statusName'
,
dataIndex
:
'statusName'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
Badge
color=
{
REPAIR_INNER_STATUS_BADGE_MAP
[
record
.
status
]
}
text=
{
text
}
/>
<
Badge
color=
{
REPAIR_INNER_STATUS_BADGE_MAP
[
record
.
status
]
}
text=
{
text
}
/>
),
),
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'操作时间'
,
title
:
'操作时间'
,
dataIndex
:
'operateTime'
,
dataIndex
:
'operateTime'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
},
},
{
{
title
:
'审核意见'
,
title
:
'审核意见'
,
dataIndex
:
'opinion'
,
dataIndex
:
'opinion'
,
align
:
'center'
,
align
:
'center'
,
ellipsis
:
true
,
ellipsis
:
true
,
},
},
];
];
return
(
return
(
<
MellowCard
>
<
MellowCard
>
<
Tabs
onChange=
{
()
=>
{}
}
>
<
Tabs
onChange=
{
()
=>
{}
}
>
{
outerHistory
?
(
{
outerHistory
?
(
<
Tabs
.
TabPane
tab=
"外部流转记录"
key=
"1"
>
<
Tabs
.
TabPane
tab=
"外部流转记录"
key=
"1"
>
<
PolymericTable
<
PolymericTable
rowKey=
"operateTime"
rowKey=
"operateTime"
dataSource=
{
outerHistory
}
dataSource=
{
outerHistory
}
columns=
{
outerColumns
}
columns=
{
outerColumns
}
loading=
{
false
}
loading=
{
false
}
pagination=
{
null
}
pagination=
{
null
}
/>
/>
</
Tabs
.
TabPane
>
</
Tabs
.
TabPane
>
)
:
null
}
)
:
null
}
<
Tabs
.
TabPane
tab=
"内部流转记录"
key=
"2"
>
<
Tabs
.
TabPane
tab=
"内部流转记录"
key=
"2"
>
<
PolymericTable
<
PolymericTable
rowKey=
"operateTime"
rowKey=
"operateTime"
dataSource=
{
innerHistory
}
dataSource=
{
innerHistory
}
columns=
{
innerColumns
}
columns=
{
innerColumns
}
loading=
{
false
}
loading=
{
false
}
pagination=
{
null
}
pagination=
{
null
}
/>
/>
</
Tabs
.
TabPane
>
</
Tabs
.
TabPane
>
</
Tabs
>
</
Tabs
>
</
MellowCard
>
</
MellowCard
>
);
);
};
};
export
default
FlowRecords
;
export
default
FlowRecords
;
\ No newline at end of file
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