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
263acb86
Commit
263acb86
authored
Dec 08, 2022
by
shenshaokai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 采购订单-订单查询-变更按钮控制
parent
c92d1841
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
index.tsx
src/pages/transaction/purchaseOrder/index.tsx
+18
-8
No files found.
src/pages/transaction/purchaseOrder/index.tsx
View file @
263acb86
...
@@ -259,7 +259,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
...
@@ -259,7 +259,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
/** 参照后台数据生成 */
/** 参照后台数据生成 */
const renderOptionButton = (record: any) => {
const renderOptionButton = (record: any) => {
const buttonGroup = {
const buttonGroup = {
变更: record?.showChange,
//
变更: record?.showChange,
[intl.formatMessage({ id: 'purchaseOrder.operation1' })]: record.showCancel,
[intl.formatMessage({ id: 'purchaseOrder.operation1' })]: record.showCancel,
[intl.formatMessage({ id: 'purchaseOrder.operation2' })]: record.showAfterSales,
[intl.formatMessage({ id: 'purchaseOrder.operation2' })]: record.showAfterSales,
[intl.formatMessage({ id: 'purchaseOrder.operation3' })]: record.showComment,
[intl.formatMessage({ id: 'purchaseOrder.operation3' })]: record.showComment,
...
@@ -269,7 +269,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
...
@@ -269,7 +269,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
}
}
const operationHandler = {
const operationHandler = {
变更: () => handleOrderVariation(record),
//
变更: () => handleOrderVariation(record),
[intl.formatMessage({ id: 'purchaseOrder.operation1' })]: () => handleCancel(record.orderId),
[intl.formatMessage({ id: 'purchaseOrder.operation1' })]: () => handleCancel(record.orderId),
[intl.formatMessage({ id: 'purchaseOrder.operation2' })]: () => handleSaleAfter(record),
[intl.formatMessage({ id: 'purchaseOrder.operation2' })]: () => handleSaleAfter(record),
[intl.formatMessage({ id: 'purchaseOrder.operation3' })]: () => handleEvaluate(record.orderId),
[intl.formatMessage({ id: 'purchaseOrder.operation3' })]: () => handleEvaluate(record.orderId),
...
@@ -279,7 +279,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
...
@@ -279,7 +279,7 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
}
}
const buttonPermissionsMap = {
const buttonPermissionsMap = {
变更: 'orderList.biangeng',
//
变更: 'orderList.biangeng',
[intl.formatMessage({ id: 'purchaseOrder.operation1' })]: 'orderList.quxiao',
[intl.formatMessage({ id: 'purchaseOrder.operation1' })]: 'orderList.quxiao',
[intl.formatMessage({ id: 'purchaseOrder.operation2' })]: 'orderList.shouhou',
[intl.formatMessage({ id: 'purchaseOrder.operation2' })]: 'orderList.shouhou',
[intl.formatMessage({ id: 'purchaseOrder.operation3' })]: 'orderList.pingjia',
[intl.formatMessage({ id: 'purchaseOrder.operation3' })]: 'orderList.pingjia',
...
@@ -288,11 +288,21 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
...
@@ -288,11 +288,21 @@ const PurchaseOrder: React.FC<PurchaseOrderProps> = (props) => {
// [intl.formatMessage({ id: 'purchaseOrder.operation7' })]: 'orderList.shanchu',
// [intl.formatMessage({ id: 'purchaseOrder.operation7' })]: 'orderList.shanchu',
}
}
return (
return (
<TableOperation
<>
buttonTextFieldMap={buttonGroup}
{
operationHandler={operationHandler}
!!record?.showChange && (
buttonPermissionsMap={buttonPermissionsMap}
<AuthButton btnCode='orderList.biangeng'>
/>
<Button type='link' onClick={() => handleOrderVariation(record)}>变更</Button>
</AuthButton>
)
}
<TableOperation
buttonTextFieldMap={buttonGroup}
operationHandler={operationHandler}
buttonPermissionsMap={buttonPermissionsMap}
/>
</>
)
)
}
}
...
...
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