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
fc3688a2
Commit
fc3688a2
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plan
parent
fd24e336
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
220 additions
and
4 deletions
+220
-4
columns.js
src/pages/maintain/plan/columns.js
+17
-0
index.jsx
src/pages/maintain/plan/index.jsx
+203
-4
No files found.
src/pages/maintain/plan/columns.js
View file @
fc3688a2
...
@@ -398,6 +398,23 @@ function getcolumns(setdrawer) {
...
@@ -398,6 +398,23 @@ function getcolumns(setdrawer) {
dataIndex
:
'maintainNo'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
key
:
'maintainNo'
,
hideInForm
:
true
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'detail'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
maintainNo
}
<
/a
>
);
},
},
},
{
{
title
:
'设备编号'
,
title
:
'设备编号'
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/plan/index.jsx
View file @
fc3688a2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2023-01-16 15:35:00
* @Date: 2023-01-16 15:35:00
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-17 1
0:51:25
* @Last Modified time: 2023-01-17 1
1:35:36
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -62,8 +62,49 @@ function Plan(props) {
...
@@ -62,8 +62,49 @@ function Plan(props) {
}
}
};
};
return
[
return
[
{
title
:
'计划信息'
,
valueType
:
'split'
,
hideInForm
:
true
,
},
{
title
:
'保养计划单号'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
hideInForm
:
true
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
hideInForm
:
true
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
hideInForm
:
true
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainTypeName'
,
hideInForm
:
true
,
},
{
title
:
'下次保养日期'
,
dataIndex
:
'nextMaintainDate'
,
key
:
'nextMaintainDate'
,
hideInForm
:
true
,
},
{
title
:
'调整信息'
,
valueType
:
'split'
,
hideInForm
:
true
,
},
{
{
title
:
'保养频次'
,
title
:
'保养频次'
,
hideInDescriptions
:
true
,
dataIndex
:
'maintainFrequencyName'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
key
:
'maintainFrequency'
,
fieldProps
:
{
fieldProps
:
{
...
@@ -105,6 +146,7 @@ function Plan(props) {
...
@@ -105,6 +146,7 @@ function Plan(props) {
{
{
title
:
'计划类型'
,
title
:
'计划类型'
,
dataIndex
:
'isCycle'
,
dataIndex
:
'isCycle'
,
hideInDescriptions
:
true
,
key
:
'isCycle'
,
key
:
'isCycle'
,
fieldProps
:
{
fieldProps
:
{
disabled
:
true
,
disabled
:
true
,
...
@@ -194,6 +236,157 @@ function Plan(props) {
...
@@ -194,6 +236,157 @@ function Plan(props) {
);
);
};
};
const
detailsColumns
=
useMemo
(()
=>
{
const
columnsc
=
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
hideInForm
:
true
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
hideInForm
:
true
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainWay'
,
key
:
'maintainWay'
,
hideInForm
:
true
,
},
];
if
(
drawer
?.
val
==
'detail'
)
{
return
[
{
title
:
'计划信息'
,
valueType
:
'split'
,
},
{
title
:
'保养计划单号'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'状态'
,
dataIndex
:
'maintainStatus'
,
key
:
'maintainStatus'
,
render
:
(
_
,
row
)
=>
{
return
row
?.
maintainStatus
==
1
?
'未开始'
:
'执行中'
;
},
},
{
title
:
'启用/停用'
,
dataIndex
:
'isStopStatusName'
,
key
:
'isStopStatusName'
,
},
{
title
:
'下次保养日期'
,
dataIndex
:
'nextMaintainDate'
,
key
:
'nextMaintainDate'
,
span
:
activeTabKey
==
1
?
2
:
1
,
},
{
title
:
'关单日期'
,
dataIndex
:
'endDate'
,
key
:
'endDate'
,
hideInDescriptions
:
activeTabKey
==
1
?
true
:
false
,
},
{
title
:
'基本信息'
,
valueType
:
'split'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelName'
,
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryName'
,
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
key
:
'shopName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainTypeName'
,
},
{
title
:
'计划类型'
,
dataIndex
:
'isCycle'
,
key
:
'isCycle'
,
span
:
activeTabKey
==
1
?
3
:
3
,
render
:
(
_
,
row
)
=>
{
return
row
?.
isCycle
==
1
?
'单次'
:
'周期'
;
},
},
{
title
:
'保养项目'
,
valueType
:
'split'
,
},
{
dataIndex
:
'itemList'
,
key
:
'itemList'
,
valueType
:
'formList'
,
colProps
:
{
span
:
24
,
},
columns
,
span
:
24
,
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
row
?.
maintainItemList
}
/>
);
},
},
{
title
:
'关单信息'
,
valueType
:
'split'
,
hideInDescriptions
:
drawer
?.
item
?.
status
!=
3
?
true
:
false
,
},
{
title
:
'关单人员'
,
dataIndex
:
'shutUserName'
,
key
:
'shutUserName'
,
hideInDescriptions
:
drawer
?.
item
?.
status
!=
3
?
true
:
false
,
},
{
title
:
'强制关单时间'
,
dataIndex
:
'shutTime'
,
key
:
'shutTime'
,
hideInDescriptions
:
drawer
?.
item
?.
status
!=
3
?
true
:
false
,
},
];
}
},
[
drawer
?.
val
,
activeTabKey
,
drawer
?.
item
?.
id
]);
const
close
=
(
text
,
row
,
_
,
action
)
=>
{
const
close
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
PremButton
<
PremButton
...
@@ -382,9 +575,15 @@ function Plan(props) {
...
@@ -382,9 +575,15 @@ function Plan(props) {
/>
/>
<
DrawerPro
<
DrawerPro
fields=
{
columns
}
fields=
{
drawer
?.
val
==
'detailaddon'
?
editDateColumns
:
drawer
?.
val
==
'detail'
?
detailsColumns
:
columns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
//
detailData={drawer?.item}
defaultFormValue=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
...
@@ -408,7 +607,7 @@ function Plan(props) {
...
@@ -408,7 +607,7 @@ function Plan(props) {
delete
params
.
paramList
;
delete
params
.
paramList
;
let
flag
=
params
.
equipmentList
?.
some
((
it
)
=>
!
it
.
nextMaintainDate
);
let
flag
=
params
.
equipmentList
?.
some
((
it
)
=>
!
it
.
nextMaintainDate
);
if
(
flag
)
{
if
(
flag
)
{
message
.
warning
(
'下次
点检
日期必填!'
);
message
.
warning
(
'下次
保养
日期必填!'
);
return
;
return
;
}
}
console
.
log
(
params
);
console
.
log
(
params
);
...
...
This diff is collapsed.
Click to expand it.
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