lu-lowcode-package-form 0.11.47 → 0.11.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lu-lowcode-package-form",
3
- "version": "0.11.47",
3
+ "version": "0.11.51",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^4.8.1",
6
6
  "@dnd-kit/core": "^6.1.0",
package/src/App.jsx CHANGED
@@ -190,8 +190,11 @@ function App() {
190
190
 
191
191
 
192
192
  <FormContainerWrapper cols={cols} key={"formc"} className="" ref={formRef} >
193
+
194
+ <Field.Number label="税率" __id="fill_shuilv"
195
+ />
193
196
  <Field.Input label="含税单价代理中转" __id="fill_xianghu4"
194
- withIds={["fill_xianghu2"]}
197
+ withIds={["fill_xianghu2","fill_shuilv"]}
195
198
  withFill={{
196
199
  "value": [
197
200
  {
@@ -206,7 +209,21 @@ function App() {
206
209
  }
207
210
  },
208
211
  {
209
- "insert": "/0.8"
212
+ "insert": "* (1+"
213
+ },
214
+ {
215
+ "insert": {
216
+ "span": true
217
+ },
218
+ "attributes": {
219
+ "id": "fill_shuilv",
220
+ "color": "blue",
221
+ "tagKey": "fieldsValue",
222
+ "content": "当前表单.测试相互依赖"
223
+ }
224
+ },
225
+ {
226
+ "insert": ")"
210
227
  },
211
228
  {
212
229
  "insert": "\n\n"
@@ -219,7 +236,7 @@ function App() {
219
236
  }}
220
237
  />
221
238
  <Field.Input label="含税单价" __id="fill_xianghu1"
222
- withIds={["fill_xianghu3"]}
239
+ withIds={["fill_xianghu6"]}
223
240
  withFill={{
224
241
  "value": [
225
242
  {
@@ -227,7 +244,7 @@ function App() {
227
244
  "span": true
228
245
  },
229
246
  "attributes": {
230
- "id": "fill_xianghu3",
247
+ "id": "fill_xianghu6",
231
248
  "color": "blue",
232
249
  "tagKey": "fieldsValue",
233
250
  "content": "当前表单.测试相互依赖"
@@ -248,7 +265,7 @@ function App() {
248
265
  />
249
266
 
250
267
  <Field.Input label="未税单价" __id="fill_xianghu2"
251
- withIds={["fill_xianghu1"]}
268
+ withIds={["fill_xianghu1","fill_shuilv"]}
252
269
  withFill={{
253
270
  "value": [
254
271
  {
@@ -263,7 +280,21 @@ function App() {
263
280
  }
264
281
  },
265
282
  {
266
- "insert": "*0.8"
283
+ "insert": "/ (1+"
284
+ },
285
+ {
286
+ "insert": {
287
+ "span": true
288
+ },
289
+ "attributes": {
290
+ "id": "fill_shuilv",
291
+ "color": "blue",
292
+ "tagKey": "fieldsValue",
293
+ "content": "当前表单.测试相互依赖"
294
+ }
295
+ },
296
+ {
297
+ "insert": ")"
267
298
  },
268
299
  {
269
300
  "insert": "\n\n"
@@ -305,6 +336,95 @@ function App() {
305
336
  }}
306
337
  />
307
338
 
339
+ <Field.Input label="客户单价中转" __id="fill_xianghu6"
340
+ withIds={["fill_xianghu5","fill_shuilv"]}
341
+ withFill={{
342
+ "value": [
343
+ {
344
+ "insert": {
345
+ "span": true
346
+ },
347
+ "attributes": {
348
+ "id": "fill_xianghu5",
349
+ "color": "blue",
350
+ "tagKey": "fieldsValue",
351
+ "content": "当前表单.测试相互依赖"
352
+ }
353
+ },
354
+ {
355
+ "insert": "* (1+"
356
+ },
357
+
358
+ {
359
+ "insert": {
360
+ "span": true
361
+ },
362
+ "attributes": {
363
+ "id": "fill_shuilv",
364
+ "color": "blue",
365
+ "tagKey": "fieldsValue",
366
+ "content": "当前表单.测试相互依赖"
367
+ }
368
+ },
369
+ {
370
+ "insert": ")"
371
+ },
372
+ {
373
+ "insert": "\n\n"
374
+ }
375
+ ],
376
+ "version": 1719296886283,
377
+ "withData": [
378
+
379
+ ]
380
+ }}
381
+ />
382
+
383
+
384
+ <Field.Input label="客户未税单价" __id="fill_xianghu5"
385
+ withIds={["fill_xianghu3","fill_shuilv"]}
386
+ withFill={{
387
+ "value": [
388
+ {
389
+ "insert": {
390
+ "span": true
391
+ },
392
+ "attributes": {
393
+ "id": "fill_xianghu3",
394
+ "color": "blue",
395
+ "tagKey": "fieldsValue",
396
+ "content": "当前表单.测试相互依赖"
397
+ }
398
+ },
399
+ {
400
+ "insert": "/ (1+"
401
+ },
402
+
403
+ {
404
+ "insert": {
405
+ "span": true
406
+ },
407
+ "attributes": {
408
+ "id": "fill_shuilv",
409
+ "color": "blue",
410
+ "tagKey": "fieldsValue",
411
+ "content": "当前表单.测试相互依赖"
412
+ }
413
+ },
414
+ {
415
+ "insert": ")"
416
+ },
417
+ {
418
+ "insert": "\n\n"
419
+ }
420
+ ],
421
+ "version": 1719296886283,
422
+ "withData": [
423
+
424
+ ]
425
+ }}
426
+ />
427
+
308
428
  <Field.WithSingleSelect
309
429
  ref={testRef}
310
430
  request={async (params) => {
@@ -455,7 +575,7 @@ function App() {
455
575
  code: 0, data: {
456
576
  list:
457
577
  [
458
- { label: '选项1', value: '1', table_fill: [{ fill_tianchong1: { label: '选项1', value: '1' }, fill_tianchong2: { label: '选项2', value: '2' } }] },
578
+ { label: '选项1', value: '1', table_fill: [{ fill_shuilv:0.13, fill_tianchong1: { label: '选项1', value: '1' }, fill_tianchong2: { label: '选项2', value: '2' } },{ fill_shuilv:0.13, fill_tianchong1: { label: '选项1', value: '1' }, fill_tianchong2: { label: '选项2', value: '2' } }] },
459
579
  { label: '选项2', value: '2' },
460
580
  { label: '选项3', value: '3' }
461
581
  ]
@@ -477,14 +597,22 @@ function App() {
477
597
  "source": "fill_tianchong1",
478
598
  "target": "fill_tianchong1",
479
599
  },
600
+ {
601
+ "id": "636d3924-0298-4e9b-809a-26d4a10d7b11",
602
+ "type": 0,
603
+ "source": "fill_shuilv",
604
+ "target": "fill_shuilv",
605
+ },
480
606
  ]
481
607
  },
482
608
 
483
609
  ]} label="子表填充数据源" __id="fill_datasource1" />
484
610
  <Layout.FormRow layout={'1'}>
485
611
  <Field.Table label="测试主子表填充" __id="table_fill" isAllowAdd={true} isAllowCopy={true} >
486
- <Field.Input label="含税单价代理中转" __id="fill_xianghu4"
487
- withIds={["table_fill.fill_xianghu2"]}
612
+ <Field.Number label="税率" __id="fill_shuilv"
613
+ />
614
+ <Field.Input label="含税单价代理中转" __id="fill_xianghu4"
615
+ withIds={["table_fill.fill_xianghu2","table_fill.fill_shuilv"]}
488
616
  withFill={{
489
617
  "value": [
490
618
  {
@@ -499,7 +627,21 @@ function App() {
499
627
  }
500
628
  },
501
629
  {
502
- "insert": "/0.8"
630
+ "insert": "* (1+"
631
+ },
632
+ {
633
+ "insert": {
634
+ "span": true
635
+ },
636
+ "attributes": {
637
+ "id": "table_fill.fill_shuilv",
638
+ "color": "blue",
639
+ "tagKey": "fieldsValue",
640
+ "content": "当前表单.测试相互依赖"
641
+ }
642
+ },
643
+ {
644
+ "insert": ")"
503
645
  },
504
646
  {
505
647
  "insert": "\n\n"
@@ -512,7 +654,7 @@ function App() {
512
654
  }}
513
655
  />
514
656
  <Field.Input label="含税单价" __id="fill_xianghu1"
515
- withIds={["table_fill.fill_xianghu3"]}
657
+ withIds={["table_fill.fill_xianghu6"]}
516
658
  withFill={{
517
659
  "value": [
518
660
  {
@@ -520,7 +662,7 @@ function App() {
520
662
  "span": true
521
663
  },
522
664
  "attributes": {
523
- "id": "table_fill.fill_xianghu3",
665
+ "id": "table_fill.fill_xianghu6",
524
666
  "color": "blue",
525
667
  "tagKey": "fieldsValue",
526
668
  "content": "当前表单.测试相互依赖"
@@ -541,7 +683,7 @@ function App() {
541
683
  />
542
684
 
543
685
  <Field.Input label="未税单价" __id="fill_xianghu2"
544
- withIds={["table_fill.fill_xianghu1"]}
686
+ withIds={["table_fill.fill_xianghu1","table_fill.fill_shuilv"]}
545
687
  withFill={{
546
688
  "value": [
547
689
  {
@@ -556,7 +698,21 @@ function App() {
556
698
  }
557
699
  },
558
700
  {
559
- "insert": "*0.8"
701
+ "insert": "/ (1+"
702
+ },
703
+ {
704
+ "insert": {
705
+ "span": true
706
+ },
707
+ "attributes": {
708
+ "id": "table_fill.fill_shuilv",
709
+ "color": "blue",
710
+ "tagKey": "fieldsValue",
711
+ "content": "当前表单.测试相互依赖"
712
+ }
713
+ },
714
+ {
715
+ "insert": ")"
560
716
  },
561
717
  {
562
718
  "insert": "\n\n"
@@ -597,6 +753,153 @@ function App() {
597
753
  ]
598
754
  }}
599
755
  />
756
+
757
+ <Field.Input label="客户单价中转" __id="fill_xianghu6"
758
+ withIds={["table_fill.fill_xianghu5","table_fill.fill_shuilv"]}
759
+ withFill={{
760
+ "value": [
761
+ {
762
+ "insert": {
763
+ "span": true
764
+ },
765
+ "attributes": {
766
+ "id": "table_fill.fill_xianghu5",
767
+ "color": "blue",
768
+ "tagKey": "fieldsValue",
769
+ "content": "当前表单.测试相互依赖"
770
+ }
771
+ },
772
+ {
773
+ "insert": "* (1+"
774
+ },
775
+
776
+ {
777
+ "insert": {
778
+ "span": true
779
+ },
780
+ "attributes": {
781
+ "id": "table_fill.fill_shuilv",
782
+ "color": "blue",
783
+ "tagKey": "fieldsValue",
784
+ "content": "当前表单.测试相互依赖"
785
+ }
786
+ },
787
+ {
788
+ "insert": ")"
789
+ },
790
+ {
791
+ "insert": "\n\n"
792
+ }
793
+ ],
794
+ "version": 1719296886283,
795
+ "withData": [
796
+
797
+ ]
798
+ }}
799
+ />
800
+
801
+
802
+ <Field.Input label="客户未税单价" __id="fill_xianghu5"
803
+ withIds={["table_fill.fill_xianghu3","table_fill.fill_shuilv"]}
804
+ withFill={{
805
+ "value": [
806
+ {
807
+ "insert": {
808
+ "span": true
809
+ },
810
+ "attributes": {
811
+ "id": "table_fill.fill_xianghu3",
812
+ "color": "blue",
813
+ "tagKey": "fieldsValue",
814
+ "content": "当前表单.测试相互依赖"
815
+ }
816
+ },
817
+ {
818
+ "insert": "/ (1+"
819
+ },
820
+
821
+ {
822
+ "insert": {
823
+ "span": true
824
+ },
825
+ "attributes": {
826
+ "id": "table_fill.fill_shuilv",
827
+ "color": "blue",
828
+ "tagKey": "fieldsValue",
829
+ "content": "当前表单.测试相互依赖"
830
+ }
831
+ },
832
+ {
833
+ "insert": ")"
834
+ },
835
+ {
836
+ "insert": "\n\n"
837
+ }
838
+ ],
839
+ "version": 1719296886283,
840
+ "withData": [
841
+
842
+ ]
843
+ }}
844
+ />
845
+
846
+
847
+ <Field.Number label="数量" __id="fill_shuliang"/>
848
+ <Field.Input label="未税金额" __id="fill_weishu5"
849
+ withIds={["table_fill.fill_xianghu3","table_fill.fill_shuliang","table_fill.fill_shuilv"]}
850
+ withFill={{
851
+ "value": [
852
+ {
853
+ "insert": {
854
+ "span": true
855
+ },
856
+ "attributes": {
857
+ "id": "table_fill.fill_xianghu3",
858
+ "color": "blue",
859
+ "tagKey": "fieldsValue",
860
+ "content": "当前表单.测试相互依赖"
861
+ }
862
+ },
863
+ {
864
+ "insert": "/ (1+"
865
+ },
866
+
867
+ {
868
+ "insert": {
869
+ "span": true
870
+ },
871
+ "attributes": {
872
+ "id": "table_fill.fill_shuilv",
873
+ "color": "blue",
874
+ "tagKey": "fieldsValue",
875
+ "content": "当前表单.测试相互依赖"
876
+ }
877
+ },
878
+ {
879
+ "insert": ") * "
880
+ },
881
+
882
+ {
883
+ "insert": {
884
+ "span": true
885
+ },
886
+ "attributes": {
887
+ "id": "table_fill.fill_shuliang",
888
+ "color": "blue",
889
+ "tagKey": "fieldsValue",
890
+ "content": "当前表单.测试相互依赖"
891
+ }
892
+ },
893
+ {
894
+ "insert": "\n\n"
895
+ }
896
+ ],
897
+ "version": 1719296886283,
898
+ "withData": [
899
+
900
+ ]
901
+ }}
902
+ />
600
903
  <Field.WithSingleSelect
601
904
  ref={testRef}
602
905
  request={async (params) => {
@@ -79,18 +79,16 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
79
79
  // console.log("callback loadValue", loadValue)
80
80
  // let item = selectOptions.find(item => item.value == loadValue?.value || item.value == loadValue);
81
81
  // if (item && !isEqual(item, loadValue)) {
82
- // console.log(`[${props?.label}]debounceFetchOptions new value /////`, item);
83
82
  // typeof onChange === 'function' && onChange(item);
84
83
  // }
85
84
  // }
86
85
  // });
87
86
  debounceFetchOptions({ ...requestParams, [option_value]: loadValue?.value }, null, (selectOptions) => {
88
87
  if (selectOptions && selectOptions.length > 0) {
89
- console.log(`[${props?.label}]callback selectOptions`, selectOptions)
90
- console.log(`[${props?.label}]callback loadValue`, loadValue)
88
+ // console.log(`[${props?.label}]callback selectOptions`, selectOptions)
89
+ // console.log(`[${props?.label}]callback loadValue`, loadValue)
91
90
  let item = selectOptions.find(item => item.value == loadValue?.value || item.value == loadValue);
92
91
  if (item && !isEqual(item, loadValue)) {
93
- console.log(`[${props?.label}]debounceFetchOptions new value /////`, item);
94
92
  typeof onChange === 'function' && onChange(item);
95
93
  }
96
94
  }
@@ -124,11 +122,8 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
124
122
  if (debounceFetchOptionsRef.current) clearTimeout(debounceFetchOptionsRef.current);
125
123
  debounceFetchOptionsRef.current = setTimeout(() => {
126
124
  const callbacks = callbackQueue.current;
127
- console.log(`[${props?.label}]debounceFetchOptions callbackQueue`, JSON.parse(JSON.stringify(callbacks)));
128
125
  callbackQueue.current = [];
129
126
  fetchOptions(params, ruleParams, fieldName).then(result => {
130
- console.log(`[${props?.label}]debounceFetchOptions result`, result);
131
- console.log(`[${props?.label}]debounceFetchOptions callbacks`, callbacks);
132
127
  while (callbacks.length > 0) {
133
128
  const callback = callbacks.shift();
134
129
  if (typeof callback === 'function') {