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
d432285b
Commit
d432285b
authored
2 years ago
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12051115
parent
84cba1fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
21 deletions
+55
-21
RepairOrderHandle.jsx
src/pages/repair/platform/RepairOrderHandle.jsx
+8
-0
columns.js
src/pages/repair/platform/columns.js
+1
-0
index.jsx
src/pages/repair/platform/index.jsx
+46
-21
No files found.
src/pages/repair/platform/RepairOrderHandle.jsx
0 → 100644
View file @
d432285b
/* 接单、派单窗口
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-05 11:15:35
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
This diff is collapsed.
Click to expand it.
src/pages/repair/platform/columns.js
View file @
d432285b
function
getcolumns
(
setdrawer
)
{
return
[
{
"tab"
:
"维修工单"
,
...
...
This diff is collapsed.
Click to expand it.
src/pages/repair/platform/index.jsx
View file @
d432285b
/* 接单平台
* @Author: Li Hanlin
* @Date: 2022-12-05 10:13:42
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-05 11:09:28
*/
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
...
...
@@ -51,44 +58,48 @@ function Platform(props) {
);
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
// 接单按钮
const
receiveBtn
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
btn=
{
{
size
:
'small'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'
编辑
'
,
val
:
'
edit
'
,
title
:
'
接单
'
,
val
:
'
add
'
,
}));
},
}
}
>
编辑
接单
</
PremButton
>
);
};
const
remove
=
(
text
,
row
,
_
,
action
)
=>
{
// 派单按钮
const
dispatchBtn
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
<
PremButton
pop=
{
{
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
}
}
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
type
:
'primary'
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
open
:
true
,
item
:
row
,
title
:
'派单'
,
val
:
'add'
,
}));
},
}
}
>
删除
派单
</
PremButton
>
);
};
...
...
@@ -100,11 +111,13 @@ function Platform(props) {
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
),
],
render
:
(
text
,
row
,
_
,
action
)
=>
{
if
(
row
?.
status
==
0
||
row
?.
status
==
1
)
{
return
[
receiveBtn
(
text
,
row
,
_
,
action
)];
}
else
{
return
[
dispatchBtn
(
text
,
row
,
_
,
action
)];
}
},
});
},
[
activeTabKey
]);
...
...
@@ -113,6 +126,16 @@ function Platform(props) {
return
defpath
;
},
[
activeTabKey
]);
function
selectType
(
type
)
{
switch
(
type
)
{
case
'rec'
:
return
;
break
;
default
:
break
;
}
}
return
(
<
div
style=
{
{
position
:
'relative'
}
}
>
<
AutoTable
...
...
@@ -165,7 +188,9 @@ function Platform(props) {
run
({
url
:
pathconfig
?.
edit
||
'/edit'
,
params
:
{
...
vals
,
id
:
drawer
?.
item
?.
id
}
});
}
}
}
/>
>
{
selectType
(
drawer
?.
type
)
}
</
DrawerPro
>
</
div
>
);
}
...
...
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