feat: 优化发票抬头填写与财务筛选布局,并移除液态主题色卡
Some checks failed
Build and Deploy Front / deploy (push) Failing after 3m41s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zzh 2026-11-21 16:18:46 +08:00
parent 4a4171dbdf
commit 568e37715a
12 changed files with 419 additions and 471 deletions

View File

@ -71,23 +71,6 @@
<span class="brand-preset__name">{{ $t(item.labelKey) }}</span>
</button>
</div>
<p class="settings-section__subhint">{{ $t('settings.themeColorLiquid') }}</p>
<div class="liquid-presets">
<button
v-for="item in liquidPresets"
:key="item.id"
type="button"
class="liquid-preset"
:class="[`liquid-preset--${item.id}`, { 'is-active': themeColor.toLowerCase() === item.color.toLowerCase() }]"
:title="$t(item.labelKey)"
@click="setColor(item.color)"
>
<span class="liquid-preset__blob liquid-preset__blob--a" aria-hidden="true" />
<span class="liquid-preset__blob liquid-preset__blob--b" aria-hidden="true" />
<span class="liquid-preset__blob liquid-preset__blob--c" aria-hidden="true" />
<span class="liquid-preset__label">{{ $t(item.labelKey) }}</span>
</button>
</div>
</div>
<div class="settings-section">
@ -147,20 +130,6 @@
{ color: '#1e7fa0', labelKey: 'settings.themeBrand.cyan' },
];
// 液态暖色卡片(主色取自关怀卡片中调,样式复刻液态质感)
const liquidPresets = [
{ id: 'peach', color: '#e8885a', labelKey: 'settings.themeLiquid.peach' },
{ id: 'apricot', color: '#d9924a', labelKey: 'settings.themeLiquid.apricot' },
{ id: 'clay', color: '#c17a52', labelKey: 'settings.themeLiquid.clay' },
{ id: 'rose', color: '#c4788a', labelKey: 'settings.themeLiquid.rose' },
{ id: 'lilac', color: '#9b7bb8', labelKey: 'settings.themeLiquid.lilac' },
{ id: 'mist', color: '#5b8fc9', labelKey: 'settings.themeLiquid.mist' },
{ id: 'ocean', color: '#3d9a9a', labelKey: 'settings.themeLiquid.ocean' },
{ id: 'moss', color: '#6b9e6a', labelKey: 'settings.themeLiquid.moss' },
{ id: 'ember', color: '#d45c5c', labelKey: 'settings.themeLiquid.ember' },
{ id: 'rouge', color: '#c45a72', labelKey: 'settings.themeLiquid.rouge' },
];
const cancel = () => {
appStore.updateSettings({ globalSettings: false });
emit('cancel');
@ -384,338 +353,6 @@
}
}
.settings-section__subhint {
margin: 16px 0 10px;
font-size: 12px;
line-height: 1.45;
color: var(--color-text-3);
}
.liquid-presets {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.liquid-preset {
position: relative;
display: flex;
align-items: flex-end;
min-height: 64px;
padding: 10px 12px;
overflow: hidden;
isolation: isolate;
border: 1px solid rgba(255, 214, 170, 0.55);
border-radius: 18px 14px 20px 16px;
cursor: pointer;
text-align: left;
background:
linear-gradient(145deg, rgba(255, 248, 240, 0.92), rgba(255, 236, 220, 0.72)),
rgba(255, 250, 245, 0.85);
box-shadow:
0 8px 20px rgba(180, 110, 70, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
border-color 0.2s ease;
animation: settings-liquid-morph 8s ease-in-out infinite;
&:hover {
transform: translateY(-1px) scale(1.02);
box-shadow:
0 12px 26px rgba(180, 110, 70, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
&.is-active {
box-shadow:
0 0 0 2px var(--color-bg-2),
0 0 0 4px var(--app-primary-color),
0 12px 26px rgba(180, 110, 70, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
}
.liquid-preset__blob {
position: absolute;
border-radius: 50%;
filter: blur(12px);
opacity: 0.9;
pointer-events: none;
z-index: 0;
mix-blend-mode: multiply;
}
.liquid-preset__blob--a {
width: 56px;
height: 56px;
top: -18px;
right: -12px;
animation: settings-blob-a 7s ease-in-out infinite;
}
.liquid-preset__blob--b {
width: 48px;
height: 48px;
bottom: -16px;
left: -10px;
animation: settings-blob-b 9s ease-in-out infinite;
}
.liquid-preset__blob--c {
width: 36px;
height: 36px;
top: 40%;
left: 42%;
animation: settings-blob-c 6.5s ease-in-out infinite;
}
.liquid-preset__label {
position: relative;
z-index: 1;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.02em;
color: #5c3d2e;
}
.liquid-preset--peach {
.liquid-preset__blob--a {
background: radial-gradient(circle, #ffb48a 0%, rgba(255, 180, 138, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #ffd6a5 0%, rgba(255, 214, 165, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #ffe8c8 0%, rgba(255, 232, 200, 0) 70%);
}
}
.liquid-preset--apricot {
border-color: rgba(255, 210, 140, 0.55);
background:
linear-gradient(145deg, rgba(255, 250, 236, 0.94), rgba(255, 232, 190, 0.75)),
rgba(255, 248, 235, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #ffd28a 0%, rgba(255, 210, 138, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #ffe0a8 0%, rgba(255, 224, 168, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #fff0cc 0%, rgba(255, 240, 204, 0) 70%);
}
}
.liquid-preset--clay {
border-color: rgba(220, 170, 130, 0.55);
background:
linear-gradient(145deg, rgba(255, 244, 232, 0.94), rgba(240, 210, 185, 0.72)),
rgba(250, 240, 230, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #e0a888 0%, rgba(224, 168, 136, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #d4a078 0%, rgba(212, 160, 120, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #f0d4b8 0%, rgba(240, 212, 184, 0) 70%);
}
}
.liquid-preset--rose {
border-color: rgba(242, 201, 222, 0.6);
background:
linear-gradient(145deg, rgba(255, 246, 250, 0.94), rgba(250, 228, 238, 0.72)),
rgba(255, 248, 252, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #f2c9de 0%, rgba(242, 201, 222, 0) 72%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #e8b8d0 0%, rgba(232, 184, 208, 0) 70%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #f8dceb 0%, rgba(248, 220, 235, 0) 70%);
}
.liquid-preset__label {
color: #5a3d4a;
}
}
.liquid-preset--lilac {
border-color: rgba(220, 190, 230, 0.55);
background:
linear-gradient(145deg, rgba(252, 246, 255, 0.94), rgba(240, 228, 250, 0.72)),
rgba(250, 246, 255, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #d7b8ef 0%, rgba(215, 184, 239, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #f2c9de 0%, rgba(242, 201, 222, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #e8d9f8 0%, rgba(232, 217, 248, 0) 70%);
}
.liquid-preset__label {
color: #4a3a55;
}
}
.liquid-preset--mist {
border-color: rgba(170, 200, 240, 0.55);
background:
linear-gradient(145deg, rgba(244, 248, 255, 0.94), rgba(220, 232, 250, 0.72)),
rgba(246, 250, 255, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #a8c8f0 0%, rgba(168, 200, 240, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #c5daf8 0%, rgba(197, 218, 248, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #dde9fb 0%, rgba(221, 233, 251, 0) 70%);
}
.liquid-preset__label {
color: #3a4f6e;
}
}
.liquid-preset--ocean {
border-color: rgba(150, 220, 215, 0.55);
background:
linear-gradient(145deg, rgba(240, 252, 250, 0.94), rgba(210, 240, 236, 0.72)),
rgba(244, 252, 250, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #7ecfc8 0%, rgba(126, 207, 200, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #a8e0da 0%, rgba(168, 224, 218, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #d0f0ec 0%, rgba(208, 240, 236, 0) 70%);
}
.liquid-preset__label {
color: #2d5c58;
}
}
.liquid-preset--moss {
border-color: rgba(170, 210, 165, 0.55);
background:
linear-gradient(145deg, rgba(244, 252, 242, 0.94), rgba(220, 238, 215, 0.72)),
rgba(246, 252, 244, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #9ed09a 0%, rgba(158, 208, 154, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #b8deb4 0%, rgba(184, 222, 180, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #d8eed4 0%, rgba(216, 238, 212, 0) 70%);
}
.liquid-preset__label {
color: #3a5a3a;
}
}
.liquid-preset--ember {
border-color: rgba(240, 170, 170, 0.55);
background:
linear-gradient(145deg, rgba(255, 244, 244, 0.94), rgba(250, 220, 220, 0.72)),
rgba(255, 248, 248, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #f0a0a0 0%, rgba(240, 160, 160, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #f5b8b8 0%, rgba(245, 184, 184, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #fad0d0 0%, rgba(250, 208, 208, 0) 70%);
}
.liquid-preset__label {
color: #6e3a3a;
}
}
.liquid-preset--rouge {
border-color: rgba(235, 170, 190, 0.55);
background:
linear-gradient(145deg, rgba(255, 244, 248, 0.94), rgba(248, 220, 230, 0.72)),
rgba(255, 248, 250, 0.88);
.liquid-preset__blob--a {
background: radial-gradient(circle, #e8a0b8 0%, rgba(232, 160, 184, 0) 70%);
}
.liquid-preset__blob--b {
background: radial-gradient(circle, #f0b8c8 0%, rgba(240, 184, 200, 0) 72%);
}
.liquid-preset__blob--c {
background: radial-gradient(circle, #f5d0dc 0%, rgba(245, 208, 220, 0) 70%);
}
.liquid-preset__label {
color: #6a3a4a;
}
}
@keyframes settings-liquid-morph {
0%,
100% {
border-radius: 18px 14px 20px 16px;
}
33% {
border-radius: 14px 20px 14px 18px;
}
66% {
border-radius: 20px 16px 18px 22px;
}
}
@keyframes settings-blob-a {
0%,
100% {
transform: translate(0, 0) scale(1);
}
50% {
transform: translate(-8px, 6px) scale(1.12);
}
}
@keyframes settings-blob-b {
0%,
100% {
transform: translate(0, 0) scale(1);
}
50% {
transform: translate(8px, -6px) scale(1.16);
}
}
@keyframes settings-blob-c {
0%,
100% {
transform: translate(0, 0) scale(1);
}
50% {
transform: translate(-5px, -4px) scale(1.22);
}
}
@media (prefers-reduced-motion: reduce) {
.liquid-preset,
.liquid-preset__blob {
animation: none !important;
}
}
.settings-persist-tip {
margin: 8px 0 0;
padding-top: 16px;

View File

@ -5550,6 +5550,38 @@ export default {
'finance.invoiceManage.profile.isDefault': 'Set as default',
'finance.invoiceManage.profile.remark': 'Remark',
'finance.invoiceManage.profile.save': 'Save',
'finance.invoiceManage.profile.guide':
'Enter the buyer details from the business license. These fields are printed on the invoice and must match the certificate.',
'finance.invoiceManage.profile.exampleCompany': 'Company example',
'finance.invoiceManage.profile.examplePersonal':
'For an individual, enter the name and ID number, e.g. Zhang San / 440301199001011234. Address and bank can be left blank.',
'finance.invoiceManage.profile.exampleTitleName': 'Shenzhen Example Technology Co., Ltd.',
'finance.invoiceManage.profile.exampleTaxNo': '91440300MA5F3K2X1A',
'finance.invoiceManage.profile.exampleAddressPhone':
'88 Kejiyuan South Rd, Nanshan, Shenzhen 0755-86001234',
'finance.invoiceManage.profile.exampleBank':
'ICBC Shenzhen Kejiyuan Sub-branch 4000020009200123456',
'finance.invoiceManage.profile.customerExtra':
'Pick the customer by name. The owner cannot be changed after saving.',
'finance.invoiceManage.profile.titleNameExtra':
'Must match the business license or the name on the ID card',
'finance.invoiceManage.profile.titleNamePlaceholder':
'e.g. Shenzhen Example Technology Co., Ltd.',
'finance.invoiceManage.profile.taxNoExtra':
'18-digit unified social credit code, or an ID number for an individual',
'finance.invoiceManage.profile.taxNoPlaceholder': 'e.g. 91440300MA5F3K2X1A',
'finance.invoiceManage.profile.addressPhoneExtra':
'Registered address and phone, separated by a space. Recommended for special VAT invoices',
'finance.invoiceManage.profile.addressPhonePlaceholder':
'e.g. 88 Kejiyuan South Rd, Nanshan, Shenzhen 0755-86001234',
'finance.invoiceManage.profile.bankNameAccountExtra':
'Bank name and account number, separated by a space. Recommended for special VAT invoices',
'finance.invoiceManage.profile.bankNameAccountPlaceholder':
'e.g. ICBC Shenzhen Kejiyuan Sub-branch 4000020009200123456',
'finance.invoiceManage.profile.isDefaultExtra':
'New invoice requests for this customer will use this title first',
'finance.invoiceManage.profile.remarkExtra': 'Internal note only. It is not printed on the invoice',
'finance.invoiceManage.profile.remarkPlaceholder': 'e.g. Default title for monthly settlement',
'finance.invoiceManage.message.loadError': 'Failed to load invoices',
'finance.invoiceManage.message.exportSuccess': 'Export completed',
'finance.invoiceManage.message.exportError': 'Export failed',

View File

@ -18,17 +18,6 @@ export default {
'settings.pageBg.slate': 'Cool Slate',
'settings.pageBg.pearl': 'Pearl',
'settings.pageBg.white': 'White',
'settings.themeColorLiquid': 'Warm liquid textures',
'settings.themeLiquid.peach': 'Peach',
'settings.themeLiquid.apricot': 'Apricot',
'settings.themeLiquid.clay': 'Clay',
'settings.themeLiquid.rose': 'Rose',
'settings.themeLiquid.lilac': 'Lilac',
'settings.themeLiquid.mist': 'Mist',
'settings.themeLiquid.ocean': 'Ocean',
'settings.themeLiquid.moss': 'Moss',
'settings.themeLiquid.ember': 'Ember',
'settings.themeLiquid.rouge': 'Rouge',
'settings.appearance': 'Appearance',
'settings.appearanceHint': 'Light for daytime reading, dark for night',
'settings.theme.light': 'Light',

View File

@ -5566,6 +5566,31 @@ export default {
'finance.invoiceManage.profile.isDefault': '设为默认抬头',
'finance.invoiceManage.profile.remark': '备注',
'finance.invoiceManage.profile.save': '保存',
'finance.invoiceManage.profile.guide':
'按营业执照上的购买方信息填写。下面这些内容会印在发票上,请与证照保持一致。',
'finance.invoiceManage.profile.exampleCompany': '公司示例',
'finance.invoiceManage.profile.examplePersonal':
'个人抬头填姓名和身份证号,例如 张三 / 440301199001011234。地址和开户行可以不填。',
'finance.invoiceManage.profile.exampleTitleName': '深圳市示例科技有限公司',
'finance.invoiceManage.profile.exampleTaxNo': '91440300MA5F3K2X1A',
'finance.invoiceManage.profile.exampleAddressPhone': '深圳市南山区科技园南路88号 0755-86001234',
'finance.invoiceManage.profile.exampleBank': '中国工商银行深圳科技园支行 4000020009200123456',
'finance.invoiceManage.profile.customerExtra': '按客户名称选择,不用填数字编号。保存后不能改归属客户。',
'finance.invoiceManage.profile.titleNameExtra': '与营业执照名称或身份证姓名一致',
'finance.invoiceManage.profile.titleNamePlaceholder': '例:深圳市示例科技有限公司',
'finance.invoiceManage.profile.taxNoExtra': '公司填 18 位统一社会信用代码,个人填身份证号',
'finance.invoiceManage.profile.taxNoPlaceholder': '例:91440300MA5F3K2X1A',
'finance.invoiceManage.profile.addressPhoneExtra':
'注册地址和电话写在一起,中间空一格。开专票时建议填写',
'finance.invoiceManage.profile.addressPhonePlaceholder':
'例:深圳市南山区科技园南路88号 0755-86001234',
'finance.invoiceManage.profile.bankNameAccountExtra':
'开户行全称和银行账号写在一起,中间空一格。开专票时建议填写',
'finance.invoiceManage.profile.bankNameAccountPlaceholder':
'例:中国工商银行深圳科技园支行 4000020009200123456',
'finance.invoiceManage.profile.isDefaultExtra': '设为默认后,这个客户申请开票时会优先带出这一条',
'finance.invoiceManage.profile.remarkExtra': '只给内部看,不会印在发票上',
'finance.invoiceManage.profile.remarkPlaceholder': '例:月结客户常用抬头',
'finance.invoiceManage.message.loadError': '加载发票数据失败',
'finance.invoiceManage.message.exportSuccess': '导出成功',
'finance.invoiceManage.message.exportError': '导出失败',

View File

@ -18,17 +18,6 @@ export default {
'settings.pageBg.slate': '冷灰',
'settings.pageBg.pearl': '珍珠',
'settings.pageBg.white': '纯白',
'settings.themeColorLiquid': '暖色液态质感',
'settings.themeLiquid.peach': '蜜桃',
'settings.themeLiquid.apricot': '暖杏',
'settings.themeLiquid.clay': '陶土',
'settings.themeLiquid.rose': '浅玫',
'settings.themeLiquid.lilac': '淡紫',
'settings.themeLiquid.mist': '雾蓝',
'settings.themeLiquid.ocean': '海青',
'settings.themeLiquid.moss': '苔绿',
'settings.themeLiquid.ember': '焰红',
'settings.themeLiquid.rouge': '胭脂',
'settings.appearance': '外观模式',
'settings.appearanceHint': '日间清爽阅读,夜间更护眼',
'settings.theme.light': '日间模式',

View File

@ -90,23 +90,53 @@
>
<a-row :gutter="12">
<a-col :span="12">
<a-form-item :label="t('finance.invoiceManage.drawer.titleName')" required>
<a-input v-model="applyForm.titleName" allow-clear />
<a-form-item
:label="t('finance.invoiceManage.drawer.titleName')"
:extra="t('finance.invoiceManage.profile.titleNameExtra')"
required
>
<a-input
v-model="applyForm.titleName"
allow-clear
:placeholder="t('finance.invoiceManage.profile.titleNamePlaceholder')"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item :label="t('finance.invoiceManage.drawer.taxNo')" required>
<a-input v-model="applyForm.taxNo" allow-clear />
<a-form-item
:label="t('finance.invoiceManage.drawer.taxNo')"
:extra="t('finance.invoiceManage.profile.taxNoExtra')"
required
>
<a-input
v-model="applyForm.taxNo"
allow-clear
:placeholder="t('finance.invoiceManage.profile.taxNoPlaceholder')"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item :label="t('finance.invoiceManage.drawer.addressPhone')">
<a-input v-model="applyForm.addressPhone" allow-clear />
<a-form-item
:label="t('finance.invoiceManage.drawer.addressPhone')"
:extra="t('finance.invoiceManage.profile.addressPhoneExtra')"
>
<a-input
v-model="applyForm.addressPhone"
allow-clear
:placeholder="t('finance.invoiceManage.profile.addressPhonePlaceholder')"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item :label="t('finance.invoiceManage.drawer.bankNameAccount')">
<a-input v-model="applyForm.bankNameAccount" allow-clear />
<a-form-item
:label="t('finance.invoiceManage.drawer.bankNameAccount')"
:extra="t('finance.invoiceManage.profile.bankNameAccountExtra')"
>
<a-input
v-model="applyForm.bankNameAccount"
allow-clear
:placeholder="t('finance.invoiceManage.profile.bankNameAccountPlaceholder')"
/>
</a-form-item>
</a-col>
</a-row>

View File

@ -0,0 +1,177 @@
<template>
<div class="invoice-title-fields">
<div class="invoice-title-guide">
<p class="invoice-title-guide__lead">{{ t('finance.invoiceManage.profile.guide') }}</p>
<div class="invoice-title-sample">
<div class="invoice-title-sample__tag">
{{ t('finance.invoiceManage.profile.exampleCompany') }}
</div>
<ul>
<li>
<span>{{ t('finance.invoiceManage.profile.titleName') }}</span>
{{ t('finance.invoiceManage.profile.exampleTitleName') }}
</li>
<li>
<span>{{ t('finance.invoiceManage.profile.taxNo') }}</span>
{{ t('finance.invoiceManage.profile.exampleTaxNo') }}
</li>
<li>
<span>{{ t('finance.invoiceManage.profile.addressPhone') }}</span>
{{ t('finance.invoiceManage.profile.exampleAddressPhone') }}
</li>
<li>
<span>{{ t('finance.invoiceManage.profile.bankNameAccount') }}</span>
{{ t('finance.invoiceManage.profile.exampleBank') }}
</li>
</ul>
<p class="invoice-title-sample__note">
{{ t('finance.invoiceManage.profile.examplePersonal') }}
</p>
</div>
</div>
<slot />
<a-form-item
:label="t('finance.invoiceManage.profile.titleName')"
:extra="t('finance.invoiceManage.profile.titleNameExtra')"
required
>
<a-input
v-model="model.titleName"
allow-clear
:placeholder="t('finance.invoiceManage.profile.titleNamePlaceholder')"
/>
</a-form-item>
<a-form-item
:label="t('finance.invoiceManage.profile.taxNo')"
:extra="t('finance.invoiceManage.profile.taxNoExtra')"
required
>
<a-input
v-model="model.taxNo"
allow-clear
:placeholder="t('finance.invoiceManage.profile.taxNoPlaceholder')"
/>
</a-form-item>
<a-form-item
:label="t('finance.invoiceManage.profile.addressPhone')"
:extra="t('finance.invoiceManage.profile.addressPhoneExtra')"
>
<a-input
v-model="model.addressPhone"
allow-clear
:placeholder="t('finance.invoiceManage.profile.addressPhonePlaceholder')"
/>
</a-form-item>
<a-form-item
:label="t('finance.invoiceManage.profile.bankNameAccount')"
:extra="t('finance.invoiceManage.profile.bankNameAccountExtra')"
>
<a-input
v-model="model.bankNameAccount"
allow-clear
:placeholder="t('finance.invoiceManage.profile.bankNameAccountPlaceholder')"
/>
</a-form-item>
<a-form-item :extra="t('finance.invoiceManage.profile.isDefaultExtra')">
<a-checkbox v-model="model.isDefault">
{{ t('finance.invoiceManage.profile.isDefault') }}
</a-checkbox>
</a-form-item>
<a-form-item
:label="t('finance.invoiceManage.profile.remark')"
:extra="t('finance.invoiceManage.profile.remarkExtra')"
>
<a-textarea
v-model="model.remark"
allow-clear
:placeholder="t('finance.invoiceManage.profile.remarkPlaceholder')"
:auto-size="{ minRows: 2, maxRows: 4 }"
/>
</a-form-item>
</div>
</template>
<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
export interface InvoiceTitleFormModel {
titleName: string
taxNo: string
addressPhone: string
bankNameAccount: string
isDefault: boolean
remark: string
}
defineProps<{
model: InvoiceTitleFormModel
}>()
const { t } = useI18n()
</script>
<style lang="less" scoped>
.invoice-title-guide {
margin-bottom: 16px;
padding: 12px;
border: 1px solid #e5e6eb;
border-radius: 4px;
background: #f7f8fa;
}
.invoice-title-guide__lead {
margin: 0 0 10px;
color: #4e5969;
font-size: 13px;
line-height: 1.6;
}
.invoice-title-sample {
padding: 10px 12px;
border-radius: 4px;
background: #fff;
}
.invoice-title-sample__tag {
display: inline-block;
margin-bottom: 8px;
padding: 0 6px;
border-radius: 2px;
background: color-mix(in srgb, var(--app-primary-color) 12%, #fff);
color: var(--app-primary-color);
font-size: 12px;
line-height: 20px;
}
.invoice-title-sample ul {
margin: 0;
padding: 0;
list-style: none;
}
.invoice-title-sample li {
display: flex;
gap: 8px;
margin-bottom: 4px;
color: #1d2129;
font-size: 13px;
line-height: 1.5;
word-break: break-all;
}
.invoice-title-sample li span {
flex: 0 0 88px;
color: #86909c;
}
.invoice-title-sample__note {
margin: 8px 0 0;
padding-top: 8px;
border-top: 1px dashed #e5e6eb;
color: #4e5969;
font-size: 12px;
line-height: 1.6;
}
</style>

View File

@ -7,10 +7,7 @@
:items="tabItems"
@change="handleTabChange"
/>
</div>
<div class="filter-bar">
<a-space wrap :size="8">
<a-space wrap :size="8" class="status-tabs-filter">
<a-input
v-model="keyword"
allow-clear
@ -821,11 +818,22 @@ onMounted(() => {
}
.status-tabs {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding-top: 8px;
flex-wrap: wrap;
:deep(.t-tabs) {
flex: 1;
min-width: 0;
}
}
.filter-bar {
padding: 8px 0;
.status-tabs-filter {
flex-shrink: 0;
margin-left: auto;
}
.filter-keyword {
@ -837,6 +845,7 @@ onMounted(() => {
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 0 0;
margin-bottom: 8px;
}

View File

@ -11,13 +11,13 @@
class="invoice-profile-filter-keyword"
@press-enter="handleSearch"
/>
<a-input-number
<a-select
v-model="customerIdFilter"
:placeholder="t('finance.invoiceManage.search.customerIdPlaceholder')"
:min="1"
:precision="0"
allow-clear
hide-button
allow-search
:loading="customerLoading"
:options="customerOptions"
:placeholder="t('finance.invoiceManage.drawer.customerPlaceholder')"
class="invoice-profile-filter-customer"
/>
<a-button class="app-btn-search" @click="handleSearch">
@ -74,43 +74,29 @@
"
:ok-loading="formSaving"
unmount-on-close
width="560px"
width="640px"
:body-style="{ maxHeight: '70vh', overflow: 'auto' }"
@before-ok="handleSave"
@cancel="formVisible = false"
>
<a-form :model="formState" layout="vertical">
<a-form-item :label="t('finance.invoiceManage.drawer.customerId')" required>
<a-input-number
v-model="formState.customerId"
:min="1"
:precision="0"
hide-button
allow-clear
style="width: 100%"
:placeholder="t('finance.invoiceManage.search.customerIdPlaceholder')"
:disabled="!!formState.id"
/>
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.titleName')" required>
<a-input v-model="formState.titleName" allow-clear />
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.taxNo')" required>
<a-input v-model="formState.taxNo" allow-clear />
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.addressPhone')">
<a-input v-model="formState.addressPhone" allow-clear />
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.bankNameAccount')">
<a-input v-model="formState.bankNameAccount" allow-clear />
</a-form-item>
<a-form-item>
<a-checkbox v-model="formState.isDefault">
{{ t('finance.invoiceManage.profile.isDefault') }}
</a-checkbox>
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.remark')">
<a-textarea v-model="formState.remark" :auto-size="{ minRows: 2, maxRows: 4 }" />
</a-form-item>
<a-form :model="formState" layout="vertical" class="invoice-profile-form">
<InvoiceTitleFields :model="formState">
<a-form-item
:label="t('finance.invoiceManage.drawer.customer')"
:extra="t('finance.invoiceManage.profile.customerExtra')"
required
>
<a-select
v-model="formState.customerId"
allow-search
allow-clear
:disabled="!!formState.id"
:loading="customerLoading"
:options="formCustomerOptions"
:placeholder="t('finance.invoiceManage.drawer.customerPlaceholder')"
/>
</a-form-item>
</InvoiceTitleFields>
</a-form>
</a-modal>
</div>
@ -122,7 +108,9 @@ import { useI18n } from 'vue-i18n'
import { Message, Modal } from '@arco-design/web-vue'
import HandsontablePro from '@/components/HandsontablePro/index.vue'
import PaginationPro from '@/components/PaginationPro/index.vue'
import InvoiceTitleFields from '@/views/finance/components/InvoiceTitleFields.vue'
import { useTableContainerHeight } from '@/composables/useTableContainerHeight'
import { useWarehouseAdminCustomer } from '@/composables/useWarehouseAdminCustomer'
import {
deleteInvoiceProfile,
getInvoiceProfileList,
@ -137,6 +125,7 @@ defineOptions({ name: 'FinanceInvoiceProfile' })
const { t } = useI18n()
const { tableContainerRef, tableHeight } = useTableContainerHeight()
const handsontableHeight = computed(() => Math.max(tableHeight.value || 0, 400))
const { customerOptions, customerLoading } = useWarehouseAdminCustomer()
const listLoading = ref(false)
const keyword = ref('')
@ -190,6 +179,7 @@ const hotColumns = computed(() => [
const formVisible = ref(false)
const formSaving = ref(false)
const formCustomerLabel = ref('')
const formState = reactive({
id: 0,
customerId: undefined as number | undefined,
@ -201,6 +191,18 @@ const formState = reactive({
remark: '',
})
const formCustomerOptions = computed(() => {
const options = customerOptions.value.slice()
const id = formState.customerId
if (id && !options.some((item) => item.value === id)) {
options.unshift({
label: formCustomerLabel.value || `#${id}`,
value: id,
})
}
return options
})
function actionRenderer(row: InvoiceProfile): string {
const parts: string[] = []
if (hasPermission('Finance.InvoiceProfile.Update')) {
@ -260,6 +262,11 @@ function handlePageSizeChange(size: number) {
function openForm(row?: InvoiceProfile) {
formState.id = row?.id || 0
formState.customerId = row?.customerId || customerIdFilter.value || undefined
formCustomerLabel.value = row
? [row.customerName, row.customerCode ? `(${row.customerCode})` : '']
.filter(Boolean)
.join(' ')
: ''
formState.titleName = row?.titleName || ''
formState.taxNo = row?.taxNo || ''
formState.addressPhone = row?.addressPhone || ''
@ -399,7 +406,11 @@ onMounted(() => {
}
.invoice-profile-filter-customer {
width: 140px;
width: 220px;
}
.invoice-profile-form :deep(.arco-form-item-extra) {
line-height: 1.5;
}
.list-spin {

View File

@ -20,10 +20,7 @@
<div class="status-tabs">
<SlidingTabs v-model="statusFilter" :items="statusTabs" @change="handleSearch" />
</div>
<div class="filter-bar">
<a-space wrap :size="8">
<a-space wrap :size="8" class="status-tabs-filter">
<a-input
v-model="keyword"
allow-clear
@ -878,11 +875,22 @@ onMounted(() => {
}
.status-tabs {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding-top: 8px;
flex-wrap: wrap;
:deep(.t-tabs) {
flex: 1;
min-width: 0;
}
}
.filter-bar {
padding: 8px 0;
.status-tabs-filter {
flex-shrink: 0;
margin-left: auto;
}
.filter-keyword {
@ -894,6 +902,7 @@ onMounted(() => {
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 0 0;
margin-bottom: 8px;
}

View File

@ -77,11 +77,19 @@
</label>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.drawer.titleName') }}</span>
<input v-model="applyForm.titleName" />
<input
v-model="applyForm.titleName"
:placeholder="t('finance.invoiceManage.profile.titleNamePlaceholder')"
/>
<em>{{ t('finance.invoiceManage.profile.titleNameExtra') }}</em>
</label>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.drawer.taxNo') }}</span>
<input v-model="applyForm.taxNo" />
<input
v-model="applyForm.taxNo"
:placeholder="t('finance.invoiceManage.profile.taxNoPlaceholder')"
/>
<em>{{ t('finance.invoiceManage.profile.taxNoExtra') }}</em>
</label>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.drawer.invoiceType') }}</span>
@ -180,21 +188,46 @@
<span />
</header>
<div class="h5-inv-sheet__body">
<div class="h5-inv-guide">
<p>{{ t('finance.invoiceManage.profile.guide') }}</p>
<p>
{{ t('finance.invoiceManage.profile.exampleCompany') }}:
{{ t('finance.invoiceManage.profile.exampleTitleName') }} /
{{ t('finance.invoiceManage.profile.exampleTaxNo') }}
</p>
<p>{{ t('finance.invoiceManage.profile.examplePersonal') }}</p>
</div>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.profile.titleName') }}</span>
<input v-model="profileForm.titleName" />
<input
v-model="profileForm.titleName"
:placeholder="t('finance.invoiceManage.profile.titleNamePlaceholder')"
/>
<em>{{ t('finance.invoiceManage.profile.titleNameExtra') }}</em>
</label>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.profile.taxNo') }}</span>
<input v-model="profileForm.taxNo" />
<input
v-model="profileForm.taxNo"
:placeholder="t('finance.invoiceManage.profile.taxNoPlaceholder')"
/>
<em>{{ t('finance.invoiceManage.profile.taxNoExtra') }}</em>
</label>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.profile.addressPhone') }}</span>
<input v-model="profileForm.addressPhone" />
<input
v-model="profileForm.addressPhone"
:placeholder="t('finance.invoiceManage.profile.addressPhonePlaceholder')"
/>
<em>{{ t('finance.invoiceManage.profile.addressPhoneExtra') }}</em>
</label>
<label class="h5-inv-field">
<span>{{ t('finance.invoiceManage.profile.bankNameAccount') }}</span>
<input v-model="profileForm.bankNameAccount" />
<input
v-model="profileForm.bankNameAccount"
:placeholder="t('finance.invoiceManage.profile.bankNameAccountPlaceholder')"
/>
<em>{{ t('finance.invoiceManage.profile.bankNameAccountExtra') }}</em>
</label>
<label class="h5-inv-check">
<input v-model="profileForm.isDefault" type="checkbox" />
@ -675,6 +708,24 @@ onMounted(() => {
border-top: 1px solid #eef0f3;
}
.h5-inv-guide {
margin-bottom: 12px;
padding: 10px 12px;
border-radius: 8px;
background: #f7f8fa;
color: #4e5969;
font-size: 12px;
line-height: 1.6;
p {
margin: 0 0 6px;
&:last-child {
margin-bottom: 0;
}
}
}
.h5-inv-field {
display: flex;
flex-direction: column;
@ -691,6 +742,13 @@ onMounted(() => {
border-radius: 8px;
background: #fff;
}
em {
font-style: normal;
color: #86909c;
font-size: 12px;
line-height: 1.5;
}
}
.h5-inv-section {

View File

@ -215,26 +215,7 @@
</template>
<a-form v-else :model="profileForm" layout="vertical" class="profile-form">
<a-form-item :label="t('finance.invoiceManage.profile.titleName')" required>
<a-input v-model="profileForm.titleName" allow-clear />
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.taxNo')" required>
<a-input v-model="profileForm.taxNo" allow-clear />
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.addressPhone')">
<a-input v-model="profileForm.addressPhone" allow-clear />
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.bankNameAccount')">
<a-input v-model="profileForm.bankNameAccount" allow-clear />
</a-form-item>
<a-form-item>
<a-checkbox v-model="profileForm.isDefault">
{{ t('finance.invoiceManage.profile.isDefault') }}
</a-checkbox>
</a-form-item>
<a-form-item :label="t('finance.invoiceManage.profile.remark')">
<a-textarea v-model="profileForm.remark" :auto-size="{ minRows: 2, maxRows: 4 }" />
</a-form-item>
<InvoiceTitleFields :model="profileForm" />
</a-form>
</a-spin>
</a-drawer>
@ -249,6 +230,7 @@ import dayjs from 'dayjs'
import HandsontablePro from '@/components/HandsontablePro/index.vue'
import PaginationPro from '@/components/PaginationPro/index.vue'
import InvoiceApplyPanel from '@/views/finance/components/InvoiceApplyPanel.vue'
import InvoiceTitleFields from '@/views/finance/components/InvoiceTitleFields.vue'
import { useTableContainerHeight } from '@/composables/useTableContainerHeight'
import { renderWarehouseActionBtn, wrapWarehouseActions } from '@/utils/warehouseActionRenderer'
import { buildStatusTagHtml } from '@/utils/statusTag'