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
cd264ca1
Commit
cd264ca1
authored
Apr 14, 2022
by
前端-彭佳文
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-0418-xxx' into 'v2-220418'
请购单按钮权限添加 See merge request linkseeks-design/pro-platform!288
parents
d53ff062
c0863f72
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
45 additions
and
24 deletions
+45
-24
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/pages/transaction/purchaseRequisition/components/billDelivery/index.tsx
View file @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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 @
cd264ca1
...
...
@@ -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