refactor: remove margin utils, use inline pixel spacing
Delete the src/static/scss/margin.scss utility file, update all component templates to replace pre-defined margin classes with inline arbitrary pixel values (e.g. mb-[4px] instead of mb-4), and clean up long template lines for better readability.
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-[12px] p-[12px] mb-12">
|
||||
<view class="bg-white rounded-[12px] p-[12px] mb-[12px]">
|
||||
<view class="flex flex-items-center flex-justify-between">
|
||||
<view class="flex flex-items-center">
|
||||
<text class="font-size-16 text-[#171717] leading-[24px] font-500">
|
||||
订单金额
|
||||
</text>
|
||||
<text class="amt font-size-18 font-bold text-[#ff3d60] ml-4">
|
||||
<text class="amt font-size-18 font-bold text-[#ff3d60] ml-[4px]">
|
||||
{{ orderData.payAmt }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="orderData.orderStatus === '0'" class="font-size-11 text-[#99a0ae] mt-4">
|
||||
<view v-if="orderData.orderStatus === '0'" class="font-size-11 text-[#99a0ae] mt-[4px]">
|
||||
超时后,订单将自动取消
|
||||
</view>
|
||||
<view v-if="['1', '2'].includes(orderData.orderStatus)"
|
||||
class="border-box border-top flex flex-items-center flex-justify-between font-size-12 pt-[12px] mt-12">
|
||||
class="border-box border-top flex flex-items-center flex-justify-between font-size-12 pt-[12px] mt-[12px]">
|
||||
<view class="text-[#525866]">取消政策及说明</view>
|
||||
<view class="flex flex-items-center" @click="emit('click')">
|
||||
<text class="theme-color-500 mr-4">查看详情</text>
|
||||
<text class="theme-color-500 mr-[4px]">查看详情</text>
|
||||
<uni-icons type="right" size="12" color="#99A0AE" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="footer bg-white flex flex-items-center flex-justify-between p-[12px]">
|
||||
<button v-if="['1', '2'].includes(statusCode)"
|
||||
class="left border-none bg-white rounded-[10px] flex flex-items-center flex-justify-center font-size-14 font-500 text-[#525866] mr-12"
|
||||
class="left border-none bg-white rounded-[10px] flex flex-items-center flex-justify-center font-size-14 font-500 text-[#525866] mr-[12px]"
|
||||
@click="emit('refund', orderData)">
|
||||
申请退款
|
||||
</button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view v-if="orderType == 0" class="border-box bg-white p-[12px] rounded-[12px] mb-12">
|
||||
<view v-if="orderType == 0" class="border-box bg-white p-[12px] rounded-[12px] mb-[12px]">
|
||||
<!-- 酒店类型入住离店日期部分 -->
|
||||
<DateRangeSection v-if="orderData.orderType == 0" :selectedDate="selectedDate" />
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
|
||||
<!-- 权益部分 -->
|
||||
<view class="border-box flex flex-items-center pt-[12px]">
|
||||
<text class="bg-[#f7f7f7] rounded-[4px] font-size-11 text-[#525866] mr-4 pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
|
||||
<text class="bg-[#f7f7f7] rounded-[4px] font-size-11 text-[#525866] mr-[4px] pt-[4px] pb-[4px] pl-[6px] pr-[6px]"
|
||||
v-for="(item, index) in commodityFacilityList" :key="index">
|
||||
{{ item }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="orderType != 0" class="border-box bg-white p-[12px] rounded-[12px] mb-12">
|
||||
<view class="font-size-16 font-500 text-[#000000] leading-[24px] ellipsis-1 mb-8">
|
||||
<view v-if="orderType != 0" class="border-box bg-white p-[12px] rounded-[12px] mb-[12px]">
|
||||
<view class="font-size-16 font-500 text-[#000000] leading-[24px] ellipsis-1 mb-[8px]">
|
||||
{{ orderData.commodityName }}
|
||||
</view>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</view>
|
||||
|
||||
<view v-if="orderData.orderStatus === '0'"
|
||||
class="border-box border-top pt-[12px] font-size-14 font-500 text-[#171717] mt-12">凭[电子凭证]直接验证使用</view>
|
||||
class="border-box border-top pt-[12px] font-size-14 font-500 text-[#171717] mt-[12px]">凭[电子凭证]直接验证使用</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="notice-info mb-12">
|
||||
<view class="notice-info mb-[12px]">
|
||||
<view class="notice-title"> 购买须知 </view>
|
||||
<GoodDetail :goodsData="orderData" :showTitle="false" />
|
||||
</view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="info-row flex items-center mt-8">
|
||||
<view class="info-row flex items-center mt-[8px]">
|
||||
<text class="label font-size-12 text-[#99a0ae]">{{ label }}:</text>
|
||||
<text class="value flex-full font-size-12 text-[#99a0ae]">{{ value }}</text>
|
||||
</view>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="card-content pt-[12px]">
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="left flex-full font-size-14 leading-[20px] text-[#171717] mr-12">
|
||||
<view class="left flex-full font-size-14 leading-[20px] text-[#171717] mr-[12px]">
|
||||
{{ orderData.commodityName }}
|
||||
</view>
|
||||
<view :class="[
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="order-card bg-white p-[12px] rounded-[12px] m-12" @click.stop="handleCardClick">
|
||||
<view class="order-card bg-white p-[12px] rounded-[12px] m-[12px]" @click.stop="handleCardClick">
|
||||
<!-- 卡片头部 -->
|
||||
<view class="card-header flex items-center">
|
||||
<view class="status-info flex items-center flex-full">
|
||||
<image class="status-icon mr-4" :src="getStatusIcon()" />
|
||||
<image class="status-icon mr-[4px]" :src="getStatusIcon()" />
|
||||
<view class="order-title font-size-14 leading-[20px] text-[#525866]">
|
||||
{{ getOrderTypeName() }}
|
||||
</view>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-[10px] p-[12px]">
|
||||
<view class="flex mb-8 font-size-12">
|
||||
<view class="flex mb-[8px] font-size-12">
|
||||
<text class="w-60 text-[#99a0ae]">订单编号</text>
|
||||
<text class="text-[#525866]">{{ orderData.orderId }}</text>
|
||||
</view>
|
||||
<view class="flex mb-8 font-size-12">
|
||||
<view class="flex mb-[8px] font-size-12">
|
||||
<text class="w-60 text-[#99a0ae]">下单时间</text>
|
||||
<text class="text-[#525866]">{{ orderData.createTime }}</text>
|
||||
</view>
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
<view class="border-box flex flex-items-center justify-between pt-[12px] pb-[12px] relative">
|
||||
<view class="flex flex-col flex-items-center flex-full ">
|
||||
<view class="flex-full font-size-16 text-[#0B5C2D] text-center">核销凭证</view>
|
||||
<view class="flex-full font-size-12 text-[#02C34E] text-center mt-4">请向工作人员出示此码</view>
|
||||
<view class="flex-full font-size-12 text-[#02C34E] text-center mt-[4px]">请向工作人员出示此码</view>
|
||||
</view>
|
||||
<!-- 关闭按钮 -->
|
||||
<uni-icons class="close absolute" type="close" size="20" color="#CACFD8" @click="handleClose" />
|
||||
</view>
|
||||
|
||||
<view class="bg-white rounded-[12px] flex flex-col flex-items-center flex-justify-center p-[12px] mb-12 mx-12">
|
||||
<view
|
||||
class="bg-white rounded-[12px] flex flex-col flex-items-center flex-justify-center p-[12px] mb-[12px] mx-[12px]">
|
||||
|
||||
<view class="flex w-full flex-row flex-items-center flex-justify-between py-[4px]">
|
||||
<view>
|
||||
@@ -20,7 +21,8 @@
|
||||
</view>
|
||||
|
||||
<view v-if="selectedVoucher" class="flex flex-row">
|
||||
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-4">总计{{ selectedVoucher.count
|
||||
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-[4px]">总计{{
|
||||
selectedVoucher.count
|
||||
}}{{
|
||||
selectedVoucher.unit }}
|
||||
</view>
|
||||
@@ -30,7 +32,7 @@
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="flex flex-col w-full flex-items-center flex-justify-center rounded-[8px] border pt-[16px] pb-[32px] mt-12">
|
||||
class="flex flex-col w-full flex-items-center flex-justify-center rounded-[8px] border pt-[16px] pb-[32px] mt-[12px]">
|
||||
<view class="flex flex-row flex-justify-between w-full px-[12px]">
|
||||
<view class="bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">凭证{{
|
||||
selectedVoucherList.length > 1 ? currentVoucherIndex + 1 : '' }}</view>
|
||||
@@ -40,20 +42,20 @@
|
||||
selectedVoucher.writeOffCount }}份</view>
|
||||
</view>
|
||||
|
||||
<view class="flex flex-items-center flex-justify-center mt-20 p-[20px] rounded-[12px] border borderColor"
|
||||
<view class="flex flex-items-center flex-justify-center mt-[20px] p-[20px] rounded-[12px] border borderColor"
|
||||
:style="{ borderColor: selectedVoucher?.color }">
|
||||
<Qrcode v-if="showQrcode" :size="props.size" :unit="props.unit" :val="qrcodeVal" :loadMake="true"
|
||||
:onval="true" />
|
||||
</view>
|
||||
|
||||
<view v-if="false"
|
||||
class="mt-20 bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">
|
||||
class="mt-[20px] bg-[#F0F8F3] text-[#0CCD58] font-size-14 px-[12px] leading-[24px] rounded-[12px]">
|
||||
{{ selectedVoucher.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="selectedVoucherList.length > 1"
|
||||
class="flex flex-row w-full flex-items-center flex-justify-between mt-16 mb-24">
|
||||
class="flex flex-row w-full flex-items-center flex-justify-between mt-[16px] mb-[24px]">
|
||||
<view class="actions-btn" @click.stop="upAction">
|
||||
<uni-icons type="left" size="16" color="#171717" />
|
||||
</view>
|
||||
@@ -71,7 +73,7 @@
|
||||
<uni-icons type="right" size="16" color="#171717" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="mb-24"></view>
|
||||
<view v-else class="mb-[24px]"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-[10px] p-[12px] mb-12" v-if="hasConsumerData">
|
||||
<view class="bg-white rounded-[10px] p-[12px] mb-[12px]" v-if="hasConsumerData">
|
||||
<view v-for="(item, index) in consumerList" :key="index">
|
||||
<view class="flex mb-8 font-size-12">
|
||||
<view class="flex mb-[8px] font-size-12">
|
||||
<text class="w-60 text-[#99a0ae]">住客姓名</text>
|
||||
<text class="text-[#525866]">{{ item.visitorName }}</text>
|
||||
</view>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="bg-white rounded-[12px] px-[12px] pt-[12px] mb-12">
|
||||
<view class="bg-white rounded-[12px] px-[12px] pt-[12px] mb-[12px]">
|
||||
<text class="font-size-16 text-[#171717] leading-[24px] font-500">
|
||||
核销凭证列表
|
||||
</text>
|
||||
@@ -9,8 +9,8 @@
|
||||
v-for="(item, index) in props.orderData.commodityPackageConfig" :key="item.name">
|
||||
<view class="flex flex-col">
|
||||
<text class="text-[#0B5C2D] font-size-16">{{ item.name }}</text>
|
||||
<view class="flex flex-row mt-8">
|
||||
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-4">总计{{ item.count }}{{
|
||||
<view class="flex flex-row mt-[8px]">
|
||||
<view class="bg-[#f5f7fa] text-[#02C34E] font-size-12 p-[4px] rounded-[4px] mr-[4px]">总计{{ item.count }}{{
|
||||
item.unit
|
||||
}}
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user