Commit f72c567b authored by 前端-黄佳鑫's avatar 前端-黄佳鑫
parents abcc5335 c1704c39
......@@ -73,7 +73,7 @@ const SettlementList: React.FC = () => {
}
const handleShow = async (record: GetSettleAccountsMemberSettlementPageReceiptInvoiceResponseDetail) => {
(document.body.parentNode as HTMLBodyElement).style.overflowY = "hidden";
// (document.body.parentNode as HTMLBodyElement).style.overflowY = "hidden";
setActiveData(record)
const hide = message.loading(intl.formatMessage({ id: 'balance.zhengzaijiazaizhong' }), 0);
/** 退货类型 */
......@@ -101,7 +101,7 @@ const SettlementList: React.FC = () => {
}
const handleOnCancel = () => {
(document.body.parentNode as HTMLBodyElement).style.overflowY = "auto";
// (document.body.parentNode as HTMLBodyElement).style.overflowY = "auto";
setVisible(false)
setActiveData(null)
}
......@@ -131,7 +131,7 @@ const SettlementList: React.FC = () => {
setVisible(false);
setSubmitLoading(false);
}
}).catch(() => {setSubmitLoading(false)})
}).catch(() => { setSubmitLoading(false) })
return;
}
/** 退货类型 */
......@@ -174,10 +174,11 @@ const SettlementList: React.FC = () => {
const { data, code, message: msg } = await postSettleAccountsMemberSettlementInvoiceProve(defaultPostData);
setSubmitLoading(false);
if (code === 1000) {
setVisible(false)
formActions.submit();
setVisible(false)
} else {
message.error(msg);
}
message.error(msg);
}
const _handleOrderNo = (record) => {
......
......@@ -81,13 +81,17 @@ const Add = () => {
const basicFormCol = [
{
label: intl.formatMessage({ id: 'balance.danjuzhaiyao' }), name: 'reconciliationAbstract', placeholder: '请输入对账单摘要', rules: [{ required: true, message: '请输入对账单摘要' }, {
validator: (_, value) => {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 30 * 2) {
return Promise.reject(new Error(`最长60个字符,30个汉字`))
} else {
return Promise.resolve();
validator: (_, value, callback) => {
try {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (_str.length > 30 * 2) {
callback('最长60个字符,30个汉字')
// return Promise.reject(new Error(`最长60个字符,30个汉字`))
}
callback();
} catch (error) {
callback();
}
}
}]
......@@ -95,13 +99,18 @@ const Add = () => {
{
label: intl.formatMessage({ id: 'balance.beizhu' }), name: 'remark', placeholder: '请输入对备注', rules: [
{
validator: (_, value) => {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (value.length > 60 * 2) {
return Promise.reject(new Error(`最长120个字符`))
} else {
return Promise.resolve();
validator: (_, value, callback) => {
try {
let _str = value;
_str = _str.replace(/[\u4E00-\u9FA5]/g, "AA");
if (value.length > 60 * 2) {
callback('最长120个字符')
// return Promise.reject(new Error(`最长120个字符`))
}
callback();
// return Promise.resolve();
} catch (error) {
callback();
}
}
}
......@@ -288,7 +297,7 @@ const Add = () => {
if (!reg.test(value)) {
return Promise.reject(new Error('数量需要大于0'))
}
if(value > record.reconciliationQuantity){
if (value > record.reconciliationQuantity) {
return Promise.reject(new Error('不能大于待对账数量'))
}
return Promise.resolve()
......@@ -446,7 +455,7 @@ const Add = () => {
{
payer: dataSource.payer,
// payee: dataSource.payee,
taxRate: tabelSource?.[0]?.taxRate || '',
taxRate: tabelSource?.[0]?.taxRate ?? '',
ids: ids
}
}
......
......@@ -46,6 +46,22 @@ const SearchDetail = () => {
return _list;
}, [pathPci])
const _returnPayWay = (data) => {
let _text = data.payWayName;
switch (data.payWay) {
case 2:
_text += `(${data.payMonth}月付款日期:${data.payDate}号)`
break;
case 3:
_text += `(${data.payDate}天)`
break;
case 4:
_text += `(付款日期:每月${data.payDate}号)`
break;
}
return _text;
}
const _getDetail = () => {
const _params: any = {
applyAmountId: id,
......@@ -79,7 +95,7 @@ const SearchDetail = () => {
{ label: '请款金额', extra: ${priceFormat(data.applyAmount)}`, type: 'text' },
{ label: '核销金额', extra: ${priceFormat(data.writeOffAmount)}`, type: 'text' },
{ label: '预计付款日期', extra: formatTimeString(data.expectPayTime, 'YYYY-MM-DD'), type: 'text' },
{ label: '付款方式', extra: data.payWayName, type: 'text' },
{ label: '付款方式', extra: _returnPayWay(data), type: 'text' },
]
},
]
......@@ -102,7 +118,7 @@ const SearchDetail = () => {
window.open(`/memberCenter/tranactionAbility/purchaseOrder/orderList/preview?id=${record.billId}`)
} else if (record.billType === 2) {
window.open(`/memberCenter/contract/manage/QueryList/QueryListdetails?contractId=${record.billId}`)
}else {
} else {
window.open(`/memberCenter/afterService/returnApplication/returnQuery/detail?id=${record.billId}`)
}
}
......@@ -112,7 +128,7 @@ const SearchDetail = () => {
title: '单据号',
key: 'billNo',
dataIndex: 'billNo',
render: (text: any, record: any) => <Button type='link' onClick={() => {_handleOpen(record)}}>{text}</Button>
render: (text: any, record: any) => <Button type='link' onClick={() => { _handleOpen(record) }}>{text}</Button>
},
{
title: '单据摘要',
......
......@@ -46,6 +46,22 @@ const SearchDetail = () => {
return _list;
}, [pathPci])
const _returnPayWay = (data) => {
let _text = data.payWayName;
switch (data.payWay) {
case 2:
_text += `(${data.payMonth}月付款日期:${data.payDate}号)`
break;
case 3:
_text += `(${data.payDate}天)`
break;
case 4:
_text += `(付款日期:每月${data.payDate}号)`
break;
}
return _text;
}
const _getDetail = () => {
const _params: any = {
applyAmountId: id,
......@@ -79,7 +95,7 @@ const SearchDetail = () => {
{ label: '请款金额', extra: ${priceFormat(data.applyAmount)}`, type: 'text' },
{ label: '核销金额', extra: ${priceFormat(data.writeOffAmount)}`, type: 'text' },
{ label: '预计付款日期', extra: formatTimeString(data.expectPayTime, 'YYYY-MM-DD'), type: 'text' },
{ label: '付款方式', extra: data.payWayName, type: 'text' },
{ label: '付款方式', extra: _returnPayWay(data), type: 'text' },
]
},
]
......
......@@ -40,7 +40,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
}
const renderFooter = () => {
return (
return disabled ? null : (
<div style={{ textAlign: 'right' }}>
<Button onClick={handleCancel} style={{ marginRight: 8 }}>
{intl.formatMessage({ id: 'balance.components.invoiceCreate.invoiceDrawer.renderFooter.button.1' })}
......@@ -73,7 +73,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
<Drawer
visible={visible}
width={820}
title={intl.formatMessage({ id: 'balance.kaijufapiao' })}
title={disabled ? '查看发票' : intl.formatMessage({ id: 'balance.kaijufapiao' })}
onClose={handleCancel}
footer={renderFooter()}
>
......@@ -82,7 +82,7 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
onSubmit={handleSubmit}
components={{ ArrayCustom: ArrayList, Input: Input, DatePicker, InvoiceInfo }}
actions={formActions}
// editable={mode === 'edit'}
// editable={disabled}
>
{
invoiceInfoData?.map((_item, key) => {
......@@ -105,15 +105,19 @@ const InvoiceDrawerInfo: React.FC<Iprops> = (props: Iprops) => {
header: (
<div className={styles.header}>
<div className={styles['header-item']}>
{intl.formatMessage({ id: 'balance.fapiaoguanli' })}<span className={styles.required}>*</span>
{disabled ? '原订单发票号码' : <>
{intl.formatMessage({ id: 'balance.fapiaoguanli' })}<span className={styles.required}>*</span>
</>}
</div>
<div className={styles['header-item']}>
{intl.formatMessage({ id: 'balance.kaipiaoriqi' })}
<span className={styles.required}>*</span>
{disabled ? '原订单开票日期' : <>
{intl.formatMessage({ id: 'balance.kaipiaoriqi' })}<span className={styles.required}>*</span>
</>}
</div>
<div className={styles['header-item']}>
{intl.formatMessage({ id: 'balance.kaipiaojineyuan' })}
<span className={styles.required}>*</span>
{disabled ? '原订单开票金额' : <>
{intl.formatMessage({ id: 'balance.kaipiaojineyuan' })}<span className={styles.required}>*</span>
</>}
</div>
<div className={styles['header-item']}>{intl.formatMessage({ id: 'balance.beizhu' })}</div>
</div>
......
......@@ -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 = () => {
......
......@@ -58,7 +58,7 @@ const FormList = (props: any) => {
const getList = () => {
let parmas: any = {
current: '1',
pageSize: '3',
pageSize: '10',
}
let fn;
switch (sourceType) {
......@@ -165,34 +165,34 @@ const FormList = (props: any) => {
useEffect(() => {
let columnsTab: any = [
{
title: intl.formatMessage({id: 'contract.wuliaobianhaomingcheng'}), dataIndex: 'name', align: 'center',
title: intl.formatMessage({ id: 'contract.wuliaobianhaomingcheng' }), dataIndex: 'name', align: 'center',
render: (text, item) =>
<div>
<p>{item.code}</p>
<p>{text}</p>
</div>
},
{ title: intl.formatMessage({id: 'contract.guigexinghao'}), dataIndex: 'type', align: 'center', },
{ title: intl.formatMessage({ id: 'contract.guigexinghao' }), dataIndex: 'type', align: 'center', },
{
title: intl.formatMessage({id: 'contract.pinlei'}), dataIndex: 'customerCategory', align: 'center',
title: intl.formatMessage({ id: 'contract.pinlei' }), dataIndex: 'customerCategory', align: 'center',
render: (text, item) =>
<span>{item.customerCategory.name ? item.customerCategory.name : item.customerCategory.category}</span>
},
{
title: intl.formatMessage({id: 'contract.pinpai'}), dataIndex: 'brand', align: 'center',
title: intl.formatMessage({ id: 'contract.pinpai' }), dataIndex: 'brand', align: 'center',
render: (text, item) =>
<span>{item.brand ? item.brand.name : ''}</span>
},
{ title: intl.formatMessage({id: 'contract.danwei'}), dataIndex: 'unitName', align: 'center', },
{ title: intl.formatMessage({ id: 'contract.danwei' }), dataIndex: 'unitName', align: 'center', },
{
title: intl.formatMessage({id: 'contract.caigoushuliang'}),
title: intl.formatMessage({ id: 'contract.caigoushuliang' }),
dataIndex: 'purchaseCount',
key: 'purchaseCount',
align: 'center',
render: (text, record, index) =>
<Form.Item
name={`isHasTax${index}`}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingxuanze'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingxuanze' }) }]}
>
<Input
style={{
......@@ -206,12 +206,12 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.hanshui'}), dataIndex: 'isHasTax', align: 'center',
title: intl.formatMessage({ id: 'contract.hanshui' }), dataIndex: 'isHasTax', align: 'center',
render: (text, record, index) =>
<Form.Item
name={`isHasTax${index}`}
initialValue={text + index}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingxuanze'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingxuanze' }) }]}
>
<Select
style={{ width: 80 }}
......@@ -219,17 +219,17 @@ const FormList = (props: any) => {
onChange={(e) => setInput(e, 'isHasTax', index)}
disabled={Object.keys(Row).length != 0 ? true : false}
>
<Option value="0" key={0}>{intl.formatMessage({id: 'contract.fou'})}</Option>
<Option value="1" key={1}>{intl.formatMessage({id: 'contract.shi'})}</Option>
<Option value="0" key={0}>{intl.formatMessage({ id: 'contract.fou' })}</Option>
<Option value="1" key={1}>{intl.formatMessage({ id: 'contract.shi' })}</Option>
</Select>
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.shuil'}), dataIndex: 'taxRate', align: 'center',
title: intl.formatMessage({ id: 'contract.shuil' }), dataIndex: 'taxRate', align: 'center',
render: (text: any, record: any, index: number) =>
<Form.Item
name={`taxRate${index}`}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingshuru'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingshuru' }) }]}
>
<Input
style={{
......@@ -243,12 +243,12 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.danjiahanshui'}), dataIndex: 'price', align: 'center',
title: intl.formatMessage({ id: 'contract.danjiahanshui' }), dataIndex: 'price', align: 'center',
render: (text: any, record: any, index: number) =>
<Form.Item
name={`price${index}`}
initialValue={text != '' ? Number(text).toFixed(2) : ''}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingshuru'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingshuru' }) }]}
>
<Input
style={{
......@@ -262,11 +262,11 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.shoubiaoshuliang'}), dataIndex: 'bidCount', align: 'center',
title: intl.formatMessage({ id: 'contract.shoubiaoshuliang' }), dataIndex: 'bidCount', align: 'center',
render: (text, record, index) =>
<Form.Item
name={`bidCount${index}`}
rules={[{ required: true, message: intl.formatMessage({id: 'contract.qingshuru'}) }]}
rules={[{ required: true, message: intl.formatMessage({ id: 'contract.qingshuru' }) }]}
>
<Input
style={{
......@@ -279,25 +279,25 @@ const FormList = (props: any) => {
</Form.Item>
},
{
title: intl.formatMessage({id: 'contract.jinehanshui'}),
title: intl.formatMessage({ id: 'contract.jinehanshui' }),
dataIndex: 'bidAmount',
key: 'bidAmount',
align: 'center',
render: (text: any, record: any) => <Text>{intl.formatMessage({id: 'commodity.products.directChannel.columns.currency'})}{record.bidAmount ? Number(record.bidAmount).toFixed(2) : '0.00'}</Text>
render: (text: any, record: any) => <Text>{intl.formatMessage({ id: 'commodity.products.directChannel.columns.currency' })}{record.bidAmount ? Number(record.bidAmount).toFixed(2) : '0.00'}</Text>
},
];
if (dataList.length === 0) {
columnsTab.push(
{
title: intl.formatMessage({id: 'contract.caozuo'}),
title: intl.formatMessage({ id: 'contract.caozuo' }),
dataIndex: 'del',
align: 'center',
key: 'del',
render: (_, record, index) => {
return (
<Popconfirm title={intl.formatMessage({id: 'contract.quedingyaoshanchuma'})} onConfirm={() => handleDelete(record.id)}>
<a>{intl.formatMessage({id: 'contract.shanchu'})}</a>
<Popconfirm title={intl.formatMessage({ id: 'contract.quedingyaoshanchuma' })} onConfirm={() => handleDelete(record.id)}>
<a>{intl.formatMessage({ id: 'contract.shanchu' })}</a>
</Popconfirm>
)
}
......@@ -358,19 +358,19 @@ const FormList = (props: any) => {
const listItem = (record, index) => (
<div className={styles.listItem}>
<div className={styles.label}>
<p>{intl.formatMessage({id: 'contract.guanlian'})}</p>
<p>{intl.formatMessage({id: 'contract.baojiashangpin'})}</p>
<p>{intl.formatMessage({ id: 'contract.guanlian' })}</p>
<p>{intl.formatMessage({ id: 'contract.baojiashangpin' })}</p>
</div>
<div className={styles.text}>
<p>{intl.formatMessage({id: 'contract.shangpinID'})}{record.associatedDataId}</p>
<p>{intl.formatMessage({id: 'contract.shangpinmingcheng'})}{record.associatedGoods}</p>
<p>{intl.formatMessage({ id: 'contract.shangpinID' })}{record.associatedDataId}</p>
<p>{intl.formatMessage({ id: 'contract.shangpinmingcheng' })}{record.associatedGoods}</p>
</div>
<div className={styles.text}>
<p>{intl.formatMessage({id: 'contract.guige'})}{record.associatedType}</p>
<p>{intl.formatMessage({id: 'contract.pinlei'})}{record.associatedCategory}</p>
<p>{intl.formatMessage({ id: 'contract.guige' })}{record.associatedType}</p>
<p>{intl.formatMessage({ id: 'contract.pinlei' })}{record.associatedCategory}</p>
</div>
<div className={styles.text}>
<p>{intl.formatMessage({id: 'contract.pinpai'})}:{record.associatedBrand}</p>
<p>{intl.formatMessage({ id: 'contract.pinpai' })}:{record.associatedBrand}</p>
</div>
</div>
......@@ -407,7 +407,7 @@ const FormList = (props: any) => {
<div className={styles.box}>
{
Object.keys(Row).length === 0 && <div style={{ paddingTop: 12, paddingBottom: 12, }} onClick={() => setIsModalVisible(true)}>
<Button block type='dashed'><PlusOutlined />{intl.formatMessage({id: 'contract.xuanzecaigouwuliao'})}</Button>
<Button block type='dashed'><PlusOutlined />{intl.formatMessage({ id: 'contract.xuanzecaigouwuliao' })}</Button>
</div>
}
<Table
......@@ -423,7 +423,7 @@ const FormList = (props: any) => {
/>
{/* 模态框 */}
<Modal title={intl.formatMessage({id: 'contract.xuanzecaigouwuliao'})} width={900} visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
<Modal title={intl.formatMessage({ id: 'contract.xuanzecaigouwuliao' })} width={900} visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
<StandardTable
tableProps={{
rowKey: 'id',
......
......@@ -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