Commit 3beae92a authored by 卢均锐's avatar 卢均锐

Merge branch 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform into v2

* 'v2' of http://10.0.0.22:3000/lingxi/lingxi-business-paltform: fix: 修改pc 装修样式 fix: 修改结算bug 以及装修列表筛选条件bug fix: 修改会员翻译以及接口bug
parents 8dde9ad8 25a86da0
...@@ -19,10 +19,14 @@ registerValidationRules({ ...@@ -19,10 +19,14 @@ registerValidationRules({
const pattern = /[0-9]+\.[0-9]*/; const pattern = /[0-9]+\.[0-9]*/;
if (active == MONTH) { if (active == MONTH) {
return !isNumber.test(otherValues[1]) || ((otherValues[1] < 0 || otherValues[1] > 31) || pattern.test(otherValues[1])) ? getIntl().formatMessage({ id: 'balance.components.settleMethod.registerValidationRules.1' }) : '' return !isNumber.test(otherValues[1]) || ((otherValues[1] < 0 || otherValues[1] > 31) || pattern.test(otherValues[1]))
? getIntl().formatMessage({ id: 'balance.components.settleMethod.registerValidationRules.1' })
: ''
} }
return !isNumber.test(otherValues[0]) || pattern.test(otherValues[0]) ? getIntl().formatMessage({ id: 'balance.components.settleMethod.registerValidationRules.2' }) : "" return !isNumber.test(otherValues[0]) || pattern.test(otherValues[0])
? getIntl().formatMessage({ id: 'balance.components.settleMethod.registerValidationRules.2' })
: ""
} }
}) })
......
...@@ -33,6 +33,12 @@ const { RangePicker } = DatePicker; ...@@ -33,6 +33,12 @@ const { RangePicker } = DatePicker;
// 平台代收账款结算 - 收款方查看凭证 能力中心 // 平台代收账款结算 - 收款方查看凭证 能力中心
const PLATFORM_BENEFICIARY = 3; const PLATFORM_BENEFICIARY = 3;
/** 保留三位小数,然后丢弃最后一位小数,因为 priceFormat 保留两位小数会直接进位*/
const fomatNumber = (number) => {
const string = priceFormat(number, 3);
return string.substring(0, string.length - 1);
}
const AccountReceivable = () => { const AccountReceivable = () => {
const intl = useIntl(); const intl = useIntl();
const ref = useRef<any>({}) const ref = useRef<any>({})
...@@ -57,9 +63,10 @@ const AccountReceivable = () => { ...@@ -57,9 +63,10 @@ const AccountReceivable = () => {
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementDate'}), dataIndex: 'settlementDate'}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementDate'}), dataIndex: 'settlementDate'},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementWayName'}), dataIndex: 'settlementWayName'}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementWayName'}), dataIndex: 'settlementWayName'},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.totalCount'}), dataIndex: 'totalCount', render: (text) => numFormat(text)}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.totalCount'}), dataIndex: 'totalCount', render: (text) => numFormat(text)},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.collectAmount'}), dataIndex: 'collectAmount', render: (text) => `¥${priceFormat(text)}`}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.collectAmount'}), dataIndex: 'collectAmount', render: (text) => `¥${fomatNumber(text)}`},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.brokerage'}), dataIndex: 'brokerage'}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.brokerage'}), dataIndex: 'brokerage'},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.amount'}), dataIndex: 'amount', render: (text) => `¥${priceFormat(text)}`}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.amount'}), dataIndex: 'amount', render: (text) => `¥${fomatNumber(text)}`},
// {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementTime'}), dataIndex: 'settlementDate'},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementTime'}), dataIndex: 'settlementTime'}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementTime'}), dataIndex: 'settlementTime'},
{title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.payWayName'}), dataIndex: 'payWayName'}, {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.payWayName'}), dataIndex: 'payWayName'},
{ {
......
.status {
:global {
.ant-btn {
padding: 0px;
}
}
}
\ No newline at end of file
/*
* @Author: Bill
* @Date: 2020-10-19 14:46:33
* @desc: 会员结算策略列表页
*/
import React, { useRef } from 'react'; import React, { useRef } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button, Input } from 'antd'; import { Card, Space, Button, Input } from 'antd';
...@@ -21,6 +15,7 @@ import { ...@@ -21,6 +15,7 @@ import {
postSettleAccountsPlatformConfigDeleteMemberSettlementStrategy, postSettleAccountsPlatformConfigDeleteMemberSettlementStrategy,
postSettleAccountsPlatformConfigSetMemberSettlementStrategyStatus postSettleAccountsPlatformConfigSetMemberSettlementStrategyStatus
} from '@/services/SettleV2Api'; } from '@/services/SettleV2Api';
import styles from './index.less';
const formActions = createFormActions(); const formActions = createFormActions();
...@@ -67,11 +62,13 @@ const MemberSettle: React.FC<{}> = () => { ...@@ -67,11 +62,13 @@ const MemberSettle: React.FC<{}> = () => {
dataIndex: 'status', dataIndex: 'status',
render: (text, record) => { render: (text, record) => {
return ( return (
<StatusSwitch <div className={styles.status}>
handleConfirm={() => handleModify(record)} <StatusSwitch
record={record} handleConfirm={() => handleModify(record)}
fieldNames="status" record={record}
/> fieldNames="status"
/>
</div>
) )
} }
}, },
......
...@@ -156,7 +156,7 @@ const MemberSettleAdd: React.FC = () => { ...@@ -156,7 +156,7 @@ const MemberSettleAdd: React.FC = () => {
} }
// 提交 // 提交
const handleSubmit = (value) => { const handleSubmit = async (value) => {
const memberList = value.someLists.map((item) => ( const memberList = value.someLists.map((item) => (
{ {
memberId: item.memberId, memberId: item.memberId,
...@@ -184,16 +184,19 @@ const MemberSettleAdd: React.FC = () => { ...@@ -184,16 +184,19 @@ const MemberSettleAdd: React.FC = () => {
if (!isAdd) { if (!isAdd) {
postData = { ...postData, id: id }; postData = { ...postData, id: id };
} }
// return; try {
setSubmitLoading(true); setSubmitLoading(true);
setUnsaved(false); setUnsaved(false);
serviceActions(postData).then((data) => { const { data, code, message: msg } = await serviceActions(postData, { ctlType: 'none' });
setSubmitLoading(false); if (code !== 1000) {
if (data.code === 1000) { message.error(msg);
history.push('/memberCenter/balance/settleRules/memberSettleList') return;
} }
}) history.push('/memberCenter/balance/settleRules/memberSettleList')
} finally {
setSubmitLoading(false);
}
} }
// 提交 // 提交
const handleClick = () => { const handleClick = () => {
......
...@@ -19,6 +19,7 @@ import { ...@@ -19,6 +19,7 @@ import {
getMemberComplaintUpperGet, getMemberComplaintUpperGet,
GetMemberComplaintUpperGetRequest, GetMemberComplaintUpperGetRequest,
GetMemberComplaintUpperGetResponse, GetMemberComplaintUpperGetResponse,
getMemberInspectUsers,
GetMemberInspectUsersRequest, GetMemberInspectUsersRequest,
GetMemberInspectUsersResponse, GetMemberInspectUsersResponse,
postMemberComplaintUpperSend, postMemberComplaintUpperSend,
...@@ -175,7 +176,4 @@ const TobeEvaluateDetail = () => { ...@@ -175,7 +176,4 @@ const TobeEvaluateDetail = () => {
} }
export default TobeEvaluateDetail export default TobeEvaluateDetail
function getMemberInspectUsers(params: GetMemberInspectUsersRequest): { data: any; code: any; } | PromiseLike<{ data: any; code: any; }> {
throw new Error('Function not implemented.');
}
...@@ -137,7 +137,7 @@ export const evaluateScoreRes: ISchema = { ...@@ -137,7 +137,7 @@ export const evaluateScoreRes: ISchema = {
} }
}, },
notifyMember: { notifyMember: {
title: "{{ text(`${intl.formatMessage({ id: 'member.memberEvaluate.hooks.useGetDetailCommon.notifyEvaluateResult'})}`,help(`${intl.formatMessage({ id: 'member.memberEvaluate.tobeSubmitSummary.schema.nofityMember'})}`)) }}", title: `{{ text('${intl.formatMessage({ id: 'member.memberEvaluate.hooks.useGetDetailCommon.notifyEvaluateResult'})}', help('${intl.formatMessage({ id: 'member.memberEvaluate.tobeSubmitSummary.schema.nofityMember'})}')) }}`,
type: "string", type: "string",
'x-component': 'FormilyCheckbox', 'x-component': 'FormilyCheckbox',
}, },
......
...@@ -4,7 +4,7 @@ import { Spin, Card } from 'antd'; ...@@ -4,7 +4,7 @@ import { Spin, Card } from 'antd';
import AnchorPage from '@/components/AnchorPage'; import AnchorPage from '@/components/AnchorPage';
import theme from '../../../../config/lingxi.theme.config' import theme from '../../../../config/lingxi.theme.config'
import useInitialValue from '../common/hooks/useInitialValue'; import useInitialValue from '../common/hooks/useInitialValue';
import { GetMemberInspectGetResponse } from '@/services/MemberV2Api'; import { getMemberInspectGet, GetMemberInspectGetResponse } from '@/services/MemberV2Api';
import { usePageStatus } from '@/hooks/usePageStatus'; import { usePageStatus } from '@/hooks/usePageStatus';
import CustomizeColumn from '@/components/CustomizeColumn'; import CustomizeColumn from '@/components/CustomizeColumn';
......
import { useIntl } from 'umi'; import { useIntl, getIntl } from 'umi';
import React from 'react'; import React from 'react';
import { Card, Space, Button } from 'antd' import { Card, Space, Button } from 'antd'
import { setColumnsByLinks } from '../common/columns/queryColumns'; import { setColumnsByLinks } from '../common/columns/queryColumns';
...@@ -12,6 +12,7 @@ import CustomizeQueryList from '../../components/CustomizeQueryList'; ...@@ -12,6 +12,7 @@ import CustomizeQueryList from '../../components/CustomizeQueryList';
import { Link } from 'umi'; import { Link } from 'umi';
import useColumns from '../common/hooks/useColumns'; import useColumns from '../common/hooks/useColumns';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'; import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
const intl = getIntl();
interface Iprops {}; interface Iprops {};
...@@ -61,3 +62,4 @@ const List: React.FC<Iprops> = (props: Iprops) => { ...@@ -61,3 +62,4 @@ const List: React.FC<Iprops> = (props: Iprops) => {
) )
} }
export default List export default List
...@@ -8,9 +8,15 @@ type CheckboxType = { ...@@ -8,9 +8,15 @@ type CheckboxType = {
extra?: number | string extra?: number | string
} }
type XcomponentProps = {
/** 是否是单选按钮 */
isRadio: boolean
}
interface Iprops { interface Iprops {
props: { props: {
enum: CheckboxType[] enum: CheckboxType[],
'x-component-props': XcomponentProps
}, },
mutators: { mutators: {
change: (params: number[] | string[]) => void change: (params: number[] | string[]) => void
...@@ -21,10 +27,21 @@ interface Iprops { ...@@ -21,10 +27,21 @@ interface Iprops {
const FormilyCheckBox: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops) => { const FormilyCheckBox: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops) => {
const { value = [], mutators } = props; const { value = [], mutators } = props;
const componentProps = props.props || {}; const componentProps = props.props || {};
const xComponentProps = componentProps['x-component-props'] || {} as XcomponentProps;
const isRadio = xComponentProps?.isRadio || false;
const enumsMap: CheckboxType[] = componentProps?.enum || []; const enumsMap: CheckboxType[] = componentProps?.enum || [];
const handleChange = (isChecked: boolean, _item: CheckboxType) => { const handleChange = (isChecked: boolean, _item: CheckboxType) => {
let newList: string[] | number[] = [] let newList: string[] | number[] = [];
console.log(isChecked)
if (isRadio) {
if (isChecked) {
newList = [_item.value as string];
}
mutators.change(newList)
return;
}
if (isChecked) { if (isChecked) {
newList = (value as string[]).concat(_item.value as string); newList = (value as string[]).concat(_item.value as string);
} else { } else {
......
...@@ -4,7 +4,7 @@ import { DatePicker } from '@formily/antd-components'; ...@@ -4,7 +4,7 @@ import { DatePicker } from '@formily/antd-components';
import schema from './schema'; import schema from './schema';
import VerticalLayout from './layout'; import VerticalLayout from './layout';
import FormilyCheckBox from '../FormilyCheckBox'; import FormilyCheckBox from '../FormilyCheckBox';
import FormilyRadio from '@/pages/mobileTemplate/categoryNavigation/components/FormilyRadio'; // import FormilyRadio from '@/pages/mobileTemplate/categoryNavigation/components/FormilyRadio';
const actions = createFormActions(); const actions = createFormActions();
...@@ -20,7 +20,7 @@ const SearchPannel: React.FC<Iprops> = (props: Iprops) => { ...@@ -20,7 +20,7 @@ const SearchPannel: React.FC<Iprops> = (props: Iprops) => {
}; };
return ( return (
<SchemaForm <SchemaForm
components={{VerticalLayout, FormilyCheckBox, DatePicker, FormilyRadio}} components={{VerticalLayout, FormilyCheckBox, DatePicker}}
actions={actions} actions={actions}
schema={schema} schema={schema}
onSubmit={handleSubmit} onSubmit={handleSubmit}
......
...@@ -23,7 +23,10 @@ const schema: ISchema = { ...@@ -23,7 +23,10 @@ const schema: ISchema = {
status: { status: {
type: 'string', type: 'string',
title: '', title: '',
"x-component": 'FormilyRadio', "x-component": 'FormilyCheckBox',
"x-component-props": {
isRadio: true,
},
enum: [ enum: [
{ {
label: `${intl.formatMessage({ id: 'activePage.readyOnline'})}`, label: `${intl.formatMessage({ id: 'activePage.readyOnline'})}`,
...@@ -86,7 +89,10 @@ const schema: ISchema = { ...@@ -86,7 +89,10 @@ const schema: ISchema = {
environment: { environment: {
type: 'string', type: 'string',
title: '', title: '',
"x-component": 'FormilyRadio', "x-component": 'FormilyCheckBox',
"x-component-props": {
isRadio: true,
},
enum: [ enum: [
{ {
label: 'WEB', label: 'WEB',
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
border-radius: 8px; border-radius: 8px;
background-color: #fff; background-color: #fff;
width: 227px; width: 227px;
height: 100%;
&-image { &-image {
width: 100%; width: 100%;
...@@ -18,7 +19,7 @@ ...@@ -18,7 +19,7 @@
.commodity-info { .commodity-info {
padding: 16px; padding: 16px;
.commodity-info-name { .commodity-info-name {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
...@@ -50,6 +51,7 @@ ...@@ -50,6 +51,7 @@
} }
.commodity-info-hasBuy { .commodity-info-hasBuy {
margin-top: 12px;
font-size: 12px; font-size: 12px;
color: #91959B; color: #91959B;
} }
......
...@@ -48,13 +48,18 @@ const HotCommodityItem: React.FC<Iprops> = (props: Iprops) => { ...@@ -48,13 +48,18 @@ const HotCommodityItem: React.FC<Iprops> = (props: Iprops) => {
<div className={styles['hot-commodity-info-tags']}> <div className={styles['hot-commodity-info-tags']}>
{ {
productData.activityList.map((_item: ActivityListType) => { productData.activityList.map((_item: ActivityListType) => {
return ( return (
<div className={styles['hot-commodity-info-tags-item']} key={_item.id}> <>
<CustomizeTag {_item.label && (
type={'danger'} <div className={styles['hot-commodity-info-tags-item']} key={_item.id}>
name={_item.label} <CustomizeTag
/> type={'danger'}
</div> name={_item.label}
/>
</div>
)}
</>
) )
}) })
} }
......
...@@ -60,7 +60,7 @@ const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => { ...@@ -60,7 +60,7 @@ const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => {
{renderChildren()} {renderChildren()}
</div> </div>
</div> </div>
<div className={classNames(styles['swiper-next'], { [styles.hidden]: current * 3 <= count })} onClick={onNext}> <div className={classNames(styles['swiper-next'], { [styles.hidden]: (current + 1) * 3 >= count })} onClick={onNext}>
<RightOutlined style={{fontSize: '20px', color: 'red'}} /> <RightOutlined style={{fontSize: '20px', color: 'red'}} />
</div> </div>
</div> </div>
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.ant-tabs-ink-bar {
display: none;
}
} }
.expand-icon { .expand-icon {
......
...@@ -44,10 +44,13 @@ const ActivePage = () => { ...@@ -44,10 +44,13 @@ const ActivePage = () => {
}; };
const onSearchChange = (values: SearchParamsType) => { const onSearchChange = (values: SearchParamsType) => {
const { startTime, endTime, ...rest } = values; const { startTime, endTime, status, environment, ...rest } = values;
console.log(values, "values");
const postData = { const postData = {
startTime: startTime && moment(startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() || null, startTime: startTime && moment(startTime, 'YYYY-MM-DD HH:mm:ss').valueOf() || null,
endTime: endTime && moment(endTime, 'YYYY-MM-DD HH:mm:ss').valueOf() || null, endTime: endTime && moment(endTime, 'YYYY-MM-DD HH:mm:ss').valueOf() || null,
status: status?.join(""),
environment: environment?.join(""),
...rest, ...rest,
}; };
setSearchParams(postData as any); setSearchParams(postData as any);
...@@ -56,7 +59,7 @@ const ActivePage = () => { ...@@ -56,7 +59,7 @@ const ActivePage = () => {
const getData = async (params: GetTemplateWebActivityPagePageRequest) => { const getData = async (params: GetTemplateWebActivityPagePageRequest) => {
setLoading(true); setLoading(true);
/** 这里type = 2 是能力中心, 因为平台后台跟能力中心用的是同一个接口 */ /** 这里type = 2 是能力中心, 因为平台后台跟能力中心用的是同一个接口 */
const { data, code } = await getTemplateWebActivityPagePage({ ...params, type: 2 }); const { data, code } = await getTemplateWebActivityPagePage({ ...params, type: '2' });
setLoading(false); setLoading(false);
if (code === 1000) { if (code === 1000) {
setTotal(data.totalCount); setTotal(data.totalCount);
......
...@@ -144,7 +144,7 @@ class ApiRequest { ...@@ -144,7 +144,7 @@ class ApiRequest {
if (url != '/member/loginInfo') { if (url != '/member/loginInfo') {
// 这是展示接口错误信息,任何 ctlType 都可以,不然一些 get 请求出错了 // 这是展示接口错误信息,任何 ctlType 都可以,不然一些 get 请求出错了
// 错误信息无法展示给用户 // 错误信息无法展示给用户
res.message && message.info(intl.formatMessage({ id: res.code, defaultMessage: res.message})) res.message && options.ctlType === 'message' && message.info(intl.formatMessage({ id: res.code, defaultMessage: res.message}))
} }
} }
......
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