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
60f06539
Commit
60f06539
authored
Jan 12, 2023
by
左玲玲
😬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1731
parent
fc55eba3
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1024 additions
and
463 deletions
+1024
-463
proxy.js
config/proxy.js
+1
-1
global.less
src/global.less
+20
-17
columns.js
src/pages/check/order/columns.js
+86
-57
index.jsx
src/pages/check/order/index.jsx
+293
-153
columns.js
src/pages/check/plan/columns.js
+3
-9
index.jsx
src/pages/check/plan/index.jsx
+154
-3
columns.js
src/pages/check/standard/columns.js
+10
-2
columns.js
src/pages/check/task/columns.js
+292
-58
index.jsx
src/pages/check/task/index.jsx
+161
-153
index.jsx
src/pages/repair/order/index.jsx
+2
-4
index.jsx
src/pages/setting/workshop/index.jsx
+0
-1
index.jsx
src/pages/spare/instore/index.jsx
+2
-5
No files found.
config/proxy.js
View file @
60f06539
...
@@ -13,7 +13,7 @@ export default {
...
@@ -13,7 +13,7 @@ export default {
dev
:
{
dev
:
{
[
defaultSetting
.
proxypath
]:
{
[
defaultSetting
.
proxypath
]:
{
// 要代理的地址
// 要代理的地址
target
:
'http://192.168.40.64:2800
1
'
,
//jf哥
target
:
'http://192.168.40.64:2800
0
'
,
//jf哥
// target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.203:8000', //dj哥
// target: 'http://192.168.40.203:8000', //dj哥
changeOrigin
:
true
,
changeOrigin
:
true
,
...
...
src/global.less
View file @
60f06539
...
@@ -14,9 +14,11 @@ body,
...
@@ -14,9 +14,11 @@ body,
.ant-layout {
.ant-layout {
min-height: 100vh;
min-height: 100vh;
}
}
.ant-popover-inner-content {
padding: 0 !important;
.ant-pro-core-field-dropdown-overlay {
margin: -12px -16px;
}
}
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
left: unset;
left: unset;
}
}
...
@@ -60,13 +62,14 @@ ol {
...
@@ -60,13 +62,14 @@ ol {
width: 100%;
width: 100%;
overflow-x: auto;
overflow-x: auto;
&-thead > tr,
&-thead>tr,
&-tbody > tr {
&-tbody>tr {
> th,
> td {
>th,
>td {
white-space: pre;
white-space: pre;
>
span {
>span {
display: block;
display: block;
}
}
}
}
...
@@ -121,7 +124,7 @@ ol {
...
@@ -121,7 +124,7 @@ ol {
font-size: 16px !important;
font-size: 16px !important;
.ant-tabs-tab-btn {
.ant-tabs-tab-btn {
color: @primary-color !important;
color: @primary-color
!important;
}
}
}
}
...
@@ -315,7 +318,7 @@ ol {
...
@@ -315,7 +318,7 @@ ol {
}
}
.lightblue {
.lightblue {
>
td:first-child {
>td:first-child {
position: relative;
position: relative;
&::before {
&::before {
...
@@ -337,14 +340,14 @@ ol {
...
@@ -337,14 +340,14 @@ ol {
width: 100%;
width: 100%;
padding-left: 0 !important;
padding-left: 0 !important;
>
span:first-child {
>span:first-child {
flex: 1;
flex: 1;
>
span:first-child {
>span:first-child {
display: none !important;
display: none !important;
}
}
>
.ant-spin-nested-loading {
>.ant-spin-nested-loading {
width: 100%;
width: 100%;
}
}
}
}
...
@@ -403,7 +406,7 @@ ol {
...
@@ -403,7 +406,7 @@ ol {
}
}
.runtime-keep-alive-layout {
.runtime-keep-alive-layout {
>
div {
>div {
height: 100% !important;
height: 100% !important;
}
}
}
}
...
@@ -451,7 +454,7 @@ ol {
...
@@ -451,7 +454,7 @@ ol {
min-height: 100% !important;
min-height: 100% !important;
overflow: hidden !important;
overflow: hidden !important;
>
div {
>div {
height: 100%;
height: 100%;
min-height: calc(100vh - 96px);
min-height: calc(100vh - 96px);
}
}
...
@@ -463,12 +466,12 @@ ol {
...
@@ -463,12 +466,12 @@ ol {
// 横向滚动条
// 横向滚动条
.scrollHoriz {
.scrollHoriz {
>
div {
>div {
display: flex !important;
display: flex !important;
flex-wrap: nowrap !important;
flex-wrap: nowrap !important;
align-items: center !important;
align-items: center !important;
>
div {
>div {
flex-shrink: 0 !important;
flex-shrink: 0 !important;
}
}
}
}
...
@@ -516,4 +519,4 @@ ol {
...
@@ -516,4 +519,4 @@ ol {
.container___gD5n4 {
.container___gD5n4 {
z-index: 9999 !important;
z-index: 9999 !important;
}
}
\ No newline at end of file
src/pages/check/order/columns.js
View file @
60f06539
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
dayjs
from
"dayjs"
;
function
getcolumns
(
setdrawer
)
{
function
getcolumns
(
setdrawer
)
{
return
{
return
{
"pathconfig"
:
{
columns
:
[
"enableadd"
:
false
,
{
"enableedit"
:
false
,
title
:
'点检单号'
,
"enabledelete"
:
false
,
dataIndex
:
'taskNo'
,
"enabledetail"
:
false
,
key
:
'taskNo'
,
"add"
:
""
,
hideInForm
:
false
,
"edit"
:
""
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
"list"
:
"/repair/umRepairOrder/queryRepairOrderList"
,
return
(
"delete"
:
""
,
<
a
"detail"
:
""
onClick
=
{
async
()
=>
{
},
let
res
=
await
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
});
"columns"
:
[
if
(
res
.
code
==
"0000"
)
{
{
setdrawer
((
s
)
=>
({
"title"
:
"维修单号"
,
...
s
,
"dataIndex"
:
"repairOrderNo"
,
open
:
true
,
"key"
:
"repairOrderNo"
val
:
'detail'
,
},
title
:
'详细信息'
,
{
item
:
{
"title"
:
"设备编号"
,
...
res
?.
data
?.
basics
"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"
}
]
};
}}
>
{
row
?.
taskNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'点检类型'
,
dataIndex
:
'checkTypeName'
,
key
:
'checkType'
,
valueType
:
'select'
,
hideInForm
:
true
,
options
:
[
{
label
:
'制造点检'
,
value
:
'1'
,
},
{
label
:
'设备点检'
,
value
:
'2'
,
},
],
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
{
title
:
'点检截止日期'
,
dataIndex
:
'checkCloseDate'
,
key
:
'checkCloseDateList'
,
valueType
:
'dateRange'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
<
span
style
=
{{
color
:
`
${
dayjs
(
row
.
checkCloseDate
).
valueOf
()
<
dayjs
().
valueOf
()
?
"#f50"
:
"rgba(0, 0, 0, 0.85)"
}
`
}}
>
{
row
.
checkCloseDate
}
<
/span
>
}
},
],
pathconfig
:
{
enableadd
:
false
,
enableedit
:
false
,
enabledelete
:
false
,
enabledetail
:
true
,
add
:
''
,
edit
:
''
,
list
:
'/check/umEquipmentCheckTask/queryCheckOrders'
,
delete
:
''
,
detail
:
''
,
},
};
}
}
export
default
getcolumns
;
export
default
getcolumns
;
\ No newline at end of file
src/pages/check/order/index.jsx
View file @
60f06539
This diff is collapsed.
Click to expand it.
src/pages/check/plan/columns.js
View file @
60f06539
...
@@ -84,9 +84,7 @@ function getcolumns(setdrawer) {
...
@@ -84,9 +84,7 @@ function getcolumns(setdrawer) {
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
open
:
true
,
open
:
true
,
title
:
'详情'
,
val
:
'detail'
,
val
:
'detail'
,
type
:
'detail'
,
title
:
'详细信息'
,
title
:
'详细信息'
,
item
:
row
,
item
:
row
,
}));
}));
...
@@ -136,9 +134,7 @@ function getcolumns(setdrawer) {
...
@@ -136,9 +134,7 @@ function getcolumns(setdrawer) {
},
},
options
:
{
options
:
{
path
:
'/auth/sysShop/getAllShopSelection'
,
path
:
'/auth/sysShop/getAllShopSelection'
,
linkParams
:
{
params
:
{},
factoryId
:
''
,
},
},
},
},
},
{
{
...
@@ -332,9 +328,7 @@ function getcolumns(setdrawer) {
...
@@ -332,9 +328,7 @@ function getcolumns(setdrawer) {
},
},
options
:
{
options
:
{
path
:
'/auth/sysShop/getAllShopSelection'
,
path
:
'/auth/sysShop/getAllShopSelection'
,
linkParams
:
{
params
:
{},
factoryId
:
''
,
},
},
},
},
},
{
{
...
@@ -399,7 +393,7 @@ function getcolumns(setdrawer) {
...
@@ -399,7 +393,7 @@ function getcolumns(setdrawer) {
add
:
''
,
add
:
''
,
edit
:
''
,
edit
:
''
,
list
:
'/check/umEquipmentCheckPlan/queryYesComplete'
,
list
:
'/check/umEquipmentCheckPlan/queryYesComplete'
,
delete
:
''
,
delete
:
'
/check/umEquipmentCheckPlan/deleteByI
'
,
detail
:
'/check/umEquipmentCheckPlan/queryDetails'
,
detail
:
'/check/umEquipmentCheckPlan/queryDetails'
,
},
},
},
},
...
...
src/pages/check/plan/index.jsx
View file @
60f06539
...
@@ -2,7 +2,9 @@ import * as React from 'react';
...
@@ -2,7 +2,9 @@ import * as React from 'react';
import
{
useState
,
useMemo
,
useRef
}
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
DrawerPro
from
'@/components/DrawerPro'
;
import
DetailPro
from
'@/components/DetailPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTables
from
'@/components/AutoTable/mtable'
;
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
useRequest
}
from
'ahooks'
;
...
@@ -278,8 +280,157 @@ function Plan(props) {
...
@@ -278,8 +280,157 @@ function Plan(props) {
},
},
];
];
},
[
drawer
?.
item
])
},
[
drawer
?.
item
])
;
const
detailsColumns
=
useMemo
(()
=>
{
const
columnsc
=
[
{
title
:
'点检项目'
,
dataIndex
:
'checkItem'
,
key
:
'checkItem'
,
hideInForm
:
true
,
},
{
title
:
'部位'
,
dataIndex
:
'checkPosition'
,
key
:
'checkPosition'
,
hideInForm
:
true
,
},
{
title
:
'点检方法'
,
dataIndex
:
'checkWay'
,
key
:
'checkWay'
,
hideInForm
:
true
,
},
];
if
(
drawer
?.
val
==
"detail"
)
{
return
[
{
title
:
'计划信息'
,
valueType
:
'split'
,
},
{
title
:
'点检计划单号'
,
dataIndex
:
'checkNo'
,
key
:
'checkNo'
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'statusName'
,
},
{
title
:
'启用/停用'
,
dataIndex
:
'checkEnableName'
,
key
:
'checkEnableName'
,
},
{
title
:
'下次点检日期'
,
dataIndex
:
'planCheckDate'
,
key
:
'planCheckDate'
,
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
:
'checkTypeName'
,
key
:
'checkTypeName'
,
},
{
title
:
'计划类型'
,
dataIndex
:
'checkLoopName'
,
key
:
'checkLoopName'
,
},
{
title
:
'周期(天)'
,
dataIndex
:
'checkCycle'
,
key
:
'checkCycle'
,
span
:
activeTabKey
==
1
?
2
:
2
},
{
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
?.
itemList
}
/>
);
},
},
{
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
pathconfig
=
useMemo
(()
=>
{
const
pathconfig
=
useMemo
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
return
defpath
;
...
@@ -323,9 +474,8 @@ function Plan(props) {
...
@@ -323,9 +474,8 @@ function Plan(props) {
/>
/>
<
DrawerPro
<
DrawerPro
fields=
{
drawer
?.
val
==
"detailaddon"
?
editDateColumns
:
columns
}
fields=
{
drawer
?.
val
==
"detailaddon"
?
editDateColumns
:
drawer
?.
val
==
"detail"
?
detailsColumns
:
columns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
formRef=
{
formRef
}
...
@@ -366,6 +516,7 @@ function Plan(props) {
...
@@ -366,6 +516,7 @@ function Plan(props) {
/>
/>
</
DrawerPro
>
</
DrawerPro
>
</
div
>
</
div
>
);
);
}
}
...
...
src/pages/check/standard/columns.js
View file @
60f06539
...
@@ -29,7 +29,11 @@ function getcolumns(id) {
...
@@ -29,7 +29,11 @@ function getcolumns(id) {
"label"
:
"设备点检"
,
"label"
:
"设备点检"
,
"value"
:
2
"value"
:
2
}
}
]
],
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
},
{
{
"title"
:
"设备型号"
,
"title"
:
"设备型号"
,
...
@@ -51,7 +55,11 @@ function getcolumns(id) {
...
@@ -51,7 +55,11 @@ function getcolumns(id) {
"checkType"
:
""
,
"checkType"
:
""
,
},
},
"extraParams"
:
{
id
}
"extraParams"
:
{
id
}
}
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
},
{
{
"title"
:
"备注"
,
"title"
:
"备注"
,
...
...
src/pages/check/task/columns.js
View file @
60f06539
This diff is collapsed.
Click to expand it.
src/pages/check/task/index.jsx
View file @
60f06539
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
function
Task
(
props
)
{
function
Task
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
open
:
false
,
});
}),
const
pathconfig
=
useMemo
(()
=>
{
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
);
let
pathconf
=
getcolumns
(
setdrawer
)?.
pathconfig
??
{};
return
pathconf
;
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
},
[]);
manual
:
true
,
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
onSuccess
:
(
res
,
params
)
=>
{
manual
:
true
,
if
(
res
?.
code
==
'0000'
)
{
onSuccess
:
(
res
,
params
)
=>
{
actionRef
?.
current
?.
reload
();
if
(
res
?.
code
==
'0000'
)
{
setdrawer
((
s
)
=>
({
actionRef
?.
current
?.
reload
();
...
s
,
setdrawer
((
s
)
=>
({
open
:
false
,
...
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
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
defcolumn
.
concat
({
title
:
'操作'
,
valueType
:
'option'
,
width
:
150
,
render
:
(
text
,
row
,
_
,
action
)
=>
[
defpath
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
defpath
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
defpath
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
],
});
});
},
[
activeTabKey
]);
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
const
pathconfig
=
useMemo
(()
=>
{
return
(
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
<
PremButton
return
defpath
;
btn=
{
{
},
[
activeTabKey
]);
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
PremButton
<
AutoTable
btn=
{
{
pagetitle=
"点检工单"
size
:
'small'
,
columns=
{
columns
}
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
actionRef=
{
actionRef
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
resizeable=
{
true
}
addconfig=
{
{
// access: 'sysDepartment_save',
btn
:
{
disabled
:
false
,
onClick
:
()
=>
{
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
open
:
true
,
open
:
true
,
item
:
row
,
item
:
null
,
title
:
'
编辑
'
,
title
:
'
新增
'
,
val
:
'
edit
'
,
val
:
'
add
'
,
}));
}));
},
},
}
}
},
>
}
}
编辑
tabList=
{
getcolumns
()
}
</
PremButton
>
activeTabKey=
{
activeTabKey
}
);
onTabChange=
{
(
key
)
=>
{
};
setactiveTabKey
(
key
);
}
}
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
(()
=>
{
<
DrawerPro
let
defcolumn
=
getcolumns
(
setdrawer
)?.
columns
;
fields=
{
columns
}
return
defcolumn
.
concat
({
detailpath=
{
pathconfig
?.
detail
||
null
}
title
:
'操作'
,
detailData=
{
drawer
?.
item
}
valueType
:
'option'
,
defaultFormValue=
{
drawer
?.
item
}
width
:
150
,
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
render
:
(
text
,
row
,
_
,
action
)
=>
[
formRef=
{
formRef
}
pathconfig
?.
enabledetail
&&
detail
(
text
,
row
,
_
,
action
),
placement=
"right"
pathconfig
?.
enableedit
&&
edit
(
text
,
row
,
_
,
action
),
onClose=
{
()
=>
{
pathconfig
?.
enabledelete
&&
remove
(
text
,
row
,
_
,
action
),
setdrawer
((
s
)
=>
({
],
...
s
,
});
open
:
false
,
},
[]);
}));
}
}
return
(
{
...
drawer
}
<
div
style=
{
{
position
:
'relative'
}
}
>
onFinish=
{
(
vals
)
=>
{
<
AutoTable
if
(
drawer
?.
val
==
'add'
)
{
pagetitle=
"点检工单"
run
({
url
:
pathconfig
?.
add
||
'/add'
,
params
:
{
...
vals
}
});
columns=
{
columns
}
}
else
if
(
drawer
?.
val
==
'edit'
)
{
actionRef=
{
actionRef
}
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
path=
{
pathconfig
?.
list
||
'/ngic-auth/sysUser/query/page'
}
}
pageextra=
{
pathconfig
?.
enableadd
?
'add'
:
null
}
}
}
resizeable=
{
true
}
/>
addconfig=
{
{
</
div
>
// 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
>
);
}
export
default
Task
;
export
default
Task
;
\ No newline at end of file
src/pages/repair/order/index.jsx
View file @
60f06539
...
@@ -22,8 +22,8 @@ function Failure(props) {
...
@@ -22,8 +22,8 @@ function Failure(props) {
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
open
:
false
,
}),
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
@@ -492,7 +492,6 @@ function Failure(props) {
...
@@ -492,7 +492,6 @@ function Failure(props) {
<
InitForm
<
InitForm
fields=
{
columns
}
fields=
{
columns
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
let
params
=
{
repairComplete
:
{
repairComplete
:
{
faultType
:
vals
.
faultSettingId
,
faultType
:
vals
.
faultSettingId
,
...
@@ -546,7 +545,6 @@ function Failure(props) {
...
@@ -546,7 +545,6 @@ function Failure(props) {
},
},
]
}
]
}
onFinish=
{
async
(
vals
)
=>
{
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
let
params
=
{
repairInfo
:
{
...
vals
},
repairInfo
:
{
...
vals
},
id
:
drawer
?.
item
.
id
,
id
:
drawer
?.
item
.
id
,
...
...
src/pages/setting/workshop/index.jsx
View file @
60f06539
...
@@ -61,7 +61,6 @@ function Factory(props) {
...
@@ -61,7 +61,6 @@ function Factory(props) {
url
:
'/auth/sysShop/checkShopRelation'
,
url
:
'/auth/sysShop/checkShopRelation'
,
params
:
{
id
:
drawer
?.
id
},
params
:
{
id
:
drawer
?.
id
},
});
});
console
.
log
(
data
);
setdrawer
((
s
)
=>
({
setdrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
...
...
src/pages/spare/instore/index.jsx
View file @
60f06539
...
@@ -11,8 +11,8 @@ function Instore(props) {
...
@@ -11,8 +11,8 @@ function Instore(props) {
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
open
:
false
,
}),
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
@@ -116,9 +116,6 @@ function Instore(props) {
...
@@ -116,9 +116,6 @@ function Instore(props) {
let
res
=
await
doFetch
({
url
:
'/sparepart/sparePart/queryAllSelect'
,
params
:
{}
});
let
res
=
await
doFetch
({
url
:
'/sparepart/sparePart/queryAllSelect'
,
params
:
{}
});
return
res
?.
data
?.
dataList
;
return
res
?.
data
?.
dataList
;
});
});
console
.
log
(
data
);
return
(
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
<
AutoTable
...
...
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