Commit 4146ae46 authored by GuanHua's avatar GuanHua

merge dev

parents 8ef08ed9 089186ea
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-18 18:56:08
*/
import CommodityRoute from './commodityRoute' // 商品能力路由 import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由 import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由 import ShopRoute from './shopRoute' // 店铺能力路由
...@@ -9,16 +15,14 @@ const memberCenterRoute = { ...@@ -9,16 +15,14 @@ const memberCenterRoute = {
path: '/memberCenter', path: '/memberCenter',
component: '@/layouts/BasicLayout', component: '@/layouts/BasicLayout',
routes: [ routes: [
{ // {
exact: true, // path: '/memberCenter',
path: '/memberCenter', // redirect: '/memberCenter/home'
redirect: '/memberCenter/home' // },
}, // {
{ // path: '/memberCenter/shopAbility',
exact: true, // redirect: '/memberCenter/shopAbility/infoManage'
path: '/memberCenter/shopAbility', // },
redirect: '/memberCenter/shopAbility/infoManage'
},
{ {
// 首页 // 首页
path: `/memberCenter/home`, path: `/memberCenter/home`,
......
...@@ -11,6 +11,11 @@ const LogisticsRoute = { ...@@ -11,6 +11,11 @@ const LogisticsRoute = {
icon: 'smile', icon: 'smile',
routes: [ routes: [
{ {
/**
* @description: 物流管理模块
* @param {type}
* @return:
*/
path: '/memberCenter/logisticsAbility/logistics', path: '/memberCenter/logisticsAbility/logistics',
name: 'logistics', name: 'logistics',
key: 'logistics', key: 'logistics',
...@@ -55,6 +60,26 @@ const LogisticsRoute = { ...@@ -55,6 +60,26 @@ const LogisticsRoute = {
hideInMenu: true 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',
}
] ]
} }
] ]
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"@umijs/preset-react": "1.x", "@umijs/preset-react": "1.x",
"@umijs/test": "^3.2.0", "@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7", "bizcharts": "^4.0.7",
"god": "^0.1.7", "god": "0.1.7",
"lint-staged": "^10.0.7", "lint-staged": "^10.0.7",
"mobx": "^5.15.4", "mobx": "^5.15.4",
"mobx-react": "^6.2.2", "mobx-react": "^6.2.2",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50 * @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 18:01:02 * @LastEditTime: 2020-07-18 16:25:18
*/ */
export default { export default {
...@@ -68,5 +68,8 @@ export default { ...@@ -68,5 +68,8 @@ export default {
'menu.logisticsAbility.logistics.addressForm':'新建发货地址', 'menu.logisticsAbility.logistics.addressForm':'新建发货地址',
'menu.logisticsAbility.logistics.receivingAddress':'收货地址管理', 'menu.logisticsAbility.logistics.receivingAddress':'收货地址管理',
'menu.logisticsAbility.logistics.template':'运费模板管理', '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,{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 * @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 15:13:08 * @LastEditTime: 2020-07-18 15:12:44
*/ */
import React, { ReactNode, useRef } from 'react' import React, { ReactNode, useRef } from 'react'
...@@ -170,13 +170,15 @@ const Company: React.FC<{}> = () => { ...@@ -170,13 +170,15 @@ const Company: React.FC<{}> = () => {
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
formilyChilds={ formilyChilds={{
children: (
<> <>
<Button type="primary" onClick={() => history.push('/memberCenter/logisticsAbility/logistics/list/addCompany')}> <Button type="primary" onClick={() => history.push('/memberCenter/logisticsAbility/logistics/list/addCompany')}>
新建 <PlusOutlined /> 新建 <PlusOutlined />
</Button> </Button>
</> </>
} )
}}
/> />
</Card> </Card>
</PageHeaderWrapper> </PageHeaderWrapper>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55 * @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-17 20:27:43 * @LastEditTime: 2020-07-18 11:47:19
*/ */
import React, { Component, useState,useEffect } from 'react'; import React, { Component, useState,useEffect } from 'react';
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
...@@ -21,13 +21,11 @@ import { Row, Col, Card, Button, Popconfirm, Select as ISelect } from 'antd'; ...@@ -21,13 +21,11 @@ import { Row, Col, Card, Button, Popconfirm, Select as ISelect } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout' import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { MegaLayout, Input, Switch, Select, FormMegaLayout } from '@formily/antd-components' import { MegaLayout, Input, Switch, Select, FormMegaLayout } from '@formily/antd-components'
import ReutrnEle from '@/components/ReturnEle' import ReutrnEle from '@/components/ReturnEle'
import 'antd/dist/antd.css'
import ChinaImg from '../../../../../mockStatic/china.png' import ChinaImg from '../../../../../mockStatic/china.png'
import gou from '../../../../../mockStatic/gou.png' import gou from '../../../../../mockStatic/gou.png'
import japenImg from '../../../../../mockStatic/japen.png' import japenImg from '../../../../../mockStatic/japen.png'
import korenImg from '../../../../../mockStatic/koren.png' import korenImg from '../../../../../mockStatic/koren.png'
import us from '../../../../../mockStatic/us.png' import us from '../../../../../mockStatic/us.png'
import { Effects } from 'bizcharts';
const _width:number = 24 const _width:number = 24
const _height:number = 17 const _height:number = 17
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34 * @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong * @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 React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi' import { history } from 'umi'
...@@ -275,9 +275,7 @@ const AddressList: React.FC<ListProps> = (props) => { ...@@ -275,9 +275,7 @@ const AddressList: React.FC<ListProps> = (props) => {
formilyChilds={{ formilyChilds={{
children: ( children: (
<> <>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/logisticsAbility/logistics/list/addressForm?addType=${props.type}`)}> <Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/list/addressForm?addType=${props.type}`)}>新建</Button>
新建
</Button>
</> </>
) )
}} }}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55 * @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-18 11:21:19 * @LastEditTime: 2020-07-18 15:58:56
*/ */
import React, { Component, useState, useEffect } from 'react'; import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
...@@ -28,8 +28,8 @@ import { ...@@ -28,8 +28,8 @@ import {
MegaLayout, Input, Switch, Select, FormMegaLayout, FormTab, MegaLayout, Input, Switch, Select, FormMegaLayout, FormTab,
Radio, ArrayTable, ArrayCards, Transfer Radio, ArrayTable, ArrayCards, Transfer
} from '@formily/antd-components' } from '@formily/antd-components'
import styles from './templateForm.less';
import ReutrnEle from '@/components/ReturnEle' import ReutrnEle from '@/components/ReturnEle'
import 'antd/dist/antd.css'
import ChinaImg from '../../../../../mockStatic/china.png' import ChinaImg from '../../../../../mockStatic/china.png'
import gou from '../../../../../mockStatic/gou.png' import gou from '../../../../../mockStatic/gou.png'
import japenImg from '../../../../../mockStatic/japen.png' import japenImg from '../../../../../mockStatic/japen.png'
...@@ -51,7 +51,6 @@ export interface ListType { ...@@ -51,7 +51,6 @@ export interface ListType {
checked: boolean //可选 checked: boolean //可选
} }
/** /**
* @description: 自定义formilyjs 有图标的select组件 * @description: 自定义formilyjs 有图标的select组件
* @param {type} * @param {type}
...@@ -112,9 +111,6 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -112,9 +111,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
} }
}, []) }, [])
// useFormEffects(($,setFieldState ) => {
// })
const List: string[] = [ChinaImg, gou, japenImg, korenImg, us] const List: string[] = [ChinaImg, gou, japenImg, korenImg, us]
const selectList: any = [ const selectList: any = [
{ label: <><img src={ChinaImg} key='1' style={{ width: _width, height: 17 }} /> +86</>, value: '1' }, { label: <><img src={ChinaImg} key='1' style={{ width: _width, height: 17 }} /> +86</>, value: '1' },
...@@ -151,11 +147,9 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -151,11 +147,9 @@ const diaLogForm: React.FC<ListProps> = (props) => {
actions={actions}//要传递 actions={actions}//要传递
initialValues={{ initialValues={{
// provic: '广东省', // provic: '广东省',
// phoneHead: '1'
pricingMode: '1', pricingMode: '1',
transportMode: '1', transportMode: '1',
designateList: [{}] designateList: [{}]
}} }}
onSubmit={FormSumbit} onSubmit={FormSumbit}
components={{ components={{
...@@ -200,11 +194,10 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -200,11 +194,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
<Field <Field
name="weight" name="weight"
required required
x-props={{ x-props={{
style:{ style: {
width: 160, width: 160,
marginLeft:51 marginLeft: 51
} }
}} }}
x-component="Input" x-component="Input"
...@@ -222,7 +215,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -222,7 +215,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
name="price" name="price"
required required
x-props={{ x-props={{
style:{ style: {
width: 160, width: 160,
marginLeft: 40 marginLeft: 40
} }
...@@ -239,7 +232,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -239,7 +232,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
name="incrementWeight" name="incrementWeight"
required required
x-props={{ x-props={{
style:{ style: {
width: 160, width: 160,
marginLeft: 10 marginLeft: 10
} }
...@@ -254,12 +247,11 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -254,12 +247,11 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonAfter: '增加运费' addonAfter: '增加运费'
}} }}
/> />
<Field <Field
name="incrementPrice" name="incrementPrice"
required required
x-props={{ x-props={{
style:{ style: {
width: 160 width: 160
} }
}} }}
...@@ -298,18 +290,14 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -298,18 +290,14 @@ const diaLogForm: React.FC<ListProps> = (props) => {
title: '操作' title: '操作'
}, },
renderAddition: () => <div style={addStyle}>+添加指定地区</div>, renderAddition: () => <div style={addStyle}>+添加指定地区</div>,
// renderRemove: () => <div style={{cursor:'pointer'}}>删除</div>,
renderMoveDown: () => null, renderMoveDown: () => null,
renderMoveUp: () => null, renderMoveUp: () => null,
renderRemove: (idx: any) => { renderRemove: (idx: any) => {
const mutators = actions.createMutators('designateList') const mutators = actions.createMutators('designateList')
return ( return (
<FormSpy> <Button type="link" style={{ color: '#00B37A' }} onClick={() => {
<Button type="link" onClick={() => {
mutators.remove(idx) mutators.remove(idx)
}}>删除</Button> }}>删除</Button>
</FormSpy>
) )
} }
...@@ -331,27 +319,18 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -331,27 +319,18 @@ const diaLogForm: React.FC<ListProps> = (props) => {
showSearch: true, showSearch: true,
mode: 'tags',//"multiple", mode: 'tags',//"multiple",
onSearch: () => { onSearch } onSearch: () => { onSearch }
// render: record => record.label
}} }}
/> />
<Field name="weight" <Field name="weight"
x-component="Input" type="number" title="首件(件/KG)" x-component="Input" type="number" title="首件(件/KG)"
// rules={
// {
// whitespace: true,
// min: 5,
// max: 10,
// validator:(value:any) => {
// return value.indexOf('asd') > -1 ? '文本里不能包含asd' : ''
// }
// }
// }
x-component-props={{ x-component-props={{
onChange: (e: any) => { onChange: (e: any) => {
console.log(e.target.value) console.log(e.target.value)
// actions.validate()
}, },
// rules:(value:any) => { // validate: (value:any) => {
// return new Promise(resolve => { // return new Promise(resolve => {
// setTimeout(() => { // setTimeout(() => {
// resolve(value !== '57350' ? '验证码验证失败' : '123') // resolve(value !== '57350' ? '验证码验证失败' : '123')
...@@ -360,11 +339,6 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -360,11 +339,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
// } // }
// rules: [{
// required: true,
// message: '请输入内容!',
// }]
}} }}
/> />
<Field name="price" x-component="Input" type="number" title="首费(元)" /> <Field name="price" x-component="Input" type="number" title="首费(元)" />
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34 * @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong * @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 React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi' import { history } from 'umi'
...@@ -270,13 +270,15 @@ const Template: React.FC<ListProps> = (props) => { ...@@ -270,13 +270,15 @@ const Template: React.FC<ListProps> = (props) => {
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
rowClassName="editable-row" rowClassName="editable-row"
formilyChilds={ formilyChilds={{
children: (
<> <>
<Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/list/templateForm?addType=${props.type}`)}> <Button type="primary" icon={<PlusOutlined />} onClick={() => history.push(`/memberCenter/logisticsAbility/logistics/list/templateForm?addType=${props.type}`)}>
新建 新建
</Button> </Button>
</> </>
} )
}}
/> />
</Card> </Card>
</PageHeaderWrapper> </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