卡券订单

This commit is contained in:
邱贞招 2025-03-27 17:31:32 +08:00
parent ccd3551f43
commit 308d3989cf
3 changed files with 148 additions and 62 deletions

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1743059841583" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2663" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M937.32864 808.69376c18.08896 0 32.75264-15.18848 32.75264-33.77664v-94.96576c-70.41024-23.01952-121.46432-89.74336-121.46432-168.29184 0-78.56128 51.04896-145.28 121.46432-168.31232V248.39424c0-18.60096-14.66368-33.77664-32.75264-33.77664H86.76864c-18.04032 0-32.75264 15.17824-32.75264 33.77664v94.95296c70.4128 23.03232 121.49248 89.75104 121.49248 168.31232 0 78.55616-51.07968 145.27232-121.49248 168.29184v94.96576c0 18.58304 14.71232 33.77664 32.75264 33.77664h850.56m0 54.00832H86.76864c-47.88992 0-86.7584-39.3472-86.7584-87.78496v-140.42624c67.0848 0 121.48736-54.98624 121.48736-122.83136 0-67.85536-54.40256-122.84928-121.48736-122.84928v-140.416c0-48.50176 38.86848-87.78496 86.7584-87.78496h850.56c47.94112 0 86.76096 39.2832 86.76096 87.78496v140.416c-67.09248 0-121.46688 54.99392-121.46688 122.84928 0 67.84768 54.37952 122.83136 121.46688 122.83136v140.42624c0 48.43776-38.81984 87.78496-86.76096 87.78496z m0 0" fill="#bfbfbf" p-id="2664"></path><path d="M330.00704 503.00416h-34.75456v-219.9424h34.75456v219.9424z m0 289.29024h-34.75456v-185.1776h34.75456v185.1776z m239.05536-229.74208c-6.03648 18.4576-14.13376 33.24928-24.34048 44.2496-14.07744 13.81632-34.17856 26.4192-60.10112 37.91616l20.86144 26.31936c29.63968-14.55872 51.89632-30.79936 66.71872-48.80896 11.59936-14.97856 20.83584-34.86208 27.79136-59.67616h78.56128c-1.42336 30.6432-4.32128 51.25888-8.67584 61.78304-4.1984 9.36192-12.76672 14.0544-25.7408 14.0544-9.02144 0-25.15968-0.4992-48.31488-1.42336l8.70912 31.2832h55.55712c13.95456-0.71424 24.2048-5.06624 30.93504-13.0304 6.72256-8.20224 11.49696-22.336 14.29504-42.46272 2.28864-19.88096 3.89888-42.9312 4.84864-69.14304 13.21216 10.76224 28.48 21.25312 45.85984 31.56224l21.5424-27.00032c-36.3904-17.09056-63.0272-35.84-79.92832-56.16896h68.43392v-30.19264h-168.19456a470.45888 470.45888 0 0 0 15.6672-31.62112h133.43232v-29.45792h-48.6272c9.96608-13.10464 18.64192-28.6592 26.05312-46.6816l-27.45344-9.82784c-6.95808 18.02752-15.744 34.03776-26.39872 48.07424l15.2448 8.44288h-61.49376c5.11488-16.39168 9.39008-34.16576 12.86656-53.36064l-32.64256-4.23424a366.1824 366.1824 0 0 1-13.56032 57.59488h-46.25408l18.09408-8.43776a324.29824 324.29824 0 0 0-23.99744-46.68928l-28.48512 9.46688c9.23392 14.97856 17.408 30.19264 24.31744 45.66016h-50.37056v29.45536h94.85568a262.1312 262.1312 0 0 1-17.74336 31.616h-96.19968v30.19776h72.25856c-22.46912 23.86432-50.42432 42.90816-83.76064 57.19808l18.07104 28.09088a326.64576 326.64576 0 0 0 53.87264-32.99584v18.2528h43.42784v-0.00512z m94.16704-70.54592c8.59904 13.55264 19.67616 26.76992 33.39008 39.68768h-155.69664c13.66528-12.44928 25.95328-25.63328 36.82048-39.68768h85.48608z m0 0" fill="#bfbfbf" p-id="2665"></path></svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -25,14 +25,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="支付渠道" prop="payChannel">
<el-input
v-model="queryParams.payChannel"
placeholder="请输入支付渠道"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="商户" prop="merchantId">
<el-input
v-model="queryParams.merchantId"
@ -57,14 +49,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="skuId" prop="skuId">
<el-input
v-model="queryParams.skuId"
placeholder="请输入skuId"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -103,30 +87,55 @@
<template v-if="column.key === 'orderId'">
{{d.row[column.key]}}
</template>
<template v-else-if="column.key === 'payType'">
<dict-tag :options="dict.type.ss_pay_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'paid'">
<dict-tag :options="dict.type.ss_order_pay_status" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'type'">
<dict-tag :options="dict.type.ss_card_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'totalFee' || column.key === 'payFee' || column.key === 'storedAmount'">
{{d.row[column.key] | dv}}
</template>
<template v-else-if="column.key === 'status'">
<dict-tag :options="dict.type.ss_order_status" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'availableTimeStart'">
<div>
<span>{{ d.row.availableTimeStart }}</span>--<span>{{ d.row.availableTimeEnd}}</span>
</div>
</template>
<template v-else-if="column.key === 'storeName'">
<router-link
:to="`/system/storeDetail/index/${d.row.storeId}`" class="link-type">
<span>{{ d.row[column.key] }}</span>
</router-link>
</template>
<template v-else-if="column.key === 'availableRoomName'">
<span>{{ d.row.availableRoomName.join('') }}</span>
</template>
<template v-else-if="column.key === 'merchantName' || column.key === 'userName'">
<el-link
type="primary"
@click="merchantDetail(d.row)"
v-hasPermi="['system:store:query']">
{{ d.row[column.key] }}
</el-link>
</template>
<template v-else-if="column.key === 'validityUnit'">
<span>{{ d.row.validityValue }}
{{
{'day':'天', 'week':'周', 'month':'月', 'quarter':'季度', 'year':'年'}[d.row.validityUnit]
}}</span>
</template>
<template v-else>
{{d.row[column.key]}}
</template>
</template>
</el-table-column>
</template>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:cardOrder:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:cardOrder:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
@ -261,41 +270,42 @@ const defaultSort = {
export default {
name: "CardOrder",
mixins: [$showColumns],
dicts: ['ss_order_status', 'ss_pay_type','ss_order_type','ss_order_pay_status','ss_card_type','ss_validity_unit'],
data() {
return {
//
columns: [
{key: 'orderId', visible: true, label: '订单id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'orderNo', visible: true, label: '订单号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userId', visible: true, label: '用户ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'phone', visible: true, label: '手机号', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '用户名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'realName', visible: true, label: '真实姓名', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'orderNo', visible: true, label: '订单号', minWidth: 150, sortable: true, overflow: false, align: 'center', width: null},
{key: 'cardName', visible: true, label: '卡券名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'userId', visible: true, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'phone', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '用户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'realName', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payTime', visible: true, label: '支付时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'payType', visible: true, label: '支付方式', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'paid', visible: true, label: '支付状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payId', visible: true, label: '支付单id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'type', visible: true, label: '订单类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'totalFee', visible: true, label: '总金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'payId', visible: true, label: 'id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'type', visible: true, label: '卡券类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'totalFee', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payFee', visible: true, label: '实际支付', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'mark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'mark', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'payChannel', visible: true, label: '支付渠道', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelName', visible: true, label: '渠道名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelCost', visible: true, label: '渠道成本', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'merchantId', visible: true, label: '商户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeId', visible: true, label: '店铺id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeName', visible: true, label: '店铺名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'cardName', visible: true, label: '卡券名称', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'limitNum', visible: true, label: '限制次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storedAmount', visible: true, label: '储值金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'payChannel', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelName', visible: true, label: '渠道', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'channelCost', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'merchantName', visible: true, label: '商户', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'storeId', visible: true, label: 'id', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storeName', visible: true, label: '店铺', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'limitNum', visible: true, label: '使用次数', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'storedAmount', visible: true, label: '充值金额', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'validityValue', visible: true, label: '', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'validityUnit', visible: true, label: '有效期', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableRooms', visible: true, label: '可用房间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableWeek', visible: true, label: '可使用周', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableTimeEnd', visible: true, label: '可用时间结束', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'availableTimeStart', visible: true, label: '可用时间开始', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'skuId', visible: true, label: '第三方skuid', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableRoomName', visible: true, label: '可用房间', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
// {key: 'availableWeek', visible: true, label: '使', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'availableTimeStart', visible: true, label: '可用时间', minWidth: "150", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'availableTimeEnd', visible: true, label: '', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'skuId', visible: true, label: 'skuid', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'hours', visible: true, label: '小时', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
],
//
@ -380,6 +390,20 @@ export default {
this.getList();
},
methods: {
/** 查看商户详情 */
merchantDetail(row) {
if (!row.merchantId) {
this.$modal.msgError("商户ID不能为空");
return;
}
console.log('跳转到商户详情ID:', row.merchantId); //
this.$router.push({
path: `/user/detail/${row.merchantId}`
}).catch(err => {
console.error('路由跳转错误:', err); //
this.$modal.msgError("页面跳转失败");
});
},
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {
@ -515,3 +539,15 @@ export default {
}
};
</script>
<style lang="scss" scoped>
.link-type {
color: #1890ff;
font-size: 14px;
font-weight: 500;
}
.link-type:hover {
text-decoration: underline;
}
</style>

View File

@ -78,9 +78,37 @@
<template v-else-if="column.key === 'getMethod'">
<dict-tag :options="dict.type.ss_card_get_method" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'type'">
<dict-tag :options="dict.type.ss_card_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'cardType'">
<dict-tag :options="dict.type.ss_platform_type" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'status'">
<dict-tag :options="dict.type.ss_card_status" :value="d.row[column.key]"/>
</template>
<template v-else-if="column.key === 'storedAmount'">
<span style="color: green">{{d.row[column.key] | dv}}</span> / <span style="color: red">{{d.row.usedAmount | dv}}</span>
</template>
<template v-else-if="column.key === 'remainingTimes'">
<span style="color: green">{{d.row[column.key] | dv}}</span> / <span style="color: red">{{d.row.usedTimes | dv}}</span>
</template>
<template v-else-if="column.key === 'remainingHours'">
<span style="color: green">{{d.row[column.key] | dv}}</span> / <span style="color: red">{{d.row.usedHours | dv}}</span> 小时
</template>
<template v-else-if="column.key === 'merchantName' || column.key === 'userName'">
<el-link
type="primary"
@click="merchantDetail(d.row)"
v-hasPermi="['system:store:query']">
{{ d.row[column.key] }}
</el-link>
</template>
<template v-else-if="column.key === 'startTime'">
<div>
<span>{{ d.row.startTime }}</span><span>{{ d.row.endTime}}</span>
</div>
</template>
<template v-else>
{{d.row[column.key]}}
</template>
@ -172,19 +200,26 @@ const defaultSort = {
export default {
name: "GetRecords",
mixins: [$showColumns],
dicts: ['ss_card_get_method', 'ss_card_status'],
dicts: ['ss_card_get_method', 'ss_card_status','ss_card_type','ss_platform_type'],
data() {
return {
//
columns: [
{key: 'recordId', visible: true, label: '记录ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '领取人', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'userName', visible: true, label: '领取人', minWidth: "120", sortable: true, overflow: false, align: 'center', width: null},
{key: 'cardName', visible: true, label: '卡券', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'receiveTime', visible: true, label: '领取时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'receiveTime', visible: true, label: '领取时间', minWidth: "150", sortable: false, overflow: false, align: 'center', width: null},
{key: 'getMethod', visible: true, label: '获取方式', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'startTime', visible: true, label: '开始使用时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'endTime', visible: true, label: '结束使用时间', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'type', visible: true, label: '类型', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'startTime', visible: true, label: '使用时间', minWidth: "260", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'endTime', visible: true, label: '使', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'storedAmount', visible: true, label: '剩余/已用金额', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'remainingTimes', visible: true, label: '剩余/已用次数', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
{key: 'remainingHours', visible: true, label: '剩余/已用小时', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'usedAmount', visible: true, label: '使', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'usedTimes', visible: true, label: '使', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
// {key: 'usedHours', visible: true, label: '使', minWidth: "120", sortable: false, overflow: false, align: 'center', width: null},
],
//
orderSorts: ['ascending', 'descending', null],
@ -244,6 +279,20 @@ export default {
this.getList();
},
methods: {
/** 查看商户详情 */
merchantDetail(row) {
if (!row.userId) {
this.$modal.msgError("商户ID不能为空");
return;
}
console.log('跳转到商户详情ID:', row.userId); //
this.$router.push({
path: `/user/detail/${row.userId}`
}).catch(err => {
console.error('路由跳转错误:', err); //
this.$modal.msgError("页面跳转失败");
});
},
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {