31 changed files with 3758 additions and 511 deletions
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询承兑商质押金费率配置列表
|
||||
|
export function listOtcStoreBondConfig(query) { |
||||
|
return request({ |
||||
|
url: '/otc/OtcStoreBondConfig/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询承兑商质押金费率配置详细
|
||||
|
export function getOtcStoreBondConfig(id) { |
||||
|
return request({ |
||||
|
url: '/otc/OtcStoreBondConfig/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增承兑商质押金费率配置
|
||||
|
export function addOtcStoreBondConfig(data) { |
||||
|
return request({ |
||||
|
url: '/otc/OtcStoreBondConfig', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改承兑商质押金费率配置
|
||||
|
export function updateOtcStoreBondConfig(data) { |
||||
|
return request({ |
||||
|
url: '/otc/OtcStoreBondConfig', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除承兑商质押金费率配置
|
||||
|
export function delOtcStoreBondConfig(id) { |
||||
|
return request({ |
||||
|
url: '/otc/OtcStoreBondConfig/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出承兑商质押金费率配置
|
||||
|
export function exportOtcStoreBondConfig(query) { |
||||
|
return request({ |
||||
|
url: '/otc/OtcStoreBondConfig/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询法币信息列表
|
||||
|
export function listOtcCurrencyCoin(query) { |
||||
|
return request({ |
||||
|
url: '/otc/otcCurrencyCoin/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询法币信息详细
|
||||
|
export function getOtcCurrencyCoin(coin) { |
||||
|
return request({ |
||||
|
url: '/otc/otcCurrencyCoin/' + coin, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增法币信息
|
||||
|
export function addOtcCurrencyCoin(data) { |
||||
|
return request({ |
||||
|
url: '/otc/otcCurrencyCoin', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改法币信息
|
||||
|
export function updateOtcCurrencyCoin(data) { |
||||
|
return request({ |
||||
|
url: '/otc/otcCurrencyCoin', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除法币信息
|
||||
|
export function delOtcCurrencyCoin(coin) { |
||||
|
return request({ |
||||
|
url: '/otc/otcCurrencyCoin/' + coin, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出法币信息
|
||||
|
export function exportOtcCurrencyCoin(query) { |
||||
|
return request({ |
||||
|
url: '/otc/otcCurrencyCoin/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询承兑商保证金记录列表
|
||||
|
export function listOtcStoreBond(query) { |
||||
|
return request({ |
||||
|
url: '/otc/otcStoreBond/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询承兑商保证金记录详细
|
||||
|
export function getOtcStoreBond(id) { |
||||
|
return request({ |
||||
|
url: '/otc/otcStoreBond/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增承兑商保证金记录
|
||||
|
export function addOtcStoreBond(data) { |
||||
|
return request({ |
||||
|
url: '/otc/otcStoreBond', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改承兑商保证金记录
|
||||
|
export function updateOtcStoreBond(data) { |
||||
|
return request({ |
||||
|
url: '/otc/otcStoreBond', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除承兑商保证金记录
|
||||
|
export function delOtcStoreBond(id) { |
||||
|
return request({ |
||||
|
url: '/otc/otcStoreBond/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出承兑商保证金记录
|
||||
|
export function exportOtcStoreBond(query) { |
||||
|
return request({ |
||||
|
url: '/otc/otcStoreBond/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询广告文本内容列表
|
||||
|
export function listAd(query) { |
||||
|
return request({ |
||||
|
url: '/user/ad/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
// 查询广告文本内容列表
|
||||
|
export function listHelp(query) { |
||||
|
return request({ |
||||
|
url: '/user/adHelp/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
// 查询广告文本内容详细
|
||||
|
export function getAd(id) { |
||||
|
return request({ |
||||
|
url: '/user/ad/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增广告文本内容
|
||||
|
export function addAd(data) { |
||||
|
return request({ |
||||
|
url: '/user/ad/add', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改广告文本内容
|
||||
|
export function updateAd(data) { |
||||
|
return request({ |
||||
|
url: '/user/ad/edit', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改广告文本内容
|
||||
|
export function changeStatus(id,dataStatus) { |
||||
|
const data={ |
||||
|
id, |
||||
|
dataStatus |
||||
|
} |
||||
|
return request({ |
||||
|
url: '/user/ad/edit', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
// 删除广告文本内容
|
||||
|
export function delAd(id) { |
||||
|
return request({ |
||||
|
url: '/user/ad/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出广告文本内容
|
||||
|
export function exportAd(query) { |
||||
|
return request({ |
||||
|
url: '/user/ad/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询广告位列表
|
||||
|
export function listAdPosition(query) { |
||||
|
return request({ |
||||
|
url: '/user/position/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 查询广告位列表
|
||||
|
export function listAdPositionAll(query) { |
||||
|
return request({ |
||||
|
url: '/user/position/listAll', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询广告位详细
|
||||
|
export function getAdPosition(id) { |
||||
|
return request({ |
||||
|
url: '/user/position/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增广告位
|
||||
|
export function addAdPosition(data) { |
||||
|
return request({ |
||||
|
url: '/user/position', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改广告位
|
||||
|
export function updateAdPosition(data) { |
||||
|
return request({ |
||||
|
url: '/user/position', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除广告位
|
||||
|
export function delAdPosition(id) { |
||||
|
return request({ |
||||
|
url: '/user/position/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出广告位
|
||||
|
export function exportAdPosition(query) { |
||||
|
return request({ |
||||
|
url: '/user/positionposition/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询钱包资金流水记录列表
|
||||
|
export function listWalletAssetsRecord(query) { |
||||
|
return request({ |
||||
|
url: '/user/walletAssetsRecord/list', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询钱包资金流水记录详细
|
||||
|
export function getWalletAssetsRecord(id) { |
||||
|
return request({ |
||||
|
url: '/user/walletAssetsRecord/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增钱包资金流水记录
|
||||
|
export function addWalletAssetsRecord(data) { |
||||
|
return request({ |
||||
|
url: '/user/walletAssetsRecord', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改钱包资金流水记录
|
||||
|
export function updateWalletAssetsRecord(data) { |
||||
|
return request({ |
||||
|
url: '/user/walletAssetsRecord', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除钱包资金流水记录
|
||||
|
export function delWalletAssetsRecord(id) { |
||||
|
return request({ |
||||
|
url: '/user/walletAssetsRecord/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出钱包资金流水记录
|
||||
|
export function exportWalletAssetsRecord(query) { |
||||
|
return request({ |
||||
|
url: '/user/walletAssetsRecord/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,369 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="质押币种" prop="pledgeCoin"> |
||||
|
<el-input |
||||
|
v-model="queryParams.pledgeCoin" |
||||
|
placeholder="请输入质押币种" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="手续费类型" prop="feeType">--> |
||||
|
<!-- <el-select v-model="queryParams.feeType" placeholder="请选择手续费类型:" clearable size="small">--> |
||||
|
<!-- <el-option--> |
||||
|
<!-- v-for="dict in feeTypeOptions"--> |
||||
|
<!-- :key="dict.dictValue"--> |
||||
|
<!-- :label="dict.dictLabel"--> |
||||
|
<!-- :value="dict.dictValue"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-select>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="手续费" prop="fee">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.fee"--> |
||||
|
<!-- placeholder="请输入手续费"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- size="small"--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item label="状态" prop="status"> |
||||
|
<el-select v-model="queryParams.status" placeholder="请选择数据状态Y有效N无效" clearable size="small"> |
||||
|
<el-option |
||||
|
v-for="dict in statusOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="质押标识" prop="code">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.code"--> |
||||
|
<!-- placeholder="请输入质押标识"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- size="small"--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<!-- <el-col :span="1.5">--> |
||||
|
<!-- <el-button--> |
||||
|
<!-- type="primary"--> |
||||
|
<!-- plain--> |
||||
|
<!-- icon="el-icon-plus"--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- @click="handleAdd"--> |
||||
|
<!-- v-hasPermi="['otc:OtcStoreBondConfig:add']"--> |
||||
|
<!-- >新增</el-button>--> |
||||
|
<!-- </el-col>--> |
||||
|
<!-- <el-col :span="1.5">--> |
||||
|
<!-- <el-button--> |
||||
|
<!-- type="success"--> |
||||
|
<!-- plain--> |
||||
|
<!-- icon="el-icon-edit"--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- :disabled="single"--> |
||||
|
<!-- @click="handleUpdate"--> |
||||
|
<!-- v-hasPermi="['otc:OtcStoreBondConfig:edit']"--> |
||||
|
<!-- >修改</el-button>--> |
||||
|
<!-- </el-col>--> |
||||
|
<!-- <el-col :span="1.5">--> |
||||
|
<!-- <el-button--> |
||||
|
<!-- type="danger"--> |
||||
|
<!-- plain--> |
||||
|
<!-- icon="el-icon-delete"--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- :disabled="multiple"--> |
||||
|
<!-- @click="handleDelete"--> |
||||
|
<!-- v-hasPermi="['otc:OtcStoreBondConfig:remove']"--> |
||||
|
<!-- >删除</el-button>--> |
||||
|
<!-- </el-col>--> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['otc:OtcStoreBondConfig:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="OtcStoreBondConfigList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="主键" align="center" prop="id" /> |
||||
|
<el-table-column label="质押币种" align="center" prop="pledgeCoin" /> |
||||
|
<el-table-column label="最低质押数量" align="center" prop="pledgeMinNum" /> |
||||
|
<!-- <el-table-column label="手续费类型" align="center" prop="feeType" :formatter="feeTypeFormat" />--> |
||||
|
<!-- <el-table-column label="手续费" align="center" prop="fee" />--> |
||||
|
<el-table-column label="是否开启" align="center" prop="status" :formatter="statusFormat" /> |
||||
|
<el-table-column label="质押标识" align="center" prop="code" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['otc:OtcStoreBondConfig:edit']" |
||||
|
>修改</el-button> |
||||
|
<!-- <el-button--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- type="text"--> |
||||
|
<!-- icon="el-icon-delete"--> |
||||
|
<!-- @click="handleDelete(scope.row)"--> |
||||
|
<!-- v-hasPermi="['otc:OtcStoreBondConfig:remove']"--> |
||||
|
<!-- >删除</el-button>--> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改承兑商质押金费率配置对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
||||
|
<el-form-item label="质押币种" prop="pledgeCoin"> |
||||
|
<el-input v-model="form.pledgeCoin" placeholder="请输入质押币种" disabled="disabled" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="质押币种最低数量" prop="pledgeMinNum"> |
||||
|
<el-input v-model="form.pledgeMinNum" placeholder="请输入质押币种最低数量" /> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="手续费类型" prop="feeType">--> |
||||
|
<!-- <el-select v-model="form.feeType" placeholder="请选择类型:pen:按笔,percentage:百分比">--> |
||||
|
<!-- <el-option--> |
||||
|
<!-- v-for="dict in feeTypeOptions"--> |
||||
|
<!-- :key="dict.dictValue"--> |
||||
|
<!-- :label="dict.dictLabel"--> |
||||
|
<!-- :value="dict.dictValue"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-select>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="手续费" prop="fee">--> |
||||
|
<!-- <el-input v-model="form.fee" placeholder="请输入手续费" />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item label="是否开启"> |
||||
|
<!-- <el-radio-group v-model="form.status">--> |
||||
|
<!-- <el-radio label="1">请选择字典生成</el-radio>--> |
||||
|
<!-- </el-radio-group>--> |
||||
|
<el-select v-model="form.status" placeholder="请选择"> |
||||
|
<el-option |
||||
|
v-for="dict in statusOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="创建时间" prop="createTime">--> |
||||
|
<!-- <el-date-picker clearable size="small"--> |
||||
|
<!-- v-model="form.createTime"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="选择创建时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item label="质押标识" prop="code"> |
||||
|
<el-input v-model="form.code" placeholder="请输入质押标识" disabled="disabled"/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listOtcStoreBondConfig, getOtcStoreBondConfig, delOtcStoreBondConfig, addOtcStoreBondConfig, updateOtcStoreBondConfig, exportOtcStoreBondConfig } from "@/api/otc/OtcStoreBondConfig"; |
||||
|
|
||||
|
export default { |
||||
|
name: "OtcStoreBondConfig", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 承兑商质押金费率配置表格数据 |
||||
|
OtcStoreBondConfigList: [], |
||||
|
feeTypeOptions: [], |
||||
|
statusOptions: [], |
||||
|
|
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
pledgeCoin: null, |
||||
|
pledgeMinNum: null, |
||||
|
feeType: null, |
||||
|
fee: null, |
||||
|
status: null, |
||||
|
code: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
this.getDicts("sys_yes_no").then(response => { |
||||
|
this.statusOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("fee_type").then(response => { |
||||
|
this.feeTypeOptions = response.data; |
||||
|
}); |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询承兑商质押金费率配置列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
listOtcStoreBondConfig(this.queryParams).then(response => { |
||||
|
this.OtcStoreBondConfigList = response.rows; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
feeTypeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.feeTypeOptions, row.feeType); |
||||
|
}, |
||||
|
statusFormat(row, column) { |
||||
|
return this.selectDictLabel(this.statusOptions, row.status); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
pledgeCoin: null, |
||||
|
pledgeMinNum: null, |
||||
|
feeType: null, |
||||
|
fee: null, |
||||
|
status: "0", |
||||
|
createTime: null, |
||||
|
updateTime: null, |
||||
|
code: null |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加承兑商质押金费率配置"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids |
||||
|
getOtcStoreBondConfig(id).then(response => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改承兑商质押金费率配置"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateOtcStoreBondConfig(this.form).then(response => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
addOtcStoreBondConfig(this.form).then(response => { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
this.$confirm('是否确认删除承兑商质押金费率配置编号为"' + ids + '"的数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return delOtcStoreBondConfig(ids); |
||||
|
}).then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有承兑商质押金费率配置数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return exportOtcStoreBondConfig(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,339 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="法币名称" prop="fullName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.currencyCoin" |
||||
|
placeholder="请输入法币名称" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="排序" prop="sort">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.sort"--> |
||||
|
<!-- placeholder="请输入排序"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- size="small"--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<!-- <el-form-item label="是否默认 Y N" prop="isDefault">--> |
||||
|
<!-- <el-input--> |
||||
|
<!-- v-model="queryParams.isDefault"--> |
||||
|
<!-- placeholder="请输入是否默认 Y N"--> |
||||
|
<!-- clearable--> |
||||
|
<!-- size="small"--> |
||||
|
<!-- @keyup.enter.native="handleQuery"--> |
||||
|
<!-- />--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['otc:otcCurrencyCoin:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<!-- <el-col :span="1.5">--> |
||||
|
<!-- <el-button--> |
||||
|
<!-- type="success"--> |
||||
|
<!-- plain--> |
||||
|
<!-- icon="el-icon-edit"--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- :disabled="single"--> |
||||
|
<!-- @click="handleUpdate"--> |
||||
|
<!-- v-hasPermi="['otc:otcCurrencyCoin:edit']"--> |
||||
|
<!-- >修改</el-button>--> |
||||
|
<!-- </el-col>--> |
||||
|
<!-- <el-col :span="1.5">--> |
||||
|
<!-- <el-button--> |
||||
|
<!-- type="danger"--> |
||||
|
<!-- plain--> |
||||
|
<!-- icon="el-icon-delete"--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- :disabled="multiple"--> |
||||
|
<!-- @click="handleDelete"--> |
||||
|
<!-- v-hasPermi="['otc:otcCurrencyCoin:remove']"--> |
||||
|
<!-- >删除</el-button>--> |
||||
|
<!-- </el-col>--> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['otc:otcCurrencyCoin:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="otcCurrencyCoinList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="法币简称" align="center" prop="currencyCoin" /> |
||||
|
<el-table-column label="法币全称" align="center" prop="fullName" /> |
||||
|
<el-table-column label="备注" align="center" prop="remark" /> |
||||
|
<el-table-column label="排序" align="center" prop="sort" /> |
||||
|
<el-table-column label="是否默认" align="center" prop="isDefault" :formatter="statusFormat" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['otc:otcCurrencyCoin:edit']" |
||||
|
>修改</el-button> |
||||
|
<!-- <el-button--> |
||||
|
<!-- size="mini"--> |
||||
|
<!-- type="text"--> |
||||
|
<!-- icon="el-icon-delete"--> |
||||
|
<!-- @click="handleDelete(scope.row)"--> |
||||
|
<!-- v-hasPermi="['otc:otcCurrencyCoin:remove']"--> |
||||
|
<!-- >删除</el-button>--> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改法币信息对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="法币名称" prop="fullName"> |
||||
|
<el-input v-model="form.currencyCoin" placeholder="请输入法币名称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="法币全称" prop="fullName"> |
||||
|
<el-input v-model="form.fullName" placeholder="请输入法币全称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="备注" prop="remark"> |
||||
|
<el-input v-model="form.remark" placeholder="请输入备注" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="排序" prop="sort"> |
||||
|
<el-input v-model="form.sort" placeholder="请输入排序" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否默认" prop="isDefault"> |
||||
|
<!-- <el-input v-model="form.isDefault" placeholder="请输入是否默认 Y N" />--> |
||||
|
<el-radio-group v-model="form.isDefault">--> |
||||
|
<el-radio |
||||
|
v-for="dict in statusOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictValue" |
||||
|
>{{dict.dictLabel}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="添加时间" prop="createTime">--> |
||||
|
<!-- <el-date-picker clearable size="small"--> |
||||
|
<!-- v-model="form.createTime"--> |
||||
|
<!-- type="dateTime"--> |
||||
|
<!-- value-format="yyyy-MM-dd hh:mm:ss"--> |
||||
|
<!-- placeholder="选择添加时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listOtcCurrencyCoin, getOtcCurrencyCoin, delOtcCurrencyCoin, addOtcCurrencyCoin, updateOtcCurrencyCoin, exportOtcCurrencyCoin } from "@/api/otc/otcCurrencyCoin"; |
||||
|
|
||||
|
export default { |
||||
|
name: "OtcCurrencyCoin", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
operate:'add', |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 法币信息表格数据 |
||||
|
otcCurrencyCoinList: [], |
||||
|
statusOptions: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
currencyCoin:null, |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
fullName: null, |
||||
|
sort: null, |
||||
|
isDefault: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
currencyCoin: [ |
||||
|
{ required: true, message: "币种不能为空", trigger: "blur" } |
||||
|
], |
||||
|
fullName: [ |
||||
|
{ required: true, message: "全称不能为空", trigger: "blur" } |
||||
|
], |
||||
|
remark: [ |
||||
|
{ required: true, message: "备注不能为空", trigger: "blur" } |
||||
|
], |
||||
|
sort: [ |
||||
|
{ required: true, message: "排序不能为空", trigger: "blur" } |
||||
|
], |
||||
|
isDefault: [ |
||||
|
{ required: true, message: "是否默认不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
this.getDicts("sys_yes_no").then(response => { |
||||
|
this.statusOptions = response.data; |
||||
|
}); |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询法币信息列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
listOtcCurrencyCoin(this.queryParams).then(response => { |
||||
|
this.otcCurrencyCoinList = response.rows; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
statusFormat(row, column) { |
||||
|
return this.selectDictLabel(this.statusOptions, row.isDefault); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
currencyCoin: null, |
||||
|
fullName: null, |
||||
|
remark: null, |
||||
|
sort: null, |
||||
|
isDefault: 'N', |
||||
|
createTime: null |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.currencyCoin) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.operate='add'; |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加法币信息"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.operate='update'; |
||||
|
this.reset(); |
||||
|
const coin = row.currencyCoin |
||||
|
getOtcCurrencyCoin(coin).then(response => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改法币信息"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.operate == 'update'){ |
||||
|
updateOtcCurrencyCoin(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
addOtcCurrencyCoin(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const coins = row.currencyCoin; |
||||
|
this.$confirm('是否确认删除法币信息编号为"' + coins + '"的数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return delOtcCurrencyCoin(coins); |
||||
|
}).then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有法币信息数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return exportOtcCurrencyCoin(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,340 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="申请流水号" prop="witNo"> |
||||
|
<el-input |
||||
|
v-model="queryParams.witNo" |
||||
|
placeholder="请输入申请流水号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商户编号" prop="storeId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.storeId" |
||||
|
placeholder="请输入商户编号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="质押币种" prop="pledgeCoin"> |
||||
|
<el-input |
||||
|
v-model="queryParams.pledgeCoin" |
||||
|
placeholder="请输入质押币种" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="质押币种个数" prop="pledgeCoinNum"> |
||||
|
<el-input |
||||
|
v-model="queryParams.pledgeCoinNum" |
||||
|
placeholder="请输入质押币种个数" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="开启交易Y关闭交易N" prop="status"> |
||||
|
<el-select v-model="queryParams.status" placeholder="请选择开启交易Y关闭交易N" clearable size="small"> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态(已申请 applied、申请处理中process、申请完成complete、申请失败fail)" prop="applyStatus"> |
||||
|
<el-select v-model="queryParams.applyStatus" placeholder="请选择状态(已申请 applied、申请处理中process、申请完成complete、申请失败fail)" clearable size="small"> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['otc:otcStoreBond:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['otc:otcStoreBond:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['otc:otcStoreBond:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['otc:otcStoreBond:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="otcStoreBondList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="主键" align="center" prop="id" /> |
||||
|
<el-table-column label="申请流水号" align="center" prop="witNo" /> |
||||
|
<el-table-column label="商户编号" align="center" prop="storeId" /> |
||||
|
<el-table-column label="质押币种" align="center" prop="pledgeCoin" /> |
||||
|
<el-table-column label="质押币种个数" align="center" prop="pledgeCoinNum" /> |
||||
|
<el-table-column label="开启交易Y关闭交易N" align="center" prop="status" /> |
||||
|
<el-table-column label="状态(已申请 applied、申请处理中process、申请完成complete、申请失败fail)" align="center" prop="applyStatus" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['otc:otcStoreBond:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['otc:otcStoreBond:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改承兑商保证金记录对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="申请流水号" prop="witNo"> |
||||
|
<el-input v-model="form.witNo" placeholder="请输入申请流水号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商户编号" prop="storeId"> |
||||
|
<el-input v-model="form.storeId" placeholder="请输入商户编号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="质押币种" prop="pledgeCoin"> |
||||
|
<el-input v-model="form.pledgeCoin" placeholder="请输入质押币种" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="质押币种个数" prop="pledgeCoinNum"> |
||||
|
<el-input v-model="form.pledgeCoinNum" placeholder="请输入质押币种个数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="开启交易Y关闭交易N"> |
||||
|
<el-radio-group v-model="form.status"> |
||||
|
<el-radio label="1">请选择字典生成</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态(已申请 applied、申请处理中process、申请完成complete、申请失败fail)"> |
||||
|
<el-radio-group v-model="form.applyStatus"> |
||||
|
<el-radio label="1">请选择字典生成</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createTime"> |
||||
|
<el-date-picker clearable size="small" |
||||
|
v-model="form.createTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listOtcStoreBond, getOtcStoreBond, delOtcStoreBond, addOtcStoreBond, updateOtcStoreBond, exportOtcStoreBond } from "@/api/otc/otcStoreBond"; |
||||
|
|
||||
|
export default { |
||||
|
name: "OtcStoreBond", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 承兑商保证金记录表格数据 |
||||
|
otcStoreBondList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
witNo: null, |
||||
|
storeId: null, |
||||
|
pledgeCoin: null, |
||||
|
pledgeCoinNum: null, |
||||
|
status: null, |
||||
|
applyStatus: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询承兑商保证金记录列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
listOtcStoreBond(this.queryParams).then(response => { |
||||
|
this.otcStoreBondList = response.rows; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
witNo: null, |
||||
|
storeId: null, |
||||
|
pledgeCoin: null, |
||||
|
pledgeCoinNum: null, |
||||
|
status: "0", |
||||
|
updateTime: null, |
||||
|
applyStatus: "0", |
||||
|
createTime: null |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加承兑商保证金记录"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids |
||||
|
getOtcStoreBond(id).then(response => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改承兑商保证金记录"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateOtcStoreBond(this.form).then(response => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
addOtcStoreBond(this.form).then(response => { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
this.$confirm('是否确认删除承兑商保证金记录编号为"' + ids + '"的数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return delOtcStoreBond(ids); |
||||
|
}).then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有承兑商保证金记录数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return exportOtcStoreBond(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,802 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="广告终端" prop="terminalType"> |
||||
|
<el-select v-model="queryParams.terminalType" placeholder="请选择广告终端" clearable size="small"> |
||||
|
<el-option |
||||
|
v-for="dict in terminalTypeOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告位" prop="adPositionType"> |
||||
|
<el-select v-model="queryParams.adPositionType" placeholder="请选择广告位" clearable size="small"> |
||||
|
<el-option |
||||
|
v-for="dict in adPositionTypeList" |
||||
|
:key="dict.positionType" |
||||
|
:label="dict.positionName" |
||||
|
:value="dict.positionType" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告类型" prop="adType"> |
||||
|
<el-select v-model="queryParams.adType" placeholder="请选择广告类型" clearable size="small"> |
||||
|
<el-option |
||||
|
v-for="dict in adContentTypeOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="语言" prop="languageType"> |
||||
|
<el-select v-model="queryParams.languageType" placeholder="请选择语言类型" clearable size="small"> |
||||
|
<el-option |
||||
|
v-for="dict in projectLanguageOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态" prop="dataStatus"> |
||||
|
<el-select v-model="queryParams.dataStatus" placeholder="请选择状态" clearable size="small"> |
||||
|
<el-option |
||||
|
v-for="dict in statusOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictLabel" |
||||
|
:value="dict.dictValue" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['ad:ad:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['ad:ad:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['ad:ad:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['ad:ad:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
<el-table v-loading="loading" :data="adList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="主键" align="center" prop="id" /> |
||||
|
<el-table-column label="终端类型" align="center" prop="terminalType" :formatter="terminalTypeFormat" /> |
||||
|
<el-table-column label="语言" align="center" prop="languageType" :formatter="projectLanguageFormat" /> |
||||
|
<el-table-column label="广告位" align="center" prop="adPositionType" :formatter="positionTypeFormat" /> |
||||
|
<el-table-column label="广告类型" align="center" prop="adType" :formatter="adContentTypeFormat"/> |
||||
|
<el-table-column label="广告标题" align="center" prop="adTitle" /> |
||||
|
<!-- <el-table-column label="广告内容" align="center" prop="adContent" />--> |
||||
|
<!-- <el-table-column label="广告宣传图片相对路径" align="center" prop="adImg" />--> |
||||
|
<el-table-column label="广告图片" align="center" prop="adImgAbs" > |
||||
|
<template slot-scope="scope"> |
||||
|
<el-image v-if="scope.row.adImgAbs!=null && scope.row.adImgAbs!=''" |
||||
|
style="width: 120px; height: 120px" |
||||
|
:src="scope.row.adImgAbs" |
||||
|
@click="previewImage(scope.row.adImgAbs)" |
||||
|
:preview-src-list="srcList" |
||||
|
></el-image> |
||||
|
<el-icon v-if="scope.row.adImgAbs==null || scope.row.adImgAbs==''" |
||||
|
style="width: 120px; height: 120px" |
||||
|
></el-icon> |
||||
|
</template> |
||||
|
<!-- <template width="90" slot-scope="scope">--> |
||||
|
<!-- <img style="width:80px;height:80px;border:none;" :src="scope.row.adImgAbs">--> |
||||
|
<!-- </template>--> |
||||
|
</el-table-column> |
||||
|
<!-- <el-table-column label="广告内容富文本" align="center" prop="adContentHtml" />--> |
||||
|
<el-table-column label="商品链接地址" align="center" prop="link" /> |
||||
|
<el-table-column label="状态" align="center" prop="dataStatus" :formatter="statusFormat" > |
||||
|
<template slot-scope="scope"> |
||||
|
<el-switch |
||||
|
v-model="scope.row.dataStatus" |
||||
|
active-value="Y" |
||||
|
inactive-value="N" |
||||
|
@change="handleStatusChange(scope.row)" |
||||
|
></el-switch> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="排序" align="center" prop="sort" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['ad:ad:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['ad:ad:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
<!-- 添加或修改广告文本内容对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body :close-on-click-modal="false" |
||||
|
:before-close="cancel"> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="82px"> |
||||
|
<el-form-item label="广告终端" prop="terminalType" style="width: 100%" > |
||||
|
<el-radio-group v-model="form.terminalType" @change="changeTerminalType($event)"> |
||||
|
<el-radio |
||||
|
v-for="dict in terminalTypeOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictValue" |
||||
|
>{{dict.dictLabel}}</el-radio> |
||||
|
</el-radio-group |
||||
|
> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="语言" prop="languageType" style="width: 100%"> |
||||
|
<el-radio-group v-model="form.languageType"> |
||||
|
<el-radio |
||||
|
v-for="dict in projectLanguageOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictValue" |
||||
|
>{{dict.dictLabel}}</el-radio> |
||||
|
</el-radio-group |
||||
|
> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告位" prop="adPositionType"> |
||||
|
<el-radio-group v-model="form.adPositionType"> |
||||
|
<el-radio |
||||
|
v-for="dict in adPositionTypeListUpdate" |
||||
|
:key="dict.positionType" |
||||
|
:label="dict.positionType" |
||||
|
>{{dict.positionName}}</el-radio> |
||||
|
</el-radio-group |
||||
|
> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告类型" prop="adType" v-if="form.adPositionType!='user_questions'"> |
||||
|
<el-radio-group v-model="form.adType"> |
||||
|
<el-radio |
||||
|
v-for="dict in adContentTypeOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictValue" |
||||
|
>{{dict.dictLabel}}</el-radio> |
||||
|
</el-radio-group |
||||
|
> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告标题" prop="adTitle" v-if="form.adPositionType!='user_questions'"> |
||||
|
<el-input v-model="form.adTitle" placeholder="请输入广告标题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="问题标题" prop="adTitle" v-if="form.adPositionType=='user_questions'"> |
||||
|
<el-input v-model="form.adTitle" placeholder="请输入广告标题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告内容" prop="adContent" v-if="form.adPositionType!='user_questions'"> |
||||
|
<el-input |
||||
|
type="textarea" |
||||
|
v-model="form.adContent" |
||||
|
placeholder="请输入广告内容" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告链接" prop="link" v-if="form.adPositionType!='user_questions'"> |
||||
|
<el-input v-model="form.link" placeholder="请输入广告链接" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告图片" v-if="form.adPositionType!='user_questions'"> |
||||
|
<el-upload |
||||
|
class="avatar-uploader" |
||||
|
:show-file-list="false" |
||||
|
:action="uploadUrl()" |
||||
|
:on-success="handleAvatarSuccess" |
||||
|
:before-upload="beforeAvatarUpload" |
||||
|
:data="{path:'ad'}" |
||||
|
> |
||||
|
<img v-if="form.adImgAbs" :src="form.adImgAbs" class="avatar" style="width: 150px" height="150px"> |
||||
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i> |
||||
|
</el-upload> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="广告图片">--> |
||||
|
<!-- <el-upload--> |
||||
|
<!-- class="avatar-uploader"--> |
||||
|
<!-- :http-request="checkedFile"--> |
||||
|
<!-- action="/"--> |
||||
|
<!-- :show-file-list="false"--> |
||||
|
<!-- >--> |
||||
|
<!-- <img--> |
||||
|
<!-- v-if="form.adImgAbs != undefined"--> |
||||
|
<!-- :src="form.adImgAbs"--> |
||||
|
<!-- class="avatar"--> |
||||
|
<!-- />--> |
||||
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
||||
|
<!-- </el-upload>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item label="广告富文本" prop="adContentHtml" v-if="form.adPositionType!='user_questions'"> |
||||
|
<Editor :min-height="190" v-model="form.adContentHtml" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="问题富文本" prop="adContentHtml" v-if="form.adPositionType=='user_questions'"> |
||||
|
<Editor :min-height="190" v-model="form.adContentHtml" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="点赞数" prop="likes" v-if="form.terminalType=='website_client'"> |
||||
|
<el-input v-model="form.likes" placeholder="请输入广告标题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="状态" prop="dataStatus"> |
||||
|
<el-radio-group v-model="form.dataStatus"> |
||||
|
<el-radio |
||||
|
v-for="dict in statusOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictValue" |
||||
|
>{{dict.dictLabel}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="排序" prop="sort"> |
||||
|
<el-input-number |
||||
|
v-model="form.sort" |
||||
|
:step="1" |
||||
|
value=" " |
||||
|
></el-input-number> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {changeStatus, listAd, getAd, delAd, addAd, updateAd, exportAd } from "@/api/user/ad"; |
||||
|
import Editor from '@/components/Editor'; |
||||
|
import { listAdPositionAll} from "@/api/user/position"; |
||||
|
import md5 from "js-md5"; |
||||
|
import $ from "jquery"; |
||||
|
|
||||
|
export default { |
||||
|
name: "Ad", |
||||
|
components: { |
||||
|
Editor, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 广告文本内容表格数据 |
||||
|
adList: [], |
||||
|
//广告位列表 |
||||
|
terminalTypeOptions:[], |
||||
|
//广告终端类型列表 |
||||
|
adPositionTypeList:[], |
||||
|
//广告终端类型列表 |
||||
|
adPositionTypeListUpdate:[], |
||||
|
//广告类型(图文、图片、视频、文本、音频)字典 |
||||
|
adContentTypeOptions:[], |
||||
|
// 语言状态字典 |
||||
|
projectLanguageOptions: [], |
||||
|
// 状态字典 |
||||
|
statusOptions: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
terminalType: null, |
||||
|
adPositionType: null, |
||||
|
languageType: null, |
||||
|
adType: null, |
||||
|
adTitle: null, |
||||
|
adContent: null, |
||||
|
adImg: null, |
||||
|
adImgAbs: null, |
||||
|
adContentHtml: null, |
||||
|
link: null, |
||||
|
dataStatus: null, |
||||
|
sort: null |
||||
|
}, |
||||
|
// 查询参数 |
||||
|
queryParamsPosition: { |
||||
|
terminalType: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
terminalType: [ |
||||
|
{ required: true, message: "请选择广告终端", trigger: "blur" } |
||||
|
], |
||||
|
adPositionType: [ |
||||
|
{ required: true, message: "请选择广告位", trigger: "blur" } |
||||
|
], |
||||
|
adType: [ |
||||
|
{ required: true, message: "请选择广告类型", trigger: "blur" } |
||||
|
], |
||||
|
adContent: [ |
||||
|
{ required: true, message: "广告内容不能为空", trigger: "blur" } |
||||
|
], |
||||
|
adTitle: [ |
||||
|
{ required: true, message: "广告标题不能为空", trigger: "blur" } |
||||
|
], |
||||
|
adImg: [ |
||||
|
{ required: true, message: "广告宣传图片相对路径不能为空", trigger: "blur" } |
||||
|
], |
||||
|
// link: [ |
||||
|
// { required: true, message: "广告的商品页面或者活动页面链接地址不能为空", trigger: "blur" } |
||||
|
// ], |
||||
|
}, |
||||
|
// 预览 |
||||
|
srcList: ["http://118.25.187.239:9099/img/adImg/557097620301025280.jpg"], |
||||
|
|
||||
|
// 断点续传 |
||||
|
// 地址 |
||||
|
updateAddress: `${process.env.VUE_APP_BASE_API}/system/ftpfile/`, |
||||
|
maxSize: 50 * 1024 * 1024 * 1024, // 上传最大文件限制 |
||||
|
eachSize: 20 * 1024 * 1024, // 每块文件大小 |
||||
|
// 上传进度条 |
||||
|
isShowPercentage: false, // 是否显示 |
||||
|
percentage: 0, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
console.log(this.updateAddress) |
||||
|
this.getList(); |
||||
|
this.getDicts("terminal_type").then(response => { |
||||
|
this.terminalTypeOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("ad_content_type").then(response => { |
||||
|
this.adContentTypeOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("sys_yes_no").then(response => { |
||||
|
this.statusOptions = response.data; |
||||
|
}); |
||||
|
this.getDicts("project_language").then(response => { |
||||
|
this.projectLanguageOptions = response.data; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
uploadUrl:function(){ |
||||
|
return this.updateAddress + "uploadFile" |
||||
|
}, |
||||
|
// 预览图片 |
||||
|
previewImage(abUrl) { |
||||
|
this.srcList[0] = abUrl; |
||||
|
}, |
||||
|
changeTerminalType(value){ |
||||
|
this.queryParamsPosition.terminalType=value; |
||||
|
listAdPositionAll(this.queryParamsPosition).then(response => { |
||||
|
this.adPositionTypeListUpdate = response.rows; |
||||
|
}); |
||||
|
}, |
||||
|
// 图片上传组件自带的成功回调函数 |
||||
|
handleAvatarSuccess(res) { |
||||
|
console.log(res); |
||||
|
this.form.adImgAbs = res.data.url; |
||||
|
this.form.adImg = res.data.path; |
||||
|
}, |
||||
|
beforeAvatarUpload(file) { |
||||
|
const isJPG = file.type === "image/jpeg" || "image/png"; |
||||
|
const isLt2M = file.size / 1024 / 1024 < 10; |
||||
|
|
||||
|
// if (!isJPG) { |
||||
|
// this.$message.error('上传头像图片只能是 JPG 格式!'); |
||||
|
// } |
||||
|
if (!isLt2M) { |
||||
|
this.$message.error("上传图片大小不能超过 10MB!"); |
||||
|
} |
||||
|
return isJPG && isLt2M; |
||||
|
}, |
||||
|
|
||||
|
/** 查询广告文本内容列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
listAd(this.queryParams).then(response => { |
||||
|
this.adList = response.rows; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
this.findListAdPositionAll(); |
||||
|
}, |
||||
|
findListAdPositionAll(){ |
||||
|
listAdPositionAll().then(response => { |
||||
|
this.adPositionTypeList = response.rows; |
||||
|
}); |
||||
|
}, |
||||
|
// 中英文状态字典 |
||||
|
projectLanguageFormat(row, column) { |
||||
|
return this.selectDictLabel(this.projectLanguageOptions, row.languageType); |
||||
|
}, |
||||
|
// 状态字典翻译 |
||||
|
statusFormat(row, column) { |
||||
|
return this.selectDictLabel(this.statusOptions, row.dataStatus); |
||||
|
}, |
||||
|
//广告类型 |
||||
|
adContentTypeFormat(row, column){ |
||||
|
return this.selectDictLabel(this.adContentTypeOptions,row.adType); |
||||
|
}, |
||||
|
// 状态字典翻译 |
||||
|
terminalTypeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.terminalTypeOptions, row.terminalType); |
||||
|
}, |
||||
|
// 状态字典翻译 |
||||
|
positionTypeFormat(row, column) { |
||||
|
return this.selectTerminalTypeList(this.adPositionTypeList, row.adPositionType); |
||||
|
}, |
||||
|
selectTerminalTypeList(datas, value) { |
||||
|
var actions = []; |
||||
|
Object.keys(datas).some((key) => { |
||||
|
if (datas[key].positionType == ('' + value)) { |
||||
|
actions.push(datas[key].positionName); |
||||
|
return true; |
||||
|
} |
||||
|
}) |
||||
|
return actions.join(''); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
terminalType: 'user_client', |
||||
|
languageType: "zh", |
||||
|
adPositionType: null, |
||||
|
adType: null, |
||||
|
adTitle: null, |
||||
|
adContent: null, |
||||
|
adImg: null, |
||||
|
adImgAbs: null, |
||||
|
adContentHtml: null, |
||||
|
link: null, |
||||
|
createBy: null, |
||||
|
createTime: null, |
||||
|
updateBy: null, |
||||
|
updateTime: null, |
||||
|
dataStatus: "Y", |
||||
|
sort: null, |
||||
|
likes:0, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加广告文本内容"; |
||||
|
this.queryParamsPosition.terminalType="user_client"; |
||||
|
listAdPositionAll(this.queryParamsPosition).then(response => { |
||||
|
this.adPositionTypeListUpdate = response.rows; |
||||
|
}); |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids |
||||
|
getAd(id).then(response => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改广告文本内容"; |
||||
|
this.queryParamsPosition.terminalType=this.form.terminalType; |
||||
|
listAdPositionAll(this.queryParamsPosition).then(response => { |
||||
|
this.adPositionTypeListUpdate = response.rows; |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateAd(this.form).then(response => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
addAd(this.form).then(response => { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
this.$confirm('是否确认删除广告文本内容编号为"' + ids + '"的数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return delAd(ids); |
||||
|
}).then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有广告文本内容数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return exportAd(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
}, |
||||
|
// 断点续传 |
||||
|
async checkedFile(options) { |
||||
|
const { maxSize, getSize, splitUpload, singleUpload } = this; |
||||
|
const { file, onProgress, onSuccess, onError } = options; |
||||
|
if (file.size > maxSize) { |
||||
|
return this.$message({ |
||||
|
message: `您选择的文件大于${getSize(maxSize)}`, |
||||
|
type: "error", |
||||
|
}); |
||||
|
} |
||||
|
// const uploadFunc = file.size > multiUploadSize ? splitUpload : singleUpload |
||||
|
try { |
||||
|
singleUpload(file, onProgress); |
||||
|
} catch (e) { |
||||
|
console.error(e); |
||||
|
this.$message({ |
||||
|
message: e.message, |
||||
|
type: "error", |
||||
|
}); |
||||
|
onError(); |
||||
|
} |
||||
|
const prom = new Promise((resolve, reject) => {}); |
||||
|
prom.abort = () => {}; |
||||
|
return prom; |
||||
|
}, |
||||
|
// 格式化文件大小显示文字 |
||||
|
getSize(size) { |
||||
|
return size > 1024 |
||||
|
? size / 1024 > 1024 |
||||
|
? size / (1024 * 1024) > 1024 |
||||
|
? (size / (1024 * 1024 * 1024)).toFixed(2) + "GB" |
||||
|
: (size / (1024 * 1024)).toFixed(2) + "MB" |
||||
|
: (size / 1024).toFixed(2) + "KB" |
||||
|
: size.toFixed(2) + "B"; |
||||
|
}, |
||||
|
// 单文件直接上传 |
||||
|
async singleUpload(file, onProgress, onSuccess) { |
||||
|
// console.log(onSuccess) |
||||
|
// console.log(onSuccess()) |
||||
|
//把视频的信息存储为一个字符串 |
||||
|
var filedetails = |
||||
|
file.name + file.size + file.type + file.lastModifiedDate; |
||||
|
//使用当前文件的信息用md5加密生成一个key 这个加密是根据文件的信息来加密的 如果相同的文件 加的密还是一样的 |
||||
|
var key = md5(filedetails); |
||||
|
var key10 = parseInt(key, 16); |
||||
|
//把加密的信息 转为一个64位的 |
||||
|
var key62 = this._10to62(key10); |
||||
|
//检查这个key存在不存在 |
||||
|
$.ajax({ |
||||
|
url: this.updateAddress + "check", |
||||
|
type: "post", |
||||
|
data: { key: key62 }, |
||||
|
success: (data) => { |
||||
|
console.log(data); |
||||
|
if (data.code == 500) { |
||||
|
//这个方法必须抽离出来 |
||||
|
this.splitUpload(file, 1); |
||||
|
} else { |
||||
|
if (data.data.shardIndex == data.data.shardTotal) { |
||||
|
// console.log('最周一块嘛') |
||||
|
this.isShowPercentage = false; |
||||
|
this.form.adImgAbs = data.url; |
||||
|
this.form.adImg = data.file_url; |
||||
|
this.$message({ |
||||
|
message: "上传成功", |
||||
|
type: "success", |
||||
|
}); |
||||
|
} else { |
||||
|
//找到这个是第几片 去重新上传 |
||||
|
this.splitUpload(file, parseInt(data.data.shardIndex)); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}); |
||||
|
}, |
||||
|
// 大文件分块上传 |
||||
|
splitUpload(file, shardIndex) { |
||||
|
console.log("file", file); |
||||
|
//永安里from表单提交 |
||||
|
var fd = new FormData(); |
||||
|
//文件分片 以20MB去分片 |
||||
|
var shardSize = this.eachSize; |
||||
|
//定义分片索引 |
||||
|
var shardIndex = shardIndex; |
||||
|
//定义分片的起始位置 |
||||
|
var start = (shardIndex - 1) * shardSize; |
||||
|
//定义分片结束的位置 file哪里来的? |
||||
|
var end = Math.min(file.size, start + shardSize); |
||||
|
//从文件中截取当前的分片数据 |
||||
|
var fileShard = file.slice(start, end); |
||||
|
//分片的大小 |
||||
|
var size = file.size; |
||||
|
//总片数 |
||||
|
var shardTotal = Math.ceil(size / shardSize); |
||||
|
console.log((shardSize * (shardIndex - 1)) / size); |
||||
|
this.isShowPercentage = true; |
||||
|
this.percentage = Number( |
||||
|
Number(((shardSize * (shardIndex - 1)) / size) * 100).toFixed(2) |
||||
|
); |
||||
|
//文件的后缀名 |
||||
|
var fileName = file.name; |
||||
|
var suffix = fileName |
||||
|
.substring(fileName.lastIndexOf(".") + 1, fileName.length) |
||||
|
.toLowerCase(); |
||||
|
//把视频的信息存储为一个字符串 |
||||
|
var filedetails = |
||||
|
file.name + file.size + file.type + file.lastModifiedDate; |
||||
|
//使用当前文件的信息用md5加密生成一个key 这个加密是根据文件的信息来加密的 如果相同的文件 加的密还是一样的 |
||||
|
// console.log(md5) |
||||
|
var key = md5(filedetails); |
||||
|
console.log(key); |
||||
|
var key10 = parseInt(key, 16); |
||||
|
//把加密的信息 转为一个64位的 |
||||
|
var key62 = this._10to62(key10); |
||||
|
fd.append("file", fileShard); |
||||
|
//前面的参数必须和controller层定义的一样 |
||||
|
fd.append("suffix", suffix); |
||||
|
fd.append("shardIndex", shardIndex); |
||||
|
fd.append("shardSize", shardSize); |
||||
|
fd.append("shardTotal", shardTotal); |
||||
|
fd.append("size", size); |
||||
|
fd.append("key", key62); |
||||
|
|
||||
|
$.ajax({ |
||||
|
url: this.updateAddress + "uploadDiskBatch/sampleDisk", |
||||
|
type: "post", |
||||
|
cache: false, |
||||
|
data: fd, |
||||
|
processData: false, |
||||
|
contentType: false, |
||||
|
success: (data) => { |
||||
|
//这里应该是一个递归调用 |
||||
|
if (shardIndex < shardTotal) { |
||||
|
var index = shardIndex + 1; |
||||
|
this.splitUpload(file, index); |
||||
|
} else { |
||||
|
console.log(data); |
||||
|
this.percentage = 100; |
||||
|
if (data.code == 200) { |
||||
|
setTimeout(() => { |
||||
|
this.isShowPercentage = false; |
||||
|
this.form.adImgAbs = data.url; |
||||
|
this.form.adImg = data.file_url; |
||||
|
this.$message({ |
||||
|
message: "上传成功", |
||||
|
type: "success", |
||||
|
}); |
||||
|
}, 800); |
||||
|
} else { |
||||
|
this.isShowPercentage = false; |
||||
|
this.$message({ |
||||
|
message: data.msg, |
||||
|
type: "error", |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
error: function () { |
||||
|
this.isShowPercentage = false; |
||||
|
//请求出错处理 |
||||
|
}, |
||||
|
}); |
||||
|
// if (shardIndex < shardTotal) { |
||||
|
// var index = shardIndex + 1; |
||||
|
// this.splitUpload(file, index); |
||||
|
// } |
||||
|
}, |
||||
|
_10to62(number) { |
||||
|
let chars = |
||||
|
"0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ"; |
||||
|
let radix = chars.length; |
||||
|
let arr = []; |
||||
|
do { |
||||
|
let mod = number % radix; |
||||
|
number = (number - mod) / radix; |
||||
|
arr.unshift(chars[mod]); |
||||
|
} while (number); |
||||
|
return arr.join(""); |
||||
|
}, |
||||
|
// 状态修改 |
||||
|
handleStatusChange(row) { |
||||
|
let text = row.dataStatus === "N" ? "禁用" : "启用"; |
||||
|
this.$confirm('确认要' + text + '该广告吗?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return changeStatus(row.id, row.dataStatus); |
||||
|
}).then(() => { |
||||
|
this.msgSuccess(text + "成功"); |
||||
|
}).catch(function() { |
||||
|
row.dataStatus = row.dataStatus === "N" ? "Y" : "N"; |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,312 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="85px"> |
||||
|
<el-form-item label="广告位名称" prop="positionName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.positionName" |
||||
|
placeholder="请输入广告位名称" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="广告位类型" prop="positionType">--> |
||||
|
<!-- <el-select v-model="queryParams.positionType" placeholder="请选择广告位类型" clearable size="small">--> |
||||
|
<!-- <el-option label="请选择字典生成" value="" />--> |
||||
|
<!-- </el-select>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['ad:position:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['ad:position:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['ad:position:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['ad:position:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="AdPositionList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="主键" align="center" prop="id" /> |
||||
|
<el-table-column label="广告位名称" align="center" prop="positionName" /> |
||||
|
<el-table-column label="广告位类型" align="center" prop="positionType" /> |
||||
|
<el-table-column label="广告位终端" align="center" prop="terminalType" :formatter="terminalTypeFormat" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['ad:position:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['ad:position:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改广告位对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
||||
|
<el-form-item label="广告位名称" prop="positionName"> |
||||
|
<el-input v-model="form.positionName" placeholder="请输入广告位名称" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告位类型" prop="positio v-ifnType"> |
||||
|
<el-input v-if="form.id!=null" v-model="form.positionType" placeholder="请填写广告位类型" disabled="disabled"/> |
||||
|
<el-input v-if="form.id==null" v-model="form.positionType" placeholder="请填写广告位类型" /> |
||||
|
<!-- <el-select v-model="form.positionType" placeholder="请选择广告位类型">--> |
||||
|
<!-- <el-option label="请选择字典生成" value="" />--> |
||||
|
<!-- </el-select>--> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="广告终端" prop="terminalType" style="width: 100%" > |
||||
|
<el-radio-group v-model="form.terminalType"> |
||||
|
<el-radio |
||||
|
v-for="dict in terminalTypeOptions" |
||||
|
:key="dict.dictValue" |
||||
|
:label="dict.dictValue" |
||||
|
>{{dict.dictLabel}}</el-radio> |
||||
|
</el-radio-group |
||||
|
> |
||||
|
</el-form-item> |
||||
|
<!-- <el-form-item label="创建时间" prop="createTime">--> |
||||
|
<!-- <el-date-picker clearable size="small"--> |
||||
|
<!-- v-model="form.createTime"--> |
||||
|
<!-- type="date"--> |
||||
|
<!-- value-format="yyyy-MM-dd"--> |
||||
|
<!-- placeholder="选择创建时间">--> |
||||
|
<!-- </el-date-picker>--> |
||||
|
<!-- </el-form-item>--> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listAdPosition, getAdPosition, delAdPosition, addAdPosition, updateAdPosition, exportAdPosition } from "@/api/user/position"; |
||||
|
|
||||
|
export default { |
||||
|
name: "AdPosition", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 广告位表格数据 |
||||
|
AdPositionList: [], |
||||
|
//广告位列表 |
||||
|
terminalTypeOptions:[], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
positionName: null, |
||||
|
positionType: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
positionName: [ |
||||
|
{ required: true, message: "广告位名称不能为空", trigger: "blur" } |
||||
|
], |
||||
|
positionType: [ |
||||
|
{ required: true, message: "广告位类型不能为空", trigger: "change" } |
||||
|
], |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getDicts("terminal_type").then(response => { |
||||
|
this.terminalTypeOptions = response.data; |
||||
|
}); |
||||
|
this.getList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询广告位列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
listAdPosition(this.queryParams).then(response => { |
||||
|
this.AdPositionList = response.rows; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 状态字典翻译 |
||||
|
terminalTypeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.terminalTypeOptions, row.terminalType); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
positionName: null, |
||||
|
positionType: null, |
||||
|
terminalType:"user_client", |
||||
|
createTime: null, |
||||
|
updateTime: null |
||||
|
}; |
||||
|
|
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加广告位"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids |
||||
|
getAdPosition(id).then(response => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改广告位"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateAdPosition(this.form).then(response => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
addAdPosition(this.form).then(response => { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
this.$confirm('是否确认删除广告位编号为"' + ids + '"的数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return delAdPosition(ids); |
||||
|
}).then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有广告位数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return exportAdPosition(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,381 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<!-- <el-form-item label="用户编号" prop="userId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.userId" |
||||
|
placeholder="请输入用户编号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> --> |
||||
|
|
||||
|
<el-form-item label="用户姓名" prop="userName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.userName" |
||||
|
placeholder="请输入用户姓名" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="转账类型" prop="type"> |
||||
|
<el-select v-model="queryParams.type" placeholder="请选择转账类型" clearable size="small"> |
||||
|
<el-option v-for="dict in typeOptions" :key="dict.dictValue" :label="dict.dictLabel" |
||||
|
:value="dict.dictValue" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="币种" prop="coinId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.coinId" |
||||
|
placeholder="请输入币种" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="业务编号" prop="serviceId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.serviceId" |
||||
|
placeholder="请输入业务编号" |
||||
|
clearable |
||||
|
size="small" |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['user:walletAssetsRecord:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['user:walletAssetsRecord:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['user:walletAssetsRecord:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['user:walletAssetsRecord:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="walletAssetsRecordList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="流水编号" align="center" prop="id" /> |
||||
|
<!-- <el-table-column label="用户编号" align="center" prop="userId" /> --> |
||||
|
<el-table-column label="用户姓名" align="center" prop="userName" /> |
||||
|
<el-table-column label="转账类型" align="center" prop="type" :formatter="typeFormat"/> |
||||
|
<el-table-column label="币种" align="center" prop="coinId" /> |
||||
|
<el-table-column label="数量" align="center" prop="num" /> |
||||
|
<el-table-column label="手续费" align="center" prop="fee" /> |
||||
|
<!-- <el-table-column label="类型 完成complete" align="center" prop="status" /> --> |
||||
|
<el-table-column label="剩下金额" align="center" prop="remainBalance" /> |
||||
|
<el-table-column label="业务编号" align="center" prop="serviceId" /> |
||||
|
<!-- <el-table-column label="是否显示" align="center" prop="isShow" /> --> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['user:walletAssetsRecord:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['user:walletAssetsRecord:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改钱包资金流水记录对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="用户编号" prop="userId"> |
||||
|
<el-input v-model="form.userId" placeholder="请输入用户编号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="转账类型" prop="type"> |
||||
|
<el-select v-model="form.type" placeholder="请选择转账类型"> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="币种" prop="coinId"> |
||||
|
<el-input v-model="form.coinId" placeholder="请输入币种" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="数量" prop="num"> |
||||
|
<el-input v-model="form.num" placeholder="请输入数量" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="地址" prop="address"> |
||||
|
<el-input v-model="form.address" placeholder="请输入地址" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="手续费" prop="fee"> |
||||
|
<el-input v-model="form.fee" placeholder="请输入手续费" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="类型 完成complete"> |
||||
|
<el-radio-group v-model="form.status"> |
||||
|
<el-radio label="1">请选择字典生成</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="剩下金额" prop="remainBalance"> |
||||
|
<el-input v-model="form.remainBalance" placeholder="请输入剩下金额" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="添加时间" prop="createTime"> |
||||
|
<el-date-picker clearable size="small" |
||||
|
v-model="form.createTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="选择添加时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="业务编号" prop="serviceId"> |
||||
|
<el-input v-model="form.serviceId" placeholder="请输入业务编号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否显示" prop="isShow"> |
||||
|
<el-input v-model="form.isShow" placeholder="请输入是否显示" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listWalletAssetsRecord, getWalletAssetsRecord, delWalletAssetsRecord, addWalletAssetsRecord, updateWalletAssetsRecord, exportWalletAssetsRecord } from "@/api/user/walletAssetsRecord"; |
||||
|
|
||||
|
export default { |
||||
|
name: "WalletAssetsRecord", |
||||
|
components: { |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 钱包资金流水记录表格数据 |
||||
|
walletAssetsRecordList: [], |
||||
|
typeOptions: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
userId: null, |
||||
|
type: null, |
||||
|
coinId: null, |
||||
|
num: null, |
||||
|
address: null, |
||||
|
fee: null, |
||||
|
status: null, |
||||
|
remainBalance: null, |
||||
|
serviceId: null, |
||||
|
isShow: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
userId: [ |
||||
|
{ required: true, message: "用户编号不能为空", trigger: "blur" } |
||||
|
], |
||||
|
type: [ |
||||
|
{ required: true, message: "转账类型 提币withdrawal 充值recharge 转入entry_account 转出out_account 法币交易入账legal_tran_entry 法币交易出账legal_tran_out 法币交易出账冻结legal_tran_out_frozen、法币交易出账回退legal_tran_back 质押转出pledge_tran 商户冻结store_frozen 商户广告冻结回退store_frozen_back 商户订单完成扣除store_deduction 商户订单完成入账store_income不能为空", trigger: "change" } |
||||
|
], |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
this.getDicts("assets_type").then(response => { |
||||
|
this.typeOptions = response.data; |
||||
|
}); |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询钱包资金流水记录列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
listWalletAssetsRecord(this.queryParams).then(response => { |
||||
|
this.walletAssetsRecordList = response.rows; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
|
||||
|
// 状态字典 |
||||
|
typeFormat(row, column) { |
||||
|
return this.selectDictLabel(this.typeOptions, row.type); |
||||
|
}, |
||||
|
|
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
userId: null, |
||||
|
type: null, |
||||
|
coinId: null, |
||||
|
num: null, |
||||
|
address: null, |
||||
|
fee: null, |
||||
|
status: "0", |
||||
|
remainBalance: null, |
||||
|
createTime: null, |
||||
|
updateTime: null, |
||||
|
serviceId: null, |
||||
|
isShow: null |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm"); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.id) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.title = "添加钱包资金流水记录"; |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids |
||||
|
getWalletAssetsRecord(id).then(response => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
this.title = "修改钱包资金流水记录"; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.id != null) { |
||||
|
updateWalletAssetsRecord(this.form).then(response => { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} else { |
||||
|
addWalletAssetsRecord(this.form).then(response => { |
||||
|
this.msgSuccess("新增成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const ids = row.id || this.ids; |
||||
|
this.$confirm('是否确认删除钱包资金流水记录编号为"' + ids + '"的数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return delWalletAssetsRecord(ids); |
||||
|
}).then(() => { |
||||
|
this.getList(); |
||||
|
this.msgSuccess("删除成功"); |
||||
|
}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
const queryParams = this.queryParams; |
||||
|
this.$confirm('是否确认导出所有钱包资金流水记录数据项?', "警告", { |
||||
|
confirmButtonText: "确定", |
||||
|
cancelButtonText: "取消", |
||||
|
type: "warning" |
||||
|
}).then(function() { |
||||
|
return exportWalletAssetsRecord(queryParams); |
||||
|
}).then(response => { |
||||
|
this.download(response.msg); |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
Loading…
Reference in new issue