11
This commit is contained in:
1 parent
9f8d7a648a
commit
283a87dc51
3 files changed
+36
-41
No files matched your search
+6
-2
@@ -261,9 +261,13 @@ export function downBlobFile(url: any, query: any, fileName: string) {
|
|||||||
method: "get",
|
method: "get",
|
||||||
responseType: "blob",
|
responseType: "blob",
|
||||||
params: query,
|
params: query,
|
||||||
}).then((response) => {
|
|
||||||
handleBlobFile(response, fileName)
|
|
||||||
})
|
})
|
||||||
|
.then((response) => {
|
||||||
|
handleBlobFile(response, fileName)
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
useMessage().error(error.msg || "下载失败")
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function postDownBlobFile(url: any, data: any, fileName: string) {
|
export function postDownBlobFile(url: any, data: any, fileName: string) {
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="120">
|
<el-table-column label="操作" align="center" width="250">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tooltip class="box-item" effect="dark" content="只有合作商家能结账" placement="top">
|
<el-tooltip class="box-item" effect="dark" content="只有合作商家能结账" placement="top">
|
||||||
<el-button icon="Tickets" text :disabled="row.merchantType != 2" type="primary"
|
<el-button icon="Tickets" text :disabled="row.merchantType != 2" type="primary"
|
||||||
@@ -95,6 +95,9 @@
|
|||||||
商户结账
|
商户结账
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
<el-button icon="Tickets" type="primary" text @click="exportMchExcel(row)">
|
||||||
|
导出商户流水
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -138,6 +141,10 @@ const doCheckout = (row: any) => {
|
|||||||
push({ path: "/mch/mch-checkout/index", query: { mchId: row.merchantId } })
|
push({ path: "/mch/mch-checkout/index", query: { mchId: row.merchantId } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const exportMchExcel = (row: any) => {
|
||||||
|
postDownBlobFile("/hard/hard-total/export-mch-cs", { ...state.queryForm, merchantId: row.merchantId }, "商户流水.xlsx")
|
||||||
|
}
|
||||||
|
|
||||||
const getSummaries = (param: any) => {
|
const getSummaries = (param: any) => {
|
||||||
const { columns, data } = param
|
const { columns, data } = param
|
||||||
const totalColumns = ["totalPayPrice", "totalPayCount", "totalRefundPrice", "totalRefundCount", "totalProfitPrice", "totalProfitCount"]
|
const totalColumns = ["totalPayPrice", "totalPayCount", "totalRefundPrice", "totalRefundCount", "totalProfitPrice", "totalProfitCount"]
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-padding">
|
<div class="layout-padding">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<el-form v-if="showSearch" ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
<el-form v-if="showSearch" ref="queryRef" :inline="true" :model="state.queryForm"
|
||||||
|
@keyup.enter="getDataList">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item style="width: 300px" label="商户" prop="merchantId">
|
<el-form-item style="width: 300px" label="商户" prop="merchantId">
|
||||||
<select-mch v-model="state.queryForm.merchantId" :apiParams="{ types: '2' }" />
|
<select-mch v-model="state.queryForm.merchantId" :apiParams="{ types: '2' }" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 400px" label="结账时间" prop="checkoutTimeList">
|
<el-form-item style="width: 400px" label="结账时间" prop="checkoutTimeList">
|
||||||
<el-date-picker v-model="state.queryForm.checkoutTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
<el-date-picker v-model="state.queryForm.checkoutTimeList" value-format="YYYY-MM-DD"
|
||||||
|
type="daterange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width: 400px" label="创建时间" prop="createTimeList">
|
<el-form-item style="width: 400px" label="创建时间" prop="createTimeList">
|
||||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD"
|
||||||
|
type="daterange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button icon="Search" type="primary" @click="getDataList">
|
<el-button icon="Search" type="primary" @click="getDataList">
|
||||||
@@ -22,38 +25,22 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb8" style="width: 100%">
|
<div class="mb8" style="width: 100%">
|
||||||
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()" v-auth="'wallet_mchCheckout_add'">
|
<el-button icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||||
|
v-auth="'wallet_mchCheckout_add'">
|
||||||
新 增
|
新 增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'wallet_mchCheckout_del'"
|
||||||
plain
|
@click="handleDelete(selectObjs)">
|
||||||
:disabled="multiple"
|
|
||||||
icon="Delete"
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_mchCheckout_del'"
|
|
||||||
@click="handleDelete(selectObjs)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<right-toolbar
|
<!-- :export="'wallet_mchCheckout_export'" -->
|
||||||
v-model:showSearch="showSearch"
|
<right-toolbar v-model:showSearch="showSearch" @exportExcel="exportExcel" class="ml10 mr20"
|
||||||
:export="'wallet_mchCheckout_export'"
|
style="float: right" @queryTable="getDataList"></right-toolbar>
|
||||||
@exportExcel="exportExcel"
|
|
||||||
class="ml10 mr20"
|
|
||||||
style="float: right"
|
|
||||||
@queryTable="getDataList"
|
|
||||||
></right-toolbar>
|
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||||
:data="state.dataList"
|
:header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle"
|
||||||
v-loading="state.loading"
|
@sort-change="sortChangeHandle">
|
||||||
border
|
|
||||||
:cell-style="tableStyle.cellStyle"
|
|
||||||
:header-cell-style="tableStyle.headerCellStyle"
|
|
||||||
@selection-change="selectionChangHandle"
|
|
||||||
@sort-change="sortChangeHandle"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="40" />
|
<el-table-column type="index" label="#" width="40" />
|
||||||
<el-table-column prop="username" label="结账人" />
|
<el-table-column prop="username" label="结账人" />
|
||||||
@@ -73,22 +60,19 @@
|
|||||||
<el-table-column prop="remark" label="结账备注" width="250" />
|
<el-table-column prop="remark" label="结账备注" width="250" />
|
||||||
<el-table-column label="操作" width="150">
|
<el-table-column label="操作" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_mchCheckout_edit'"
|
||||||
icon="edit-pen"
|
@click="formDialogRef.openDialog(scope.row.id)">
|
||||||
text
|
|
||||||
type="primary"
|
|
||||||
v-auth="'wallet_mchCheckout_edit'"
|
|
||||||
@click="formDialogRef.openDialog(scope.row.id)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="delete" text type="primary" v-auth="'wallet_mchCheckout_del'" @click="handleDelete([scope.row.id])">
|
<el-button icon="delete" text type="primary" v-auth="'wallet_mchCheckout_del'"
|
||||||
|
@click="handleDelete([scope.row.id])">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||||
|
v-bind="state.pagination" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 编辑、新增 -->
|
<!-- 编辑、新增 -->
|
||||||
|
|||||||
Reference in new issue
Block a user