更新
This commit is contained in:
19
src/api/common.js
Normal file
19
src/api/common.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from "utils/axios.js";
|
||||
// 远程搜索公司
|
||||
const getRefineryCompanyList = (params) => {
|
||||
return request.postJson(
|
||||
"/oil-user/oilCompanyInfo/getRefineryCompanyList",
|
||||
params
|
||||
);
|
||||
};
|
||||
// 远程搜索用户
|
||||
const liekQuery = (query) => {
|
||||
return request.get(
|
||||
`oil-user/sysCustomerInfo/liekQuery/${query.queryTypeGet}`
|
||||
);
|
||||
};
|
||||
|
||||
export default {
|
||||
getRefineryCompanyList,
|
||||
liekQuery,
|
||||
};
|
||||
19
src/api/financialCenter/billDetails.js
Normal file
19
src/api/financialCenter/billDetails.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import request from "utils/axios.js";
|
||||
// table
|
||||
const getByPage = (params) => {
|
||||
return request.postJson(
|
||||
"/oil-finance/oilCompanyAccountRecord/getByPage",
|
||||
params
|
||||
);
|
||||
};
|
||||
//详情
|
||||
const getCompanyAccountRecord = (params) => {
|
||||
return request.postJson(
|
||||
"oil-finance/oilCompanyAccountRecord/getCompanyAccountRecord",
|
||||
params
|
||||
);
|
||||
};
|
||||
export default {
|
||||
getByPage,
|
||||
getCompanyAccountRecord,
|
||||
};
|
||||
21
src/api/financialCenter/enterpriseRecharge.js
Normal file
21
src/api/financialCenter/enterpriseRecharge.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import request from "utils/axios.js";
|
||||
// table
|
||||
const getByPage = (params) => {
|
||||
return request.postJson(
|
||||
"/oil-finance/oilCompanyAccountReverse/getByPage",
|
||||
params
|
||||
);
|
||||
};
|
||||
//详情
|
||||
const get = (query) => {
|
||||
return request.get(`/oil-finance/oilCompanyAccountReverse/get/${query}`);
|
||||
};
|
||||
//详情
|
||||
const getByCompanyId = (query) => {
|
||||
return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`);
|
||||
};
|
||||
export default {
|
||||
getByPage,
|
||||
get,
|
||||
getByCompanyId,
|
||||
};
|
||||
21
src/api/financialCenter/enterpriseRechargeDetails.js
Normal file
21
src/api/financialCenter/enterpriseRechargeDetails.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import request from "utils/axios.js";
|
||||
// table
|
||||
const getByPage = (params) => {
|
||||
return request.postJson(
|
||||
"/oil-finance/oilCompanyAccountReverse/getByPage",
|
||||
params
|
||||
);
|
||||
};
|
||||
//详情
|
||||
const get = (query) => {
|
||||
return request.get(`/oil-finance/oilCompanyAccountReverse/get/${query}`);
|
||||
};
|
||||
//详情
|
||||
const getByCompanyId = (query) => {
|
||||
return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`);
|
||||
};
|
||||
export default {
|
||||
getByPage,
|
||||
get,
|
||||
getByCompanyId,
|
||||
};
|
||||
@@ -66,7 +66,9 @@ export default {
|
||||
if (query !== "") {
|
||||
this.loading = true;
|
||||
let params = {};
|
||||
params[this.config.autocompleteKey] = query;
|
||||
this.config.autocompleteKey
|
||||
? (params[this.config.autocompleteKey] = query)
|
||||
: (params["queryTypeGet"] = query);
|
||||
this.config.serveTarget(params).then((res) => {
|
||||
let timeInstance = setTimeout(() => {
|
||||
this.loading = false;
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
<div
|
||||
:style="{ maxHeight: item.isFold ? '100vh' : '0px' }"
|
||||
class="my-cell"
|
||||
>
|
||||
<template
|
||||
v-if="item.listData.length && item.listData[0].field !== 'table'"
|
||||
>
|
||||
<div v-for="(i, x) in item.listData" :key="x" class="cell-item">
|
||||
<span :title="i.remark" class="color-999 test-tst">
|
||||
@@ -52,6 +55,9 @@
|
||||
<span class="inner-data">{{ i.value }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<slot v-else name="table"> </slot>
|
||||
</div>
|
||||
</el-card>
|
||||
<div>
|
||||
|
||||
@@ -1,12 +1,67 @@
|
||||
// 炼厂类型
|
||||
export const refineryTypeEnum = [
|
||||
{
|
||||
label: "普通炼厂",
|
||||
value: "COMMON",
|
||||
},
|
||||
];
|
||||
// 炼厂账户类型
|
||||
export const refineryAccountTypeEnum = [
|
||||
{
|
||||
label: "普通炼厂",
|
||||
value: "COMMON",
|
||||
},
|
||||
];
|
||||
// 交易类型
|
||||
export const rechargeTypeEnum = [
|
||||
{
|
||||
label: "充值",
|
||||
value: "RECHARGE",
|
||||
},
|
||||
{
|
||||
label: "销账",
|
||||
value: "REVOKE",
|
||||
},
|
||||
{
|
||||
label: "赊销",
|
||||
value: "CHARGE_SALES",
|
||||
},
|
||||
{
|
||||
label: "消费返利",
|
||||
value: "CONSUME_REBATE",
|
||||
},
|
||||
];
|
||||
// 交易状态
|
||||
export const rechargeStatusEnum = [
|
||||
{
|
||||
label: "已申请",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已成功",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "已撤销",
|
||||
value: -1,
|
||||
},
|
||||
];
|
||||
// 赊销还款审核
|
||||
export const repaymentExamineEnum = [
|
||||
{
|
||||
label: "还款待审核",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "还款成功",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "还款失败",
|
||||
value: -1,
|
||||
},
|
||||
{
|
||||
label: "待还款",
|
||||
value: -2,
|
||||
},
|
||||
];
|
||||
|
||||
474
src/views/financialCenter/billDetails/index.vue
Normal file
474
src/views/financialCenter/billDetails/index.vue
Normal file
@@ -0,0 +1,474 @@
|
||||
<template>
|
||||
<div class="bill-details">
|
||||
<div class="frame">
|
||||
<!-- 公司名称 -->
|
||||
<autocomplete
|
||||
class="mr20"
|
||||
:params="parameter.params"
|
||||
:config="configAutocomplete"
|
||||
/>
|
||||
|
||||
<el-select
|
||||
v-model="parameter.params.billType"
|
||||
placeholder="交易类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in rechargeTypeEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<div class="buttons">
|
||||
<el-button icon="el-icon-search" @click="search">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="operation">
|
||||
<!-- <el-button @click="addition">新增产品</el-button> -->
|
||||
</div>
|
||||
<el-table
|
||||
v-if="tableHeight"
|
||||
ref="multipleTable"
|
||||
:height="tableHeight"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
>
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column prop="name" label="公司名称" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易类型/发生金额">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="!/\W+/.test(row.billType)">
|
||||
{{
|
||||
rechargeTypeEnum.find((item) => item.value === row.billType)
|
||||
.label
|
||||
}}
|
||||
</p>
|
||||
<p v-else>{{ row.billType }}</p>
|
||||
|
||||
<p>{{ row.occurTotalAmount }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="账户余额">
|
||||
<template slot-scope="{ row }">
|
||||
<p>
|
||||
上次 <span>{{ row.lastBalance }}</span>
|
||||
</p>
|
||||
<p>
|
||||
本次 <span>{{ row.currentBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="充值余额">
|
||||
<template slot-scope="{ row }">
|
||||
<p>
|
||||
上次 <span>{{ row.lastRechargeBalance }}</span>
|
||||
</p>
|
||||
<p>
|
||||
本次 <span>{{ row.currentRechargeBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="赊销余额">
|
||||
<template slot-scope="{ row }">
|
||||
<p>
|
||||
上次 <span>{{ row.lastChargeRechargeBalance }}</span>
|
||||
</p>
|
||||
<p>
|
||||
本次 <span>{{ row.currentChargeRechargeBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="充值返利余额">
|
||||
<template slot-scope="{ row }">
|
||||
<p>
|
||||
上次 <span>{{ row.lastRechargeRebateBalance }}</span>
|
||||
</p>
|
||||
<p>
|
||||
本次 <span>{{ row.currentRechargeRebateBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="消费返利余额">
|
||||
<template slot-scope="{ row }">
|
||||
<p>
|
||||
上次 <span>{{ row.lastConsumeRebateAmount }}</span>
|
||||
</p>
|
||||
<p>
|
||||
本次 <span>{{ row.currentConsumeRebateAmount }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="createTime" label="创建时间"> </el-table-column>
|
||||
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<span class="el-dropdown-link" @click="detail(row)">详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<pagination :parameter="parameter" @searchAgain="getByPage" />
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<el-drawer
|
||||
title="详情"
|
||||
direction="ltr"
|
||||
size="60%"
|
||||
:withHeader="false"
|
||||
:visible="controlWindows.detail"
|
||||
>
|
||||
<general-details
|
||||
title="详情"
|
||||
:isHeader="true"
|
||||
v-if="controlWindows.detail"
|
||||
:sourceData="oilCompanyMatch"
|
||||
:mappingData="mappingData"
|
||||
@close="controlWindows.detail = false"
|
||||
>
|
||||
<template #balance>
|
||||
<p class="ft14">
|
||||
上次:<span>{{ oilCompanyMatch.lastBalance }}</span>
|
||||
</p>
|
||||
<p class="ft14">
|
||||
本次:<span>{{ oilCompanyMatch.currentBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template #rechargeBalance>
|
||||
<p class="ft14">
|
||||
上次:<span>{{ oilCompanyMatch.lastRechargeBalance }}</span>
|
||||
</p>
|
||||
<p class="ft14">
|
||||
本次:<span>{{ oilCompanyMatch.currentRechargeBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template #chargeRechargeBalance>
|
||||
<p class="ft14">
|
||||
上次:<span>{{ oilCompanyMatch.lastChargeRechargeBalance }}</span>
|
||||
</p>
|
||||
<p class="ft14">
|
||||
本次:<span>{{ oilCompanyMatch.currentChargeRechargeBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template #rechargeRebateBalance>
|
||||
<p class="ft14">
|
||||
上次:<span>{{ oilCompanyMatch.lastRechargeRebateBalance }}</span>
|
||||
</p>
|
||||
<p class="ft14">
|
||||
本次:<span>{{ oilCompanyMatch.currentRechargeRebateBalance }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template #consumeRebateAmount>
|
||||
<p class="ft14">
|
||||
上次:<span>{{ oilCompanyMatch.lastConsumeRebateAmount }}</span>
|
||||
</p>
|
||||
<p class="ft14">
|
||||
本次:<span>{{ oilCompanyMatch.currentConsumeRebateAmount }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template #table>
|
||||
<el-table :data="tableDataSec" style="width: 100%">
|
||||
<el-table-column
|
||||
prop="businessOrderId"
|
||||
label="关联订单"
|
||||
></el-table-column>
|
||||
<el-table-column label="交易类型">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="!/\W+/.test(row.billType)">
|
||||
{{
|
||||
rechargeTypeEnum.find(
|
||||
(item) => item.value === row.billTypes
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
<p v-else>
|
||||
{{ row.billTypes }}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="nickName" label="司机"></el-table-column>
|
||||
<el-table-column
|
||||
prop="plateNumber"
|
||||
label="车牌号"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="payRealAmount"
|
||||
label="订单金额"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</general-details>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from "api/financialCenter/billDetails.js";
|
||||
import commonServe from "api/common.js";
|
||||
|
||||
import autocomplete from "components/autocomplete/index.vue";
|
||||
import pagination from "components/pagination/index.vue";
|
||||
import generalDetails from "components/generalDetails/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
controlWindows: {
|
||||
detail: false,
|
||||
},
|
||||
tableDataSec: [],
|
||||
tableHeight: 0,
|
||||
tableData: [],
|
||||
configAutocomplete: {
|
||||
serveTarget: commonServe.getRefineryCompanyList,
|
||||
autocompleteKey: "name",
|
||||
labelKey: "name",
|
||||
valueKey: "id",
|
||||
placeholder: "企业名称",
|
||||
querykey: "companyId",
|
||||
},
|
||||
parameter: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
},
|
||||
rechargeTypeEnum: [
|
||||
{
|
||||
label: "分油",
|
||||
value: "SEPARATION_OIL",
|
||||
},
|
||||
{
|
||||
label: "充值",
|
||||
value: "RECHARGE",
|
||||
},
|
||||
{
|
||||
label: "圈回",
|
||||
value: "TURN",
|
||||
},
|
||||
{
|
||||
label: "销账",
|
||||
value: "REVOKE",
|
||||
},
|
||||
{
|
||||
label: "赊销",
|
||||
value: "CHARGE_SALES",
|
||||
},
|
||||
{
|
||||
label: "充值返利",
|
||||
value: "RECHARGE_REBETE",
|
||||
},
|
||||
{
|
||||
label: "消费返利",
|
||||
value: "CONSUME_REBATE",
|
||||
},
|
||||
],
|
||||
|
||||
oilCompanyMatch: {},
|
||||
mappingData: [
|
||||
{
|
||||
carTitle: "企业账单明细详情",
|
||||
carItems: [
|
||||
{ label: "企业名称", value: "name" },
|
||||
{ label: "发生金额", value: "occurTotalAmount" },
|
||||
{ label: "交易类型", value: "billType" },
|
||||
{ label: "交易时间", value: "createTime" },
|
||||
{ label: "账户余额(元)", value: "balance" },
|
||||
{ label: "充值余额(元)", value: "rechargeBalance" },
|
||||
{ label: "赊销余额(元)", value: "chargeRechargeBalance" },
|
||||
{ label: "充值返利余额(元)", value: "rechargeRebateBalance" },
|
||||
{ label: "消费返利余额(元)", value: "consumeRebateAmount" },
|
||||
{
|
||||
label: "赊销待还款金额(元)",
|
||||
value: "currentTotalChargeAmount",
|
||||
},
|
||||
{
|
||||
label: "累计返利总金额(元)",
|
||||
value: "currentTotalRebateAmount",
|
||||
},
|
||||
{
|
||||
label: "累计充值返利总金额(元)",
|
||||
value: "currentTotalRechargeRebateAmount",
|
||||
},
|
||||
{
|
||||
label: "累计消费返利总金额(元)",
|
||||
value: "currentTotalConsumeRebateAmount",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
carTitle: "账单关联订单",
|
||||
carItems: [
|
||||
{
|
||||
value: "table",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getByPage();
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.heightHandle();
|
||||
});
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
this.$utils.debounce(this.heightHandle, 500)
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.parameter.currentPage = 1;
|
||||
this.getByPage();
|
||||
},
|
||||
//table list
|
||||
getByPage() {
|
||||
serve.getByPage(this.parameter).then((res) => {
|
||||
this.tableData = res.data.list;
|
||||
this.parameter.total = res.data.totalCount;
|
||||
});
|
||||
},
|
||||
//新增
|
||||
addition() {
|
||||
this.controlWindows.addInfo.title = "产品新增";
|
||||
this.controlWindows.add = true;
|
||||
},
|
||||
detail(row) {
|
||||
let params = {
|
||||
businessOrderId: row.businessOrderId,
|
||||
billType:
|
||||
row.billType == "分油" || row.billType == "SEPARATION_OIL"
|
||||
? "SEPARATION_OIL"
|
||||
: "TURN",
|
||||
};
|
||||
serve.getCompanyAccountRecord(params).then((res) => {
|
||||
this.tableDataSec = [];
|
||||
this.oilCompanyMatch = row;
|
||||
this.controlWindows.detail = true;
|
||||
});
|
||||
},
|
||||
//重置
|
||||
reset() {
|
||||
this.parameter = {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
};
|
||||
},
|
||||
|
||||
// table height
|
||||
heightHandle() {
|
||||
let bodyHeight = document.body.clientHeight;
|
||||
let frameHeight = this.obtainElement(".frame").clientHeight;
|
||||
let operationHeight = this.obtainElement(".operation").clientHeight;
|
||||
let paginationHeight = this.obtainElement(".el-pagination").clientHeight;
|
||||
this.tableHeight =
|
||||
bodyHeight - frameHeight - operationHeight - paginationHeight - 145;
|
||||
},
|
||||
obtainElement(className) {
|
||||
return document.documentElement.querySelector(className);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bill-details {
|
||||
.frame {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e3e3e5;
|
||||
background: #fff;
|
||||
.el-input,
|
||||
.el-select {
|
||||
width: 183px;
|
||||
height: 40px;
|
||||
}
|
||||
.el-autocomplete + .el-input,
|
||||
.el-input + .el-autocomplete,
|
||||
.el-autocomplete + .el-select,
|
||||
.el-input + .el-input,
|
||||
.el-input + .el-select,
|
||||
.el-select + .el-select,
|
||||
.el-select + .el-input {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.mr20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.buttons {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
overflow: hidden;
|
||||
margin: 0 20px;
|
||||
padding-bottom: 20px;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e3e3e5;
|
||||
> .operation {
|
||||
box-sizing: content-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.gray {
|
||||
color: #999;
|
||||
span {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.el-table {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
&.special {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.ft14 {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
653
src/views/financialCenter/enterpriseRecharge/index.vue
Normal file
653
src/views/financialCenter/enterpriseRecharge/index.vue
Normal file
@@ -0,0 +1,653 @@
|
||||
<template>
|
||||
<div class="enterprise-recharge">
|
||||
<div class="frame">
|
||||
<!-- 公司名称 -->
|
||||
<autocomplete
|
||||
class="mr20"
|
||||
:params="parameter.params"
|
||||
:config="configAutocomplete"
|
||||
/>
|
||||
<!-- 业务负责人 -->
|
||||
<autocomplete
|
||||
:params="parameter.params"
|
||||
:config="configAutocompleteSec"
|
||||
/>
|
||||
<el-select
|
||||
v-model="parameter.params.transactionType"
|
||||
placeholder="交易类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in rechargeTypeEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="parameter.params.transactionState"
|
||||
placeholder="交易状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in rechargeStatusEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="parameter.params.auditMark"
|
||||
placeholder="交易审核标识"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in auditMarkEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="parameter.params.chargeSalesAuditMark"
|
||||
placeholder="赊账还款审核"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in repaymentExamineEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="datetime"
|
||||
type="datetimerange"
|
||||
align="right"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="changeDateTime"
|
||||
>
|
||||
</el-date-picker>
|
||||
<div class="buttons">
|
||||
<el-button icon="el-icon-search" @click="search">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="operation">
|
||||
<!-- <el-button @click="addition">新增产品</el-button> -->
|
||||
</div>
|
||||
<el-table
|
||||
v-if="tableHeight"
|
||||
ref="multipleTable"
|
||||
:height="tableHeight"
|
||||
:data="tableData"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%"
|
||||
>
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="企业名称" show-overflow-tooltip>
|
||||
<template slot-scope="{ row }">
|
||||
<el-tag
|
||||
size="small"
|
||||
type="danger"
|
||||
effect="dark"
|
||||
v-show="row.operationCode"
|
||||
>急</el-tag
|
||||
>
|
||||
<span style="margin-left: 10px">{{ row.companyName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易类型">
|
||||
<template slot-scope="{ row }">
|
||||
<span>
|
||||
{{
|
||||
row.transactionType === "TURN"
|
||||
? LoopBackTypeEnum.find((item) => item.value === row.turnType)
|
||||
.label
|
||||
: rechargeTypeEnum.find(
|
||||
(item) => item.value === row.transactionType
|
||||
).label
|
||||
}}
|
||||
</span>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
trigger="click"
|
||||
content="{row.settlementNo}"
|
||||
>
|
||||
<el-tag
|
||||
style="cursor: pointer"
|
||||
slot="reference"
|
||||
size="small"
|
||||
type="p"
|
||||
effect="dark"
|
||||
v-show="row.settlementNo"
|
||||
>结</el-tag
|
||||
>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易状态">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="row.transactionState">
|
||||
{{
|
||||
rechargeStatusEnum.find(
|
||||
(item) => item.value === row.transactionState
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="transactionAmount"
|
||||
label="交易金额"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="rechargeRebateAmount"
|
||||
label="充值返利比例/金额"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
{{ row.rechargeRebate }}/{{ row.rechargeRebateAmount }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款/收款公司账户">
|
||||
<template slot-scope="{ row }">
|
||||
<el-tooltip
|
||||
className="item"
|
||||
effect="dark"
|
||||
placement="top"
|
||||
:disabled="!row.internalCompanyName"
|
||||
>
|
||||
<div slot="content">
|
||||
<p>收款公司账户:{{ row.internalCompanyName }}</p>
|
||||
<p>收款开户行:{{ row.bankDeposit }}</p>
|
||||
<p>收款银行卡号:{{ row.bankCardNo }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<el-tag size="mini">付</el-tag>
|
||||
<span>{{
|
||||
row.offlinePaymentCompany ? row.offlinePaymentCompany : "暂无"
|
||||
}}</span>
|
||||
<br />
|
||||
<el-tag size="mini" type="success">收</el-tag>
|
||||
<span>{{
|
||||
row.internalCompanyName ? row.internalCompanyName : "暂无"
|
||||
}}</span>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易审核标识" show-overflow-tooltip>
|
||||
<template slot-scope="{ row }">
|
||||
{{
|
||||
auditMarkEnum.find((item) => item.value === row.auditMark).label
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="赊账还款审核">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="row.transactionType && row.chargeSalesAuditMark">
|
||||
{{
|
||||
row.transactionType !== "CHARGE_SALES" ||
|
||||
(row.transactionType === "CHARGE_SALES" &&
|
||||
row.transactionState === -1)
|
||||
? "无状态"
|
||||
: repaymentExamineEnum.find(
|
||||
(item) => item.value === row.chargeSalesAuditMark
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<span class="el-dropdown-link" @click="detail(row)">详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<pagination :parameter="parameter" @searchAgain="getByPage" />
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<el-drawer
|
||||
title="详情"
|
||||
direction="ltr"
|
||||
size="60%"
|
||||
:withHeader="false"
|
||||
:visible="controlWindows.detail"
|
||||
>
|
||||
<general-details
|
||||
title="详情"
|
||||
:isHeader="true"
|
||||
v-if="controlWindows.detail"
|
||||
:sourceData="oilCompanyMatch"
|
||||
:mappingData="mappingData"
|
||||
@close="controlWindows.detail = false"
|
||||
>
|
||||
<template #offlineTransactionProof>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="oilCompanyMatch.offlineTransactionProof"
|
||||
/>
|
||||
</template>
|
||||
</general-details>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from "api/financialCenter/enterpriseRechargeDetails.js";
|
||||
import commonServe from "api/common.js";
|
||||
|
||||
import autocomplete from "components/autocomplete/index.vue";
|
||||
import pagination from "components/pagination/index.vue";
|
||||
import generalDetails from "components/generalDetails/index.vue";
|
||||
|
||||
import {
|
||||
rechargeTypeEnum,
|
||||
rechargeStatusEnum,
|
||||
repaymentExamineEnum,
|
||||
} from "utils/dataType.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rechargeTypeEnum: [
|
||||
{
|
||||
label: "圈回",
|
||||
value: "TURN",
|
||||
},
|
||||
...rechargeTypeEnum,
|
||||
],
|
||||
rechargeStatusEnum: rechargeStatusEnum,
|
||||
repaymentExamineEnum: [
|
||||
{
|
||||
label: "已拆分",
|
||||
value: -3,
|
||||
},
|
||||
...repaymentExamineEnum,
|
||||
],
|
||||
auditMarkEnum: [
|
||||
{
|
||||
label: "待审核",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已审核",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "审核失败",
|
||||
value: -1,
|
||||
},
|
||||
],
|
||||
controlWindows: {
|
||||
detail: false,
|
||||
},
|
||||
datetime: [],
|
||||
tableHeight: 0,
|
||||
tableData: [],
|
||||
configAutocomplete: {
|
||||
serveTarget: commonServe.getRefineryCompanyList,
|
||||
autocompleteKey: "name",
|
||||
labelKey: "name",
|
||||
valueKey: "id",
|
||||
placeholder: "企业名称",
|
||||
querykey: "companyId",
|
||||
},
|
||||
configAutocompleteSec: {
|
||||
serveTarget: commonServe.liekQuery,
|
||||
autocompleteKey: "",
|
||||
labelKey: "nickName",
|
||||
valueKey: "id",
|
||||
placeholder: "业务负责人",
|
||||
querykey: "businessLeader",
|
||||
},
|
||||
parameter: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
},
|
||||
rechargeTypeEnum: [
|
||||
{
|
||||
label: "充值",
|
||||
value: "RECHARGE",
|
||||
},
|
||||
{
|
||||
label: "销账",
|
||||
value: "REVOKE",
|
||||
},
|
||||
{
|
||||
label: "赊销",
|
||||
value: "CHARGE_SALES",
|
||||
},
|
||||
{
|
||||
label: "消费返利",
|
||||
value: "CONSUME_REBATE",
|
||||
},
|
||||
],
|
||||
LoopBackTypeEnum: [
|
||||
{
|
||||
label: "充值圈回",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "赊销圈回",
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: "充值返利圈回",
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: "消费返利圈回",
|
||||
value: 4,
|
||||
},
|
||||
],
|
||||
rechargeStatusEnum: [
|
||||
{
|
||||
label: "已申请",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "已成功",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "已撤销",
|
||||
value: -1,
|
||||
},
|
||||
],
|
||||
repaymentExamineEnum: [
|
||||
{
|
||||
label: "还款待审核",
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: "还款成功",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "还款失败",
|
||||
value: -1,
|
||||
},
|
||||
{
|
||||
label: "待还款",
|
||||
value: -2,
|
||||
},
|
||||
],
|
||||
oilCompanyMatch: {},
|
||||
mappingData: [
|
||||
{
|
||||
carTitle: "",
|
||||
carItems: [
|
||||
{ label: "ID", value: "id" },
|
||||
{ label: "交易类型", value: "transactionType" },
|
||||
{ label: "交易状态", value: "transactionState" },
|
||||
{ label: "交易金额", value: "transactionAmount" },
|
||||
{ label: "充值返利比例", value: "rechargeRebate" },
|
||||
{ label: "充值返利金额", value: "rechargeRebateAmount" },
|
||||
{ label: "线下汇款公司账户", value: "offlinePaymentCompany" },
|
||||
{ label: "线下交易发起时间", value: "offlineStartTime" },
|
||||
{ label: "线下交易完成时间", value: "offlineCompleteTime" },
|
||||
{ label: "线下交易凭证", value: "offlineTransactionProof" },
|
||||
{ label: "交易审核标识", value: "auditMark" },
|
||||
{ label: "审核人", value: "auditUserName" },
|
||||
{ label: "交易说明", value: "reverseRemark" },
|
||||
{ label: "审核时间", value: "auditTime" },
|
||||
{ label: "审核系统来源", value: "auditSource" },
|
||||
{ label: "赊销还款审核", value: "chargeSalesAuditMark" },
|
||||
{ label: "赊销还款审核人", value: "chargeSalesAuditUser" },
|
||||
{ label: "赊销还款审核时间", value: "chargeSalesAuditTime" },
|
||||
{ label: "赊销还款审核来源", value: "chargeSalesAuditSource" },
|
||||
{ label: "创建用户", value: "createUserName" },
|
||||
{ label: "创建时间", value: "createTime" },
|
||||
{ label: "创建数据来源", value: "createSource" },
|
||||
{ label: "企业收款账户", value: "internalCompanyName" },
|
||||
{ label: "开户行", value: "bankDeposit" },
|
||||
{ label: "银行卡号", value: "bankCardNo" },
|
||||
],
|
||||
},
|
||||
{
|
||||
carTitle: "账户信息",
|
||||
carItems: [
|
||||
{ label: "账户总余额", value: "balance" },
|
||||
{ label: "待还总金额", value: "totalChargeAmount" },
|
||||
{ label: "账户状态", value: "accountState" },
|
||||
{ label: "账户类型", value: "accountType" },
|
||||
{ label: "账户充值余额", value: "rechargeBalance" },
|
||||
{ label: "赊销充值余额", value: "chargeRechargeBalance" },
|
||||
{ label: "充值返利余额", value: "rechargeRebateBalance" },
|
||||
{ label: "消费返利余额", value: "consumeRebateBalance" },
|
||||
{ label: "累计充值金额", value: "totalRechargeAmount" },
|
||||
{ label: "累计赊销充值金额", value: "totalChargeRechargeAmount" },
|
||||
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
|
||||
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initDateTime();
|
||||
this.getByPage();
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.heightHandle();
|
||||
});
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
this.$utils.debounce(this.heightHandle, 500)
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.parameter.currentPage = 1;
|
||||
this.getByPage();
|
||||
},
|
||||
//table list
|
||||
getByPage() {
|
||||
// this.parameter.params.companyAccountType = "4";
|
||||
serve.getByPage(this.parameter).then((res) => {
|
||||
this.tableData = res.data.list;
|
||||
this.parameter.total = res.data.totalCount;
|
||||
});
|
||||
},
|
||||
//新增
|
||||
addition() {
|
||||
this.controlWindows.addInfo.title = "产品新增";
|
||||
this.controlWindows.add = true;
|
||||
},
|
||||
detail(row) {
|
||||
Promise.all([
|
||||
serve.get(row.id),
|
||||
serve.getByCompanyId(row.companyId),
|
||||
]).then(([firstRes, secondRes]) => {
|
||||
this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
|
||||
|
||||
console.log("this.oilCompanyMatch", this.oilCompanyMatch);
|
||||
this.controlWindows.detail = true;
|
||||
});
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
let transactionAmount = 0; // 交易金额
|
||||
let rechargeRebateAmount = 0; // 充值返利金额
|
||||
data.forEach((item) => {
|
||||
transactionAmount += item.transactionAmount
|
||||
? item.transactionAmount
|
||||
: 0;
|
||||
rechargeRebateAmount += item.rechargeRebateAmount
|
||||
? item.rechargeRebateAmount
|
||||
: 0;
|
||||
});
|
||||
transactionAmount = transactionAmount.toFixed(2);
|
||||
rechargeRebateAmount = rechargeRebateAmount.toFixed(2);
|
||||
columns.forEach((item, index) => {
|
||||
if (index === 1) {
|
||||
sums[index] = "合计";
|
||||
return;
|
||||
}
|
||||
switch (item.property) {
|
||||
case "transactionAmount":
|
||||
sums[index] = transactionAmount + "元";
|
||||
break;
|
||||
case "rechargeRebateAmount":
|
||||
sums[index] = rechargeRebateAmount + "元";
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
//重置
|
||||
reset() {
|
||||
this.parameter = {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
};
|
||||
this.initDateTime();
|
||||
},
|
||||
// init时间
|
||||
initDateTime() {
|
||||
let now = new Date().getTime();
|
||||
let beforeDay30 = now - 1000 * 60 * 60 * 24 * 30;
|
||||
let nowRes = this.$utils.parseTime(now);
|
||||
let beforeDay30Res = this.$utils.parseTime(beforeDay30);
|
||||
let { y, M, d } = nowRes;
|
||||
let { y: beforey, M: beforeM, d: befored } = beforeDay30Res;
|
||||
this.datetime = [
|
||||
`${beforey}-${beforeM}-${befored} 00:00:00`,
|
||||
`${y}-${M}-${d} 23:59:59`,
|
||||
];
|
||||
this.changeDateTime(this.datetime);
|
||||
},
|
||||
changeDateTime(val) {
|
||||
if (val) {
|
||||
this.parameter.params.createTimeStart = val[0];
|
||||
this.parameter.params.createTimeEnd = val[1];
|
||||
}
|
||||
console.log(val);
|
||||
},
|
||||
// table height
|
||||
heightHandle() {
|
||||
let bodyHeight = document.body.clientHeight;
|
||||
let frameHeight = this.obtainElement(".frame").clientHeight;
|
||||
let operationHeight = this.obtainElement(".operation").clientHeight;
|
||||
let paginationHeight = this.obtainElement(".el-pagination").clientHeight;
|
||||
this.tableHeight =
|
||||
bodyHeight - frameHeight - operationHeight - paginationHeight - 145;
|
||||
},
|
||||
obtainElement(className) {
|
||||
return document.documentElement.querySelector(className);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.enterprise-recharge {
|
||||
.frame {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e3e3e5;
|
||||
background: #fff;
|
||||
.el-input,
|
||||
.el-select {
|
||||
width: 183px;
|
||||
height: 40px;
|
||||
}
|
||||
.el-autocomplete + .el-input,
|
||||
.el-input + .el-autocomplete,
|
||||
.el-autocomplete + .el-select,
|
||||
.el-input + .el-input,
|
||||
.el-input + .el-select,
|
||||
.el-select + .el-select,
|
||||
.el-select + .el-input {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.mr20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.buttons {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
overflow: hidden;
|
||||
margin: 0 20px;
|
||||
padding-bottom: 20px;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e3e3e5;
|
||||
> .operation {
|
||||
box-sizing: content-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.gray {
|
||||
color: #999;
|
||||
span {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.el-table {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
&.special {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
570
src/views/financialCenter/enterpriseRechargeDetails/index.vue
Normal file
570
src/views/financialCenter/enterpriseRechargeDetails/index.vue
Normal file
@@ -0,0 +1,570 @@
|
||||
<template>
|
||||
<div class="enterprise-recharge-details">
|
||||
<div class="frame">
|
||||
<!-- 公司名称 -->
|
||||
<autocomplete
|
||||
class="mr20"
|
||||
:params="parameter.params"
|
||||
:config="configAutocomplete"
|
||||
/>
|
||||
<!-- 业务负责人 -->
|
||||
<autocomplete
|
||||
:params="parameter.params"
|
||||
:config="configAutocompleteSec"
|
||||
/>
|
||||
<el-select
|
||||
v-model="parameter.params.enableMark"
|
||||
placeholder="交易类型"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in rechargeTypeEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="parameter.params.enableMark"
|
||||
placeholder="交易状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in rechargeStatusEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="parameter.params.enableMark"
|
||||
placeholder="赊账还款审核"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in repaymentExamineEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="datetime"
|
||||
type="datetimerange"
|
||||
align="right"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="changeDateTime"
|
||||
>
|
||||
</el-date-picker>
|
||||
<div class="buttons">
|
||||
<el-button icon="el-icon-search" @click="search">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<div class="operation">
|
||||
<!-- <el-button @click="addition">新增产品</el-button> -->
|
||||
</div>
|
||||
<el-table
|
||||
v-if="tableHeight"
|
||||
ref="multipleTable"
|
||||
:height="tableHeight"
|
||||
:data="tableData"
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%"
|
||||
>
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column
|
||||
prop="companyName"
|
||||
label="企业名称"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易类型">
|
||||
<template slot-scope="{ row }">
|
||||
<p>
|
||||
{{
|
||||
row.transactionType === "TURN"
|
||||
? LoopBackTypeEnum.find((item) => item.value === row.turnType)
|
||||
.label
|
||||
: rechargeTypeEnum.find(
|
||||
(item) => item.value === row.transactionType
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交易状态">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="row.transactionState">
|
||||
{{
|
||||
rechargeStatusEnum.find(
|
||||
(item) => item.value === row.transactionState
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="transactionAmount"
|
||||
label="交易金额"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="rechargeRebate"
|
||||
label="充值返利比例"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="rechargeRebateAmount"
|
||||
label="充值返利金额"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="赊账还款审核">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-if="row.transactionType && row.chargeSalesAuditMark">
|
||||
{{
|
||||
row.transactionType !== "CHARGE_SALES" ||
|
||||
(row.transactionType === "CHARGE_SALES" &&
|
||||
row.transactionState === -1)
|
||||
? "无状态"
|
||||
: repaymentExamineEnum.find(
|
||||
(item) => item.value === row.chargeSalesAuditMark
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="businessLeader"
|
||||
label="业务负责人"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<span class="el-dropdown-link" @click="detail(row)">详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<pagination :parameter="parameter" @searchAgain="getByPage" />
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<el-drawer
|
||||
title="详情"
|
||||
direction="ltr"
|
||||
size="60%"
|
||||
:withHeader="false"
|
||||
:visible="controlWindows.detail"
|
||||
>
|
||||
<general-details
|
||||
title="详情"
|
||||
:isHeader="true"
|
||||
v-if="controlWindows.detail"
|
||||
:sourceData="oilCompanyMatch"
|
||||
:mappingData="mappingData"
|
||||
@close="controlWindows.detail = false"
|
||||
>
|
||||
<template #offlineTransactionProof>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="oilCompanyMatch.offlineTransactionProof"
|
||||
/>
|
||||
</template>
|
||||
</general-details>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from "api/financialCenter/enterpriseRechargeDetails.js";
|
||||
import commonServe from "api/common.js";
|
||||
|
||||
import autocomplete from "components/autocomplete/index.vue";
|
||||
import pagination from "components/pagination/index.vue";
|
||||
import generalDetails from "components/generalDetails/index.vue";
|
||||
|
||||
import {
|
||||
rechargeTypeEnum,
|
||||
rechargeStatusEnum,
|
||||
repaymentExamineEnum,
|
||||
} from "utils/dataType.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
rechargeTypeEnum: rechargeTypeEnum,
|
||||
rechargeStatusEnum: rechargeStatusEnum,
|
||||
repaymentExamineEnum: repaymentExamineEnum,
|
||||
controlWindows: {
|
||||
detail: false,
|
||||
},
|
||||
datetime: [],
|
||||
tableHeight: 0,
|
||||
tableData: [],
|
||||
configAutocomplete: {
|
||||
serveTarget: commonServe.getRefineryCompanyList,
|
||||
autocompleteKey: "name",
|
||||
labelKey: "name",
|
||||
valueKey: "id",
|
||||
placeholder: "企业名称",
|
||||
querykey: "companyId",
|
||||
},
|
||||
configAutocompleteSec: {
|
||||
serveTarget: commonServe.liekQuery,
|
||||
autocompleteKey: "",
|
||||
labelKey: "nickName",
|
||||
valueKey: "id",
|
||||
placeholder: "业务负责人",
|
||||
querykey: "businessLeader",
|
||||
},
|
||||
parameter: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
},
|
||||
// rechargeTypeEnum: [
|
||||
// {
|
||||
// label: "充值",
|
||||
// value: "RECHARGE",
|
||||
// },
|
||||
// {
|
||||
// label: "销账",
|
||||
// value: "REVOKE",
|
||||
// },
|
||||
// {
|
||||
// label: "赊销",
|
||||
// value: "CHARGE_SALES",
|
||||
// },
|
||||
// {
|
||||
// label: "消费返利",
|
||||
// value: "CONSUME_REBATE",
|
||||
// },
|
||||
// ],
|
||||
LoopBackTypeEnum: [
|
||||
{
|
||||
label: "充值圈回",
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: "赊销圈回",
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: "充值返利圈回",
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: "消费返利圈回",
|
||||
value: 4,
|
||||
},
|
||||
],
|
||||
|
||||
// rechargeStatusEnum: [
|
||||
// {
|
||||
// label: "已申请",
|
||||
// value: 0,
|
||||
// },
|
||||
// {
|
||||
// label: "已成功",
|
||||
// value: 1,
|
||||
// },
|
||||
// {
|
||||
// label: "已撤销",
|
||||
// value: -1,
|
||||
// },
|
||||
// ],
|
||||
// repaymentExamineEnum: [
|
||||
// {
|
||||
// label: "还款待审核",
|
||||
// value: 0,
|
||||
// },
|
||||
// {
|
||||
// label: "还款成功",
|
||||
// value: 1,
|
||||
// },
|
||||
// {
|
||||
// label: "还款失败",
|
||||
// value: -1,
|
||||
// },
|
||||
// {
|
||||
// label: "待还款",
|
||||
// value: -2,
|
||||
// },
|
||||
// ],
|
||||
oilCompanyMatch: {},
|
||||
mappingData: [
|
||||
{
|
||||
carTitle: "",
|
||||
carItems: [
|
||||
{ label: "ID", value: "id" },
|
||||
{ label: "交易类型", value: "transactionType" },
|
||||
{ label: "交易状态", value: "transactionState" },
|
||||
{ label: "交易金额", value: "transactionAmount" },
|
||||
{ label: "充值返利比例", value: "rechargeRebate" },
|
||||
{ label: "充值返利金额", value: "rechargeRebateAmount" },
|
||||
{ label: "线下汇款公司账户", value: "offlinePaymentCompany" },
|
||||
{ label: "线下交易发起时间", value: "offlineStartTime" },
|
||||
{ label: "线下交易完成时间", value: "offlineCompleteTime" },
|
||||
{ label: "线下交易凭证", value: "offlineTransactionProof" },
|
||||
{ label: "交易审核标识", value: "auditMark" },
|
||||
{ label: "审核人", value: "auditUserName" },
|
||||
{ label: "交易说明", value: "reverseRemark" },
|
||||
{ label: "审核时间", value: "auditTime" },
|
||||
{ label: "审核系统来源", value: "auditSource" },
|
||||
{ label: "赊销还款审核", value: "chargeSalesAuditMark" },
|
||||
{ label: "赊销还款审核人", value: "chargeSalesAuditUser" },
|
||||
{ label: "赊销还款审核时间", value: "chargeSalesAuditTime" },
|
||||
{ label: "赊销还款审核来源", value: "chargeSalesAuditSource" },
|
||||
{ label: "创建用户", value: "createUserName" },
|
||||
{ label: "创建时间", value: "createTime" },
|
||||
{ label: "创建数据来源", value: "createSource" },
|
||||
{ label: "企业收款账户", value: "internalCompanyName" },
|
||||
{ label: "开户行", value: "bankDeposit" },
|
||||
{ label: "银行卡号", value: "bankCardNo" },
|
||||
],
|
||||
},
|
||||
{
|
||||
carTitle: "账户信息",
|
||||
carItems: [
|
||||
{ label: "账户总余额", value: "balance" },
|
||||
{ label: "待还总金额", value: "totalChargeAmount" },
|
||||
{ label: "账户状态", value: "accountState" },
|
||||
{ label: "账户类型", value: "accountType" },
|
||||
{ label: "账户充值余额", value: "rechargeBalance" },
|
||||
{ label: "赊销充值余额", value: "chargeRechargeBalance" },
|
||||
{ label: "充值返利余额", value: "rechargeRebateBalance" },
|
||||
{ label: "消费返利余额", value: "consumeRebateBalance" },
|
||||
{ label: "累计充值金额", value: "totalRechargeAmount" },
|
||||
{ label: "累计赊销充值金额", value: "totalChargeRechargeAmount" },
|
||||
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
|
||||
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.initDateTime();
|
||||
this.getByPage();
|
||||
},
|
||||
updated() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.heightHandle();
|
||||
});
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
this.$utils.debounce(this.heightHandle, 500)
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
this.parameter.currentPage = 1;
|
||||
this.getByPage();
|
||||
},
|
||||
//table list
|
||||
getByPage() {
|
||||
// this.parameter.params.companyAccountType = "4";
|
||||
serve.getByPage(this.parameter).then((res) => {
|
||||
this.tableData = res.data.list;
|
||||
this.parameter.total = res.data.totalCount;
|
||||
});
|
||||
},
|
||||
//新增
|
||||
addition() {
|
||||
this.controlWindows.addInfo.title = "产品新增";
|
||||
this.controlWindows.add = true;
|
||||
},
|
||||
detail(row) {
|
||||
Promise.all([
|
||||
serve.get(row.id),
|
||||
serve.getByCompanyId(row.companyId),
|
||||
]).then(([firstRes, secondRes]) => {
|
||||
this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
|
||||
|
||||
console.log("this.oilCompanyMatch", this.oilCompanyMatch);
|
||||
this.controlWindows.detail = true;
|
||||
});
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
let transactionAmount = 0; // 交易金额
|
||||
let rechargeRebateAmount = 0; // 充值返利金额
|
||||
data.forEach((item) => {
|
||||
transactionAmount += item.transactionAmount
|
||||
? item.transactionAmount
|
||||
: 0;
|
||||
rechargeRebateAmount += item.rechargeRebateAmount
|
||||
? item.rechargeRebateAmount
|
||||
: 0;
|
||||
});
|
||||
transactionAmount = transactionAmount.toFixed(2);
|
||||
rechargeRebateAmount = rechargeRebateAmount.toFixed(2);
|
||||
columns.forEach((item, index) => {
|
||||
if (index === 1) {
|
||||
sums[index] = "合计";
|
||||
return;
|
||||
}
|
||||
switch (item.property) {
|
||||
case "transactionAmount":
|
||||
sums[index] = transactionAmount + "元";
|
||||
break;
|
||||
case "rechargeRebateAmount":
|
||||
sums[index] = rechargeRebateAmount + "元";
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
//重置
|
||||
reset() {
|
||||
this.parameter = {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
params: {},
|
||||
};
|
||||
this.initDateTime();
|
||||
},
|
||||
// init时间
|
||||
initDateTime() {
|
||||
let now = new Date().getTime();
|
||||
let beforeDay30 = now - 1000 * 60 * 60 * 24 * 30;
|
||||
let nowRes = this.$utils.parseTime(now);
|
||||
let beforeDay30Res = this.$utils.parseTime(beforeDay30);
|
||||
let { y, M, d } = nowRes;
|
||||
let { y: beforey, M: beforeM, d: befored } = beforeDay30Res;
|
||||
this.datetime = [
|
||||
`${beforey}-${beforeM}-${befored} 00:00:00`,
|
||||
`${y}-${M}-${d} 23:59:59`,
|
||||
];
|
||||
this.changeDateTime(this.datetime);
|
||||
},
|
||||
changeDateTime(val) {
|
||||
if (val) {
|
||||
this.parameter.params.createTimeStart = val[0];
|
||||
this.parameter.params.createTimeEnd = val[1];
|
||||
}
|
||||
console.log(val);
|
||||
},
|
||||
// table height
|
||||
heightHandle() {
|
||||
let bodyHeight = document.body.clientHeight;
|
||||
let frameHeight = this.obtainElement(".frame").clientHeight;
|
||||
let operationHeight = this.obtainElement(".operation").clientHeight;
|
||||
let paginationHeight = this.obtainElement(".el-pagination").clientHeight;
|
||||
this.tableHeight =
|
||||
bodyHeight - frameHeight - operationHeight - paginationHeight - 145;
|
||||
},
|
||||
obtainElement(className) {
|
||||
return document.documentElement.querySelector(className);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.enterprise-recharge-details {
|
||||
.frame {
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e3e3e5;
|
||||
background: #fff;
|
||||
.el-input,
|
||||
.el-select {
|
||||
width: 183px;
|
||||
height: 40px;
|
||||
}
|
||||
.el-autocomplete + .el-input,
|
||||
.el-input + .el-autocomplete,
|
||||
.el-autocomplete + .el-select,
|
||||
.el-input + .el-input,
|
||||
.el-input + .el-select,
|
||||
.el-select + .el-select,
|
||||
.el-select + .el-input {
|
||||
margin-right: 20px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.mr20 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.buttons {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
overflow: hidden;
|
||||
margin: 0 20px;
|
||||
padding-bottom: 20px;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e3e3e5;
|
||||
> .operation {
|
||||
box-sizing: content-box;
|
||||
padding: 15px;
|
||||
}
|
||||
.gray {
|
||||
color: #999;
|
||||
span {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.el-table {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
&.special {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -7,19 +7,8 @@
|
||||
placeholder="产品名称"
|
||||
clearable
|
||||
></el-input>
|
||||
|
||||
<!-- 炼厂名称 -->
|
||||
<autocomplete :params="parameter.params" :config="configAutocomplete" />
|
||||
|
||||
<!-- <el-autocomplete
|
||||
v-model="parameter.params.refineryName"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
@select="selectAutocomplete"
|
||||
value-key="refineryName"
|
||||
placeholder="炼厂名称"
|
||||
clearable
|
||||
@clear="parameter.params.refineryId = ''"
|
||||
></el-autocomplete> -->
|
||||
|
||||
<el-input
|
||||
v-model="parameter.params.belongLibrary"
|
||||
placeholder="所处炼厂库"
|
||||
@@ -211,6 +200,17 @@ import pagination from "components/pagination/index.vue";
|
||||
import generalDetails from "components/generalDetails/index.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
add,
|
||||
create,
|
||||
record,
|
||||
batch,
|
||||
adjust,
|
||||
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
controlWindows: {
|
||||
@@ -264,17 +264,6 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
add,
|
||||
create,
|
||||
record,
|
||||
batch,
|
||||
adjust,
|
||||
|
||||
pagination,
|
||||
autocomplete,
|
||||
generalDetails,
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.heightHandle();
|
||||
|
||||
Reference in New Issue
Block a user