fix OrderFulfillmentCreate.vue style
This commit is contained in:
@@ -48,12 +48,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<t-button
|
||||
size="extra-small"
|
||||
variant="outline"
|
||||
:content="getFulfillmentUnit(item)?.name || '选择实际单位'"
|
||||
@click.stop="openUnitPicker(item)"
|
||||
/>
|
||||
<t-input
|
||||
v-model.trim="quantityMap[item.id || '']"
|
||||
class="quantity"
|
||||
@@ -64,7 +58,12 @@
|
||||
placeholder="请输入履约数量"
|
||||
>
|
||||
<template #suffix-icon>
|
||||
<span class="unit" v-text="getFulfillmentUnit(item)?.name || ''" />
|
||||
<t-button
|
||||
size="extra-small"
|
||||
variant="outline"
|
||||
:content="getFulfillmentUnit(item)?.name || '选择实际单位'"
|
||||
@click.stop="openUnitPicker(item)"
|
||||
/>
|
||||
</template>
|
||||
</t-input>
|
||||
<t-button
|
||||
@@ -203,8 +202,18 @@ function getAvailableBaseQuantity(item: GaoSalesOrderItem): string {
|
||||
return getPackageQuantityText(item.availableBaseQuantity);
|
||||
}
|
||||
|
||||
function getAvailableQuantity(item: GaoSalesOrderItem): string {
|
||||
const unit = getFulfillmentUnit(item);
|
||||
const quantity = convertPackageQuantity(
|
||||
getAvailableBaseQuantity(item),
|
||||
"1",
|
||||
unit?.baseQuantityPerUnit ?? "1"
|
||||
);
|
||||
return getPackageQuantityText(quantity ?? item.availableBaseQuantity);
|
||||
}
|
||||
|
||||
function getItemDescription(item: GaoSalesOrderItem): string {
|
||||
return `可履约 ${getAvailableBaseQuantity(item)} ${getBaseUnitName(item)}`;
|
||||
return `可履约 ${getAvailableQuantity(item)} ${getFulfillmentUnit(item)?.name || getBaseUnitName(item)}`;
|
||||
}
|
||||
|
||||
function getBaseUnitName(item: GaoSalesOrderItem): string {
|
||||
@@ -422,7 +431,7 @@ onUnmounted(() => navBarStore.clearRight());
|
||||
}
|
||||
|
||||
.input {
|
||||
gap: 1rem;
|
||||
gap: .5rem;
|
||||
display: flex;
|
||||
margin-top: .5rem;
|
||||
|
||||
|
||||
@@ -310,10 +310,6 @@ function getRemainingAmountClass(amount?: number | null): "green" | "red" | "gra
|
||||
return amount === 0 ? "green" : "red";
|
||||
}
|
||||
|
||||
function getItemUnitName(item: GaoSalesOrderItem): string {
|
||||
return item.unitSnapshot || "基础单位";
|
||||
}
|
||||
|
||||
function getItemQuantityText(item: GaoSalesOrderItem, baseQuantity?: number | string): string {
|
||||
const quantity = convertPackageQuantity(
|
||||
String(baseQuantity ?? "0"),
|
||||
|
||||
Reference in New Issue
Block a user