pull/1/head
xiaozhiyong 2 years ago
parent fb1300a70e
commit b1c894f96c
  1. 474
      src/views/financialCenter/accountManagement/index.vue
  2. 2
      src/views/financialCenter/billDetails/index.vue
  3. 6
      src/views/refineryAccount/index.vue
  4. 6
      src/views/refineryInfo/index.vue

@ -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>

@ -29,7 +29,7 @@
</div>
<div class="table">
<div class="operation">
<!-- <el-button @click="addition">新增产品</el-button> -->
<el-button @click="addition">新增产品</el-button>
</div>
<el-table
v-if="tableHeight"

@ -11,7 +11,11 @@
placeholder="炼厂名称"
></el-autocomplete> -->
<autocomplete :params="parameter.params" :config="configAutocomplete" />
<autocomplete
class="mr20"
:params="parameter.params"
:config="configAutocomplete"
/>
<el-select
v-model="parameter.params.refineryType"

@ -11,7 +11,11 @@
placeholder="炼厂名称"
></el-autocomplete> -->
<autocomplete :params="parameter.params" :config="configAutocomplete" />
<autocomplete
class="mr20"
:params="parameter.params"
:config="configAutocomplete"
/>
<el-select
v-model="parameter.params.refineryType"

Loading…
Cancel
Save