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
e22207dd
Commit
e22207dd
authored
Jan 12, 2023
by
TZW
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.100.234.193:9527/wuhao/ems3.3
parents
81dff650
60f06539
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 @
e22207dd
...
...
@@ -13,7 +13,7 @@ export default {
dev
:
{
[
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.203:8000', //dj哥
changeOrigin
:
true
,
...
...
src/global.less
View file @
e22207dd
...
...
@@ -14,9 +14,11 @@ body,
.ant-layout {
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 {
left: unset;
}
...
...
@@ -60,13 +62,14 @@ ol {
width: 100%;
overflow-x: auto;
&-thead > tr,
&-tbody > tr {
> th,
> td {
&-thead>tr,
&-tbody>tr {
>th,
>td {
white-space: pre;
>
span {
>span {
display: block;
}
}
...
...
@@ -121,7 +124,7 @@ ol {
font-size: 16px !important;
.ant-tabs-tab-btn {
color: @primary-color !important;
color: @primary-color
!important;
}
}
...
...
@@ -315,7 +318,7 @@ ol {
}
.lightblue {
>
td:first-child {
>td:first-child {
position: relative;
&::before {
...
...
@@ -337,14 +340,14 @@ ol {
width: 100%;
padding-left: 0 !important;
>
span:first-child {
>span:first-child {
flex: 1;
>
span:first-child {
>span:first-child {
display: none !important;
}
>
.ant-spin-nested-loading {
>.ant-spin-nested-loading {
width: 100%;
}
}
...
...
@@ -403,7 +406,7 @@ ol {
}
.runtime-keep-alive-layout {
>
div {
>div {
height: 100% !important;
}
}
...
...
@@ -451,7 +454,7 @@ ol {
min-height: 100% !important;
overflow: hidden !important;
>
div {
>div {
height: 100%;
min-height: calc(100vh - 96px);
}
...
...
@@ -463,12 +466,12 @@ ol {
// 横向滚动条
.scrollHoriz {
>
div {
>div {
display: flex !important;
flex-wrap: nowrap !important;
align-items: center !important;
>
div {
>div {
flex-shrink: 0 !important;
}
}
...
...
@@ -516,4 +519,4 @@ ol {
.container___gD5n4 {
z-index: 9999 !important;
}
}
\ No newline at end of file
src/pages/check/order/columns.js
View file @
e22207dd
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
dayjs
from
"dayjs"
;
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"
}
]
};
return
{
columns
:
[
{
title
:
'点检单号'
,
dataIndex
:
'taskNo'
,
key
:
'taskNo'
,
hideInForm
:
false
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/check/umEquipmentCheckTask/queryDetails"
,
params
:
{
id
:
row
.
id
}
});
if
(
res
.
code
==
"0000"
)
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
val
:
'detail'
,
title
:
'详细信息'
,
item
:
{
...
res
?.
data
?.
basics
}
}));
}
}}
>
{
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
;
\ No newline at end of file
export
default
getcolumns
;
src/pages/check/order/index.jsx
View file @
e22207dd
This diff is collapsed.
Click to expand it.
src/pages/check/plan/columns.js
View file @
e22207dd
...
...
@@ -84,9 +84,7 @@ function getcolumns(setdrawer) {
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
title
:
'详情'
,
val
:
'detail'
,
type
:
'detail'
,
title
:
'详细信息'
,
item
:
row
,
}));
...
...
@@ -136,9 +134,7 @@ function getcolumns(setdrawer) {
},
options
:
{
path
:
'/auth/sysShop/getAllShopSelection'
,
linkParams
:
{
factoryId
:
''
,
},
params
:
{},
},
},
{
...
...
@@ -332,9 +328,7 @@ function getcolumns(setdrawer) {
},
options
:
{
path
:
'/auth/sysShop/getAllShopSelection'
,
linkParams
:
{
factoryId
:
''
,
},
params
:
{},
},
},
{
...
...
@@ -399,7 +393,7 @@ function getcolumns(setdrawer) {
add
:
''
,
edit
:
''
,
list
:
'/check/umEquipmentCheckPlan/queryYesComplete'
,
delete
:
''
,
delete
:
'
/check/umEquipmentCheckPlan/deleteByI
'
,
detail
:
'/check/umEquipmentCheckPlan/queryDetails'
,
},
},
...
...
src/pages/check/plan/index.jsx
View file @
e22207dd
...
...
@@ -2,7 +2,9 @@ import * as React from 'react';
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
{
message
,
Popconfirm
,
Switch
}
from
"antd"
;
import
DrawerPro
from
'@/components/DrawerPro'
;
import
DetailPro
from
'@/components/DetailPro'
;
import
AutoTable
from
'@/components/AutoTable'
;
import
AutoTables
from
'@/components/AutoTable/mtable'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
{
useRequest
}
from
'ahooks'
;
...
...
@@ -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
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
...
...
@@ -323,9 +474,8 @@ function Plan(props) {
/>
<
DrawerPro
fields=
{
drawer
?.
val
==
"detailaddon"
?
editDateColumns
:
columns
}
fields=
{
drawer
?.
val
==
"detailaddon"
?
editDateColumns
:
drawer
?.
val
==
"detail"
?
detailsColumns
:
columns
}
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
formRef=
{
formRef
}
...
...
@@ -366,6 +516,7 @@ function Plan(props) {
/>
</
DrawerPro
>
</
div
>
);
}
...
...
src/pages/check/standard/columns.js
View file @
e22207dd
...
...
@@ -29,7 +29,11 @@ function getcolumns(id) {
"label"
:
"设备点检"
,
"value"
:
2
}
]
],
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
{
"title"
:
"设备型号"
,
...
...
@@ -51,7 +55,11 @@ function getcolumns(id) {
"checkType"
:
""
,
},
"extraParams"
:
{
id
}
}
},
fieldProps
:
{
placeholder
:
'请选择'
,
showSearch
:
true
,
},
},
{
"title"
:
"备注"
,
...
...
src/pages/check/task/columns.js
View file @
e22207dd
This diff is collapsed.
Click to expand it.
src/pages/check/task/index.jsx
View file @
e22207dd
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'
;
function
Task
(
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
,
}));
}
},
function
Task
(
props
)
{
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
"1"
);
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
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
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'link'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'详情'
,
val
:
'detail'
,
title
:
'详细信息'
,
}));
},
}
}
>
详情
</
PremButton
>
);
};
const
pathconfig
=
useMemo
(()
=>
{
let
defpath
=
getcolumns
(
setdrawer
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defpath
;
},
[
activeTabKey
]);
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
pagetitle=
"点检工单"
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
:
()
=>
{
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
>
);
};
},
}
}
tabList=
{
getcolumns
()
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
(
key
)
=>
{
setactiveTabKey
(
key
);
}
}
/>
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
}
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
}
});
}
}
}
/>
</
div
>
);
}
export
default
Task
;
\ No newline at end of file
export
default
Task
;
src/pages/repair/order/index.jsx
View file @
e22207dd
...
...
@@ -22,8 +22,8 @@ function Failure(props) {
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
}),
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
...
@@ -492,7 +492,6 @@ function Failure(props) {
<
InitForm
fields=
{
columns
}
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
repairComplete
:
{
faultType
:
vals
.
faultSettingId
,
...
...
@@ -546,7 +545,6 @@ function Failure(props) {
},
]
}
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
repairInfo
:
{
...
vals
},
id
:
drawer
?.
item
.
id
,
...
...
src/pages/setting/workshop/index.jsx
View file @
e22207dd
...
...
@@ -61,7 +61,6 @@ function Factory(props) {
url
:
'/auth/sysShop/checkShopRelation'
,
params
:
{
id
:
drawer
?.
id
},
});
console
.
log
(
data
);
setdrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
...
...
src/pages/spare/instore/index.jsx
View file @
e22207dd
...
...
@@ -11,8 +11,8 @@ function Instore(props) {
const
actionRef
=
useRef
(),
formRef
=
useRef
();
const
[
drawer
,
setdrawer
]
=
useState
({
open
:
false
,
}),
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
...
...
@@ -116,9 +116,6 @@ function Instore(props) {
let
res
=
await
doFetch
({
url
:
'/sparepart/sparePart/queryAllSelect'
,
params
:
{}
});
return
res
?.
data
?.
dataList
;
});
console
.
log
(
data
);
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
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