Commit 8452a17d authored by zhengke's avatar zhengke

xiugai

parent c8e91451
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
</script> </script>
<style> <style>
@import "//at.alicdn.com/t/font_1769104_t7ngfhl994d.css"; @import "//at.alicdn.com/t/font_1769104_3piwls5qg15.css";
@import "./assets/css/common.css"; @import "./assets/css/common.css";
@import "./assets/css/zkcss.css"; @import "./assets/css/zkcss.css";
html, html,
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
</div> </div>
<div class="content"> <div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:50%"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px" style="width:50%">
<el-form-item label="商品名称" prop="GoodsName" class="is-required" size="small"> <el-form-item label="商品名称" prop="GoodsName" class="is-required" size="small">
<el-input v-model="addMsg.GoodsName" placeholder="请输入商品名称" class="w400"/> <el-input v-model="addMsg.GoodsName" placeholder="请输入商品名称" class="w400"/>
</el-form-item> </el-form-item>
...@@ -20,7 +19,6 @@ ...@@ -20,7 +19,6 @@
<el-form-item label="赠送点数" prop="GivePonit" class="is-required" size="small"> <el-form-item label="赠送点数" prop="GivePonit" class="is-required" size="small">
<el-input v-model="addMsg.GivePonit" placeholder="请输入赠送点数" class="w400" type="number" :min="0"/> <el-input v-model="addMsg.GivePonit" placeholder="请输入赠送点数" class="w400" type="number" :min="0"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div style="margin-top:20px"> <div style="margin-top:20px">
...@@ -45,8 +43,6 @@ ...@@ -45,8 +43,6 @@
PonitNum:0, PonitNum:0,
GivePonit:0, GivePonit:0,
SellingPrice:0, SellingPrice:0,
}, },
rules: { rules: {
GoodsName: [{ GoodsName: [{
...@@ -85,7 +81,6 @@ ...@@ -85,7 +81,6 @@
Save(formName) { Save(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if(this.addMsg.SellingPrice==0){ if(this.addMsg.SellingPrice==0){
this.Error('售价大于0') this.Error('售价大于0')
return false return false
...@@ -94,8 +89,7 @@ ...@@ -94,8 +89,7 @@
this.Error('点数大于0') this.Error('点数大于0')
return false return false
} }
this.addMsg.GivePonit = parseInt(this.addMsg.GivePonit);
this.apipost("/api/Point/SetPointGoods", this.addMsg, res => { this.apipost("/api/Point/SetPointGoods", this.addMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CommonJump('pointList'); this.CommonJump('pointList');
...@@ -109,23 +103,20 @@ ...@@ -109,23 +103,20 @@
} }
}); });
}, },
getData(ID) { getData(ID) {
this.loading = true; this.loading = true;
this.apipost("/api/Point/GetPointGoodsModel", { this.apipost("/api/Point/GetPointGoodsModel", {
ID: ID ID: ID
}, res => { }, res => {
this.loading = false; this.loading = false;
this.addMsg = res.data.data; var tempDate = res.data.data;
this.addMsg.ID = tempDate.ID;
this.addMsg.GoodsName = tempDate.GoodsName;
this.addMsg.PonitNum = tempDate.PonitNum;
this.addMsg.GivePonit = tempDate.GivePonit;
this.addMsg.SellingPrice = tempDate.SellingPrice;
}) })
}, },
}, },
mounted() { mounted() {
} }
......
...@@ -6,76 +6,40 @@ ...@@ -6,76 +6,40 @@
<el-button type="primary" class="el-button--small" @click="addRecharge">新增</el-button> <el-button type="primary" class="el-button--small" @click="addRecharge">新增</el-button>
</div> </div>
</div> </div>
<div style="padding: 20px;background: #fff;margin-top: 20px"> <div style="padding: 20px;background: #fff;margin-top: 20px">
<el-table <el-table :data="tableData" header-cell-class-name="headClass" style="width: 100%" border>
:data="tableData" <el-table-column prop="ID" label="ID" width="100">
header-cell-class-name="headClass"
style="width: 100%"
border
>
<el-table-column
prop="ID"
label="ID"
width="100">
</el-table-column> </el-table-column>
<el-table-column prop="GoodsName" label="产品名称">
<el-table-column
prop="GoodsName"
label="产品名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="SellingPrice" label="售价">
prop="SellingPrice"
label="售价"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{scope.row.SellingPrice.toFixed(2)}} {{scope.row.SellingPrice.toFixed(2)}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="PonitNum" label="点数">
prop="PonitNum"
label="点数">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="IsGive" label="是否赠送点数">
prop="IsGive"
label="是否赠送点数">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.IsGive==0" type="info">不赠送</el-tag> <el-tag v-if="scope.row.IsGive==0" type="info">不赠送</el-tag>
<el-tag v-if="scope.row.IsGive>0" type="warning">赠送{{scope.row.GivePonit}}点数</el-tag> <el-tag v-if="scope.row.IsGive>0" type="warning">赠送{{scope.row.GivePonit}}点数</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="180">
<el-table-column
fixed="right"
label="操作"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)"> <img src="../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top" > <el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)"> <img src="../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination style="text-align:right" <el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
background layout="prev, pager, next" :current-page.sync="msg.pageIndex" :total="count">
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:current-page.sync="msg.pageIndex"
:total="count">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -84,61 +48,62 @@ ...@@ -84,61 +48,62 @@
<script> <script>
export default { export default {
name: "pointList", name: "pointList",
data(){ data() {
return{ return {
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:15, pageSize: 15,
}, },
changeState:false, changeState: false,
dateList:[], dateList: [],
tableData:[], tableData: [],
count:0, count: 0,
loading:false, loading: false,
EnableMsg:{ EnableMsg: {
Ids:'', Ids: '',
TeacherStatus:0, TeacherStatus: 0,
}, },
} }
}, },
created(){ created() {
this.getDateList();//获取老师分页 this.getDateList(); //获取老师分页
}, },
methods:{ methods: {
getDateList(){ getDateList() {
this.loading=true; this.loading = true;
this.apipost("/api/Point/GetPointGoodsPageList", this.msg, res => { this.apipost("/api/Point/GetPointGoodsPageList", this.msg, res => {
this.loading=false; this.loading = false;
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
this.count = res.data.data.count; this.count = res.data.data.count;
}else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
addRecharge(){ addRecharge() {
this.$router.push('/addpoint'); this.$router.push('/addpoint');
}, },
Edit(row){ Edit(row) {
this.$router.push({ this.$router.push({
name: 'addpoint', name: 'addpoint',
query: { query: {
ID:row.ID, ID: row.ID,
blank: "y" blank: "y"
} }
}); });
}, },
delete_b(row){ delete_b(row) {
let that=this; let that = this;
that.Confirm("是否删除?", function () { that.Confirm("是否删除?", function () {
that.apipost( that.apipost(
"/api/Point/DeletePointGoods", "/api/Point/DeletePointGoods", {
{Id:row.ID}, Id: row.ID
},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.Success(res.data.message); that.Success(res.data.message);
...@@ -150,7 +115,7 @@ ...@@ -150,7 +115,7 @@
); );
}); });
}, },
getList(){ getList() {
this.msg.pageIndex = 1 this.msg.pageIndex = 1
this.getDateList() this.getDateList()
}, },
...@@ -160,10 +125,11 @@ ...@@ -160,10 +125,11 @@
}, },
}, },
} }
</script> </script>
<style > <style>
.pointList .el-card__header{ .pointList .el-card__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -171,41 +137,50 @@ ...@@ -171,41 +137,50 @@
background: #fff; background: #fff;
} }
.pointList .el-button--small{
.pointList .el-button--small {
padding: 9px 15px; padding: 9px 15px;
} }
.pointList .content .searchInput{
.pointList .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
border-radius: 4px; border-radius: 4px;
/*margin-left: 10px;*/ /*margin-left: 10px;*/
} }
.pointList .content .searchInput .el-input__inner{
border:none;outline:none; .pointList .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.pointList .content .searchInput{
.pointList .content .searchInput {
line-height: normal; line-height: normal;
display: inline-table; display: inline-table;
border-collapse: separate; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
width:250px; width: 250px;
} }
.pointList .content{
.pointList .content {
background: #fff; background: #fff;
margin-top:10px; margin-top: 10px;
padding: 15px; padding: 15px;
box-sizing: border-box; box-sizing: border-box;
} }
.pointList .el-tag{
.pointList .el-tag {
margin-right: 5px; margin-right: 5px;
} }
.pointList .app-image{
.pointList .app-image {
background-position: center center; background-position: center center;
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius:0%; border-radius: 0%;
float: left; float: left;
margin-right: 8px; margin-right: 8px;
} }
</style> </style>
This diff is collapsed.
<template> <template>
<div class="rechargeList"> <div class="rechargeList">
<div class="el-card__header"> <div class="el-card__header">
<span>点数明细列表</span> <span>充值明细列表</span>
</div> </div>
<div class="content"> <div class="content">
<div style="display: flex;flex-direction: row;align-items: center"> <div style="display: flex;flex-direction: row;align-items: center">
<div class="block"> <div class="block">
<div class="searchInput" style="width:250px"> <div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px" <el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入订单号搜索" v-model="msg.OrderNo"
placeholder="请输入订单号搜索" size="small" @clear="getList" @keyup.enter.native="getList" clearable>
v-model="msg.OrderId"
size="small"
@clear="getList"
@keyup.enter.native="getList"
clearable>
</el-input> </el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> <span @click="getList" class="el-icon-search"
style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div> </div>
<span>状态</span> <span>状态</span>
<el-select class="w120" @change="getList()" style="margin-right: 10px;" <el-select class="w120" @change="getList()" style="margin-right: 10px;" v-model="msg.OrderStatus" size="small"
v-model="msg.OrderStatus" size="small" placeholder="请选择"> placeholder="请选择">
<el-option v-for="item in TypeList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="item in TypeList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
<span>用户</span> <span>用户</span>
<el-select class="w120" @change="getList()" v-model="msg.UserId" size="small" :filter-method="ChangeListName" filterable <el-select class="w120" @change="getList()" v-model="msg.UserId" size="small" :filter-method="ChangeListName"
placeholder="请选择"> filterable placeholder="请选择">
<el-option label="不限" :value="0"></el-option> <el-option label="不限" :value="0"></el-option>
<el-option v-for="item in userList" :key="item.Id" :label="item.Name" :value="item.Id"> <el-option v-for="item in userList" :key="item.Id" :label="item.Name" :value="item.Id">
</el-option> </el-option>
...@@ -39,66 +35,45 @@ ...@@ -39,66 +35,45 @@
<div style="padding: 20px;background: #fff;margin-top: 20px"> <div style="padding: 20px;background: #fff;margin-top: 20px">
<el-table <el-table :data="tableData" header-cell-class-name="headClass" style="width: 100%" border>
:data="tableData"
header-cell-class-name="headClass"
style="width: 100%"
border
>
<el-table-column <el-table-column prop="OrderNo" label="订单号">
prop="OrderNo"
label="订单号"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Name" label="用户信息">
prop="Name"
label="用户信息">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.UserPhoto + ')',backgroundSize:'cover'}"></div> <div class="app-image" :style="{backgroundImage:'url(' + scope.row.UserPhoto + ')',backgroundSize:'cover'}">
</div>
<div flex="dir:left cross:center"> <div flex="dir:left cross:center">
{{scope.row.UserName}} {{scope.row.UserName}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="PonitNum" label="充值点数">
prop="PonitNum"
label="充值点数"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="GivePoint" label="赠送点数">
prop="GivePoint"
label="赠送点数"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="GivePoint" label="实收金额">
prop="GivePoint"
label="实收金额"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{scope.row.Income.toFixed(2)}} {{scope.row.Income.toFixed(2)}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="PayWayName" label="支付方式">
prop="PayWayName" <template slot-scope="scope">
label="支付方式" <div>{{scope.row.PayWayName}}</div>
> <div>{{scope.row.PaymentWayName}}</div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="OrderStatus" label="状态">
prop="OrderStatus"
label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span>
{{scope.row.OrderStatus==1?'待付款':'已付款'}} {{scope.row.OrderStatus==1?'待付款':'已付款'}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="CreateDate" label="支付时间">
prop="CreateDate"
label="支付时间">
</el-table-column> </el-table-column>
<!-- <el-table-column--> <!-- <el-table-column-->
...@@ -117,13 +92,8 @@ ...@@ -117,13 +92,8 @@
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
<el-pagination style="text-align:right" <el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
background layout="prev, pager, next" :current-page.sync="msg.pageIndex" :total="count">
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:current-page.sync="msg.pageIndex"
:total="count">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -132,31 +102,39 @@ ...@@ -132,31 +102,39 @@
<script> <script>
export default { export default {
name: "rechargeList", name: "rechargeList",
data(){ data() {
return{ return {
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:15, pageSize: 15,
OrderStatus:0, OrderStatus: 0,
UserId:0, OrderNo: '',
OrderId:'', OrderId: '',
},
changeState: false,
dateList: [],
TypeList: [{
Name: '不限',
Id: 0
},
{
Name: '待付款',
Id: 1
},
{
Name: '已付款',
Id: 2
}, },
changeState:false,
dateList:[],
TypeList:[
{Name:'不限',Id:0},
{Name:'待付款',Id:1},
{Name:'已付款',Id:2},
], ],
tableData:[], tableData: [],
count:0, count: 0,
loading:false, loading: false,
EnableMsg:{ EnableMsg: {
Ids:'', Ids: '',
TeacherStatus:0, TeacherStatus: 0,
}, },
userList:[], userList: [],
usermsg:{ usermsg: {
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
Name: '', Name: '',
...@@ -167,17 +145,17 @@ ...@@ -167,17 +145,17 @@
} }
} }
}, },
created(){ created() {
this.getDateList();//获取数据 this.getDateList(); //获取数据
this.getyonghuid() this.getyonghuid()
}, },
methods:{ methods: {
ChangeListName(val) { ChangeListName(val) {
this.usermsg.Name = val; this.usermsg.Name = val;
this.getyonghuid(); this.getyonghuid();
}, },
getyonghuid(){ getyonghuid() {
this.apipost("/api/user/GetMemberUserDropDownList", this.usermsg, res => { this.apipost("/api/user/GetMemberUserDropDownList", this.usermsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
let pageData = res.data.data.pageData; let pageData = res.data.data.pageData;
...@@ -185,26 +163,26 @@ ...@@ -185,26 +163,26 @@
} }
}) })
}, },
getDateList(){ getDateList() {
this.loading=true; this.loading = true;
let msg = JSON.parse(JSON.stringify(this.msg)) let msg = JSON.parse(JSON.stringify(this.msg))
if(msg.OrderId == ''){ if (msg.OrderId == '') {
msg.OrderId = 0 msg.OrderId = 0
} }
msg.OrderId= Number(msg.OrderId) msg.OrderId = Number(msg.OrderId)
this.apipost("/api/Point/GetUserPointOrderPageList", msg, res => { this.apipost("/api/Point/GetUserPointOrderPageList", msg, res => {
this.loading=false; this.loading = false;
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
this.count = res.data.data.count; this.count = res.data.data.count;
}else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
getList(){ getList() {
this.msg.pageIndex = 1 this.msg.pageIndex = 1
this.getDateList() this.getDateList()
}, },
...@@ -214,10 +192,11 @@ ...@@ -214,10 +192,11 @@
}, },
}, },
} }
</script> </script>
<style > <style>
.rechargeList .el-card__header{ .rechargeList .el-card__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -225,41 +204,50 @@ ...@@ -225,41 +204,50 @@
background: #fff; background: #fff;
} }
.rechargeList .el-button--small{
.rechargeList .el-button--small {
padding: 9px 15px; padding: 9px 15px;
} }
.rechargeList .content .searchInput{
.rechargeList .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
border-radius: 4px; border-radius: 4px;
/*margin-left: 10px;*/ /*margin-left: 10px;*/
} }
.rechargeList .content .searchInput .el-input__inner{
border:none;outline:none; .rechargeList .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.rechargeList .content .searchInput{
.rechargeList .content .searchInput {
line-height: normal; line-height: normal;
display: inline-table; display: inline-table;
border-collapse: separate; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
width:250px; width: 250px;
} }
.rechargeList .content{
.rechargeList .content {
background: #fff; background: #fff;
margin-top:10px; margin-top: 10px;
padding: 15px; padding: 15px;
box-sizing: border-box; box-sizing: border-box;
} }
.rechargeList .el-tag{
.rechargeList .el-tag {
margin-right: 5px; margin-right: 5px;
} }
.rechargeList .app-image{
.rechargeList .app-image {
background-position: center center; background-position: center center;
width: 50px; width: 50px;
height: 50px; height: 50px;
border-radius:0%; border-radius: 0%;
float: left; float: left;
margin-right: 8px; margin-right: 8px;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment