fix delivered at now
This commit is contained in:
@@ -81,13 +81,23 @@
|
|||||||
<div v-else class="empty" v-text="'暂无可履约明细,请返回订单详情检查'" />
|
<div v-else class="empty" v-text="'暂无可履约明细,请返回订单详情检查'" />
|
||||||
<t-form class="form" label-width="7rem">
|
<t-form class="form" label-width="7rem">
|
||||||
<t-form-item label="履约时间" content-align="right">
|
<t-form-item label="履约时间" content-align="right">
|
||||||
<t-button
|
<div class="time-actions">
|
||||||
theme="primary"
|
<t-button
|
||||||
variant="outline"
|
theme="primary"
|
||||||
size="extra-small"
|
variant="outline"
|
||||||
:content="deliveredAtText || '此刻'"
|
size="extra-small"
|
||||||
@click="pickerVisible = true"
|
: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>
|
||||||
<t-form-item v-if="canDirectVerify" label="直接核销履约" content-align="right">
|
<t-form-item v-if="canDirectVerify" label="直接核销履约" content-align="right">
|
||||||
<t-switch v-model="directVerify" size="small" :disabled="isSaving || isStockChecking" />
|
<t-switch v-model="directVerify" size="small" :disabled="isSaving || isStockChecking" />
|
||||||
@@ -373,6 +383,11 @@ function confirmTime(value: string | number): void {
|
|||||||
pickerVisible.value = false;
|
pickerVisible.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetDeliveredAt(): void {
|
||||||
|
deliveredAtText.value = "";
|
||||||
|
draftTime.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
function resolveTimestamp(value: string): number | undefined {
|
function resolveTimestamp(value: string): number | undefined {
|
||||||
if (!value) return undefined;
|
if (!value) return undefined;
|
||||||
const timestamp = new Date(value.replace(" ", "T")).getTime();
|
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 {
|
.tips {
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user