Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-equity
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 18861b18
authored
Apr 14, 2021
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增界面优化提示
1 parent
39c1ddb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
18 deletions
src/views/customer/newEquityCard/index.vue
src/views/customer/newEquityCard/index.vue
View file @
18861b1
...
...
@@ -12,7 +12,7 @@
<div
class=
"baseinformation"
>
基础信息
</div>
<div
class=
"itemContainer"
>
<el-form-item
label=
"权益卡名称:"
prop=
"name"
>
<el-input
v-model=
"ruleForm.name"
style=
"width: 60%"
id=
"name
Id
"
></el-input>
<el-input
v-model=
"ruleForm.name"
style=
"width: 60%"
id=
"name"
></el-input>
</el-form-item>
<el-form-item
label=
"权益卡说明:"
prop=
"explain"
>
<el-input
...
...
@@ -20,7 +20,7 @@
type=
"textarea"
v-model=
"ruleForm.explain"
style=
"width: 60%"
id=
"explain
Id
"
id=
"explain"
></el-input>
</el-form-item>
<el-form-item
label=
"套餐有效期:"
prop=
"validity"
...
...
@@ -30,7 +30,7 @@
controls-position=
"right"
:min=
"1"
size=
"mini"
id=
"validity
Id
"
id=
"validity"
></el-input-number>
月内有效
</el-form-item>
...
...
@@ -38,7 +38,7 @@
<div>
权益配置
</div>
<div
class=
"itemContainer"
>
<el-form-item>
<el-checkbox
v-model=
"ruleForm.currencyCheckbox"
>
停驶返嘀币
</el-checkbox>
<el-checkbox
v-model=
"ruleForm.currencyCheckbox"
@
change=
"startcurrencyInputioncheck"
>
停驶返嘀币
</el-checkbox>
</el-form-item>
<el-form-item
label=
"返嘀币(每小时):"
prop=
"currencyInpution"
>
<el-input
...
...
@@ -46,14 +46,14 @@
size=
"middle"
style=
"width: 60%"
:disabled=
"!ruleForm.currencyCheckbox"
id=
"currencyInpution
Id
"
id=
"currencyInpution"
></el-input
>
个
</el-form-item>
</div>
<div
class=
"itemContainer"
>
<el-form-item>
<el-checkbox
v-model=
"ruleForm.oilCheckbox"
>
加油无忧
</el-checkbox>
<el-checkbox
v-model=
"ruleForm.oilCheckbox"
@
change=
"startoilInputioncheck"
>
加油无忧
</el-checkbox>
</el-form-item>
<el-form-item
label=
"油站推荐半径:"
prop=
"oilInpution"
>
<el-input
...
...
@@ -61,7 +61,7 @@
size=
"middle"
style=
"width: 60%"
:disabled=
"!ruleForm.oilCheckbox"
id=
"oilInpution
Id
"
id=
"oilInpution"
></el-input
>
公里
</el-form-item>
...
...
@@ -71,14 +71,14 @@
size=
"middle"
style=
"width: 60%"
:disabled=
"!ruleForm.oilCheckbox"
id=
"timeInpution
Id
"
id=
"timeInpution"
></el-input
>
天
</el-form-item>
</div>
<div
class=
"itemContainer"
>
<el-form-item>
<el-checkbox
v-model=
"ruleForm.worryFreeCheckbox"
>
出险无忧
</el-checkbox>
<el-checkbox
v-model=
"ruleForm.worryFreeCheckbox"
@
change=
"startpushCollisioncheck"
>
出险无忧
</el-checkbox>
</el-form-item>
<el-form-item
label=
"启用碰撞推送:"
prop=
"pushCollision"
>
<el-switch
...
...
@@ -94,7 +94,7 @@
</div>
<div
class=
"itemContainer"
>
<el-form-item>
<el-checkbox
v-model=
"ruleForm.specialOfferCheckbox"
>
特惠商品
</el-checkbox>
<el-checkbox
v-model=
"ruleForm.specialOfferCheckbox"
@
change=
"startrebateRatiocheck"
>
特惠商品
</el-checkbox>
</el-form-item>
<el-form-item
label=
"嘀币返利比例(%):"
prop=
"rebateRatio"
>
<el-input
...
...
@@ -102,7 +102,7 @@
size=
"middle"
style=
"width: 60%"
:disabled=
"!ruleForm.specialOfferCheckbox"
id=
"rebateRatio
Id
"
id=
"rebateRatio"
></el-input>
</el-form-item>
...
...
@@ -171,7 +171,7 @@ export default {
message
:
"请输入长度在2-10以内的权益卡名称"
,
trigger
:
"blur"
,
},
{
min
:
2
,
max
:
10
,
message
:
"长度在 2 到 10 个字符"
,
trigger
:
"blur"
}
,
{
min
:
2
,
max
:
10
,
message
:
"长度在 2 到 10 个字符"
,
trigger
:
"blur"
}
],
explain
:
[
{
...
...
@@ -179,10 +179,18 @@ export default {
max
:
200
,
required
:
true
,
message
:
"请填写200字以内的说明"
,
trigger
:
"blur"
,
trigger
:
"blur"
},
],
validity
:
[{
required
:
true
,
message
:
"请选择有效期"
,
trigger
:
"blur"
}],
currencyInpution
:
[{
required
:
false
,
message
:
"请填写嘀币值"
,
trigger
:
"blur"
}],
oilInpution
:[{
required
:
false
,
message
:
"请填写半径值"
,
trigger
:
"blur"
}],
timeInpution
:[{
required
:
false
,
message
:
"请填写最长间隔"
,
trigger
:
"blur"
}],
rebateRatio
:[{
required
:
false
,
message
:
"嘀币返利比例"
,
trigger
:
"blur"
}]
// currencyInpution: [
// { required: true, message: "请填写返回的嘀币数", trigger: "blur" },
// ],
...
...
@@ -193,11 +201,31 @@ export default {
};
},
methods
:
{
jumpScroll
(
idName
)
{
document
.
getElementById
(
idName
).
scrollIntoView
();
//开启input验证
startcurrencyInputioncheck
(){
this
.
rules
.
currencyInpution
[
0
].
required
=
!
this
.
rules
.
currencyInpution
[
0
].
required
this
.
$refs
.
ruleForm
.
clearValidate
();
},
startoilInputioncheck
(){
this
.
rules
.
oilInpution
[
0
].
required
=
!
this
.
rules
.
oilInpution
[
0
].
required
this
.
rules
.
timeInpution
[
0
].
required
=
!
this
.
rules
.
timeInpution
[
0
].
required
this
.
$refs
.
ruleForm
.
clearValidate
();
},
startpushCollisioncheck
(){
this
.
rules
.
pushCollision
[
0
].
required
=
!
this
.
rules
.
pushCollision
[
0
].
required
this
.
$refs
.
ruleForm
.
clearValidate
();
},
startrebateRatiocheck
(){
this
.
rules
.
rebateRatio
[
0
].
required
=
!
this
.
rules
.
rebateRatio
[
0
].
required
this
.
$refs
.
ruleForm
.
clearValidate
();
},
//检验跳转
jumpScroll
(
nameId
)
{
document
.
getElementById
(
nameId
).
scrollIntoView
();
},
cancel
()
{
window
.
history
.
go
(
-
1
);
this
.
ruleForm
=
{};
},
jump
(
formName
)
{
var
equityItemJson
=
{
...
...
@@ -275,7 +303,7 @@ export default {
this
.
ruleForm
=
{};
this
.
$message
({
message
:
"增加成功!"
,
type
:
"
error
"
,
type
:
"
success
"
,
});
}
else
{
...
...
@@ -286,8 +314,13 @@ export default {
message
:
"增加失败!"
,
type
:
"error"
,
});
console
.
log
(
options
)
this
.
jumpScroll
(
options
)
console
.
log
(
Object
.
keys
(
options
))
//转换成prop对应的id,需要分别转,最好id取唯一的prop值
// var temp = {
// "name": 'nameId'
// }
// this.jumpScroll(temp[Object.keys(options)[0]])
this
.
jumpScroll
(
Object
.
keys
(
options
)[
0
])
return
false
;
}
});
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment