kts-component-invoice-operate 3.2.260 → 3.2.262

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/index.esm.js CHANGED
@@ -4,7 +4,7 @@ import GreyReactBox, { decorator } from 'grey-react-box';
4
4
  import { chain as chain$1, bignumber, format as format$1, create, all, equal } from 'mathjs';
5
5
  import { message, Form, Input, Icon as Icon$2, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover as Popover$1, Table as Table$1, Tree, Modal as Modal$1, Row as Row$2, Col as Col$2 } from 'kts-components-antd-x3';
6
6
  import { v4 } from 'uuid';
7
- import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Dropdown as Dropdown$1, Row, Col, Checkbox as Checkbox$1, Tooltip as Tooltip$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal, Cascader as Cascader$1, DatePicker as DatePicker$1, Tree as Tree$1, Card, FormReadOnly } from 'kts-xui';
7
+ import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Dropdown as Dropdown$1, Select as Select$1, Row, Col, Checkbox as Checkbox$1, Tooltip as Tooltip$1, Input as Input$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal, Cascader as Cascader$1, DatePicker as DatePicker$1, Tree as Tree$1, Card, FormReadOnly } from 'kts-xui';
8
8
  import classnames from 'classnames';
9
9
  import { Table } from 'kts-components-antd-x4-v4';
10
10
  import { render } from 'react-dom';
@@ -1371,6 +1371,7 @@ var Stakeholder = /*#__PURE__*/_createClass(function Stakeholder() {
1371
1371
  this.disableds = void 0;
1372
1372
  this.enables = void 0;
1373
1373
  this.rulesMap = void 0;
1374
+ this.naturalPersonFlag = void 0;
1374
1375
  });
1375
1376
 
1376
1377
  /** 自动补全 */
@@ -18797,6 +18798,854 @@ function SvgPlus(props) {
18797
18798
  var css_248z$g = ".kts-invoice-operate-invoice-digtal-stakeholder {\n display: flex;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-expand-button {\n cursor: pointer;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div {\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div:nth-child(even) {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: end;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div:nth-child(odd) {\n flex: none;\n text-align: center;\n color: #9F613E;\n display: flex;\n flex-direction: column;\n justify-content: center;\n justify-items: center;\n padding: 0 4px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder > div:last-child {\n border-right: none;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form {\n padding: 12px 10px 5px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAntX-col {\n margin-bottom: 15px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item {\n display: flex;\n margin-bottom: 0;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label {\n flex: none;\n font-weight: 500;\n line-height: 29px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label label {\n color: #9F603D;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-control {\n line-height: 1.4;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-control .digtal-stakeholder-form-text {\n word-break: break-all;\n line-height: 29px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-control-wrapper {\n flex: 1;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .natural-person-flag {\n padding: 0 8px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .natural-person-flag .ktsAnt3x-form-item-control {\n line-height: 32px;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder .natural-person-flag .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder.readOnly > div:nth-child(even) {\n justify-content: start;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder.readOnly .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-label {\n line-height: 1.4;\n}\n.kts-invoice-operate-invoice-digtal-stakeholder.readOnly .digtal-stakeholder-form .ktsAnt3x-row.ktsAnt3x-form-item .ktsAnt3x-form-item-control .digtal-stakeholder-form-text {\n line-height: 1.4;\n}\n";
18798
18799
  styleInject(css_248z$g);
18799
18800
 
18801
+ var CardSelect = /*#__PURE__*/function (_React$Component) {
18802
+ _inherits(CardSelect, _React$Component);
18803
+
18804
+ var _super = _createSuper(CardSelect);
18805
+
18806
+ function CardSelect() {
18807
+ _classCallCheck(this, CardSelect);
18808
+
18809
+ return _super.apply(this, arguments);
18810
+ }
18811
+
18812
+ _createClass(CardSelect, [{
18813
+ key: "render",
18814
+ value: function render() {
18815
+ var props = this.props;
18816
+ var option = [{
18817
+ label: "居民身份证",
18818
+ value: "201"
18819
+ }, {
18820
+ label: "外国护照",
18821
+ value: "208"
18822
+ }, {
18823
+ label: "港澳居民来往内地通行证",
18824
+ value: "210"
18825
+ }, {
18826
+ label: "台湾居民来往大陆通行证",
18827
+ value: "213"
18828
+ }, {
18829
+ label: "中国护照",
18830
+ value: "227"
18831
+ }, {
18832
+ label: "外国人永久居留身份证",
18833
+ value: "233"
18834
+ }, {
18835
+ label: "中华人民共和国港澳居民居住证",
18836
+ value: "237"
18837
+ }, {
18838
+ label: "中华人民共和国台湾居民居住证",
18839
+ value: "238"
18840
+ }];
18841
+
18842
+ function getLable(value) {
18843
+ var _option$find;
18844
+
18845
+ return ((_option$find = option.find(function (e) {
18846
+ return e.value === value;
18847
+ })) === null || _option$find === void 0 ? void 0 : _option$find.label) || '';
18848
+ }
18849
+
18850
+ if (props.readOnly) {
18851
+ return /*#__PURE__*/React.createElement("span", {
18852
+ className: 'digtal-stakeholder-form-text'
18853
+ }, getLable(props.value));
18854
+ } else {
18855
+ return /*#__PURE__*/React.createElement(Select$1, _objectSpread2({
18856
+ style: {
18857
+ width: 200
18858
+ },
18859
+ options: option
18860
+ }, props));
18861
+ }
18862
+ }
18863
+ }]);
18864
+
18865
+ return CardSelect;
18866
+ }(React.Component);
18867
+
18868
+ var NationalSelect = /*#__PURE__*/function (_React$Component) {
18869
+ _inherits(NationalSelect, _React$Component);
18870
+
18871
+ var _super = _createSuper(NationalSelect);
18872
+
18873
+ function NationalSelect() {
18874
+ _classCallCheck(this, NationalSelect);
18875
+
18876
+ return _super.apply(this, arguments);
18877
+ }
18878
+
18879
+ _createClass(NationalSelect, [{
18880
+ key: "render",
18881
+ value: function render() {
18882
+ var props = this.props;
18883
+ var option = [{
18884
+ value: "156",
18885
+ label: "中国"
18886
+ }, {
18887
+ value: "344",
18888
+ label: "中国香港"
18889
+ }, {
18890
+ value: "158",
18891
+ label: "中国台湾"
18892
+ }, {
18893
+ value: "446",
18894
+ label: "中国澳门"
18895
+ }, {
18896
+ value: "004",
18897
+ label: "阿富汗"
18898
+ }, {
18899
+ value: "008",
18900
+ label: "阿尔巴尼亚"
18901
+ }, {
18902
+ value: "010",
18903
+ label: "南极洲"
18904
+ }, {
18905
+ value: "012",
18906
+ label: "阿尔及利亚"
18907
+ }, {
18908
+ value: "016",
18909
+ label: "美属萨摩亚"
18910
+ }, {
18911
+ value: "020",
18912
+ label: "安道尔"
18913
+ }, {
18914
+ value: "024",
18915
+ label: "安哥拉"
18916
+ }, {
18917
+ value: "028",
18918
+ label: "安提瓜和巴布达"
18919
+ }, {
18920
+ value: "031",
18921
+ label: "阿塞拜疆"
18922
+ }, {
18923
+ value: "032",
18924
+ label: "阿根廷"
18925
+ }, {
18926
+ value: "036",
18927
+ label: "澳大利亚"
18928
+ }, {
18929
+ value: "040",
18930
+ label: "奥地利"
18931
+ }, {
18932
+ value: "044",
18933
+ label: "巴哈马"
18934
+ }, {
18935
+ value: "048",
18936
+ label: "巴林"
18937
+ }, {
18938
+ value: "050",
18939
+ label: "孟加拉国"
18940
+ }, {
18941
+ value: "051",
18942
+ label: "亚美尼亚"
18943
+ }, {
18944
+ value: "052",
18945
+ label: "巴巴多斯"
18946
+ }, {
18947
+ value: "056",
18948
+ label: "比利时"
18949
+ }, {
18950
+ value: "060",
18951
+ label: "百慕大"
18952
+ }, {
18953
+ value: "064",
18954
+ label: "不丹"
18955
+ }, {
18956
+ value: "068",
18957
+ label: "玻利维亚"
18958
+ }, {
18959
+ value: "070",
18960
+ label: "波黑"
18961
+ }, {
18962
+ value: "072",
18963
+ label: "博茨瓦纳"
18964
+ }, {
18965
+ value: "074",
18966
+ label: "布维岛"
18967
+ }, {
18968
+ value: "076",
18969
+ label: "巴西"
18970
+ }, {
18971
+ value: "084",
18972
+ label: "伯利兹"
18973
+ }, {
18974
+ value: "086",
18975
+ label: "英属印度洋领地"
18976
+ }, {
18977
+ value: "090",
18978
+ label: "所罗门群岛"
18979
+ }, {
18980
+ value: "092",
18981
+ label: "英属维尔京群岛"
18982
+ }, {
18983
+ value: "096",
18984
+ label: "文莱"
18985
+ }, {
18986
+ value: "100",
18987
+ label: "保加利亚"
18988
+ }, {
18989
+ value: "104",
18990
+ label: "缅甸"
18991
+ }, {
18992
+ value: "108",
18993
+ label: "布隆迪"
18994
+ }, {
18995
+ value: "112",
18996
+ label: "白俄罗斯"
18997
+ }, {
18998
+ value: "116",
18999
+ label: "柬埔寨"
19000
+ }, {
19001
+ value: "120",
19002
+ label: "喀麦隆"
19003
+ }, {
19004
+ value: "124",
19005
+ label: "加拿大"
19006
+ }, {
19007
+ value: "132",
19008
+ label: "佛得角"
19009
+ }, {
19010
+ value: "136",
19011
+ label: "开曼群岛"
19012
+ }, {
19013
+ value: "140",
19014
+ label: "中非"
19015
+ }, {
19016
+ value: "144",
19017
+ label: "斯里兰卡"
19018
+ }, {
19019
+ value: "148",
19020
+ label: "乍得"
19021
+ }, {
19022
+ value: "152",
19023
+ label: "智利"
19024
+ }, {
19025
+ value: "162",
19026
+ label: "圣诞岛"
19027
+ }, {
19028
+ value: "166",
19029
+ label: "科科斯(基林)群岛"
19030
+ }, {
19031
+ value: "170",
19032
+ label: "哥伦比亚"
19033
+ }, {
19034
+ value: "174",
19035
+ label: "科摩罗"
19036
+ }, {
19037
+ value: "175",
19038
+ label: "马约特"
19039
+ }, {
19040
+ value: "178",
19041
+ label: "刚果(布)"
19042
+ }, {
19043
+ value: "180",
19044
+ label: "刚果(金)"
19045
+ }, {
19046
+ value: "184",
19047
+ label: "库克群岛"
19048
+ }, {
19049
+ value: "188",
19050
+ label: "哥斯达黎加"
19051
+ }, {
19052
+ value: "191",
19053
+ label: "克罗地亚"
19054
+ }, {
19055
+ value: "192",
19056
+ label: "古巴"
19057
+ }, {
19058
+ value: "196",
19059
+ label: "塞浦路斯"
19060
+ }, {
19061
+ value: "203",
19062
+ label: "捷克"
19063
+ }, {
19064
+ value: "204",
19065
+ label: "贝宁"
19066
+ }, {
19067
+ value: "208",
19068
+ label: "丹麦"
19069
+ }, {
19070
+ value: "212",
19071
+ label: "多米尼克"
19072
+ }, {
19073
+ value: "214",
19074
+ label: "多米尼加"
19075
+ }, {
19076
+ value: "218",
19077
+ label: "厄瓜多尔"
19078
+ }, {
19079
+ value: "222",
19080
+ label: "萨尔瓦多"
19081
+ }, {
19082
+ value: "226",
19083
+ label: "赤道几内亚"
19084
+ }, {
19085
+ value: "231",
19086
+ label: "埃塞俄比亚"
19087
+ }, {
19088
+ value: "232",
19089
+ label: "厄立特里亚"
19090
+ }, {
19091
+ value: "233",
19092
+ label: "爱沙尼亚"
19093
+ }, {
19094
+ value: "234",
19095
+ label: "法罗群岛"
19096
+ }, {
19097
+ value: "238",
19098
+ label: "福克兰群岛"
19099
+ }, {
19100
+ value: "239",
19101
+ label: "南乔治亚岛和南桑德韦奇岛"
19102
+ }, {
19103
+ value: "242",
19104
+ label: "斐济"
19105
+ }, {
19106
+ value: "246",
19107
+ label: "芬兰"
19108
+ }, {
19109
+ value: "250",
19110
+ label: "法国"
19111
+ }, {
19112
+ value: "254",
19113
+ label: "法属圭亚那"
19114
+ }, {
19115
+ value: "258",
19116
+ label: "法属波利尼西亚"
19117
+ }, {
19118
+ value: "260",
19119
+ label: "法属南部领地"
19120
+ }, {
19121
+ value: "262",
19122
+ label: "吉布提"
19123
+ }, {
19124
+ value: "266",
19125
+ label: "加蓬"
19126
+ }, {
19127
+ value: "268",
19128
+ label: "格鲁吉亚"
19129
+ }, {
19130
+ value: "270",
19131
+ label: "冈比亚"
19132
+ }, {
19133
+ value: "275",
19134
+ label: "巴勒斯坦"
19135
+ }, {
19136
+ value: "276",
19137
+ label: "德国"
19138
+ }, {
19139
+ value: "288",
19140
+ label: "加纳"
19141
+ }, {
19142
+ value: "292",
19143
+ label: "直布罗陀"
19144
+ }, {
19145
+ value: "296",
19146
+ label: "基里巴斯"
19147
+ }, {
19148
+ value: "300",
19149
+ label: "希腊"
19150
+ }, {
19151
+ value: "304",
19152
+ label: "格陵兰"
19153
+ }, {
19154
+ value: "308",
19155
+ label: "格林纳达"
19156
+ }, {
19157
+ value: "312",
19158
+ label: "瓜德罗普"
19159
+ }, {
19160
+ value: "316",
19161
+ label: "关岛"
19162
+ }, {
19163
+ value: "320",
19164
+ label: "危地马拉"
19165
+ }, {
19166
+ value: "324",
19167
+ label: "几内亚"
19168
+ }, {
19169
+ value: "328",
19170
+ label: "圭亚那"
19171
+ }, {
19172
+ value: "332",
19173
+ label: "海地"
19174
+ }, {
19175
+ value: "334",
19176
+ label: "赫德岛和麦克唐纳岛"
19177
+ }, {
19178
+ value: "336",
19179
+ label: "梵蒂冈"
19180
+ }, {
19181
+ value: "340",
19182
+ label: "洪都拉斯"
19183
+ }, {
19184
+ value: "348",
19185
+ label: "匈牙利"
19186
+ }, {
19187
+ value: "352",
19188
+ label: "冰岛"
19189
+ }, {
19190
+ value: "356",
19191
+ label: "印度"
19192
+ }, {
19193
+ value: "360",
19194
+ label: "印度尼西亚"
19195
+ }, {
19196
+ value: "364",
19197
+ label: "伊朗"
19198
+ }, {
19199
+ value: "368",
19200
+ label: "伊拉克"
19201
+ }, {
19202
+ value: "372",
19203
+ label: "爱尔兰"
19204
+ }, {
19205
+ value: "376",
19206
+ label: "以色列"
19207
+ }, {
19208
+ value: "380",
19209
+ label: "意大利"
19210
+ }, {
19211
+ value: "384",
19212
+ label: "科特迪瓦"
19213
+ }, {
19214
+ value: "388",
19215
+ label: "牙买加"
19216
+ }, {
19217
+ value: "392",
19218
+ label: "日本"
19219
+ }, {
19220
+ value: "398",
19221
+ label: "哈萨克斯坦"
19222
+ }, {
19223
+ value: "400",
19224
+ label: "约旦"
19225
+ }, {
19226
+ value: "404",
19227
+ label: "肯尼亚"
19228
+ }, {
19229
+ value: "408",
19230
+ label: "朝鲜"
19231
+ }, {
19232
+ value: "410",
19233
+ label: "韩国"
19234
+ }, {
19235
+ value: "414",
19236
+ label: "科威特"
19237
+ }, {
19238
+ value: "417",
19239
+ label: "吉尔吉斯斯坦"
19240
+ }, {
19241
+ value: "418",
19242
+ label: "老挝"
19243
+ }, {
19244
+ value: "422",
19245
+ label: "黎巴嫩"
19246
+ }, {
19247
+ value: "426",
19248
+ label: "莱索托"
19249
+ }, {
19250
+ value: "428",
19251
+ label: "拉脱维亚"
19252
+ }, {
19253
+ value: "430",
19254
+ label: "利比里亚"
19255
+ }, {
19256
+ value: "434",
19257
+ label: "利比亚"
19258
+ }, {
19259
+ value: "438",
19260
+ label: "列支敦士登"
19261
+ }, {
19262
+ value: "440",
19263
+ label: "立陶宛"
19264
+ }, {
19265
+ value: "442",
19266
+ label: "卢森堡"
19267
+ }, {
19268
+ value: "450",
19269
+ label: "马达加斯加"
19270
+ }, {
19271
+ value: "454",
19272
+ label: "马拉维"
19273
+ }, {
19274
+ value: "458",
19275
+ label: "马来西亚"
19276
+ }, {
19277
+ value: "462",
19278
+ label: "马尔代夫"
19279
+ }, {
19280
+ value: "466",
19281
+ label: "马里"
19282
+ }, {
19283
+ value: "470",
19284
+ label: "马耳他"
19285
+ }, {
19286
+ value: "474",
19287
+ label: "马提尼克"
19288
+ }, {
19289
+ value: "478",
19290
+ label: "毛里塔尼亚"
19291
+ }, {
19292
+ value: "480",
19293
+ label: "毛里求斯"
19294
+ }, {
19295
+ value: "484",
19296
+ label: "墨西哥"
19297
+ }, {
19298
+ value: "492",
19299
+ label: "摩纳哥"
19300
+ }, {
19301
+ value: "496",
19302
+ label: "蒙古"
19303
+ }, {
19304
+ value: "498",
19305
+ label: "摩尔多瓦"
19306
+ }, {
19307
+ value: "499",
19308
+ label: "黑山"
19309
+ }, {
19310
+ value: "500",
19311
+ label: "蒙特塞拉特"
19312
+ }, {
19313
+ value: "504",
19314
+ label: "摩洛哥"
19315
+ }, {
19316
+ value: "508",
19317
+ label: "莫桑比克"
19318
+ }, {
19319
+ value: "512",
19320
+ label: "阿曼"
19321
+ }, {
19322
+ value: "516",
19323
+ label: "纳米比亚"
19324
+ }, {
19325
+ value: "520",
19326
+ label: "瑙鲁"
19327
+ }, {
19328
+ value: "524",
19329
+ label: "尼泊尔"
19330
+ }, {
19331
+ value: "528",
19332
+ label: "荷兰"
19333
+ }, {
19334
+ value: "530",
19335
+ label: "荷属安的列斯"
19336
+ }, {
19337
+ value: "533",
19338
+ label: "阿鲁巴"
19339
+ }, {
19340
+ value: "540",
19341
+ label: "新喀里多尼亚"
19342
+ }, {
19343
+ value: "548",
19344
+ label: "瓦努阿图"
19345
+ }, {
19346
+ value: "554",
19347
+ label: "新西兰"
19348
+ }, {
19349
+ value: "558",
19350
+ label: "尼加拉瓜"
19351
+ }, {
19352
+ value: "562",
19353
+ label: "尼日尔"
19354
+ }, {
19355
+ value: "566",
19356
+ label: "尼日利亚"
19357
+ }, {
19358
+ value: "570",
19359
+ label: "纽埃"
19360
+ }, {
19361
+ value: "574",
19362
+ label: "诺福克岛"
19363
+ }, {
19364
+ value: "578",
19365
+ label: "挪威"
19366
+ }, {
19367
+ value: "580",
19368
+ label: "北马里亚纳"
19369
+ }, {
19370
+ value: "581",
19371
+ label: "美国本土外小岛屿"
19372
+ }, {
19373
+ value: "583",
19374
+ label: "密克罗尼西亚联邦"
19375
+ }, {
19376
+ value: "584",
19377
+ label: "马绍尔群岛"
19378
+ }, {
19379
+ value: "585",
19380
+ label: "帕劳"
19381
+ }, {
19382
+ value: "586",
19383
+ label: "巴基斯坦"
19384
+ }, {
19385
+ value: "591",
19386
+ label: "巴拿马"
19387
+ }, {
19388
+ value: "598",
19389
+ label: "巴布亚新几内亚"
19390
+ }, {
19391
+ value: "600",
19392
+ label: "巴拉圭"
19393
+ }, {
19394
+ value: "604",
19395
+ label: "秘鲁"
19396
+ }, {
19397
+ value: "608",
19398
+ label: "菲律宾"
19399
+ }, {
19400
+ value: "612",
19401
+ label: "皮特凯恩"
19402
+ }, {
19403
+ value: "616",
19404
+ label: "波兰"
19405
+ }, {
19406
+ value: "620",
19407
+ label: "葡萄牙"
19408
+ }, {
19409
+ value: "624",
19410
+ label: "几内亚比绍"
19411
+ }, {
19412
+ value: "626",
19413
+ label: "东帝汶"
19414
+ }, {
19415
+ value: "630",
19416
+ label: "波多黎各"
19417
+ }, {
19418
+ value: "634",
19419
+ label: "卡塔尔"
19420
+ }, {
19421
+ value: "638",
19422
+ label: "留尼汪"
19423
+ }, {
19424
+ value: "642",
19425
+ label: "罗马尼亚"
19426
+ }, {
19427
+ value: "643",
19428
+ label: "俄罗斯联邦"
19429
+ }, {
19430
+ value: "646",
19431
+ label: "卢旺达"
19432
+ }, {
19433
+ value: "654",
19434
+ label: "圣赫勒拿"
19435
+ }, {
19436
+ value: "659",
19437
+ label: "圣基茨和尼维斯"
19438
+ }, {
19439
+ value: "660",
19440
+ label: "安圭拉"
19441
+ }, {
19442
+ value: "662",
19443
+ label: "圣卢西亚"
19444
+ }, {
19445
+ value: "666",
19446
+ label: "圣皮埃尔和密克隆"
19447
+ }, {
19448
+ value: "670",
19449
+ label: "圣文森特和格林纳丁斯"
19450
+ }, {
19451
+ value: "674",
19452
+ label: "圣马力诺"
19453
+ }, {
19454
+ value: "678",
19455
+ label: "圣多美和普林西比"
19456
+ }, {
19457
+ value: "682",
19458
+ label: "沙特阿拉伯"
19459
+ }, {
19460
+ value: "686",
19461
+ label: "塞内加尔"
19462
+ }, {
19463
+ value: "688",
19464
+ label: "塞尔维亚"
19465
+ }, {
19466
+ value: "690",
19467
+ label: "塞舌尔"
19468
+ }, {
19469
+ value: "694",
19470
+ label: "塞拉利昂"
19471
+ }, {
19472
+ value: "702",
19473
+ label: "新加坡"
19474
+ }, {
19475
+ value: "703",
19476
+ label: "斯洛伐克"
19477
+ }, {
19478
+ value: "704",
19479
+ label: "越南"
19480
+ }, {
19481
+ value: "705",
19482
+ label: "斯洛文尼亚"
19483
+ }, {
19484
+ value: "706",
19485
+ label: "索马里"
19486
+ }, {
19487
+ value: "710",
19488
+ label: "南非"
19489
+ }, {
19490
+ value: "716",
19491
+ label: "津巴布韦"
19492
+ }, {
19493
+ value: "724",
19494
+ label: "西班牙"
19495
+ }, {
19496
+ value: "728",
19497
+ label: "南苏丹"
19498
+ }, {
19499
+ value: "732",
19500
+ label: "西撒哈拉"
19501
+ }, {
19502
+ value: "736",
19503
+ label: "苏丹"
19504
+ }, {
19505
+ value: "740",
19506
+ label: "苏里南"
19507
+ }, {
19508
+ value: "744",
19509
+ label: "斯瓦尔巴岛和扬马延岛"
19510
+ }, {
19511
+ value: "748",
19512
+ label: "斯威士兰"
19513
+ }, {
19514
+ value: "752",
19515
+ label: "瑞典"
19516
+ }, {
19517
+ value: "756",
19518
+ label: "瑞士"
19519
+ }, {
19520
+ value: "760",
19521
+ label: "叙利亚"
19522
+ }, {
19523
+ value: "762",
19524
+ label: "塔吉克斯坦"
19525
+ }, {
19526
+ value: "764",
19527
+ label: "泰国"
19528
+ }, {
19529
+ value: "768",
19530
+ label: "多哥"
19531
+ }, {
19532
+ value: "772",
19533
+ label: "托克劳"
19534
+ }, {
19535
+ value: "776",
19536
+ label: "汤加"
19537
+ }, {
19538
+ value: "780",
19539
+ label: "特立尼达和多巴哥"
19540
+ }, {
19541
+ value: "784",
19542
+ label: "阿联酋"
19543
+ }, {
19544
+ value: "788",
19545
+ label: "突尼斯"
19546
+ }, {
19547
+ value: "792",
19548
+ label: "土耳其"
19549
+ }, {
19550
+ value: "795",
19551
+ label: "土库曼斯坦"
19552
+ }, {
19553
+ value: "796",
19554
+ label: "特克斯和凯科斯群岛"
19555
+ }, {
19556
+ value: "798",
19557
+ label: "图瓦卢"
19558
+ }, {
19559
+ value: "800",
19560
+ label: "乌干达"
19561
+ }, {
19562
+ value: "804",
19563
+ label: "乌克兰"
19564
+ }, {
19565
+ value: "807",
19566
+ label: "前南马其顿"
19567
+ }, {
19568
+ value: "818",
19569
+ label: "埃及"
19570
+ }, {
19571
+ value: "826",
19572
+ label: "英国"
19573
+ }, {
19574
+ value: "831",
19575
+ label: "根西岛"
19576
+ }, {
19577
+ value: "832",
19578
+ label: "泽西岛"
19579
+ }, {
19580
+ value: "833",
19581
+ label: "马恩岛"
19582
+ }, {
19583
+ value: "834",
19584
+ label: "坦桑尼亚"
19585
+ }, {
19586
+ value: "840",
19587
+ label: "美国"
19588
+ }, {
19589
+ value: "850",
19590
+ label: "美属维尔京群岛"
19591
+ }, {
19592
+ value: "854",
19593
+ label: "布基纳法索"
19594
+ }, {
19595
+ value: "858",
19596
+ label: "乌拉圭"
19597
+ }, {
19598
+ value: "860",
19599
+ label: "乌兹别克斯坦"
19600
+ }, {
19601
+ value: "862",
19602
+ label: "委内瑞拉"
19603
+ }, {
19604
+ value: "876",
19605
+ label: "瓦利斯和富图纳"
19606
+ }, {
19607
+ value: "882",
19608
+ label: "萨摩亚"
19609
+ }, {
19610
+ value: "887",
19611
+ label: "也门"
19612
+ }, {
19613
+ value: "891",
19614
+ label: "南斯拉夫"
19615
+ }, {
19616
+ value: "894",
19617
+ label: "赞比亚"
19618
+ }, {
19619
+ value: "A00",
19620
+ label: "科索沃"
19621
+ }];
19622
+
19623
+ function getLable(value) {
19624
+ var _option$find;
19625
+
19626
+ return ((_option$find = option.find(function (e) {
19627
+ return e.value === value;
19628
+ })) === null || _option$find === void 0 ? void 0 : _option$find.label) || '';
19629
+ }
19630
+
19631
+ if (props.readOnly) {
19632
+ return /*#__PURE__*/React.createElement("span", {
19633
+ className: 'digtal-stakeholder-form-text'
19634
+ }, getLable(props.value));
19635
+ } else {
19636
+ return /*#__PURE__*/React.createElement(Select$1, _objectSpread2({
19637
+ style: {
19638
+ width: 100
19639
+ },
19640
+ options: option
19641
+ }, props));
19642
+ }
19643
+ }
19644
+ }]);
19645
+
19646
+ return NationalSelect;
19647
+ }(React.Component);
19648
+
18800
19649
  var RULES = {
18801
19650
  companyName: function companyName(label) {
18802
19651
  return [{
@@ -18872,68 +19721,339 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
18872
19721
  allowEditFlag = props.allowEditFlag,
18873
19722
  onClickImportButton = props.onClickImportButton,
18874
19723
  _props$isVatNormal = props.isVatNormal,
18875
- isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal;
19724
+ isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal,
19725
+ changeNaturalPersonFlag = props.changeNaturalPersonFlag;
19726
+
19727
+ var _React$useState = React.useState(typeof props.isExpand === 'boolean' ? props.isExpand : true),
19728
+ _React$useState2 = _slicedToArray(_React$useState, 2),
19729
+ isExpand = _React$useState2[0],
19730
+ setExpand = _React$useState2[1];
19731
+
19732
+ var _React$useState3 = React.useState(''),
19733
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
19734
+ validateStatus = _React$useState4[0],
19735
+ setStatus = _React$useState4[1];
19736
+
19737
+ var _React$useState5 = React.useState(''),
19738
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
19739
+ errorInfo = _React$useState6[0],
19740
+ setInfo = _React$useState6[1];
19741
+
19742
+ var _React$useState7 = React.useState(''),
19743
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
19744
+ nation = _React$useState8[0],
19745
+ setNationStatue = _React$useState8[1];
19746
+
19747
+ var _React$useState9 = React.useState(''),
19748
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
19749
+ nationInfo = _React$useState10[0],
19750
+ setNation = _React$useState10[1];
19751
+
19752
+ var getFieldDecorator = form.getFieldDecorator;
19753
+ var controller = Invoice.useInvoiceController();
19754
+ var model = controller.useMemo(function (s) {
19755
+ return s.model;
19756
+ }, []);
19757
+ var disableds = controller.useMemo(function (s) {
19758
+ return s.stakeholder.disableds || [];
19759
+ }, []);
19760
+ var rulesMap = controller.useMemo(function (s) {
19761
+ return s.stakeholder.rulesMap || {};
19762
+ }, []);
19763
+ var naturalPersonFlag = controller.useMemo(function (s) {
19764
+ return s.stakeholder.naturalPersonFlag || 'COMPANY';
19765
+ }, []);
19766
+ /** 乐企 */
19767
+
19768
+ var leqispanW = React.useMemo(function () {
19769
+ if (props.leqi) {
19770
+ return 0;
19771
+ } else {
19772
+ return 2;
19773
+ }
19774
+ }, [props.leqi, props.riskData]);
19775
+ /** 直连 */
19776
+
19777
+ var riskspanW = React.useMemo(function () {
19778
+ if (props.riskData) {
19779
+ return 0;
19780
+ } else {
19781
+ return 2;
19782
+ }
19783
+ }, [props.leqi, props.riskData]);
19784
+ var readOnly = React.useMemo(function () {
19785
+ if (model === 'readOnly') return true;
19786
+ if (model === 'prefab') return true;
19787
+ return false;
19788
+ }, [model]);
19789
+ var onExpand = React.useCallback(function () {
19790
+ setExpand(function (e) {
19791
+ return !e;
19792
+ });
19793
+ }, []);
19794
+ var isReadOnly = React.useCallback(function (field) {
19795
+ return readOnly || disableds.indexOf(field) >= 0;
19796
+ }, [disableds, readOnly]);
19797
+ var isReadOnly2 = React.useCallback(function (field) {
19798
+ return model === 'readOnly' || model === 'prefab' && !allowEditFlag;
19799
+ }, [allowEditFlag, model]);
19800
+ var getRules = React.useCallback(function (field, defaultRules) {
19801
+ if (isReadOnly(field)) return [];
19802
+ return rulesMap[field] || defaultRules;
19803
+ }, [rulesMap, isReadOnly, isReadOnly]);
19804
+ controller.useForm('stakeholder', form); // props.isExpand 变化的时候更新
19805
+
19806
+ React.useEffect(function () {
19807
+ setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
19808
+ }, [props.isExpand]);
19809
+ var onChangeType = React.useCallback(function (value) {
19810
+ var buyerTaxId = form === null || form === void 0 ? void 0 : form.getFieldValue("buyerTaxId");
19811
+ var certificateNumber = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
19812
+ var nationality = form === null || form === void 0 ? void 0 : form.getFieldValue("nationality");
19813
+
19814
+ if (value === "201") {
19815
+ // 当“自然人证件类型”选择“201:居民身份证”时,校验是否为“156:中国’
19816
+ form === null || form === void 0 ? void 0 : form.setFieldsValue({
19817
+ nationality: "156"
19818
+ });
19819
+ setNationStatue('');
19820
+ setNation('');
19821
+
19822
+ if (buyerTaxId !== certificateNumber) {
19823
+ setStatus('error');
19824
+ setInfo('证件号码应与购方税号保持一致');
19825
+ }
19826
+ } else if (value === "210") {
19827
+ if (value.startsWith("M")) {
19828
+ //如果“证件号码”以M开头,"国籍(或地区头,)”必须为“446:中国澳门”;校验证件号码必须以H或M开头
19829
+ if (nationality !== '446') {
19830
+ setNationStatue('error');
19831
+ setNation('请选择正确的国籍');
19832
+ } else {
19833
+ setNationStatue('');
19834
+ setNation('');
19835
+ }
19836
+ } else if (value.startsWith("H")) {
19837
+ //如果“证件号码”以H开国籍(或地区)”必须为“344:中国香港”;
19838
+ if (nationality !== '344') {
19839
+ setNationStatue('error');
19840
+ setNation('请选择正确的国籍');
19841
+ } else {
19842
+ setNationStatue('');
19843
+ setNation('');
19844
+ }
19845
+ } else {
19846
+ setStatus('error');
19847
+ setInfo('请输入正确的证件号码');
19848
+ }
19849
+ } else if (value === "237") {
19850
+ if (value.startsWith("810000")) {
19851
+ if (nationality !== '344') {
19852
+ setNationStatue('error');
19853
+ setNation('请选择正确的国籍');
19854
+ } else {
19855
+ setNationStatue('');
19856
+ setNation('');
19857
+ }
19858
+ } else if (value.startsWith("820000")) {
19859
+ if (nationality !== '446') {
19860
+ setNationStatue('error');
19861
+ setNation('请选择正确的国籍');
19862
+ } else {
19863
+ setNationStatue('');
19864
+ setNation('');
19865
+ }
19866
+ } else {
19867
+ setStatus('error');
19868
+ setInfo('请输入正确的证件号码');
19869
+ return Promise.reject("请输入正确的证件号码");
19870
+ }
19871
+ } else if (value === "227") {
19872
+ // 当“自然人证件类型”选择“227:中华人民共和国护照”时,校验是否为“156:中国
19873
+ form === null || form === void 0 ? void 0 : form.setFieldsValue({
19874
+ nationality: "156"
19875
+ });
19876
+ } else if (value === "213" || value === "238") {
19877
+ // 当“自然人证件类型”选择“213:台湾居民来往大陆通行证”时,校验是否为”158:中国台湾”
19878
+ // 当“自然人证件类型”选择“238:中华人民共和国台湾居民居住证”时,校验是否为“ 158:中国台湾”
19879
+ form === null || form === void 0 ? void 0 : form.setFieldsValue({
19880
+ nationality: "158"
19881
+ });
19882
+ }
19883
+ }, [form]);
19884
+ /** 校验证件号码*/
19885
+
19886
+ var validateIDCode = useCallback(function (_, value) {
19887
+ if (!value) {
19888
+ setStatus('error');
19889
+ setInfo('请输入正确的证件号码');
19890
+ return Promise.resolve();
19891
+ }
19892
+
19893
+ var idtype = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateType");
19894
+ var nationality = form === null || form === void 0 ? void 0 : form.getFieldValue("nationality");
19895
+
19896
+ if (idtype === "210") {
19897
+ // 当“自然人证件类型”选择“210:港澳居民来往内地通行证”时,
19898
+ if (value.startsWith("M")) {
19899
+ //如果“证件号码”以M开头,"国籍(或地区头,)”必须为“446:中国澳门”;校验证件号码必须以H或M开头
19900
+ if (nationality !== '446') {
19901
+ setNationStatue('error');
19902
+ setNation('请选择正确的国籍');
19903
+ } else {
19904
+ setNationStatue('');
19905
+ setNation('');
19906
+ }
19907
+ } else if (value.startsWith("H")) {
19908
+ //如果“证件号码”以H开国籍(或地区)”必须为“344:中国香港”;
19909
+ if (nationality !== '344') {
19910
+ setNationStatue('error');
19911
+ setNation('请选择正确的国籍');
19912
+ } else {
19913
+ setNationStatue('');
19914
+ setNation('');
19915
+ }
19916
+ } else {
19917
+ setStatus('error');
19918
+ setInfo('请输入正确的证件号码');
19919
+ return Promise.reject("请输入正确的证件号码");
19920
+ }
19921
+ } else if (idtype === "237") {
19922
+ //当“自然人证件类型”选择“237:中华人民共和国港澳居民居住证”时,校验证件号码必须以810000或820000开头,如果“证件号码”以810000开头,必须为“344:中国香国籍(或地区))港”;如果“证件号码”以820000开头,国籍(或地区)必须为“446:中国澳门”
19923
+ if (value.startsWith("810000")) {
19924
+ if (nationality !== '344') {
19925
+ setNationStatue('error');
19926
+ setNation('请选择正确的国籍');
19927
+ } else {
19928
+ setNationStatue('');
19929
+ setNation('');
19930
+ }
19931
+ } else if (value.startsWith("820000")) {
19932
+ if (nationality !== '446') {
19933
+ setNationStatue('error');
19934
+ setNation('请选择正确的国籍');
19935
+ } else {
19936
+ setNationStatue('');
19937
+ setNation('');
19938
+ }
19939
+ } else {
19940
+ setStatus('error');
19941
+ setInfo('请输入正确的证件号码');
19942
+ return Promise.reject("请输入正确的证件号码");
19943
+ }
19944
+ } // 当“销售方自然人证件类型”填写“201:居民身份证”,“销售方纳税人识别号”必须与“销售方自然人证件号码”完全一致
19945
+
19946
+
19947
+ if (idtype === "201") {
19948
+ var buyerTaxId = form === null || form === void 0 ? void 0 : form.getFieldValue("buyerTaxId");
19949
+
19950
+ if (value !== buyerTaxId) {
19951
+ setStatus('error');
19952
+ setInfo('证件号码应与购方税号保持一致');
19953
+ return Promise.reject("证件号码应与购方税号保持一致");
19954
+ } else if (value === buyerTaxId) {
19955
+ setStatus('');
19956
+ setInfo('');
19957
+ }
19958
+ }
19959
+
19960
+ setStatus('');
19961
+ setInfo('');
19962
+ return Promise.resolve();
19963
+ }, [form]);
19964
+ var validateIDCode2 = useCallback(function (e) {
19965
+ var value = e.target.value; // if (!value) {
19966
+ // setStatus('');
19967
+ // setInfo('')
19968
+ // }
19969
+
19970
+ var idtype = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateType"); // // 当“自然人证件类型”填写“201:居民身份证”,“购买方纳税人识别号”必须与“自然人证件号码”完全一致
19971
+
19972
+ if (idtype === "201") {
19973
+ var certificateNumber = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
19974
+ console.log(value, certificateNumber);
19975
+
19976
+ if (value !== certificateNumber) {
19977
+ setStatus('error');
19978
+ setInfo('证件号码应与购方税号保持一致');
19979
+ } else {
19980
+ setStatus('');
19981
+ setInfo('');
19982
+ }
19983
+ }
19984
+ }, [form]);
19985
+ var validateNationality = useCallback(function (_, value) {
19986
+ if (!value) {
19987
+ setNationStatue('error');
19988
+ setNation('请选择正确的国籍');
19989
+ return Promise.resolve();
19990
+ }
19991
+
19992
+ var idtype = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateType");
19993
+ var idcode = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
19994
+ console.log(value, idtype, idcode);
18876
19995
 
18877
- var _React$useState = React.useState(typeof props.isExpand === 'boolean' ? props.isExpand : true),
18878
- _React$useState2 = _slicedToArray(_React$useState, 2),
18879
- isExpand = _React$useState2[0],
18880
- setExpand = _React$useState2[1];
19996
+ if (idtype === "201" || idtype === "227") {
19997
+ // 当“自然人证件类型”选择“201:居民身份证”时,校验是否为“156:中国’
19998
+ // 当“自然人证件类型”选择“227:中华人民共和国护照”时,校验是否为“156:中国
19999
+ if (value !== "156") {
20000
+ setNationStatue('error');
20001
+ setNation('请选择正确的国籍');
20002
+ return Promise.reject("请选择正确的国籍");
20003
+ }
20004
+ } else if (idtype === "213" || idtype === "238") {
20005
+ // 当“自然人证件类型”选择“213:台湾居民来往大陆通行证”时,校验是否为”158:中国台湾”
20006
+ // 当“自然人证件类型”选择“238:中华人民共和国台湾居民居住证”时,校验是否为“ 158:中国台湾”
20007
+ if (value !== "158") {
20008
+ setNationStatue('error');
20009
+ setNation('请选择正确的国籍');
20010
+ return Promise.reject("请选择正确的国籍");
20011
+ }
20012
+ } else if (idtype === "210") {
20013
+ //当“自然人证件类型”选择“210:港澳居民来往内地通行证”时,如果“证件号码”以H开国籍(或地区)”必须为“344:中国香港”;如果“证件号码”以M开头,"国籍(或地区头,)”必须为“446:中国澳门”;
20014
+ var r = false;
18881
20015
 
18882
- var getFieldDecorator = form.getFieldDecorator;
18883
- var controller = Invoice.useInvoiceController();
18884
- var model = controller.useMemo(function (s) {
18885
- return s.model;
18886
- }, []);
18887
- var disableds = controller.useMemo(function (s) {
18888
- return s.stakeholder.disableds || [];
18889
- }, []);
18890
- var rulesMap = controller.useMemo(function (s) {
18891
- return s.stakeholder.rulesMap || {};
18892
- }, []);
18893
- /** 乐企 */
20016
+ if (idcode) {
20017
+ if (idcode.startsWith("M") && value === "446") {
20018
+ r = true;
20019
+ } else if (idcode.startsWith("H") && value === "344") {
20020
+ r = true;
20021
+ }
20022
+ } else if (value === "344" || value === "446") {
20023
+ r = true;
20024
+ }
18894
20025
 
18895
- var leqispanW = React.useMemo(function () {
18896
- if (props.leqi) {
18897
- return 0;
18898
- } else {
18899
- return 2;
18900
- }
18901
- }, [props.leqi, props.riskData]);
18902
- /** 直连 */
20026
+ if (!r) {
20027
+ setNationStatue('error');
20028
+ setNation('请选择正确的国籍');
20029
+ return Promise.reject("请选择正确的国籍");
20030
+ }
20031
+ } else if (idtype === "237") {
20032
+ //当“自然人证件类型”选择“237:中华人民共和国港澳居民居住证”时,校验证件号码必须以810000或820000开头,如果“证件号码”以810000开头,必须为“344:中国香国籍(或地区))港”;如果“证件号码”以820000开头,国籍(或地区)必须为“446:中国澳门”
20033
+ var _r = false;
18903
20034
 
18904
- var riskspanW = React.useMemo(function () {
18905
- if (props.riskData) {
18906
- return 0;
18907
- } else {
18908
- return 2;
20035
+ if (idcode) {
20036
+ if (idcode.startsWith("820000") && value === "446") {
20037
+ _r = true;
20038
+ } else if (idcode.startsWith("810000") && value === "344") {
20039
+ _r = true;
20040
+ }
20041
+ } else if (value === "344" || value === "446") {
20042
+ _r = true;
20043
+ }
20044
+
20045
+ if (!_r) {
20046
+ setNationStatue('error');
20047
+ setNation('请选择正确的国籍');
20048
+ return Promise.reject("请选择正确的国籍");
20049
+ }
18909
20050
  }
18910
- }, [props.leqi, props.riskData]);
18911
- var readOnly = React.useMemo(function () {
18912
- if (model === 'readOnly') return true;
18913
- if (model === 'prefab') return true;
18914
- return false;
18915
- }, [model]);
18916
- var onExpand = React.useCallback(function () {
18917
- setExpand(function (e) {
18918
- return !e;
18919
- });
18920
- }, []);
18921
- var isReadOnly = React.useCallback(function (field) {
18922
- return readOnly || disableds.indexOf(field) >= 0;
18923
- }, [disableds, readOnly]);
18924
- var isReadOnly2 = React.useCallback(function (field) {
18925
- return model === 'readOnly' || model === 'prefab' && !allowEditFlag;
18926
- }, [allowEditFlag, model]);
18927
- var getRules = React.useCallback(function (field, defaultRules) {
18928
- if (isReadOnly(field)) return [];
18929
- return rulesMap[field] || defaultRules;
18930
- }, [rulesMap, isReadOnly, isReadOnly]);
18931
- controller.useForm('stakeholder', form); // props.isExpand 变化的时候更新
18932
20051
 
18933
- React.useEffect(function () {
18934
- setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
18935
- }, [props.isExpand]);
18936
- return /*#__PURE__*/React.createElement("div", {
20052
+ setNationStatue('');
20053
+ setNation('');
20054
+ return Promise.resolve();
20055
+ }, [form]);
20056
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
18937
20057
  className: classnames("kts-invoice-operate-invoice-digtal-stakeholder", {
18938
20058
  readOnly: readOnly
18939
20059
  })
@@ -18954,7 +20074,8 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
18954
20074
  }, props.isNaturalPerson === true && /*#__PURE__*/React.createElement(Form.Item, {
18955
20075
  colon: false
18956
20076
  }, getFieldDecorator('naturalPersonFlag', {})( /*#__PURE__*/React.createElement(NaturalPersonFlag, {
18957
- readOnly: isReadOnly('naturalPersonFlag')
20077
+ readOnly: isReadOnly('naturalPersonFlag'),
20078
+ onChange: changeNaturalPersonFlag
18958
20079
  })))), /*#__PURE__*/React.createElement(Form, {
18959
20080
  className: "digtal-stakeholder-form"
18960
20081
  }, /*#__PURE__*/React.createElement(Row, {
@@ -18998,6 +20119,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
18998
20119
  }].concat(_toConsumableArray(RULES.taxId('购买方纳税人识别号'))))
18999
20120
  })( /*#__PURE__*/React.createElement(BuyerNameInput$1, {
19000
20121
  myform: form,
20122
+ onChange: validateIDCode2,
19001
20123
  fieldName: 'buyerTaxId',
19002
20124
  readOnly: isReadOnly('buyerTaxId'),
19003
20125
  placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
@@ -19233,19 +20355,121 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
19233
20355
  style: {
19234
20356
  whiteSpace: 'nowrap'
19235
20357
  }
19236
- }, "\u662F\u5426\u5C55\u793A"))))))));
20358
+ }, "\u662F\u5426\u5C55\u793A")))))))), naturalPersonFlag === 'NATURAL' && /*#__PURE__*/React.createElement("div", {
20359
+ className: 'kts-invoice-operate-invoice-digtal-payinfo'
20360
+ }, /*#__PURE__*/React.createElement(Form, {
20361
+ className: "digtal-stakeholder-form",
20362
+ style: {
20363
+ width: '100%'
20364
+ }
20365
+ }, /*#__PURE__*/React.createElement(Row, {
20366
+ gutter: [16, 0]
20367
+ }, /*#__PURE__*/React.createElement(Col, {
20368
+ span: 5
20369
+ }, /*#__PURE__*/React.createElement(Form.Item, {
20370
+ label: "\u81EA\u7136\u4EBA\u8D2D\u4E70\u65B9\u8865\u5145\u4FE1\u606F",
20371
+ colon: false
20372
+ })), /*#__PURE__*/React.createElement(Col, {
20373
+ span: 6
20374
+ }, /*#__PURE__*/React.createElement(Form.Item, {
20375
+ label: "\u8BC1\u4EF6\u7C7B\u578B",
20376
+ colon: false
20377
+ }, getFieldDecorator('certificateType', {
20378
+ rules: [{
20379
+ required: true,
20380
+ message: '证件类型必填'
20381
+ }]
20382
+ })( /*#__PURE__*/React.createElement(CardSelect, {
20383
+ onChange: onChangeType,
20384
+ readOnly: isReadOnly('certificateType'),
20385
+ placeholder: "\u8BC1\u4EF6\u7C7B\u578B\u5FC5\u586B",
20386
+ autoComplete: "off"
20387
+ })))), /*#__PURE__*/React.createElement(Col, {
20388
+ span: 7
20389
+ }, /*#__PURE__*/React.createElement(Form.Item, {
20390
+ label: "\u8BC1\u4EF6\u53F7\u7801",
20391
+ colon: false,
20392
+ validateStatus: validateStatus,
20393
+ help: errorInfo
20394
+ }, getFieldDecorator('certificateNumber', {
20395
+ rules: [{
20396
+ required: true,
20397
+ message: '证件号码必填'
20398
+ }, {
20399
+ max: 30,
20400
+ message: "\u5185\u5BB9\u8D85\u957F"
20401
+ }, {
20402
+ validator: validateIDCode
20403
+ }]
20404
+ })( /*#__PURE__*/React.createElement(MyInput$1, {
20405
+ readOnly: isReadOnly('certificateNumber'),
20406
+ placeholder: "\u8BC1\u4EF6\u53F7\u7801\u5FC5\u586B",
20407
+ autoComplete: "off"
20408
+ })))), /*#__PURE__*/React.createElement(Col, {
20409
+ span: 6
20410
+ }, /*#__PURE__*/React.createElement(Form.Item, {
20411
+ label: "\u56FD\u7C4D(\u6216\u5730\u533A)",
20412
+ colon: false,
20413
+ validateStatus: nation,
20414
+ help: nationInfo
20415
+ }, getFieldDecorator('nationality', {
20416
+ rules: [{
20417
+ required: true,
20418
+ message: '国籍必填'
20419
+ }, {
20420
+ validator: validateNationality
20421
+ }]
20422
+ })( /*#__PURE__*/React.createElement(NationalSelect, {
20423
+ showSearch: true,
20424
+ optionFilterProp: "children",
20425
+ filterOption: function filterOption(input, option) {
20426
+ if (option) {
20427
+ var _option$label;
20428
+
20429
+ return ((_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.indexOf(input)) >= 0;
20430
+ }
20431
+
20432
+ return false;
20433
+ },
20434
+ readOnly: isReadOnly('nationality'),
20435
+ placeholder: "\u56FD\u7C4D\u5FC5\u586B",
20436
+ autoComplete: "off"
20437
+ }))))))));
19237
20438
  });
19238
20439
 
19239
20440
  function NaturalPersonFlag(props) {
19240
- var _React$useState3 = React.useState(props.value || 'COMPANY'),
19241
- _React$useState4 = _slicedToArray(_React$useState3, 2),
19242
- value = _React$useState4[0],
19243
- setValue = _React$useState4[1];
20441
+ var controller = Invoice.useInvoiceController();
20442
+
20443
+ var _React$useState11 = React.useState(props.value || 'COMPANY'),
20444
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
20445
+ value = _React$useState12[0],
20446
+ setValue = _React$useState12[1];
19244
20447
 
19245
20448
  var onChange = React.useCallback(function (e) {
19246
20449
  if (props.readOnly) return;
19247
- setValue(e.target.checked ? 'NATURAL' : 'COMPANY');
19248
- props.onChange && props.onChange(e.target.checked ? 'NATURAL' : 'COMPANY');
20450
+ var naturalPersonFlag = e.target.checked ? 'NATURAL' : 'COMPANY';
20451
+ setValue(naturalPersonFlag);
20452
+ controller.pipeline( /*#__PURE__*/function () {
20453
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
20454
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
20455
+ while (1) {
20456
+ switch (_context.prev = _context.next) {
20457
+ case 0:
20458
+ s.stakeholder.naturalPersonFlag = naturalPersonFlag;
20459
+
20460
+ case 1:
20461
+ case "end":
20462
+ return _context.stop();
20463
+ }
20464
+ }
20465
+ }, _callee);
20466
+ }));
20467
+
20468
+ return function (_x) {
20469
+ return _ref.apply(this, arguments);
20470
+ };
20471
+ }())();
20472
+ props.onChange && props.onChange(naturalPersonFlag);
19249
20473
  }, [props.onChange, props.readOnly]);
19250
20474
  React.useEffect(function () {
19251
20475
  setValue(props.value || 'COMPANY');
@@ -19268,10 +20492,10 @@ function BuyerNameInput$1(props) {
19268
20492
  return s.autoComplete;
19269
20493
  }, []);
19270
20494
 
19271
- var _React$useState5 = React.useState([]),
19272
- _React$useState6 = _slicedToArray(_React$useState5, 2),
19273
- options = _React$useState6[0],
19274
- setOptions = _React$useState6[1];
20495
+ var _React$useState13 = React.useState([]),
20496
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
20497
+ options = _React$useState14[0],
20498
+ setOptions = _React$useState14[1];
19275
20499
 
19276
20500
  var onChangeAutoComplete = React.useCallback(function (value) {
19277
20501
  var record = options.filter(function (e) {
@@ -19282,78 +20506,78 @@ function BuyerNameInput$1(props) {
19282
20506
  setOptions([]);
19283
20507
  }, [options, fieldName, form]);
19284
20508
  var onSearch = React.useCallback( /*#__PURE__*/function () {
19285
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
19286
- return _regeneratorRuntime().wrap(function _callee$(_context) {
20509
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(searchText) {
20510
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
19287
20511
  while (1) {
19288
- switch (_context.prev = _context.next) {
20512
+ switch (_context2.prev = _context2.next) {
19289
20513
  case 0:
19290
- _context.next = 2;
20514
+ _context2.next = 2;
19291
20515
  return Discontinue.start();
19292
20516
 
19293
20517
  case 2:
19294
- _context.prev = 2;
20518
+ _context2.prev = 2;
19295
20519
 
19296
20520
  if (!(fieldName === 'buyerName')) {
19297
- _context.next = 12;
20521
+ _context2.next = 12;
19298
20522
  break;
19299
20523
  }
19300
20524
 
19301
20525
  if (!autoComplete.onBuyerNameSearch) {
19302
- _context.next = 10;
20526
+ _context2.next = 10;
19303
20527
  break;
19304
20528
  }
19305
20529
 
19306
- _context.t0 = setOptions;
19307
- _context.next = 8;
20530
+ _context2.t0 = setOptions;
20531
+ _context2.next = 8;
19308
20532
  return autoComplete.onBuyerNameSearch(searchText);
19309
20533
 
19310
20534
  case 8:
19311
- _context.t1 = _context.sent;
19312
- (0, _context.t0)(_context.t1);
20535
+ _context2.t1 = _context2.sent;
20536
+ (0, _context2.t0)(_context2.t1);
19313
20537
 
19314
20538
  case 10:
19315
- _context.next = 19;
20539
+ _context2.next = 19;
19316
20540
  break;
19317
20541
 
19318
20542
  case 12:
19319
20543
  if (!(fieldName === 'buyerTaxId')) {
19320
- _context.next = 19;
20544
+ _context2.next = 19;
19321
20545
  break;
19322
20546
  }
19323
20547
 
19324
20548
  if (!autoComplete.onBuyerTaxIdSearch) {
19325
- _context.next = 19;
20549
+ _context2.next = 19;
19326
20550
  break;
19327
20551
  }
19328
20552
 
19329
- _context.t2 = setOptions;
19330
- _context.next = 17;
20553
+ _context2.t2 = setOptions;
20554
+ _context2.next = 17;
19331
20555
  return autoComplete.onBuyerTaxIdSearch(searchText);
19332
20556
 
19333
20557
  case 17:
19334
- _context.t3 = _context.sent;
19335
- (0, _context.t2)(_context.t3);
20558
+ _context2.t3 = _context2.sent;
20559
+ (0, _context2.t2)(_context2.t3);
19336
20560
 
19337
20561
  case 19:
19338
- _context.next = 25;
20562
+ _context2.next = 25;
19339
20563
  break;
19340
20564
 
19341
20565
  case 21:
19342
- _context.prev = 21;
19343
- _context.t4 = _context["catch"](2);
20566
+ _context2.prev = 21;
20567
+ _context2.t4 = _context2["catch"](2);
19344
20568
  setOptions([]);
19345
- throw _context.t4;
20569
+ throw _context2.t4;
19346
20570
 
19347
20571
  case 25:
19348
20572
  case "end":
19349
- return _context.stop();
20573
+ return _context2.stop();
19350
20574
  }
19351
20575
  }
19352
- }, _callee, null, [[2, 21]]);
20576
+ }, _callee2, null, [[2, 21]]);
19353
20577
  }));
19354
20578
 
19355
- return function (_x) {
19356
- return _ref.apply(this, arguments);
20579
+ return function (_x2) {
20580
+ return _ref2.apply(this, arguments);
19357
20581
  };
19358
20582
  }(), [autoComplete.onBuyerNameSearch, fieldName]);
19359
20583
  if (props.readOnly) return /*#__PURE__*/React.createElement("span", {
@@ -20227,7 +21451,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
20227
21451
  required: true,
20228
21452
  message: '数据必填'
20229
21453
  }]
20230
- })( /*#__PURE__*/React.createElement(CardSelect, {
21454
+ })( /*#__PURE__*/React.createElement(CardSelect$1, {
20231
21455
  onChange: onChangeType,
20232
21456
  readOnly: isReadOnly('certificateType'),
20233
21457
  placeholder: "\u6570\u636E\u5FC5\u586B",
@@ -20267,7 +21491,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
20267
21491
  }, {
20268
21492
  validator: validateNationality
20269
21493
  }]
20270
- })( /*#__PURE__*/React.createElement(NationalSelect, {
21494
+ })( /*#__PURE__*/React.createElement(NationalSelect$1, {
20271
21495
  showSearch: true,
20272
21496
  optionFilterProp: "children",
20273
21497
  filterOption: function filterOption(input, option) {
@@ -20505,7 +21729,7 @@ var MyInput$2 = /*#__PURE__*/function (_React$Component) {
20505
21729
  return MyInput;
20506
21730
  }(React.Component);
20507
21731
 
20508
- var CardSelect = /*#__PURE__*/function (_React$Component2) {
21732
+ var CardSelect$1 = /*#__PURE__*/function (_React$Component2) {
20509
21733
  _inherits(CardSelect, _React$Component2);
20510
21734
 
20511
21735
  var _super2 = _createSuper(CardSelect);
@@ -20572,7 +21796,7 @@ var CardSelect = /*#__PURE__*/function (_React$Component2) {
20572
21796
  return CardSelect;
20573
21797
  }(React.Component);
20574
21798
 
20575
- var NationalSelect = /*#__PURE__*/function (_React$Component3) {
21799
+ var NationalSelect$1 = /*#__PURE__*/function (_React$Component3) {
20576
21800
  _inherits(NationalSelect, _React$Component3);
20577
21801
 
20578
21802
  var _super3 = _createSuper(NationalSelect);
@@ -31635,7 +32859,7 @@ var DrawerBody$3 = function DrawerBody() {
31635
32859
  color: '#1890ff',
31636
32860
  borderColor: '#1890ff'
31637
32861
  } : undefined
31638
- }, fileName ? '重新选择' : "选择文件"))), dataSource && dataSource.length && /*#__PURE__*/React.createElement("div", {
32862
+ }, fileName ? '重新选择' : "选择文件"))), dataSource && dataSource.length > 0 && /*#__PURE__*/React.createElement("div", {
31639
32863
  style: {
31640
32864
  marginBottom: 20,
31641
32865
  marginTop: 20