fix OrderFulfillmentQuickSourceOrders.vue style

This commit is contained in:
Timi
2026-10-21 00:42:40 +08:00
parent 60bbe90160
commit 77f061ef96
2 changed files with 53 additions and 30 deletions
+45 -28
View File
@@ -14,31 +14,40 @@
</template>
</t-navbar>
<main v-can="permissionCodes.orderFulfillment.create" class="page-content scroll column content">
<customer-profile-card v-if="selectedCustomer" class="customer-profile" :customer="selectedCustomer" />
<t-cell-group theme="card">
<customer-profile-card
v-if="selectedCustomer"
class="customer-profile"
:customer="selectedCustomer"
v-entrance-transition
/>
<t-cell-group theme="card" v-entrance-transition>
<t-cell title="履约客户" arrow @click="customerSelectorVisible = true">
<template #note>
<span v-text="selectedCustomer?.name || '选择'" />
</template>
</t-cell>
</t-cell-group>
<t-cell-group title="产品选择" theme="card">
<t-cell-group title="产品选择" theme="card" v-entrance-transition>
<t-cell v-if="customerId" title="选择产品 SKU" arrow @click="productSelectorVisible = true" />
<t-cell v-else title="选择产品 SKU" note="请先选择履约客户" />
</t-cell-group>
<order-fulfillment-quick-quantity
ref="fulfillmentQuantityRef"
:sku-list="selectedSkuList"
:is-stock-checking="isStockChecking"
@change="handleFulfillmentChange"
/>
<order-fulfillment-quick-source-orders
ref="sourceOrdersRef"
:customer-id="customerId"
:fulfillment-item-list="fulfillmentItemList"
@loading-change="sourceOrderLoading = $event"
/>
<t-cell-group title="履约信息" theme="card">
<div v-entrance-transition>
<order-fulfillment-quick-quantity
ref="fulfillmentQuantityRef"
:sku-list="selectedSkuList"
:is-stock-checking="isStockChecking"
@change="handleFulfillmentChange"
/>
</div>
<div v-entrance-transition>
<order-fulfillment-quick-source-orders
ref="sourceOrdersRef"
:customer-id="customerId"
:fulfillment-item-list="fulfillmentItemList"
@loading-change="sourceOrderLoading = $event"
/>
</div>
<t-cell-group title="履约信息" theme="card" v-entrance-transition>
<t-cell title="履约时间" content-align="right">
<template #note>
<div class="time-actions" @click.stop>
@@ -71,21 +80,21 @@
<center-tips v-else-if="!isStockChecking" class="stock-hint">所选 SKU 无需扣减库存</center-tips>
<center-tips v-else class="stock-hint">正在检查库存…</center-tips>
</div>
<t-cell title="备注">
<t-cell class="remark" title="备注">
<template #note>
<t-textarea v-model="remark" borderless autosize maxlength="500" placeholder="选填" />
<t-input v-model="remark" borderless placeholder="选填" />
</template>
</t-cell>
</t-cell-group>
<t-cell-group class="attachment-group" theme="card">
<media-selector
:model-value="photoUrlList"
v-model:photo-items="photoItems"
:upload="uploadPhotoList"
:edit-mode="true"
required
title="履约凭证照片"
/>
<div class="photo-wrap bg-white">
<media-selector
:model-value="photoUrlList"
v-model:photo-items="photoItems"
:upload="uploadPhotoList"
:edit-mode="true"
required
title="履约凭证照片"
/>
</div>
</t-cell-group>
</main>
<customer-selector
@@ -476,5 +485,13 @@ onUnmounted(() => {
.stock-wrap {
padding: .5rem 1rem;
}
.remark {
--td-input-vertical-padding: 0;
}
.photo-wrap {
padding: 1rem;
}
}
</style>
@@ -126,6 +126,9 @@
<template #required="{ row }">
<span :class="row.sufficient ? 'covered' : 'short'" v-text="row.requiredBaseQuantity + ' ' + row.unitName" />
</template>
<template #validation="{ row }">
<span :class="row.sufficient ? 'covered' : 'short'" v-text="row.sufficient ? '充足' : '缺少'" />
</template>
</t-table>
<center-tips v-else :content="loadingSourceOrders ? '正在加载来源订单' : '请先选择产品 SKU'" />
</div>
@@ -161,8 +164,9 @@ const selectedSourceOrderIdList = ref<string[]>([]);
const loadingSourceOrders = ref(false);
const coverageColumns = [
{ colKey: "product", title: "产品名", width: "40%", ellipsis: true },
{ colKey: "source", title: "来源", width: "30%", align: "right" },
{ colKey: "required", title: "需要", width: "30%", align: "right" }
{ colKey: "source", title: "来源", width: "20%", align: "right" },
{ colKey: "required", title: "需要", width: "20%", align: "right" },
{ colKey: "validation", title: "校验", width: "20%", align: "center" }
];
const coverageList = computed(() => props.fulfillmentItemList.map(item => {
const requiredBaseQuantity = item.requiredBaseQuantity || "0";
@@ -369,6 +373,8 @@ onUnmounted(() => {
&.available {
.tags {
gap: .25rem;
display: flex;
min-width: 0;
flex-wrap: nowrap;
overflow-x: auto;