Commit 7de33b63 authored by LeeJiancong's avatar LeeJiancong

'冲突处理'

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