@shwfed/config 3.0.11 → 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.
Files changed (98) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.d.vue.ts +18 -18
  3. package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.vue.d.ts +18 -18
  4. package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.d.vue.ts +18 -18
  5. package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue.d.ts +18 -18
  6. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.d.vue.ts +86 -0
  7. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue +376 -0
  8. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/config.vue.d.ts +86 -0
  9. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/items-colgroup.d.vue.ts +3 -0
  10. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/items-colgroup.vue +20 -0
  11. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/items-colgroup.vue.d.ts +3 -0
  12. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.d.vue.ts +86 -0
  13. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue +146 -0
  14. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/runtime.vue.d.ts +86 -0
  15. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.d.ts +84 -0
  16. package/dist/runtime/components/config/blocks/2026-07-17/com.shwfed.block.invoice.digital/schema.js +165 -0
  17. package/dist/runtime/components/config/index.d.vue.ts +2 -2
  18. package/dist/runtime/components/config/index.vue.d.ts +2 -2
  19. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.d.vue.ts +16 -16
  20. package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.combobox.single/config.vue.d.ts +16 -16
  21. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
  22. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
  23. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
  24. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
  25. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
  26. package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
  27. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.d.vue.ts +16 -16
  28. package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/config.vue.d.ts +16 -16
  29. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
  30. package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
  31. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
  32. package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
  33. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.d.vue.ts +16 -16
  34. package/dist/runtime/components/form/fields/2026-05-25/com.shwfed.form.field.combobox.multi/config.vue.d.ts +16 -16
  35. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
  36. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
  37. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
  38. package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
  39. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +26 -26
  40. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +26 -26
  41. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +26 -26
  42. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +26 -26
  43. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +26 -26
  44. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +26 -26
  45. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +26 -26
  46. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +26 -26
  47. package/dist/runtime/components/form/utils/validation.js +9 -7
  48. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
  49. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
  50. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
  51. package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
  52. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
  53. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
  54. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
  55. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
  56. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
  57. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
  58. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
  59. package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
  60. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/config.vue +57 -247
  61. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/prompt.md +2 -2
  62. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/runtime.vue +21 -124
  63. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.d.ts +5 -27
  64. package/dist/runtime/components/table/columns/2026-07-16/com.shwfed.table.column.upload/schema.js +10 -37
  65. package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
  66. package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
  67. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
  68. package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
  69. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
  70. package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
  71. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
  72. package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
  73. package/dist/runtime/components/ui/invoice/InvoiceSheet.d.vue.ts +66 -0
  74. package/dist/runtime/components/ui/invoice/InvoiceSheet.vue +182 -0
  75. package/dist/runtime/components/ui/invoice/InvoiceSheet.vue.d.ts +66 -0
  76. package/dist/runtime/components/ui/invoice/index.d.ts +1 -0
  77. package/dist/runtime/components/ui/invoice/index.js +1 -0
  78. package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.d.vue.ts +36 -0
  79. package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.vue +41 -0
  80. package/dist/runtime/components/ui/invoice-config/InvoiceConfigShell.vue.d.ts +36 -0
  81. package/dist/runtime/components/ui/invoice-config/InvoiceExprField.d.vue.ts +14 -0
  82. package/dist/runtime/components/ui/invoice-config/InvoiceExprField.vue +39 -0
  83. package/dist/runtime/components/ui/invoice-config/InvoiceExprField.vue.d.ts +14 -0
  84. package/dist/runtime/components/ui/invoice-config/InvoiceJsonScope.d.vue.ts +13 -0
  85. package/dist/runtime/components/ui/invoice-config/InvoiceJsonScope.vue +19 -0
  86. package/dist/runtime/components/ui/invoice-config/InvoiceJsonScope.vue.d.ts +13 -0
  87. package/dist/runtime/components/ui/invoice-config/InvoiceRowScope.d.vue.ts +13 -0
  88. package/dist/runtime/components/ui/invoice-config/InvoiceRowScope.vue +22 -0
  89. package/dist/runtime/components/ui/invoice-config/InvoiceRowScope.vue.d.ts +13 -0
  90. package/dist/runtime/components/ui/invoice-config/index.d.ts +4 -0
  91. package/dist/runtime/components/ui/invoice-config/index.js +4 -0
  92. package/dist/runtime/share/invoice-eval.d.ts +13 -0
  93. package/dist/runtime/share/invoice-eval.js +88 -0
  94. package/dist/runtime/share/invoice.d.ts +68 -0
  95. package/dist/runtime/share/invoice.js +35 -0
  96. package/dist/runtime/share/rmb.d.ts +11 -0
  97. package/dist/runtime/share/rmb.js +58 -0
  98. package/package.json +1 -1
@@ -0,0 +1,376 @@
1
+ <script setup>
2
+ import { computed, ref } from "vue";
3
+ import { Field, FieldLabel } from "../../../../ui/field";
4
+ import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
5
+ import {
6
+ InvoiceConfigShell,
7
+ InvoiceExprField,
8
+ InvoiceJsonScope,
9
+ InvoiceRowScope
10
+ } from "../../../../ui/invoice-config";
11
+ import { Markdown } from "../../../../ui/markdown";
12
+ import {
13
+ Select,
14
+ SelectContent,
15
+ SelectItem,
16
+ SelectTrigger,
17
+ SelectValue
18
+ } from "../../../../ui/select";
19
+ import {
20
+ getStructFieldDescription,
21
+ getStructFieldTitle,
22
+ INVOICE_KINDS,
23
+ INVOICE_KIND_LABELS,
24
+ lineSchema,
25
+ partySchema,
26
+ schema
27
+ } from "./schema";
28
+ defineOptions({ name: "ShwfedBlockInvoiceDigitalConfig" });
29
+ const block = defineModel({ type: null, ...{ required: true } });
30
+ defineProps({
31
+ configure: { type: Function, required: false }
32
+ });
33
+ const blockSchema = schema(() => {
34
+ });
35
+ const buyerSchema = partySchema(() => {
36
+ }, "\u8D2D\u4E70\u65B9");
37
+ const sellerSchema = partySchema(() => {
38
+ }, "\u9500\u552E\u65B9");
39
+ const lineSchemaObj = lineSchema(() => {
40
+ });
41
+ const fieldTitle = (f) => getStructFieldTitle(blockSchema, f) ?? f;
42
+ const fieldDescription = (f) => getStructFieldDescription(blockSchema, f);
43
+ const buyerTitle = (f) => getStructFieldTitle(buyerSchema, f) ?? f;
44
+ const buyerDescription = (f) => getStructFieldDescription(buyerSchema, f);
45
+ const sellerTitle = (f) => getStructFieldTitle(sellerSchema, f) ?? f;
46
+ const sellerDescription = (f) => getStructFieldDescription(sellerSchema, f);
47
+ const lineTitle = (f) => getStructFieldTitle(lineSchemaObj, f) ?? f;
48
+ const lineDescription = (f) => getStructFieldDescription(lineSchemaObj, f);
49
+ const SECTIONS = [
50
+ { key: "general", label: "\u901A\u7528\u914D\u7F6E", icon: "fluent:settings-20-regular" },
51
+ { key: "head", label: "\u62AC\u5934", icon: "fluent:receipt-20-regular" },
52
+ { key: "parties", label: "\u8D2D\u9500\u53CC\u65B9", icon: "fluent:people-20-regular" },
53
+ { key: "items", label: "\u660E\u7EC6", icon: "fluent:apps-list-20-regular" },
54
+ { key: "totals", label: "\u5408\u8BA1", icon: "fluent:calculator-20-regular" },
55
+ { key: "remark", label: "\u5907\u6CE8\u4E0E\u7B7E\u53D1", icon: "fluent:note-20-regular" }
56
+ ];
57
+ const section = ref("general");
58
+ function setDisplayName(v) {
59
+ const s = String(v ?? "");
60
+ block.value = { ...block.value, displayName: s.length > 0 ? s : void 0 };
61
+ }
62
+ function setKind(v) {
63
+ const k = v;
64
+ block.value = { ...block.value, kind: k === "special" ? void 0 : k };
65
+ }
66
+ function setRequired(field, v) {
67
+ block.value = { ...block.value, [field]: v };
68
+ }
69
+ function setOptional(field, v) {
70
+ block.value = { ...block.value, [field]: v.trim().length > 0 ? v : void 0 };
71
+ }
72
+ function setItemsMaxHeight(v) {
73
+ const s = String(v ?? "").trim();
74
+ block.value = { ...block.value, itemsMaxHeight: s.length > 0 ? s : void 0 };
75
+ }
76
+ function setParty(party, field, v) {
77
+ block.value = { ...block.value, [party]: { ...block.value[party], [field]: v } };
78
+ }
79
+ function setLineRequired(field, v) {
80
+ block.value = { ...block.value, line: { ...block.value.line, [field]: v } };
81
+ }
82
+ function setLineOptional(field, v) {
83
+ block.value = {
84
+ ...block.value,
85
+ line: { ...block.value.line, [field]: v.trim().length > 0 ? v : void 0 }
86
+ };
87
+ }
88
+ const kindValue = computed(() => block.value.kind ?? "special");
89
+ </script>
90
+
91
+ <template>
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"
116
+ />
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
+ 购买方信息
188
+ </div>
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>
222
+
223
+ <template v-else-if="section === 'items'">
224
+ <Field orientation="vertical">
225
+ <FieldLabel class="text-xs text-zinc-500">
226
+ <template
227
+ v-if="fieldDescription('itemsMaxHeight')"
228
+ #tooltip
229
+ >
230
+ <Markdown
231
+ :source="fieldDescription('itemsMaxHeight')"
232
+ block
233
+ class="prose prose-sm prose-zinc"
234
+ />
235
+ </template>
236
+ {{ fieldTitle("itemsMaxHeight") }}
237
+ </FieldLabel>
238
+ <InputGroup>
239
+ <InputGroupInput
240
+ :model-value="block.itemsMaxHeight ?? ''"
241
+ placeholder="可选;如 24rem。留空则明细区随行数增长"
242
+ @update:model-value="setItemsMaxHeight"
243
+ />
244
+ </InputGroup>
245
+ </Field>
246
+
247
+ <!-- `明细列表` 在页面作用域求值(没有「当前行」),故在 InvoiceRowScope 之外 -->
248
+ <InvoiceExprField
249
+ :label="fieldTitle('items')"
250
+ :description="fieldDescription('items')"
251
+ :model-value="block.items"
252
+ placeholder="返回明细列表的表达式,如 json.mxList"
253
+ multiline
254
+ @update:model-value="(v) => setRequired('items', v)"
255
+ />
256
+
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
+ 明细行
262
+ </div>
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>
322
+
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>
349
+
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>
376
+ </template>
@@ -0,0 +1,86 @@
1
+ import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
2
+ import { type Value } from './schema.js';
3
+ type __VLS_Props = {
4
+ configure?: (env: Environment) => void;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ modelValue: Value;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: {
12
+ readonly type: "com.shwfed.block.invoice.digital";
13
+ readonly id: string;
14
+ readonly line: {
15
+ readonly name: string;
16
+ readonly spec?: string | undefined;
17
+ readonly unit?: string | undefined;
18
+ readonly quantity?: string | undefined;
19
+ readonly unitPrice?: string | undefined;
20
+ readonly amount: string;
21
+ readonly taxRate?: string | undefined;
22
+ readonly taxAmount?: string | undefined;
23
+ };
24
+ readonly displayName?: string | undefined;
25
+ readonly kind?: "normal" | "special" | undefined;
26
+ readonly compatibilityDate: "2026-07-17";
27
+ readonly items: string;
28
+ readonly request?: string | undefined;
29
+ readonly invoiceNumber: string;
30
+ readonly issueDate: string;
31
+ readonly buyer: {
32
+ readonly name: string;
33
+ readonly taxId: string;
34
+ };
35
+ readonly seller: {
36
+ readonly name: string;
37
+ readonly taxId: string;
38
+ };
39
+ readonly grandTotal: string;
40
+ readonly issuer?: string | undefined;
41
+ readonly redLetter?: string | undefined;
42
+ readonly itemsMaxHeight?: string | undefined;
43
+ readonly remark?: string | undefined;
44
+ readonly totalAmount: string;
45
+ readonly totalTax: string;
46
+ }) => any;
47
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
48
+ "onUpdate:modelValue"?: ((value: {
49
+ readonly type: "com.shwfed.block.invoice.digital";
50
+ readonly id: string;
51
+ readonly line: {
52
+ readonly name: string;
53
+ readonly spec?: string | undefined;
54
+ readonly unit?: string | undefined;
55
+ readonly quantity?: string | undefined;
56
+ readonly unitPrice?: string | undefined;
57
+ readonly amount: string;
58
+ readonly taxRate?: string | undefined;
59
+ readonly taxAmount?: string | undefined;
60
+ };
61
+ readonly displayName?: string | undefined;
62
+ readonly kind?: "normal" | "special" | undefined;
63
+ readonly compatibilityDate: "2026-07-17";
64
+ readonly items: string;
65
+ readonly request?: string | undefined;
66
+ readonly invoiceNumber: string;
67
+ readonly issueDate: string;
68
+ readonly buyer: {
69
+ readonly name: string;
70
+ readonly taxId: string;
71
+ };
72
+ readonly seller: {
73
+ readonly name: string;
74
+ readonly taxId: string;
75
+ };
76
+ readonly grandTotal: string;
77
+ readonly issuer?: string | undefined;
78
+ readonly redLetter?: string | undefined;
79
+ readonly itemsMaxHeight?: string | undefined;
80
+ readonly remark?: string | undefined;
81
+ readonly totalAmount: string;
82
+ readonly totalTax: string;
83
+ }) => any) | undefined;
84
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
85
+ declare const _default: typeof __VLS_export;
86
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,20 @@
1
+ <script setup>
2
+ defineOptions({ name: "ShwfedBlockInvoiceDigitalItemsColgroup" });
3
+ </script>
4
+
5
+ <template>
6
+ <colgroup>
7
+ <col class="col-name">
8
+ <col class="col-spec">
9
+ <col class="col-unit">
10
+ <col class="col-num">
11
+ <col class="col-num">
12
+ <col class="col-num">
13
+ <col class="col-rate">
14
+ <col class="col-num">
15
+ </colgroup>
16
+ </template>
17
+
18
+ <style scoped>
19
+ .col-name{width:22%}.col-spec{width:14%}.col-unit{width:8%}.col-num,.col-rate{width:11%}
20
+ </style>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,86 @@
1
+ import type { Environment } from '../../../../../vendor/cel-js/lib/index.js';
2
+ import { type Value } from './schema.js';
3
+ type __VLS_Props = {
4
+ configure?: (env: Environment) => void;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ 'block': Value;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:block": (value: {
12
+ readonly type: "com.shwfed.block.invoice.digital";
13
+ readonly id: string;
14
+ readonly line: {
15
+ readonly name: string;
16
+ readonly spec?: string | undefined;
17
+ readonly unit?: string | undefined;
18
+ readonly quantity?: string | undefined;
19
+ readonly unitPrice?: string | undefined;
20
+ readonly amount: string;
21
+ readonly taxRate?: string | undefined;
22
+ readonly taxAmount?: string | undefined;
23
+ };
24
+ readonly displayName?: string | undefined;
25
+ readonly kind?: "normal" | "special" | undefined;
26
+ readonly compatibilityDate: "2026-07-17";
27
+ readonly items: string;
28
+ readonly request?: string | undefined;
29
+ readonly invoiceNumber: string;
30
+ readonly issueDate: string;
31
+ readonly buyer: {
32
+ readonly name: string;
33
+ readonly taxId: string;
34
+ };
35
+ readonly seller: {
36
+ readonly name: string;
37
+ readonly taxId: string;
38
+ };
39
+ readonly grandTotal: string;
40
+ readonly issuer?: string | undefined;
41
+ readonly redLetter?: string | undefined;
42
+ readonly itemsMaxHeight?: string | undefined;
43
+ readonly remark?: string | undefined;
44
+ readonly totalAmount: string;
45
+ readonly totalTax: string;
46
+ }) => any;
47
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
48
+ "onUpdate:block"?: ((value: {
49
+ readonly type: "com.shwfed.block.invoice.digital";
50
+ readonly id: string;
51
+ readonly line: {
52
+ readonly name: string;
53
+ readonly spec?: string | undefined;
54
+ readonly unit?: string | undefined;
55
+ readonly quantity?: string | undefined;
56
+ readonly unitPrice?: string | undefined;
57
+ readonly amount: string;
58
+ readonly taxRate?: string | undefined;
59
+ readonly taxAmount?: string | undefined;
60
+ };
61
+ readonly displayName?: string | undefined;
62
+ readonly kind?: "normal" | "special" | undefined;
63
+ readonly compatibilityDate: "2026-07-17";
64
+ readonly items: string;
65
+ readonly request?: string | undefined;
66
+ readonly invoiceNumber: string;
67
+ readonly issueDate: string;
68
+ readonly buyer: {
69
+ readonly name: string;
70
+ readonly taxId: string;
71
+ };
72
+ readonly seller: {
73
+ readonly name: string;
74
+ readonly taxId: string;
75
+ };
76
+ readonly grandTotal: string;
77
+ readonly issuer?: string | undefined;
78
+ readonly redLetter?: string | undefined;
79
+ readonly itemsMaxHeight?: string | undefined;
80
+ readonly remark?: string | undefined;
81
+ readonly totalAmount: string;
82
+ readonly totalTax: string;
83
+ }) => any) | undefined;
84
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
85
+ declare const _default: typeof __VLS_export;
86
+ export default _default;