Commit f87949ab authored by LeeJiancong's avatar LeeJiancong

对接待提交

parent cb29bec1
This diff is collapsed.
/*
* @Author: LeeJiancong
* @Date: 2020-07-22 09:54:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 19:28:23
*/
/** /**
* 正则表达式集合 * 正则表达式集合
*/ */
...@@ -8,5 +14,6 @@ export const PATTERN_MAPS = { ...@@ -8,5 +14,6 @@ export const PATTERN_MAPS = {
email: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/, email: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/,
phone: /^1[3|4|5|6|7|8|9][0-9]{9}$/, phone: /^1[3|4|5|6|7|8|9][0-9]{9}$/,
smsCode: /^\d{6}$/, smsCode: /^\d{6}$/,
money:/^\d*(?:\.\d{0,2})?$/ money:/^\d*(?:\.\d{0,2})?$/,
weight:/^\d*(?:\.\d{0,3})?$/,
} }
\ No newline at end of file
/*
* @Author: LeeJiancong
* @Date: 2020-07-30 17:23:48
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 17:24:49
*/
export default {
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'
}
}
\ No newline at end of file
...@@ -74,7 +74,7 @@ const comfirmDialog: React.FC<Params> = (props) => { ...@@ -74,7 +74,7 @@ const comfirmDialog: React.FC<Params> = (props) => {
x-component="Radio" x-component="Radio"
/> />
{props.dontReceive && {props.dontReceive &&
<FormMegaLayout name='remarkOption' label='不接受原因' full required wrapperWidth={570} labelCol={2} labelAlign="top"> <FormMegaLayout name='remarkOption' label='不接受原因' full required labelCol={2} labelAlign="top">
<Field <Field
name="remark" name="remark"
x-component="TextArea" x-component="TextArea"
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-18 15:55:51
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-30 19:14:40
*/
import React, { useState, useEffect, useRef, ReactNode } from 'react'; import React, { useState, useEffect, useRef, ReactNode } from 'react';
import { Card, Button, Row, Col, Tooltip, Input, Select, Tag, Space } from 'antd' import { Card, Button, Row, Col, Tooltip, Input, Select, Tag, Space } from 'antd'
import { UpOutlined, DownOutlined, EyeOutlined } from '@ant-design/icons' import { UpOutlined, DownOutlined, EyeOutlined } from '@ant-design/icons'
...@@ -9,6 +15,7 @@ import { history } from 'umi' ...@@ -9,6 +15,7 @@ import { history } from 'umi'
import { hidden } from 'chalk'; import { hidden } from 'chalk';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import {timeRange} from '@/utils/index' import {timeRange} from '@/utils/index'
import statuStyle from '../colorTag'
let { Option } = Select let { Option } = Select
export interface listProps { export interface listProps {
title?: ReactNode, title?: ReactNode,
...@@ -23,32 +30,6 @@ const data = [ ...@@ -23,32 +30,6 @@ const data = [
status: 0 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 { interface Item {
oredrNo: string oredrNo: string
...@@ -313,9 +294,15 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -313,9 +294,15 @@ const orderSearchList: React.FC<listProps> = (props) => {
* @param {type} * @param {type}
* @return: * @return:
*/ */
const handleChange = (key:any,val) => { const handleChange = (key:any,val:any) => {
let obj = {} let obj = {}
switch(key){ switch(key){
case 'logisticsOrderNo':
obj = { ...searchForm, logisticsOrderNo: val }
break;
case 'invoicesNo':
obj = { ...searchForm, invoicesNo: val }
break;
case 'companyId': case 'companyId':
obj = { ...searchForm, companyId: val } obj = { ...searchForm, companyId: val }
break; break;
...@@ -355,6 +342,7 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -355,6 +342,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
<PageHeaderWrapper title='快递单查询'> <PageHeaderWrapper title='快递单查询'>
<Card> <Card>
<StandardTable <StandardTable
tableProps={{rowKey:'id'}}
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
formAlign='left' formAlign='left'
...@@ -372,7 +360,7 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -372,7 +360,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
value={searchForm.logisticsOrderNo} value={searchForm.logisticsOrderNo}
placeholder='搜索' placeholder='搜索'
onChange={(e) => setSearchForm({ ...searchForm, logisticsOrderNo: e.target.value })} onChange={(e) => setSearchForm({ ...searchForm, logisticsOrderNo: e.target.value })}
onSearch={(val) => handleSearch(val)} onSearch={(val) => handleChange('logisticsOrderNo',val)}
/> />
</Tooltip> </Tooltip>
<Button className={style['filter-btn']} onClick={() => setIsSearch(isSearch = !isSearch)}> <Button className={style['filter-btn']} onClick={() => setIsSearch(isSearch = !isSearch)}>
...@@ -386,8 +374,17 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -386,8 +374,17 @@ const orderSearchList: React.FC<listProps> = (props) => {
isSearch && isSearch &&
<Col> <Col>
<Space size={16}> <Space size={16}>
{ {
props.type === '1' ? props.type === '1' ?
<>
<Input.Search
style={{ width: '232px' }}
value={searchForm.invoicesNo}
placeholder='输入对应单号进行搜索'
onChange={(e) => setSearchForm({ ...searchForm, invoicesNo: e.target.value })}
onSearch={(val) => handleChange('invoicesNo',val)}
/>
<Select <Select
className={style.select} className={style.select}
showSearch showSearch
...@@ -406,6 +403,7 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -406,6 +403,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
}) })
} }
</Select> </Select>
</>
: :
<Select <Select
className={style.select} className={style.select}
...@@ -419,8 +417,8 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -419,8 +417,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
> >
<Option value=''>发货方(全部)</Option> <Option value=''>发货方(全部)</Option>
{ {
shipperAddressList.map((item) => { shipperAddressList.map((item,index) => {
return <Option value={item.value}>{item.label}</Option> return <Option key={index} value={item.value}>{item.label}</Option>
}) })
} }
</Select> </Select>
...@@ -432,8 +430,8 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -432,8 +430,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
onChange={(val) => handleChangeTime(val)} onChange={(val) => handleChangeTime(val)}
> >
{ {
TimeList.map((item) => { TimeList.map((item,index) => {
return <Option value={item.value}>{item.label}</Option> return <Option key={index} value={item.value}>{item.label}</Option>
}) })
} }
</Select> </Select>
...@@ -443,8 +441,8 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -443,8 +441,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
onChange={(val) => handleChange('status',val)} onChange={(val) => handleChange('status',val)}
> >
{ {
outSideStatusList.map((item) => { outSideStatusList.map((item,index) => {
return <Option value={item.value}>{item.label}</Option> return <Option key={index} value={item.value}>{item.label}</Option>
}) })
} }
</Select> </Select>
......
...@@ -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-28 14:01:19 * @LastEditTime: 2020-07-30 19:37:57
*/ */
import React, { Component, useState, useEffect } from 'react'; import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
...@@ -31,6 +31,7 @@ import { ...@@ -31,6 +31,7 @@ import {
import {PublicApi} from '@/services/api' import {PublicApi} from '@/services/api'
import styles from './templateForm.less'; import styles from './templateForm.less';
import ReutrnEle from '@/components/ReturnEle' import ReutrnEle from '@/components/ReturnEle'
import {PATTERN_MAPS} from '@/constants/regExp'
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'
...@@ -232,7 +233,6 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -232,7 +233,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}} }}
x-component="Input" x-component="Input"
x-component-props={{ x-component-props={{
placeholder: '', placeholder: '',
addonAfter: "KG" addonAfter: "KG"
}} }}
...@@ -240,6 +240,10 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -240,6 +240,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonBefore: ' ', addonBefore: ' ',
addonAfter: '内,' addonAfter: '内,'
}} }}
x-rules={{
pattern: PATTERN_MAPS.weight,
message:'数字类型,可保留3位小数'
}}
/> />
<Field <Field
name="price" name="price"
...@@ -255,6 +259,10 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -255,6 +259,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
placeholder: '', placeholder: '',
addonAfter: "元" addonAfter: "元"
}} }}
x-rules={{
pattern: PATTERN_MAPS.money,
message:'数字类型,可保留2位小数'
}}
/> />
</FormMegaLayout> </FormMegaLayout>
<FormMegaLayout inline> <FormMegaLayout inline>
...@@ -276,6 +284,10 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -276,6 +284,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonBefore: '每增加', addonBefore: '每增加',
addonAfter: '增加运费' addonAfter: '增加运费'
}} }}
x-rules={{
pattern: PATTERN_MAPS.weight,
message:'数字类型,可保留3位小数'
}}
/> />
<Field <Field
name="incrementPrice" name="incrementPrice"
...@@ -291,6 +303,10 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -291,6 +303,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonAfter: "元" addonAfter: "元"
}} }}
x-rules={{
pattern: PATTERN_MAPS.money,
message:'数字类型,可保留2位小数'
}}
/> />
</FormMegaLayout> </FormMegaLayout>
</FormMegaLayout> </FormMegaLayout>
...@@ -354,21 +370,42 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -354,21 +370,42 @@ const diaLogForm: React.FC<ListProps> = (props) => {
console.log(e.target.value) console.log(e.target.value)
// actions.validate() // actions.validate()
}, },
// validate: (value:any) => {
// return new Promise(resolve => {
// setTimeout(() => {
// resolve(value !== '57350' ? '验证码验证失败' : '123')
// }, 1000)
// })
// }
}} }}
x-rules={{
pattern: PATTERN_MAPS.weight,
message:'数字类型,可保留3位小数'
}}
/>
<Field
name="price"
x-component="Input"
type="number"
title="首费(元)"
x-rules={{
pattern: PATTERN_MAPS.money,
message:'数字类型,可保留2位小数'
}}
/>
<Field
name="incrementWeight"
x-component="Input"
type="number"
title="续件(件/KG)"
x-rules={{
pattern: PATTERN_MAPS.weight,
message:'数字类型,可保留3位小数'
}}
/>
<Field
name="incrementPrice"
x-component="Input"
type="number"
title="续费(元)"
x-rules={{
pattern: PATTERN_MAPS.money,
message:'数字类型,可保留2位小数'
}}
/> />
<Field name="price" x-component="Input" type="number" title="首费(元)" />
<Field name="incrementWeight" x-component="Input" type="number" title="续件(件/KG)" />
<Field name="incrementPrice" x-component="Input" type="number" title="续费(元)" />
</Field> </Field>
</Field> </Field>
</Col> </Col>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-28 11:25:30 * @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-29 17:08:32 * @LastEditTime: 2020-07-30 17:37:44
*/ */
import React, { Component, useEffect, useRef, useState } from 'react' import React, { Component, useEffect, useRef, useState } from 'react'
import { Card, Row, Col, Tabs, Button, Input as SelectInput, Badge } from 'antd' import { Card, Row, Col, Tabs, Button, Input as SelectInput, Badge } from 'antd'
...@@ -233,7 +233,7 @@ const Deatail: React.FC<{}> = () => { ...@@ -233,7 +233,7 @@ const Deatail: React.FC<{}> = () => {
*/ */
useEffect(() => { useEffect(() => {
PublicApi.postLogisticsCompanyList().then(res => { PublicApi.getLogisticsSelectListCompany().then(res => {
let list = [] let list = []
res.data.forEach(item => { res.data.forEach(item => {
list.push({value:item.id,label:item.name}) list.push({value:item.id,label:item.name})
...@@ -241,7 +241,7 @@ const Deatail: React.FC<{}> = () => { ...@@ -241,7 +241,7 @@ const Deatail: React.FC<{}> = () => {
setCompanyList(list) setCompanyList(list)
}) })
PublicApi.postLogisticsShipperAddressList().then(res => { PublicApi.getLogisticsSelectListShipperAddress().then(res => {
let list = [] let list = []
res.data.forEach(item => { res.data.forEach(item => {
list.push({value:item.id,label:item.fullAddress}) list.push({value:item.id,label:item.fullAddress})
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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