Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
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
wuhao
ems3.3
Commits
52481c49
Commit
52481c49
authored
Dec 06, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12061031
parent
f69798e6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
436 additions
and
291 deletions
+436
-291
authRoutes.js
config/authRoutes.js
+12
-13
columns.js
src/pages/repair/outsourcing/columns.js
+24
-24
columns.js
src/pages/repair/track/columns.js
+222
-95
index.jsx
src/pages/repair/track/index.jsx
+178
-159
No files found.
config/authRoutes.js
View file @
52481c49
...
...
@@ -91,19 +91,6 @@ export default [
icon
:
''
,
component
:
'./repair/failure'
,
},
{
name
:
'故障设置'
,
path
:
'/repair/fault'
,
icon
:
''
,
component
:
'./repair/fault'
,
},
{
name
:
'外协工单'
,
path
:
'/repair/outsourcing'
,
icon
:
''
,
component
:
'./repair/outsourcing'
,
},
{
name
:
'维修工单'
,
path
:
'/repair/order'
,
...
...
@@ -116,6 +103,18 @@ export default [
icon
:
''
,
component
:
'./repair/track'
,
},
{
name
:
'外协工单'
,
path
:
'/repair/outsourcing'
,
icon
:
''
,
component
:
'./repair/outsourcing'
,
},
{
name
:
'故障设置'
,
path
:
'/repair/fault'
,
icon
:
''
,
component
:
'./repair/fault'
,
},
],
},
{
...
...
src/pages/repair/outsourcing/columns.js
View file @
52481c49
...
...
@@ -6,8 +6,8 @@ function getcolumns(setdrawer) {
columns
:
[
{
title
:
'外协单号'
,
dataIndex
:
'
repair
OrderNo'
,
key
:
'
repair
OrderNo'
,
dataIndex
:
'
otherUnits
OrderNo'
,
key
:
'
otherUnits
OrderNo'
,
},
{
title
:
'设备编号'
,
...
...
@@ -27,14 +27,14 @@ function getcolumns(setdrawer) {
},
{
title
:
'创建时间'
,
dataIndex
:
'
repair
Time'
,
key
:
'
repair
TimeList'
,
dataIndex
:
'
create
Time'
,
key
:
'
create
TimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'创建人员'
,
dataIndex
:
'
repair
UserName'
,
key
:
'
repair
UserName'
,
dataIndex
:
'
create
UserName'
,
key
:
'
create
UserName'
,
},
{
title
:
'最新外协人员'
,
...
...
@@ -43,8 +43,8 @@ function getcolumns(setdrawer) {
},
{
title
:
'来源单号'
,
dataIndex
:
'
repair
No'
,
key
:
'
repair
No'
,
dataIndex
:
'
dataSources
No'
,
key
:
'
dataSources
No'
,
},
{
title
:
'工单状态'
,
...
...
@@ -76,13 +76,13 @@ function getcolumns(setdrawer) {
},
},
{
tab
:
'
我的待办
'
,
key
:
'
1
'
,
tab
:
'
未完成
'
,
key
:
'
2
'
,
columns
:
[
{
title
:
'外协单号'
,
dataIndex
:
'
repair
OrderNo'
,
key
:
'
repair
OrderNo'
,
dataIndex
:
'
otherUnits
OrderNo'
,
key
:
'
otherUnits
OrderNo'
,
},
{
title
:
'设备编号'
,
...
...
@@ -102,8 +102,8 @@ function getcolumns(setdrawer) {
},
{
title
:
'创建时间'
,
dataIndex
:
'
repair
Time'
,
key
:
'
repair
TimeList'
,
dataIndex
:
'
create
Time'
,
key
:
'
create
TimeList'
,
valueType
:
'dateTimeRange'
,
},
{
...
...
@@ -118,8 +118,8 @@ function getcolumns(setdrawer) {
},
{
title
:
'来源单号'
,
dataIndex
:
'
repair
No'
,
key
:
'
repair
No'
,
dataIndex
:
'
dataSources
No'
,
key
:
'
dataSources
No'
,
},
{
title
:
'工单状态'
,
...
...
@@ -151,13 +151,13 @@ function getcolumns(setdrawer) {
},
},
{
tab
:
'
我的待办
'
,
key
:
'
1
'
,
tab
:
'
已完成
'
,
key
:
'
3
'
,
columns
:
[
{
title
:
'外协单号'
,
dataIndex
:
'
repair
OrderNo'
,
key
:
'
repair
OrderNo'
,
dataIndex
:
'
otherUnits
OrderNo'
,
key
:
'
otherUnits
OrderNo'
,
},
{
title
:
'设备编号'
,
...
...
@@ -177,8 +177,8 @@ function getcolumns(setdrawer) {
},
{
title
:
'创建时间'
,
dataIndex
:
'
repair
Time'
,
key
:
'
repair
TimeList'
,
dataIndex
:
'
create
Time'
,
key
:
'
create
TimeList'
,
valueType
:
'dateTimeRange'
,
},
{
...
...
@@ -193,8 +193,8 @@ function getcolumns(setdrawer) {
},
{
title
:
'来源单号'
,
dataIndex
:
'
repair
No'
,
key
:
'
repair
No'
,
dataIndex
:
'
dataSources
No'
,
key
:
'
dataSources
No'
,
},
{
title
:
'工单状态'
,
...
...
src/pages/repair/track/columns.js
View file @
52481c49
function
getcolumns
(
setdrawer
)
{
return
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
tab
:
'我的待办'
,
key
:
'1'
,
columns
:
[
{
title
:
'追踪单号'
,
dataIndex
:
'repairOrderNo'
,
key
:
'repairOrderNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'用户名
'
,
dataIndex
:
'accou
ntName'
,
formItemProps
:
{
rules
:
[
title
:
'设备名称
'
,
dataIndex
:
'equipme
ntName'
,
key
:
'equipmentName'
,
},
{
required
:
false
,
message
:
'此项为必填项'
,
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'创建人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'下次追踪日期'
,
dataIndex
:
'nextTrackDate'
,
key
:
'nextTrackDateList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'最新追踪人员'
,
dataIndex
:
'newRepairUserName'
,
key
:
'newRepairUserName'
,
},
{
title
:
'来源单号'
,
dataIndex
:
'dataSourcesNo'
,
key
:
'dataSourcesNo'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
valueType
:
'radio'
,
options
:
[
{
label
:
'待维修'
,
value
:
'1'
,
},
{
label
:
'维修中'
,
value
:
'2'
,
},
],
},
initialValue
:
'默认值'
,
hideInForm
:
false
,
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
?.((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
}}
>
{
text
}
<
/a
>
);
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
false
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryNoFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
{
title
:
'姓名'
,
dataIndex
:
'userName'
,
key
:
'userId'
,
hideInForm
:
{
accountName
:
{
reverse
:
[
'1'
,
'2'
,
'5'
],
tab
:
'未完成'
,
key
:
'2'
,
columns
:
[
{
title
:
'追踪单号'
,
dataIndex
:
'repairOrderNo'
,
key
:
'repairOrderNo'
,
},
remark
:
[
'3'
],
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
search
:
false
,
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'额外信息'
,
valueType
:
'split'
,
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
formItemProps
:
{
rules
:
[
title
:
'创建时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
required
:
false
,
message
:
'此项为必填项'
,
title
:
'创建人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
],
{
title
:
'最新外协人员'
,
dataIndex
:
'newRepairUserName'
,
key
:
'newRepairUserName'
,
},
search
:
false
,
{
title
:
'来源单号'
,
dataIndex
:
'repairNo'
,
key
:
'repairNo'
,
},
{
title
:
'邮箱'
,
dataIndex
:
'mailNo'
,
formItemProps
:
{
rules
:
[
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
valueType
:
'radio'
,
options
:
[
{
label
:
'待维修'
,
value
:
'1'
,
},
{
required
:
false
,
message
:
'此项为必填项'
,
label
:
'维修中'
,
value
:
'2'
,
},
],
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
false
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryNoFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
{
tab
:
'已完成'
,
key
:
'3'
,
columns
:
[
{
title
:
'追踪单号'
,
dataIndex
:
'repairOrderNo'
,
key
:
'repairOrderNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
search
:
false
,
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'故障描述'
,
dataIndex
:
'faultDescription'
,
key
:
'faultDescription'
,
valueType
:
'textarea'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'repairTime'
,
key
:
'repairTimeList'
,
valueType
:
'dateTimeRange'
,
},
{
title
:
'创建人员'
,
dataIndex
:
'repairUserName'
,
key
:
'repairUserName'
,
},
{
title
:
'最新外协人员'
,
dataIndex
:
'newRepairUserName'
,
key
:
'newRepairUserName'
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
valueType
:
'editor'
,
search
:
false
,
colProps
:
{
span
:
24
},
initialValue
:
'<p>Hello <b>World!</b></p>'
,
title
:
'来源单号'
,
dataIndex
:
'repairNo'
,
key
:
'repairNo'
,
},
{
title
:
'上传样式-图片'
,
dataIndex
:
'uploadImage'
,
key
:
'uploadImage'
,
valueType
:
'uploadImage'
,
fieldProps
:
{
limit
:
2
,
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
valueType
:
'radio'
,
options
:
[
{
label
:
'待维修'
,
value
:
'1'
,
},
formItemProps
:
{
rules
:
[
{
required
:
false
,
message
:
'此项为必填项'
,
label
:
'维修中'
,
value
:
'2'
,
},
],
},
],
pathconfig
:
{
enableadd
:
true
,
enableedit
:
false
,
enabledelete
:
true
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/repair/umFailureRepair/queryNoFinishList'
,
delete
:
'/repair/umFailureRepair/deleteById'
,
detail
:
''
,
},
},
];
}
export
default
getcolumns
;
src/pages/repair/track/index.jsx
View file @
52481c49
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
/* 追踪工单
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-06 09:38:18
*/
const
pathconfig
=
{
"enableadd"
:
true
,
"enableedit"
:
true
,
"enabledelete"
:
true
,
"enabledetail"
:
true
,
"add"
:
""
,
"edit"
:
""
,
"list"
:
""
,
"delete"
:
""
,
"detail"
:
""
};
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
Track
(
props
)
{
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
...
...
@@ -105,53 +101,74 @@ import * as React from 'react';
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
);
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
},
[
]);
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
},
[
activeTabKey
]);
const
selectType
=
(
type
)
=>
{
switch
(
type
)
{
case
'add'
:
return
;
default
:
break
;
}
};
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"追踪工单"
pagetitle=
{
<
h3
className=
"page-title"
>
追踪工单
</
h3
>
}
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
val
:
'only'
,
type
:
'add'
,
}));
},
},
}
}
tabList=
{
getcolumns
()
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
(
key
)
=>
{
setactiveTabKey
(
key
);
}
}
/>
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -166,9 +183,11 @@ import * as React from 'react';
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
>
{
selectType
(
drawer
?.
type
)
}
</
DrawerPro
>
</
div
>
);
}
}
export
default
Track
;
\ No newline at end of file
export
default
Failure
;
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