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({
const pattern = /[0-9]+\.[0-9]*/;
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;
// 平台代收账款结算 - 收款方查看凭证 能力中心
const PLATFORM_BENEFICIARY = 3;
/** 保留三位小数,然后丢弃最后一位小数,因为 priceFormat 保留两位小数会直接进位*/
const fomatNumber = (number) => {
const string = priceFormat(number, 3);
return string.substring(0, string.length - 1);
}
const AccountReceivable = () => {
const intl = useIntl();
const ref = useRef<any>({})
......@@ -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.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.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.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.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 { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Space, Button, Input } from 'antd';
......@@ -21,6 +15,7 @@ import {
postSettleAccountsPlatformConfigDeleteMemberSettlementStrategy,
postSettleAccountsPlatformConfigSetMemberSettlementStrategyStatus
} from '@/services/SettleV2Api';
import styles from './index.less';
const formActions = createFormActions();
......@@ -67,11 +62,13 @@ const MemberSettle: React.FC<{}> = () => {
dataIndex: 'status',
render: (text, record) => {
return (
<StatusSwitch
handleConfirm={() => handleModify(record)}
record={record}
fieldNames="status"
/>
<div className={styles.status}>
<StatusSwitch
handleConfirm={() => handleModify(record)}
record={record}
fieldNames="status"
/>
</div>
)
}
},
......
......@@ -156,7 +156,7 @@ const MemberSettleAdd: React.FC = () => {
}
// 提交
const handleSubmit = (value) => {
const handleSubmit = async (value) => {
const memberList = value.someLists.map((item) => (
{
memberId: item.memberId,
......@@ -184,16 +184,19 @@ const MemberSettleAdd: React.FC = () => {
if (!isAdd) {
postData = { ...postData, id: id };
}
// return;
setSubmitLoading(true);
setUnsaved(false);
serviceActions(postData).then((data) => {
setSubmitLoading(false);
if (data.code === 1000) {
history.push('/memberCenter/balance/settleRules/memberSettleList')
try {
setSubmitLoading(true);
setUnsaved(false);
const { data, code, message: msg } = await serviceActions(postData, { ctlType: 'none' });
if (code !== 1000) {
message.error(msg);
return;
}
})
history.push('/memberCenter/balance/settleRules/memberSettleList')
} finally {
setSubmitLoading(false);
}
}
// 提交
const handleClick = () => {
......
......@@ -19,6 +19,7 @@ import {
getMemberComplaintUpperGet,
GetMemberComplaintUpperGetRequest,
GetMemberComplaintUpperGetResponse,
getMemberInspectUsers,
GetMemberInspectUsersRequest,
GetMemberInspectUsersResponse,
postMemberComplaintUpperSend,
......@@ -175,7 +176,4 @@ const 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 = {
}
},
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",
'x-component': 'FormilyCheckbox',
},
......
......@@ -4,7 +4,7 @@ import { Spin, Card } from 'antd';
import AnchorPage from '@/components/AnchorPage';
import theme from '../../../../config/lingxi.theme.config'
import useInitialValue from '../common/hooks/useInitialValue';
import { GetMemberInspectGetResponse } from '@/services/MemberV2Api';
import { getMemberInspectGet, GetMemberInspectGetResponse } from '@/services/MemberV2Api';
import { usePageStatus } from '@/hooks/usePageStatus';
import CustomizeColumn from '@/components/CustomizeColumn';
......
import { useIntl } from 'umi';
import { useIntl, getIntl } from 'umi';
import React from 'react';
import { Card, Space, Button } from 'antd'
import { setColumnsByLinks } from '../common/columns/queryColumns';
......@@ -12,6 +12,7 @@ import CustomizeQueryList from '../../components/CustomizeQueryList';
import { Link } from 'umi';
import useColumns from '../common/hooks/useColumns';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
const intl = getIntl();
interface Iprops {};
......@@ -61,3 +62,4 @@ const List: React.FC<Iprops> = (props: Iprops) => {
)
}
export default List
......@@ -8,9 +8,15 @@ type CheckboxType = {
extra?: number | string
}
type XcomponentProps = {
/** 是否是单选按钮 */
isRadio: boolean
}
interface Iprops {
props: {
enum: CheckboxType[]
enum: CheckboxType[],
'x-component-props': XcomponentProps
},
mutators: {
change: (params: number[] | string[]) => void
......@@ -21,10 +27,21 @@ interface Iprops {
const FormilyCheckBox: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops) => {
const { value = [], mutators } = props;
const componentProps = props.props || {};
const xComponentProps = componentProps['x-component-props'] || {} as XcomponentProps;
const isRadio = xComponentProps?.isRadio || false;
const enumsMap: CheckboxType[] = componentProps?.enum || [];
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) {
newList = (value as string[]).concat(_item.value as string);
} else {
......
......@@ -4,7 +4,7 @@ import { DatePicker } from '@formily/antd-components';
import schema from './schema';
import VerticalLayout from './layout';
import FormilyCheckBox from '../FormilyCheckBox';
import FormilyRadio from '@/pages/mobileTemplate/categoryNavigation/components/FormilyRadio';
// import FormilyRadio from '@/pages/mobileTemplate/categoryNavigation/components/FormilyRadio';
const actions = createFormActions();
......@@ -20,7 +20,7 @@ const SearchPannel: React.FC<Iprops> = (props: Iprops) => {
};
return (
<SchemaForm
components={{VerticalLayout, FormilyCheckBox, DatePicker, FormilyRadio}}
components={{VerticalLayout, FormilyCheckBox, DatePicker}}
actions={actions}
schema={schema}
onSubmit={handleSubmit}
......
......@@ -23,7 +23,10 @@ const schema: ISchema = {
status: {
type: 'string',
title: '',
"x-component": 'FormilyRadio',
"x-component": 'FormilyCheckBox',
"x-component-props": {
isRadio: true,
},
enum: [
{
label: `${intl.formatMessage({ id: 'activePage.readyOnline'})}`,
......@@ -86,7 +89,10 @@ const schema: ISchema = {
environment: {
type: 'string',
title: '',
"x-component": 'FormilyRadio',
"x-component": 'FormilyCheckBox',
"x-component-props": {
isRadio: true,
},
enum: [
{
label: 'WEB',
......
......@@ -10,6 +10,7 @@
border-radius: 8px;
background-color: #fff;
width: 227px;
height: 100%;
&-image {
width: 100%;
......@@ -18,7 +19,7 @@
.commodity-info {
padding: 16px;
.commodity-info-name {
font-size: 14px;
line-height: 20px;
......@@ -50,6 +51,7 @@
}
.commodity-info-hasBuy {
margin-top: 12px;
font-size: 12px;
color: #91959B;
}
......
......@@ -48,13 +48,18 @@ const HotCommodityItem: React.FC<Iprops> = (props: Iprops) => {
<div className={styles['hot-commodity-info-tags']}>
{
productData.activityList.map((_item: ActivityListType) => {
return (
<div className={styles['hot-commodity-info-tags-item']} key={_item.id}>
<CustomizeTag
type={'danger'}
name={_item.label}
/>
</div>
<>
{_item.label && (
<div className={styles['hot-commodity-info-tags-item']} key={_item.id}>
<CustomizeTag
type={'danger'}
name={_item.label}
/>
</div>
)}
</>
)
})
}
......
......@@ -60,7 +60,7 @@ const HotCommoditySwiper: React.FC<Iprops> = (props: Iprops) => {
{renderChildren()}
</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'}} />
</div>
</div>
......
......@@ -57,6 +57,9 @@
align-items: center;
justify-content: center;
}
.ant-tabs-ink-bar {
display: none;
}
}
.expand-icon {
......
......@@ -44,10 +44,13 @@ const ActivePage = () => {
};
const onSearchChange = (values: SearchParamsType) => {
const { startTime, endTime, ...rest } = values;
const { startTime, endTime, status, environment, ...rest } = values;
console.log(values, "values");
const postData = {
startTime: startTime && moment(startTime, '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,
};
setSearchParams(postData as any);
......@@ -56,7 +59,7 @@ const ActivePage = () => {
const getData = async (params: GetTemplateWebActivityPagePageRequest) => {
setLoading(true);
/** 这里type = 2 是能力中心, 因为平台后台跟能力中心用的是同一个接口 */
const { data, code } = await getTemplateWebActivityPagePage({ ...params, type: 2 });
const { data, code } = await getTemplateWebActivityPagePage({ ...params, type: '2' });
setLoading(false);
if (code === 1000) {
setTotal(data.totalCount);
......
......@@ -144,7 +144,7 @@ class ApiRequest {
if (url != '/member/loginInfo') {
// 这是展示接口错误信息,任何 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