油卡bug

This commit is contained in:
齐天大圣 2023-11-03 15:45:54 +08:00
parent d464edbdf3
commit 4c6c8b57b8
3 changed files with 64 additions and 53 deletions

View File

@ -27,7 +27,7 @@
<el-table-column <el-table-column
prop="groupOriented" prop="groupOriented"
label="面向群体" label="面向群体"
width="100"> width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.groupOriented == 1">普通群体</span> <span v-if="scope.row.groupOriented == 1">普通群体</span>
<span v-if="scope.row.groupOriented == 2">等级会员</span> <span v-if="scope.row.groupOriented == 2">等级会员</span>
@ -55,11 +55,7 @@
label="赠送成长值" label="赠送成长值"
width="120"> width="120">
</el-table-column> </el-table-column>
<el-table-column
prop="refuelMoney"
label="赠送加油金"
width="120">
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -99,9 +95,9 @@
<!-- <span v-if="scope.row.activeStatus == 2"> <el-tag type="success">挂失</el-tag> </span>--> <!-- <span v-if="scope.row.activeStatus == 2"> <el-tag type="success">挂失</el-tag> </span>-->
<!-- <span v-if="scope.row.activeStatus == 3"> <el-tag type="danger">停用</el-tag> </span>--> <!-- <span v-if="scope.row.activeStatus == 3"> <el-tag type="danger">停用</el-tag> </span>-->
<el-switch <el-switch
v-model="scope.row.status" v-model="scope.row.activeStatus"
:active-value="'1'" :active-value="'1'"
:inactive-value="'3'" :inactive-value="'2'"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#909399" inactive-color="#909399"
@change="posteid(scope.row)" @change="posteid(scope.row)"
@ -113,7 +109,7 @@
<el-table-column <el-table-column
prop="participationNo" prop="participationNo"
label="参与次数" label="参与次数"
width="100"> width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.participationNo == 0">不限制次数</span> <span v-if="scope.row.participationNo == 0">不限制次数</span>
<span v-if="scope.row.participationNo != 0">{{scope.row.participationNo}} </span> <span v-if="scope.row.participationNo != 0">{{scope.row.participationNo}} </span>
@ -122,17 +118,17 @@
<el-table-column <el-table-column
prop="sort" prop="sort"
label="排序" label="排序"
width="100"> width="110">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="updateTime" prop="updateTime"
label="更新时间" label="更新时间"
width="120"> width="150">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="date" prop="date"
label="操作" label="操作"
width="120"> width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -140,12 +136,21 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改</el-button>
<el-button
size="mini" <el-popconfirm
type="text" style="margin-left: 5px"
icon="el-icon-delete" @confirm="handleDelete(scope.row)"
@click="handleDelete(scope.row)" v-if="scope.row.isonline == '0'" title="这是一段内容确定下线吗?">
>下线</el-button> <el-button
size="mini"
type="text"
icon="el-icon-delete"
slot="reference"
>下线</el-button>
</el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
@ -313,7 +318,9 @@
</div> </div>
<div class="demo-drawer__footer"> <div class="demo-drawer__footer">
<el-button @click="cancelForm"> </el-button> <el-button @click="cancelForm"> </el-button>
<el-button type="primary" @click="submitForm('ruleForm')" >确定</el-button> <el-button type="primary" @click="submitForm('ruleForm')"
v-if="form.isonline == '0'" >
确定</el-button>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
@ -464,7 +471,7 @@
}, },
posteid(data){ posteid(data){
eitList(data).then(res=>{ eitList(data).then(res=>{
if (res.code == 200){ if (res.code === 200){
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success' type: 'success'
@ -476,13 +483,12 @@
}) })
}, },
handleDelete(data){ handleDelete(data){
let resData = JSON.parse(JSON.stringify(data))
data.isonline = "1" resData.isonline = "1"
eitList(resData).then(res=>{
eitList(data).then(res=>{ if (res.code === 200){
if (res.code == 200){
this.$message({ this.$message({
message: '修改成功', message: '下线成功',
type: 'success' type: 'success'
}); });
this.getlist() this.getlist()
@ -490,19 +496,7 @@
this.$message.error('修改失败'); this.$message.error('修改失败');
} }
}) })
// 线
// deleteList(id).then(res=>{
//
// if (res.code == 200){
// this.$message({
// message: '',
// type: 'success'
// });
// this.getlist()
// }else {
// this.$message.error('');
// }
// })
}, },
submitForm(){ submitForm(){
if(this.form.id){ if(this.form.id){

View File

@ -100,7 +100,7 @@
<el-switch <el-switch
v-model="scope.row.status" v-model="scope.row.status"
:active-value="'1'" :active-value="'1'"
:inactive-value="'3'" :inactive-value="'2'"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#909399" inactive-color="#909399"
@change="posteid(scope.row)" @change="posteid(scope.row)"
@ -143,8 +143,8 @@
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="礼品卡状态" prop="activateStatus"> <el-form-item label="礼品卡状态" prop="status">
<el-radio-group v-model="ruleForm.activateStatus"> <el-radio-group v-model="ruleForm.status">
<el-radio label="1">启用</el-radio> <el-radio label="1">启用</el-radio>
<el-radio label="2">禁用</el-radio> <el-radio label="2">禁用</el-radio>
</el-radio-group> </el-radio-group>
@ -229,14 +229,14 @@
address: '上海市普陀区金沙江路 1516 弄' address: '上海市普陀区金沙江路 1516 弄'
}], }],
ruleForm: { ruleForm: {
activateStatus:'1', status:'1',
quantity:'1', quantity:'1',
cardAmount:'1', cardAmount:'1',
remark:'' remark:''
}, },
rules: { rules: {
activateStatus: [ status: [
{ required: true, message: '此为必填项', trigger: 'blur' }, { required: true, message: '此为必填项', trigger: 'blur' },
], ],
quantity: [ quantity: [
@ -258,7 +258,8 @@
methods:{ methods:{
getlist(){ getlist(){
this.tableData = [] this.queryParams.pageNo=this.pageNo
this.queryParams.pageSize=this.pageSize
getList(this.queryParams).then(res=>{ getList(this.queryParams).then(res=>{
this.tableData = res.data.records this.tableData = res.data.records
this.total = res.data.total; this.total = res.data.total;
@ -281,7 +282,7 @@
daking(){ daking(){
this.centerDialogVisible = true this.centerDialogVisible = true
this.ruleForm = { this.ruleForm = {
activateStatus:'1', activateStatus:'0',
quantity:'1', quantity:'1',
cardAmount:'1', cardAmount:'1',
remark:'' remark:''

View File

@ -116,8 +116,8 @@
<el-switch <el-switch
v-model="scope.row.status" v-model="scope.row.status"
active-value="true" active-value="false"
inactive-value="false" inactive-value="true"
active-color="#409EFF" active-color="#409EFF"
inactive-color="#909399" inactive-color="#909399"
@change="posteid(scope.row)" @change="posteid(scope.row)"
@ -208,6 +208,21 @@
<el-radio label="2">自定义时间</el-radio> <el-radio label="2">自定义时间</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="时间范围" v-if="ruleForm.activeTime == 2" :label-width="formLabelWidth" prop="startTime">
<el-date-picker
v-model="ruleForm.startTime"
type="datetime"
placeholder="开始日期">
</el-date-picker>
-
<el-date-picker
v-model="ruleForm.endTime"
type="datetime"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="活动状态" prop="resource"> <el-form-item label="活动状态" prop="resource">
<el-radio-group v-model="ruleForm.activeStatus"> <el-radio-group v-model="ruleForm.activeStatus">
<el-radio label="1">启用</el-radio> <el-radio label="1">启用</el-radio>
@ -260,9 +275,9 @@
rechargeBalance:'', rechargeBalance:'',
incomeLitres:'', incomeLitres:'',
points:'', points:'',
status:'1', status:'0',
activeTime:'1', activeTime:'1',
activeStatus:'1' activeStatus:'0'
}, },
queryParams:{ queryParams:{
type:'柴油', type:'柴油',
@ -280,7 +295,8 @@
}, },
methods:{ methods:{
getlist(){ getlist(){
this.tableData = [] this.queryParams.pageNo=this.pageNo
this.queryParams.pageSize=this.pageSize
getList(this.queryParams).then(res=>{ getList(this.queryParams).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.tableData = res.data.records this.tableData = res.data.records
@ -299,12 +315,12 @@
incomeLitres:'', incomeLitres:'',
points:'', points:'',
activeTime:'1', activeTime:'1',
activeStatus:'1' activeStatus:'1',
tatus:'1'
}, },
this.centerDialogVisible = true this.centerDialogVisible = true
}, },
posteid(data){ posteid(data){
// data.status =! data.status
eitList(data).then(res=>{ eitList(data).then(res=>{
if (res.code == 200){ if (res.code == 200){
this.$message.success('修改成功') this.$message.success('修改成功')