@shwfed/config 3.0.12 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.d.vue.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue +264 -286
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue.d.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.d.vue.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue +91 -291
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue.d.ts +8 -8
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.d.ts +3 -28
- package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.js +9 -33
- package/dist/runtime/components/config/index.d.vue.ts +2 -2
- package/dist/runtime/components/config/index.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +26 -26
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +26 -26
- package/dist/runtime/components/form/utils/validation.js +9 -7
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue +57 -247
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/prompt.md +2 -2
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue +21 -124
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.d.ts +5 -27
- package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.js +10 -37
- package/dist/runtime/components/ui/invoice/InvoiceSheet.d.vue.ts +66 -0
- package/dist/runtime/components/ui/invoice/InvoiceSheet.vue +182 -0
- package/dist/runtime/components/ui/invoice/InvoiceSheet.vue.d.ts +66 -0
- package/dist/runtime/components/ui/invoice/index.d.ts +1 -0
- package/dist/runtime/components/ui/invoice/index.js +1 -0
- package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.d.vue.ts +36 -0
- package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.vue +41 -0
- package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.vue.d.ts +36 -0
- package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/expr-field.vue → ui/invoice-config/InvoiceExprField.vue} +4 -4
- package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/json-scope-provider.vue → ui/invoice-config/InvoiceJsonScope.vue} +3 -3
- package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/row-scope-provider.vue → ui/invoice-config/InvoiceRowScope.vue} +2 -2
- package/dist/runtime/components/ui/invoice-config/index.d.ts +4 -0
- package/dist/runtime/components/ui/invoice-config/index.js +4 -0
- package/dist/runtime/share/invoice-eval.d.ts +13 -0
- package/dist/runtime/share/invoice-eval.js +88 -0
- package/dist/runtime/share/invoice.d.ts +68 -0
- package/dist/runtime/share/invoice.js +35 -0
- package/package.json +1 -1
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/expr-field.d.vue.ts → ui/invoice-config/InvoiceExprField.d.vue.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/expr-field.vue.d.ts → ui/invoice-config/InvoiceExprField.vue.d.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/json-scope-provider.d.vue.ts → ui/invoice-config/InvoiceJsonScope.d.vue.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/json-scope-provider.vue.d.ts → ui/invoice-config/InvoiceJsonScope.vue.d.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/row-scope-provider.d.vue.ts → ui/invoice-config/InvoiceRowScope.d.vue.ts} +0 -0
- /package/dist/runtime/components/{config/blocks/2026-07-17/com.shwfed.block.invoice.digital/row-scope-provider.vue.d.ts → ui/invoice-config/InvoiceRowScope.vue.d.ts} +0 -0
- /package/dist/runtime/{components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital → share}/rmb.d.ts +0 -0
- /package/dist/runtime/{components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital → share}/rmb.js +0 -0
package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, ref } from "vue";
|
|
3
|
-
import { Icon } from "@iconify/vue";
|
|
4
3
|
import { Field, FieldLabel } from "../../../../ui/field";
|
|
5
4
|
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
5
|
+
import {
|
|
6
|
+
InvoiceConfigShell,
|
|
7
|
+
InvoiceExprField,
|
|
8
|
+
InvoiceJsonScope,
|
|
9
|
+
InvoiceRowScope
|
|
10
|
+
} from "../../../../ui/invoice-config";
|
|
6
11
|
import { Markdown } from "../../../../ui/markdown";
|
|
7
|
-
import { ScrollArea } from "../../../../ui/scroll-area";
|
|
8
12
|
import {
|
|
9
13
|
Select,
|
|
10
14
|
SelectContent,
|
|
@@ -12,9 +16,6 @@ import {
|
|
|
12
16
|
SelectTrigger,
|
|
13
17
|
SelectValue
|
|
14
18
|
} from "../../../../ui/select";
|
|
15
|
-
import ExprField from "./expr-field.vue";
|
|
16
|
-
import JsonScopeProvider from "./json-scope-provider.vue";
|
|
17
|
-
import RowScopeProvider from "./row-scope-provider.vue";
|
|
18
19
|
import {
|
|
19
20
|
getStructFieldDescription,
|
|
20
21
|
getStructFieldTitle,
|
|
@@ -88,311 +89,288 @@ const kindValue = computed(() => block.value.kind ?? "special");
|
|
|
88
89
|
</script>
|
|
89
90
|
|
|
90
91
|
<template>
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
92
|
+
<InvoiceConfigShell
|
|
93
|
+
v-model:section="section"
|
|
94
|
+
:sections="SECTIONS"
|
|
95
|
+
>
|
|
96
|
+
<template v-if="section === 'general'">
|
|
97
|
+
<Field orientation="vertical">
|
|
98
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
99
|
+
<template
|
|
100
|
+
v-if="fieldDescription('displayName')"
|
|
101
|
+
#tooltip
|
|
102
|
+
>
|
|
103
|
+
<Markdown
|
|
104
|
+
:source="fieldDescription('displayName')"
|
|
105
|
+
block
|
|
106
|
+
class="prose prose-sm prose-zinc"
|
|
107
|
+
/>
|
|
108
|
+
</template>
|
|
109
|
+
{{ fieldTitle("displayName") }}
|
|
110
|
+
</FieldLabel>
|
|
111
|
+
<InputGroup>
|
|
112
|
+
<InputGroupInput
|
|
113
|
+
:model-value="block.displayName ?? ''"
|
|
114
|
+
placeholder="例:进项发票预览"
|
|
115
|
+
@update:model-value="setDisplayName"
|
|
105
116
|
/>
|
|
106
|
-
|
|
117
|
+
</InputGroup>
|
|
118
|
+
</Field>
|
|
119
|
+
|
|
120
|
+
<Field orientation="vertical">
|
|
121
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
122
|
+
<template
|
|
123
|
+
v-if="fieldDescription('kind')"
|
|
124
|
+
#tooltip
|
|
125
|
+
>
|
|
126
|
+
<Markdown
|
|
127
|
+
:source="fieldDescription('kind')"
|
|
128
|
+
block
|
|
129
|
+
class="prose prose-sm prose-zinc"
|
|
130
|
+
/>
|
|
131
|
+
</template>
|
|
132
|
+
{{ fieldTitle("kind") }}
|
|
133
|
+
</FieldLabel>
|
|
134
|
+
<Select
|
|
135
|
+
:model-value="kindValue"
|
|
136
|
+
@update:model-value="setKind"
|
|
137
|
+
>
|
|
138
|
+
<SelectTrigger class="w-full">
|
|
139
|
+
<SelectValue />
|
|
140
|
+
</SelectTrigger>
|
|
141
|
+
<SelectContent>
|
|
142
|
+
<SelectItem
|
|
143
|
+
v-for="k in INVOICE_KINDS"
|
|
144
|
+
:key="k"
|
|
145
|
+
:value="k"
|
|
146
|
+
>
|
|
147
|
+
{{ INVOICE_KIND_LABELS[k] }}
|
|
148
|
+
</SelectItem>
|
|
149
|
+
</SelectContent>
|
|
150
|
+
</Select>
|
|
151
|
+
</Field>
|
|
152
|
+
|
|
153
|
+
<!-- 「请求」在 InvoiceJsonScope 之外 —— 它是产出 `json` 的表达式,自己看不到
|
|
154
|
+
`json`(schema 侧的 `bodyConfigure` 同样不给它注册)。 -->
|
|
155
|
+
<InvoiceExprField
|
|
156
|
+
:label="fieldTitle('request')"
|
|
157
|
+
:description="fieldDescription('request')"
|
|
158
|
+
:model-value="block.request ?? ''"
|
|
159
|
+
placeholder="可选;如 http.get('/api/invoice/' + item.id)"
|
|
160
|
+
multiline
|
|
161
|
+
@update:model-value="(v) => setOptional('request', v)"
|
|
162
|
+
/>
|
|
163
|
+
</template>
|
|
164
|
+
|
|
165
|
+
<!-- 除「通用配置」外的每个分区都在 `json` 作用域内 —— `请求` 的响应体票面各栏
|
|
166
|
+
都能读。Provider 本身不渲染元素,所以外层 flex 布局不受影响。 -->
|
|
167
|
+
<InvoiceJsonScope v-else>
|
|
168
|
+
<template v-if="section === 'head'">
|
|
169
|
+
<InvoiceExprField
|
|
170
|
+
:label="fieldTitle('invoiceNumber')"
|
|
171
|
+
:description="fieldDescription('invoiceNumber')"
|
|
172
|
+
:model-value="block.invoiceNumber"
|
|
173
|
+
placeholder="如 json.fphm"
|
|
174
|
+
@update:model-value="(v) => setRequired('invoiceNumber', v)"
|
|
175
|
+
/>
|
|
176
|
+
<InvoiceExprField
|
|
177
|
+
:label="fieldTitle('issueDate')"
|
|
178
|
+
:description="fieldDescription('issueDate')"
|
|
179
|
+
:model-value="block.issueDate"
|
|
180
|
+
placeholder="如 json.kprq"
|
|
181
|
+
@update:model-value="(v) => setRequired('issueDate', v)"
|
|
182
|
+
/>
|
|
183
|
+
</template>
|
|
184
|
+
|
|
185
|
+
<template v-else-if="section === 'parties'">
|
|
186
|
+
<div class="text-xs font-medium text-zinc-500">
|
|
187
|
+
购买方信息
|
|
107
188
|
</div>
|
|
108
|
-
|
|
109
|
-
|
|
189
|
+
<InvoiceExprField
|
|
190
|
+
:label="buyerTitle('name')"
|
|
191
|
+
:description="buyerDescription('name')"
|
|
192
|
+
:model-value="block.buyer.name"
|
|
193
|
+
placeholder="如 json.gf.mc"
|
|
194
|
+
@update:model-value="(v) => setParty('buyer', 'name', v)"
|
|
195
|
+
/>
|
|
196
|
+
<InvoiceExprField
|
|
197
|
+
:label="buyerTitle('taxId')"
|
|
198
|
+
:description="buyerDescription('taxId')"
|
|
199
|
+
:model-value="block.buyer.taxId"
|
|
200
|
+
placeholder="如 json.gf.nsrsbh"
|
|
201
|
+
@update:model-value="(v) => setParty('buyer', 'taxId', v)"
|
|
202
|
+
/>
|
|
203
|
+
|
|
204
|
+
<div class="mt-2 text-xs font-medium text-zinc-500">
|
|
205
|
+
销售方信息
|
|
206
|
+
</div>
|
|
207
|
+
<InvoiceExprField
|
|
208
|
+
:label="sellerTitle('name')"
|
|
209
|
+
:description="sellerDescription('name')"
|
|
210
|
+
:model-value="block.seller.name"
|
|
211
|
+
placeholder="如 json.xf.mc"
|
|
212
|
+
@update:model-value="(v) => setParty('seller', 'name', v)"
|
|
213
|
+
/>
|
|
214
|
+
<InvoiceExprField
|
|
215
|
+
:label="sellerTitle('taxId')"
|
|
216
|
+
:description="sellerDescription('taxId')"
|
|
217
|
+
:model-value="block.seller.taxId"
|
|
218
|
+
placeholder="如 json.xf.nsrsbh"
|
|
219
|
+
@update:model-value="(v) => setParty('seller', 'taxId', v)"
|
|
220
|
+
/>
|
|
221
|
+
</template>
|
|
110
222
|
|
|
111
|
-
|
|
112
|
-
<div class="flex min-w-0 flex-1 flex-col gap-3">
|
|
113
|
-
<template v-if="section === 'general'">
|
|
223
|
+
<template v-else-if="section === 'items'">
|
|
114
224
|
<Field orientation="vertical">
|
|
115
225
|
<FieldLabel class="text-xs text-zinc-500">
|
|
116
226
|
<template
|
|
117
|
-
v-if="fieldDescription('
|
|
227
|
+
v-if="fieldDescription('itemsMaxHeight')"
|
|
118
228
|
#tooltip
|
|
119
229
|
>
|
|
120
230
|
<Markdown
|
|
121
|
-
:source="fieldDescription('
|
|
231
|
+
:source="fieldDescription('itemsMaxHeight')"
|
|
122
232
|
block
|
|
123
233
|
class="prose prose-sm prose-zinc"
|
|
124
234
|
/>
|
|
125
235
|
</template>
|
|
126
|
-
{{ fieldTitle("
|
|
236
|
+
{{ fieldTitle("itemsMaxHeight") }}
|
|
127
237
|
</FieldLabel>
|
|
128
238
|
<InputGroup>
|
|
129
239
|
<InputGroupInput
|
|
130
|
-
:model-value="block.
|
|
131
|
-
placeholder="
|
|
132
|
-
@update:model-value="
|
|
240
|
+
:model-value="block.itemsMaxHeight ?? ''"
|
|
241
|
+
placeholder="可选;如 24rem。留空则明细区随行数增长"
|
|
242
|
+
@update:model-value="setItemsMaxHeight"
|
|
133
243
|
/>
|
|
134
244
|
</InputGroup>
|
|
135
245
|
</Field>
|
|
136
246
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<Markdown
|
|
144
|
-
:source="fieldDescription('kind')"
|
|
145
|
-
block
|
|
146
|
-
class="prose prose-sm prose-zinc"
|
|
147
|
-
/>
|
|
148
|
-
</template>
|
|
149
|
-
{{ fieldTitle("kind") }}
|
|
150
|
-
</FieldLabel>
|
|
151
|
-
<Select
|
|
152
|
-
:model-value="kindValue"
|
|
153
|
-
@update:model-value="setKind"
|
|
154
|
-
>
|
|
155
|
-
<SelectTrigger class="w-full">
|
|
156
|
-
<SelectValue />
|
|
157
|
-
</SelectTrigger>
|
|
158
|
-
<SelectContent>
|
|
159
|
-
<SelectItem
|
|
160
|
-
v-for="k in INVOICE_KINDS"
|
|
161
|
-
:key="k"
|
|
162
|
-
:value="k"
|
|
163
|
-
>
|
|
164
|
-
{{ INVOICE_KIND_LABELS[k] }}
|
|
165
|
-
</SelectItem>
|
|
166
|
-
</SelectContent>
|
|
167
|
-
</Select>
|
|
168
|
-
</Field>
|
|
169
|
-
|
|
170
|
-
<!-- 「请求」在 JsonScopeProvider 之外 —— 它是产出 `json` 的表达式,自己看不到
|
|
171
|
-
`json`(schema 侧的 `bodyConfigure` 同样不给它注册)。 -->
|
|
172
|
-
<ExprField
|
|
173
|
-
:label="fieldTitle('request')"
|
|
174
|
-
:description="fieldDescription('request')"
|
|
175
|
-
:model-value="block.request ?? ''"
|
|
176
|
-
placeholder="可选;如 http.get('/api/invoice/' + item.id)"
|
|
247
|
+
<!-- `明细列表` 在页面作用域求值(没有「当前行」),故在 InvoiceRowScope 之外 -->
|
|
248
|
+
<InvoiceExprField
|
|
249
|
+
:label="fieldTitle('items')"
|
|
250
|
+
:description="fieldDescription('items')"
|
|
251
|
+
:model-value="block.items"
|
|
252
|
+
placeholder="返回明细列表的表达式,如 json.mxList"
|
|
177
253
|
multiline
|
|
178
|
-
@update:model-value="(v) =>
|
|
254
|
+
@update:model-value="(v) => setRequired('items', v)"
|
|
179
255
|
/>
|
|
180
|
-
</template>
|
|
181
|
-
|
|
182
|
-
<!-- 除「通用配置」外的每个分区都在 `json` 作用域内 —— `请求` 的响应体票面各栏
|
|
183
|
-
都能读。Provider 本身不渲染元素,所以外层 flex 布局不受影响。 -->
|
|
184
|
-
<JsonScopeProvider v-else>
|
|
185
|
-
<template v-if="section === 'head'">
|
|
186
|
-
<ExprField
|
|
187
|
-
:label="fieldTitle('invoiceNumber')"
|
|
188
|
-
:description="fieldDescription('invoiceNumber')"
|
|
189
|
-
:model-value="block.invoiceNumber"
|
|
190
|
-
placeholder="如 json.fphm"
|
|
191
|
-
@update:model-value="(v) => setRequired('invoiceNumber', v)"
|
|
192
|
-
/>
|
|
193
|
-
<ExprField
|
|
194
|
-
:label="fieldTitle('issueDate')"
|
|
195
|
-
:description="fieldDescription('issueDate')"
|
|
196
|
-
:model-value="block.issueDate"
|
|
197
|
-
placeholder="如 json.kprq"
|
|
198
|
-
@update:model-value="(v) => setRequired('issueDate', v)"
|
|
199
|
-
/>
|
|
200
|
-
</template>
|
|
201
|
-
|
|
202
|
-
<template v-else-if="section === 'parties'">
|
|
203
|
-
<div class="text-xs font-medium text-zinc-500">
|
|
204
|
-
购买方信息
|
|
205
|
-
</div>
|
|
206
|
-
<ExprField
|
|
207
|
-
:label="buyerTitle('name')"
|
|
208
|
-
:description="buyerDescription('name')"
|
|
209
|
-
:model-value="block.buyer.name"
|
|
210
|
-
placeholder="如 json.gf.mc"
|
|
211
|
-
@update:model-value="(v) => setParty('buyer', 'name', v)"
|
|
212
|
-
/>
|
|
213
|
-
<ExprField
|
|
214
|
-
:label="buyerTitle('taxId')"
|
|
215
|
-
:description="buyerDescription('taxId')"
|
|
216
|
-
:model-value="block.buyer.taxId"
|
|
217
|
-
placeholder="如 json.gf.nsrsbh"
|
|
218
|
-
@update:model-value="(v) => setParty('buyer', 'taxId', v)"
|
|
219
|
-
/>
|
|
220
|
-
|
|
221
|
-
<div class="mt-2 text-xs font-medium text-zinc-500">
|
|
222
|
-
销售方信息
|
|
223
|
-
</div>
|
|
224
|
-
<ExprField
|
|
225
|
-
:label="sellerTitle('name')"
|
|
226
|
-
:description="sellerDescription('name')"
|
|
227
|
-
:model-value="block.seller.name"
|
|
228
|
-
placeholder="如 json.xf.mc"
|
|
229
|
-
@update:model-value="(v) => setParty('seller', 'name', v)"
|
|
230
|
-
/>
|
|
231
|
-
<ExprField
|
|
232
|
-
:label="sellerTitle('taxId')"
|
|
233
|
-
:description="sellerDescription('taxId')"
|
|
234
|
-
:model-value="block.seller.taxId"
|
|
235
|
-
placeholder="如 json.xf.nsrsbh"
|
|
236
|
-
@update:model-value="(v) => setParty('seller', 'taxId', v)"
|
|
237
|
-
/>
|
|
238
|
-
</template>
|
|
239
256
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
#tooltip
|
|
246
|
-
>
|
|
247
|
-
<Markdown
|
|
248
|
-
:source="fieldDescription('itemsMaxHeight')"
|
|
249
|
-
block
|
|
250
|
-
class="prose prose-sm prose-zinc"
|
|
251
|
-
/>
|
|
252
|
-
</template>
|
|
253
|
-
{{ fieldTitle("itemsMaxHeight") }}
|
|
254
|
-
</FieldLabel>
|
|
255
|
-
<InputGroup>
|
|
256
|
-
<InputGroupInput
|
|
257
|
-
:model-value="block.itemsMaxHeight ?? ''"
|
|
258
|
-
placeholder="可选;如 24rem。留空则明细区随行数增长"
|
|
259
|
-
@update:model-value="setItemsMaxHeight"
|
|
260
|
-
/>
|
|
261
|
-
</InputGroup>
|
|
262
|
-
</Field>
|
|
263
|
-
|
|
264
|
-
<!-- `明细列表` 在页面作用域求值(没有「当前行」),故在 RowScopeProvider 之外 -->
|
|
265
|
-
<ExprField
|
|
266
|
-
:label="fieldTitle('items')"
|
|
267
|
-
:description="fieldDescription('items')"
|
|
268
|
-
:model-value="block.items"
|
|
269
|
-
placeholder="返回明细列表的表达式,如 json.mxList"
|
|
270
|
-
multiline
|
|
271
|
-
@update:model-value="(v) => setRequired('items', v)"
|
|
272
|
-
/>
|
|
273
|
-
|
|
274
|
-
<!-- 行内栏位可见 item / index;广告作用域与 schema 的 lineSchema 一致 -->
|
|
275
|
-
<RowScopeProvider>
|
|
276
|
-
<div class="flex flex-col gap-3">
|
|
277
|
-
<div class="text-xs font-medium text-zinc-500">
|
|
278
|
-
明细行
|
|
279
|
-
</div>
|
|
280
|
-
<ExprField
|
|
281
|
-
:label="lineTitle('name')"
|
|
282
|
-
:description="lineDescription('name')"
|
|
283
|
-
:model-value="block.line.name"
|
|
284
|
-
placeholder="如 item.xmmc"
|
|
285
|
-
@update:model-value="(v) => setLineRequired('name', v)"
|
|
286
|
-
/>
|
|
287
|
-
<ExprField
|
|
288
|
-
:label="lineTitle('spec')"
|
|
289
|
-
:description="lineDescription('spec')"
|
|
290
|
-
:model-value="block.line.spec ?? ''"
|
|
291
|
-
placeholder="可选;如 item.ggxh"
|
|
292
|
-
@update:model-value="(v) => setLineOptional('spec', v)"
|
|
293
|
-
/>
|
|
294
|
-
<ExprField
|
|
295
|
-
:label="lineTitle('unit')"
|
|
296
|
-
:description="lineDescription('unit')"
|
|
297
|
-
:model-value="block.line.unit ?? ''"
|
|
298
|
-
placeholder="可选;如 item.dw"
|
|
299
|
-
@update:model-value="(v) => setLineOptional('unit', v)"
|
|
300
|
-
/>
|
|
301
|
-
<ExprField
|
|
302
|
-
:label="lineTitle('quantity')"
|
|
303
|
-
:description="lineDescription('quantity')"
|
|
304
|
-
:model-value="block.line.quantity ?? ''"
|
|
305
|
-
placeholder="可选;如 item.sl"
|
|
306
|
-
@update:model-value="(v) => setLineOptional('quantity', v)"
|
|
307
|
-
/>
|
|
308
|
-
<ExprField
|
|
309
|
-
:label="lineTitle('unitPrice')"
|
|
310
|
-
:description="lineDescription('unitPrice')"
|
|
311
|
-
:model-value="block.line.unitPrice ?? ''"
|
|
312
|
-
placeholder="可选;如 item.dj"
|
|
313
|
-
@update:model-value="(v) => setLineOptional('unitPrice', v)"
|
|
314
|
-
/>
|
|
315
|
-
<ExprField
|
|
316
|
-
:label="lineTitle('amount')"
|
|
317
|
-
:description="lineDescription('amount')"
|
|
318
|
-
:model-value="block.line.amount"
|
|
319
|
-
placeholder="如 item.je"
|
|
320
|
-
@update:model-value="(v) => setLineRequired('amount', v)"
|
|
321
|
-
/>
|
|
322
|
-
<ExprField
|
|
323
|
-
:label="lineTitle('taxRate')"
|
|
324
|
-
:description="lineDescription('taxRate')"
|
|
325
|
-
:model-value="block.line.taxRate ?? ''"
|
|
326
|
-
placeholder="可选;如 item.slv(原样打印,可为「免税」)"
|
|
327
|
-
@update:model-value="(v) => setLineOptional('taxRate', v)"
|
|
328
|
-
/>
|
|
329
|
-
<ExprField
|
|
330
|
-
:label="lineTitle('taxAmount')"
|
|
331
|
-
:description="lineDescription('taxAmount')"
|
|
332
|
-
:model-value="block.line.taxAmount ?? ''"
|
|
333
|
-
placeholder="可选;如 item.se"
|
|
334
|
-
@update:model-value="(v) => setLineOptional('taxAmount', v)"
|
|
335
|
-
/>
|
|
257
|
+
<!-- 行内栏位可见 item / index;广告作用域与 schema 的 lineSchema 一致 -->
|
|
258
|
+
<InvoiceRowScope>
|
|
259
|
+
<div class="flex flex-col gap-3">
|
|
260
|
+
<div class="text-xs font-medium text-zinc-500">
|
|
261
|
+
明细行
|
|
336
262
|
</div>
|
|
337
|
-
|
|
338
|
-
|
|
263
|
+
<InvoiceExprField
|
|
264
|
+
:label="lineTitle('name')"
|
|
265
|
+
:description="lineDescription('name')"
|
|
266
|
+
:model-value="block.line.name"
|
|
267
|
+
placeholder="如 item.xmmc"
|
|
268
|
+
@update:model-value="(v) => setLineRequired('name', v)"
|
|
269
|
+
/>
|
|
270
|
+
<InvoiceExprField
|
|
271
|
+
:label="lineTitle('spec')"
|
|
272
|
+
:description="lineDescription('spec')"
|
|
273
|
+
:model-value="block.line.spec ?? ''"
|
|
274
|
+
placeholder="可选;如 item.ggxh"
|
|
275
|
+
@update:model-value="(v) => setLineOptional('spec', v)"
|
|
276
|
+
/>
|
|
277
|
+
<InvoiceExprField
|
|
278
|
+
:label="lineTitle('unit')"
|
|
279
|
+
:description="lineDescription('unit')"
|
|
280
|
+
:model-value="block.line.unit ?? ''"
|
|
281
|
+
placeholder="可选;如 item.dw"
|
|
282
|
+
@update:model-value="(v) => setLineOptional('unit', v)"
|
|
283
|
+
/>
|
|
284
|
+
<InvoiceExprField
|
|
285
|
+
:label="lineTitle('quantity')"
|
|
286
|
+
:description="lineDescription('quantity')"
|
|
287
|
+
:model-value="block.line.quantity ?? ''"
|
|
288
|
+
placeholder="可选;如 item.sl"
|
|
289
|
+
@update:model-value="(v) => setLineOptional('quantity', v)"
|
|
290
|
+
/>
|
|
291
|
+
<InvoiceExprField
|
|
292
|
+
:label="lineTitle('unitPrice')"
|
|
293
|
+
:description="lineDescription('unitPrice')"
|
|
294
|
+
:model-value="block.line.unitPrice ?? ''"
|
|
295
|
+
placeholder="可选;如 item.dj"
|
|
296
|
+
@update:model-value="(v) => setLineOptional('unitPrice', v)"
|
|
297
|
+
/>
|
|
298
|
+
<InvoiceExprField
|
|
299
|
+
:label="lineTitle('amount')"
|
|
300
|
+
:description="lineDescription('amount')"
|
|
301
|
+
:model-value="block.line.amount"
|
|
302
|
+
placeholder="如 item.je"
|
|
303
|
+
@update:model-value="(v) => setLineRequired('amount', v)"
|
|
304
|
+
/>
|
|
305
|
+
<InvoiceExprField
|
|
306
|
+
:label="lineTitle('taxRate')"
|
|
307
|
+
:description="lineDescription('taxRate')"
|
|
308
|
+
:model-value="block.line.taxRate ?? ''"
|
|
309
|
+
placeholder="可选;如 item.slv(原样打印,可为「免税」)"
|
|
310
|
+
@update:model-value="(v) => setLineOptional('taxRate', v)"
|
|
311
|
+
/>
|
|
312
|
+
<InvoiceExprField
|
|
313
|
+
:label="lineTitle('taxAmount')"
|
|
314
|
+
:description="lineDescription('taxAmount')"
|
|
315
|
+
:model-value="block.line.taxAmount ?? ''"
|
|
316
|
+
placeholder="可选;如 item.se"
|
|
317
|
+
@update:model-value="(v) => setLineOptional('taxAmount', v)"
|
|
318
|
+
/>
|
|
319
|
+
</div>
|
|
320
|
+
</InvoiceRowScope>
|
|
321
|
+
</template>
|
|
339
322
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
323
|
+
<template v-else-if="section === 'totals'">
|
|
324
|
+
<InvoiceExprField
|
|
325
|
+
:label="fieldTitle('totalAmount')"
|
|
326
|
+
:description="fieldDescription('totalAmount')"
|
|
327
|
+
:model-value="block.totalAmount"
|
|
328
|
+
placeholder="如 json.hjje"
|
|
329
|
+
@update:model-value="(v) => setRequired('totalAmount', v)"
|
|
330
|
+
/>
|
|
331
|
+
<InvoiceExprField
|
|
332
|
+
:label="fieldTitle('totalTax')"
|
|
333
|
+
:description="fieldDescription('totalTax')"
|
|
334
|
+
:model-value="block.totalTax"
|
|
335
|
+
placeholder="如 json.hjse"
|
|
336
|
+
@update:model-value="(v) => setRequired('totalTax', v)"
|
|
337
|
+
/>
|
|
338
|
+
<InvoiceExprField
|
|
339
|
+
:label="fieldTitle('grandTotal')"
|
|
340
|
+
:description="fieldDescription('grandTotal')"
|
|
341
|
+
:model-value="block.grandTotal"
|
|
342
|
+
placeholder="如 json.jshj"
|
|
343
|
+
@update:model-value="(v) => setRequired('grandTotal', v)"
|
|
344
|
+
/>
|
|
345
|
+
<p class="text-xs text-zinc-400">
|
|
346
|
+
大写栏由「价税合计」本地推导,无需配置。
|
|
347
|
+
</p>
|
|
348
|
+
</template>
|
|
366
349
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
</div>
|
|
350
|
+
<template v-else-if="section === 'remark'">
|
|
351
|
+
<InvoiceExprField
|
|
352
|
+
:label="fieldTitle('remark')"
|
|
353
|
+
:description="fieldDescription('remark')"
|
|
354
|
+
:model-value="block.remark ?? ''"
|
|
355
|
+
placeholder="可选;如 json.bz。开户行、账号、红字确认单编号均属此栏"
|
|
356
|
+
multiline
|
|
357
|
+
@update:model-value="(v) => setOptional('remark', v)"
|
|
358
|
+
/>
|
|
359
|
+
<InvoiceExprField
|
|
360
|
+
:label="fieldTitle('issuer')"
|
|
361
|
+
:description="fieldDescription('issuer')"
|
|
362
|
+
:model-value="block.issuer ?? ''"
|
|
363
|
+
placeholder="可选;如 json.kpr"
|
|
364
|
+
@update:model-value="(v) => setOptional('issuer', v)"
|
|
365
|
+
/>
|
|
366
|
+
<InvoiceExprField
|
|
367
|
+
:label="fieldTitle('redLetter')"
|
|
368
|
+
:description="fieldDescription('redLetter')"
|
|
369
|
+
:model-value="block.redLetter ?? ''"
|
|
370
|
+
placeholder="可选;返回 bool,如 json.jshj < 0.0"
|
|
371
|
+
@update:model-value="(v) => setOptional('redLetter', v)"
|
|
372
|
+
/>
|
|
373
|
+
</template>
|
|
374
|
+
</InvoiceJsonScope>
|
|
375
|
+
</InvoiceConfigShell>
|
|
394
376
|
</template>
|
|
395
|
-
|
|
396
|
-
<style scoped>
|
|
397
|
-
.row{align-items:center;border-radius:.25rem;cursor:pointer;display:flex;font-size:.875rem;gap:.375rem;padding-block:.375rem;padding-left:.5rem;padding-right:.5rem;position:relative;transition:background-color .1s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}
|
|
398
|
-
</style>
|
|
@@ -26,7 +26,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
readonly compatibilityDate: "2026-07-17";
|
|
27
27
|
readonly items: string;
|
|
28
28
|
readonly request?: string | undefined;
|
|
29
|
-
readonly itemsMaxHeight?: string | undefined;
|
|
30
29
|
readonly invoiceNumber: string;
|
|
31
30
|
readonly issueDate: string;
|
|
32
31
|
readonly buyer: {
|
|
@@ -37,12 +36,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
37
36
|
readonly name: string;
|
|
38
37
|
readonly taxId: string;
|
|
39
38
|
};
|
|
40
|
-
readonly totalAmount: string;
|
|
41
|
-
readonly totalTax: string;
|
|
42
39
|
readonly grandTotal: string;
|
|
43
|
-
readonly remark?: string | undefined;
|
|
44
40
|
readonly issuer?: string | undefined;
|
|
45
41
|
readonly redLetter?: string | undefined;
|
|
42
|
+
readonly itemsMaxHeight?: string | undefined;
|
|
43
|
+
readonly remark?: string | undefined;
|
|
44
|
+
readonly totalAmount: string;
|
|
45
|
+
readonly totalTax: string;
|
|
46
46
|
}) => any;
|
|
47
47
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
48
48
|
"onUpdate:modelValue"?: ((value: {
|
|
@@ -63,7 +63,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
63
63
|
readonly compatibilityDate: "2026-07-17";
|
|
64
64
|
readonly items: string;
|
|
65
65
|
readonly request?: string | undefined;
|
|
66
|
-
readonly itemsMaxHeight?: string | undefined;
|
|
67
66
|
readonly invoiceNumber: string;
|
|
68
67
|
readonly issueDate: string;
|
|
69
68
|
readonly buyer: {
|
|
@@ -74,12 +73,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
74
73
|
readonly name: string;
|
|
75
74
|
readonly taxId: string;
|
|
76
75
|
};
|
|
77
|
-
readonly totalAmount: string;
|
|
78
|
-
readonly totalTax: string;
|
|
79
76
|
readonly grandTotal: string;
|
|
80
|
-
readonly remark?: string | undefined;
|
|
81
77
|
readonly issuer?: string | undefined;
|
|
82
78
|
readonly redLetter?: string | undefined;
|
|
79
|
+
readonly itemsMaxHeight?: string | undefined;
|
|
80
|
+
readonly remark?: string | undefined;
|
|
81
|
+
readonly totalAmount: string;
|
|
82
|
+
readonly totalTax: string;
|
|
83
83
|
}) => any) | undefined;
|
|
84
84
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
85
85
|
declare const _default: typeof __VLS_export;
|