fix delivered at now

This commit is contained in:
Timi
2026-09-23 12:53:22 +08:00
parent 23fc2c3577
commit 8bf0b7d343
@@ -81,13 +81,23 @@
<div v-else class="empty" v-text="'暂无可履约明细,请返回订单详情检查'" />
<t-form class="form" label-width="7rem">
<t-form-item label="履约时间" content-align="right">
<t-button
theme="primary"
variant="outline"
size="extra-small"
:content="deliveredAtText || '此刻'"
@click="pickerVisible = true"
/>
<div class="time-actions">
<t-button
theme="primary"
variant="outline"
size="extra-small"
:content="deliveredAtText || '此刻'"
@click="pickerVisible = true"
/>
<t-button
v-if="deliveredAtText"
theme="primary"
variant="text"
size="extra-small"
content="此刻"
@click="resetDeliveredAt"
/>
</div>
</t-form-item>
<t-form-item v-if="canDirectVerify" label="直接核销履约" content-align="right">
<t-switch v-model="directVerify" size="small" :disabled="isSaving || isStockChecking" />
@@ -373,6 +383,11 @@ function confirmTime(value: string | number): void {
pickerVisible.value = false;
}
function resetDeliveredAt(): void {
deliveredAtText.value = "";
draftTime.value = "";
}
function resolveTimestamp(value: string): number | undefined {
if (!value) return undefined;
const timestamp = new Date(value.replace(" ", "T")).getTime();
@@ -663,6 +678,13 @@ onUnmounted(() => navBarStore.clearRight());
}
}
.time-actions {
gap: .5rem;
display: flex;
align-items: center;
justify-content: flex-end;
}
.tips {
font-size: .875rem;
}