Commit e820bf40 authored by tjy's avatar tjy
parents e4d28201 52187b79
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
# mockStatic # mockStatic
/.idea /.idea
src/services/index.ts
config/base.config.json config/base.config.json
/src/services/index.ts /src/services/index.ts
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: LeeJiancong * @Author: LeeJiancong
* @Date: 2020-07-18 15:55:51 * @Date: 2020-07-18 15:55:51
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-31 19:23:51 * @LastEditTime: 2020-08-01 11:09:05
*/ */
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'
...@@ -16,6 +16,7 @@ import { hidden } from 'chalk'; ...@@ -16,6 +16,7 @@ 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' import statuStyle from '../colorTag'
import {TimeList,statusList,outSideStatusList} from '../statusList'
import moment from 'moment' import moment from 'moment'
let { Option } = Select let { Option } = Select
export interface listProps { export interface listProps {
...@@ -50,49 +51,6 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -50,49 +51,6 @@ const orderSearchList: React.FC<listProps> = (props) => {
console.log(props) console.log(props)
const ref = useRef<any>({}) const ref = useRef<any>({})
const [selectRow, setSelectRow] = useState<Item[]>([]) const [selectRow, setSelectRow] = useState<Item[]>([])
const TimeList = [
{
label: '单据时间(全部)', value: 0
},
{
label: '今天', value: 1
},
{
label: '一周内', value: 2
},
{
label: '一个月内', value: 3
},
{
label: '三个月内', value: 4
},
{
label: '六个月内', value: 5
},
{
label: '一年内', value: 6
},
{
label: '一年前', value: 7
}
]
const outSideStatusList = [
{
label: '外部状态(全部)', value: ''
},
{
label: '待提交', value: 1
},
{
label: '待确认', value: 2
},
{
label: '接受物流单', value: 3
},
{
label: '不接受物流单', value: 4
}
]
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([]) const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [companyList, setcompanyList] = useState([]) const [companyList, setcompanyList] = useState([])
const [shipperAddressList, setshipperAddressList] = useState([]) const [shipperAddressList, setshipperAddressList] = useState([])
...@@ -258,6 +216,9 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -258,6 +216,9 @@ const orderSearchList: React.FC<listProps> = (props) => {
align: 'center', align: 'center',
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
filters: statusList,
filterMultiple: false,
onFilter:(value,record) => record.status === value,
render: (_: any, reconds) => { render: (_: any, reconds) => {
let component: ReactNode = null let component: ReactNode = null
if (reconds.status == 3) { if (reconds.status == 3) {
...@@ -277,6 +238,10 @@ const orderSearchList: React.FC<listProps> = (props) => { ...@@ -277,6 +238,10 @@ const orderSearchList: React.FC<listProps> = (props) => {
] ]
const statusFilter = (value:any,record:any) => {
console.log(value,record)
}
const rowSelection: TableRowSelection<any> = { const rowSelection: TableRowSelection<any> = {
type: 'checkbox', type: 'checkbox',
selectedRowKeys: selectedTableRowKeys, selectedRowKeys: selectedTableRowKeys,
......
...@@ -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-31 19:27:46 * @LastEditTime: 2020-08-01 11:10:57
*/ */
import React, { Component, ReactNode, useRef, useState, useEffect } from 'react' import React, { Component, ReactNode, useRef, useState, useEffect } from 'react'
import { history } from 'umi' import { history } from 'umi'
...@@ -28,6 +28,7 @@ import { PublicApi } from '@/services/api' ...@@ -28,6 +28,7 @@ import { PublicApi } from '@/services/api'
import { timeRange} from '@/utils/index' import { timeRange} from '@/utils/index'
import moment from 'moment' import moment from 'moment'
import statuStyle from '../colorTag' import statuStyle from '../colorTag'
import {TimeList,outSideStatusList,statusList} from '../statusList'
import style from '../components/index.less' import style from '../components/index.less'
const { Option } = Select const { Option } = Select
const data = [ const data = [
...@@ -143,49 +144,7 @@ const OrderList: React.FC<ListProps> = (props) => { ...@@ -143,49 +144,7 @@ const OrderList: React.FC<ListProps> = (props) => {
invoicesTimeStart: '', invoicesTimeStart: '',
invoicesTimeEnd: '' invoicesTimeEnd: ''
}) })
const TimeList = [
{
label: '单据时间(全部)', value: 0
},
{
label: '今天', value: 1
},
{
label: '一周内', value: 2
},
{
label: '一个月内', value: 3
},
{
label: '三个月内', value: 4
},
{
label: '六个月内', value: 5
},
{
label: '一年内', value: 6
},
{
label: '一年前', value: 7
}
]
const outSideStatusList = [
{
label: '外部状态(全部)', value: ''
},
{
label: '待提交', value: 1
},
{
label: '待确认', value: 2
},
{
label: '接受物流单', value: 3
},
{
label: '不接受物流单', value: 4
}
]
const columns: ColumnType<any>[] = [ const columns: ColumnType<any>[] = [
{ {
title: '物流单号', title: '物流单号',
...@@ -243,6 +202,9 @@ const OrderList: React.FC<ListProps> = (props) => { ...@@ -243,6 +202,9 @@ const OrderList: React.FC<ListProps> = (props) => {
align: 'center', align: 'center',
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
filters: statusList,
filterMultiple: false,
onFilter:(value,record) => record.status === value,
render: (text: any, record: any) => { render: (text: any, record: any) => {
let component: ReactNode = null let component: ReactNode = null
if (text == 3) { if (text == 3) {
......
...@@ -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-31 19:35:54 * @LastEditTime: 2020-08-01 11:12:49
*/ */
import React, { Component, ReactNode, useRef, useState, useEffect } from 'react' import React, { Component, ReactNode, useRef, useState, useEffect } from 'react'
import { history } from 'umi' import { history } from 'umi'
...@@ -26,6 +26,7 @@ import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableCon ...@@ -26,6 +26,7 @@ import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableCon
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import style from '../components/index.less' import style from '../components/index.less'
import statuStyle from '../colorTag' import statuStyle from '../colorTag'
import {TimeList,outSideStatusList,statusList} from '../statusList'
import moment from 'moment' import moment from 'moment'
import { timeRange } from '@/utils/index' import { timeRange } from '@/utils/index'
import Index from '@/pages'; import Index from '@/pages';
...@@ -57,49 +58,7 @@ const data = [ ...@@ -57,49 +58,7 @@ const data = [
interface Item { interface Item {
key: string key: string
} }
const TimeList = [
{
label: '单据时间(全部)', value: 0
},
{
label: '今天', value: 1
},
{
label: '一周内', value: 2
},
{
label: '一个月内', value: 3
},
{
label: '三个月内', value: 4
},
{
label: '六个月内', value: 5
},
{
label: '一年内', value: 6
},
{
label: '一年前', value: 7
}
]
const outSideStatusList = [
{
label: '外部状态(全部)', value: ''
},
{
label: '待提交', value: 1
},
{
label: '待确认', value: 2
},
{
label: '接受物流单', value: 3
},
{
label: '不接受物流单', value: 4
}
]
//父页面传递来的参数 //父页面传递来的参数
export interface ListProps { export interface ListProps {
} }
...@@ -203,6 +162,9 @@ const OrderList: React.FC<ListProps> = (props) => { ...@@ -203,6 +162,9 @@ const OrderList: React.FC<ListProps> = (props) => {
align: 'center', align: 'center',
dataIndex: 'status', dataIndex: 'status',
key: 'status', key: 'status',
filters: statusList,
filterMultiple: false,
onFilter:(value,record) => record.status === value,
render: (text: any, reconds: any) => { render: (text: any, reconds: any) => {
let component: ReactNode = null let component: ReactNode = null
if (text == 3) { if (text == 3) {
...@@ -239,7 +201,9 @@ const OrderList: React.FC<ListProps> = (props) => { ...@@ -239,7 +201,9 @@ const OrderList: React.FC<ListProps> = (props) => {
删除 删除
</Button> </Button>
</Popconfirm> </Popconfirm>
<Button type='link'>提交</Button> <Popconfirm title="确定要提交吗?" okText="是" cancelText="否" onConfirm={() => handleSubmit(record.id)}>
<Button type='link'>提交</Button>
</Popconfirm>
</> </>
} }
...@@ -286,11 +250,17 @@ const OrderList: React.FC<ListProps> = (props) => { ...@@ -286,11 +250,17 @@ const OrderList: React.FC<ListProps> = (props) => {
}) })
} }
const handleDelete = (id: number | string) => { const handleDelete = (id: number) => {
PublicApi.postLogisticsOrderWaitSubmitDelete({ id: id }).then(res => { PublicApi.postLogisticsOrderWaitSubmitDelete({ id: id }).then(res => {
ref.current.reload() ref.current.reload()
}) })
} }
const handleSubmit = (id:number) => {
PublicApi.postLogisticsOrderWaitSubmitSubmit({id:id}).then(res => {
ref.current.reload()
})
}
const handleSee = (id: number) => { const handleSee = (id: number) => {
history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil?id=${id}`) history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil?id=${id}`)
} }
......
/*
* @Author: LeeJiancong
* @Date: 2020-08-01 11:06:09
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-01 11:07:49
*/
export const TimeList = [
{
label: '单据时间(全部)', value: 0
},
{
label: '今天', value: 1
},
{
label: '一周内', value: 2
},
{
label: '一个月内', value: 3
},
{
label: '三个月内', value: 4
},
{
label: '六个月内', value: 5
},
{
label: '一年内', value: 6
},
{
label: '一年前', value: 7
}
]
export const outSideStatusList = [
{
label: '外部状态(全部)', value: ''
},
{
label: '待提交', value: 1
},
{
label: '待确认', value: 2
},
{
label: '接受物流单', value: 3
},
{
label: '不接受物流单', value: 4
}
]
export const statusList = [
{
text: '待提交', value: 1
},
{
text: '待确认', value: 2
},
{
text: '接受物流单', value: 3
},
{
text: '不接受物流单', value: 4
}
]
\ 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