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",
|
||||
responseType: "blob",
|
||||
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) {
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120">
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip class="box-item" effect="dark" content="只有合作商家能结账" placement="top">
|
||||
<el-button icon="Tickets" text :disabled="row.merchantType != 2" type="primary"
|
||||
@@ -95,6 +95,9 @@
|
||||
商户结账
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-button icon="Tickets" type="primary" text @click="exportMchExcel(row)">
|
||||
导出商户流水
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -138,6 +141,10 @@ const doCheckout = (row: any) => {
|
||||
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 { columns, data } = param
|
||||
const totalColumns = ["totalPayPrice", "totalPayCount", "totalRefundPrice", "totalRefundCount", "totalProfitPrice", "totalProfitCount"]
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<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-form-item style="width: 300px" label="商户" prop="merchantId">
|
||||
<select-mch v-model="state.queryForm.merchantId" :apiParams="{ types: '2' }" />
|
||||
</el-form-item>
|
||||
<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 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-button icon="Search" type="primary" @click="getDataList">
|
||||
@@ -22,38 +25,22 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<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
|
||||
plain
|
||||
:disabled="multiple"
|
||||
icon="Delete"
|
||||
type="primary"
|
||||
v-auth="'wallet_mchCheckout_del'"
|
||||
@click="handleDelete(selectObjs)"
|
||||
>
|
||||
<el-button plain :disabled="multiple" icon="Delete" type="primary" v-auth="'wallet_mchCheckout_del'"
|
||||
@click="handleDelete(selectObjs)">
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_mchCheckout_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
<!-- :export="'wallet_mchCheckout_export'" -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @exportExcel="exportExcel" class="ml10 mr20"
|
||||
style="float: right" @queryTable="getDataList"></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" 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="index" label="#" width="40" />
|
||||
<el-table-column prop="username" label="结账人" />
|
||||
@@ -73,22 +60,19 @@
|
||||
<el-table-column prop="remark" label="结账备注" width="250" />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_mchCheckout_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)"
|
||||
>
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_mchCheckout_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">
|
||||
编辑
|
||||
</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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</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>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
|
||||
Reference in new issue
Block a user