Commit 67f9fb61 authored by Bill's avatar Bill

fix: 结算佣金列,以及上传付款凭证bug

parent 4f4d700e
......@@ -125,7 +125,7 @@ export const STATUS_ENUM = [
]
// 1是阿里云oss服务器, 2是本地文件服务器
export const UPLOAD_TYPE = isDev ? 2 : 1
export const UPLOAD_TYPE = 1
// 会员规则类型
export const VIP_RULE_TRANSACTION = 1; // 交易
......
......@@ -14,24 +14,41 @@ import { FORM_FILTER_PATH } from '@/formSchema/const';
import { ISchema, createFormActions } from '@formily/antd';
import { StandardTable } from 'god';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { detailSchema } from './schema'
import { usePageStatus } from '@/hooks/usePageStatus';
import StatusTag from '../components/StatusTag';
import { timeRange } from '@/utils/index';
import moment from 'moment';
import { PublicApi } from '@/services/api';
import add from '@/asserts/add.png';
import subtraction from '@/asserts/subtraction.png';
const formActions = createFormActions();
const columns = [
const inintColumns = [
{title: '单据号', dataIndex: 'orderNo'},
{title: '单据摘要', dataIndex: 'orderAbstract'},
{title: '单据类型', dataIndex: 'settlementOrderTypeName'},
{title: '单据时间', dataIndex: 'orderTime'},
{title: '订单类型', dataIndex: 'orderTypeName'},
{title: '单据总额', dataIndex: 'orderAmount'},
{title: '代收金额', dataIndex: 'collectAmount'},
{
title: '单据总额',
dataIndex: 'orderAmount',
render: (text) => {
return "¥" + text;
}
},
{
title: '代收金额',
dataIndex: 'collectAmount',
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>
</div>
)
}
},
{title: '支付时间', dataIndex: 'payTime'},
{
title: '佣金比率',
......@@ -40,15 +57,37 @@ const columns = [
return (record.ratio + '%');
}
},
{title: '扣减佣金', dataIndex: 'brokerage'},
{title: '本期结算金额', dataIndex: 'settlementAmount'},
{
title: '扣减佣金',
dataIndex: 'brokerage',
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>
</div>
)
}
},
{
title: '本期结算金额',
dataIndex: 'settlementAmount',
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>
</div>
)
}
},
]
// 如果佣金设置有效则显示这两列
const blackList = ["brokerage", "ratio"];
const logisticsDetail: React.FC = () => {
const ref = useRef<any>({});
const { id } = usePageStatus();
const [columns, setColumns] = useState(inintColumns);
const [infoDetail, setInfoDetail] = useState<any>();
const fetchListData = async (params) => {
const postData = {
......@@ -90,6 +129,15 @@ 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)))
}
})
}, [])
return (
<PageHeaderWrapper
title={
......@@ -101,10 +149,10 @@ const logisticsDetail: React.FC = () => {
<AvatarWrap
info={{
aloneTxt: '单',
name: "结算单号:"
name: ""
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{infoDetail?.settlementNo}</span>
<span style={{ fontSize: 16, fontWeight: 'bold', color: "#303133" }}>结算单号: {infoDetail?.settlementNo}</span>
)}
/>
}
......@@ -115,11 +163,11 @@ const logisticsDetail: React.FC = () => {
padding: '0 32px',
}}
>
<Descriptions.Item label="结算日期">{infoDetail?.settlementDate}</Descriptions.Item>
<Descriptions.Item label="结算单数">{infoDetail?.totalCount }</Descriptions.Item>
<Descriptions.Item label="结算金额">{infoDetail?.amount}</Descriptions.Item>
<Descriptions.Item label="结算方式">{infoDetail?.settlementWayName}</Descriptions.Item>
<Descriptions.Item label="结算状态">
<Descriptions.Item label="结算日期">{infoDetail?.settlementDate}</Descriptions.Item>
<Descriptions.Item label="结算单数">{infoDetail?.totalCount }</Descriptions.Item>
<Descriptions.Item label="结算金额">{infoDetail?.amount}</Descriptions.Item>
<Descriptions.Item label="结算方式">{infoDetail?.settlementWayName}</Descriptions.Item>
<Descriptions.Item label="结算状态">
<StatusTag text={infoDetail?.statusName} />
</Descriptions.Item>
</Descriptions>
......
......@@ -186,7 +186,7 @@ const UploadVoucher: React.FC<UploadVocherProps> = (props) => {
}
const handleComfirm = (params) => {
props.handleUpload({onCancel: params.cancel, id: params.id, fileList: params.fileList})
props.handleUpload({onCancel: params.onCancel, id: params.id, fileList: params.fileList})
}
return (
......@@ -196,6 +196,7 @@ const UploadVoucher: React.FC<UploadVocherProps> = (props) => {
return (
<>
<Modal
destroyOnClose
width={548}
title="上传付款凭证"
onCancel={cancel}
......
......@@ -7,6 +7,9 @@
import React from 'react';
import styles from './index.less'
import image_icon from '@/asserts/image_icon.png';
// import Icon from '@ant-design/icons';
import {DeleteOutlined} from '@ant-design/icons';
interface VoucherFileProps {
name: string,
......@@ -14,7 +17,7 @@ interface VoucherFileProps {
}
interface Iprops {
files: VoucherFileProps[]
onRemove: (item) => void
onRemove?: null | ((item) => void)
}
const Voucher: React.FC<Iprops> = (props) => {
......@@ -37,9 +40,17 @@ const Voucher: React.FC<Iprops> = (props) => {
<div className={styles.text}>
<a href={item.proveUrl} target={"_blank"}>{item.name}</a>
</div>
<div className={styles.view}>
<a onClick={() => handleRemove(item)}>删除</a>
</div>
{
props.onRemove &&
(
<div className={styles.view}>
<a onClick={() => handleRemove(item)}>
<DeleteOutlined />
</a>
</div>
)
}
</div>
)
})
......
......@@ -40,7 +40,13 @@ const columns = [
return (record.ratio + '%');
}
},
{title: '本期结算金额', dataIndex: 'settlementAmount'},
{
title: '本期结算金额',
dataIndex: 'settlementAmount',
render: (text, record) => (
"¥" + record.ratio
)
},
]
......@@ -93,7 +99,6 @@ const ScoreInfo: React.FC = () => {
return (
<PageHeaderWrapper
// onBack={() => history.goBack()}
title={
<>
<PageHeader
......@@ -103,10 +108,10 @@ const ScoreInfo: React.FC = () => {
<AvatarWrap
info={{
aloneTxt: '单',
name: "结算单号:"
name: ""
}}
extra={(
<span style={{ fontSize: 12, fontWeight: 'normal' }}>{infoDetail?.settlementNo}</span>
<span style={{ fontSize: 16, fontWeight: 'bold', color: "#303133" }}>结算单号: {infoDetail?.settlementNo}</span>
)}
/>
}
......@@ -117,11 +122,11 @@ const ScoreInfo: React.FC = () => {
padding: '0 32px',
}}
>
<Descriptions.Item label="结算日期">{infoDetail?.settlementDate}</Descriptions.Item>
<Descriptions.Item label="结算单数">{infoDetail?.totalCount }</Descriptions.Item>
<Descriptions.Item label="结算金额">{infoDetail?.amount}</Descriptions.Item>
<Descriptions.Item label="结算方式">{infoDetail?.settlementWayName}</Descriptions.Item>
<Descriptions.Item label="外部状态">
<Descriptions.Item label="结算日期">{infoDetail?.settlementDate}</Descriptions.Item>
<Descriptions.Item label="结算单数">{infoDetail?.totalCount }</Descriptions.Item>
<Descriptions.Item label="结算金额">{infoDetail?.amount}</Descriptions.Item>
<Descriptions.Item label="结算方式">{infoDetail?.settlementWayName}</Descriptions.Item>
<Descriptions.Item label="外部状态">
<StatusTag text={infoDetail?.statusName} />
</Descriptions.Item>
</Descriptions>
......
......@@ -70,7 +70,7 @@ const Query: React.FC<IProps> = () => {
let searchData = {
...rest,
startTime: st,
endTtime: et
endTime: et
}
ref.current.reload(searchData)
......
......@@ -17,7 +17,7 @@ export const commonTimeList = [
export const docTime = [{label: '单据时间(全部)', value: 0}].concat(commonTimeList);
/**
/**
* @author: Bill
* @description: 指派生产通知单查询页 schema - 生产通知单查询
*/
......@@ -33,8 +33,8 @@ export const querySchema: ISchema = {
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入通知单号进行搜索',
align: 'flex-left',
tip: '输入通知单号进行搜索',
},
},
[FORM_FILTER_PATH]: {
......@@ -47,11 +47,18 @@ export const querySchema: ISchema = {
columns: 6,
},
properties: {
memberName: {
summary: {
type: 'string',
'x-component-props': {
placeholder: '通知单摘要',
allowClear: true,
},
},
processName: {
type: 'string',
'x-component-props': {
placeholder: '加工企业名',
allowClear: true,
placeholder: '加工企业名',
allowClear: true,
},
},
docTime: {
......@@ -59,8 +66,8 @@ export const querySchema: ISchema = {
default: 0,
enum: docTime,
'x-component-props': {
placeholder: '单据时间(全部)',
allowClear: true,
placeholder: '单据时间(全部)',
allowClear: true,
},
},
outerStatus: {
......@@ -68,8 +75,8 @@ export const querySchema: ISchema = {
default: undefined,
enum: [],
'x-component-props': {
placeholder: '外部状态(全部)',
allowClear: true,
placeholder: '外部状态(全部)',
allowClear: true,
},
},
submit: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment