第一次发布

This commit is contained in:
caolc
2023-04-18 17:02:02 +08:00
commit dfe2ace2c9
927 changed files with 187479 additions and 0 deletions

View File

@@ -0,0 +1,227 @@
<template>
<div>
<section style="padding:20px;">
<el-card class="box-card no-wrap">
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">id主键</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.id }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">账户id</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.siteChannelAccountId }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">账户名称</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.accountName }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">账户类型</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.accountType === '0'? '基础账户':'其他' }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">账单类型</span>
<br>
<span v-if="siteChannelAccountRecord.billType==='RECHARGE'" class="inner-data">充值</span>
<span v-else-if="siteChannelAccountRecord.billType==='RECHARGE_REBETE'" class="inner-data">充值返利</span>
<span v-else-if="siteChannelAccountRecord.billType==='CONSUME_REBATE'" class="inner-data">充值返利</span>
<span v-else-if="siteChannelAccountRecord.billType==='TURN'" class="inner-data">圈回</span>
<span v-else class="inner-data">{{ siteChannelAccountRecord.billType }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">发生金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.occurTotalAmount }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">账户余额变动金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentBalance - siteChannelAccountRecord.lastBalance }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">上次账户余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.lastBalance }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">当前账户余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentBalance }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">充值余额变动金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentRechargeBalance - siteChannelAccountRecord.lastRechargeBalance }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">上次充值余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.lastRechargeBalance }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">当前充值余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentRechargeBalance }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">冻结金额变动金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentFrozenBalance - siteChannelAccountRecord.lastFrozenBalance }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">上次冻结金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.lastFrozenBalance }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">当前冻结金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentFrozenBalance }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">充值返利余额发生金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentRechargeRebateBalance - siteChannelAccountRecord.lastRechargeRebateBalance }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">上次充值返利余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.lastRechargeRebateBalance }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">当前充值返利余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentRechargeRebateBalance }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">消费返利变动金额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentConsumeRebateAmount - siteChannelAccountRecord.lastConsumeRebateAmount }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">上一次消费返利余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.lastConsumeRebateAmount }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">当前消费返利余额</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.currentConsumeRebateAmount }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">业务订单id</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.businessOrderId }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">业务订单说明</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.businessOrderRemarks }}</span>
</div>
</div>
<div class="my-cell">
<div class="cell-item">
<span class="color-999 test-tst">创建人id</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.createUser }}</span>
</div>
<div class="cell-item">
<span class="color-999 test-tst">创建时间</span>
<br>
<span class="inner-data">{{ siteChannelAccountRecord.createTime }}</span>
</div>
</div>
</el-card>
</section>
</div>
</template>
<script>
export default {
props: {
siteChannelAccountRecord: {
type: Object,
default() {
}
}
},
data() {
return {
gridNum: {
header: 6,
body: 18
}
}
},
created() {
},
methods: {
close() {
this.$emit('closeDialog')
}
}
}
</script>
<style scoped>
.my-cell {
color: #666;
margin-bottom: 20px;
display: flex;
flex-direction: row;
}
.cell-item {
width: 50%;
}
/* guo' */
.color-999 {
color: #999;
font-size: 0.8rem;
padding-right: 2rem;
display: inline-block;
min-width: 5rem;
}
.test-tst {
padding-bottom: 0.3rem;
}
.table-detail-drawer >>> .el-drawer__header {
color: #222 !important;
font-size: 18px;
}
.photo-list-container {
display: flex;
flex-direction: row;
}
.photo-list-container p {
margin-right: 20px;
text-align: center;
}
</style>

View File

@@ -0,0 +1,556 @@
<template>
<div>
<div class="table-header table-div el-scrollbar">
<ListLayout :table-columns="tableColumns">
<div slot="search" style="margin-top: 5px">
<!--这里放顶部搜索-->
<!-- 搜索部分开始 -->
<el-form
label-width="90px"
:inline="true"
:model="page"
class="search-form"
:size="$store.getters.size"
>
<el-form-item>
<el-autocomplete
v-model="page.params.accountName"
clearable
:fetch-suggestions="querySearchAsync"
placeholder="请输入账户名称"
/>
</el-form-item>
<el-form-item>
<el-select
v-model="page.params.billType"
placeholder="交易类型"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="充值" value="RECHARGE" />
<el-option label="销账" value="REVOKE" />
<el-option label="充值返利" value="RECHARGE_REBETE" />
<el-option label="消费返利" value="CONSUME_REBATE" />
</el-select>
</el-form-item>
<el-form-item>
<el-input
v-model="page.params.businessOrderId"
placeholder="业务订单号"
clearable
@keyup.enter.native="getByPage"
>
</el-input>
</el-form-item>
</el-form>
<!-- 搜索部分结束 -->
</div>
<el-row slot="button-group" style="margin-top: 5px">
<!-- <el-col :span="16" class="tal">-->
<!-- <el-button-->
<!-- class="group-item"-->
<!-- :size="$store.getters.size"-->
<!-- type="primary"-->
<!-- @click="toOutPut"-->
<!-- ><svg-icon icon-class="icondaochu" /> 导出</el-button>-->
<!-- </el-col>-->
<el-col :span="24" class="fr">
<el-button
class="group-item leftButten"
:size="$store.getters.size"
type="primary"
@click="outPutDialog = true"
>
<svg-icon icon-class="icondaochu" />
导出
</el-button>
<el-button
type="primary"
:size="$store.getters.size"
icon="el-icon-search"
@click="search"
>查询</el-button
>
<el-button
:size="$store.getters.size"
icon="el-icon-refresh"
type="info"
@click="page.params = {}"
>重置</el-button
>
</el-col>
</el-row>
<div slot="table">
<!--这里放表格和分页-->
<!-- 列表开始 -->
<el-table
:max-height="tableHeight"
stripe
:data="dataPage.list"
fit
style="width: 100%"
:size="$store.getters.size"
@sort-change="sortHandler"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<!-- <el-table-column
label="序号"
type="index"
:index="indexMethod"
/> -->
<template v-for="(item, index) in tableColumns">
<el-table-column
v-if="item.show"
:key="index"
:fixed="item.fixed"
:align="item.align"
:show-overflow-tooltip="true"
:min-width="item.minWidth"
:width="item.width"
:prop="item.prop"
:sortable="item.sortable"
:label="item.label"
:formatter="item.render"
/>
</template>
<el-table-column fixed="right" label="操作" align="center">
<template slot-scope="scope">
<el-button
:size="$store.getters.size"
type="text"
@click="handleDetail(scope.row)"
><svg-icon icon-class="iconxiangqing1" /> 详情</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<!-- 分页组件开始 -->
<div class="page-div">
<el-pagination
:current-page="page.currentPage"
:page-sizes="[10, 15, 20, 30]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.totalCount"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
<!-- 分页组件结束 -->
</div>
</ListLayout>
<el-drawer
title="导出"
:visible.sync="outPutDialog"
width="20%"
size="40%"
direction="ltr"
>
<el-form label-width="75px" size="small">
<el-row class="box_daochu">
<el-col :span="24">
<el-form-item label="导出方式">
<el-select v-model="output.outputType" style="width: 100%">
<el-option label="eseyExcel条件导出" :value="4" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item v-if="output.outputType !== 4">
<div style="color: red">
<span v-if="output.outputType === 1"
>当前选中数据 {{ multipleSelection.length }} </span
>
<span v-if="output.outputType === 2"
>本页数据 {{ dataPage.list.length }} </span
>
<span v-if="output.outputType === 3"
>条件导出将直接使用页面搜索条件进行数据过滤</span
>
</div>
</el-form-item>
</el-col>
<el-col
v-if="output.outputType === 3 || output.outputType === 4"
:span="12"
>
<el-form-item label="开始页">
<el-input v-model="output.startPage" />
</el-form-item>
</el-col>
<el-col
v-if="output.outputType === 3 || output.outputType === 4"
:span="12"
>
<el-form-item label="结束页">
<el-input v-model="output.endPage" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item>
<el-button type="primary" @click="exportFn">导出</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-drawer>
<!-- 详情抽屉 -->
<el-drawer
title="详情"
class="table-detail-drawer"
:visible.sync="showTableDrawer"
direction="ltr"
>
<siteChannelAccountRecordInfo
:site-channel-account-record="siteChannelAccountRecord"
/>
</el-drawer>
</div>
</div>
</template>
<script>
import oilSiteUserManagementApi from "@/api/user/oilSiteUserManagement";
import siteChannelAccountRecordApi from "@/api/finance/siteChannelAccountRecord";
import siteChannelAccountRecordInfo from "./SiteChannelAccountRecordInfo";
import siteChannelAccountApi from "@/api/finance/siteChannelAccount";
import dictObj from "@/api/dict/static-dict";
import { mapGetters } from "vuex";
export default {
components: {
siteChannelAccountRecordInfo,
},
data() {
return {
outPutDialog: false,
output: {
outputType: 4, // 导出方式1导出选中2导出本页3条件导出4导出全部
startPage: 1, // 导出开始页
endPage: 1, // 导出结束页
pageSize: 10, // 每页条数
},
companyList: [], // 账户列表
multipleSelection: [], // 选择表格数据集合
importDialog: false, // 导入弹窗
outPutDialog: false, // 导出弹窗
showTableDrawer: false,
restaurants: [],
page: {
pageSize: 10, // 每页显示条数
currentPage: 1, // 默认页
params: {}, // 查询参数
sorted: {},
columns: [],
},
tableHeight: document.documentElement.clientHeight - 300 - 60,
filters: this.$options.filters,
dataPage: {
// 分页显示page
pageSize: 10, // 每页显示条数
currentPage: 1, // 默认页
params: {
// 查询参数
},
sorted: {},
},
tableColumns: [
{
prop: "accountName",
minWidth: 230,
label: "账户名称",
show: true,
render: (row, column, cell) => {
var res = dictObj.tradeType[row.billType];
switch (res) {
case "加油":
return (
<div>
<el-tag>加油</el-tag> &nbsp;{cell}
</div>
);
break;
case "充值":
return (
<div>
<el-tag type="success">充值</el-tag> &nbsp;{cell}{" "}
</div>
);
break;
case "圈回":
return (
<div>
<el-tag type="danger">圈回</el-tag> &nbsp;{cell}{" "}
</div>
);
break;
default:
return (
<div>
<el-tag type="info">{res}</el-tag> &nbsp;{cell}{" "}
</div>
);
}
},
},
{
prop: "businessOrderId",
label: "业务订单号",
minWidth: 200,
show: true,
render: (row, column, cell) => {
if (row.siteName) {
return (
<div>
<div>NO{cell}</div>
<div>油站{row.siteName}</div>
</div>
);
} else {
return <div>NO{cell}</div>;
}
},
},
{
prop: "occurTotalAmount",
label: "发生金额",
show: true,
render: (row, column, cell) => {
return cell;
},
},
{
prop: "currentBalance",
label: "当前账户余额",
show: true,
render: (row, column, cell) => {
return cell;
},
},
// { prop: 'currentRechargeBalance', label: '当前充值余额', show: true, render: (row, column, cell) => {
// return cell
// } },
// { prop: 'currentFrozenBalance', label: '当前冻结金额', show: true, render: (row, column, cell) => {
// return cell
// } },
// { prop: 'currentRechargeRebateBalance', label: '当前充值返利余额', show: true, render: (row, column, cell) => {
// return cell
// } },
// { prop: 'currentConsumeRebateAmount', label: '当前消费返利余额', show: true, render: (row, column, cell) => {
// return cell
// } },
// { prop: 'currentTotalRechargeRebateAmount', label: '当前累计充值返利总金额', show: true, render: (row, column, cell) => {
// return cell
// } },
// { prop: 'currentTotalConsumeRebateAmount', label: '当前累计消费返利总金额', show: true, render: (row, column, cell) => {
// return cell
// } },
// { prop: 'currentTotalRechargeAmount', label: '当前累计充值金额', show: true, render: (row, column, cell) => {
// return cell
// } }
// ,
{
prop: "createTime",
label: "交易时间",
minWidth: 120,
show: true,
render: (row, column, cell) => {
return cell;
},
},
],
addDialog: false, // 添加弹窗
updateDialog: false, // 修改弹窗
siteChannelAccountRecord: {},
};
},
computed: {
...mapGetters(["sysUserList"]),
},
created() {
this.getByPage();
this.getAccountNames();
// 增加监听事件,窗口变化时得到高度。
window.addEventListener("resize", this.getHeight, false);
},
methods: {
exportFn() {
const searchParam = { ...this.page };
searchParam.currentPage = this.output.startPage;
searchParam.params.endPage = this.output.endPage;
searchParam.params.null_convertRelationOrderId = true;
oilSiteUserManagementApi
.exportSiteChannelAccountRecordWeb(searchParam)
.then((res) => {
if (res.code === 20000) {
this.$message.success(res.msg);
} else {
this.$message.error(res.msg);
}
});
},
// 获取账户名称键值对
getAccountNames() {
siteChannelAccountApi.getChannelAccountMaps().then((res) => {
if (res.code === 20000) {
this.restaurants = res.data;
}
});
},
// 获取搜索
querySearchAsync(queryString, cb) {
const results = queryString
? this.restaurants.filter((f) => f.value.indexOf(queryString) !== -1)
: [];
cb(results);
},
indexMethod(index) {
return (index + 1) * 1;
},
handleSelectionChange(val) {
// 选择表格数据
this.multipleSelection = val;
},
toForbid() {
// 禁用
if (!this.multipleSelection || this.multipleSelection.length < 1) {
this.$message.error("请选择需要操作的数据");
return;
}
},
toStartUsing() {
// 启用
if (!this.multipleSelection || this.multipleSelection.length < 1) {
this.$message.error("请选择需要操作的数据");
return;
}
},
toImport() {
// 导入
this.importDialog = true;
},
toOutPut() {
// 导出
this.outPutDialog = true;
},
handleDetail(obj) {
// 查看行 详情
siteChannelAccountRecordApi.get(obj.id).then((res) => {
this.siteChannelAccountRecord = res.data;
this.siteChannelAccountRecord = Object.assign(
this.siteChannelAccountRecord,
obj
);
this.showTableDrawer = true;
});
},
getHeight() {
// 获取浏览器高度并计算得到表格所用高度。
this.tableHeight = document.documentElement.clientHeight - 300 - 60;
},
search() {
// 搜索
this.page.currentPage = 1;
this.getByPage();
},
toggleSearchAdvance() {
this.searchAdvice = !this.searchAdvice;
},
handleSizeChange(val) {
this.page.pageSize = val;
this.getByPage();
},
handleCurrentChange(val) {
this.page.currentPage = val;
this.getByPage();
},
sortHandler(column) {
// 排序查询
const key = column.prop;
const value = column.order;
this.page.sorted = {};
this.page.sorted[key] = value;
this.getByPage();
},
toAdd() {
// 跳转到添加
this.siteChannelAccountRecord = {};
this.addDialog = true;
},
toUpdate(id) {
// 跳转到更新
siteChannelAccountRecordApi.get(id).then((res) => {
this.siteChannelAccountRecord = res.data;
this.updateDialog = true;
});
},
toDelete(id) {
// 删除
this.$confirm("确定删除?", "提示", { type: "error" }).then(() => {
siteChannelAccountRecordApi.deleteById(id).then((res) => {
this.$message.success(res.msg);
this.getByPage();
});
});
},
getByPage() {
// 分页查询
this.addDialog = false;
siteChannelAccountRecordApi.getByPage(this.page).then((res) => {
this.dataPage = res.data;
this.page.totalCount = this.dataPage.totalCount;
this.page.totalPage = this.dataPage.totalPage;
});
},
closeDialog() {
this.addDialog = false;
this.updateDialog = false;
},
},
};
</script>
<style scoped>
.leftButten {
position: absolute;
left: 0px;
}
.box_daochu {
padding: 3%;
}
.handle-button-group {
margin-bottom: 10px;
}
.table-div {
max-height: calc(100vh - 150px) !important;
position: relative;
margin-bottom: 20px;
}
.table-div >>> .header-container {
position: sticky;
top: 0rem;
min-height: 152px;
z-index: 4;
background: #fff;
}
.table-div .el-table__footer-wrapper {
position: fixed !important;
}
.page-div {
/* position: fixed; */
background: #fff;
bottom: 0rem;
z-index: 4;
min-width: 100%;
}
</style>