add customer-profile-card

This commit is contained in:
Timi
2026-08-04 10:53:54 +08:00
parent 862ade6fbd
commit 7f0632c148
@@ -38,6 +38,11 @@
@status-change="handleScanStatusChange" @status-change="handleScanStatusChange"
/> />
</div> </div>
<customer-profile-card
v-if="showSelectedCustomerProfile"
class="customer-profile"
:customer="selectedCustomer"
/>
<registration-event-selector <registration-event-selector
v-model="selectedRegistrationEventIdList" v-model="selectedRegistrationEventIdList"
class="registration-event-selector" class="registration-event-selector"
@@ -153,6 +158,7 @@ import RegistrationEventAPI from "@/api/RegistrationEventAPI";
import RegistrationEventRecordAPI from "@/api/RegistrationEventRecordAPI"; import RegistrationEventRecordAPI from "@/api/RegistrationEventRecordAPI";
import CodeScanner from "@/components/CodeScanner.vue"; import CodeScanner from "@/components/CodeScanner.vue";
import CustomerList from "@/components/CustomerList.vue"; import CustomerList from "@/components/CustomerList.vue";
import CustomerProfileCard from "@/components/CustomerProfileCard.vue";
import CustomerSelector from "@/components/CustomerSelector.vue"; import CustomerSelector from "@/components/CustomerSelector.vue";
import PhotoScroller from "@/components/PhotoScroller.vue"; import PhotoScroller from "@/components/PhotoScroller.vue";
import RegistrationEventSelector from "@/components/RegistrationEventSelector.vue"; import RegistrationEventSelector from "@/components/RegistrationEventSelector.vue";
@@ -205,6 +211,7 @@ const isEditMode = computed(() => !!routeId.value);
const pageAccess = computed(() => isEditMode.value ? gaoPermissionCodes.registrationEventRecord.update : gaoPermissionCodes.registrationEventRecord.create); const pageAccess = computed(() => isEditMode.value ? gaoPermissionCodes.registrationEventRecord.update : gaoPermissionCodes.registrationEventRecord.create);
const saveButtonText = computed(() => isEditMode.value ? "保存记录" : "提交"); const saveButtonText = computed(() => isEditMode.value ? "保存记录" : "提交");
const selectedCustomer = computed(() => selectedCustomerList.value[0]); const selectedCustomer = computed(() => selectedCustomerList.value[0]);
const showSelectedCustomerProfile = computed(() => selectedCustomerList.value.length === 1 && !!selectedCustomer.value?.id);
const canSubmit = computed(() => selectedCustomerList.value.some(item => !!item.id) && 0 < selectedRegistrationEventIdList.value.length); const canSubmit = computed(() => selectedCustomerList.value.some(item => !!item.id) && 0 < selectedRegistrationEventIdList.value.length);
const customerDisplayText = computed(() => { const customerDisplayText = computed(() => {
if (1 < selectedCustomerList.value.length) { if (1 < selectedCustomerList.value.length) {