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
2ffc4c5f
Commit
2ffc4c5f
authored
Apr 14, 2022
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 采购竞价-待商城新增采购竞价单按钮权限配置
parent
eab42381
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
按钮状态.md
src/components/AuthButton/按钮状态.md
+9
-1
index.tsx
...ransaction/purchaseAbility/purchaseBid/readyAdd/index.tsx
+13
-12
No files found.
src/components/AuthButton/按钮状态.md
View file @
2ffc4c5f
# btn
Code 是pass 平台配置唯一表示
# btn
Code 是pass 平台配置唯一表示
...
...
@@ -533,6 +533,14 @@
readyAdd.edit 待新增采购竞价单-编辑 待新增采购竞价单-编辑-按钮
readyAdd.del 待新增采购竞价单-删除 待新增采购竞价单-删除-按钮
readyAdd.more 待新增采购竞价单-更多 待新增采购竞价单-更多-按钮
9.
3.1 待新增商城采购竞价单
readyAddShop.add 待新增采购竞价单-新曾 待新增采购竞价单-新曾-按钮
readyAddShop.batchshenhe 待新增采购竞价单-批量审核 待新增采购竞价单-批量审核-按钮
readyAddShop.batchdel 待新增采购竞价单-批量删除 待新增采购竞价单-批量删除-按钮
readyAddShop.submit 待新增采购竞价单-审核 待新增采购竞价单-审核-按钮
readyAddShop.edit 待新增采购竞价单-编辑 待新增采购竞价单-编辑-按钮
readyAddShop.del 待新增采购竞价单-删除 待新增采购竞价单-删除-按钮
readyAddShop.more 待新增采购竞价单-更多 待新增采购竞价单-更多-按钮
9.
4 待审核采购竞价单一级
readyExamineOne.shenhe 待审核采购竞价单一级-审核 待审核采购竞价单一级-审核-按钮
readyExamineOne.batchshenhe 待审核采购竞价单一级-批量审核 待审核采购竞价单一级-批量审核-按钮
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/index.tsx
View file @
2ffc4c5f
import
React
,
{
useRef
,
useState
,
useEffect
,
useCallback
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useEffect
,
useCallback
}
from
'react'
;
import
{
getIntl
,
history
}
from
'umi'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
Row
,
Col
,
Space
,
Button
,
Typography
,
Popconfirm
,
Badge
,
Menu
,
Dropdown
,
message
,
Modal
}
from
'antd'
;
...
...
@@ -7,7 +7,7 @@ import { PlusOutlined, PlayCircleOutlined, PoweroffOutlined, CaretDownOutlined }
import
{
formatTimeString
}
from
'@/utils'
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
postPurchaseBiddingExamine
,
postPurchaseBiddingExamineBatch
,
postPurchaseBiddingDelete
,
postPurchaseBiddingDeleteBatch
,
getPurchaseBiddingAwaitNewList
,
getPurchaseBiddingAwaitShopNewList
}
from
'@/services/PurchaseV2Api'
;
import
{
postPurchaseBiddingExamine
,
postPurchaseBiddingExamineBatch
,
postPurchaseBiddingDelete
,
postPurchaseBiddingDeleteBatch
,
getPurchaseBiddingAwaitNewList
,
getPurchaseBiddingAwaitShopNewList
}
from
'@/services/PurchaseV2Api'
;
import
{
getTemplateWebMemberPurchaseWebFindCurrMemberPurchase
}
from
'@/services/TemplateV2Api'
;
import
Table
from
'../../components/table'
...
...
@@ -18,15 +18,16 @@ import {
PurchaseBidButtons
}
from
'../../constants/purchaseBid'
;
import
AuthButton
from
'@/components/AuthButton'
;
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
;
const
intl
=
getIntl
();
const
{
Text
}
=
Typography
;
const
ReadyAdd
=
()
=>
{
const
{
pathname
}
=
history
.
location
;
const
{
pathname
}
=
history
.
location
;
const
[
pathPci
]
=
useState
(
pathname
.
split
(
'/'
)[
pathname
.
split
(
'/'
).
length
-
1
]);
const
[
isShop
,
setIsShop
]
=
useState
<
any
>
(
pathPci
!==
'readyAdd'
);
const
[
isShop
,
setIsShop
]
=
useState
<
any
>
(
pathPci
!==
'readyAdd'
);
/** 多选操作 */
const
ref
=
useRef
<
any
>
({});
const
[
rowkeys
,
setRowKeys
]
=
useState
<
Array
<
number
>>
([]);
...
...
@@ -81,7 +82,7 @@ const ReadyAdd = () => {
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
record
?.
buttons
?.
indexOf
(
PurchaseBidButtons
.
SUBMIT_REVIEW
)
>=
0
&&
<
AuthButton
btnCode=
'readyAdd.submit'
>
<
AuthButton
btnCode=
{
isShop
?
'readyAddShop.submit'
:
'readyAdd.submit'
}
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'table.purchase.popconfirm1'
})
}
okText=
{
intl
.
formatMessage
({
id
:
'table.purchase.okText'
})
}
cancelText=
{
intl
.
formatMessage
({
id
:
'table.purchase.cancelText'
})
}
onConfirm=
{
()
=>
fetchSubmitBatch
(
record
.
id
)
}
>
<
Button
type=
'link'
>
{
intl
.
formatMessage
({
id
:
'table.purchase.submit'
})
}
...
...
@@ -107,10 +108,10 @@ const ReadyAdd = () => {
<
Dropdown
overlay=
{
<
Menu
onClick=
{
(
e
)
=>
handleMenuClick
(
e
,
record
)
}
>
{
/* <AuthButton btnCode='readyAdd.edit' key="1"> */
}
{
record
?.
buttons
?.
indexOf
(
PurchaseBidButtons
.
UPDATE
)
>=
0
&&
<
Menu
.
Item
key=
"1"
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.edit'
})
}
</
Menu
.
Item
>
}
{
AuthUrl
(
isShop
?
'readyAddShop.edit'
:
'readyAdd.edit'
)
&&
record
?.
buttons
?.
indexOf
(
PurchaseBidButtons
.
UPDATE
)
>=
0
&&
<
Menu
.
Item
key=
"1"
>
{
intl
.
formatMessage
({
id
:
'detail.purchase.edit'
})
}
</
Menu
.
Item
>
}
{
/* </AuthButton> */
}
{
/* <AuthButton btnCode='readyAdd.del' key="2"> */
}
{
record
?.
buttons
?.
indexOf
(
PurchaseBidButtons
.
DELETE
)
>=
0
&&
<
Menu
.
Item
key=
"2"
disabled=
{
!
(
record
.
button
===
1
)
}
>
{
intl
.
formatMessage
({
id
:
'table.purchase.delete'
})
}
</
Menu
.
Item
>
}
{
AuthUrl
(
isShop
?
'readyAddShop.del'
:
'readyAdd.del'
)
&&
record
?.
buttons
?.
indexOf
(
PurchaseBidButtons
.
DELETE
)
>=
0
&&
<
Menu
.
Item
key=
"2"
disabled=
{
!
(
record
.
button
===
1
)
}
>
{
intl
.
formatMessage
({
id
:
'table.purchase.delete'
})
}
</
Menu
.
Item
>
}
{
/* </AuthButton> */
}
</
Menu
>
...
...
@@ -171,10 +172,10 @@ const ReadyAdd = () => {
// },[isShop])
useEffect
(()
=>
{
if
(
isShop
)
{
if
(
isShop
)
{
ref
.
current
.
reload
();
}
},[
isShop
])
},
[
isShop
])
const
addFn
=
async
()
=>
{
await
getTemplateWebMemberPurchaseWebFindCurrMemberPurchase
().
then
(
res
=>
{
...
...
@@ -209,7 +210,7 @@ const ReadyAdd = () => {
<
Row
>
<
Col
span=
{
24
}
>
<
Space
size=
{
16
}
>
<
AuthButton
btnCode=
'readyAdd.add'
>
<
AuthButton
btnCode=
{
isShop
?
'readyAddShop.add'
:
'readyAdd.add'
}
>
<
Button
onClick=
{
addFn
}
type=
"primary"
...
...
@@ -218,7 +219,7 @@ const ReadyAdd = () => {
{
intl
.
formatMessage
({
id
:
'table.purchase.added'
})
}
</
Button
>
</
AuthButton
>
<
AuthButton
btnCode=
'readyAdd.batchshenhe'
>
<
AuthButton
btnCode=
{
isShop
?
'readyAddShop.batchshenhe'
:
'readyAdd.batchshenhe'
}
>
<
Button
onClick=
{
()
=>
fetchSubmitBatch
()
}
disabled=
{
rowkeys
.
length
===
0
}
...
...
@@ -226,7 +227,7 @@ const ReadyAdd = () => {
{
intl
.
formatMessage
({
id
:
'table.purchase.submitBatch'
})
}
</
Button
>
</
AuthButton
>
<
AuthButton
btnCode=
'readyAdd.del'
>
<
AuthButton
btnCode=
{
isShop
?
'readyAddShop.del'
:
'readyAdd.del'
}
>
<
Button
onClick=
{
()
=>
fetchDeleteBatch
()
}
disabled=
{
rowkeys
.
length
===
0
}
...
...
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