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
a26a9380
Commit
a26a9380
authored
Dec 09, 2022
by
shenshaokai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 物料审核流程规则配置-修复之前统一样式造成按钮操作问题
parent
45420e02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
70 deletions
+92
-70
index.tsx
...s/commodity/material/materialAuditProcessConfig/index.tsx
+92
-70
No files found.
src/pages/commodity/material/materialAuditProcessConfig/index.tsx
View file @
a26a9380
...
...
@@ -5,7 +5,7 @@ import NiceForm from '@/components/NiceForm';
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
querySchema
}
from
'./schemas/query'
;
import
{
Button
,
Card
,
Popconfirm
,
Space
,
Switch
}
from
'antd'
;
import
{
Button
,
Card
,
Popconfirm
,
Space
,
Switch
,
Tooltip
}
from
'antd'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
getProductMaterialProcessDelete
,
...
...
@@ -13,10 +13,12 @@ import {
GetProductMaterialProcessPageResponseDetail
,
postProductMaterialProcessUpdateStatus
}
from
'@/services/ProductV2Api'
;
import
{
Link
,
IRouteComponentProps
}
from
'umi'
;
import
{
Link
,
IRouteComponentProps
,
getIntl
}
from
'umi'
;
import
AuthButton
from
'@/components/AuthButton'
;
import
{
columns_
}
from
'@/pages/systemSetting/processEng/buyingReqProcess'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
const
intl
=
getIntl
();
/**
* 物料审核流程规则配置
*/
...
...
@@ -49,75 +51,95 @@ const MaterialAuditProcessConfig: React.FC<IProps> = (props) => {
}
}
const
columns
=
columns_
({
authKey
:
'material.rules'
,
urlKey
:
'material.rules'
,
'修改'
:
'material.rules.toEdit'
,
'删除'
:
"material.rules.remove"
},
handleEnableOrDisable
,
handleDelete
)
// const columns = [
// {
// title: '流程规则ID',
// dataIndex: 'processId',
// render: (text, record) => {
// return (
// <Link to={`${match.path}/detail?id=${record.processId}`}>
// {record.processId}
// </Link>
// )
// }
// },
// {
// title: '流程规则名称',
// dataIndex: 'name',
// },
// {
// title: '状态',
// dataIndex: 'status',
// render: (text, record) => {
// return (
// <Switch checked={!!text} onChange={() => handleEnableOrDisable(record)} />
// )
// }
// },
// {
// title: '是否默认',
// dataIndex: 'isDefault',
// render: (text, record) => text == '1' ? '是' : '否'
// },
// {
// title: '操作时间',
// dataIndex: 'createTime',
// },
// {
// title: '操作',
// dataIndex: 'actions',
// render: (text, record) => {
// if (record.status === 1) {
// return null;
// }
// return (
// <Space>
// <AuthButton btnCode='material.rules.toEdit'>
// <Link to={`${match.path}/edit?id=${record.processId}`}>
// 修改
// </Link>
// </AuthButton>
// const columns = columns_({ authKey: 'material.rules', urlKey: 'material.rules', '修改': 'material.rules.toEdit','删除': "material.rules.remove" }, handleEnableOrDisable, handleDelete)
const
columns
=
[
{
title
:
'ID'
,
key
:
'processId'
,
dataIndex
:
'processId'
,
width
:
100
,
},
{
title
:
'流程规则名称'
,
key
:
'name'
,
dataIndex
:
'name'
,
width
:
300
,
render
:
(
text
,
record
)
=>
{
return
(
<
Link
to=
{
`${match.path}/detail?id=${record.processId}`
}
>
{
record
.
name
}
</
Link
>
)
}
},
{
title
:
intl
.
formatMessage
({
id
:
'processRuleSetting.liuchengmingcheng'
,
defaultMessage
:
'流程名称'
}),
key
:
'processName'
,
dataIndex
:
'processName'
,
width
:
300
},
{
title
:
(
<
div
>
{
intl
.
formatMessage
({
id
:
'processRuleSetting.shifoumoren'
,
defaultMessage
:
'是否默认'
})
}
<
Tooltip
title=
{
`${intl.formatMessage({ id: 'processRuleSetting.defaultTipsFragment1', defaultMessage: '系统初始化自动创建的默认流程' })}, ${intl.formatMessage({ id: 'processRuleSetting.defaultTipsFragment2', defaultMessage: '优先使用用户配置的流程' })}, ${intl.formatMessage({ id: 'processRuleSetting.defaultTipsFragment3', defaultMessage: '当用户配置的流程全部都不匹配时则使用默认流程' })}`
}
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
div
>
),
key
:
'isDefault'
,
dataIndex
:
'isDefault'
,
render
:
(
_text
,
record
)
=>
!!
_text
?
intl
.
formatMessage
({
id
:
'common.button.yes'
,
defaultMessage
:
'是'
})
:
intl
.
formatMessage
({
id
:
'common.button.no'
,
defaultMessage
:
'否'
})
},
{
title
:
'操作时间'
,
dataIndex
:
'createTime'
,
},
{
title
:
'状态'
,
dataIndex
:
'status'
,
render
:
(
text
,
record
)
=>
{
return
(
<
Switch
checked=
{
!!
text
}
onChange=
{
()
=>
handleEnableOrDisable
(
record
)
}
/>
)
}
},
{
title
:
'操作'
,
dataIndex
:
'actions'
,
render
:
(
text
,
record
)
=>
{
if
(
record
.
status
===
1
)
{
return
null
;
}
return
(
<
Space
>
<
AuthButton
btnCode=
'material.rules.toEdit'
>
<
Link
to=
{
`${match.path}/edit?id=${record.processId}`
}
>
修改
</
Link
>
</
AuthButton
>
//
{
//
record.status !== 1 && (
//
<AuthButton btnCode="material.rules.remove">
//
<Popconfirm
//
title="确认删除?"
//
onConfirm={() => handleDelete(record)}
//
okText="是"
//
cancelText="否"
//
>
//
<a >删除</a>
//
</Popconfirm>
//
</AuthButton>
//
)
//
}
//
</Space>
//
)
//
}
//
}
//
]
{
record
.
status
!==
1
&&
(
<
AuthButton
btnCode=
"material.rules.remove"
>
<
Popconfirm
title=
"确认删除?"
onConfirm=
{
()
=>
handleDelete
(
record
)
}
okText=
"是"
cancelText=
"否"
>
<
a
>
删除
</
a
>
</
Popconfirm
>
</
AuthButton
>
)
}
</
Space
>
)
}
}
]
const
controllerBtns
=
()
=>
{
return
(
...
...
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