Commit 5383ca73 authored by LeeJiancong's avatar LeeJiancong

运费模板对接完成

parent b60cfb09
This diff is collapsed.
...@@ -116,7 +116,18 @@ const LogisticsRoute = { ...@@ -116,7 +116,18 @@ const LogisticsRoute = {
name: 'orderResultDeatil', name: 'orderResultDeatil',
component: '@/pages/logistics/components/orderSearchDetail', component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true hideInMenu: true
} },
{
path: '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmList',
name: 'toOrderComfirmList',
component: '@/pages/logistics/logisticsResult/toOrderComfirmList',
},
{//待确认详情处理
path: '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmDeatil',
name: 'orderResultDeatil',
component: '@/pages/logistics/components/orderSearchDetail',
hideInMenu: true
},
] ]
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"scripts": { "scripts": {
"api": "god-ytt", "api": "god-ytt",
"scripts:build": "node scripts/run", "scripts:build": "node scripts/run",
"start:dev":"umi dev",
"start:analyze": "ANALYZE=1 umi dev", "start:analyze": "ANALYZE=1 umi dev",
"clean": "rimraf node_modules", "clean": "rimraf node_modules",
"start": "yarn scripts:build && umi dev", "start": "yarn scripts:build && umi dev",
......
...@@ -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-23 14:02:07 * @LastEditTime: 2020-07-27 11:29:16
*/ */
export default { export default {
...@@ -83,5 +83,6 @@ export default { ...@@ -83,5 +83,6 @@ export default {
'menu.logisticsAbility.logisticsResult': '物流单处理', 'menu.logisticsAbility.logisticsResult': '物流单处理',
'menu.logisticsAbility.logisticsResult.orderResultSearchList': '物流单查询', 'menu.logisticsAbility.logisticsResult.orderResultSearchList': '物流单查询',
'menu.logisticsAbility.logisticsResult.orderResultDeatil': '物流单详情' 'menu.logisticsAbility.logisticsResult.orderResultDeatil': '物流单详情',
'menu.logisticsAbility.logisticsResult.toOrderComfirmList': '待确认物流单',
}; };
\ No newline at end of file
import React, { Component, useState, useEffect } from 'react';
import { Modal, Button, Form } from 'antd'
import {
SchemaForm, SchemaMarkupField as Field,
createFormActions,
FormEffectHooks
} from '@formily/antd'
import { Input, Radio, FormMegaLayout } from '@formily/antd-components'
import { values } from 'mobx';
export interface Params {
dialogVisible: boolean,
onCancel: Function,
dontReceive?: boolean //默认展示
}
const actions = createFormActions()
const {onFieldChange$} = FormEffectHooks
const comfirmDialog: React.FC<Params> = (props) => {
console.log(props.dialogVisible)
const handleCancel = () => {
}
const handletOk = (values:any) => {
console.log(values)
actions.submit()
props.onCancel()
}
useEffect(() => {
return () => {
}
}, [])
const useFormEffects = () => {
const { setFieldState } = createFormActions()
onFieldChange$('radio').subscribe(({value}) => {
setFieldState('remarkOption',state => {
if(value == 1){
state.visible = false
}else{
state.visible = true
}
})
})
}
return (
<>
<Modal
title='单据确认'
width={800}
visible={props.dialogVisible}
onOk={handletOk}
onCancel={() => props.onCancel()}
destroyOnClose
afterClose={() => actions.reset()}
okText='确定'
cancelText='取消'
>
<SchemaForm components={{
Input, Radio: Radio.Group, TextArea: Input.TextArea
}}
actions={actions}
effects={() => useFormEffects()}
onSubmit={(values) => handletOk(values)
}
>
<Field
enum={
[
{ label: '接受物流单', value:1 },
{ label: '不接受物流单', value:2 }
]}
name='radio'
required
x-component="Radio"
/>
{props.dontReceive &&
<FormMegaLayout name='remarkOption' label='不接受原因' full required wrapperWidth={570} labelCol={2} labelAlign="top">
<Field
name="remark"
x-component="TextArea"
required
x-component-props={{
placeholder: '在此输入你的内容,最多60个汉字'
}}
x-rules={value => {
if (value.length > 60) {
return {
type: 'warning',
message: '原因最多60个汉字'
}
}
}
}
/>
</FormMegaLayout>
}
</SchemaForm>
</Modal>
</>
)
}
comfirmDialog.defaultProps = {
dontReceive: true
}
export default comfirmDialog
\ No newline at end of file
...@@ -4,6 +4,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout' ...@@ -4,6 +4,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons' import { EyeOutlined, ClockCircleOutlined, UpOutlined, DownOutlined, StopOutlined, CheckSquareOutlined } from '@ant-design/icons'
import { StandardTable } from 'god' import { StandardTable } from 'god'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import ConfirmModal from './confirmModal'
import {history} from 'umi'
import style from './index.less' import style from './index.less'
const { Step } = Steps const { Step } = Steps
const data = [ const data = [
...@@ -20,6 +22,8 @@ const data = [ ...@@ -20,6 +22,8 @@ const data = [
const detailInfo: React.FC<{}> = () => { const detailInfo: React.FC<{}> = () => {
const ref = useRef({}) const ref = useRef({})
let [isextraOption, setIsextraOption] = useState(false)
let [visible, setvisible] = useState(false)
const [detailData, setDetailData] = useState<any>({ const [detailData, setDetailData] = useState<any>({
step: { step: {
current: 0, current: 0,
...@@ -168,13 +172,15 @@ const detailInfo: React.FC<{}> = () => { ...@@ -168,13 +172,15 @@ const detailInfo: React.FC<{}> = () => {
}, },
]; ];
//在这做逻辑判断 判断路由 是由哪个页面进来的 //在这做逻辑判断 判断路由 是由哪个页面进来的
// useEffect(() => { useEffect(() => {
// effect let pathname = history.location.pathname
// return () => { if(pathname === '/memberCenter/logisticsAbility/logisticsResult/toOrderComfirmDeatil'){
// cleanup setIsextraOption(true)
// } }
// }, [])
// 模拟请求 return () => {
}
}, [])
const fetchData = (params: any) => { const fetchData = (params: any) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const queryResult = data.find(v => v.key === params.keywords); const queryResult = data.find(v => v.key === params.keywords);
...@@ -203,12 +209,13 @@ const detailInfo: React.FC<{}> = () => { ...@@ -203,12 +209,13 @@ const detailInfo: React.FC<{}> = () => {
</> </>
} }
extra={ extra={
isextraOption &&
<> <>
<Button> <Button onClick={() => setvisible(true)}>
<StopOutlined /> <StopOutlined />
不接受物流单 不接受物流单
</Button> </Button>
<Button className={style['saveBtn']}> <Button onClick={() => setvisible(true)} className={style['saveBtn']}>
<CheckSquareOutlined /> <CheckSquareOutlined />
接受物流单 接受物流单
</Button> </Button>
...@@ -409,6 +416,10 @@ const detailInfo: React.FC<{}> = () => { ...@@ -409,6 +416,10 @@ const detailInfo: React.FC<{}> = () => {
</Col> </Col>
</Row> </Row>
<ConfirmModal
dialogVisible={visible}
onCancel={() => setvisible(false)}
/>
</PageHeaderWrapper> </PageHeaderWrapper>
) )
......
...@@ -122,8 +122,13 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -122,8 +122,13 @@ const orderSearchList: React.FC<listProps> = (props) => {
TimeRange: '' TimeRange: ''
}) })
const handleSee = () => { const handleSee = () => {
props.type === '1'? history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil`): if(props.type === '1'){
history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil`)
}else if(props.type === '2'){
history.push('/memberCenter/logisticsAbility/logisticsResult/orderResultDeatil') history.push('/memberCenter/logisticsAbility/logisticsResult/orderResultDeatil')
}else {
history.push(' /memberCenter/logisticsAbility/logisticsResult/toOrderComfirmDeatil')
}
} }
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
......
/* /*
* @Date: 2020-07-13 15:01:40 * @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-24 17:54:55 * @LastEditTime: 2020-07-27 11:38:38
*/ */
import React, { ReactNode, useRef } from 'react' import React, { ReactNode, useRef } from 'react'
...@@ -191,6 +191,7 @@ const Company: React.FC<{}> = () => { ...@@ -191,6 +191,7 @@ const Company: React.FC<{}> = () => {
<PageHeaderWrapper> <PageHeaderWrapper>
<Card> <Card>
<StandardTable <StandardTable
tableProps={{rowKey:'id'}}
columns={columns} columns={columns}
currentRef={ref} currentRef={ref}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
......
...@@ -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-24 20:42:21 * @LastEditTime: 2020-07-27 17:01:52
*/ */
import React, { Component, useState, useEffect } from 'react'; import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
...@@ -81,6 +81,9 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -81,6 +81,9 @@ const diaLogForm: React.FC<ListProps> = (props) => {
const [areaCode, setAreaCode] = useState<number>(null) const [areaCode, setAreaCode] = useState<number>(null)
const [Options, setOptions] = useState([]) const [Options, setOptions] = useState([])
const [state, setState] = useState({ editable: true }) const [state, setState] = useState({ editable: true })
const [provinceName,setProvinceName] = useState('')
const [cityName, setCityName] = useState('')
const [districtName, setDistrictName] = useState('')
const [headerTitle, setHeaderTitle] = useState('') const [headerTitle, setHeaderTitle] = useState('')
const [provinceList, setProvinceList] = useState([]) const [provinceList, setProvinceList] = useState([])
const [cityList, setCityList] = useState([]) const [cityList, setCityList] = useState([])
...@@ -95,7 +98,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -95,7 +98,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
) )
} }
/** /**
* @description: * @description: Form保存
* @param {type} * @param {type}
* @return: * @return:
*/ */
...@@ -107,6 +110,12 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -107,6 +110,12 @@ const diaLogForm: React.FC<ListProps> = (props) => {
value.isDefault = values.isDefault ? 1 : 0 value.isDefault = values.isDefault ? 1 : 0
if (type == 1) { if (type == 1) {
if (id == 0) { if (id == 0) {
value.provinceCode = value.provinceCode.split('-').length > 1 ? value.provinceCode.split('-')[0] : value.provinceCode
value.cityCode = value.cityCode.split('-').length > 1 ? value.cityCode.split('-')[0] : value.cityCode
value.districtCode = value.districtCode.split('-').length > 1 ? value.districtCode.split('-')[0] : value.districtCode
value.provinceName = provinceName
value.cityName = cityName
value.districtName = districtName
PublicApi.postLogisticsShipperAddressAdd(value).then(res => { PublicApi.postLogisticsShipperAddressAdd(value).then(res => {
if (res.code == 1000) { if (res.code == 1000) {
} }
...@@ -180,7 +189,8 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -180,7 +189,8 @@ const diaLogForm: React.FC<ListProps> = (props) => {
PublicApi.getWarehouseAreaByPcodeAll({ pcode: '100000' }).then(res => { PublicApi.getWarehouseAreaByPcodeAll({ pcode: '100000' }).then(res => {
let list = [] let list = []
res.data.forEach((item: any, index: number) => { res.data.forEach((item: any, index: number) => {
list.push({ label: item.name, value: item.code }) list.push({ label: item.name, value: `${item.code}-${item.name}` })
// list.push({ label: item.name, value: item.code })
}) })
setProvinceList(list) setProvinceList(list)
}) })
...@@ -236,37 +246,48 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -236,37 +246,48 @@ const diaLogForm: React.FC<ListProps> = (props) => {
*/ */
const useAreaEffects = () => { const useAreaEffects = () => {
const { setFieldState } = createFormActions() const { setFieldState } = createFormActions()
onFieldValueChange$('provinceId').subscribe(({ value }) => { onFieldValueChange$('provinceCode').subscribe(({ value }) => {
console.log(value) console.log(value)
setFieldState('districtId', state => { setFieldState('districtCode', state => {
state.value = '' state.value = ''
}) })
setFieldState('*(cityId)', state => { let name = value&& value.split('-').length > 1 ? value.split('-')[1] : ''
setProvinceName(name)
setFieldState('*(cityCode)', state => {
state.value = '' state.value = ''
let list = [] let list = []
PublicApi.getWarehouseAreaByPcodeAll({ pcode: value }).then(res => { let pcode = value && value.split('-').length > 1 ? value.split('-')[0] : value
PublicApi.getWarehouseAreaByPcodeAll({ pcode: pcode }).then(res => {
res.data.forEach((item: any, index: number) => { res.data.forEach((item: any, index: number) => {
list.push({ label: item.name, value: item.code }) // list.push({ label: item.name, value: item.code })
list.push({ label: item.name, value: `${item.code}-${item.name}` })
}) })
// setCityList(list)
}) })
FormPath.setIn(state, 'props.enum', list) FormPath.setIn(state, 'props.enum', list)
}) })
}) })
onFieldValueChange$('cityId').subscribe(({ value }) => { onFieldValueChange$('cityCode').subscribe(({ value }) => {
console.log(value) console.log(value)
setFieldState('*(districtId)', state => { let name = value && value.split('-').length > 1 ? value.split('-')[1] : ''
setCityName(name)
setFieldState('*(districtCode)', state => {
state.value = '' state.value = ''
let list = [] let list = []
PublicApi.getWarehouseAreaByPcodeAll({ pcode: value }).then(res => { let pcode = value && value.split('-').length > 1 ? value.split('-')[0] : value
PublicApi.getWarehouseAreaByPcodeAll({ pcode: pcode }).then(res => {
res.data.forEach((item: any, index: number) => { res.data.forEach((item: any, index: number) => {
list.push({ label: item.name, value: item.code }) // list.push({ label: item.name, value: item.code })
list.push({ label: item.name, value: `${item.code}-${item.name}` })
}) })
}) })
FormPath.setIn(state, 'props.enum', list) FormPath.setIn(state, 'props.enum', list)
}) })
}) })
onFieldValueChange$('districtCode').subscribe(({ value }) => {
let name = value&& value.split('-').length > 1 ? value.split('-')[1] : ''
setDistrictName(name)
})
} }
return ( return (
...@@ -281,9 +302,9 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -281,9 +302,9 @@ const diaLogForm: React.FC<ListProps> = (props) => {
<SchemaForm editable={state.editable} <SchemaForm editable={state.editable}
initialValues={{ initialValues={{
// areaCode: areaCode // areaCode: areaCode
// provinceId: '', // provinceCode: '',
// cityId:'111120', // cityCode:'111120',
// districtId:'121212' // districtCode:'121212'
}} }}
actions={actions}//要传递 actions={actions}//要传递
components={{ components={{
...@@ -324,7 +345,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -324,7 +345,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-component="Select" x-component="Select"
enum={provinceList} enum={provinceList}
required required
name="provinceId" name="provinceCode"
x-component-props={{ x-component-props={{
placeholder: '-省份/直辖市-' placeholder: '-省份/直辖市-'
}} }}
...@@ -334,7 +355,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -334,7 +355,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-component="Select" x-component="Select"
enum={cityList} enum={cityList}
required required
name="cityId" name="cityCode"
x-component-props={{ x-component-props={{
placeholder: '-市-' placeholder: '-市-'
}} }}
...@@ -344,7 +365,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -344,7 +365,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-component="Select" x-component="Select"
enum={selectList} enum={selectList}
required required
name="districtId" name="districtCode"
x-component-props={{ x-component-props={{
placeholder: '-区-' placeholder: '-区-'
}} }}
......
...@@ -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-24 20:10:56 * @LastEditTime: 2020-07-27 19:11:21
*/ */
import React, { Component, useState, useEffect } from 'react'; import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
...@@ -84,7 +84,7 @@ const dropdownRender = () => { ...@@ -84,7 +84,7 @@ const dropdownRender = () => {
const diaLogForm: React.FC<ListProps> = (props) => { const diaLogForm: React.FC<ListProps> = (props) => {
const [provinceList, setProvinceList] = useState([]) const [provinceList, setProvinceList] = useState([])
const [state, setState] = useState({ editable: true }) const [editable, setEditable] = useState<boolean>(true)
const [headerTitle, setHeaderTitle] = useState('') const [headerTitle, setHeaderTitle] = useState('')
const [select, setSelect] = useState<countryItem>({ const [select, setSelect] = useState<countryItem>({
key: 'cn', key: 'cn',
...@@ -118,6 +118,9 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -118,6 +118,9 @@ const diaLogForm: React.FC<ListProps> = (props) => {
let _title = history.location.query.isSee ? '查看': let _title = history.location.query.isSee ? '查看':
Number(id) === 0? '新建':'编辑' Number(id) === 0? '新建':'编辑'
if( history.location.query.isSee){
setEditable(false)
}
// console.log(id,typeof id,history.location.query.isSee,typeof history.location.query.isSee) // console.log(id,typeof id,history.location.query.isSee,typeof history.location.query.isSee)
setHeaderTitle(`${_title}运费模板`) setHeaderTitle(`${_title}运费模板`)
PublicApi.getWarehouseAreaByPcodeAll({ pcode: '100000' }).then(res => { PublicApi.getWarehouseAreaByPcodeAll({ pcode: '100000' }).then(res => {
...@@ -181,6 +184,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -181,6 +184,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
backIcon={<ReutrnEle description="返回" />} backIcon={<ReutrnEle description="返回" />}
title={headerTitle} title={headerTitle}
extra={ extra={
editable &&
<Button type="primary" onClick={() => actions.submit()}> 保存</Button> <Button type="primary" onClick={() => actions.submit()}> 保存</Button>
//外层调用form API //外层调用form API
} }
...@@ -188,7 +192,7 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -188,7 +192,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
<Card> <Card>
<Row > <Row >
<Col span={24}> <Col span={24}>
<SchemaForm editable={state.editable} <SchemaForm editable={editable}
actions={actions}//要传递 actions={actions}//要传递
initialValues={{ initialValues={{
// provic: '广东省', // provic: '广东省',
......
This diff is collapsed.
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @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-23 13:54:05 * @LastEditTime: 2020-07-27 11:26:07
*/ */
import React, { Component, ReactNode, useRef, useState } from 'react' import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi' import { history } from 'umi'
import { Modal, Card, Button, Form, InputNumber, Radio, Popconfirm, Switch, Input } from 'antd'; import { Modal, Card, Button, Form, InputNumber, Radio, Popconfirm, Switch, Input,Tag } from 'antd';
import { import {
PlayCircleOutlined, PlayCircleOutlined,
PauseCircleOutlined, PauseCircleOutlined,
...@@ -43,19 +43,6 @@ const data = [ ...@@ -43,19 +43,6 @@ const data = [
address: '地址32' address: '地址32'
}, },
] ]
// const fetchData = (param: any) => {
// return new Promise((resolve) => {
// let reqParam = {
// ...param
// }
// getUserInfoList(reqParam).then(res => {
// resolve(res.data)
// })
// })
// }
interface Item { interface Item {
key: string key: string
} }
...@@ -115,7 +102,7 @@ const EditableCell: React.FC<EditableCellProps> = ({ ...@@ -115,7 +102,7 @@ const EditableCell: React.FC<EditableCellProps> = ({
* @param {type} * @param {type}
* @return: * @return:
*/ */
const AddressList: React.FC<ListProps> = (props) => { const OrderList: React.FC<ListProps> = (props) => {
console.log(props) console.log(props)
const ref = useRef({}) const ref = useRef({})
const [form] = Form.useForm(); const [form] = Form.useForm();
...@@ -128,49 +115,68 @@ const AddressList: React.FC<ListProps> = (props) => { ...@@ -128,49 +115,68 @@ const AddressList: React.FC<ListProps> = (props) => {
}; };
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '发货人姓名', title: '物流单号',
dataIndex: 'shipperName', dataIndex: 'logisticsOrderNo',
align: 'center', align: 'center',
key: 'shipperName', key: 'logisticsOrderNo',
}, },
{ {
title: '发货地址', title: '对应订单号',
align: 'left', align: 'left',
dataIndex: 'address', dataIndex: 'invoicesNo',
key: 'address', key: 'invoicesNo'
render: (_: any, record: any) => (
<>
{record.fullAddress}
</>
)
}, },
{ {
title: '邮编', title: '物流服务商',
dataIndex: 'code', dataIndex: 'companyName',
align: 'center', align: 'center',
key: 'code' key: 'companyName'
}, },
{ {
title: '手机号码', title: '收货方',
align: 'center', align: 'center',
dataIndex: 'phoneNO', dataIndex: 'receiverName',
key: 'phoneNO', key: 'receiverName',
}, },
{ {
title: '电话号码', title: '总箱数',
align: 'center', align: 'center',
dataIndex: 'telNO', dataIndex: 'totalCarton',
key: 'telNO' key: 'totalCarton'
}, },
{ {
title: '是否默认', title: '总重量',
align: 'center', align: 'center',
dataIndex: 'isDefault', dataIndex: 'totalWeight',
key: 'isDefault', key: 'totalWeight'
render: (_: any, record: any) => },
<Switch size='small' disabled defaultChecked={record.isDefault == 0 ? false : true} {
title: '总体积',
/>, align: 'center',
dataIndex: 'totalVolume',
key: 'totalVolume'
},
{
title: '单据时间',
align: 'center',
dataIndex: 'invoicesTime',
key: 'invoicesTime'
},
{
title: '外部状态',
align: 'center',
dataIndex: 'status',
key: 'status',
render: () => {
return (
<>
<Tag color="default">待提交</Tag>
<Tag color="processing">待确认</Tag>
<Tag color="green">接受物流单</Tag>
<Tag color="red">不接受物流单</Tag>
</>
)
}
}, },
{ {
title: '操作', title: '操作',
...@@ -179,7 +185,7 @@ const AddressList: React.FC<ListProps> = (props) => { ...@@ -179,7 +185,7 @@ const AddressList: React.FC<ListProps> = (props) => {
render: (_: any, record: any) => { render: (_: any, record: any) => {
return ( return (
<> <>
<Button type='link'>启用</Button>
{ {
record.status === 0 ? record.status === 0 ?
<><Button type="link" onClick={() => edit(record)}>编辑</Button> <><Button type="link" onClick={() => edit(record)}>编辑</Button>
...@@ -190,6 +196,7 @@ const AddressList: React.FC<ListProps> = (props) => { ...@@ -190,6 +196,7 @@ const AddressList: React.FC<ListProps> = (props) => {
</Popconfirm> </Popconfirm>
</> : '' </> : ''
} }
<Button type='link'>提交</Button>
<Button type='link'>查看</Button> <Button type='link'>查看</Button>
</> </>
) )
...@@ -229,26 +236,6 @@ const fetchData = (params: any) => { ...@@ -229,26 +236,6 @@ const fetchData = (params: any) => {
const handleDelete = () => { const handleDelete = () => {
console.log('delete') console.log('delete')
} }
const search: IFormFilter[] = [
{
type: 'Input',
value: 'keywords',
col: 4,
placeHolder: '输入属性名称'
}
]
const searchBarActions: IButtonFilter[] = [
{
type: 'primary',
text: '新建',
icon: <PlusOutlined />,
handler: () => {
history.push('/logisticsAbility/logistics/list/addCompany')
}
}
]
const handleSee = (record: any) => { const handleSee = (record: any) => {
console.log('see') console.log('see')
} }
...@@ -286,7 +273,7 @@ const fetchData = (params: any) => { ...@@ -286,7 +273,7 @@ const fetchData = (params: any) => {
</PageHeaderWrapper> </PageHeaderWrapper>
) )
} }
AddressList.defaultProps = { OrderList.defaultProps = {
} }
export default AddressList export default OrderList
\ No newline at end of file \ No newline at end of file
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