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 = {
email: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/,
phone: /^1[3|4|5|6|7|8|9][0-9]{9}$/,
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) => {
x-component="Radio"
/>
{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
name="remark"
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 { Card, Button, Row, Col, Tooltip, Input, Select, Tag, Space } from 'antd'
import { UpOutlined, DownOutlined, EyeOutlined } from '@ant-design/icons'
......@@ -9,6 +15,7 @@ import { history } from 'umi'
import { hidden } from 'chalk';
import { PublicApi } from '@/services/api';
import {timeRange} from '@/utils/index'
import statuStyle from '../colorTag'
let { Option } = Select
export interface listProps {
title?: ReactNode,
......@@ -23,32 +30,6 @@ const data = [
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
......@@ -313,9 +294,15 @@ const orderSearchList: React.FC<listProps> = (props) => {
* @param {type}
* @return:
*/
const handleChange = (key:any,val) => {
const handleChange = (key:any,val:any) => {
let obj = {}
switch(key){
case 'logisticsOrderNo':
obj = { ...searchForm, logisticsOrderNo: val }
break;
case 'invoicesNo':
obj = { ...searchForm, invoicesNo: val }
break;
case 'companyId':
obj = { ...searchForm, companyId: val }
break;
......@@ -355,6 +342,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
<PageHeaderWrapper title='快递单查询'>
<Card>
<StandardTable
tableProps={{rowKey:'id'}}
columns={columns}
currentRef={ref}
formAlign='left'
......@@ -372,7 +360,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
value={searchForm.logisticsOrderNo}
placeholder='搜索'
onChange={(e) => setSearchForm({ ...searchForm, logisticsOrderNo: e.target.value })}
onSearch={(val) => handleSearch(val)}
onSearch={(val) => handleChange('logisticsOrderNo',val)}
/>
</Tooltip>
<Button className={style['filter-btn']} onClick={() => setIsSearch(isSearch = !isSearch)}>
......@@ -386,8 +374,17 @@ const orderSearchList: React.FC<listProps> = (props) => {
isSearch &&
<Col>
<Space size={16}>
{
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
className={style.select}
showSearch
......@@ -406,6 +403,7 @@ const orderSearchList: React.FC<listProps> = (props) => {
})
}
</Select>
</>
:
<Select
className={style.select}
......@@ -419,8 +417,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
>
<Option value=''>发货方(全部)</Option>
{
shipperAddressList.map((item) => {
return <Option value={item.value}>{item.label}</Option>
shipperAddressList.map((item,index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
......@@ -432,8 +430,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
onChange={(val) => handleChangeTime(val)}
>
{
TimeList.map((item) => {
return <Option value={item.value}>{item.label}</Option>
TimeList.map((item,index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
......@@ -443,8 +441,8 @@ const orderSearchList: React.FC<listProps> = (props) => {
onChange={(val) => handleChange('status',val)}
>
{
outSideStatusList.map((item) => {
return <Option value={item.value}>{item.label}</Option>
outSideStatusList.map((item,index) => {
return <Option key={index} value={item.value}>{item.label}</Option>
})
}
</Select>
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-28 14:01:19
* @LastEditTime: 2020-07-30 19:37:57
*/
import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -31,6 +31,7 @@ import {
import {PublicApi} from '@/services/api'
import styles from './templateForm.less';
import ReutrnEle from '@/components/ReturnEle'
import {PATTERN_MAPS} from '@/constants/regExp'
import ChinaImg from '../../../../../mockStatic/china.png'
import gou from '../../../../../mockStatic/gou.png'
import japenImg from '../../../../../mockStatic/japen.png'
......@@ -232,7 +233,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}}
x-component="Input"
x-component-props={{
placeholder: '',
addonAfter: "KG"
}}
......@@ -240,6 +240,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonBefore: ' ',
addonAfter: '内,'
}}
x-rules={{
pattern: PATTERN_MAPS.weight,
message:'数字类型,可保留3位小数'
}}
/>
<Field
name="price"
......@@ -255,6 +259,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
placeholder: '',
addonAfter: "元"
}}
x-rules={{
pattern: PATTERN_MAPS.money,
message:'数字类型,可保留2位小数'
}}
/>
</FormMegaLayout>
<FormMegaLayout inline>
......@@ -276,6 +284,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonBefore: '每增加',
addonAfter: '增加运费'
}}
x-rules={{
pattern: PATTERN_MAPS.weight,
message:'数字类型,可保留3位小数'
}}
/>
<Field
name="incrementPrice"
......@@ -291,6 +303,10 @@ const diaLogForm: React.FC<ListProps> = (props) => {
addonAfter: "元"
}}
x-rules={{
pattern: PATTERN_MAPS.money,
message:'数字类型,可保留2位小数'
}}
/>
</FormMegaLayout>
</FormMegaLayout>
......@@ -354,21 +370,42 @@ const diaLogForm: React.FC<ListProps> = (props) => {
console.log(e.target.value)
// 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>
</Col>
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-28 11:25:30
* @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 { Card, Row, Col, Tabs, Button, Input as SelectInput, Badge } from 'antd'
......@@ -233,7 +233,7 @@ const Deatail: React.FC<{}> = () => {
*/
useEffect(() => {
PublicApi.postLogisticsCompanyList().then(res => {
PublicApi.getLogisticsSelectListCompany().then(res => {
let list = []
res.data.forEach(item => {
list.push({value:item.id,label:item.name})
......@@ -241,7 +241,7 @@ const Deatail: React.FC<{}> = () => {
setCompanyList(list)
})
PublicApi.postLogisticsShipperAddressList().then(res => {
PublicApi.getLogisticsSelectListShipperAddress().then(res => {
let list = []
res.data.forEach(item => {
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