清理手工开票页面冗余文案
This commit is contained in:
@@ -206,18 +206,12 @@
|
||||
v-model="form.document.booking_date"
|
||||
data-testid="document-booking-date"
|
||||
type="date"
|
||||
:lang="locale"
|
||||
:class="validationClass('booking-date')"
|
||||
v-bind="validationAria('booking-date')"
|
||||
required
|
||||
@input="markDocumentDatesEdited"
|
||||
>
|
||||
<output
|
||||
class="date-preview"
|
||||
for="invoice-booking-date"
|
||||
>
|
||||
<small>最终格式</small>
|
||||
<strong>{{ formatDatePreview(form.document.booking_date) }}</strong>
|
||||
</output>
|
||||
</div>
|
||||
<p
|
||||
v-if="fieldError('booking-date')"
|
||||
@@ -279,18 +273,11 @@
|
||||
v-model="form.booking.arrival_date"
|
||||
data-testid="booking-arrival-date"
|
||||
type="date"
|
||||
:lang="locale"
|
||||
:class="validationClass('arrival-date')"
|
||||
v-bind="validationAria('arrival-date')"
|
||||
required
|
||||
>
|
||||
<output
|
||||
class="date-preview"
|
||||
data-testid="arrival-date-preview"
|
||||
for="invoice-arrival-date"
|
||||
>
|
||||
<small>最终格式</small>
|
||||
<strong>{{ formatDatePreview(form.booking.arrival_date) }}</strong>
|
||||
</output>
|
||||
</div>
|
||||
<p
|
||||
v-if="fieldError('arrival-date')"
|
||||
@@ -315,18 +302,11 @@
|
||||
v-model="form.booking.departure_date"
|
||||
data-testid="booking-departure-date"
|
||||
type="date"
|
||||
:lang="locale"
|
||||
:class="validationClass('departure-date')"
|
||||
v-bind="validationAria('departure-date')"
|
||||
required
|
||||
>
|
||||
<output
|
||||
class="date-preview"
|
||||
data-testid="departure-date-preview"
|
||||
for="invoice-departure-date"
|
||||
>
|
||||
<small>最终格式</small>
|
||||
<strong>{{ formatDatePreview(form.booking.departure_date) }}</strong>
|
||||
</output>
|
||||
</div>
|
||||
<p
|
||||
v-if="fieldError('departure-date')"
|
||||
@@ -351,19 +331,12 @@
|
||||
v-model="form.document.due_date"
|
||||
data-testid="document-due-date"
|
||||
type="date"
|
||||
:lang="locale"
|
||||
:class="validationClass('due-date')"
|
||||
v-bind="validationAria('due-date')"
|
||||
required
|
||||
@input="markDocumentDatesEdited"
|
||||
>
|
||||
<output
|
||||
class="date-preview"
|
||||
data-testid="due-date-preview"
|
||||
for="invoice-due-date"
|
||||
>
|
||||
<small>最终格式</small>
|
||||
<strong>{{ formatDatePreview(form.document.due_date) }}</strong>
|
||||
</output>
|
||||
</div>
|
||||
<p
|
||||
v-if="fieldError('due-date')"
|
||||
@@ -381,7 +354,6 @@
|
||||
</div>
|
||||
<div class="room-rate-control">
|
||||
<label>
|
||||
<span class="control-caption control-caption--required">金额</span>
|
||||
<div class="number-control">
|
||||
<input
|
||||
v-model="primaryCharge.rate"
|
||||
@@ -408,7 +380,6 @@
|
||||
</span>
|
||||
</label>
|
||||
<label>
|
||||
<span class="control-caption">说明</span>
|
||||
<input
|
||||
v-model.trim="form.booking.room_rate_note"
|
||||
data-testid="booking-room-rate-note"
|
||||
@@ -549,7 +520,7 @@
|
||||
:data-testid="`charge-row-${index}`"
|
||||
>
|
||||
<header class="charge-line__header">
|
||||
<strong>第 {{ index + 1 }} 行</strong>
|
||||
<strong>{{ t('manualInvoice.chargeLineLabel', { index: index + 1 }) }}</strong>
|
||||
<button
|
||||
type="button"
|
||||
class="remove-button"
|
||||
@@ -1472,17 +1443,6 @@ function formatMoney(value: number, currency: string): string {
|
||||
}).format(value)
|
||||
}
|
||||
|
||||
function formatDatePreview(value: string): string {
|
||||
if (!value) {
|
||||
return '—'
|
||||
}
|
||||
const [year, month, day] = value.split('-')
|
||||
if (!year || !month || !day) {
|
||||
return '—'
|
||||
}
|
||||
return `${day}/${month}/${year}`
|
||||
}
|
||||
|
||||
function formatGenerationStatus(status: string): string {
|
||||
const key = `manualInvoice.statuses.${status}`
|
||||
return te(key) ? t(key) : status
|
||||
@@ -1744,15 +1704,13 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
box-shadow: 0 0 0 3px rgb(225 29 72 / 12%), inset 0 0 0 1px rgb(225 29 72 / 8%);
|
||||
}
|
||||
|
||||
.date-control input.is-invalid + .date-preview,
|
||||
.number-control input.is-invalid + .number-suffix {
|
||||
border-color: #e11d48;
|
||||
background: #fff1f3;
|
||||
color: #be123c;
|
||||
}
|
||||
|
||||
.field-label--required::after,
|
||||
.control-caption--required::after {
|
||||
.field-label--required::after {
|
||||
content: "*";
|
||||
margin-left: 4px;
|
||||
color: #e11d48;
|
||||
@@ -1778,19 +1736,20 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.date-control,
|
||||
.date-control {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.number-control {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.date-control input,
|
||||
.number-control input {
|
||||
border-radius: 6px 0 0 6px;
|
||||
}
|
||||
|
||||
.date-preview,
|
||||
.number-suffix {
|
||||
display: grid;
|
||||
align-content: center;
|
||||
@@ -1801,20 +1760,6 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.date-preview {
|
||||
min-width: 118px;
|
||||
}
|
||||
|
||||
.date-preview small {
|
||||
color: var(--th-color-slate-500);
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.date-preview strong {
|
||||
color: var(--th-color-slate-600);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.number-suffix {
|
||||
place-items: center;
|
||||
min-width: 62px;
|
||||
@@ -1836,12 +1781,6 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.control-caption {
|
||||
color: var(--th-color-slate-500);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.add-button,
|
||||
.remove-button,
|
||||
.generate-button,
|
||||
@@ -2204,17 +2143,14 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.date-control,
|
||||
.number-control {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.date-control input,
|
||||
.number-control input {
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
|
||||
.date-preview,
|
||||
.number-suffix {
|
||||
min-height: 42px;
|
||||
border-top: 0;
|
||||
|
||||
Reference in New Issue
Block a user