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
205d6152
Commit
205d6152
authored
Dec 09, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12091834
parent
12367ac7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
28 deletions
+41
-28
Detail.jsx
src/components/RepaireDetail/Detail.jsx
+14
-1
columns.js
src/pages/repair/failure/columns.js
+19
-0
index.jsx
src/pages/repair/failure/index.jsx
+6
-25
index.jsx
src/pages/repair/order/index.jsx
+2
-2
No files found.
src/components/RepaireDetail/Detail.jsx
View file @
205d6152
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
{
Divider
}
from
'antd'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
export
default
(
props
)
=>
{
const
{
detailpath
,
params
}
=
props
;
const
request
=
async
()
=>
{
const
res
=
await
doFetch
({
url
:
detailpath
,
params
});
console
.
log
(
res
);
return
{
success
:
true
,
data
:
{
id
:
'这是一段文本'
,
date
:
'20200730'
,
money
:
'12121'
},
};
};
return
(
<>
<
div
>
<
h3
>
单号
</
h3
>
</
div
>
<
ProDescriptions
/>
<
ProDescriptions
request=
{
request
}
/>
<
Divider
/>
</>
);
};
src/pages/repair/failure/columns.js
View file @
205d6152
...
...
@@ -8,6 +8,25 @@ function getcolumns(setdrawer) {
title
:
'报修单号'
,
dataIndex
:
'repairNo'
,
key
:
'repairNo'
,
render
:
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
a
onClick
=
{()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
title
:
'详情'
,
val
:
'only'
,
type
:
'detail'
,
title
:
'详细信息'
,
item
:
row
,
}));
}}
>
{
row
?.
repairNo
}
<
/a
>
);
},
},
{
title
:
'设备编号'
,
...
...
src/pages/repair/failure/index.jsx
View file @
205d6152
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-0
7 18:15:23
* @Last Modified time: 2022-12-0
9 17:54:42
*/
import
*
as
React
from
'react'
;
...
...
@@ -14,6 +14,7 @@ import getcolumns from './columns';
import
{
useRequest
}
from
'ahooks'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
Addform
from
'@/components/Addform'
;
import
Detail
from
'@/components/RepaireDetail/Detail'
;
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -36,29 +37,6 @@ function Failure(props) {
},
});
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
...
...
@@ -123,7 +101,6 @@ function Failure(props) {
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
),
],
...
...
@@ -141,6 +118,10 @@ function Failure(props) {
return
(
<
Addform
url=
"/repair/umFailureRepair/save"
actionRef=
{
actionRef
}
setdrawer=
{
setdrawer
}
/>
);
case
'detail'
:
return
(
<
Detail
detailpath=
"/repair/umFailureRepair/queryById"
params=
{
{
id
:
drawer
?.
item
.
id
}
}
/>
);
default
:
break
;
}
...
...
src/pages/repair/order/index.jsx
View file @
205d6152
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-09 1
4:23:40
* @Last Modified time: 2022-12-09 1
7:39:38
*/
import
*
as
React
from
'react'
;
...
...
@@ -10,12 +10,12 @@ 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
{
Dropdown
,
Menu
,
Button
,
message
}
from
'antd'
;
import
InitForm
from
'@/components/InitForm'
;
import
OrderHandle
from
'../platform/RepairOrderHandle'
;
import
getcolumns
from
'./columns'
;
function
Failure
(
props
)
{
const
actionRef
=
useRef
(),
...
...
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