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