Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
dfacb807
提交
dfacb807
authored
4月 22, 2020
作者:
钟是志
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
b7e22edf
159d2ef3
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
96 行增加
和
61 行删除
+96
-61
AuditPage.js
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
+52
-30
List.js
FormInsertDiy/AffairPage/AuditPage/List.js
+2
-2
AuditModal.js
FormInsertDiy/AuditPage/BatchAudit/AuditModal.js
+35
-21
index.js
FormInsertDiy/AuditPage/BatchAudit/index.js
+7
-8
没有找到文件。
FormInsertDiy/AffairPage/AuditPage/AuditPage.js
浏览文件 @
dfacb807
import
pageSetting
from
'./pageSetting'
;
import
pageSetting
from
'./pageSetting'
;
import
React
,
{
Component
,
Fragment
}
from
'react'
;
import
React
,
{
Component
,
Fragment
}
from
'react'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
import
PageHeaderWrapper
from
'@/components/PageHeaderWrapper'
;
...
@@ -7,34 +5,66 @@ import List from '../ApplyPage/List';
...
@@ -7,34 +5,66 @@ import List from '../ApplyPage/List';
import
ListTab
from
'./ListTab'
;
import
ListTab
from
'./ListTab'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
deepCopy
}
from
'@/baseComponent/utils'
;
import
{
getApplyPage
,
getHandledPage
,
getWaitPage
}
from
'../publicApiService'
;
import
{
getApplyPage
,
getHandledPage
,
getWaitPage
}
from
'../publicApiService'
;
import
AuditModal
from
'@/webPublic/FormInsertDiy/AuditPage/BatchAudit/AuditModal'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
export
default
class
AuditPage
extends
Component
{
export
default
class
AuditPage
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{};
}
};
componentDidMount
(){
}
}
componentDidMount
()
{}
handleButtonSet
=
()
=>
{
handleButtonSet
=
()
=>
{
const
{
addFields
,
workId
}
=
this
.
props
;
const
{
addFields
,
workId
}
=
this
.
props
;
return
{
return
{
tab1
:
[
tab1
:
[
{
type
:
'audit'
,
component
:
'RenderComponent'
,
render
:
({
selectRows
,
getPage
})
=>
{
const
disabled
=
!
selectRows
||
!
Array
.
isArray
(
selectRows
)
||
!
selectRows
.
length
;
function
handleClick
(
onShow
)
{
const
taskName
=
selectRows
[
0
].
taskName
;
const
differentTask
=
selectRows
.
slice
(
1
).
find
(
i
=>
i
.
taskName
!==
taskName
);
if
(
differentTask
)
{
return
ModalInfo
((
<
div
>
<
strong
style
=
{{
color
:
"red"
}}
>
{
differentTask
.
taskName
}
<
/strong
>
和
<
strong
>
{
taskName
}
<
/strong>不能一起审核。<br /
>
请将分开操作。
<
/div
>
));
}
onShow
();
}
return
(
<
AuditModal
selectRows
=
{
selectRows
}
getPage
=
{
getPage
}
>
{({
onShow
})
=>
(
<
ButtonDiy
name
=
"批量审核"
handleClick
=
{()
=>
handleClick
(
onShow
)}
disabled
=
{
disabled
}
/
>
)}
<
/AuditModal
>
);
},
},
],
],
tab2
:
[],
tab2
:
[],
};
};
};
};
handleSearchSet
=
()
=>
{
handleSearchSet
=
()
=>
{
const
{
columns
,
searchCondition
}
=
this
.
props
;
const
{
columns
,
searchCondition
}
=
this
.
props
;
const
tab1
=
{
const
tab1
=
{
search
:
{
search
:
{
field
:
{
field
:
{},
},
getPageService
:
getWaitPage
,
getPageService
:
getWaitPage
,
responseCallBack
:
(
response
)
=>
{
responseCallBack
:
response
=>
{
return
response
;
return
response
;
},
},
condition
:
searchCondition
,
condition
:
searchCondition
,
...
@@ -46,10 +76,9 @@ export default class AuditPage extends Component {
...
@@ -46,10 +76,9 @@ export default class AuditPage extends Component {
};
};
const
tab2
=
{
const
tab2
=
{
search
:
{
search
:
{
field
:
{
field
:
{},
},
getPageService
:
getHandledPage
,
getPageService
:
getHandledPage
,
responseCallBack
:
(
response
)
=>
{
responseCallBack
:
response
=>
{
return
response
;
return
response
;
},
},
condition
:
searchCondition
,
condition
:
searchCondition
,
...
@@ -70,22 +99,15 @@ export default class AuditPage extends Component {
...
@@ -70,22 +99,15 @@ export default class AuditPage extends Component {
return
(
return
(
<
PageHeaderWrapper
title
=
""
>
<
PageHeaderWrapper
title
=
""
>
<
ListTab
<
ListTab
tabList
=
{
pageSetting
.
tabList
}
tabList
=
{
pageSetting
.
tabList
}
pageButton
=
{
this
.
handleButtonSet
({
pageButton
=
{
this
.
handleButtonSet
({})}
})}
workId
=
{
workId
}
workId
=
{
workId
}
dataBaseId
=
{
dataBaseId
}
dataBaseId
=
{
dataBaseId
}
addFields
=
{
addFields
}
addFields
=
{
addFields
}
pageSearch
=
{
this
.
handleSearchSet
({})}
pageSearch
=
{
this
.
handleSearchSet
({
/
>
})}
/
>
<
/PageHeaderWrapper
>
<
/PageHeaderWrapper
>
);
);
}
}
}
}
FormInsertDiy/AffairPage/AuditPage/List.js
浏览文件 @
dfacb807
...
@@ -301,8 +301,8 @@ export default class List extends Component {
...
@@ -301,8 +301,8 @@ export default class List extends Component {
/> : null
}
/> : null
}
<
Shell
>
<
Shell
>
{
this
.
pageButton
()
.
length
?
{
pageButton
.
length
?
<
ButtonListDom
config
=
{
this
.
pageButton
()
}
<
ButtonListDom
config
=
{
pageButton
}
handleSelectRows
=
{
this
.
handleSelectRows
}
handleSelectRows
=
{
this
.
handleSelectRows
}
selectRows
=
{
selectRows
}
selectRows
=
{
selectRows
}
formValues
=
{
formValues
}
formValues
=
{
formValues
}
...
...
FormInsertDiy/AuditPage/BatchAudit/AuditModal.js
浏览文件 @
dfacb807
...
@@ -7,31 +7,37 @@ import HistoryForm from '@/webPublic/FormInsertDiy/HistoryForm';
...
@@ -7,31 +7,37 @@ import HistoryForm from '@/webPublic/FormInsertDiy/HistoryForm';
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
{
ModalInfo
}
from
'@/baseComponent/Modal'
;
import
{
router
}
from
'umi'
;
import
{
router
}
from
'umi'
;
import
RenderForm
from
'../../RenderForm'
;
const
isNewForm
=
true
;
const
isNewForm
=
true
;
function
AuditModal
({
form
,
selectRows
,
c
ode
,
getPage
})
{
function
AuditModal
({
form
,
selectRows
,
c
hildren
,
getPage
})
{
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
disabled
=
!
selectRows
||
!
Array
.
isArray
(
selectRows
)
||
!
selectRows
.
length
;
function
submitCb
(
res
)
{
function
submitCb
(
res
)
{
ModalInfo
(
`提交
${
res
?
'成功'
:
'失败'
}
!`
,
{
onOk
:
()
=>
router
.
goBack
()
});
// ModalInfo(`提交${res ? '成功' : '失败'}!`, { onOk: () => router.goBack() });
setVisible
(
false
);
ModalInfo
(
`提交
${
res
?
'成功'
:
'失败'
}
!`
,
{
getPage
();
onOk
:
()
=>
{
setVisible
(
false
);
getPage
();
},
});
}
}
const
[
data
,
setData
]
=
useState
(
null
);
const
[
data
,
setData
]
=
useState
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
useEffect
(
useEffect
(
()
=>
{
()
=>
{
if
(
!
visible
)
return
;
if
(
!
visible
)
{
return
form
.
resetFields
();
}
const
code
=
selectRows
&&
selectRows
[
0
]
&&
selectRows
[
0
].
code
;
if
(
typeof
code
===
'undefined'
)
return
;
if
(
typeof
code
===
'undefined'
)
return
;
setLoading
(
true
);
setLoading
(
true
);
getHistoryFormDetail
({
code
}).
then
(
res
=>
{
getHistoryFormDetail
({
code
}).
then
(
res
=>
{
setLoading
(
false
);
setLoading
(
false
);
if
(
res
&&
!
res
.
errMsg
)
{
if
(
res
&&
!
res
.
errMsg
)
{
setData
({
...
res
,
hisTaskForm
:
{
...
res
.
hisTaskForm
,
formKeys
:
[]
}
});
setData
({...
res
,
hisTaskForm
:
{...
res
.
hisTaskForm
,
formKeys
:
[]}});
}
}
});
});
},
},
...
@@ -48,24 +54,32 @@ function AuditModal({ form, selectRows, code, getPage }) {
...
@@ -48,24 +54,32 @@ function AuditModal({ form, selectRows, code, getPage }) {
/
>
/
>
<
/div
>
<
/div
>
)
:
null
;
)
:
null
;
return
(
return
(
<>
<>
<
Modal
width
=
{
900
}
visible
=
{
visible
}
title
=
"批量审核"
footer
=
{
footer
}
onCancel
=
{()
=>
setVisible
(
false
)}
>
<
Modal
width
=
{
900
}
visible
=
{
visible
}
title
=
"批量审核"
footer
=
{
footer
}
onCancel
=
{()
=>
setVisible
(
false
)}
>
<
Spin
spinning
=
{
loading
}
>
<
Spin
spinning
=
{
loading
}
>
{
data
&&
(
{
data
&&
data
.
isHandle
&&
!!
data
.
taskFormKey
?
(
<>
<
div
style
=
{{
width
:
800
,
margin
:
'auto'
}}
>
<
div
className
=
{
styles
.
zyd_onestop_style_class
}
>
<
RenderForm
<
HistoryForm
postData
=
{
data
}
data
=
{
data
}
// 'affair/getIdFormDetail' 接口返回数据
get
=
"web"
form
=
{
form
}
// form控件
isCg
=
"no"
isNewForm
=
{
!!
isNewForm
}
// 是否渲染需要当前用户填写的审核表单 为false只会渲染历史回显表单
obj
=
{
data
.
hisTaskForm
.
formData
}
/
>
table
=
"new"
<
/div
>
form
=
{
form
}
<
/
>
/
>
)}
<
/div
>
)
:
null
}
<
/Spin
>
<
/Spin
>
<
/Modal
>
<
/Modal
>
<
ButtonDiy
name
=
"批量审核"
handleClick
=
{()
=>
setVisible
(
true
)}
disabled
=
{
disabled
}
/
>
{
children
({
onShow
:
()
=>
setVisible
(
true
)
})}
<
/
>
<
/
>
);
);
}
}
...
...
FormInsertDiy/AuditPage/BatchAudit/index.js
浏览文件 @
dfacb807
...
@@ -4,6 +4,7 @@ import getInfoGenerator from '@/webPublic/FormInsertDiy/getInfoGenerator';
...
@@ -4,6 +4,7 @@ import getInfoGenerator from '@/webPublic/FormInsertDiy/getInfoGenerator';
import
AuditModal
from
'./AuditModal'
;
import
AuditModal
from
'./AuditModal'
;
import
{
findValueByKey
}
from
'../../../../pages/zydtw/Cxcy/utils'
;
import
{
findValueByKey
}
from
'../../../../pages/zydtw/Cxcy/utils'
;
import
withGoBack
from
'@/highOrderComponent/withGoBack'
;
import
withGoBack
from
'@/highOrderComponent/withGoBack'
;
import
ButtonDiy
from
'@/baseComponent/ButtonDiy'
;
const
defaultNameSpan
=
{
big
:
9
,
small
:
9
};
const
defaultNameSpan
=
{
big
:
9
,
small
:
9
};
const
defaultFieldSpan
=
{
big
:
4
,
small
:
4
};
const
defaultFieldSpan
=
{
big
:
4
,
small
:
4
};
...
@@ -27,7 +28,6 @@ export default withGoBack(function BatchAudit({
...
@@ -27,7 +28,6 @@ export default withGoBack(function BatchAudit({
pageButton
,
pageButton
,
pageSetting
,
pageSetting
,
})
{
})
{
const
[
code
,
setCode
]
=
useState
(
null
);
const
pageSearch
=
{
const
pageSearch
=
{
search
:
{
search
:
{
searchType
:
'cascadeSearchNew'
,
searchType
:
'cascadeSearchNew'
,
...
@@ -46,12 +46,6 @@ export default withGoBack(function BatchAudit({
...
@@ -46,12 +46,6 @@ export default withGoBack(function BatchAudit({
condition
:
condition
||
[],
condition
:
condition
||
[],
nameSpan
:
nameSpan
||
defaultNameSpan
,
nameSpan
:
nameSpan
||
defaultNameSpan
,
fileSpan
:
fieldSpan
||
defaultFieldSpan
,
fileSpan
:
fieldSpan
||
defaultFieldSpan
,
responseCallBack
:
res
=>
{
if
(
res
&&
res
.
rows
&&
res
.
rows
[
0
])
{
setCode
(
findValueByKey
(
res
.
rows
[
0
],
'code'
));
}
return
res
;
},
},
},
tableRowKey
:
tableRowKey
||
'buzinessId'
,
tableRowKey
:
tableRowKey
||
'buzinessId'
,
columns
:
columns
||
[],
columns
:
columns
||
[],
...
@@ -63,7 +57,12 @@ export default withGoBack(function BatchAudit({
...
@@ -63,7 +57,12 @@ export default withGoBack(function BatchAudit({
name
:
'批量审核'
,
name
:
'批量审核'
,
component
:
'RenderComponent'
,
component
:
'RenderComponent'
,
render
:
({
selectRows
,
getPage
})
=>
{
render
:
({
selectRows
,
getPage
})
=>
{
return
<
AuditModal
selectRows
=
{
selectRows
}
getPage
=
{
getPage
}
code
=
{
code
}
/>
;
const
disabled
=
!
selectRows
||
!
Array
.
isArray
(
selectRows
)
||
!
selectRows
.
length
;
return
(
<
AuditModal
selectRows
=
{
selectRows
.
map
(
i
=>
({...
i
,
code
:
findValueByKey
(
i
,
'code'
)}))}
getPage
=
{
getPage
}
>
{({
onShow
})
=>
<
ButtonDiy
name
=
"批量审核"
handleClick
=
{
onShow
}
disabled
=
{
disabled
}
/>
}
<
/AuditModal
>
);
},
},
},
},
];
];
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论