Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
前端-黄佳鑫
jinfa-platform
Commits
cb8d7e69
Commit
cb8d7e69
authored
Aug 20, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev
parents
4ffe9dc2
bb787a4a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
43 deletions
+34
-43
logisticsRoutes.ts
config/routes/logisticsRoutes.ts
+7
-7
addCompany.tsx
src/pages/logistics/list/addCompany.tsx
+1
-1
company.tsx
src/pages/logistics/list/company.tsx
+7
-9
addressList.tsx
src/pages/logistics/list/components/addressList.tsx
+5
-5
template.tsx
src/pages/logistics/list/template.tsx
+14
-21
No files found.
config/routes/logisticsRoutes.ts
View file @
cb8d7e69
...
...
@@ -21,40 +21,40 @@ const LogisticsRoute = {
key
:
'logistics'
,
routes
:
[
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
company'
,
path
:
'/memberCenter/logisticsAbility/logistics/company'
,
name
:
'company'
,
component
:
'@/pages/logistics/list/company'
},
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
addCompany'
,
path
:
'/memberCenter/logisticsAbility/logistics/addCompany'
,
name
:
'addCompany'
,
component
:
'@/pages/logistics/list/addCompany'
,
hideInMenu
:
true
},
//送货地址
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
deliveryAddress'
,
path
:
'/memberCenter/logisticsAbility/logistics/deliveryAddress'
,
name
:
'deliveryAddress'
,
component
:
'@/pages/logistics/list/deliveryAddress'
},
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
addressForm'
,
path
:
'/memberCenter/logisticsAbility/logistics/addressForm'
,
name
:
'addressForm'
,
component
:
'@/pages/logistics/list/components/addressForm'
,
hideInMenu
:
true
},
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
receivingAddress'
,
path
:
'/memberCenter/logisticsAbility/logistics/receivingAddress'
,
name
:
'receivingAddress'
,
component
:
'@/pages/logistics/list/receivingAddress'
},
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
template'
,
path
:
'/memberCenter/logisticsAbility/logistics/template'
,
name
:
'template'
,
component
:
'@/pages/logistics/list/template'
},
{
path
:
'/memberCenter/logisticsAbility/logistics/
list/
templateForm'
,
path
:
'/memberCenter/logisticsAbility/logistics/templateForm'
,
name
:
'templateForm'
,
component
:
'@/pages/logistics/list/components/templateForm'
,
hideInMenu
:
true
...
...
src/pages/logistics/list/addCompany.tsx
View file @
cb8d7e69
...
...
@@ -259,7 +259,7 @@ const company: React.FC<{}> = () => {
</
Form
.
Item
>
</
Col
>
{
(
pageStatus
=
==
PageStatus
.
PREVIEW
)
&&
(
pageStatus
!
==
PageStatus
.
PREVIEW
)
&&
<
Col
span=
{
18
}
>
<
Row
>
<
Col
span=
{
6
}
></
Col
>
...
...
src/pages/logistics/list/company.tsx
View file @
cb8d7e69
EyePreview
/*
/*
* @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-
03 16:52:53
* @LastEditTime: 2020-08-
19 10:52:37
*/
import
React
,
{
ReactNode
,
useRef
}
from
'react'
...
...
@@ -20,8 +20,6 @@ import { IFormFilter, IButtonFilter } from 'god/dist/src/standard-table/TableCon
import
{
PublicApi
,
CustomApi
}
from
'@/services/api'
import
EyePreview
from
'@/components/EyePreview'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
{
getCompanyList
,
delCompany
,
updateCompanyStatus
}
from
'@/services/logistics/index'
const
data
=
[
{
key
:
'1'
,
...
...
@@ -76,7 +74,7 @@ const Company: React.FC<{}> = () => {
align
:
'center'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/logisticsAbility/logistics/
list/
addCompany?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
<
EyePreview
url=
{
`/memberCenter/logisticsAbility/logistics/addCompany?id=${record.id}&preview=1`
}
>
{
text
}
</
EyePreview
>
)
},
{
...
...
@@ -109,7 +107,7 @@ const Company: React.FC<{}> = () => {
<>
{
record
.
status
===
0
?
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
addCompany?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/addCompany?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
...
...
@@ -139,7 +137,7 @@ const Company: React.FC<{}> = () => {
text
:
'新建'
,
icon
:
<
PlusOutlined
/>,
handler
:
()
=>
{
history
.
push
(
'/memberCenter/logisticsAbility/logistics/
list/
addCompany'
)
history
.
push
(
'/memberCenter/logisticsAbility/logistics/addCompany'
)
}
}
]
...
...
@@ -157,7 +155,7 @@ const Company: React.FC<{}> = () => {
}
const
handleSee
=
(
id
:
number
)
=>
{
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
addCompany?id=
${
id
}
&isSee=true`
)
history
.
push
(
`/memberCenter/logisticsAbility/logistics/addCompany?id=
${
id
}
&isSee=true`
)
}
const
confirm
=
()
=>
{
...
...
@@ -184,7 +182,7 @@ const Company: React.FC<{}> = () => {
formilyChilds=
{
{
children
:
(
<>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/logisticsAbility/logistics/
list/
addCompany'
)
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
'/memberCenter/logisticsAbility/logistics/addCompany'
)
}
>
新建
<
PlusOutlined
/>
</
Button
>
</>
...
...
src/pages/logistics/list/components/addressList.tsx
View file @
cb8d7e69
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-0
7-29 20:37:05
* @LastEditTime: 2020-0
8-19 10:53:33
*/
import
React
,
{
Component
,
ReactNode
,
useRef
,
useState
}
from
'react'
import
{
history
}
from
'umi'
...
...
@@ -117,12 +117,12 @@ const EditableCell: React.FC<EditableCellProps> = ({
*/
const
AddressList
:
React
.
FC
<
ListProps
>
=
(
props
)
=>
{
console
.
log
(
props
)
const
ref
=
useRef
({})
const
ref
=
useRef
<
any
>
({})
const
[
form
]
=
Form
.
useForm
();
const
[
table
,
setTable
]
=
useState
([])
const
[
editingKey
,
setEditingKey
]
=
useState
(
''
);
const
toEdit
=
(
id
:
number
)
=>
{
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
addressForm?type=
${
props
.
type
}
&id=
${
id
}
`
)
history
.
push
(
`/memberCenter/logisticsAbility/logistics/addressForm?type=
${
props
.
type
}
&id=
${
id
}
`
)
};
const
columns
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -246,7 +246,7 @@ const AddressList: React.FC<ListProps> = (props) => {
text
:
'新建'
,
icon
:
<
PlusOutlined
/>,
handler
:
()
=>
{
history
.
push
(
'/logisticsAbility/logistics/
list/
addCompany'
)
history
.
push
(
'/logisticsAbility/logistics/addCompany'
)
}
}
]
...
...
@@ -280,7 +280,7 @@ const AddressList: React.FC<ListProps> = (props) => {
formilyChilds=
{
{
children
:
(
<>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
addressForm?type=${props.type}&id=0`
)
}
>
新建
</
Button
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/addressForm?type=${props.type}&id=0`
)
}
>
新建
</
Button
>
</>
)
}
}
...
...
src/pages/logistics/list/template.tsx
View file @
cb8d7e69
/*
EyePreview
/*
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-08-
03 11:19:53
* @LastEditTime: 2020-08-
19 11:03:37
*/
import
React
,
{
Component
,
ReactNode
,
useRef
,
useState
}
from
'react'
import
{
history
}
from
'umi'
...
...
@@ -18,6 +18,8 @@ import { PageHeaderWrapper } from '@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
IFormFilter
,
IButtonFilter
}
from
'god/dist/src/standard-table/TableController'
import
StatusSwitch
from
'@/components/StatusSwitch'
import
EyePreview
from
'@/components/EyePreview'
import
{
PublicApi
}
from
'@/services/api'
const
data
=
[
...
...
@@ -124,8 +126,11 @@ const Template: React.FC<ListProps> = (props) => {
{
title
:
'模板名称'
,
dataIndex
:
'name'
,
align
:
'
center
'
,
align
:
'
left
'
,
key
:
'name'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
EyePreview
url=
{
`/memberCenter/logisticsAbility/logistics/templateForm?id=${record.id}&isSee=${true}`
}
>
{
text
}
</
EyePreview
>
)
},
{
title
:
'计价方式'
,
...
...
@@ -160,32 +165,21 @@ const Template: React.FC<ListProps> = (props) => {
align
:
'center'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
_
:
any
,
record
:
any
)
=>
{
return
(
<
Button
type=
"link"
style=
{
record
.
status
===
1
?
{
color
:
'#00B37A'
}
:
{
color
:
'red'
}
}
>
{
record
.
status
===
1
?
'有效'
:
'无效'
}
{
record
.
status
===
1
?
<
PlayCircleOutlined
/>
:
<
PauseCircleOutlined
/>
}
</
Button
>
)
}
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
record=
{
record
}
/>
)
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
_
:
any
,
record
:
any
)
=>
{
const
status
=
record
.
status
===
0
?
'启用'
:
'停用'
const
title
=
`确定要
${
status
}
吗?`
return
(
<>
<
Popconfirm
title=
{
title
}
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleChangeStatus
(
record
.
id
,
record
.
status
)
}
>
<
Button
type=
'link'
>
{
record
.
status
===
0
?
'启用'
:
'停用'
}
</
Button
>
</
Popconfirm
>
{
record
.
status
===
0
?
<>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
templateForm?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/templateForm?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
...
...
@@ -193,7 +187,6 @@ const Template: React.FC<ListProps> = (props) => {
</
Popconfirm
>
</>
:
''
}
<
Button
type=
'link'
onClick=
{
()
=>
handleSee
(
record
.
id
)
}
>
查看
</
Button
>
</>
)
}
...
...
@@ -238,7 +231,7 @@ const Template: React.FC<ListProps> = (props) => {
}
]
const
handleSee
=
(
id
:
number
)
=>
{
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
templateForm?id=
${
id
}
&isSee=
${
true
}
`
)
history
.
push
(
`/memberCenter/logisticsAbility/logistics/templateForm?id=
${
id
}
&isSee=
${
true
}
`
)
}
const
confirm
=
()
=>
{
...
...
@@ -265,7 +258,7 @@ const Template: React.FC<ListProps> = (props) => {
formilyChilds=
{
{
children
:
(
<>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/
list/
templateForm?id=0`
)
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/templateForm?id=0`
)
}
>
新建
</
Button
>
</>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment