Commit d417a4c7 authored by LeeJiancong's avatar LeeJiancong

'修改物流细节问题'

parent 2ca0ea28
......@@ -3,7 +3,7 @@
* @Date: 2020-07-31 19:56:22
* @LastEditors: LeeJiancong
* @Copyright: 1549414730@qq.com
* @LastEditTime: 2020-08-24 15:21:43
* @LastEditTime: 2020-08-25 11:23:35
*/
const TranactionRoute = {
......@@ -74,7 +74,15 @@ const TranactionRoute = {
name:'SearchList',
key:'SearchList',
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 @@
"@umijs/test": "^3.2.0",
"bizcharts": "^4.0.7",
"copy-to-clipboard": "^3.3.1",
"god": "^0.1.20",
"god": "0.1.24",
"lingxi-design-ui": "^1.0.6",
"lint-staged": "^10.0.7",
"mobx": "^5.15.4",
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-13 14:08:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-24 15:26:39
* @LastEditTime: 2020-08-25 11:25:00
*/
export default {
......@@ -95,7 +95,8 @@ export default {
'menu.tranactionAbility.stockSellStorage.addBills': '新增单据',
'menu.tranactionAbility.stockSellStorage.inventory': '库存',
'menu.tranactionAbility.enquirySubmit': '需求发布',
'menu.tranactionAbility.enquirySubmit.SearchList': '需求发布',
'menu.tranactionAbility.enquirySubmit.SearchList': '待新增需求单',
'menu.tranactionAbility.enquirySubmit.addEnquiry': '新增需求单',
//物流能力
'menu.logisticsAbility': '物流',
......
......@@ -193,7 +193,7 @@ const company: React.FC<{}> = () => {
rules={[
{
required: true,
message: '合作类型为必须项!',
message: '选择合作类型!',
},
]}
// initialValue={}
......@@ -215,7 +215,7 @@ const company: React.FC<{}> = () => {
rules={[
{
required: true,
message: '物流公司代码/平台会员ID为必须项!',
message: '输入物流公司代码/平台会员ID!',
}
]}
>
......@@ -228,7 +228,7 @@ const company: React.FC<{}> = () => {
rules={[
{
required: true,
message: '物流公司代码/平台会员ID为必须项!',
message: '输入物流公司代码/平台会员ID!',
}
]}
>
......
/*
* @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-19 10:52:37
* @LastEditTime: 2020-08-25 14:08:22
*/
import React, { ReactNode, useRef } from 'react'
......@@ -40,14 +40,21 @@ const data = [
]
// 模拟请求
const fetchData = (params?: any) => {
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
return new Promise((resolve, reject) => {
PublicApi.getLogisticsCompanyPage({ current: params.page, pageSize: params.rows }).then(res => {
PublicApi.getLogisticsCompanyPage({ ...params }).then(res => {
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 ref = useRef<any>({})
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-24 20:13:06
* @LastEditTime: 2020-08-25 17:24:36
*/
import React, { Component, useState, useEffect } from 'react';
import ReactDOM from 'react-dom'
......@@ -322,22 +322,28 @@ const diaLogForm: React.FC<ListProps> = (props) => {
required
title="发货人"
name="shipperName"
maxLength={40}
x-component="Input"
x-component-props={{
placeholder: '请输入发货人'
}}
x-rules= {{
max: 20,
message:'输入发货人字数不能大于20'
}}
/>
:
<Field
required
title="收货人"
name="receiverName"
maxLength={40}
x-component="Input"
x-component-props={{
placeholder: '请输入收货人'
}}
x-rules= {{
max: 20,
message:'输入收货人字数不能大于20'
}}
/>
}
......@@ -377,10 +383,14 @@ const diaLogForm: React.FC<ListProps> = (props) => {
required
title="详细地址"
name="address"
maxLength={60}
x-component="TextArea"
x-component-props={{
placeholder: '请输入详细地址'
placeholder: '请输入详细地址',
autocomplete: 'off'
}}
x-rules= {{
max: 30,
message:'输入详细地址字数不能大于30'
}}
/>
<Field
......@@ -407,7 +417,6 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x-mega-props={{ span: 5 }}
name="phone"
required
maxLength={11}
x-component="Input"
x-rules={{
pattern: PATTERN_MAPS.phone,
......@@ -421,7 +430,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
}}
/>
</FormMegaLayout>
<FormMegaLayout label='电话号码' grid full>
<FormMegaLayout label='电话号码' grid full>
{/* <Field
x-mega-props={{ span: 1 }}
name="phoneHead"
......
......@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @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 { history } from 'umi'
......@@ -194,11 +194,11 @@ const AddressList: React.FC<ListProps> = (props) => {
return new Promise((resolve, reject) => {
if (props.type === '1') {//发货
PublicApi.getLogisticsShipperAddressPage({ current: params.page, pageSize: params.rows }).then(res => {
PublicApi.getLogisticsShipperAddressPage({...params }).then(res => {
resolve(res.data)
})
} else {
PublicApi.getLogisticsReceiverAddressPage({ current: params.page, pageSize: params.rows }).then(res => {
PublicApi.getLogisticsReceiverAddressPage({...params}).then(res => {
resolve(res.data)
})
}
......
......@@ -47,7 +47,7 @@ const data = [
// 模拟请求
const fetchData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getLogisticsFreightTemplatePage({current:params.page, pageSize: params.rows}).then(res=> {
PublicApi.getLogisticsFreightTemplatePage({...params}).then(res=> {
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 {
Card,
Space,
Row,
Col
Col,
Dropdown,
Menu
} from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import {
PlusOutlined
PlusOutlined,DownOutlined,DeleteOutlined
} from '@ant-design/icons';
import { StandardTable } from 'god';
import { ColumnType } from 'antd/lib/table/interface';
......@@ -22,6 +24,7 @@ import StatusSwitch from '@/components/StatusSwitch';
import NiceForm from '@/components/NiceForm';
import {timeRange} from '@/utils/index'
import { createFormActions, FormEffectHooks } from '@formily/antd';
import {PageStatus} from '@/hooks/usePageStatus'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import { enquierySchema } from '../schema';
......@@ -36,6 +39,7 @@ const fetchData = async (params: any) => {
const List:React.FC<{}> = () => {
const ref = useRef<any>({})
const [more, setmore] = useState(false)
const [selectedRowKeys, setselectedRowKeys] = useState<Array<string>>([])
const columns : ColumnType<any>[] = [
{
title:'需求单号',
......@@ -105,22 +109,34 @@ const List:React.FC<{}> = () => {
console.log('values',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}>
<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 onClick={() => setmore(!more)}>更多</Button>
<Dropdown.Button
overlay={menu}
trigger={['click']}
icon={<DownOutlined />}
>
更多
</Dropdown.Button>
</Space>
</Col>
{
more &&
<Col >
<Space direction="horizontal" size={16}>
<Button>批量删除</Button>
</Space>
</Col>
}
</Row>
return (
......@@ -131,6 +147,7 @@ const List:React.FC<{}> = () => {
columns={columns}
tableProps={{rowKew:'id'}}
fetchTableData={(params: any) => fetchData(params)}
rowSelection={rowSelection}
controlRender={
<NiceForm
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