Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
黄媛媛
ElectricitySheep
Commits
8c56261d
Commit
8c56261d
authored
Apr 24, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置物流页面
parent
534694f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
533 additions
and
42 deletions
+533
-42
del.png
src/assets/img/setup/del.png
+0
-0
edit.png
src/assets/img/setup/edit.png
+0
-0
addFreightRule.vue
src/components/setup/addFreightRule.vue
+124
-0
basicSetUp.vue
src/components/setup/basicSetUp.vue
+120
-42
ruleSetup.vue
src/components/setup/ruleSetup.vue
+54
-0
freight.vue
src/components/setup/view/freight.vue
+127
-0
logistics.vue
src/components/setup/view/logistics.vue
+96
-0
index.js
src/router/index.js
+12
-0
No files found.
src/assets/img/setup/del.png
0 → 100644
View file @
8c56261d
1.67 KB
src/assets/img/setup/edit.png
0 → 100644
View file @
8c56261d
1.62 KB
src/components/setup/addFreightRule.vue
0 → 100644
View file @
8c56261d
<
style
>
.addFreightRule
.form-box
{
background
:
#fff
;
padding
:
20px
50%
20px
0
;
margin-top
:
10px
;
}
.addFreightRule
.prompt
{
margin
:
-10px
20px
20px
;
background-color
:
#F4F4F5
;
padding
:
10px
15px
;
color
:
#909399
;
display
:
inline-block
;
font-size
:
13px
;
}
</
style
>
<
template
>
<div
class=
"addFreightRule"
>
<div
id=
"pane-first"
>
<div
class=
"form-box"
>
<el-form
:model=
"msg"
style=
"padding:0 50px;"
:rules=
"rules"
ref=
"msg"
label-width=
"90px"
>
<el-form-item
label=
"规则名称"
prop=
"MallName"
class=
"is-required"
>
<el-input
v-model=
"msg.RulesName"
/>
</el-form-item>
<el-form-item
label=
"计费方式"
>
<el-radio-group
v-model=
"msg.LogisticsType"
>
<el-radio
:label=
"1"
>
按重计费
</el-radio>
<el-radio
:label=
"2"
>
按件计费
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"运费规则"
class=
"is-required"
>
<span
style=
"color: #409EFF;font-size: 14px;cursor: pointer;"
@
click=
"dialogFormVisible=true"
>
+新增规则
</span>
</el-form-item>
</el-form>
</div>
<el-button
type=
"primary"
style=
"margin: 12px 0 "
@
click=
"preserve"
>
保存
</el-button>
<el-button
style=
"margin: 12px 0 "
@
click=
"cancel"
>
取消
</el-button>
</div>
<!--新增规则弹窗-->
<el-dialog
title=
"新增规则"
:visible
.
sync=
"dialogFormVisible"
>
<el-form
:model=
"msg.Detail"
:rules=
"rules"
>
<el-row
:gutter=
"0"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"首重(克):"
label-width=
"100px"
style=
"padding: 0px 1rem;"
prop=
"MallName2"
>
<el-input
v-model=
"msg.Detail.First"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"首费(元)"
label-width=
"100px"
style=
"padding: 0px 1rem;"
>
<el-input
v-model=
"msg.Detail.FirstPrice"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"0"
>
<el-col
:span=
"11"
>
<el-form-item
label=
"续重(克):"
label-width=
"100px"
style=
"padding: 0px 1rem;"
>
<el-input
v-model=
"msg.Detail.Second"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"续费(元)"
label-width=
"100px"
style=
"padding: 0px 1rem;"
>
<el-input
v-model=
"msg.Detail.SecondPrice"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"dialogFormVisible = false"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
"addFreightRule"
,
data
(){
return
{
msg
:{
ID
:
""
,
RulesName
:
''
,
jifei
:
1
,
Detail
:{
First
:
0
,
FirstPrice
:
0
,
Second
:
0
,
SecondPrice
:
0
,
}
},
dialogFormVisible
:
false
,
rules
:
{
MallName
:
[
{
required
:
true
,
message
:
"请输入规则名称"
,
trigger
:
"blur"
}
],
MallName2
:
[
{
required
:
true
,
message
:
"请输入规则名称"
,
trigger
:
"blur"
}
],
},
}
},
methods
:{
cancel
(){
this
.
$router
.
go
(
-
1
);
//返回上一层
},
preserve
(){
},
addRule
(){
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/setup/basicSetUp.vue
View file @
8c56261d
This diff is collapsed.
Click to expand it.
src/components/setup/ruleSetup.vue
0 → 100644
View file @
8c56261d
<
style
>
.ruleSetup
.el-tabs__header
{
padding
:
0
20px
;
height
:
56px
;
line-height
:
56px
;
background-color
:
#fff
;
margin-bottom
:
0
;
}
</
style
>
<
template
>
<div
class=
"ruleSetup"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"物流设置"
name=
"first"
>
<vlogistics></vlogistics>
</el-tab-pane>
<el-tab-pane
label=
"运费规则"
name=
"second"
>
<freight
@
AddRule=
"AddRule"
></freight>
</el-tab-pane>
<el-tab-pane
label=
"包邮规则"
name=
"third"
>
包邮规则
</el-tab-pane>
<el-tab-pane
label=
"起送规则"
name=
"fourth"
>
起送规则
</el-tab-pane>
</el-tabs>
</div>
</
template
>
<
script
>
import
vlogistics
from
'./view/logistics'
;
import
freight
from
'./view/freight'
;
export
default
{
name
:
"ruleSetup"
,
data
(){
return
{
activeName
:
'first'
}
},
components
:{
vlogistics
,
freight
},
methods
:
{
handleClick
(
tab
,
event
)
{
// console.log(tab, event);
},
AddRule
(){
this
.
$router
.
push
(
'/addFreightRule'
);
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/setup/view/freight.vue
0 → 100644
View file @
8c56261d
<
style
>
.freight
.form-box
{
background
:
#fff
;
padding
:
10px
0px
0px
;
margin-top
:
10px
;
}
.freight
.table-body
{
padding
:
20px
;
background-color
:
#fff
;
margin-bottom
:
20px
;
}
.freight
.input-item
{
width
:
250px
;
margin
:
0
0
20px
;
}
.freight
.imgstyle
{
width
:
32px
;
height
:
32px
;
margin
:
0
5px
;
}
</
style
>
<
template
>
<div
class=
"freight"
>
<div
id=
"pane-first"
>
<div
class=
"form-box"
>
<div
class=
'table-body'
>
<div
style=
"justify-content: space-between; display: flex;"
>
<div
class=
"input-item"
>
<el-input
placeholder=
"请输入内容"
v-model=
"msg.RulesName"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
></el-button>
</el-input>
</div>
<el-button
type=
"primary"
style=
"margin: -5px 0px; width: 80px; height: 32px; padding: 0"
@
click=
"addRule"
>
添加规则
</el-button>
</div>
<el-table
:data=
"list"
border
style=
"width: 1699px"
>
<el-table-column
fixed
prop=
"RulesName"
label=
"规则名称"
width=
"1339"
>
</el-table-column>
<el-table-column
label=
"是否默认"
width=
"180"
>
<template
slot-scope=
"scope"
>
<el-radio
v-model=
"radio"
:label=
"scope.row.ID"
@
change=
"radioChange"
>
<span
class=
"el-radio__label"
>
默认
</span>
</el-radio>
</
template
>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
src=
"../../../assets/img/setup/edit.png"
alt=
""
class=
"imgstyle"
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
"msg.pageSize"
:total=
"total"
>
</el-pagination>
</div>
</div>
</div>
</div>
</template>
<
script
>
export
default
{
name
:
"freight"
,
data
(){
return
{
list
:[],
msg
:{
pageIndex
:
1
,
pageSize
:
20
,
RulesName
:
''
,
},
radio
:
''
,
//单选按钮绑定值
total
:
0
,
//是否有数据
currentPage
:
1
,
//当前第几页
}
},
methods
:{
GetLogisticsRulesPage
(){
this
.
apipost
(
"/api/MallBase/GetLogisticsRulesPage"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
list
=
res
.
data
.
data
.
pageData
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
radioChange
(){
},
handleCurrentChange
(){
},
addRule
(){
this
.
$emit
(
"AddRule"
,);
}
},
mounted
(){
this
.
GetLogisticsRulesPage
()
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/setup/view/logistics.vue
0 → 100644
View file @
8c56261d
<
style
>
.logistics
.form-box
{
background
:
#fff
;
padding
:
20px
10%
20px
0
;
margin-top
:
10px
;
}
.logistics
.prompt
{
margin
:
-10px
20px
20px
;
background-color
:
#F4F4F5
;
padding
:
10px
15px
;
color
:
#909399
;
display
:
inline-block
;
font-size
:
13px
;
}
</
style
>
<
template
>
<div
class=
"logistics"
>
<div
id=
"pane-first"
>
<div
class=
"form-box"
>
<el-form
:model=
"msg"
style=
"padding:0 50px;"
ref=
"msg"
label-width=
"130px"
>
<el-form-item
label=
"查询类型选择"
>
<el-radio-group
v-model=
"msg.LogisticsType"
>
<el-radio
:label=
"1"
>
快递鸟
</el-radio>
<el-radio
:label=
"2"
>
阿里云接口
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"阿里云APPCODE"
v-if=
"msg.LogisticsType==2"
>
<el-input
v-model=
"msg.AliyunAppCode"
/>
<span><span
style=
"color: rgb(102, 102, 102);"
>
用户获取物流信息,
</span>
<a
href=
"https://market.aliyun.com/products/56928004/cmapi023201.html"
target=
"_blank"
class=
"el-link el-link--primary"
>
<!---->
<span
class=
"el-link--inner"
>
阿里云接口申请
</span>
<!---->
</a></span>
</el-form-item>
<div
class=
"prompt"
v-if=
"msg.LogisticsType==2"
>
温馨提示:以下为电子面单配置,只能填写快递鸟参数
</div>
<el-form-item
label=
"快递鸟用户ID"
>
<el-input
v-model=
"msg.ExpressBirdID"
/>
</el-form-item>
<el-form-item
label=
"快递鸟API KEY"
>
<el-input
v-model=
"msg.ExpressBirdAPIKey"
/>
</el-form-item>
</el-form>
</div>
<el-button
type=
"primary"
style=
"margin: 12px 0 "
@
click=
"preserve"
>
保存
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"logistics"
,
data
(){
return
{
msg
:{
ID
:
0
,
LogisticsType
:
1
,
AliyunAppCode
:
''
,
ExpressBirdID
:
''
,
ExpressBirdAPIKey
:
''
,
}
}
},
methods
:{
GetLogistics
(){
this
.
apipost
(
"/api/MallBase/GetLogistics"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
msg
=
res
.
data
.
data
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
preserve
(){
this
.
apipost
(
"/api/MallBase/AddOrUpdateLogistics"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Info
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
}
},
mounted
(){
this
.
GetLogistics
()
}
}
</
script
>
<
style
scoped
>
</
style
>
src/router/index.js
View file @
8c56261d
...
...
@@ -100,6 +100,18 @@ export default new Router({
name
:
'basicSetUp'
,
component
:
resolve
=>
require
([
'@/components/setup/basicSetUp'
],
resolve
),
},
// 物流设置 规则设置
{
path
:
'/ruleSetup'
,
name
:
'ruleSetup'
,
component
:
resolve
=>
require
([
'@/components/setup/ruleSetup'
],
resolve
),
},
// 物流设置 新增运费规则
{
path
:
'/addFreightRule'
,
name
:
'addFreightRule'
,
component
:
resolve
=>
require
([
'@/components/setup/addFreightRule'
],
resolve
),
},
]
},
...
...
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