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
729e1d5e
Commit
729e1d5e
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detail
parent
fc3688a2
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1839 additions
and
435 deletions
+1839
-435
mtable.jsx
src/components/AutoTable/mtable.jsx
+2
-1
detailnode.jsx
src/components/DetailNode/detailnode.jsx
+35
-0
index.jsx
src/components/DetailNode/index.jsx
+76
-0
index.jsx
src/components/InitForm/Diyrule/index.jsx
+4
-3
index.jsx
src/pages/device/supplier/index.jsx
+1
-1
columns.js
src/pages/maintain/orders/columns.js
+117
-57
index.jsx
src/pages/maintain/orders/index.jsx
+231
-152
columns.js
src/pages/maintain/plan/columns.js
+2
-2
index.jsx
src/pages/maintain/plan/index.jsx
+1
-1
columns.js
src/pages/maintain/workOrder/columns.js
+464
-58
detailColumns.js
src/pages/maintain/workOrder/detailColumns.js
+227
-0
index.jsx
src/pages/maintain/workOrder/index.jsx
+678
-144
index.jsx
src/pages/system/rules/index.jsx
+1
-16
No files found.
src/components/AutoTable/mtable.jsx
View file @
729e1d5e
...
...
@@ -26,6 +26,7 @@ let handlEmptyChild = (tree = []) => {
const
Mtable
=
(
props
)
=>
{
const
{
headerTitle
,
actionRef
,
//表格动作
formRef
,
//表单Ref
rowKey
,
// key
...
...
@@ -42,7 +43,7 @@ const Mtable = (props) => {
resizeable
=
false
,
dataSource
,
}
=
props
;
console
.
log
(
dataSource
);
const
actionRefs
=
actionRef
??
useRef
(),
formRefs
=
formRef
??
useRef
(),
ifspagination
=
pagination
==
'false'
||
pagination
===
false
,
...
...
This diff is collapsed.
Click to expand it.
src/components/DetailNode/detailnode.jsx
0 → 100644
View file @
729e1d5e
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
{
Divider
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
const
DetailNode
=
(
props
)
=>
{
const
{
data
,
index
,
columns
,
hasTable
=
false
,
operationType
}
=
props
;
console
.
log
(
props
);
return
(
<>
<
div
className=
"fault-detail"
>
<
div
style=
{
{
flex
:
1
,
display
:
'flex'
,
flexDirection
:
'row'
}
}
>
<
div
className=
"fault-index"
>
{
Number
(
index
)
+
1
}
</
div
>
<
div
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
}
}
>
<
label
style=
{
{
width
:
'80px'
,
fontSize
:
18
,
fontWeight
:
600
}
}
>
{
data
?.
operationTypeName
}
</
label
>
<
span
>
{
data
?.
updateUserName
}
</
span
>
<
span
>
{
data
?.
updateTime
}
</
span
>
</
div
>
</
div
>
<
div
style=
{
{
flex
:
6
}
}
>
<
div
>
<
h2
className=
"page-title"
style=
{
{
marginBottom
:
16
}
}
>
{
operationType
==
0
?
'基础信息'
:
data
?.
operationTypeName
}
</
h2
>
</
div
>
<
ProDescriptions
dataSource=
{
data
}
columns=
{
columns
}
/>
{
hasTable
?
props
.
children
:
null
}
<
Divider
/>
</
div
>
</
div
>
</>
);
};
export
default
DetailNode
;
This diff is collapsed.
Click to expand it.
src/components/DetailNode/index.jsx
0 → 100644
View file @
729e1d5e
/* eslint-disable react/jsx-key */
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
Divider
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
DetailNode
from
'./detailnode'
;
import
AutoTable
from
'../AutoTable/mtable'
;
const
Detail
=
(
props
)
=>
{
console
.
log
(
props
);
const
{
path
,
params
,
titleColumns
,
detailKey
,
columns
}
=
props
;
let
[
firstcolumns
,
...
mescolumns
]
=
titleColumns
;
// columns?.forEach((it) => {
// if (it?.valueType == 'table') {
// tableColumns.push(it);
// } else {
// detailColumns.push(it);
// }
// });
const
detailData
=
useRequest
(
async
()
=>
{
let
res
=
await
doFetch
({
url
:
path
,
params
});
return
res
?.
data
?.
dataList
;
});
console
.
log
(
columns
);
return
(
<>
<
h2
style=
{
{
fontWeight
:
700
,
marginBottom
:
16
}
}
>
{
firstcolumns
?.
title
}
:
{
detailData
?.
data
?.[
0
]?.[
firstcolumns
?.
dataIndex
]
||
'--'
}
</
h2
>
<
ProDescriptions
columns=
{
mescolumns
}
dataSource=
{
detailData
?.
data
?.[
0
]
}
/>
<
Divider
/>
<
div
>
{
detailData
?.
data
?.
map
((
it
,
index
)
=>
{
console
.
log
(
it
);
const
detailColumns
=
[],
tableColumns
=
[];
columns
[
it
?.
operationType
]?.
forEach
((
it
)
=>
{
if
(
it
?.
valueType
==
'table'
)
{
tableColumns
.
push
(
it
);
}
else
{
detailColumns
.
push
(
it
);
}
});
return
(
<
DetailNode
key=
{
it
?.
id
}
data=
{
it
}
index=
{
index
}
operationType=
{
it
?.
operationType
}
columns=
{
detailColumns
}
hasTable=
{
true
}
>
{
tableColumns
?.
map
((
t
)
=>
{
return
(
<
div
style=
{
{
marginTop
:
8
,
marginBottom
:
8
}
}
>
<
b
>
{
t
?.
title
}
</
b
>
<
AutoTable
dataSource=
{
it
[
t
?.
key
]
}
columns=
{
t
?.
columns
}
style=
{
{
marginTop
:
8
}
}
/>
</
div
>
);
})
}
</
DetailNode
>
);
})
}
</
div
>
</>
);
};
export
default
Detail
;
This diff is collapsed.
Click to expand it.
src/components/InitForm/Diyrule/index.jsx
View file @
729e1d5e
...
...
@@ -25,7 +25,7 @@ let Diyrule = (props) => {
defval
?.
other
||
{
noRuleCode
:
''
,
sort
:
null
,
formatType
:
3
,
formatType
:
null
,
increaseList
:
[],
}
);
...
...
@@ -34,7 +34,7 @@ let Diyrule = (props) => {
useEffect
(()
=>
{
onChange
(
defval
);
});
console
.
log
(
'other.sort :'
,
other
?.
sort
);
let
{
data
,
loading
}
=
useRequest
(()
=>
{
return
doFetch
({
url
:
'/base/bmNoRule/querySelect'
,
params
:
{}
});
});
...
...
@@ -520,9 +520,10 @@ let Diyrule = (props) => {
value=
{
other
?.
sort
}
options=
{
Array
.
apply
(
null
,
{
length
:
value
?
value
.
length
:
0
}).
map
((
it
,
i
)
=>
({
label
:
`第${i + 1}个`
,
value
:
i
+
2
,
value
:
i
+
1
,
}))
}
onChange=
{
(
val
)
=>
{
console
.
log
(
'改变的val'
,
val
);
onChange
({
value
:
value
,
other
:
{
...
...
This diff is collapsed.
Click to expand it.
src/pages/device/supplier/index.jsx
View file @
729e1d5e
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 202
2-12-19 14:18:44
* @Last Modified time: 202
3-01-18 15:25:43
*/
import
*
as
React
from
'react'
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/orders/columns.js
View file @
729e1d5e
import
dayjs
from
'dayjs'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
getcolumns
(
setdrawer
)
{
return
{
"pathconfig"
:
{
"enableadd"
:
false
,
"enableedit"
:
false
,
"enabledelete"
:
false
,
"enabledetail"
:
false
,
"add"
:
""
,
"edit"
:
""
,
"list"
:
"/repair/umRepairOrder/queryRepairOrderList"
,
"delete"
:
""
,
"detail"
:
""
},
"columns"
:
[
{
"title"
:
"维修单号"
,
"dataIndex"
:
"repairOrderNo"
,
"key"
:
"repairOrderNo"
},
{
"title"
:
"设备编号"
,
"dataIndex"
:
"equipmentNo"
,
"key"
:
"equipmentNo"
},
{
"title"
:
"设备名称"
,
"dataIndex"
:
"equipmentName"
,
"key"
:
"equipmentName"
},
{
"title"
:
"故障描述"
,
"dataIndex"
:
"faultDescription"
,
"key"
:
"faultDescription"
},
{
"title"
:
"报修人员"
,
"dataIndex"
:
"repairUserName"
,
"key"
:
"repairUserName"
},
{
"title"
:
"报修时间"
,
"dataIndex"
:
"repairTime"
,
"key"
:
"repairTimeList"
,
"valueType"
:
"dateTimeRange"
},
{
"title"
:
"报修单号"
,
"dataIndex"
:
"repairNo"
,
"key"
:
"repairNo"
},
{
"title"
:
"工单状态"
,
"dataIndex"
:
"statusName"
,
"key"
:
"statusName"
}
]
};
columns
:
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'only'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
maintainNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'自主保养'
,
value
:
'1'
,
},
{
label
:
'专业保养'
,
value
:
'2'
,
},
],
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'周'
,
value
:
'0'
,
},
{
label
:
'月度'
,
value
:
'1'
,
},
{
label
:
'季度'
,
value
:
'2'
,
},
{
label
:
'半年'
,
value
:
'3'
,
},
{
label
:
'一年'
,
value
:
'4'
,
},
],
},
{
title
:
'保养截至日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
planMaintainDate
).
valueOf
()
<
dayjs
().
format
(
'YYYY-MM-DD'
).
valueOf
()
?
'#f50'
:
'rgba(0, 0, 0, 0.85)'
}
`
,
}}
>
{
row
.
planMaintainDate
}
<
/span
>
);
},
},
],
pathconfig
:
{
enableadd
:
false
,
enableedit
:
false
,
enabledelete
:
false
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/maintain/umMaintainTask/queryReceivingList'
,
delete
:
''
,
detail
:
''
,
},
};
}
export
default
getcolumns
;
\ No newline at end of file
export
default
getcolumns
;
This diff is collapsed.
Click to expand it.
src/pages/maintain/orders/index.jsx
View file @
729e1d5e
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'
;
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'
;
import
DetailNode
from
'@/components/DetailNode'
;
import
getDetailColumns
from
'../workOrder/detailColumns'
;
function
Orders
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
const
pathconfig
=
useMemo
(()
=>
{
let
pathconf
=
getcolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
});
function
Orders
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
const
pathconfig
=
useMemo
(()
=>
{
let
pathconf
=
getcolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
order
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否接单?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
'/maintain/umMaintainTask/orderReceiving'
,
params
:
{
id
:
row
?.
id
},
});
},
}
}
btn=
{
{
size
:
'small'
,
}
}
>
接单
</
PremButton
>
);
};
const
close
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否关单?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
'/maintain/umMaintainTask/customsDeclaration'
,
params
:
{
id
:
row
?.
id
},
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
关单
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
)?.
columns
;
return
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
order
(
text
,
row
,
_
,
action
),
close
(
text
,
row
,
_
,
action
)],
});
},
[]);
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
const
DetailLine
=
()
=>
{
return
(
<>
<
DetailNode
path=
"/maintain/umMaintainTaskOperation/queryDetailList"
params=
{
{
maintainTaskId
:
drawer
?.
item
?.
id
}
}
titleColumns=
{
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatusName'
,
},
}
}
>
详情
</
PremButton
>
);
};
{
title
:
'保养计划单号'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
},
]
}
detailKey=
"maintainTaskItemList"
columns=
{
getDetailColumns
}
/>
</>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
保养接单
</
h3
>
}
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
false
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'
编辑
'
,
val
:
'
edit
'
,
item
:
null
,
title
:
'
新增
'
,
val
:
'
add
'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
)?.
columns
;
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
),
],
});
},
[]);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"保养接单"
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
/>
},
}
}
/>
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
</
div
>
);
}
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
>
{
drawer
?.
val
==
'only'
?
<
DetailLine
/>
:
null
}
</
DrawerPro
>
</
div
>
);
}
export
default
Orders
;
\ No newline at end of file
export
default
Orders
;
This diff is collapsed.
Click to expand it.
src/pages/maintain/plan/columns.js
View file @
729e1d5e
...
...
@@ -385,7 +385,7 @@ function getcolumns(setdrawer) {
add
:
'/maintain/umMaintainPlan/save'
,
edit
:
'/maintain/umMaintainPlan/save'
,
list
:
'/maintain/umMaintainPlan/queryList'
,
delete
:
'/maintain/umMaintainPlan/
enableDeactivate
'
,
delete
:
'/maintain/umMaintainPlan/
deleteById
'
,
detail
:
'/maintain/umMaintainPlan/queryById'
,
},
},
...
...
@@ -564,7 +564,7 @@ function getcolumns(setdrawer) {
add
:
'/maintain/umMaintainPlan/save'
,
edit
:
'/maintain/umMaintainPlan/save'
,
list
:
'/maintain/umMaintainPlan/queryList'
,
delete
:
'/maintain/umMaintainPlan/
enableDeactivate
'
,
delete
:
'/maintain/umMaintainPlan/
deleteById
'
,
detail
:
'/maintain/umMaintainPlan/queryById'
,
},
},
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/plan/index.jsx
View file @
729e1d5e
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-16 15:35:00
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-1
7 11:35:36
* @Last Modified time: 2023-01-1
8 15:20:30
*/
import
*
as
React
from
'react'
;
...
...
This diff is collapsed.
Click to expand it.
src/pages/maintain/workOrder/columns.js
View file @
729e1d5e
function
getcolumns
(
setdrawer
)
{
return
{
"pathconfig"
:
{
"enableadd"
:
false
,
"enableedit"
:
false
,
"enabledelete"
:
false
,
"enabledetail"
:
false
,
"add"
:
""
,
"edit"
:
""
,
"list"
:
"/repair/umRepairOrder/queryRepairOrderList"
,
"delete"
:
""
,
"detail"
:
""
},
"columns"
:
[
{
"title"
:
"维修单号"
,
"dataIndex"
:
"repairOrderNo"
,
"key"
:
"repairOrderNo"
},
{
"title"
:
"设备编号"
,
"dataIndex"
:
"equipmentNo"
,
"key"
:
"equipmentNo"
},
{
"title"
:
"设备名称"
,
"dataIndex"
:
"equipmentName"
,
"key"
:
"equipmentName"
},
{
"title"
:
"故障描述"
,
"dataIndex"
:
"faultDescription"
,
"key"
:
"faultDescription"
},
{
"title"
:
"报修人员"
,
"dataIndex"
:
"repairUserName"
,
"key"
:
"repairUserName"
},
{
"title"
:
"报修时间"
,
"dataIndex"
:
"repairTime"
,
"key"
:
"repairTimeList"
,
"valueType"
:
"dateTimeRange"
},
{
"title"
:
"报修单号"
,
"dataIndex"
:
"repairNo"
,
"key"
:
"repairNo"
},
{
"title"
:
"工单状态"
,
"dataIndex"
:
"statusName"
,
"key"
:
"statusName"
}
]
};
import
dayjs
from
'dayjs'
;
function
getcolumns
(
setdrawer
)
{
return
[
{
tab
:
'我的待办'
,
key
:
'1'
,
columns
:
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'only'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
maintainNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'自主保养'
,
value
:
'1'
,
},
{
label
:
'专业保养'
,
value
:
'2'
,
},
],
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'周'
,
value
:
'0'
,
},
{
label
:
'月度'
,
value
:
'1'
,
},
{
label
:
'季度'
,
value
:
'2'
,
},
{
label
:
'半年'
,
value
:
'3'
,
},
{
label
:
'一年'
,
value
:
'4'
,
},
],
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
planMaintainDate
).
valueOf
()
<
dayjs
().
format
(
'YYYY-MM-DD'
).
valueOf
()
?
'#f50'
:
'rgba(0, 0, 0, 0.85)'
}
`
,
}}
>
{
row
.
planMaintainDate
}
<
/span
>
);
},
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTimeList'
,
valueType
:
'dateRange'
,
},
{
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
},
{
title
:
'状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatus'
,
valueType
:
'select'
,
fieldProps
:
{
dropdownMatchSelectWidth
:
100
,
},
mode
:
'radio'
,
options
:
[
{
label
:
'待接单'
,
value
:
'1'
,
},
{
label
:
'保养中'
,
value
:
'2'
,
},
{
label
:
'待验证'
,
value
:
'5'
,
},
],
},
],
pathconfig
:
{
enableadd
:
false
,
enableedit
:
false
,
enabledelete
:
false
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/maintain/umMaintainTask/queryMyDealwithList'
,
delete
:
''
,
detail
:
''
,
},
},
{
tab
:
'未完成'
,
key
:
'2'
,
columns
:
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'only'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
maintainNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'自主保养'
,
value
:
'1'
,
},
{
label
:
'专业保养'
,
value
:
'2'
,
},
],
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'周'
,
value
:
'0'
,
},
{
label
:
'月度'
,
value
:
'1'
,
},
{
label
:
'季度'
,
value
:
'2'
,
},
{
label
:
'半年'
,
value
:
'3'
,
},
{
label
:
'一年'
,
value
:
'4'
,
},
],
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
planMaintainDate
).
valueOf
()
<
dayjs
().
format
(
'YYYY-MM-DD'
).
valueOf
()
?
'#f50'
:
'rgba(0, 0, 0, 0.85)'
}
`
,
}}
>
{
row
.
planMaintainDate
}
<
/span
>
);
},
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTimeList'
,
valueType
:
'dateRange'
,
},
{
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
},
{
title
:
'状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatus'
,
fieldProps
:
{
dropdownMatchSelectWidth
:
100
,
},
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'待接单'
,
value
:
'1'
,
},
{
label
:
'保养中'
,
value
:
'2'
,
},
{
label
:
'待验证'
,
value
:
'5'
,
},
],
},
],
pathconfig
:
{
enableadd
:
false
,
enableedit
:
false
,
enabledelete
:
false
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/maintain/umMaintainTask/queryList'
,
delete
:
''
,
detail
:
''
,
},
},
{
tab
:
'已完成'
,
key
:
'3'
,
columns
:
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'only'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
maintainNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'自主保养'
,
value
:
'1'
,
},
{
label
:
'专业保养'
,
value
:
'2'
,
},
],
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'周'
,
value
:
'0'
,
},
{
label
:
'月度'
,
value
:
'1'
,
},
{
label
:
'季度'
,
value
:
'2'
,
},
{
label
:
'半年'
,
value
:
'3'
,
},
{
label
:
'一年'
,
value
:
'4'
,
},
],
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
planMaintainDate
).
valueOf
()
<
dayjs
().
format
(
'YYYY-MM-DD'
).
valueOf
()
?
'#f50'
:
'rgba(0, 0, 0, 0.85)'
}
`
,
}}
>
{
row
.
planMaintainDate
}
<
/span
>
);
},
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTimeList'
,
valueType
:
'dateRange'
,
},
{
dataIndex
:
'customsTime'
,
valueType
:
'dateRange'
,
title
:
'关单时间'
,
key
:
'customsTimeList'
,
},
{
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
},
{
title
:
'状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatus'
,
fieldProps
:
{
dropdownMatchSelectWidth
:
100
,
},
valueType
:
'select'
,
mode
:
'radio'
,
options
:
[
{
label
:
'待接单'
,
value
:
'1'
,
},
{
label
:
'保养中'
,
value
:
'2'
,
},
{
label
:
'待验证'
,
value
:
'5'
,
},
],
},
],
pathconfig
:
{
enableadd
:
false
,
enableedit
:
false
,
enabledelete
:
false
,
enabledetail
:
false
,
add
:
''
,
edit
:
''
,
list
:
'/maintain/umMaintainTaskHis/queryList'
,
delete
:
''
,
detail
:
''
,
},
},
];
}
export
default
getcolumns
;
\ No newline at end of file
export
default
getcolumns
;
This diff is collapsed.
Click to expand it.
src/pages/maintain/workOrder/detailColumns.js
0 → 100644
View file @
729e1d5e
import
dayjs
from
'dayjs'
;
const
getcolumns
=
{
0
:
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainType'
,
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDateList'
,
},
{
title
:
'保养项目'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainMethod'
,
key
:
'maintainMethod'
,
},
],
},
],
1
:
[
{
title
:
'保养人员'
,
dataIndex
:
'maintainUserName'
,
key
:
'maintainUserName'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTime'
,
},
],
2
:
[
{
title
:
'关单人员'
,
dataIndex
:
'customsUserName'
,
key
:
'customsUserName'
,
},
{
title
:
'强制关单时间'
,
dataIndex
:
'offSingleDate'
,
key
:
'offSingleDate'
,
},
],
3
:
[
{
title
:
'完成保养时间'
,
dataIndex
:
'maintainEndTime'
,
key
:
'maintainEndTime'
,
},
{
title
:
'保养项目'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainMethod'
,
key
:
'maintainMethod'
,
},
{
title
:
'结果'
,
dataIndex
:
'judgeResultName'
,
key
:
'judgeResultName'
,
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
],
},
{
title
:
'非寿命件消耗'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'备件料号'
,
dataIndex
:
'sparePartNo'
,
key
:
'sparePartNo'
,
},
{
title
:
'备件名称'
,
dataIndex
:
'sparePartName'
,
key
:
'sparePartName'
,
},
{
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
},
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
},
{
title
:
'消耗数量'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
],
},
{
title
:
'寿命件更换'
,
key
:
'maintainTaskItemList'
,
valueType
:
'table'
,
dataIndex
:
'maintainTaskItemList'
,
columns
:
[
{
title
:
'备件料号'
,
dataIndex
:
'sparePartNo'
,
key
:
'sparePartNo'
,
},
{
title
:
'备件名称'
,
dataIndex
:
'sparePartName'
,
key
:
'sparePartName'
,
},
{
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
},
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
},
{
title
:
'安装部位'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
{
title
:
'更换数量'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
},
],
},
],
4
:
[
{
title
:
'验证人员'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
{
title
:
'验证时间'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
{
title
:
'验证结果'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
{
title
:
'备注'
,
dataIndex
:
'reviewerName'
,
key
:
'reviewerName'
,
},
],
};
export
default
getcolumns
;
This diff is collapsed.
Click to expand it.
src/pages/maintain/workOrder/index.jsx
View file @
729e1d5e
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'
;
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'
;
import
AutoTables
from
'@/components/AutoTable/mtable'
;
import
{
Radio
,
InputNumber
,
Input
,
Divider
}
from
'antd'
;
import
InitForm
from
'@/components/InitForm'
;
import
getDetailColumns
from
'./detailColumns'
;
import
DetailNode
from
'@/components/DetailNode'
;
function
WorkOrder
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
function
WorkOrder
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
});
const
pathconfig
=
useMemo
(()
=>
{
let
pathconf
=
getcolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
},
[]);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
});
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
{
run
,
loading
,
runAsync
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
if
(
res
?.
code
==
'0000'
)
{
actionRef
?.
current
?.
reload
();
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
},
});
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'编辑'
,
val
:
'edit'
,
}));
},
}
}
>
编辑
</
PremButton
>
);
};
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
const
detailaddonColumns
=
useMemo
(()
=>
{
if
(
activeTabKey
==
1
)
{
if
(
drawer
?.
type
==
'yz'
)
{
const
columnsc
=
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
hideInForm
:
true
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
hideInForm
:
true
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainMethod'
,
key
:
'maintainMethod'
,
hideInForm
:
true
,
},
{
title
:
'结果'
,
dataIndex
:
'judgeResultName'
,
key
:
'judgeResultName'
,
hideInForm
:
true
,
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
hideInForm
:
true
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
hideInForm
:
true
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
},
];
return
[
{
title
:
'工单信息'
,
valueType
:
'split'
,
},
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainTypeName'
,
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDate'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTime'
,
},
{
title
:
'完成保养时间'
,
dataIndex
:
'maintainEndTime'
,
key
:
'maintainEndTime'
,
},
{
title
:
'保养项目'
,
valueType
:
'split'
,
},
{
dataIndex
:
'itemList'
,
key
:
'itemList'
,
valueType
:
'formList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
maintainTaskItemList
}
/>
);
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
},
];
}
else
if
(
drawer
?.
type
==
'wcby'
)
{
const
columnsc
=
[
{
title
:
'保养项目'
,
dataIndex
:
'maintainItemName'
,
key
:
'maintainItemName'
,
hideInForm
:
true
,
},
{
title
:
'部位'
,
dataIndex
:
'maintainPosition'
,
key
:
'maintainPosition'
,
hideInForm
:
true
,
},
{
title
:
'保养方法'
,
dataIndex
:
'maintainMethod'
,
key
:
'maintainMethod'
,
hideInForm
:
true
,
},
{
title
:
'结果'
,
dataIndex
:
'result'
,
key
:
'result'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
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
;
}
}
/>
);
},
},
{
title
:
'下限值'
,
dataIndex
:
'lowerLimit'
,
key
:
'lowerLimit'
,
hideInForm
:
true
,
},
{
title
:
'上限值'
,
dataIndex
:
'upperLimit'
,
key
:
'upperLimit'
,
hideInForm
:
true
,
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
hideInForm
:
true
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
Input
onChange=
{
(
e
)
=>
{
row
.
remark
=
e
.
target
.
value
;
}
}
/>
);
},
},
];
return
[
{
title
:
'工单信息'
,
valueType
:
'split'
,
},
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatusName'
,
},
{
title
:
'保养计划单号'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'设备型号'
,
dataIndex
:
'equipmentModelName'
,
key
:
'equipmentModelName'
,
},
{
title
:
'保养类型'
,
dataIndex
:
'maintainTypeName'
,
key
:
'maintainTypeName'
,
},
{
title
:
'保养频次'
,
dataIndex
:
'maintainFrequencyName'
,
key
:
'maintainFrequency'
,
},
{
title
:
'保养截止日期'
,
dataIndex
:
'planMaintainDate'
,
key
:
'planMaintainDate'
,
},
{
title
:
'接单时间'
,
dataIndex
:
'maintainStartTime'
,
key
:
'maintainStartTime'
,
span
:
2
,
},
{
title
:
'保养项目'
,
valueType
:
'split'
,
},
{
dataIndex
:
'itemList'
,
key
:
'itemList'
,
valueType
:
'formList'
,
columns
,
span
:
3
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
AutoTables
columns=
{
columnsc
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))
}
dataSource=
{
drawer
?.
item
?.
maintainTaskItemList
}
/>
);
},
},
];
}
}
},
[
drawer
?.
item
,
activeTabKey
]);
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
setdrawer
)?.
columns
;
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
),
],
});
},
[]);
const
order
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否接单?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
'/maintain/umMaintainTask/orderReceiving'
,
params
:
{
id
:
row
?.
id
},
});
},
}
}
btn=
{
{
size
:
'small'
,
}
}
>
接单
</
PremButton
>
);
};
const
close
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否关单?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
async
()
=>
{
await
runAsync
({
url
:
'/maintain/umMaintainTask/customsDeclaration'
,
params
:
{
id
:
row
?.
id
},
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
关单
</
PremButton
>
);
};
const
finish
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
doFetch
({
url
:
'/maintain/umMaintainTask/queryById'
,
params
:
{
id
:
row
.
id
},
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
'0000'
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
{
...
res
.
data
?.
data
,
id
:
row
.
id
,
},
title
:
'完成保养'
,
val
:
'detailaddon'
,
type
:
'wcby'
,
}));
}
});
},
}
}
>
完成保养
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"保养工单"
columns=
{
columns
}
actionRef=
{
actionRef
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
}
}
>
删除
</
PremButton
>
);
};
const
verify
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
onClick
:
()
=>
{
doFetch
({
url
:
'/maintain/umMaintainTask/queryById'
,
params
:
{
id
:
row
.
id
},
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
==
'0000'
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
item
:
{
...
res
.
data
?.
data
,
id
:
row
.
id
,
},
title
:
'验证'
,
val
:
'detailaddon'
,
type
:
'yz'
,
}));
},
},
}
}
/>
}
});
},
}
}
>
验证
</
PremButton
>
);
};
<
DrawerPro
fields=
{
columns
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
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
)
=>
[
order
(
text
,
row
,
_
,
action
),
close
(
text
,
row
,
_
,
action
),
finish
(
text
,
row
,
_
,
action
),
verify
(
text
,
row
,
_
,
action
),
],
})
:
defcolumn
;
},
[
activeTabKey
]);
const
pathconfig
=
useMemo
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
},
[
activeTabKey
]);
const
seletType
=
{
wcby
:
(
<
div
>
<
PremButton
btn=
{
{
type
:
'primary'
,
loading
,
onClick
:
()
=>
{
let
maintainTaskItemList
=
drawer
?.
item
?.
item
?.
map
((
it
)
=>
{
if
(
it
.
judgeType
==
1
)
{
return
{
id
:
it
.
id
,
remark
:
it
.
remark
,
judgeResultType
:
it
.
result
,
};
}
else
{
return
{
id
:
it
.
id
,
remark
:
it
.
remark
,
qualitativeJudgeResult
:
it
.
result
,
};
}
});
run
({
url
:
'/maintain/umMaintainTask/finishMaintainTask'
,
params
:
{
id
:
drawer
?.
item
?.
id
,
maintainTaskItemList
},
});
},
}
}
{
...
drawer
}
>
提交
</
PremButton
>
</
div
>
),
yz
:
(
<
div
>
<
Divider
/>
<
InitForm
fields=
{
[
{
title
:
'验证结果'
,
valueType
:
'select'
,
dataIndex
:
'approveStatus'
,
key
:
'approveStatus'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
options
:
[
{
value
:
'1'
,
label
:
'通过'
,
},
{
value
:
'2'
,
label
:
'不通过'
,
},
],
},
{
title
:
'备注'
,
valueType
:
'textarea'
,
dataIndex
:
'approveContent'
,
key
:
'approveContent'
,
},
]
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
run
({
url
:
'/maintain/umMaintainTask/verification'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
},
});
}
}
/>
</
div
>
),
};
const
DetailLine
=
()
=>
{
return
(
<>
<
DetailNode
path=
"/maintain/umMaintainTaskOperation/queryDetailList"
params=
{
{
maintainTaskId
:
drawer
?.
item
?.
id
}
}
titleColumns=
{
activeTabKey
==
3
?
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatusName'
,
},
{
title
:
'保养计划单号'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
},
{
title
:
'关单时间'
,
dataIndex
:
'customsTime'
,
key
:
'customsTime'
,
},
]
:
[
{
title
:
'保养单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'工单状态'
,
dataIndex
:
'taskStatusName'
,
key
:
'taskStatusName'
,
},
{
title
:
'保养计划单号'
,
dataIndex
:
'maintainNo'
,
key
:
'maintainNo'
,
},
]
}
detailKey=
"maintainTaskItemList"
columns=
{
getDetailColumns
}
/>
</>
);
}
};
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
{
<
h3
className=
"page-title"
>
保养工单
</
h3
>
}
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
false
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
null
,
title
:
'新增'
,
val
:
'add'
,
}));
},
},
}
}
tabList=
{
getcolumns
()
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
(
key
)
=>
{
setactiveTabKey
(
key
);
}
}
/>
<
DrawerPro
fields=
{
detailaddonColumns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
placement=
"right"
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
}
}
{
...
drawer
}
onFinish=
{
(
vals
)
=>
{
if
(
drawer
?.
val
==
'add'
)
{
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
}
else
if
(
drawer
?.
val
==
'edit'
)
{
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
>
{
drawer
?.
val
==
'only'
?
(
<
DetailLine
/>
)
:
drawer
?.
val
==
'detailaddon'
?
(
seletType
[
drawer
?.
type
]
)
:
null
}
</
DrawerPro
>
</
div
>
);
}
export
default
WorkOrder
;
\ No newline at end of file
export
default
WorkOrder
;
This diff is collapsed.
Click to expand it.
src/pages/system/rules/index.jsx
View file @
729e1d5e
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-1
1 19:37:17
* @Last Modified time: 2023-01-1
7 09:30:00
*/
import
*
as
React
from
'react'
;
...
...
@@ -182,21 +182,6 @@ function Rules(props) {
onFinish
:
async
(
vals
)
=>
{
console
.
log
(
'新增:'
,
vals
);
let
params
=
{
...
vals
};
//console.log('vals:', vals);
// for (let i in vals)
{
// if (i == 'nrList')
{
// let reshow =
{
// value: vals[i].filter((it) => it.noRuleCode != 'increasing_order'),
// other: vals[i].filter((it) => it.noRuleCode == 'increasing_order')[0] ||
{},
//
};
// reshow.other.increaseList = reshow.other.increaseList.maps((it) =>
{
// return reshow.value.filter((item) => item.sort == it)[0].id;
//
});
// reshow.other.sort =
// reshow.other.sort == 1 ? reshow.other.sort : reshow.other.sort - 1;
// //console.log('reshow', reshow);
//
}
//
}
params
.
nrList
=
[];
params
.
nrList
=
params
.
nrList
.
concat
(
vals
?.
nrList
.
value
);
if
(
vals
?.
nrList
.
other
.
sort
)
{
...
...
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