Commit d9900e69 authored by tjy's avatar tjy
parents 00bd838a 089186ea
......@@ -7,6 +7,10 @@ import shopRoute from './shopRoutes'
*/
const router = [
{
path: '/',
component: '@/wrappers/getSiteConfig',
routes: [
{
path: '/user',
component: '@/layouts/UserLayouts',
routes: [
......@@ -28,10 +32,6 @@ const router = [
},
]
},
{
path: '/',
component: '@/wrappers/getSiteConfig',
routes: [
memberCenterRoute,
shopRoute,
{
......
......@@ -3,7 +3,7 @@
* @Author: ghua
* @Date: 2020-07-10 11:36:32
* @Last Modified by: ghua
* @Last Modified time: 2020-07-10 15:37:39
* @Last Modified time: 2020-07-18 11:19:36
*/
const CommodityRoute = {
......@@ -67,12 +67,14 @@ const CommodityRoute = {
{
path: '/memberCenter/commodityAbility/trademark',
name: 'trademark',
key: 'trademark',
icon: 'smile',
component: '@/pages/trademark',
},
{
path: '/memberCenter/commodityAbility/trademark/addBrand',
name: 'addBrand',
key: 'addBrand',
icon: 'smile',
hideInMenu: true,
component: '@/pages/trademark/addBrand',
......@@ -80,6 +82,7 @@ const CommodityRoute = {
{
path: '/memberCenter/commodityAbility/trademark/viewBrand',
name: 'viewBrand',
key: 'viewBrand',
hideInMenu: true,
icon: 'smile',
component: '@/pages/trademark/viewBrand',
......@@ -87,6 +90,7 @@ const CommodityRoute = {
{
path: '/memberCenter/commodityAbility/commodity',
name: 'commodity',
key: 'commodity',
icon: 'smile',
routes: [
{
......@@ -154,12 +158,14 @@ const CommodityRoute = {
{
path: '/memberCenter/commodityAbility/repositories',
name: 'repositories',
key: 'repositories',
icon: 'smile',
component: './repositories',
},
{
path: '/memberCenter/commodityAbility/repositories/addRepository',
name: 'addRepository',
key: 'addRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/addRepository',
......@@ -167,6 +173,7 @@ const CommodityRoute = {
{
path: '/memberCenter/commodityAbility/repositories/adjustRepository',
name: 'adjustRepository',
key: 'adjustRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/adjustRepository',
......@@ -174,6 +181,7 @@ const CommodityRoute = {
{
path: '/memberCenter/commodityAbility/repositories/viewRepository',
name: 'viewRepository',
key: 'viewRepository',
icon: 'smile',
hideInMenu: true,
component: './repositories/viewRepository',
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-18 18:56:08
*/
import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由
......@@ -9,14 +15,14 @@ const memberCenterRoute = {
path: '/memberCenter',
component: '@/layouts/BasicLayout',
routes: [
{
path: '/memberCenter',
redirect: '/memberCenter/home'
},
{
path: '/memberCenter/shopAbility',
redirect: '/memberCenter/shopAbility/infoManage'
},
// {
// path: '/memberCenter',
// redirect: '/memberCenter/home'
// },
// {
// path: '/memberCenter/shopAbility',
// redirect: '/memberCenter/shopAbility/infoManage'
// },
{
// 首页
path: `/memberCenter/home`,
......
......@@ -11,6 +11,11 @@ const LogisticsRoute = {
icon: 'smile',
routes: [
{
/**
* @description: 物流管理模块
* @param {type}
* @return:
*/
path: '/memberCenter/logisticsAbility/logistics',
name: 'logistics',
key: 'logistics',
......@@ -55,6 +60,26 @@ const LogisticsRoute = {
hideInMenu: true
}
]
},
/**
* @description: 物流单管理模块
* @param {type}
* @return:
*/
{
path: '/memberCenter/logisticsAbility/logisticsSubmit',
name: 'logisticsSubmit',
key: 'logisticsSubmit',
routes: [
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/orderSearchList',
name: 'orderSearchList',
component: '@/pages/logistics/logisticsSubmit/orderSearchList',
}
]
}
]
......
......@@ -3,6 +3,7 @@
"scripts": {
"scripts:build": "node scripts/run",
"start:analyze": "ANALYZE=1 umi dev",
"clean": "rimraf node_modules",
"start": "umi dev",
"build": "umi build",
"build:analyze": "ANALYZE=1 umi build",
......@@ -28,7 +29,7 @@
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7",
"god": "^0.1.7",
"god": "0.1.7",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
"mobx-react": "^6.2.2",
......
......@@ -70,10 +70,10 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
const { formatMessage } = useIntl();
const basicInfo = getMenuData(props.route.routes, { locale: true }, formatMessage)
const menuData = basicInfo.menuData
const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : []
const menuRouter = getMenuRouter(menuData, location.pathname)
console.log(menuData)
useEffect(() => {
if (menuRouter && menuRouter.children) {
......@@ -82,7 +82,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
} else {
setOpenKeys(initOpendKeys(menuRouter.children))
}
} else {
setOpenKeys([])
}
......
......@@ -41,7 +41,7 @@ const OuterSider: React.FC<OuterSiderProps> = (props) => {
<li key={item.key} className={defaultSelectedKeys === item.key ? "currentItem" : ''}>
<Link to={item.path}>
<AppstoreOutlined />
<span>{item.title}</span>
<label>{item.title}</label>
</Link>
</li>
))
......
......@@ -19,7 +19,7 @@ const SelectLang: React.FC = () => {
const [currentLangKey, setCurrentLangKey] = useState<string>('zh-CN')
useEffect(() => {
console.log(getLocale(), "getLocale()")
console.log(getLocale(), "locale")
setCurrentLangKey(getLocale())
}, [])
......
......@@ -30,23 +30,33 @@
.menuBox {
padding: 0;
text-align: center;
padding-top: 24px;
li {
height: 60px;
line-height: 60px;
margin: 28px 0;
padding: 11px 0 2px 0;
margin-bottom: 16px;
span {
a {
display: block;
}
label {
display: block;
height: 24px;
line-height: 20px;
margin-top: 4px;
font-size: 12px;
font-weight: 400;
color: rgba(151, 160, 175, 1);
line-height: 24px;
}
& :first-child {
span {
display: block;
// height: 24px;
font-size: 24px;
}
font-weight: 400;
color: rgba(151, 160, 175, 1);
}
}
}
......@@ -56,6 +66,10 @@
span {
color: #fff !important;
}
label {
color: #fff !important;
}
}
.menuItem {
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 18:01:02
* @LastEditTime: 2020-07-18 16:25:18
*/
export default {
......@@ -68,5 +68,8 @@ export default {
'menu.logisticsAbility.logistics.addressForm':'新建发货地址',
'menu.logisticsAbility.logistics.receivingAddress':'收货地址管理',
'menu.logisticsAbility.logistics.template':'运费模板管理',
'menu.logisticsAbility.logistics.templateForm':'新建运费模板'
'menu.logisticsAbility.logistics.templateForm':'新建运费模板',
'menu.logisticsAbility.logisticsSubmit':'物流单提交',
'menu.logisticsAbility.logisticsSubmit.orderSearchList':'物流单查询'
};
\ No newline at end of file
import React, {Component} from 'react';
import React, { Component } from 'react';
import { Link } from 'umi'
class Index extends Component<{}, {}> {
render() {
return <div>
index
<Link to="/memberCenter/home">会员中心</Link>
</div>
}
}
......
import React,{useState,useEffect,useRef, ReactNode} from 'react';
import { Card, Button} from 'antd'
import {PageHeaderWrapper} from '@ant-design/pro-layout'
import {StandardTable} from 'god'
import { ColumnType } from 'antd/lib/table/interface'
interface listProps{
title?:string,
fromPage?:string | number
}
const data = [
{
key:'12',
oredrNo:'WL 52653581',
status: 0
}
]
const statuStyle = {
default:{
padding:'2px 5px',
background:'rgba(244,245,247,1)',
borderRadius:'4px'
},
confirm:{
color:'#3F7ED2',
padding:'2px 5px',
background:'rgba(240, 248, 255, 1)',
borderRadius:'4px'
},
success:{
color:'#00B37A',
padding:'2px 5px',
background:'rgba(235,247,242,1)',
borderRadius:'4px'
},
warn:{
color:'#E63F3B',
padding:'2px 5px',
background:'rgba(255,235,230,1)',
borderRadius:'4px'
}
}
// 定义列的格式
interface Item {
oredrNo: string
}
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
const queryResult = data.find(v => v.key === params.keywords)
setTimeout(() => {
resolve({
code: 200,
message: '',
data: queryResult ? [queryResult] : data
})
}, 1000)
})
}
const orderSearchList: React.FC<listProps> = (props) => {
const ref = useRef({})
const [selectRow,setSelectRow] = useState<Item[]>([])
const [selectedRowKeys,setSelectedRowKeys] = useState<Array<string>>([])
const handleSee = () => {
}
const columns: ColumnType<any>[] = [
{
title:'物流单号',
align:'left',
dataIndex:'oredrNo',
key:'oredrNo'
},
{
title:'对应订单号',
align:'center',
dataIndex:'key13',
key:'key13'
},
{
title:'收货方',
align:'left',
dataIndex:'key12',
key:'key12'
},
{
title:'物流单号',
align:'center',
dataIndex:'key11',
key:'key11'
},
{
title:'总箱数',
align:'center',
dataIndex:'key222',
key:'key222'
},
{
title:'总重量',
align:'center',
dataIndex:'key222',
key:'key222'
},
{
title:'总体积',
align:'center',
dataIndex:'key22',
key:'key22'
},
{
title:'单据时间',
align:'left',
dataIndex:'key2',
key:'key2'
},
{
title:'外部状态',
align:'center',
dataIndex:'status',
key:'status',
render:(_:any,reconds) =>{
let component:ReactNode = null
if(reconds.status == 0){
component = <><span style={statuStyle.success}>接受物流</span></>
}else if(reconds.status == 2){
component = <><span style={statuStyle.warn}>不接受物流单</span></>
}else if(reconds.status == 3) {
component = <><span style={statuStyle.confirm}>待确认</span></>
}else if(reconds.status == 4) {
component = <><span style={statuStyle.default}>请提交</span></>
}
return component
}
},
{
title:'操作',
align:'center',
dataIndex:'option',
render: (_:any,reconds) => {
return (
<Button type="link" onClick={handleSee}>查看</Button>
)
}
}
]
const rowSelection = {
}
return (
<PageHeaderWrapper title='快递单查询'>
<Card>
<StandardTable
columns={columns}
currentRef={ref}
formAlign='left'
rowSelection={rowSelection}
fetchTableData={(params: any) => fetchData(params)}
rowClassName="editable-row"
/>
</Card>
</PageHeaderWrapper>
)
}
orderSearchList.defaultProps = {
}
export default orderSearchList
\ No newline at end of file
/*
* @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 15:13:08
* @LastEditTime: 2020-07-18 15:12:44
*/
import React, { ReactNode, useRef } from 'react'
......@@ -170,13 +170,15 @@ const Company: React.FC<{}> = () => {
columns={columns}
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
formilyChilds={
formilyChilds={{
children: (
<>
<Button type="primary" onClick={() => history.push('/memberCenter/logisticsAbility/logistics/list/addCompany')}>
新建 <PlusOutlined />
</Button>
</>
}
)
}}
/>
</Card>
</PageHeaderWrapper>
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 18:04:19
* @LastEditTime: 2020-07-18 11:47:19
*/
import React, { Component, useState,useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -21,13 +21,6 @@ import { Row, Col, Card, Button, Popconfirm, Select as ISelect } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { MegaLayout, Input, Switch, Select, FormMegaLayout } from '@formily/antd-components'
import ReutrnEle from '@/components/ReturnEle'
import 'antd/dist/antd.css'
let selectList: any = [
{ label: '+86', value: '1' },
{ label: 'Two', value: '2' },
{ label: 'Three', value: '3' },
{ label: 'Four', value: '4' }
];
import ChinaImg from '../../../../../mockStatic/china.png'
import gou from '../../../../../mockStatic/gou.png'
import japenImg from '../../../../../mockStatic/japen.png'
......@@ -76,6 +69,7 @@ const dropdownRender = () => {
// registerFormFields({ prefixSelect: connect()(CustomSelect) })
const diaLogForm: React.FC<ListProps> = (props) => {
const type:string = history.location.query.addType
const [Options,setOptions] = useState([])
const [state, setState] = useState({ editable: true })
const [headerTitle,setHeaderTitle] = useState('')
const [select, setSelect] = useState<countryItem>({
......@@ -99,12 +93,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
const handleChangeSelect = () => {
}
useEffect(() => {
history.location.query.addType == '1'? setHeaderTitle('新建发货地址') : setHeaderTitle('新建收货地址')
return () => {
}
}, [])
const List:any = [ChinaImg,gou,japenImg,korenImg,us]
const selectList: any = [
{ label: <><img src={ChinaImg} key='1' style={{width: _width, height: 17}}/> +86</>, value: '1' },
......@@ -113,11 +102,19 @@ const diaLogForm: React.FC<ListProps> = (props) => {
{ label: <><img src={korenImg} key='4' style={{width: _width, height: 17}}/> +86</>, value: '4' },
{ label: <><img src={us} key='5' style={{width: _width, height: 17}}/> +86</>, value: '5' }
]
// List.map((item:any,key:number) => {
// let li = <><img src={item} key={key} style={{width: _width, height: 17}}/> +86</>
let _Options:any = []
List.forEach((item:any,index:number) => {
let tem = <><img src={item} key={'item' + index} style={{width: _width, height: _height}}/> +86</>
_Options.push({label:tem,value:index+1})
})
// })
useEffect(() => {
history.location.query.addType == '1'? setHeaderTitle('新建发货地址') : setHeaderTitle('新建收货地址')
setOptions(_Options)
return () => {
}
},[])
return (
<PageHeaderWrapper
......@@ -131,7 +128,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
<SchemaForm editable={state.editable}
initialValues={{
provic: '广东省',
phoneHead: '1'
phoneHead: 1
}}
components={{
......@@ -206,7 +203,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
name="phoneHead"
required
x-component="Select"
enum={selectList}
enum={Options}
x-component-props={{
placeholder: '+86'
}}
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-16 19:43:48
* @LastEditTime: 2020-07-18 17:48:11
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......@@ -275,9 +275,7 @@ const AddressList: React.FC<ListProps> = (props) => {
formilyChilds={{
children: (
<>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/logisticsAbility/logistics/list/addressForm?addType=${props.type}`)}>
新建
</Button>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/list/addressForm?addType=${props.type}`)}>新建</Button>
</>
)
}}
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 17:57:40
* @LastEditTime: 2020-07-18 15:58:56
*/
import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -28,8 +28,8 @@ import {
MegaLayout, Input, Switch, Select, FormMegaLayout, FormTab,
Radio, ArrayTable, ArrayCards, Transfer
} from '@formily/antd-components'
import styles from './templateForm.less';
import ReutrnEle from '@/components/ReturnEle'
import 'antd/dist/antd.css'
import ChinaImg from '../../../../../mockStatic/china.png'
import gou from '../../../../../mockStatic/gou.png'
import japenImg from '../../../../../mockStatic/japen.png'
......@@ -51,7 +51,6 @@ export interface ListType {
checked: boolean //可选
}
/**
* @description: 自定义formilyjs 有图标的select组件
* @param {type}
......@@ -112,10 +111,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}
}, [])
// useFormEffects(($,setFieldState ) => {
// })
const List: any = [ChinaImg, gou, japenImg, korenImg, us]
const List: string[] = [ChinaImg, gou, japenImg, korenImg, us]
const selectList: any = [
{ label: <><img src={ChinaImg} key='1' style={{ width: _width, height: 17 }} /> +86</>, value: '1' },
{ label: <><img src={gou} key='2' style={{ width: _width, height: 17 }} /> +86</>, value: '2' },
......@@ -145,17 +141,15 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}
>
<Card>
<Row>
<Row >
<Col span={24}>
<SchemaForm editable={state.editable}
actions={actions}//要传递
initialValues={{
// provic: '广东省',
// phoneHead: '1'
pricingMode: '1',
transportMode: '1',
designateList: [{}]
}}
onSubmit={FormSumbit}
components={{
......@@ -163,10 +157,9 @@ const diaLogForm: React.FC<ListProps> = (props) => {
RadioGroup: Radio.Group, ArrayTable, ArrayCards, Transfer
}}
>
<FormTab name="tabs" defaultActiveKey={'tab-2'}>
<FormTab name="tabs" defaultActiveKey={'tab-1'}>
<FormTab.TabPane name="tab-1" tab="基本信息">
<FormMegaLayout layoutProps={{ wrapperCol: 12 }} labelCol={4} labelAlign="left">
<FormMegaLayout wrapperWidth={570} labelCol={2} labelAlign="left">
<Field
required
title="模板名称"
......@@ -195,45 +188,73 @@ const diaLogForm: React.FC<ListProps> = (props) => {
{ label: '快递', value: '1' }
]}
/>
<FormMegaLayout label='默认运费' grid full required>
<FormMegaLayout>
<FormMegaLayout addonAfter="">
</FormMegaLayout>
<FormMegaLayout label="默认运费" required labelCol={2} wrapperWidth={570} labelAlign="left">
<FormMegaLayout inline>
<Field
name="weight"
required
x-props={{
style: {
width: 160,
marginLeft: 51
}
}}
x-component="Input"
x-component-props={{
placeholder: '',
addonAfter: "KG"
}}
x-mega-props={{
addonBefore: ' ',
addonAfter: '内,'
}}
/>
</FormMegaLayout>
<FormMegaLayout addonBefore="每增加" addonAfter="增加运费">
<Field
name="incrementWeight"
name="price"
required
x-props={{
style: {
width: 160,
marginLeft: 40
}
}}
x-component="Input"
x-component-props={{
placeholder: '',
addonAfter: "KG"
addonAfter: "元"
}}
/>
</FormMegaLayout>
</FormMegaLayout>
<FormMegaLayout >
<FormMegaLayout inline>
<Field
name="price"
name="incrementWeight"
required
x-props={{
style: {
width: 160,
marginLeft: 10
}
}}
x-component="Input"
x-component-props={{
placeholder: '',
addonAfter: "元"
addonAfter: "KG"
}}
x-mega-props={{
addonBefore: '每增加',
addonAfter: '增加运费'
}}
/>
<FormMegaLayout>
<Field
name="incrementPrice"
required
x-props={{
style: {
width: 160
}
}}
x-component="Input"
x-component-props={{
placeholder: '',
......@@ -243,7 +264,8 @@ const diaLogForm: React.FC<ListProps> = (props) => {
/>
</FormMegaLayout>
</FormMegaLayout>
</FormMegaLayout>
<FormMegaLayout wrapperWidth={570} labelCol={2} labelAlign="left">
<Field
title="运费说明"
name="explain"
......@@ -263,24 +285,19 @@ const diaLogForm: React.FC<ListProps> = (props) => {
type="array"
x-component="ArrayTable"
x-component-props={{
// align:'center',
operationsWidth: 200,
operations: {
title: '操作'
},
renderAddition: () => <div style={addStyle}>+添加指定地区</div>,
// renderRemove: () => <div style={{cursor:'pointer'}}>删除</div>,
renderMoveDown: () => null,
renderMoveUp: () => null,
renderRemove: (idx: any) => {
const mutators = actions.createMutators('designateList')
return (
<FormSpy>
<Button type="link" onClick={() => {
<Button type="link" style={{ color: '#00B37A' }} onClick={() => {
mutators.remove(idx)
}}>删除</Button>
</FormSpy>
)
}
......@@ -302,17 +319,18 @@ const diaLogForm: React.FC<ListProps> = (props) => {
showSearch: true,
mode: 'tags',//"multiple",
onSearch: () => { onSearch }
// render: record => record.label
}}
/>
<Field name="weight"
x-component="Input" type="number" title="首件(件/KG)"
x-component-props={{
onChange: (e: any) => {
console.log(e.target.value)
}
// rules:(value:any) => {
// actions.validate()
},
// validate: (value:any) => {
// return new Promise(resolve => {
// setTimeout(() => {
// resolve(value !== '57350' ? '验证码验证失败' : '123')
......@@ -321,11 +339,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
// }
// rules: [{
// required: true,
// message: '请输入内容!',
// }]
}}
/>
<Field name="price" x-component="Input" type="number" title="首费(元)" />
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-16 19:54:11
* @LastEditTime: 2020-07-18 15:13:49
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......@@ -270,13 +270,15 @@ const Template: React.FC<ListProps> = (props) => {
currentRef={ref}
fetchTableData={(params: any) => fetchData(params)}
rowClassName="editable-row"
formilyChilds={
formilyChilds={{
children: (
<>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/list/templateForm?addType=${props.type}`)}>
新建
</Button>
</>
}
)
}}
/>
</Card>
</PageHeaderWrapper>
......
import React, { Component } from 'react'
import OrderList from '../components/orderSearchList'
const orderList = () => {
return (
<OrderList/>
)
}
export default OrderList
\ No newline at end of file
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