Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
project
jinfa-admin
Commits
3f822489
Commit
3f822489
authored
Apr 14, 2021
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改内容管理禁用视频上传,修改图片上传组件,允许preview
parent
45f17881
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
179 additions
and
88 deletions
+179
-88
index.less
src/components/UploadImage/index.less
+13
-6
index.tsx
src/components/UploadImage/index.tsx
+29
-4
advertisementInfo.tsx
src/pages/content/advertisement/advertisementInfo.tsx
+1
-1
announceInfo.tsx
src/pages/content/announcements/announceInfo.tsx
+7
-8
announceInfoSchema.tsx
...pages/content/announcements/schema/announceInfoSchema.tsx
+11
-5
columnInfo.tsx
src/pages/content/columnManagement/columnInfo.tsx
+9
-10
index.tsx
src/pages/content/components/CustomEditor/index.tsx
+2
-3
imageInfo.tsx
src/pages/content/imagesManagement/imageInfo.tsx
+11
-12
infomationInfoSchema.tsx
src/pages/content/infomation/schema/infomationInfoSchema.tsx
+9
-3
index.tsx
src/pages/platformSettlement/accountPayable/index.tsx
+33
-17
info.tsx
src/pages/platformSettlement/accountPayable/info.tsx
+22
-17
schema.tsx
src/pages/platformSettlement/accountPayable/schema.tsx
+1
-1
useIsExistsBrokerage.tsx
src/pages/platformSettlement/hooks/useIsExistsBrokerage.tsx
+30
-0
schema.tsx
src/pages/platformSettlement/score/list/schema.tsx
+1
-1
No files found.
src/components/UploadImage/index.less
View file @
3f822489
...
...
@@ -54,12 +54,20 @@
top: 0;
border-radius: 2px;
.container {
display: flex;
flex-direction: row;
height: 100%;
align-items: center;
justify-content: center;
}
.delete_btn {
color: #fff;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%, -50%)
;
}
.view_btn {
color: #fff
;
}
}
...
...
@@ -75,4 +83,4 @@
}
}
}
\ No newline at end of file
}
src/components/UploadImage/index.tsx
View file @
3f822489
import
React
,
{
useState
,
Fragment
,
forwardRef
,
Children
}
from
'react'
import
{
Upload
,
message
,
Button
}
from
'antd'
import
{
LoadingOutlined
,
PlusOutlined
,
DeleteOutlined
}
from
'@ant-design/icons'
import
{
Upload
,
message
,
Button
,
Modal
}
from
'antd'
import
{
LoadingOutlined
,
PlusOutlined
,
DeleteOutlined
,
EyeOutlined
}
from
'@ant-design/icons'
import
{
UploadFile
,
UploadChangeParam
}
from
'antd/lib/upload/interface'
;
import
{
UPLOAD_TYPE
}
from
'@/constants/index'
;
import
cx
from
'classnames'
...
...
@@ -20,6 +20,7 @@ interface UploadImagePorpsType {
const
UploadImage
:
React
.
FC
<
UploadImagePorpsType
>
=
forwardRef
((
props
,
ref
)
=>
{
const
{
children
,
imgUrl
,
onChange
,
showDesc
=
true
,
size
=
"386x256"
,
disabled
=
false
,
large
=
false
,
fileMaxSize
=
200
,
listType
=
"picture-card"
}
=
props
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
)
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
beforeUpload
=
(
file
:
UploadFile
)
=>
{
const
isJpgOrPng
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
||
file
.
type
===
'image/jpg'
||
file
.
type
===
'image/gif'
;
if
(
!
isJpgOrPng
)
{
...
...
@@ -70,6 +71,10 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
</
Fragment
>
);
const
handleToggle
=
(
flag
:
boolean
)
=>
{
setVisible
(
flag
)
}
const
renderUploadComponentByListType
=
()
=>
{
switch
(
listType
)
{
case
"picture-card"
:
...
...
@@ -84,7 +89,13 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
</
div
>
}
</
Upload
>
{
imgUrl
&&
<
div
className=
{
styles
.
delete_wrap
}
><
Button
onClick=
{
clearImage
}
className=
{
styles
.
delete_btn
}
type=
"text"
icon=
{
<
DeleteOutlined
/>
}
/></
div
>
imgUrl
&&
(
<
div
className=
{
styles
.
delete_wrap
}
>
<
div
className=
{
styles
.
container
}
>
<
a
className=
{
styles
.
view_btn
}
onClick=
{
()
=>
handleToggle
(
true
)
}
><
EyeOutlined
/></
a
>
<
Button
onClick=
{
clearImage
}
className=
{
styles
.
delete_btn
}
type=
"text"
icon=
{
<
DeleteOutlined
/>
}
/>
</
div
>
</
div
>)
}
</
div
>
{
...
...
@@ -107,7 +118,21 @@ const UploadImage: React.FC<UploadImagePorpsType> = forwardRef((props, ref) => {
}
return
renderUploadComponentByListType
()
return
(
<
div
>
{
renderUploadComponentByListType
()
}
<
Modal
visible=
{
visible
}
title=
{
""
}
footer=
{
null
}
onCancel=
{
()
=>
handleToggle
(
false
)
}
>
<
img
style=
{
{
width
:
'100%'
}
}
src=
{
imgUrl
}
/>
</
Modal
>
</
div
>
)
})
UploadImage
.
displayName
=
"UploadImage"
...
...
src/pages/content/advertisement/advertisementInfo.tsx
View file @
3f822489
...
...
@@ -128,7 +128,7 @@ const AdvertisementInfo = () => {
:
<></>
}
</
SchemaForm
>
<
Prompt
when=
{
unsaved
}
message=
"内容未保存,确定离开?"
></
Prompt
>
<
Prompt
when=
{
unsaved
&&
(
isAdd
||
isEdit
)
}
message=
"内容未保存,确定离开?"
></
Prompt
>
</
Card
>
</
PageHeaderWrapper
>
)
...
...
src/pages/content/announcements/announceInfo.tsx
View file @
3f822489
...
...
@@ -15,7 +15,7 @@ import CustomCheckbox from '../components/CustomCheckbox';
import
BraftEditor
from
'braft-editor'
;
import
{
setFormStatus
}
from
'../utils/utils'
;
import
useCustomValidator
from
'../hooks/useValidator'
const
actions
=
createFormActions
();
const
AdvertisementInfo
=
()
=>
{
...
...
@@ -46,7 +46,7 @@ const AdvertisementInfo = () => {
const
serviceActions
=
isAdd
?
PublicApi
.
postManageContentNoticeAdd
:
PublicApi
.
postManageContentNoticeUpdate
let
tempData
=
{...
rest
,
content
:
editorContent
,
top
:
top
?
1
:
0
};
const
postData
=
isAdd
?
tempData
:
{...
tempData
,
id
};
setSubmitLoading
(
true
)
...
...
@@ -83,7 +83,7 @@ const AdvertisementInfo = () => {
label
:
(
<
div
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
<
span
style=
{
{
color
:
'#ff4d4f'
}
}
>
*
</
span
>
:
null
}
...
...
@@ -93,20 +93,20 @@ const AdvertisementInfo = () => {
}
}
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
(
<
FormButtonGroup
offset=
{
3
}
>
<
Submit
loading=
{
submitLoading
}
>
提交
</
Submit
>
<
Button
onClick=
{
handleCancel
}
>
取消
</
Button
>
</
FormButtonGroup
>
</
FormButtonGroup
>
)
:
<></>
}
</
SchemaForm
>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
></
Prompt
>
<
Prompt
when=
{
unsaved
&&
(
isAdd
||
isEdit
)
}
message=
"您还有未保存的内容,是否确定要离开?"
></
Prompt
>
</
Card
>
</
PageHeaderWrapper
>
)
}
export
default
AdvertisementInfo
\ No newline at end of file
export
default
AdvertisementInfo
src/pages/content/announcements/schema/announceInfoSchema.tsx
View file @
3f822489
...
...
@@ -27,7 +27,7 @@ const schema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
60
,
maxByte
:
60
,
}
]
},
...
...
@@ -36,7 +36,7 @@ const schema = {
'x-component'
:
'mega-layout'
,
"x-component-props"
:
{
"label"
:
"{{label}}"
,
wrapperCol
:
24
,
//
wrapperCol
:
24
,
//
grid
:
true
,
columns
:
6
,
autoRow
:
false
,
...
...
@@ -118,7 +118,14 @@ const schema = {
'superscript'
,
'subscript'
,
'hr'
,
]
],
media
:
{
// 如果要允许上传视频的话,需要重写uploadFn, https://www.yuque.com/braft-editor/be/gz44tn
accepts
:
{
video
:
false
,
audio
:
false
,
}
}
},
}
}
...
...
@@ -128,4 +135,4 @@ const schema = {
}
}
export
default
schema
\ No newline at end of file
export
default
schema
src/pages/content/columnManagement/columnInfo.tsx
View file @
3f822489
...
...
@@ -50,7 +50,7 @@ const schema = {
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
20
,
maxByte
:
20
,
}
]
},
...
...
@@ -81,7 +81,7 @@ const useInitialValues = (id) => {
setState
(
data
);
})
}
},
[
id
])
return
state
}
...
...
@@ -100,7 +100,7 @@ const ColumnInfo = () => {
const
serviceActions
=
isAdd
?
PublicApi
.
postManageContentColumnAdd
:
PublicApi
.
postManageContentColumnUpdate
const
postData
=
{
id
,
name
,
sort
};
setSubmitLoading
(
true
)
setUnsaved
(
false
)
...
...
@@ -124,7 +124,7 @@ const ColumnInfo = () => {
title=
{
!
id
?
'新建栏目'
:
'编辑栏目'
}
>
<
Card
>
<
SchemaForm
<
SchemaForm
initialValues=
{
initialValues
?.
data
}
onSubmit=
{
handleSubmit
}
editable=
{
isAdd
||
isEdit
}
...
...
@@ -132,22 +132,22 @@ const ColumnInfo = () => {
components=
{
{
Input
,
Select
,
Submit
}
}
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
(
<
FormButtonGroup
offset=
{
3
}
>
<
Submit
loading=
{
submitLoading
}
>
提交
</
Submit
>
<
Button
onClick=
{
handleCancel
}
>
取消
</
Button
>
</
FormButtonGroup
>
</
FormButtonGroup
>
)
:
<></>
}
</
SchemaForm
>
</
Card
>
</
PageHeaderWrapper
>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
<
Prompt
when=
{
unsaved
&&
(
isAdd
||
isEdit
)
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
</
div
>
)
}
export
default
ColumnInfo
\ No newline at end of file
export
default
ColumnInfo
src/pages/content/components/CustomEditor/index.tsx
View file @
3f822489
...
...
@@ -6,7 +6,7 @@ import BraftEditor from 'braft-editor';
// const SchemaEditor = createVirtualBox('SchemaEditor', BraftEditor);
const
CustomEditor
=
(
props
)
=>
{
const
editorProps
=
props
.
props
[
'x-component-props'
];
const
parentProps
=
props
.
props
[
'x-component-parent-props'
];
const
parentProps
=
props
.
props
[
'x-component-parent-props'
];
const
handleChange
=
(
editorState
)
=>
{
const
isEmpty
=
editorState
.
isEmpty
();
...
...
@@ -23,4 +23,4 @@ const CustomEditor = (props) => {
CustomEditor
.
isFieldComponent
=
true
;
export
default
CustomEditor
\ No newline at end of file
export
default
CustomEditor
src/pages/content/imagesManagement/imageInfo.tsx
View file @
3f822489
...
...
@@ -33,7 +33,7 @@ const ImageInfo = () => {
const
serviceActions
=
isAdd
?
PublicApi
.
postManageContentImageAdd
:
PublicApi
.
postManageContentImageUpdate
let
tempData
=
value
;
const
postData
=
isAdd
?
tempData
:
{...
tempData
,
id
};
setSubmitLoading
(
true
)
...
...
@@ -52,17 +52,17 @@ const ImageInfo = () => {
const
ImageInfoEffects
=
()
=>
()
=>
{
onFieldValueChange$
(
'layout.useScene'
).
subscribe
((
state
)
=>
{
if
(
state
.
initialValue
!=
state
.
value
)
{
actions
.
setFieldValue
(
'layout.position'
,
null
)
setFormStatus
(
actions
,
'layout.position'
,
'options'
,
actions
,
'layout.position'
,
'options'
,
state
.
value
==
1
?
WEB_OPTION
:
APP_OPTION
)
}
})
}
...
...
@@ -86,7 +86,7 @@ const ImageInfo = () => {
label
:
(
<
div
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
<
span
style=
{
{
color
:
'#ff4d4f'
}
}
>
*
</
span
>
:
null
}
...
...
@@ -97,20 +97,20 @@ const ImageInfo = () => {
effects=
{
ImageInfoEffects
()
}
>
{
isAdd
||
isEdit
isAdd
||
isEdit
?
(
<
FormButtonGroup
offset=
{
3
}
>
<
Submit
loading=
{
submitLoading
}
>
提交
</
Submit
>
<
Button
onClick=
{
handleCancel
}
>
取消
</
Button
>
</
FormButtonGroup
>
</
FormButtonGroup
>
)
:
<></>
}
</
SchemaForm
>
</
Card
>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
<
Prompt
when=
{
unsaved
&&
(
isAdd
||
isEdit
)
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
</
PageHeaderWrapper
>
)
}
export
default
ImageInfo
\ No newline at end of file
export
default
ImageInfo
src/pages/content/infomation/schema/infomationInfoSchema.tsx
View file @
3f822489
...
...
@@ -201,7 +201,14 @@ const schema = {
'superscript'
,
'subscript'
,
'hr'
,
]
],
media
:
{
// 如果要允许上传视频的话,需要重写uploadFn, https://www.yuque.com/braft-editor/be/gz44tn
accepts
:
{
video
:
false
,
audio
:
false
,
}
}
},
}
}
...
...
@@ -211,4 +218,4 @@ const schema = {
}
}
export
default
schema
;
\ No newline at end of file
export
default
schema
;
src/pages/platformSettlement/accountPayable/index.tsx
View file @
3f822489
...
...
@@ -4,7 +4,7 @@
* @Description: 应付账款结算
*/
import
React
,
{
useRef
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useRef
,
useEffect
,
useState
,
useMemo
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
Button
,
Modal
,
DatePicker
,
Tag
,
Space
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
...
...
@@ -20,6 +20,8 @@ import { PublicApi } from '@/services/api'
import
{
Moment
}
from
'moment'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
useIsExistsBrokerage
from
'../hooks/useIsExistsBrokerage'
;
interface
SearchParams
{
settlementName
?:
string
,
...
...
@@ -36,11 +38,11 @@ const { RangePicker } = DatePicker;
const
formActions
=
createFormActions
();
const
PLATFORM_PAYER
=
4
;
const
SettlementList
=
()
=>
{
const
[
hasBrokerage
,
setHasBrokerage
]
=
useState
(
true
);
const
ref
=
useRef
<
any
>
({})
const
{
hasBrokerage
,
filterColumns
}
=
useIsExistsBrokerage
();
const
fetchListData
=
async
(
params
)
=>
{
// /settle/accounts/platform/settlement/pagePayableSettlement
const
searchData
=
{
...
params
,
status
:
typeof
params
.
status
==
'undefined'
?
0
:
params
.
status
,
...
...
@@ -65,9 +67,33 @@ const SettlementList = () => {
{
title
:
'结算方式'
,
dataIndex
:
'settlementWayName'
},
{
title
:
'结算方'
,
dataIndex
:
'settlementName'
},
{
title
:
'总单数'
,
dataIndex
:
'totalCount'
},
{
title
:
'代收金额'
,
dataIndex
:
'collectAmount'
},
{
title
:
'佣金'
,
dataIndex
:
'brokerage'
},
{
title
:
'结算金额'
,
dataIndex
:
'amount'
},
{
title
:
'代收金额'
,
dataIndex
:
'collectAmount'
,
render
:
(
text
)
=>
{
return
(
<
div
>
{
`¥${priceFormat(text)}`
}
</
div
>
)
}
},
{
title
:
'佣金'
,
dataIndex
:
'brokerage'
,
render
:
(
text
)
=>
{
return
(
<
div
>
{
`¥${priceFormat(text)}`
}
</
div
>
)
}
},
{
title
:
'结算金额'
,
dataIndex
:
'amount'
,
render
:
(
text
)
=>
{
return
(
<
div
>
{
`¥${priceFormat(text)}`
}
</
div
>
)
}
},
{
title
:
'结算时间'
,
dataIndex
:
'settlementTime'
},
{
title
:
'支付方式'
,
dataIndex
:
'payWayName'
},
{
...
...
@@ -105,16 +131,6 @@ const SettlementList = () => {
}
}
]
useEffect
(()
=>
{
PublicApi
.
getSettleAccountsPlatformSettlementIsExistsBrokerage
()
.
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
&&
!
data
)
{
setHasBrokerage
(
false
)
}
})
},
[])
/**
*
* @param params 手动结算
...
...
@@ -151,7 +167,7 @@ const SettlementList = () => {
const
endTime
=
values
.
endTime
?
values
.
endTime
.
format
(
format
)
+
" 23:59:59"
:
""
;
ref
.
current
.
reload
({...
values
,
startTime
,
endTime
});
}
const
frozenColumn
=
hasBrokerage
?
columns
:
columns
.
filter
((
item
:
any
)
=>
item
.
dataIndex
!==
'brokerage'
)
const
frozenColumn
=
useMemo
(()
=>
filterColumns
(
columns
,
[
"brokerage"
]),
[
filterColumns
,
columns
]);
return
(
<
PageHeaderWrapper
>
<
Card
>
...
...
src/pages/platformSettlement/accountPayable/info.tsx
View file @
3f822489
...
...
@@ -4,7 +4,7 @@
* @Description: 积分结算详情页
*/
import
React
,
{
useRef
,
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useRef
,
useState
,
useEffect
,
useMemo
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
Card
,
PageHeader
,
Descriptions
,
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
...
...
@@ -18,10 +18,12 @@ import { detailSchema } from './schema'
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
StatusTag
from
'../components/StatusTag'
;
import
{
timeRange
}
from
'@/utils/index'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
add
from
'@/asserts/add.png'
;
import
subtraction
from
'@/asserts/subtraction.png'
;
import
useIsExistsBrokerage
from
'../hooks/useIsExistsBrokerage'
;
const
formActions
=
createFormActions
();
const
inintColumns
=
[
...
...
@@ -43,7 +45,11 @@ const inintColumns = [
render
:
(
text
)
=>
{
return
(
<
div
style=
{
{
display
:
"flex"
,
flexDirection
:
"row"
,
alignItems
:
'center'
}
}
>
<
img
src=
{
text
>
0
?
add
:
subtraction
}
width=
{
16
}
height=
{
16
}
/>
{
(
text
>
0
||
text
<
0
)
&&
(
<
img
src=
{
text
>
0
?
add
:
subtraction
}
width=
{
16
}
height=
{
16
}
/>
)
}
<
span
style=
{
{
marginLeft
:
'8px'
}
}
>
{
text
}
</
span
>
</
div
>
)
...
...
@@ -63,7 +69,11 @@ const inintColumns = [
render
:
(
text
)
=>
{
return
(
<
div
style=
{
{
display
:
"flex"
,
flexDirection
:
"row"
,
alignItems
:
'center'
}
}
>
<
img
src=
{
text
>
0
?
add
:
subtraction
}
width=
{
16
}
height=
{
16
}
/>
{
(
text
>
0
||
text
<
0
)
&&
(
<
img
src=
{
text
>
0
?
add
:
subtraction
}
width=
{
16
}
height=
{
16
}
/>
)
}
<
span
style=
{
{
marginLeft
:
'8px'
}
}
>
{
text
}
</
span
>
</
div
>
)
...
...
@@ -75,8 +85,12 @@ const inintColumns = [
render
:
(
text
)
=>
{
return
(
<
div
style=
{
{
display
:
"flex"
,
flexDirection
:
"row"
,
alignItems
:
'center'
}
}
>
<
img
src=
{
text
>
0
?
add
:
subtraction
}
width=
{
16
}
height=
{
16
}
/>
<
span
style=
{
{
marginLeft
:
'8px'
}
}
>
{
text
}
</
span
>
{
(
text
>
0
||
text
<
0
)
&&
(
<
img
src=
{
text
>
0
?
add
:
subtraction
}
width=
{
16
}
height=
{
16
}
/>
)
}
<
span
style=
{
{
marginLeft
:
'8px'
}
}
>
{
priceFormat
(
text
)
}
</
span
>
</
div
>
)
}
...
...
@@ -85,9 +99,9 @@ const inintColumns = [
// 如果佣金设置有效则显示这两列
const
blackList
=
[
"brokerage"
,
"ratio"
];
const
logisticsDetail
:
React
.
FC
=
()
=>
{
const
{
filterColumns
}
=
useIsExistsBrokerage
();
const
ref
=
useRef
<
any
>
({});
const
{
id
}
=
usePageStatus
();
const
[
columns
,
setColumns
]
=
useState
(
inintColumns
);
const
[
infoDetail
,
setInfoDetail
]
=
useState
<
any
>
();
const
fetchListData
=
async
(
params
)
=>
{
const
postData
=
{
...
...
@@ -128,16 +142,7 @@ const logisticsDetail: React.FC = () => {
ref
.
current
.
reload
({...
rest
,
payStartTime
,
payEndTime
,
orderStartTime
,
orderEndTime
});
}
useEffect
(()
=>
{
PublicApi
.
getSettleAccountsPlatformSettlementIsExistsBrokerage
()
.
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
&&
!
data
)
{
setColumns
(
inintColumns
.
filter
((
item
)
=>
blackList
.
includes
(
item
.
dataIndex
)))
}
})
},
[])
const
frozenColumn
=
useMemo
(()
=>
filterColumns
(
inintColumns
,
blackList
),
[
filterColumns
,
inintColumns
]);
return
(
<
PageHeaderWrapper
title=
{
...
...
@@ -180,7 +185,7 @@ const logisticsDetail: React.FC = () => {
tableProps=
{
{
rowKey
:
record
=>
(
record
.
orderNo
+
"-"
+
record
.
payTime
),
}
}
columns=
{
columns
}
columns=
{
frozenColumn
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchListData
(
params
)
}
controlRender=
{
...
...
src/pages/platformSettlement/accountPayable/schema.tsx
View file @
3f822489
...
...
@@ -68,7 +68,7 @@ export const schema: ISchema = {
{
label
:
'结算状态(所有)'
,
value
:
0
},
{
label
:
'待对账'
,
value
:
1
},
{
label
:
'待付款'
,
value
:
2
},
{
label
:
'
代
收款'
,
value
:
3
},
{
label
:
'
待
收款'
,
value
:
3
},
{
label
:
'已完成'
,
value
:
4
},
],
default
:
0
,
...
...
src/pages/platformSettlement/hooks/useIsExistsBrokerage.tsx
0 → 100644
View file @
3f822489
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
;
import
{
PublicApi
}
from
'@/services/api'
;
/**
* 是否拥有扣减佣金列,
*/
function
useIsExistsBrokerage
()
{
const
[
hasBrokerage
,
setHasBrokerage
]
=
useState
(
false
);
useEffect
(()
=>
{
async
function
fetchBrokerageStatus
()
{
const
{
data
,
code
}
=
await
PublicApi
.
getSettleAccountsPlatformSettlementIsExistsBrokerage
();
if
(
code
===
1000
)
{
setHasBrokerage
(
data
)
}
}
fetchBrokerageStatus
();
},
[])
/**
* 过滤掉佣金比率,扣减佣金
*/
const
filterColumns
=
useCallback
((
columns
,
blackList
)
=>
{
return
hasBrokerage
?
columns
:
columns
.
filter
((
_row
)
=>
!
blackList
.
includes
(
_row
.
dataIndex
));
},
[
hasBrokerage
])
return
{
hasBrokerage
,
filterColumns
}
}
export
default
useIsExistsBrokerage
;
src/pages/platformSettlement/score/list/schema.tsx
View file @
3f822489
...
...
@@ -69,7 +69,7 @@ export const schema: ISchema = {
{
label
:
'结算状态(所有)'
,
value
:
0
},
{
label
:
'待对账'
,
value
:
1
},
{
label
:
'待付款'
,
value
:
2
},
{
label
:
'
代
收款'
,
value
:
3
},
{
label
:
'
待
收款'
,
value
:
3
},
{
label
:
'已完成'
,
value
:
4
},
],
default
:
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