Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
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
shenshaokai
jinfa-platform
Commits
00dfdc15
Commit
00dfdc15
authored
Dec 30, 2021
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flx: 渠道按钮权限
parent
e92cf9c7
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
189 additions
and
74 deletions
+189
-74
按钮状态.md
src/components/AuthButton/按钮状态.md
+46
-4
index.tsx
src/pages/channel/channelInfo/index.tsx
+5
-1
add.tsx
src/pages/channel/channelSeo/add.tsx
+10
-5
index.tsx
src/pages/channel/channelSeo/index.tsx
+16
-1
index.tsx
src/pages/channel/components/templateItem/index.tsx
+4
-1
detail.tsx
src/pages/channel/memberList/detail.tsx
+12
-9
index.tsx
src/pages/channel/memberList/index.tsx
+17
-6
index.tsx
src/pages/channel/templateDetail/index.tsx
+17
-4
index.tsx
src/pages/contract/ElectronicSignature/apply/index.tsx
+24
-20
index.tsx
src/pages/contract/template/addContract/index.tsx
+19
-19
index.tsx
src/pages/contract/template/templateList/index.tsx
+19
-4
No files found.
src/components/AuthButton/按钮状态.md
View file @
00dfdc15
# btn
Code 是pass 平台配置唯一表示
# btn
Code 是pass 平台配置唯一表示
...
...
@@ -126,12 +126,54 @@
ownMallSeodetail.edit 自营商城SEO设置编辑 自营商城SEO设置编辑-按钮
ownMallSeodetail.add 自营商城SEO设置新曾 自营商城SEO设置新曾-按钮
# 渠道
# 渠道-channelAbility (已完成)
-
1 创建渠道商城
channelInfo.add 渠道-创建渠道商城 渠道-创建渠道商城-按钮
-
2 渠道商城装修模板
channelTemplate.see 渠道商城装修模板-查看 渠道商城装修模板-查看-按钮
2.1 渠道商城装修模板详情
channelTemplate.Detail.see 渠道商城装修模板详情-预览 渠道商城装修模板详情-预览-按钮 删除
channelTemplate.Detail.renovation 渠道商城装修模板详情-装修 渠道商城装修模板详情-装修-按钮
channelTemplate.Detail.categoryrenovation 渠道商城装修模板详情-品类装修 渠道商城装修模板详情-品类装修-按钮
channelTemplate.Detail.use 渠道商城装修模板详情-使用 渠道商城装修模板详情-使用-按钮
-
3 渠道商城SEO设置
channelSeo.add 渠道商城SEO设置-新曾 渠道商城SEO设置-新曾-按钮
channelSeo.see 渠道商城SEO设置-查看 渠道商城SEO设置-查看-按钮
channelSeo.state 渠道商城SEO设置-修改状态 渠道商城SEO设置-修改状态-按钮
channelSeo.del 渠道商城SEO设置-删除 渠道商城SEO设置-删除-按钮
channelSeo.edit 渠道商城SEO设置-编辑 渠道商城SEO设置-编辑-按钮
-
3.3 渠道商城SEO设置详情
channelSeodetail.add 渠道商城SEO设置-新曾 渠道商城SEO设置-新曾-按钮
channelSeodetail.edit 渠道商城SEO设置-修改 渠道商城SEO设置-修改-按钮
-
4 业务员管理
memberList.add 业务员管理-新曾 业务员管理-新曾-按钮
memberList.see 业务员管理-查看 业务员管理-查看-按钮
memberList.update 业务员管理-修改 业务员管理-修改-按钮
memberList.del 业务员管理-删除 业务员管理-删除-按钮
4.
1 详情
memberListdetail.add 业务员管理-详情新曾 业务员管理-详情新曾-按钮
memberListdetail.update 业务员管理-详情修改 业务员管理-详情修改-按钮
# 采购能力
# 合同能力
# 合同能力-contract
-
1 电子签章申请
1.
1 电子签章申请
ElectronicSignature.apply 电子签章申请 电子签章申请-按钮
-
2 合同模板管理
2.
1 合同模板参数查询
显示无按钮操作
2.
2 合同模板
templateList.see 合同模板-查看 合同模板-查看-按钮
templateList.add 合同模板-新曾 合同模板-新曾-按钮
templateList.state 合同模板-状态设置是否有效 合同模板-状态设置是否有效-按钮
templateList.edit 合同模板-修改 合同模板-修改-按钮
templateList.del 合同模板-删除 合同模板-删除-按钮
-
3 合同管理
# 交易能力
# 售后管理
...
...
src/pages/channel/channelInfo/index.tsx
View file @
00dfdc15
...
...
@@ -15,6 +15,7 @@ import { isEmpty } from '@formily/antd/esm/shared'
import
{
getAuth
}
from
'@/utils/auth'
import
{
getTemplateWebMemberChannelWebFindCurrMemberChannel
,
postTemplateWebMemberChannelWebSaveCurrMemberChannel
}
from
'@/services/TemplateV2Api'
import
{
getManageShopFindByDoorType
}
from
'@/services/ManageV2Api'
import
AuthButton
from
'@/components/AuthButton'
interface
ShopInfoPropsType
{
SiteStore
:
{
...
...
@@ -345,7 +346,7 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
labelAlign=
"left"
name=
"logo"
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.form.label.logo'
})
}
isRequire=
{
true
}
/>
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.form.logo.required'
})}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.form.logo.required'
})
}]
}
>
<
UploadImage
imgUrl=
{
logo
}
...
...
@@ -489,7 +490,10 @@ const ChannelInfo: React.FC<ShopInfoPropsType> = (props) => {
<
Form
.
Item
label=
{
<
RequireItem
label=
""
/>
}
>
<
AuthButton
btnCode=
'channelInfo.add'
menuCode=
'channelAbility'
>
<
Button
loading=
{
confirmLoading
}
type=
"primary"
style=
{
{
marginRight
:
16
}
}
onClick=
{
handleSave
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
</
AuthButton
>
</
Form
.
Item
>
</
Form
>
</
div
>
...
...
src/pages/channel/channelSeo/add.tsx
View file @
00dfdc15
...
...
@@ -14,6 +14,7 @@ const layout: any = {
wrapperCol
:
{
span
:
9
},
labelAlign
:
"left"
}
import
AuthButton
from
'@/components/AuthButton'
const
ChannelSeoAdded
=
()
=>
{
const
{
query
:
{
id
},
pathname
}
=
history
.
location
;
...
...
@@ -60,7 +61,7 @@ const ChannelSeoAdded = () => {
if
(
res
.
code
!==
1000
)
{
return
}
form
.
setFieldsValue
({
...
res
.
data
})
form
.
setFieldsValue
({
...
res
.
data
})
})
}
},
[])
...
...
@@ -70,7 +71,11 @@ const ChannelSeoAdded = () => {
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'common.button.back'
})
}
/>
}
extra=
{
link
!==
'detail'
&&
<
Button
type=
"primary"
loading=
{
confirmLoading
}
onClick=
{
handleSave
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
link
!==
'detail'
&&
<
AuthButton
btnCode=
{
id
?
'channelSeodetail.edit'
:
'channelSeodetail.add'
}
menuCode=
'channelAbility'
>
<
Button
type=
"primary"
loading=
{
confirmLoading
}
onClick=
{
handleSave
}
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
</
AuthButton
>
}
>
<
Prompt
when=
{
formIsHalfFilledOut
}
message=
{
intl
.
formatMessage
({
id
:
'common.tip.save.confirm'
})
}
/>
...
...
@@ -106,21 +111,21 @@ const ChannelSeoAdded = () => {
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.title'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.title.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.title.required'
})
}]
}
>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}50${intl.formatMessage({ id: 'common.unit.individual.chinese'
})}`
}
/>
<
Input
maxLength=
{
50
}
disabled=
{
link
===
'detail'
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}50${intl.formatMessage({ id: 'common.unit.individual.chinese'
})}`
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'description'
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.description'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.description.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.description.required'
})
}]
}
>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}200${intl.formatMessage({ id: 'common.unit.individual.chinese'})}`
}
maxLength=
{
200
}
/>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}200${intl.formatMessage({ id: 'common.unit.individual.chinese'
})}`
}
maxLength=
{
200
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'keywords'
label=
{
<
RequireItem
label=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.keywords'
})
}
isRequire=
{
true
}
brief=
{
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'shop.seo.table.keywords.tip'
})
}
><
QuestionCircleOutlined
/></
Tooltip
>
}
/>
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'shop.seo.form.keywords.required'
})
}]
}
>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}100${intl.formatMessage({ id: 'common.unit.individual.chinese'})}`
}
maxLength=
{
100
}
/>
<
Input
.
TextArea
disabled=
{
link
===
'detail'
}
rows=
{
5
}
placeholder=
{
`${intl.formatMessage({ id: 'common.text.longest' })}100${intl.formatMessage({ id: 'common.unit.individual.chinese'
})}`
}
maxLength=
{
100
}
/>
</
Form
.
Item
>
</
Form
>
</
TabPane
>
...
...
src/pages/channel/channelSeo/index.tsx
View file @
00dfdc15
...
...
@@ -12,6 +12,7 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
searchSelectGetSelectCategoryOptionEffect
}
from
'@/pages/transaction/effect/index'
;
import
{
PauseCircleOutlined
,
PlayCircleOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getTemplateWebSeoWebPage
,
postTemplateWebSeoWebDelete
,
postTemplateWebSeoWebUpdateStatus
}
from
'@/services/TemplateV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
const
ChannelSeo
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
...
...
@@ -49,7 +50,11 @@ const ChannelSeo = () => {
key
:
'name'
,
dataIndex
:
'name'
,
// eslint-disable-next-line react/display-name
render
:
(
text
:
any
,
record
:
any
)
=>
<
Typography
.
Link
href=
{
`/memberCenter/shopAbility/shopSeo/detail?id=${record.id}`
}
>
{
text
}
</
Typography
.
Link
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
AuthButton
menuCode=
'channelAbility'
btnCode=
'channelSeo.see'
>
<
Typography
.
Link
href=
{
`/memberCenter/shopAbility/shopSeo/detail?id=${record.id}`
}
>
{
text
}
</
Typography
.
Link
>
</
AuthButton
>
},
{
title
:
intl
.
formatMessage
({
id
:
'shop.seo.table.link'
}),
...
...
@@ -64,6 +69,7 @@ const ChannelSeo = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<
AuthButton
menuCode=
'channelAbility'
btnCode=
'channelSeo.state'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'common.tip.option.confirm'
})
}
onConfirm=
{
()
=>
confirm
(
record
)
}
...
...
@@ -76,6 +82,8 @@ const ChannelSeo = () => {
{
record
.
status
===
1
?
<>
{
intl
.
formatMessage
({
id
:
'common.status.effective'
})
}
<
PlayCircleOutlined
/></>
:
<>
{
intl
.
formatMessage
({
id
:
'common.status.invalid'
})
}
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
)
return
component
}
...
...
@@ -88,6 +96,7 @@ const ChannelSeo = () => {
// eslint-disable-next-line react/display-name
render
:
(
_text
:
any
,
record
:
any
)
=>
(
<>
<
AuthButton
menuCode=
'channelAbility'
btnCode=
'channelSeo.del'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'common.tip.option.confirm'
})
}
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
...
...
@@ -97,7 +106,10 @@ const ChannelSeo = () => {
>
<
Button
disabled=
{
record
.
status
===
1
}
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'common.button.delete'
})
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
<
AuthButton
menuCode=
'channelAbility'
btnCode=
'channelSeo.edit'
>
<
Button
disabled=
{
record
.
status
===
1
}
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/channelAbility/channelSeo/edit?id=${record.id}`
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.modify'
})
}
</
Button
>
</
AuthButton
>
</>
)
}
...
...
@@ -118,6 +130,7 @@ const ChannelSeo = () => {
const
controllerBtns
=
<
Row
>
<
Col
span=
{
6
}
>
<
AuthButton
menuCode=
'channelAbility'
btnCode=
'channelSeo.add'
>
<
Button
onClick=
{
()
=>
history
.
push
(
'/memberCenter/channelAbility/channelSeo/add'
)
}
type=
"primary"
...
...
@@ -125,6 +138,8 @@ const ChannelSeo = () => {
>
{
intl
.
formatMessage
({
id
:
'common.button.add'
})
}
</
Button
>
</
AuthButton
>
</
Col
>
</
Row
>
...
...
src/pages/channel/components/templateItem/index.tsx
View file @
00dfdc15
...
...
@@ -3,7 +3,7 @@ import { PlayCircleOutlined } from '@ant-design/icons'
import
cx
from
'classnames'
import
{
Link
,
useIntl
}
from
'umi'
import
styles
from
'./index.less'
import
AuthButton
from
'@/components/AuthButton'
interface
TemplateItemPropsType
{
templateInfo
:
any
;
type
:
string
;
...
...
@@ -35,7 +35,10 @@ const TemplateItem: React.FC<TemplateItemPropsType> = (props) => {
<
div
className=
{
styles
.
template_item
}
>
<
div
className=
{
styles
.
img_box
}
style=
{
{
backgroundImage
:
`url(${templateInfo.templatePicUrl})`
}
}
>
<
div
className=
{
styles
.
img_box_mask
}
>
<
AuthButton
btnCode=
'channelTemplate.see'
menuCode=
'channelAbility'
>
<
Link
to=
{
`/memberCenter/channelAbility/template/detail?type=${type}&id=${templateInfo.id}`
}
className=
{
styles
.
detail_btn
}
>
{
intl
.
formatMessage
({
id
:
'common.button.view.details'
})
}
</
Link
>
</
AuthButton
>
</
div
>
<
div
className=
{
cx
(
styles
.
type_tag
,
templateInfo
.
environment
===
2
?
styles
.
h5
:
''
)
}
>
{
Environment_Status
[
templateInfo
.
environment
].
name
}
</
div
>
</
div
>
...
...
src/pages/channel/memberList/detail.tsx
View file @
00dfdc15
...
...
@@ -30,6 +30,7 @@ import StandardTable from '@/components/StandardTable';
import
ModalTable
from
'@/components/ModalTable'
;
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
;
import
{
getMemberAbilitySalesChannel
,
getMemberAbilitySalesChannelPage
,
getMemberAbilitySalesSelect
,
postMemberAbilitySalesChannelBind
,
postMemberAbilitySalesChannelUnbind
}
from
'@/services/MemberV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
const
TabFormErrors
=
props
=>
{
return
(
...
...
@@ -52,10 +53,10 @@ const fetchMemberAbilitySelect = async (params) => {
const
MemberDetail
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
staticData
=
useRef
<
any
>
([])
const
[
rowSelection
,
rowCtl
]
=
useRowSelectionTable
({
customKey
:
'memberId'
})
const
[
realRowSelection
,
realRowCtl
]
=
useRowSelectionTable
({
customKey
:
'relationId'
})
const
[
rowSelection
,
rowCtl
]
=
useRowSelectionTable
({
customKey
:
'memberId'
})
const
[
realRowSelection
,
realRowCtl
]
=
useRowSelectionTable
({
customKey
:
'relationId'
})
const
[
memberVisible
,
setMemberVisible
]
=
useState
(
false
)
const
{
pageStatus
,
id
}
=
usePageStatus
()
const
{
pageStatus
,
id
}
=
usePageStatus
()
const
[
tableData
,
setTableData
]
=
useState
<
any
[]
>
([])
const
[
keywordName
,
setKeywordName
]
=
useState
<
string
>
(
''
)
const
intl
=
useIntl
()
...
...
@@ -101,7 +102,7 @@ const MemberDetail: React.FC<{}> = () => {
if
(
res
.
code
===
1000
)
{
formAction
.
setFieldValue
(
'userId'
,
[
res
.
data
])
// 添加一个remote标识, 带有此标识的 将会调用接口解绑
setTableData
(
res
.
data
.
data
.
map
(
v
=>
({
...
v
,
isRemote
:
true
})))
setTableData
(
res
.
data
.
data
.
map
(
v
=>
({
...
v
,
isRemote
:
true
})))
}
})
}
...
...
@@ -348,6 +349,7 @@ const MemberDetail: React.FC<{}> = () => {
const
extraButtons
=
(
<
Space
>
<
AuthButton
btnCode=
{
id
?
'memberListdetail.update'
:
' memberListdetail.add'
}
menuCode=
'channelAbility'
>
<
Button
type=
"primary"
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
...
...
@@ -355,13 +357,14 @@ const MemberDetail: React.FC<{}> = () => {
>
{
intl
.
formatMessage
({
id
:
'common.button.save'
})
}
</
Button
>
</
AuthButton
>
</
Space
>
);
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'common.button.back'
})
}
/>
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'common.button.back'
})
}
/>
}
className=
"addRepository"
title=
{
pageTitles
[
pageStatus
]
}
extra=
{
extraButtons
}
...
...
@@ -477,13 +480,13 @@ const MemberDetail: React.FC<{}> = () => {
></
NiceForm
>
</
TabsItem
>
<
TabsItem
tab=
{
intl
.
formatMessage
({
id
:
'channel.member.tab.manage.subordinate'
})
}
key=
"2"
>
<
Row
justify=
'space-between'
style=
{
{
marginBottom
:
20
}
}
>
<
Row
justify=
'space-between'
style=
{
{
marginBottom
:
20
}
}
>
<
Col
>
<
Button
type=
'default'
onClick=
{
()
=>
unBindMember
()
}
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
>
{
intl
.
formatMessage
({
id
:
'channel.member.relieve.batch'
})
}
</
Button
>
</
Col
>
<
Col
style=
{
{
display
:
'flex'
}
}
>
<
Input
.
Search
placeholder=
{
intl
.
formatMessage
({
id
:
'channel.form.memberName.placeholder'
})
}
value=
{
keywordName
}
onChange=
{
e
=>
setKeywordName
(
e
.
target
.
value
)
}
onPressEnter=
{
handleSearchChannel
}
/>
<
Button
type=
'default'
style=
{
{
marginLeft
:
20
}
}
onClick=
{
()
=>
setKeywordName
(
''
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.reset'
})
}
</
Button
>
<
Col
style=
{
{
display
:
'flex'
}
}
>
<
Input
.
Search
placeholder=
{
intl
.
formatMessage
({
id
:
'channel.form.memberName.placeholder'
})
}
value=
{
keywordName
}
onChange=
{
e
=>
setKeywordName
(
e
.
target
.
value
)
}
onPressEnter=
{
handleSearchChannel
}
/>
<
Button
type=
'default'
style=
{
{
marginLeft
:
20
}
}
onClick=
{
()
=>
setKeywordName
(
''
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.reset'
})
}
</
Button
>
</
Col
>
</
Row
>
<
Button
block
type=
'dashed'
onClick=
{
()
=>
setMemberVisible
(
true
)
}
disabled=
{
pageStatus
===
PageStatus
.
PREVIEW
}
>
{
intl
.
formatMessage
({
id
:
'channel.member.wait.bind.select'
})
}
</
Button
>
...
...
src/pages/channel/memberList/index.tsx
View file @
00dfdc15
...
...
@@ -5,11 +5,13 @@ import {
PlusOutlined
,
}
from
'@ant-design/icons'
;
import
StandardTable
from
'@/components/StandardTable'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
EyePreview
from
'@/components/EyePreview'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
getMemberAbilitySalesPage
,
postMemberAbilitySalesDelete
}
from
'@/services/MemberV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
const
fetchData
=
async
(
params
)
=>
{
const
{
data
}
=
await
getMemberAbilitySalesPage
(
params
)
return
data
...
...
@@ -43,7 +45,7 @@ const ChannelMember: React.FC<{}> = () => {
align
:
'center'
,
key
:
'name'
,
className
:
'commonPickColor'
,
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/memberCenter/channelAbility/memberList/detail?id=${record.userId}&preview=1`
}
>
{
text
}
</
EyePreview
>
render
:
(
text
,
record
)
=>
<
EyePreview
type=
{
AuthUrl
(
'memberList.see'
,
'channelAbility'
)
?
'link'
:
'button'
}
url=
{
`/memberCenter/channelAbility/memberList/detail?id=${record.userId}&preview=1`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
intl
.
formatMessage
({
id
:
'channel.member.table.orgName'
}),
...
...
@@ -73,10 +75,14 @@ const ChannelMember: React.FC<{}> = () => {
title
:
intl
.
formatMessage
({
id
:
'common.table.action'
}),
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
<>
<
Button
type=
'link'
onClick=
{
()
=>
updateItem
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.modify'
})
}
</
Button
>
<
AuthButton
btnCode=
'memberList.update'
menuCode=
'channelAbility'
>
<
Button
type=
'link'
onClick=
{
()
=>
updateItem
(
record
)
}
>
{
intl
.
formatMessage
({
id
:
'common.button.modify'
})
}
</
Button
>
</
AuthButton
>
{
<
AuthButton
btnCode=
'memberList.del'
menuCode=
'channelAbility'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'common.tip.option.confirm'
})
}
onConfirm=
{
()
=>
deleteItem
(
record
)
}
...
...
@@ -85,6 +91,8 @@ const ChannelMember: React.FC<{}> = () => {
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'common.button.delete'
})
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
}
</>
}
...
...
@@ -98,7 +106,7 @@ const ChannelMember: React.FC<{}> = () => {
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
...
...
@@ -107,7 +115,10 @@ const ChannelMember: React.FC<{}> = () => {
layouts
:
{
order
:
2
},
children
:
<
Button
style=
{
{
width
:
140
}
}
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/channelAbility/memberList/add'
)
}
type=
'primary'
>
{
intl
.
formatMessage
({
id
:
'common.button.add'
})
}
</
Button
>
children
:
<
AuthButton
btnCode=
'memberList.add'
menuCode=
'channelAbility'
>
<
Button
style=
{
{
width
:
140
}
}
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/memberCenter/channelAbility/memberList/add'
)
}
type=
'primary'
>
{
intl
.
formatMessage
({
id
:
'common.button.add'
})
}
</
Button
>
</
AuthButton
>
}
}
formilyProps=
{
{
layouts
:
{
...
...
src/pages/channel/templateDetail/index.tsx
View file @
00dfdc15
...
...
@@ -9,6 +9,7 @@ import { Environment_Status } from '@/constants'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
getTemplateWebPageTemplateWebFindChannelTemplateDetails
,
postTemplateWebPageTemplateWebUseChannelTemplate
}
from
'@/services/TemplateV2Api'
import
styles
from
'./index.less'
import
AuthButton
from
'@/components/AuthButton'
interface
TemplateDetailPropsType
{
location
:
{
...
...
@@ -65,10 +66,10 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const
handleLinkEdit
=
()
=>
{
if
(
detailInfo
?.
environment
===
1
)
{
if
(
detailInfo
?.
environment
===
1
)
{
// web店铺装修
window
.
location
.
href
=
`/memberCenter/channelAbility/template/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
&shopId=
${
detailInfo
.
shopId
}
`
}
else
if
(
detailInfo
?.
environment
===
4
)
{
}
else
if
(
detailInfo
?.
environment
===
4
)
{
// app店铺装修
window
.
location
.
href
=
`/memberCenter/channelAbility/template/mobile/edit?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
&shopId=
${
detailInfo
.
shopId
}
`
}
else
{
...
...
@@ -77,9 +78,9 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
}
const
handleLinkPreview
=
()
=>
{
if
(
detailInfo
?.
environment
===
1
)
{
if
(
detailInfo
?.
environment
===
1
)
{
window
.
location
.
href
=
`/memberCenter/channelAbility/template/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
&shopId=
${
detailInfo
.
shopId
}
`
}
else
if
(
detailInfo
?.
environment
===
4
)
{
}
else
if
(
detailInfo
?.
environment
===
4
)
{
window
.
location
.
href
=
`/memberCenter/channelAbility/template/mobile/preview?id=
${
detailInfo
.
id
}
&template=
${
detailInfo
.
fileName
}
&type=
${
shopType
}
&shopId=
${
detailInfo
.
shopId
}
`
}
else
{
message
.
info
(
intl
.
formatMessage
({
id
:
'shop.template.preview.tip'
}))
...
...
@@ -128,14 +129,21 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
</
div
>
</
div
>
</
div
>
<
AuthButton
btnCode=
'channelTemplate.Detail.see'
menuCode=
'channelAbility'
>
<
div
className=
{
styles
.
btn
}
onClick=
{
()
=>
handleLinkPreview
()
}
>
<
EyeOutlined
/>
<
label
>
{
intl
.
formatMessage
({
id
:
'common.button.preview'
})
}
</
label
>
</
div
>
</
AuthButton
>
<
AuthButton
btnCode=
'channelTemplate.Detail.renovation'
menuCode=
'channelAbility'
>
<
div
className=
{
cx
(
styles
.
btn
,
styles
.
fit
)
}
onClick=
{
()
=>
handleLinkEdit
()
}
>
<
LayoutOutlined
/>
<
label
>
{
intl
.
formatMessage
({
id
:
'channel.template.button.mall.edit'
})
}
</
label
>
</
div
>
</
AuthButton
>
<
AuthButton
btnCode=
'channelTemplate.Detail.categoryrenovation'
menuCode=
'channelAbility'
>
{
detailInfo
?.
environment
===
4
&&
(
<
div
className=
{
cx
(
styles
.
btn
,
styles
.
fit
)
}
onClick=
{
handleJump
}
>
...
...
@@ -144,10 +152,15 @@ const TemplateDetail: React.FC<TemplateDetailPropsType> = (props) => {
</
div
>
)
}
</
AuthButton
>
<
AuthButton
btnCode=
'channelTemplate.Detail.use'
menuCode=
'channelAbility'
>
<
div
className=
{
cx
(
styles
.
btn
,
detailInfo
?.
use
===
1
?
styles
.
use
:
''
)
}
onClick=
{
()
=>
detailInfo
?.
use
!==
1
?
setUseModalVisible
(
true
)
:
{}
}
>
<
PushpinOutlined
/>
<
label
>
{
detailInfo
?.
use
===
1
?
intl
.
formatMessage
({
id
:
'shop.template.button.state.using'
})
:
intl
.
formatMessage
({
id
:
'shop.template.button.state.use'
})
}
</
label
>
</
div
>
</
AuthButton
>
<
UseModal
title=
{
intl
.
formatMessage
({
id
:
'channel.template.modal.title.use'
})
}
...
...
src/pages/contract/ElectronicSignature/apply/index.tsx
View file @
00dfdc15
...
...
@@ -8,6 +8,7 @@ import div from './../../../editor/configs/componentConfigs/HTML/div';
import
Test
from
'../../components/test'
import
{
getContractSignatureAuthGet
,
postContractSignatureAuthApply
}
from
'@/services/ContractV2Api'
const
intl
=
getIntl
();
import
AuthButton
from
'@/components/AuthButton'
const
Apply
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
/**头部状态的颜色值
...
...
@@ -15,22 +16,22 @@ const Apply = () => {
*/
const
applyStaus
=
[{
status
:
1
,
name
:
intl
.
formatMessage
({
id
:
'contract.weishenqing'
}),
name
:
intl
.
formatMessage
({
id
:
'contract.weishenqing'
}),
icon
:
<
ExclamationCircleFilled
/>,
color
:
'#909399'
,
},
{
status
:
2
,
name
:
intl
.
formatMessage
({
id
:
'contract.shenqingzhong'
}),
name
:
intl
.
formatMessage
({
id
:
'contract.shenqingzhong'
}),
icon
:
<
ClockCircleFilled
/>,
color
:
'#4279DF'
,
},
{
status
:
3
,
name
:
intl
.
formatMessage
({
id
:
'contract.shenqingbutongguo'
}),
name
:
intl
.
formatMessage
({
id
:
'contract.shenqingbutongguo'
}),
icon
:
<
CloseCircleFilled
/>,
color
:
'#D32F2F'
,
},
{
status
:
4
,
name
:
intl
.
formatMessage
({
id
:
'contract.shenqingtongguo'
}),
name
:
intl
.
formatMessage
({
id
:
'contract.shenqingtongguo'
}),
icon
:
<
CheckCircleFilled
/>,
color
:
'#00B37A'
,
}]
...
...
@@ -75,14 +76,17 @@ const Apply = () => {
data
.
state
===
item
.
status
&&
<
div
className=
{
styles
.
apply_status
}
style=
{
{
backgroundColor
:
item
.
color
}
}
>
<
div
>
<
div
className=
{
styles
.
status
}
style=
{
{
opacity
:
.
6
,
fontSize
:
'12px'
}
}
>
{
intl
.
formatMessage
({
id
:
'contract.shenqingzhuangtai'
})
}
</
div
>
<
div
className=
{
styles
.
status
}
style=
{
{
opacity
:
.
6
,
fontSize
:
'12px'
}
}
>
{
intl
.
formatMessage
({
id
:
'contract.shenqingzhuangtai'
})
}
</
div
>
<
div
className=
{
styles
.
status
}
>
{
item
.
icon
}
{
item
.
name
}
</
div
>
</
div
>
<
div
className=
{
styles
.
apply_status_btn
}
>
<
AuthButton
btnCode=
'ElectronicSignature.apply'
menuCode=
'contract'
>
<
Button
size=
'middle'
style=
{
{
color
:
item
.
color
}
}
onClick=
{
AuthApply
}
>
{
item
.
status
===
1
?
intl
.
formatMessage
({
id
:
'contract.lijishenqing'
})
:
intl
.
formatMessage
({
id
:
'contract.chongxinshenqing'
})
}
{
item
.
status
===
1
?
intl
.
formatMessage
({
id
:
'contract.lijishenqing'
})
:
intl
.
formatMessage
({
id
:
'contract.chongxinshenqing'
})
}
</
Button
>
{
data
.
state
===
3
&&
<
Button
style=
{
{
marginLeft
:
'24px'
}
}
size=
'middle'
ghost
>
{
intl
.
formatMessage
({
id
:
'contract.zhakanjindu'
})
}
</
Button
>
}
</
AuthButton
>
{
data
.
state
===
3
&&
<
Button
style=
{
{
marginLeft
:
'24px'
}
}
size=
'middle'
ghost
>
{
intl
.
formatMessage
({
id
:
'contract.zhakanjindu'
})
}
</
Button
>
}
</
div
>
</
div
>
}
...
...
@@ -95,14 +99,14 @@ const Apply = () => {
<>
{
data
.
state
!==
1
?
<
div
className=
{
styles
.
apply_item
}
>
<
Descriptions
title=
{
intl
.
formatMessage
({
id
:
'contract.shenqingxinxi'
})
}
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.gongsimingcheng'
})
}
>
{
data
.
orgName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.tongyishehuixinyongdaima'
})
}
>
{
data
.
orgCode
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.farenxingming'
})
}
>
{
data
.
legalRepName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.farenshoujihao'
})
}
>
{
data
.
legalRepMobile
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.farenshenfenzhenghao'
})
}
>
{
data
.
legalRepIdNo
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.renzhengfangshi'
})
}
>
-
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.yanzhengfangshi'
})
}
>
-
</
Descriptions
.
Item
>
<
Descriptions
title=
{
intl
.
formatMessage
({
id
:
'contract.shenqingxinxi'
})
}
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.gongsimingcheng'
})
}
>
{
data
.
orgName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.tongyishehuixinyongdaima'
})
}
>
{
data
.
orgCode
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.farenxingming'
})
}
>
{
data
.
legalRepName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.farenshoujihao'
})
}
>
{
data
.
legalRepMobile
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.farenshenfenzhenghao'
})
}
>
{
data
.
legalRepIdNo
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.renzhengfangshi'
})
}
>
-
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.yanzhengfangshi'
})
}
>
-
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
:
...
...
@@ -116,11 +120,11 @@ const Apply = () => {
<>
{
data
.
state
!==
1
?
<
div
className=
{
styles
.
apply_item
}
>
<
Descriptions
title=
{
intl
.
formatMessage
({
id
:
'contract.shenqingxinxi'
})
}
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.xingming'
})
}
>
{
data
.
transactorName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.shoujihao'
})
}
>
{
data
.
transactorMobile
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.shenfenzhenghao'
})
}
>
{
data
.
transactorIdNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.yanzhengfangshi'
})
}
>
-
</
Descriptions
.
Item
>
<
Descriptions
title=
{
intl
.
formatMessage
({
id
:
'contract.shenqingxinxi'
})
}
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.xingming'
})
}
>
{
data
.
transactorName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.shoujihao'
})
}
>
{
data
.
transactorMobile
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.shenfenzhenghao'
})
}
>
{
data
.
transactorIdNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.yanzhengfangshi'
})
}
>
-
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
:
...
...
src/pages/contract/template/addContract/index.tsx
View file @
00dfdc15
...
...
@@ -33,10 +33,10 @@ const AddContract: React.FC<parmas> = (props) => {
const
isJpgOrPng
=
type
===
'doc'
||
type
===
'docx'
;
const
isLt20M
=
file
.
size
/
1024
/
1024
<
20
;
if
(
!
isJpgOrPng
)
{
message
.
error
(
intl
.
formatMessage
({
id
:
'contract.bushidocdocxwenjian'
}));
message
.
error
(
intl
.
formatMessage
({
id
:
'contract.bushidocdocxwenjian'
}));
}
if
(
!
isLt20M
)
{
message
.
error
(
intl
.
formatMessage
({
id
:
'contract.shangchuanwenjiandaxiaobuchao'
}));
message
.
error
(
intl
.
formatMessage
({
id
:
'contract.shangchuanwenjiandaxiaobuchao'
}));
}
return
isJpgOrPng
&&
isLt20M
;
}
...
...
@@ -101,7 +101,7 @@ const AddContract: React.FC<parmas> = (props) => {
sharedFn
(
parmas
)
console
.
log
(
parmas
)
}
else
{
message
.
warning
(
intl
.
formatMessage
({
id
:
'contract.qingxianshangchuanhetongwenjian'
}))
message
.
warning
(
intl
.
formatMessage
({
id
:
'contract.qingxianshangchuanhetongwenjian'
}))
}
...
...
@@ -163,37 +163,37 @@ const AddContract: React.FC<parmas> = (props) => {
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'contract.fanhui'
})
}
/>
}
backIcon=
{
<
ReutrnEle
description=
{
intl
.
formatMessage
({
id
:
'contract.fanhui'
})
}
/>
}
>
<
Card
>
<
div
className=
{
styles
.
addcontract_wrap
}
>
<
Form
form=
{
form
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.hetongmubanmingcheng'
})
}
colon=
{
false
}
name=
'name'
rules=
{
[{
required
:
page_type
&&
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuruhetongmubanming'
})
}]
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.hetongmubanmingcheng'
})
}
colon=
{
false
}
name=
'name'
rules=
{
[{
required
:
page_type
&&
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuruhetongmubanming'
})
}]
}
>
{
page_type
?
<
Input
/>
:
<
span
>
{
data
.
name
}
</
span
>
}
</
Form
.
Item
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.banbenhao'
})
}
colon=
{
false
}
name=
'version'
rules=
{
[{
required
:
page_type
&&
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshurubanbenhao'
})
}]
}
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.banbenhao'
})
}
colon=
{
false
}
name=
'version'
rules=
{
[{
required
:
page_type
&&
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshurubanbenhao'
})
}]
}
>
{
page_type
?
<
Input
/>
:
<
span
>
{
data
.
version
}
</
span
>
}
</
Form
.
Item
>
{
!
page_type
&&
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.zhuangtai'
})
}
colon=
{
false
}
name=
'status'
>
<
span
>
{
data
.
state
===
1
?
<><
Badge
status=
"success"
/>
{
intl
.
formatMessage
({
id
:
'contract.youxiao'
})
}
</>
:
<><
Badge
status=
"error"
/>
{
intl
.
formatMessage
({
id
:
'contract.shixiao'
})
}
</>
}
</
span
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.zhuangtai'
})
}
colon=
{
false
}
name=
'status'
>
<
span
>
{
data
.
state
===
1
?
<><
Badge
status=
"success"
/>
{
intl
.
formatMessage
({
id
:
'contract.youxiao'
})
}
</>
:
<><
Badge
status=
"error"
/>
{
intl
.
formatMessage
({
id
:
'contract.shixiao'
})
}
</>
}
</
span
>
</
Form
.
Item
>
}
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.hetongmubanshuoming'
})
}
colon=
{
false
}
name=
'description'
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'contract.hetongmubanshuoming'
})
}
colon=
{
false
}
name=
'description'
>
{
page_type
?
<
TextArea
rows=
{
4
}
/>
:
<
span
>
{
data
.
description
}
</
span
>
}
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
div
>
{
intl
.
formatMessage
({
id
:
'contract.hetongwenjianmubanyangli'
})
}
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'contract.zhizuohetongmubanqian'
})
}
><
QuestionCircleOutlined
/></
Tooltip
></
div
>
}
colon=
{
false
}
>
<
Form
.
Item
label=
{
<
div
>
{
intl
.
formatMessage
({
id
:
'contract.hetongwenjianmubanyangli'
})
}
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'contract.zhizuohetongmubanqian'
})
}
><
QuestionCircleOutlined
/></
Tooltip
></
div
>
}
colon=
{
false
}
>
<
div
className=
{
styles
.
upload_item
}
>
<
div
className=
{
styles
.
upload_left
}
>
<
FileWordFilled
/>
<
span
>
{
fileExampleUrl
.
contractName
}
</
span
>
</
div
>
<
div
className=
{
styles
.
upload_right
}
>
<
span
onClick=
{
()
=>
onDownload
(
fileExampleUrl
)
}
>
{
intl
.
formatMessage
({
id
:
'contract.xiazai'
})
}
</
span
>
<
span
onClick=
{
()
=>
onDownload
(
fileExampleUrl
)
}
>
{
intl
.
formatMessage
({
id
:
'contract.xiazai'
})
}
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
name=
"uploadFile"
rules=
{
[{
required
:
Object
.
keys
(
uploadFile
).
length
===
0
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingxianshangchuanhetongxinxi'
})
}]
}
label=
{
<
div
>
{
intl
.
formatMessage
({
id
:
'contract.hetongwenjianmuban'
})
}
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'contract.zhizuowanchengdehetongmu'
})
}
><
QuestionCircleOutlined
/></
Tooltip
></
div
>
}
colon=
{
false
}
<
Form
.
Item
name=
"uploadFile"
rules=
{
[{
required
:
Object
.
keys
(
uploadFile
).
length
===
0
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingxianshangchuanhetongxinxi'
})
}]
}
label=
{
<
div
>
{
intl
.
formatMessage
({
id
:
'contract.hetongwenjianmuban'
})
}
<
Tooltip
placement=
"top"
title=
{
intl
.
formatMessage
({
id
:
'contract.zhizuowanchengdehetongmu'
})
}
><
QuestionCircleOutlined
/></
Tooltip
></
div
>
}
colon=
{
false
}
>
<
div
className=
{
styles
.
upload_data
}
>
{
Object
.
keys
(
uploadFile
).
length
>
0
&&
...
...
@@ -203,7 +203,7 @@ const AddContract: React.FC<parmas> = (props) => {
<
span
>
{
uploadFile
.
name
}
</
span
>
</
div
>
<
div
className=
{
styles
.
upload_right
}
>
<
span
onClick=
{
()
=>
onView
(
uploadFile
)
}
>
{
intl
.
formatMessage
({
id
:
'contract.yulan'
})
}
</
span
>
<
span
onClick=
{
()
=>
onView
(
uploadFile
)
}
>
{
intl
.
formatMessage
({
id
:
'contract.yulan'
})
}
</
span
>
{
page_type
&&
<
DeleteOutlined
onClick=
{
delectContract
}
/>
}
</
div
>
</
div
>
...
...
@@ -219,21 +219,21 @@ const AddContract: React.FC<parmas> = (props) => {
onChange=
{
handleChange
}
accept=
'.doc,.docx'
>
<
Button
loading=
{
loading
}
disabled=
{
loading
}
icon=
{
<
UploadOutlined
/>
}
>
{
intl
.
formatMessage
({
id
:
'contract.shangchuanwenjian'
})
}
</
Button
>
<
div
style=
{
{
marginTop
:
'8px'
}
}
>
{
intl
.
formatMessage
({
id
:
'contract.zhichikuozhanmingdocwenjian'
})
}
</
div
>
<
Button
loading=
{
loading
}
disabled=
{
loading
}
icon=
{
<
UploadOutlined
/>
}
>
{
intl
.
formatMessage
({
id
:
'contract.shangchuanwenjian'
})
}
</
Button
>
<
div
style=
{
{
marginTop
:
'8px'
}
}
>
{
intl
.
formatMessage
({
id
:
'contract.zhichikuozhanmingdocwenjian'
})
}
</
div
>
</
Upload
>
}
</
Form
.
Item
>
{
page_type
&&
<
Form
.
Item
style=
{
{
marginLeft
:
'174px'
}
}
>
<
Button
type=
"primary"
style=
{
{
marginRight
:
'24px'
}
}
onClick=
{
onSubmit
}
>
{
intl
.
formatMessage
({
id
:
'contract.baocun'
})
}
</
Button
>
<
Button
type=
"primary"
style=
{
{
marginRight
:
'24px'
}
}
onClick=
{
onSubmit
}
>
{
intl
.
formatMessage
({
id
:
'contract.baocun'
})
}
</
Button
>
<
Popconfirm
title=
"
{
intl
.
formatMessage
({
id
:
'contract.weibaocunshifouqueding'
})
}
"
onConfirm=
{
confirm
}
okText=
{
intl
.
formatMessage
({
id
:
'contract.shi'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'contract.fou'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'contract.shi'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'contract.fou'
})
}
>
<
Button
>
{
intl
.
formatMessage
({
id
:
'contract.quxiao'
})
}
</
Button
>
<
Button
>
{
intl
.
formatMessage
({
id
:
'contract.quxiao'
})
}
</
Button
>
</
Popconfirm
>
</
Form
.
Item
>
}
...
...
src/pages/contract/template/templateList/index.tsx
View file @
00dfdc15
...
...
@@ -10,6 +10,8 @@ import EyePreview from '@/components/EyePreview';
import
{
PlusOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
}
from
'@ant-design/icons'
;
import
{
getContractContractTemplatePage
,
postContractContractTemplateDelete
,
postContractContractTemplateEnable
}
from
'@/services/ContractV2Api'
;
const
formActions
=
createFormActions
();
import
AuthButton
from
'@/components/AuthButton'
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
const
intl
=
getIntl
();
...
...
@@ -27,6 +29,7 @@ const Template: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
EyePreview
type=
{
AuthUrl
(
'templateList.see'
,
'contract'
)
?
'link'
:
'button'
}
url=
{
`/memberCenter/contract/template/detail?id=${record.id}`
}
>
{
text
}
...
...
@@ -49,6 +52,7 @@ const Template: React.FC<{}> = () => {
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<
AuthButton
menuCode=
"contract"
btnCode=
'templateList.state'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'contract.quedingyaozhixingzhegecao'
})
}
onConfirm=
{
()
=>
confirm
(
record
)
}
...
...
@@ -57,8 +61,10 @@ const Template: React.FC<{}> = () => {
>
<
Button
type=
"link"
style=
{
record
.
state
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
state
?
<>
{
intl
.
formatMessage
({
id
:
'contract.youxiao'
})
}
<
PlayCircleOutlined
/></>
:
<>
{
intl
.
formatMessage
({
id
:
'contract.wuxiao'
})
}
<
PauseCircleOutlined
/></>
}
</
Button
>
style=
{
record
.
state
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
state
?
<>
{
intl
.
formatMessage
({
id
:
'contract.youxiao'
})
}
<
PlayCircleOutlined
/></>
:
<>
{
intl
.
formatMessage
({
id
:
'contract.wuxiao'
})
}
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
)
return
component
}
...
...
@@ -72,7 +78,11 @@ const Template: React.FC<{}> = () => {
<>
{
record
.
state
===
0
&&
<>
<
Button
disabled=
{
record
.
state
===
1
}
style=
{
{
padding
:
'0px'
,
marginRight
:
'24px'
}
}
type=
'link'
><
Link
to=
{
`/memberCenter/contract/template/edit?id=${record.id}`
}
>
{
intl
.
formatMessage
({
id
:
'contract.bianji'
})
}
</
Link
></
Button
>
<
AuthButton
menuCode=
"contract"
btnCode=
'templateList.edit'
>
<
Button
disabled=
{
record
.
state
===
1
}
style=
{
{
padding
:
'0px'
,
marginRight
:
'24px'
}
}
type=
'link'
><
Link
to=
{
`/memberCenter/contract/template/edit?id=${record.id}`
}
>
{
intl
.
formatMessage
({
id
:
'contract.bianji'
})
}
</
Link
></
Button
>
</
AuthButton
>
<
AuthButton
menuCode=
"contract"
btnCode=
'templateList.del'
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'contract.quedingyaozhixingzhegecao'
})
}
onConfirm=
{
()
=>
confirmDel
(
record
)
}
...
...
@@ -84,8 +94,10 @@ const Template: React.FC<{}> = () => {
disabled=
{
record
.
state
===
1
}
style=
{
{
padding
:
'0px'
}
}
type=
"link"
>
{
intl
.
formatMessage
({
id
:
'contract.shanchu'
})
}
</
Button
>
>
{
intl
.
formatMessage
({
id
:
'contract.shanchu'
})
}
</
Button
>
</
Popconfirm
>
</
AuthButton
>
</>
}
...
...
@@ -117,13 +129,16 @@ const Template: React.FC<{}> = () => {
const
Actions
=
(
<
Space
>
<
AuthButton
menuCode=
"contract"
btnCode=
'templateList.add'
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleJumpAdd
}
>
{
intl
.
formatMessage
({
id
:
'contract.xinjian'
})
}
{
intl
.
formatMessage
({
id
:
'contract.xinjian'
})
}
</
Button
>
</
AuthButton
>
</
Space
>
);
...
...
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