|
@@ -13,17 +13,13 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="标签">
|
|
|
<el-select v-model="formParams.labelId" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="(item, index) in tipsList" :key="index" :label="item.labelName"
|
|
|
- :value="item.buyerLabelId"
|
|
|
- />
|
|
|
+ <el-option v-for="(item, index) in tipsList" :key="index" :label="item.labelName"
|
|
|
+ :value="item.buyerLabelId" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="最近消费时间">
|
|
|
- <el-date-picker
|
|
|
- v-model="formParams.dates" type="daterange" range-separator="至" start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间" value-format="yyyy-MM-dd"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="formParams.dates" type="daterange" range-separator="至" start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间" value-format="yyyy-MM-dd" />
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-form-item label="累计消费金额">
|
|
@@ -35,16 +31,12 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-form-item label="购买次数">
|
|
|
- <el-input
|
|
|
- v-model="formParams.minBuyers" maxlength="9" oninput="value=value.replace(/[^\d]/g,'')"
|
|
|
- placeholder="请输入最小值"
|
|
|
- />
|
|
|
+ <el-input v-model="formParams.minBuyers" maxlength="9" oninput="value=value.replace(/[^\d]/g,'')"
|
|
|
+ placeholder="请输入最小值" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="-">
|
|
|
- <el-input
|
|
|
- v-model="formParams.maxBuyers" maxlength="9" oninput="value=value.replace(/[^\d]/g,'')"
|
|
|
- placeholder="请输入最大值"
|
|
|
- />
|
|
|
+ <el-input v-model="formParams.maxBuyers" maxlength="9" oninput="value=value.replace(/[^\d]/g,'')"
|
|
|
+ placeholder="请输入最大值" />
|
|
|
</el-form-item>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -58,26 +50,28 @@
|
|
|
<!-- 表格 -->
|
|
|
<div class="content_table">
|
|
|
<div class="table">
|
|
|
- <el-table
|
|
|
- :data="tableData" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-table :data="tableData" border :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
|
|
|
+ style="width: 100%">
|
|
|
<el-table-column prop="name" label="客户昵称" />
|
|
|
<el-table-column prop="phone" label="手机号" />
|
|
|
<el-table-column prop="memberLevelName" label="会员等级" />
|
|
|
<el-table-column prop="total" label="消费总额" />
|
|
|
<el-table-column prop="buyers" label="购买次数" />
|
|
|
<el-table-column prop="credit" label="剩余积分" />
|
|
|
+ <el-table-column prop="region" label="区域ID" />
|
|
|
+ <el-table-column label="关系">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.roleId == null">无关系</span>
|
|
|
+ <span v-if="scope.row.roleId == 1">加盟商</span>
|
|
|
+ <span v-if="scope.row.roleId == 2">代理商</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="time" label="最近消费时间" />
|
|
|
<el-table-column prop="createTime" label="注册时间" />
|
|
|
- <el-table-column
|
|
|
- :formatter="row => row.registerIp ? row.registerIp : '-'" label="注册IP"
|
|
|
- show-overflow-tooltip
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- :formatter="row => row.lastLoginIp ? row.lastLoginIp : '-'" prop="time" label="最后登录IP"
|
|
|
- show-overflow-tooltip
|
|
|
- />
|
|
|
+ <el-table-column :formatter="row => row.registerIp ? row.registerIp : '-'" label="注册IP"
|
|
|
+ show-overflow-tooltip />
|
|
|
+ <el-table-column :formatter="row => row.lastLoginIp ? row.lastLoginIp : '-'" prop="time" label="最后登录IP"
|
|
|
+ show-overflow-tooltip />
|
|
|
<el-table-column label="操作" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click.native.prevent="details(scope.row)">详情</el-button>
|
|
@@ -87,16 +81,14 @@
|
|
|
{{ scope.row.ifBlack ? "取消黑名单" : "加入黑名单" }}
|
|
|
</el-button>
|
|
|
<el-button type="text" size="small" @click.native.prevent="appointBtn(scope.row)">指定关系</el-button>
|
|
|
-
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="fenye">
|
|
|
- <el-pagination
|
|
|
- :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="10"
|
|
|
+ <el-pagination :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="10"
|
|
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -130,11 +122,8 @@
|
|
|
<el-button type="primary" @click="saveTips">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- title="修改会员积分" :visible.sync="editIntegral" width="30%" center
|
|
|
- :close-on-click-modal="false"
|
|
|
- @close="credit = 0"
|
|
|
- >
|
|
|
+ <el-dialog title="修改会员积分" :visible.sync="editIntegral" width="30%" center :close-on-click-modal="false"
|
|
|
+ @close="credit = 0">
|
|
|
<el-form label-width="100px">
|
|
|
<el-form-item label="修改积分">
|
|
|
<el-radio-group v-model="updateWay" @change="changeWayRadio">
|
|
@@ -157,17 +146,18 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<!-- 指定关系 -->
|
|
|
- <el-dialog title="选择关系" :visible.sync="appointDialog" width="25%" center :close-on-click-modal="false" @close="appintClose">
|
|
|
+ <el-dialog title="选择关系" :visible.sync="appointDialog" width="25%" center :close-on-click-modal="false"
|
|
|
+ @close="appintClose">
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-form label-width="120px">
|
|
|
+ <el-form label-width="120px">
|
|
|
<el-form-item label="请选择区域:">
|
|
|
<el-cascader :props="areaData" ref="cascaderRef" @change="handleCascaderChange"></el-cascader>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否为加盟商:">
|
|
|
<template>
|
|
|
<el-radio v-model="appintForm.isType" label="1">加盟商</el-radio>
|
|
|
- <el-radio v-model="appintForm.isType" label="2">代理商</el-radio>
|
|
|
- <el-radio v-model="appintForm.isType" label="3">撤销状态</el-radio>
|
|
|
+ <el-radio v-model="appintForm.isType" label="2">代理商</el-radio>
|
|
|
+ <el-radio v-model="appintForm.isType" label="3">撤销状态</el-radio>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -189,7 +179,7 @@ import {
|
|
|
exportBuyerUser,
|
|
|
appointRelationship
|
|
|
} from '@/api/customerMage'
|
|
|
-import { getProvinceList,getChildAreaList } from '@/api/address'
|
|
|
+import { getProvinceList, getChildAreaList } from '@/api/address'
|
|
|
// import { getSelect } from '../../../api/renovation'
|
|
|
import memberDetails from './details'
|
|
|
// import { constants } from 'fs';
|
|
@@ -227,7 +217,7 @@ export default {
|
|
|
buyerUserId: '', // 用户id
|
|
|
credit: '', // 积分值 扣减积分则传负数
|
|
|
updateWay: true, // 修改积分单选绑定
|
|
|
- appointDialog:false, // 指定关系的弹出框
|
|
|
+ appointDialog: false, // 指定关系的弹出框
|
|
|
areaData: {
|
|
|
lazy: true,
|
|
|
label: 'name',
|
|
@@ -248,10 +238,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- appintForm:{
|
|
|
- buyerUserId:null,
|
|
|
- region:null,
|
|
|
- isType:'1'
|
|
|
+ appintForm: {
|
|
|
+ buyerUserId: null,
|
|
|
+ region: null,
|
|
|
+ isType: '1'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -261,8 +251,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
|
- * 导出
|
|
|
- */
|
|
|
+ * 导出
|
|
|
+ */
|
|
|
|
|
|
async handleExport() {
|
|
|
this.$message({
|
|
@@ -274,7 +264,7 @@ export default {
|
|
|
if (!res) {
|
|
|
return
|
|
|
}
|
|
|
- const blob = new Blob([ res ], { type: 'application/vnd.ms-excel' })
|
|
|
+ const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
|
|
|
const fileName = '用户列表.xls'
|
|
|
if ('download' in document.createElement('a')) {
|
|
|
// 非IE下载
|
|
@@ -353,7 +343,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 指定关系
|
|
|
- appointBtn(row){
|
|
|
+ appointBtn(row) {
|
|
|
this.appintForm.buyerUserId = row.buyerUserId
|
|
|
this.appointDialog = true
|
|
|
},
|
|
@@ -364,28 +354,29 @@ export default {
|
|
|
this.appintForm.region = nodeData.id
|
|
|
},
|
|
|
// 指定关系取消
|
|
|
- appintCan(){
|
|
|
+ appintCan() {
|
|
|
this.appointDialog = false
|
|
|
},
|
|
|
// 指定关系确认
|
|
|
- async appintDetermine(){
|
|
|
- if(this.appintForm.region == null && this.appintForm.isType != '3'){
|
|
|
+ async appintDetermine() {
|
|
|
+ if (this.appintForm.region == null && this.appintForm.isType != '3') {
|
|
|
this.$message.error("请选择区域");
|
|
|
return
|
|
|
}
|
|
|
let res = await appointRelationship(this.appintForm);
|
|
|
- if(res.code == ""){
|
|
|
+ if (res.code == "") {
|
|
|
this.$message.success("指定关系成功")
|
|
|
this.appointDialog = false
|
|
|
}
|
|
|
- console.log(res);
|
|
|
+ // 重新获取数据
|
|
|
+ this.getAll(this.formParams)
|
|
|
},
|
|
|
// 弹窗关闭 把数据重置
|
|
|
- appintClose(){
|
|
|
+ appintClose() {
|
|
|
this.appintForm = {
|
|
|
- buyerUserId:null,
|
|
|
- region:null,
|
|
|
- isType:'1'
|
|
|
+ buyerUserId: null,
|
|
|
+ region: null,
|
|
|
+ isType: '1'
|
|
|
}
|
|
|
this.$refs.cascaderRef.inputValue = ""
|
|
|
console.log(this.$refs.cascaderRef);
|
|
@@ -508,11 +499,11 @@ export default {
|
|
|
@import url("../../../styles/elDialog.scss");
|
|
|
|
|
|
.custom_page {
|
|
|
- padding: 20px;
|
|
|
+ padding: 20px;
|
|
|
}
|
|
|
|
|
|
.checkBoxStyle {
|
|
|
- margin-bottom: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
</style>
|
|
|
|