|
|
@ -5,39 +5,37 @@ |
|
|
<el-breadcrumb-item> |
|
|
<el-breadcrumb-item> |
|
|
<i class="el-icon-lx-cascades"></i> 账户管理 |
|
|
<i class="el-icon-lx-cascades"></i> 账户管理 |
|
|
</el-breadcrumb-item> |
|
|
</el-breadcrumb-item> |
|
|
<el-breadcrumb-item>平台账户查询</el-breadcrumb-item> |
|
|
<el-breadcrumb-item>黑名单管理</el-breadcrumb-item> |
|
|
</el-breadcrumb> |
|
|
</el-breadcrumb> |
|
|
</div> |
|
|
</div> |
|
|
<div class="container"> |
|
|
<div class="container"> |
|
|
<div class="handle-box"> |
|
|
<div class="handle-box"> |
|
|
<el-input v-model="query.name" placeholder="机构名称" class="handle-input mr10"></el-input> |
|
|
<el-input v-model="query.firm_name" placeholder="机构名称" class="handle-input mr10"></el-input> |
|
|
<el-input placeholder="账户号码" class="handle-input mr10"></el-input> |
|
|
<el-input v-model="query.phone" placeholder="账户号码" class="handle-input mr10"></el-input> |
|
|
<el-input placeholder="申请人名称" class="handle-input mr10"></el-input> |
|
|
<el-input v-model="query.username" placeholder="申请人名称" class="handle-input mr10"></el-input> |
|
|
<el-select placeholder="买家开户" class="handle-select mr10"> |
|
|
<el-select v-model="query.black_type" placeholder="黑名单类型" class="handle-select mr10"> |
|
|
<el-option key="1" label="广东省" value="广东省"></el-option> |
|
|
<el-option key="4" label="全部" :value="4"></el-option> |
|
|
<el-option key="2" label="湖南省" value="湖南省"></el-option> |
|
|
<el-option key="1" label="购买方" :value="1"></el-option> |
|
|
</el-select> |
|
|
<el-option key="2" label="托管方" :value="2"></el-option> |
|
|
<el-select v-model="query.address" placeholder="入驻商家" class="handle-select mr10"> |
|
|
<el-option key="3" label="第三方" :value="3"></el-option> |
|
|
<el-option key="1" label="广东省" value="广东省"></el-option> |
|
|
<el-option key="5" label="购买方和托管方" :value="5"></el-option> |
|
|
<el-option key="2" label="湖南省" value="湖南省"></el-option> |
|
|
<el-option key="6" label="购买方和第三方" :value="6"></el-option> |
|
|
</el-select> |
|
|
<el-option key="7" label="托管方和第三方" :value="7"></el-option> |
|
|
<el-select v-model="query.address" placeholder="第三方机构" class="handle-select mr10"> |
|
|
|
|
|
<el-option key="1" label="广东省" value="广东省"></el-option> |
|
|
|
|
|
<el-option key="2" label="湖南省" value="湖南省"></el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
class="mr10" |
|
|
class="mr10" |
|
|
v-model="query.time" |
|
|
v-model="query.time" |
|
|
type="datetimerange" |
|
|
type="datetimerange" |
|
|
:picker-options="pickerOptions" |
|
|
:picker-options="pickerOptions" |
|
|
range-separator="至" |
|
|
range-separator="至" |
|
|
value-format="yyyy-MM-dd h:m:s" |
|
|
value-format="timestamp" |
|
|
start-placeholder="开始日期" |
|
|
start-placeholder="开始日期" |
|
|
end-placeholder="结束日期" |
|
|
end-placeholder="结束日期" |
|
|
align="right" |
|
|
align="right" |
|
|
> |
|
|
> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
|
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
|
|
|
|
|
<el-button type="primary" plain @click="reset">重置</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<el-table |
|
|
<el-table |
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
@ -45,16 +43,17 @@ |
|
|
class="table" |
|
|
class="table" |
|
|
ref="multipleTable" |
|
|
ref="multipleTable" |
|
|
header-cell-class-name="table-header" |
|
|
header-cell-class-name="table-header" |
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
|
> |
|
|
> |
|
|
<el-table-column prop="id" label="序号" width="55" align="center"></el-table-column> |
|
|
<el-table-column prop="id" label="序号" width="55" align="center"></el-table-column> |
|
|
<el-table-column prop="name" label="申请时间"></el-table-column> |
|
|
<el-table-column prop="black_time" label="禁用时间" :formatter="formatDate"></el-table-column> |
|
|
<el-table-column label="机构名称" prop="name"></el-table-column> |
|
|
<el-table-column label="机构名称" prop="firm_name"></el-table-column> |
|
|
<el-table-column label="账户号码" prop="name"></el-table-column> |
|
|
<el-table-column label="账户号码" prop="phone"></el-table-column> |
|
|
<el-table-column prop="address" label="申请人名称"></el-table-column> |
|
|
<el-table-column prop="apply_name" label="申请人名称"></el-table-column> |
|
|
<el-table-column prop="address" label="是否买家开户"></el-table-column> |
|
|
<el-table-column prop="audit_status" label="审核状态"> |
|
|
<el-table-column prop="address" label="是否入驻商家"></el-table-column> |
|
|
<template slot-scope="scope"> |
|
|
<el-table-column prop="address" label="是否第三方机构"></el-table-column> |
|
|
<span >{{scope.row | blackType}}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column label="操作" width="280" align="center"> |
|
|
<el-table-column label="操作" width="280" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button |
|
|
<el-button |
|
|
@ -63,16 +62,12 @@ |
|
|
>资料查看</el-button> |
|
|
>资料查看</el-button> |
|
|
<el-button |
|
|
<el-button |
|
|
type="text" |
|
|
type="text" |
|
|
@click="handleDelete(scope.$index, scope.row)" |
|
|
@click="operationRecord(scope.row)" |
|
|
>操作记录</el-button> |
|
|
>操作记录</el-button> |
|
|
<el-button |
|
|
<el-button |
|
|
type="text" |
|
|
type="text" |
|
|
@click="handleDelete(scope.$index, scope.row)" |
|
|
@click="blacklist( scope.row)" |
|
|
>添加黑名单</el-button> |
|
|
>解除黑名单</el-button> |
|
|
<el-button |
|
|
|
|
|
type="text" |
|
|
|
|
|
@click="handleDelete(scope.$index, scope.row)" |
|
|
|
|
|
>商家配置</el-button> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -80,82 +75,97 @@ |
|
|
<el-pagination |
|
|
<el-pagination |
|
|
background |
|
|
background |
|
|
layout="total, prev, pager, next" |
|
|
layout="total, prev, pager, next" |
|
|
:current-page="query.pageIndex" |
|
|
:current-page="query.page" |
|
|
:page-size="query.pageSize" |
|
|
:page-size="query.limit" |
|
|
:total="pageTotal" |
|
|
:total="pageTotal" |
|
|
@current-change="handlePageChange" |
|
|
@current-change="handlePageChange" |
|
|
></el-pagination> |
|
|
></el-pagination> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<!-- 操作记录 --> |
|
|
<!-- 编辑弹出框 --> |
|
|
<el-dialog title="操作记录" :visible.sync="editVisible1" width="30%"> |
|
|
<el-dialog title="编辑" :visible.sync="editVisible" width="30%"> |
|
|
<p class="recordTips">以下为该账户历史操作记录:</p> |
|
|
<el-form ref="form" :model="form" label-width="70px"> |
|
|
<p class="record_content" v-for="(item,index) in recordList" :key="index"> |
|
|
<el-form-item label="用户名"> |
|
|
<span>{{index + 1}}.</span> |
|
|
<el-input v-model="form.name"></el-input> |
|
|
<span>{{item.create_time | formatDate}}</span> |
|
|
</el-form-item> |
|
|
<span>{{item.operation_content}}</span> |
|
|
<el-form-item label="地址"> |
|
|
</p> |
|
|
<el-input v-model="form.address"></el-input> |
|
|
</el-dialog> |
|
|
</el-form-item> |
|
|
<!-- 添加黑名单 --> |
|
|
</el-form> |
|
|
<el-dialog title="提示" :visible.sync="editVisible2" width="30%"> |
|
|
|
|
|
<p class="recordTips">请确认是否需要添加黑名单?</p> |
|
|
|
|
|
<div class="record_select"> |
|
|
|
|
|
<el-checkbox v-model="query1.buyer_account_type" :true-label="1" :false-label="0">购买方</el-checkbox> |
|
|
|
|
|
<el-checkbox v-model="query1.enter_shop_type" :true-label="1" :false-label="0">托管方</el-checkbox> |
|
|
|
|
|
<el-checkbox v-model="query1.third_party_type" :true-label="1" :false-label="0">第三方机构</el-checkbox> |
|
|
|
|
|
</div> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<el-button @click="editVisible = false">取 消</el-button> |
|
|
<el-button @click="editVisible2 = false">取 消</el-button> |
|
|
<el-button type="primary" @click="saveEdit">确 定</el-button> |
|
|
<el-button type="primary" @click="addBlacklist">确 定</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { fetchData } from '../../../api/index'; |
|
|
import { blackList ,operationRecord,updateBlackList,getBlack} from '../../../api/index'; |
|
|
|
|
|
import moment from 'moment' |
|
|
export default { |
|
|
export default { |
|
|
name: 'basetable', |
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
query: { |
|
|
query: { |
|
|
address: '', |
|
|
firm_name: '', |
|
|
name: '', |
|
|
phone: '', |
|
|
pageIndex: 1, |
|
|
username: '', |
|
|
pageSize: 10 |
|
|
black_type:'', |
|
|
|
|
|
time: '', |
|
|
|
|
|
page: 1, |
|
|
|
|
|
limit: 10 |
|
|
|
|
|
}, |
|
|
|
|
|
query1:{ |
|
|
|
|
|
uid:'', |
|
|
|
|
|
buyer_account_type:0, |
|
|
|
|
|
enter_shop_type:0, |
|
|
|
|
|
third_party_type:0 |
|
|
}, |
|
|
}, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
|
|
|
recordList:[], |
|
|
multipleSelection: [], |
|
|
multipleSelection: [], |
|
|
delList: [], |
|
|
delList: [], |
|
|
editVisible: false, |
|
|
editVisible: false, |
|
|
|
|
|
editVisible1: false, |
|
|
|
|
|
editVisible2: false, |
|
|
pageTotal: 0, |
|
|
pageTotal: 0, |
|
|
form: {}, |
|
|
|
|
|
idx: -1, |
|
|
|
|
|
id: -1, |
|
|
|
|
|
pickerOptions: { |
|
|
pickerOptions: { |
|
|
shortcuts: [ |
|
|
shortcuts: [ |
|
|
{ |
|
|
{ |
|
|
text: "最近一周", |
|
|
text: "最近一周", |
|
|
onClick(picker) { |
|
|
onClick(picker) { |
|
|
const end = new Date(); |
|
|
const end = new Date(); |
|
|
const start = new Date(); |
|
|
const start = new Date(); |
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
|
picker.$emit("pick", [start, end]); |
|
|
picker.$emit("pick", [start, end]); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "最近一个月", |
|
|
text: "最近一个月", |
|
|
onClick(picker) { |
|
|
onClick(picker) { |
|
|
const end = new Date(); |
|
|
const end = new Date(); |
|
|
const start = new Date(); |
|
|
const start = new Date(); |
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
|
picker.$emit("pick", [start, end]); |
|
|
picker.$emit("pick", [start, end]); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
text: "最近三个月", |
|
|
text: "最近三个月", |
|
|
onClick(picker) { |
|
|
onClick(picker) { |
|
|
const end = new Date(); |
|
|
const end = new Date(); |
|
|
const start = new Date(); |
|
|
const start = new Date(); |
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
|
|
picker.$emit("pick", [start, end]); |
|
|
picker.$emit("pick", [start, end]); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
@ -163,35 +173,71 @@ export default { |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
//添加黑名单 |
|
|
|
|
|
addBlacklist(){ |
|
|
|
|
|
updateBlackList(this.query1).then(res => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
if (res.code==100) { |
|
|
|
|
|
this.$message.success(res.msg); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
this.editVisible2=false |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
//显示添加黑名单 |
|
|
|
|
|
blacklist(row){ |
|
|
|
|
|
let data={uid:row.id} |
|
|
|
|
|
getBlack(data).then(res => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
if (res.code==100) { |
|
|
|
|
|
this.query1.uid=row.id |
|
|
|
|
|
this.query1.buyer_account_type=res.data.is_buyer_black |
|
|
|
|
|
this.query1.enter_shop_type=res.data.is_enter_shop_black |
|
|
|
|
|
this.query1.third_party_type=res.data.is_third_party_black |
|
|
|
|
|
} |
|
|
|
|
|
this.editVisible2=true; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
// 操作记录 |
|
|
|
|
|
operationRecord(row){ |
|
|
|
|
|
let data={uid:row.id} |
|
|
|
|
|
operationRecord(data).then(res => { |
|
|
|
|
|
console.log(res); |
|
|
|
|
|
if(res.code==100){ |
|
|
|
|
|
this.recordList=res.data.list |
|
|
|
|
|
} |
|
|
|
|
|
this.editVisible1=true |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
// 重置方法 |
|
|
|
|
|
reset(){ |
|
|
|
|
|
Object.keys(this.query).forEach(key => { |
|
|
|
|
|
console.info(key) |
|
|
|
|
|
if (key!='page' && key!='limit') { |
|
|
|
|
|
this.query[key] = '' |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
//时间戳转换时间 |
|
|
|
|
|
formatDate(row,colnum){ |
|
|
|
|
|
return moment(row[colnum.create_time]).format('YYYY-MM-DD HH:mm:ss') |
|
|
|
|
|
}, |
|
|
// 获取 easy-mock 的模拟数据 |
|
|
// 获取 easy-mock 的模拟数据 |
|
|
getData() { |
|
|
getData() { |
|
|
fetchData(this.query).then(res => { |
|
|
blackList(this.query).then(res => { |
|
|
// console.log(res); |
|
|
console.log(res); |
|
|
this.tableData = res.list; |
|
|
if (res.code==100) { |
|
|
this.pageTotal = res.pageTotal || 50; |
|
|
this.tableData = res.data.list; |
|
|
|
|
|
this.pageTotal = res.data.count; |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
// 触发搜索按钮 |
|
|
// 触发搜索按钮 |
|
|
handleSearch() { |
|
|
handleSearch() { |
|
|
this.$set(this.query, 'pageIndex', 1); |
|
|
this.$set(this.query, 'page', 1); |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
}, |
|
|
}, |
|
|
// 删除操作 |
|
|
|
|
|
handleDelete(index, row) { |
|
|
|
|
|
// 二次确认删除 |
|
|
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}) |
|
|
|
|
|
.then(() => { |
|
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
|
this.tableData.splice(index, 1); |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => {}); |
|
|
|
|
|
}, |
|
|
|
|
|
// 多选操作 |
|
|
|
|
|
handleSelectionChange(val) { |
|
|
|
|
|
this.multipleSelection = val; |
|
|
|
|
|
}, |
|
|
|
|
|
// 编辑操作 |
|
|
// 编辑操作 |
|
|
handleEdit(index, row) { |
|
|
handleEdit(index, row) { |
|
|
this.idx = index; |
|
|
this.idx = index; |
|
|
@ -206,14 +252,50 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 分页导航 |
|
|
// 分页导航 |
|
|
handlePageChange(val) { |
|
|
handlePageChange(val) { |
|
|
this.$set(this.query, 'pageIndex', val); |
|
|
this.$set(this.query, 'page', val); |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
filters:{ |
|
|
|
|
|
blackType(res){ |
|
|
|
|
|
console.info(res) |
|
|
|
|
|
let text=''; |
|
|
|
|
|
if (res.is_buyer_black==1) { |
|
|
|
|
|
text+='购买方,' |
|
|
|
|
|
} |
|
|
|
|
|
if (res.is_enter_shop_black==1) { |
|
|
|
|
|
text+='托管方,' |
|
|
|
|
|
} |
|
|
|
|
|
if (res.is_third_party_black==1) { |
|
|
|
|
|
text+='第三方,' |
|
|
|
|
|
} |
|
|
|
|
|
if (res.is_third_party_black==1 && res.is_buyer_black==1 &&res.is_enter_shop_black==1) { |
|
|
|
|
|
text='全部' |
|
|
|
|
|
} |
|
|
|
|
|
var reg=/,$/gi; |
|
|
|
|
|
text=text.replace(reg,""); |
|
|
|
|
|
return text; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
|
|
|
.record_select{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
} |
|
|
|
|
|
.record_select >>> .el-checkbox{ |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.record_content{ |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.recordTips{ |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
|
} |
|
|
.handle-box { |
|
|
.handle-box { |
|
|
margin-bottom: 20px; |
|
|
margin-bottom: 20px; |
|
|
} |
|
|
} |
|
|
|