Commit c3fe8eab authored by 郭志伟's avatar 郭志伟

Merge branch 'feature/upgrade' into 'master'

Feature/upgrade

See merge request !32
parents 6de8cb65 d7d9b467
......@@ -50,13 +50,15 @@ const plugins = [
];
export default {
plugins,
block: {
// 国内用户可以使用码云
// defaultGitUrl: 'https://gitee.com/ant-design/pro-blocks',
defaultGitUrl: 'https://github.com/ant-design/pro-blocks',
antd: {},
dva: {
hmr: true,
},
hash: true,
locale: {
default: 'zh-CN', //开启国际化配置,就必须要创建locales/zh-CN.ts 文件
baseNavigator: true,
},
targets: {
ie: 11,
},
......@@ -81,7 +83,7 @@ export default {
{
path: '/',
component: '../layouts/BasicLayout',
authority: ['admin', 'user'],
authority: ['Admin', 'user'],
routes: [
{
path: '/',
......@@ -209,33 +211,33 @@ export default {
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION || '', // preview.pro.ant.design only do not use in your production ; preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
},
ignoreMomentLocale: true,
lessLoaderOptions: {
lessLoader: {
javascriptEnabled: true,
},
disableRedirectHoist: true,
cssLoaderOptions: {
modules: true,
getLocalIdent: (context, _, localName) => {
if (
context.resourcePath.includes('node_modules') ||
context.resourcePath.includes('ant.design.pro.less') ||
context.resourcePath.includes('global.less')
) {
return localName;
}
cssLoader: {
modules: {
getLocalIdent: (context, _, localName) => {
if (
context.resourcePath.includes('node_modules') ||
context.resourcePath.includes('ant.design.pro.less') ||
context.resourcePath.includes('global.less')
) {
return localName;
}
const match = context.resourcePath.match(/src(.*)/);
const match = context.resourcePath.match(/src(.*)/);
if (match && match[1]) {
const antdProPath = match[1].replace('.less', '');
const arr = slash(antdProPath)
.split('/')
.map(a => a.replace(/([A-Z])/g, '-$1'))
.map(a => a.toLowerCase());
return `antd-pro${arr.join('-')}-${localName}`.replace(/--/g, '-');
}
if (match && match[1]) {
const antdProPath = match[1].replace('.less', '');
const arr = slash(antdProPath)
.split('/')
.map(a => a.replace(/([A-Z])/g, '-$1'))
.map(a => a.toLowerCase());
return `antd-pro${arr.join('-')}-${localName}`.replace(/--/g, '-');
}
return localName;
return localName;
},
},
},
chainWebpack: webpackPlugin,
......
......@@ -3,14 +3,14 @@ const isPre = process.env.PRE_ENV === 'pre';
const envAPi = {
api: '//backstms-test9.liangkebang.net',
kdspOpApi: 'https://kdsp-operation-test2.liangkebang.net',
kdspApi: 'https://sc-op-api-test2.liangkebang.net',
goodsApi: 'https://sc-op-api-test2.liangkebang.net',
kdspOpApi: 'https://kdsp-operation-test9.liangkebang.net',
kdspApi: 'https://sc-op-api-test9.liangkebang.net',
goodsApi: 'https://sc-op-api-test9.liangkebang.net',
querysApi: 'https://sc-settlement-api-test9.liangkebang.net',
// goodsApi: '//192.168.188.111:7000',
prologueDomain: 'https://mall-test2.liangkebang.net',
prologueDomain: 'https://mall-test9.liangkebang.net',
qiniuHost: 'https://appsync.lkbang.net',
opapiHost: 'https://opapi-gyl2.liangkebang.net',
opapiHost: 'https://opapi-test9.liangkebang.net',
};
const prodApi = {
......
......@@ -5,7 +5,8 @@
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
"@/*": ["./src/*"],
"@@/*": ["./src/.uim/*"]
}
}
}
This diff is collapsed.
......@@ -49,11 +49,14 @@
],
"dependencies": {
"@ant-design/colors": "^3.1.0",
"@ant-design/pro-layout": "^4.10.0",
"@ant-design/compatible": "^1.1.0",
"@ant-design/icons": "^4.7.0",
"@ant-design/pro-layout": "^4.11.4",
"@ant-design/pro-table": "^1.0.31",
"@antv/data-set": "^0.10.2",
"antd": "^3.26.20",
"antd": "^4.19.3",
"antd-virtual-select": "^1.1.2",
"babel-eslint": "^10.1.0",
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
"dva": "^2.4.1",
......@@ -63,18 +66,14 @@
"omit.js": "^1.0.2",
"path-to-regexp": "^3.1.0",
"qs": "^6.9.0",
"rc-tree-select": "^5.1.4",
"react": "^16.8.6",
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^16.8.6",
"react-helmet": "^5.2.1",
"react-sortablejs": "^6.0.0",
"redux": "^4.0.1",
"slash2": "^2.0.0",
"sortablejs": "^1.13.0",
"umi": "^2.13.0",
"umi-plugin-pro-block": "^1.3.4",
"umi-plugin-react": "^1.10.1",
"umi": "^3.0.0",
"umi-request": "^1.2.7",
"webpack-theme-color-replacer": "^1.2.15"
},
......@@ -90,6 +89,10 @@
"@types/react-dom": "^16.8.4",
"@types/react-helmet": "^5.0.13",
"@umijs/fabric": "^1.2.0",
"@umijs/plugin-blocks": "^2.0.5",
"@umijs/preset-ant-design-pro": "^1.0.1",
"@umijs/preset-react": "^1.3.0",
"@umijs/preset-ui": "^2.0.9",
"chalk": "^2.4.2",
"check-prettier": "^1.0.3",
"cross-env": "^6.0.0",
......@@ -109,10 +112,7 @@
"node-fetch": "^2.6.0",
"prettier": "^1.17.1",
"pro-download": "1.0.1",
"stylelint": "^10.1.0",
"umi-plugin-ga": "^1.1.3",
"umi-plugin-pro": "^1.0.2",
"umi-types": "^0.5.0"
"stylelint": "^10.1.0"
},
"engines": {
"node": ">=10.0.0"
......
import { Icon, Popover, Typography } from 'antd';
import { DownloadOutlined } from '@ant-design/icons';
import { Popover, Typography } from 'antd';
import React, { useRef } from 'react';
import { connect } from 'dva';
import { isAntDesignPro } from '@/utils/utils';
......@@ -63,7 +64,7 @@ export default connect(({ routing }) => ({
getPopupContainer={dom => (divDom.current ? divDom.current : dom)}
>
<div className={styles['copy-block']} ref={divDom}>
<Icon type="download" />
<DownloadOutlined />
</div>
</Popover>
);
......
import { Avatar, Icon, Menu, Spin } from 'antd';
import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
import { Avatar, Menu, Spin } from 'antd';
import React from 'react';
import { connect } from 'dva';
import router from 'umi/router';
import { history } from 'umi';
import HeaderDropdown from '../HeaderDropdown';
import styles from './index.less';
......@@ -21,7 +22,7 @@ class AvatarDropdown extends React.Component {
return;
}
router.push(`/account/${key}`);
history.push(`/account/${key}`);
};
render() {
......@@ -36,20 +37,20 @@ class AvatarDropdown extends React.Component {
<Menu className={styles.menu} selectedKeys={[]} onClick={this.onMenuClick}>
{menu && (
<Menu.Item key="center">
<Icon type="user" />
<UserOutlined />
个人中心
</Menu.Item>
)}
{menu && (
<Menu.Item key="settings">
<Icon type="setting" />
<SettingOutlined />
个人设置
</Menu.Item>
)}
{menu && <Menu.Divider />}
<Menu.Item key="logout">
<Icon type="logout" />
<LogoutOutlined />
退出登录
</Menu.Item>
</Menu>
......@@ -57,7 +58,10 @@ class AvatarDropdown extends React.Component {
return currentUser && currentUser.name ? (
<HeaderDropdown overlay={menuHeaderDropdown}>
<span className={`${styles.action} ${styles.account}`}>
<Avatar icon="user" style={{ backgroundColor: '#388bd8', marginRight: '10px' }} />
<Avatar
icon={<UserOutlined />}
style={{ backgroundColor: '#388bd8', marginRight: '10px' }}
/>
<span className={styles.name}>{currentUser.name}</span>
</span>
</HeaderDropdown>
......
import { Icon, Tooltip } from 'antd';
import { Tooltip } from 'antd';
import React from 'react';
import { connect } from 'dva';
import Avatar from './AvatarDropdown';
......
import { AutoComplete, Icon, Input } from 'antd';
import { SearchOutlined } from '@ant-design/icons';
import { AutoComplete, Input } from 'antd';
import React, { Component } from 'react';
import classNames from 'classnames';
import debounce from 'lodash/debounce';
......@@ -112,7 +113,7 @@ export default class HeaderSearch extends Component {
}
}}
>
<Icon type="search" key="Icon" />
<SearchOutlined key="Icon" />
<AutoComplete
key="AutoComplete"
{...restProps}
......
import { Badge, Icon, Spin, Tabs } from 'antd';
import { BellOutlined } from '@ant-design/icons';
import { Badge, Spin, Tabs } from 'antd';
import React, { Component } from 'react';
import classNames from 'classnames';
import NoticeList from './NoticeList';
......@@ -116,7 +117,7 @@ export default class NoticeIcon extends Component {
const { visible } = this.state;
const noticeButtonClass = classNames(className, styles.noticeButton);
const notificationBox = this.getNotificationBox();
const NoticeBellIcon = bell || <Icon type="bell" className={styles.icon} />;
const NoticeBellIcon = bell || <BellOutlined className={styles.icon} />;
const trigger = (
<span
className={classNames(noticeButtonClass, {
......
......@@ -6,9 +6,10 @@
/* eslint-disable no-underscore-dangle, no-confusing-arrow */
import ProLayout from '@ant-design/pro-layout';
import React, { useState, useEffect } from 'react';
import Link from 'umi/link';
import { Link } from 'umi';
import { connect } from 'dva';
import { Result, Button, Layout, Menu, Icon } from 'antd';
import { Icon as LegacyIcon } from '@ant-design/compatible';
import { Result, Button, Layout, Menu } from 'antd';
import Authorized from '@/utils/Authorized';
import RightContent from '@/components/GlobalHeader/RightContent';
import { getAuthorityFromRouter } from '@/utils/utils';
......@@ -76,7 +77,6 @@ const BasicLayout = props => {
}; // get children authority
const authorized = getAuthorityFromRouter(props.route.routes, location.pathname || '/');
const _menu = param =>
param.map(v =>
v.children && v.children.length ? (
......@@ -84,7 +84,7 @@ const BasicLayout = props => {
key={v.path}
title={
<span>
<Icon type={v.icon} />
<LegacyIcon type={v.icon} />
<span>{v.name}</span>
</span>
}
......@@ -94,7 +94,7 @@ const BasicLayout = props => {
) : (
<Menu.Item key={v.path}>
<Link to={v.path}>
<Icon type={v.icon} />
<LegacyIcon type={v.icon} />
<span className="nav-text">{v.name}</span>
</Link>
</Menu.Item>
......@@ -128,13 +128,18 @@ const BasicLayout = props => {
}
return <Link to={menuItemProps.path}>{defaultDom}</Link>;
}}
breadcrumbRender={(routers = []) => [
{
path: '/',
breadcrumbName: '首页',
},
...routers,
]}
// eslint-disable-next-line consistent-return
breadcrumbRender={(routers = []) => {
if (routers.length) {
return [
{
path: '/',
breadcrumbName: '首页',
},
...routers,
];
}
}}
itemRender={(route, params, routes, paths) => {
const first = routes.indexOf(route) === 0;
return first ? (
......
......@@ -7,23 +7,23 @@ const GlobalModel = {
notices: [],
},
effects: {
*fetchNotices(_, { call, put, select }) {
const data = yield call(queryNotices);
yield put({
type: 'saveNotices',
payload: data,
});
const unreadCount = yield select(
state => state.global.notices.filter(item => !item.read).length,
);
yield put({
type: 'user/changeNotifyCount',
payload: {
totalCount: data.length,
unreadCount,
},
});
},
// *fetchNotices(_, { call, put, select }) {
// const data = yield call(queryNotices);
// yield put({
// type: 'saveNotices',
// payload: data,
// });
// const unreadCount = yield select(
// state => state.global.notices.filter(item => !item.read).length,
// );
// yield put({
// type: 'user/changeNotifyCount',
// payload: {
// totalCount: data.length,
// unreadCount,
// },
// });
// },
*clearNotices({ payload }, { put, select }) {
yield put({
......
import { queryCurrent, query as queryUsers, homeInfo } from '@/services/user';
// queryUsers
import { queryCurrent, homeInfo } from '@/services/user';
import localStorage from '@/utils/localStorage';
const UserModel = {
......@@ -8,13 +9,13 @@ const UserModel = {
homeInfo: {},
},
effects: {
*fetch(_, { call, put }) {
const response = yield call(queryUsers);
yield put({
type: 'save',
payload: response,
});
},
// *fetch(_, { call, put }) {
// const response = yield call(queryUsers);
// yield put({
// type: 'save',
// payload: response,
// });
// },
*fetchCurrent(_, { call, put }) {
const response = yield call(queryCurrent);
......
import { Button, Result } from 'antd';
import React from 'react';
import router from 'umi/router'; // 这里应该使用 antd 的 404 result 组件,
import { history } from 'umi'; // 这里应该使用 antd 的 404 result 组件,
// 但是还没发布,先来个简单的。
const NoFoundPage = () => (
......@@ -9,7 +9,7 @@ const NoFoundPage = () => (
title="404"
subTitle="Sorry, the page you visited does not exist."
extra={
<Button type="primary" onClick={() => router.push('/')}>
<Button type="primary" onClick={() => history.push('/')}>
Back Home
</Button>
}
......
import React from 'react';
import { Card, Typography, Alert, Icon } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
export default () => (
<h2>欢迎使用商户管理后台系统</h2>
);
import React, { useState, useEffect } from 'react';
import { Row, Col } from 'antd';
import { Link } from 'umi';
// import { PageHeaderWrapper } from '@ant-design/pro-layout';
// eslint-disable-next-line import/no-extraneous-dependencies
import { FileTextOutlined } from '@ant-design/icons';
import style from './styles.less';
import { getPendingNum } from './service';
const Admin = () => {
const [pendingNum, setpendingNum] = useState({});
useEffect(() => {
const qurey = async () => {
const { data } = await getPendingNum();
setpendingNum(data);
};
qurey();
}, []);
return (
<div>
<h2>欢迎使用商户管理后台系统</h2>
<div>
<div>
<span className={style.orderleft}></span>
<span className={style.orderRight}>待办事项</span>
</div>
<div style={{ marginTop: '20px' }}>
<Row className={style.orderContent}>
<Col span={2} className="titleOne">
<div>
<FileTextOutlined />
<p>订单</p>
</div>
</Col>
<Col span={2}>
<Link
to={{
pathname: '/orderManage/pendingDeliveryOrder',
}}
>
<strong>{pendingNum?.pendingShipNum || 0}</strong>
<p>待发货</p>
</Link>
</Col>
<Col span={3}>
<Link
to={{
pathname: '/orderManage/pendingDeliveryOrder',
state: { status: 1 },
}}
>
<strong>{pendingNum?.timeOutShipNum || 0}</strong>
<p>超时发货{'>'}48小时</p>
</Link>
</Col>
<Col span={4}>
<Link
to={{
pathname: 'cancelBillManage',
}}
>
<strong>{pendingNum?.cancelOrderPendingAuditNum || 0}</strong>
<p>取消订单审核{'<'}24小时</p>
</Link>
</Col>
<Col span={2} className="titleTwo" offset={4}>
<div>
<FileTextOutlined />
<p> 售后</p>
</div>
</Col>
<Col span={3}>
<Link
to={{
pathname: 'afterSaleManage',
}}
>
<strong>{pendingNum?.afterOrderPendingAuditNum || 0}</strong>
<p>退款待审核</p>
</Link>
</Col>
</Row>
</div>
</div>
</div>
);
};
export default Admin;
import { stringify } from 'querystring';
import _ from 'lodash';
import request from '@/utils/request';
import { saveAs } from 'file-saver';
import { format } from 'date-fns';
import config from '../../../config/env.config';
// 查询待办页订单数量
export async function getPendingNum() {
const data = await request.get('/api/kdsp/admin/merchants/getPendingNum', {
prefix: config.kdspApi,
});
return data;
}
.orderleft {
display: inline-block;
width: 5px;
height: 30px;
margin: 0 10px;
vertical-align: middle;
background-color: #1890ff;
}
.orderRight {
display: inline-block;
color: #000;
font-weight: bold;
font-size: 18px;
}
.orderContent {
:global {
.ant-col {
text-align: center;
background-color: #fff;
border: 1px solid #cecece;
border-left: none;
a {
display: block;
padding: 19px 0;
strong {
color: red;
}
}
a:hover {
background-color: #e6f7ff;
}
}
.titleOne {
padding: 20px 0;
color: #fff;
text-align: center;
background-color: #1890ff;
border: none;
}
.titleTwo {
padding: 20px 0;
color: #fff;
text-align: center;
background-color: #52c41a;
border: none;
}
}
}
......@@ -155,7 +155,7 @@ export default () => {
<ProTable
columns={columns}
request={params => searchList(params, 2)}
rowKey="serviceNo"
rowKey={r => r.serviceNo}
pagination={{
pagesSize: 20,
}}
......
......@@ -102,7 +102,7 @@ export default () => {
<ProTable
columns={columns}
request={params => searchList(params, 1)}
rowKey="serviceNo"
rowKey={r => r.serviceNo}
pagination={{
pagesSize: 20,
}}
......
import React from 'react';
import { Modal, Form, Input, Cascader, notification, InputNumber } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Input, Cascader, notification, InputNumber } from 'antd';
import { shopAudit } from '../services';
const FormItem = Form.Item;
......
import React from 'react';
import { Modal, Form, Input, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Input, notification } from 'antd';
import { shopCheck } from '../services';
const FormItem = Form.Item;
......
import { Button, Form, Input, Select, notification, Upload, Cascader, InputNumber } from 'antd';
import { Form, Button, Input, Select, notification, Upload, Cascader, InputNumber } from 'antd';
import React, { Component } from 'react';
import { connect } from 'dva';
import styles from '../style.less';
......@@ -10,13 +10,15 @@ const { Option } = Select;
goodsManage,
}))
class goodsManage extends Component {
formRef = React.createRef();
componentDidMount() {
this.props.onRef(this);
this.handleSearch();
}
getFieldsValue() {
const { form } = this.props;
const form = this.formRef.current;
return form.getFieldsValue();
}
......@@ -24,8 +26,17 @@ class goodsManage extends Component {
this.props.handleSearch(1);
};
valueMin = value => {
const { getFieldValue, setFieldsValue } = this.formRef.current;
const minVal = getFieldValue('supplyPriceMin');
if (minVal && minVal > value) {
setFieldsValue({ supplyPriceMax: minVal });
}
};
onReset = () => {
this.props.form.resetFields();
const form = this.formRef.current;
form.resetFields();
this.props.onReset();
};
......@@ -38,14 +49,10 @@ class goodsManage extends Component {
};
render() {
const {
form: { getFieldDecorator, getFieldValue },
treeData,
} = this.props;
const { treeData } = this.props;
const selectW = { width: 250 };
const iptNumWidth = { width: 118 };
const that = this;
// const uploadProps = {
// name: 'file',
// async customRequest(info) {
......@@ -74,66 +81,53 @@ class goodsManage extends Component {
const filterOption = (input, op) => op.props.children.includes(input);
return (
<Form name="horizontal_login" layout="inline" className={styles.searchForm}>
<FormItem label="SKU编码">
{getFieldDecorator('skuId', {})(
<Input placeholder="请输入SKU编码" allowClear style={selectW} />,
)}
<Form
ref={this.formRef}
name="horizontal_login"
layout="inline"
className={styles.searchForm}
>
<FormItem label="SKU编码" name="skuId">
<Input placeholder="请输入SKU编码" allowClear style={selectW} />
</FormItem>
<FormItem label="商品名称">
{getFieldDecorator('skuName', {})(
<Input placeholder="请输入商品名称" allowClear style={selectW} />,
)}
<FormItem label="商品名称" name="skuName">
<Input placeholder="请输入商品名称" allowClear style={selectW} />
</FormItem>
<FormItem label="类目">
{getFieldDecorator('productCategoryId', {})(
<Cascader
placeholder="请选择类目"
style={selectW}
showSearch
changeOnSelect
fieldNames={{ label: 'name', value: 'id', children: 'children' }}
options={treeData}
/>,
)}
<FormItem label="类目" name="productCategoryId">
<Cascader
placeholder="请选择类目"
style={selectW}
showSearch
changeOnSelect
fieldNames={{ label: 'name', value: 'id', children: 'children' }}
options={treeData}
/>
</FormItem>
<FormItem label="审核状态">
{getFieldDecorator('state', {})(
<Select
style={selectW}
placeholder="请选择审核状态"
allowClear
filterOption={filterOption}
>
{stateList?.map(item => (
<Option key={item.value} value={item.value}>
{item.label}
</Option>
))}
</Select>,
)}
<FormItem label="审核状态" name="state">
<Select
style={selectW}
placeholder="请选择审核状态"
allowClear
filterOption={filterOption}
>
{stateList?.map(item => (
<Option key={item.value} value={item.value}>
{item.label}
</Option>
))}
</Select>
</FormItem>
<FormItem label="供货价区间">
<FormItem className={styles.iptNumRight}>
{getFieldDecorator('supplyPriceMin', {})(
<InputNumber placeholder="请输入" style={iptNumWidth} />,
)}
<FormItem name="supplyPriceMin" className={styles.iptNumRight} noStyle>
<InputNumber placeholder="请输入" style={iptNumWidth} />
</FormItem>
<span>--</span>
<FormItem className={styles.iptNumRight}>
{getFieldDecorator('supplyPriceMax', {})(
<InputNumber
style={iptNumWidth}
placeholder="请输入"
min={getFieldValue('supplyPriceMin')}
/>,
)}
<FormItem name="supplyPriceMax" className={styles.iptNumRight} noStyle>
<InputNumber style={iptNumWidth} placeholder="请输入" onChange={this.valueMin} />
</FormItem>
</FormItem>
<FormItem label="第三方SKU编码">
{getFieldDecorator('thirdSkuNo', {})(
<Input placeholder="请输入第三方SKU编码" allowClear style={selectW} />,
)}
<FormItem name="thirdSkuNo" label="第三方SKU编码">
<Input placeholder="请输入第三方SKU编码" allowClear style={selectW} />
</FormItem>
<FormItem className={styles.queryBtn}>
<Button onClick={() => this.handleSearch()} type="primary" className={styles.button}>
......@@ -175,4 +169,4 @@ class goodsManage extends Component {
}
}
export default Form.create()(goodsManage);
export default goodsManage;
import { Form, Modal, Input, Select, Cascader, Tag, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Input, Select, Cascader, Tag, notification } from 'antd';
import { da } from 'date-fns/locale';
import React, { useState, useEffect } from 'react';
import { getTemplate } from '../service';
......
import { Modal, InputNumber, notification, Form, Input, Radio } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, InputNumber, notification, Input, Radio } from 'antd';
import React from 'react';
import { updateStock } from '../service';
......
......@@ -8,12 +8,14 @@ const { Option } = Select;
const FormItem = Form.Item;
class goodsManage extends Component {
formRef = React.createRef();
componentDidMount() {
this.props.onRef(this);
}
setFiled = flag => {
const { form } = this.props;
const form = this.formRef.current;
if (flag === 'firstKeys') {
form.setFieldsValue({ firstSpecValue: '' });
return;
......@@ -22,7 +24,8 @@ class goodsManage extends Component {
};
batchSetting = () => {
const { form, editData, isEdit } = this.props;
const { editData, isEdit } = this.props;
const form = this.formRef.current;
const data = form.getFieldsValue();
if (!data.firstSpecValue && !data.secondSpecValue) {
editData.forEach(item => {
......@@ -83,50 +86,41 @@ class goodsManage extends Component {
isEdit,
isService,
} = this.props;
const { getFieldDecorator } = this.props.form;
return (
<Form layout="inline" onSubmit={this.handleSubmit}>
<FormItem>
{getFieldDecorator('firstSpecValue', {})(
<Select allowClear style={{ width: 120 }} placeholder={firstSpesName}>
{firstSpes.length > 0 &&
firstSpes.map(
item =>
item &&
typeof item === 'string' && (
<Option key={item} value={item}>
{item}
</Option>
),
)}
</Select>,
)}
<Form layout="inline" ref={this.formRef}>
<FormItem name="firstSpecValue">
<Select allowClear style={{ width: 120 }} placeholder={firstSpesName}>
{firstSpes.length > 0 &&
firstSpes.map(
item =>
item &&
typeof item === 'string' && (
<Option key={item} value={item}>
{item}
</Option>
),
)}
</Select>
</FormItem>
<FormItem>
{getFieldDecorator('secondSpecValue', {})(
<Select allowClear style={{ width: 120 }} placeholder={secondSpesName}>
{secondSpecs.length &&
secondSpecs.map(
item =>
item &&
typeof item === 'string' && (
<Option key={item} value={item}>
{item}
</Option>
),
)}
</Select>,
)}
<FormItem name="secondSpecValue">
<Select allowClear style={{ width: 120 }} placeholder={secondSpesName}>
{secondSpecs.length &&
secondSpecs.map(
item =>
item &&
typeof item === 'string' && (
<Option key={item} value={item}>
{item}
</Option>
),
)}
</Select>
</FormItem>
<FormItem>
{getFieldDecorator('supplyPrice', {})(
<Input placeholder="供货价" style={{ width: 100 }} />,
)}
<FormItem name="supplyPrice">
<Input placeholder="供货价" style={{ width: 100 }} />
</FormItem>
<FormItem>
{getFieldDecorator('marketPrice', {})(
<Input placeholder="市场价" style={{ width: 100 }} />,
)}
<FormItem name="marketPrice">
<Input placeholder="市场价" style={{ width: 100 }} />
</FormItem>
{/* <FormItem>
{getFieldDecorator('salePrice', {})(
......@@ -134,41 +128,35 @@ class goodsManage extends Component {
)}
</FormItem> */}
{productType === 1 && (
<FormItem>
{getFieldDecorator('weight', {})(
<InputNumber
precision={3}
max={999999.999}
// eslint-disable-next-line radix
placeholder="重量"
style={{ width: 130 }}
/>,
)}
<FormItem name="weight">
<InputNumber
precision={3}
max={999999.999}
// eslint-disable-next-line radix
placeholder="重量"
style={{ width: 130 }}
/>
</FormItem>
)}
<FormItem>
{getFieldDecorator('productStock', {})(
<FormItem name="productStock">
<InputNumber
precision={0}
step={1}
// eslint-disable-next-line radix
formatter={val => parseInt(val, '10') || ''}
placeholder="库存"
style={{ width: 100 }}
/>
</FormItem>
{productType === 1 && (
<FormItem name="productStockWarning">
<InputNumber
placeholder="库存预警"
maxLength={5}
min={0}
precision={0}
step={1}
// eslint-disable-next-line radix
formatter={val => parseInt(val, '10') || ''}
placeholder="库存"
style={{ width: 100 }}
/>,
)}
</FormItem>
{productType === 1 && (
<FormItem>
{getFieldDecorator('productStockWarning', {})(
<InputNumber
placeholder="库存预警"
maxLength={5}
min={0}
precision={0}
style={{ width: 100 }}
/>,
)}
/>
</FormItem>
)}
<FormItem>
......@@ -181,4 +169,4 @@ class goodsManage extends Component {
}
}
export default Form.create()(goodsManage);
export default goodsManage;
This diff is collapsed.
......@@ -162,6 +162,7 @@ export function validateSpuInfo(values, initData, editData, productType) {
const checkKey = Object.keys(newCheckObject);
const checkString = [];
editData.forEach((item, index) => {
item.thirdSkuNo = item.third;
const rowCheckString = checkKey.reduce((checkMessage, val, ind) => {
const checkItem = item[val];
if (checkItem === null || checkItem === undefined || checkItem === '') {
......@@ -279,15 +280,15 @@ export function editColumns(
{
title: '商品自编码',
align: 'center',
key: 'thirdSkuNo',
dataIndex: 'thirdSkuNo',
dataIndex: 'third',
key: 'third',
width: 100,
render: (val, row, index) => (
<Input
value={val}
className={`thirdSkuNo ${index}`}
className={`third ${index}`}
defaultValue={val}
onChange={evt => inputChange(evt.target.value, 'thirdSkuNo', index)}
onChange={evt => inputChange(evt.target.value, 'third', index)}
disabled={isService}
/>
),
......
import { Form, Input, Modal } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Input, Modal } from 'antd';
import React, { Component } from 'react';
const { TextArea } = Input;
......
import { Card, Form, Pagination, Table, notification, Drawer, Spin } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Card, Pagination, Table, notification, Drawer, Spin } from 'antd';
import React, { Component } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { connect } from 'dva';
......
......@@ -151,7 +151,7 @@ export function column() {
align: 'center',
render: (_, row) => (
<div className={styles.actionBtn}>
{(row.state === 4 || (row.state === 5 && row.updateState !== 1)) && (
{(row.state === 4 || (row.state >= 5 && row.updateState !== 1)) && (
<Button
key="edit"
type="primary"
......
......@@ -19,6 +19,9 @@
bottom: 20px;
left: 0;
}
.ptop {
margin-top: 5px;
}
.tabletop {
margin-top: 20px;
......@@ -39,8 +42,8 @@
}
.pullBtn {
position: absolute;
top: -30px;
left: 700px;
top: 30px;
left: 800px;
}
.price {
......@@ -51,7 +54,7 @@
.searchForm {
:global {
.ant-form-item-label {
width: 120px;
line-height: 40px;
}
}
}
......
import React, { Component } from 'react';
import { Modal, Input, Button, Icon, notification, Form } from 'antd';
import { Modal, Input, Button, Icon, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import styles from '../style.less';
import { renderModal, detailsModal, formItemLayout } from './data';
import Upload from './upload';
......
......@@ -59,15 +59,25 @@ const ReconciliationQuery = () => {
setselectedRows(selectedRows);
}
};
const queryData = async params => {
const { current, pageSize } = params;
setpages({ current, pageSize });
setselectedRowKeys([]);
setselectedRows([]);
const data = await query({ ...params });
return data;
};
const confirmAction = async () => {
setloading(true);
if (checkedStatus(selectedRows)) {
const data = await confirmSelfBill(selectedRowKeys);
if (data.code === '0000') {
if (data.businessCode === '0000') {
setselectedRowKeys([]);
setselectedRows([]);
reload();
actionRef.current.reloadAndRest();
// reload();
// queryData({ current: 1, pageSize: 20 })
notification.success({ message: '确认成功' });
}
setloading(false);
......@@ -91,14 +101,6 @@ const ReconciliationQuery = () => {
setloading(false);
}
};
const queryData = async params => {
const { current, pageSize } = params;
setpages({ current, pageSize });
setselectedRowKeys([]);
setselectedRows([]);
const data = await query({ ...params });
return data;
};
const gather = {
onDownload,
......
import React from 'react';
import { Modal, Row, Col, Input, Form, Select, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Row, Col, Input, Select, notification } from 'antd';
import { audit } from '../appeal/services';
const { TextArea } = Input;
......
import React, { useState, useEffect } from 'react';
import { Modal, Form, Select, Input, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Select, Input, notification } from 'antd';
import _ from 'lodash';
import { addrQuery, update } from './services';
......@@ -56,7 +58,7 @@ const AddressForm = props => {
resetForm();
};
const getAddr = async (val, type, edit) => {
const data = await addrQuery({ parentId: val?.key || val });
const data = await addrQuery({ parentId: val?.value || val });
switch (type) {
case 'city':
setCityList(data);
......
......@@ -63,7 +63,9 @@ const TableList = () => {
renderFormItem: () => (
<Select onChange={changeSupplier} value={shopId} allowClear>
{supplierList.map(item => (
<Option value={item.id}>{item.name}</Option>
<Option value={item.id} key={item.id}>
{item.name}
</Option>
))}
</Select>
),
......@@ -167,7 +169,7 @@ const TableList = () => {
columns={columns}
params={{ shopId }}
request={res => query(res)}
rowKey="id"
rowKey={r => r.shopId}
bordered
scroll={{ x: 1500 }}
toolBarRender={() => [
......
......@@ -70,7 +70,6 @@ export default () => {
orderTimeEndAt: params.orderTime?.[1],
auditStatus: 2,
};
return searchList(tempParams, type);
};
const columns = [
......@@ -103,7 +102,7 @@ export default () => {
key="passaudit"
columns={columns}
request={params => query(params, 2)}
rowKey="skuId"
rowKey={r => r.orderId + r.serviceNo}
pagination={{
pagesSize: 20,
}}
......
import React, { useState, useRef } from 'react';
/* eslint-disable no-mixed-operators */
/* eslint-disable radix */
import React, { useState, useRef, useEffect } from 'react';
import { Button, notification } from 'antd';
import ProTable from '@ant-design/pro-table';
import _ from 'lodash';
// import { searchList, auditInfoApi, orderDetail } from './service';
import { searchList, orderDetail } from './service';
import { column } from './data';
import AuditModal from './components/auditModal';
import DetailTable from './components/detailTable';
import { dateDiff } from './common';
import moment from 'moment';
export default () => {
const table = useRef();
const ref = useRef();
const [visible, setVisible] = useState(false);
const [detailVisible, setDetailVisible] = useState(false);
const [detailInfo, setDetailInfo] = useState([]);
const [auditInfo, setAuditInfo] = useState({});
const [timeString, setTimeString] = useState({});
const [time, setTime] = useState({});
const query = async (params, type) => {
if (params.orderId) {
......@@ -71,6 +78,37 @@ export default () => {
setDetailInfo(data || []);
setDetailVisible(true);
};
const renderContent = (record, index, action) => {
if (!time[record.orderId]) {
const applyTime = moment(record.applyTime).valueOf() + 24 * 3600 * 1000;
const nowTime = moment(record.nowTime).valueOf();
let timeNumber = (applyTime - nowTime) / 1000;
time[record.orderId] = setInterval(() => {
if (timeNumber > 0) {
timeNumber -= 1;
const hours = parseInt((timeNumber / 3600) % 24)
.toString()
.padStart(2, '0');
const minutes = parseInt((timeNumber / 60) % 60)
.toString()
.padStart(2, '0');
const seconds = parseInt(timeNumber % 60)
.toString()
.padStart(2, '0');
const str = `${hours}${minutes}${seconds}秒`;
timeString[record.orderId] = str;
const strings = _.cloneDeep(timeString);
setTimeString(strings);
} else {
clearInterval(time[record.orderId]);
timeString[record.orderId] = '0时0分0秒';
const strings = _.cloneDeep(timeString);
setTimeString(strings);
}
}, 1000);
}
};
const closeModal = isReload => {
if (isReload === true) {
// eslint-disable-next-line no-unused-expressions
......@@ -84,7 +122,22 @@ export default () => {
setAuditInfo({ serviceNo });
setVisible(true);
};
const columns = [
{
title: '审核倒计时',
dataIndex: 'examine',
key: 'examine',
hideInSearch: true,
width: 200,
// eslint-disable-next-line no-shadow
render: (_, record, index, action) => [
<span style={{ color: 'red' }}>
{renderContent(record, index, action)}
{timeString[record.orderId]}
</span>,
],
},
...column,
{
title: '操作',
......@@ -92,6 +145,7 @@ export default () => {
dataIndex: 'action',
width: 250,
fixed: 'right',
// eslint-disable-next-line no-shadow
render: (_, r) => [
<Button key="link1" onClick={() => openAudit(r)} className="mr10" type="primary">
审核
......@@ -107,12 +161,13 @@ export default () => {
<ProTable
columns={columns}
request={params => query(params, 1)}
rowKey="serviceNo"
rowKey={r => r.orderId + r.serviceNo}
pagination={{
pagesSize: 20,
}}
bordered
actionRef={table}
formRef={ref}
scroll={{ x: '100%', y: 400 }}
search={{
collapsed: false,
......
import React from 'react';
import { Modal, Form, Input, Cascader, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Input, Cascader, notification } from 'antd';
import { shopAudit } from '../service';
const FormItem = Form.Item;
......
......@@ -23,7 +23,13 @@ export default props => {
];
return (
<Modal title="订单详情" visible={visible} onCancel={handleCancel} footer={null} width={800}>
<Table dataSource={dataSource} columns={columns} key="skuName" pagination={false} bordered />
<Table
dataSource={dataSource}
columns={columns}
key={r => r.orderId}
pagination={false}
bordered
/>
</Modal>
);
};
import React from 'react';
import { Modal, Form, Input, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Input, notification } from 'antd';
import { shopCheck } from '../service';
const FormItem = Form.Item;
......
......@@ -100,6 +100,7 @@ export const column = [
0: '待处理',
1: '同意',
2: '不同意',
3: '超时未处理,系统自动审核同意',
},
},
{
......
......@@ -29,7 +29,7 @@ export async function searchList(params, auditStatus) {
};
}
return {
total: 0,
total: 10,
data: [],
};
}
......
import { Upload, Icon, Modal, notification } from 'antd';
import { DeleteOutlined, EyeOutlined, PlusOutlined } from '@ant-design/icons';
import { Upload, Modal, notification } from 'antd';
import React from 'react';
import { ReactSortable } from 'react-sortablejs';
import lodash from 'lodash';
......@@ -152,20 +153,20 @@ class PicturesWall extends React.Component {
const { previewVisible, previewImage, fileList } = this.state;
const uploadButton = (
<div>
<Icon type="plus" />
<PlusOutlined />
<div className="ant-upload-text">上传图片</div>
</div>
);
const { max, isDisabled } = this.props;
const that = this;
const uploadProps = {
accept: '.jpg,.png,.jpeg',
beforeUpload: lodash.debounce(async (file, files) => {
const optionsArray = await CheckImageInfoList(files);
const onRightImgList = await isUploadNext(optionsArray, that.props.id);
if (!onRightImgList.length) {
return;
}
console.log('校验通过的队列=======>', onRightImgList);
this.setState(
state => ({
newFile: [...state.newFile, ...onRightImgList],
......@@ -196,7 +197,7 @@ class PicturesWall extends React.Component {
listType: 'picture-card',
};
return (
<div className="clearfix">
<div className={styles.clearfix}>
<div className={styles.imgContent}>
{fileList.length > 0 && (
<ReactSortable list={fileList} setList={list => this.sortChange(list)}>
......@@ -213,18 +214,14 @@ class PicturesWall extends React.Component {
</div>
{this.state.activeImgIndex === index && (
<div className={styles.mask}>
<Icon
type="eye"
<EyeOutlined
className={styles.maskIcon}
onClick={() => this.handlePreview(item)}
/>
{!isDisabled && (
<Icon
type="delete"
className={styles.maskIcon}
onClick={() => this.onRemoveImg(item)}
/>
)}
<DeleteOutlined
className={styles.maskIcon}
onClick={() => this.onRemoveImg(item)}
/>
</div>
)}
</div>
......
......@@ -28,3 +28,7 @@
font-size: 16px;
cursor: pointer;
}
.clearfix {
margin-right: 200px;
}
import { Upload, Icon, Modal, message } from 'antd';
import { PlusOutlined } from '@ant-design/icons';
import { Upload, Modal, message } from 'antd';
import React from 'react';
import config from '../../../config/env.config';
import { qiniuToken } from '@/services/qiniu';
......@@ -88,7 +89,7 @@ class PicturesWall extends React.Component {
const { previewVisible, previewImage, fileList } = this.state;
const uploadButton = (
<div>
<Icon type="plus" />
<PlusOutlined />
<div className="ant-upload-text">上传图片</div>
</div>
);
......
import { Form, Modal, Input, Select, Cascader, Tag, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Input, Select, Cascader, Tag, notification } from 'antd';
import React, { useState, useEffect } from 'react';
import RcTreeSelect from 'rc-tree-select';
import { el } from 'date-fns/locale';
import { areaList, getAddTemplate, forbiddenAddress } from '../services';
......@@ -9,13 +10,12 @@ const { Option } = Select;
const AddAreaModal = props => {
const {
visible,
form: { getFieldDecorator, validateFields, resetFields },
form: { getFieldDecorator, validateFields, resetFields, setFieldsValue },
templateData,
} = props;
const [addList, setAddList] = useState([]);
const [selectedList, setSelectedList] = useState([]);
const [selected, setSelect] = useState([]);
const a = [];
const formItemLayout = {
labelCol: {
span: 6,
......@@ -59,14 +59,13 @@ const AddAreaModal = props => {
value: itemData.addrId,
addressId: itemData.addrId,
addressLevel: itemData.addrLevel,
// isLeaf: itemData.addrLevel === 4,
isLeaf: false,
}),
);
targetOption.children = newData;
targetOption.loading = false;
setAddList([...addList]);
}
targetOption.loading = false;
setAddList([...addList]);
};
// 限制区域删除
const preventDefault = val => {
......@@ -119,45 +118,30 @@ const AddAreaModal = props => {
});
};
// 判断是否重复
const getChilds = (data, { addressId }) => {
let flag = true;
const arr = [];
function judgeChildren(dat) {
// eslint-disable-next-line no-plusplus
for (let i = 0; i < dat.length; i++) {
const item = dat[i];
if (!flag) {
return;
}
if (+item.addressId === +addressId) {
flag = false;
}
// if (item.children && item.children.length) {
// judgeChildren(item.children);
// }
}
}
judgeChildren(data);
return flag;
const getChilds = select => {
const reslutData = selectedList.filter(
item =>
!select.addressName.includes(item.addressName) &&
!item.addressName.includes(select.addressName),
);
reslutData.push(select);
return reslutData;
};
const onPopupVisibleChange = labels => {
if (!labels && selected?.length) {
const select = selected.slice(-1)[0];
const arr = selected.map(x => x.label);
select.addressName = arr.join('/');
const staust = getChilds(selectedList, select);
if (staust) {
selectedList.push(select);
// 用中文字符排序
const resultArray = selectedList.sort((param1, param2) =>
param1.addressName.localeCompare(param2.addressName, 'zh'),
);
setSelectedList([...resultArray]);
setSelect([]);
}
const reslutData = getChilds(select);
// 用中文字符排序
const resultArray = reslutData.sort((param1, param2) =>
param1.addressName.localeCompare(param2.addressName, 'zh'),
);
setSelectedList([...resultArray]);
setSelect([]);
}
};
useEffect(() => {
getAreaList();
if (props.templateData) {
......@@ -189,9 +173,8 @@ const AddAreaModal = props => {
loadData={loadData}
onChange={(val, label) => onChange(val, label)}
allowClear={false}
// expandTrigger="hover"
changeOnSelect
onPopupVisibleChange={onPopupVisibleChange}
onDropdownVisibleChange={onPopupVisibleChange}
/>,
)}
{selectedList?.map((selItem, selIndex) => (
......
......@@ -9,8 +9,8 @@ import {
downUploadeOrder,
} from '../pendingDeliveryOrder/service';
const TableList = () => {
const actionRef = useRef();
const TableList = ref => {
const actionRef = useRef(null);
const columns = [
{
title: '批次号',
......@@ -164,6 +164,8 @@ const TableList = () => {
onClick={() => {
// eslint-disable-next-line no-unused-expressions
form?.resetFields();
// eslint-disable-next-line no-unused-expressions
form?.submit();
}}
>
{resetText}
......
import React, { useState, useEffect } from 'react';
import { Modal, Form, Select, Input, Icon, Card, notification } from 'antd';
import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Select, Input, Card, notification } from 'antd';
import style from '../index.less';
import { updateExpress } from '../service';
......@@ -160,8 +163,8 @@ const LogisticsForm = props => {
</Card>
))}
<div className={style.logistics}>
<Icon className={style.logisticsIcon} onClick={addForm} type="plus-circle" />
<Icon className={style.logisticsIcon} onClick={rmForm} type="minus-circle" />
<PlusCircleOutlined className={style.logisticsIcon} onClick={addForm} />
<MinusCircleOutlined className={style.logisticsIcon} onClick={rmForm} />
</div>
</Form>
</Modal>
......
......@@ -34,6 +34,7 @@ const TableList = props => {
);
const [endTime, setEndTime] = useState(moment());
const [orderStatus, setorderStatus] = useState(1);
const [endTimeStr, setEndTimeStr] = useState(moment().format(dateFormat));
// const startDisabledDate = current =>
......@@ -113,6 +114,23 @@ const TableList = props => {
order: 6,
hideInTable: true,
},
{
title: '超时发货',
dataIndex: 'orderStatus',
key: 'orderStatus',
hideInTable: true,
formItemProps: {
// eslint-disable-next-line no-nested-ternary
value: orderStatus ? (orderStatus === 1 ? '' : '') : '',
onChange(status) {
setorderStatus(Number(status));
},
},
valueEnum: {
1: '',
2: '',
},
},
{
title: '交易时间',
dataIndex: 'orderTime',
......@@ -151,7 +169,7 @@ const TableList = props => {
title: '商品自编码',
dataIndex: 'thirdSpuNo',
key: 'thirdSpuNo',
width: 120,
width: 150,
hideInSearch: true,
className: 'colStyle',
render: (_, record) => renderContent(record, 'thirdSpuNo'),
......@@ -294,6 +312,12 @@ const TableList = props => {
setCompanys(data);
};
getCompanys();
if (props.location?.state) {
const { status } = props.location?.state;
setorderStatus(status);
} else {
setorderStatus('');
}
}, []);
const queryToSendFn = params => {
......@@ -302,6 +326,7 @@ const TableList = props => {
logisticsStatus: props.type || 1,
pageNo: params.current,
pageSize: params.pageSize || 20,
timeOutType: orderStatus || '',
};
return queryToSend(transformedParam);
};
......@@ -323,6 +348,9 @@ const TableList = props => {
onClick={() => {
// eslint-disable-next-line no-unused-expressions
form?.resetFields();
setorderStatus('');
// eslint-disable-next-line no-unused-expressions
form?.submit();
}}
>
{resetText}
......
import React from 'react';
import { Modal, Form, Select, Input, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Select, Input, notification } from 'antd';
import { updateStatus } from '../services';
const FormItem = Form.Item;
......
import React, { useState, useEffect } from 'react';
import { Modal, Form, Select, Input, notification } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Modal, Select, Input, notification } from 'antd';
import _ from 'lodash';
import { update } from './services';
import { addrQuery } from '../afterSaleAddress/services';
......
......@@ -2,7 +2,7 @@ import { Button, Select } from 'antd';
import React, { useRef, useEffect, useState } from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import Link from 'umi/link';
import { Link } from 'umi';
import styles from './index.less';
import { query, supplier, downDetail } from './services';
......@@ -63,7 +63,9 @@ const TableList = () => {
renderFormItem: () => (
<Select onChange={changeSupplier} value={shopId} allowClear>
{supplierList.map(item => (
<Option value={item.id}>{item.name}</Option>
<Option value={item.id} key={item.id}>
{item.name}
</Option>
))}
</Select>
),
......@@ -149,7 +151,7 @@ const TableList = () => {
columns={columns}
params={{ shopId }}
request={res => query(res)}
rowKey="id"
rowKey={r => r.batchNo}
bordered
scroll={{ x: 1500 }}
search={{
......
......@@ -150,8 +150,9 @@ export default () => {
},
{
title: '操作',
valueType: 'option',
width: 280,
dataIndex: 'action',
hideInSearch: true,
width: 200,
fixed: 'right',
render: (_, r) => tableRenderBtn(r),
},
......@@ -165,7 +166,7 @@ export default () => {
className={style.table}
request={query}
search={{ collapsed: false }}
rowKey="id"
rowKey={r => r.settlementNo}
pagination={{
defaultCurrent: 1,
}}
......
import React, { useRef, useState, useEffect } from 'react';
import { Modal, Button, Tabs, Upload, notification, Icon } from 'antd';
import { UploadOutlined } from '@ant-design/icons';
import { Modal, Button, Tabs, Upload, notification } from 'antd';
import styles from '../style.less';
import { uploadFile, uploadPic } from '../service';
import UploadC from '../../components/upload';
......@@ -87,7 +88,7 @@ export default props => {
</a>
<Dragger {...uploadProps} className={styles.clearfloat}>
<p>
<Icon type="upload" />
<UploadOutlined />
</p>
<p>点击上传附件</p>
</Dragger>
......
import { Button, Col, Form, Input, Row } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Button, Col, Input, Row } from 'antd';
import React, { Component } from 'react';
import omit from 'omit.js';
import ItemMap from './map';
......
import { Button, Form } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Button } from 'antd';
import React from 'react';
import classNames from 'classnames';
import styles from './index.less';
......
import { Form, Tabs } from 'antd';
import { Form } from '@ant-design/compatible';
import '@ant-design/compatible/assets/index.css';
import { Tabs } from 'antd';
import React, { Component } from 'react';
import classNames from 'classnames';
import LoginContext from './LoginContext';
......
import { Icon } from 'antd';
import { LockOutlined, MailOutlined, MobileOutlined, UserOutlined } from '@ant-design/icons';
import React from 'react';
import styles from './index.less';
......@@ -7,7 +7,7 @@ export default {
props: {
size: 'large',
id: 'userName',
prefix: <Icon type="user" className={styles.prefixIcon} />,
prefix: <UserOutlined className={styles.prefixIcon} />,
placeholder: 'admin',
},
rules: [
......@@ -20,7 +20,7 @@ export default {
Password: {
props: {
size: 'large',
prefix: <Icon type="lock" className={styles.prefixIcon} />,
prefix: <LockOutlined className={styles.prefixIcon} />,
type: 'password',
id: 'password',
placeholder: '888888',
......@@ -35,7 +35,7 @@ export default {
Mobile: {
props: {
size: 'large',
prefix: <Icon type="mobile" className={styles.prefixIcon} />,
prefix: <MobileOutlined className={styles.prefixIcon} />,
placeholder: 'mobile number',
},
rules: [
......@@ -52,7 +52,7 @@ export default {
Captcha: {
props: {
size: 'large',
prefix: <Icon type="mail" className={styles.prefixIcon} />,
prefix: <MailOutlined className={styles.prefixIcon} />,
placeholder: 'captcha',
},
rules: [
......
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