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
72fc86d5
Commit
72fc86d5
authored
Feb 08, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点检计划
parent
fd466937
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
460 additions
and
335 deletions
+460
-335
index.jsx
src/pages/check/order/index.jsx
+8
-11
index.jsx
src/pages/check/plan/index.jsx
+110
-91
columns.js
src/pages/check/standard/columns.js
+25
-0
index.jsx
src/pages/check/standard/index.jsx
+1
-1
index.jsx
src/pages/check/task/index.jsx
+254
-227
columns.js
src/pages/maintain/criterion/columns.js
+25
-1
index.jsx
src/pages/repair/outsourcing/index.jsx
+3
-2
index.jsx
src/pages/repair/track/index.jsx
+3
-2
columns.js
src/pages/spare/supplier/columns.js
+31
-0
No files found.
src/pages/check/order/index.jsx
View file @
72fc86d5
...
...
@@ -140,10 +140,7 @@ function Order(props) {
title
:
'操作'
,
valueType
:
'option'
,
width
:
120
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
order
(
text
,
row
,
_
,
action
),
close
(
text
,
row
,
_
,
action
)
],
render
:
(
text
,
row
,
_
,
action
)
=>
[
order
(
text
,
row
,
_
,
action
),
close
(
text
,
row
,
_
,
action
)],
});
},
[]);
...
...
@@ -168,7 +165,7 @@ function Order(props) {
hideInForm
:
true
,
},
];
if
(
drawer
?.
val
==
"detail"
)
{
if
(
drawer
?.
val
==
'detail'
)
{
return
[
{
title
:
'计划信息'
,
...
...
@@ -222,7 +219,7 @@ function Order(props) {
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
span
:
2
span
:
2
,
},
{
title
:
'点检项目'
,
...
...
@@ -245,15 +242,15 @@ function Order(props) {
/>
);
},
}
]
}
,
]
;
}
},
[
drawer
?.
val
,
drawer
?.
item
?.
id
]);
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'
}
...
...
@@ -277,7 +274,7 @@ function Order(props) {
/>
<
DrawerPro
fields=
{
drawer
.
val
==
"detail"
?
detailsColumns
:
columns
}
fields=
{
drawer
.
val
==
'detail'
?
detailsColumns
:
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
...
...
@@ -303,4 +300,4 @@ function Order(props) {
);
}
export
default
Order
;
\ No newline at end of file
export
default
Order
;
src/pages/check/plan/index.jsx
View file @
72fc86d5
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
message
,
Popconfirm
,
Switch
}
from
"antd"
;
import
{
message
,
Popconfirm
,
Switch
}
from
'antd'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DetailPro
from
'@/components/DetailPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
...
...
@@ -15,8 +15,8 @@ function Plan(props) {
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
}),
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
1
);
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
...
...
@@ -67,7 +67,7 @@ function Plan(props) {
item
:
row
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
id
:
row
?.
id
id
:
row
?.
id
,
}));
},
}
}
...
...
@@ -121,74 +121,78 @@ function Plan(props) {
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
activeTabKey
==
1
?
defcolumn
.
concat
([
{
title
:
'启用/停用'
,
dataIndex
:
'checkEnable'
,
key
:
'checkEnable'
,
hideInForm
:
true
,
hideInSearch
:
true
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
//"1停用 2启用 *"
return
row
.
checkEnable
==
1
?
<
Popconfirm
title=
"是否开启或停用?"
onConfirm=
{
async
()
=>
{
if
(
row
.
checkEnable
==
1
)
{
await
runAsync
({
url
:
'/check/umEquipmentCheckPlan/enable'
,
params
:
{
id
:
row
.
id
,
checkEnable
:
2
},
});
}
}
}
okText=
"确定"
cancelText=
"取消"
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
>
<
Switch
checked=
{
row
.
checkEnable
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"停用"
defaultChecked=
{
false
}
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
/>
</
Popconfirm
>
:
<
Switch
checked=
{
row
.
checkEnable
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"停用"
defaultChecked=
{
false
}
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
onChange=
{
(
checked
)
=>
{
if
(
checked
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
type
:
"delay"
,
id
:
row
?.
id
}));
}
}
}
/>
;
},
hideInDescriptions
:
true
,
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
close
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
status
==
1
&&
remove
(
text
,
row
,
_
,
action
),
],
}
])
:
defcolumn
;
return
activeTabKey
==
1
?
defcolumn
.
concat
([
{
title
:
'启用/停用'
,
dataIndex
:
'checkEnable'
,
key
:
'checkEnable'
,
hideInForm
:
true
,
hideInSearch
:
true
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
//"1停用 2启用 *"
return
row
.
checkEnable
==
1
?
(
<
Popconfirm
title=
"是否开启或停用?"
onConfirm=
{
async
()
=>
{
if
(
row
.
checkEnable
==
1
)
{
await
runAsync
({
url
:
'/check/umEquipmentCheckPlan/enable'
,
params
:
{
id
:
row
.
id
,
checkEnable
:
2
},
});
}
}
}
okText=
"确定"
cancelText=
"取消"
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
>
<
Switch
checked=
{
row
.
checkEnable
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"停用"
defaultChecked=
{
false
}
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
/>
</
Popconfirm
>
)
:
(
<
Switch
checked=
{
row
.
checkEnable
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"停用"
defaultChecked=
{
false
}
disabled=
{
!
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
}
onChange=
{
(
checked
)
=>
{
if
(
checked
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'启用点检计划'
,
val
:
'detailaddon'
,
type
:
'delay'
,
id
:
row
?.
id
,
}));
}
}
}
/>
);
},
hideInDescriptions
:
true
,
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
(
row
.
status
==
1
||
(
row
.
status
==
2
&&
row
.
checkLoop
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
close
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
status
==
1
&&
remove
(
text
,
row
,
_
,
action
),
],
},
])
:
defcolumn
;
},
[
activeTabKey
]);
const
editDateColumns
=
useMemo
(()
=>
{
...
...
@@ -196,7 +200,10 @@ function Plan(props) {
if
(
drawer
?.
item
?.
status
==
1
)
{
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
}
else
{
if
(
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
).
valueOf
()
>=
dayjs
().
endOf
(
'day'
).
valueOf
())
{
if
(
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
).
valueOf
()
>=
dayjs
().
endOf
(
'day'
).
valueOf
()
)
{
return
current
&&
current
<=
dayjs
(
drawer
?.
item
?.
planCheckDate
).
endOf
(
'day'
);
}
else
{
return
current
&&
current
<
dayjs
().
endOf
(
'day'
);
...
...
@@ -243,7 +250,7 @@ function Plan(props) {
title
:
'计划类型'
,
dataIndex
:
'checkLoopName'
,
key
:
'checkLoop'
,
hideInForm
:
true
hideInForm
:
true
,
},
{
title
:
'调整信息'
,
...
...
@@ -267,7 +274,7 @@ function Plan(props) {
},
valueType
:
'date'
,
hideInSearch
:
true
,
hideInDescriptions
:
true
hideInDescriptions
:
true
,
},
{
title
:
'周期(天)'
,
...
...
@@ -278,7 +285,6 @@ function Plan(props) {
valueType
:
'digit'
,
hideInForm
:
drawer
?.
item
?.
checkLoop
==
2
?
false
:
true
,
precision
:
0
,
},
];
},
[
drawer
?.
item
]);
...
...
@@ -304,7 +310,7 @@ function Plan(props) {
hideInForm
:
true
,
},
];
if
(
drawer
?.
val
==
"detail"
)
{
if
(
drawer
?.
val
==
'detail'
)
{
return
[
{
title
:
'计划信息'
,
...
...
@@ -334,7 +340,7 @@ function Plan(props) {
title
:
'下次点检日期'
,
dataIndex
:
'planCheckDate'
,
key
:
'planCheckDate'
,
span
:
activeTabKey
==
1
?
2
:
1
span
:
activeTabKey
==
1
?
2
:
1
,
},
{
title
:
'关单日期'
,
...
...
@@ -385,7 +391,7 @@ function Plan(props) {
title
:
'周期(天)'
,
dataIndex
:
'checkCycle'
,
key
:
'checkCycle'
,
span
:
activeTabKey
==
1
?
2
:
2
span
:
activeTabKey
==
1
?
2
:
2
,
},
{
title
:
'点检项目'
,
...
...
@@ -429,7 +435,7 @@ function Plan(props) {
key
:
'shutTime'
,
hideInDescriptions
:
drawer
?.
item
?.
status
!=
3
?
true
:
false
,
},
]
]
;
}
},
[
drawer
?.
val
,
activeTabKey
,
drawer
?.
item
?.
id
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
@@ -446,7 +452,7 @@ function Plan(props) {
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"点检计划"
pagetitle=
{
<
h3
className=
"page-title"
>
点检计划
</
h3
>
}
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
...
...
@@ -475,7 +481,13 @@ function Plan(props) {
/>
<
DrawerPro
fields=
{
drawer
?.
val
==
"detailaddon"
?
editDateColumns
:
drawer
?.
val
==
"detail"
?
detailsColumns
:
columns
}
fields=
{
drawer
?.
val
==
'detailaddon'
?
editDateColumns
:
drawer
?.
val
==
'detail'
?
detailsColumns
:
columns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
...
...
@@ -490,21 +502,24 @@ function Plan(props) {
{
...
drawer
}
onFinish=
{
async
(
vals
)
=>
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
vals
));
params
.
paramList
=
params
?.
paramList
?.
map
(
it
=>
{
params
.
paramList
=
params
?.
paramList
?.
map
(
(
it
)
=>
{
return
{
equipmentId
:
it
.
id
,
checkPlanDate
:
it
.
checkPlanDate
}
checkPlanDate
:
it
.
checkPlanDate
,
}
;
});
let
flag
=
params
.
paramList
?.
some
(
it
=>
!
it
.
checkPlanDate
);
let
flag
=
params
.
paramList
?.
some
(
(
it
)
=>
!
it
.
checkPlanDate
);
if
(
flag
)
{
message
.
warning
(
"下次点检日期必填!"
)
message
.
warning
(
'下次点检日期必填!'
);
return
;
}
if
(
drawer
?.
val
==
'add'
)
{
await
runAsync
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
params
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
await
runAsync
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
params
,
id
:
drawer
?.
item
?.
id
}
});
await
runAsync
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
params
,
id
:
drawer
?.
item
?.
id
},
});
}
}
}
>
...
...
@@ -512,12 +527,16 @@ function Plan(props) {
fields=
{
editDateColumns
}
defaultFormValue=
{
{
checkCycle
:
drawer
?.
item
?.
checkCycle
}
}
onFinish=
{
async
(
vals
)
=>
{
await
runAsync
({
url
:
drawer
?.
type
==
"delay"
?
"/check/umEquipmentCheckPlan/enable"
:
"/check/umEquipmentCheckPlan/adjustDate"
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
checkEnable
:
1
}
});
await
runAsync
({
url
:
drawer
?.
type
==
'delay'
?
'/check/umEquipmentCheckPlan/enable'
:
'/check/umEquipmentCheckPlan/adjustDate'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
,
checkEnable
:
1
},
});
}
}
/>
</
DrawerPro
>
</
div
>
);
}
...
...
src/pages/check/standard/columns.js
View file @
72fc86d5
...
...
@@ -38,6 +38,7 @@ function getcolumns(id) {
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
hideInSearch
:
true
,
formItemProps
:
{
rules
:
[
{
...
...
@@ -60,6 +61,30 @@ function getcolumns(id) {
showSearch
:
true
,
},
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
hideInForm
:
true
,
hideInTable
:
true
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
valueType
:
'select'
,
mode
:
'radio'
,
options
:
{
path
:
'/asset/equipmentModel/query/selection'
,
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
...
...
src/pages/check/standard/index.jsx
View file @
72fc86d5
...
...
@@ -135,7 +135,7 @@ function Standard(props) {
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'
}
...
...
src/pages/check/task/index.jsx
View file @
72fc86d5
...
...
@@ -13,9 +13,9 @@ function Task(props) {
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
),
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
),
[
detailData
,
cd
]
=
useState
({});
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
...
...
@@ -140,22 +140,24 @@ function Task(props) {
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
}).
then
(
res
=>
{
if
(
res
.
code
==
"0000"
)
{
doFetch
({
url
:
'/check/umEquipmentCheckTask/queryDetails'
,
params
:
{
id
:
row
.
id
},
}).
then
((
res
)
=>
{
if
(
res
.
code
==
'0000'
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
{
...
res
.
data
?.
basics
,
...
res
.
data
?.
meet
,
id
:
row
.
id
id
:
row
.
id
,
},
title
:
'点检工单'
,
val
:
'detailaddon'
,
}));
}
})
});
},
}
}
>
...
...
@@ -191,18 +193,23 @@ function Task(props) {
key
:
'result'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
row
.
judgeType
==
1
?
<
Radio
.
Group
onChange=
{
(
e
)
=>
{
row
.
result
=
e
.
target
.
value
;
}
}
>
return
row
.
judgeType
==
1
?
(
<
Radio
.
Group
onChange=
{
(
e
)
=>
{
row
.
result
=
e
.
target
.
value
;
}
}
>
<
Radio
value=
{
1
}
>
正常
</
Radio
>
<
Radio
value=
{
2
}
>
异常
</
Radio
>
</
Radio
.
Group
>
:
<
InputNumber
onChange=
{
(
value
)
=>
{
row
.
result
=
value
;
}
}
/>
}
)
:
(
<
InputNumber
onChange=
{
(
value
)
=>
{
row
.
result
=
value
;
}
}
/>
);
},
},
{
title
:
'下限值'
,
...
...
@@ -222,10 +229,14 @@ function Task(props) {
key
:
'remark'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
Input
onChange=
{
(
e
)
=>
{
row
.
remark
=
e
.
target
.
value
;
}
}
/>
}
return
(
<
Input
onChange=
{
(
e
)
=>
{
row
.
remark
=
e
.
target
.
value
;
}
}
/>
);
},
},
];
return
[
...
...
@@ -276,12 +287,12 @@ function Task(props) {
{
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
key
:
'checkCloseDate'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
key
:
'checkStartTime'
,
},
{
title
:
'完成点检'
,
...
...
@@ -305,14 +316,12 @@ function Task(props) {
);
},
},
]
];
}
},
[
drawer
?.
item
,
activeTabKey
]);
const
detailColumns
=
useMemo
(()
=>
{
if
(
drawer
?.
val
==
"detail"
)
{
if
(
drawer
?.
val
==
'detail'
)
{
const
columnsc
=
[
{
title
:
'点检项目'
,
...
...
@@ -331,194 +340,208 @@ function Task(props) {
dataIndex
:
'checkWay'
,
key
:
'checkWay'
,
hideInForm
:
true
,
}
}
,
];
const
allObj
=
{
task
:
[
{
title
:
'工单信息'
,
valueType
:
'split'
,
},
{
title
:
'点检单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTimes'
,
key
:
'createTimes'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'statusName'
,
},
{
title
:
'点检计划单号'
,
dataIndex
:
'planNo'
,
key
:
'planNo'
,
span
:
activeTabKey
==
3
?
1
:
3
,
},
{
title
:
'关单时间'
,
dataIndex
:
'endTime'
,
key
:
'endTime'
,
hideInDescriptions
:
activeTabKey
==
3
?
false
:
true
,
},
],
basics
:
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelName'
,
},
{
title
:
'点检类型'
,
dataIndex
:
'checkTypeName'
,
key
:
'checkTypeName'
,
},
{
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
span
:
2
},
{
title
:
'点检项目'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
basics
?.
item
??
[]
}
/>
);
task
:
[
{
title
:
'工单信息'
,
valueType
:
'split'
,
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
!=
4
?
false
:
true
},
],
meet
:
[
{
title
:
'接单信息'
,
valueType
:
'split'
,
},
{
title
:
'点检人员'
,
dataIndex
:
'checkUserName'
,
key
:
'checkUserName'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
,
span
:
2
},
],
delay
:
[
{
title
:
'完成点检'
,
valueType
:
'split'
,
},
{
title
:
'完成点检时间'
,
dataIndex
:
'checkEndTime'
,
key
:
'checkEndTime'
,
span
:
3
},
{
title
:
'点检项目'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
.
concat
([
{
title
:
'结果'
,
dataIndex
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
>
{
row
.
judgeType
==
1
?
row
.
result
==
1
?
"正常"
:
"异常"
:
row
.
result
}
</
span
>
}
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
hideInForm
:
true
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
hideInForm
:
true
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
},
])?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
delay
?.
itemlist
??
[]
}
/>
);
{
title
:
'点检单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
==
4
?
false
:
true
},
],
shut
:
[
{
title
:
'关单信息'
,
valueType
:
'split'
,
},
{
title
:
'关单人员'
,
dataIndex
:
'shutUserName'
,
key
:
'shutUserName'
,
},
{
title
:
'强制关单时间'
,
dataIndex
:
'shutTime'
,
key
:
'shutTime'
,
},
]
},
newObject
=
{};
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
drawer
?.
item
)),
objectData
=
{};
let
dataKeys
=
Object
.
keys
(
data
),
allObjKeys
=
Object
.
keys
(
allObj
),
newObjKes
=
allObjKeys
.
filter
(
it
=>
dataKeys
.
indexOf
(
it
)
>
-
1
);
newObjKes
.
map
(
it
=>
{
{
title
:
'创建时间'
,
dataIndex
:
'createTimes'
,
key
:
'createTimes'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'statusName'
,
key
:
'statusName'
,
},
{
title
:
'点检计划单号'
,
dataIndex
:
'planNo'
,
key
:
'planNo'
,
span
:
activeTabKey
==
3
?
1
:
3
,
},
{
title
:
'关单时间'
,
dataIndex
:
'endTime'
,
key
:
'endTime'
,
hideInDescriptions
:
activeTabKey
==
3
?
false
:
true
,
},
],
basics
:
[
{
title
:
'基础信息'
,
valueType
:
'split'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelName'
,
},
{
title
:
'点检类型'
,
dataIndex
:
'checkTypeName'
,
key
:
'checkTypeName'
,
},
{
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDate'
,
span
:
2
,
},
{
title
:
'点检项目'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
basics
?.
item
??
[]
}
/>
);
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
!=
4
?
false
:
true
,
},
],
meet
:
[
{
title
:
'接单信息'
,
valueType
:
'split'
,
},
{
title
:
'点检人员'
,
dataIndex
:
'checkUserName'
,
key
:
'checkUserName'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'checkStartTime'
,
key
:
'checkStartTime'
,
span
:
2
,
},
],
delay
:
[
{
title
:
'完成点检'
,
valueType
:
'split'
,
},
{
title
:
'完成点检时间'
,
dataIndex
:
'checkEndTime'
,
key
:
'checkEndTime'
,
span
:
3
,
},
{
title
:
'点检项目'
,
dataIndex
:
'itemList'
,
key
:
'itemList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
.
concat
([
{
title
:
'结果'
,
dataIndex
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
span
>
{
row
.
judgeType
==
1
?
row
.
result
==
1
?
'正常'
:
'异常'
:
row
.
result
}
</
span
>
);
},
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
hideInForm
:
true
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
hideInForm
:
true
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
},
])
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
delay
?.
itemlist
??
[]
}
/>
);
},
hideInDescriptions
:
drawer
?.
item
?.
task
?.
status
==
4
?
false
:
true
,
},
],
shut
:
[
{
title
:
'关单信息'
,
valueType
:
'split'
,
},
{
title
:
'关单人员'
,
dataIndex
:
'shutUserName'
,
key
:
'shutUserName'
,
},
{
title
:
'强制关单时间'
,
dataIndex
:
'shutTime'
,
key
:
'shutTime'
,
},
],
},
newObject
=
{};
let
data
=
JSON
.
parse
(
JSON
.
stringify
(
drawer
?.
item
)),
objectData
=
{};
let
dataKeys
=
Object
.
keys
(
data
),
allObjKeys
=
Object
.
keys
(
allObj
),
newObjKes
=
allObjKeys
.
filter
((
it
)
=>
dataKeys
.
indexOf
(
it
)
>
-
1
);
newObjKes
.
map
((
it
)
=>
{
newObject
[
it
]
=
allObj
[
it
];
});
let
newColumns
=
[];
for
(
let
i
in
newObject
)
{
newColumns
=
[...
newColumns
,
...
newObject
[
i
]]
newColumns
=
[...
newColumns
,
...
newObject
[
i
]]
;
}
for
(
let
i
in
data
)
{
objectData
=
Object
.
assign
(
objectData
,
data
[
i
]);
...
...
@@ -531,17 +554,18 @@ function Task(props) {
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
activeTabKey
==
1
?
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
row
.
status
==
1
&&
order
(
text
,
row
,
_
,
action
),
row
.
status
==
1
&&
close
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
finish
(
text
,
row
,
_
,
action
)
],
})
:
defcolumn
;
return
activeTabKey
==
1
?
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
row
.
status
==
1
&&
order
(
text
,
row
,
_
,
action
),
row
.
status
==
1
&&
close
(
text
,
row
,
_
,
action
),
row
.
status
==
2
&&
finish
(
text
,
row
,
_
,
action
),
],
})
:
defcolumn
;
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
...
...
@@ -552,7 +576,7 @@ function Task(props) {
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"点检工单"
pagetitle=
{
<
h3
className=
"page-title"
>
点检工单
</
h3
>
}
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
...
...
@@ -581,9 +605,9 @@ function Task(props) {
/>
<
DrawerPro
fields=
{
drawer
?.
val
==
"detailaddon"
?
detailaddonColumns
:
detailColumns
}
fields=
{
drawer
?.
val
==
'detailaddon'
?
detailaddonColumns
:
detailColumns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
.
val
==
"detail"
?
detailData
:
drawer
?.
item
}
detailData=
{
drawer
.
val
==
'detail'
?
detailData
:
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
...
...
@@ -609,22 +633,25 @@ function Task(props) {
type
:
'primary'
,
loading
,
onClick
:
()
=>
{
let
itemList
=
drawer
?.
item
?.
item
?.
map
(
it
=>
{
let
itemList
=
drawer
?.
item
?.
item
?.
map
(
(
it
)
=>
{
if
(
it
.
judgeType
==
1
)
{
return
{
id
:
it
.
id
,
remark
:
it
.
remark
,
judgeResultQualitative
:
it
.
result
}
judgeResultQualitative
:
it
.
result
,
}
;
}
else
{
return
{
id
:
it
.
id
,
remark
:
it
.
remark
,
judgeResultRation
:
it
.
result
}
judgeResultRation
:
it
.
result
,
}
;
}
});
run
({
url
:
"/check/umEquipmentCheckTask/complele"
,
params
:
{
id
:
drawer
?.
item
?.
id
,
itemList
}
})
run
({
url
:
'/check/umEquipmentCheckTask/complele'
,
params
:
{
id
:
drawer
?.
item
?.
id
,
itemList
},
});
},
}
}
>
...
...
src/pages/maintain/criterion/columns.js
View file @
72fc86d5
...
...
@@ -40,6 +40,7 @@ function getcolumns(equipmentModelId) {
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
valueType
:
'select'
,
hideInSearch
:
true
,
fieldProps
:
{
showSearch
:
true
,
},
...
...
@@ -55,13 +56,36 @@ function getcolumns(equipmentModelId) {
options
:
{
path
:
'/maintain/umMaintainStandard/selected/queryList'
,
linkParams
:
{
maintainType
:
'
maintainType
'
,
maintainType
:
''
,
},
extraParams
:
{
equipmentModelId
,
},
},
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelId'
,
hideInForm
:
true
,
hideInTable
:
true
,
valueType
:
'select'
,
fieldProps
:
{
showSearch
:
true
,
},
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
mode
:
'radio'
,
options
:
{
path
:
'/asset/equipmentModel/query/selection'
,
},
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
...
...
src/pages/repair/outsourcing/index.jsx
View file @
72fc86d5
...
...
@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-08 1
1:45:14
* @Last Modified time: 2023-02-08 1
4:50:40
*/
import
*
as
React
from
'react'
;
...
...
@@ -18,8 +18,9 @@ import Addform from '@/components/Addform';
import
{
Menu
,
Dropdown
,
Button
,
message
}
from
'antd'
;
import
InitForm
from
'@/components/InitForm'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Failure
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
const
actionRef
=
useRef
(),
containderef
=
useRef
(),
formRef
=
useRef
();
...
...
src/pages/repair/track/index.jsx
View file @
72fc86d5
...
...
@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-08 1
3:30:00
* @Last Modified time: 2023-02-08 1
4:50:08
*/
import
*
as
React
from
'react'
;
...
...
@@ -19,8 +19,9 @@ import { Menu, Dropdown, Button, message } from 'antd';
import
InitForm
from
'@/components/InitForm'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
import
OrderHandle
from
'../platform/RepairOrderHandle'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Failure
(
props
)
{
const
{
initialState
,
setInitialState
}
=
useModel
(
'@@initialState'
);
const
actionRef
=
useRef
(),
containderef
=
useRef
(),
formRef
=
useRef
();
...
...
src/pages/spare/supplier/columns.js
View file @
72fc86d5
...
...
@@ -107,6 +107,35 @@ function getcolumns(changeState) {
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
hideInSearch
:
true
,
hideInTable
:
true
,
hideInForm
:
true
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'启用'
,
value
:
1
,
},
{
label
:
'停用'
,
value
:
2
,
},
],
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'status'
,
hideInDescriptions
:
true
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
...
...
@@ -140,10 +169,12 @@ function getcolumns(changeState) {
);
},
},
{
title
:
'联系信息'
,
valueType
:
'formList'
,
dataIndex
:
'userList'
,
span
:
3
,
colProps
:
{
xs
:
24
,
sm
:
24
,
...
...
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