Commit ead61aee authored by 前端-许佳敏's avatar 前端-许佳敏

修复注册bug,新增采购订单

parent afd9d15d
......@@ -84,6 +84,20 @@ const TranactionRoute = {
},
]
},
// 采购订单
{
path: '/memberCenter/tranactionAbility/purchaseOrder',
name: 'purchaseOrder',
key: 'purchaseOrder',
routes: [
{
path: '/memberCenter/tranactionAbility/purchaseOrder/orderList',
name: 'purchaseOrderSearch',
key: 'purchaseOrderSearch',
component: '@/pages/transaction/purchaseOrder'
},
]
}
]
......
......@@ -23,7 +23,7 @@ export interface ShopInfo {
type: number;
environment: number;
logoUrl: string;
describe: string;
describe?: any;
state: number;
url: string;
}
......
......@@ -275,4 +275,10 @@ h6 {
.ant-select-dropdown {
top: 36px !important;
}
}
// 强制块级标签居中
.global-block-center {
margin-left: auto !important;
margin-right: auto !important;
}
\ No newline at end of file
import { useState, useMemo } from 'react';
interface stringMethods {
[key: string]: (...args) => any
}
/**
* @description 传入一个值和方法map, 返回对应控制该状态的fn
* @param initialValue 初始状态
* @param methods 控制状态的方法集合对象
* @author xjm
*/
export const useMethods = <T>(initialValue: T, methods: stringMethods) => {
const [value, setValue] = useState<T>(initialValue);
const boundMethods = useMemo(
() => Object.entries(methods).reduce(
(methods, [name, fn]) => {
const method = (...args) => {
setValue(value => fn(value, ...args));
};
methods[name] = method;
return methods;
},
{}
),
[methods]
);
return [value, boundMethods];
};
\ No newline at end of file
......@@ -97,6 +97,8 @@ export default {
'menu.tranactionAbility.enquirySubmit': '需求发布',
'menu.tranactionAbility.enquirySubmit.SearchList': '待新增需求单',
'menu.tranactionAbility.enquirySubmit.addEnquiry': '新增需求单',
'menu.tranactionAbility.purchaseOrder': '采购订单',
'menu.tranactionAbility.purchaseOrder.purchaseOrderSearch': '订单查询',
//物流能力
'menu.logisticsAbility': '物流',
......
import React from 'react'
import DetailPage from '@/components/DetailPage'
import { Card } from 'antd'
import { StandardTable } from 'god'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
export interface PurchaseOrderProps {}
const orderColumns = [
{
dataIndex: 'orderId',
title: '订单号'
}
]
const fetchTableData = async (params) => {
return []
}
const PurchaseOrder:React.FC<PurchaseOrderProps> = (props) => {
return <PageHeaderWrapper>
<Card>
<StandardTable
fetchTableData={params => fetchTableData(params)}
columns={orderColumns}
/>
</Card>
</PageHeaderWrapper>
}
PurchaseOrder.defaultProps = {}
export default PurchaseOrder
\ No newline at end of file
......@@ -131,13 +131,11 @@
margin-bottom: 0;
}
}
.registerForm {
max-width: 335px;
margin: 0px auto;
padding-top: 40px;
}
.registerBox {
width: 100%;
min-height: 700px;
......
......@@ -175,6 +175,9 @@ const UserRegistry = () => {
PublicApi.postMemberRegister(params).then(() => {
actions.dispatch('onFormStepNext', {})
setCurrent(current + 1)
}).finally(() => {
// 调用接口后 无论成功失败需清空缓存的数据
formCache = {}
})
})
}
......@@ -205,7 +208,7 @@ const UserRegistry = () => {
businessTypeTitle: <span className={styles.commonPanelTitle}>请选择您要开展的业务</span>,
}}
/>
<div className={styles.registerForm}>
<div className={cx(styles.registerForm, 'global-block-center')}>
{
current === 0 &&
<Button type='primary' className={styles.continueButton} onClick={handleActionBtn}>同意协议并注册</Button>
......
......@@ -9,7 +9,7 @@ export const registerStep0Schema: ISchema = {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
className: 'registerForm',
className: 'registerForm global-block-center',
full: true
},
properties: {
......@@ -106,7 +106,7 @@ export const registerStep1Schema: ISchema = {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
className: 'formBoxStep2'
className: 'formBoxStep2 global-block-center'
},
properties: {
BLOCK_LAYOUT1: {
......@@ -171,7 +171,7 @@ export const forgetPwdSchema: ISchema = {
type: 'object',
"x-component": 'mega-layout',
"x-component-props": {
className: 'registerForm',
className: 'registerForm global-block-center',
full: true
},
properties: {
......
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