fix layout

This commit is contained in:
Timi
2026-10-28 14:21:26 +08:00
parent 5609d2484e
commit adc6e38328
83 changed files with 5587 additions and 5386 deletions
+88 -82
View File
@@ -1,89 +1,95 @@
<template>
<t-navbar
fixed
:z-index="20"
title="邀请客户"
left-arrow
@left-click="$router.back()"
/>
<div v-can="permissionCodes.customer.read" class="customer-invitee-list">
<customer-profile-card
v-if="customer"
class="customer"
:customer="customer"
v-entrance-transition
<div class="page-layout navbar">
<t-navbar
fixed
:z-index="20"
title="邀请客户"
left-arrow
@left-click="$router.back()"
/>
<div class="invite-list">
<div class="header" v-entrance-transition>
<div class="title">邀请客户</div>
<div v-can="permissionCodes.customer.update" class="actions">
<t-button
theme="primary"
variant="outline"
size="extra-small"
content="选择添加"
@click="selectorVisible = true"
/>
<t-button
theme="primary"
size="extra-small"
content="扫码添加"
@click="openScanPopup"
/>
<main class="page-content scroll column list">
<div class="pull-refresh">
<div v-can="permissionCodes.customer.read" class="customer-invitee-list">
<customer-profile-card
v-if="customer"
class="customer"
:customer="customer"
v-entrance-transition
/>
<div class="invite-list">
<div class="header" v-entrance-transition>
<div class="title">邀请客户</div>
<div v-can="permissionCodes.customer.update" class="actions">
<t-button
theme="primary"
variant="outline"
size="extra-small"
content="选择添加"
@click="selectorVisible = true"
/>
<t-button
theme="primary"
size="extra-small"
content="扫码添加"
@click="openScanPopup"
/>
</div>
</div>
<t-cell-group theme="card">
<t-swipe-cell
v-for="(item, index) in invitees"
:key="item.id || item.code || index"
class="item"
v-entrance-transition="{ step: 30 }"
>
<customer-cell
class="cell"
:customer="item"
arrow
hover
@click="toCustomerDetail(item)"
>
<template #description>
<telephone-link :value="item.telephone" placeholder="未填写电话" />
</template>
</customer-cell>
<template #right>
<div v-can="permissionCodes.customer.update" class="remove bg-red white" @click="removeInvitee(item)">删除</div>
</template>
</t-swipe-cell>
<center-tips v-if="!invitees.length" :content="isLoading ? '正在加载邀请客户' : '暂无邀请客户'" />
</t-cell-group>
</div>
</div>
<t-cell-group theme="card">
<t-swipe-cell
v-for="(item, index) in invitees"
:key="item.id || item.code || index"
class="item"
v-entrance-transition="{ step: 30 }"
>
<customer-cell
class="cell"
:customer="item"
arrow
hover
@click="toCustomerDetail(item)"
>
<template #description>
<telephone-link :value="item.telephone" placeholder="未填写电话" />
</template>
</customer-cell>
<template #right>
<div v-can="permissionCodes.customer.update" class="remove bg-red white" @click="removeInvitee(item)">删除</div>
</template>
</t-swipe-cell>
<center-tips v-if="!invitees.length" :content="isLoading ? '正在加载邀请客户' : '暂无邀请客户'" />
</t-cell-group>
</div>
</div>
<customer-selector
v-model="selectedInviteeId"
v-model:visible="selectorVisible"
:enable-scan="false"
@change="handleInviteeSelected"
/>
<bottom-popup
v-model="scanPopupVisible"
title="扫码添加邀请客户"
@left-button-click="closeScanPopup"
@right-button-click="confirmScannedInvitee"
>
<div class="scan-popup">
<code-scanner
v-if="scanPopupVisible"
:visible="scanPopupVisible"
:status-text="scanStatus"
active-text="正在识别客户编码,请将二维码移入取景框"
@decode="handleDecodedText"
@status-change="handleScanStatusChange"
/>
<div v-if="pendingInvitee" class="confirm">
<customer-profile-card :customer="pendingInvitee" />
</div>
</div>
</bottom-popup>
</main>
<customer-selector
v-model="selectedInviteeId"
v-model:visible="selectorVisible"
:enable-scan="false"
@change="handleInviteeSelected"
/>
<bottom-popup
v-model="scanPopupVisible"
title="扫码添加邀请客户"
@left-button-click="closeScanPopup"
@right-button-click="confirmScannedInvitee"
>
<div class="scan-popup">
<code-scanner
v-if="scanPopupVisible"
:visible="scanPopupVisible"
:status-text="scanStatus"
active-text="正在识别客户编码,请将二维码移入取景框"
@decode="handleDecodedText"
@status-change="handleScanStatusChange"
/>
<div v-if="pendingInvitee" class="confirm">
<customer-profile-card :customer="pendingInvitee" />
</div>
</div>
</bottom-popup>
</div>
</template>
<script setup lang="ts">
@@ -271,7 +277,7 @@ watch(() => route.params.id, loadCustomer);
<style scoped lang="less">
.customer-invitee-list {
gap: 1rem;
padding: calc(var(--app-nav-height) + 1rem) 0 2rem;
padding: 0 0 2rem;
display: flex;
flex-direction: column;