upper attachment-selector to lib
This commit is contained in:
@@ -42,13 +42,8 @@
|
||||
</t-form-item>
|
||||
<t-form-item label-width="0">
|
||||
<div class="photo-wrap" v-entrance-transition>
|
||||
<media-selector
|
||||
:model-value="photoURLList"
|
||||
v-model:photo-items="photoItems"
|
||||
:edit-mode="isEditing"
|
||||
:show-add="isEditing"
|
||||
:show-remove="isEditing"
|
||||
:show-viewer-actions="isEditing"
|
||||
<attachment-selector :readonly="!isEditing"
|
||||
v-model:items="photoItems"
|
||||
:upload="isEditing ? uploadPhotoList : undefined"
|
||||
title="订单照片"
|
||||
/>
|
||||
@@ -237,7 +232,7 @@ import { type Attachment, useUserStore } from "timi-web-api";
|
||||
import FulfillmentAPI from "@/api/FulfillmentAPI";
|
||||
import SalesOrderAPI from "@/api/SalesOrderAPI";
|
||||
import CustomerProfileCard from "@/components/CustomerProfileCard.vue";
|
||||
import MediaSelector from "@/components/mediaSelector/MediaSelector.vue";
|
||||
import AttachmentSelector from "@/components/attachmentSelector/AttachmentSelector.vue";
|
||||
import ProductSkuTags from "@/components/ProductSkuTags.vue";
|
||||
import type { PhotoItem } from "@/types/Photo";
|
||||
import { convertPackageQuantity, formatPackageAmount, getPackageQuantityText } from "@/utils/package";
|
||||
@@ -278,7 +273,6 @@ const canRefund = computed(() => !!order.value && order.value.status === "CANCEL
|
||||
const canConfirmNoRefund = computed(() => !!order.value && order.value.status === "CANCELLED" && order.value.refundStatus === "PENDING" && userStore.hasPermissions(permissionCodes.fund.refund));
|
||||
const canCancel = computed(() => !!order.value && order.value.status === "ACTIVE" && !hasPendingFulfillment.value && userStore.hasPermissions(permissionCodes.salesOrder.cancel));
|
||||
const canFulfillByPayment = computed(() => order.value?.paymentStatus === "PAID" || userStore.hasRoles(gaoRoleCodes.storeManager));
|
||||
const photoURLList = computed(() => photoItems.value.map(item => item.url));
|
||||
|
||||
function toPhotoItems(attachmentList?: readonly Partial<Attachment>[]): PhotoItem[] {
|
||||
return (attachmentList || [])
|
||||
|
||||
Reference in New Issue
Block a user