feat:二维码核销
This commit is contained in:
1 parent
dbe572a155
commit
28447c4a6c
9 files changed
+521
-220
No files matched your search
@@ -8,15 +8,18 @@
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="饭卡类型" prop="walletTypeId">
|
||||
<select-wallet-type v-model="state.queryForm.walletTypeId" placeholder="饭卡类型" clearable />
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="充值时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">
|
||||
{{ $t('common.resetBtn') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -32,13 +35,13 @@
|
||||
@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="用户" />
|
||||
<el-table-column prop="userAvatar" label="头像" >
|
||||
<el-table-column prop="username" label="用户" />
|
||||
<el-table-column prop="userAvatar" label="头像">
|
||||
<template #default="{ row }">
|
||||
<preview-image :src="row.userAvatar" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" />
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" />
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="饭卡类型">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center justify-center">
|
||||
@@ -59,8 +62,8 @@
|
||||
<div class="color-primary">{{ displayPrice(row.balance) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" width="200" label="创建时间" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150">
|
||||
<el-table-column prop="createTime" width="200" label="充值时间" />
|
||||
<el-table-column v-if="false" label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'"
|
||||
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="饭卡类型" prop="walletTypeId">
|
||||
<select-wallet-type v-model="state.queryForm.walletTypeId" placeholder="饭卡类型" clearable />
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="退款时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">
|
||||
{{ $t('common.resetBtn') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -39,12 +42,31 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" show-overflow-tooltip />
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="饭卡类型">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center justify-center">
|
||||
<div class="color-primary">{{ row.walletTypeName }}</div>
|
||||
<div class="flex items-center just ml5">
|
||||
<dict-tag :options="wallet_type" :value="row.walletTypeUniqueCode" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="退款金额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-success">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" width="200" label="退款时间" />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_walletRecharge_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'"
|
||||
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||
<template #default="{ row }">
|
||||
<el-button icon="InfoFilled" link type="primary" @click="doRefund(row)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="edit-pen" text type="primary" v-auth="'wallet_walletRecharge_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)">编辑</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'"
|
||||
@click="handleDelete([row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -62,11 +84,13 @@ import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { pageTk } from "/@/api/wallet/wallet-transaction";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import * as hardAfterSaleApi from '/@/api/hard/hard-after-sale'
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
// 定义查询字典
|
||||
|
||||
const { wallet_type } = useDict('wallet_type');
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -76,6 +100,8 @@ const showSearch = ref(true)
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: pageTk
|
||||
@@ -100,6 +126,14 @@ const resetQuery = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
const doRefund = async (row: any) => {
|
||||
const { data } = await hardAfterSaleApi.getObj(row.bizId)
|
||||
if (!data) {
|
||||
useMessage().error("查看错误")
|
||||
}
|
||||
push({ path: '/hard/hard-after-sale/order-refund', query: { id: data.orderId, type: "view" } })
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/wallet/walletRecharge/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletRecharge.xlsx')
|
||||
|
||||
@@ -8,15 +8,18 @@
|
||||
<select-user v-model="state.queryForm.userIds" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item class="w100" label="饭卡类型" prop="walletTypeId">
|
||||
<select-wallet-type v-model="state.queryForm.walletTypeId" placeholder="饭卡类型" clearable />
|
||||
<el-col :span="6">
|
||||
<el-form-item class="w100" label="消费时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">{{ $t('common.queryBtn')
|
||||
}}</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
<el-button icon="Search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">
|
||||
{{ $t('common.resetBtn') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@@ -39,12 +42,31 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" width="120" label="手机号" show-overflow-tooltip />
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="饭卡类型">
|
||||
<template #default="{ row }">
|
||||
<div class="flex items-center justify-center">
|
||||
<div class="color-primary">{{ row.walletTypeName }}</div>
|
||||
<div class="flex items-center just ml5">
|
||||
<dict-tag :options="wallet_type" :value="row.walletTypeUniqueCode" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="消费金额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-danger">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" width="200" label="消费时间" />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'wallet_walletRecharge_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'"
|
||||
@click="handleDelete([scope.row.id])">删除</el-button>
|
||||
<template #default="{row}">
|
||||
<el-button icon="InfoFilled" link type="primary" @click="doRefund(row)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="edit-pen" text type="primary" v-auth="'wallet_walletRecharge_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)">编辑</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletRecharge_del'"
|
||||
@click="handleDelete([row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -62,11 +84,14 @@ import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { pageXf } from "/@/api/wallet/wallet-transaction";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
// 定义查询字典
|
||||
|
||||
const { wallet_type } = useDict('wallet_type');
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -105,6 +130,10 @@ const exportExcel = () => {
|
||||
downBlobFile('/wallet/walletRecharge/export', Object.assign(state.queryForm, { ids: selectObjs }), 'walletRecharge.xlsx')
|
||||
}
|
||||
|
||||
const doRefund = (row: any) => {
|
||||
push({ path: '/hard/hard-after-sale/order-refund', query: { id: row.bizId, type: "view" } })
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id);
|
||||
|
||||
Reference in new issue
Block a user