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
陈智峰
jinfa-platform
Commits
c1244a42
Commit
c1244a42
authored
Mar 10, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同能力
parent
a0507d06
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
3169 additions
and
112 deletions
+3169
-112
config.ts
config/config.ts
+98
-63
contracRoute.ts
config/routes/contracRoute.ts
+94
-0
index.ts
config/routes/index.ts
+12
-9
index.ts
config/routes/tranactionRoute/index.ts
+73
-40
index.less
src/pages/contract/ElectronicSignature/apply/index.less
+39
-0
index.tsx
src/pages/contract/ElectronicSignature/apply/index.tsx
+136
-0
index.tsx
...ontract/ElectronicSignature/enterpriseCertified/index.tsx
+98
-0
colorTag.ts
src/pages/contract/common/colorTag.ts
+44
-0
detailFormColumnType.ts
src/pages/contract/common/detailFormColumnType.ts
+263
-0
externalState.tsx
src/pages/contract/common/externalState.tsx
+42
-0
index.less
src/pages/contract/common/index.less
+0
-0
interiorState.tsx
src/pages/contract/common/interiorState.tsx
+41
-0
statusList.ts
src/pages/contract/common/statusList.ts
+405
-0
tableStatusList.tsx
src/pages/contract/common/tableStatusList.tsx
+0
-0
index.tsx
src/pages/contract/components/corporate/index.tsx
+180
-0
index.tsx
src/pages/contract/components/enterpriseInfoCheck/index.tsx
+111
-0
index.less
src/pages/contract/components/index.less
+210
-0
index.tsx
src/pages/contract/components/publicAccount/index.tsx
+0
-0
index.less
src/pages/contract/components/steps/index.less
+28
-0
index.tsx
src/pages/contract/components/steps/index.tsx
+26
-0
index.tsx
src/pages/contract/components/test/index.tsx
+136
-0
QueryListdetails.tsx
src/pages/contract/manage/QueryList/QueryListdetails.tsx
+108
-0
index.tsx
src/pages/contract/manage/QueryList/index.tsx
+108
-0
index.tsx
src/pages/contract/manage/bidding/index.tsx
+107
-0
index.tsx
src/pages/contract/manage/purchase/index.tsx
+106
-0
index.ts
src/pages/contract/manage/schema/index.ts
+87
-0
add.tsx
src/pages/contract/template/addContract/add.tsx
+16
-0
details.tsx
src/pages/contract/template/addContract/details.tsx
+15
-0
edit.tsx
src/pages/contract/template/addContract/edit.tsx
+16
-0
index.less
src/pages/contract/template/addContract/index.less
+54
-0
index.tsx
src/pages/contract/template/addContract/index.tsx
+228
-0
index.tsx
src/pages/contract/template/classSearch/index.tsx
+87
-0
index.tsx
src/pages/contract/template/templateList/index.tsx
+201
-0
No files found.
config/config.ts
View file @
c1244a42
import
{
defineConfig
}
from
'umi'
;
import
routes
from
'./router'
import
proxy
from
'./proxy'
import
theme
from
'./lingxi.theme.config'
import
routes
from
'./router'
;
import
proxy
from
'./proxy'
;
import
theme
from
'./lingxi.theme.config'
;
const
HardSourceWebpackPlugin
=
require
(
'hard-source-webpack-plugin'
);
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
// 是否开启动态主题
const
isProduction
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
const
OPEN_THEME_BUILD
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
;
// 是否开启动态主题
const
isProduction
=
process
.
env
.
NODE_ENV
===
'production'
?
true
:
false
;
const
config
:
any
=
{
// 如需写入环境变量 需在config中先写入
define
:
{
"process.env.SITE_ID"
:
process
.
env
.
SITE_ID
,
"process.env.BACK_GATEWAY"
:
process
.
env
.
BACK_GATEWAY
,
'process.env.SOCKET_URL'
:
process
.
env
.
SOCKET_URL
'process.env.SITE_ID'
:
process
.
env
.
SITE_ID
,
'process.env.BACK_GATEWAY'
:
process
.
env
.
BACK_GATEWAY
,
'process.env.SOCKET_URL'
:
process
.
env
.
SOCKET_URL
,
},
// layout: {},
esbuild
:
{},
...
...
@@ -23,19 +23,45 @@ const config: any = {
baseNavigator
:
true
,
},
nodeModulesTransform
:
{
type
:
'none'
type
:
'none'
,
},
routes
,
extraBabelPlugins
:
[
[
'import'
,
{
libraryName
:
'bizcharts'
,
camel2DashComponentName
:
false
,
customName
:
require
(
'path'
).
resolve
(
__dirname
,
'./utils/customBitchartsName.js'
)
},
'bizcharts'
],
[
'import'
,
{
libraryName
:
'antd'
,
libraryDirectory
:
'es'
,
style
:
true
},
'antd'
],
[
'import'
,
{
libraryName
:
'god'
,
libraryDirectory
:
'es'
,
style
:
true
},
'god'
],
[
'import'
,
{
libraryName
:
'@umijs/hooks'
,
libraryDirectory
:
'lib'
,
camel2DashComponentName
:
false
},
'@umijs/hooks'
],
// 将下划线转化关闭
isProduction
&&
[
'transform-remove-console'
,
{
"exclude"
:
[
"error"
,
"warn"
]
}],
// 移除 console
[
'import'
,
{
libraryName
:
'bizcharts'
,
camel2DashComponentName
:
false
,
customName
:
require
(
'path'
).
resolve
(
__dirname
,
'./utils/customBitchartsName.js'
,
),
},
'bizcharts'
,
],
[
'import'
,
{
libraryName
:
'antd'
,
libraryDirectory
:
'es'
,
style
:
true
},
'antd'
,
],
[
'import'
,
{
libraryName
:
'god'
,
libraryDirectory
:
'es'
,
style
:
true
},
'god'
,
],
[
'import'
,
{
libraryName
:
'@umijs/hooks'
,
libraryDirectory
:
'lib'
,
camel2DashComponentName
:
false
,
},
'@umijs/hooks'
,
],
// 将下划线转化关闭
isProduction
&&
[
'transform-remove-console'
,
{
exclude
:
[
'error'
,
'warn'
]
},
],
// 移除 console
],
history
:
{
type
:
'browser'
,
// 'brower' | 'hash'
...
...
@@ -53,72 +79,81 @@ const config: any = {
},
inlineLimit
:
10000
,
chunks
:
isProduction
&&
[
'vendors'
,
'umi'
],
chainWebpack
:
function
(
config
,
{
webpack
})
{
chainWebpack
:
function
(
config
,
{
webpack
})
{
config
.
module
.
rule
(
'svg'
)
.
exclude
.
add
(
/pages/
).
end
();
// 给内置的添加 exclude,这里根据自己的情况处理
.
exclude
.
add
(
/pages/
)
.
end
();
// 给内置的添加 exclude,这里根据自己的情况处理
config
.
module
.
rule
(
'svgr'
)
.
test
(
/.svg$/
)
.
include
.
add
(
/pages/
).
end
()
// include 指定需要直接 svgr 的情况
.
include
.
add
(
/pages/
)
.
end
()
// include 指定需要直接 svgr 的情况
.
use
(
'@svgr/webpack'
)
.
loader
(
require
.
resolve
(
'@svgr/webpack'
));
.
loader
(
require
.
resolve
(
'@svgr/webpack'
));
isProduction
&&
config
.
merge
({
optimization
:
{
minimize
:
true
,
splitChunks
:
{
chunks
:
'all'
,
minSize
:
30000
,
minChunks
:
3
,
automaticNameDelimiter
:
'.'
,
cacheGroups
:
{
vendor
:
{
name
:
'vendors'
,
test
({
resource
})
{
return
/
[\\/]
node_modules
[\\/]
/
.
test
(
resource
);
isProduction
&&
config
.
merge
({
optimization
:
{
minimize
:
true
,
splitChunks
:
{
chunks
:
'all'
,
minSize
:
30000
,
minChunks
:
3
,
automaticNameDelimiter
:
'.'
,
cacheGroups
:
{
vendor
:
{
name
:
'vendors'
,
test
({
resource
})
{
return
/
[\\/]
node_modules
[\\/]
/
.
test
(
resource
);
},
priority
:
10
,
},
priority
:
10
,
},
},
},
}
});
});
// config.plugin('hardSource').use(HardSourceWebpackPlugin)
config
.
plugin
(
'hardSource'
).
use
(
new
HardSourceWebpackPlugin
({
cacheDirectory
:
'node_modules/.cache/hard-source/[confighash]'
,
configHash
:
function
(
webpackConfig
)
{
return
require
(
'node-object-hash'
)({
sort
:
false
}).
hash
(
webpackConfig
);
}
}))
// 使用中间缓存步骤扩展提升二次编译速度
// 对下面配置的 module 不进行缓存
config
.
plugin
(
'hardSourceExcludeModule'
).
use
(
HardSourceWebpackPlugin
.
ExcludeModulePlugin
,
[
[
{
test
:
/mini-css-extract-plugin
[\\/]
dist
[\\/]
loader/
,
config
.
plugin
(
'hardSource'
).
use
(
new
HardSourceWebpackPlugin
({
cacheDirectory
:
'node_modules/.cache/hard-source/[confighash]'
,
configHash
:
function
(
webpackConfig
)
{
return
require
(
'node-object-hash'
)({
sort
:
false
}).
hash
(
webpackConfig
,
);
},
// {
// test: /eslint-loader/,
// },
// {
// test: /.*\.DS_Store/,
// },
],
]);
}),
);
// 使用中间缓存步骤扩展提升二次编译速度
// 对下面配置的 module 不进行缓存
config
.
plugin
(
'hardSourceExcludeModule'
)
.
use
(
HardSourceWebpackPlugin
.
ExcludeModulePlugin
,
[
[
{
test
:
/mini-css-extract-plugin
[\\/]
dist
[\\/]
loader/
,
},
// {
// test: /eslint-loader/,
// },
// {
// test: /.*\.DS_Store/,
// },
],
]);
},
cssLoader
:
{
localsConvention
:
'camelCase'
,
// 将style中的class由 .foo-body 转化为fooBody调用
localsConvention
:
'camelCase'
,
// 将style中的class由 .foo-body 转化为fooBody调用
},
lessLoader
:
{
// 所有less文件都会引入的变量
modifyVars
:
{
// 或者可以通过 less 文件覆盖(文件路径为绝对路径)
'hack'
:
`true; @import "~@/global/styles/theme.less";`
}
hack
:
`true; @import "~@/global/styles/theme.less";`
,
}
,
},
dynamicImport
:
{
loading
:
'@/components/Loading'
loading
:
'@/components/Loading'
,
},
// icon
// favicon: '',
...
...
@@ -127,7 +162,7 @@ const config: any = {
* 会自动添加到网页html的顶部
*/
metas
:
[],
plugins
:
[],
// 配置项的名字通常是插件名去掉 umi-plugin- 或 @umijs/plugin 前缀。
plugins
:
[],
// 配置项的名字通常是插件名去掉 umi-plugin- 或 @umijs/plugin 前缀。
proxy
,
// ssr: {},
// exportStatic: {},
...
...
@@ -144,7 +179,7 @@ const config: any = {
* 配置主题,实际上是配 less 变量。
*/
theme
,
}
}
;
// if (OPEN_THEME_BUILD) {
// config.plugins = [...config.plugins, 'umi-plugin-antd-theme']
...
...
config/routes/contracRoute.ts
0 → 100644
View file @
c1244a42
const
contracRoute
=
{
path
:
'/memberCenter/contract'
,
name
:
'合同能力'
,
icon
:
'commodity'
,
routes
:
[
/* 电子签章申请 */
{
path
:
'/memberCenter/contract/ElectronicSignature'
,
name
:
'电子签章'
,
routes
:
[
{
path
:
'/memberCenter/contract/ElectronicSignature/apply'
,
name
:
'电子签章申请'
,
component
:
'@/pages/contract/ElectronicSignature/apply'
,
},
{
path
:
'/memberCenter/contract/ElectronicSignature/enterpriseCertified'
,
name
:
'enterpriseCertified'
,
hideInMenu
:
true
,
component
:
'@/pages/contract/ElectronicSignature/enterpriseCertified/index'
,
},
],
},
/* 合同模板 */
{
path
:
'/memberCenter/contract/template'
,
name
:
'合同模版'
,
routes
:
[
{
path
:
'/memberCenter/contract/template/templateList'
,
name
:
'合同模板'
,
component
:
'@/pages/contract/template/templateList'
,
},
// 合同模板-新增
{
path
:
'/memberCenter/contract/template/add'
,
name
:
'addTemplate'
,
hideInMenu
:
true
,
component
:
'@/pages/contract/template/addContract/add'
,
},
// 合同模板-编辑
{
path
:
'/memberCenter/contract/template/edit'
,
name
:
'editTemplate'
,
hideInMenu
:
true
,
component
:
'@/pages/contract/template/addContract/edit'
,
},
// 合同模板-详情
{
path
:
'/memberCenter/contract/template/detail'
,
name
:
'templateDetail'
,
hideInMenu
:
true
,
component
:
'@/pages/contract/template/addContract/details'
,
},
// 合同模板参数查询
{
path
:
'/memberCenter/contract/template/classSearch'
,
name
:
'合同模板参数查询'
,
component
:
'@/pages/contract/template/classSearch/index'
,
},
],
},
/* 合同管理 */
{
path
:
'/memberCenter/contract/manage'
,
name
:
'合同管理'
,
routes
:
[
{
path
:
'/memberCenter/contract/manage/purchase'
,
name
:
'待创建采购询价合同'
,
component
:
'@/pages/contract/manage/purchase'
,
},
{
path
:
'/memberCenter/contract/manage/bidding'
,
name
:
'待创建采购招标合同'
,
component
:
'@/pages/contract/manage/bidding'
,
},
{
path
:
'/memberCenter/contract/manage/QueryList'
,
name
:
'合同查询'
,
component
:
'@/pages/contract/manage/QueryList'
,
},
{
path
:
'/memberCenter/contract/manage/QueryListdetails'
,
name
:
'合同查询详情'
,
component
:
'@/pages/contract/manage/QueryList/QueryListdetails'
,
},
],
},
],
};
export
default
contracRoute
;
config/routes/index.ts
View file @
c1244a42
...
...
@@ -15,10 +15,11 @@
// import AfterService from './afterServiceRoute' // 售后
// import HandlingRoute from './handlingRoute'; // 加工能力
// import BalaceRoute from './balanceRoute';
import
asyncRoutes
from
'../router.config.json'
import
ProcurementRoute
from
'./procurementRoute'
import
{
callForBidsRoute
}
from
'./procurementRoute/callForBids'
import
{
purchaseInquiryRoute
}
from
'./procurementRoute/purchaseInquiry'
import
asyncRoutes
from
'../router.config.json'
;
import
ProcurementRoute
from
'./procurementRoute'
;
import
{
callForBidsRoute
}
from
'./procurementRoute/callForBids'
;
import
{
purchaseInquiryRoute
}
from
'./procurementRoute/purchaseInquiry'
;
import
contracRoute
from
'./contracRoute'
;
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const
memberCenterRoute
=
{
...
...
@@ -27,15 +28,15 @@ const memberCenterRoute = {
routes
:
[
{
path
:
'/memberCenter'
,
redirect
:
'/memberCenter/home'
redirect
:
'/memberCenter/home'
,
},
{
path
:
'/memberCenter/shopAbility'
,
redirect
:
'/memberCenter/shopAbility/infoManage'
redirect
:
'/memberCenter/shopAbility/infoManage'
,
},
{
path
:
'/memberCenter/channelAbility'
,
redirect
:
'/memberCenter/channelAbility/infoManage'
redirect
:
'/memberCenter/channelAbility/infoManage'
,
},
// {
// path: `/memberCenter/home`,
...
...
@@ -48,6 +49,8 @@ const memberCenterRoute = {
// srm开发临时使用...
ProcurementRoute
,
// 合同能力
contracRoute
,
//...
...
asyncRoutes
,
{
...
...
@@ -63,6 +66,6 @@ const memberCenterRoute = {
// component: '@/pages/404',
// },
],
}
}
;
export
default
memberCenterRoute
export
default
memberCenterRoute
;
config/routes/tranactionRoute/index.ts
View file @
c1244a42
This diff is collapsed.
Click to expand it.
src/pages/contract/ElectronicSignature/apply/index.less
0 → 100644
View file @
c1244a42
.apply_info {
.apply_status {
padding: 24px;
border-radius: 8px;
margin-bottom: 24px;
display: flex;
align-items: center;
.status {
color: #FFFFFF;
font-size: 14px;
width: 195px;
}
.apply_status_btn {
&>button {
&:first-child {
margin-right: 24px;
}
}
}
}
&>.apply_item {
padding: 24px;
border-radius: 8px;
background-color: #FFF;
:global {
.ant-descriptions-item-label {
color: #909399;
width: 200px;
}
}
}
}
\ No newline at end of file
src/pages/contract/ElectronicSignature/apply/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
import
styles
from
'./index.less'
import
{
history
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
ExclamationCircleFilled
,
CheckCircleFilled
,
ClockCircleFilled
,
CloseCircleFilled
}
from
'@ant-design/icons'
;
import
{
Descriptions
,
Button
}
from
'antd'
;
import
div
from
'./../../../editor/configs/componentConfigs/HTML/div'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
Test
from
'../../components/test'
const
Apply
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
/**头部状态的颜色值
* 申请状态 1-未申请 2-申请中 3-申请不通过 4-申请通过
*/
const
applyStaus
=
[{
status
:
1
,
name
:
'未申请'
,
icon
:
<
ExclamationCircleFilled
/>,
color
:
'#909399'
,
},
{
status
:
2
,
name
:
'申请中'
,
icon
:
<
ClockCircleFilled
/>,
color
:
'#4279DF'
,
},
{
status
:
3
,
name
:
'申请不通过'
,
icon
:
<
CloseCircleFilled
/>,
color
:
'#D32F2F'
,
},
{
status
:
4
,
name
:
'申请通过'
,
icon
:
<
CheckCircleFilled
/>,
color
:
'#00B37A'
,
}]
const
[
authType
,
setAuthType
]
=
useState
<
number
>
(
1
);
// 认证方式 1-法人认证 2-经办人认证 3-个人认证
const
[
signatureAuthLogId
,
setSignatureAuthLogId
]
=
useState
<
number
>
(
0
);
// 电子签章认证记录id
const
[
data
,
setData
]
=
useState
<
any
>
({});
/**电子签章认证查询 */
useEffect
(()
=>
{
PublicApi
.
getOrderSignatureAuthGet
({}).
then
((
res
:
any
)
=>
{
setData
(
res
.
data
)
})
},
[])
/**电子签章认证申请 */
const
AuthApply
=
async
()
=>
{
if
(
ref
&&
data
.
state
===
1
)
{
const
vaildDetail
=
await
ref
.
current
.
validateFields
();
if
(
vaildDetail
)
{
await
PublicApi
.
postOrderSignatureAuthApply
({}).
then
(
res
=>
{
setSignatureAuthLogId
(
res
.
data
.
signatureAuthLogId
);
sessionStorage
.
setItem
(
'signatureAuthLogId'
,
res
.
data
.
signatureAuthLogId
.
toString
())
history
.
push
(
`/memberCenter/contract/ElectronicSignature/enterpriseCertified?authTypeEdit=
${
authType
}
`
)
})
}
}
else
{
await
PublicApi
.
postOrderSignatureAuthApply
({}).
then
(
res
=>
{
setSignatureAuthLogId
(
res
.
data
.
signatureAuthLogId
);
sessionStorage
.
setItem
(
'signatureAuthLogId'
,
res
.
data
.
signatureAuthLogId
.
toString
())
history
.
push
(
`/memberCenter/contract/ElectronicSignature/enterpriseCertified?authTypeEdit=
${
authType
}
`
)
})
}
}
return
(
<
PageHeaderWrapper
>
<
div
className=
{
styles
.
apply_info
}
>
{
applyStaus
.
map
(
item
=>
(
<
div
key=
{
item
.
status
}
>
{
data
.
state
===
item
.
status
&&
<
div
className=
{
styles
.
apply_status
}
style=
{
{
backgroundColor
:
item
.
color
}
}
>
<
div
>
<
div
className=
{
styles
.
status
}
style=
{
{
opacity
:
.
6
,
fontSize
:
'12px'
}
}
>
申请状态
</
div
>
<
div
className=
{
styles
.
status
}
>
{
item
.
icon
}
{
item
.
name
}
</
div
>
</
div
>
<
div
className=
{
styles
.
apply_status_btn
}
>
<
Button
size=
'middle'
style=
{
{
color
:
item
.
color
}
}
onClick=
{
AuthApply
}
>
{
item
.
status
===
1
?
'立即申请'
:
'重新申请'
}
</
Button
>
{
data
.
state
===
3
&&
<
Button
style=
{
{
marginLeft
:
'24px'
}
}
size=
'middle'
ghost
>
查看进度
</
Button
>
}
</
div
>
</
div
>
}
</
div
>
))
}
{
/* 企业 */
}
{
(
authType
===
1
||
authType
===
2
)
&&
<>
{
data
.
state
!==
1
?
<
div
className=
{
styles
.
apply_item
}
>
<
Descriptions
title=
"申请信息"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"公司名称"
>
{
data
.
orgName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"统一社会信用代码"
>
{
data
.
orgCode
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"法人姓名"
>
{
data
.
legalRepName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"法人手机号"
>
{
data
.
legalRepMobile
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"法人身份证号"
>
{
data
.
legalRepIdNo
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"认证方式"
>
-
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"验证方式"
>
-
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
:
<
Test
authType=
{
authType
}
actionRef=
{
ref
}
/>
}
</>
}
{
/* 个人 */
}
{
authType
===
3
&&
<>
{
data
.
state
!==
1
?
<
div
className=
{
styles
.
apply_item
}
>
<
Descriptions
title=
"申请信息"
column=
{
1
}
>
<
Descriptions
.
Item
label=
"姓名"
>
{
data
.
transactorName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"手机号"
>
{
data
.
transactorMobile
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"身份证号"
>
{
data
.
transactorIdNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"验证方式"
>
-
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
:
<
Test
authType=
{
authType
}
actionRef=
{
ref
}
/>
}
</>
}
</
div
>
</
PageHeaderWrapper
>
)
}
export
default
Apply
src/pages/contract/ElectronicSignature/enterpriseCertified/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
history
}
from
'umi'
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
StepComponents
from
'../../components/steps'
import
EnterpriseInfoCheck
from
'../../components/enterpriseInfoCheck'
import
Corporate
from
'../../components/corporate'
import
PublicAccount
from
'../../components/publicAccount'
import
{
PublicApi
}
from
'@/services/api'
;
const
EnterpriseCertified
=
()
=>
{
const
{
authTypeEdit
}
=
history
.
location
.
query
;
// 认证方式 1-法人认证 2-经办人认证 3-个人认证
const
[
step
,
setStep
]
=
useState
<
number
>
(
0
);
const
[
authType
,
setAuthType
]
=
useState
<
number
>
(
1
);
const
[
payWay
,
setPayWay
]
=
useState
<
number
>
(
1
);
// 1.支付宝, 2.对公, 3.短信
const
[
data
,
setData
]
=
useState
<
any
>
({});
/**电子签章认证查询 */
useEffect
(()
=>
{
const
formdata
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'formdata'
));
setData
(
formdata
)
},
[])
//认证方式切换Fn
const
authTypeFn
=
(
type
:
number
,
steps
:
number
,
name
:
string
)
=>
{
if
(
type
)
{
setAuthType
(
type
);
}
if
(
name
===
'company'
&&
type
===
1
)
{
delete
data
.
code
;
const
parmas
=
{
signatureAuthLogId
:
Number
(
sessionStorage
.
getItem
(
'signatureAuthLogId'
)),
authType
,
...
data
}
PublicApi
.
postOrderSignatureAuthLegalRepAuth
(
parmas
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setStep
(
steps
)
}
})
}
else
if
(
name
===
'stepUp'
||
(
name
===
'company'
&&
type
===
2
)
||
name
===
'company'
)
{
setStep
(
steps
)
}
else
{
delete
data
.
code
;
const
parmas
=
{
signatureAuthLogId
:
Number
(
sessionStorage
.
getItem
(
'signatureAuthLogId'
)),
...
data
}
PublicApi
.
postOrderSignatureAuthPersonalAuth
(
parmas
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setStep
(
steps
)
}
})
}
}
//切换支付方式
const
checkPayWayFn
=
(
type
:
number
)
=>
{
setPayWay
(
type
)
}
/**更新选择法人认证的时候更新data */
const
updateData
=
(
parmas
:
any
)
=>
{
setData
(
parmas
)
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
>
<
StepComponents
step=
{
step
}
authTypeEdit=
{
authTypeEdit
}
/>
{
step
===
0
&&
<
EnterpriseInfoCheck
authTypeEdit=
{
authTypeEdit
}
authTypeFn=
{
authTypeFn
}
data=
{
data
}
/>
}
{
step
===
1
&&
<
Corporate
authType=
{
authType
}
data=
{
data
}
checkPayWayFn=
{
checkPayWayFn
}
authTypeFn=
{
authTypeFn
}
updateData=
{
updateData
}
/>
}
{
step
===
2
&&
<
PublicAccount
authType=
{
authType
}
authTypeFn=
{
authTypeFn
}
payWay=
{
payWay
}
data=
{
data
}
/>
}
</
PageHeaderWrapper
>
)
}
export
default
EnterpriseCertified
src/pages/contract/common/colorTag.ts
0 → 100644
View file @
c1244a42
/*
* @Author: LeeJiancong
* @Date: 2020-07-30 17:23:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-28 16:12:37
*/
export
default
{
default
:
{
padding
:
'2px 5px'
,
background
:
'rgba(244,245,247,1)'
,
borderRadius
:
'4px'
},
confirm
:
{
color
:
'#3F7ED2'
,
padding
:
'2px 5px'
,
background
:
'rgba(240, 248, 255, 1)'
,
borderRadius
:
'4px'
},
success
:
{
color
:
'#00B37A'
,
padding
:
'2px 5px'
,
background
:
'rgba(235,247,242,1)'
,
borderRadius
:
'4px'
},
// warn: {
// color: '#E63F3B',
// padding: '2px 5px',
// background: 'rgba(255,235,230,1)',
// borderRadius: '4px'
// }
warn
:
{
color
:
'#E63F3B'
,
padding
:
'2px 5px'
,
background
:
'rgb(255, 235, 230)'
,
borderRadius
:
'4px'
},
Error
:
{
color
:
'red'
,
padding
:
'2px 5px'
,
background
:
'rgba(255,247,227,1)'
,
borderRadius
:
'4px'
}
}
\ No newline at end of file
src/pages/contract/common/detailFormColumnType.ts
0 → 100644
View file @
c1244a42
/*
* @Author: LeeJiancong
* @Date: 2020-08-27 16:27:53
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-09-10 10:22:41
*/
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
moment
from
'moment'
export
const
dockingColumn
=
(
children
,
optionChild
)
=>
{
let
columns
:
ColumnType
<
any
>
[]
=
[]
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'memberName'
,
key
:
'memberName'
,
align
:
'left'
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
align
:
'center'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'是否归属会员'
,
dataIndex
:
'membershipOrNot'
,
key
:
'membershipOrNot'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'否'
:
'是'
)
},
{
title
:
'需求发送状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
,
render
:(
text
:
any
,
records
,
index
)
=>
children
?
children
(
text
,
records
,
index
)
:
''
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
key
:
'option'
,
align
:
'center'
,
render
:(
text
:
any
,
records
,
index
)
=>
optionChild
?
optionChild
(
text
,
records
,
index
)
:
''
}
]
return
columns
}
export
const
memberColumn
=
(
children
?)
=>
{
let
columns
:
ColumnType
<
any
>
[]
=
[]
columns
=
[
{
title
:
'序号'
,
dataIndex
:
'memberId'
,
align
:
'center'
,
key
:
'memberId'
,
},
{
title
:
'会员名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
align
:
'left'
},
{
title
:
'会员类型'
,
dataIndex
:
'memberTypeName'
,
key
:
'memberTypeName'
,
align
:
'center'
},
{
title
:
'会员角色'
,
dataIndex
:
'roleName'
,
key
:
'roleName'
,
align
:
'center'
},
{
title
:
'会员等级'
,
dataIndex
:
'levelTag'
,
key
:
'levelTag'
,
align
:
'center'
},
{
title
:
'是否归属会员'
,
dataIndex
:
'membershipOrNot'
,
key
:
'membershipOrNot'
,
align
:
'center'
,
render
:(
text
:
any
)
=>
(
text
==
0
?
'否'
:
'是'
)
},
{
title
:
'需求发送状态'
,
dataIndex
:
'state'
,
key
:
'state'
,
align
:
'center'
,
render
:(
text
:
any
,
records
,
index
)
=>
children
?
children
(
text
,
records
,
index
)
:
''
}
]
return
columns
}
/**
* @description: 内部流转interiorRequisitionForms
* 外部流转 externalRequisitionForms
* @param {type}
* @return {type}
*/
export
const
externalColumn
=
(
childeren
,
stateList
?)
=>
{
let
culumn
:
ColumnType
<
any
>
[]
=
[]
return
culumn
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'操作角色'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:(
text
:
any
,
record
:
any
)
=>
stateList
(
text
)
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
childeren
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'left'
,
key
:
'auditOpinion'
}
]
}
export
const
interiorColumn
=
(
childeren
,
stateList
?)
=>
{
let
culumn
:
ColumnType
<
any
>
[]
=
[]
return
culumn
=
[
{
title
:
'序号'
,
dataIndex
:
'id'
,
align
:
'center'
,
key
:
'id'
,
},
{
title
:
'操作人'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'部门'
,
dataIndex
:
'department'
,
align
:
'center'
,
key
:
'department'
,
},
{
title
:
'职位'
,
dataIndex
:
'position'
,
align
:
'center'
,
key
:
'position'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:(
text
:
any
,
record
:
any
)
=>
stateList
(
text
)
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
(
text
:
any
,
record
:
any
)
=>
childeren
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'left'
,
key
:
'auditOpinion'
}
]
}
src/pages/contract/common/externalState.tsx
0 → 100644
View file @
c1244a42
// 内部状态
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Tag
}
from
'antd'
;
interface
params
{
state
?:
any
,
data
:
Array
<
any
>
,
colorType
?:
number
}
const
ExternalState
:
React
.
FC
<
params
>
=
(
props
)
=>
{
const
{
state
,
data
,
colorType
}
=
props
;
const
[
color
,
setcolor
]
=
useState
<
any
>
([]);
useEffect
(()
=>
{
switch
(
colorType
)
{
case
1
:
setcolor
([
''
,
'default'
,
'warning'
,
'default'
,
'warning'
,
'success'
,
'error'
,
'error'
,
'error'
])
break
;
case
2
:
setcolor
([
''
,
'default'
,
'processing'
,
'warning'
,
'success'
,
'error'
])
break
;
}
},[])
return
(
<>
{
data
.
length
>
0
&&
data
.
map
((
item
:
any
)
=>
{
return
(
state
===
item
.
state
&&
<
Tag
color=
{
color
[
item
.
state
]
}
key=
{
item
.
state
}
>
{
item
.
name
}
</
Tag
>
)
})
}
</>
)
}
export
default
ExternalState
\ No newline at end of file
src/pages/contract/common/index.less
0 → 100644
View file @
c1244a42
src/pages/contract/common/interiorState.tsx
0 → 100644
View file @
c1244a42
// 外部状态
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Badge
}
from
'antd'
;
interface
params
{
state
?:
any
,
data
:
Array
<
any
>
,
colorType
?:
number
}
const
InteriorState
:
React
.
FC
<
params
>
=
(
props
)
=>
{
const
{
state
,
data
,
colorType
}
=
props
;
const
[
color
,
setcolor
]
=
useState
<
any
>
([]);
useEffect
(()
=>
{
switch
(
colorType
)
{
case
1
:
setcolor
([
''
,
'default'
,
'warning'
,
'warning'
,
'processing'
,
'success'
,
'error'
,
'error'
])
break
;
case
2
:
setcolor
([
''
,
'default'
,
'warning'
,
'warning'
,
'success'
,
'success'
,
'error'
])
break
;
}
},
[])
return
(
<>
{
data
.
length
>
0
&&
data
.
map
((
item
:
any
)
=>
{
return
(
state
===
item
.
state
&&
<
Badge
status=
{
color
[
item
.
state
]
}
text=
{
item
.
name
}
key=
{
item
.
state
}
/>
)
})
}
</>
)
}
export
default
InteriorState
\ No newline at end of file
src/pages/contract/common/statusList.ts
0 → 100644
View file @
c1244a42
import
React
,
{
useEffect
}
from
'react'
import
{
PublicApi
}
from
'@/services/api'
/*
* @Author: LeeJiancong
* @Date: 2020-08-01 11:06:09
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-09-09 14:47:02
*/
export
const
TimeList
=
[
{
label
:
'单据时间(全部)'
,
value
:
0
},
{
label
:
'今天'
,
value
:
1
},
{
label
:
'一周内'
,
value
:
2
},
{
label
:
'一个月内'
,
value
:
3
},
{
label
:
'三个月内'
,
value
:
4
},
{
label
:
'六个月内'
,
value
:
5
},
{
label
:
'一年内'
,
value
:
6
},
{
label
:
'一年前'
,
value
:
7
}
]
/**
* @description: 需求单发布状态筛选
* @param {type} 外部1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
* @return {type} 1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
*/
export
const
filterExternalStateList
=
[
{
text
:
'提交需求单'
,
value
:
1
},
{
text
:
'审核需求单'
,
value
:
2
},
{
text
:
'提交报价单'
,
value
:
3
},
{
text
:
'确认报价单'
,
value
:
4
},
{
text
:
'完成'
,
value
:
5
},
{
text
:
'审核不通过'
,
value
:
6
},
{
text
:
'取消报价单'
,
value
:
7
}
]
/**
* @description: 需求单发布状态筛选
* @param {type}
* @return {type} 内
*/
export
const
filterInteriorStateList
=
[
{
text
:
'新增需求单'
,
value
:
1
},
{
text
:
'审核需求单一级'
,
value
:
2
},
{
text
:
'审核需求单二级'
,
value
:
3
},
{
text
:
'提交需求单'
,
value
:
4
},
{
text
:
'完成'
,
value
:
5
},
{
text
:
'审核不通过'
,
value
:
6
},
{
text
:
'取消需求单'
,
value
:
7
}
]
/**
* @description: 商品询价外部状态筛选
* @param {type}
* @return {type} 1.提交询价单 2.提交报价单 3.确认报价单 4.报价通过 5.报价不通过
*/
export
const
filterExternalState
=
[
{
text
:
'提交询价单'
,
value
:
1
},
{
text
:
'提交报价单'
,
value
:
2
},
{
text
:
'确认报价单'
,
value
:
3
},
{
text
:
'报价通过'
,
value
:
4
},
{
text
:
'报价不通过'
,
value
:
5
},
]
/**
* @description: 商品询价内部状态筛选
* @param {type}
* @return {type} 1.新增询价单 2.审核询价单 3.审核询价单 4.提交询价单 5.完成 6.审核不通过
*/
export
const
filterInternalState
=
[
{
text
:
'新增询价单'
,
value
:
1
},
{
text
:
'审核询价单'
,
value
:
2
},
{
text
:
'审核询价单'
,
value
:
3
},
{
text
:
'提交询价单'
,
value
:
4
},
{
text
:
'完成'
,
value
:
5
},
{
text
:
'审核不通过'
,
value
:
6
}
]
/**
* @description: 商品询价外部状态筛选
* @param {type}
* @return {type} 1.提交询价单 2.提交报价单 3.确认报价单 4.报价通过 5.报价不通过
*/
export
const
filterExternalStateLabelList
=
[
{
label
:
'提交询价单'
,
value
:
1
},
{
label
:
'提交报价单'
,
value
:
2
},
{
label
:
'确认报价单'
,
value
:
3
},
{
label
:
'报价通过'
,
value
:
4
},
{
label
:
'报价不通过'
,
value
:
5
},
]
/**
* @description: 商品询价内部状态筛选
* @param {type}
* @return {type} 1.新增询价单 2.审核询价单 3.审核询价单 4.提交询价单 5.完成 6.审核不通过
*/
export
const
filterInternalStateLabelList
=
[
{
label
:
'新增询价单'
,
value
:
1
},
{
label
:
'审核询价单'
,
value
:
2
},
{
label
:
'审核询价单'
,
value
:
3
},
{
label
:
'提交询价单'
,
value
:
4
},
{
label
:
'完成'
,
value
:
5
},
{
label
:
'审核不通过'
,
value
:
6
}
]
/**
* @description: 确认询价报价外部状态筛选
* @param {type}
* @return {type} 1.待提交询价单 2.待提交报价单 3.待确认报价单 4.报价通过 5.报价不通过
*/
export
const
confirmFilterExternalState
=
[
{
text
:
'待提交询价单'
,
value
:
1
},
{
text
:
'待提交报价单'
,
value
:
2
},
{
text
:
'待确认报价单'
,
value
:
3
},
{
text
:
'报价通过'
,
value
:
4
},
{
text
:
'报价不通过'
,
value
:
5
}
]
/**
* @description: 确认询价报价内部状态筛选
* @param {type}
* @return {type} 1.待提交审核 2.待审核 3.待审核 4.审核通过 5.完成 6.审核不通过
*/
export
const
confirmFilterInteriorState
=
[
{
text
:
'待提交审核'
,
value
:
1
},
{
text
:
'待审核'
,
value
:
2
},
{
text
:
'待审核'
,
value
:
3
},
{
text
:
'审核通过'
,
value
:
4
},
{
text
:
'完成'
,
value
:
5
},
{
text
:
'审核不通过'
,
value
:
6
}
]
/**
* @description: 确认询价报价搜索外部状态筛选
* @param {type}
* @return {type} 1.待提交询价单 2.待提交报价单 3.待确认报价单 4.报价通过 5.报价不通过
*/
export
const
searchFilterExternalState
=
[
{
label
:
'待提交询价单'
,
value
:
1
},
{
label
:
'待提交报价单'
,
value
:
2
},
{
label
:
'待确认报价单'
,
value
:
3
},
{
label
:
'报价通过'
,
value
:
4
},
{
label
:
'报价不通过'
,
value
:
5
}
]
/**
* @description: 确认询价报价搜索内部状态筛选
* @param {type}
* @return {type} 1.待提交审核 2.待审核 3.待审核 4.审核通过 5.完成 6.审核不通过
*/
export
const
searchFilterInteriorState
=
[
{
label
:
'待提交审核'
,
value
:
1
},
{
label
:
'待审核'
,
value
:
2
},
{
label
:
'待审核'
,
value
:
3
},
{
label
:
'审核通过'
,
value
:
4
},
{
label
:
'完成'
,
value
:
5
},
{
label
:
'审核不通过'
,
value
:
6
}
]
/***********************需求报价******************************* */
/**
* @description: 需求报价外部状态筛选
* @param {type} 外部状态:
* @return {type} 1.提交需求单 2.审核需求单 3.提交报价单 4.确认报价单 5.完成 6.审核不通过 7.取消报价单
*/
export
const
demandQuoteExternalState
=
[
{
label
:
'提交需求单'
,
value
:
1
},
{
label
:
'审核需求单'
,
value
:
2
},
{
label
:
'提交报价单'
,
value
:
3
},
{
label
:
'确认报价单'
,
value
:
4
},
{
label
:
'完成'
,
value
:
5
},
{
label
:
'审核不通过'
,
value
:
6
},
{
label
:
'取消报价单'
,
value
:
7
}
]
/**
* @description: 需求报价内部状态筛选
* @param {type} 内部状态:
* @return {type} 1.新增需求单 2.审核需求单一级 3.审核需求单二级 4.提交需求单 5.完成 6.审核不通过 7.取消报价单
*/
export
const
demandQuoteInteriorState
=
[
{
label
:
'新增需求单'
,
value
:
1
},
{
label
:
'审核需求单一级'
,
value
:
2
},
{
label
:
'审核需求单二级'
,
value
:
3
},
{
label
:
'提交需求单'
,
value
:
4
},
{
label
:
'完成'
,
value
:
5
},
{
label
:
'审核不通过'
,
value
:
6
},
{
label
:
'取消报价单'
,
value
:
7
}
]
/****************************确认需求报价********************************/
/**
* @description: 确认需求报价外部状态筛选
* @param {type} 外部状态:
* @return {type} 1.待提交需求单 2.待审核需求单 3.待提交报价单 4.待确认报价单 5.确认通过 6.确认不通过
*/
export
const
confirmDemandQuoteExternalState
=
[
{
label
:
'待提交需求单'
,
value
:
1
},
{
label
:
'待审核需求单'
,
value
:
2
},
{
label
:
'待提交报价单'
,
value
:
3
},
{
label
:
'待确认报价单'
,
value
:
4
},
{
label
:
'确认通过'
,
value
:
5
},
{
label
:
'确认不通过'
,
value
:
6
}
]
/**
* @description: 确认需求报价内部状态筛选
* @param {type} 内部状态:
* @return {type} 1.待提交审核 2.待审核报价单 3.待审核报价单 4.待提交报价单 5.完成(审核通过) 6.审核不通过
*/
export
const
confirmDemandQuoteInteriorState
=
[
{
label
:
'待提交审核'
,
value
:
1
},
{
label
:
'待审核报价单'
,
value
:
2
},
{
label
:
'待审核报价单'
,
value
:
3
},
{
label
:
'待提交报价单'
,
value
:
4
},
{
label
:
'完成(审核通过)'
,
value
:
5
},
{
label
:
'审核不通过'
,
value
:
6
}
]
\ No newline at end of file
src/pages/contract/common/tableStatusList.tsx
0 → 100644
View file @
c1244a42
This diff is collapsed.
Click to expand it.
src/pages/contract/components/corporate/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Button
,
Row
,
Col
,
Form
,
Input
,
Select
}
from
'antd'
import
styles
from
'../index.less'
import
cx
from
'classnames'
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
;
interface
queryProps
{
authType
:
number
,
authTypeFn
:
Function
,
checkPayWayFn
:
Function
,
updateData
:
Function
,
data
:
any
}
const
Corporate
:
React
.
FC
<
queryProps
>
=
(
props
)
=>
{
const
{
Option
}
=
Select
;
const
{
authType
,
authTypeFn
,
checkPayWayFn
,
data
,
updateData
}
=
props
;
const
[
options
,
setOptions
]
=
useState
<
any
>
([])
const
[
form
]
=
Form
.
useForm
();
const
[
payWay
,
setPayWay
]
=
useState
<
number
>
(
1
);
// 1.支付宝, 2.对公, 3.短信
// 手机号码验证
const
userPhoneRule
=
(
rule
,
value
)
=>
{
const
RegExp
=
/^1
[
345678
]\d{9}
$/gi
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入您的手机号'
))
}
if
(
!
RegExp
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
'手机号码格式不正确'
))
}
return
Promise
.
resolve
();
}
// 测试表当提交效果
const
onSubmit
=
async
()
=>
{
const
value
=
await
form
.
validateFields
();
if
(
value
)
{
const
query
:
any
=
{
signatureAuthLogId
:
Number
(
sessionStorage
.
getItem
(
'signatureAuthLogId'
)),
authType
:
authType
,
...
data
};
delete
value
.
code
;
const
parmas
=
Object
.
assign
(
query
,
value
);
updateData
(
parmas
)
PublicApi
.
postOrderSignatureAuthAgentAuth
(
parmas
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
authTypeFn
(
2
,
2
,
'company'
)
setPayWay
(
3
)
checkPayWayFn
(
3
)
}
})
}
}
// 切换支付认证方式
const
CheckPayWay
=
(
type
:
number
)
=>
{
setPayWay
(
type
)
checkPayWayFn
(
type
)
}
useEffect
(()
=>
{
CheckPayWay
(
1
);
PublicApi
.
getManageCountryAreaGetTelCode
().
then
(
res
=>
{
setOptions
(
res
.
data
)
})
},
[])
return
(
<>
{
/**企业认证方式*/
}
{
authType
===
1
&&
<
div
className=
{
styles
.
info_wrap
}
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
认证方式
<
QuestionCircleOutlined
style=
{
{
color
:
'#C0C4CC'
}
}
/></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Row
className=
{
styles
.
card_checkbox
}
>
<
Col
className=
{
cx
(
styles
.
card_checkbox_item
,
payWay
===
1
&&
styles
.
active
)
}
onClick=
{
()
=>
CheckPayWay
(
1
)
}
>
支付宝验证
</
Col
>
<
Col
className=
{
cx
(
styles
.
card_checkbox_item
,
payWay
===
2
&&
styles
.
active
)
}
onClick=
{
()
=>
CheckPayWay
(
2
)
}
>
对公账户验证
</
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Button
type=
'primary'
onClick=
{
()
=>
authTypeFn
(
''
,
2
,
'company'
)
}
>
下一步
</
Button
>
<
Button
onClick=
{
()
=>
authTypeFn
(
''
,
0
,
'stepUp'
)
}
>
上一步
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
}
{
/**经办人认证*/
}
{
authType
===
2
&&
<
div
className=
{
styles
.
info_wrap
}
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_title
}
>
企业信息核验
</
div
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
公司名称:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
orgName
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
统一社会信用代码:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
orgCode
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_title
}
>
经办人信息核验
</
div
>
<
div
className=
{
styles
.
info_item_con
}
>
<
Form
form=
{
form
}
>
<
Form
.
Item
label=
'经办人'
name=
'transactorName'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'请输入经办人'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'身份证号码'
name=
'transactorIdNumber'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'请输入身份证号码'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'手机号码'
colon=
{
false
}
required=
{
true
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
7
}
>
<
Form
.
Item
style=
{
{
width
:
'150px'
}
}
name=
'code'
rules=
{
[{
required
:
true
,
message
:
'请选择区号'
}]
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
>
{
options
.
map
(
v
=>
(
<
Option
key=
{
v
}
value=
{
v
}
>
{
v
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
17
}
>
<
Form
.
Item
style=
{
{
width
:
'398px'
}
}
name=
'transactorMobile'
rules=
{
[{
required
:
true
,
validator
:
userPhoneRule
,
}]
}
>
<
Input
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
.
Item
>
</
Form
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Button
type=
'primary'
onClick=
{
onSubmit
}
>
下一步
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
}
{
/**个人认证方式*/
}
{
authType
===
3
&&
<
div
className=
{
styles
.
info_wrap
}
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
认证方式
<
QuestionCircleOutlined
style=
{
{
color
:
'#C0C4CC'
}
}
/></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Row
className=
{
styles
.
card_checkbox
}
>
<
Col
className=
{
cx
(
styles
.
card_checkbox_item
,
payWay
===
1
&&
styles
.
active
)
}
onClick=
{
()
=>
CheckPayWay
(
1
)
}
>
支付宝验证
</
Col
>
<
Col
className=
{
cx
(
styles
.
card_checkbox_item
,
payWay
===
3
&&
styles
.
active
)
}
onClick=
{
()
=>
CheckPayWay
(
3
)
}
>
手机验证码验证
</
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Button
type=
'primary'
onClick=
{
()
=>
authTypeFn
(
''
,
2
,
'personal'
)
}
>
下一步
</
Button
>
<
Button
onClick=
{
()
=>
authTypeFn
(
''
,
0
,
'stepUp'
)
}
>
上一步
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
}
</>
)
}
export
default
Corporate
src/pages/contract/components/enterpriseInfoCheck/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
}
from
'react'
import
styles
from
'../index.less'
import
{
Button
,
Row
,
Col
}
from
'antd'
import
cx
from
'classnames'
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
interface
queryProps
{
authTypeEdit
:
string
,
authTypeFn
:
Function
,
data
:
any
}
const
EnterpriseInfoCheck
:
React
.
FC
<
queryProps
>
=
(
props
)
=>
{
const
{
authTypeEdit
,
authTypeFn
,
data
}
=
props
;
const
[
authTypeBtn
,
setAuthTypeBtn
]
=
useState
<
number
>
(
1
);
// 认证方式
// 切换认证方式
const
checkAuthType
=
(
type
:
number
)
=>
{
setAuthTypeBtn
(
type
);
}
return
(
<>
{
/* 企业展示 */
}
{
(
authTypeEdit
===
'1'
||
authTypeEdit
===
'2'
)
&&
<
div
className=
{
styles
.
info_wrap
}
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_title
}
>
企业信息核验
</
div
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
公司名称:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
orgName
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
统一社会信用代码:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
orgCode
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_title
}
>
法人信息核验
</
div
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
法人姓名:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
legalRepName
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
法人手机号:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
+
{
data
.
code
}
{
data
.
legalRepMobile
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
法人身份证号:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
legalRepIdNo
}
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
cx
(
styles
.
info_item
,
styles
.
info_dashed
)
}
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
认证方式
<
QuestionCircleOutlined
style=
{
{
color
:
'#C0C4CC'
}
}
/></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Row
className=
{
styles
.
card_checkbox
}
>
<
Col
className=
{
cx
(
styles
.
card_checkbox_item
,
authTypeBtn
===
1
&&
styles
.
active
)
}
onClick=
{
()
=>
checkAuthType
(
1
)
}
>
法人认证
</
Col
>
<
Col
className=
{
cx
(
styles
.
card_checkbox_item
,
authTypeBtn
===
2
&&
styles
.
active
)
}
onClick=
{
()
=>
checkAuthType
(
2
)
}
>
经办人认证
</
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Button
type=
'primary'
onClick=
{
()
=>
authTypeFn
(
authTypeBtn
,
1
,
'company'
)
}
>
下一步
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
}
{
/* 个人展示 */
}
{
authTypeEdit
===
'3'
&&
<
div
className=
{
styles
.
info_wrap
}
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_title
}
>
个人信息核验
</
div
>
<
div
className=
{
styles
.
info_item_con
}
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
姓名:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
transactorName
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
手机号:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
+86
{
data
.
transactorMobile
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
>
身份证号:
</
div
>
<
div
className=
{
styles
.
item_control
}
>
{
data
.
transactorIdNumber
}
</
div
>
</
div
>
<
div
className=
{
styles
.
item_con
}
>
<
div
className=
{
styles
.
item_label
}
></
div
>
<
div
className=
{
styles
.
item_control
}
>
<
Button
type=
'primary'
onClick=
{
()
=>
authTypeFn
(
3
,
1
,
'personal'
)
}
>
下一步
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
}
</>
)
}
export
default
EnterpriseInfoCheck
\ No newline at end of file
src/pages/contract/components/index.less
0 → 100644
View file @
c1244a42
.info_wrap {
padding: 24px;
min-height: 668px;
border-top: #EEF0F3 solid 1px;
background-color: #FFFFFF;
:global {
.ant-result-icon {
display: none;
}
}
.info_wran {
color: #909399;
font-size: 12px;
padding-bottom: 8px;
}
.bank_btn {
width: 380px;
margin: auto !important;
text-align: left;
button {
&:first-child {
margin-right: 24px;
}
}
}
.alipay_qrcode {
width: 240px;
height: 240px;
margin: 24px auto !important;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #EEF0F3;
box-sizing: border-box;
overflow: hidden;
}
.alipay_wran {
display: flex;
align-items: center;
justify-content: center;
}
.bank_info_le {
width: 420px;
margin: 24px auto 0px !important;
padding: 12px 24px 0px;
}
.info_phone_number {
width: 340px;
padding: 12px 24px;
margin: 24px auto !important;
background-color: #FAFBFC;
& > div {
text-align: left;
&:first-child {
color: #909399;
font-size: 12px;
padding: 12px 0px 6px;
}
&:last-child {
color: '#303133';
font-size: 32px;
font-weight: 500;
}
}
}
.bank_info {
width: 420px;
margin: 24px auto !important;
background-color: #FAFBFC;
padding: 12px 24px;
.bank_info_item {
display: flex;
padding: 12px 0px;
.bank_info_label {
width: 140px;
color: #909399;
text-align: left;
}
.bank_info_control {
width: 232px;
text-align: left;
}
}
}
.info_item {
.info_item_title {
position: relative;
padding: 12px 0px 12px 8px;
font-size: 12px;
color: #606266;
border-bottom: 1px solid #EEF0F3;
&::after {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
margin: auto;
height: 16px;
width: 2px;
background-color: #00B37A;
}
}
.info_item_con {
padding: 12px 0px;
.item_con {
padding: 12px 0px;
display: flex;
font-size: 12px;
.item_label {
width: 176px;
color: #909399;
}
.item_control {
color: #303133;
button {
&:first-child {
margin-right: 24px;
}
}
}
}
:global {
.ant-form-item {
width: 748px;
.ant-form-item-label {
width: 176px;
text-align: left;
& > label {
color: #909399;
}
}
}
}
}
.card_checkbox {
display: flex;
flex-wrap: wrap;
}
.card_checkbox_item {
min-width: 112px;
height: 32px;
margin-right: 32px;
margin-bottom: 16px;
border: 1px solid rgba(235, 236, 240, 1);
padding: 0 16px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.card_checkbox_item.active {
border-color: #00B382;
position: relative;
color: #00B382;
}
.card_checkbox_item.active::after {
content: '';
position: absolute;
bottom: 0;
right: 0;
width: 0;
height: 0;
border: 6px solid transparent;
border-right: 6px solid #00B382;
border-bottom: 6px solid #00B382;
}
}
.info_dashed {
position: relative;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
margin: auto;
width: 96%;
border-top: 1px dashed #EEF0F3;
}
}
}
src/pages/contract/components/publicAccount/index.tsx
0 → 100644
View file @
c1244a42
This diff is collapsed.
Click to expand it.
src/pages/contract/components/steps/index.less
0 → 100644
View file @
c1244a42
.step_info {
padding: 24px 128px;
background-color: #FAFBFC;
:global {
.ant-steps-item-finish {
.ant-steps-item-icon {
background-color: #00B37A;
.ant-steps-icon {
color: #FFFFFF;
}
}
}
.ant-steps-item-wait {
.ant-steps-item-icon {
background-color: #DFE1E6;
border-color: #DCDCDC;
.ant-steps-icon {
color: #606266;
}
}
}
}
}
\ No newline at end of file
src/pages/contract/components/steps/index.tsx
0 → 100644
View file @
c1244a42
import
React
from
'react'
import
styles
from
'./index.less'
import
{
Steps
}
from
'antd'
const
{
Step
}
=
Steps
;
interface
stepProps
{
step
:
number
,
authTypeEdit
:
string
,
}
const
StepComponents
:
React
.
FC
<
stepProps
>
=
(
props
)
=>
{
const
{
step
,
authTypeEdit
}
=
props
;
return
(
<
div
className=
{
styles
.
step_info
}
>
<
Steps
size=
"small"
current=
{
step
}
>
<
Step
title=
{
authTypeEdit
!==
'3'
?
"企业信息核验"
:
"个人信息核验"
}
/>
<
Step
title=
{
authTypeEdit
!==
'3'
?
"经办人/法人认证"
:
"选择认证方式"
}
/>
<
Step
title=
{
authTypeEdit
!==
'3'
?
"企业认证"
:
"个人认证"
}
/>
</
Steps
>
</
div
>
)
}
export
default
StepComponents
\ No newline at end of file
src/pages/contract/components/test/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Result
,
Button
,
Form
,
Input
,
Select
,
Row
,
Col
}
from
'antd'
import
styles
from
'../index.less'
import
{
AlipaySquareFilled
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
;
interface
queryProps
{
actionRef
?:
any
,
authType
:
number
}
const
Test
:
React
.
FC
<
queryProps
>
=
(
props
)
=>
{
const
{
actionRef
,
authType
}
=
props
;
const
{
Option
}
=
Select
;
const
[
form
]
=
Form
.
useForm
();
const
[
options
,
setOptions
]
=
useState
<
any
>
([])
// 手机号码验证
const
userPhoneRule
=
(
rule
,
value
)
=>
{
const
RegExp
=
/^1
[
345678
]\d{9}
$/gi
;
if
(
!
value
)
{
return
Promise
.
reject
(
new
Error
(
'请输入您的手机号'
))
}
if
(
!
RegExp
.
test
(
value
))
{
return
Promise
.
reject
(
new
Error
(
'手机号码格式不正确'
))
}
return
Promise
.
resolve
();
}
const
hadnleValidateFields
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
form
.
validateFields
().
then
(
values
=>
{
const
data
=
JSON
.
stringify
(
values
);
sessionStorage
.
setItem
(
'formdata'
,
data
)
console
.
log
(
values
,
10086
)
resolve
(
true
)
}).
catch
(
errorInfo
=>
{
console
.
log
(
errorInfo
)
})
})
}
useEffect
(()
=>
{
if
(
actionRef
)
{
const
userAction
=
{
validateFields
:
()
=>
hadnleValidateFields
()
}
if
(
actionRef
&&
typeof
actionRef
===
'function'
)
{
actionRef
(
userAction
);
}
if
(
actionRef
&&
typeof
actionRef
!==
'function'
)
{
actionRef
.
current
=
userAction
;
}
}
PublicApi
.
getManageCountryAreaGetTelCode
().
then
(
res
=>
{
setOptions
(
res
.
data
)
})
},
[])
return
(
<
div
className=
{
styles
.
info_wrap
}
>
<
div
className=
{
styles
.
info_item
}
>
<
div
className=
{
styles
.
info_item_con
}
>
<
Form
form=
{
form
}
>
{
authType
!==
3
?
<>
<
Form
.
Item
label=
'公司名称'
name=
'orgName'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'请输入经办人'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'统一社会信用代码'
name=
'orgCode'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'统一社会信用代码'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'法人姓名'
name=
'legalRepName'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'法人姓名'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'法人手机号'
colon=
{
false
}
required=
{
true
}
style=
{
{
marginBottom
:
'0px'
}
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
7
}
>
<
Form
.
Item
style=
{
{
width
:
'150px'
}
}
name=
'code'
rules=
{
[{
required
:
true
,
message
:
'请选择区号'
}]
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
>
{
options
.
map
(
v
=>
(
<
Option
key=
{
v
}
value=
{
v
}
>
{
v
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
17
}
>
<
Form
.
Item
style=
{
{
width
:
'398px'
}
}
name=
'legalRepMobile'
rules=
{
[{
required
:
true
,
validator
:
userPhoneRule
,
}]
}
>
<
Input
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
.
Item
>
<
Form
.
Item
label=
'法人身份证号'
name=
'legalRepIdNo'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'请输入身份证号码'
}]
}
>
<
Input
/>
</
Form
.
Item
>
</>
:
<>
<
Form
.
Item
label=
'姓名'
name=
'transactorName'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'姓名'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'手机号'
colon=
{
false
}
required=
{
true
}
style=
{
{
marginBottom
:
'0px'
}
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
7
}
>
<
Form
.
Item
style=
{
{
width
:
'150px'
}
}
name=
'code'
rules=
{
[{
required
:
true
,
message
:
'请选择区号'
}]
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
>
{
options
.
map
(
v
=>
(
<
Option
key=
{
v
}
value=
{
v
}
>
{
v
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
17
}
>
<
Form
.
Item
style=
{
{
width
:
'398px'
}
}
name=
'transactorMobile'
rules=
{
[{
required
:
true
,
validator
:
userPhoneRule
,
}]
}
>
<
Input
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
.
Item
>
<
Form
.
Item
label=
'身份证号'
name=
'transactorIdNumber'
colon=
{
false
}
rules=
{
[{
required
:
true
,
message
:
'请输入身份证号码'
}]
}
>
<
Input
/>
</
Form
.
Item
>
</>
}
</
Form
>
</
div
>
</
div
>
</
div
>
)
}
export
default
Test
\ No newline at end of file
src/pages/contract/manage/QueryList/QueryListdetails.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
tableListSchema
}
from
'../schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
const
QueryListdetails
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
filterParams
,
setFilterParams
]
=
useState
<
any
>
({})
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求单号/摘要'
,
dataIndex
:
'id'
,
align
:
'center'
,
},
{
title
:
'需求发布时间'
,
dataIndex
:
'name'
,
align
:
'center'
,
},
{
title
:
'合同乙方'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'合同总金额'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'对应单据/寻源类型'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'内部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'center'
,
render
:
(
text
:
any
,
reconds
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
if
(
text
===
1
)
{
component
=
<><
span
style=
{
statuStyle
.
success
}
>
有效
</
span
></>
}
return
component
}
}]
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderContractParamPage
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
);
},
components
:
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
QueryListdetails
src/pages/contract/manage/QueryList/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
tableListSchema
}
from
'../schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
const
QueryList
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
filterParams
,
setFilterParams
]
=
useState
<
any
>
({})
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求单号/摘要'
,
dataIndex
:
'id'
,
align
:
'center'
,
},
{
title
:
'需求发布时间'
,
dataIndex
:
'name'
,
align
:
'center'
,
},
{
title
:
'合同乙方'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'合同总金额'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'对应单据/寻源类型'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'内部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'center'
,
render
:
(
text
:
any
,
reconds
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
if
(
text
===
1
)
{
component
=
<><
span
style=
{
statuStyle
.
success
}
>
有效
</
span
></>
}
return
component
}
}]
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderContractParamPage
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
);
},
components
:
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
QueryList
src/pages/contract/manage/bidding/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
tableListSchema
}
from
'../schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
const
BiddingList
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
filterParams
,
setFilterParams
]
=
useState
<
any
>
({})
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求单号/摘要'
,
dataIndex
:
'id'
,
align
:
'center'
,
},
{
title
:
'需求发布时间'
,
dataIndex
:
'name'
,
align
:
'center'
,
},
{
title
:
'授标会员'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'授标时间'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'授标金额'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'内部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'center'
,
render
:
(
text
:
any
,
reconds
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
if
(
text
===
1
)
{
component
=
<><
span
style=
{
statuStyle
.
success
}
>
有效
</
span
></>
}
return
component
}
}]
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderContractParamPage
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
);
},
components
:
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
BiddingList
src/pages/contract/manage/purchase/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
tableListSchema
}
from
'../schema'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
Submit
from
'@/components/NiceForm/components/Submit'
import
DateRangePickerUnix
from
'@/components/NiceForm/components/DateRangePickerUnix'
const
PurchaseList
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
filterParams
,
setFilterParams
]
=
useState
<
any
>
({})
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'需求单号/摘要'
,
dataIndex
:
'id'
,
align
:
'center'
,
},
{
title
:
'需求发布时间'
,
dataIndex
:
'name'
,
align
:
'center'
,
},
{
title
:
'授标会员'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'授标时间'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'授标金额'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'内部状态'
,
dataIndex
:
'description'
,
align
:
'center'
,
},
{
title
:
'操作'
,
dataIndex
:
'state'
,
align
:
'center'
,
render
:
(
text
:
any
,
reconds
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
if
(
text
===
1
)
{
component
=
<><
span
style=
{
statuStyle
.
success
}
>
有效
</
span
></>
}
return
component
}
}]
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderContractParamPage
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyProps=
{
{
ctx
:
{
inline
:
false
,
schema
:
tableListSchema
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'orderNo'
,
FORM_FILTER_PATH
,
);
},
components
:
{
DateRangePickerUnix
,
Submit
}
}
}
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
PurchaseList
src/pages/contract/manage/schema/index.ts
0 → 100644
View file @
c1244a42
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
OrderTypeMap
,
PurchaseOrderInsideWorkStateTexts
,
PurchaseOrderOutWorkStateTexts
}
from
'@/constants'
;
/**
* 除了订单必填字段, 默认
*/
export
const
tableListSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
orderNo
:
{
type
:
'string'
,
"x-component"
:
'SearchFilter'
,
'x-component-props'
:
{
placeholder
:
'请输入订单编号'
,
align
:
'flex-start'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
inline
:
true
,
colStyle
:
{
marginRight
:
20
}
},
properties
:
{
orderThe
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'请输入订单摘要'
,
}
},
"memberName"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请输入采购会员名称'
}
},
"type"
:
{
type
:
'string'
,
"x-component-props"
:
{
placeholder
:
'请选择订单类型'
},
enum
:
Object
.
keys
(
OrderTypeMap
).
map
(
item
=>
({
label
:
OrderTypeMap
[
item
],
value
:
item
,
}))
},
// "externalState": {
// type: 'string',
// "x-component-props": {
// placeholder: '请选择外部状态'
// },
// enum: Object.keys(PurchaseOrderOutWorkStateTexts).map(item => ({
// label: PurchaseOrderOutWorkStateTexts[item],
// value: item,
// }))
// },
// "interiorState": {
// type: 'string',
// "x-component-props": {
// placeholder: '请选择内部状态'
// },
// enum: Object.keys(PurchaseOrderInsideWorkStateTexts).map(item => ({
// label: PurchaseOrderInsideWorkStateTexts[item],
// value: item,
// }))
// },
"[startCreateTime,endCreateTime]"
:
{
type
:
'array'
,
"x-component"
:
'DateRangePickerUnix'
,
'x-component-props'
:
{
placeholder
:
[
'开始时间'
,
'结束时间'
],
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
}
}
src/pages/contract/template/addContract/add.tsx
0 → 100644
View file @
c1244a42
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
ContractComponents
from
'./index'
;
const
AddContract
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
}
=
history
.
location
.
query
;
return
(
<
ContractComponents
page_type=
{
'add'
}
id=
{
id
}
/>
)
}
export
default
AddContract
;
\ No newline at end of file
src/pages/contract/template/addContract/details.tsx
0 → 100644
View file @
c1244a42
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
ContractComponents
from
'./index'
;
const
DetailsContract
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
}
=
history
.
location
.
query
;
return
(
<
ContractComponents
id=
{
id
}
/>
)
}
export
default
DetailsContract
;
\ No newline at end of file
src/pages/contract/template/addContract/edit.tsx
0 → 100644
View file @
c1244a42
import
React
from
'react'
;
import
{
history
}
from
'umi'
;
import
ContractComponents
from
'./index'
;
const
EditContract
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
id
}
=
history
.
location
.
query
;
return
(
<
ContractComponents
page_type=
{
'edit'
}
id=
{
id
}
/>
)
}
export
default
EditContract
;
\ No newline at end of file
src/pages/contract/template/addContract/index.less
0 → 100644
View file @
c1244a42
.addcontract_wrap {
:global {
.ant-form-item {
width: 748px;
.ant-form-item-label {
width: 172px;
text-align: left;
& > label {
color: #909399;
}
}
.ant-upload-list-item {
margin-top: 0px;
}
}
}
.upload_item {
padding: 5px 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #FAFBFC;
.upload_left {
display: flex;
align-items: center;
color: #303133;
:global {
.anticon-file-word {
color: #4279df;
font-size: 18px;
margin-right: 8px;
}
}
}
.upload_right {
color: #00B37A;
cursor: pointer;
:global {
.anticon-delete {
margin-left: 19px;
color: #C0C4CC;
}
}
}
}
}
\ No newline at end of file
src/pages/contract/template/addContract/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
history
}
from
'umi'
;
import
{
Form
,
Input
,
Upload
,
Card
,
Tooltip
,
Button
,
message
,
Badge
,
Popconfirm
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
UploadFile
,
UploadChangeParam
}
from
'antd/lib/upload/interface'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
{
QuestionCircleOutlined
,
StarOutlined
,
FileWordFilled
,
UploadOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./index.less'
export
interface
parmas
{
page_type
?:
string
,
id
?:
any
}
const
AddContract
:
React
.
FC
<
parmas
>
=
(
props
)
=>
{
const
{
page_type
,
id
}
=
props
;
const
{
TextArea
}
=
Input
;
const
[
form
]
=
Form
.
useForm
();
const
[
fileExampleUrl
,
setFileExampleUrl
]
=
useState
<
any
>
({});
const
[
uploadFile
,
setUploadFile
]
=
useState
<
any
>
({});
const
[
fileUrl
,
setFileUrl
]
=
useState
<
string
>
(
''
);
const
[
loading
,
setloading
]
=
useState
(
false
);
const
[
data
,
setData
]
=
useState
<
any
>
({});
/**判断文件类型和大小 */
const
beforeDocUpload
=
(
file
:
UploadFile
)
=>
{
const
name
=
file
.
name
.
split
(
'.'
);
const
type
=
name
[
name
.
length
-
1
];
const
isJpgOrPng
=
type
===
'doc'
||
type
===
'docx'
;
const
isLt20M
=
file
.
size
/
1024
/
1024
<
20
;
if
(
!
isJpgOrPng
)
{
message
.
error
(
'不是doc/docx文件!'
);
}
if
(
!
isLt20M
)
{
message
.
error
(
'上传文件大小不超过 20M!'
);
}
return
isJpgOrPng
&&
isLt20M
;
}
/**上传回调 */
const
handleChange
=
({
fileList
})
=>
{
setloading
(
true
);
if
(
fileList
[
0
].
response
)
{
const
file
=
{
name
:
fileList
[
0
].
name
,
file
:
fileList
[
0
].
response
.
data
}
setloading
(
false
);
setFileUrl
(
fileList
[
0
].
response
.
data
);
setUploadFile
(
file
);
}
}
/**合同模板样例查询 */
useEffect
(()
=>
{
PublicApi
.
getOrderContractTemplateExample
().
then
(
res
=>
{
setFileExampleUrl
(
res
.
data
)
})
},
[])
/**新增&修改 */
const
sharedFn
=
async
(
parmas
:
any
)
=>
{
if
(
page_type
===
'add'
)
{
await
PublicApi
.
postOrderContractTemplateAdd
(
parmas
).
then
(
res
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
})
}
else
{
parmas
.
id
=
id
;
await
PublicApi
.
postOrderContractTemplateUpdate
(
parmas
).
then
(
res
=>
{
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
})
}
}
/**提交数据 */
const
onSubmit
=
async
()
=>
{
await
form
.
validateFields
().
then
(
res
=>
{
const
parmas
=
{
name
:
res
.
name
,
version
:
res
.
version
,
description
:
res
.
description
,
fileExampleUrl
:
fileExampleUrl
.
contractUrl
,
fileExampleName
:
fileExampleUrl
.
contractName
,
fileUrl
,
fileName
:
uploadFile
.
name
}
sharedFn
(
parmas
)
console
.
log
(
parmas
)
})
}
/**删除上传的合同 */
const
delectContract
=
()
=>
{
setUploadFile
({});
setFileUrl
(
''
);
}
const
confirm
=
()
=>
{
// message.error(`未保存地址信息`)
setTimeout
(()
=>
{
history
.
goBack
()
},
1000
)
}
/**班级查看数据 */
useEffect
(()
=>
{
if
(
id
)
{
PublicApi
.
getOrderContractTemplateGet
({
id
}).
then
(
res
=>
{
setData
(
res
.
data
);
setUploadFile
({
name
:
res
.
data
.
fileName
,
file
:
res
.
data
.
fileUrl
})
if
(
page_type
===
'edit'
)
{
form
.
setFieldsValue
(
res
.
data
)
}
})
}
},
[
id
])
/**下载 */
const
onDownload
=
(
file
:
any
)
=>
{
window
.
location
.
href
=
`/api/order/contractTemplate/downloadContract?contractName=
${
file
.
contractName
}
&contractUrl=
${
file
.
contractUrl
}
`
}
/**预览 */
const
onView
=
async
(
file
:
any
)
=>
{
await
PublicApi
.
getOrderContractTemplatePreview
({
contractName
:
file
.
name
,
contractUrl
:
file
.
file
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
window
.
open
(
res
.
data
.
contractUrl
)
}
})
}
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
>
<
Card
>
<
div
className=
{
styles
.
addcontract_wrap
}
>
<
Form
form=
{
form
}
>
<
Form
.
Item
label=
'合同模板名称'
colon=
{
false
}
name=
'name'
rules=
{
[{
required
:
page_type
&&
true
,
message
:
'请输入合同模板名称'
}]
}
>
{
page_type
?
<
Input
/>
:
<
span
>
{
data
.
name
}
</
span
>
}
</
Form
.
Item
>
<
Form
.
Item
label=
'版本号'
colon=
{
false
}
name=
'version'
rules=
{
[{
required
:
page_type
&&
true
,
message
:
'请输入版本号'
}]
}
>
{
page_type
?
<
Input
/>
:
<
span
>
{
data
.
version
}
</
span
>
}
</
Form
.
Item
>
{
!
page_type
&&
<
Form
.
Item
label=
'状态'
colon=
{
false
}
name=
'status'
>
<
span
>
{
data
.
state
===
1
?
<><
Badge
status=
"success"
/>
有效
</>
:
<><
Badge
status=
"error"
/>
失效
</>
}
</
span
>
</
Form
.
Item
>
}
<
Form
.
Item
label=
'合同模板说明'
colon=
{
false
}
name=
'description'
>
{
page_type
?
<
TextArea
rows=
{
4
}
/>
:
<
span
>
{
data
.
description
}
</
span
>
}
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
div
>
合同文件模板样例
<
Tooltip
placement=
"top"
title=
'制作合同模板前,可下载合同模板样例,按照样例指引制作合同模板,其中需要添加的参数可以在合同模板参数查询中查找。'
><
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
)
}
>
下载
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
<
div
>
合同文件模板
<
Tooltip
placement=
"top"
title=
'制作完成的合同模板,需要上传至平台,才能在后续的订单中签订电子合同'
><
QuestionCircleOutlined
/></
Tooltip
></
div
>
}
colon=
{
false
}
>
<
div
className=
{
styles
.
upload_data
}
>
{
Object
.
keys
(
uploadFile
).
length
>
0
&&
<
div
className=
{
styles
.
upload_item
}
>
<
div
className=
{
styles
.
upload_left
}
>
<
FileWordFilled
/>
<
span
>
{
uploadFile
.
name
}
</
span
>
</
div
>
<
div
className=
{
styles
.
upload_right
}
>
<
span
onClick=
{
()
=>
onView
(
uploadFile
)
}
>
预览
</
span
>
{
page_type
&&
<
DeleteOutlined
onClick=
{
delectContract
}
/>
}
</
div
>
</
div
>
}
</
div
>
{
(
Object
.
keys
(
uploadFile
).
length
===
0
&&
page_type
)
&&
<
Upload
action=
"/api/file/file/upload"
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
showUploadList=
{
false
}
beforeUpload=
{
beforeDocUpload
}
onChange=
{
handleChange
}
accept=
'.doc,.docx'
>
<
Button
loading=
{
loading
}
disabled=
{
loading
}
icon=
{
<
UploadOutlined
/>
}
>
上传文件
</
Button
>
<
div
style=
{
{
marginTop
:
'8px'
}
}
>
支持扩展名:.doc,文件大小不超过 20M
</
div
>
</
Upload
>
}
</
Form
.
Item
>
{
page_type
&&
<
Form
.
Item
style=
{
{
marginLeft
:
'174px'
}
}
>
<
Button
type=
"primary"
style=
{
{
marginRight
:
'24px'
}
}
onClick=
{
onSubmit
}
>
保存
</
Button
>
<
Popconfirm
title=
"未保存,是否确定执行这个操作?"
onConfirm=
{
confirm
}
okText=
"是"
cancelText=
"否"
>
<
Button
>
取消
</
Button
>
</
Popconfirm
>
</
Form
.
Item
>
}
</
Form
>
</
div
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
AddContract
\ No newline at end of file
src/pages/contract/template/classSearch/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Row
,
Col
,
Input
,
Button
}
from
'antd'
;
import
statuStyle
from
'../../common/colorTag'
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
{
PublicApi
}
from
'@/services/api'
const
ClassSearch
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
[
filterParams
,
setFilterParams
]
=
useState
<
any
>
({})
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
dataIndex
:
'id'
,
width
:
'128px'
},
{
title
:
'参数名称'
,
dataIndex
:
'name'
,
},
{
title
:
'参数描述'
,
dataIndex
:
'description'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
render
:
(
text
:
any
,
reconds
:
any
)
=>
{
let
component
:
ReactNode
=
null
;
if
(
text
===
1
)
{
component
=
<><
span
style=
{
statuStyle
.
success
}
>
有效
</
span
></>
}
return
component
}
}]
// 列表数据
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderContractParamPage
({
...
filterParams
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
// 搜索
const
handleSearch
=
(
val
:
string
)
=>
{
let
obj
=
{
...
filterParams
,
name
:
val
}
setFilterParams
(
obj
)
ref
.
current
.
reload
(
obj
)
}
// 重置
const
handleReset
=
()
=>
{
setFilterParams
({})
setTimeout
(()
=>
{
ref
.
current
.
reload
()
},
500
)
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
Row
>
<
Col
span=
{
12
}
>
<
Input
.
Search
style=
{
{
width
:
'256px'
,
marginRight
:
'24px'
,
marginBottom
:
'24px'
}
}
placeholder=
'搜索'
value=
{
filterParams
.
name
}
onChange=
{
(
e
)
=>
setFilterParams
({
...
filterParams
,
name
:
e
.
target
.
value
})
}
onSearch=
{
(
val
)
=>
handleSearch
(
val
)
}
/>
<
Button
onClick=
{
handleReset
}
>
重置
</
Button
>
</
Col
>
</
Row
>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
ClassSearch
src/pages/contract/template/templateList/index.tsx
0 → 100644
View file @
c1244a42
import
React
,
{
useState
,
useRef
,
ReactNode
}
from
'react'
import
{
history
,
Link
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Row
,
Col
,
Input
,
Button
,
Space
,
Popconfirm
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
StandardTable
}
from
'god'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
PlusOutlined
,
PlayCircleOutlined
,
PauseCircleOutlined
}
from
'@ant-design/icons'
;
import
{
PublicApi
}
from
'@/services/api'
const
formActions
=
createFormActions
();
const
Template
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
//表头
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
'ID'
,
dataIndex
:
'id'
,
width
:
'5%'
},
{
title
:
'合同模板名称'
,
dataIndex
:
'name'
,
width
:
'15%'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
return
(
<
EyePreview
url=
{
`/memberCenter/contract/template/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
);
},
},
{
title
:
'版本号'
,
dataIndex
:
'version'
,
width
:
'10%'
,
},
{
title
:
'模板说明'
,
dataIndex
:
'description'
,
width
:
'35%'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
width
:
'20%'
,
sorter
:
(
a
,
b
)
=>
a
.
state
-
b
.
state
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
confirm
(
record
)
}
okText=
"是"
cancelText=
"否"
>
<
Button
type=
"link"
style=
{
record
.
state
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
state
?
<>
有效
<
PlayCircleOutlined
/></>
:
<>
无效
<
PauseCircleOutlined
/></>
}
</
Button
>
</
Popconfirm
>
)
return
component
}
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
'20%'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
let
component
:
ReactNode
=
null
component
=
(
<>
{
record
.
state
===
0
&&
<>
<
Button
disabled=
{
record
.
state
===
1
}
style=
{
{
padding
:
'0px'
,
marginRight
:
'24px'
}
}
type=
'link'
><
Link
to=
{
`/memberCenter/tranactionAbility/electronicContracts/template/edit?id=${record.id}`
}
>
编辑
</
Link
></
Button
>
<
Popconfirm
title=
"确定要执行这个操作?"
onConfirm=
{
()
=>
confirmDel
(
record
)
}
okText=
"是"
cancelText=
"否"
disabled=
{
record
.
state
===
1
}
>
<
Button
disabled=
{
record
.
state
===
1
}
style=
{
{
padding
:
'0px'
}
}
type=
"link"
>
删除
</
Button
>
</
Popconfirm
>
</>
}
</>
)
return
component
}
}]
// 模拟请求
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getOrderContractTemplatePage
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
const
handleJumpAdd
=
()
=>
{
history
.
push
({
pathname
:
'/memberCenter/contract/template/add'
});
};
const
Actions
=
(
<
Space
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
handleJumpAdd
}
>
新建
</
Button
>
</
Space
>
);
/**合同模板停用/启用 */
const
confirm
=
(
recode
:
any
)
=>
{
PublicApi
.
postOrderContractTemplateEnable
({
id
:
recode
.
id
,
state
:
recode
.
state
===
1
?
0
:
1
,
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
/**删除 */
const
confirmDel
=
(
recode
:
any
)
=>
{
PublicApi
.
postOrderContractTemplateDelete
({
id
:
recode
.
id
}).
then
(
res
=>
{
ref
.
current
.
reload
()
})
}
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
expressionScope=
{
{
Actions
,
}
}
effects=
{
(
$
,
actions
)
=>
{
}
}
schema=
{
{
type
:
'object'
,
properties
:
{
searchWrap
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
actions
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{Actions}}'
,
},
},
name
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'合同模板名称'
,
advanced
:
false
,
},
},
},
},
},
}
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
Template
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