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
e717467f
Commit
e717467f
authored
Apr 14, 2022
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418' of…
Merge branch 'v2-220418' of
https://gitlab.shushangyun.com/linkseeks-design/pro-platform
into fix418
parents
a1a0aade
cd264ca1
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
146 additions
and
116 deletions
+146
-116
index.tsx
src/components/AuthButton/index.tsx
+21
-18
按钮状态.md
src/components/AuthButton/按钮状态.md
+9
-1
harver-material.tsx
src/pages/order/assets/context/harver-material.tsx
+1
-0
details.tsx
...liveryNoticeCollaboration/deliveryNoticeAwait/details.tsx
+1
-1
index.tsx
...deliveryNoticeCollaboration/deliveryNoticeAwait/index.tsx
+2
-2
index.tsx
...deliveryNoticeCollaboration/deliveryNoticeQuery/index.tsx
+1
-1
add.tsx
...r/deliveryNoticeManagement/deliveryNoticeAwaitB2B/add.tsx
+5
-5
index.tsx
...eliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
+14
-13
edit.tsx
.../deliveryNoticeManagement/deliveryNoticeAwaitB2B/edit.tsx
+1
-0
index.tsx
...deliveryNoticeManagement/deliveryNoticeAwaitB2B/index.tsx
+3
-3
add.tsx
...r/deliveryNoticeManagement/deliveryNoticeAwaitSRM/add.tsx
+5
-1
index.tsx
...eliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
+13
-13
edit.tsx
.../deliveryNoticeManagement/deliveryNoticeAwaitSRM/edit.tsx
+1
-0
index.tsx
...deliveryNoticeManagement/deliveryNoticeAwaitSRM/index.tsx
+3
-3
index.tsx
...liveryNoticeManagement/deliveryNoticeFromCreate/index.tsx
+4
-3
index.tsx
...er/deliveryNoticeManagement/deliveryNoticeQuery/index.tsx
+4
-16
index.tsx
...ransaction/purchaseAbility/purchaseBid/readyAdd/index.tsx
+13
-12
index.tsx
...ion/purchaseRequisition/components/billDelivery/index.tsx
+1
-1
index.tsx
src/pages/transaction/purchaseRequisition/constant/index.tsx
+3
-2
index.tsx
...on/purchaseRequisition/firstApprovedBill/detail/index.tsx
+5
-2
useSelfTable.tsx
...chaseRequisition/firstApprovedBill/model/useSelfTable.tsx
+2
-2
index.tsx
...saction/purchaseRequisition/increaseRequisition/index.tsx
+3
-0
index.tsx
src/pages/transaction/purchaseRequisition/index.tsx
+3
-3
index.tsx
...es/transaction/purchaseRequisition/readyAddBill/index.tsx
+4
-0
useReadyAddBill.tsx
...urchaseRequisition/readyAddBill/model/useReadyAddBill.tsx
+4
-4
index.tsx
...tion/purchaseRequisition/readySubmitBill/detail/index.tsx
+5
-2
useSelfTable.tsx
...urchaseRequisition/readySubmitBill/model/useSelfTable.tsx
+7
-3
useRequisitionOrder.tsx
...equisition/requisitionOrder/model/useRequisitionOrder.tsx
+1
-1
index.tsx
...n/purchaseRequisition/secondApprovedBill/detail/index.tsx
+5
-2
useSelfTable.tsx
...haseRequisition/secondApprovedBill/model/useSelfTable.tsx
+2
-2
No files found.
src/components/AuthButton/index.tsx
View file @
e717467f
...
...
@@ -24,25 +24,28 @@ const AuthButton = (props: AuthButtonProps) => {
const
RoutesAuth
=
auth
.
filter
((
item
:
any
)
=>
item
?.
u
===
pathname
)
const
_authorityBtn
=
()
=>
{
// 本地开发时传的特殊标识,直接开放权限
return
true
// 本地开发时直接开放权限
if
(
process
.
env
.
NODE_ENV
===
"development"
)
return
true
// 全部按钮打开
// if (btnCode === 'DevTest') return true
// if (RoutesAuth.length > 0) {
// const { b } = RoutesAuth[0];
// console.log(RoutesAuth.length, RoutesAuth)
// for (let i = 0; i < b.length; i++) {
// if (btnCode) {
// // 是否有页面标识
// // 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选
// if (b[i] === btnCode) {
// return true
// }
// }
// continue
// }
// return false
// }
return
true
// 校验权限
if
(
RoutesAuth
.
length
>
0
)
{
const
{
b
}
=
RoutesAuth
[
0
];
console
.
log
(
RoutesAuth
.
length
,
RoutesAuth
)
for
(
let
i
=
0
;
i
<
b
.
length
;
i
++
)
{
if
(
btnCode
)
{
// 是否有页面标识
// 找到该页面标识的按钮权限数据,并匹配权限按钮是否勾选
if
(
b
[
i
]
===
btnCode
)
{
return
true
}
}
continue
}
return
false
}
}
return
_authorityBtn
()
?
children
:
null
}
...
...
src/components/AuthButton/按钮状态.md
View file @
e717467f
# 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/order/assets/context/harver-material.tsx
View file @
e717467f
...
...
@@ -22,6 +22,7 @@ export function HarvestMaterialInput(props: {
index
:
number
// table 当前的 index下标
keyUp
:
string
// dataSource 对应的row key
min
?:
number
disabled
?:
boolean
})
{
const
context
=
useContext
(
HarvestMaterialContext
);
...
...
src/pages/order/deliveryNoticeCollaboration/deliveryNoticeAwait/details.tsx
View file @
e717467f
...
...
@@ -88,7 +88,7 @@ const DeliveryNoticeAwaitDetails: React.FC = () => {
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
extra=
{
<
AuthButton
btnCode=
'
'
menuCode=
'
'
>
<
AuthButton
btnCode=
'
deliveryNoticeAwait.confirm
'
>
{
(
type
===
PAGE_TYPE
.
CONFIRM
&&
details
.
status
===
STATUS
.
WAIT_CONFIRM
)
&&
(
<
Button
loading=
{
loading
}
onClick=
{
()
=>
setModalVisible
(
true
)
}
type=
'primary'
>
提交
</
Button
>
...
...
src/pages/order/deliveryNoticeCollaboration/deliveryNoticeAwait/index.tsx
View file @
e717467f
...
...
@@ -26,8 +26,8 @@ const DeliveryNoticeCollaborationAwait: React.FC = () => {
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'确认'
:
'
DevTest
'
,
'查看'
:
'
DevTest
'
,
'确认'
:
'
deliveryNoticeAwait.confirm
'
,
'查看'
:
'
deliveryNoticeAwait.see
'
,
}
const
buttonGroup
=
{
'确认'
:
true
,
...
...
src/pages/order/deliveryNoticeCollaboration/deliveryNoticeQuery/index.tsx
View file @
e717467f
...
...
@@ -26,7 +26,7 @@ const DeliveryNoticeCollaborationQuery: React.FC = () => {
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'查看'
:
'
DevTest
'
,
'查看'
:
'
deliveryNoticeQuery.see
'
,
}
const
buttonGroup
=
{
'查看'
:
true
,
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/add.tsx
View file @
e717467f
...
...
@@ -6,17 +6,17 @@ import React, { useRef } from 'react'
import
{
history
}
from
'umi'
import
AddEditContent
from
'./components/AddEditContent'
const
mock
=
{
"1649815945186"
:{
"planNo"
:
"DL2022041200006"
,
"noticeNo"
:
null
,
"buyerMemberId"
:
231
,
"buyerRoleId"
:
11
,
"buyerMemberName"
:
"牛逼"
,
"digest"
:
"2022-04-12~2022-04-12 168一路发 送货计划"
,
"deliveryTime"
:
"2022-04-13"
,
"deliveryStartTime"
:
"08:00"
,
"deliveryEndTime"
:
"12:00"
,
"consignee"
:
"毛爷爷"
,
"provinceName"
:
"湖南省"
,
"cityName"
:
"邵阳市"
,
"districtName"
:
"邵阳县"
,
"streetName"
:
""
,
"address"
:
"东北玩泥巴"
,
"phone"
:
"18800000123"
,
"consigneeId"
:
301
,
"products"
:[],
"remark"
:
null
}}
const
DeliveryNoticeManagementAwaitB2BAdd
:
React
.
FC
=
()
=>
{
const
time
=
history
.
location
?.
query
?.
time
// window.localStorage.setItem("NOTICE_PATH", JSON.stringify(mock))
const
planData
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"NOTICE_PATH"
))?.[
time
as
string
]
return
(
<
AddEditContent
type=
'add'
planData=
{
planData
}
/>
<
AddEditContent
type=
'add'
planData=
{
planData
}
btnCode=
'deliveryNoticeAwaitB2B.submit'
/>
)
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/components/AddEditContent/index.tsx
View file @
e717467f
...
...
@@ -25,6 +25,7 @@ type PropsType = {
type
:
'add'
|
'edit'
;
id
?:
string
;
planData
?:
any
;
btnCode
:
string
;
}
enum
PAGE_TYPE
{
...
...
@@ -42,7 +43,7 @@ const formItemLayout = {
wrapperCol
:
{
span
:
18
}
}
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
})
=>
{
const
DeliveryNoticeManagementAwaitB2BDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
...
...
@@ -149,20 +150,19 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
}
else
{
// 通过送货计划生成时
if
(
planData
)
{
const
firstProduct
=
planData
.
products
?.[
0
]
||
{}
const
receivingAddress
=
{
provinceName
:
firstProduct
.
provinceName
,
cityName
:
firstProduct
.
cityName
,
districtName
:
firstProduct
.
districtName
,
streetName
:
firstProduct
.
streetName
,
address
:
firstProduct
.
address
,
phone
:
firstProduct
.
phone
,
consignee
:
firstProduct
.
consignee
,
consigneeId
:
firstProduct
.
consigneeId
,
fullAddress
:
`
${
firstProduct
.
provinceName
||
''
}${
firstProduct
.
cityName
||
''
}${
firstProduct
.
districtName
||
''
}${
firstProduct
.
streetName
||
''
}${
firstProduct
.
address
||
''
}
`
provinceName
:
planData
.
provinceName
,
cityName
:
planData
.
cityName
,
districtName
:
planData
.
districtName
,
streetName
:
planData
.
streetName
,
address
:
planData
.
address
,
phone
:
planData
.
phone
,
consignee
:
planData
.
consignee
,
consigneeId
:
planData
.
consigneeId
,
fullAddress
:
`
${
planData
.
provinceName
||
''
}${
planData
.
cityName
||
''
}${
planData
.
districtName
||
''
}${
planData
.
streetName
||
''
}${
planData
.
address
||
''
}
`
}
form
.
setFieldsValue
({
digest
:
`
${
planData
.
deliveryTime
}${
firstProduct
.
productName
||
''
}
送货通知`
,
digest
:
`
${
planData
.
deliveryTime
}${
planData
.
productName
||
''
}
送货通知`
,
deliveryTime
:
moment
(
planData
.
deliveryTime
),
receivingAddress
,
member
:
{
...
...
@@ -218,7 +218,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
extra=
{
<
AuthButton
btnCode=
''
menuCode=
''
>
<
AuthButton
btnCode=
{
btnCode
}
>
<
Button
loading=
{
loading
}
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
AuthButton
>
}
...
...
@@ -294,6 +294,7 @@ const DeliveryNoticeManagementAwaitB2BDetails: React.FC<PropsType> = ({ type, id
{
...
formItemLayout
}
label=
{
DeliveryTime
}
name=
'deliveryStartEndTime'
initialValue=
{
[
moment
(
'08:00'
,
'HH:mm'
),
moment
(
'12:00'
,
'HH:mm'
)]
}
rules=
{
[
{
required
:
true
,
message
:
`请选择${DeliveryTime}`
}
]
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/edit.tsx
View file @
e717467f
...
...
@@ -13,6 +13,7 @@ const DeliveryNoticeManagementAwaitB2BEdit: React.FC = () => {
<
AddEditContent
type=
'edit'
id=
{
id
as
string
}
btnCode=
'deliveryNoticeAwaitB2B.submit'
/>
)
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitB2B/index.tsx
View file @
e717467f
...
...
@@ -27,7 +27,7 @@ const DeliveryNoticeManagementAwaitB2B: React.FC = () => {
const
controllerBtns
=
(
<
Space
>
<
AuthButton
btnCode=
'
'
menuCode=
'
'
>
<
AuthButton
btnCode=
'
deliveryNoticeAwaitB2B.add
'
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
...
...
@@ -41,8 +41,8 @@ const DeliveryNoticeManagementAwaitB2B: React.FC = () => {
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'修改'
:
'
DevTes
t'
,
'查看'
:
'
DevTest
'
,
'修改'
:
'
deliveryNoticeAwaitB2B.edi
t'
,
'查看'
:
'
deliveryNoticeAwaitB2B.see
'
,
}
const
buttonGroup
=
{
'修改'
:
[
STATUS
.
WAIT_REVISE
,
STATUS
.
HAD_CONFIRM
].
includes
(
record
.
status
),
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/add.tsx
View file @
e717467f
...
...
@@ -15,7 +15,11 @@ const DeliveryNoticeManagementAwaitSRMAdd: React.FC = () => {
const
planData
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"NOTICE_PATH"
))?.[
time
as
string
]
return
(
<
AddEditContent
type=
'add'
planData=
{
planData
}
/>
<
AddEditContent
type=
'add'
planData=
{
planData
}
btnCode=
'deliveryNoticeAwaitSRM.submit'
/>
)
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/components/AddEditContent/index.tsx
View file @
e717467f
...
...
@@ -26,6 +26,7 @@ type PropsType = {
type
:
'add'
|
'edit'
;
id
?:
string
;
planData
?:
any
;
btnCode
:
string
;
}
enum
PAGE_TYPE
{
...
...
@@ -43,7 +44,7 @@ const formItemLayout = {
wrapperCol
:
{
span
:
18
}
}
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
})
=>
{
const
DeliveryNoticeManagementAwaitSRMDetails
:
React
.
FC
<
PropsType
>
=
({
type
,
id
,
planData
,
btnCode
})
=>
{
const
[
form
]
=
Form
.
useForm
()
const
[
iAnchors
,
setiAnchors
]
=
useState
<
AnchorsItem
[]
>
([
Circulation
,
...
...
@@ -150,20 +151,19 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
}
else
{
// 通过送货计划生成时
if
(
planData
)
{
const
firstProduct
=
planData
.
products
?.[
0
]
||
{}
const
receivingAddress
=
{
provinceName
:
firstProduct
.
provinceName
,
cityName
:
firstProduct
.
cityName
,
districtName
:
firstProduct
.
districtName
,
streetName
:
firstProduct
.
streetName
,
address
:
firstProduct
.
address
,
phone
:
firstProduct
.
phone
,
consignee
:
firstProduct
.
consignee
,
consigneeId
:
firstProduct
.
consigneeId
,
fullAddress
:
`
${
firstProduct
.
provinceName
||
''
}${
firstProduct
.
cityName
||
''
}${
firstProduct
.
districtName
||
''
}${
firstProduct
.
streetName
||
''
}${
firstProduct
.
address
||
''
}
`
provinceName
:
planData
.
provinceName
,
cityName
:
planData
.
cityName
,
districtName
:
planData
.
districtName
,
streetName
:
planData
.
streetName
,
address
:
planData
.
address
,
phone
:
planData
.
phone
,
consignee
:
planData
.
consignee
,
consigneeId
:
planData
.
consigneeId
,
fullAddress
:
`
${
planData
.
provinceName
||
''
}${
planData
.
cityName
||
''
}${
planData
.
districtName
||
''
}${
planData
.
streetName
||
''
}${
planData
.
address
||
''
}
`
}
form
.
setFieldsValue
({
digest
:
`
${
planData
.
deliveryTime
}${
firstProduct
.
productName
||
''
}
送货通知`
,
digest
:
`
${
planData
.
deliveryTime
}${
planData
.
productName
||
''
}
送货通知`
,
deliveryTime
:
moment
(
planData
.
deliveryTime
),
receivingAddress
,
member
:
{
...
...
@@ -219,7 +219,7 @@ const DeliveryNoticeManagementAwaitSRMDetails: React.FC<PropsType> = ({ type, id
onBack=
{
()
=>
history
.
goBack
()
}
anchors=
{
iAnchors
}
extra=
{
<
AuthButton
btnCode=
''
menuCode=
''
>
<
AuthButton
btnCode=
{
btnCode
}
>
<
Button
loading=
{
loading
}
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
AuthButton
>
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/edit.tsx
View file @
e717467f
...
...
@@ -14,6 +14,7 @@ const DeliveryNoticeManagementAwaitSRMEdit: React.FC = () => {
<
AddEditContent
type=
'edit'
id=
{
id
as
string
}
btnCode=
'deliveryNoticeAwaitSRM.submit'
/>
)
}
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeAwaitSRM/index.tsx
View file @
e717467f
...
...
@@ -38,7 +38,7 @@ const DeliveryNoticeManagementAwaitSRM: React.FC = () => {
const
controllerBtns
=
(
<
Space
>
<
AuthButton
btnCode=
'
'
menuCode=
'
'
>
<
AuthButton
btnCode=
'
deliveryNoticeAwaitSRM.add
'
>
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
...
...
@@ -52,8 +52,8 @@ const DeliveryNoticeManagementAwaitSRM: React.FC = () => {
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'修改'
:
'
DevTes
t'
,
'查看'
:
'
DevTest
'
,
'修改'
:
'
deliveryNoticeAwaitSRM.edi
t'
,
'查看'
:
'
deliveryNoticeAwaitSRM.see
'
,
}
const
buttonGroup
=
{
'修改'
:
[
STATUS
.
WAIT_REVISE
,
STATUS
.
HAD_CONFIRM
].
includes
(
record
.
status
),
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeFromCreate/index.tsx
View file @
e717467f
...
...
@@ -15,6 +15,7 @@ import { DeliveryNumColumn, OrderNumColumn } from "../../constants/table-column"
import
{
DatePickerSelect
}
from
"@/components/DatePickerSelect"
;
import
{
SourceTypeEnum
}
from
"../../constants/SourceTypeEnum"
;
import
{
useLocation
}
from
"umi"
;
import
AuthButton
from
"@/components/AuthButton"
;
const
ContentBox
=
BaseInfo
const
service
=
new
DeliveryNoticeOrderAddService
();
...
...
@@ -73,12 +74,12 @@ function DeliveryNoticeFromCreate() {
}
return
(
<
AnchorPage
title=
"送货单管理详情
(SRM)
"
<
AnchorPage
title=
"送货单管理详情"
anchors=
{
anchors
}
extra=
{
<
Button
.
Group
>
<
AuthButton
btnCode=
'deliveryNoticeQuery.submit'
>
<
Button
onClick=
{
handleSubmit
}
type=
'primary'
>
提交
</
Button
>
</
Button
.
Group
>
</
AuthButton
>
}
>
<
Form
...
...
src/pages/order/deliveryNoticeManagement/deliveryNoticeQuery/index.tsx
View file @
e717467f
...
...
@@ -16,21 +16,10 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
{
deliveryNoticeManagementQuerySchema
}
from
'./schema'
import
{
useHistory
,
useIntl
}
from
'umi'
import
{
getOrderDeliveryNoticeOrderVendorPage
}
from
'@/services/OrderNewV2Api'
import
{
TAG_STATUS_COLOR
,
STATUS
,
STATUS_NAME
}
from
'../../constants/deliveryNotice'
import
ToVoidModal
,
{
HandleType
}
from
'./components/ToVoidModal'
const
mock
=
{
totalCount
:
4
,
data
:
[
{
id
:
1
,
noticeNo
:
'2e12e'
,
status
:
STATUS
.
WAIT_CONFIRM
},
{
id
:
2
,
noticeNo
:
'axascac'
,
status
:
STATUS
.
WAIT_REVISE
},
{
id
:
3
,
noticeNo
:
'fafa'
,
status
:
STATUS
.
HAD_CONFIRM
},
{
id
:
4
,
noticeNo
:
'fasffqw'
,
status
:
STATUS
.
HAD_CONFIRM
},
]
}
const
DeliveryNoticeManagementQuery
:
React
.
FC
=
()
=>
{
const
intl
=
useIntl
()
...
...
@@ -42,10 +31,10 @@ const DeliveryNoticeManagementQuery: React.FC = () => {
const
controllerBtns
=
(<
Space
></
Space
>)
const
renderOptionButton
=
(
r
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'生成送货单'
:
'
DevTest
'
,
'变更'
:
'
DevTest
'
,
'作废'
:
'
DevTest
'
,
'查看'
:
'
DevTest
'
,
'生成送货单'
:
'
deliveryNoticeQuery.generate
'
,
'变更'
:
'
deliveryNoticeQuery.change
'
,
'作废'
:
'
deliveryNoticeQuery.void
'
,
'查看'
:
'
deliveryNoticeQuery.see
'
,
}
const
buttonGroup
=
{
'生成送货单'
:
[
STATUS
.
HAD_CONFIRM
].
includes
(
r
.
status
),
...
...
@@ -108,7 +97,6 @@ const DeliveryNoticeManagementQuery: React.FC = () => {
getOrderDeliveryNoticeOrderVendorPage
(
params
).
then
(({
code
,
data
})
=>
{
if
(
code
===
1000
)
{
resolve
(
data
)
// resolve(mock)
}
})
})
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyAdd/index.tsx
View file @
e717467f
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
}
...
...
src/pages/transaction/purchaseRequisition/components/billDelivery/index.tsx
View file @
e717467f
...
...
@@ -58,7 +58,7 @@ const BillDelivery: React.FC<BasicInfoProps> = ({ cardTitle, type, styles }) =>
{
_v
?.
noTitle
?
null
:
<
Col
span=
{
6
}
className=
{
style
[
'card-list_title'
]
}
>
{
_v
.
title
}
</
Col
>
}
{
_data
.
deliveryMethodName
==
"物流"
&&
_v
.
title
==
'送货地址:'
?
<
Col
><
p
style=
{
{
paddingRight
:
20
}
}
>
{
_data
.
receiverAddressResponse
.
provinceName
+
_data
.
receiverAddressResponse
.
districtName
+
_data
.
receiverAddressResponse
.
cityName
}
</
p
></
Col
>
<
Col
><
p
style=
{
{
paddingRight
:
20
}
}
>
{
_data
.
deliveryAddressId
?
_data
.
receiverAddressResponse
.
provinceName
+
_data
.
receiverAddressResponse
.
districtName
+
_data
.
receiverAddressResponse
.
cityName
:
_data
.
deliveryAddress
}
</
p
></
Col
>
:
<
Col
><
p
style=
{
{
paddingRight
:
20
}
}
>
{
_v
.
render
?
_v
.
render
(
dataSource
[
_v
.
name
],
dataSource
)
:
dataSource
[
_v
.
name
]
}
</
p
></
Col
>
}
...
...
src/pages/transaction/purchaseRequisition/constant/index.tsx
View file @
e717467f
...
...
@@ -4,6 +4,7 @@ import EyePreview from '@/components/EyePreview'
import
{
history
,
useIntl
}
from
'umi'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getPurchaseRequisitionOrderPageSelectOption
}
from
'@/pages/transaction/effect'
;
import
{
AuthUrl
}
from
'@/components/AuthButton/AuthUrl'
/** 采购 请购单查询 带内部状态schmea */
export
const
tableSearchListSchema
:
any
=
(
align
?:
String
,
colStyle
?:
Object
)
=>
{
...
...
@@ -212,7 +213,7 @@ export const tableListSchema: any = (align?: String, colStyle?: Object) => {
}
/** 采购 请购单 公共列 */
export
const
baseOrderListColumns
:
any
=
()
=>
{
export
const
baseOrderListColumns
:
any
=
(
code
:
string
)
=>
{
const
intl
=
useIntl
()
return
[
...
...
@@ -223,7 +224,7 @@ export const baseOrderListColumns: any = () => {
key
:
'requisitionNo'
,
render
:
(
text
,
record
)
=>
{
return
(
<
EyePreview
url=
{
`${history.location.pathname}/preview?id=${record.id}`
}
>
<
EyePreview
type=
{
AuthUrl
(
code
)
?
'link'
:
'button'
}
url=
{
`${history.location.pathname}/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
)
...
...
src/pages/transaction/purchaseRequisition/firstApprovedBill/detail/index.tsx
View file @
e717467f
...
...
@@ -10,11 +10,12 @@ import { useHttpRequest } from '@/hooks/useHttpRequest';
import
{
history
,
useIntl
}
from
'umi'
;
import
ApprovedOrderModal
from
'@/pages/transaction/components/approvedOrderModal'
;
import
{
postPurchaseRequisitionFirstAudit
}
from
'@/services/PurchaseV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
;
// 待审核请购单详情 一级
const
FirstOrderPreview
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
anchorTitleList
}
=
useBillDetail
({
type
:
'requestBill'
})
const
{
formContext
,
id
,
anchorTitleList
}
=
useBillDetail
({
type
:
'requestBill'
})
const
{
run
,
loading
}
=
useHttpRequest
(
postPurchaseRequisitionFirstAudit
)
const
approvedRef
=
useRef
<
any
>
({})
...
...
@@ -25,7 +26,7 @@ const FirstOrderPreview: React.FC = () => {
// 提交表单
const
handleSubmit
=
useCallback
(()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
const
params
=
{
id
:
Number
(
id
),
...
values
,
...
...
@@ -46,9 +47,11 @@ const FirstOrderPreview: React.FC = () => {
formContext=
{
formContext
}
anchorList=
{
anchorTitleList
}
extraRight=
{
<
AuthButton
btnCode=
'firstApprovedBill.xiangqingshenhe'
>
<
Button
type=
'primary'
onClick=
{
handleClick
}
loading=
{
loading
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.tijiaoshenhe'
,
defaultMessage
:
'提交审核'
})
}
</
Button
>
</
AuthButton
>
}
/>
<
BillDetailWrapper
>
...
...
src/pages/transaction/purchaseRequisition/firstApprovedBill/model/useSelfTable.tsx
View file @
e717467f
...
...
@@ -16,7 +16,7 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'审核'
:
'
DevTest
'
,
'审核'
:
'
firstApprovedBill.shenhe
'
,
}
const
buttonGroup
=
{
[
intl
.
formatMessage
({
id
:
'purchaseRequisition.shenhe'
,
defaultMessage
:
'审核'
})]:
true
}
...
...
@@ -34,7 +34,7 @@ export const useSelfTable = () => {
}
const
secondColumns
=
()
=>
{
const
alreadyColumns
=
baseOrderListColumns
()
const
alreadyColumns
=
baseOrderListColumns
(
"firstApprovedBill.see"
)
if
(
alreadyColumns
)
{
return
alreadyColumns
.
concat
([
{
...
...
src/pages/transaction/purchaseRequisition/increaseRequisition/index.tsx
View file @
e717467f
...
...
@@ -25,6 +25,7 @@ import { getPurchaseRequisitionDeliveryMethodItems, getPurchaseRequisitionDetail
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
styles
from
'./index.less'
import
{
getAuth
}
from
'@/utils/auth'
import
AuthButton
from
'@/components/AuthButton'
const
addSchemaAction
=
createFormActions
()
...
...
@@ -450,9 +451,11 @@ const IncreaseRequisition: React.FC<{}> = () => {
title=
{
id
?
intl
.
formatMessage
({
id
:
'purchaseRequisition.bianjiqinggoudan'
,
defaultMessage
:
'编辑请购单'
})
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.xinzengqinggoudan'
,
defaultMessage
:
'新增请购单'
})
}
schema=
{
increaseSchema
}
extraRight=
{
[
<
AuthButton
btnCode=
{
id
?
'increaseRequisition.bianji'
:
'increaseRequisition.xingzheng'
}
>
<
Button
key=
"1"
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
loading=
{
btnLoading
}
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.baocun'
,
defaultMessage
:
'保存'
})
}
</
Button
>
,
</
AuthButton
>
]
}
/>
<
FormDetailWrapper
>
...
...
src/pages/transaction/purchaseRequisition/index.tsx
View file @
e717467f
...
...
@@ -93,8 +93,8 @@ const RequestBill: React.FC<RequestBillProps> = () => {
/** 参照后台数据生成 */
const
renderOptionButton
=
record
=>
{
const
btnAuthOfOperationTextMap
=
{
'取消订单'
:
'
DevTest
'
,
'中止'
:
'
DevTest
'
,
'取消订单'
:
'
purchaseRequisition.quxiaodingdan
'
,
'中止'
:
'
purchaseRequisition.zhongzhi
'
,
}
const
buttonGroup
=
{
...
...
@@ -129,7 +129,7 @@ const RequestBill: React.FC<RequestBillProps> = () => {
};
const
secondColumns
=
()
=>
{
const
alreadyColumns
=
baseOrderListColumns
();
const
alreadyColumns
=
baseOrderListColumns
(
'purchaseRequisition.see'
);
if
(
alreadyColumns
)
{
return
alreadyColumns
.
concat
([
{
...
...
src/pages/transaction/purchaseRequisition/readyAddBill/index.tsx
View file @
e717467f
...
...
@@ -16,6 +16,7 @@ import { createAsyncFormActions, createFormActions, FormEffectHooks } from '@for
import
{
searchOptionEffect
}
from
'./effect'
;
import
{
getMemberUserPage
}
from
'@/services/MemberV2Api'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
AuthButton
from
'@/components/AuthButton'
;
// 待新增请购单
...
...
@@ -52,6 +53,7 @@ const ReadyAddBill: React.FC<ReadyAddBillProps> = () => {
const
controllerBtns
=
(
<
Space
>
<
AuthButton
btnCode=
'readyAddBill.add'
>
<
Button
icon=
{
<
PlusCircleOutlined
/>
}
type=
'primary'
...
...
@@ -59,6 +61,8 @@ const ReadyAddBill: React.FC<ReadyAddBillProps> = () => {
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.xinjian'
,
defaultMessage
:
'新建'
})
}
</
Button
>
</
AuthButton
>
</
Space
>
)
return
<
PageHeaderWrapper
>
...
...
src/pages/transaction/purchaseRequisition/readyAddBill/model/useReadyAddBill.tsx
View file @
e717467f
...
...
@@ -34,9 +34,9 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'提交审核'
:
'
DevTest
'
,
'修改'
:
'
DevTest
'
,
'删除'
:
'
DevTest
'
,
'提交审核'
:
'
readyAddBill.tijiaoshenhe
'
,
'修改'
:
'
readyAddBill.xiugai
'
,
'删除'
:
'
readyAddBill.shanchu
'
,
}
const
buttonGroup
=
{
[
intl
.
formatMessage
({
id
:
'purchaseRequisition.tijiaoshenhe'
,
defaultMessage
:
'提交审核'
})]:
record
.
showSubmit
,
[
intl
.
formatMessage
({
id
:
'purchaseRequisition.xiugai'
,
defaultMessage
:
'修改'
})]:
true
,
[
intl
.
formatMessage
({
id
:
'purchaseRequisition.shanchu'
,
defaultMessage
:
'删除'
})]:
record
.
showDelete
}
...
...
@@ -56,7 +56,7 @@ export const useSelfTable = () => {
}
const
secondColumns
=
()
=>
{
const
alreadyColumns
=
baseOrderListColumns
()
const
alreadyColumns
=
baseOrderListColumns
(
"readyAddBill.add"
)
if
(
alreadyColumns
)
{
return
alreadyColumns
.
concat
([
{
...
...
src/pages/transaction/purchaseRequisition/readySubmitBill/detail/index.tsx
View file @
e717467f
...
...
@@ -9,18 +9,19 @@ import { Button } from 'antd';
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
postPurchaseRequisitionSubmit
}
from
'@/services/PurchaseV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
;
// 待提交请购单详情
const
ReadySubmitBillDetail
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
anchorTitleList
}
=
useBillDetail
({
type
:
'requestBill'
})
const
{
formContext
,
id
,
anchorTitleList
}
=
useBillDetail
({
type
:
'requestBill'
})
const
intl
=
useIntl
()
const
{
run
,
loading
}
=
useHttpRequest
(
postPurchaseRequisitionSubmit
)
const
approvedRef
=
useRef
<
any
>
({})
const
handleClick
=
async
()
=>
{
const
result
=
await
run
({
id
})
const
result
=
await
run
({
id
})
if
(
result
.
code
===
1000
)
{
history
.
goBack
()
}
...
...
@@ -33,9 +34,11 @@ const ReadySubmitBillDetail: React.FC = () => {
formContext=
{
formContext
}
anchorList=
{
anchorTitleList
}
extraRight=
{
<
AuthButton
btnCode=
'readySubmitBill.xiangqingsheng'
>
<
Button
type=
'primary'
onClick=
{
handleClick
}
loading=
{
loading
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.tijiaoshenhe'
,
defaultMessage
:
'提交审核'
})
}
</
Button
>
</
AuthButton
>
}
/>
<
BillDetailWrapper
>
...
...
src/pages/transaction/purchaseRequisition/readySubmitBill/model/useSelfTable.tsx
View file @
e717467f
...
...
@@ -7,7 +7,7 @@ import TableOperation from '@/components/TableOperation'
// 待提交请购单 Hook
export
const
useSelfTable
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
[
rowSelection
,
rowSelectionCtl
]
=
useRowSelectionTable
({
customKey
:
'id'
})
const
intl
=
useIntl
()
...
...
@@ -17,6 +17,9 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'审核'
:
'readySubmitBill.shenhe'
,
}
const
buttonGroup
=
{
[
intl
.
formatMessage
({
id
:
'purchaseRequisition.shenhe'
,
defaultMessage
:
'审核'
})]:
true
}
const
operationHandler
=
{
...
...
@@ -27,13 +30,14 @@ export const useSelfTable = () => {
<
TableOperation
buttonTextFieldMap=
{
buttonGroup
}
operationHandler=
{
operationHandler
}
buttonPermissionsMap=
{
btnAuthOfOperationTextMap
}
/>
)
}
const
secondColumns
=
()
=>
{
const
alreadyColumns
=
baseOrderListColumns
()
if
(
alreadyColumns
)
{
const
alreadyColumns
=
baseOrderListColumns
(
"readySubmitBill.see"
)
if
(
alreadyColumns
)
{
return
alreadyColumns
.
concat
([
{
title
:
intl
.
formatMessage
({
id
:
'purchaseRequisition.caozuo'
,
defaultMessage
:
'操作'
}),
...
...
src/pages/transaction/purchaseRequisition/requisitionOrder/model/useRequisitionOrder.tsx
View file @
e717467f
...
...
@@ -34,7 +34,7 @@ export const useSelfTable = () => {
}
const
secondColumns
=
()
=>
{
const
alreadyColumns
=
baseOrderListColumns
()
const
alreadyColumns
=
baseOrderListColumns
(
'readyRequisitionOrder.see'
)
if
(
alreadyColumns
)
{
return
alreadyColumns
.
concat
([
{
...
...
src/pages/transaction/purchaseRequisition/secondApprovedBill/detail/index.tsx
View file @
e717467f
...
...
@@ -10,12 +10,13 @@ import { useHttpRequest } from '@/hooks/useHttpRequest';
import
{
history
,
useIntl
}
from
'umi'
;
import
ApprovedOrderModal
from
'@/pages/transaction/components/approvedOrderModal'
;
import
{
postPurchaseRequisitionTwoAudit
}
from
'@/services/PurchaseV2Api'
;
import
AuthButton
from
'@/components/AuthButton'
;
// 待审核请购单详情 二级
const
SecondOrderPreview
:
React
.
FC
=
()
=>
{
const
{
formContext
,
id
,
anchorTitleList
}
=
useBillDetail
({
type
:
'requestBill'
})
const
{
formContext
,
id
,
anchorTitleList
}
=
useBillDetail
({
type
:
'requestBill'
})
const
intl
=
useIntl
()
const
{
run
,
loading
}
=
useHttpRequest
(
postPurchaseRequisitionTwoAudit
)
const
approvedRef
=
useRef
<
any
>
({})
...
...
@@ -26,7 +27,7 @@ const SecondOrderPreview: React.FC = () => {
// 提交表单
const
handleSubmit
=
useCallback
(()
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
approvedRef
.
current
.
actions
.
submit
().
then
(
async
({
values
})
=>
{
const
params
=
{
id
:
Number
(
id
),
...
values
,
...
...
@@ -47,9 +48,11 @@ const SecondOrderPreview: React.FC = () => {
formContext=
{
formContext
}
anchorList=
{
anchorTitleList
}
extraRight=
{
<
AuthButton
btnCode=
'secondApprovedBill.xiangqingshenghe'
>
<
Button
type=
'primary'
onClick=
{
handleClick
}
loading=
{
loading
}
>
{
intl
.
formatMessage
({
id
:
'purchaseRequisition.tijiaoshenhe'
,
defaultMessage
:
'提交审核'
})
}
</
Button
>
</
AuthButton
>
}
/>
<
BillDetailWrapper
>
...
...
src/pages/transaction/purchaseRequisition/secondApprovedBill/model/useSelfTable.tsx
View file @
e717467f
...
...
@@ -17,7 +17,7 @@ export const useSelfTable = () => {
/** 参照后台数据生成 */
const
renderOptionButton
=
(
record
:
any
)
=>
{
const
btnAuthOfOperationTextMap
=
{
'审核'
:
'
DevTest
'
,
'审核'
:
'
secondApprovedBill.shenghe
'
,
}
const
buttonGroup
=
{
[
intl
.
formatMessage
({
id
:
'purchaseRequisition.shenhe'
,
defaultMessage
:
'审核'
})]:
true
}
...
...
@@ -35,7 +35,7 @@ export const useSelfTable = () => {
}
const
secondColumns
=
()
=>
{
const
alreadyColumns
=
baseOrderListColumns
()
const
alreadyColumns
=
baseOrderListColumns
(
'secondApprovedBill.see'
)
if
(
alreadyColumns
)
{
return
alreadyColumns
.
concat
([
{
...
...
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