kts-component-invoice-operate 3.2.0 → 3.2.1
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/Invoice/Invoice-digtal/_test/importGoods/index.d.ts +3 -0
- package/dist/Invoice/Invoice-digtal/_test/importStakeholder/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.d.ts +2 -1
- package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +5 -0
- package/dist/index.esm.js +125 -48
- package/dist/index.js +125 -48
- package/docs-dist/404.html +33 -33
- package/docs-dist/index.html +33 -33
- package/docs-dist/static/add.a70623b4.svg +12 -0
- package/docs-dist/static/arrowDown.a1cbf0d8.svg +3 -0
- package/docs-dist/static/arrowUp.4c482054.svg +3 -0
- package/docs-dist/static/fork.5431267d.svg +12 -0
- package/docs-dist/umi.css +19 -19
- package/docs-dist/umi.js +1 -1
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/importGoods/index.tsx +471 -0
- package/src/Invoice/Invoice-digtal/_test/importStakeholder/index.tsx +17 -0
- package/src/Invoice/Invoice-digtal/index.md +6 -0
- package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +1 -1
- package/src/Invoice/index.tsx +8 -6
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +15 -2
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/svg/plus.svg +12 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +7 -2
- package/src/Invoice/ui/digtal/GoodsList/index.tsx +0 -1
- package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +1 -2
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +25 -2
- package/src/Invoice/ui/digtal/Stakeholder/svg/plus.svg +12 -0
- package/src/InvoiceTypeModal/index.tsx +5 -1
package/package.json
CHANGED
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button } from 'kts-components-antd-x3/lib/radio';
|
|
4
|
+
import { Invoice } from '../../../..';
|
|
5
|
+
import { IGetBuyerListOption } from '../../../../Invoice/InvoiceController/InvoiceControllerState/BuyerState';
|
|
6
|
+
|
|
7
|
+
const InvoiceController = Invoice.InvoiceController
|
|
8
|
+
|
|
9
|
+
export default () => {
|
|
10
|
+
|
|
11
|
+
// 初始化控制器
|
|
12
|
+
const controller = React.useMemo(() => new MyInvoiceController(), []);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<Button style={{ marginBottom: 10 }} onClick={async () => { console.log('===> 当前组件状态', await controller.validateFields()); }} >获取数据</Button>
|
|
17
|
+
<Invoice controller={controller} invoiceType='digtal' />
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// 重写 购买方 的数据源,实现 ‘获取 购买方 列表’ 方法
|
|
23
|
+
class MyInvoiceController extends InvoiceController {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// 重写 的 获取商品列表
|
|
29
|
+
getGoodsList = this.pipeline<IGetBuyerListOption>(async (state, option) => {
|
|
30
|
+
if (!option) return;
|
|
31
|
+
|
|
32
|
+
// 初始化测试数据
|
|
33
|
+
const dataSource = await getMok(option.pagination.current)
|
|
34
|
+
|
|
35
|
+
// 设置分页数据
|
|
36
|
+
state.goodsListState.importGoods.pagination = {
|
|
37
|
+
...option.pagination,
|
|
38
|
+
pageSize: 20,
|
|
39
|
+
total: 80,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// 设置列表数据
|
|
43
|
+
state.goodsListState.importGoods.dataSource = dataSource;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// const getMok = async (current: number = 1) => {
|
|
48
|
+
// const dataSource: any[] = [];
|
|
49
|
+
// for (let i = 0; i < 20; i++) {
|
|
50
|
+
// const p = i + 20 * (current - 1);
|
|
51
|
+
// dataSource.push({
|
|
52
|
+
// itemType: `商品分类${p}`,
|
|
53
|
+
// itemNo: `商品编码${p}`,
|
|
54
|
+
// itemName: `商品名称${p}`,
|
|
55
|
+
// shorthand: `前缀${p}`,
|
|
56
|
+
// itemModelName: `规格型号${p}`,
|
|
57
|
+
// unit: `计量单位${p}`,
|
|
58
|
+
// priceIncludeTax: p,
|
|
59
|
+
// priceExcludeTax: p,
|
|
60
|
+
// taxClassificationCode: `税收分类编码${p}`,
|
|
61
|
+
// affix: `附加信息${p}`,
|
|
62
|
+
// });
|
|
63
|
+
// }
|
|
64
|
+
// return dataSource;
|
|
65
|
+
// }
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
const getMok = async (current: number = 1) => {
|
|
69
|
+
return [
|
|
70
|
+
{
|
|
71
|
+
"attributeVOList": null,
|
|
72
|
+
"brandName": null,
|
|
73
|
+
"buyGroupCode": null,
|
|
74
|
+
"buyGroupId": null,
|
|
75
|
+
"buyGroupName": null,
|
|
76
|
+
"categoryId": 2073,
|
|
77
|
+
"categoryName": "通用",
|
|
78
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
79
|
+
"createTime": "2021-09-10 15:45:43.0",
|
|
80
|
+
"enjoyPreferentialPolicies": 0,
|
|
81
|
+
"factoryCode": null,
|
|
82
|
+
"factoryId": null,
|
|
83
|
+
"factoryName": null,
|
|
84
|
+
"id": 146200,
|
|
85
|
+
"internalNumber": "发动机盖",
|
|
86
|
+
"isUalityInspection": null,
|
|
87
|
+
"name": "发动机ABC",
|
|
88
|
+
"preferentialPoliciesType": null,
|
|
89
|
+
"priceAmount": 50,
|
|
90
|
+
"procurementCycle": 0,
|
|
91
|
+
"shorthand": "发动机",
|
|
92
|
+
"specification": "abc",
|
|
93
|
+
"spuCode": "6000001738252675",
|
|
94
|
+
"status": 1,
|
|
95
|
+
"taxCategoryCode": "1090102040000000000",
|
|
96
|
+
"taxExemptionType": "",
|
|
97
|
+
"taxId": 11,
|
|
98
|
+
"taxRate": 13,
|
|
99
|
+
"unitId": 30,
|
|
100
|
+
"unitName": "件",
|
|
101
|
+
"itemType": "通用",
|
|
102
|
+
"itemNo": "6000001738252675",
|
|
103
|
+
"itemName": "发动机ABC",
|
|
104
|
+
"itemModelName": "abc",
|
|
105
|
+
"unit": "件",
|
|
106
|
+
"priceIncludeTax": 50,
|
|
107
|
+
"priceExcludeTax": 50,
|
|
108
|
+
"taxClassificationCode": "1090102040000000000"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"attributeVOList": null,
|
|
112
|
+
"brandName": "丹东一号",
|
|
113
|
+
"buyGroupCode": null,
|
|
114
|
+
"buyGroupId": null,
|
|
115
|
+
"buyGroupName": null,
|
|
116
|
+
"categoryId": 2073,
|
|
117
|
+
"categoryName": "通用",
|
|
118
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
119
|
+
"createTime": "2021-09-02 14:59:52.0",
|
|
120
|
+
"enjoyPreferentialPolicies": 0,
|
|
121
|
+
"factoryCode": null,
|
|
122
|
+
"factoryId": null,
|
|
123
|
+
"factoryName": null,
|
|
124
|
+
"id": 146199,
|
|
125
|
+
"internalNumber": null,
|
|
126
|
+
"isUalityInspection": null,
|
|
127
|
+
"name": "aaaa",
|
|
128
|
+
"preferentialPoliciesType": null,
|
|
129
|
+
"priceAmount": 0,
|
|
130
|
+
"procurementCycle": 0,
|
|
131
|
+
"shorthand": "活牲畜",
|
|
132
|
+
"specification": null,
|
|
133
|
+
"spuCode": "6000001311479375",
|
|
134
|
+
"status": 1,
|
|
135
|
+
"taxCategoryCode": "1010301010000000000",
|
|
136
|
+
"taxExemptionType": "1",
|
|
137
|
+
"taxId": 1,
|
|
138
|
+
"taxRate": 0,
|
|
139
|
+
"unitId": null,
|
|
140
|
+
"unitName": null,
|
|
141
|
+
"itemType": "通用",
|
|
142
|
+
"itemNo": "6000001311479375",
|
|
143
|
+
"itemName": "aaaa",
|
|
144
|
+
"itemModelName": null,
|
|
145
|
+
"unit": null,
|
|
146
|
+
"priceIncludeTax": 0,
|
|
147
|
+
"priceExcludeTax": 0,
|
|
148
|
+
"taxClassificationCode": "1010301010000000000"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"attributeVOList": null,
|
|
152
|
+
"brandName": "丹东一号",
|
|
153
|
+
"buyGroupCode": null,
|
|
154
|
+
"buyGroupId": null,
|
|
155
|
+
"buyGroupName": null,
|
|
156
|
+
"categoryId": 246,
|
|
157
|
+
"categoryName": "分类cc>1",
|
|
158
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
159
|
+
"createTime": "2020-12-28 18:23:55.0",
|
|
160
|
+
"enjoyPreferentialPolicies": 0,
|
|
161
|
+
"factoryCode": null,
|
|
162
|
+
"factoryId": null,
|
|
163
|
+
"factoryName": null,
|
|
164
|
+
"id": 146131,
|
|
165
|
+
"internalNumber": null,
|
|
166
|
+
"isUalityInspection": null,
|
|
167
|
+
"name": "AAAA",
|
|
168
|
+
"preferentialPoliciesType": null,
|
|
169
|
+
"priceAmount": null,
|
|
170
|
+
"procurementCycle": 0,
|
|
171
|
+
"shorthand": null,
|
|
172
|
+
"specification": "1234EFF",
|
|
173
|
+
"spuCode": "6000002120658581",
|
|
174
|
+
"status": 1,
|
|
175
|
+
"taxCategoryCode": null,
|
|
176
|
+
"taxExemptionType": null,
|
|
177
|
+
"taxId": null,
|
|
178
|
+
"taxRate": 0,
|
|
179
|
+
"unitId": 362,
|
|
180
|
+
"unitName": "年",
|
|
181
|
+
"itemType": "分类cc>1",
|
|
182
|
+
"itemNo": "6000002120658581",
|
|
183
|
+
"itemName": "AAAA",
|
|
184
|
+
"itemModelName": "1234EFF",
|
|
185
|
+
"unit": "年",
|
|
186
|
+
"priceIncludeTax": 0,
|
|
187
|
+
"priceExcludeTax": 0,
|
|
188
|
+
"taxClassificationCode": null
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"attributeVOList": null,
|
|
192
|
+
"brandName": null,
|
|
193
|
+
"buyGroupCode": null,
|
|
194
|
+
"buyGroupId": null,
|
|
195
|
+
"buyGroupName": null,
|
|
196
|
+
"categoryId": 2073,
|
|
197
|
+
"categoryName": "通用",
|
|
198
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
199
|
+
"createTime": "2020-12-15 10:14:14.0",
|
|
200
|
+
"enjoyPreferentialPolicies": 0,
|
|
201
|
+
"factoryCode": null,
|
|
202
|
+
"factoryId": null,
|
|
203
|
+
"factoryName": null,
|
|
204
|
+
"id": 146129,
|
|
205
|
+
"internalNumber": null,
|
|
206
|
+
"isUalityInspection": null,
|
|
207
|
+
"name": "服务费",
|
|
208
|
+
"preferentialPoliciesType": null,
|
|
209
|
+
"priceAmount": null,
|
|
210
|
+
"procurementCycle": 0,
|
|
211
|
+
"shorthand": "软件",
|
|
212
|
+
"specification": null,
|
|
213
|
+
"spuCode": "6000001474077629",
|
|
214
|
+
"status": 1,
|
|
215
|
+
"taxCategoryCode": "1060301020100000000",
|
|
216
|
+
"taxExemptionType": null,
|
|
217
|
+
"taxId": null,
|
|
218
|
+
"taxRate": 0,
|
|
219
|
+
"unitId": null,
|
|
220
|
+
"unitName": null,
|
|
221
|
+
"itemType": "通用",
|
|
222
|
+
"itemNo": "6000001474077629",
|
|
223
|
+
"itemName": "服务费",
|
|
224
|
+
"itemModelName": null,
|
|
225
|
+
"unit": null,
|
|
226
|
+
"priceIncludeTax": 0,
|
|
227
|
+
"priceExcludeTax": 0,
|
|
228
|
+
"taxClassificationCode": "1060301020100000000"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"attributeVOList": null,
|
|
232
|
+
"brandName": "丹东一号",
|
|
233
|
+
"buyGroupCode": null,
|
|
234
|
+
"buyGroupId": null,
|
|
235
|
+
"buyGroupName": null,
|
|
236
|
+
"categoryId": 2073,
|
|
237
|
+
"categoryName": "通用",
|
|
238
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
239
|
+
"createTime": "2020-10-30 15:07:05.0",
|
|
240
|
+
"enjoyPreferentialPolicies": 0,
|
|
241
|
+
"factoryCode": null,
|
|
242
|
+
"factoryId": null,
|
|
243
|
+
"factoryName": null,
|
|
244
|
+
"id": 145809,
|
|
245
|
+
"internalNumber": "0987",
|
|
246
|
+
"isUalityInspection": null,
|
|
247
|
+
"name": "中科",
|
|
248
|
+
"preferentialPoliciesType": null,
|
|
249
|
+
"priceAmount": 1000,
|
|
250
|
+
"procurementCycle": 0,
|
|
251
|
+
"shorthand": "糖料",
|
|
252
|
+
"specification": "12",
|
|
253
|
+
"spuCode": "6000001168374126",
|
|
254
|
+
"status": 1,
|
|
255
|
+
"taxCategoryCode": "1010107010000000000",
|
|
256
|
+
"taxExemptionType": "3",
|
|
257
|
+
"taxId": 1,
|
|
258
|
+
"taxRate": 0,
|
|
259
|
+
"unitId": 32,
|
|
260
|
+
"unitName": "把",
|
|
261
|
+
"itemType": "通用",
|
|
262
|
+
"itemNo": "6000001168374126",
|
|
263
|
+
"itemName": "中科",
|
|
264
|
+
"itemModelName": "12",
|
|
265
|
+
"unit": "把",
|
|
266
|
+
"priceIncludeTax": 1000,
|
|
267
|
+
"priceExcludeTax": 1000,
|
|
268
|
+
"taxClassificationCode": "1010107010000000000"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"attributeVOList": null,
|
|
272
|
+
"brandName": null,
|
|
273
|
+
"buyGroupCode": null,
|
|
274
|
+
"buyGroupId": null,
|
|
275
|
+
"buyGroupName": null,
|
|
276
|
+
"categoryId": 1862,
|
|
277
|
+
"categoryName": "通用",
|
|
278
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
279
|
+
"createTime": "2019-03-22 11:06:53.0",
|
|
280
|
+
"enjoyPreferentialPolicies": 0,
|
|
281
|
+
"factoryCode": null,
|
|
282
|
+
"factoryId": null,
|
|
283
|
+
"factoryName": null,
|
|
284
|
+
"id": 144321,
|
|
285
|
+
"internalNumber": "4302111",
|
|
286
|
+
"isUalityInspection": 0,
|
|
287
|
+
"name": "农用化肥2",
|
|
288
|
+
"preferentialPoliciesType": "",
|
|
289
|
+
"priceAmount": 90,
|
|
290
|
+
"procurementCycle": 0,
|
|
291
|
+
"shorthand": "肥料",
|
|
292
|
+
"specification": "HLHF-211",
|
|
293
|
+
"spuCode": "1000019000000056",
|
|
294
|
+
"status": 1,
|
|
295
|
+
"taxCategoryCode": "1000000000000000000",
|
|
296
|
+
"taxExemptionType": null,
|
|
297
|
+
"taxId": null,
|
|
298
|
+
"taxRate": 0,
|
|
299
|
+
"unitId": 11,
|
|
300
|
+
"unitName": "包",
|
|
301
|
+
"itemType": "通用",
|
|
302
|
+
"itemNo": "1000019000000056",
|
|
303
|
+
"itemName": "农用化肥2",
|
|
304
|
+
"itemModelName": "HLHF-211",
|
|
305
|
+
"unit": "包",
|
|
306
|
+
"priceIncludeTax": 90,
|
|
307
|
+
"priceExcludeTax": 90,
|
|
308
|
+
"taxClassificationCode": "1000000000000000000"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"attributeVOList": null,
|
|
312
|
+
"brandName": null,
|
|
313
|
+
"buyGroupCode": null,
|
|
314
|
+
"buyGroupId": null,
|
|
315
|
+
"buyGroupName": null,
|
|
316
|
+
"categoryId": 1862,
|
|
317
|
+
"categoryName": "通用",
|
|
318
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
319
|
+
"createTime": "2019-03-22 11:06:52.0",
|
|
320
|
+
"enjoyPreferentialPolicies": 0,
|
|
321
|
+
"factoryCode": null,
|
|
322
|
+
"factoryId": null,
|
|
323
|
+
"factoryName": null,
|
|
324
|
+
"id": 144320,
|
|
325
|
+
"internalNumber": "4302111",
|
|
326
|
+
"isUalityInspection": 0,
|
|
327
|
+
"name": "园林轻化肥",
|
|
328
|
+
"preferentialPoliciesType": "",
|
|
329
|
+
"priceAmount": null,
|
|
330
|
+
"procurementCycle": null,
|
|
331
|
+
"shorthand": "肥料",
|
|
332
|
+
"specification": "HLHF-211",
|
|
333
|
+
"spuCode": "1000019000000055",
|
|
334
|
+
"status": 1,
|
|
335
|
+
"taxCategoryCode": "233WD5FG00911",
|
|
336
|
+
"taxExemptionType": null,
|
|
337
|
+
"taxId": null,
|
|
338
|
+
"taxRate": 0,
|
|
339
|
+
"unitId": 11,
|
|
340
|
+
"unitName": "包",
|
|
341
|
+
"itemType": "通用",
|
|
342
|
+
"itemNo": "1000019000000055",
|
|
343
|
+
"itemName": "园林轻化肥",
|
|
344
|
+
"itemModelName": "HLHF-211",
|
|
345
|
+
"unit": "包",
|
|
346
|
+
"priceIncludeTax": 0,
|
|
347
|
+
"priceExcludeTax": 0,
|
|
348
|
+
"taxClassificationCode": "233WD5FG00911"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"attributeVOList": null,
|
|
352
|
+
"brandName": null,
|
|
353
|
+
"buyGroupCode": null,
|
|
354
|
+
"buyGroupId": null,
|
|
355
|
+
"buyGroupName": null,
|
|
356
|
+
"categoryId": 1862,
|
|
357
|
+
"categoryName": "通用",
|
|
358
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
359
|
+
"createTime": "2019-03-06 16:06:16.0",
|
|
360
|
+
"enjoyPreferentialPolicies": 0,
|
|
361
|
+
"factoryCode": null,
|
|
362
|
+
"factoryId": null,
|
|
363
|
+
"factoryName": null,
|
|
364
|
+
"id": 101211,
|
|
365
|
+
"internalNumber": "4302111",
|
|
366
|
+
"isUalityInspection": 0,
|
|
367
|
+
"name": "营养土壤",
|
|
368
|
+
"preferentialPoliciesType": "",
|
|
369
|
+
"priceAmount": null,
|
|
370
|
+
"procurementCycle": null,
|
|
371
|
+
"shorthand": "肥料",
|
|
372
|
+
"specification": "HLHF-211",
|
|
373
|
+
"spuCode": "1000019000000053",
|
|
374
|
+
"status": 1,
|
|
375
|
+
"taxCategoryCode": "233WD5FG00911",
|
|
376
|
+
"taxExemptionType": null,
|
|
377
|
+
"taxId": null,
|
|
378
|
+
"taxRate": 0,
|
|
379
|
+
"unitId": 11,
|
|
380
|
+
"unitName": "包",
|
|
381
|
+
"itemType": "通用",
|
|
382
|
+
"itemNo": "1000019000000053",
|
|
383
|
+
"itemName": "营养土壤",
|
|
384
|
+
"itemModelName": "HLHF-211",
|
|
385
|
+
"unit": "包",
|
|
386
|
+
"priceIncludeTax": 0,
|
|
387
|
+
"priceExcludeTax": 0,
|
|
388
|
+
"taxClassificationCode": "233WD5FG00911"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"attributeVOList": null,
|
|
392
|
+
"brandName": null,
|
|
393
|
+
"buyGroupCode": null,
|
|
394
|
+
"buyGroupId": null,
|
|
395
|
+
"buyGroupName": null,
|
|
396
|
+
"categoryId": 1862,
|
|
397
|
+
"categoryName": "通用",
|
|
398
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
399
|
+
"createTime": "2019-03-06 16:06:16.0",
|
|
400
|
+
"enjoyPreferentialPolicies": 0,
|
|
401
|
+
"factoryCode": null,
|
|
402
|
+
"factoryId": null,
|
|
403
|
+
"factoryName": null,
|
|
404
|
+
"id": 101212,
|
|
405
|
+
"internalNumber": "4302111",
|
|
406
|
+
"isUalityInspection": 0,
|
|
407
|
+
"name": "植物营养液",
|
|
408
|
+
"preferentialPoliciesType": "",
|
|
409
|
+
"priceAmount": null,
|
|
410
|
+
"procurementCycle": null,
|
|
411
|
+
"shorthand": "肥料",
|
|
412
|
+
"specification": "HLHF-211",
|
|
413
|
+
"spuCode": "1000019000000054",
|
|
414
|
+
"status": 1,
|
|
415
|
+
"taxCategoryCode": "233WD5FG00911",
|
|
416
|
+
"taxExemptionType": null,
|
|
417
|
+
"taxId": null,
|
|
418
|
+
"taxRate": 0,
|
|
419
|
+
"unitId": 11,
|
|
420
|
+
"unitName": "包",
|
|
421
|
+
"itemType": "通用",
|
|
422
|
+
"itemNo": "1000019000000054",
|
|
423
|
+
"itemName": "植物营养液",
|
|
424
|
+
"itemModelName": "HLHF-211",
|
|
425
|
+
"unit": "包",
|
|
426
|
+
"priceIncludeTax": 0,
|
|
427
|
+
"priceExcludeTax": 0,
|
|
428
|
+
"taxClassificationCode": "233WD5FG00911"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"attributeVOList": null,
|
|
432
|
+
"brandName": null,
|
|
433
|
+
"buyGroupCode": null,
|
|
434
|
+
"buyGroupId": null,
|
|
435
|
+
"buyGroupName": null,
|
|
436
|
+
"categoryId": 1862,
|
|
437
|
+
"categoryName": "通用",
|
|
438
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
439
|
+
"createTime": "2019-03-05 18:15:59.0",
|
|
440
|
+
"enjoyPreferentialPolicies": 0,
|
|
441
|
+
"factoryCode": null,
|
|
442
|
+
"factoryId": null,
|
|
443
|
+
"factoryName": null,
|
|
444
|
+
"id": 101203,
|
|
445
|
+
"internalNumber": "4353245243",
|
|
446
|
+
"isUalityInspection": 0,
|
|
447
|
+
"name": "医用棉布纱布条",
|
|
448
|
+
"preferentialPoliciesType": "",
|
|
449
|
+
"priceAmount": null,
|
|
450
|
+
"procurementCycle": null,
|
|
451
|
+
"shorthand": "布料",
|
|
452
|
+
"specification": "ZC11D-006",
|
|
453
|
+
"spuCode": "6000000804084562",
|
|
454
|
+
"status": 1,
|
|
455
|
+
"taxCategoryCode": "1234567890123456789",
|
|
456
|
+
"taxExemptionType": null,
|
|
457
|
+
"taxId": 5,
|
|
458
|
+
"taxRate": 3,
|
|
459
|
+
"unitId": 3,
|
|
460
|
+
"unitName": "米",
|
|
461
|
+
"itemType": "通用",
|
|
462
|
+
"itemNo": "6000000804084562",
|
|
463
|
+
"itemName": "医用棉布纱布条",
|
|
464
|
+
"itemModelName": "ZC11D-006",
|
|
465
|
+
"unit": "米",
|
|
466
|
+
"priceIncludeTax": 0,
|
|
467
|
+
"priceExcludeTax": 0,
|
|
468
|
+
"taxClassificationCode": "1234567890123456789"
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Invoice from '../../..';
|
|
3
|
+
import 'antd/dist/antd.css';
|
|
4
|
+
|
|
5
|
+
export default () => {
|
|
6
|
+
return (
|
|
7
|
+
<Invoice
|
|
8
|
+
invoiceType='digtal'
|
|
9
|
+
stakeholder={
|
|
10
|
+
<Invoice.Stakeholder
|
|
11
|
+
isShowImportButton={true}
|
|
12
|
+
onClickImportButton={e => { console.log(e) }}
|
|
13
|
+
/>
|
|
14
|
+
}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
};
|
package/src/Invoice/index.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import './index.less';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import InvoiceController from './InvoiceController';
|
|
@@ -115,7 +116,7 @@ const Main = (props: IInvoiceProps) => {
|
|
|
115
116
|
useToGenerateId(controller);
|
|
116
117
|
|
|
117
118
|
React.useEffect(() => { setKey(key + 1) }, [controller]);
|
|
118
|
-
|
|
119
|
+
|
|
119
120
|
return (
|
|
120
121
|
<InvoiceContext.Provider key={key} value={controller}>
|
|
121
122
|
|
|
@@ -150,15 +151,16 @@ const Digtal = (props: IInvoiceProps) => {
|
|
|
150
151
|
return (
|
|
151
152
|
<InvoiceContext.Provider key={key} value={controller}>
|
|
152
153
|
<div className="kts-invoice-operate-digtal" ref={controller.pipeline<HTMLDivElement | null>(async (s, e) => { s.rootElement = e })} >
|
|
153
|
-
{props.invoiceHeader || <InvoiceHeaderDigtal />
|
|
154
|
+
{props.invoiceHeader || <InvoiceHeaderDigtal /> /** 发票头 */}
|
|
154
155
|
<div className='kts-invoice-operate-digtal-cont' >
|
|
155
|
-
{props.stakeholder || <Stakeholder />
|
|
156
|
-
{props.goodsList || <GoodsListDigtal
|
|
156
|
+
{props.stakeholder || <Stakeholder /> /** 干系人 */}
|
|
157
|
+
{props.goodsList || <GoodsListDigtal /** 货物列表 */ />}
|
|
157
158
|
</div>
|
|
158
|
-
{props.sign || <SignDigtal />
|
|
159
|
+
{props.sign || <SignDigtal /> /** 落款 */}
|
|
159
160
|
</div>
|
|
160
161
|
|
|
161
|
-
<
|
|
162
|
+
<ImportGoodsDrawer />{/* 导入货品的抽屉 */}
|
|
163
|
+
<EndowCodeDrawer />{/* 给货品赋码的抽屉 */}
|
|
162
164
|
</InvoiceContext.Provider>
|
|
163
165
|
)
|
|
164
166
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import Icon from '@ant-design/icons';
|
|
2
4
|
import { Form } from 'kts-components-antd-x3';
|
|
5
|
+
import { ReactComponent as PlusSvg } from './svg/plus.svg'
|
|
3
6
|
import { AutoComplete, Select, Button, Input, Spin, Tooltip, InputProps } from 'kts-xui';
|
|
4
7
|
import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
|
|
5
8
|
import { getItemNameWithShorthand } from '../../../../../tools/itemName';
|
|
@@ -107,12 +110,22 @@ export default (form: WrappedFormUtils) => {
|
|
|
107
110
|
})(
|
|
108
111
|
<ItemNameInput
|
|
109
112
|
shorthand={editGood.shorthand}
|
|
113
|
+
suffix={
|
|
114
|
+
<Tooltip title="点击从商品管理中添加商品信息">
|
|
115
|
+
<Button
|
|
116
|
+
type="link"
|
|
117
|
+
style={{ padding: 0, width: 20 }}
|
|
118
|
+
icon={<Icon component={PlusSvg} />}
|
|
119
|
+
onClick={controller.pipeline(async s => { s.goodsListState.importGoods.isVisibleDrawer = true })}
|
|
120
|
+
/>
|
|
121
|
+
</Tooltip>
|
|
122
|
+
}
|
|
110
123
|
onChange={() => {
|
|
111
124
|
onChangeItemName(controller, form, record);
|
|
112
125
|
}}
|
|
113
126
|
/>
|
|
114
127
|
)}
|
|
115
|
-
<div className="kts-invoice-operate-goods-list-able-list-itemName-import">
|
|
128
|
+
{/* <div className="kts-invoice-operate-goods-list-able-list-itemName-import">
|
|
116
129
|
{controller.getGoodsList && model !== 'readOnly' && (
|
|
117
130
|
<Tooltip title="点击从商品管理中添加商品信息">
|
|
118
131
|
<Button
|
|
@@ -122,7 +135,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
122
135
|
/>
|
|
123
136
|
</Tooltip>
|
|
124
137
|
)}
|
|
125
|
-
</div>
|
|
138
|
+
</div> */}
|
|
126
139
|
</div>
|
|
127
140
|
</Form.Item>
|
|
128
141
|
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 16 15" fill="none">
|
|
2
|
+
<g clip-path="url(#clip0_715_360)">
|
|
3
|
+
<path d="M8 14.5312C4.11687 14.5312 0.96875 11.3831 0.96875 7.5C0.96875 3.61687 4.11687 0.46875 8 0.46875C11.8831 0.46875 15.0312 3.61687 15.0312 7.5C15.0312 11.3831 11.8831 14.5312 8 14.5312ZM8 13.5938C11.3656 13.5938 14.0938 10.8656 14.0938 7.5C14.0938 4.13438 11.3656 1.40625 8 1.40625C4.63438 1.40625 1.90625 4.13438 1.90625 7.5C1.90625 10.8656 4.63438 13.5938 8 13.5938Z"/>
|
|
4
|
+
<path d="M4.25 7.96875C4.12568 7.96875 4.00645 7.91936 3.91854 7.83146C3.83064 7.74355 3.78125 7.62432 3.78125 7.5C3.78125 7.37568 3.83064 7.25645 3.91854 7.16854C4.00645 7.08064 4.12568 7.03125 4.25 7.03125H11.75C11.8743 7.03125 11.9935 7.08064 12.0815 7.16854C12.1694 7.25645 12.2188 7.37568 12.2188 7.5C12.2188 7.62432 12.1694 7.74355 12.0815 7.83146C11.9935 7.91936 11.8743 7.96875 11.75 7.96875H4.25Z"/>
|
|
5
|
+
<path d="M7.53125 3.75C7.53125 3.62568 7.58064 3.50645 7.66854 3.41854C7.75645 3.33064 7.87568 3.28125 8 3.28125C8.12432 3.28125 8.24355 3.33064 8.33146 3.41854C8.41936 3.50645 8.46875 3.62568 8.46875 3.75V11.25C8.46875 11.3743 8.41936 11.4935 8.33146 11.5815C8.24355 11.6694 8.12432 11.7188 8 11.7188C7.87568 11.7188 7.75645 11.6694 7.66854 11.5815C7.58064 11.4935 7.53125 11.3743 7.53125 11.25V3.75Z"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="clip0_715_360">
|
|
9
|
+
<rect width="15" height="15" transform="translate(0.5)"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|
|
@@ -3,7 +3,12 @@ import { Input } from 'kts-xui';
|
|
|
3
3
|
import React, { ChangeEvent } from 'react';
|
|
4
4
|
import './index.less';
|
|
5
5
|
|
|
6
|
-
export default function ItemNameInput(props: {
|
|
6
|
+
export default function ItemNameInput(props: {
|
|
7
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void,
|
|
8
|
+
suffix?: React.ReactNode,
|
|
9
|
+
value?: string,
|
|
10
|
+
shorthand?: string
|
|
11
|
+
}) {
|
|
7
12
|
|
|
8
13
|
const onChange = React.useCallback((e: ChangeEvent<HTMLInputElement>) => {
|
|
9
14
|
const event = { ...e };
|
|
@@ -13,7 +18,7 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
13
18
|
return (
|
|
14
19
|
<div className='kts-invoice-operate-goods-list-itemName-input'>
|
|
15
20
|
{props.shorthand && <span style={{ alignSelf: 'center', fontSize: 12 }} >*{props.shorthand}*</span>}
|
|
16
|
-
<Input style={{ height: '100%' }} value={props.value} onChange={onChange} />
|
|
21
|
+
<Input style={{ height: '100%' }} value={props.value} onChange={onChange} suffix={props.suffix} />
|
|
17
22
|
</div>
|
|
18
23
|
)
|
|
19
24
|
}
|
|
@@ -171,7 +171,6 @@ function AddDiscountRowDrawer(props: {
|
|
|
171
171
|
? chain(bignumber(values.discolineValue))
|
|
172
172
|
: chain(bignumber(totalAmount)).multiply(bignumber(values.discolineValue)).multiply(bignumber(0.01));
|
|
173
173
|
|
|
174
|
-
|
|
175
174
|
let discolinesSum = chain(bignumber(0));
|
|
176
175
|
|
|
177
176
|
// 每行的折扣金额
|
|
@@ -185,7 +184,7 @@ function AddDiscountRowDrawer(props: {
|
|
|
185
184
|
.multiply(share.done())
|
|
186
185
|
|
|
187
186
|
.multiply(bignumber(100))
|
|
188
|
-
.
|
|
187
|
+
.round()
|
|
189
188
|
.divide(bignumber(100))
|
|
190
189
|
|
|
191
190
|
.done();
|