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
fee786c5
Commit
fee786c5
authored
Jan 18, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
911a41cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
92 deletions
+124
-92
columns.js
src/pages/maintain/criterion/columns.js
+1
-0
index.jsx
src/pages/maintain/plan/index.jsx
+70
-69
columns.js
src/pages/maintain/workOrder/columns.js
+21
-0
index.jsx
src/pages/repair/outsourcing/index.jsx
+2
-1
RepairOrderHandle.jsx
src/pages/repair/platform/RepairOrderHandle.jsx
+23
-20
index.jsx
src/pages/repair/track/index.jsx
+7
-2
No files found.
src/pages/maintain/criterion/columns.js
View file @
fee786c5
...
...
@@ -60,6 +60,7 @@ function getcolumns(equipmentModelId) {
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
span
:
24
,
valueType
:
'textarea'
,
hideInSearch
:
true
,
},
...
...
src/pages/maintain/plan/index.jsx
View file @
fee786c5
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-16 15:35:00
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-18 1
5:20:30
* @Last Modified time: 2023-01-18 1
6:36:26
*/
import
*
as
React
from
'react'
;
...
...
@@ -21,8 +21,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
,
{
...
...
@@ -460,32 +460,43 @@ function Plan(props) {
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
activeTabKey
==
1
?
defcolumn
.
concat
([
{
title
:
'启用/停用'
,
dataIndex
:
'isStopStatus'
,
key
:
'isStopStatus'
,
hideInForm
:
true
,
hideInSearch
:
true
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
//"1停用 2启用 *"
return
row
.
isStopStatus
==
1
?
(
<
Popconfirm
title=
"是否开启或停用?"
onConfirm=
{
async
()
=>
{
if
(
row
.
isStopStatus
==
1
)
{
await
runAsync
({
url
:
'/maintain/umMaintainPlan/enableDeactivate'
,
params
:
{
id
:
row
.
id
,
isStopFlag
:
2
},
});
{
title
:
'启用/停用'
,
dataIndex
:
'isStopStatus'
,
key
:
'isStopStatus'
,
hideInForm
:
true
,
hideInSearch
:
true
,
valueType
:
'switch'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
//"1停用 2启用 *"
return
row
.
isStopStatus
==
1
?
(
<
Popconfirm
title=
"是否开启或停用?"
onConfirm=
{
async
()
=>
{
if
(
row
.
isStopStatus
==
1
)
{
await
runAsync
({
url
:
'/maintain/umMaintainPlan/enableDeactivate'
,
params
:
{
id
:
row
.
id
,
isStopFlag
:
2
},
});
}
}
}
okText=
"确定"
cancelText=
"取消"
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
}
}
okText=
"确定"
cancelText=
"取消"
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
>
>
<
Switch
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"停用"
defaultChecked=
{
false
}
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
/>
</
Popconfirm
>
)
:
(
<
Switch
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
checkedChildren=
"开启"
...
...
@@ -494,47 +505,36 @@ function Plan(props) {
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
onChange=
{
(
checked
)
=>
{
if
(
checked
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
id
:
row
?.
id
,
from
:
'tq'
,
}));
}
}
}
/>
</
Popconfirm
>
)
:
(
<
Switch
checked=
{
row
.
isStopStatus
==
1
?
true
:
false
}
checkedChildren=
"开启"
unCheckedChildren=
"停用"
defaultChecked=
{
false
}
disabled=
{
!
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
}
onChange=
{
(
checked
)
=>
{
if
(
checked
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'调整日期'
,
val
:
'detailaddon'
,
id
:
row
?.
id
,
from
:
'tq'
,
}));
}
}
}
/>
);
);
},
hideInDescriptions
:
true
,
},
hideInDescriptions
:
true
,
},
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
row
.
maintainStatus
==
2
&&
close
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
maintainStatus
==
1
&&
remove
(
text
,
row
,
_
,
action
),
],
},
])
{
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
(
row
.
maintainStatus
==
1
||
(
row
.
maintainStatus
==
2
&&
row
.
isCycle
==
2
))
&&
editDate
(
text
,
row
,
_
,
action
),
row
.
maintainStatus
==
2
&&
close
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
row
.
maintainStatus
==
1
&&
remove
(
text
,
row
,
_
,
action
),
],
},
])
:
defcolumn
;
},
[
activeTabKey
]);
...
...
@@ -556,6 +556,7 @@ function Plan(props) {
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -579,8 +580,8 @@ function Plan(props) {
drawer
?.
val
==
'detailaddon'
?
editDateColumns
:
drawer
?.
val
==
'detail'
?
detailsColumns
:
columns
?
detailsColumns
:
columns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
// detailData={drawer?.item}
...
...
src/pages/maintain/workOrder/columns.js
View file @
fee786c5
...
...
@@ -115,6 +115,13 @@ function getcolumns(setdrawer) {
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
valueType
:
'select'
,
fieldProps
:
{
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysUser/selection'
,
},
},
{
title
:
'状态'
,
...
...
@@ -266,6 +273,13 @@ function getcolumns(setdrawer) {
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
valueType
:
'select'
,
fieldProps
:
{
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysUser/selection'
,
},
},
{
title
:
'状态'
,
...
...
@@ -423,6 +437,13 @@ function getcolumns(setdrawer) {
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
valueType
:
'select'
,
fieldProps
:
{
showSearch
:
true
,
},
options
:
{
path
:
'/auth/sysUser/selection'
,
},
},
{
title
:
'状态'
,
...
...
src/pages/repair/outsourcing/index.jsx
View file @
fee786c5
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-
06 14:21:36
* @Last Modified time: 2023-01-
18 17:46:04
*/
import
*
as
React
from
'react'
;
...
...
@@ -494,6 +494,7 @@ function Failure(props) {
url=
{
'/repair/umOtherUnitsOrder/save'
}
setdrawer=
{
setdrawer
}
actionRef=
{
actionRef
}
drawer=
{
drawer
}
/>
);
case
'comouts'
:
...
...
src/pages/repair/platform/RepairOrderHandle.jsx
View file @
fee786c5
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-
06 16:28:51
* @Last Modified time: 2023-01-
18 17:39:50
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
...
@@ -71,16 +71,18 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
const
finishHandle
=
{
wxjd
:
async
(
vals
)
=>
{
//console.log(vals);
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
({
assistUserId
:
it
,
}));
let
params
=
{
...
vals
,
id
,
};
let
params
=
{};
if
(
vals
.
repairAssistList
)
{
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
({
assistUserId
:
it
,
}));
}
let
res
=
await
doFetch
({
url
,
params
,
params
:
{
...
params
,
id
,
},
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
...
...
@@ -92,19 +94,20 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
}
},
wxpd
:
async
(
vals
)
=>
{
//console.log(vals);
vals
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
{
return
{
assistUserId
:
it
,
};
});
let
params
=
{
...
vals
,
id
,
};
console
.
log
(
vals
,
url
);
let
params
=
{};
console
.
log
(
params
);
if
(
vals
.
repairAssistList
)
{
params
.
repairAssistList
=
vals
?.
repairAssistList
.
map
((
it
)
=>
{
return
{
assistUserId
:
it
,
};
});
}
console
.
log
(
params
);
let
res
=
await
doFetch
({
url
,
params
,
params
:
{
...
params
,
id
}
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
...
...
src/pages/repair/track/index.jsx
View file @
fee786c5
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-
06 16:09:52
* @Last Modified time: 2023-01-
18 17:45:01
*/
import
*
as
React
from
'react'
;
...
...
@@ -602,7 +602,12 @@ function Failure(props) {
switch
(
type
)
{
case
'add'
:
return
(
<
Addform
url=
{
'/repair/umTrackOrder/save'
}
setdrawer=
{
setdrawer
}
actionRef=
{
actionRef
}
/>
<
Addform
url=
{
'/repair/umTrackOrder/save'
}
setdrawer=
{
setdrawer
}
actionRef=
{
actionRef
}
drawer=
{
drawer
}
/>
);
case
'track'
:
return
<
TrackForm
/>;
...
...
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