|
|
|
@ -10,34 +10,43 @@ |
|
|
|
</div> |
|
|
|
<div class="container"> |
|
|
|
<div class="handle-box"> |
|
|
|
<el-input v-model="query.name" placeholder="标准编号" class="handle-input mr10"></el-input> |
|
|
|
<el-input placeholder="资产名称" class="handle-input mr10"></el-input> |
|
|
|
<el-input placeholder="机构名称" class="handle-input mr10"></el-input> |
|
|
|
<el-select placeholder="资产状态" class="handle-select mr10"> |
|
|
|
<el-option key="1" label="广东省" value="广东省"></el-option> |
|
|
|
<el-option key="2" label="湖南省" value="湖南省"></el-option> |
|
|
|
<el-input v-model="query.serial_number" placeholder="标准编号" class="handle-input mr10"></el-input> |
|
|
|
<el-input v-model="query.account_name" placeholder="资产名称" class="handle-input mr10"></el-input> |
|
|
|
<el-input v-model="query.firm_name" placeholder="机构名称" class="handle-input mr10"></el-input> |
|
|
|
<el-select v-model="query.account_status" placeholder="资产状态" class="handle-select mr10"> |
|
|
|
<el-option key="4" label="全部" :value="4"></el-option> |
|
|
|
<el-option key="1" label="待托管" :value="1"></el-option> |
|
|
|
<el-option key="2" label="已托管" :value="2"></el-option> |
|
|
|
<el-option key="3" label="待发布" :value="3"></el-option> |
|
|
|
<el-option key="5" label="已发布" :value="5"></el-option> |
|
|
|
<el-option key="6" label="已下架" :value="6"></el-option> |
|
|
|
</el-select> |
|
|
|
<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 v-model="query.account_apply" placeholder="审核状态" class="handle-select mr10"> |
|
|
|
<el-option key="4" label="全部" :value="4"></el-option> |
|
|
|
<el-option key="1" label="待托管审核" :value="1"></el-option> |
|
|
|
<el-option key="2" label="托管审核不通过" :value="2"></el-option> |
|
|
|
<el-option key="3" label="托管审核通过" :value="3"></el-option> |
|
|
|
<el-option key="5" label="待发布审核" :value="5"></el-option> |
|
|
|
<el-option key="6" label="发布审核不通过" :value="6"></el-option> |
|
|
|
<el-option key="7" label="发布审核通过" :value="7"></el-option> |
|
|
|
</el-select> |
|
|
|
<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 v-model="query.auditID" placeholder="审核人员" class="handle-select mr10"> |
|
|
|
<el-option v-for="item in auditList" :key="item.uid" :label="item.username" :value="item.uid"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-date-picker |
|
|
|
class="mr10" |
|
|
|
v-model="query.time" |
|
|
|
type="datetimerange" |
|
|
|
:picker-options="pickerOptions" |
|
|
|
range-separator="至" |
|
|
|
value-format="yyyy-MM-dd h:m:s" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
align="right" |
|
|
|
class="mr10" |
|
|
|
v-model="query.time" |
|
|
|
type="datetimerange" |
|
|
|
:picker-options="pickerOptions" |
|
|
|
range-separator="至" |
|
|
|
value-format="timestamp" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
align="right" |
|
|
|
> |
|
|
|
</el-date-picker> |
|
|
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
|
|
|
<el-button type="primary" plain @click="reset">重置</el-button> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
@ -45,18 +54,36 @@ |
|
|
|
class="table" |
|
|
|
ref="multipleTable" |
|
|
|
header-cell-class-name="table-header" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
<el-table-column type="selection" 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 label="标准编号" prop="name"></el-table-column> |
|
|
|
<el-table-column label="资产名称" prop="name"></el-table-column> |
|
|
|
<el-table-column prop="address" label="机构名称"></el-table-column> |
|
|
|
<el-table-column prop="address" label="剩余数量"></el-table-column> |
|
|
|
<el-table-column prop="address" label="资产状态"></el-table-column> |
|
|
|
<el-table-column prop="address" label="审核状态"></el-table-column> |
|
|
|
<el-table-column prop="date" label="审核人员"></el-table-column> |
|
|
|
<el-table-column label="操作" width="280" align="center"> |
|
|
|
<el-table-column prop="create_time" label="创建时间" :formatter="formatDate" ></el-table-column> |
|
|
|
<el-table-column label="标准编号" prop="serial" width="200"></el-table-column> |
|
|
|
<el-table-column label="资产名称" prop="serial_name"></el-table-column> |
|
|
|
<el-table-column prop="firm_name" label="机构名称"></el-table-column> |
|
|
|
<el-table-column prop="apply_name" label="托管数量" width="80"></el-table-column> |
|
|
|
<el-table-column prop="amount" label="剩余数量" width="80"></el-table-column> |
|
|
|
<el-table-column prop="asset_status" label="资产状态" width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.asset_status==1">已发布</span> |
|
|
|
<span v-else-if="scope.row.asset_status==0">待发布</span> |
|
|
|
<span v-else-if="scope.row.asset_status==2">待上架</span> |
|
|
|
<span v-else-if="scope.row.asset_status==3">已上架</span> |
|
|
|
<span v-else-if="scope.row.asset_status==4">已下架</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="apply_status" label="审核状态"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.apply_status==1">发布审核通过</span> |
|
|
|
<span v-else-if="scope.row.apply_status==0">待发布审核</span> |
|
|
|
<span v-else-if="scope.row.apply_status==2">待上架审核</span> |
|
|
|
<span v-else-if="scope.row.apply_status==3">上架审核通过</span> |
|
|
|
<span v-else-if="scope.row.apply_status==4">上架审核不通过</span> |
|
|
|
<span v-else-if="scope.row.apply_status==5">发布审核不通过</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="username" label="审核人员"></el-table-column> |
|
|
|
<el-table-column label="操作" width="250" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
@ -64,11 +91,11 @@ |
|
|
|
>资料查看</el-button> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
@click="handleDelete(scope.$index, scope.row)" |
|
|
|
>上架资产</el-button> |
|
|
|
@click="operationRecord(scope.row)" |
|
|
|
>{{scope.row | operationStatus}}</el-button> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
@click="handleDelete(scope.$index, scope.row)" |
|
|
|
@click="blacklist( scope.row)" |
|
|
|
>交易查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -77,118 +104,144 @@ |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
layout="total, prev, pager, next" |
|
|
|
:current-page="query.pageIndex" |
|
|
|
:page-size="query.pageSize" |
|
|
|
:current-page="query.page" |
|
|
|
:page-size="query.limit" |
|
|
|
:total="pageTotal" |
|
|
|
@current-change="handlePageChange" |
|
|
|
></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 编辑弹出框 --> |
|
|
|
<el-dialog title="编辑" :visible.sync="editVisible" width="30%"> |
|
|
|
<el-form ref="form" :model="form" label-width="70px"> |
|
|
|
<el-form-item label="用户名"> |
|
|
|
<el-input v-model="form.name"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="地址"> |
|
|
|
<el-input v-model="form.address"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="editVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="saveEdit">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { fetchData } from '../../../api/index'; |
|
|
|
import { getAccountList ,operationRecord,updateBlackList,auditList} from '../../../api/index'; |
|
|
|
import moment from 'moment' |
|
|
|
export default { |
|
|
|
name: 'basetable', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
query: { |
|
|
|
address: '', |
|
|
|
name: '', |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 10 |
|
|
|
serial_number: '', |
|
|
|
account_name: '', |
|
|
|
firm_name: '', |
|
|
|
account_status: '', |
|
|
|
account_apply: '', |
|
|
|
auditID:'', |
|
|
|
time: '', |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
}, |
|
|
|
query1:{ |
|
|
|
uid:'', |
|
|
|
buyer_account_type:0, |
|
|
|
enter_shop_type:0, |
|
|
|
third_party_type:0 |
|
|
|
}, |
|
|
|
tableData: [], |
|
|
|
recordList:[], |
|
|
|
auditList:[], |
|
|
|
multipleSelection: [], |
|
|
|
delList: [], |
|
|
|
editVisible: false, |
|
|
|
pageTotal: 0, |
|
|
|
form: {}, |
|
|
|
idx: -1, |
|
|
|
id: -1, |
|
|
|
pickerOptions: { |
|
|
|
shortcuts: [ |
|
|
|
{ |
|
|
|
text: "最近一周", |
|
|
|
onClick(picker) { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "最近一个月", |
|
|
|
onClick(picker) { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "最近三个月", |
|
|
|
onClick(picker) { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
shortcuts: [ |
|
|
|
{ |
|
|
|
text: "最近一周", |
|
|
|
onClick(picker) { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "最近一个月", |
|
|
|
onClick(picker) { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
text: "最近三个月", |
|
|
|
onClick(picker) { |
|
|
|
const end = new Date(); |
|
|
|
const start = new Date(); |
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
|
|
|
picker.$emit("pick", [start, end]); |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getData(); |
|
|
|
this.getAuditList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 审核人员下拉数据 |
|
|
|
getAuditList(){ |
|
|
|
auditList().then(res => { |
|
|
|
// console.log(res); |
|
|
|
if (res.code==100) { |
|
|
|
this.auditList=res.data.list |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
//添加黑名单 |
|
|
|
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 |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 操作记录 |
|
|
|
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 的模拟数据 |
|
|
|
getData() { |
|
|
|
fetchData(this.query).then(res => { |
|
|
|
// console.log(res); |
|
|
|
this.tableData = res.list; |
|
|
|
this.pageTotal = res.pageTotal || 50; |
|
|
|
getAccountList(this.query).then(res => { |
|
|
|
console.log(res); |
|
|
|
if (res.code==100) { |
|
|
|
this.tableData = res.data.list; |
|
|
|
this.pageTotal = res.data.count; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 触发搜索按钮 |
|
|
|
handleSearch() { |
|
|
|
this.$set(this.query, 'pageIndex', 1); |
|
|
|
this.$set(this.query, 'page', 1); |
|
|
|
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) { |
|
|
|
this.idx = index; |
|
|
|
@ -203,14 +256,40 @@ export default { |
|
|
|
}, |
|
|
|
// 分页导航 |
|
|
|
handlePageChange(val) { |
|
|
|
this.$set(this.query, 'pageIndex', val); |
|
|
|
this.$set(this.query, 'page', val); |
|
|
|
this.getData(); |
|
|
|
} |
|
|
|
}, |
|
|
|
filters:{ |
|
|
|
operationStatus(res){ |
|
|
|
let text=''; |
|
|
|
if (res.asset_status==2|| res.asset_status==4 && res.apply_status==3) { |
|
|
|
text='上架资产' |
|
|
|
}else if(res.asset_status==1 || res.asset_status==3 && res.apply_status==3 || res.apply_status==1){ |
|
|
|
text='下架资产' |
|
|
|
} |
|
|
|
return text |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<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 { |
|
|
|
margin-bottom: 20px; |
|
|
|
} |
|
|
|
|