Commit d45b058e authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents bd88fe77 fb9a0460
......@@ -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'
},
]
}
]
......
......@@ -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'
import { PublicApi } from '@/services/api'
// 订单查询
export interface PurchaseOrderProps {}
const orderColumns = [
{
dataIndex: 'orderId',
title: '订单号'
}
]
const fetchTableData = async (params) => {
return []
}
// 最后一步开始调试 TODO
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
import React from 'react';
import styles from '../index.less';
import { Radio } from 'antd';
export interface ButtonListProps {
......@@ -8,10 +7,10 @@ export interface ButtonListProps {
}
const ButtonList: React.FC<ButtonListProps> = (props) => {
return (
<div className={styles.margin320}>
<div className={'margin320'}>
<Radio.Group>
{
props.group.map(v => <Radio.Button value={v.value} key={v.key} className={props.size === 'default' ? styles.default : styles.large}>{v.text}</Radio.Button>)
props.group.map(v => <Radio.Button value={v.value} key={v.key} className={props.size === 'default' ? 'default' : 'large'}>{v.text}</Radio.Button>)
}
</Radio.Group>
</div>
......
......@@ -6,7 +6,6 @@ import {
LockOutlined,
ExclamationCircleFilled
} from '@ant-design/icons';
import styles from '../index.less'
import { PublicApi } from '@/services/api';
import { setAuth, setRouters } from '@/utils/auth';
......@@ -77,7 +76,7 @@ const LoginWrap: React.FC = () => {
<Input.Password prefix={<LockOutlined />} placeholder='请输入密码' size='large' />
</Form.Item>
{validButton && (<Form.Item
className={styles.loginVerBtn}
className={'loginVerBtn'}
>
<Button ghost type='primary' block size='large'>点击进行验证</Button>
</Form.Item>)
......
......@@ -6,7 +6,6 @@ import {
ExclamationCircleFilled
} from '@ant-design/icons';
import QRCode from 'qrcode';
import styles from '../index.less'
const ScanLoginWrap: React.FC = () => {
const [qrCode, setQrCode] = useState('')
......@@ -20,9 +19,9 @@ const ScanLoginWrap: React.FC = () => {
})
return (
<div className={styles.scanLoginWrap}>
<div className={'scanLoginWrap'}>
<h2>扫码登录</h2>
<div className={styles.qrCodeImage}>
<div className={'qrCodeImage'}>
<img src={qrCode} alt=""/>
</div>
</div>
......
@import '~@/global/styles/global.less';
#root {
.login-item {
flex: 1;
}
.login-ctl {
position: relative;
background: @white;
}
.loginWrap {
padding: 141px 0 102px;
}
.readyLogin {
text-align: center;
margin-top: 24px;
}
.loginMain {
position: relative;
background: @white;
padding: 64px 56px 0;
color: #6B778C;
&>h2 {
font-size: 32px;
margin-bottom: 32px;
.loginItem {
flex: 1;
}
.clickUsernameLogin {
.ab-position(right, top, 8, 8);
font-size: 14px;
color: rgba(107, 119, 140, 1);
.loginCtl {
position: relative;
background: @white;
}
.clickScanLogin {
// .center-text();
.ab-position(right, top, 8, 8);
width: 32px;
height: 32px;
background: url("../../../mockStatic/qr_code1.png") center center no-repeat;
.loginWrap {
padding: 141px 0 102px;
}
.readyLogin {
text-align: center;
margin-top: 24px;
}
.loginMain {
position: relative;
background: @white;
padding: 64px 56px 0;
color: #6B778C;
&>h2 {
font-size: 32px;
margin-bottom: 32px;
}
.clickUsernameLogin {
.ab-position(right, top, 8, 8);
font-size: 14px;
color: rgba(107, 119, 140, 1);
}
.clickScanLogin {
// .center-text();
.ab-position(right, top, 8, 8);
width: 32px;
height: 32px;
background: url("../../../mockStatic/qr_code1.png") center center no-repeat;
background-size: cover;
&:hover {
background: url("../../../mockStatic/qr_code2.png") center center no-repeat;
}
}
.scanTips {
.make-center(flex);
font-size: 12px;
color: rgba(107, 119, 140, 1);
.scanIcon {
font-size: 30px;
margin-right: @margin-sm;
}
}
}
.loginDesc {
background: url("../../../mockStatic/image_ad.png") center center no-repeat;
background-size: cover;
&:hover {
background: url("../../../mockStatic/qr_code2.png") center center no-repeat;
.adBox {
color: @white;
.make-center(text);
& h2 {
margin-top: 20px;
.font-height-color(32, 80, @white);
letter-spacing: 2px;
}
& p {
padding: 10px 60px;
text-indent: 2em;
}
}
}
.scanTips {
.make-center(flex);
font-size: 12px;
color: rgba(107, 119, 140, 1);
.scanIcon {
font-size: 30px;
margin-right: @margin-sm;
.thirdLogin {
height: 64px;
background: #FAFBFC;
margin-top: 90px;
& a {
margin-left: 6px;
.make-center(text);
vertical-align: middle;
}
}
}
.loginDesc {
background: url("../../../mockStatic/image_ad.png") center center no-repeat;
background-size: cover;
.adBox {
color: @white;
.loginVerBtn {
background: #EBF7F2;
}
.scanLoginWrap {
.make-center(text);
& h2 {
margin-top: 20px;
.font-height-color(32, 80, @white);
letter-spacing: 2px;
&>h2 {
color: #6B778C;
}
& p {
padding: 10px 60px;
text-indent: 2em;
.qrCodeImage {
.make-center(text);
width: 224px;
height: 224px;
.make-center-space(margin, 30, 18);
&>img {
.make-center(block);
width: 100%;
height: 100%;
}
}
}
}
.thirdLogin {
height: 64px;
background: #FAFBFC;
margin-top: 90px;
& a {
margin-left: 6px;
.make-center(text);
vertical-align: middle;
.mr_t-40 {
margin-top: 40px;
}
}
.loginVerBtn {
background: #EBF7F2;
}
.scanLoginWrap {
.make-center(text);
&>h2 {
color: #6B778C;
.mr_t-24 {
margin-top: 24px;
}
.qrCodeImage {
.make-center(text);
width: 224px;
height: 224px;
.make-center-space(margin, 30, 18);
&>img {
.make-center(block);
width: 100%;
height: 100%;
// register
.register {
// width: 100%;
&>h3 {
padding: 40px 0;
.make-center(text);
font-size: 32px;
margin-bottom: 0;
}
}
}
// register
.register {
// width: 100%;
&>h3 {
padding: 40px 0;
.registerForm {
max-width: 335px;
margin: 0px auto;
padding-top: 40px;
}
.registerBox {
width: 100%;
min-height: 700px;
padding-bottom: 40px;
background: #fff;
padding-bottom: 40px;
.stepWrap {
height: 72px;
background: #FAFBFC;
padding: 0 115px;
.make-center(flexAlign);
}
}
.formBoxStep1 {
width: 324px;
.make-center-space(margin, 40, 0);
}
.formBefore {
width: 54px;
.font-height-color(undefined, 40, #42526E, #F4F5F7);
.make-center(text);
font-size: 32px;
margin-bottom: 0;
border: 1px solid #DFE1E6;
border-right: 0;
}
}
.registerForm {
max-width: 335px;
margin: 0px auto;
padding-top: 40px;
}
.registerBox {
width: 100%;
min-height: 700px;
padding-bottom: 40px;
background: #fff;
padding-bottom: 40px;
.stepWrap {
height: 72px;
background: #FAFBFC;
padding: 0 115px;
.make-center(flexAlign);
.formBoxStep2 {
width: 704px;
.make-center(margin);
& h3 {
margin-top: 48px;
}
}
}
.formBoxStep1 {
width: 324px;
.make-center-space(margin, 40, 0);
}
.formBefore {
width: 54px;
.font-height-color(undefined, 40, #42526E, #F4F5F7);
.make-center(text);
border: 1px solid #DFE1E6;
border-right: 0;
}
.formBoxStep2 {
width: 704px;
.make-center(margin);
& h3 {
margin-top: 48px;
.continueButton {
.make-center(block);
width: 340px;
height: 40px;
.make-center-space(margin, 8);
}
}
.continueButton {
.make-center(block);
width: 340px;
height: 40px;
.make-center-space(margin, 8);
}
.formBoxStep3 {
width: 704px;
.make-center(margin);
.make-center(text);
& .description {
margin-bottom: 40px;
& p {
.font-height-color(14, 20, #42526e);
.formBoxStep3 {
width: 704px;
.make-center(margin);
.make-center(text);
& .description {
margin-bottom: 40px;
& p {
.font-height-color(14, 20, #42526e);
}
}
&.guid {
.font-height-color(14, 22, #6b778c);
}
& h2 {
font-size: 24px;
color: rgba(23, 43, 77, 1);
margin: 24px 0;
}
& img {
display: block;
.make-center(margin);
}
}
&.guid {
.font-height-color(14, 22, #6b778c);
.agreement {
font-size: 12px;
}
& h2 {
font-size: 24px;
color: rgba(23, 43, 77, 1);
margin: 24px 0;
.checkTypes {
width: 702px;
.make-center(margin);
}
& img {
display: block;
.margin320 {
width: 320px;
.make-center(margin);
display: block;
}
}
.agreement {
font-size: 12px;
}
.checkTypes {
width: 702px;
.make-center(margin);
}
.margin320 {
width: 320px;
.make-center(margin);
display: block;
}
.default {
width: 148px;
margin-right: 24px;
margin-bottom: 16px;
.make-center(text);
height: 32px;
line-height: 32px;
&:nth-child(2n) {
margin-right: 0;
.default {
width: 148px;
margin-right: 24px;
margin-bottom: 16px;
.make-center(text);
height: 32px;
line-height: 32px;
&:nth-child(2n) {
margin-right: 0;
}
}
}
.large {
width: 320px;
margin-bottom: 24px;
.make-center(text);
height: 48px;
line-height: 48px;
}
.btnCenter {
width: 320px;
.make-center(margin);
display: block;
}
// get back password
.getBackBox {
&>h2 {
width: 100%;
.large {
width: 320px;
margin-bottom: 24px;
.make-center(text);
.font-height-color(24, 120, #172B4D);
height: 48px;
line-height: 48px;
}
.getBackForm {
background-color: @white;
.formBox {
width: 320px;
.make-center-space(margin, 40, 40);
.back {
width: 100%;
.make-center(block);
.make-center(text);
color: #6B778C;
.btnCenter {
width: 320px;
.make-center(margin);
display: block;
}
// get back password
.getBackBox {
&>h2 {
width: 100%;
.make-center(text);
.font-height-color(24, 120, #172B4D);
}
.getBackForm {
background-color: @white;
.formBox {
width: 320px;
.make-center-space(margin, 40, 40);
.back {
width: 100%;
.make-center(block);
.make-center(text);
color: #6B778C;
}
}
}
}
}
// policy
.policyBox {
width: 100%;
// height: 100vh;
background-color: #fff;
&>h1 {
.font-height-color(24, 96, #172B4D, #F4F5F7);
.make-center(text)
}
& article {
padding-bottom: 200px;
h4 {
width: 96px;
.font-height-color(16, 48, #172b4d);
font-weight: 500;
margin-top: 24px;
// policy
.policyBox {
width: 100%;
// height: 100vh;
background-color: #fff;
&>h1 {
.font-height-color(24, 96, #172B4D, #F4F5F7);
.make-center(text)
}
p {
font-size: 14px;
color: rgba(66, 82, 110, 1);
line-height: 22px;
& article {
padding-bottom: 200px;
h4 {
width: 96px;
.font-height-color(16, 48, #172b4d);
font-weight: 500;
margin-top: 24px;
}
p {
font-size: 14px;
color: rgba(66, 82, 110, 1);
line-height: 22px;
}
}
}
}
.mr_t-40 {
margin-top: 40px;
}
.mr_t-24 {
margin-top: 24px;
}
\ No newline at end of file
import React, { useState } from 'react';
import globalStyles from '@/global/styles/global.less';
import styles from './index.less'
import './index.less'
import cx from 'classnames';
import { Row, Col, Form, Input, Button, Space } from 'antd';
import TextLink from '@/components/TextLink';
......@@ -29,30 +29,30 @@ const User: React.FC = () => {
}
return (
<Row className={cx(styles.loginWrap, globalStyles.lingxiBusinessContent1024)}>
<Col className={cx(styles.loginItem, styles.loginDesc)}>
<div className={styles.adBox}>
<Row className={cx('loginWrap', globalStyles.lingxiBusinessContent1024)}>
<Col className={cx('loginItem', 'loginDesc')}>
<div className={'adBox'}>
{/*<img src={leftPicture} alt="数商云"/>*/}
<h2>欢迎来到数商云</h2>
<p>数商云是知名云计算及数据服务提供商,在海量文件存储、CDN 内容分发、视频点播、互动直播及大规模异构数据的智能分析与处理等技术深度投入,致力以数据科技驱动数字化未来,赋能各行业全面进入数据时代。</p>
</div>
</Col>
<Col className={cx(styles.loginItem, styles.loginCtl)}>
<div className={styles.loginMain}>
<Col className={cx('loginItem', 'loginCtl')}>
<div className={'loginMain'}>
{/*<a className={styles.guideLogin} />*/}
{/*{ isScanQrCode ? <></> : <h2>欢迎您</h2>}*/}
{ isScanQrCode ? (
<>
<a onClick={()=>handleGuideLogin(false)} className={styles.clickUsernameLogin}>使用账号密码登录</a>
<a onClick={()=>handleGuideLogin(false)} className={'clickUsernameLogin'}>使用账号密码登录</a>
<ScanLoginWrap/>
<div className={styles.scanTips}>
<ScanOutlined className={styles.scanIcon} />
<div className={'scanTips'}>
<ScanOutlined className={'scanIcon'} />
<span>打开 App<br />扫一扫登录</span>
</div>
</>
) : (
<>
<a onClick={()=>handleGuideLogin(true)} className={styles.clickScanLogin} />
<a onClick={()=>handleGuideLogin(true)} className={'clickScanLogin'} />
<h2>欢迎您</h2>
<LoginWrap/>
<Row justify='end' style={{marginTop: 16}}>
......@@ -65,7 +65,7 @@ const User: React.FC = () => {
)
}
</div>
<Row className={styles.thirdLogin} align='middle' justify='center'>
<Row className={'thirdLogin'} align='middle' justify='center'>
<Col>其他方式登录
<a title="微信登陆"><img src={wechat} alt="微信登录"/></a>
<a title="QQ登录"><img src={qq} alt="QQ登录"/></a>
......
......@@ -4,7 +4,6 @@ import {
UploadOutlined,
QuestionCircleOutlined
} from '@ant-design/icons';
import styles from './index.less'
import './index.less'
import globalStyles from '@/global/styles/global.less'
import cx from 'classnames'
......@@ -14,7 +13,7 @@ import { FormStep, FormBlock, Input, Password, Checkbox, setup } from '@formily/
import SchemaForm, { Field, FormMegaLayout, FormButtonGroup, createFormActions, FormEffectHooks } from '@formily/antd';
import useCountDown from '@/utils/hooks';
import { GlobalConfig } from '@/global/config';
import { omit, transFormSchema } from '@/utils';
import { omit, transFormSchema, filterUndef } from '@/utils';
import { PATTERN_MAPS } from '@/constants/regExp';
import { PublicApi } from '@/services/api';
import NiceForm from '@/components/NiceForm';
......@@ -150,16 +149,20 @@ const UserRegistry = () => {
const nextStepAction = () => {
actions.submit().then(data => {
const { values } = data
formCache = Object.assign({}, values, formCache)
formCache = Object.assign({},formCache, filterUndef(values))
const { businessTypeId, typeId } = values
PublicApi.getMemberMenuRegisterDetail({
businessTypeId,
memberTypeId: typeId
}).then(res => {
const { data } = res
// 动态渲染第三步
setAsyncSchema(transFormSchema(data))
setSubStep(true)
const { data, code } = res
if (code === 1000) {
// 动态渲染第三步
setAsyncSchema(transFormSchema(data))
setSubStep(true)
}
}).catch(() => {
})
})
}
......@@ -168,22 +171,28 @@ const UserRegistry = () => {
const submitForm = () => {
actions.submit().then(data => {
const { values } = data
formCache = Object.assign({}, values, formCache)
formCache = Object.assign({}, formCache, filterUndef(values))
// 写死传入的区号
formCache.countryCode = '+86'
const params = omit(formCache, ['isRead', 'confirmPassword'])
PublicApi.postMemberRegister(params).then(() => {
actions.dispatch('onFormStepNext', {})
setCurrent(current + 1)
PublicApi.postMemberRegister(params).then(({code}) => {
if (code === 1000) {
actions.dispatch('onFormStepNext', {})
setCurrent(current + 1)
formCache = {}
}
}).catch(() => {
// 调用接口后 失败需清空缓存的数据
formCache = {}
})
})
}
return (
<div className={cx(styles.register, globalStyles.lingxiBusinessContent1024)}>
<div className={cx('register', globalStyles.lingxiBusinessContent1024)}>
<h3>欢迎您注册数商云账号</h3>
<div className={cx(styles.registerBox, globalStyles.lingxiBusinessMarginContent)}>
<Steps current={current} className={styles.stepWrap} size='small'>
<div className={cx('registerBox', globalStyles.lingxiBusinessMarginContent)}>
<Steps current={current} className={'stepWrap'} size='small'>
{ stepList.map(v => <Steps.Step title={v.title} key={v.key}></Steps.Step>) }
</Steps>
<NiceForm
......@@ -198,44 +207,44 @@ const UserRegistry = () => {
}}
expressionScope={{
current: false,
phoneBefore: <div className={styles.formBefore}>+86</div>,
phoneBefore: <div className={'formBefore'}>+86</div>,
smsCodeAfter: <Button disabled={isActive} style={{minWidth: 110, marginLeft: 8}} size='large' onClick={start}>{text}</Button>,
checkBoxChildren: <span style={{fontSize: 12}}>阅读并同意<span className='commonPickColor'>《会员服务协议》《法律条款》《隐私政策》</span></span>,
memberTypeTitle: <span className={styles.commonPanelTitle}>请选择您的身份</span>,
businessTypeTitle: <span className={styles.commonPanelTitle}>请选择您要开展的业务</span>,
memberTypeTitle: <span className={'commonPanelTitle'}>请选择您的身份</span>,
businessTypeTitle: <span className={'commonPanelTitle'}>请选择您要开展的业务</span>,
}}
/>
<div className={styles.registerForm}>
<div className={cx('registerForm', 'global-block-center')}>
{
current === 0 &&
<Button type='primary' className={styles.continueButton} onClick={handleActionBtn}>同意协议并注册</Button>
<Button type='primary' className={'continueButton'} onClick={handleActionBtn}>同意协议并注册</Button>
}
{
current === 1 && !subStep &&
<Button type='primary' className={styles.continueButton} onClick={nextStepAction}>下一步:继续完善</Button>
<Button type='primary' className={'continueButton'} onClick={nextStepAction}>下一步:继续完善</Button>
}
{
current === 1 && subStep &&
<Button type='primary' className={styles.continueButton} onClick={submitForm}>提交注册资料</Button>
<Button type='primary' className={'continueButton'} onClick={submitForm}>提交注册资料</Button>
}
</div>
{
current === 2 &&
<div className={styles.formBoxStep3}>
<div className={'formBoxStep3'}>
<img src={im_success} alt="待审核"/>
<h2>您的注册资料已经提交成功,请等待平台审核</h2>
<div className={styles.description}>
<div className={'description'}>
<p>审核结果会以短信通知您</p>
<p>您也可以登录平台查看审核结果</p>
</div>
<p className={styles.guid}>
<p className={'guid'}>
<span>{time}s 后自动跳转至登录页</span>
<br />
<span><Link to="/user/login">立即跳转</Link></span>
</p>
</div>
}
<p className={styles.readyLogin}>已有平台账号? <Link to="/user/login">去登陆</Link></p>
<p className={'readyLogin'}>已有平台账号? <Link to="/user/login">去登陆</Link></p>
</div>
</div>
)
......
......@@ -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: {
......
......@@ -331,6 +331,17 @@ export const getFieldType = (field) => {
}
}
// 过滤掉undefined属性
export const filterUndef = (originObj) => {
const r = {}
for (const item in originObj) {
if (originObj[item] !== undefined) {
r[item] = originObj[item]
}
}
return r
}
// 树形结构降为一维对象处理
export const treeReduction = (data: any[]) => {
const hashMaps = {}
......
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