Commit 5af97bb5 authored by Bill's avatar Bill

fix: 修改首页会员信息,以及结算开票

parent 77111ed1
......@@ -40,6 +40,14 @@ const MemberRoute: RouterChild = {
noMargin: true,
component: '@/pages/member/memberImport/editMember',
},
// 修改 自己个人信息
{
path: '/memberCenter/memberAbility/manage/import/editMySelf',
name: 'editMySelf',
hideInMenu: true,
noMargin: true,
component: '@/pages/member/memberImport/editMySelf',
},
// 会员导入-详情
{
path: '/memberCenter/memberAbility/manage/import/detail',
......
......@@ -51,6 +51,7 @@
"@umijs/test": "^3.2.0",
"antd-img-crop": "^3.12.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"bignumber": "^1.1.0",
"bignumber.js": "^9.0.1",
"bizcharts": "^4.0.14",
"copy-to-clipboard": "^3.3.1",
......
......@@ -81,6 +81,7 @@ export default {
'menu.memberAbility.memberManage.memberImport': '会员导入',
'menu.memberAbility.memberManage.addMember': '新建会员',
'menu.memberAbility.memberManage.editMember': '编辑会员',
'menu.memberAbility.memberManage.editMySelf': '修改会员信息',
'menu.memberAbility.memberManage.memberImportDetail': '会员导入详情',
'menu.memberAbility.memberManage.memberMaintain': '会员维护',
'menu.memberAbility.memberManage.maintianDetail': '会员详情',
......
......@@ -64,7 +64,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
// 验证旧的支付密码
const handleVerifySuccess = () => {
const payPassword = form.getFieldValue('paycode');
const payPassword = encryptedByAES(form.getFieldValue('paycode'));
const service = PublicApi.postMemberSecurityPayCheck;
service({payPassword: payPassword}, { ctlType: "none" }).then((data) => {
console.log(data);
......@@ -96,7 +96,7 @@ const PaycodeVerifyPanel: React.FC<IProps> = (props) => {
noStyle
rules={[{ required: true, message: '请填写支付密码' }]}
>
<Input autoComplete="off" />
<Input.Password autoComplete="off" />
</Form.Item>
</Col>
</Row>
......
......@@ -76,7 +76,7 @@ const InvoiceArray = (props) => {
{toArr(value).map((item, index) => {
return (
<RowStyleLayout {...componentProps} key={index}>
<div style={{display: 'flex'}}>
<div style={{display: 'flex', position: 'relative'}}>
<SchemaField path={FormPath.parse(path).concat(index)} />
{
length - 1 === index
......@@ -84,15 +84,15 @@ const InvoiceArray = (props) => {
: null
}
<Button
style={{marginLeft: length - 1 === index ? '0' : '-16px'}}
<Button
style={{marginLeft: length - 1 === index ? '0' : '-16px'}}
onClick={() => mutators.remove(index)}
>
<MinusOutlined width={44}/>
<MinusOutlined width={44}/>
</Button>
</div>
</RowStyleLayout>
)
})}
......@@ -117,5 +117,5 @@ const InvoiceArray = (props) => {
)
}
InvoiceArray.isFieldComponent = true;
export default InvoiceArray
\ No newline at end of file
InvoiceArray.isFieldComponent = true;
export default InvoiceArray
......@@ -132,46 +132,51 @@ const InvoiceDrawer: React.FC<Iprops> = (props) => {
getContainer={false}
destroyOnClose
visible={visible}
bodyStyle={{overflow: 'auto'}}
title={title}
width={width}
onClose={onCancel}
footer={renderFooter()}
>
<InvoiceInfo infos={invoiceInfo} />
{
type === TypeEnum.edit
? (
<>
<div className={styles.formHeader}>
<div className={styles.invoiceNum}>发票号码</div>
<div className={styles.invoiceDate}>开票日期</div>
<div>备注</div>
</div>
<SchemaForm onSubmit={handleForm} actions={formActions} components={{ InvoiceArray, Input, DatePicker }}>
<Field
name="list"
type="array"
x-component="InvoiceArray"
>
<Field type="object">
<Field name="number" x-component="Input" x-rules={[{required: true, message: '请填写发票号'}]} />
<Field name="invoiceDate" x-component="DatePicker" x-rules={[{required: true, message: '请选择发票日期'}]} />
<Field name="remark" x-component="Input" x-component-props={{style: {width: '240px'}}} />
<div style={{display: 'flex', flexDirection: 'column'}}>
<InvoiceInfo infos={invoiceInfo} />
{
type === TypeEnum.edit
? (
<>
<div className={styles.formHeader}>
<div className={styles.invoiceNum}>发票号码</div>
<div className={styles.invoiceDate}>开票日期</div>
<div>备注</div>
</div>
{/* getPopupContainer={triggerNode => { console.log(triggerNode, triggerNode.parentElement); return triggerNode.parentNode}} */}
<SchemaForm onSubmit={handleForm} actions={formActions} components={{ InvoiceArray, Input, DatePicker }}>
<Field
name="list"
type="array"
x-component="InvoiceArray"
>
<Field type="object">
<Field name="number" x-component="Input" x-rules={[{required: true, message: '请填写发票号'}]} />
<Field name="invoiceDate" x-component-props={{
getPopupContainer: (triggernode) => triggernode.parentElement
}} x-component="DatePicker" x-rules={[{required: true, message: '请选择发票日期'}]} />
<Field name="remark" x-component="Input" x-component-props={{style: {width: '240px'}}} />
</Field>
</Field>
</Field>
</SchemaForm>
</>
)
: (
<Table
columns={columns}
dataSource={tableList}
rowKey={record => record.id}
/>
)
}
</SchemaForm>
</>
)
: (
<Table
columns={columns}
dataSource={tableList}
rowKey={record => record.id}
/>
)
}
</div>
</Drawer>
)
}
......
......@@ -21,7 +21,7 @@ interface Iprops {}
const WEEKDAYS = ["天", "一","二", "三", "四", "五","六"];
const LEVEL_IMAGE = [level1, level1, level2, level3, level4];
const EDIT_USER_URL = '/memberCenter/memberAbility/query';
const EDIT_USER_URL = '/memberCenter/memberAbility/manage/import/editMySelf';
const USER_CENTER_URL = '/memberCenter/memberAbility/manage/maintain'
const STATUS_COLOR: ("default" | "processing" | "error" | "success")[] = ["default", "processing", "error", "success"]
......@@ -64,7 +64,7 @@ const UserCenter: React.FC<Iprops> = (props) => {
if (info.file.status === 'done') {
const { code, data } = info.file.response
if(code === 1000) {
PublicApi.postMemberBusinessLogoAdd({logo: data})
PublicApi.postMemberMainpageLogoAdd({logo: data})
.then((res) => {
if(res.code === 1000) {
dispatch({type: 'done', payload: {url: data}})
......@@ -134,7 +134,10 @@ const UserCenter: React.FC<Iprops> = (props) => {
</div>
</div>
</div>
<Link to={EDIT_USER_URL} className={styles.link}>修改会员信息</Link>
{
userAuth.validateStatus === 2 &&
<Link to={EDIT_USER_URL} className={styles.link}>修改会员信息</Link>
}
</div>
<div className={styles.otherValues}>
<div className={styles.divider}>
......
......@@ -10,4 +10,4 @@ const EditMember: React.FC = () => {
);
};
export default EditMember;
\ No newline at end of file
export default EditMember;
import React from 'react';
import { usePageStatus } from '@/hooks/usePageStatus';
import MemberForm from './components/MemberForm';
const EditMySelf: React.FC = () => {
const { id, validateId } = usePageStatus();
console.log(123);
return (
<MemberForm id={+id} validateId={+validateId} isEdit={true} mode={"myself"} />
);
};
export default EditMySelf;
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