kts-component-invoice-operate 3.2.261 → 3.2.263
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/InvoiceController/InvoiceControllerState/Stakeholder/index.d.ts +2 -0
- package/dist/Invoice/ui/components/CustomCascader/index.d.ts +1 -0
- package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +1 -2
- package/dist/index.esm.js +102 -84
- package/dist/index.js +102 -84
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/passenger/index.tsx +27 -7
- package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +4 -0
- package/src/Invoice/ui/components/CustomCascader/index.tsx +3 -0
- package/src/Invoice/ui/default/ImportPassengerDrawer/index.tsx +0 -6
- package/src/Invoice/ui/digtal/PassengerList/hook/useColumns/index.tsx +3 -2
- package/src/Invoice/ui/digtal/PassengerList/index.less +8 -4
- package/src/Invoice/ui/digtal/PassengerList/index.tsx +8 -9
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +21 -19
|
@@ -12,6 +12,7 @@ export interface CustomCascaderProps extends Omit<CascaderProps<CustomCascaderOp
|
|
|
12
12
|
options?: CustomCascaderOption[];
|
|
13
13
|
fieldNames?: CustomCascaderFieldNames;
|
|
14
14
|
placeholder?: string;
|
|
15
|
+
maxLength?: number;
|
|
15
16
|
onChange?: (value: (string | number)[] | undefined, selectedOptions?: CustomCascaderOption[]) => void;
|
|
16
17
|
value?: (string | number)[];
|
|
17
18
|
onBlur?: (e: React.FocusEvent) => void;
|
|
@@ -12,8 +12,6 @@ export interface IStakeholder {
|
|
|
12
12
|
isVatNormal?: boolean;
|
|
13
13
|
/** 是否可以选择自然人 */
|
|
14
14
|
isNaturalPerson?: boolean;
|
|
15
|
-
/** 是否是自然人标志 */
|
|
16
|
-
naturalPersonFlag?: any;
|
|
17
15
|
/** 是否展开 */
|
|
18
16
|
isExpand?: boolean;
|
|
19
17
|
/** 购方,销方银行信息 勾选按钮是否显示 **/
|
|
@@ -23,6 +21,7 @@ export interface IStakeholder {
|
|
|
23
21
|
/** 购方,销方地址电话 勾选按钮是否显示 **/
|
|
24
22
|
riskData?: boolean;
|
|
25
23
|
invoiceMarkCallback?: (value: any) => void;
|
|
24
|
+
changeNaturalPersonFlag?: (value: any) => void;
|
|
26
25
|
}
|
|
27
26
|
/** 干系人 */
|
|
28
27
|
declare const _default: React.FunctionComponent<IStakeholder>;
|
package/dist/index.esm.js
CHANGED
|
@@ -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
|
/** 自动补全 */
|
|
@@ -19720,37 +19721,33 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
19720
19721
|
allowEditFlag = props.allowEditFlag,
|
|
19721
19722
|
onClickImportButton = props.onClickImportButton,
|
|
19722
19723
|
_props$isVatNormal = props.isVatNormal,
|
|
19723
|
-
isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal
|
|
19724
|
+
isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal,
|
|
19725
|
+
changeNaturalPersonFlag = props.changeNaturalPersonFlag;
|
|
19724
19726
|
|
|
19725
19727
|
var _React$useState = React.useState(typeof props.isExpand === 'boolean' ? props.isExpand : true),
|
|
19726
19728
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
19727
19729
|
isExpand = _React$useState2[0],
|
|
19728
19730
|
setExpand = _React$useState2[1];
|
|
19729
19731
|
|
|
19730
|
-
var _React$useState3 = React.useState(
|
|
19732
|
+
var _React$useState3 = React.useState(''),
|
|
19731
19733
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
19732
|
-
|
|
19733
|
-
|
|
19734
|
+
validateStatus = _React$useState4[0],
|
|
19735
|
+
setStatus = _React$useState4[1];
|
|
19734
19736
|
|
|
19735
19737
|
var _React$useState5 = React.useState(''),
|
|
19736
19738
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
19737
|
-
|
|
19738
|
-
|
|
19739
|
+
errorInfo = _React$useState6[0],
|
|
19740
|
+
setInfo = _React$useState6[1];
|
|
19739
19741
|
|
|
19740
19742
|
var _React$useState7 = React.useState(''),
|
|
19741
19743
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
+
nation = _React$useState8[0],
|
|
19745
|
+
setNationStatue = _React$useState8[1];
|
|
19744
19746
|
|
|
19745
19747
|
var _React$useState9 = React.useState(''),
|
|
19746
19748
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
19747
|
-
|
|
19748
|
-
|
|
19749
|
-
|
|
19750
|
-
var _React$useState11 = React.useState(''),
|
|
19751
|
-
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
19752
|
-
nationInfo = _React$useState12[0],
|
|
19753
|
-
setNation = _React$useState12[1];
|
|
19749
|
+
nationInfo = _React$useState10[0],
|
|
19750
|
+
setNation = _React$useState10[1];
|
|
19754
19751
|
|
|
19755
19752
|
var getFieldDecorator = form.getFieldDecorator;
|
|
19756
19753
|
var controller = Invoice.useInvoiceController();
|
|
@@ -19763,6 +19760,9 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
19763
19760
|
var rulesMap = controller.useMemo(function (s) {
|
|
19764
19761
|
return s.stakeholder.rulesMap || {};
|
|
19765
19762
|
}, []);
|
|
19763
|
+
var naturalPersonFlag = controller.useMemo(function (s) {
|
|
19764
|
+
return s.stakeholder.naturalPersonFlag || 'COMPANY';
|
|
19765
|
+
}, []);
|
|
19766
19766
|
/** 乐企 */
|
|
19767
19767
|
|
|
19768
19768
|
var leqispanW = React.useMemo(function () {
|
|
@@ -19806,9 +19806,6 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
19806
19806
|
React.useEffect(function () {
|
|
19807
19807
|
setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
|
|
19808
19808
|
}, [props.isExpand]);
|
|
19809
|
-
React.useEffect(function () {
|
|
19810
|
-
setNaturalPersonFlag(props.naturalPersonFlag ? props.naturalPersonFlag : 'COMPANY');
|
|
19811
|
-
}, [props.naturalPersonFlag]);
|
|
19812
19809
|
var onChangeType = React.useCallback(function (value) {
|
|
19813
19810
|
var buyerTaxId = form === null || form === void 0 ? void 0 : form.getFieldValue("buyerTaxId");
|
|
19814
19811
|
var certificateNumber = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
|
|
@@ -20078,7 +20075,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
20078
20075
|
colon: false
|
|
20079
20076
|
}, getFieldDecorator('naturalPersonFlag', {})( /*#__PURE__*/React.createElement(NaturalPersonFlag, {
|
|
20080
20077
|
readOnly: isReadOnly('naturalPersonFlag'),
|
|
20081
|
-
onChange:
|
|
20078
|
+
onChange: changeNaturalPersonFlag
|
|
20082
20079
|
})))), /*#__PURE__*/React.createElement(Form, {
|
|
20083
20080
|
className: "digtal-stakeholder-form"
|
|
20084
20081
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
@@ -20380,12 +20377,12 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
20380
20377
|
}, getFieldDecorator('certificateType', {
|
|
20381
20378
|
rules: [{
|
|
20382
20379
|
required: true,
|
|
20383
|
-
message: '
|
|
20380
|
+
message: '证件类型必填'
|
|
20384
20381
|
}]
|
|
20385
20382
|
})( /*#__PURE__*/React.createElement(CardSelect, {
|
|
20386
20383
|
onChange: onChangeType,
|
|
20387
20384
|
readOnly: isReadOnly('certificateType'),
|
|
20388
|
-
placeholder: "\
|
|
20385
|
+
placeholder: "\u8BC1\u4EF6\u7C7B\u578B\u5FC5\u586B",
|
|
20389
20386
|
autoComplete: "off"
|
|
20390
20387
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
20391
20388
|
span: 7
|
|
@@ -20397,7 +20394,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
20397
20394
|
}, getFieldDecorator('certificateNumber', {
|
|
20398
20395
|
rules: [{
|
|
20399
20396
|
required: true,
|
|
20400
|
-
message: '
|
|
20397
|
+
message: '证件号码必填'
|
|
20401
20398
|
}, {
|
|
20402
20399
|
max: 30,
|
|
20403
20400
|
message: "\u5185\u5BB9\u8D85\u957F"
|
|
@@ -20406,7 +20403,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
20406
20403
|
}]
|
|
20407
20404
|
})( /*#__PURE__*/React.createElement(MyInput$1, {
|
|
20408
20405
|
readOnly: isReadOnly('certificateNumber'),
|
|
20409
|
-
placeholder: "\
|
|
20406
|
+
placeholder: "\u8BC1\u4EF6\u53F7\u7801\u5FC5\u586B",
|
|
20410
20407
|
autoComplete: "off"
|
|
20411
20408
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
20412
20409
|
span: 6
|
|
@@ -20418,7 +20415,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
20418
20415
|
}, getFieldDecorator('nationality', {
|
|
20419
20416
|
rules: [{
|
|
20420
20417
|
required: true,
|
|
20421
|
-
message: '
|
|
20418
|
+
message: '国籍必填'
|
|
20422
20419
|
}, {
|
|
20423
20420
|
validator: validateNationality
|
|
20424
20421
|
}]
|
|
@@ -20435,21 +20432,44 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
20435
20432
|
return false;
|
|
20436
20433
|
},
|
|
20437
20434
|
readOnly: isReadOnly('nationality'),
|
|
20438
|
-
placeholder: "\
|
|
20435
|
+
placeholder: "\u56FD\u7C4D\u5FC5\u586B",
|
|
20439
20436
|
autoComplete: "off"
|
|
20440
20437
|
}))))))));
|
|
20441
20438
|
});
|
|
20442
20439
|
|
|
20443
20440
|
function NaturalPersonFlag(props) {
|
|
20444
|
-
var
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
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];
|
|
20448
20447
|
|
|
20449
20448
|
var onChange = React.useCallback(function (e) {
|
|
20450
20449
|
if (props.readOnly) return;
|
|
20451
|
-
|
|
20452
|
-
|
|
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);
|
|
20453
20473
|
}, [props.onChange, props.readOnly]);
|
|
20454
20474
|
React.useEffect(function () {
|
|
20455
20475
|
setValue(props.value || 'COMPANY');
|
|
@@ -20472,10 +20492,10 @@ function BuyerNameInput$1(props) {
|
|
|
20472
20492
|
return s.autoComplete;
|
|
20473
20493
|
}, []);
|
|
20474
20494
|
|
|
20475
|
-
var _React$
|
|
20476
|
-
_React$
|
|
20477
|
-
options = _React$
|
|
20478
|
-
setOptions = _React$
|
|
20495
|
+
var _React$useState13 = React.useState([]),
|
|
20496
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
20497
|
+
options = _React$useState14[0],
|
|
20498
|
+
setOptions = _React$useState14[1];
|
|
20479
20499
|
|
|
20480
20500
|
var onChangeAutoComplete = React.useCallback(function (value) {
|
|
20481
20501
|
var record = options.filter(function (e) {
|
|
@@ -20486,78 +20506,78 @@ function BuyerNameInput$1(props) {
|
|
|
20486
20506
|
setOptions([]);
|
|
20487
20507
|
}, [options, fieldName, form]);
|
|
20488
20508
|
var onSearch = React.useCallback( /*#__PURE__*/function () {
|
|
20489
|
-
var
|
|
20490
|
-
return _regeneratorRuntime().wrap(function
|
|
20509
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(searchText) {
|
|
20510
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20491
20511
|
while (1) {
|
|
20492
|
-
switch (
|
|
20512
|
+
switch (_context2.prev = _context2.next) {
|
|
20493
20513
|
case 0:
|
|
20494
|
-
|
|
20514
|
+
_context2.next = 2;
|
|
20495
20515
|
return Discontinue.start();
|
|
20496
20516
|
|
|
20497
20517
|
case 2:
|
|
20498
|
-
|
|
20518
|
+
_context2.prev = 2;
|
|
20499
20519
|
|
|
20500
20520
|
if (!(fieldName === 'buyerName')) {
|
|
20501
|
-
|
|
20521
|
+
_context2.next = 12;
|
|
20502
20522
|
break;
|
|
20503
20523
|
}
|
|
20504
20524
|
|
|
20505
20525
|
if (!autoComplete.onBuyerNameSearch) {
|
|
20506
|
-
|
|
20526
|
+
_context2.next = 10;
|
|
20507
20527
|
break;
|
|
20508
20528
|
}
|
|
20509
20529
|
|
|
20510
|
-
|
|
20511
|
-
|
|
20530
|
+
_context2.t0 = setOptions;
|
|
20531
|
+
_context2.next = 8;
|
|
20512
20532
|
return autoComplete.onBuyerNameSearch(searchText);
|
|
20513
20533
|
|
|
20514
20534
|
case 8:
|
|
20515
|
-
|
|
20516
|
-
(0,
|
|
20535
|
+
_context2.t1 = _context2.sent;
|
|
20536
|
+
(0, _context2.t0)(_context2.t1);
|
|
20517
20537
|
|
|
20518
20538
|
case 10:
|
|
20519
|
-
|
|
20539
|
+
_context2.next = 19;
|
|
20520
20540
|
break;
|
|
20521
20541
|
|
|
20522
20542
|
case 12:
|
|
20523
20543
|
if (!(fieldName === 'buyerTaxId')) {
|
|
20524
|
-
|
|
20544
|
+
_context2.next = 19;
|
|
20525
20545
|
break;
|
|
20526
20546
|
}
|
|
20527
20547
|
|
|
20528
20548
|
if (!autoComplete.onBuyerTaxIdSearch) {
|
|
20529
|
-
|
|
20549
|
+
_context2.next = 19;
|
|
20530
20550
|
break;
|
|
20531
20551
|
}
|
|
20532
20552
|
|
|
20533
|
-
|
|
20534
|
-
|
|
20553
|
+
_context2.t2 = setOptions;
|
|
20554
|
+
_context2.next = 17;
|
|
20535
20555
|
return autoComplete.onBuyerTaxIdSearch(searchText);
|
|
20536
20556
|
|
|
20537
20557
|
case 17:
|
|
20538
|
-
|
|
20539
|
-
(0,
|
|
20558
|
+
_context2.t3 = _context2.sent;
|
|
20559
|
+
(0, _context2.t2)(_context2.t3);
|
|
20540
20560
|
|
|
20541
20561
|
case 19:
|
|
20542
|
-
|
|
20562
|
+
_context2.next = 25;
|
|
20543
20563
|
break;
|
|
20544
20564
|
|
|
20545
20565
|
case 21:
|
|
20546
|
-
|
|
20547
|
-
|
|
20566
|
+
_context2.prev = 21;
|
|
20567
|
+
_context2.t4 = _context2["catch"](2);
|
|
20548
20568
|
setOptions([]);
|
|
20549
|
-
throw
|
|
20569
|
+
throw _context2.t4;
|
|
20550
20570
|
|
|
20551
20571
|
case 25:
|
|
20552
20572
|
case "end":
|
|
20553
|
-
return
|
|
20573
|
+
return _context2.stop();
|
|
20554
20574
|
}
|
|
20555
20575
|
}
|
|
20556
|
-
},
|
|
20576
|
+
}, _callee2, null, [[2, 21]]);
|
|
20557
20577
|
}));
|
|
20558
20578
|
|
|
20559
|
-
return function (
|
|
20560
|
-
return
|
|
20579
|
+
return function (_x2) {
|
|
20580
|
+
return _ref2.apply(this, arguments);
|
|
20561
20581
|
};
|
|
20562
20582
|
}(), [autoComplete.onBuyerNameSearch, fieldName]);
|
|
20563
20583
|
if (props.readOnly) return /*#__PURE__*/React.createElement("span", {
|
|
@@ -32779,13 +32799,6 @@ var DrawerBody$3 = function DrawerBody() {
|
|
|
32779
32799
|
};
|
|
32780
32800
|
}(); // 3. 处理文件选择状态(更新左侧 Input 显示的文件名)
|
|
32781
32801
|
|
|
32782
|
-
React.useEffect(function () {
|
|
32783
|
-
controller.getBuyerList && controller.getBuyerList({
|
|
32784
|
-
pagination: {
|
|
32785
|
-
current: 1
|
|
32786
|
-
}
|
|
32787
|
-
});
|
|
32788
|
-
}, [controller]);
|
|
32789
32802
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Alert, {
|
|
32790
32803
|
type: "info",
|
|
32791
32804
|
showIcon: true,
|
|
@@ -34625,7 +34638,7 @@ var TitleText$4 = (function (props) {
|
|
|
34625
34638
|
}, "*") : /*#__PURE__*/React.createElement(React.Fragment, null), children);
|
|
34626
34639
|
});
|
|
34627
34640
|
|
|
34628
|
-
var _excluded$3 = ["options", "fieldNames", "placeholder", "onChange", "value", "className", "style", "onBlur"];
|
|
34641
|
+
var _excluded$3 = ["options", "fieldNames", "placeholder", "maxLength", "onChange", "value", "className", "style", "onBlur"];
|
|
34629
34642
|
var DROPDOWN_CLASS = 'custom-cascader-dropdown';
|
|
34630
34643
|
var ARROW_CLASS = 'custom-cascader-arrow';
|
|
34631
34644
|
var CLEAR_CLASS = 'custom-cascader-clear';
|
|
@@ -34640,6 +34653,8 @@ var CustomCascader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
34640
34653
|
} : _ref$fieldNames,
|
|
34641
34654
|
_ref$placeholder = _ref.placeholder,
|
|
34642
34655
|
placeholder = _ref$placeholder === void 0 ? '请选择或输入地址' : _ref$placeholder,
|
|
34656
|
+
_ref$maxLength = _ref.maxLength,
|
|
34657
|
+
maxLength = _ref$maxLength === void 0 ? 80 : _ref$maxLength,
|
|
34643
34658
|
onChange = _ref.onChange,
|
|
34644
34659
|
externalValue = _ref.value,
|
|
34645
34660
|
_ref$className = _ref.className,
|
|
@@ -34950,6 +34965,7 @@ var CustomCascader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
34950
34965
|
ref: inputRef,
|
|
34951
34966
|
placeholder: placeholder,
|
|
34952
34967
|
value: inputText,
|
|
34968
|
+
maxLength: maxLength,
|
|
34953
34969
|
onChange: handleInputChange,
|
|
34954
34970
|
onCompositionStart: handleCompositionStart,
|
|
34955
34971
|
onCompositionEnd: handleCompositionEnd,
|
|
@@ -35500,11 +35516,16 @@ var useColumns$4 = (function (form, isRequired) {
|
|
|
35500
35516
|
return controller.wait();
|
|
35501
35517
|
|
|
35502
35518
|
case 2:
|
|
35503
|
-
|
|
35504
|
-
|
|
35519
|
+
form.setFieldsValue({
|
|
35520
|
+
'zwdj': undefined
|
|
35521
|
+
});
|
|
35522
|
+
_context7.next = 5;
|
|
35523
|
+
return controller.setEditPassenger({
|
|
35524
|
+
jtgjlxDm: value,
|
|
35525
|
+
zwdj: ''
|
|
35505
35526
|
});
|
|
35506
35527
|
|
|
35507
|
-
case
|
|
35528
|
+
case 5:
|
|
35508
35529
|
case "end":
|
|
35509
35530
|
return _context7.stop();
|
|
35510
35531
|
}
|
|
@@ -36188,7 +36209,7 @@ var useDelRowButton$4 = (function () {
|
|
|
36188
36209
|
};
|
|
36189
36210
|
});
|
|
36190
36211
|
|
|
36191
|
-
var css_248z$E = ".kts-invoice-operate-
|
|
36212
|
+
var css_248z$E = ".kts-invoice-operate-passenger {\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-passenger .real-estate-info-digtal-label {\n padding: 20px 20px 0;\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-passenger .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-passenger-list-digtal .goods-list-digtal-discount-tag {\n display: inline-block;\n height: 20px;\n line-height: 20px;\n border: 1px solid;\n padding: 0 5px;\n border-radius: 4px;\n}\n.kts-invoice-operate-passenger-list-digtal .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-passenger-list-digtal .kts-invoice-operate-passenger-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 2px solid #9F613E;\n gap: 10px;\n align-items: center;\n}\n.kts-invoice-operate-passenger-list-digtal .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-be-discount .ktsAntX-table-cell {\n color: #f00;\n}\n.kts-invoice-operate-passenger-list-digtal .ktsAntX-table input,\n.kts-invoice-operate-passenger-list-digtal .ktsAntX-table .ktsAntX-select-selection-item {\n font-size: 12px;\n}\n.kts-invoice-operate-passenger-list-table-digtal .ktsAnt3x-form-item-control.has-error {\n border: 1px solid #f00;\n}\n.kts-invoice-operate-passenger-list-table-digtal .kts-invoice-operate-goods-list-table.kts-invoice-operate-prefab .ktsAnt3x-table-row {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-passenger-list-table-digtal .kts-invoice-operate-goods-list-table-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n";
|
|
36192
36213
|
styleInject(css_248z$E);
|
|
36193
36214
|
|
|
36194
36215
|
var BatchImportButton = (function () {
|
|
@@ -36411,11 +36432,6 @@ var Main$6 = decorator(Form.create())(function (props) {
|
|
|
36411
36432
|
var goodsList = controller.useMemo(function (s) {
|
|
36412
36433
|
return s.passengerListState.goodsList;
|
|
36413
36434
|
}, []);
|
|
36414
|
-
/** 货物列表 */
|
|
36415
|
-
|
|
36416
|
-
var dataSource = controller.useMemo(function (s) {
|
|
36417
|
-
return s.passengerListState.goodsList;
|
|
36418
|
-
}, []);
|
|
36419
36435
|
/** 表格行事件 */
|
|
36420
36436
|
|
|
36421
36437
|
var _onRow = useOnRow$4();
|
|
@@ -36458,7 +36474,9 @@ var Main$6 = decorator(Form.create())(function (props) {
|
|
|
36458
36474
|
while (1) {
|
|
36459
36475
|
switch (_context2.prev = _context2.next) {
|
|
36460
36476
|
case 0:
|
|
36461
|
-
|
|
36477
|
+
if (props.fieldNames) {
|
|
36478
|
+
s.passengerListState.addressFieldNames = props.fieldNames;
|
|
36479
|
+
}
|
|
36462
36480
|
|
|
36463
36481
|
case 1:
|
|
36464
36482
|
case "end":
|
|
@@ -36576,22 +36594,22 @@ var Main$6 = decorator(Form.create())(function (props) {
|
|
|
36576
36594
|
// controller.useForm('freightInfo', form);
|
|
36577
36595
|
|
|
36578
36596
|
return /*#__PURE__*/React.createElement("div", {
|
|
36579
|
-
className: "kts-invoice-operate-
|
|
36597
|
+
className: "kts-invoice-operate-passenger"
|
|
36580
36598
|
}, /*#__PURE__*/React.createElement("div", {
|
|
36581
36599
|
className: 'real-estate-info-digtal-label'
|
|
36582
36600
|
}, "\u7279\u5B9A\u4FE1\u606F-\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1"), /*#__PURE__*/React.createElement("div", {
|
|
36583
|
-
className: "kts-invoice-operate-
|
|
36601
|
+
className: "kts-invoice-operate-passenger-list-digtal",
|
|
36584
36602
|
onClick: function onClick(e) {
|
|
36585
36603
|
e.stopPropagation();
|
|
36586
36604
|
}
|
|
36587
36605
|
}, /*#__PURE__*/React.createElement("div", {
|
|
36588
|
-
className: "kts-invoice-operate-
|
|
36606
|
+
className: "kts-invoice-operate-passenger-list-able"
|
|
36589
36607
|
}, /*#__PURE__*/React.createElement(AddRowButton$4, null), delRowButton.button, /*#__PURE__*/React.createElement(BatchImportButton, null), /*#__PURE__*/React.createElement("div", {
|
|
36590
36608
|
style: {
|
|
36591
36609
|
flex: 1
|
|
36592
36610
|
}
|
|
36593
36611
|
})), /*#__PURE__*/React.createElement("div", {
|
|
36594
|
-
className: classnames('kts-invoice-operate-
|
|
36612
|
+
className: classnames('kts-invoice-operate-passenger-list-table-digtal')
|
|
36595
36613
|
}, /*#__PURE__*/React.createElement(TableVirtual$4, {
|
|
36596
36614
|
size: "small",
|
|
36597
36615
|
rowKey: "$index",
|
|
@@ -36604,7 +36622,7 @@ var Main$6 = decorator(Form.create())(function (props) {
|
|
|
36604
36622
|
row: TableRow$4
|
|
36605
36623
|
}
|
|
36606
36624
|
},
|
|
36607
|
-
dataSource:
|
|
36625
|
+
dataSource: goodsList,
|
|
36608
36626
|
columns: useColumns$4(props.form, isRequired),
|
|
36609
36627
|
rowSelection: useRowSelection$4(),
|
|
36610
36628
|
onRow: function onRow(record) {
|
package/dist/index.js
CHANGED
|
@@ -1381,6 +1381,7 @@ var Stakeholder = /*#__PURE__*/_createClass(function Stakeholder() {
|
|
|
1381
1381
|
this.disableds = void 0;
|
|
1382
1382
|
this.enables = void 0;
|
|
1383
1383
|
this.rulesMap = void 0;
|
|
1384
|
+
this.naturalPersonFlag = void 0;
|
|
1384
1385
|
});
|
|
1385
1386
|
|
|
1386
1387
|
/** 自动补全 */
|
|
@@ -19730,37 +19731,33 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
19730
19731
|
allowEditFlag = props.allowEditFlag,
|
|
19731
19732
|
onClickImportButton = props.onClickImportButton,
|
|
19732
19733
|
_props$isVatNormal = props.isVatNormal,
|
|
19733
|
-
isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal
|
|
19734
|
+
isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal,
|
|
19735
|
+
changeNaturalPersonFlag = props.changeNaturalPersonFlag;
|
|
19734
19736
|
|
|
19735
19737
|
var _React$useState = React__default['default'].useState(typeof props.isExpand === 'boolean' ? props.isExpand : true),
|
|
19736
19738
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
19737
19739
|
isExpand = _React$useState2[0],
|
|
19738
19740
|
setExpand = _React$useState2[1];
|
|
19739
19741
|
|
|
19740
|
-
var _React$useState3 = React__default['default'].useState(
|
|
19742
|
+
var _React$useState3 = React__default['default'].useState(''),
|
|
19741
19743
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
19742
|
-
|
|
19743
|
-
|
|
19744
|
+
validateStatus = _React$useState4[0],
|
|
19745
|
+
setStatus = _React$useState4[1];
|
|
19744
19746
|
|
|
19745
19747
|
var _React$useState5 = React__default['default'].useState(''),
|
|
19746
19748
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
19747
|
-
|
|
19748
|
-
|
|
19749
|
+
errorInfo = _React$useState6[0],
|
|
19750
|
+
setInfo = _React$useState6[1];
|
|
19749
19751
|
|
|
19750
19752
|
var _React$useState7 = React__default['default'].useState(''),
|
|
19751
19753
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
+
nation = _React$useState8[0],
|
|
19755
|
+
setNationStatue = _React$useState8[1];
|
|
19754
19756
|
|
|
19755
19757
|
var _React$useState9 = React__default['default'].useState(''),
|
|
19756
19758
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
var _React$useState11 = React__default['default'].useState(''),
|
|
19761
|
-
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
19762
|
-
nationInfo = _React$useState12[0],
|
|
19763
|
-
setNation = _React$useState12[1];
|
|
19759
|
+
nationInfo = _React$useState10[0],
|
|
19760
|
+
setNation = _React$useState10[1];
|
|
19764
19761
|
|
|
19765
19762
|
var getFieldDecorator = form.getFieldDecorator;
|
|
19766
19763
|
var controller = Invoice.useInvoiceController();
|
|
@@ -19773,6 +19770,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
19773
19770
|
var rulesMap = controller.useMemo(function (s) {
|
|
19774
19771
|
return s.stakeholder.rulesMap || {};
|
|
19775
19772
|
}, []);
|
|
19773
|
+
var naturalPersonFlag = controller.useMemo(function (s) {
|
|
19774
|
+
return s.stakeholder.naturalPersonFlag || 'COMPANY';
|
|
19775
|
+
}, []);
|
|
19776
19776
|
/** 乐企 */
|
|
19777
19777
|
|
|
19778
19778
|
var leqispanW = React__default['default'].useMemo(function () {
|
|
@@ -19816,9 +19816,6 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
19816
19816
|
React__default['default'].useEffect(function () {
|
|
19817
19817
|
setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
|
|
19818
19818
|
}, [props.isExpand]);
|
|
19819
|
-
React__default['default'].useEffect(function () {
|
|
19820
|
-
setNaturalPersonFlag(props.naturalPersonFlag ? props.naturalPersonFlag : 'COMPANY');
|
|
19821
|
-
}, [props.naturalPersonFlag]);
|
|
19822
19819
|
var onChangeType = React__default['default'].useCallback(function (value) {
|
|
19823
19820
|
var buyerTaxId = form === null || form === void 0 ? void 0 : form.getFieldValue("buyerTaxId");
|
|
19824
19821
|
var certificateNumber = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
|
|
@@ -20088,7 +20085,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
20088
20085
|
colon: false
|
|
20089
20086
|
}, getFieldDecorator('naturalPersonFlag', {})( /*#__PURE__*/React__default['default'].createElement(NaturalPersonFlag, {
|
|
20090
20087
|
readOnly: isReadOnly('naturalPersonFlag'),
|
|
20091
|
-
onChange:
|
|
20088
|
+
onChange: changeNaturalPersonFlag
|
|
20092
20089
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form, {
|
|
20093
20090
|
className: "digtal-stakeholder-form"
|
|
20094
20091
|
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.Row, {
|
|
@@ -20390,12 +20387,12 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
20390
20387
|
}, getFieldDecorator('certificateType', {
|
|
20391
20388
|
rules: [{
|
|
20392
20389
|
required: true,
|
|
20393
|
-
message: '
|
|
20390
|
+
message: '证件类型必填'
|
|
20394
20391
|
}]
|
|
20395
20392
|
})( /*#__PURE__*/React__default['default'].createElement(CardSelect, {
|
|
20396
20393
|
onChange: onChangeType,
|
|
20397
20394
|
readOnly: isReadOnly('certificateType'),
|
|
20398
|
-
placeholder: "\
|
|
20395
|
+
placeholder: "\u8BC1\u4EF6\u7C7B\u578B\u5FC5\u586B",
|
|
20399
20396
|
autoComplete: "off"
|
|
20400
20397
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
20401
20398
|
span: 7
|
|
@@ -20407,7 +20404,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
20407
20404
|
}, getFieldDecorator('certificateNumber', {
|
|
20408
20405
|
rules: [{
|
|
20409
20406
|
required: true,
|
|
20410
|
-
message: '
|
|
20407
|
+
message: '证件号码必填'
|
|
20411
20408
|
}, {
|
|
20412
20409
|
max: 30,
|
|
20413
20410
|
message: "\u5185\u5BB9\u8D85\u957F"
|
|
@@ -20416,7 +20413,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
20416
20413
|
}]
|
|
20417
20414
|
})( /*#__PURE__*/React__default['default'].createElement(MyInput$1, {
|
|
20418
20415
|
readOnly: isReadOnly('certificateNumber'),
|
|
20419
|
-
placeholder: "\
|
|
20416
|
+
placeholder: "\u8BC1\u4EF6\u53F7\u7801\u5FC5\u586B",
|
|
20420
20417
|
autoComplete: "off"
|
|
20421
20418
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
20422
20419
|
span: 6
|
|
@@ -20428,7 +20425,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
20428
20425
|
}, getFieldDecorator('nationality', {
|
|
20429
20426
|
rules: [{
|
|
20430
20427
|
required: true,
|
|
20431
|
-
message: '
|
|
20428
|
+
message: '国籍必填'
|
|
20432
20429
|
}, {
|
|
20433
20430
|
validator: validateNationality
|
|
20434
20431
|
}]
|
|
@@ -20445,21 +20442,44 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
20445
20442
|
return false;
|
|
20446
20443
|
},
|
|
20447
20444
|
readOnly: isReadOnly('nationality'),
|
|
20448
|
-
placeholder: "\
|
|
20445
|
+
placeholder: "\u56FD\u7C4D\u5FC5\u586B",
|
|
20449
20446
|
autoComplete: "off"
|
|
20450
20447
|
}))))))));
|
|
20451
20448
|
});
|
|
20452
20449
|
|
|
20453
20450
|
function NaturalPersonFlag(props) {
|
|
20454
|
-
var
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20451
|
+
var controller = Invoice.useInvoiceController();
|
|
20452
|
+
|
|
20453
|
+
var _React$useState11 = React__default['default'].useState(props.value || 'COMPANY'),
|
|
20454
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
20455
|
+
value = _React$useState12[0],
|
|
20456
|
+
setValue = _React$useState12[1];
|
|
20458
20457
|
|
|
20459
20458
|
var onChange = React__default['default'].useCallback(function (e) {
|
|
20460
20459
|
if (props.readOnly) return;
|
|
20461
|
-
|
|
20462
|
-
|
|
20460
|
+
var naturalPersonFlag = e.target.checked ? 'NATURAL' : 'COMPANY';
|
|
20461
|
+
setValue(naturalPersonFlag);
|
|
20462
|
+
controller.pipeline( /*#__PURE__*/function () {
|
|
20463
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
20464
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20465
|
+
while (1) {
|
|
20466
|
+
switch (_context.prev = _context.next) {
|
|
20467
|
+
case 0:
|
|
20468
|
+
s.stakeholder.naturalPersonFlag = naturalPersonFlag;
|
|
20469
|
+
|
|
20470
|
+
case 1:
|
|
20471
|
+
case "end":
|
|
20472
|
+
return _context.stop();
|
|
20473
|
+
}
|
|
20474
|
+
}
|
|
20475
|
+
}, _callee);
|
|
20476
|
+
}));
|
|
20477
|
+
|
|
20478
|
+
return function (_x) {
|
|
20479
|
+
return _ref.apply(this, arguments);
|
|
20480
|
+
};
|
|
20481
|
+
}())();
|
|
20482
|
+
props.onChange && props.onChange(naturalPersonFlag);
|
|
20463
20483
|
}, [props.onChange, props.readOnly]);
|
|
20464
20484
|
React__default['default'].useEffect(function () {
|
|
20465
20485
|
setValue(props.value || 'COMPANY');
|
|
@@ -20482,10 +20502,10 @@ function BuyerNameInput$1(props) {
|
|
|
20482
20502
|
return s.autoComplete;
|
|
20483
20503
|
}, []);
|
|
20484
20504
|
|
|
20485
|
-
var _React$
|
|
20486
|
-
_React$
|
|
20487
|
-
options = _React$
|
|
20488
|
-
setOptions = _React$
|
|
20505
|
+
var _React$useState13 = React__default['default'].useState([]),
|
|
20506
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
20507
|
+
options = _React$useState14[0],
|
|
20508
|
+
setOptions = _React$useState14[1];
|
|
20489
20509
|
|
|
20490
20510
|
var onChangeAutoComplete = React__default['default'].useCallback(function (value) {
|
|
20491
20511
|
var record = options.filter(function (e) {
|
|
@@ -20496,78 +20516,78 @@ function BuyerNameInput$1(props) {
|
|
|
20496
20516
|
setOptions([]);
|
|
20497
20517
|
}, [options, fieldName, form]);
|
|
20498
20518
|
var onSearch = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
20499
|
-
var
|
|
20500
|
-
return _regeneratorRuntime().wrap(function
|
|
20519
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(searchText) {
|
|
20520
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20501
20521
|
while (1) {
|
|
20502
|
-
switch (
|
|
20522
|
+
switch (_context2.prev = _context2.next) {
|
|
20503
20523
|
case 0:
|
|
20504
|
-
|
|
20524
|
+
_context2.next = 2;
|
|
20505
20525
|
return Discontinue.start();
|
|
20506
20526
|
|
|
20507
20527
|
case 2:
|
|
20508
|
-
|
|
20528
|
+
_context2.prev = 2;
|
|
20509
20529
|
|
|
20510
20530
|
if (!(fieldName === 'buyerName')) {
|
|
20511
|
-
|
|
20531
|
+
_context2.next = 12;
|
|
20512
20532
|
break;
|
|
20513
20533
|
}
|
|
20514
20534
|
|
|
20515
20535
|
if (!autoComplete.onBuyerNameSearch) {
|
|
20516
|
-
|
|
20536
|
+
_context2.next = 10;
|
|
20517
20537
|
break;
|
|
20518
20538
|
}
|
|
20519
20539
|
|
|
20520
|
-
|
|
20521
|
-
|
|
20540
|
+
_context2.t0 = setOptions;
|
|
20541
|
+
_context2.next = 8;
|
|
20522
20542
|
return autoComplete.onBuyerNameSearch(searchText);
|
|
20523
20543
|
|
|
20524
20544
|
case 8:
|
|
20525
|
-
|
|
20526
|
-
(0,
|
|
20545
|
+
_context2.t1 = _context2.sent;
|
|
20546
|
+
(0, _context2.t0)(_context2.t1);
|
|
20527
20547
|
|
|
20528
20548
|
case 10:
|
|
20529
|
-
|
|
20549
|
+
_context2.next = 19;
|
|
20530
20550
|
break;
|
|
20531
20551
|
|
|
20532
20552
|
case 12:
|
|
20533
20553
|
if (!(fieldName === 'buyerTaxId')) {
|
|
20534
|
-
|
|
20554
|
+
_context2.next = 19;
|
|
20535
20555
|
break;
|
|
20536
20556
|
}
|
|
20537
20557
|
|
|
20538
20558
|
if (!autoComplete.onBuyerTaxIdSearch) {
|
|
20539
|
-
|
|
20559
|
+
_context2.next = 19;
|
|
20540
20560
|
break;
|
|
20541
20561
|
}
|
|
20542
20562
|
|
|
20543
|
-
|
|
20544
|
-
|
|
20563
|
+
_context2.t2 = setOptions;
|
|
20564
|
+
_context2.next = 17;
|
|
20545
20565
|
return autoComplete.onBuyerTaxIdSearch(searchText);
|
|
20546
20566
|
|
|
20547
20567
|
case 17:
|
|
20548
|
-
|
|
20549
|
-
(0,
|
|
20568
|
+
_context2.t3 = _context2.sent;
|
|
20569
|
+
(0, _context2.t2)(_context2.t3);
|
|
20550
20570
|
|
|
20551
20571
|
case 19:
|
|
20552
|
-
|
|
20572
|
+
_context2.next = 25;
|
|
20553
20573
|
break;
|
|
20554
20574
|
|
|
20555
20575
|
case 21:
|
|
20556
|
-
|
|
20557
|
-
|
|
20576
|
+
_context2.prev = 21;
|
|
20577
|
+
_context2.t4 = _context2["catch"](2);
|
|
20558
20578
|
setOptions([]);
|
|
20559
|
-
throw
|
|
20579
|
+
throw _context2.t4;
|
|
20560
20580
|
|
|
20561
20581
|
case 25:
|
|
20562
20582
|
case "end":
|
|
20563
|
-
return
|
|
20583
|
+
return _context2.stop();
|
|
20564
20584
|
}
|
|
20565
20585
|
}
|
|
20566
|
-
},
|
|
20586
|
+
}, _callee2, null, [[2, 21]]);
|
|
20567
20587
|
}));
|
|
20568
20588
|
|
|
20569
|
-
return function (
|
|
20570
|
-
return
|
|
20589
|
+
return function (_x2) {
|
|
20590
|
+
return _ref2.apply(this, arguments);
|
|
20571
20591
|
};
|
|
20572
20592
|
}(), [autoComplete.onBuyerNameSearch, fieldName]);
|
|
20573
20593
|
if (props.readOnly) return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
@@ -32789,13 +32809,6 @@ var DrawerBody$3 = function DrawerBody() {
|
|
|
32789
32809
|
};
|
|
32790
32810
|
}(); // 3. 处理文件选择状态(更新左侧 Input 显示的文件名)
|
|
32791
32811
|
|
|
32792
|
-
React__default['default'].useEffect(function () {
|
|
32793
|
-
controller.getBuyerList && controller.getBuyerList({
|
|
32794
|
-
pagination: {
|
|
32795
|
-
current: 1
|
|
32796
|
-
}
|
|
32797
|
-
});
|
|
32798
|
-
}, [controller]);
|
|
32799
32812
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Alert, {
|
|
32800
32813
|
type: "info",
|
|
32801
32814
|
showIcon: true,
|
|
@@ -34635,7 +34648,7 @@ var TitleText$4 = (function (props) {
|
|
|
34635
34648
|
}, "*") : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null), children);
|
|
34636
34649
|
});
|
|
34637
34650
|
|
|
34638
|
-
var _excluded$3 = ["options", "fieldNames", "placeholder", "onChange", "value", "className", "style", "onBlur"];
|
|
34651
|
+
var _excluded$3 = ["options", "fieldNames", "placeholder", "maxLength", "onChange", "value", "className", "style", "onBlur"];
|
|
34639
34652
|
var DROPDOWN_CLASS = 'custom-cascader-dropdown';
|
|
34640
34653
|
var ARROW_CLASS = 'custom-cascader-arrow';
|
|
34641
34654
|
var CLEAR_CLASS = 'custom-cascader-clear';
|
|
@@ -34650,6 +34663,8 @@ var CustomCascader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
34650
34663
|
} : _ref$fieldNames,
|
|
34651
34664
|
_ref$placeholder = _ref.placeholder,
|
|
34652
34665
|
placeholder = _ref$placeholder === void 0 ? '请选择或输入地址' : _ref$placeholder,
|
|
34666
|
+
_ref$maxLength = _ref.maxLength,
|
|
34667
|
+
maxLength = _ref$maxLength === void 0 ? 80 : _ref$maxLength,
|
|
34653
34668
|
onChange = _ref.onChange,
|
|
34654
34669
|
externalValue = _ref.value,
|
|
34655
34670
|
_ref$className = _ref.className,
|
|
@@ -34960,6 +34975,7 @@ var CustomCascader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
34960
34975
|
ref: inputRef,
|
|
34961
34976
|
placeholder: placeholder,
|
|
34962
34977
|
value: inputText,
|
|
34978
|
+
maxLength: maxLength,
|
|
34963
34979
|
onChange: handleInputChange,
|
|
34964
34980
|
onCompositionStart: handleCompositionStart,
|
|
34965
34981
|
onCompositionEnd: handleCompositionEnd,
|
|
@@ -35510,11 +35526,16 @@ var useColumns$4 = (function (form, isRequired) {
|
|
|
35510
35526
|
return controller.wait();
|
|
35511
35527
|
|
|
35512
35528
|
case 2:
|
|
35513
|
-
|
|
35514
|
-
|
|
35529
|
+
form.setFieldsValue({
|
|
35530
|
+
'zwdj': undefined
|
|
35531
|
+
});
|
|
35532
|
+
_context7.next = 5;
|
|
35533
|
+
return controller.setEditPassenger({
|
|
35534
|
+
jtgjlxDm: value,
|
|
35535
|
+
zwdj: ''
|
|
35515
35536
|
});
|
|
35516
35537
|
|
|
35517
|
-
case
|
|
35538
|
+
case 5:
|
|
35518
35539
|
case "end":
|
|
35519
35540
|
return _context7.stop();
|
|
35520
35541
|
}
|
|
@@ -36198,7 +36219,7 @@ var useDelRowButton$4 = (function () {
|
|
|
36198
36219
|
};
|
|
36199
36220
|
});
|
|
36200
36221
|
|
|
36201
|
-
var css_248z$E = ".kts-invoice-operate-
|
|
36222
|
+
var css_248z$E = ".kts-invoice-operate-passenger {\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-passenger .real-estate-info-digtal-label {\n padding: 20px 20px 0;\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-passenger .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-passenger-list-digtal .goods-list-digtal-discount-tag {\n display: inline-block;\n height: 20px;\n line-height: 20px;\n border: 1px solid;\n padding: 0 5px;\n border-radius: 4px;\n}\n.kts-invoice-operate-passenger-list-digtal .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-passenger-list-digtal .kts-invoice-operate-passenger-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 2px solid #9F613E;\n gap: 10px;\n align-items: center;\n}\n.kts-invoice-operate-passenger-list-digtal .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-be-discount .ktsAntX-table-cell {\n color: #f00;\n}\n.kts-invoice-operate-passenger-list-digtal .ktsAntX-table input,\n.kts-invoice-operate-passenger-list-digtal .ktsAntX-table .ktsAntX-select-selection-item {\n font-size: 12px;\n}\n.kts-invoice-operate-passenger-list-table-digtal .ktsAnt3x-form-item-control.has-error {\n border: 1px solid #f00;\n}\n.kts-invoice-operate-passenger-list-table-digtal .kts-invoice-operate-goods-list-table.kts-invoice-operate-prefab .ktsAnt3x-table-row {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-passenger-list-table-digtal .kts-invoice-operate-goods-list-table-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n";
|
|
36202
36223
|
styleInject(css_248z$E);
|
|
36203
36224
|
|
|
36204
36225
|
var BatchImportButton = (function () {
|
|
@@ -36421,11 +36442,6 @@ var Main$6 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
36421
36442
|
var goodsList = controller.useMemo(function (s) {
|
|
36422
36443
|
return s.passengerListState.goodsList;
|
|
36423
36444
|
}, []);
|
|
36424
|
-
/** 货物列表 */
|
|
36425
|
-
|
|
36426
|
-
var dataSource = controller.useMemo(function (s) {
|
|
36427
|
-
return s.passengerListState.goodsList;
|
|
36428
|
-
}, []);
|
|
36429
36445
|
/** 表格行事件 */
|
|
36430
36446
|
|
|
36431
36447
|
var _onRow = useOnRow$4();
|
|
@@ -36468,7 +36484,9 @@ var Main$6 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
36468
36484
|
while (1) {
|
|
36469
36485
|
switch (_context2.prev = _context2.next) {
|
|
36470
36486
|
case 0:
|
|
36471
|
-
|
|
36487
|
+
if (props.fieldNames) {
|
|
36488
|
+
s.passengerListState.addressFieldNames = props.fieldNames;
|
|
36489
|
+
}
|
|
36472
36490
|
|
|
36473
36491
|
case 1:
|
|
36474
36492
|
case "end":
|
|
@@ -36586,22 +36604,22 @@ var Main$6 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
36586
36604
|
// controller.useForm('freightInfo', form);
|
|
36587
36605
|
|
|
36588
36606
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
36589
|
-
className: "kts-invoice-operate-
|
|
36607
|
+
className: "kts-invoice-operate-passenger"
|
|
36590
36608
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
36591
36609
|
className: 'real-estate-info-digtal-label'
|
|
36592
36610
|
}, "\u7279\u5B9A\u4FE1\u606F-\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
36593
|
-
className: "kts-invoice-operate-
|
|
36611
|
+
className: "kts-invoice-operate-passenger-list-digtal",
|
|
36594
36612
|
onClick: function onClick(e) {
|
|
36595
36613
|
e.stopPropagation();
|
|
36596
36614
|
}
|
|
36597
36615
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
36598
|
-
className: "kts-invoice-operate-
|
|
36616
|
+
className: "kts-invoice-operate-passenger-list-able"
|
|
36599
36617
|
}, /*#__PURE__*/React__default['default'].createElement(AddRowButton$4, null), delRowButton.button, /*#__PURE__*/React__default['default'].createElement(BatchImportButton, null), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
36600
36618
|
style: {
|
|
36601
36619
|
flex: 1
|
|
36602
36620
|
}
|
|
36603
36621
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
36604
|
-
className: classnames__default['default']('kts-invoice-operate-
|
|
36622
|
+
className: classnames__default['default']('kts-invoice-operate-passenger-list-table-digtal')
|
|
36605
36623
|
}, /*#__PURE__*/React__default['default'].createElement(TableVirtual$4, {
|
|
36606
36624
|
size: "small",
|
|
36607
36625
|
rowKey: "$index",
|
|
@@ -36614,7 +36632,7 @@ var Main$6 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
36614
36632
|
row: TableRow$4
|
|
36615
36633
|
}
|
|
36616
36634
|
},
|
|
36617
|
-
dataSource:
|
|
36635
|
+
dataSource: goodsList,
|
|
36618
36636
|
columns: useColumns$4(props.form, isRequired),
|
|
36619
36637
|
rowSelection: useRowSelection$4(),
|
|
36620
36638
|
onRow: function onRow(record) {
|
package/package.json
CHANGED
|
@@ -14544,13 +14544,33 @@ export default () => {
|
|
|
14544
14544
|
], []);
|
|
14545
14545
|
React.useEffect(() => {
|
|
14546
14546
|
controller.run(async s => {
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14547
|
+
const data = [{
|
|
14548
|
+
"destination": "北京市,市辖区,西城区",
|
|
14549
|
+
"idCard": "123456",
|
|
14550
|
+
"identityType": "COMPANY",
|
|
14551
|
+
"name": "李四",
|
|
14552
|
+
"origin": "北京市,市辖区,东城区",
|
|
14553
|
+
"sortNumber": 1,
|
|
14554
|
+
"travelDate": "2026-09-15",
|
|
14555
|
+
"travelLevel": null,
|
|
14556
|
+
"travelType": "PUBLIC_TRANSPORT"
|
|
14557
|
+
}]
|
|
14558
|
+
const cargoTransportDataList:Array<any> = data.map((item, index) => {
|
|
14559
|
+
return {
|
|
14560
|
+
// ...item,
|
|
14561
|
+
$index: Invoice.idGenerator(),
|
|
14562
|
+
sortNumber: item.sortNumber,
|
|
14563
|
+
cxr: item.name,
|
|
14564
|
+
chuxrq: item.travelDate,
|
|
14565
|
+
cxrzjlxDm: item.identityType,
|
|
14566
|
+
sfzjhm: item.idCard,
|
|
14567
|
+
jtgjlxDm: item.travelType,
|
|
14568
|
+
zwdj: item.travelLevel,
|
|
14569
|
+
cfd: item.origin?.split(','),
|
|
14570
|
+
ddd: item.destination?.split(','),
|
|
14571
|
+
}
|
|
14572
|
+
})
|
|
14573
|
+
controller.state.passengerListState.goodsList = cargoTransportDataList;
|
|
14554
14574
|
})
|
|
14555
14575
|
}, [])
|
|
14556
14576
|
const onSave = async () => {
|
|
@@ -28,6 +28,7 @@ export interface CustomCascaderProps
|
|
|
28
28
|
options?: CustomCascaderOption[];
|
|
29
29
|
fieldNames?: CustomCascaderFieldNames;
|
|
30
30
|
placeholder?: string;
|
|
31
|
+
maxLength?: number;
|
|
31
32
|
onChange?: (value: (string | number)[] | undefined, selectedOptions?: CustomCascaderOption[]) => void;
|
|
32
33
|
value?: (string | number)[];
|
|
33
34
|
onBlur?: (e: React.FocusEvent) => void;
|
|
@@ -43,6 +44,7 @@ const CustomCascader = forwardRef<any, CustomCascaderProps>(
|
|
|
43
44
|
options = [],
|
|
44
45
|
fieldNames = { label: 'label', value: 'value', children: 'children' },
|
|
45
46
|
placeholder = '请选择或输入地址',
|
|
47
|
+
maxLength = 80,
|
|
46
48
|
onChange,
|
|
47
49
|
value: externalValue,
|
|
48
50
|
className = '',
|
|
@@ -291,6 +293,7 @@ const CustomCascader = forwardRef<any, CustomCascaderProps>(
|
|
|
291
293
|
ref={inputRef}
|
|
292
294
|
placeholder={placeholder}
|
|
293
295
|
value={inputText}
|
|
296
|
+
maxLength={maxLength}
|
|
294
297
|
onChange={handleInputChange}
|
|
295
298
|
onCompositionStart={handleCompositionStart}
|
|
296
299
|
onCompositionEnd={handleCompositionEnd}
|
|
@@ -314,7 +314,8 @@ export default (form: WrappedFormUtils, isRequired?: boolean) => {
|
|
|
314
314
|
getPopupContainer={() => rootElement || document.body}
|
|
315
315
|
onChange={async (value) => {
|
|
316
316
|
await controller.wait()
|
|
317
|
-
|
|
317
|
+
form.setFieldsValue({'zwdj': undefined})
|
|
318
|
+
await controller.setEditPassenger({ jtgjlxDm: value, zwdj: '' });
|
|
318
319
|
}}
|
|
319
320
|
>
|
|
320
321
|
{(vehicleTypeList).map((e, i) => {
|
|
@@ -367,7 +368,7 @@ export default (form: WrappedFormUtils, isRequired?: boolean) => {
|
|
|
367
368
|
controller.setEditPassenger({ zwdj: value });
|
|
368
369
|
}}
|
|
369
370
|
>
|
|
370
|
-
{(levelOptions).map((e:any, i:any) => {
|
|
371
|
+
{(levelOptions).map((e: any, i: any) => {
|
|
371
372
|
return (
|
|
372
373
|
<Select.Option key={i} value={e.value}>
|
|
373
374
|
{e.label}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.kts-invoice-operate-
|
|
1
|
+
.kts-invoice-operate-passenger{
|
|
2
2
|
// padding : 20px;
|
|
3
3
|
border-bottom: 2px solid #9F613E;
|
|
4
4
|
border-left: 2px solid #9F613E;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.kts-invoice-operate-
|
|
18
|
+
.kts-invoice-operate-passenger-list-digtal {
|
|
19
19
|
|
|
20
20
|
.goods-list-digtal-discount-tag {
|
|
21
21
|
display: inline-block;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.kts-invoice-operate-
|
|
35
|
+
.kts-invoice-operate-passenger-list-able {
|
|
36
36
|
display: flex;
|
|
37
37
|
padding: 10px;
|
|
38
38
|
border-bottom: 2px solid #9F613E;
|
|
@@ -46,13 +46,17 @@
|
|
|
46
46
|
color: #f00;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
input, .ktsAntX-select-selection-item {
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
}
|
|
52
|
+
|
|
49
53
|
// .ktsAntX-table-row.kts-invoice-operate-goods-discount .ktsAntX-table-cell {
|
|
50
54
|
// background: #f5f5f5;
|
|
51
55
|
// }
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
55
|
-
.kts-invoice-operate-
|
|
59
|
+
.kts-invoice-operate-passenger-list-table-digtal {
|
|
56
60
|
|
|
57
61
|
.ktsAnt3x-form-item-control.has-error {
|
|
58
62
|
border: 1px solid #f00;
|
|
@@ -57,9 +57,6 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
|
|
|
57
57
|
|
|
58
58
|
const goodsList = controller.useMemo(s => s.passengerListState.goodsList, []);
|
|
59
59
|
|
|
60
|
-
/** 货物列表 */
|
|
61
|
-
const dataSource = controller.useMemo(s => s.passengerListState.goodsList, [])
|
|
62
|
-
|
|
63
60
|
/** 表格行事件 */
|
|
64
61
|
const onRow = useOnRow();
|
|
65
62
|
|
|
@@ -76,7 +73,9 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
|
|
|
76
73
|
|
|
77
74
|
React.useEffect(() => {
|
|
78
75
|
controller.run(async (s) => {
|
|
79
|
-
|
|
76
|
+
if (props.fieldNames) {
|
|
77
|
+
s.passengerListState.addressFieldNames = props.fieldNames
|
|
78
|
+
}
|
|
80
79
|
});
|
|
81
80
|
}, [props.fieldNames])
|
|
82
81
|
|
|
@@ -114,10 +113,10 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
|
|
|
114
113
|
// 注册 form
|
|
115
114
|
// controller.useForm('freightInfo', form);
|
|
116
115
|
return (
|
|
117
|
-
<div className="kts-invoice-operate-
|
|
116
|
+
<div className="kts-invoice-operate-passenger">
|
|
118
117
|
<div className='real-estate-info-digtal-label' >特定信息-旅客运输服务</div>
|
|
119
|
-
<div className="kts-invoice-operate-
|
|
120
|
-
<div className="kts-invoice-operate-
|
|
118
|
+
<div className="kts-invoice-operate-passenger-list-digtal" onClick={(e) => { e.stopPropagation() }} >
|
|
119
|
+
<div className="kts-invoice-operate-passenger-list-able">
|
|
121
120
|
{/* 添加行 */}
|
|
122
121
|
<AddRowButton />
|
|
123
122
|
|
|
@@ -129,14 +128,14 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
|
|
|
129
128
|
<div style={{ flex: 1 }} />
|
|
130
129
|
|
|
131
130
|
</div>
|
|
132
|
-
<div className={classnames('kts-invoice-operate-
|
|
131
|
+
<div className={classnames('kts-invoice-operate-passenger-list-table-digtal')}>
|
|
133
132
|
<TableVirtual
|
|
134
133
|
size="small"
|
|
135
134
|
rowKey="$index"
|
|
136
135
|
pagination={false}
|
|
137
136
|
scroll={{ y: 280 }}
|
|
138
137
|
components={{ body: { row: TableRow } }}
|
|
139
|
-
dataSource={
|
|
138
|
+
dataSource={goodsList}
|
|
140
139
|
columns={useColumns(props.form, isRequired)}
|
|
141
140
|
rowSelection={useRowSelection()}
|
|
142
141
|
onRow={record => ({
|
|
@@ -68,9 +68,6 @@ export interface IStakeholder {
|
|
|
68
68
|
/** 是否可以选择自然人 */
|
|
69
69
|
isNaturalPerson?: boolean;
|
|
70
70
|
|
|
71
|
-
/** 是否是自然人标志 */
|
|
72
|
-
naturalPersonFlag?: any;
|
|
73
|
-
|
|
74
71
|
/** 是否展开 */
|
|
75
72
|
isExpand?: boolean;
|
|
76
73
|
|
|
@@ -84,17 +81,17 @@ export interface IStakeholder {
|
|
|
84
81
|
riskData?: boolean;
|
|
85
82
|
|
|
86
83
|
invoiceMarkCallback?: (value: any) => void;
|
|
84
|
+
|
|
85
|
+
changeNaturalPersonFlag?: (value: any) => void;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
/** 干系人 */
|
|
90
89
|
export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.create())(props => {
|
|
91
90
|
|
|
92
|
-
const { form, isShowImportButton, allowEditFlag, onClickImportButton, isVatNormal = false } = props;
|
|
91
|
+
const { form, isShowImportButton, allowEditFlag, onClickImportButton, isVatNormal = false, changeNaturalPersonFlag } = props;
|
|
93
92
|
|
|
94
93
|
const [isExpand, setExpand] = React.useState(typeof props.isExpand === 'boolean' ? props.isExpand : true);
|
|
95
94
|
|
|
96
|
-
const [naturalPersonFlag, setNaturalPersonFlag] = React.useState(props.naturalPersonFlag ? props.naturalPersonFlag : 'COMPANY');
|
|
97
|
-
|
|
98
95
|
const [validateStatus, setStatus] = React.useState<any>('');
|
|
99
96
|
const [errorInfo, setInfo] = React.useState('');
|
|
100
97
|
const [nation, setNationStatue] = React.useState<any>('');
|
|
@@ -109,6 +106,9 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
109
106
|
const disableds = controller.useMemo(s => s.stakeholder.disableds || [], []);
|
|
110
107
|
|
|
111
108
|
const rulesMap = controller.useMemo(s => s.stakeholder.rulesMap || {}, []);
|
|
109
|
+
|
|
110
|
+
const naturalPersonFlag = controller.useMemo(s => s.stakeholder.naturalPersonFlag || 'COMPANY', []);
|
|
111
|
+
|
|
112
112
|
/** 乐企 */
|
|
113
113
|
const leqispanW = React.useMemo(() => {
|
|
114
114
|
if (props.leqi) {
|
|
@@ -149,10 +149,6 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
149
149
|
setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
|
|
150
150
|
}, [props.isExpand])
|
|
151
151
|
|
|
152
|
-
React.useEffect(() => {
|
|
153
|
-
setNaturalPersonFlag(props.naturalPersonFlag ? props.naturalPersonFlag : 'COMPANY');
|
|
154
|
-
}, [props.naturalPersonFlag])
|
|
155
|
-
|
|
156
152
|
const onChangeType = React.useCallback(
|
|
157
153
|
(value: string) => {
|
|
158
154
|
const buyerTaxId = form?.getFieldValue("buyerTaxId");
|
|
@@ -429,7 +425,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
429
425
|
<Form.Item colon={false}>
|
|
430
426
|
{getFieldDecorator('naturalPersonFlag', {
|
|
431
427
|
})(
|
|
432
|
-
<NaturalPersonFlag readOnly={isReadOnly('naturalPersonFlag')} onChange={
|
|
428
|
+
<NaturalPersonFlag readOnly={isReadOnly('naturalPersonFlag')} onChange={changeNaturalPersonFlag} />
|
|
433
429
|
)}
|
|
434
430
|
</Form.Item>
|
|
435
431
|
}
|
|
@@ -634,21 +630,21 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
634
630
|
<Col span={6} >
|
|
635
631
|
<Form.Item label='证件类型' colon={false} >
|
|
636
632
|
{getFieldDecorator('certificateType', {
|
|
637
|
-
rules: [{ required: true, message: '
|
|
638
|
-
})(<CardSelect onChange={onChangeType} readOnly={isReadOnly('certificateType')} placeholder="
|
|
633
|
+
rules: [{ required: true, message: '证件类型必填' }]
|
|
634
|
+
})(<CardSelect onChange={onChangeType} readOnly={isReadOnly('certificateType')} placeholder="证件类型必填" autoComplete="off" />)}
|
|
639
635
|
</Form.Item>
|
|
640
636
|
</Col>
|
|
641
637
|
<Col span={7} >
|
|
642
638
|
<Form.Item label='证件号码' colon={false} validateStatus={validateStatus} help={errorInfo}>
|
|
643
639
|
{getFieldDecorator('certificateNumber', {
|
|
644
|
-
rules: [{ required: true, message: '
|
|
645
|
-
})(<MyInput readOnly={isReadOnly('certificateNumber')} placeholder="
|
|
640
|
+
rules: [{ required: true, message: '证件号码必填' }, { max: 30, message: `内容超长` }, { validator: validateIDCode },]
|
|
641
|
+
})(<MyInput readOnly={isReadOnly('certificateNumber')} placeholder="证件号码必填" autoComplete="off" />)}
|
|
646
642
|
</Form.Item>
|
|
647
643
|
</Col>
|
|
648
644
|
<Col span={6} >
|
|
649
645
|
<Form.Item label='国籍(或地区)' colon={false} validateStatus={nation} help={nationInfo}>
|
|
650
646
|
{getFieldDecorator('nationality', {
|
|
651
|
-
rules: [{ required: true, message: '
|
|
647
|
+
rules: [{ required: true, message: '国籍必填' }, { validator: validateNationality }]
|
|
652
648
|
})(<NationalSelect showSearch={true}
|
|
653
649
|
optionFilterProp="children"
|
|
654
650
|
filterOption={(input: any, option: any) => {
|
|
@@ -656,7 +652,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
656
652
|
return option.label?.indexOf(input) >= 0;
|
|
657
653
|
}
|
|
658
654
|
return false;
|
|
659
|
-
}} readOnly={isReadOnly('nationality')} placeholder="
|
|
655
|
+
}} readOnly={isReadOnly('nationality')} placeholder="国籍必填" autoComplete="off" />)}
|
|
660
656
|
</Form.Item>
|
|
661
657
|
</Col>
|
|
662
658
|
</Row>
|
|
@@ -674,12 +670,18 @@ function NaturalPersonFlag(props: {
|
|
|
674
670
|
readOnly?: boolean;
|
|
675
671
|
}) {
|
|
676
672
|
|
|
673
|
+
const controller = Invoice.useInvoiceController();
|
|
674
|
+
|
|
677
675
|
const [value, setValue] = React.useState(props.value || 'COMPANY');
|
|
678
676
|
|
|
679
677
|
const onChange = React.useCallback((e: CheckboxChangeEvent) => {
|
|
680
678
|
if (props.readOnly) return;
|
|
681
|
-
|
|
682
|
-
|
|
679
|
+
const naturalPersonFlag = e.target.checked ? 'NATURAL' : 'COMPANY'
|
|
680
|
+
setValue(naturalPersonFlag);
|
|
681
|
+
controller.pipeline(async (s) => {
|
|
682
|
+
s.stakeholder.naturalPersonFlag = naturalPersonFlag
|
|
683
|
+
})();
|
|
684
|
+
props.onChange && props.onChange(naturalPersonFlag);
|
|
683
685
|
}, [props.onChange, props.readOnly])
|
|
684
686
|
|
|
685
687
|
React.useEffect(() => {
|