Commit 9c215002 authored by tjy's avatar tjy
parents ba465d50 cb29bec1
......@@ -80,6 +80,8 @@ const LogisticsRoute = {
name: 'orderSubmitSearchList',
component: '@/pages/logistics/logisticsSubmit/orderSearchList',
},
//物流详情页 查看的
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil',
name: 'orderSubmitDeatil',
......@@ -92,7 +94,7 @@ const LogisticsRoute = {
component: '@/pages/logistics/logisticsSubmit/toOrderSumitList',
},
//待提交详情页
//待提交详情页 新增和修改的
{
path: '/memberCenter/logisticsAbility/logisticsSubmit/toOrderSubmitDetail',
name: 'toOrderSubmitDetail',
......
......@@ -33,8 +33,6 @@
}
.select {
width : 160px;
margin: 0 16px 16px 0;
&:nth-last-of-type(1) {
margin-right: 0;
}
......
......@@ -4,6 +4,7 @@ import {UpOutlined, DownOutlined} from '@ant-design/icons'
import {StandardTable} from 'god'
import { ColumnType,TableRowSelection} from 'antd/lib/table/interface'
import style from '../components/index.less'
import { PublicApi} from '@/services/api'
let {Option} = Select
export interface Params {
title: string;
......@@ -16,12 +17,21 @@ export interface Params {
interface Item {
key: string;
}
interface filterItem{
name?: string;
brandName?:string;
customerCategory?:string,
status?: any
}
const listDialog: React.FC<Params> = (props) => {
const ref = useRef({})
const [selectRow, setSelectRow] = useState<Item[]>([]) // 模态框选择的行数据
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
let [isSearch, setIsSearch] = useState(false)
let [filterParams, setfilterParams] = useState<filterItem>({
name:'',
})
const [searchForm, setSearchForm] = useState({
searName: '',
buyer:'',//收货商
......@@ -86,19 +96,28 @@ const listDialog: React.FC<Params> = (props) => {
}
]
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
if(props.type === 3){
return new Promise((resolve,reject) => {
PublicApi.getProductCommodityGetCommodityList({...params}).then(res => {
resolve(res.data)
})
}, 1000)
})
})
}
// return new Promise((resolve, reject) => {
// const queryResult = data.find(v => v.key === params.keywords)
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: queryResult ? [queryResult] : data
// })
// }, 1000)
// })
}
useEffect(() => {
return () => {
}
}, [])
......
/*
* @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-27 11:38:38
* @LastEditTime: 2020-07-30 10:06:44
*/
import React, { ReactNode, useRef } from 'react'
......@@ -73,7 +73,7 @@ const Company: React.FC<{}> = () => {
dataIndex: 'name',
align: 'center',
key: 'name',
render: (text: any, record: any) => <span className="commonPickColor">{text}&nbsp;<EyeOutlined /></span>
render: (text: any, record: any) => <span className="commonPickColor" onClick={() => handleSee(record.id)}>{text}&nbsp;<EyeOutlined /></span>
},
{
title: '合作类型',
......@@ -126,7 +126,6 @@ const Company: React.FC<{}> = () => {
</Popconfirm>
</>
:''}
<Button type='link' onClick={() => handleSee(record.id)}>查看</Button>
</>
)
}
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-24 10:58:55
* @LastEditTime: 2020-07-29 20:37:05
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......@@ -190,6 +190,8 @@ const AddressList: React.FC<ListProps> = (props) => {
// 模拟请求
const fetchData = (params: any) => {
console.log(params);
return new Promise((resolve, reject) => {
if (props.type === '1') {//发货
PublicApi.getLogisticsShipperAddressPage({ current: params.page, pageSize: params.rows }).then(res => {
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-27 17:32:33
* @LastEditTime: 2020-07-29 15:55:43
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......@@ -358,34 +358,6 @@ const fetchData = (params: any) => {
{
isSearch &&
<Col>
{
props.type === '1'?
<Select
className={style.select}
value={searchForm.buyer}
onChange={(val) => setSearchForm({ ...searchForm, buyer: val })}
>
<Option value=''>物流服务商(全部)</Option>
<Option value='1'>待审核</Option>
<Option value='2'>审核通过</Option>
<Option value='3'>审核不通过</Option>
</Select>
:
<Select
className={style.select}
value={searchForm.buyer}
onChange={(val) => setSearchForm({ ...searchForm, buyer: val })}
>
<Option value=''>发货方(全部)</Option>
<Option value='1'>待审核</Option>
<Option value='2'>审核通过</Option>
<Option value='3'>审核不通过</Option>
</Select>
}
<Select
className={style.select}
value={searchForm.TimeRange}
......
/*
* @Author: LeeJiancong
* @Date: 2020-07-28 11:25:30
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-29 17:08:32
*/
import React, { Component, useEffect, useRef, useState } from 'react'
import { Card, Row, Col, Tabs, Button, Input as SelectInput, Badge } from 'antd'
import { LinkOutlined } from '@ant-design/icons'
......@@ -6,6 +12,7 @@ import { ColumnType, TableRowSelection } from 'antd/lib/table/interface'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import { PATTERN_MAPS } from '@/constants/regExp'
import ListMadal from '../components/sumbitOrderModal'
import {PublicApi} from '@/services/api'
import {
Submit,
Reset,
......@@ -63,6 +70,8 @@ const Deatail: React.FC<{}> = () => {
ModalSeletOrder2: false,
ModalSeletOrder3: false
})
let [companyList, setCompanyList] = useState([])
let [shipperAddress, setshipperAddress] = useState([])
const [editable, setEditable] = useState(true)
const columns: ColumnType<any>[] = [
{
......@@ -217,6 +226,36 @@ const Deatail: React.FC<{}> = () => {
]
/**
* @description: 挂载更新
* @param {type}
* @return:
*/
useEffect(() => {
PublicApi.postLogisticsCompanyList().then(res => {
let list = []
res.data.forEach(item => {
list.push({value:item.id,label:item.name})
})
setCompanyList(list)
})
PublicApi.postLogisticsShipperAddressList().then(res => {
let list = []
res.data.forEach(item => {
list.push({value:item.id,label:item.fullAddress})
})
setshipperAddress(list)
})
return () => {
}
}, [])
const handleLink = (type: number) => {
switch (type) {
......@@ -245,6 +284,7 @@ const Deatail: React.FC<{}> = () => {
)
const FormSubmit = (values: any) => {
let value = {...values}
}
const headList = [
......@@ -312,14 +352,15 @@ const Deatail: React.FC<{}> = () => {
<TabPane key='tab-1' tab='基本信息'>
<Row>
<Col span={12}>
<FormItem name="name" label="物流服务商" required component={Input} />
<FormItem name="id" label="单据摘要" required component={Select} da />
<FormItem name="id5" label='对应发货单号'>
<FormItem name="companyId" label="物流服务商" dataSource={companyList} required component={Select} />
<FormItem name="digest" label="单据摘要" required component={Input} />
<FormItem name="shipmentOrderCode" label='对应发货单号'>
<>
<SelectInput className={style['btn-wrap']} addonAfter={selectBtn2} />
</>
</FormItem>
<FormItem name="id6" label='对应订单号/售后单'>
<FormItem name="invoicesNo" label='对应订单号/售后单'>
<>
<SelectInput className={style['btn-wrap']} addonAfter={selectBtn1} />
</>
......@@ -328,23 +369,23 @@ const Deatail: React.FC<{}> = () => {
<FormItem name="id2" label='收货方'>
<>
<>张三/ 18814756189</>
<>温州隆昌手袋有限公司</>
</>
</FormItem>
<FormItem name="id3" label='收货地址'>
<FormItem name="receiverAddressId" label='收货地址'>
<>
<div>张三/ 18814756189</div>
<div>广东省123123123112</div>
</>
</FormItem>
<FormItem name="112" label="发货地址" required component={Select} />
<FormItem name="shipperAddressId" label="发货地址" dataSource={shipperAddress} required component={Select} />
</Col>
</Row>
</TabPane>
<TabPane key="tab-2" tab="物流单明细">
<FieldList
name="userList"
name="detailList"
initialValue={[
{ name: 'morally', id: 21, age: 11 },
{ name: 'bill', id: 22 }
......@@ -373,7 +414,7 @@ const Deatail: React.FC<{}> = () => {
<Row gutter={[10, 10]} key={'index' + index}>
<Col span={2} className={style['alignCenter']}>
<FormItem
name={`userList.${index}.id`}
name={`detailList.${index}.productId`}
component={Input}
editable={false}
required
......@@ -381,7 +422,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={5} >
<FormItem
name={`userList.${index}.name`}
name={`detailList.${index}.productName`}
component={Input}
required
editable={false}
......@@ -390,7 +431,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={2} className={style['alignCenter']}>
<FormItem
name={`userList.${index}.pinglei`}
name={`detailList.${index}.categoryName`}
component={Input}
required
editable={false}
......@@ -398,7 +439,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={3} className={style['alignCenter']}>
<FormItem
name={`userList.${index}.brand`}
name={`detailList.${index}.brandName`}
component={Input}
required
editable={false}
......@@ -406,7 +447,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={1} className={style['alignCenter']}>
<FormItem
name={`userList.${index}.danwei`}
name={`detailList.${index}.unitName`}
component={Input}
required
editable={false}
......@@ -415,7 +456,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={3}>
<FormItem
name={`userList.${index}.num`}
name={`detailList.${index}.amount`}
component={Input}
required
......@@ -423,7 +464,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={3}>
<FormItem
name={`userList.${index}.count`}
name={`detailList.${index}.carton`}
component={Input}
required
......@@ -431,7 +472,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={2}>
<FormItem
name={`userList.${index}.weight`}
name={`detailList.${index}.weight`}
component={Input}
required
......@@ -439,7 +480,7 @@ const Deatail: React.FC<{}> = () => {
</Col>
<Col span={2}>
<FormItem
name={`userList.${index}.tiji`}
name={`detailList.${index}.volume`}
component={Input}
required
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-28 11:40:21
* @LastEditTime: 2020-07-29 15:52:03
*/
import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi'
......@@ -254,7 +254,7 @@ const OrderList: React.FC<ListProps> = (props) => {
</> : ''
}
<Button type='link'>提交</Button>
<Button type='link'>查看</Button>
<Button type='link' onClick={() => handleSee(record.id)}>查看</Button>
</>
)
}
......@@ -293,8 +293,8 @@ const OrderList: React.FC<ListProps> = (props) => {
const handleDelete = () => {
console.log('delete')
}
const handleSee = (record: any) => {
console.log('see')
const handleSee = (id: number) => {
history.push(`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitDeatil?id=${id}`)
}
const confirm = () => {
......@@ -351,7 +351,7 @@ const OrderList: React.FC<ListProps> = (props) => {
style={{textAlign:'right'}}
>
<Tooltip trigger={['focus']} placement='top'
title={props.type === '1' ? '输入物流单号、订单号进行搜索' : '输入物流单号、发货方进行搜索'}>
title='输入物流单号、订单号进行搜索'>
<Input.Search
style={{ width: '232px' }}
value={searchForm.searName}
......@@ -372,34 +372,16 @@ const OrderList: React.FC<ListProps> = (props) => {
span={22}
>
{
props.type === '1' ?
<Select
className={style.select}
value={searchForm.buyer}
onChange={(val) => setSearchForm({ ...searchForm, buyer: val })}
>
<Option value=''>物流服务商(全部)</Option>
<Option value='1'>待审核</Option>
<Option value='2'>审核通过</Option>
<Option value='3'>审核不通过</Option>
</Select>
:
<Select
className={style.select}
value={searchForm.buyer}
onChange={(val) => setSearchForm({ ...searchForm, buyer: val })}
>
<Option value=''>发货方(全部)</Option>
<Option value='1'>待审核</Option>
<Option value='2'>审核通过</Option>
<Option value='3'>审核不通过</Option>
</Select>
}
<Select
className={style.select}
value={searchForm.buyer}
onChange={(val) => setSearchForm({ ...searchForm, buyer: val })}
>
<Option value=''>物流服务商(全部)</Option>
<Option value='1'>待审核</Option>
<Option value='2'>审核通过</Option>
<Option value='3'>审核不通过</Option>
</Select>
<Select
className={style.select}
value={searchForm.TimeRange}
......
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