文件
mashangyoujiu/Application/Retail/View/Vips/editRecord.html

235 行
11 KiB
HTML
可执行文件

<!--[1.7.90]-->
<div id="vipEditRecordApp" v-cloak style="width: 100%">
<el-form :inline="true" size="small">
<el-form-item>
<date-picker-range :date-time.sync="searchForm.time_slot"></date-picker-range>
</el-form-item>
<el-form-item>
<el-input v-model="searchForm.keyword" placeholder="姓名/昵称" clearable
style="width: 220px;"></el-input>
</el-form-item>
<el-form-item v-if="storeAuth.store_show_vip_info==1">
<el-select v-model="searchForm.store_type"
placeholder="选择会员类型"
size="small">
<el-option label="本店会员" value="1"></el-option>
<el-option label="所有会员" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="rechargeCurrentChange(1)" size="small">查询</el-button>
<el-button type="primary" plain @click="reset" size="small">重置</el-button>
<el-button v-if="storeAuth.data_export==1&&operate.change_export"
@click="exportExcel"
size="small">导出
</el-button>
</el-form-item>
</el-form>
<div v-loading="loading" element-loading-text="数据加载中,请等待" element-loading-spinner="el-icon-loading">
<el-table :data="change_list" :highlight-current-row="true" border size="mini" :header-cell-style="{background:'#F5F7FA',color:'#606266'}">
<el-table-column type="index" label="序号" width="60" align="center"></el-table-column>
<el-table-column label="会员" align="center">
<el-table-column prop="name" label="名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="nickname" label="昵称" :show-overflow-tooltip="true"></el-table-column>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column prop="store_name" label="门店" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="operator_type" label="类型" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="operator_name" label="人员" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="add_time" label="时间" width="140" :show-overflow-tooltip="true"></el-table-column>
</el-table-column>
<el-table-column label="手机号" align="center">
<el-table-column label="变更前" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.before_phone }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.after_phone }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="实体卡" align="center">
<el-table-column label="变更前" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.before_card_key }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.after_card_key }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="余额" align="center">
<el-table-column label="变更前" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.before_balance }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.after_balance }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="等级" align="center">
<el-table-column label="变更前" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.before_grade }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.after_grade }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="积分" align="center">
<el-table-column label="变更前" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.before_integral }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.after_integral }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="PLUS会员结束时间" align="center">
<el-table-column label="变更前" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.before_plus_end_time }}</span>
</template>
</el-table-column>
<el-table-column label="变更后" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.after_plus_end_time }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="密码" width="80" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="danger">{{ scope.row.password }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="rechargeSizeChange"
@current-change="rechargeCurrentChange"
layout="total, sizes, prev, pager, next, jumper"
:current-page="searchForm.page"
:pager-count="5"
:page-sizes="[10,20,30,40,50,60,70,80,90]"
:page-size="10"
:total="count">
</el-pagination>
</div>
</div>
<script>
var vipEditRecordApp = new Vue({
el: '#vipEditRecordApp',
data() {
return {
seek_store: [], // 门店搜索条件
searchForm: {
time_slot: '', // 时间段
keyword: '', // 姓名,昵称
store_type: '1', //会员类型 0本店会员 1所有会员
page: 1, // 分页
limit: 10, // 每页显示条数
},
change_list: [], // 变更记录列表
count: 0, // 总数 int类型
loading: false, // 加载
operate: {},
};
},
methods: {
/**
* 获取变更操作记录
*/
getVipChangeList() {
this.loading = true;
this.sendRequest('Retail/Vips/recordList', {
data: this.searchForm,
success: (res) => {
this.loading = false;
if (res.status == 1) {
this.change_list = res.data.list;
this.count = res.data.count;
} else {
this.change_list = [];
this.count = 0;
}
}
});
},
/**
* 分页
* @param int val 当前选择的页数
*/
rechargeCurrentChange(val) {
this.searchForm.page = val;
this.getVipChangeList();
},
/**
* 每页显示数量
* @param int val 数量
*/
rechargeSizeChange(val) {
this.searchForm.limit = val;
this.searchForm.page = 1;
this.getVipChangeList();
},
/**
* 重置表单
*/
reset() {
this.searchForm = {
time_slot: '',
keyword: '',
store_type: '1',
page: 1,
limit: this.searchForm.limit,
};
this.getVipChangeList();
},
// 导出
exportExcel() {
if (!this.searchForm.time_slot.length) {
this.$confirm('确定导出所有数据吗?', '提示?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
window.location.href = "{:U('change_export')}?data=" + JSON.stringify(this.searchForm);
}).catch(()=>{});
} else {
window.location.href = "{:U('change_export')}?data=" + JSON.stringify(this.searchForm);
}
},
//获取操作权限
getOperate() {
this.checkOperateAuth({
change_export: '/index.php/Retail/Vips/change_export',
}, (data) => {
this.operate = data;
})
},
},
created() {
this.getOperate();
this.getVipChangeList();
},
})
</script>