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
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
...
...
@@ -2,7 +2,9 @@
.basicSetUp
.el-tabs__header
{
padding
:
0
20px
;
height
:
56px
;
line-height
:
56px
;
background-color
:
#fff
;
margin-bottom
:
0
;
}
.basicSetUp
.title
{
margin-top
:
10px
;
padding
:
18px
20px
;
...
...
@@ -107,7 +109,7 @@
</
style
>
<
template
>
<div
class=
"basicSetUp"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"基本信息"
name=
"first"
>
<div
id=
"pane-first"
>
<div
class=
"title"
><span>
基本设置
</span></div>
...
...
@@ -164,28 +166,28 @@
style=
"position: absolute;left: -10px;top:13px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"msg.CancelTime"
type=
"number"
class=
"inputM_l"
>
<el-input
v-model=
"msg.CancelTime"
type=
"number"
class=
"inputM_l"
:min=
"0"
>
<template
slot=
"append"
>
分
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"自动确认收货时间"
>
<el-form-item
label=
"自动确认收货时间"
prop=
"AutoReceiving"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"从发货到自动确认的时间"
placement=
"top"
style=
"position: absolute;left: -10px;top:13px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"msg.AutoReceiving"
type=
"number"
class=
"inputM_l"
>
<el-input
v-model=
"msg.AutoReceiving"
type=
"number"
class=
"inputM_l"
:min=
"0"
>
<
template
slot=
"append"
>
天
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"售后时间"
>
<el-form-item
label=
"售后时间"
prop=
"AfterTime"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"可以申请售后的时间。注意:分销订单中的已完成订单,只有订单已确认收货,并且时间超过设置的售后天数之后才计入其中!"
placement=
"top"
style=
"position: absolute;left: -10px;top:13px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-input
v-model=
"msg.AfterTime"
type=
"number"
class=
"inputM_l"
>
<el-input
v-model=
"msg.AfterTime"
type=
"number"
class=
"inputM_l"
:min=
"0"
>
<
template
slot=
"append"
>
天
</
template
>
</el-input>
</el-form-item>
...
...
@@ -195,11 +197,10 @@
style=
"position: absolute;left: -10px;top:13px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-checkbox-group
v-model=
"msg.PayWay"
class=
"inputM_l"
>
<el-checkbox
label=
"线上支付"
></el-checkbox>
<el-checkbox
label=
"货到付款"
></el-checkbox>
<el-checkbox
label=
"余额支付"
></el-checkbox>
<el-checkbox-group
v-model=
"checkbox.PayWay"
class=
"inputM_l"
@
change=
"checkedPayWay"
>
<el-checkbox
v-for=
"team in PayWaylist"
:label=
"team.Id"
:key=
"team.name"
>
{{team.name}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
...
...
@@ -208,10 +209,8 @@
style=
"position: absolute;left: -10px;top:13px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-checkbox-group
v-model=
"msg.DeliverWay"
class=
"inputM_l"
>
<el-checkbox
label=
"快递配送"
></el-checkbox>
<el-checkbox
label=
"到店自提"
></el-checkbox>
<el-checkbox
label=
"同城配送"
></el-checkbox>
<el-checkbox-group
v-model=
"checkbox.DeliverWay"
class=
"inputM_l"
@
change=
"checkedDeliverWay"
>
<el-checkbox
v-for=
"team in DeliverWaylist"
:label=
"team.Id"
:key=
"team.name"
>
{{team.name}}
</el-checkbox>
</el-checkbox-group>
<div
style=
"color: rgb(204, 204, 204);"
class=
"inputM_l"
>
注:手机端显示排序(
<span>
1.同城配送
</span><span>
2.到店自提
</span><span>
3.快递配送
</span>
)
...
...
@@ -233,10 +232,8 @@
style=
"position: absolute;left: -10px;top:13px"
>
<i
class=
"el-tooltip el-icon-info"
></i>
</el-tooltip>
<el-checkbox-group
v-model=
"msg.ConsultWay"
class=
"inputM_l"
>
<el-checkbox
label=
"在线客服"
></el-checkbox>
<el-checkbox
label=
"联系电话"
></el-checkbox>
<el-checkbox
label=
"外链客服"
></el-checkbox>
<el-checkbox-group
v-model=
"checkbox.ConsultWay"
class=
"inputM_l"
@
change=
"checkedConsultWay"
>
<el-checkbox
v-for=
"team in ConsultWaylist"
:label=
"team.Id"
:key=
"team.name"
>
{{team.name}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
...
...
@@ -618,7 +615,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.UnfoldIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.UnfoldIco =='' "
src=
"../../assets/img/setup/quick_navigation_opened_pic.png"
alt=
""
>
<img
v-if=
"msg.UnfoldIco ==''
|| msg.UnfoldIco==null
"
src=
"../../assets/img/setup/quick_navigation_opened_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.UnfoldIco"
alt=
""
>
</div>
...
...
@@ -629,7 +626,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.PackUpIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.PackUpIco =='' "
src=
"../../assets/img/setup/quick_navigation_closed_pic.png"
alt=
""
>
<img
v-if=
"msg.PackUpIco ==''
|| msg.PackUpIco==null
"
src=
"../../assets/img/setup/quick_navigation_closed_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.PackUpIco"
alt=
""
>
</div>
...
...
@@ -651,7 +648,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.OnlineServiceIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.OnlineServiceIco =='' "
src=
"../../assets/img/setup/customer_services_pic.png"
alt=
""
>
<img
v-if=
"msg.OnlineServiceIco ==''
|| msg.OnlineServiceIco==null
"
src=
"../../assets/img/setup/customer_services_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.OnlineServiceIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -673,7 +670,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.BackTopNavigationIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.BackTopNavigationIco =='' "
src=
"../../assets/img/setup/quick_home_pic.png"
alt=
""
>
<img
v-if=
"msg.BackTopNavigationIco ==''
|| msg.BackTopNavigationIco==null
"
src=
"../../assets/img/setup/quick_home_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.BackTopNavigationIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -695,7 +692,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.OneCallIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.OneCallIco =='' "
src=
"../../assets/img/setup/dial_pic.png"
alt=
""
>
<img
v-if=
"msg.OneCallIco ==''
|| msg.OneCallIco==null
"
src=
"../../assets/img/setup/dial_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.OneCallIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -717,7 +714,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.ServiceOutLinkIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.ServiceOutLinkIco =='' "
src=
"../../assets/img/setup/web_service_pic.png"
alt=
""
>
<img
v-if=
"msg.ServiceOutLinkIco ==''
|| msg.ServiceOutLinkIco==null
"
src=
"../../assets/img/setup/web_service_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.ServiceOutLinkIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -739,7 +736,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.ShortcutNavigationIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.ShortcutNavigationIco =='' "
src=
"../../assets/img/setup/quick_map_pic.png"
alt=
""
>
<img
v-if=
"msg.ShortcutNavigationIco ==''
|| msg.ShortcutNavigationIco==null
"
src=
"../../assets/img/setup/quick_map_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.ShortcutNavigationIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -761,7 +758,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.TurnMiniIco =''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.TurnMiniIco =='' "
src=
"../../assets/img/setup/small_app_pic.png"
alt=
""
>
<img
v-if=
"msg.TurnMiniIco ==''
|| msg.TurnMiniIco==null
"
src=
"../../assets/img/setup/small_app_pic.png"
alt=
""
>
<img
v-else
:src=
"msg.TurnMiniIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -794,7 +791,7 @@
</el-tooltip>
<el-button
type=
"primary"
@
click=
"msg.TurnIco=''"
>
恢复默认
</el-button>
<div
class=
"img_yuan"
>
<img
v-if=
"msg.TurnIco=='' "
src=
"../../assets/img/setup/default_img.png"
alt=
""
>
<img
v-if=
"msg.TurnIco==''
|| msg.TurnIco==null
"
src=
"../../assets/img/setup/default_img.png"
alt=
""
>
<img
v-else
:src=
"msg.TurnIco"
alt=
""
>
</div>
</el-form-item>
...
...
@@ -867,8 +864,9 @@
</div>
</el-tab-pane>
<el-button
type=
"primary"
style=
"margin: 12px 0 "
@
click=
"preserve"
>
保存
</el-button>
</el-tabs>
<el-button
type=
"primary"
style=
"margin: 12px 0 "
>
保存
</el-button>
</div>
...
...
@@ -883,9 +881,8 @@
activeName
:
'first'
,
activeName2
:
'one'
,
msg
:
{
ID
:
''
,
ID
:
''
,
MallName
:
''
,
//商城名称
TenantId
:
''
,
//商户号
Indate
:
''
,
//有效期
ContactNumber
:
''
,
//联系号码
OuterServiceLink
:
''
,
...
...
@@ -893,13 +890,13 @@
LongAndLat
:
''
,
MinAppId
:
''
,
MinUrl
:
''
,
CancelTime
:
''
,
AutoReceiving
:
''
,
AfterTime
:
''
,
PayWay
:
[]
,
DeliverWay
:
[]
,
CancelTime
:
0
,
AutoReceiving
:
0
,
AfterTime
:
0
,
PayWay
:
''
,
DeliverWay
:
''
,
BalanceFun
:
0
,
ConsultWay
:
[]
,
ConsultWay
:
''
,
MinSwitch
:
1
,
MinBackColor
:
'#000000'
,
MinBackClarity
:
100
,
...
...
@@ -937,7 +934,7 @@
GoodsNormalPic
:
''
,
GoodsZoomPic
:
''
,
SuspendStyle
:
1
,
UnfoldIco
:
''
,
UnfoldIco
:
0
,
PackUpIco
:
''
,
OnlineService
:
0
,
OnlineServiceIco
:
''
,
...
...
@@ -951,9 +948,15 @@
ShortcutNavigationIco
:
''
,
TurnMini
:
0
,
TurnMiniIco
:
''
,
Custom
:
1
,
Custom
:
0
,
TurnLink
:
''
,
TurnIco
:
''
,
TurnIco
:
0
,
},
checkbox
:{
PayWay
:[],
DeliverWay
:
[],
ConsultWay
:
[],
},
predefineColors
:
[
'#000000'
,
...
...
@@ -961,6 +964,10 @@
'#888888'
,
'#FF4544'
,
],
PayWaylist
:[{
'Id'
:
1
,
'name'
:
'线上支付'
},{
'Id'
:
2
,
'name'
:
'货到付款'
},{
'Id'
:
3
,
'name'
:
'余额支付'
},],
DeliverWaylist
:[{
'Id'
:
1
,
'name'
:
'快速配送'
},{
'Id'
:
2
,
'name'
:
'到店自提'
},{
'Id'
:
3
,
'name'
:
'同城配送'
},],
ConsultWaylist
:[{
'Id'
:
1
,
'name'
:
'在线客服'
},{
'Id'
:
2
,
'name'
:
'联系电话'
},{
'Id'
:
3
,
'name'
:
'外链客服'
},],
MinIcoColorlist
:[{
'Id'
:
1
,
'name'
:
'白色'
},{
'Id'
:
2
,
'name'
:
'黑色'
}],
target_o
:
1
,
target_o2
:
1
,
target_o3
:
1
,
...
...
@@ -968,9 +975,16 @@
MallName
:
[
{
required
:
true
,
message
:
"请输入商城名称"
,
trigger
:
"blur"
}
],
CancelTime
:
[
{
required
:
true
,
message
:
"未支付订单超时时间必须为整数"
,
trigger
:
"blur"
}
CancelTime
:[
{
validator
:
this
.
isNumber
,
trigger
:
'blur'
}
],
AutoReceiving
:[
{
validator
:
this
.
isNumber
,
trigger
:
'blur'
}
],
AfterTime
:[
{
validator
:
this
.
isNumber
,
trigger
:
'blur'
}
]
},
};
...
...
@@ -985,6 +999,28 @@
inputChange
()
{
//输入框值改变
this
.
msg
.
tipstext
=
this
.
msg
.
tipstext
.
replace
(
/
[^\d]
/g
,
''
)
},
getSetup
(){
this
.
apipost
(
"/api/MallBase/GetMallBaseInfo"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
msg
=
res
.
data
.
data
;
// this.checkbox.PayWay= this.msg.PayWay.split(',');
this
.
checkbox
.
PayWay
=
this
.
checkboxfor
(
this
.
msg
.
PayWay
)
this
.
checkbox
.
DeliverWay
=
this
.
checkboxfor
(
this
.
msg
.
DeliverWay
);
this
.
checkbox
.
ConsultWay
=
this
.
checkboxfor
(
this
.
msg
.
ConsultWay
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
checkboxfor
(
str
){
let
data
=
(
str
||
""
).
split
(
','
);
let
list
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
list
.
push
(
Number
(
data
[
i
]))
}
return
list
},
target
(
btn
){
this
.
target_o
=
btn
},
...
...
@@ -994,10 +1030,52 @@
target3
(
btn
){
this
.
target_o3
=
btn
},
checkedPayWay
(
value
){
let
PayWay
=
value
.
join
(
","
);
this
.
msg
.
PayWay
=
PayWay
},
checkedDeliverWay
(
value
){
let
DeliverWay
=
value
.
join
(
","
);
this
.
msg
.
DeliverWay
=
DeliverWay
},
checkedConsultWay
(
value
){
let
ConsultWay
=
value
.
join
(
","
);
this
.
msg
.
ConsultWay
=
ConsultWay
},
preserve
(){
if
(
this
.
msg
.
MallName
==
""
)
{
this
.
Info
(
"请输入商城名称!"
)
return
}
this
.
apipost
(
"/api/MallBase/AddOrUpdateMallBase"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Info
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
isNumber
(
rule
,
value
,
callback
)
{
if
(
value
===
''
)
{
return
callback
();
}
//这是用来判断如果不是必须输入的,则直接跳出
const
r
=
/^
\+?[
0-9
][
0-9
]
*$/
;
// 正整数
// 如果判断不符合正则,则不是正整数不能提交
if
(
!
r
.
test
(
value
))
{
return
callback
(
new
Error
(
'时间必须为整数'
));
}
else
{
return
callback
();
}
},
},
computed
:{
},
mounted
(){
this
.
getSetup
();
}
}
</
script
>
...
...
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