|
@@ -6,55 +6,70 @@
|
|
|
:key="item.id"
|
|
|
>
|
|
|
<!-- 固定场 -->
|
|
|
- <template v-if="item.orderType >= GoodsType.noFixed">
|
|
|
+ <template v-if="item.orderType < GoodsType.noFixed">
|
|
|
<view class="flex items-center justify-between">
|
|
|
<view class="flex items-center">
|
|
|
<view class="text-[rgb(0,0,0,0.3)] text-28rpx mr20rpx">场次</view>
|
|
|
- <view>03-07(今天)16:00-17:00|羽毛球</view>
|
|
|
+ <view>{{ item.productName }} </view>
|
|
|
</view>
|
|
|
- <view class="text-#FB5B5B font-semibold">¥25.9</view>
|
|
|
+ <view class="text-#FB5B5B font-semibold"
|
|
|
+ >¥{{ item.originalPrice || 0 }}</view
|
|
|
+ >
|
|
|
</view>
|
|
|
<view class="mt24rpx w152rpx">
|
|
|
- <commonbtn bg-color="rgba(0,0,0,0.1)">
|
|
|
- <text class="text-[rgb(0,0,0,0.3)]">已核销</text>
|
|
|
- </commonbtn>
|
|
|
+ <wd-tag
|
|
|
+ bg-color="rgba(0,0,0,0.1)"
|
|
|
+ custom-class="space"
|
|
|
+ color="rgba(0,0,0,0.3)"
|
|
|
+ >已核销</wd-tag
|
|
|
+ >
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<!-- 无固定场 -->
|
|
|
- <view class="flex items-center justify-between">
|
|
|
+ <view class="flex items-center justify-between" v-else>
|
|
|
<image
|
|
|
:src="item.productImage"
|
|
|
class="w160rpx h-160rpx rounded-32rpx min-w-160rpx mr20rpx"
|
|
|
+ mode="aspectFill"
|
|
|
/>
|
|
|
<view class="flex-1">
|
|
|
<view class="flex items-center justify-between">
|
|
|
- <wd-text text="足球五人制闲时1..." :lines="1"></wd-text>
|
|
|
+ <wd-text :text="item.productName" :lines="1"></wd-text>
|
|
|
<view class="w152rpx">
|
|
|
- <commonbtn bg-color="rgba(0,0,0,0.1)">
|
|
|
- <text class="text-[rgb(0,0,0,0.3)]">已核销</text>
|
|
|
- </commonbtn>
|
|
|
+ <wd-tag
|
|
|
+ custom-class="space"
|
|
|
+ bg-color="rgba(0,0,0,0.1)"
|
|
|
+ color="rgba(0,0,0,0.3)"
|
|
|
+ >已核销</wd-tag
|
|
|
+ >
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="text-32rpx mt20rpx font-semibold text-#FB5B5B"
|
|
|
- >¥25.9</view
|
|
|
+ >¥{{ item.originalPrice || 0 }}</view
|
|
|
>
|
|
|
</view>
|
|
|
</view>
|
|
|
<wd-divider color="#F0F0F0"></wd-divider>
|
|
|
<view class="flex items-center justify-between">
|
|
|
<view class="text-[rgb(0,0,0,0.3)]">核验时间</view>
|
|
|
- <view>2025-05-02 16:14:56</view>
|
|
|
+ <view>{{ item.useTime }}</view>
|
|
|
</view>
|
|
|
<view class="flex items-center justify-between mt20rpx">
|
|
|
<view class="text-[rgb(0,0,0,0.3)]">使用人/券号</view>
|
|
|
- <view>0017 1712 5994</view>
|
|
|
+ <view>{{ item.ticketNo }}</view>
|
|
|
</view>
|
|
|
- <view class="mt24rpx w152rpx">
|
|
|
- <commonbtn bg-color="#FDD143" @click="handleRevoke">
|
|
|
+ <view
|
|
|
+ class="mt24rpx w152rpx"
|
|
|
+ v-if="item.isinStatus && dayjs().diff(dayjs(item.useTime), 'hour') < 1"
|
|
|
+ >
|
|
|
+ <commonbtn bg-color="#FDD143" @click="handleRevoke(item.id)">
|
|
|
<text class="text-#000000">撤销</text>
|
|
|
</commonbtn>
|
|
|
</view>
|
|
|
+ <view class="mt24rpx w152rpx text-[rgb(0,0,0,0.3)]" v-else>
|
|
|
+ 已过时效
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<wd-status-tip image="content" tip="暂无内容" v-else />
|
|
@@ -63,28 +78,47 @@
|
|
|
<script setup lang="ts">
|
|
|
import img1 from "@/subPack/static/hxmx.png";
|
|
|
import { GoodsType } from "@/config";
|
|
|
-const { data } = usePagination(
|
|
|
+import dayjs from "dayjs";
|
|
|
+const { data, refresh } = usePagination(
|
|
|
(pageNo, pageSize) =>
|
|
|
Apis.app.pageAppIsinVerifyRecords({ params: { pageNo, pageSize } }),
|
|
|
{ initialData: [], data: (res) => res.records },
|
|
|
);
|
|
|
+const { send } = useRequest(
|
|
|
+ (appIsinId) => Apis.app.repealVerifyRecord({ params: { appIsinId } }),
|
|
|
+ { immediate: false },
|
|
|
+);
|
|
|
function handleSuccess() {
|
|
|
uni.showToast({
|
|
|
image: img1,
|
|
|
- title: "核销成功",
|
|
|
+ title: "撤销成功",
|
|
|
});
|
|
|
}
|
|
|
-handleSuccess();
|
|
|
-function handleRevoke() {
|
|
|
+
|
|
|
+function handleRevoke(id: string) {
|
|
|
uni.showModal({
|
|
|
title: "确认操作",
|
|
|
content: "确认要撤销吗?",
|
|
|
cancelText: "不撤销",
|
|
|
+ success: async function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ await send(id);
|
|
|
+ refresh();
|
|
|
+ setTimeout(() => {
|
|
|
+ handleSuccess();
|
|
|
+ }, 500);
|
|
|
+ }
|
|
|
+ },
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped></style>
|
|
|
+<style scoped>
|
|
|
+:deep(.space) {
|
|
|
+ padding: 10rpx !important;
|
|
|
+ font-size: 24rpx !important;
|
|
|
+}
|
|
|
+</style>
|
|
|
<route lang="json">
|
|
|
{
|
|
|
"name": "writeOffDetaile",
|