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

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

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

Loading…
Cancel
Save