pull/19/head^2
xiaozhiyong 1 year ago
parent 514cd0a652
commit 3b8cccb205
  1. 3
      src/views/financialCenter/enterpriseRecharge/index.vue
  2. 437
      src/views/refineryCenter/index.vue

@ -382,7 +382,8 @@ export default {
this.oilCompanyMatch = [firstRes.data, secondRes.data]
this.controlWindows.addInfo = {
examineMark: row.auditMark === 0,
id: row.id
id: row.id,
refineryCenterAccountId: row.refineryCenterAccountId
}
this.controlWindows.detail = true
})

@ -2,52 +2,43 @@
<div class="order">
<div class="frame">
<div class="centerStyle">
<div>
油批中心账户
</div>
<div class="centerStyle-bottom">
<div>油批中心账户</div>
<div class="centerStyle-bottom">
<div>
<span>{{topData.balance}}</span><br>
<span>{{ topData.balance }}</span
><br />
<span>总余额</span>
</div>
<div>
<span>{{topData.rechargeBalance}}</span><br>
<span>{{ topData.rechargeBalance }}</span
><br />
<span>充值余额</span>
</div>
<div>
<span>{{topData.totalRechargeBalance}}</span><br>
<!-- <div>
<span>{{ topData.totalRechargeBalance }}</span
><br />
<span>累计充值余额</span>
</div>
</div> -->
</div>
</div>
</div>
<div class="frame">
<!-- 公司名称 -->
<autocomplete
class="mr20"
:params="parameter.params"
:config="configAutocomplete"
/>
<el-select style="margin-right: 20px;" v-model="parameter.params.transactionType" placeholder="交易类型" clearable>
<el-option
v-for="item in refineryList"
:key="item.val"
:label="item.label"
:value="item.val"
>
</el-option>
<autocomplete class="mr20" :params="parameter.params" :config="configAutocomplete" />
<el-select style="margin-right: 20px" v-model="parameter.params.transactionType" placeholder="交易类型" clearable>
<el-option v-for="item in refineryList" :key="item.val" :label="item.label" :value="item.val"> </el-option>
</el-select>
<el-date-picker
v-model="parameter.params.createTime"
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>
v-model="parameter.params.createTime"
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>
<!-- <el-select v-model="parameter.params.id" placeholder="产品名称" clearable>
<el-option
v-for="item in refineryList"
@ -58,9 +49,7 @@
</el-option>
</el-select> -->
<div class="buttons">
<el-button icon="el-icon-search" @click="handleCurrentChange(1)"
>查询</el-button
>
<el-button icon="el-icon-search" @click="handleCurrentChange(1)">查询</el-button>
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
</div>
</div>
@ -68,27 +57,18 @@
<div class="operation">
<!-- <el-button icon="el-icon-upload2" @click="addition">炼厂入驻</el-button> -->
</div>
<el-table
v-if="tableHeight"
ref="multipleTable"
:height="tableHeight"
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="companyName"
label="公司名称"
show-overflow-tooltip
minWidth="250"
>
</el-table-column>
<el-table-column label="交易类型" minWidth="120">
<el-table v-if="tableHeight" ref="multipleTable" :height="tableHeight" :data="tableData" style="width: 100%">
<el-table-column label="公司名称" show-overflow-tooltip minWidth="250">
<template slot-scope="{ row }">
<span>{{ row.transactionType|refineryType }}</span>
<span>{{ row.companyName || row.refineryAccountName }}</span>
</template>
</el-table-column>
<el-table-column label="交易金额" minWidth="120" prop="transactionAmount">
<el-table-column label="交易类型" minWidth="120">
<template slot-scope="{ row }">
<span>{{ row.transactionType | refineryType }}</span>
</template>
</el-table-column>
<el-table-column label="交易金额" minWidth="120" prop="transactionAmount"> </el-table-column>
<el-table-column label="总余额变动" minWidth="120">
<template slot-scope="{ row }">
<p class="gray">
@ -109,7 +89,7 @@
</p>
</template>
</el-table-column>
<el-table-column label="累计充值余额变动" minWidth="120">
<!-- <el-table-column label="累计充值余额变动" minWidth="120">
<template slot-scope="{ row }">
<p class="gray">
当前 <span>{{ row.currentTotalRechargeAmount }}</span>
@ -118,11 +98,9 @@
上次 <span>{{ row.lastTotalRechargeAmount }}</span>
</p>
</template>
</el-table-column>
<el-table-column prop="orderId" label="业务订单号" minWidth="180">
</el-table-column>
<el-table-column prop="createTime" label="创建时间" minWidth="210">
</el-table-column>
</el-table-column> -->
<el-table-column prop="orderId" label="业务订单号" minWidth="180"> </el-table-column>
<el-table-column prop="createTime" label="创建时间" minWidth="210"> </el-table-column>
</el-table>
<el-pagination
background
@ -138,13 +116,7 @@
</el-pagination>
</div>
<el-drawer
title="详情"
direction="ltr"
size="60%"
:withHeader="false"
:visible="controlWindows.detail"
>
<el-drawer title="详情" direction="ltr" size="60%" :withHeader="false" :visible="controlWindows.detail">
<general-details
title="详情"
:isHeader="true"
@ -161,86 +133,91 @@
</template>
<script>
import serve from "api/refineryInfo.js";
import commonServe from "api/common.js";
import order from "api/order.js";
import generalDetails from "components/generalDetails/index.vue";
import autocomplete from "components/autocomplete/index.vue";
import billOfLading from "./components/billOfLading.vue";
import serve from 'api/refineryInfo.js'
import commonServe from 'api/common.js'
import order from 'api/order.js'
import generalDetails from 'components/generalDetails/index.vue'
import autocomplete from 'components/autocomplete/index.vue'
import billOfLading from './components/billOfLading.vue'
export default {
filters:{
refineryType(val){
switch(val){
case 'RECHARGE': return '充值'
case 'TURN': return '圈回'
case 'CORRECTION': return '修正平账'
case 'PAYMENT': return '订单支付'
case 'RETURN': return '订单回退'
case 'REFUND': return '订单退款'
case 'TRANSFER': return '转账'
filters: {
refineryType(val) {
switch (val) {
case 'RECHARGE':
return '充值'
case 'TURN':
return '圈回'
case 'CORRECTION':
return '修正平账'
case 'PAYMENT':
return '订单支付'
case 'RETURN':
return '订单回退'
case 'REFUND':
return '订单退款'
case 'TRANSFER':
return '转账'
}
return val?val:'暂无数据'
},
return val ? val : '暂无数据'
}
},
refineryList: [
{val:'RECHARGE',label:'充值'},
{val:'TURN',label:'圈回'},
{val:'CORRECTION',label:'修正平账'},
{val:'PAYMENT',label:'订单支付'},
{val:'RETURN',label:'订单回退'},
{val:'REFUND',label:'订单退款'},
{val:'TRANSFER',label:'转账'}
],
{ val: 'RECHARGE', label: '充值' },
{ val: 'TURN', label: '圈回' },
{ val: 'CORRECTION', label: '修正平账' },
{ val: 'PAYMENT', label: '订单支付' },
{ val: 'RETURN', label: '订单回退' },
{ val: 'REFUND', label: '订单退款' },
{ val: 'TRANSFER', label: '转账' }
],
data() {
return {
topData:{},
topData: {},
controlWindows: {
add: false,
addInfo: {
},
addInfo: {},
detail: false,
bill: false,
bill: false
},
configAutocomplete: {
serveTarget: commonServe.getRefineryCompanyList,
autocompleteKey: "name",
labelKey: "name",
valueKey: "id",
placeholder: "企业名称",
querykey: "customerId",
autocompleteKey: 'name',
labelKey: 'name',
valueKey: 'id',
placeholder: '企业名称',
querykey: 'customerId'
},
configAutocompleteLc: {
serveTarget: serve.findByEntity,
autocompleteKey: "name",
labelKey: "refineryName",
valueKey: "id",
placeholder: "炼厂名称",
querykey: "refineryId",
autocompleteKey: 'name',
labelKey: 'refineryName',
valueKey: 'id',
placeholder: '炼厂名称',
querykey: 'refineryId'
},
configAutocompleteCp: {
serveTarget: serve.findByEntity,
autocompleteKey: "name",
labelKey: "refineryName",
valueKey: "id",
placeholder: "产品名称",
querykey: "refineryId",
autocompleteKey: 'name',
labelKey: 'refineryName',
valueKey: 'id',
placeholder: '产品名称',
querykey: 'refineryId'
},
refineryTypeEnum: [
{
label: "普通炼厂",
value: "COMMON",
},
label: '普通炼厂',
value: 'COMMON'
}
],
refineryList: [
{val:'RECHARGE',label:'充值'},
{val:'TURN',label:'圈回'},
{val:'CORRECTION',label:'修正平账'},
{val:'PAYMENT',label:'订单支付'},
{val:'RETURN',label:'订单回退'},
{val:'REFUND',label:'订单退款'},
{val:'TRANSFER',label:'转账'}
{ val: 'RECHARGE', label: '充值' },
{ val: 'TURN', label: '圈回' },
{ val: 'CORRECTION', label: '修正平账' },
{ val: 'PAYMENT', label: '订单支付' },
{ val: 'RETURN', label: '订单回退' },
{ val: 'REFUND', label: '订单退款' },
{ val: 'TRANSFER', label: '转账' }
],
tableHeight: 0,
tableData: [],
@ -249,27 +226,27 @@ export default {
currentPage: 1,
pageSize: 10,
total: 0,
params: {},
params: {}
},
oilCompanyMatch: {},
billData:[],
billData: [],
mappingData: [
{
carTitle: "",
carTitle: '',
carItems: [
{ label: "订单ID", value: "id" },
{ label: "炼厂ID", value: "refineryId" },
{ label: "支付状态", value: "payStatus" },
{ label: "订单状态", value: "orderStatus" },
{ label: "提货单数量", value: "deliveryCount" },
{ label: '订单ID', value: 'id' },
{ label: '炼厂ID', value: 'refineryId' },
{ label: '支付状态', value: 'payStatus' },
{ label: '订单状态', value: 'orderStatus' },
{ label: '提货单数量', value: 'deliveryCount' }
// { label: "ID", value: "createUser" },
// { label: "", value: "createTime" },
// { label: "ID", value: "updateUser" },
// { label: "", value: "updateTime" },
],
},
],
};
]
}
]
}
},
components: {
generalDetails,
@ -278,139 +255,150 @@ export default {
},
mounted() {
this.$nextTick(() => {
this.heightHandle();
});
window.addEventListener(
"resize",
this.$utils.debounce(this.heightHandle, 500)
);
this.heightHandle()
})
window.addEventListener('resize', this.$utils.debounce(this.heightHandle, 500))
},
created() {
this.getByPage();
this.getByPage()
},
methods: {
changeDateTime(val) {
if (val) {
this.parameter.params.startCreateTime = val[0];
this.parameter.params.endCreateTime = val[1];
this.parameter.params.startCreateTime = val[0]
this.parameter.params.endCreateTime = val[1]
}
},
payTagType(val){
switch(val){
case 'PREPAID': return {label:'预支付',type:'info'}
case 'PAYING': return {label:'支付中',type:'warning'}
case 'SUCCESS': return {label:'支付成功',type:'success',effect:'dark'}
case 'FAILURE': return {label:'支付失败',type:'danger',effect:'dark'}
case 'CANCELED': return {label:'支付取消',type:'info'}
case 'REFUNDED': return {label:'退款成功',type:'danger',effect:'dark'}
case 'REFUNDING': return{label:'退款中',type:'warning'}
case 'REFUNDFAIL': return{label:'退款失败',type:'info',effect:'dark'}
payTagType(val) {
switch (val) {
case 'PREPAID':
return { label: '预支付', type: 'info' }
case 'PAYING':
return { label: '支付中', type: 'warning' }
case 'SUCCESS':
return { label: '支付成功', type: 'success', effect: 'dark' }
case 'FAILURE':
return { label: '支付失败', type: 'danger', effect: 'dark' }
case 'CANCELED':
return { label: '支付取消', type: 'info' }
case 'REFUNDED':
return { label: '退款成功', type: 'danger', effect: 'dark' }
case 'REFUNDING':
return { label: '退款中', type: 'warning' }
case 'REFUNDFAIL':
return { label: '退款失败', type: 'info', effect: 'dark' }
}
return {label:val?val:'暂无数据',type:'info',effect:'plain'}
return { label: val ? val : '暂无数据', type: 'info', effect: 'plain' }
},
orderTagType(val){
switch(val){
case 'SUBMITED': return {label:'订单提交 ',type:'info'}
case 'ORDER_LOCKED': return {label:'订单锁定',type:'warning'}
case 'ORDER_SUCCESS': return {label:'下单成功',type:'success',effect:'dark'}
case 'DELIVERING': return {label:'提货中', type: ''}
case 'COMPLETE': return {label:'订单完成',type:'success',effect:'dark'}
case 'CANCELED': return {label:'订单取消',type:'info'}
orderTagType(val) {
switch (val) {
case 'SUBMITED':
return { label: '订单提交 ', type: 'info' }
case 'ORDER_LOCKED':
return { label: '订单锁定', type: 'warning' }
case 'ORDER_SUCCESS':
return { label: '下单成功', type: 'success', effect: 'dark' }
case 'DELIVERING':
return { label: '提货中', type: '' }
case 'COMPLETE':
return { label: '订单完成', type: 'success', effect: 'dark' }
case 'CANCELED':
return { label: '订单取消', type: 'info' }
}
return {label:val?val:'暂无数据',type:'info'}
return { label: val ? val : '暂无数据', type: 'info' }
},
// currentPage change
handleCurrentChange(page) {
this.parameter.currentPage = page;
this.getByPage();
this.parameter.currentPage = page
this.getByPage()
},
// pageSize change
handleSizeChange(size) {
this.parameter.currentPage = 1;
this.parameter.pageSize = size;
this.getByPage();
this.parameter.currentPage = 1
this.parameter.pageSize = size
this.getByPage()
},
//table list
getByPage() {
this.parameter.params.id = '123454321'
order.getlnfoByld({id:this.parameter.params.id}).then((res) => {
order.getlnfoByld({ id: this.parameter.params.id }).then(res => {
this.topData = res.data
// this.tableData = res.data.list;
// this.total = res.data.totalCount;
});
order.getRecordsByActld(this.parameter).then((res) => {
this.tableData = res.data.list;
this.total = res.data.totalCount;
});
})
order.getRecordsByActld(this.parameter).then(res => {
this.tableData = res.data.list
this.total = res.data.totalCount
})
},
//
orderCencle(row){
if(row.orderStatus=='SUBMITED'||row.orderStatus=='ORDER_LOCKED'){
order.orderUpdate({id:row.id,orderStatus:'CANCELED'}).then((res) => {
if(res.code==20000){
orderCencle(row) {
if (row.orderStatus == 'SUBMITED' || row.orderStatus == 'ORDER_LOCKED') {
order.orderUpdate({ id: row.id, orderStatus: 'CANCELED' }).then(res => {
if (res.code == 20000) {
this.getByPage()
}
});
}else{
order.orderRefund({id:row.id}).then((res) => {
if(res.code==20000){
})
} else {
order.orderRefund({ id: row.id }).then(res => {
if (res.code == 20000) {
this.getByPage()
}
});
})
}
},
//
addition() {
this.controlWindows.addInfo.title = "炼厂入驻";
this.controlWindows.add = true;
this.controlWindows.addInfo.title = '炼厂入驻'
this.controlWindows.add = true
},
//
async billOfLading(row){
this.controlWindows.addInfo.title = "";
await order.findDeliveryByOrderId(row.id).then((res) => {
async billOfLading(row) {
this.controlWindows.addInfo.title = ''
await order.findDeliveryByOrderId(row.id).then(res => {
this.billData.list = res.data
});
await order.findByOrderId(row.id).then((res) => {
})
await order.findByOrderId(row.id).then(res => {
this.billData.orderInfo = res.data
});
})
this.controlWindows.addInfo = row
this.controlWindows.bill = true
},
//
detail(row) {
this.oilCompanyMatch = [row];
this.controlWindows.detail = true;
this.oilCompanyMatch = [row]
this.controlWindows.detail = true
},
//
Locked(row) {
if(row.orderStatus=='SUBMITED'){
order.orderLock({id:row.id}).then((res) => {
if(res.code == 20000){
if (row.orderStatus == 'SUBMITED') {
order.orderLock({ id: row.id }).then(res => {
if (res.code == 20000) {
this.getByPage()
}
});
}else{
order.orderSuccess({id:row.id}).then((res) => {
if(res.code == 20000){
})
} else {
order.orderSuccess({ id: row.id }).then(res => {
if (res.code == 20000) {
this.getByPage()
}
});
})
}
},
//
switchTrigger(val, row) {
row.enableMark = row.enableMark;
row.enableMark = row.enableMark
serve
.update({
id: row.id,
enableMark: val,
enableMark: val
})
.then((res) => {
.then(res => {
if (res.code === 20000) {
this.getByPage();
} else this.$message.error(res.msg);
});
this.getByPage()
} else this.$message.error(res.msg)
})
},
//
reset() {
@ -418,24 +406,23 @@ export default {
currentPage: 1,
pageSize: 10,
total: 0,
params: {},
};
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;
let centerHeight = this.obtainElement(".centerStyle").clientHeight;
this.tableHeight =
bodyHeight - frameHeight - operationHeight - paginationHeight - centerHeight - 280;
let bodyHeight = document.body.clientHeight
let frameHeight = this.obtainElement('.frame').clientHeight
let operationHeight = this.obtainElement('.operation').clientHeight
let paginationHeight = this.obtainElement('.el-pagination').clientHeight
let centerHeight = this.obtainElement('.centerStyle').clientHeight
this.tableHeight = bodyHeight - frameHeight - operationHeight - paginationHeight - centerHeight - 280
},
obtainElement(className) {
return document.documentElement.querySelector(className);
},
},
};
return document.documentElement.querySelector(className)
}
}
}
</script>
<style lang="scss" scoped>
@ -493,13 +480,13 @@ export default {
}
}
}
.centerStyle{
.centerStyle {
width: 50%;
.centerStyle-bottom{
.centerStyle-bottom {
display: flex;
div{
width: 30%;
}
div {
width: 30%;
}
}
}
</style>

Loading…
Cancel
Save