refactor: standardize spacing and update RefundPopup component

- standardize margin spacing across components with explicit pixel values
- replace legacy uni-popup and icons with van-ui equivalents in RefundPopup
- update font weight class to use semantic name in date range selector
This commit is contained in:
DEV_DSW
2026-05-29 11:20:45 +08:00
parent 702a7c1591
commit 78644e3b8a
11 changed files with 32 additions and 58 deletions

View File

@@ -44,10 +44,10 @@
<div v-else class=" card-content flex items-center p-[12px]"> <div v-else class=" card-content flex items-center p-[12px]">
<div class=" left flex-1 pr-20"> <div class=" left flex-1 pr-20">
<div class="text-[12px] text-ink-600 leading-[20px] mb-4"> <div class="text-[12px] text-ink-600 leading-[20px] mb-[4px]">
所在位置{{ roomId }} 所在位置{{ roomId }}
</div> </div>
<div class="text-[12px] text-ink-600 leading-[20px] mb-4"> <div class="text-[12px] text-ink-600 leading-[20px] mb-[4px]">
联系方式: {{ contactPhone }} 联系方式: {{ contactPhone }}
</div> </div>
<div class="text-[12px] text-ink-600 leading-[20px] ellipsis-2"> <div class="text-[12px] text-ink-600 leading-[20px] ellipsis-2">

View File

@@ -25,7 +25,7 @@
</div> </div>
<div v-else class=" left flex-1 p-[12px]"> <div v-else class=" left flex-1 p-[12px]">
<div class="text-[12px] text-ink-600 leading-[20px] mb-4"> <div class="text-[12px] text-ink-600 leading-[20px] mb-[4px]">
联系方式: {{ contactPhone }} 联系方式: {{ contactPhone }}
</div> </div>
<div class="text-[12px] text-ink-600 leading-[20px] ellipsis-2"> <div class="text-[12px] text-ink-600 leading-[20px] ellipsis-2">

View File

@@ -1,35 +1,34 @@
<template> <template>
<uni-popup ref="popupRef" type="bottom" :safe-area="false" @maskClick="handleClose"> <van-popup ref="popupRef" position="bottom" v-model:show="show">
<div class="refund-popup bg-[#f5f7fa] "> <div class="rounded-t-[15px] pb-10 bg-[#f5f7fa] ">
<div class="flex items-center justify-between pt-[12px] pb-[12px] relative"> <div class="flex items-center justify-between pt-[12px] pb-[12px] relative">
<div class="flex-1 text-[16px] text-[#171717] leading-[24px] text-center"> <div class="flex-1 text-[16px] text-[#171717] leading-[24px] text-center">
取消政策 取消政策
</div> </div>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<uni-icons class="close absolute" type="close" size="20" color="#CACFD8" @click="handleClose" /> <van-icon class="top-[14px] right-[12px] absolute" name="cross" size="20" color="#CACFD8" @click="close" />
</div> </div>
<!-- 内容区域 --> <!-- 内容区域 -->
<div class="rounded-[12px] bg-white p-[12px] ml-[12px] mr-[12px] mb-[40px]"> <div class="rounded-[12px] bg-white p-[12px] ml-[12px] mr-[12px] mb-[40px]">
<div class="flex items-center mb-8"> <div class="flex items-center mb-[8px]">
<uni-icons fontFamily="znicons" size="20" color="#333"> <zn-icon name="zn-refund" size="20" color="#333"></zn-icon>
{{ iconsMap["zn-refund"] }} <span class="text-[14px] font-semibold text-[#171717] ml-[8px]">
</uni-icons>
<span class="text-[14px] font-600 text-[#171717] ml-[8px]">
{{ refundTitle }} {{ refundTitle }}
</span> </span>
</div> </div>
<div class="text-[14px] text-ink-600 leading-[16px] mb-4" v-for="(item, index) in commodityPurchaseInstruction" <div class="text-[14px] text-ink-600 leading-[16px] mb-[4px]"
:key="index"> v-for="(item, index) in commodityPurchaseInstruction" :key="index">
{{ item }} {{ item }}
</div> </div>
</div> </div>
</div> </div>
</uni-popup> </van-popup>
</template> </template>
<script setup> <script setup>
import { ref, computed, watch } from "vue"; import { ref, computed, defineExpose } from "vue";
import { iconsMap } from "@/static/fonts/znicons"; import { iconsMap } from "@/static/fonts/znicons";
import ZnIcon from '@/components/ZnIcon/index.vue'
// Props定义 // Props定义
const props = defineProps({ const props = defineProps({
@@ -50,6 +49,7 @@ const emit = defineEmits(["update:modelValue"]);
// 弹窗引用 // 弹窗引用
const popupRef = ref(null); const popupRef = ref(null);
const show = ref(false)
// 获取退款模板 // 获取退款模板
const refundTitle = computed(() => { const refundTitle = computed(() => {
@@ -77,29 +77,12 @@ const commodityPurchaseInstruction = computed(() => {
}); });
// 方法定义 // 方法定义
const show = () => popupRef.value && popupRef.value.open(); const open = () => show.value = true;
const hide = () => popupRef.value && popupRef.value.close(); const close = () => show.value = false;
// 监听modelValue变化 defineExpose({
watch( open,
() => props.modelValue, close,
(newVal) => { })
if (newVal) {
show();
} else {
hide();
}
},
{ immediate: true },
);
const handleClose = () => {
emit("update:modelValue", false);
emit("close");
};
</script> </script>
<style lang="scss" scoped>
@import "./styles/index.scss";
</style>

View File

@@ -1,9 +0,0 @@
.refund-popup {
border-radius: 15px 15px 0 0;
padding-bottom: 40px;
}
.close {
top: 14px;
right: 12px;
}

View File

@@ -10,7 +10,7 @@
<div class="date-item" :class="{ selected: isSameDate(selectedDate, item.date) }" <div class="date-item" :class="{ selected: isSameDate(selectedDate, item.date) }"
@click="onDateClick(item)"> @click="onDateClick(item)">
<div class="label text-[12px]">{{ item.weekDesc }}</div> <div class="label text-[12px]">{{ item.weekDesc }}</div>
<div class="md text-[16px] font-600"> <div class="md text-[16px] font-semibold">
{{ formatMD(item.date) }} {{ formatMD(item.date) }}
</div> </div>
<div class="status text-[12px]">{{ item.canOrder }}</div> <div class="status text-[12px]">{{ item.canOrder }}</div>

View File

@@ -23,7 +23,7 @@
</div> </div>
<!-- 权益部分 --> <!-- 权益部分 -->
<div class="flex items-center mb-8"> <div class="flex items-center mb-[8px]">
<span <span
class="bg-[#f7f7f7] rounded-[4px] text-[11px] text-ink-600 mr-[4px] pt-[4px] pb-[4px] pl-[6px] pr-[6px]" class="bg-[#f7f7f7] rounded-[4px] text-[11px] text-ink-600 mr-[4px] pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
v-for="(item, index) in orderData.commodityFacilityList" :key="index"> v-for="(item, index) in orderData.commodityFacilityList" :key="index">

View File

@@ -4,7 +4,7 @@
<div class="w-full"></div> <div class="w-full"></div>
<div class="flex flex-col px-[16px] pt-16 pb-[12px] "> <div class="flex flex-col px-[16px] pt-16 pb-[12px] ">
<div v-if="tag" class="long-answer-tag">{{ tag }}</div> <div v-if="tag" class="long-answer-tag">{{ tag }}</div>
<div v-if="title" class="flex flex-row flex-items-start flex-justify-start mb-4"> <div v-if="title" class="flex flex-row flex-items-start flex-justify-start mb-[4px]">
<uni-icons class="icon-active" type="fire-filled" size="18" color="opacity" /> <uni-icons class="icon-active" type="fire-filled" size="18" color="opacity" />
<span class="text-[16px] font-medium span-color-900 ml-6"> {{ title }}</span> <span class="text-[16px] font-medium span-color-900 ml-6"> {{ title }}</span>
</div> </div>

View File

@@ -21,7 +21,7 @@
</div> </div>
<div v-if="orderType != 0" class=" bg-white p-[12px] rounded-[12px] mb-[12px]"> <div v-if="orderType != 0" class=" bg-white p-[12px] rounded-[12px] mb-[12px]">
<div class="text-[16px] font-medium text-black leading-[24px] truncate mb-8"> <div class="text-[16px] font-medium text-black leading-[24px] truncate mb-[8px]">
{{ orderData.commodityName }} {{ orderData.commodityName }}
</div> </div>

View File

@@ -1,10 +1,10 @@
<template> <template>
<div class="bg-white rounded-[10px] p-[12px]"> <div class="bg-white rounded-[10px] p-[12px]">
<div class="flex mb-8 text-[12px]"> <div class="flex mb-[8px] text-[12px]">
<span class="w-60 text-ink-400">订单编号</span> <span class="w-60 text-ink-400">订单编号</span>
<span class="text-ink-600">{{ orderData.orderId }}</span> <span class="text-ink-600">{{ orderData.orderId }}</span>
</div> </div>
<div class="flex mb-8 text-[12px]"> <div class="flex mb-[8px] text-[12px]">
<span class="w-60 text-ink-400">下单时间</span> <span class="w-60 text-ink-400">下单时间</span>
<span class="text-ink-600">{{ orderData.createTime }}</span> <span class="text-ink-600">{{ orderData.createTime }}</span>
</div> </div>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="bg-white rounded-[10px] p-[12px] mb-[12px]" v-if="hasConsumerData"> <div class="bg-white rounded-[10px] p-[12px] mb-[12px]" v-if="hasConsumerData">
<div v-for="(item, index) in consumerList" :key="index"> <div v-for="(item, index) in consumerList" :key="index">
<div class="flex mb-8 text-[12px]"> <div class="flex mb-[8px] text-[12px]">
<span class="w-60 text-ink-400">住客姓名</span> <span class="w-60 text-ink-400">住客姓名</span>
<span class="text-ink-600">{{ item.visitorName }}</span> <span class="text-ink-600">{{ item.visitorName }}</span>
</div> </div>

View File

@@ -5,7 +5,7 @@
<div class="text-[16px] leading-[24px] text-[#171717] mb-[4px]"> <div class="text-[16px] leading-[24px] text-[#171717] mb-[4px]">
{{ item.commodityName }} {{ item.commodityName }}
</div> </div>
<div v-if="item.commodityFacility" class="text-[12px] leading-[16px] text-ink-400 mb-4 truncate"> <div v-if="item.commodityFacility" class="text-[12px] leading-[16px] text-ink-400 mb-[4px] truncate">
{{ item.commodityFacility.join(" ") }} {{ item.commodityFacility.join(" ") }}
</div> </div>
<div class="text-[12px] leading-[18px] text-[#43669A]"> <div class="text-[12px] leading-[18px] text-[#43669A]">