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
2fc8ee5e
Commit
2fc8ee5e
authored
Nov 04, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加快递设置
parent
0d921e27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
230 additions
and
0 deletions
+230
-0
Courier.jpg
src/assets/img/Courier.jpg
+0
-0
expressSetup.vue
src/components/setup/expressSetup.vue
+224
-0
index.js
src/router/index.js
+6
-0
No files found.
src/assets/img/Courier.jpg
0 → 100644
View file @
2fc8ee5e
26.9 KB
src/components/setup/expressSetup.vue
0 → 100644
View file @
2fc8ee5e
<
template
>
<div
class=
"expressSetup"
>
<div
class=
"head-title"
style=
"height:55px;"
>
<el-button
@
click=
"addInfo()"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
添加
</el-button>
</div>
<div
class=
"content"
>
<el-table
:data=
"dataList"
v-loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
label=
"类型"
width=
"250px"
>
<template
slot-scope=
"scope"
>
<img
v-if=
"scope.row.Type==1"
style=
"width:100px;margin-left:40px;"
src=
"../../assets/img/aliyun.png"
alt=
""
/>
<img
v-if=
"scope.row.Type==2"
style=
"width:100px;margin-left:40px;"
src=
"../../assets/img/Courier.jpg"
alt=
""
>
<div
style=
"position:relative"
>
<img
v-if=
"scope.row.IsDefault==1"
:class=
"
{'aliyun':scope.row.Type==1,'kuaidiniao':scope.row.Type==2}" src="../../assets/img/userman/select.png" />
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"Id"
label=
"ID"
width=
"150"
>
</el-table-column>
<el-table-column
prop=
"Name"
label=
"别名"
width=
"200"
>
</el-table-column>
<el-table-column
label=
"使用中"
>
<
template
slot-scope=
"scope"
>
<div>
AppCode:
{{
scope
.
row
.
AppCode
}}
</div>
<div>
AppID:
{{
scope
.
row
.
AppID
}}
</div>
<div>
AppKey:
{{
scope
.
row
.
AppKey
}}
</div>
<div>
AppSecret:
{{
scope
.
row
.
AppSecret
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"RquUrl"
label=
"请求地址"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"EditexpressSetup(scope.row)"
class=
"operatImg"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
</
template
>
</el-table-column>
</el-table>
</div>
<el-dialog
:title=
"comTitle"
:visible
.
sync=
"dialogVisible"
width=
"700px"
>
<el-form
:model=
"addMsg"
ref=
"addMsg"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"类型"
class=
"is-required"
>
<div>
<el-radio-group
v-model=
"addMsg.Type"
size=
"small"
>
<el-radio
:label=
"1"
border
:disabled=
"isEdit"
>
阿里云
</el-radio>
<el-radio
:label=
"2"
border
:disabled=
"isEdit"
>
快递鸟
</el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item
label=
"别名"
size=
"small"
prop=
"Name"
>
<el-input
v-model=
"addMsg.Name"
></el-input>
</el-form-item>
<el-form-item
label=
"AppID"
size=
"small"
>
<el-input
v-model=
"addMsg.AppID"
></el-input>
</el-form-item>
<el-form-item
label=
"AppKey"
size=
"small"
>
<el-input
v-model=
"addMsg.AppKey"
></el-input>
</el-form-item>
<el-form-item
label=
"AppSecret"
size=
"small"
>
<el-input
v-model=
"addMsg.AppSecret"
></el-input>
</el-form-item>
<el-form-item
label=
"AppCode"
size=
"small"
>
<el-input
v-model=
"addMsg.AppCode"
></el-input>
</el-form-item>
<el-form-item
label=
"请求地址"
size=
"small"
>
<el-input
v-model=
"addMsg.RquUrl"
></el-input>
</el-form-item>
<el-form-item
label=
"是否默认"
>
<el-switch
v-model=
"addMsg.IsDefault"
active-color=
"#409EFF"
:active-value=
"1"
:inactive-value=
"2"
>
</el-switch>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"dialogVisible=false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"saveInfo()"
>
保存
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
export
default
{
components
:
{},
data
()
{
return
{
//是否线下链接弹窗
loading
:
false
,
dataList
:
[],
comTitle
:
'新增信息'
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
""
},
dialogVisible
:
false
,
//弹窗
addMsg
:
{
Id
:
0
,
IsDefault
:
1
,
//是否默认 1是 2否
RquUrl
:
''
,
//请求地址
AppCode
:
''
,
AppSecret
:
''
,
AppKey
:
''
,
AppID
:
''
,
Name
:
''
,
//别名
Type
:
1
//阿里云 2快递鸟
},
isEdit
:
false
,
// 是否可以修改类型
rules
:
{
Name
:
[
{
required
:
true
,
message
:
'请填写别名'
,
trigger
:
'change'
}
],
},
};
},
created
()
{
},
methods
:
{
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/MallBase/GetExpressConfigList"
,
{},
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
console
.
log
(
res
,
'数据'
);
this
.
dataList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//保存
saveInfo
()
{
if
(
this
.
addMsg
.
Type
==
1
)
{
if
(
this
.
addMsg
.
AppCode
==
''
)
{
this
.
Error
(
'请填写AppCode'
);
return
}
}
if
(
this
.
addMsg
.
Type
==
2
)
{
if
(
this
.
addMsg
.
AppID
==
''
)
{
this
.
Error
(
'请填写AppID'
);
return
}
}
this
.
apipost
(
"/api/MallBase/SetExpressConfig"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getList
();
this
.
clearMsg
();
this
.
dialogVisible
=
false
;
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
//清空值
clearMsg
()
{
this
.
addMsg
.
Id
=
0
,
this
.
addMsg
.
IsDefault
=
1
,
//是否默认 1是 2否
this
.
addMsg
.
RquUrl
=
''
,
//请求地址
this
.
addMsg
.
AppCode
=
''
,
this
.
addMsg
.
AppSecret
=
''
,
this
.
addMsg
.
AppKey
=
''
,
this
.
addMsg
.
AppID
=
''
,
this
.
addMsg
.
Name
=
''
,
//别名
this
.
addMsg
.
Type
=
1
//阿里云 2快递鸟
},
//修改
EditexpressSetup
(
item
)
{
console
.
log
(
item
,
'数据'
);
this
.
isEdit
=
true
;
this
.
dialogVisible
=
true
;
this
.
comTitle
=
'修改信息'
;
this
.
addMsg
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
},
//新增
addInfo
(){
this
.
clearMsg
();
this
.
isEdit
=
false
;
this
.
comTitle
=
'增加信息'
;
this
.
dialogVisible
=
true
;
}
},
mounted
()
{
this
.
getList
();
}
};
</
script
>
<
style
>
.expressSetup
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.expressSetup
.operatImg
{
width
:
32px
;
height
:
32px
;
margin
:
0
10px
}
.expressSetup
.el-table
.cell
{
overflow
:
visible
;
}
.expressSetup
.aliyun
{
position
:
absolute
;
top
:
-72px
;
left
:
-10px
;
width
:
60px
;
}
.expressSetup
.kuaidiniao
{
position
:
absolute
;
top
:
-93px
;
left
:
-10px
;
width
:
60px
;
}
</
style
>
src/router/index.js
View file @
2fc8ee5e
...
...
@@ -1012,6 +1012,12 @@ export default new Router({
name
:
'uploadSettings'
,
component
:
resolve
=>
require
([
'@/components/setup/uploadSettings'
],
resolve
),
},
//设置 快递设置
{
path
:
'/expressSetup'
,
name
:
'expressSetup'
,
component
:
resolve
=>
require
([
'@/components/setup/expressSetup'
],
resolve
),
},
//数据统计 发放统计
{
path
:
'/grantStatistics'
,
...
...
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