Commit 539a8cb2 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-system into dev

parents bd2ab9ff 886063cf
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 10:42:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-18 15:38:02
* @Description: 退货查询相关路由
*/
const returnManageRoute = {
path: '/returnManage',
name: 'returnManage',
icon: 'SmileOutlined',
routes: [
// 换货申请单查询
{
path: '/returnManage/query',
name: 'query',
component: '@/pages/returnManage/query/index',
},
// 换货申请单详情
{
path: '/returnManage/query/detail',
name: 'queryDetail',
component: '@/pages/returnManage/query/detail',
hideInMenu: true,
hidePageHeader: true,
},
// 待退款
{
path: '/returnManage/returnPrReturn',
name: 'returnPrReturn',
component: '@/pages/returnManage/returnPrReturn/index',
},
// 待退款-详情
{
path: '/returnManage/returnPrReturn/detail',
name: 'returnPrReturnDetail',
component: '@/pages/returnManage/returnPrReturn/detail',
hideInMenu: true,
hidePageHeader: true,
},
// 待退款-审核
{
path: '/returnManage/returnPrReturn/verify',
name: 'prReturnVerify',
component: '@/pages/returnManage/returnPrReturn/verify',
hideInMenu: true,
hidePageHeader: true,
},
],
};
/*
* @Author: XieZhiXiong
* @Date: 2020-12-18 10:42:26
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-23 14:50:54
* @Description: 退货查询相关路由
*/
const returnManageRoute = {
path: '/returnManage',
name: 'returnManage',
icon: 'SmileOutlined',
routes: [
// 退货申请单查询
{
path: '/returnManage/query',
name: 'query',
component: '@/pages/returnManage/query/index',
},
// 退货申请单详情
{
path: '/returnManage/query/detail',
name: 'queryDetail',
component: '@/pages/returnManage/query/detail',
hideInMenu: true,
hidePageHeader: true,
},
// 待退款
{
path: '/returnManage/returnPrReturn',
name: 'returnPrReturn',
component: '@/pages/returnManage/returnPrReturn/index',
},
// 待退款-详情
{
path: '/returnManage/returnPrReturn/detail',
name: 'returnPrReturnDetail',
component: '@/pages/returnManage/returnPrReturn/detail',
hideInMenu: true,
hidePageHeader: true,
},
// 待退款-审核
{
path: '/returnManage/returnPrReturn/verify',
name: 'prReturnVerify',
component: '@/pages/returnManage/returnPrReturn/verify',
hideInMenu: true,
hidePageHeader: true,
},
],
};
export default returnManageRoute;
\ No newline at end of file
// 这里的env只有对本地起效, 线上构建不用
const path = require('path')
module.exports = {
scm: {
SITE_ID: '1',
BACK_GATEWAY: 'http://lingxi-scm.wg.shushangyun.com',
USE_ROUTE_CONFIG: false,
SOCKET_URL: 'ws://lingxi-scm.wg.shushangyun.com',
ssh: JSON.stringify({
user: "www",
// Password optional, prompted if none given
password: "!@#project_$%^231(1)wwwuser3",
host: "119.23.219.65",
port: 8122,
localRoot: path.resolve('./dist/'),
remoteRoot: "/usr/local/nginx/html/lingxi/yanshi/api/scm/admin/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
},
10: {
SITE_ID: '1',
BACK_GATEWAY: 'http://10.0.0.10:8100',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://10.0.0.10:8100',
ssh: JSON.stringify({
user: "root",
// Password optional, prompted if none given
password: "123456",
host: "10.0.0.10",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/home/www/lingxi/lingxi-business-system/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
},
25: {
SITE_ID: '1',
BACK_GATEWAY: 'http://10.0.0.25:8100',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://10.0.0.25:8100',
ssh: JSON.stringify({
user: "root",
// Password optional, prompted if none given
password: "123456",
host: "10.0.0.25",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/data/.jenkins/workspace/lingxi-business-system/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
}
}
// 这里的env只有对本地起效, 线上构建不用
const path = require('path')
module.exports = {
scm: {
SITE_ID: '1',
BACK_GATEWAY: 'http://lingxi-scm.wg.shushangyun.com',
USE_ROUTE_CONFIG: false,
SOCKET_URL: 'ws://lingxi-scm.wg.shushangyun.com',
ssh: JSON.stringify({
user: "www",
// Password optional, prompted if none given
password: "!@#project_$%^231(1)wwwuser3",
host: "119.23.219.65",
port: 8122,
localRoot: path.resolve('./dist/'),
remoteRoot: "/usr/local/nginx/html/lingxi/yanshi/api/scm/admin/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
},
10: {
SITE_ID: '1',
BACK_GATEWAY: 'http://10.0.0.10:8100',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://10.0.0.10:8100',
ssh: JSON.stringify({
user: "root",
// Password optional, prompted if none given
password: "123456",
host: "10.0.0.10",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/home/www/lingxi/lingxi-business-system/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
},
25: {
SITE_ID: '1',
BACK_GATEWAY: 'http://10.0.0.25:8100',
USE_ROUTE_CONFIG: true,
SOCKET_URL: 'ws://10.0.0.25:8100',
ssh: JSON.stringify({
user: "root",
// Password optional, prompted if none given
password: "123456",
host: "10.0.0.25",
port: 22,
localRoot: path.resolve('./dist/'),
remoteRoot: "/data/.jenkins/workspace/lingxi-business-system/dist/",
// include: ["*", "**/*"], // this would upload everything except dot files
include: ["*"],
// e.g. exclude sourcemaps, and ALL files in node_modules (including dot files)
// exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"],
// delete ALL existing files at destination before uploading, if true
deleteRemote: true,
// Passive mode is forced (EPSV command is not sent)
forcePasv: true
})
}
}
import React, { useState, useEffect } from 'react';
import { Input, Space, Select, Button, Cascader } from 'antd';
import { useFieldState, FormPath, FormEffectHooks, useFormEffects } from '@formily/antd';
/**
* 筛选项 搜索和远程数据结合的 Cascader
* 属性Data数据暂存至schema的props下的dataOption
*/
const CustomCategorySearch = props => {
const justifyAlign = props.props['x-component-props'].align || 'flex-end'
const option = props.props['x-component-props'].dataoption
const [dataOption, setDataOption] = useState<any>([])
const [value, setValue] = useState<any>([])
useEffect(() => {
setDataOption(option)
}, [option])
useFormEffects(() => {
FormEffectHooks.onFormReset$().subscribe(() => {
setValue([])
})
})
const onChange = (value, selectedOptions) => {
props.mutators.change(value[value.length - 1])
setValue(value)
}
const displayRender = (label) => {
return label[label.length - 1];
}
return (
<Space size={20} style={{ justifyContent: justifyAlign, width: '100%' }}>
<Cascader
options={dataOption}
onChange={onChange}
value={value}
displayRender={displayRender}
{...props.props['x-component-props']}
/>
</Space>
);
};
CustomCategorySearch.defaultProps = {};
CustomCategorySearch.isFieldComponent = true;
export default CustomCategorySearch;
......@@ -13,12 +13,6 @@ import { PublicApi } from '@/services/api';
const { Option } = Select
// export interface SearchProps {
// value: string;
// mutators: any;
// props: any;
// }
const CustomInputSearch = props => {
const { form } = props
const justifyAlign = props.props['x-component-props'].align || 'flex-end'
......
......@@ -15,11 +15,11 @@ const Search = props => {
const [state, setState] = useFieldState({
filterSearch: false,
});
const {
align,
const {
align,
advanced = true, // 是否展示高级筛选
tip, // 搜索框悬浮提示
...rest
...rest
} = props.props['x-component-props'];
const justifyAlign = align || 'flex-end';
......@@ -56,6 +56,7 @@ const Search = props => {
<Button
onClick={() => {
props.form.reset();
sessionStorage.setItem('tableRest', 'true')
props.form.submit();
}}
>
......
......@@ -8,7 +8,8 @@ import CustomStatus from './components/CustomStatus';
import CustomAddArray from './components/CustomAddArray';
import CustomSlider from './components/CustomSlider';
import Search from './components/Search';
import CustomInputSearch from './components/CustomInputSearch'
import CustomInputSearch from './components/CustomInputSearch';
import CustomCategorySearch from './components/CustomCategorySearch';
import Submit from './components/Submit';
import Text from './components/Text';
import CardCheckBox from './components/CardCheckBox';
......@@ -77,6 +78,7 @@ export const componentExport = {
CustomRadio,
Search,
CustomInputSearch,
CustomCategorySearch,
Submit,
Text,
CardCheckBox,
......
/*
* @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-09-10 14:07:35
* @Description: 简单封装了分页事件的 Table
*/
import React from 'react';
import { Table } from 'antd';
import classNames from 'classnames';
import { StandardTableProps } from './interface';
import styles from './index.less';
export default class NormalTable extends React.PureComponent<StandardTableProps> {
state = {
page: 1,
size: 10,
};
handlePaginationChange = (page: number, size: number) => {
const { pagination = {}, onPaginationChange } = this.props;
const { current, pageSize } = pagination;
// 内部自己维护 page、size, 单独控制当前页 或 当前页数
if (!('current' in pagination)) {
this.setState({ page: current });
}
if (!('pageSize' in pagination)) {
this.setState({ size: pageSize });
}
if (onPaginationChange) {
onPaginationChange(page, size);
}
};
render() {
const { page, size } = this.state;
const {
columns,
dataSource,
rowKey = 'id',
pagination = {},
loading,
className,
onPaginationChange,
...restProps
} = this.props;
const newPagination: any = pagination ? {
current: page,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
onChange: this.handlePaginationChange,
onShowSizeChange: this.handlePaginationChange,
size: 'small',
showTotal: () => `共 ${pagination.total || 0} 条`,
...pagination,
} : false;
return (
<div className={classNames(className)}>
<Table
rowKey={rowKey}
columns={columns}
dataSource={dataSource}
loading={loading}
pagination={newPagination}
{...restProps}
/>
</div>
)
}
/*
* @Author: XieZhiXiong
* @Date: 2020-08-20 16:15:59
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-21 13:57:49
* @Description: 简单封装了分页事件的 Table
*/
import React from 'react';
import { Table } from 'antd';
import classNames from 'classnames';
import { StandardTableProps } from './interface';
import styles from './index.less';
export default class NormalTable extends React.PureComponent<StandardTableProps> {
state = {
page: 1,
size: 10,
};
handlePaginationChange = (page: number, size: number) => {
const { pagination = {}, onPaginationChange } = this.props;
const { current, pageSize } = pagination;
// 内部自己维护 page、size, 单独控制当前页 或 当前页数
if (!('current' in pagination)) {
this.setState({ page: current });
}
if (!('pageSize' in pagination)) {
this.setState({ size: pageSize });
}
if (onPaginationChange) {
onPaginationChange(page, size);
}
};
render() {
const { page, size } = this.state;
const {
columns,
dataSource,
rowKey = 'id',
pagination = {},
loading,
className,
onPaginationChange,
...restProps
} = this.props;
const newPagination: any = pagination ? {
current: page,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
onChange: this.handlePaginationChange,
size: 'small',
showTotal: () => `共 ${pagination.total || 0} 条`,
...pagination,
} : false;
return (
<div className={classNames(className)}>
<Table
rowKey={rowKey}
columns={columns}
dataSource={dataSource}
loading={loading}
pagination={newPagination}
{...restProps}
/>
</div>
)
}
}
\ No newline at end of file
......@@ -21,7 +21,12 @@ export const searchBrandOptionEffect = (context: any, fieldName: string) => {
export const searchCustomerCategoryOptionEffect = (context: any, fieldName: string) => {
context.getFieldState(fieldName, state => {
PublicApi.getProductSelectGetSelectCategory({ name: state.props['x-component-props'].searchValue }).then(res => {
// PublicApi.getProductSelectGetSelectCategory({ name: state.props['x-component-props'].searchValue }).then(res => {
// context.setFieldState(fieldName, state => {
// state.props['x-component-props'].dataoption = res.data
// })
// })
PublicApi.getProductPlatformGetCategoryTree().then(res => {
context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data
})
......
......@@ -43,11 +43,16 @@ const Products: React.FC<{}> = () => {
key: 'memberName',
},
{
title: '品类',
title: '会员品类',
dataIndex: ['customerCategory', 'name'],
key: 'customerCategory.name',
},
{
title: '平台品类',
dataIndex: ['customerCategory', 'category', 'name'],
key: 'customerCategory.category.name',
},
{
title: '品牌',
dataIndex: ['brand', 'name'],
key: 'brand.name',
......@@ -164,10 +169,10 @@ const Products: React.FC<{}> = () => {
FormEffectHooks.onFieldChange$('brandId').subscribe(state => {
searchBrandOptionEffect(actions, 'brandId')
})
FormEffectHooks.onFieldChange$('customerCategoryId').subscribe(state => {
searchCustomerCategoryOptionEffect(actions, 'customerCategoryId')
FormEffectHooks.onFieldChange$('categoryId').subscribe(state => {
searchCustomerCategoryOptionEffect(actions, 'categoryId')
})
}}
}}
schema={productWillSchema}
/>
}
......@@ -177,4 +182,4 @@ const Products: React.FC<{}> = () => {
)
}
export default Products
\ No newline at end of file
export default Products
......@@ -42,11 +42,16 @@ const Products: React.FC<{}> = () => {
key: 'memberName',
},
{
title: '品类',
title: '会员品类',
dataIndex: ['customerCategory', 'name'],
key: 'customerCategory.name',
},
{
title: '平台品类',
dataIndex: ['customerCategory', 'category', 'name'],
key: 'customerCategory.category.name',
},
{
title: '品牌',
dataIndex: ['brand', 'name'],
key: 'brand.name',
......@@ -152,10 +157,10 @@ const Products: React.FC<{}> = () => {
FormEffectHooks.onFieldChange$('brandId').subscribe(state => {
searchBrandOptionEffect(actions, 'brandId')
})
FormEffectHooks.onFieldChange$('customerCategoryId').subscribe(state => {
searchCustomerCategoryOptionEffect(actions, 'customerCategoryId')
FormEffectHooks.onFieldChange$('categoryId').subscribe(state => {
searchCustomerCategoryOptionEffect(actions, 'categoryId')
})
}}
}}
schema={productSchema}
/>
}
......@@ -165,4 +170,4 @@ const Products: React.FC<{}> = () => {
)
}
export default Products
\ No newline at end of file
export default Products
......@@ -58,19 +58,16 @@ export const productSchema: ISchema = {
dataoption: [],
},
},
customerCategoryId: {
categoryId: {
type: 'string',
'x-component': 'CustomInputSearch',
'x-component': 'CustomCategorySearch',
'x-component-props': {
placeholder: '商品品类',
placeholder: '平台品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '174px' },
searchValue: null,
dataoption: []
dataoption: [],
fieldNames: { label: 'title', value: 'id', children: 'children' },
},
},
status: {
......@@ -223,19 +220,16 @@ export const productWillSchema: ISchema = {
dataoption: [],
},
},
customerCategoryId: {
categoryId: {
type: 'string',
'x-component': 'CustomInputSearch',
'x-component': 'CustomCategorySearch',
'x-component-props': {
placeholder: '商品品类',
placeholder: '平台品类',
showSearch: true,
showArrow: true,
defaultActiveFirstOption: false,
filterOption: false,
notFoundContent: null,
style: { width: '174px' },
searchValue: null,
dataoption: []
dataoption: [],
fieldNames: { label: 'title', value: 'id', children: 'children' },
},
},
'NO_NAME_FIELD_$2': {
......@@ -294,4 +288,4 @@ export const productWillSchema: ISchema = {
},
},
},
};
\ No newline at end of file
};
......@@ -69,7 +69,7 @@ const List:React.FC<{}> = () => {
dataIndex: 'externalState',
render: (text: any, record: any) => ExternalState(text)
}]
const fecheData = (params:any) => {
return new Promise((resolve, reject) => {
PublicApi.getOrderPlatformInquiryList({...params}).then(res => {
......@@ -118,4 +118,4 @@ const List:React.FC<{}> = () => {
</PageHeaderWrapper>
)
}
export default List
\ No newline at end of file
export default List
......@@ -31,8 +31,8 @@ const SensitiveWords: React.FC<{}> = () => {
dataIndex: 'state',
render: (text: any, record: any) => (
<StatusSwitch
fieldNames="status"
handleConfirm={() => handleChangeStatus(record.id, record.status)}
fieldNames="state"
handleConfirm={() => handleChangeStatus(record.id, record.state)}
record={record}
expectTrueValue={1}
/>
......
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