|
|
@@ -88,7 +88,6 @@
|
|
|
</el-input>
|
|
|
|
|
|
|
|
|
-
|
|
|
<el-button class="ml10" plain size="default" type="success" @click="loadData(true)">
|
|
|
<SvgIcon name="ele-Search"/>
|
|
|
查询
|
|
|
@@ -112,6 +111,7 @@
|
|
|
<el-table-column
|
|
|
v-for="field in state.tableData.columns"
|
|
|
:key="field.prop"
|
|
|
+ :type="field.type"
|
|
|
:label="field.label"
|
|
|
:column-key="field.prop"
|
|
|
:width="field.width"
|
|
|
@@ -122,7 +122,49 @@
|
|
|
>
|
|
|
<template #default="{row}">
|
|
|
<template v-if="field.prop==='expand'">
|
|
|
- <p style="padding-left: 2em;" v-html="row[field.prop]"></p>
|
|
|
+ <el-row class="pd10">
|
|
|
+ <el-col :span="12">
|
|
|
+ <h6>关联订单明细</h6>
|
|
|
+ <el-table :data="row.orderDetails" width="400" border>
|
|
|
+ <el-table-column label="充电订单" prop="startChargeSeq"/>
|
|
|
+ <el-table-column label="总金额(元)" prop="totalMoney">
|
|
|
+ <template #default="{row}">{{u.fmt.fmtMoney(row.totalMoney)}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="总电量(Kwh)" prop="totalPower"/>
|
|
|
+ <el-table-column label="电费" prop="elecMoney">
|
|
|
+ <template #default="{row}">{{u.fmt.fmtMoney(row.elecMoney)}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="服务费" prop="serviceMoney">
|
|
|
+ <template #default="{row}">{{u.fmt.fmtMoney(row.serviceMoney)}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="服务费优惠" prop="serviceMoneyDiscount">
|
|
|
+ <template #default="{row}">{{u.fmt.fmtMoney(row.serviceMoneyDiscount)}}</template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='status'">
|
|
|
+ <ext-d-label type="Invoice.status" :model-value="row[field.prop]"></ext-d-label>
|
|
|
+ <!-- <p style="padding-left: 2em;" v-html="row[field.prop]"></p>-->
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='invoiceType'">
|
|
|
+ <ext-d-label type="Invoice.type" :model-value="row[field.prop]"></ext-d-label>
|
|
|
+ <!-- <p style="padding-left: 2em;" v-html="row[field.prop]"></p>-->
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='totalMoney'">
|
|
|
+ {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='elecMoney'">
|
|
|
+ {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='serviceMoney'">
|
|
|
+ {{ u.fmt.fmtMoney(row[field.prop]) }}
|
|
|
+ </template>
|
|
|
+ <template v-else-if="field.prop==='action'">
|
|
|
+ <el-button v-if="row.status===0" v-auth="'invoice.modify'" size="small" plain type="warning" @click="onRowClick('edit',row)">开票</el-button>
|
|
|
+ <el-button v-if="row.status===1" v-auth="'invoice.modify'" size="small" plain type="warning" @click="onRowClick('edit',row)">查看</el-button>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<div>{{ row[field.prop] }}</div>
|
|
|
@@ -142,12 +184,14 @@
|
|
|
import {defineAsyncComponent, reactive, onMounted, onBeforeMount, ref, getCurrentInstance, nextTick, onBeforeUnmount} from 'vue';
|
|
|
import {$body, $get} from "/@/utils/request";
|
|
|
import {Msg} from "/@/utils/message";
|
|
|
+import u from "/@/utils/u"
|
|
|
|
|
|
|
|
|
import ExtPage from '/@/components/form/ExtPage.vue'
|
|
|
|
|
|
import mittBus from '/@/utils/mitt';
|
|
|
import ExtDSelect from "/@/components/form/ExtDSelect.vue";
|
|
|
+import ExtDLabel from "/@/components/form/ExtDLabel.vue";
|
|
|
|
|
|
const InvoiceDialog = defineAsyncComponent(() => import("/@/views/admin/invoice/dialog.vue"));
|
|
|
|
|
|
@@ -168,24 +212,33 @@ const state = reactive({
|
|
|
data: [] as Array<any>,
|
|
|
loading: false,
|
|
|
columns: [
|
|
|
+ {type: 'expand', prop: 'expand', width: 30, fixed: 'left'},
|
|
|
+ {label: '申请号', prop: 'applyId', align: 'center', fixed: 'left', width: 250},
|
|
|
+ {label: '发票状态', prop: 'status', align: 'center', fixed: 'left', width: 130},
|
|
|
+ {label: '发票金额(单位:分)', prop: 'invoiceAmount', resizable: true, width: 130},
|
|
|
{label: '累积总金额(元)', prop: 'totalMoney', resizable: true, width: 130},
|
|
|
{label: '累积电费(元)', prop: 'elecMoney', resizable: true, width: 130},
|
|
|
{label: '累积服务费(元)', prop: 'serviceMoney', resizable: true, width: 130},
|
|
|
- {label: '接收发票邮箱', prop: 'email', resizable: true},
|
|
|
- {label: '电话', prop: 'phone', resizable: true},
|
|
|
- {label: '发票类型', prop: 'invoiceType', resizable: true},
|
|
|
- {label: '发票抬头名称', prop: 'invoiceTitle', resizable: true},
|
|
|
- {label: '公司税号', prop: 'taxId', resizable: true},
|
|
|
- {label: '公司地址', prop: 'address', resizable: true},
|
|
|
- {label: '开户银行', prop: 'bankName', resizable: true},
|
|
|
- {label: '银行账户', prop: 'bankAccount', resizable: true},
|
|
|
- {label: '发票金额(单位:分)', prop: 'invoiceAmount', resizable: true, width: 130},
|
|
|
- {label: '税额详情信息', prop: 'taxInfo', resizable: true, width: 150},
|
|
|
- {label: '开票人', prop: 'biller', resizable: true},
|
|
|
- {label: '发票状态', prop: 'status', sortable: 'custom', align: 'center'},
|
|
|
+ {label: '开票人', prop: 'biller', resizable: true, width: 130},
|
|
|
+ {label: '公司税号', prop: 'taxId', resizable: true, width: 130},
|
|
|
+ {label: '接收发票邮箱', prop: 'email', resizable: true, width: 130},
|
|
|
+ {label: '电话', prop: 'phone', resizable: true, width: 130},
|
|
|
+
|
|
|
+ {label: '发票类型', prop: 'invoiceType', resizable: true, width: 130},
|
|
|
+ {label: '发票抬头名称', prop: 'invoiceTitle', resizable: true, width: 130},
|
|
|
+ /*
|
|
|
+
|
|
|
+ {label: '公司地址', prop: 'address', resizable: true, width: 130},
|
|
|
+ {label: '开户银行', prop: 'bankName', resizable: true, width: 130},
|
|
|
+ {label: '银行账户', prop: 'bankAccount', resizable: true},
|
|
|
+
|
|
|
+ {label: '税额详情信息', prop: 'taxInfo', resizable: true, width: 150},
|
|
|
+
|
|
|
+ */
|
|
|
+
|
|
|
{label: '备注', prop: 'remark', resizable: true},
|
|
|
- {label: '创建时间', prop: 'createTime', sortable: 'custom', resizable: true, width: 150},
|
|
|
- {label: '更新时间', prop: 'updateTime', sortable: 'custom', resizable: true, width: 150},
|
|
|
+ {label: '创建时间', prop: 'createTime', sortable: 'custom', resizable: true, width: 170},
|
|
|
+ {label: '更新时间', prop: 'updateTime', sortable: 'custom', resizable: true, width: 170},
|
|
|
{
|
|
|
label: '操作', prop: 'action', width: 180, align: 'center', fixed: 'right',
|
|
|
}
|
|
|
@@ -212,7 +265,7 @@ onMounted(() => {
|
|
|
nextTick(() => {
|
|
|
let bodyHeight = document.body.clientHeight;
|
|
|
let queryHeight = queryRef.value.$el.clientHeight;
|
|
|
- state.tableData.height = bodyHeight - queryHeight - 220
|
|
|
+ state.tableData.height = bodyHeight - queryHeight - 320
|
|
|
})
|
|
|
|
|
|
mittBus.on("invoice.refresh", () => {
|