Commit d417a4c7 authored by LeeJiancong's avatar LeeJiancong

'修改物流细节问题'

parent 2ca0ea28
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Date: 2020-07-31 19:56:22 * @Date: 2020-07-31 19:56:22
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com * @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-24 15:21:43 * @LastEditTime: 2020-08-25 11:23:35
*/ */
const TranactionRoute = { const TranactionRoute = {
...@@ -74,7 +74,15 @@ const TranactionRoute = { ...@@ -74,7 +74,15 @@ const TranactionRoute = {
name:'SearchList', name:'SearchList',
key:'SearchList', key:'SearchList',
component: '@/pages/transaction/enquirySubmit/toSubmit' component: '@/pages/transaction/enquirySubmit/toSubmit'
} },
{
path:'/memberCenter/tranactionAbility/enquirySubmit/addEnquiry',
name:'addEnquiry',
key:'addEnquiry',
component: '@/pages/transaction/enquirySubmit/toSubmit/detail',
hideInMenu: true,
},
] ]
} }
] ]
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"@umijs/test": "^3.2.0", "@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7", "bizcharts": "^4.0.7",
"copy-to-clipboard": "^3.3.1", "copy-to-clipboard": "^3.3.1",
"god": "^0.1.20", "god": "0.1.24",
"lingxi-design-ui": "^1.0.6", "lingxi-design-ui": "^1.0.6",
"lint-staged": "^10.0.7", "lint-staged": "^10.0.7",
"mobx": "^5.15.4", "mobx": "^5.15.4",
......
...@@ -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-08-24 15:26:39 * @LastEditTime: 2020-08-25 11:25:00
*/ */
export default { export default {
...@@ -95,7 +95,8 @@ export default { ...@@ -95,7 +95,8 @@ export default {
'menu.tranactionAbility.stockSellStorage.addBills': '新增单据', 'menu.tranactionAbility.stockSellStorage.addBills': '新增单据',
'menu.tranactionAbility.stockSellStorage.inventory': '库存', 'menu.tranactionAbility.stockSellStorage.inventory': '库存',
'menu.tranactionAbility.enquirySubmit': '需求发布', 'menu.tranactionAbility.enquirySubmit': '需求发布',
'menu.tranactionAbility.enquirySubmit.SearchList': '需求发布', 'menu.tranactionAbility.enquirySubmit.SearchList': '待新增需求单',
'menu.tranactionAbility.enquirySubmit.addEnquiry': '新增需求单',
//物流能力 //物流能力
'menu.logisticsAbility': '物流', 'menu.logisticsAbility': '物流',
......
...@@ -193,7 +193,7 @@ const company: React.FC<{}> = () => { ...@@ -193,7 +193,7 @@ const company: React.FC<{}> = () => {
rules={[ rules={[
{ {
required: true, required: true,
message: '合作类型为必须项!', message: '选择合作类型!',
}, },
]} ]}
// initialValue={} // initialValue={}
...@@ -215,7 +215,7 @@ const company: React.FC<{}> = () => { ...@@ -215,7 +215,7 @@ const company: React.FC<{}> = () => {
rules={[ rules={[
{ {
required: true, required: true,
message: '物流公司代码/平台会员ID为必须项!', message: '输入物流公司代码/平台会员ID!',
} }
]} ]}
> >
...@@ -228,7 +228,7 @@ const company: React.FC<{}> = () => { ...@@ -228,7 +228,7 @@ const company: React.FC<{}> = () => {
rules={[ rules={[
{ {
required: true, required: true,
message: '物流公司代码/平台会员ID为必须项!', message: '输入物流公司代码/平台会员ID!',
} }
]} ]}
> >
......
/* /*
* @Date: 2020-07-13 15:01:40 * @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong * @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-19 10:52:37 * @LastEditTime: 2020-08-25 14:08:22
*/ */
import React, { ReactNode, useRef } from 'react' import React, { ReactNode, useRef } from 'react'
...@@ -43,11 +43,18 @@ const data = [ ...@@ -43,11 +43,18 @@ const data = [
const fetchData = (params?: any) => { const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数 console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.getLogisticsCompanyPage({ current: params.page, pageSize: params.rows }).then(res => { PublicApi.getLogisticsCompanyPage({ ...params }).then(res => {
resolve(res.data) resolve(res.data)
}) })
}) })
} }
// const fetchData = async (params?: any) => {
// console.log(params)//可以直接打印参数
// let res = await PublicApi.getLogisticsCompanyPage({...params })
// return res.data
// }
const Company: React.FC<{}> = () => { const Company: React.FC<{}> = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
......
...@@ -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-08-24 20:13:06 * @LastEditTime: 2020-08-25 17:24:36
*/ */
import React, { Component, useState, useEffect } from 'react'; import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
...@@ -322,22 +322,28 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -322,22 +322,28 @@ const diaLogForm: React.FC<ListProps> = (props) => {
required required
title="发货人" title="发货人"
name="shipperName" name="shipperName"
maxLength={40}
x-component="Input" x-component="Input"
x-component-props={{ x-component-props={{
placeholder: '请输入发货人' placeholder: '请输入发货人'
}} }}
x-rules= {{
max: 20,
message:'输入发货人字数不能大于20'
}}
/> />
: :
<Field <Field
required required
title="收货人" title="收货人"
name="receiverName" name="receiverName"
maxLength={40}
x-component="Input" x-component="Input"
x-component-props={{ x-component-props={{
placeholder: '请输入收货人' placeholder: '请输入收货人'
}} }}
x-rules= {{
max: 20,
message:'输入收货人字数不能大于20'
}}
/> />
} }
...@@ -377,10 +383,14 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -377,10 +383,14 @@ const diaLogForm: React.FC<ListProps> = (props) => {
required required
title="详细地址" title="详细地址"
name="address" name="address"
maxLength={60}
x-component="TextArea" x-component="TextArea"
x-component-props={{ x-component-props={{
placeholder: '请输入详细地址' placeholder: '请输入详细地址',
autocomplete: 'off'
}}
x-rules= {{
max: 30,
message:'输入详细地址字数不能大于30'
}} }}
/> />
<Field <Field
...@@ -407,7 +417,6 @@ const diaLogForm: React.FC<ListProps> = (props) => { ...@@ -407,7 +417,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-mega-props={{ span: 5 }} x-mega-props={{ span: 5 }}
name="phone" name="phone"
required required
maxLength={11}
x-component="Input" x-component="Input"
x-rules={{ x-rules={{
pattern: PATTERN_MAPS.phone, pattern: PATTERN_MAPS.phone,
......
...@@ -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-08-20 16:45:16 * @LastEditTime: 2020-08-25 14:09:11
*/ */
import React, { Component, ReactNode, useRef, useState } from 'react' import React, { Component, ReactNode, useRef, useState } from 'react'
import { history } from 'umi' import { history } from 'umi'
...@@ -194,11 +194,11 @@ const AddressList: React.FC<ListProps> = (props) => { ...@@ -194,11 +194,11 @@ const AddressList: React.FC<ListProps> = (props) => {
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({...params }).then(res => {
resolve(res.data) resolve(res.data)
}) })
} else { } else {
PublicApi.getLogisticsReceiverAddressPage({ current: params.page, pageSize: params.rows }).then(res => { PublicApi.getLogisticsReceiverAddressPage({...params}).then(res => {
resolve(res.data) resolve(res.data)
}) })
} }
......
...@@ -47,7 +47,7 @@ const data = [ ...@@ -47,7 +47,7 @@ const data = [
// 模拟请求 // 模拟请求
const fetchData = (params: any) => { const fetchData = (params: any) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
PublicApi.getLogisticsFreightTemplatePage({current:params.page, pageSize: params.rows}).then(res=> { PublicApi.getLogisticsFreightTemplatePage({...params}).then(res=> {
resolve(res.data) resolve(res.data)
}) })
}) })
......
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import {
FormSpy,
SchemaForm,
SchemaMarkupField as Field,
createFormActions,
FormButtonGroup,
registerFormFields,
Submit,
FormProvider,
Reset,
connect,
LifeCycleTypes,
FormEffectHooks,
useFormEffects
} from '@formily/antd'
import { history } from 'umi'
import { Row, Col, Card, Button, Popconfirm, Select as ISelect } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import {
MegaLayout, Input, Switch, Select, FormMegaLayout, FormTab,
Radio, ArrayTable, ArrayCards, Transfer
} from '@formily/antd-components'
import { PublicApi } from '@/services/api'
import styles from './templateForm.less';
import ReutrnEle from '@/components/ReturnEle'
import { PATTERN_MAPS } from '@/constants/regExp'
const actions = createFormActions()
const Detail: React.FC<{}> = () => {
const headerTitle = '需求单'
const FormSumbit = (values: any) => {
setTimeout(() => {
history.goBack()
}, 1000)
}
return (
<PageHeaderWrapper
onBack={() => history.goBack()}
backIcon={<ReutrnEle description="返回" />}
title={headerTitle}
extra={
<Button type="primary" onClick={() => actions.submit()}> 保存</Button>
}
>
<Card>
<Row >
<Col span={24}>
<SchemaForm
actions={actions}//要传递
// initialValues={{
// pricingMode: '1',
// transportMode: '1',
// designateList: [{}]
// }}
onSubmit={(values) => FormSumbit(values)}
components={{
Input, Select, TextArea: Input.TextArea, Switch, Radio,
RadioGroup: Radio.Group, ArrayTable, ArrayCards, Transfer
}}
>
<FormTab name="tabs" defaultActiveKey={'tab-1'}>
<FormTab.TabPane name="tab-1" tab="基本信息">
</FormTab.TabPane>
</FormTab>
</SchemaForm>
</Col>
</Row>
</Card>
</PageHeaderWrapper>
)
}
export default Detail
...@@ -5,11 +5,13 @@ import { ...@@ -5,11 +5,13 @@ import {
Card, Card,
Space, Space,
Row, Row,
Col Col,
Dropdown,
Menu
} from 'antd'; } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { import {
PlusOutlined PlusOutlined,DownOutlined,DeleteOutlined
} from '@ant-design/icons'; } 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';
...@@ -22,6 +24,7 @@ import StatusSwitch from '@/components/StatusSwitch'; ...@@ -22,6 +24,7 @@ import StatusSwitch from '@/components/StatusSwitch';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import {timeRange} from '@/utils/index' import {timeRange} from '@/utils/index'
import { createFormActions, FormEffectHooks } from '@formily/antd'; import { createFormActions, FormEffectHooks } from '@formily/antd';
import {PageStatus} from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'; import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { enquierySchema } from '../schema'; import { enquierySchema } from '../schema';
...@@ -36,6 +39,7 @@ const fetchData = async (params: any) => { ...@@ -36,6 +39,7 @@ const fetchData = async (params: any) => {
const List:React.FC<{}> = () => { const List:React.FC<{}> = () => {
const ref = useRef<any>({}) const ref = useRef<any>({})
const [more, setmore] = useState(false) const [more, setmore] = useState(false)
const [selectedRowKeys, setselectedRowKeys] = useState<Array<string>>([])
const columns : ColumnType<any>[] = [ const columns : ColumnType<any>[] = [
{ {
title:'需求单号', title:'需求单号',
...@@ -105,22 +109,34 @@ const List:React.FC<{}> = () => { ...@@ -105,22 +109,34 @@ const List:React.FC<{}> = () => {
console.log('values',values) console.log('values',values)
ref.current.reload(values) ref.current.reload(values)
} }
const controllerBtns = <Row gutter={[0,16]}> const menu = (
<Menu onClick={e => handleBatchDel(e)}>
<Menu.Item key='1' icon={<DeleteOutlined/>}>
批量删除
</Menu.Item>
</Menu>
)
const handleBatchDel = (e:any) => {
}
const rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: (selectedRowKeys: any, selectedRows: any) => {},
}
const controllerBtns = <Row>
<Col span={24}> <Col span={24}>
<Space direction="horizontal" size={16}> <Space direction="horizontal" size={16}>
<Button type="primary" icon={<PlusOutlined/>}>新建</Button> <Button type="primary" onClick={() => history.push('/memberCenter/tranactionAbility/enquirySubmit/addEnquiry')} icon={<PlusOutlined/>}>新建</Button>
<Button >批量提交审核</Button> <Button >批量提交审核</Button>
<Button onClick={() => setmore(!more)}>更多</Button> <Dropdown.Button
</Space> overlay={menu}
</Col> trigger={['click']}
{ icon={<DownOutlined />}
more && >
<Col > 更多
<Space direction="horizontal" size={16}> </Dropdown.Button>
<Button>批量删除</Button>
</Space> </Space>
</Col> </Col>
}
</Row> </Row>
return ( return (
...@@ -131,6 +147,7 @@ const List:React.FC<{}> = () => { ...@@ -131,6 +147,7 @@ const List:React.FC<{}> = () => {
columns={columns} columns={columns}
tableProps={{rowKew:'id'}} tableProps={{rowKew:'id'}}
fetchTableData={(params: any) => fetchData(params)} fetchTableData={(params: any) => fetchData(params)}
rowSelection={rowSelection}
controlRender={ controlRender={
<NiceForm <NiceForm
actions={formActions} actions={formActions}
......
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