Commit da6d156e authored by Bill's avatar Bill

合并

parent f546797f
/*
* @Author: your name
* @Date: 2020-10-19 10:42:07
* @Description: 结算能力
*/
/*
* @Author: Bill
* @Date: 2020-10-12 09:45:20
* @LastEditTime: 2020-10-19 17:27:15
* @Description: 加工能力路由
*/
const HandlingRoute = {
path: '/memberCenter/balance',
name: 'balance',
key: 'balance',
icon: 'smile',
routes: [
// 结算规则配置
{
path: '/memberCenter/balance/settleRules',
name: 'settleRules',
key: 'settleRules',
routes: [
// 结算规则配置 -> 对公账号 配置
{
path: '/memberCenter/balance/settleRules/corporateAccount',
name: 'corporateAccount',
icon: 'smile',
component: '@/pages/balance/settleRules/corporateAccount',
},
// 结算规则配置 -> 发票管理
{
path: '/memberCenter/balance/settleRules/receiptList',
name: 'receiptList',
icon: 'smile',
component: '@/pages/balance/settleRules/receipt',
},
// 结算规则配置 -> 新增发票
{
path: '/memberCenter/balance/settleRules/receiptList/add',
name: 'receiptInfoAdd',
icon: 'smile',
component: '@/pages/balance/settleRules/receipt/info',
},
// 结算规则配置 -> 发票详情
{
path: '/memberCenter/balance/settleRules/receiptList/detail',
name: 'receiptInfo',
icon: 'smile',
component: '@/pages/balance/settleRules/receipt/info',
},
// 结算规则配置 -> 会员结算策略
{
path: '/memberCenter/balance/settleRules/memberSettleList',
name: 'memberSettle',
icon: 'smile',
component: '@/pages/balance/settleRules/memberSettle'
},
// 结算规则配置 -> 新建会员支付策略
{
path: '/memberCenter/balance/settleRules/memberSettleList/add',
name: 'memberSettleAdd',
icon: 'smile',
component: '@/pages/balance/settleRules/memberSettle/add'
},
]
},
]
}
export default HandlingRoute
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-12 10:14:50
* @LastEditTime: 2020-10-19 11:12:51
*/
import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由
......@@ -14,7 +14,8 @@ import PayandSettleRoute from './payandSettle' //支付与结算
import AuthConfigRoute from './authConfigRoute'
import AfterService from './afterServiceRoute' // 售后
import HandlingRoute from './handlingRoute'; // 加工能力
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute]
import BalaceRoute from './balanceRoute';
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const memberCenterRoute = {
path: '/memberCenter',
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-10-21 14:13:00
<<<<<<< HEAD
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-26 18:20:31
=======
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-19 17:28:01
>>>>>>> 69aca0d8... 添加结算 结算规则配置
*/
export default {
......@@ -488,4 +493,14 @@ export default {
'menu.afterService.handleRepair.waitExamineLevelOne': '待审核维修申请单(一级)',
'menu.afterService.handleRepair.waitExamineLevelTwo': '待审核维修申请单(二级)',
'menu.afterService.handleRepair.waitConfirmOrder': '待确认维修申请单',
// 结算能力
'menu.balance': '结算',
'menu.balance.settleRules': '结算规则配置',
'menu.balance.settleRules.corporateAccount': '对公账号配置',
'menu.balance.settleRules.receiptList': '发票管理',
'menu.balance.settleRules.memberSettle': '会员结算策略',
'menu.balance.settleRules.receiptInfoAdd': '新增发票信息',
'menu.balance.settleRules.receiptInfo': '发票详情',
'menu.balance.settleRules.memberSettleAdd': '新增会员结算策略',
};
\ No newline at end of file
@margin-bottom: 24px;
@font-size: 14px;
@margin-right: 16px;
.item {
display: flex;
flex-direction: row;
align-items: center;
background-color: #fff;
font-size: @font-size;
padding: @margin-bottom;
margin-bottom: @margin-bottom;
.image {
width: 48px;
height: 48px;
border-radius: 50%;
margin-right: @margin-right;
background-color: red;
}
.itemName {
margin-right: @margin-right;
}
.itemValue {
margin-right: @margin-right;;
}
}
\ No newline at end of file
import React, { useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import styles from './index.less'
import { FormOutlined } from '@ant-design/icons';
import { Input } from 'antd';
const ItemRender = () => {
const [isEdit, setIsEdit] = useState(false)
return (
<div className={styles.item}>
<div className={styles.image}></div>
<div className={styles.itemName}>账户名称</div>
<div className={styles.itemValue}>{isEdit ? <Input /> : "广州市数商云网络科技有限公司"}</div>
<div className={styles.edit} onClick={() => setIsEdit(true)}>
<FormOutlined />
</div>
</div>
)
}
const CorporateAccount = () => {
return (
<PageHeaderWrapper>
{
[1,2,3].map((item, key) => {
return (
<ItemRender key={key} />
)
})
}
</PageHeaderWrapper>
)
}
export default CorporateAccount
\ No newline at end of file
/*
* @Author: Bill
* @Date: 2020-10-19 16:54:15
* @Description: 新建会员策略支付策略
*/
import React, { useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import NiceForm from '@/components/NiceForm';
import { Card, Button, Radio, Input } from 'antd';
import { createFormActions, FormButtonGroup } from '@formily/antd';
import { PlusOutlined } from '@ant-design/icons'
import ModalTable from '@/components/ModalTable';
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import Search from '@/components/NiceForm/components/Search'
import Submit from '@/components/NiceForm/components/Submit'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { addSchema, memberSchema } from './schema';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { QuestionCircleOutlined } from '@ant-design/icons'
const formActions = createFormActions();
const flexRowStyle = {display: 'flex', flexDirection: 'row'};
const SettleMethod = () => {
return (
<div>
<div style={{...flexRowStyle, marginBottom: '20px'}}>
<div>
<Radio>账期(默认)</Radio>
<QuestionCircleOutlined />
</div>
<div style={{...flexRowStyle, marginLeft: '20px'}}>
<div style={{marginRight: '20px'}}>账期天数</div>
<div><Input addonAfter={"天"} /></div>
</div>
</div>
<div style={{...flexRowStyle}}>
<div >
<Radio>月结</Radio><QuestionCircleOutlined />
</div>
<div style={{...flexRowStyle, marginLeft: '20px'}}>
<div style={{marginRight: '20px'}}>每月结算日期:每月</div>
<div><Input addonAfter={"号"} /></div>
</div>
</div>
</div>
)
}
const MemberSettleAdd: React.FC = () => {
const [visible, setVisible] = useState(false)
const tableAddButton = () => {
return (
<div>
<Button
onClick={() => setVisible(true)}
style={{marginBottom: 16}}
block
icon={<PlusOutlined/>}
type='dashed'
>
选择适用会员
</Button>
</div>
)
}
const handleOkAddMember = () => {
}
const handleCancelAddMember = () => {
setVisible(false);
}
// 获取渠道会员
const fetchMemberData = async (params: any) => {
// params.roleId = selectedOption.value
return {}
}
return (
<PageHeaderWrapper>
<Card>
<NiceForm
actions={formActions}
expressionScope={{
tableAddButton: tableAddButton(),
method: <SettleMethod />
}}
components={{Radio}}
// onSubmit={values => ref.current.reload(values)}
schema={addSchema}
/>
<ModalTable
modalTitle='选择适用会员'
confirm={handleOkAddMember}
cancel={handleCancelAddMember}
visible={visible}
columns={[]}
// rowSelection={memberRowSelection}
fetchTableData={params => fetchMemberData(params)}
tableProps={{
rowKey: 'id',
}}
formilyProps={
{
ctx: {
schema: memberSchema,
actions: formActions,
components: { ModalSearch: Search, SearchSelect, Submit } ,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'name',
FORM_FILTER_PATH,
)
// useAsyncSelect(
// 'parentMemberId',
// fetchSelectOptions,
// )
}
}
}
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default MemberSettleAdd
\ 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';
import NiceForm from '@/components/NiceForm';
import { StandardTable } from 'god';
import { PublicApi } from '@/services/api';
import EyePreview from '@/components/EyePreview';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
import { PlusOutlined } from '@ant-design/icons';
const formActions = createFormActions();
const schema = {
type: 'object',
properties: {
layout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
columns: 6
},
properties: {
createBtn: {
type: 'object',
'x-component': 'Children',
'x-component-props': {
children: '{{createBtn}}'
},
"x-mega-props": {
"span": 4
},
},
name: {
type: 'string',
'x-component': 'Search',
"x-mega-props": {
"span": 2
},
'x-component-props': {
placeholder: '搜索',
advanced: false,
},
},
}
}
}
}
const columns = [
{
title: 'ID',
dataIndex: 'id',
},
{
title: '策略名称',
dataIndex: 'name',
},
{
title: '结算方式',
dataIndex: 'methods'
},
{
title: '结算单据',
dataIndex: 'create-at',
},
{
title: '状态',
dataIndex: 'status',
},
]
const MemberSettle: React.FC<{}> = () => {
const ref = useRef<any>({});
const fetchData = async (params: any) => {
console.log(params);
// let res = await PublicApi.getMemberAbilityInfoPage(params);
// return res.data;
return {}
};
return (
<PageHeaderWrapper
title={"生产通知单查询"}
>
<Card>
<StandardTable
tableProps={{
rowKey: 'memberId',
}}
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
controlRender={
<NiceForm
actions={formActions}
expressionScope={{
createBtn: (
<div style={{width: '112px'}}>
<Button type="primary"><PlusOutlined /> 新建</Button>
</div>
)
}}
onSubmit={values => ref.current.reload(values)}
schema={schema}
/>
}
/>
</Card>
</PageHeaderWrapper>
)
}
export default MemberSettle
\ No newline at end of file
import { FORM_FILTER_PATH } from '@/formSchema/const';
export const addSchema = {
type: 'object',
properties: {
'Tabs': {
type: 'object',
'x-component': 'tab',
'x-component-props': {
type: 'card'
},
properties: {
basicTab: {
type: 'object',
'x-component': 'tabpane',
'x-component-props': {
tab: '基本信息'
},
properties: {
layout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 4,
wrapperCol: 9,
labelAlign: 'left'
},
properties: {
name: {
title: '策略名称',
type: 'string',
'x-rules': [
{required: true, message: '请填写策略名称'},
]
},
// methodLayout: {
// type: 'object',
// 'x-component': 'mega-layout',
// 'x-component-props': {
// grid: true,
// columns: 1,
// label: '结算方式',
// autoRow: true
// },
// properties: {
// column1: {
// type: 'object',
// 'x-component': 'mega-layout',
// 'x-component-props': {
// grid: true,
// columns: 3,
// style: {
// marginBottom: 0
// }
// },
// properties: {
// method1: {
// type: 'object',
// 'x-component': 'Radio',
// 'x-component-props': {
// children: '账期(默认)'
// }
// },
// day: {
// 'x-mega-props': {
// span: 2,
// labelCol: 6,
// wrapperCol: 8, // 独立作用域
// addonAfter: '天'
// },
// type: 'string',
// title: '账单天数',
// }
// }
// },
// column2: {
// type: 'object',
// 'x-component': 'mega-layout',
// 'x-component-props': {
// grid: true,
// columns: 4
// },
// properties: {
// method1: {
// type: 'object',
// 'x-component': 'Radio',
// 'x-component-props': {
// children: '月结'
// }
// },
// month: {
// 'x-mega-props': {
// span: 3,
// labelCol: 10,
// wrapperCol: 8, // 独立作用域
// addonAfter: '号'
// },
// type: 'string',
// title: '每月结算日期:每月',
// }
// }
// },
// }
// },
method: {
title: '结算方式',
'x-component': 'Children',
'x-component-props': {
children: '{{method}}'
}
},
doc: {
type: 'string',
enum: [],
title: '结算单据',
'x-rules': [
{required: true, message: '请填写策略名称'},
]
}
},
}
}
},
memberTab: {
type: 'object',
'x-component': 'tabpane',
'x-component-props': {
tab: '适用会员'
},
properties: {
someLists: {
type: 'array:number',
'x-mega-props': {
wrapperCol: 24,
},
'x-component': 'MultTable',
'x-component-props': {
rowKey: 'id',
prefix: "{{tableAddButton}}",
columns: []
// columns: "{{tableColumns}}",
}
}
}
}
}
}
}
}
export const memberSchema = {
type: 'object',
properties: {
name: {
type: 'string',
'x-component': 'ModalSearch',
'x-component-props': {
placeholder: '商品名称',
align: 'flex-left',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
rowStyle: {
flexWrap: 'nowrap',
style: {
marginRight: 0
}
},
colStyle: {
marginTop: 20,
},
},
properties: {
customerCategoryName: {
type: 'string',
// "x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请输入品类',
// className: 'fixed-ant-selected-down',
// fetchSearch: PublicApi.getProductSelectGetSelectCategory,
}
},
brandName: {
type: 'string',
// "x-component": 'SearchSelect',
"x-component-props": {
placeholder: '请输入品牌',
// fetchSearch: PublicApi.getProductSelectGetSelectBrand,
}
},
parentMemberId: {
type: 'string',
enum: [],
'x-component-props': {
placeholder: '上级渠道',
},
},
submit: {
"x-component": 'Submit',
"x-mega-props": {
span: 1
},
"x-component-props": {
children: '查询'
}
}
}
}
}
}
\ No newline at end of file
.item {
background-color: #fff;
padding: 36px 24px;
font-size: 12px;
position: relative;
.row {
margin-bottom: 24px;
}
.controller {
position: absolute;
top: 20px;
right: 24px;
display: flex;
flex-direction: row;
align-items: center;
font-size: 15px;
.edit {
margin-right: 12px;
}
}
}
.margin {
margin-bottom: 24px;
}
.add {
height: 100%;
min-height: 352px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: #FAFBFC;
border-radius: 2px;
border: 1px solid #DCDFE6;
}
\ No newline at end of file
/*
* @Author: Bill
* @Date: 2020-10-19 11:53:43
* @desc 发票管理 发票列表
*/
import React from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Row, Col, Switch } from 'antd';
import { FormOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons'
import styles from './index.less'
interface iProps {
}
const ReceiptItem: React.FC = () => {
return (
<div className={styles.item}>
<div className={styles.controller}>
<div className={styles.edit}><FormOutlined /></div>
<div><DeleteOutlined /></div>
</div>
<Row className={styles.row}>
<Col span={6}>发票品类</Col>
<Col span={18}>增值税</Col>
</Row>
<Row className={styles.row}>
<Col span={6}>发票抬头</Col>
<Col span={18}>广州市数商云网络科技有限公司</Col>
</Row>
<Row className={styles.row}>
<Col span={6}>纳税号</Col>
<Col span={18}>914401050651605264E</Col>
</Row>
<Row className={styles.row}>
<Col span={6}>账号</Col>
<Col span={18}>6214 71612 3456 71691 1234</Col>
</Row>
<Row className={styles.row}>
<Col span={6}>开户行</Col>
<Col span={18}>中国建设银行广州市分行营业部</Col>
</Row>
<Row className={styles.row}>
<Col span={6}>地址</Col>
<Col span={18}>广州市海珠区新港东路234号中州中心</Col>
</Row>
<Row className={styles.row}>
<Col span={6}>电话</Col>
<Col span={18}>136 7627 2729</Col>
</Row>
<Row>
<Col span={6}>是否默认</Col>
<Col span={18}><Switch /></Col>
</Row>
</div>
)
}
const Receipt: React.FC<iProps> = () => {
return (
<PageHeaderWrapper>
<Row gutter={24}>
{
[1,].map((item) => {
return (
<Col span={8} key={item} className={styles.margin}>
<ReceiptItem/>
</Col>
)
})
}
<Col span={8} className={styles.margin}>
<div className={styles.add}>
<div>
<PlusOutlined />
</div>
<div>新建发票</div>
</div>
</Col>
</Row>
</PageHeaderWrapper>
)
}
export default Receipt
\ No newline at end of file
/*
* @Author: Bill
* @Date: 2020-10-19 15:51:44
* @Description: 结算规则配置 -> 发票管理 -> 新增发票 / 修改发票
*/
import React from 'react';
import NiceForm from '@/components/NiceForm';
import { createFormActions, FormButtonGroup, Submit, Reset } from '@formily/antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Switch, Button } from 'antd';
const formActions = createFormActions();
const schema = {
type: 'object',
properties: {
layout: {
type: 'object',
'x-component': 'mega-layout',
'x-component-props': {
labelCol: 4,
wrapperCol: 8,
labelAlign: 'left',
},
properties: {
consignor: {
type: 'radio',
title: '发货人',
enum: [
{label: '企业(默认)', value: 1},
{label: '个人', value: 2},
]
},
type: {
type: 'radio',
title: '发货种类',
enum: [
{label: '增值税普通发票(默认)', value: 1},
{label: '增值税专用发票', value: 2}
]
},
invoiceTitle: {
type: 'string',
title: '发票抬头',
'x-rule': [
{required: true, message: '请填写发票抬头'}
]
},
taxNumber: {
type: 'string',
title: '纳税号',
'x-rule': [
{required: true, message: '请填写发票抬头'}
]
},
depositBank: {
type: 'string',
title: '开户行',
},
account: {
type: 'string',
title: '账号'
},
address: {
type: 'text',
title: '地址',
'x-component': 'textarea'
},
phoneLayout: {
type: 'object',
'x-mega-props': {
wrapperCol: 24
},
'x-component': 'mega-layout',
'x-component-props': {
grid: true,
columns: 3,
label: '电话',
wrapperCol: 24
},
properties: {
areaCode: {
type: 'string',
enum: [],
'x-component-props': {
}
},
phone: {
type: 'string',
'x-mega-props': {
span: 2
}
}
}
},
isDefault: {
type: 'object',
title: '是否默认',
'x-component': 'Switch'
},
}
}
}
}
const Info: React.FC = () => {
return (
<PageHeaderWrapper>
<Card>
<NiceForm
components={{Switch}}
actions={formActions}
expressionScope={{}}
// onSubmit={values => ref.current.reload(values)}
schema={schema}
>
<FormButtonGroup offset={4}>
<Submit >提交</Submit>
<Button >取消</Button>
</FormButtonGroup>
</NiceForm>
</Card>
</PageHeaderWrapper>
)
}
export default Info
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