Commit 1233eb07 authored by GuanHua's avatar GuanHua
parents 9162c4ba 95bc7072
/*
* @Author: LeeJiancong
* @Date: 2020-08-19 15:33:27
* @LastEditors: LeeJiancong
* @LastEditors: XieZhiXiong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-20 10:22:11
* @LastEditTime: 2020-09-27 19:18:57
*/
const payandSettleRoute = {
path:'/memberCenter/payandSettle',
......@@ -22,7 +22,25 @@ const payandSettleRoute = {
component:'@/pages/payandSettle/paySetting'
}
]
}
},
// 授信申请
{
path:'/memberCenter/payandSettle/creditApplication',
name:'creditApplication',
routes: [
{
path: '/memberCenter/payandSettle/creditApplication/quotaMenage',
name: 'quotaMenage',
component: '@/pages/payandSettle/quotaMenage/index',
},
{
path: '/memberCenter/payandSettle/creditApplication/quotaMenage/detail',
name: 'quotaMenageDetail',
component: '@/pages/payandSettle/quotaMenage/detail/index',
hideInMenu: true,
},
],
},
]
}
export default payandSettleRoute
\ No newline at end of file
......@@ -182,6 +182,7 @@ class Pie extends Component<PieProps, PieState> {
animate = true,
colors,
lineWidth = 1,
padding = [12, 0, 12, 0],
} = this.props;
const { legendData, legendBlock } = this.state;
......@@ -249,8 +250,6 @@ class Pie extends Component<PieProps, PieState> {
}),
];
const padding = [12, 0, 12, 0] as [number, number, number, number];
const { DataView } = DataSet;
const dv = new DataView();
dv.source(data).transform({
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-27 11:19:28
* @LastEditTime: 2020-09-27 17:42:44
*/
export default {
......@@ -239,6 +239,9 @@ export default {
'menu.payandSettle': '支付',
'menu.payandSettle.paySetting': '支付方式管理',
'menu.payandSettle.paySetting.payParamsSetting': '会员支付参数配置',
'menu.payandSettle.creditApplication': '授信申请',
'menu.payandSettle.creditApplication.quotaMenage': '授信额度管理',
'menu.payandSettle.creditApplication.quotaMenageDetail': '授信额度管理',
// 权限管理
'menu.systemSetting': '系统',
......
......@@ -3,7 +3,8 @@ import { history } from 'umi';
import { Button, Card, Tabs, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
SaveOutlined, EditFilled,
SaveOutlined,
EditFilled,
} from '@ant-design/icons'
import ReutrnEle from '@/components/ReturnEle'
......@@ -20,9 +21,6 @@ import ProductDescFormCloud from './addProductsItem/productDescFormCloud'
import { useLocalStore, observer } from 'mobx-react'
import { store } from '@/store'
import { PublicApi } from '@/services/api'
import { render } from '@/app';
const demoFetch = require('../../../../demo').fetchConfig
const { TabPane } = Tabs
......@@ -78,7 +76,6 @@ const AddProducts: React.FC<{}> = (props) => {
// 获取页面使用模板
const productDescriptionTemplate = async () => {
let globalData = await demoFetch()
//@ts-ignore
PublicApi.getTemplateGoodsFindUseGoodsTemplate({ siteId }).then(res => {
if (res.code === 1000)
......
......@@ -37,19 +37,12 @@ const layoutFormList = {
push: 2
},
}
const tailLayout = {
wrapperCol: {
offset: 2,
span: 12,
},
}
interface Iprops {
onChangeAttributeList: (attributeLists:any)=> void;
onRef: (refs: any) => void;
}
interface AreaParams {
provinceCode: any;
provinceName: any;
......@@ -382,14 +375,6 @@ const BasicInfoForm: React.FC<Iprops> = (props) => {
>
{showCategory && <><span className="commonStatusValid"></span>{renderCategoryType()}</>}
</Form.Item>
{/* <Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
保存
</Button>
<Button className={styles.ml20}>
取消
</Button>
</Form.Item> */}
</Form>
</>)
}
......
import React, { useState, useEffect, useRef } from 'react'
import { history } from 'umi'
import { Form, Select, Radio, Input, Checkbox, InputNumber } from 'antd'
import { Form, Select, Radio, Checkbox, InputNumber } from 'antd'
import { PublicApi } from '@/services/api'
import { GetLogisticsSelectListCompanyResponse, GetLogisticsSelectListShipperAddressResponse, GetLogisticsSelectListFreightTemplateResponse } from '@/services'
import { store } from '@/store'
......
import React, { useState, useEffect, useRef } from 'react'
import React, { useEffect, useRef } from 'react'
import { history } from 'umi'
import { Form, Select, Radio, Input } from 'antd'
import { Form, Radio, Input } from 'antd'
import { store } from '@/store'
import { validatorByte } from '@/utils/regExp'
const { ProductStore } = store
......@@ -18,7 +18,6 @@ export interface Iprops {
onRef: (refs: any) => void;
}
const { Option } = Select
const { TextArea } = Input
const OtherForm: React.FC<Iprops> = (props) => {
......
import React, { useState, useEffect, useRef, useContext, useCallback, useMemo } from 'react'
import React, { useState, useEffect, useRef, useMemo } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox, Tooltip, Radio, Input, Table, Modal, Row, Col, InputNumber, message } from 'antd'
import { Button, Form, Select, Checkbox, Tooltip, Radio, Input, Table, Modal, Row, Col, InputNumber } from 'antd'
import styles from './index.less'
import { PublicApi } from '@/services/api'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
import { EyeOutlined, QuestionCircleOutlined, SettingOutlined, PlusOutlined, MinusOutlined, } from '@ant-design/icons'
import { QuestionCircleOutlined, SettingOutlined, PlusOutlined, MinusOutlined, } from '@ant-design/icons'
import { inject, observer } from 'mobx-react'
import { store } from '@/store'
import { IProductSelectAttribute } from '@/module/productModule'
import moment from 'moment'
import { observable } from 'mobx'
const _ = require("lodash");
......@@ -49,7 +46,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
const [setPriceModal, setSetPriceModal] = useState(false)
const [ladderPrice, setLadderPrice] = useState(false)
const [curretSetPriceRow, setCurrentSetPriceRow] = useState<any>()
// const [stateTableData, setStateTableData] = useState<any[]>()
const [combineAttributeArray, setCombineAttributeArray] = useState<any[]>([])
const [attributeObjArr, setAttributeObjArr] = useState<any[]>([])
const [attributeValObjArr, setAttributeValObjArr] = useState<any[]>([])
......@@ -422,7 +418,6 @@ const PriceAttributeForm: React.FC<Iprops> = (props) => {
setPriceForm.resetFields()
setLadderPrice(false)
setPlanPrice(v.target.value)
// priceTypeRef.current = v.target.value
}
const setPriceOk = () => {
......
import React, { useState, useEffect, useRef, useContext } from 'react'
import React, { useState, useEffect, useRef } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox, Tabs, Input, DatePicker } from 'antd'
import styles from './index.less'
import { Form, Select, Checkbox, Tabs, Input, DatePicker } from 'antd'
import { inject, observer } from 'mobx-react'
import { store } from '@/store'
......@@ -270,14 +269,6 @@ const ProductAttributeForm: React.FC<Iprops> = (props) => {
)
}
</Tabs>
{/* <Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
保存
</Button>
<Button className={styles.ml20}>
取消
</Button>
</Form.Item> */}
</Form>
{attributesData?.length === 0 && <span style={{opacity: 0.6}}>暂无数据!</span>}
</>)
......
import React, { useState, useEffect, useRef } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox, message, Input, Table, Modal, Row, Col, Alert, Upload, Radio } from 'antd'
import { message, Modal, Row, Col, Alert, Upload, Radio } from 'antd'
import { PlusOutlined } from '@ant-design/icons'
import CustomTabs, { ItemPane } from '@/components/CustomTabs'
import styles from './index.less'
import { UploadFile, UploadChangeParam } from 'antd/lib/upload/interface';
import { UploadFile } from 'antd/lib/upload/interface';
import { UPLOAD_TYPE } from '@/constants'
import { inject, observer } from 'mobx-react'
......@@ -36,12 +35,8 @@ const ProductImageForm: React.FC<{}> = (props) => {
// 编辑下 flag为false 不清空;编辑下 flag为true 新建清空
if(history.location.query?.id && !flagRef.current) {
flagRef.current = true
console.log('不清空')
} else {
// constructImageListByRender([])
// setSetImageType(true)
onChangeSetImageType({target: { value: true }})
console.log('清空')
}
}, [selectCategoryId])
......
import React, { useState, useEffect, useContext, useRef } from 'react'
import React, { useState, useEffect, useRef } from 'react'
import {history} from 'umi'
import { Button, Form, Select, Checkbox } from 'antd'
import styles from './index.less'
import { Form, Checkbox } from 'antd'
// import styles from './index.less'
import { PublicApi } from '@/services/api'
import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface'
......@@ -20,11 +20,7 @@ const layout = {
},
}
export interface Iprops {
}
const SelectGoodsForm: React.FC<Iprops> = (props) => {
const SelectGoodsForm: React.FC<{}> = (props) => {
const ref = useRef<any>({})
const [selectGoodsForm] = Form.useForm()
const [isSelectGoods, setIsSelectGoods] = useState<boolean>(true) // 货品table显示隐藏
......
......@@ -101,8 +101,8 @@ const getXComponentProps = (type, item) => {
const getCompnentValue = (elements: any) => {
const components = {};
for (let item of elements) {
for (let item of elements) {
// 先判断是否存在 type,防止不存在的 type 报错
const realType = FIELD_TYPE_MAP[item.fieldType];
if (realType) {
......@@ -155,7 +155,6 @@ export const initDetailSchema = (props: any) => {
'x-component': 'Tab',
'x-component-props': {
type: 'card',
hiddenKeys: ['tab-2'],
},
...tabSchema,
},
......
.repayment {
padding: 56px 24px 33px;
display: flex;
align-items: center;
background: #FAFBFC;
border-radius: 4px;
border: 1px solid #EBECF0;
&-left {
flex: 1;
}
&-right {
flex-shrink: 0;
}
&-end {
margin-top: 32px;
}
&-time {
line-height: 22px;
margin-right: 8px;
font-weight: 400;
color: #6B778C;
}
}
.statistic {
&-title {
margin-bottom: 28px;
line-height: 22px;
font-weight: 400;
color: #6B778C;
}
&-amount {
line-height: 40px;
font-size: 32px;
font-weight: 500;
color: #172B4D;
}
}
.badgeWrap {
&-title {
color: #6B778C;
}
&-content {
line-height: 22px;
font-weight: 500;
color: #172B4D;
}
}
.foot {
padding: 34px 25px 8px;
border-top: 1px solid #F4F5F7;
}
\ No newline at end of file
import React, { useState } from 'react';
import {
Row,
Col,
Statistic,
Badge,
Checkbox,
Select,
Space,
Button,
} from 'antd';
import MellowCard from '@/components/MellowCard';
import { Pie } from '@/components/Charts';
import StatusTag from '@/components/StatusTag';
import styles from './index.less';
const { Option } = Select;
interface IntroduceRowProps {
quotaData: {
x: string,
y: number,
}[],
};
const IntroduceRow: React.FC<IntroduceRowProps> = ({
quotaData = [],
}) => {
const [visibleRecord, setVisibleRecord] = useState(false);
const handleRecordCheckboxChange = e => {
setVisibleRecord(e.target.checked);
};
return (
<Row gutter={23}>
<Col span={10}>
<MellowCard title="授信额度">
<Row gutter={20} align="middle">
<Col span={14}>
<Pie
inner={0.7}
hasLegend={false}
subTitle=""
total={null}
data={quotaData}
height={276}
padding={[34, 0, 34, 0]}
colors={['#41CC9E', '#EF6260']}
/>
</Col>
<Col span={10}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>
<Badge color="#41CC9E" text="剩余可用额度(元):" />
</div>
<div className={styles['statistic-amount']}>100,000</div>
</div>
</Col>
</Row>
<div className={styles.foot}>
<Row>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#EF6260" text={(<span className={styles['badgeWrap-title']}>剩余可用额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>100,000</span>
</div>
</Col>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>总额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>200,000</span>
</div>
</Col>
</Row>
</div>
</MellowCard>
</Col>
<Col span={14}>
<MellowCard
title="账单记录"
extra={(
<div className={styles.recordExtra}>
<Space>
<Checkbox onChange={handleRecordCheckboxChange}>查看交易记录</Checkbox>
<Select value="1" style={{ width: 256 }}>
<Option value="1">2020/06/11 ~ 2020/07/11</Option>
<Option value="2">2020/08/11 ~ 2020/09/11</Option>
</Select>
</Space>
</div>
)}
>
{!visibleRecord ? (
<>
<Row
gutter={100}
align="middle"
style={{
marginBottom: 24,
}}
>
<Col span={14}>
<div className={styles.repayment}>
<div className={styles['repayment-left']}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>剩余应还(元):</div>
<div className={styles['statistic-amount']}>100,000</div>
</div>
<div className={styles['repayment-end']}>
<span className={styles['repayment-time']}>
2020-08-32到期
</span>
<StatusTag type="danger" title="逾期 3 天" />
</div>
</div>
<div className={styles['repayment-right']}>
<Button type="primary">立即还款</Button>
</div>
</div>
</Col>
<Col span={10}>
<div className={styles.statistic}>
<div className={styles['statistic-title']}>本期账单(元):</div>
<div className={styles['statistic-amount']}>100,000</div>
</div>
</Col>
</Row>
<div className={styles.foot}>
<Row>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#EF6260" text={(<span className={styles['badgeWrap-title']}>剩余可用额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>100,000</span>
</div>
</Col>
<Col span={12}>
<div className={styles.badgeWrap}>
<Badge color="#DFE1E6" text={(<span className={styles['badgeWrap-title']}>总额度(元):</span>)} />
<span className={styles['badgeWrap-content']}>200,000</span>
</div>
</Col>
</Row>
</div>
</>
) : (
<div>
2
</div>
)}
</MellowCard>
</Col>
</Row>
);
};
export default IntroduceRow;
\ No newline at end of file
import React, { Suspense } from 'react';
import {
PageHeader,
Descriptions,
Card,
Spin,
Button,
Badge,
message,
} from 'antd';
import { FormOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { history } from 'umi';
import AvatarWrap from '@/components/AvatarWrap';
import StatusTag from '@/components/StatusTag';
import styles from './index.less';
const IntroduceRow = React.lazy(() => import('./components/IntroduceRow'));
const QuotaMenageDetail: React.FC = () => {
const quotaData = [
{
x: '剩余可用额度(元)',
y: 80,
},
{
x: '已用额度(元)',
y: 20,
},
];
return (
<PageHeaderWrapper
title={
<>
<PageHeader
style={{ padding: '0' }}
onBack={() => history.goBack()}
title={
<AvatarWrap
info={{
name: '订单号:DPTY12',
}}
extra="青铜会员"
/>
}
extra={(
<>
</>
)}
>
<Descriptions
size="small"
column={3}
style={{
padding: '0 32px',
}}
>
<Descriptions.Item label="会员类型">企业会员</Descriptions.Item>
<Descriptions.Item label="会员角色" span={2}>供应商</Descriptions.Item>
<Descriptions.Item label="还款状态">
<StatusTag type="warnning" title="逾期 3 天" />
</Descriptions.Item>
<Descriptions.Item label="会员状态" span={2}>
<Badge color="#41CC9E" text="正常" />
</Descriptions.Item>
</Descriptions>
</PageHeader>
</>
}
>
<Suspense fallback={null}>
<IntroduceRow quotaData={quotaData} />
</Suspense>
</PageHeaderWrapper>
);
};
export default QuotaMenageDetail;
\ No newline at end of file
import React, { useState, useRef } from 'react';
import { Card, Badge, Progress, Button } from 'antd';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { createFormActions } from '@formily/antd';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { useAsyncInitSelect } from '@/formSchema/effects/useAsyncInitSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import EyePreview from '@/components/EyePreview';
import NiceForm from '@/components/NiceForm';
import StatusTag from '@/components/StatusTag';
import { listSearchSchema } from './schema';
import styles from './index.less';
const formActions = createFormActions();
const mock = [
{
id: 1,
memberName: '广州白马皮具交易有限公司',
memberType: '企业会员',
memberRole: '采购商',
memberLevel: '青铜会员',
available : '50,000.00',
count: '48,000',
used: '48,000',
repaymentStatus: 1,
status: 1,
},
{
id: 2,
memberName: '广州白马皮具交易有限公司',
memberType: '企业会员',
memberRole: '采购商',
memberLevel: '青铜会员',
available : '50,000.00',
count: '48,000',
used: '48,000',
repaymentStatus: 1,
status: 1,
},
];
const QuotaMenage: React.FC = () => {
const ref = useRef<any>({});
const defaultColumns: ColumnType<any>[] = [
{
title: '会员归属',
dataIndex: 'memberName',
align: 'center',
render: (text, record) => (
<EyePreview
url={`/memberCenter/payandSettle/creditApplication/quotaMenage/detail`}
>
{text}
</EyePreview>
),
},
{
title: '会员类型',
dataIndex: 'memberType',
align: 'center',
},
{
title: '会员角色',
dataIndex: 'memberRole',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '所属会员等级',
dataIndex: 'memberLevel',
align: 'center',
render: (text, record) => <>{text}</>,
},
{
title: '剩余可用额度(元)',
dataIndex: 'available',
align: 'center',
},
{
title: '总额度/已用额度(元)',
dataIndex: 'count',
align: 'center',
render: (text, record) => (
<>
<div>总额度:{text}</div>
<div>已使用:{record.used}</div>
</>
),
},
{
title: '',
dataIndex: 'used',
align: 'center',
render: (text, record) => (
<Progress
type="circle"
percent={40}
strokeColor="#41CC9E"
strokeWidth={12}
width={40}
format={() => ''}
/>
),
},
{
title: '还款状态',
dataIndex: 'repaymentStatus',
align: 'center',
render: (text, record) => (
<StatusTag type="warnning" title="逾期 3 天" />
),
},
{
title: '状态',
dataIndex: 'status',
align: 'center',
filters: [],
onFilter: (value, record) => record.innerStatus === value,
render: (text, record) => <Badge color="#41CC9E" text="正常" />,
},
];
const [columns, setColumns] = useState<any[]>(defaultColumns);
const fetchListData = (params: any) => {
return Promise.resolve({
total: 2,
data: mock,
});
};
// 初始化高级筛选选项
const fetchSelectOptions = async () => {
return {};
};
return (
<PageHeaderWrapper>
<Card>
<StandardTable
tableProps={{
rowKey: 'id',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchListData(params)}
controlRender={
<NiceForm
actions={formActions}
onSubmit={values => ref.current.reload(values)}
effects={($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
);
useAsyncInitSelect(
['innerStatus', 'outerStatus'],
fetchSelectOptions,
);
}}
schema={listSearchSchema}
/>
}
/>
</Card>
</PageHeaderWrapper>
);
};
export default QuotaMenage;
\ No newline at end of file
/*
* @Author: XieZhiXiong
* @Date: 2020-09-27 17:47:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-27 19:29:08
* @Description:
*/
import { ISchema } from '@formily/antd';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { UPLOAD_TYPE } from '@/constants';
export const listSearchSchema: ISchema = {
type: 'object',
properties: {
megaLayout: {
type: 'object',
'x-component': 'mega-layout',
properties: {
name: {
type: 'string',
'x-component': 'Search',
'x-component-props': {
placeholder: '搜索',
align: 'flex-left',
tip: '输入 会员归属 进行搜索',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
full: true,
autoRow: true,
columns: 6,
},
properties: {
repaymentStatus: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '还款状态(全部)',
allowClear: true,
},
},
status: {
type: 'string',
default: undefined,
enum: [],
'x-component-props': {
placeholder: '状态(全部)',
allowClear: true,
},
},
submit: {
'x-component': 'Submit',
'x-mega-props': {
span: 1,
},
'x-component-props': {
children: '查询',
},
},
},
},
},
},
},
};
\ No newline at end of file
......@@ -28,14 +28,15 @@ const AddRule:React.FC<{}> = (props) => {
// 整体表单提交
const formSubmit = async (values) => {
setIsDisabled(true)
values.products = values.products.map(item => ({
productId: item.id,
commodityId: item.commodityId,
name: item.name,
customerCategoryName: item.customerCategoryName,
priceType: item.priceType,
brandName: item.brandName
}))
if(values?.products)
values.products = values.products.map(item => ({
productId: item.id,
commodityId: item.commodityId,
name: item.name,
customerCategoryName: item.customerCategoryName,
priceType: item.priceType,
brandName: item.brandName
}))
values.isElectronicContract = values.isElectronicContract ? 1 : 0
const params = omit(values, ['state']) // 移除不需要的字段
......
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