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
linweijiong
jinfa-platform
Commits
451ebbcd
Commit
451ebbcd
authored
Jul 22, 2020
by
tjy
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
1648706a
0b3876cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
404 additions
and
132 deletions
+404
-132
orderSearchList.tsx
src/pages/logistics/components/orderSearchList.tsx
+166
-87
addCompany.css
src/pages/logistics/list/addCompany.css
+3
-0
addCompany.less
src/pages/logistics/list/addCompany.less
+4
-0
addCompany.tsx
src/pages/logistics/list/addCompany.tsx
+0
-0
company.tsx
src/pages/logistics/list/company.tsx
+57
-22
addressList.tsx
src/pages/logistics/list/components/addressList.tsx
+23
-21
templateForm.tsx
src/pages/logistics/list/components/templateForm.tsx
+2
-1
api.ts
src/services/api.ts
+9
-1
index.ts
src/services/index.ts
+0
-0
API.d.ts
src/services/logistics/API.d.ts
+45
-0
index.ts
src/services/logistics/index.ts
+95
-0
No files found.
src/pages/logistics/components/orderSearchList.tsx
View file @
451ebbcd
import
React
,{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
Card
,
Button
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
React
,
{
useState
,
useEffect
,
useRef
,
ReactNode
}
from
'react'
;
import
{
Card
,
Button
,
Row
,
Col
,
Tooltip
,
Input
,
Select
}
from
'antd'
import
{
UpOutlined
,
DownOutlined
}
from
'@ant-design/icons'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
interface
listProps
{
title
?:
string
,
fromPage
?:
string
|
number
let
{
Option
}
=
Select
interface
listProps
{
title
?:
string
,
fromPage
?:
string
|
number
}
const
data
=
[
{
key
:
'12'
,
oredrNo
:
'WL 52653581'
,
key
:
'12'
,
oredrNo
:
'WL 52653581'
,
status
:
0
}
]
const
statuStyle
=
{
default
:{
padding
:
'2px 5px'
,
background
:
'rgba(244,245,247,1)'
,
borderRadius
:
'4px'
default
:
{
padding
:
'2px 5px'
,
background
:
'rgba(244,245,247,1)'
,
borderRadius
:
'4px'
},
confirm
:{
color
:
'#3F7ED2'
,
padding
:
'2px 5px'
,
background
:
'rgba(240, 248, 255, 1)'
,
borderRadius
:
'4px'
confirm
:
{
color
:
'#3F7ED2'
,
padding
:
'2px 5px'
,
background
:
'rgba(240, 248, 255, 1)'
,
borderRadius
:
'4px'
},
success
:{
color
:
'#00B37A'
,
padding
:
'2px 5px'
,
background
:
'rgba(235,247,242,1)'
,
borderRadius
:
'4px'
success
:
{
color
:
'#00B37A'
,
padding
:
'2px 5px'
,
background
:
'rgba(235,247,242,1)'
,
borderRadius
:
'4px'
},
warn
:{
color
:
'#E63F3B'
,
padding
:
'2px 5px'
,
background
:
'rgba(255,235,230,1)'
,
borderRadius
:
'4px'
warn
:
{
color
:
'#E63F3B'
,
padding
:
'2px 5px'
,
background
:
'rgba(255,235,230,1)'
,
borderRadius
:
'4px'
}
}
...
...
@@ -59,84 +61,91 @@ const fetchData = (params: any) => {
}
const
orderSearchList
:
React
.
FC
<
listProps
>
=
(
props
)
=>
{
const
ref
=
useRef
({})
const
[
selectRow
,
setSelectRow
]
=
useState
<
Item
[]
>
([])
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
selectRow
,
setSelectRow
]
=
useState
<
Item
[]
>
([])
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
let
[
isSearch
,
setIsSearch
]
=
useState
<
boolean
>
(
false
)
const
[
searchForm
,
setSearchForm
]
=
useState
({
searName
:
''
,
dateSelect
:
''
,
outSideStatus
:
''
,
TimeRange
:
''
})
const
handleSee
=
()
=>
{
}
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'物流单号'
,
align
:
'left'
,
dataIndex
:
'oredrNo'
,
key
:
'oredrNo'
title
:
'物流单号'
,
align
:
'left'
,
dataIndex
:
'oredrNo'
,
key
:
'oredrNo'
},
{
title
:
'对应订单号'
,
align
:
'center'
,
dataIndex
:
'key13'
,
key
:
'key13'
title
:
'对应订单号'
,
align
:
'center'
,
dataIndex
:
'key13'
,
key
:
'key13'
},
{
title
:
'收货方'
,
align
:
'left'
,
dataIndex
:
'key12'
,
key
:
'key12'
title
:
'收货方'
,
align
:
'left'
,
dataIndex
:
'key12'
,
key
:
'key12'
},
{
title
:
'物流单号'
,
align
:
'center'
,
dataIndex
:
'key11'
,
key
:
'key11'
title
:
'物流单号'
,
align
:
'center'
,
dataIndex
:
'key11'
,
key
:
'key11'
},
{
title
:
'总箱数'
,
align
:
'center'
,
dataIndex
:
'key222'
,
key
:
'key222'
title
:
'总箱数'
,
align
:
'center'
,
dataIndex
:
'key222'
,
key
:
'key222'
},
{
title
:
'总重量'
,
align
:
'center'
,
dataIndex
:
'key222'
,
key
:
'key222'
},
title
:
'总重量'
,
align
:
'center'
,
dataIndex
:
'key222'
,
key
:
'key222'
},
{
title
:
'总体积'
,
align
:
'center'
,
dataIndex
:
'key22'
,
key
:
'key22'
},
title
:
'总体积'
,
align
:
'center'
,
dataIndex
:
'key22'
,
key
:
'key22'
},
{
title
:
'单据时间'
,
align
:
'left'
,
dataIndex
:
'key2'
,
key
:
'key2'
title
:
'单据时间'
,
align
:
'left'
,
dataIndex
:
'key2'
,
key
:
'key2'
},
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
_
:
any
,
reconds
)
=>
{
let
component
:
ReactNode
=
null
if
(
reconds
.
status
==
0
)
{
title
:
'外部状态'
,
align
:
'center'
,
dataIndex
:
'status'
,
key
:
'status'
,
render
:
(
_
:
any
,
reconds
)
=>
{
let
component
:
ReactNode
=
null
if
(
reconds
.
status
==
0
)
{
component
=
<><
span
style=
{
statuStyle
.
success
}
>
接受物流
</
span
></>
}
else
if
(
reconds
.
status
==
2
)
{
}
else
if
(
reconds
.
status
==
2
)
{
component
=
<><
span
style=
{
statuStyle
.
warn
}
>
不接受物流单
</
span
></>
}
else
if
(
reconds
.
status
==
3
)
{
}
else
if
(
reconds
.
status
==
3
)
{
component
=
<><
span
style=
{
statuStyle
.
confirm
}
>
待确认
</
span
></>
}
else
if
(
reconds
.
status
==
4
)
{
}
else
if
(
reconds
.
status
==
4
)
{
component
=
<><
span
style=
{
statuStyle
.
default
}
>
请提交
</
span
></>
}
return
component
}
},
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'option'
,
render
:
(
_
:
any
,
reconds
)
=>
{
title
:
'操作'
,
align
:
'center'
,
dataIndex
:
'option'
,
render
:
(
_
:
any
,
reconds
)
=>
{
return
(
<
Button
type=
"link"
onClick=
{
handleSee
}
>
查看
</
Button
>
)
...
...
@@ -145,25 +154,95 @@ const orderSearchList: React.FC<listProps> = (props) => {
]
const
rowSelection
=
{
const
rowSelection
=
{
}
const
handleSearch
=
()
=>
{
}
const
handleReset
=
()
=>
{
for
(
let
key
in
searchForm
)
{
searchForm
[
key
]
=
''
}
setSearchForm
({
...
searchForm
})
}
return
(
<
PageHeaderWrapper
title=
'快递单查询'
>
<
Card
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
ref
}
formAlign=
'left'
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
rowClassName=
"editable-row"
columns=
{
columns
}
currentRef=
{
ref
}
formAlign=
'left'
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
rowClassName=
"editable-row"
controlRender=
{
<>
<
Row
>
<
Col
span=
{
12
}
>
<
Tooltip
trigger=
{
[
'focus'
]
}
placement=
'top'
title=
'输入物流单号、发货方进行搜索'
>
<
Input
.
Search
style=
{
{
width
:
'232px'
}
}
value=
{
searchForm
.
searName
}
placeholder=
'搜索'
onChange=
{
(
e
)
=>
setSearchForm
({
...
searchForm
,
searName
:
e
.
target
.
value
})
}
onSearch=
{
()
=>
handleSearch
}
/>
</
Tooltip
>
<
Button
onClick=
{
()
=>
setIsSearch
(
isSearch
=
!
isSearch
)
}
>
高级筛选
{
isSearch
?
<
UpOutlined
/>
:
<
DownOutlined
/>
}
</
Button
>
<
Button
onClick=
{
()
=>
handleReset
()
}
>
重置
</
Button
>
</
Col
>
</
Row
>
<
Row
>
{
isSearch
&&
<
Col
>
<
Select
value=
{
searchForm
.
outSideStatus
}
onChange=
{
(
val
)
=>
setSearchForm
({
...
searchForm
,
outSideStatus
:
val
})
}
>
<
Option
value=
''
>
收货方(全部)
</
Option
>
<
Option
value=
'1'
>
待审核
</
Option
>
<
Option
value=
'2'
>
审核通过
</
Option
>
<
Option
value=
'3'
>
审核不通过
</
Option
>
</
Select
>
<
Select
value=
{
searchForm
.
TimeRange
}
onChange=
{
(
val
)
=>
setSearchForm
({
...
searchForm
,
TimeRange
:
val
})
}
>
<
Option
value=
''
>
单据时间
</
Option
>
<
Option
value=
'1'
>
今天
</
Option
>
<
Option
value=
'2'
>
一周内
</
Option
>
<
Option
value=
'3'
>
一个月内
</
Option
>
<
Option
value=
'4'
>
三个月内
</
Option
>
<
Option
value=
'5'
>
六个月内
</
Option
>
<
Option
value=
'6'
>
一年内
</
Option
>
<
Option
value=
'7'
>
一年前
</
Option
>
</
Select
>
<
Select
value=
{
searchForm
.
outSideStatus
}
onChange=
{
(
val
)
=>
setSearchForm
({
...
searchForm
,
outSideStatus
:
val
})
}
>
<
Option
value=
''
>
外部状态(全部)
</
Option
>
<
Option
value=
'1'
>
待审核
</
Option
>
<
Option
value=
'2'
>
审核通过
</
Option
>
<
Option
value=
'3'
>
审核不通过
</
Option
>
</
Select
>
</
Col
>
}
</
Row
>
</>
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
)
}
}
orderSearchList
.
defaultProps
=
{
}
...
...
src/pages/logistics/list/addCompany.css
0 → 100644
View file @
451ebbcd
.ant-input-group-addon
{
padding
:
0
;
}
src/pages/logistics/list/addCompany.less
0 → 100644
View file @
451ebbcd
.ant-input-group-addon{
padding: 0;
}
\ No newline at end of file
src/pages/logistics/list/addCompany.tsx
View file @
451ebbcd
This diff is collapsed.
Click to expand it.
src/pages/logistics/list/company.tsx
View file @
451ebbcd
/*
* @Date: 2020-07-13 15:01:40
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-
18 15:12:44
* @LastEditTime: 2020-07-
22 11:07:17
*/
import
React
,
{
ReactNode
,
useRef
}
from
'react'
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
}
from
'antd'
import
{
Button
,
Popconfirm
,
Card
,
message
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PlusOutlined
,
...
...
@@ -17,6 +17,8 @@ import {
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
IFormFilter
,
IButtonFilter
}
from
'god/dist/src/standard-table/TableController'
import
{
PublicApi
,
CustomApi
}
from
'@/services/api'
import
{
getCompanyList
,
delCompany
,
updateCompanyStatus
}
from
'@/services/logistics/index'
const
data
=
[
{
...
...
@@ -38,16 +40,12 @@ const data = [
]
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
const
fetchData
=
(
params
?:
any
)
=>
{
console
.
log
(
params
)
//可以直接打印参数
return
new
Promise
((
resolve
,
reject
)
=>
{
const
queryResult
=
data
.
find
(
v
=>
v
.
key
===
params
.
keywords
)
setTimeout
(()
=>
{
resolve
({
code
:
200
,
message
:
''
,
data
:
queryResult
?
[
queryResult
]
:
data
})
},
1000
)
PublicApi
.
getLogisticsCompanyPage
({
current
:
params
.
page
,
pageSize
:
params
.
rows
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
...
...
@@ -57,21 +55,24 @@ const Company: React.FC<{}> = () => {
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'
key
'
,
dataIndex
:
'
id
'
,
align
:
'center'
,
key
:
'
key
'
,
key
:
'
id
'
,
},
{
title
:
'物流公司编码/平台会员ID'
,
align
:
'center'
,
dataIndex
:
'required'
,
key
:
'required'
,
dataIndex
:
'memberId'
,
key
:
"memberId"
,
render
:
(
value
:
any
,
recond
:
any
)
=>
<>
{
recond
.
memberId
?
recond
.
memberId
:
recond
.
code
}
</>
},
{
title
:
'属性名称'
,
dataIndex
:
'
attrN
ame'
,
dataIndex
:
'
n
ame'
,
align
:
'center'
,
key
:
'
attrN
ame'
,
key
:
'
n
ame'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
span
className=
"commonPickColor"
onClick=
{
()
=>
handleSee
(
record
)
}
>
{
text
}
<
EyeOutlined
/></
span
>
},
{
...
...
@@ -113,13 +114,28 @@ const Company: React.FC<{}> = () => {
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
{
const
status
=
record
.
status
===
0
?
'启用'
:
'停用'
const
title
=
`确定要
${
status
}
吗?`
return
(
<>
<
Button
type=
'link'
>
启用
</
Button
>
{
record
.
status
===
0
?
<><
Button
type=
'link'
>
编辑
</
Button
><
Button
type=
'link'
>
删除
</
Button
></>
:
''
}
<
Button
type=
'link'
>
查看
</
Button
>
<
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/addCompany?id=${record.id}`
)
}
>
编辑
</
Button
>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</>
:
''
}
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/memberCenter/logisticsAbility/logistics/list/addCompany?id=${record.id}&isSee=true`
)
}
>
查看
</
Button
>
</>
)
}
...
...
@@ -135,6 +151,7 @@ const Company: React.FC<{}> = () => {
}
]
const
searchBarActions
:
IButtonFilter
[]
=
[
{
type
:
'primary'
,
...
...
@@ -145,6 +162,24 @@ const Company: React.FC<{}> = () => {
}
}
]
const
handleDelete
=
(
id
:
any
)
=>
{
PublicApi
.
postLogisticsCompanyDelete
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
success
(
res
.
message
)
ref
.
current
.
reload
()
}
})
}
const
handleChangeStatus
=
(
id
:
any
,
status
:
any
)
=>
{
let
_status
=
status
==
0
?
1
:
0
PublicApi
.
postLogisticsCompanyEnable
({
id
:
id
,
status
:
_status
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
){
message
.
success
(
res
.
message
)
console
.
log
(
ref
)
ref
.
current
.
reload
()
}
})
}
const
handleSee
=
(
record
:
any
)
=>
{
console
.
log
(
'see'
)
...
...
src/pages/logistics/list/components/addressList.tsx
View file @
451ebbcd
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-14 15:07:34
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-
18 17:48:11
* @LastEditTime: 2020-07-
22 11:47:39
*/
import
React
,
{
Component
,
ReactNode
,
useRef
,
useState
}
from
'react'
import
{
history
}
from
'umi'
...
...
@@ -18,7 +18,7 @@ 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
{
PublicApi
}
from
'@/services/api'
const
data
=
[
{
key
:
'1'
,
...
...
@@ -45,20 +45,7 @@ const data = [
]
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
data
)
// const queryResult = data.find(v => v.key === params.keywords)
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: queryResult ? [queryResult] : data
// })
// }, 1000)
})
}
// const fetchData = (param: any) => {
// return new Promise((resolve) => {
// let reqParam = {
...
...
@@ -153,7 +140,7 @@ const AddressList: React.FC<ListProps> = (props) => {
key
:
'address'
,
render
:
(
_
:
any
,
record
:
any
)
=>
(
<>
{
record
.
a
ddress
}
{
record
.
fullA
ddress
}
</>
)
},
...
...
@@ -166,14 +153,14 @@ const AddressList: React.FC<ListProps> = (props) => {
{
title
:
'手机号码'
,
align
:
'center'
,
dataIndex
:
'phone'
,
key
:
'phone'
,
dataIndex
:
'phone
NO
'
,
key
:
'phone
NO
'
,
},
{
title
:
'电话号码'
,
align
:
'center'
,
dataIndex
:
'tel'
,
key
:
'tel'
,
dataIndex
:
'tel
NO
'
,
key
:
'tel
NO
'
,
},
{
title
:
'是否默认'
,
...
...
@@ -210,6 +197,21 @@ const AddressList: React.FC<ListProps> = (props) => {
}
];
// 模拟请求
const
fetchData
=
(
params
:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
props
.
type
===
'1'
){
//发货
PublicApi
.
getLogisticsShipperAddressPage
({
current
:
params
.
page
,
pageSize
:
params
.
rows
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}
else
{
PublicApi
.
getLogisticsReceiverAddressPage
({
current
:
params
.
page
,
pageSize
:
params
.
rows
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
}
})
}
//生命周期
// useEffect(() => {
// effect
...
...
src/pages/logistics/list/components/templateForm.tsx
View file @
451ebbcd
...
...
@@ -2,7 +2,7 @@
* @Author: LeeJiancong
* @Date: 2020-07-15 10:31:55
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-
18 15:58:56
* @LastEditTime: 2020-07-
22 11:23:30
*/
import
React
,
{
Component
,
useState
,
useEffect
}
from
'react'
;
import
ReactDOM
from
'react-dom'
...
...
@@ -28,6 +28,7 @@ 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
ChinaImg
from
'../../../../../mockStatic/china.png'
...
...
src/services/api.ts
View file @
451ebbcd
/*
* @Author: LeeJiancong
* @Date: 2020-07-22 09:54:50
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-22 10:23:38
*/
import
*
as
Api
from
'./index'
import
request
from
'@/utils/request'
/**
* 可在这里写入自定义的接口
*/
export
const
CustomApi
=
{}
export
const
CustomApi
=
{
}
// 公共的接口,从yapi拉下
export
const
PublicApi
=
Api
src/services/index.ts
View file @
451ebbcd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/services/logistics/API.d.ts
0 → 100644
View file @
451ebbcd
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 16:33:05
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-20 17:02:09
*/
declare
namespace
LogisticsAPI
{
/**
* @description: 只有基础参数
* @param {type} current ;pageSize
* @return:
*/
export
interface
justBaseParams
{
current
:
number
,
pageSize
:
number
}
//删除id
export
interface
delID
{
id
:
number
|
string
}
//查询id
export
interface
detailID
{
id
:
number
}
//添加 || 编辑
export
interface
CompanyItem
{
id
?:
number
,
memberId
?:
number
,
name
:
string
,
code
?:
string
|
number
,
cooperateType
:
number
,
remark
:
string
}
export
interface
CompanyStatus
{
id
:
number
,
status
:
number
|
string
}
}
\ No newline at end of file
src/services/logistics/index.ts
0 → 100644
View file @
451ebbcd
/*
* @Author: LeeJiancong
* @Date: 2020-07-13 16:33:16
* @LastEditors: LeeJiancong
* @LastEditTime: 2020-07-20 17:14:20
*/
import
request
from
'@/utils/request'
;
const
prefix
=
''
/**
* @description 物流公司列表
* @param
*/
export
async
function
getCompanyList
(
params
:
LogisticsAPI
.
justBaseParams
)
{
return
request
(
'/logistics/company/page'
,
{
method
:
'get'
,
prefix
,
params
//get请求 不用写 data: params这样形式
})
}
/**
* @description: 新增公司
* @param {type}
* @return:
*/
export
async
function
addCompany
(
params
:
LogisticsAPI
.
CompanyItem
){
return
request
(
'/logistics/company/add'
,{
method
:
'post'
,
prefix
,
data
:
params
})
}
/**
* @description: 编辑公司
* @param {type}
* @return:
*/
export
async
function
updateCompany
(
params
:
LogisticsAPI
.
CompanyItem
){
return
request
(
'/logistics/company/update'
,{
method
:
'post'
,
prefix
,
data
:
params
})
}
/**
* @description: 删除公司
* @param {type}
* @return:
*/
export
async
function
delCompany
(
params
:
LogisticsAPI
.
delID
){
return
request
(
'/logistics/company/delete'
,{
method
:
'post'
,
prefix
,
data
:
params
})
}
export
async
function
getCompanyDetail
(
params
:
LogisticsAPI
.
delID
){
return
request
(
'/logistics/company/get'
,{
method
:
'get'
,
prefix
,
params
})
}
/**
* @description: 公司状态
* @param {type}
* @return:
*/
export
async
function
updateCompanyStatus
(
params
:
LogisticsAPI
.
CompanyStatus
){
return
request
(
'/logistics/company/enable'
,{
method
:
'post'
,
prefix
,
data
:
params
})
}
/**
* @description: 物流模板列表
* @param {type}
* @return:
*/
export
async
function
freightTemplateList
(
params
:
LogisticsAPI
.
justBaseParams
){
return
request
(
'/logistics/freightTemplate/page'
,{
method
:
'post'
,
prefix
,
data
:
params
})
}
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