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
ace8f882
Commit
ace8f882
authored
Apr 06, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e3d26597
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
313 additions
and
0 deletions
+313
-0
depositCenter.vue
src/components/UserMan/depositCenter.vue
+158
-0
editDeposit.vue
src/components/UserMan/editDeposit.vue
+143
-0
index.js
src/router/index.js
+12
-0
No files found.
src/components/UserMan/depositCenter.vue
0 → 100644
View file @
ace8f882
<
template
>
<div
class=
"verificationMember depositCenter"
>
<div
class=
"head-title"
>
储蓄卡列表
<el-button
@
click=
"addDeposit"
style=
"float:right;margin-top: -5px;"
size=
"small"
type=
"primary"
>
新增储值卡
</el-button>
</div>
<div
class=
"content"
>
<div>
<div
class=
"searchInput"
>
<el-input
style=
"display:inline-block;width:225px;height:30px"
placeholder=
"请输入存储卡名称"
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getList()"
@
clear=
"msg.pageIndex=1,getList()"
v-model=
"msg.Name"
size=
"small"
clearable
>
</el-input>
<span
@
click=
"msg.pageIndex=1,getList()"
class=
"el-icon-search"
style=
"color:#979dad;font-size:14px;position:relative;top:1px"
></span>
</div>
</div>
<el-table
:data=
"tableData"
:loading=
"loading"
border
style=
"width: 100%;margin:20px 0"
>
<el-table-column
prop=
"ID"
label=
"编号"
>
</el-table-column>
<el-table-column
prop=
"Name"
label=
"名称"
>
</el-table-column>
<el-table-column
prop=
"SalePrice"
label=
"售价"
>
</el-table-column>
<el-table-column
prop=
"CouponIco"
label=
"封面"
>
<template
slot-scope=
"scope"
>
<img
:src=
"scope.row.CouponIco"
style=
"width:40px;"
alt=
""
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"DepositPrice"
label=
"金额"
>
</el-table-column>
<el-table-column
prop=
"IndateDay"
label=
"有效期天数"
>
</el-table-column>
<el-table-column
prop=
"address"
width=
"200"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<img
@
click=
"Edit(scope.row)"
style=
"width:32px;height:32px"
src=
"../../assets/img/userman/edit.png"
alt=
""
>
<img
@
click=
"Delete(scope.row)"
style=
"width:32px;height:32px;margin:0 10px"
src=
"../../assets/img/userman/del.png"
alt=
""
>
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:current-page
.
sync=
"msg.pageIndex"
:total=
"total"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
msg
:
{
Name
:
''
,
//存储卡名称
pageIndex
:
1
,
pageSize
:
15
,
},
total
:
0
,
rules
:
{},
loading
:
false
,
tableData
:
[]
};
},
created
()
{
this
.
getList
();
},
methods
:
{
getList
()
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Coupon/GetDepositPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
let
pageData
=
res
.
data
.
data
.
pageData
;
this
.
tableData
=
pageData
;
}
})
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
//修改储蓄卡
Edit
(
item
)
{
this
.
$router
.
push
({
name
:
"editDeposit"
,
query
:
{
blank
:
"y"
,
ID
:
item
.
ID
},
});
},
//新增储值卡
addDeposit
()
{
this
.
$router
.
push
({
name
:
"editDeposit"
,
query
:
{
blank
:
"y"
,
},
});
},
//删除储蓄卡
Delete
(
item
)
{
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Coupon/DelDeposit"
,
{
Id
:
item
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
}
},
mounted
()
{
}
};
</
script
>
<
style
>
.depositCenter
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
}
.depositCenter
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.depositCenter
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
width
:
100%
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
margin-right
:
20px
;
}
.depositCenter
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/components/UserMan/editDeposit.vue
0 → 100644
View file @
ace8f882
<
template
>
<div
class=
"setMember editDeposit addUsers"
>
<div
class=
"head-title"
>
<span
@
click=
"goUrl"
class=
"blue point"
>
存储卡列表
</span>
/ 存储卡编辑
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
>
<el-form-item
label=
"名称"
prop=
"Name"
>
<el-input
v-model=
"addMsg.Name"
style=
"width:478px"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"封面"
class=
"is-required"
size=
"small"
>
<el-button
@
click=
"openChangeDig()"
size=
"small"
>
选择文件
</el-button>
<div
class=
"app-gallery-item"
style=
"position: relative;width: 100px;margin-top: 10px;"
>
<img
v-if=
"!addMsg.CouponIco"
src=
"../../assets/img/default.png"
style=
"width:80px;height:80px"
alt=
""
/>
<img
style=
"width:80px;height:80px"
v-else
:src=
"addMsg.CouponIco"
alt=
""
/>
</div>
</el-form-item>
<el-form-item
label=
"售价"
>
<el-input
v-model=
"addMsg.SalePrice"
@
keyup
.
native=
"checkPrice(addMsg,'SalePrice')"
style=
"width:478px"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"金额"
>
<el-input
v-model=
"addMsg.DepositPrice"
@
keyup
.
native=
"checkPrice(addMsg,'DepositPrice')"
style=
"width:478px"
size=
"small"
></el-input>
</el-form-item>
<el-form-item
label=
"有效期"
>
<el-input
v-model=
"addMsg.IndateDay"
@
keyup
.
native=
"checkInteger(addMsg,'IndateDay')"
style=
"width:478px"
size=
"small"
></el-input>
</el-form-item>
</el-form>
</div>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
<!-- 选择文件 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"changeState"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
</el-dialog>
</div>
</
template
>
<
script
>
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
export
default
{
components
:
{
ChooseImg
},
data
()
{
return
{
addMsg
:
{
ID
:
0
,
Name
:
''
,
//名称
CouponIco
:
''
,
//封面
SalePrice
:
''
,
//售价
DepositPrice
:
''
,
//金额
IndateDay
:
''
//有效期
},
rules
:
{
Name
:
[{
required
:
true
,
message
:
'请输入昵称'
,
trigger
:
'blur'
}],
},
tableData
:
[],
changeState
:
false
};
},
created
()
{
if
(
this
.
$route
.
query
.
ID
)
{
this
.
getData
(
this
.
$route
.
query
.
ID
)
}
},
methods
:
{
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
apipost
(
"/api/Coupon/GetSetDeposit"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
goUrl
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
});
},
//修改获取数据
getData
(
ID
)
{
this
.
apipost
(
"/api/Coupon/GetDepositList"
,
{
ID
:
ID
},
res
=>
{
var
tempDate
=
res
.
data
.
data
;
this
.
addMsg
.
ID
=
tempDate
.
ID
;
this
.
addMsg
.
Name
=
tempDate
.
Name
;
this
.
addMsg
.
CouponIco
=
tempDate
.
CouponIco
;
this
.
addMsg
.
SalePrice
=
tempDate
.
SalePrice
;
this
.
addMsg
.
DepositPrice
=
tempDate
.
DepositPrice
;
this
.
addMsg
.
IndateDay
=
tempDate
.
IndateDay
;
})
},
goUrl
()
{
this
.
$router
.
push
({
name
:
'depositCenter'
,
query
:
{
blank
:
"y"
}
});
},
openChangeDig
(
num
)
{
this
.
changeState
=
true
;
},
SelectId
(
msg
)
{
let
url
=
this
.
getIconLink
(
msg
.
url
)
this
.
addMsg
.
CouponIco
=
url
this
.
changeState
=
false
;
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.addUsers
.app-image
{
background-size
:
cover
;
background-position
:
center
center
;
width
:
80px
;
height
:
80px
;
border-radius
:
0%
;
}
.editDeposit
.blue
{
color
:
#409EFF
;
}
.editDeposit
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
</
style
>
src/router/index.js
View file @
ace8f882
...
...
@@ -789,6 +789,18 @@ export default new Router({
name
:
'setMember'
,
component
:
resolve
=>
require
([
'@/components/UserMan/setMember'
],
resolve
),
},
// 用户管理 充值中心
{
path
:
'/depositCenter'
,
name
:
'depositCenter'
,
component
:
resolve
=>
require
([
'@/components/UserMan/depositCenter'
],
resolve
),
},
//用户管理 村联卡编辑
{
path
:
'/editDeposit'
,
name
:
'editDeposit'
,
component
:
resolve
=>
require
([
'@/components/UserMan/editDeposit'
],
resolve
),
},
// 用户管理 会员等级/会员购买
{
path
:
'/MembersBuy'
,
...
...
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