kts-component-invoice-operate 3.2.257 → 3.2.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Invoice/Invoice-digtal/_test/passenger/index.d.ts +4 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IColumnsReplenish/index.d.ts +6 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IGood/index.d.ts +24 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/index.d.ts +44 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +5 -0
- package/dist/Invoice/InvoiceController/fns/addPassenger.d.ts +6 -0
- package/dist/Invoice/InvoiceController/fns/delPassenger.d.ts +6 -0
- package/dist/Invoice/InvoiceController/fns/saveEditPassenger.d.ts +6 -0
- package/dist/Invoice/InvoiceController/fns/setEditPassenger.d.ts +6 -0
- package/dist/Invoice/InvoiceController/index.d.ts +12 -0
- package/dist/Invoice/index.d.ts +2 -0
- package/dist/Invoice/ui/components/CustomCascader/index.d.ts +20 -0
- package/dist/Invoice/ui/default/ImportPassengerDrawer/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/PassengerList/hook/useColumns/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/PassengerList/hook/useColumns/ui/TitleText/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/PassengerList/hook/useOnRow/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/PassengerList/hook/useRowSelection/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/PassengerList/hook/useWindowClick/index.d.ts +8 -0
- package/dist/Invoice/ui/digtal/PassengerList/index.d.ts +18 -0
- package/dist/Invoice/ui/digtal/PassengerList/ui/AddRowButton/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/PassengerList/ui/BatchImportButton/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +6 -0
- package/dist/Invoice/ui/digtal/PassengerList/ui/TableRow/index.d.ts +3 -0
- package/dist/Invoice/ui/digtal/PassengerList/ui/TableVirtual/index.d.ts +4 -0
- package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +2 -0
- package/dist/index.esm.js +3501 -45
- package/dist/index.js +3491 -35
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/freight/index.tsx +12 -0
- package/src/Invoice/Invoice-digtal/_test/passenger/index.tsx +14602 -0
- package/src/Invoice/Invoice-digtal/index.md +3 -0
- package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +11 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IColumnsReplenish/index.ts +10 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/IGood/index.ts +34 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/PassengerListState/index.ts +179 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +8 -2
- package/src/Invoice/InvoiceController/fns/addPassenger.ts +11 -0
- package/src/Invoice/InvoiceController/fns/delPassenger.ts +38 -0
- package/src/Invoice/InvoiceController/fns/saveEditPassenger.ts +24 -0
- package/src/Invoice/InvoiceController/fns/setEditPassenger.ts +16 -0
- package/src/Invoice/InvoiceController/index.ts +23 -1
- package/src/Invoice/index.tsx +5 -0
- package/src/Invoice/ui/components/CustomCascader/index.tsx +356 -0
- package/src/Invoice/ui/default/ImportPassengerDrawer/index.tsx +214 -0
- package/src/Invoice/ui/digtal/PassengerList/hook/useColumns/index.tsx +428 -0
- package/src/Invoice/ui/digtal/PassengerList/hook/useColumns/ui/TitleText/index.tsx +20 -0
- package/src/Invoice/ui/digtal/PassengerList/hook/useOnRow/index.tsx +37 -0
- package/src/Invoice/ui/digtal/PassengerList/hook/useRowSelection/index.tsx +120 -0
- package/src/Invoice/ui/digtal/PassengerList/hook/useWindowClick/index.tsx +23 -0
- package/src/Invoice/ui/digtal/PassengerList/index.less +73 -0
- package/src/Invoice/ui/digtal/PassengerList/index.tsx +152 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/AddRowButton/index.tsx +75 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/BatchImportButton/index.tsx +74 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +37 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/TableRow/index.less +29 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/TableRow/index.tsx +21 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/TableVirtual/index.less +39 -0
- package/src/Invoice/ui/digtal/PassengerList/ui/TableVirtual/index.tsx +109 -0
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +22 -17
package/dist/index.js
CHANGED
|
@@ -515,6 +515,42 @@ function _isNativeReflectConstruct() {
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
519
|
+
if (source == null) return {};
|
|
520
|
+
var target = {};
|
|
521
|
+
var sourceKeys = Object.keys(source);
|
|
522
|
+
var key, i;
|
|
523
|
+
|
|
524
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
525
|
+
key = sourceKeys[i];
|
|
526
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
527
|
+
target[key] = source[key];
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
return target;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function _objectWithoutProperties(source, excluded) {
|
|
534
|
+
if (source == null) return {};
|
|
535
|
+
|
|
536
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
537
|
+
|
|
538
|
+
var key, i;
|
|
539
|
+
|
|
540
|
+
if (Object.getOwnPropertySymbols) {
|
|
541
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
542
|
+
|
|
543
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
544
|
+
key = sourceSymbolKeys[i];
|
|
545
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
546
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
547
|
+
target[key] = source[key];
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
return target;
|
|
552
|
+
}
|
|
553
|
+
|
|
518
554
|
function _assertThisInitialized(self) {
|
|
519
555
|
if (self === void 0) {
|
|
520
556
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -769,7 +805,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
|
|
|
769
805
|
var _validateFields2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
770
806
|
var _this3 = this;
|
|
771
807
|
|
|
772
|
-
var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList, _this$state$freightLi, _this$state$payListSt;
|
|
808
|
+
var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList, _this$state$freightLi, _this$state$passenger, _this$state$payListSt;
|
|
773
809
|
|
|
774
810
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
775
811
|
while (1) {
|
|
@@ -850,17 +886,17 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
|
|
|
850
886
|
_errors.set('freightList', _context.t1.errors);
|
|
851
887
|
|
|
852
888
|
case 37:
|
|
853
|
-
_values.set('freightList', this.state.freightListState.goodsList.slice());
|
|
889
|
+
_values.set('freightList', this.state.freightListState.goodsList.slice()); //旅客运输列表
|
|
854
890
|
|
|
855
891
|
|
|
856
|
-
if (!this.state.
|
|
892
|
+
if (!this.state.passengerListState.form) {
|
|
857
893
|
_context.next = 47;
|
|
858
894
|
break;
|
|
859
895
|
}
|
|
860
896
|
|
|
861
897
|
_context.prev = 39;
|
|
862
898
|
_context.next = 42;
|
|
863
|
-
return (_this$state$
|
|
899
|
+
return (_this$state$passenger = this.state.passengerListState.form) === null || _this$state$passenger === void 0 ? void 0 : _this$state$passenger.validateFields();
|
|
864
900
|
|
|
865
901
|
case 42:
|
|
866
902
|
_context.next = 47;
|
|
@@ -870,9 +906,32 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
|
|
|
870
906
|
_context.prev = 44;
|
|
871
907
|
_context.t2 = _context["catch"](39);
|
|
872
908
|
|
|
873
|
-
_errors.set('
|
|
909
|
+
_errors.set('passengerList', _context.t2.errors);
|
|
874
910
|
|
|
875
911
|
case 47:
|
|
912
|
+
_values.set('passengerList', this.state.passengerListState.goodsList.slice()); //支付
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
if (!this.state.payListState.form) {
|
|
916
|
+
_context.next = 57;
|
|
917
|
+
break;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
_context.prev = 49;
|
|
921
|
+
_context.next = 52;
|
|
922
|
+
return (_this$state$payListSt = this.state.payListState.form) === null || _this$state$payListSt === void 0 ? void 0 : _this$state$payListSt.validateFields();
|
|
923
|
+
|
|
924
|
+
case 52:
|
|
925
|
+
_context.next = 57;
|
|
926
|
+
break;
|
|
927
|
+
|
|
928
|
+
case 54:
|
|
929
|
+
_context.prev = 54;
|
|
930
|
+
_context.t3 = _context["catch"](49);
|
|
931
|
+
|
|
932
|
+
_errors.set('payList', _context.t3.errors);
|
|
933
|
+
|
|
934
|
+
case 57:
|
|
876
935
|
_values.set('payList', this.state.payListState.goodsList.slice()); // 金额(不含税)
|
|
877
936
|
|
|
878
937
|
|
|
@@ -919,12 +978,12 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
|
|
|
919
978
|
values: _values
|
|
920
979
|
});
|
|
921
980
|
|
|
922
|
-
case
|
|
981
|
+
case 63:
|
|
923
982
|
case "end":
|
|
924
983
|
return _context.stop();
|
|
925
984
|
}
|
|
926
985
|
}
|
|
927
|
-
}, _callee, this, [[19, 24], [29, 34], [39, 44]]);
|
|
986
|
+
}, _callee, this, [[19, 24], [29, 34], [39, 44], [49, 54]]);
|
|
928
987
|
}));
|
|
929
988
|
|
|
930
989
|
function validateFields() {
|
|
@@ -1337,6 +1396,261 @@ var AutoComplete = /*#__PURE__*/_createClass(function AutoComplete() {
|
|
|
1337
1396
|
this.onItemCodeSearch = void 0;
|
|
1338
1397
|
});
|
|
1339
1398
|
|
|
1399
|
+
var CertificateTypeList = [{
|
|
1400
|
+
value: 'COMPANY',
|
|
1401
|
+
label: '单位'
|
|
1402
|
+
}, {
|
|
1403
|
+
value: 'ORGANIZATION_CODE',
|
|
1404
|
+
label: '组织机构代码证'
|
|
1405
|
+
}, {
|
|
1406
|
+
value: 'BUSINESS_LICENSE',
|
|
1407
|
+
label: '营业执照'
|
|
1408
|
+
}, {
|
|
1409
|
+
value: 'TAX_REGISTRATION_CERTIFICATE',
|
|
1410
|
+
label: '税务登记证'
|
|
1411
|
+
}, {
|
|
1412
|
+
value: 'OTHER_COMPANY_CERTIFICATE',
|
|
1413
|
+
label: '其他单位证件'
|
|
1414
|
+
}, {
|
|
1415
|
+
value: 'INDIVIDUAL',
|
|
1416
|
+
label: '个人'
|
|
1417
|
+
}, {
|
|
1418
|
+
value: 'RESIDENT_ID_CARD',
|
|
1419
|
+
label: '居民身份证'
|
|
1420
|
+
}, {
|
|
1421
|
+
value: 'OFFICER_ID_CARD',
|
|
1422
|
+
label: '军官证'
|
|
1423
|
+
}, {
|
|
1424
|
+
value: 'ARMED_POLICE_ID_CARD',
|
|
1425
|
+
label: '武警警官证'
|
|
1426
|
+
}, {
|
|
1427
|
+
value: 'SOLDIER_ID_CARD',
|
|
1428
|
+
label: '士兵证'
|
|
1429
|
+
}, {
|
|
1430
|
+
value: 'RETIRED_MILITARY_CADRE_CERTIFICATE',
|
|
1431
|
+
label: '军队离退休干部证'
|
|
1432
|
+
}, {
|
|
1433
|
+
value: 'DISABLED_PERSON_CERTIFICATE',
|
|
1434
|
+
label: '残疾人证'
|
|
1435
|
+
}, {
|
|
1436
|
+
value: 'DISABLED_SOLDIER_CERTIFICATE',
|
|
1437
|
+
label: '残疾军人证(1-8级)'
|
|
1438
|
+
}, {
|
|
1439
|
+
value: 'FOREIGN_PASSPORT',
|
|
1440
|
+
label: '外国护照'
|
|
1441
|
+
}, {
|
|
1442
|
+
value: 'HOME_RETURN_PERMIT',
|
|
1443
|
+
label: '港澳同胞回乡证'
|
|
1444
|
+
}, {
|
|
1445
|
+
value: 'HONG_KONG_MACAO_MAINLAND_PERMIT',
|
|
1446
|
+
label: '港澳居民来往内地通行证'
|
|
1447
|
+
}, {
|
|
1448
|
+
value: 'TAIWAN_COMPATRIOT_PERMIT',
|
|
1449
|
+
label: '台胞证'
|
|
1450
|
+
}, {
|
|
1451
|
+
value: 'HONG_KONG_MACAO_PERMIT',
|
|
1452
|
+
label: '中华人民共和国往来港澳通行证'
|
|
1453
|
+
}, {
|
|
1454
|
+
value: 'TAIWAN_MAINLAND_PERMIT',
|
|
1455
|
+
label: '台湾居民来往大陆通行证'
|
|
1456
|
+
}, {
|
|
1457
|
+
value: 'MAINLAND_TAIWAN_PERMIT',
|
|
1458
|
+
label: '大陆居民往来台湾通行证'
|
|
1459
|
+
}, {
|
|
1460
|
+
value: 'FOREIGN_RESIDENCE_PERMIT',
|
|
1461
|
+
label: '外国人居留证'
|
|
1462
|
+
}, {
|
|
1463
|
+
value: 'DIPLOMATIC_ID_CARD',
|
|
1464
|
+
label: '外交官证'
|
|
1465
|
+
}, {
|
|
1466
|
+
value: 'CONSULATE_ID_CARD',
|
|
1467
|
+
label: '使(领事)馆证'
|
|
1468
|
+
}, {
|
|
1469
|
+
value: 'SEAMAN_BOOK',
|
|
1470
|
+
label: '海员证'
|
|
1471
|
+
}, {
|
|
1472
|
+
value: 'HONG_KONG_PERMANENT_ID_CARD',
|
|
1473
|
+
label: '香港永久性居民身份证'
|
|
1474
|
+
}, {
|
|
1475
|
+
value: 'TAIWAN_ID_CARD',
|
|
1476
|
+
label: '台湾身份证'
|
|
1477
|
+
}, {
|
|
1478
|
+
value: 'MACAO_PERMANENT_ID_CARD',
|
|
1479
|
+
label: '澳门特别行政区永久性居民身份证'
|
|
1480
|
+
}, {
|
|
1481
|
+
value: 'FOREIGNER_ID_CARD',
|
|
1482
|
+
label: '外国人身份证件'
|
|
1483
|
+
}, {
|
|
1484
|
+
value: 'GRADUATE_STARTUP_CERTIFICATE',
|
|
1485
|
+
label: '高校毕业生自主创业证'
|
|
1486
|
+
}, {
|
|
1487
|
+
value: 'EMPLOYMENT_UNEMPLOYMENT_CERTIFICATE',
|
|
1488
|
+
label: '就业失业登记证'
|
|
1489
|
+
}, {
|
|
1490
|
+
value: 'RETIREMENT_CERTIFICATE',
|
|
1491
|
+
label: '退休证'
|
|
1492
|
+
}, {
|
|
1493
|
+
value: 'RETIRED_CADRE_CERTIFICATE',
|
|
1494
|
+
label: '离休证'
|
|
1495
|
+
}, {
|
|
1496
|
+
value: 'CHINESE_PASSPORT',
|
|
1497
|
+
label: '中国护照'
|
|
1498
|
+
}, {
|
|
1499
|
+
value: 'RETIRED_SOLDIER_SELF_EMPLOYMENT_CERTIFICATE',
|
|
1500
|
+
label: '城镇退役士兵自谋职业证'
|
|
1501
|
+
}, {
|
|
1502
|
+
value: 'MILITARY_FAMILY_IDENTITY_CERTIFICATE',
|
|
1503
|
+
label: '随军家属身份证明'
|
|
1504
|
+
}, {
|
|
1505
|
+
value: 'MILITARY_OFFICER_TRANSFER_CERTIFICATE',
|
|
1506
|
+
label: '中国人民解放军军官转业证书'
|
|
1507
|
+
}, {
|
|
1508
|
+
value: 'MILITARY_CONSCRIPT_RETIREMENT_CERTIFICATE',
|
|
1509
|
+
label: '中国人民解放军义务兵退出现役证'
|
|
1510
|
+
}, {
|
|
1511
|
+
value: 'MILITARY_NCO_RETIREMENT_CERTIFICATE',
|
|
1512
|
+
label: '中国人民解放军士官退出现役证'
|
|
1513
|
+
}, {
|
|
1514
|
+
value: 'FOREIGN_PERMANENT_RESIDENCE_ID_CARD',
|
|
1515
|
+
label: '外国人永久居留身份证(外国人永久居留证)'
|
|
1516
|
+
}, {
|
|
1517
|
+
value: 'EMPLOYMENT_ENTREPRENEURSHIP_CERTIFICATE',
|
|
1518
|
+
label: '就业创业证'
|
|
1519
|
+
}, {
|
|
1520
|
+
value: 'HONG_KONG_PASSPORT',
|
|
1521
|
+
label: '香港特别行政区护照'
|
|
1522
|
+
}, {
|
|
1523
|
+
value: 'MACAO_PASSPORT',
|
|
1524
|
+
label: '澳门特别行政区护照'
|
|
1525
|
+
}, {
|
|
1526
|
+
value: 'HONG_KONG_MACAO_RESIDENCE_PERMIT',
|
|
1527
|
+
label: '中华人民共和国港澳居民居住证'
|
|
1528
|
+
}, {
|
|
1529
|
+
value: 'TAIWAN_RESIDENCE_PERMIT',
|
|
1530
|
+
label: '中华人民共和国台湾居民居住证'
|
|
1531
|
+
}, {
|
|
1532
|
+
value: 'FOREIGN_WORK_PERMIT_A',
|
|
1533
|
+
label: '中华人民共和国外国人工作许可证(A类)'
|
|
1534
|
+
}, {
|
|
1535
|
+
value: 'FOREIGN_WORK_PERMIT_B',
|
|
1536
|
+
label: '中华人民共和国外国人工作许可证(B类)'
|
|
1537
|
+
}, {
|
|
1538
|
+
value: 'FOREIGN_WORK_PERMIT_C',
|
|
1539
|
+
label: '中华人民共和国外国人工作许可证(C类)'
|
|
1540
|
+
}, {
|
|
1541
|
+
value: 'BIRTH_MEDICAL_CERTIFICATE',
|
|
1542
|
+
label: '出生医学证明'
|
|
1543
|
+
}, {
|
|
1544
|
+
value: 'OTHER_INDIVIDUAL_CERTIFICATE',
|
|
1545
|
+
label: '其他个人证件'
|
|
1546
|
+
}]; // 在 Antd 中使用方式:
|
|
1547
|
+
// <Select options={options} />
|
|
1548
|
+
|
|
1549
|
+
var VehicleTypeList = [{
|
|
1550
|
+
value: 'AIRCRAFT',
|
|
1551
|
+
label: '飞机'
|
|
1552
|
+
}, {
|
|
1553
|
+
value: 'TRAIN',
|
|
1554
|
+
label: '火车'
|
|
1555
|
+
}, {
|
|
1556
|
+
value: 'LONG_DISTANCE_BUS',
|
|
1557
|
+
label: '长途汽车'
|
|
1558
|
+
}, {
|
|
1559
|
+
value: 'PUBLIC_TRANSPORT',
|
|
1560
|
+
label: '公共交通'
|
|
1561
|
+
}, {
|
|
1562
|
+
value: 'TAXI',
|
|
1563
|
+
label: '出租车'
|
|
1564
|
+
}, {
|
|
1565
|
+
value: 'AUTOMOBILE',
|
|
1566
|
+
label: '汽车'
|
|
1567
|
+
}, {
|
|
1568
|
+
value: 'SHIP',
|
|
1569
|
+
label: '船舶'
|
|
1570
|
+
}, {
|
|
1571
|
+
value: 'OTHER',
|
|
1572
|
+
label: '其他'
|
|
1573
|
+
}];
|
|
1574
|
+
|
|
1575
|
+
var PassengerListState = /*#__PURE__*/_createClass(function PassengerListState() {
|
|
1576
|
+
_classCallCheck(this, PassengerListState);
|
|
1577
|
+
|
|
1578
|
+
this.goodMax = void 0;
|
|
1579
|
+
this.editGood = void 0;
|
|
1580
|
+
this.isAddRow = true;
|
|
1581
|
+
this.isRemRow = true;
|
|
1582
|
+
this.isBatchImport = true;
|
|
1583
|
+
this.isVisibleDrawer = false;
|
|
1584
|
+
this.goodsMap = new Map();
|
|
1585
|
+
this.form = void 0;
|
|
1586
|
+
this.certificateTypeList = CertificateTypeList;
|
|
1587
|
+
this.vehicleTypeList = VehicleTypeList;
|
|
1588
|
+
this.goodsList = [];
|
|
1589
|
+
this.selectedGoodIndex = [];
|
|
1590
|
+
this.area = [];
|
|
1591
|
+
this.addressFieldNames = {
|
|
1592
|
+
label: 'label',
|
|
1593
|
+
value: 'value',
|
|
1594
|
+
children: 'children'
|
|
1595
|
+
};
|
|
1596
|
+
this.dataSource = [];
|
|
1597
|
+
this.pagination = {};
|
|
1598
|
+
this.columns = [{
|
|
1599
|
+
title: '序号',
|
|
1600
|
+
dataIndex: 'i',
|
|
1601
|
+
key: 'i',
|
|
1602
|
+
render: function render(t, record, index) {
|
|
1603
|
+
return index + 1;
|
|
1604
|
+
}
|
|
1605
|
+
}, {
|
|
1606
|
+
title: '出行人',
|
|
1607
|
+
dataIndex: 'cxr',
|
|
1608
|
+
key: 'cxr'
|
|
1609
|
+
}, {
|
|
1610
|
+
title: '出行日期',
|
|
1611
|
+
dataIndex: 'chuxrq',
|
|
1612
|
+
key: 'chuxrq'
|
|
1613
|
+
}, {
|
|
1614
|
+
title: '出行人证件类型',
|
|
1615
|
+
dataIndex: 'cxrzjlxDm',
|
|
1616
|
+
key: 'cxrzjlxDm'
|
|
1617
|
+
}, {
|
|
1618
|
+
title: '出行人证件号码',
|
|
1619
|
+
dataIndex: 'sfzjhm',
|
|
1620
|
+
key: 'sfzjhm',
|
|
1621
|
+
render: function render(text) {
|
|
1622
|
+
var _CertificateTypeList$;
|
|
1623
|
+
|
|
1624
|
+
return ((_CertificateTypeList$ = CertificateTypeList.find(function (e) {
|
|
1625
|
+
return e.value === text;
|
|
1626
|
+
})) === null || _CertificateTypeList$ === void 0 ? void 0 : _CertificateTypeList$.label) || '';
|
|
1627
|
+
}
|
|
1628
|
+
}, {
|
|
1629
|
+
title: '出发点',
|
|
1630
|
+
dataIndex: 'cfd',
|
|
1631
|
+
key: 'cfd'
|
|
1632
|
+
}, {
|
|
1633
|
+
title: '到达地',
|
|
1634
|
+
dataIndex: 'ddd',
|
|
1635
|
+
key: 'ddd'
|
|
1636
|
+
}, {
|
|
1637
|
+
title: '交通工具类型',
|
|
1638
|
+
dataIndex: 'jtgjlxDm',
|
|
1639
|
+
key: 'jtgjlxDm',
|
|
1640
|
+
render: function render(text) {
|
|
1641
|
+
var _VehicleTypeList$find;
|
|
1642
|
+
|
|
1643
|
+
return ((_VehicleTypeList$find = VehicleTypeList.find(function (e) {
|
|
1644
|
+
return e.value === text;
|
|
1645
|
+
})) === null || _VehicleTypeList$find === void 0 ? void 0 : _VehicleTypeList$find.label) || '';
|
|
1646
|
+
}
|
|
1647
|
+
}, {
|
|
1648
|
+
title: '等级',
|
|
1649
|
+
dataIndex: 'zwdj',
|
|
1650
|
+
key: 'zwdj'
|
|
1651
|
+
}];
|
|
1652
|
+
});
|
|
1653
|
+
|
|
1340
1654
|
var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControllerState() {
|
|
1341
1655
|
_classCallCheck(this, InvoiceControllerState);
|
|
1342
1656
|
|
|
@@ -1355,6 +1669,7 @@ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControlle
|
|
|
1355
1669
|
this.taxClassificationProps = void 0;
|
|
1356
1670
|
this.freightListState = new FreightListState();
|
|
1357
1671
|
this.payListState = new PayListState();
|
|
1672
|
+
this.passengerListState = new PassengerListState();
|
|
1358
1673
|
this.addGoodsCheck = void 0;
|
|
1359
1674
|
});
|
|
1360
1675
|
|
|
@@ -1460,6 +1775,40 @@ var setEditPay = /*#__PURE__*/(function () {
|
|
|
1460
1775
|
};
|
|
1461
1776
|
})();
|
|
1462
1777
|
|
|
1778
|
+
/**
|
|
1779
|
+
* 设置当前的编辑货物运输
|
|
1780
|
+
*/
|
|
1781
|
+
var setEditPassenger = /*#__PURE__*/(function () {
|
|
1782
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, newEditGood) {
|
|
1783
|
+
var editGood;
|
|
1784
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1785
|
+
while (1) {
|
|
1786
|
+
switch (_context.prev = _context.next) {
|
|
1787
|
+
case 0:
|
|
1788
|
+
if (newEditGood) {
|
|
1789
|
+
editGood = state.passengerListState.editGood;
|
|
1790
|
+
state.passengerListState = _objectSpread2(_objectSpread2({}, state.passengerListState), {}, {
|
|
1791
|
+
editGood: _objectSpread2(_objectSpread2({}, editGood), newEditGood)
|
|
1792
|
+
});
|
|
1793
|
+
} else {
|
|
1794
|
+
state.passengerListState = _objectSpread2(_objectSpread2({}, state.passengerListState), {}, {
|
|
1795
|
+
editGood: undefined
|
|
1796
|
+
});
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
case 1:
|
|
1800
|
+
case "end":
|
|
1801
|
+
return _context.stop();
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
}, _callee);
|
|
1805
|
+
}));
|
|
1806
|
+
|
|
1807
|
+
return function (_x, _x2) {
|
|
1808
|
+
return _ref.apply(this, arguments);
|
|
1809
|
+
};
|
|
1810
|
+
})();
|
|
1811
|
+
|
|
1463
1812
|
/**
|
|
1464
1813
|
* 设置单个货物属性
|
|
1465
1814
|
*/
|
|
@@ -1820,6 +2169,87 @@ var delPay = /*#__PURE__*/(function () {
|
|
|
1820
2169
|
};
|
|
1821
2170
|
})();
|
|
1822
2171
|
|
|
2172
|
+
/**
|
|
2173
|
+
* 删除一个货物运输
|
|
2174
|
+
*/
|
|
2175
|
+
var delPassenger = /*#__PURE__*/(function () {
|
|
2176
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, $index) {
|
|
2177
|
+
var goods, goodsList, goodsMap, i;
|
|
2178
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2179
|
+
while (1) {
|
|
2180
|
+
switch (_context.prev = _context.next) {
|
|
2181
|
+
case 0:
|
|
2182
|
+
if ($index) {
|
|
2183
|
+
_context.next = 2;
|
|
2184
|
+
break;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
return _context.abrupt("return");
|
|
2188
|
+
|
|
2189
|
+
case 2:
|
|
2190
|
+
// 查下要删除的货物
|
|
2191
|
+
goods = state.passengerListState.goodsList.filter(function (e) {
|
|
2192
|
+
return e.$index === $index;
|
|
2193
|
+
})[0];
|
|
2194
|
+
|
|
2195
|
+
if (goods) {
|
|
2196
|
+
_context.next = 5;
|
|
2197
|
+
break;
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
return _context.abrupt("return");
|
|
2201
|
+
|
|
2202
|
+
case 5:
|
|
2203
|
+
// 如果正在编辑 就取消编辑
|
|
2204
|
+
if (state.passengerListState.editGood && state.passengerListState.editGood.$index === $index) {
|
|
2205
|
+
state.passengerListState.editGood = undefined;
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
goodsList = state.passengerListState.goodsList;
|
|
2209
|
+
goodsMap = state.passengerListState.goodsMap;
|
|
2210
|
+
goodsMap.delete($index);
|
|
2211
|
+
i = 0;
|
|
2212
|
+
|
|
2213
|
+
case 10:
|
|
2214
|
+
if (!(i < goodsList.length)) {
|
|
2215
|
+
_context.next = 17;
|
|
2216
|
+
break;
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
if (!(goodsList[i].$index === $index)) {
|
|
2220
|
+
_context.next = 14;
|
|
2221
|
+
break;
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
// const good = goodsList[i];
|
|
2225
|
+
// if (good.lineAttribute === LineAttributeType.折扣行 && goodsList[i - 1] && goodsList[i - 1].lineAttribute === LineAttributeType.被折扣行) {
|
|
2226
|
+
// goodsList[i - 1].lineAttribute = LineAttributeType.正常;
|
|
2227
|
+
// }
|
|
2228
|
+
goodsList.splice(i, 1);
|
|
2229
|
+
return _context.abrupt("break", 17);
|
|
2230
|
+
|
|
2231
|
+
case 14:
|
|
2232
|
+
i++;
|
|
2233
|
+
_context.next = 10;
|
|
2234
|
+
break;
|
|
2235
|
+
|
|
2236
|
+
case 17:
|
|
2237
|
+
state.passengerListState.goodsList = _toConsumableArray(goodsList);
|
|
2238
|
+
state.passengerListState.goodsMap = new Map(goodsMap);
|
|
2239
|
+
|
|
2240
|
+
case 19:
|
|
2241
|
+
case "end":
|
|
2242
|
+
return _context.stop();
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
}, _callee);
|
|
2246
|
+
}));
|
|
2247
|
+
|
|
2248
|
+
return function (_x, _x2) {
|
|
2249
|
+
return _ref.apply(this, arguments);
|
|
2250
|
+
};
|
|
2251
|
+
})();
|
|
2252
|
+
|
|
1823
2253
|
var idGenerator = (function () {
|
|
1824
2254
|
return uuid.v4();
|
|
1825
2255
|
});
|
|
@@ -2225,6 +2655,33 @@ var addFreight = /*#__PURE__*/(function () {
|
|
|
2225
2655
|
};
|
|
2226
2656
|
})();
|
|
2227
2657
|
|
|
2658
|
+
/**
|
|
2659
|
+
* 添加的编旅客运输
|
|
2660
|
+
*/
|
|
2661
|
+
|
|
2662
|
+
var addPassenger = /*#__PURE__*/(function () {
|
|
2663
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
|
|
2664
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2665
|
+
while (1) {
|
|
2666
|
+
switch (_context.prev = _context.next) {
|
|
2667
|
+
case 0:
|
|
2668
|
+
options.$index = idGenerator();
|
|
2669
|
+
state.passengerListState.goodsList = [].concat(_toConsumableArray(state.passengerListState.goodsList), [options]);
|
|
2670
|
+
return _context.abrupt("return", options);
|
|
2671
|
+
|
|
2672
|
+
case 3:
|
|
2673
|
+
case "end":
|
|
2674
|
+
return _context.stop();
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
}, _callee);
|
|
2678
|
+
}));
|
|
2679
|
+
|
|
2680
|
+
return function (_x, _x2) {
|
|
2681
|
+
return _ref.apply(this, arguments);
|
|
2682
|
+
};
|
|
2683
|
+
})();
|
|
2684
|
+
|
|
2228
2685
|
/**
|
|
2229
2686
|
* 添加的付款
|
|
2230
2687
|
*/
|
|
@@ -2489,6 +2946,85 @@ var validateFields$2 = function validateFields(form) {
|
|
|
2489
2946
|
});
|
|
2490
2947
|
};
|
|
2491
2948
|
|
|
2949
|
+
/**
|
|
2950
|
+
* 保存正在编辑的货物
|
|
2951
|
+
*/
|
|
2952
|
+
var saveEditPassenger = /*#__PURE__*/(function () {
|
|
2953
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state) {
|
|
2954
|
+
var editGood, form;
|
|
2955
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2956
|
+
while (1) {
|
|
2957
|
+
switch (_context.prev = _context.next) {
|
|
2958
|
+
case 0:
|
|
2959
|
+
editGood = state.passengerListState.editGood;
|
|
2960
|
+
form = state.passengerListState.form;
|
|
2961
|
+
|
|
2962
|
+
if (!(!editGood || !form)) {
|
|
2963
|
+
_context.next = 4;
|
|
2964
|
+
break;
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
return _context.abrupt("return");
|
|
2968
|
+
|
|
2969
|
+
case 4:
|
|
2970
|
+
_context.next = 6;
|
|
2971
|
+
return validateFields$3(form);
|
|
2972
|
+
|
|
2973
|
+
case 6:
|
|
2974
|
+
if (!_context.sent.err) {
|
|
2975
|
+
_context.next = 8;
|
|
2976
|
+
break;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
return _context.abrupt("return");
|
|
2980
|
+
|
|
2981
|
+
case 8:
|
|
2982
|
+
state.passengerListState.goodsList = state.passengerListState.goodsList.map(function (e) {
|
|
2983
|
+
return e.$index === editGood.$index ? _objectSpread2(_objectSpread2({}, e), editGood) : e;
|
|
2984
|
+
});
|
|
2985
|
+
state.passengerListState.editGood = undefined;
|
|
2986
|
+
|
|
2987
|
+
case 10:
|
|
2988
|
+
case "end":
|
|
2989
|
+
return _context.stop();
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
}, _callee);
|
|
2993
|
+
}));
|
|
2994
|
+
|
|
2995
|
+
return function (_x) {
|
|
2996
|
+
return _ref.apply(this, arguments);
|
|
2997
|
+
};
|
|
2998
|
+
})();
|
|
2999
|
+
|
|
3000
|
+
var validateFields$3 = function validateFields(form) {
|
|
3001
|
+
return new Promise(function (resolve) {
|
|
3002
|
+
form.validateFields( /*#__PURE__*/function () {
|
|
3003
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
3004
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
3005
|
+
while (1) {
|
|
3006
|
+
switch (_context2.prev = _context2.next) {
|
|
3007
|
+
case 0:
|
|
3008
|
+
resolve({
|
|
3009
|
+
err: err,
|
|
3010
|
+
values: values
|
|
3011
|
+
});
|
|
3012
|
+
|
|
3013
|
+
case 1:
|
|
3014
|
+
case "end":
|
|
3015
|
+
return _context2.stop();
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
}, _callee2);
|
|
3019
|
+
}));
|
|
3020
|
+
|
|
3021
|
+
return function (_x2, _x3) {
|
|
3022
|
+
return _ref2.apply(this, arguments);
|
|
3023
|
+
};
|
|
3024
|
+
}());
|
|
3025
|
+
});
|
|
3026
|
+
};
|
|
3027
|
+
|
|
2492
3028
|
/**
|
|
2493
3029
|
* 计算搜索商品
|
|
2494
3030
|
* @param goodsList 被搜索列表
|
|
@@ -10499,16 +11035,20 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
|
10499
11035
|
_this.setFreight = _this.pipeline(setFreight);
|
|
10500
11036
|
_this.setPay = _this.pipeline(setPay);
|
|
10501
11037
|
_this.setEditFreight = _this.pipeline(setEditFreight);
|
|
11038
|
+
_this.setEditPassenger = _this.pipeline(setEditPassenger);
|
|
10502
11039
|
_this.setEditPay = _this.pipeline(setEditPay);
|
|
10503
11040
|
_this.setEditGood = _this.pipeline(setEditGood);
|
|
10504
11041
|
_this.saveEditGood = _this.pipeline(saveEditGood);
|
|
10505
11042
|
_this.saveEditFreight = _this.pipeline(saveEditFreight);
|
|
11043
|
+
_this.saveEditPassenger = _this.pipeline(saveEditPassenger);
|
|
10506
11044
|
_this.saveEditPay = _this.pipeline(saveEditPay);
|
|
10507
11045
|
_this.delGood = _this.pipeline(delGood);
|
|
10508
11046
|
_this.delFreight = _this.pipeline(delFreight);
|
|
11047
|
+
_this.delPassenger = _this.pipeline(delPassenger);
|
|
10509
11048
|
_this.delPay = _this.pipeline(delPay);
|
|
10510
11049
|
_this.addGood = _this.pipeline(addGood);
|
|
10511
11050
|
_this.addFreight = _this.pipeline(addFreight);
|
|
11051
|
+
_this.addPassenger = _this.pipeline(addPassenger);
|
|
10512
11052
|
_this.addPay = _this.pipeline(addPay);
|
|
10513
11053
|
_this.mergeDetails = _this.pipeline(mergeDetails);
|
|
10514
11054
|
_this.mergeDiscount = _this.pipeline(mergeDiscount);
|
|
@@ -10521,6 +11061,8 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
|
10521
11061
|
_this.getGoodsSearch = getGoodsSearch;
|
|
10522
11062
|
_this.getGoodsTaxRateList = void 0;
|
|
10523
11063
|
_this.setColumnsConfig = void 0;
|
|
11064
|
+
_this.downloadPassengerTpt = void 0;
|
|
11065
|
+
_this.uploadPassenger = void 0;
|
|
10524
11066
|
return _this;
|
|
10525
11067
|
} // ----------------- 发票头 模块相关 -----------------
|
|
10526
11068
|
|
|
@@ -12480,7 +13022,68 @@ function _objectSpread2$1(target) {
|
|
|
12480
13022
|
return target;
|
|
12481
13023
|
}
|
|
12482
13024
|
|
|
12483
|
-
function
|
|
13025
|
+
function _arrayWithHoles$1(arr) {
|
|
13026
|
+
if (Array.isArray(arr)) return arr;
|
|
13027
|
+
}
|
|
13028
|
+
|
|
13029
|
+
function _iterableToArrayLimit$1(arr, i) {
|
|
13030
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13031
|
+
|
|
13032
|
+
if (_i == null) return;
|
|
13033
|
+
var _arr = [];
|
|
13034
|
+
var _n = true;
|
|
13035
|
+
var _d = false;
|
|
13036
|
+
|
|
13037
|
+
var _s, _e;
|
|
13038
|
+
|
|
13039
|
+
try {
|
|
13040
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
13041
|
+
_arr.push(_s.value);
|
|
13042
|
+
|
|
13043
|
+
if (i && _arr.length === i) break;
|
|
13044
|
+
}
|
|
13045
|
+
} catch (err) {
|
|
13046
|
+
_d = true;
|
|
13047
|
+
_e = err;
|
|
13048
|
+
} finally {
|
|
13049
|
+
try {
|
|
13050
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
13051
|
+
} finally {
|
|
13052
|
+
if (_d) throw _e;
|
|
13053
|
+
}
|
|
13054
|
+
}
|
|
13055
|
+
|
|
13056
|
+
return _arr;
|
|
13057
|
+
}
|
|
13058
|
+
|
|
13059
|
+
function _arrayLikeToArray$1(arr, len) {
|
|
13060
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
13061
|
+
|
|
13062
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
13063
|
+
arr2[i] = arr[i];
|
|
13064
|
+
}
|
|
13065
|
+
|
|
13066
|
+
return arr2;
|
|
13067
|
+
}
|
|
13068
|
+
|
|
13069
|
+
function _unsupportedIterableToArray$1(o, minLen) {
|
|
13070
|
+
if (!o) return;
|
|
13071
|
+
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
13072
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13073
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13074
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13075
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
13076
|
+
}
|
|
13077
|
+
|
|
13078
|
+
function _nonIterableRest$1() {
|
|
13079
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13080
|
+
}
|
|
13081
|
+
|
|
13082
|
+
function _slicedToArray$1(arr, i) {
|
|
13083
|
+
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
|
|
13084
|
+
}
|
|
13085
|
+
|
|
13086
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
12484
13087
|
if (source == null) return {};
|
|
12485
13088
|
var target = {};
|
|
12486
13089
|
var sourceKeys = Object.keys(source);
|
|
@@ -12495,9 +13098,9 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
12495
13098
|
return target;
|
|
12496
13099
|
}
|
|
12497
13100
|
|
|
12498
|
-
function _objectWithoutProperties(source, excluded) {
|
|
13101
|
+
function _objectWithoutProperties$1(source, excluded) {
|
|
12499
13102
|
if (source == null) return {};
|
|
12500
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
13103
|
+
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
12501
13104
|
var key, i;
|
|
12502
13105
|
|
|
12503
13106
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -12514,6 +13117,16 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
12514
13117
|
return target;
|
|
12515
13118
|
}
|
|
12516
13119
|
|
|
13120
|
+
function _typeof(obj) {
|
|
13121
|
+
"@babel/helpers - typeof";
|
|
13122
|
+
|
|
13123
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
13124
|
+
return typeof obj;
|
|
13125
|
+
} : function (obj) {
|
|
13126
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
13127
|
+
}, _typeof(obj);
|
|
13128
|
+
}
|
|
13129
|
+
|
|
12517
13130
|
/**
|
|
12518
13131
|
* Take input from [0, n] and return it as [0, 1]
|
|
12519
13132
|
* @hidden
|
|
@@ -13415,6 +14028,53 @@ function updateCSS(css, key) {
|
|
|
13415
14028
|
function warning$1(valid, message) {
|
|
13416
14029
|
warningOnce(valid, "[@ant-design/icons] ".concat(message));
|
|
13417
14030
|
}
|
|
14031
|
+
function isIconDefinition(target) {
|
|
14032
|
+
return _typeof(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (_typeof(target.icon) === 'object' || typeof target.icon === 'function');
|
|
14033
|
+
}
|
|
14034
|
+
function normalizeAttrs() {
|
|
14035
|
+
var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14036
|
+
return Object.keys(attrs).reduce(function (acc, key) {
|
|
14037
|
+
var val = attrs[key];
|
|
14038
|
+
|
|
14039
|
+
switch (key) {
|
|
14040
|
+
case 'class':
|
|
14041
|
+
acc.className = val;
|
|
14042
|
+
delete acc.class;
|
|
14043
|
+
break;
|
|
14044
|
+
|
|
14045
|
+
default:
|
|
14046
|
+
acc[key] = val;
|
|
14047
|
+
}
|
|
14048
|
+
|
|
14049
|
+
return acc;
|
|
14050
|
+
}, {});
|
|
14051
|
+
}
|
|
14052
|
+
function generate$1(node, key, rootProps) {
|
|
14053
|
+
if (!rootProps) {
|
|
14054
|
+
return /*#__PURE__*/React__default['default'].createElement(node.tag, _objectSpread2$1({
|
|
14055
|
+
key: key
|
|
14056
|
+
}, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
|
|
14057
|
+
return generate$1(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
14058
|
+
}));
|
|
14059
|
+
}
|
|
14060
|
+
|
|
14061
|
+
return /*#__PURE__*/React__default['default'].createElement(node.tag, _objectSpread2$1(_objectSpread2$1({
|
|
14062
|
+
key: key
|
|
14063
|
+
}, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
|
|
14064
|
+
return generate$1(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
|
|
14065
|
+
}));
|
|
14066
|
+
}
|
|
14067
|
+
function getSecondaryColor(primaryColor) {
|
|
14068
|
+
// choose the second color
|
|
14069
|
+
return generate(primaryColor)[0];
|
|
14070
|
+
}
|
|
14071
|
+
function normalizeTwoToneColors(twoToneColor) {
|
|
14072
|
+
if (!twoToneColor) {
|
|
14073
|
+
return [];
|
|
14074
|
+
}
|
|
14075
|
+
|
|
14076
|
+
return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
|
|
14077
|
+
} // These props make sure that the SVG behaviours like general text.
|
|
13418
14078
|
// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
|
|
13419
14079
|
|
|
13420
14080
|
var svgBaseProps = {
|
|
@@ -13439,8 +14099,192 @@ var useInsertStyles = function useInsertStyles() {
|
|
|
13439
14099
|
}, []);
|
|
13440
14100
|
};
|
|
13441
14101
|
|
|
13442
|
-
var _excluded = ["
|
|
14102
|
+
var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"];
|
|
14103
|
+
var twoToneColorPalette = {
|
|
14104
|
+
primaryColor: '#333',
|
|
14105
|
+
secondaryColor: '#E6E6E6',
|
|
14106
|
+
calculated: false
|
|
14107
|
+
};
|
|
14108
|
+
|
|
14109
|
+
function setTwoToneColors(_ref) {
|
|
14110
|
+
var primaryColor = _ref.primaryColor,
|
|
14111
|
+
secondaryColor = _ref.secondaryColor;
|
|
14112
|
+
twoToneColorPalette.primaryColor = primaryColor;
|
|
14113
|
+
twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
|
|
14114
|
+
twoToneColorPalette.calculated = !!secondaryColor;
|
|
14115
|
+
}
|
|
14116
|
+
|
|
14117
|
+
function getTwoToneColors() {
|
|
14118
|
+
return _objectSpread2$1({}, twoToneColorPalette);
|
|
14119
|
+
}
|
|
14120
|
+
|
|
14121
|
+
var IconBase = function IconBase(props) {
|
|
14122
|
+
var icon = props.icon,
|
|
14123
|
+
className = props.className,
|
|
14124
|
+
onClick = props.onClick,
|
|
14125
|
+
style = props.style,
|
|
14126
|
+
primaryColor = props.primaryColor,
|
|
14127
|
+
secondaryColor = props.secondaryColor,
|
|
14128
|
+
restProps = _objectWithoutProperties$1(props, _excluded);
|
|
14129
|
+
|
|
14130
|
+
var colors = twoToneColorPalette;
|
|
14131
|
+
|
|
14132
|
+
if (primaryColor) {
|
|
14133
|
+
colors = {
|
|
14134
|
+
primaryColor: primaryColor,
|
|
14135
|
+
secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
|
|
14136
|
+
};
|
|
14137
|
+
}
|
|
14138
|
+
|
|
14139
|
+
useInsertStyles();
|
|
14140
|
+
warning$1(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
|
14141
|
+
|
|
14142
|
+
if (!isIconDefinition(icon)) {
|
|
14143
|
+
return null;
|
|
14144
|
+
}
|
|
14145
|
+
|
|
14146
|
+
var target = icon;
|
|
14147
|
+
|
|
14148
|
+
if (target && typeof target.icon === 'function') {
|
|
14149
|
+
target = _objectSpread2$1(_objectSpread2$1({}, target), {}, {
|
|
14150
|
+
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
14151
|
+
});
|
|
14152
|
+
}
|
|
14153
|
+
|
|
14154
|
+
return generate$1(target.icon, "svg-".concat(target.name), _objectSpread2$1({
|
|
14155
|
+
className: className,
|
|
14156
|
+
onClick: onClick,
|
|
14157
|
+
style: style,
|
|
14158
|
+
'data-icon': target.name,
|
|
14159
|
+
width: '1em',
|
|
14160
|
+
height: '1em',
|
|
14161
|
+
fill: 'currentColor',
|
|
14162
|
+
'aria-hidden': 'true'
|
|
14163
|
+
}, restProps));
|
|
14164
|
+
};
|
|
14165
|
+
|
|
14166
|
+
IconBase.displayName = 'IconReact';
|
|
14167
|
+
IconBase.getTwoToneColors = getTwoToneColors;
|
|
14168
|
+
IconBase.setTwoToneColors = setTwoToneColors;
|
|
14169
|
+
|
|
14170
|
+
function setTwoToneColor(twoToneColor) {
|
|
14171
|
+
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
|
|
14172
|
+
_normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
|
|
14173
|
+
primaryColor = _normalizeTwoToneColo2[0],
|
|
14174
|
+
secondaryColor = _normalizeTwoToneColo2[1];
|
|
14175
|
+
|
|
14176
|
+
return IconBase.setTwoToneColors({
|
|
14177
|
+
primaryColor: primaryColor,
|
|
14178
|
+
secondaryColor: secondaryColor
|
|
14179
|
+
});
|
|
14180
|
+
}
|
|
14181
|
+
function getTwoToneColor() {
|
|
14182
|
+
var colors = IconBase.getTwoToneColors();
|
|
14183
|
+
|
|
14184
|
+
if (!colors.calculated) {
|
|
14185
|
+
return colors.primaryColor;
|
|
14186
|
+
}
|
|
14187
|
+
|
|
14188
|
+
return [colors.primaryColor, colors.secondaryColor];
|
|
14189
|
+
}
|
|
14190
|
+
|
|
14191
|
+
var _excluded$1 = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
|
|
14192
|
+
// should move it to antd main repo?
|
|
14193
|
+
|
|
14194
|
+
setTwoToneColor('#1890ff');
|
|
13443
14195
|
var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14196
|
+
var _classNames;
|
|
14197
|
+
|
|
14198
|
+
var className = props.className,
|
|
14199
|
+
icon = props.icon,
|
|
14200
|
+
spin = props.spin,
|
|
14201
|
+
rotate = props.rotate,
|
|
14202
|
+
tabIndex = props.tabIndex,
|
|
14203
|
+
onClick = props.onClick,
|
|
14204
|
+
twoToneColor = props.twoToneColor,
|
|
14205
|
+
restProps = _objectWithoutProperties$1(props, _excluded$1);
|
|
14206
|
+
|
|
14207
|
+
var _React$useContext = React.useContext(IconContext),
|
|
14208
|
+
_React$useContext$pre = _React$useContext.prefixCls,
|
|
14209
|
+
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre;
|
|
14210
|
+
|
|
14211
|
+
var classString = classnames__default['default'](prefixCls, (_classNames = {}, _defineProperty$1(_classNames, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), _defineProperty$1(_classNames, "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), _classNames), className);
|
|
14212
|
+
var iconTabIndex = tabIndex;
|
|
14213
|
+
|
|
14214
|
+
if (iconTabIndex === undefined && onClick) {
|
|
14215
|
+
iconTabIndex = -1;
|
|
14216
|
+
}
|
|
14217
|
+
|
|
14218
|
+
var svgStyle = rotate ? {
|
|
14219
|
+
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
14220
|
+
transform: "rotate(".concat(rotate, "deg)")
|
|
14221
|
+
} : undefined;
|
|
14222
|
+
|
|
14223
|
+
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
|
|
14224
|
+
_normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
|
|
14225
|
+
primaryColor = _normalizeTwoToneColo2[0],
|
|
14226
|
+
secondaryColor = _normalizeTwoToneColo2[1];
|
|
14227
|
+
|
|
14228
|
+
return /*#__PURE__*/React.createElement("span", _objectSpread2$1(_objectSpread2$1({
|
|
14229
|
+
role: "img",
|
|
14230
|
+
"aria-label": icon.name
|
|
14231
|
+
}, restProps), {}, {
|
|
14232
|
+
ref: ref,
|
|
14233
|
+
tabIndex: iconTabIndex,
|
|
14234
|
+
onClick: onClick,
|
|
14235
|
+
className: classString
|
|
14236
|
+
}), /*#__PURE__*/React.createElement(IconBase, {
|
|
14237
|
+
icon: icon,
|
|
14238
|
+
primaryColor: primaryColor,
|
|
14239
|
+
secondaryColor: secondaryColor,
|
|
14240
|
+
style: svgStyle
|
|
14241
|
+
}));
|
|
14242
|
+
});
|
|
14243
|
+
Icon.displayName = 'AntdIcon';
|
|
14244
|
+
Icon.getTwoToneColor = getTwoToneColor;
|
|
14245
|
+
Icon.setTwoToneColor = setTwoToneColor;
|
|
14246
|
+
|
|
14247
|
+
// This icon file is generated automatically.
|
|
14248
|
+
var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" };
|
|
14249
|
+
|
|
14250
|
+
var CheckCircleFilled$1 = function CheckCircleFilled$1(props, ref) {
|
|
14251
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2$1(_objectSpread2$1({}, props), {}, {
|
|
14252
|
+
ref: ref,
|
|
14253
|
+
icon: CheckCircleFilled
|
|
14254
|
+
}));
|
|
14255
|
+
};
|
|
14256
|
+
|
|
14257
|
+
CheckCircleFilled$1.displayName = 'CheckCircleFilled';
|
|
14258
|
+
var CheckCircleFilled$2 = /*#__PURE__*/React.forwardRef(CheckCircleFilled$1);
|
|
14259
|
+
|
|
14260
|
+
// This icon file is generated automatically.
|
|
14261
|
+
var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" };
|
|
14262
|
+
|
|
14263
|
+
var CloseOutlined$1 = function CloseOutlined$1(props, ref) {
|
|
14264
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2$1(_objectSpread2$1({}, props), {}, {
|
|
14265
|
+
ref: ref,
|
|
14266
|
+
icon: CloseOutlined
|
|
14267
|
+
}));
|
|
14268
|
+
};
|
|
14269
|
+
|
|
14270
|
+
CloseOutlined$1.displayName = 'CloseOutlined';
|
|
14271
|
+
var CloseOutlined$2 = /*#__PURE__*/React.forwardRef(CloseOutlined$1);
|
|
14272
|
+
|
|
14273
|
+
// This icon file is generated automatically.
|
|
14274
|
+
var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
|
|
14275
|
+
|
|
14276
|
+
var DownOutlined$1 = function DownOutlined$1(props, ref) {
|
|
14277
|
+
return /*#__PURE__*/React.createElement(Icon, _objectSpread2$1(_objectSpread2$1({}, props), {}, {
|
|
14278
|
+
ref: ref,
|
|
14279
|
+
icon: DownOutlined
|
|
14280
|
+
}));
|
|
14281
|
+
};
|
|
14282
|
+
|
|
14283
|
+
DownOutlined$1.displayName = 'DownOutlined';
|
|
14284
|
+
var DownOutlined$2 = /*#__PURE__*/React.forwardRef(DownOutlined$1);
|
|
14285
|
+
|
|
14286
|
+
var _excluded$2 = ["className", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children"];
|
|
14287
|
+
var Icon$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
13444
14288
|
var className = props.className,
|
|
13445
14289
|
Component = props.component,
|
|
13446
14290
|
viewBox = props.viewBox,
|
|
@@ -13449,7 +14293,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
13449
14293
|
tabIndex = props.tabIndex,
|
|
13450
14294
|
onClick = props.onClick,
|
|
13451
14295
|
children = props.children,
|
|
13452
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
14296
|
+
restProps = _objectWithoutProperties$1(props, _excluded$2);
|
|
13453
14297
|
|
|
13454
14298
|
warning$1(Boolean(Component || children), 'Should have `component` prop or `children`.');
|
|
13455
14299
|
useInsertStyles();
|
|
@@ -13506,7 +14350,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
13506
14350
|
className: classString
|
|
13507
14351
|
}), renderInnerNode());
|
|
13508
14352
|
});
|
|
13509
|
-
Icon.displayName = 'AntdIcon';
|
|
14353
|
+
Icon$1.displayName = 'AntdIcon';
|
|
13510
14354
|
|
|
13511
14355
|
var _path$3;
|
|
13512
14356
|
|
|
@@ -13833,7 +14677,7 @@ function Drag$1(props) {
|
|
|
13833
14677
|
},
|
|
13834
14678
|
className: "kts-invoice-operate-goods-list-itemName-drag",
|
|
13835
14679
|
onMouseOver: controller.saveEditGood
|
|
13836
|
-
}, /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
14680
|
+
}, /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
13837
14681
|
component: SvgI001
|
|
13838
14682
|
}));
|
|
13839
14683
|
}, [onMouseDown, controller]);
|
|
@@ -18035,6 +18879,7 @@ var formatCompanyName = function formatCompanyName(e) {
|
|
|
18035
18879
|
var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
18036
18880
|
var form = props.form,
|
|
18037
18881
|
isShowImportButton = props.isShowImportButton,
|
|
18882
|
+
allowEditFlag = props.allowEditFlag,
|
|
18038
18883
|
onClickImportButton = props.onClickImportButton,
|
|
18039
18884
|
_props$isVatNormal = props.isVatNormal,
|
|
18040
18885
|
isVatNormal = _props$isVatNormal === void 0 ? false : _props$isVatNormal;
|
|
@@ -18086,6 +18931,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18086
18931
|
var isReadOnly = React__default['default'].useCallback(function (field) {
|
|
18087
18932
|
return readOnly || disableds.indexOf(field) >= 0;
|
|
18088
18933
|
}, [disableds, readOnly]);
|
|
18934
|
+
var isReadOnly2 = React__default['default'].useCallback(function (field) {
|
|
18935
|
+
return model === 'readOnly' || model === 'prefab' && !allowEditFlag;
|
|
18936
|
+
}, [allowEditFlag, model]);
|
|
18089
18937
|
var getRules = React__default['default'].useCallback(function (field, defaultRules) {
|
|
18090
18938
|
if (isReadOnly(field)) return [];
|
|
18091
18939
|
return rulesMap[field] || defaultRules;
|
|
@@ -18101,7 +18949,10 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18101
18949
|
})
|
|
18102
18950
|
}, /*#__PURE__*/React__default['default'].createElement("div", null, '购买方信息'.split('').map(function (e) {
|
|
18103
18951
|
return /*#__PURE__*/React__default['default'].createElement("span", null, e);
|
|
18104
|
-
}),
|
|
18952
|
+
}),
|
|
18953
|
+
/*#__PURE__*/
|
|
18954
|
+
// !readOnly &&
|
|
18955
|
+
React__default['default'].createElement(Icon$1, {
|
|
18105
18956
|
className: "digtal-stakeholder-expand-button",
|
|
18106
18957
|
component: isExpand ? SvgArrowUp : SvgArrowDown,
|
|
18107
18958
|
onClick: onExpand
|
|
@@ -18138,7 +18989,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18138
18989
|
width: 20,
|
|
18139
18990
|
height: '100%'
|
|
18140
18991
|
},
|
|
18141
|
-
icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
18992
|
+
icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
18142
18993
|
component: SvgPlus
|
|
18143
18994
|
}),
|
|
18144
18995
|
onClick: function onClick() {
|
|
@@ -18204,7 +19055,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18204
19055
|
valuePropName: 'checked'
|
|
18205
19056
|
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
18206
19057
|
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
18207
|
-
disabled:
|
|
19058
|
+
disabled: isReadOnly2('buyerAddressPhoneFlag'),
|
|
18208
19059
|
style: {
|
|
18209
19060
|
whiteSpace: 'nowrap'
|
|
18210
19061
|
}
|
|
@@ -18247,13 +19098,16 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18247
19098
|
valuePropName: 'checked'
|
|
18248
19099
|
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
18249
19100
|
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
18250
|
-
disabled:
|
|
19101
|
+
disabled: isReadOnly2('buyerBankAccountFlag'),
|
|
18251
19102
|
style: {
|
|
18252
19103
|
whiteSpace: 'nowrap'
|
|
18253
19104
|
}
|
|
18254
19105
|
}, "\u662F\u5426\u5C55\u793A"))))))), /*#__PURE__*/React__default['default'].createElement("div", null, '销售方信息'.split('').map(function (e) {
|
|
18255
19106
|
return /*#__PURE__*/React__default['default'].createElement("span", null, e);
|
|
18256
|
-
}),
|
|
19107
|
+
}),
|
|
19108
|
+
/*#__PURE__*/
|
|
19109
|
+
// !readOnly &&
|
|
19110
|
+
React__default['default'].createElement(Icon$1, {
|
|
18257
19111
|
className: "digtal-stakeholder-expand-button",
|
|
18258
19112
|
component: isExpand ? SvgArrowUp : SvgArrowDown,
|
|
18259
19113
|
onClick: onExpand
|
|
@@ -18342,7 +19196,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18342
19196
|
valuePropName: 'checked'
|
|
18343
19197
|
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
18344
19198
|
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
18345
|
-
disabled:
|
|
19199
|
+
disabled: isReadOnly2('sellerAddressPhoneFlag'),
|
|
18346
19200
|
style: {
|
|
18347
19201
|
whiteSpace: 'nowrap'
|
|
18348
19202
|
}
|
|
@@ -18385,7 +19239,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18385
19239
|
valuePropName: 'checked'
|
|
18386
19240
|
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
18387
19241
|
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
18388
|
-
disabled:
|
|
19242
|
+
disabled: isReadOnly2('sellerBankAccountFlag'),
|
|
18389
19243
|
style: {
|
|
18390
19244
|
whiteSpace: 'nowrap'
|
|
18391
19245
|
}
|
|
@@ -19053,7 +19907,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
19053
19907
|
})
|
|
19054
19908
|
}, /*#__PURE__*/React__default['default'].createElement("div", null, '销售方信息'.split('').map(function (e) {
|
|
19055
19909
|
return /*#__PURE__*/React__default['default'].createElement("span", null, e);
|
|
19056
|
-
}), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
19910
|
+
}), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
19057
19911
|
className: "digtal-stakeholder-expand-button",
|
|
19058
19912
|
component: isExpand ? SvgArrowUp$1 : SvgArrowDown$1,
|
|
19059
19913
|
onClick: onExpand
|
|
@@ -19091,7 +19945,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
19091
19945
|
width: 20,
|
|
19092
19946
|
height: '100%'
|
|
19093
19947
|
},
|
|
19094
|
-
icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
19948
|
+
icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
19095
19949
|
component: SvgPlus$1
|
|
19096
19950
|
}),
|
|
19097
19951
|
onClick: function onClick() {
|
|
@@ -19207,7 +20061,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
19207
20061
|
}
|
|
19208
20062
|
}, "\u662F\u5426\u5C55\u793A"))))))), /*#__PURE__*/React__default['default'].createElement("div", null, '购买方信息'.split('').map(function (e) {
|
|
19209
20063
|
return /*#__PURE__*/React__default['default'].createElement("span", null, e);
|
|
19210
|
-
}), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
20064
|
+
}), !readOnly && /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
19211
20065
|
className: "digtal-stakeholder-expand-button",
|
|
19212
20066
|
component: isExpand ? SvgArrowUp$1 : SvgArrowDown$1,
|
|
19213
20067
|
onClick: onExpand
|
|
@@ -19247,7 +20101,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
19247
20101
|
width: 20,
|
|
19248
20102
|
height: '100%'
|
|
19249
20103
|
},
|
|
19250
|
-
icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
20104
|
+
icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
19251
20105
|
component: SvgPlus$1
|
|
19252
20106
|
}),
|
|
19253
20107
|
onClick: function onClick() {
|
|
@@ -20879,7 +21733,7 @@ var Statistics$1 = (function () {
|
|
|
20879
21733
|
style: {
|
|
20880
21734
|
paddingLeft: 30
|
|
20881
21735
|
}
|
|
20882
|
-
}, /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
21736
|
+
}, /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
20883
21737
|
style: {
|
|
20884
21738
|
fontSize: 16
|
|
20885
21739
|
},
|
|
@@ -23265,7 +24119,7 @@ function Drag$2(props) {
|
|
|
23265
24119
|
},
|
|
23266
24120
|
className: "kts-invoice-operate-goods-list-itemName-drag",
|
|
23267
24121
|
onMouseOver: controller.saveEditGood
|
|
23268
|
-
}, /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
24122
|
+
}, /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
23269
24123
|
component: SvgI001$1
|
|
23270
24124
|
}));
|
|
23271
24125
|
}, [onMouseDown, controller]);
|
|
@@ -27249,7 +28103,7 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
|
|
|
27249
28103
|
width: "auto"
|
|
27250
28104
|
},
|
|
27251
28105
|
type: "link",
|
|
27252
|
-
icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
28106
|
+
icon: /*#__PURE__*/React__default['default'].createElement(Icon$1, {
|
|
27253
28107
|
component: SvgPlus$3
|
|
27254
28108
|
}),
|
|
27255
28109
|
disabled: readOnly || crossCitiesSign !== 'Y',
|
|
@@ -30535,6 +31389,292 @@ var getItemCode = function getItemCode(record, editGood) {
|
|
|
30535
31389
|
return record.productCode;
|
|
30536
31390
|
};
|
|
30537
31391
|
|
|
31392
|
+
var Dragger = ktsComponentsAntdX4.Upload.Dragger;
|
|
31393
|
+
var Text$8 = ktsComponentsAntdX4.Typography.Text;
|
|
31394
|
+
var ImportPassengerDrawer = (function () {
|
|
31395
|
+
var controller = Invoice.useInvoiceController();
|
|
31396
|
+
var visible = controller.useMemo(function (s) {
|
|
31397
|
+
return s.passengerListState.isVisibleDrawer;
|
|
31398
|
+
}, []);
|
|
31399
|
+
var dataSource = controller.useMemo(function (s) {
|
|
31400
|
+
return s.passengerListState.dataSource;
|
|
31401
|
+
}, []);
|
|
31402
|
+
var onClose = React__default['default'].useCallback(function () {
|
|
31403
|
+
controller.pipeline( /*#__PURE__*/function () {
|
|
31404
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
31405
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
31406
|
+
while (1) {
|
|
31407
|
+
switch (_context.prev = _context.next) {
|
|
31408
|
+
case 0:
|
|
31409
|
+
s.passengerListState.isVisibleDrawer = false;
|
|
31410
|
+
|
|
31411
|
+
case 1:
|
|
31412
|
+
case "end":
|
|
31413
|
+
return _context.stop();
|
|
31414
|
+
}
|
|
31415
|
+
}
|
|
31416
|
+
}, _callee);
|
|
31417
|
+
}));
|
|
31418
|
+
|
|
31419
|
+
return function (_x) {
|
|
31420
|
+
return _ref.apply(this, arguments);
|
|
31421
|
+
};
|
|
31422
|
+
}())();
|
|
31423
|
+
}, [controller]);
|
|
31424
|
+
var onConfirm = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
31425
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
31426
|
+
while (1) {
|
|
31427
|
+
switch (_context3.prev = _context3.next) {
|
|
31428
|
+
case 0:
|
|
31429
|
+
if (!dataSource.length) {
|
|
31430
|
+
_context3.next = 5;
|
|
31431
|
+
break;
|
|
31432
|
+
}
|
|
31433
|
+
|
|
31434
|
+
_context3.next = 3;
|
|
31435
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
31436
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
31437
|
+
var data;
|
|
31438
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
31439
|
+
while (1) {
|
|
31440
|
+
switch (_context2.prev = _context2.next) {
|
|
31441
|
+
case 0:
|
|
31442
|
+
data = dataSource.map(function (item) {
|
|
31443
|
+
return _objectSpread2({
|
|
31444
|
+
$index: idGenerator()
|
|
31445
|
+
}, item);
|
|
31446
|
+
});
|
|
31447
|
+
s.passengerListState.goodsList = [].concat(_toConsumableArray(s.passengerListState.goodsList), _toConsumableArray(data));
|
|
31448
|
+
s.passengerListState.dataSource = [];
|
|
31449
|
+
|
|
31450
|
+
case 3:
|
|
31451
|
+
case "end":
|
|
31452
|
+
return _context2.stop();
|
|
31453
|
+
}
|
|
31454
|
+
}
|
|
31455
|
+
}, _callee2);
|
|
31456
|
+
}));
|
|
31457
|
+
|
|
31458
|
+
return function (_x2) {
|
|
31459
|
+
return _ref3.apply(this, arguments);
|
|
31460
|
+
};
|
|
31461
|
+
}())();
|
|
31462
|
+
|
|
31463
|
+
case 3:
|
|
31464
|
+
_context3.next = 5;
|
|
31465
|
+
return controller.wait();
|
|
31466
|
+
|
|
31467
|
+
case 5:
|
|
31468
|
+
onClose();
|
|
31469
|
+
|
|
31470
|
+
case 6:
|
|
31471
|
+
case "end":
|
|
31472
|
+
return _context3.stop();
|
|
31473
|
+
}
|
|
31474
|
+
}
|
|
31475
|
+
}, _callee3);
|
|
31476
|
+
})), [controller, dataSource]);
|
|
31477
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Drawer, {
|
|
31478
|
+
title: "\u6279\u91CF\u5BFC\u5165",
|
|
31479
|
+
placement: "right",
|
|
31480
|
+
// closable={false}
|
|
31481
|
+
destroyOnClose: true,
|
|
31482
|
+
width: 983,
|
|
31483
|
+
onClose: onClose,
|
|
31484
|
+
visible: visible,
|
|
31485
|
+
// 使用 footer 属性放置底部按钮
|
|
31486
|
+
footer: /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31487
|
+
style: {
|
|
31488
|
+
textAlign: 'right'
|
|
31489
|
+
}
|
|
31490
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Space, null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
31491
|
+
onClick: function onClick() {
|
|
31492
|
+
return onClose();
|
|
31493
|
+
}
|
|
31494
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
31495
|
+
type: "primary",
|
|
31496
|
+
onClick: onConfirm
|
|
31497
|
+
}, "\u786E\u5B9A")))
|
|
31498
|
+
}, /*#__PURE__*/React__default['default'].createElement(DrawerBody$3, null));
|
|
31499
|
+
});
|
|
31500
|
+
|
|
31501
|
+
var DrawerBody$3 = function DrawerBody() {
|
|
31502
|
+
var controller = Invoice.useInvoiceController();
|
|
31503
|
+
|
|
31504
|
+
var _React$useState = React__default['default'].useState(''),
|
|
31505
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
31506
|
+
fileName = _React$useState2[0],
|
|
31507
|
+
setFileName = _React$useState2[1];
|
|
31508
|
+
|
|
31509
|
+
var _React$useState3 = React__default['default'].useState('idle'),
|
|
31510
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
31511
|
+
status = _React$useState4[0],
|
|
31512
|
+
setStatus = _React$useState4[1];
|
|
31513
|
+
|
|
31514
|
+
var _React$useState5 = React__default['default'].useState(0),
|
|
31515
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
31516
|
+
percent = _React$useState6[0],
|
|
31517
|
+
setPercent = _React$useState6[1];
|
|
31518
|
+
|
|
31519
|
+
var _React$useState7 = React__default['default'].useState([]),
|
|
31520
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
31521
|
+
fileData = _React$useState8[0],
|
|
31522
|
+
setFileData = _React$useState8[1];
|
|
31523
|
+
|
|
31524
|
+
var _React$useState9 = React__default['default'].useState(false),
|
|
31525
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
31526
|
+
success = _React$useState10[0],
|
|
31527
|
+
setSuccess = _React$useState10[1];
|
|
31528
|
+
|
|
31529
|
+
var columns = controller.useMemo(function (s) {
|
|
31530
|
+
return s.passengerListState.columns;
|
|
31531
|
+
}, []);
|
|
31532
|
+
var dataSource = controller.useMemo(function (s) {
|
|
31533
|
+
return s.passengerListState.dataSource;
|
|
31534
|
+
}, []);
|
|
31535
|
+
var pagination = controller.useMemo(function (s) {
|
|
31536
|
+
return s.passengerListState.pagination;
|
|
31537
|
+
}, []);
|
|
31538
|
+
var handleDownloadTemplate = React__default['default'].useCallback(function () {
|
|
31539
|
+
if (controller.downloadPassengerTpt) {
|
|
31540
|
+
controller.downloadPassengerTpt();
|
|
31541
|
+
}
|
|
31542
|
+
}, [controller]); // 1. 前置校验:限制文件类型为 .xls, .xlsx
|
|
31543
|
+
|
|
31544
|
+
var beforeUpload = React__default['default'].useCallback(function (file) {
|
|
31545
|
+
var isExcel = file.type === 'application/vnd.ms-excel' || file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || /\.(xls|xlsx)$/.test(file.name); // 兜底判断文件名后缀
|
|
31546
|
+
|
|
31547
|
+
if (!isExcel) {
|
|
31548
|
+
ktsComponentsAntdX4.message.error('只能上传 .xls 或 .xlsx 格式的Excel文件!');
|
|
31549
|
+
return ktsComponentsAntdX4.Upload.LIST_IGNORE; // 阻止上传
|
|
31550
|
+
}
|
|
31551
|
+
|
|
31552
|
+
setFileName(file.name);
|
|
31553
|
+
setStatus('uploading');
|
|
31554
|
+
setPercent(0);
|
|
31555
|
+
return true;
|
|
31556
|
+
}, []); // 2. 正确类型定义的 customRequest
|
|
31557
|
+
// 直接使用 UploadProps['customRequest'] 可以完美推导出 options 内所有的类型!
|
|
31558
|
+
|
|
31559
|
+
var customRequest = /*#__PURE__*/function () {
|
|
31560
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(options) {
|
|
31561
|
+
var file, onSuccess, onError, onProgress, res;
|
|
31562
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
31563
|
+
while (1) {
|
|
31564
|
+
switch (_context4.prev = _context4.next) {
|
|
31565
|
+
case 0:
|
|
31566
|
+
file = options.file, onSuccess = options.onSuccess, onError = options.onError, onProgress = options.onProgress;
|
|
31567
|
+
|
|
31568
|
+
if (!controller.uploadPassenger) {
|
|
31569
|
+
_context4.next = 6;
|
|
31570
|
+
break;
|
|
31571
|
+
}
|
|
31572
|
+
|
|
31573
|
+
_context4.next = 4;
|
|
31574
|
+
return controller.uploadPassenger(file);
|
|
31575
|
+
|
|
31576
|
+
case 4:
|
|
31577
|
+
res = _context4.sent;
|
|
31578
|
+
|
|
31579
|
+
if (res) {
|
|
31580
|
+
setStatus('done');
|
|
31581
|
+
setPercent(100);
|
|
31582
|
+
}
|
|
31583
|
+
|
|
31584
|
+
case 6:
|
|
31585
|
+
case "end":
|
|
31586
|
+
return _context4.stop();
|
|
31587
|
+
}
|
|
31588
|
+
}
|
|
31589
|
+
}, _callee4);
|
|
31590
|
+
}));
|
|
31591
|
+
|
|
31592
|
+
return function customRequest(_x3) {
|
|
31593
|
+
return _ref4.apply(this, arguments);
|
|
31594
|
+
};
|
|
31595
|
+
}(); // 3. 处理文件选择状态(更新左侧 Input 显示的文件名)
|
|
31596
|
+
|
|
31597
|
+
React__default['default'].useEffect(function () {
|
|
31598
|
+
controller.getBuyerList && controller.getBuyerList({
|
|
31599
|
+
pagination: {
|
|
31600
|
+
current: 1
|
|
31601
|
+
}
|
|
31602
|
+
});
|
|
31603
|
+
}, [controller]);
|
|
31604
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Alert, {
|
|
31605
|
+
type: "info",
|
|
31606
|
+
showIcon: true,
|
|
31607
|
+
message: /*#__PURE__*/React__default['default'].createElement("span", null, "\u8BF7\u5148\u4E0B\u8F7D\u6A21\u677F", /*#__PURE__*/React__default['default'].createElement("a", {
|
|
31608
|
+
href: "#",
|
|
31609
|
+
style: {
|
|
31610
|
+
margin: '0 4px'
|
|
31611
|
+
},
|
|
31612
|
+
onClick: handleDownloadTemplate
|
|
31613
|
+
}, "\u300A\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1\u7279\u5B9A\u4FE1\u606F-\u6279\u91CF\u5BFC\u5165\u6A21\u677F\u300B"), "\uFF0C\u6309\u7167\u6A21\u677F\u586B\u5199\u540E\u4E0A\u4F20\u3002")
|
|
31614
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31615
|
+
style: {
|
|
31616
|
+
display: 'flex',
|
|
31617
|
+
alignItems: 'center',
|
|
31618
|
+
gap: 8,
|
|
31619
|
+
marginBottom: 20,
|
|
31620
|
+
marginTop: 20
|
|
31621
|
+
}
|
|
31622
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
31623
|
+
placeholder: "\u9009\u62E9\u6587\u4EF6",
|
|
31624
|
+
value: fileName,
|
|
31625
|
+
readOnly: true,
|
|
31626
|
+
style: {
|
|
31627
|
+
width: 400,
|
|
31628
|
+
height: 32
|
|
31629
|
+
},
|
|
31630
|
+
suffix: status === 'uploading' ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31631
|
+
style: {
|
|
31632
|
+
display: 'flex',
|
|
31633
|
+
alignItems: 'center',
|
|
31634
|
+
gap: 4
|
|
31635
|
+
}
|
|
31636
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31637
|
+
style: {
|
|
31638
|
+
fontSize: 12,
|
|
31639
|
+
color: '#1890ff'
|
|
31640
|
+
}
|
|
31641
|
+
}, percent, "%")) : status === 'done' ? /*#__PURE__*/React__default['default'].createElement(CheckCircleFilled$2, {
|
|
31642
|
+
style: {
|
|
31643
|
+
color: '#52c41a',
|
|
31644
|
+
fontSize: 16
|
|
31645
|
+
}
|
|
31646
|
+
}) : null
|
|
31647
|
+
}), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Upload, {
|
|
31648
|
+
accept: ".xls,.xlsx",
|
|
31649
|
+
showUploadList: false,
|
|
31650
|
+
beforeUpload: beforeUpload,
|
|
31651
|
+
customRequest: customRequest
|
|
31652
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
31653
|
+
style: status === 'uploading' ? {
|
|
31654
|
+
color: '#1890ff',
|
|
31655
|
+
borderColor: '#1890ff'
|
|
31656
|
+
} : undefined
|
|
31657
|
+
}, fileName ? '重新选择' : "选择文件"))), success && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31658
|
+
style: {
|
|
31659
|
+
marginBottom: 20,
|
|
31660
|
+
marginTop: 20
|
|
31661
|
+
}
|
|
31662
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Alert, {
|
|
31663
|
+
type: "success",
|
|
31664
|
+
showIcon: true,
|
|
31665
|
+
message: /*#__PURE__*/React__default['default'].createElement("span", null, "\u6587\u4EF6\u5BFC\u5165\u6210\u529F\uFF0C\u5904\u7406\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1\u7279\u5B9A\u4FE1\u606F\u8BB0\u5F55", dataSource.length, "\u6761\uFF0C\u5904\u7406\u6210\u529F", dataSource.length, "\u6761\u3002")
|
|
31666
|
+
})), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Table, {
|
|
31667
|
+
bordered: true,
|
|
31668
|
+
size: "small",
|
|
31669
|
+
columns: columns,
|
|
31670
|
+
dataSource: dataSource,
|
|
31671
|
+
locale: {
|
|
31672
|
+
emptyText: '暂无数据'
|
|
31673
|
+
},
|
|
31674
|
+
pagination: false
|
|
31675
|
+
}));
|
|
31676
|
+
};
|
|
31677
|
+
|
|
30538
31678
|
var css_248z$A = ".kts-invoice-operate-goods-endow-code-button-list {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-endow-code-button-list > button {\n margin-bottom: 10px;\n}\n";
|
|
30539
31679
|
styleInject(css_248z$A);
|
|
30540
31680
|
|
|
@@ -30675,12 +31815,12 @@ var EndowCodeDrawer = (function () {
|
|
|
30675
31815
|
width: 383,
|
|
30676
31816
|
onClose: onClose,
|
|
30677
31817
|
visible: visible
|
|
30678
|
-
}, defaultValue && /*#__PURE__*/React__default['default'].createElement(DrawerBody$
|
|
31818
|
+
}, defaultValue && /*#__PURE__*/React__default['default'].createElement(DrawerBody$4, {
|
|
30679
31819
|
defaultValue: defaultValue
|
|
30680
31820
|
}));
|
|
30681
31821
|
});
|
|
30682
31822
|
|
|
30683
|
-
var DrawerBody$
|
|
31823
|
+
var DrawerBody$4 = function DrawerBody(props) {
|
|
30684
31824
|
var _defaultValue$taxRate, _defaultValue$favoure;
|
|
30685
31825
|
|
|
30686
31826
|
var controller = Invoice.useInvoiceController();
|
|
@@ -31977,6 +33117,2321 @@ var MeiTanModal = (function () {
|
|
|
31977
33117
|
}, "\u5E02\u573A\u7164"))))))));
|
|
31978
33118
|
});
|
|
31979
33119
|
|
|
33120
|
+
var css_248z$C = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {\n height: 280px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-header > table > thead > tr > th {\n padding: 0 10px;\n height: 32px;\n background: #f4f4f4;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-body > table > tbody > tr > td {\n padding: 0;\n height: 32px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body > table {\n position: absolute;\n left: 0;\n top: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-inner {\n width: 16px;\n height: 16px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n top: 1px;\n}\n";
|
|
33121
|
+
styleInject(css_248z$C);
|
|
33122
|
+
|
|
33123
|
+
function TableVirtual$4 (props) {
|
|
33124
|
+
var _props$dataSource2;
|
|
33125
|
+
|
|
33126
|
+
var _React$useState = React__default['default'].useState(null),
|
|
33127
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33128
|
+
self = _React$useState2[0],
|
|
33129
|
+
setSelf = _React$useState2[1];
|
|
33130
|
+
|
|
33131
|
+
var tableBody = React__default['default'].useMemo(function () {
|
|
33132
|
+
if (!self) return;
|
|
33133
|
+
return self.querySelector('.ktsAntX-table-body');
|
|
33134
|
+
}, [self]);
|
|
33135
|
+
/** 显示指针 */
|
|
33136
|
+
|
|
33137
|
+
var _React$useState3 = React__default['default'].useState(0),
|
|
33138
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
33139
|
+
pointer = _React$useState4[0],
|
|
33140
|
+
setPointer = _React$useState4[1];
|
|
33141
|
+
/** 行高 */
|
|
33142
|
+
|
|
33143
|
+
|
|
33144
|
+
var rowHeight = React__default['default'].useMemo(function () {
|
|
33145
|
+
if (!self) return 50;
|
|
33146
|
+
var td = self.querySelector('.ktsAntX-table-tbody .ktsAntX-table-row');
|
|
33147
|
+
if (!td) return 50;
|
|
33148
|
+
return td.clientHeight;
|
|
33149
|
+
}, [self, props.dataSource]);
|
|
33150
|
+
/** 间隔容器 */
|
|
33151
|
+
|
|
33152
|
+
var placeholder = React__default['default'].useMemo(function () {
|
|
33153
|
+
if (!self || !tableBody) return;
|
|
33154
|
+
var placeholder = tableBody.querySelector('.table-virtual-placeholder');
|
|
33155
|
+
|
|
33156
|
+
if (!placeholder) {
|
|
33157
|
+
placeholder = document.createElement('div');
|
|
33158
|
+
placeholder.className = 'table-virtual-placeholder';
|
|
33159
|
+
tableBody.appendChild(placeholder);
|
|
33160
|
+
}
|
|
33161
|
+
|
|
33162
|
+
return placeholder;
|
|
33163
|
+
}, [self, tableBody]); // 设置占位dom的搞
|
|
33164
|
+
|
|
33165
|
+
var placeholderHeight = React__default['default'].useMemo(function () {
|
|
33166
|
+
if (!self || !rowHeight || !props.dataSource || !placeholder) return;
|
|
33167
|
+
var placeholderHeight = rowHeight * props.dataSource.length;
|
|
33168
|
+
placeholder.style.height = "".concat(placeholderHeight, "px");
|
|
33169
|
+
return placeholderHeight;
|
|
33170
|
+
}, [self, rowHeight, props.dataSource, placeholder]);
|
|
33171
|
+
/** 可以容纳的行数 */
|
|
33172
|
+
|
|
33173
|
+
var rowSize = React__default['default'].useMemo(function () {
|
|
33174
|
+
if (!tableBody || !rowHeight) return 0;
|
|
33175
|
+
return Math.ceil(tableBody.clientHeight / rowHeight);
|
|
33176
|
+
}, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
|
|
33177
|
+
|
|
33178
|
+
var dataSource = React__default['default'].useMemo(function () {
|
|
33179
|
+
var _props$dataSource;
|
|
33180
|
+
|
|
33181
|
+
if (!props.dataSource) return [];
|
|
33182
|
+
if (props.dataSource.length < 10) return props.dataSource;
|
|
33183
|
+
if (!rowSize) return [props.dataSource[0]];
|
|
33184
|
+
return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
|
|
33185
|
+
}, [props.dataSource, pointer, rowSize]); // 监听滚动
|
|
33186
|
+
|
|
33187
|
+
React__default['default'].useEffect(function () {
|
|
33188
|
+
if (!self || !placeholder || !props.dataSource || !rowHeight || !tableBody || props.dataSource.length < 10) return;
|
|
33189
|
+
|
|
33190
|
+
var onScroll = function onScroll() {
|
|
33191
|
+
if (!props.dataSource || !tableBody) return;
|
|
33192
|
+
setPointer(Math.floor((props.dataSource.length - rowSize) * (tableBody.scrollTop / (placeholder.clientHeight - tableBody.clientHeight))));
|
|
33193
|
+
};
|
|
33194
|
+
|
|
33195
|
+
onScroll();
|
|
33196
|
+
tableBody.addEventListener('scroll', onScroll);
|
|
33197
|
+
return function () {
|
|
33198
|
+
tableBody.removeEventListener('scroll', onScroll);
|
|
33199
|
+
};
|
|
33200
|
+
}, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
|
|
33201
|
+
|
|
33202
|
+
React__default['default'].useEffect(function () {
|
|
33203
|
+
if (!self) return;
|
|
33204
|
+
var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
|
|
33205
|
+
if (!table) return;
|
|
33206
|
+
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
33207
|
+
}, [pointer, self, rowHeight]);
|
|
33208
|
+
React__default['default'].useEffect(function () {
|
|
33209
|
+
if (!self) return;
|
|
33210
|
+
var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
|
|
33211
|
+
if (!cont) return;
|
|
33212
|
+
cont.scrollTop = 0;
|
|
33213
|
+
}, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
|
|
33214
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
33215
|
+
className: "kts-invoice-operate-goods-table-virtual",
|
|
33216
|
+
ref: function ref(e) {
|
|
33217
|
+
setSelf(e);
|
|
33218
|
+
}
|
|
33219
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.TableManual, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
33220
|
+
dataSource: dataSource,
|
|
33221
|
+
// 新版本Table会有输入框无法连续输入的问题,先兼容老版本
|
|
33222
|
+
tableComponent: ktsComponentsAntdX4V4.Table
|
|
33223
|
+
})));
|
|
33224
|
+
}
|
|
33225
|
+
|
|
33226
|
+
var AddRowButton$4 = (function () {
|
|
33227
|
+
var controller = Invoice.useInvoiceController();
|
|
33228
|
+
var model = controller.useMemo(function (s) {
|
|
33229
|
+
return s.model;
|
|
33230
|
+
}, []);
|
|
33231
|
+
var rootElement = controller.useMemo(function (s) {
|
|
33232
|
+
return s.rootElement;
|
|
33233
|
+
}, []);
|
|
33234
|
+
/** 产品数据量 */
|
|
33235
|
+
|
|
33236
|
+
var goodsNum = controller.useMemo(function (s) {
|
|
33237
|
+
return s.passengerListState.goodsList.length;
|
|
33238
|
+
}, []);
|
|
33239
|
+
/** 搜索条件 */
|
|
33240
|
+
|
|
33241
|
+
var isAddRow = controller.useMemo(function (s) {
|
|
33242
|
+
return s.passengerListState.isAddRow;
|
|
33243
|
+
}, []);
|
|
33244
|
+
/** 产品最大数 */
|
|
33245
|
+
|
|
33246
|
+
var goodMax = controller.useMemo(function (s) {
|
|
33247
|
+
return s.passengerListState.goodMax;
|
|
33248
|
+
}, []);
|
|
33249
|
+
/** 按钮是否禁用 */
|
|
33250
|
+
|
|
33251
|
+
var disabled = React__default['default'].useMemo(function () {
|
|
33252
|
+
return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
|
|
33253
|
+
}, [goodMax, goodsNum]);
|
|
33254
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
33255
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33256
|
+
while (1) {
|
|
33257
|
+
switch (_context.prev = _context.next) {
|
|
33258
|
+
case 0:
|
|
33259
|
+
_context.next = 2;
|
|
33260
|
+
return addGood$5(controller);
|
|
33261
|
+
|
|
33262
|
+
case 2:
|
|
33263
|
+
_context.next = 4;
|
|
33264
|
+
return rollBottom$4(controller, rootElement);
|
|
33265
|
+
|
|
33266
|
+
case 4:
|
|
33267
|
+
case "end":
|
|
33268
|
+
return _context.stop();
|
|
33269
|
+
}
|
|
33270
|
+
}
|
|
33271
|
+
}, _callee);
|
|
33272
|
+
})), [controller, rootElement]);
|
|
33273
|
+
if (isAddRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
33274
|
+
if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
33275
|
+
if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
33276
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
33277
|
+
size: 'small',
|
|
33278
|
+
type: 'primary',
|
|
33279
|
+
onClick: onClick,
|
|
33280
|
+
disabled: disabled
|
|
33281
|
+
}, "\u589E\u884C");
|
|
33282
|
+
});
|
|
33283
|
+
/** 添加一个空货物 */
|
|
33284
|
+
|
|
33285
|
+
function addGood$5(_x) {
|
|
33286
|
+
return _addGood$4.apply(this, arguments);
|
|
33287
|
+
}
|
|
33288
|
+
/** 货物列表,滚动到底部 */
|
|
33289
|
+
|
|
33290
|
+
|
|
33291
|
+
function _addGood$4() {
|
|
33292
|
+
_addGood$4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
|
|
33293
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
33294
|
+
while (1) {
|
|
33295
|
+
switch (_context4.prev = _context4.next) {
|
|
33296
|
+
case 0:
|
|
33297
|
+
_context4.next = 2;
|
|
33298
|
+
return controller.saveEditPassenger();
|
|
33299
|
+
|
|
33300
|
+
case 2:
|
|
33301
|
+
_context4.next = 4;
|
|
33302
|
+
return controller.wait();
|
|
33303
|
+
|
|
33304
|
+
case 4:
|
|
33305
|
+
_context4.next = 6;
|
|
33306
|
+
return controller.run( /*#__PURE__*/function () {
|
|
33307
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
33308
|
+
var _controller$state$pas;
|
|
33309
|
+
|
|
33310
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
33311
|
+
while (1) {
|
|
33312
|
+
switch (_context3.prev = _context3.next) {
|
|
33313
|
+
case 0:
|
|
33314
|
+
if (!s.passengerListState.editGood) {
|
|
33315
|
+
_context3.next = 3;
|
|
33316
|
+
break;
|
|
33317
|
+
}
|
|
33318
|
+
|
|
33319
|
+
_context3.next = 3;
|
|
33320
|
+
return (_controller$state$pas = controller.state.passengerListState.form) === null || _controller$state$pas === void 0 ? void 0 : _controller$state$pas.validateFields( /*#__PURE__*/function () {
|
|
33321
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
33322
|
+
var firstError;
|
|
33323
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
33324
|
+
while (1) {
|
|
33325
|
+
switch (_context2.prev = _context2.next) {
|
|
33326
|
+
case 0:
|
|
33327
|
+
if (!err) {
|
|
33328
|
+
_context2.next = 4;
|
|
33329
|
+
break;
|
|
33330
|
+
}
|
|
33331
|
+
|
|
33332
|
+
firstError = Object.values(err)[0];
|
|
33333
|
+
ktsXui.message.error({
|
|
33334
|
+
content: firstError.errors[0].message,
|
|
33335
|
+
key: '你正在编辑一条数据'
|
|
33336
|
+
});
|
|
33337
|
+
return _context2.abrupt("return");
|
|
33338
|
+
|
|
33339
|
+
case 4:
|
|
33340
|
+
case "end":
|
|
33341
|
+
return _context2.stop();
|
|
33342
|
+
}
|
|
33343
|
+
}
|
|
33344
|
+
}, _callee2);
|
|
33345
|
+
}));
|
|
33346
|
+
|
|
33347
|
+
return function (_x5, _x6) {
|
|
33348
|
+
return _ref3.apply(this, arguments);
|
|
33349
|
+
};
|
|
33350
|
+
}());
|
|
33351
|
+
|
|
33352
|
+
case 3:
|
|
33353
|
+
_context3.next = 5;
|
|
33354
|
+
return controller.addPassenger({});
|
|
33355
|
+
|
|
33356
|
+
case 5:
|
|
33357
|
+
s.passengerListState.editGood = _context3.sent;
|
|
33358
|
+
|
|
33359
|
+
case 6:
|
|
33360
|
+
case "end":
|
|
33361
|
+
return _context3.stop();
|
|
33362
|
+
}
|
|
33363
|
+
}
|
|
33364
|
+
}, _callee3);
|
|
33365
|
+
}));
|
|
33366
|
+
|
|
33367
|
+
return function (_x4) {
|
|
33368
|
+
return _ref2.apply(this, arguments);
|
|
33369
|
+
};
|
|
33370
|
+
}());
|
|
33371
|
+
|
|
33372
|
+
case 6:
|
|
33373
|
+
case "end":
|
|
33374
|
+
return _context4.stop();
|
|
33375
|
+
}
|
|
33376
|
+
}
|
|
33377
|
+
}, _callee4);
|
|
33378
|
+
}));
|
|
33379
|
+
return _addGood$4.apply(this, arguments);
|
|
33380
|
+
}
|
|
33381
|
+
|
|
33382
|
+
function rollBottom$4(_x2, _x3) {
|
|
33383
|
+
return _rollBottom$4.apply(this, arguments);
|
|
33384
|
+
}
|
|
33385
|
+
|
|
33386
|
+
function _rollBottom$4() {
|
|
33387
|
+
_rollBottom$4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
|
|
33388
|
+
var cont;
|
|
33389
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
33390
|
+
while (1) {
|
|
33391
|
+
switch (_context5.prev = _context5.next) {
|
|
33392
|
+
case 0:
|
|
33393
|
+
_context5.next = 2;
|
|
33394
|
+
return controller.wait();
|
|
33395
|
+
|
|
33396
|
+
case 2:
|
|
33397
|
+
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
33398
|
+
|
|
33399
|
+
if (cont) {
|
|
33400
|
+
_context5.next = 5;
|
|
33401
|
+
break;
|
|
33402
|
+
}
|
|
33403
|
+
|
|
33404
|
+
return _context5.abrupt("return");
|
|
33405
|
+
|
|
33406
|
+
case 5:
|
|
33407
|
+
cont.scrollTop = cont.scrollHeight;
|
|
33408
|
+
|
|
33409
|
+
case 6:
|
|
33410
|
+
case "end":
|
|
33411
|
+
return _context5.stop();
|
|
33412
|
+
}
|
|
33413
|
+
}
|
|
33414
|
+
}, _callee5);
|
|
33415
|
+
}));
|
|
33416
|
+
return _rollBottom$4.apply(this, arguments);
|
|
33417
|
+
}
|
|
33418
|
+
|
|
33419
|
+
var css_248z$D = ".kts-invoice-operate-goods-list-itemName-drag-container-u {\n position: relative;\n}\n.kts-invoice-operate-goods-list-itemName-drag-container-u::after {\n content: \" \";\n width: 100%;\n height: 2px;\n background: #0074ff;\n position: absolute;\n left: 0;\n top: 0;\n z-index: 9999;\n}\n.kts-invoice-operate-goods-list-itemName-drag-container-d {\n position: relative;\n}\n.kts-invoice-operate-goods-list-itemName-drag-container-d::after {\n content: \" \";\n width: 100%;\n height: 2px;\n background: #0074ff;\n position: absolute;\n left: 0;\n bottom: 0;\n z-index: 9999;\n}\n";
|
|
33420
|
+
styleInject(css_248z$D);
|
|
33421
|
+
|
|
33422
|
+
function TableRow$4(props) {
|
|
33423
|
+
var rowKey = props['data-row-key'];
|
|
33424
|
+
return /*#__PURE__*/React__default['default'].createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
33425
|
+
className: classnames__default['default'](props.className)
|
|
33426
|
+
}));
|
|
33427
|
+
}
|
|
33428
|
+
|
|
33429
|
+
var Text$9 = ktsComponentsAntdX3.Typography.Text;
|
|
33430
|
+
var TitleText$4 = (function (props) {
|
|
33431
|
+
var rules = props.rules,
|
|
33432
|
+
children = props.children;
|
|
33433
|
+
var required = React__default['default'].useMemo(function () {
|
|
33434
|
+
return (rules === null || rules === void 0 ? void 0 : rules.some(function (e) {
|
|
33435
|
+
return !!e.required;
|
|
33436
|
+
})) || props.required;
|
|
33437
|
+
}, [rules, props.required]);
|
|
33438
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, required ? /*#__PURE__*/React__default['default'].createElement(Text$9, {
|
|
33439
|
+
type: "danger"
|
|
33440
|
+
}, "*") : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null), children);
|
|
33441
|
+
});
|
|
33442
|
+
|
|
33443
|
+
var _excluded$3 = ["options", "fieldNames", "placeholder", "onChange", "value", "className", "style", "onBlur"];
|
|
33444
|
+
var DROPDOWN_CLASS = 'custom-cascader-dropdown';
|
|
33445
|
+
var ARROW_CLASS = 'custom-cascader-arrow';
|
|
33446
|
+
var CLEAR_CLASS = 'custom-cascader-clear';
|
|
33447
|
+
var CustomCascader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
33448
|
+
var _ref$options = _ref.options,
|
|
33449
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
33450
|
+
_ref$fieldNames = _ref.fieldNames,
|
|
33451
|
+
fieldNames = _ref$fieldNames === void 0 ? {
|
|
33452
|
+
label: 'label',
|
|
33453
|
+
value: 'value',
|
|
33454
|
+
children: 'children'
|
|
33455
|
+
} : _ref$fieldNames,
|
|
33456
|
+
_ref$placeholder = _ref.placeholder,
|
|
33457
|
+
placeholder = _ref$placeholder === void 0 ? '请选择或输入地址' : _ref$placeholder,
|
|
33458
|
+
onChange = _ref.onChange,
|
|
33459
|
+
externalValue = _ref.value,
|
|
33460
|
+
_ref$className = _ref.className,
|
|
33461
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
33462
|
+
_ref$style = _ref.style,
|
|
33463
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
33464
|
+
onBlurProp = _ref.onBlur,
|
|
33465
|
+
restProps = _objectWithoutProperties(_ref, _excluded$3);
|
|
33466
|
+
|
|
33467
|
+
var _useState = React.useState(false),
|
|
33468
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33469
|
+
open = _useState2[0],
|
|
33470
|
+
setOpen = _useState2[1];
|
|
33471
|
+
|
|
33472
|
+
var _useState3 = React.useState(''),
|
|
33473
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
33474
|
+
inputText = _useState4[0],
|
|
33475
|
+
setInputText = _useState4[1];
|
|
33476
|
+
|
|
33477
|
+
var isComposingRef = React.useRef(false);
|
|
33478
|
+
var inputRef = React.useRef(null);
|
|
33479
|
+
var containerRef = React.useRef(null);
|
|
33480
|
+
var blurTimerRef = React.useRef(null);
|
|
33481
|
+
var isMenuClickRef = React.useRef(false);
|
|
33482
|
+
var preventOpenRef = React.useRef(false);
|
|
33483
|
+
var labelKey = fieldNames.label || 'label';
|
|
33484
|
+
var valueKey = fieldNames.value || 'value';
|
|
33485
|
+
var childrenKey = fieldNames.children || 'children'; // ---------- 工具函数 ----------
|
|
33486
|
+
|
|
33487
|
+
var getPathLabel = React.useCallback(function (val) {
|
|
33488
|
+
if (!val || val.length === 0) return '';
|
|
33489
|
+
var current = options;
|
|
33490
|
+
var labels = [];
|
|
33491
|
+
|
|
33492
|
+
var _iterator = _createForOfIteratorHelper(val),
|
|
33493
|
+
_step;
|
|
33494
|
+
|
|
33495
|
+
try {
|
|
33496
|
+
var _loop = function _loop() {
|
|
33497
|
+
var _found$labelKey;
|
|
33498
|
+
|
|
33499
|
+
var v = _step.value;
|
|
33500
|
+
var found = current.find(function (node) {
|
|
33501
|
+
return node[valueKey] === v;
|
|
33502
|
+
});
|
|
33503
|
+
if (!found) return "break";
|
|
33504
|
+
labels.push(((_found$labelKey = found[labelKey]) === null || _found$labelKey === void 0 ? void 0 : _found$labelKey.toString()) || '');
|
|
33505
|
+
current = found[childrenKey] || [];
|
|
33506
|
+
};
|
|
33507
|
+
|
|
33508
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
33509
|
+
var _ret = _loop();
|
|
33510
|
+
|
|
33511
|
+
if (_ret === "break") break;
|
|
33512
|
+
}
|
|
33513
|
+
} catch (err) {
|
|
33514
|
+
_iterator.e(err);
|
|
33515
|
+
} finally {
|
|
33516
|
+
_iterator.f();
|
|
33517
|
+
}
|
|
33518
|
+
|
|
33519
|
+
return labels.length === val.length ? labels.join('') : val[val.length - 1].toString();
|
|
33520
|
+
}, [options, valueKey, labelKey, childrenKey]);
|
|
33521
|
+
var findInTree = React.useCallback(function (searchVal, nodes) {
|
|
33522
|
+
if (!searchVal || !nodes) return false;
|
|
33523
|
+
|
|
33524
|
+
var _iterator2 = _createForOfIteratorHelper(nodes),
|
|
33525
|
+
_step2;
|
|
33526
|
+
|
|
33527
|
+
try {
|
|
33528
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
33529
|
+
var _node$labelKey;
|
|
33530
|
+
|
|
33531
|
+
var node = _step2.value;
|
|
33532
|
+
var nodeLabel = ((_node$labelKey = node[labelKey]) === null || _node$labelKey === void 0 ? void 0 : _node$labelKey.toString()) || '';
|
|
33533
|
+
if (nodeLabel === searchVal) return true;
|
|
33534
|
+
if (node[childrenKey] && findInTree(searchVal, node[childrenKey])) return true;
|
|
33535
|
+
}
|
|
33536
|
+
} catch (err) {
|
|
33537
|
+
_iterator2.e(err);
|
|
33538
|
+
} finally {
|
|
33539
|
+
_iterator2.f();
|
|
33540
|
+
}
|
|
33541
|
+
|
|
33542
|
+
return false;
|
|
33543
|
+
}, [labelKey, childrenKey]); // ---------- 同步外部值 ----------
|
|
33544
|
+
|
|
33545
|
+
React.useEffect(function () {
|
|
33546
|
+
if (externalValue && externalValue.length > 0) {
|
|
33547
|
+
var pathLabel = getPathLabel(externalValue);
|
|
33548
|
+
setInputText(pathLabel);
|
|
33549
|
+
} else {
|
|
33550
|
+
setInputText('');
|
|
33551
|
+
}
|
|
33552
|
+
}, [externalValue, getPathLabel]); // ---------- 清理定时器 ----------
|
|
33553
|
+
|
|
33554
|
+
React.useEffect(function () {
|
|
33555
|
+
return function () {
|
|
33556
|
+
if (blurTimerRef.current) clearTimeout(blurTimerRef.current);
|
|
33557
|
+
};
|
|
33558
|
+
}, []); // ---------- 核心逻辑 ----------
|
|
33559
|
+
|
|
33560
|
+
var processText = React.useCallback(function (text) {
|
|
33561
|
+
if (!text.trim()) {
|
|
33562
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(undefined, []);
|
|
33563
|
+
setOpen(false);
|
|
33564
|
+
} else {
|
|
33565
|
+
var _ref2;
|
|
33566
|
+
|
|
33567
|
+
var matched = findInTree(text, options);
|
|
33568
|
+
var newValue = [text];
|
|
33569
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, [(_ref2 = {}, _defineProperty(_ref2, labelKey, text), _defineProperty(_ref2, valueKey, text), _defineProperty(_ref2, "isCustom", true), _ref2)]);
|
|
33570
|
+
setOpen(matched);
|
|
33571
|
+
}
|
|
33572
|
+
}, [options, findInTree, labelKey, valueKey, onChange]); // ---------- 全局 mousedown 监听 ----------
|
|
33573
|
+
|
|
33574
|
+
React.useEffect(function () {
|
|
33575
|
+
var handleMouseDown = function handleMouseDown(e) {
|
|
33576
|
+
var _inputRef$current, _target$closest, _target$closest2;
|
|
33577
|
+
|
|
33578
|
+
var target = e.target;
|
|
33579
|
+
var container = containerRef.current;
|
|
33580
|
+
if (!container) return;
|
|
33581
|
+
var inputElement = (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.input;
|
|
33582
|
+
var hasFocus = inputElement && document.activeElement === inputElement; // 检查是否点击在级联菜单内
|
|
33583
|
+
|
|
33584
|
+
var isMenu = (_target$closest = target.closest) === null || _target$closest === void 0 ? void 0 : _target$closest.call(target, ".".concat(DROPDOWN_CLASS));
|
|
33585
|
+
|
|
33586
|
+
if (isMenu) {
|
|
33587
|
+
isMenuClickRef.current = true;
|
|
33588
|
+
|
|
33589
|
+
if (hasFocus) {
|
|
33590
|
+
requestAnimationFrame(function () {
|
|
33591
|
+
var _inputRef$current2;
|
|
33592
|
+
|
|
33593
|
+
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
33594
|
+
});
|
|
33595
|
+
}
|
|
33596
|
+
|
|
33597
|
+
return;
|
|
33598
|
+
} // 检查是否点击在自定义内部元素(箭头、清除按钮)
|
|
33599
|
+
|
|
33600
|
+
|
|
33601
|
+
var isInternal = (_target$closest2 = target.closest) === null || _target$closest2 === void 0 ? void 0 : _target$closest2.call(target, ".".concat(ARROW_CLASS, ", .").concat(CLEAR_CLASS));
|
|
33602
|
+
|
|
33603
|
+
if (isInternal) {
|
|
33604
|
+
// 如果是箭头,允许 toggleOpen 处理,不干预焦点
|
|
33605
|
+
// 如果是清除,也不干预
|
|
33606
|
+
return;
|
|
33607
|
+
}
|
|
33608
|
+
|
|
33609
|
+
isMenuClickRef.current = false;
|
|
33610
|
+
|
|
33611
|
+
if (container.contains(target)) {
|
|
33612
|
+
return;
|
|
33613
|
+
}
|
|
33614
|
+
|
|
33615
|
+
if (hasFocus) {
|
|
33616
|
+
if (blurTimerRef.current) clearTimeout(blurTimerRef.current);
|
|
33617
|
+
blurTimerRef.current = setTimeout(function () {
|
|
33618
|
+
if (inputElement && document.activeElement === inputElement) {
|
|
33619
|
+
var _inputRef$current3;
|
|
33620
|
+
|
|
33621
|
+
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.blur();
|
|
33622
|
+
}
|
|
33623
|
+
|
|
33624
|
+
blurTimerRef.current = null;
|
|
33625
|
+
}, 0);
|
|
33626
|
+
}
|
|
33627
|
+
};
|
|
33628
|
+
|
|
33629
|
+
document.addEventListener('mousedown', handleMouseDown);
|
|
33630
|
+
return function () {
|
|
33631
|
+
document.removeEventListener('mousedown', handleMouseDown);
|
|
33632
|
+
};
|
|
33633
|
+
}, []); // ---------- 事件处理 ----------
|
|
33634
|
+
|
|
33635
|
+
var handleInputChange = function handleInputChange(e) {
|
|
33636
|
+
var text = e.target.value;
|
|
33637
|
+
setInputText(text);
|
|
33638
|
+
if (isComposingRef.current) return;
|
|
33639
|
+
processText(text);
|
|
33640
|
+
};
|
|
33641
|
+
|
|
33642
|
+
var handleCompositionStart = function handleCompositionStart() {
|
|
33643
|
+
isComposingRef.current = true;
|
|
33644
|
+
};
|
|
33645
|
+
|
|
33646
|
+
var handleCompositionEnd = function handleCompositionEnd(e) {
|
|
33647
|
+
isComposingRef.current = false;
|
|
33648
|
+
var text = e.target.value;
|
|
33649
|
+
processText(text);
|
|
33650
|
+
};
|
|
33651
|
+
|
|
33652
|
+
var handleInputFocus = function handleInputFocus() {
|
|
33653
|
+
if (preventOpenRef.current) {
|
|
33654
|
+
preventOpenRef.current = false;
|
|
33655
|
+
return;
|
|
33656
|
+
}
|
|
33657
|
+
|
|
33658
|
+
setOpen(true);
|
|
33659
|
+
};
|
|
33660
|
+
|
|
33661
|
+
var handleInputBlur = function handleInputBlur(e) {
|
|
33662
|
+
if (isMenuClickRef.current) {
|
|
33663
|
+
isMenuClickRef.current = false;
|
|
33664
|
+
return;
|
|
33665
|
+
}
|
|
33666
|
+
|
|
33667
|
+
var relatedTarget = e.relatedTarget;
|
|
33668
|
+
|
|
33669
|
+
if (relatedTarget) {
|
|
33670
|
+
var _relatedTarget$closes, _relatedTarget$closes2;
|
|
33671
|
+
|
|
33672
|
+
// 如果焦点移向菜单或内部自定义元素(箭头、清除),忽略失焦
|
|
33673
|
+
var isMenu = (_relatedTarget$closes = relatedTarget.closest) === null || _relatedTarget$closes === void 0 ? void 0 : _relatedTarget$closes.call(relatedTarget, ".".concat(DROPDOWN_CLASS));
|
|
33674
|
+
var isInternal = (_relatedTarget$closes2 = relatedTarget.closest) === null || _relatedTarget$closes2 === void 0 ? void 0 : _relatedTarget$closes2.call(relatedTarget, ".".concat(ARROW_CLASS, ", .").concat(CLEAR_CLASS));
|
|
33675
|
+
|
|
33676
|
+
if (isMenu || isInternal) {
|
|
33677
|
+
return;
|
|
33678
|
+
}
|
|
33679
|
+
}
|
|
33680
|
+
|
|
33681
|
+
setOpen(false);
|
|
33682
|
+
onBlurProp === null || onBlurProp === void 0 ? void 0 : onBlurProp(e);
|
|
33683
|
+
};
|
|
33684
|
+
|
|
33685
|
+
var handleCascaderChange = function handleCascaderChange(selectedValue, selectedOptions) {
|
|
33686
|
+
var path = selectedOptions.map(function (opt) {
|
|
33687
|
+
var _opt$labelKey;
|
|
33688
|
+
|
|
33689
|
+
return ((_opt$labelKey = opt[labelKey]) === null || _opt$labelKey === void 0 ? void 0 : _opt$labelKey.toString()) || '';
|
|
33690
|
+
}).join('');
|
|
33691
|
+
setInputText(path);
|
|
33692
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(selectedValue, selectedOptions);
|
|
33693
|
+
var lastOption = selectedOptions[selectedOptions.length - 1];
|
|
33694
|
+
var hasChildren = (lastOption === null || lastOption === void 0 ? void 0 : lastOption[childrenKey]) && lastOption[childrenKey].length > 0;
|
|
33695
|
+
|
|
33696
|
+
if (hasChildren) {
|
|
33697
|
+
setOpen(true);
|
|
33698
|
+
setTimeout(function () {
|
|
33699
|
+
var _inputRef$current4;
|
|
33700
|
+
|
|
33701
|
+
(_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 ? void 0 : _inputRef$current4.focus();
|
|
33702
|
+
}, 0);
|
|
33703
|
+
} else {
|
|
33704
|
+
setOpen(false);
|
|
33705
|
+
preventOpenRef.current = true;
|
|
33706
|
+
setTimeout(function () {
|
|
33707
|
+
var _inputRef$current5;
|
|
33708
|
+
|
|
33709
|
+
(_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.focus();
|
|
33710
|
+
}, 0);
|
|
33711
|
+
}
|
|
33712
|
+
};
|
|
33713
|
+
|
|
33714
|
+
var handleClear = function handleClear(e) {
|
|
33715
|
+
var _inputRef$current6;
|
|
33716
|
+
|
|
33717
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
33718
|
+
setInputText('');
|
|
33719
|
+
setOpen(false);
|
|
33720
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(undefined, []); // 保持焦点
|
|
33721
|
+
|
|
33722
|
+
(_inputRef$current6 = inputRef.current) === null || _inputRef$current6 === void 0 ? void 0 : _inputRef$current6.focus();
|
|
33723
|
+
};
|
|
33724
|
+
|
|
33725
|
+
var toggleOpen = function toggleOpen() {
|
|
33726
|
+
if (open) {
|
|
33727
|
+
var _inputRef$current7;
|
|
33728
|
+
|
|
33729
|
+
setOpen(false); // 保持焦点
|
|
33730
|
+
|
|
33731
|
+
(_inputRef$current7 = inputRef.current) === null || _inputRef$current7 === void 0 ? void 0 : _inputRef$current7.focus();
|
|
33732
|
+
} else {
|
|
33733
|
+
var _inputRef$current8;
|
|
33734
|
+
|
|
33735
|
+
// 打开弹窗,清除阻止标记,确保 onFocus 能正常工作
|
|
33736
|
+
preventOpenRef.current = false;
|
|
33737
|
+
setOpen(true);
|
|
33738
|
+
(_inputRef$current8 = inputRef.current) === null || _inputRef$current8 === void 0 ? void 0 : _inputRef$current8.focus();
|
|
33739
|
+
}
|
|
33740
|
+
};
|
|
33741
|
+
|
|
33742
|
+
var showClear = externalValue && externalValue.length > 0;
|
|
33743
|
+
React.useImperativeHandle(ref, function () {
|
|
33744
|
+
return {
|
|
33745
|
+
focus: function focus() {
|
|
33746
|
+
var _inputRef$current9;
|
|
33747
|
+
|
|
33748
|
+
return (_inputRef$current9 = inputRef.current) === null || _inputRef$current9 === void 0 ? void 0 : _inputRef$current9.focus();
|
|
33749
|
+
},
|
|
33750
|
+
blur: function blur() {
|
|
33751
|
+
var _inputRef$current10;
|
|
33752
|
+
|
|
33753
|
+
return (_inputRef$current10 = inputRef.current) === null || _inputRef$current10 === void 0 ? void 0 : _inputRef$current10.blur();
|
|
33754
|
+
}
|
|
33755
|
+
};
|
|
33756
|
+
});
|
|
33757
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
33758
|
+
ref: containerRef,
|
|
33759
|
+
className: className,
|
|
33760
|
+
style: _objectSpread2({
|
|
33761
|
+
position: 'relative',
|
|
33762
|
+
width: '100%'
|
|
33763
|
+
}, style)
|
|
33764
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, {
|
|
33765
|
+
ref: inputRef,
|
|
33766
|
+
placeholder: placeholder,
|
|
33767
|
+
value: inputText,
|
|
33768
|
+
onChange: handleInputChange,
|
|
33769
|
+
onCompositionStart: handleCompositionStart,
|
|
33770
|
+
onCompositionEnd: handleCompositionEnd,
|
|
33771
|
+
onFocus: handleInputFocus,
|
|
33772
|
+
onBlur: handleInputBlur,
|
|
33773
|
+
style: _objectSpread2({}, style),
|
|
33774
|
+
suffix: /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, showClear && /*#__PURE__*/React__default['default'].createElement(CloseOutlined$2, {
|
|
33775
|
+
className: CLEAR_CLASS,
|
|
33776
|
+
onClick: handleClear,
|
|
33777
|
+
style: {
|
|
33778
|
+
color: 'rgba(0,0,0,0.25)',
|
|
33779
|
+
cursor: 'pointer',
|
|
33780
|
+
marginRight: 4
|
|
33781
|
+
}
|
|
33782
|
+
}), /*#__PURE__*/React__default['default'].createElement(DownOutlined$2, {
|
|
33783
|
+
className: ARROW_CLASS,
|
|
33784
|
+
onClick: toggleOpen,
|
|
33785
|
+
style: {
|
|
33786
|
+
color: open ? '#1677ff' : 'rgba(0,0,0,0.25)',
|
|
33787
|
+
cursor: 'pointer',
|
|
33788
|
+
transition: 'transform 0.2s',
|
|
33789
|
+
transform: open ? 'rotate(180deg)' : 'none'
|
|
33790
|
+
}
|
|
33791
|
+
}))
|
|
33792
|
+
}), /*#__PURE__*/React__default['default'].createElement(ktsXui.Cascader, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
33793
|
+
options: options,
|
|
33794
|
+
fieldNames: fieldNames,
|
|
33795
|
+
value: externalValue,
|
|
33796
|
+
onChange: handleCascaderChange,
|
|
33797
|
+
open: open,
|
|
33798
|
+
getPopupContainer: function getPopupContainer() {
|
|
33799
|
+
return document.body;
|
|
33800
|
+
},
|
|
33801
|
+
dropdownClassName: DROPDOWN_CLASS,
|
|
33802
|
+
style: {
|
|
33803
|
+
position: 'absolute',
|
|
33804
|
+
top: 0,
|
|
33805
|
+
left: 0,
|
|
33806
|
+
width: '100%',
|
|
33807
|
+
height: '100%',
|
|
33808
|
+
opacity: 0,
|
|
33809
|
+
pointerEvents: 'none',
|
|
33810
|
+
zIndex: -1
|
|
33811
|
+
},
|
|
33812
|
+
showSearch: false,
|
|
33813
|
+
expandIcon: null
|
|
33814
|
+
})));
|
|
33815
|
+
});
|
|
33816
|
+
CustomCascader.displayName = 'CustomCascader';
|
|
33817
|
+
|
|
33818
|
+
var useColumns$4 = (function (form, isRequired) {
|
|
33819
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
33820
|
+
var controller = Invoice.useInvoiceController();
|
|
33821
|
+
var rootElement = controller.useMemo(function (s) {
|
|
33822
|
+
return s.rootElement;
|
|
33823
|
+
}, []);
|
|
33824
|
+
/** 组件模式 */
|
|
33825
|
+
|
|
33826
|
+
var model = controller.useMemo(function (e) {
|
|
33827
|
+
return e.model;
|
|
33828
|
+
}, []);
|
|
33829
|
+
/** 正在编辑的货物 */
|
|
33830
|
+
|
|
33831
|
+
var editGood = controller.useMemo(function (e) {
|
|
33832
|
+
return e.passengerListState.editGood;
|
|
33833
|
+
}, []);
|
|
33834
|
+
/** 禁用字段 */
|
|
33835
|
+
|
|
33836
|
+
var disableds = controller.useMemo(function (e) {
|
|
33837
|
+
return e.stakeholder.disableds || [];
|
|
33838
|
+
}, []);
|
|
33839
|
+
/** 运输工具种类列表 */
|
|
33840
|
+
|
|
33841
|
+
var vehicleTypeList = controller.useMemo(function (e) {
|
|
33842
|
+
return e.passengerListState.vehicleTypeList;
|
|
33843
|
+
}, []);
|
|
33844
|
+
/** 证件类型列表 */
|
|
33845
|
+
|
|
33846
|
+
var certificateTypeList = controller.useMemo(function (e) {
|
|
33847
|
+
return e.passengerListState.certificateTypeList;
|
|
33848
|
+
}, []);
|
|
33849
|
+
var area = controller.useMemo(function (e) {
|
|
33850
|
+
return e.passengerListState.area;
|
|
33851
|
+
}, []);
|
|
33852
|
+
var addressFieldNames = controller.useMemo(function (e) {
|
|
33853
|
+
return e.passengerListState.addressFieldNames;
|
|
33854
|
+
}, []);
|
|
33855
|
+
var getVehicle = React__default['default'].useCallback(function (value) {
|
|
33856
|
+
if (vehicleTypeList && vehicleTypeList.length > 0) {
|
|
33857
|
+
var _vehicleTypeList$find;
|
|
33858
|
+
|
|
33859
|
+
return ((_vehicleTypeList$find = vehicleTypeList.find(function (e) {
|
|
33860
|
+
return e.value === value;
|
|
33861
|
+
})) === null || _vehicleTypeList$find === void 0 ? void 0 : _vehicleTypeList$find.label) || '';
|
|
33862
|
+
}
|
|
33863
|
+
}, [vehicleTypeList]);
|
|
33864
|
+
var getCertificateType = React__default['default'].useCallback(function (value) {
|
|
33865
|
+
if (certificateTypeList && certificateTypeList.length > 0) {
|
|
33866
|
+
var _certificateTypeList$;
|
|
33867
|
+
|
|
33868
|
+
return ((_certificateTypeList$ = certificateTypeList.find(function (e) {
|
|
33869
|
+
return e.value === value;
|
|
33870
|
+
})) === null || _certificateTypeList$ === void 0 ? void 0 : _certificateTypeList$.label) || '';
|
|
33871
|
+
}
|
|
33872
|
+
}, [certificateTypeList]); // 等级选项配置
|
|
33873
|
+
|
|
33874
|
+
var levelOptionsMap = React__default['default'].useMemo(function () {
|
|
33875
|
+
return {
|
|
33876
|
+
'AIRCRAFT': {
|
|
33877
|
+
options: [{
|
|
33878
|
+
value: '公务舱',
|
|
33879
|
+
label: '公务舱'
|
|
33880
|
+
}, {
|
|
33881
|
+
value: '头等舱',
|
|
33882
|
+
label: '头等舱'
|
|
33883
|
+
}, {
|
|
33884
|
+
value: '经济舱',
|
|
33885
|
+
label: '经济舱'
|
|
33886
|
+
}],
|
|
33887
|
+
required: true
|
|
33888
|
+
},
|
|
33889
|
+
'TRAIN': {
|
|
33890
|
+
options: [{
|
|
33891
|
+
value: '一等座',
|
|
33892
|
+
label: '一等座'
|
|
33893
|
+
}, {
|
|
33894
|
+
value: '二等座',
|
|
33895
|
+
label: '二等座'
|
|
33896
|
+
}, {
|
|
33897
|
+
value: '软席(软座、软卧)',
|
|
33898
|
+
label: '软席(软座、软卧)'
|
|
33899
|
+
}, {
|
|
33900
|
+
value: '硬席(硬座、硬卧)',
|
|
33901
|
+
label: '硬席(硬座、硬卧)'
|
|
33902
|
+
}],
|
|
33903
|
+
required: true
|
|
33904
|
+
},
|
|
33905
|
+
'SHIP': {
|
|
33906
|
+
options: [{
|
|
33907
|
+
value: '一等舱',
|
|
33908
|
+
label: '一等舱'
|
|
33909
|
+
}, {
|
|
33910
|
+
value: '二等舱',
|
|
33911
|
+
label: '二等舱'
|
|
33912
|
+
}, {
|
|
33913
|
+
value: '三等舱',
|
|
33914
|
+
label: '三等舱'
|
|
33915
|
+
}],
|
|
33916
|
+
required: true
|
|
33917
|
+
} // 其他类型不配置,则等级为非必填的文本输入
|
|
33918
|
+
|
|
33919
|
+
};
|
|
33920
|
+
}, []);
|
|
33921
|
+
var splitArea = React__default['default'].useCallback(function (value) {
|
|
33922
|
+
if (value) {
|
|
33923
|
+
var _array = value.split(',');
|
|
33924
|
+
|
|
33925
|
+
return _array;
|
|
33926
|
+
} else {
|
|
33927
|
+
return [];
|
|
33928
|
+
}
|
|
33929
|
+
}, []);
|
|
33930
|
+
/** 表头 */
|
|
33931
|
+
|
|
33932
|
+
var columns = React__default['default'].useMemo(function () {
|
|
33933
|
+
return [// {
|
|
33934
|
+
// title: '序号',
|
|
33935
|
+
// key: 'cxrxh',
|
|
33936
|
+
// dataIndex: 'cxrxh',
|
|
33937
|
+
// width: 50,
|
|
33938
|
+
// render: (e: number) => <span style={{ padding: '0 10px' }}>{e}</span>,
|
|
33939
|
+
// },
|
|
33940
|
+
{
|
|
33941
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
33942
|
+
required: true
|
|
33943
|
+
}, "\u51FA\u884C\u4EBA"),
|
|
33944
|
+
dataIndex: 'cxr',
|
|
33945
|
+
key: 'cxr',
|
|
33946
|
+
width: 100,
|
|
33947
|
+
render: function render(_, record) {
|
|
33948
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
33949
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('cxr', {
|
|
33950
|
+
initialValue: editGood.cxr,
|
|
33951
|
+
rules: [{
|
|
33952
|
+
required: true,
|
|
33953
|
+
message: '请输入出行人'
|
|
33954
|
+
}]
|
|
33955
|
+
})( /*#__PURE__*/React__default['default'].createElement(MyInput$6, {
|
|
33956
|
+
maxLength: 20,
|
|
33957
|
+
onChange: function () {
|
|
33958
|
+
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
33959
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33960
|
+
while (1) {
|
|
33961
|
+
switch (_context.prev = _context.next) {
|
|
33962
|
+
case 0:
|
|
33963
|
+
_context.next = 2;
|
|
33964
|
+
return controller.wait();
|
|
33965
|
+
|
|
33966
|
+
case 2:
|
|
33967
|
+
_context.next = 4;
|
|
33968
|
+
return controller.setEditPassenger({
|
|
33969
|
+
cxr: form.getFieldsValue().cxr
|
|
33970
|
+
});
|
|
33971
|
+
|
|
33972
|
+
case 4:
|
|
33973
|
+
case "end":
|
|
33974
|
+
return _context.stop();
|
|
33975
|
+
}
|
|
33976
|
+
}
|
|
33977
|
+
}, _callee);
|
|
33978
|
+
}));
|
|
33979
|
+
|
|
33980
|
+
function onChange() {
|
|
33981
|
+
return _onChange.apply(this, arguments);
|
|
33982
|
+
}
|
|
33983
|
+
|
|
33984
|
+
return onChange;
|
|
33985
|
+
}()
|
|
33986
|
+
})));
|
|
33987
|
+
} else {
|
|
33988
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
33989
|
+
style: {
|
|
33990
|
+
padding: '0 10px'
|
|
33991
|
+
}
|
|
33992
|
+
}, record.cxr);
|
|
33993
|
+
}
|
|
33994
|
+
}
|
|
33995
|
+
}, {
|
|
33996
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
33997
|
+
required: isRequired
|
|
33998
|
+
}, "\u51FA\u884C\u65E5\u671F"),
|
|
33999
|
+
dataIndex: 'chuxrq',
|
|
34000
|
+
key: 'chuxrq',
|
|
34001
|
+
width: 130,
|
|
34002
|
+
render: function render(_, record) {
|
|
34003
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
34004
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('chuxrq', {
|
|
34005
|
+
initialValue: editGood.chuxrq ? hooks(editGood.chuxrq) : undefined,
|
|
34006
|
+
rules: [{
|
|
34007
|
+
required: isRequired,
|
|
34008
|
+
message: '请选择出行日期'
|
|
34009
|
+
}]
|
|
34010
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.DatePicker, {
|
|
34011
|
+
format: "YYYY-MM-DD",
|
|
34012
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
34013
|
+
onChange: function () {
|
|
34014
|
+
var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(v) {
|
|
34015
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
34016
|
+
while (1) {
|
|
34017
|
+
switch (_context2.prev = _context2.next) {
|
|
34018
|
+
case 0:
|
|
34019
|
+
_context2.next = 2;
|
|
34020
|
+
return controller.wait();
|
|
34021
|
+
|
|
34022
|
+
case 2:
|
|
34023
|
+
_context2.next = 4;
|
|
34024
|
+
return controller.setEditPassenger({
|
|
34025
|
+
chuxrq: hooks(v).format('YYYY-MM-DD')
|
|
34026
|
+
});
|
|
34027
|
+
|
|
34028
|
+
case 4:
|
|
34029
|
+
case "end":
|
|
34030
|
+
return _context2.stop();
|
|
34031
|
+
}
|
|
34032
|
+
}
|
|
34033
|
+
}, _callee2);
|
|
34034
|
+
}));
|
|
34035
|
+
|
|
34036
|
+
function onChange(_x) {
|
|
34037
|
+
return _onChange2.apply(this, arguments);
|
|
34038
|
+
}
|
|
34039
|
+
|
|
34040
|
+
return onChange;
|
|
34041
|
+
}()
|
|
34042
|
+
})));
|
|
34043
|
+
} else {
|
|
34044
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34045
|
+
style: {
|
|
34046
|
+
padding: '0 10px'
|
|
34047
|
+
}
|
|
34048
|
+
}, record.chuxrq);
|
|
34049
|
+
}
|
|
34050
|
+
}
|
|
34051
|
+
}, {
|
|
34052
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
34053
|
+
required: isRequired
|
|
34054
|
+
}, "\u51FA\u884C\u4EBA\u8BC1\u4EF6\u7C7B\u578B"),
|
|
34055
|
+
key: 'cxrzjlxDm',
|
|
34056
|
+
dataIndex: 'cxrzjlxDm',
|
|
34057
|
+
width: 160,
|
|
34058
|
+
render: function render(_, record) {
|
|
34059
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab')) {
|
|
34060
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('cxrzjlxDm', {
|
|
34061
|
+
initialValue: editGood.cxrzjlxDm,
|
|
34062
|
+
rules: [{
|
|
34063
|
+
required: isRequired,
|
|
34064
|
+
message: '请选择出行人证件类型'
|
|
34065
|
+
}]
|
|
34066
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Select, {
|
|
34067
|
+
className: "kts-invoice-operate-goods-list-table-tax-rate",
|
|
34068
|
+
showArrow: true,
|
|
34069
|
+
allowClear: true,
|
|
34070
|
+
style: {
|
|
34071
|
+
width: '100%'
|
|
34072
|
+
},
|
|
34073
|
+
getPopupContainer: function getPopupContainer() {
|
|
34074
|
+
return rootElement || document.body;
|
|
34075
|
+
},
|
|
34076
|
+
onChange: function () {
|
|
34077
|
+
var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(value) {
|
|
34078
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
34079
|
+
while (1) {
|
|
34080
|
+
switch (_context3.prev = _context3.next) {
|
|
34081
|
+
case 0:
|
|
34082
|
+
_context3.next = 2;
|
|
34083
|
+
return controller.wait();
|
|
34084
|
+
|
|
34085
|
+
case 2:
|
|
34086
|
+
controller.setEditPassenger({
|
|
34087
|
+
cxrzjlxDm: value
|
|
34088
|
+
});
|
|
34089
|
+
|
|
34090
|
+
case 3:
|
|
34091
|
+
case "end":
|
|
34092
|
+
return _context3.stop();
|
|
34093
|
+
}
|
|
34094
|
+
}
|
|
34095
|
+
}, _callee3);
|
|
34096
|
+
}));
|
|
34097
|
+
|
|
34098
|
+
function onChange(_x2) {
|
|
34099
|
+
return _onChange3.apply(this, arguments);
|
|
34100
|
+
}
|
|
34101
|
+
|
|
34102
|
+
return onChange;
|
|
34103
|
+
}()
|
|
34104
|
+
}, certificateTypeList.map(function (e, i) {
|
|
34105
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Select.Option, {
|
|
34106
|
+
key: i,
|
|
34107
|
+
value: e.value
|
|
34108
|
+
}, e.label);
|
|
34109
|
+
}))));
|
|
34110
|
+
} else {
|
|
34111
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34112
|
+
style: {
|
|
34113
|
+
padding: '0 10px'
|
|
34114
|
+
}
|
|
34115
|
+
}, getCertificateType(record.cxrzjlxDm));
|
|
34116
|
+
}
|
|
34117
|
+
}
|
|
34118
|
+
}, {
|
|
34119
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
34120
|
+
required: isRequired
|
|
34121
|
+
}, "\u51FA\u884C\u4EBA\u8BC1\u4EF6\u53F7\u7801"),
|
|
34122
|
+
dataIndex: 'sfzjhm',
|
|
34123
|
+
key: 'sfzjhm',
|
|
34124
|
+
width: 150,
|
|
34125
|
+
render: function render(_, record) {
|
|
34126
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
34127
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('sfzjhm', {
|
|
34128
|
+
initialValue: editGood.sfzjhm,
|
|
34129
|
+
rules: [{
|
|
34130
|
+
required: isRequired,
|
|
34131
|
+
message: '请输入证件号码'
|
|
34132
|
+
}]
|
|
34133
|
+
})( /*#__PURE__*/React__default['default'].createElement(MyInput$6, {
|
|
34134
|
+
maxLength: 20,
|
|
34135
|
+
onChange: function () {
|
|
34136
|
+
var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
34137
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
34138
|
+
while (1) {
|
|
34139
|
+
switch (_context4.prev = _context4.next) {
|
|
34140
|
+
case 0:
|
|
34141
|
+
_context4.next = 2;
|
|
34142
|
+
return controller.wait();
|
|
34143
|
+
|
|
34144
|
+
case 2:
|
|
34145
|
+
_context4.next = 4;
|
|
34146
|
+
return controller.setEditPassenger({
|
|
34147
|
+
sfzjhm: form.getFieldsValue().sfzjhm
|
|
34148
|
+
});
|
|
34149
|
+
|
|
34150
|
+
case 4:
|
|
34151
|
+
case "end":
|
|
34152
|
+
return _context4.stop();
|
|
34153
|
+
}
|
|
34154
|
+
}
|
|
34155
|
+
}, _callee4);
|
|
34156
|
+
}));
|
|
34157
|
+
|
|
34158
|
+
function onChange() {
|
|
34159
|
+
return _onChange4.apply(this, arguments);
|
|
34160
|
+
}
|
|
34161
|
+
|
|
34162
|
+
return onChange;
|
|
34163
|
+
}()
|
|
34164
|
+
})));
|
|
34165
|
+
} else {
|
|
34166
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34167
|
+
style: {
|
|
34168
|
+
padding: '0 10px'
|
|
34169
|
+
}
|
|
34170
|
+
}, record.sfzjhm);
|
|
34171
|
+
}
|
|
34172
|
+
}
|
|
34173
|
+
}, {
|
|
34174
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
34175
|
+
required: isRequired
|
|
34176
|
+
}, "\u51FA\u53D1\u70B9"),
|
|
34177
|
+
key: 'cfd',
|
|
34178
|
+
dataIndex: 'cfd',
|
|
34179
|
+
width: 180,
|
|
34180
|
+
render: function render(_, record) {
|
|
34181
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
34182
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('cfd', {
|
|
34183
|
+
initialValue: editGood.cfd,
|
|
34184
|
+
rules: [{
|
|
34185
|
+
required: isRequired,
|
|
34186
|
+
message: '请输入出发点'
|
|
34187
|
+
}]
|
|
34188
|
+
})( /*#__PURE__*/React__default['default'].createElement(CustomCascader, {
|
|
34189
|
+
style: {
|
|
34190
|
+
width: '100%'
|
|
34191
|
+
},
|
|
34192
|
+
options: area,
|
|
34193
|
+
fieldNames: addressFieldNames,
|
|
34194
|
+
onChange: function () {
|
|
34195
|
+
var _onChange5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(value) {
|
|
34196
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
34197
|
+
while (1) {
|
|
34198
|
+
switch (_context5.prev = _context5.next) {
|
|
34199
|
+
case 0:
|
|
34200
|
+
_context5.next = 2;
|
|
34201
|
+
return controller.setEditPassenger({
|
|
34202
|
+
cfd: value
|
|
34203
|
+
});
|
|
34204
|
+
|
|
34205
|
+
case 2:
|
|
34206
|
+
case "end":
|
|
34207
|
+
return _context5.stop();
|
|
34208
|
+
}
|
|
34209
|
+
}
|
|
34210
|
+
}, _callee5);
|
|
34211
|
+
}));
|
|
34212
|
+
|
|
34213
|
+
function onChange(_x3) {
|
|
34214
|
+
return _onChange5.apply(this, arguments);
|
|
34215
|
+
}
|
|
34216
|
+
|
|
34217
|
+
return onChange;
|
|
34218
|
+
}()
|
|
34219
|
+
})));
|
|
34220
|
+
} else {
|
|
34221
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34222
|
+
style: {
|
|
34223
|
+
padding: '0 10px'
|
|
34224
|
+
}
|
|
34225
|
+
}, record.cfd);
|
|
34226
|
+
}
|
|
34227
|
+
}
|
|
34228
|
+
}, {
|
|
34229
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
34230
|
+
required: isRequired
|
|
34231
|
+
}, "\u5230\u8FBE\u5730"),
|
|
34232
|
+
dataIndex: 'ddd',
|
|
34233
|
+
key: 'ddd',
|
|
34234
|
+
width: 180,
|
|
34235
|
+
render: function render(_, record) {
|
|
34236
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
34237
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('ddd', {
|
|
34238
|
+
initialValue: editGood.ddd,
|
|
34239
|
+
rules: [{
|
|
34240
|
+
required: isRequired,
|
|
34241
|
+
message: '请输入到达地'
|
|
34242
|
+
}]
|
|
34243
|
+
})( /*#__PURE__*/React__default['default'].createElement(CustomCascader, {
|
|
34244
|
+
options: area,
|
|
34245
|
+
fieldNames: addressFieldNames,
|
|
34246
|
+
style: {
|
|
34247
|
+
width: '100%'
|
|
34248
|
+
},
|
|
34249
|
+
onChange: function () {
|
|
34250
|
+
var _onChange6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value) {
|
|
34251
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
34252
|
+
while (1) {
|
|
34253
|
+
switch (_context6.prev = _context6.next) {
|
|
34254
|
+
case 0:
|
|
34255
|
+
_context6.next = 2;
|
|
34256
|
+
return controller.setEditPassenger({
|
|
34257
|
+
ddd: value
|
|
34258
|
+
});
|
|
34259
|
+
|
|
34260
|
+
case 2:
|
|
34261
|
+
case "end":
|
|
34262
|
+
return _context6.stop();
|
|
34263
|
+
}
|
|
34264
|
+
}
|
|
34265
|
+
}, _callee6);
|
|
34266
|
+
}));
|
|
34267
|
+
|
|
34268
|
+
function onChange(_x4) {
|
|
34269
|
+
return _onChange6.apply(this, arguments);
|
|
34270
|
+
}
|
|
34271
|
+
|
|
34272
|
+
return onChange;
|
|
34273
|
+
}()
|
|
34274
|
+
})));
|
|
34275
|
+
} else {
|
|
34276
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34277
|
+
style: {
|
|
34278
|
+
padding: '0 10px'
|
|
34279
|
+
}
|
|
34280
|
+
}, record.ddd);
|
|
34281
|
+
}
|
|
34282
|
+
}
|
|
34283
|
+
}, {
|
|
34284
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
34285
|
+
required: isRequired
|
|
34286
|
+
}, "\u4EA4\u901A\u5DE5\u5177\u7C7B\u578B"),
|
|
34287
|
+
key: 'jtgjlxDm',
|
|
34288
|
+
dataIndex: 'jtgjlxDm',
|
|
34289
|
+
width: 130,
|
|
34290
|
+
render: function render(_, record) {
|
|
34291
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !(model === 'prefab')) {
|
|
34292
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('jtgjlxDm', {
|
|
34293
|
+
initialValue: editGood.jtgjlxDm,
|
|
34294
|
+
rules: [{
|
|
34295
|
+
required: isRequired,
|
|
34296
|
+
message: '请选择交通工具类型'
|
|
34297
|
+
}]
|
|
34298
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Select, {
|
|
34299
|
+
className: "kts-invoice-operate-goods-list-table-tax-rate",
|
|
34300
|
+
showArrow: true,
|
|
34301
|
+
allowClear: true,
|
|
34302
|
+
style: {
|
|
34303
|
+
width: '100%'
|
|
34304
|
+
},
|
|
34305
|
+
getPopupContainer: function getPopupContainer() {
|
|
34306
|
+
return rootElement || document.body;
|
|
34307
|
+
},
|
|
34308
|
+
onChange: function () {
|
|
34309
|
+
var _onChange7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(value) {
|
|
34310
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
34311
|
+
while (1) {
|
|
34312
|
+
switch (_context7.prev = _context7.next) {
|
|
34313
|
+
case 0:
|
|
34314
|
+
_context7.next = 2;
|
|
34315
|
+
return controller.wait();
|
|
34316
|
+
|
|
34317
|
+
case 2:
|
|
34318
|
+
controller.setEditPassenger({
|
|
34319
|
+
jtgjlxDm: value
|
|
34320
|
+
});
|
|
34321
|
+
|
|
34322
|
+
case 3:
|
|
34323
|
+
case "end":
|
|
34324
|
+
return _context7.stop();
|
|
34325
|
+
}
|
|
34326
|
+
}
|
|
34327
|
+
}, _callee7);
|
|
34328
|
+
}));
|
|
34329
|
+
|
|
34330
|
+
function onChange(_x5) {
|
|
34331
|
+
return _onChange7.apply(this, arguments);
|
|
34332
|
+
}
|
|
34333
|
+
|
|
34334
|
+
return onChange;
|
|
34335
|
+
}()
|
|
34336
|
+
}, vehicleTypeList.map(function (e, i) {
|
|
34337
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Select.Option, {
|
|
34338
|
+
key: i,
|
|
34339
|
+
value: e.value,
|
|
34340
|
+
disabled: e.disabled
|
|
34341
|
+
}, e.label, e.disabled ? '(暂不支持)' : '');
|
|
34342
|
+
}))));
|
|
34343
|
+
} else {
|
|
34344
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34345
|
+
style: {
|
|
34346
|
+
padding: '0 10px'
|
|
34347
|
+
}
|
|
34348
|
+
}, getVehicle(record.jtgjlxDm));
|
|
34349
|
+
}
|
|
34350
|
+
}
|
|
34351
|
+
}, {
|
|
34352
|
+
title: /*#__PURE__*/React__default['default'].createElement(TitleText$4, {
|
|
34353
|
+
required: false
|
|
34354
|
+
}, "\u7B49\u7EA7"),
|
|
34355
|
+
dataIndex: 'zwdj',
|
|
34356
|
+
key: 'zwdj',
|
|
34357
|
+
width: 110,
|
|
34358
|
+
render: function render(_, record) {
|
|
34359
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
|
|
34360
|
+
// 获取当前等级配置
|
|
34361
|
+
var levelConfig = editGood.jtgjlxDm ? levelOptionsMap[editGood.jtgjlxDm] : undefined;
|
|
34362
|
+
var isLevelSelect = !!levelConfig;
|
|
34363
|
+
var isLevelRequired = (levelConfig === null || levelConfig === void 0 ? void 0 : levelConfig.required) || false;
|
|
34364
|
+
var levelOptions = (levelConfig === null || levelConfig === void 0 ? void 0 : levelConfig.options) || [];
|
|
34365
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('zwdj', {
|
|
34366
|
+
initialValue: editGood.zwdj,
|
|
34367
|
+
rules: [{
|
|
34368
|
+
required: isLevelRequired,
|
|
34369
|
+
message: '请选择等级'
|
|
34370
|
+
}]
|
|
34371
|
+
})(isLevelSelect ? /*#__PURE__*/React__default['default'].createElement(ktsXui.Select, {
|
|
34372
|
+
className: "kts-invoice-operate-goods-list-table-tax-rate",
|
|
34373
|
+
showArrow: true,
|
|
34374
|
+
allowClear: true,
|
|
34375
|
+
style: {
|
|
34376
|
+
width: '100%'
|
|
34377
|
+
},
|
|
34378
|
+
getPopupContainer: function getPopupContainer() {
|
|
34379
|
+
return rootElement || document.body;
|
|
34380
|
+
},
|
|
34381
|
+
onChange: function () {
|
|
34382
|
+
var _onChange8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(value) {
|
|
34383
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
34384
|
+
while (1) {
|
|
34385
|
+
switch (_context8.prev = _context8.next) {
|
|
34386
|
+
case 0:
|
|
34387
|
+
_context8.next = 2;
|
|
34388
|
+
return controller.wait();
|
|
34389
|
+
|
|
34390
|
+
case 2:
|
|
34391
|
+
controller.setEditPassenger({
|
|
34392
|
+
zwdj: value
|
|
34393
|
+
});
|
|
34394
|
+
|
|
34395
|
+
case 3:
|
|
34396
|
+
case "end":
|
|
34397
|
+
return _context8.stop();
|
|
34398
|
+
}
|
|
34399
|
+
}
|
|
34400
|
+
}, _callee8);
|
|
34401
|
+
}));
|
|
34402
|
+
|
|
34403
|
+
function onChange(_x6) {
|
|
34404
|
+
return _onChange8.apply(this, arguments);
|
|
34405
|
+
}
|
|
34406
|
+
|
|
34407
|
+
return onChange;
|
|
34408
|
+
}()
|
|
34409
|
+
}, levelOptions.map(function (e, i) {
|
|
34410
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Select.Option, {
|
|
34411
|
+
key: i,
|
|
34412
|
+
value: e.value
|
|
34413
|
+
}, e.label);
|
|
34414
|
+
})) : /*#__PURE__*/React__default['default'].createElement(MyInput$6, {
|
|
34415
|
+
maxLength: 20,
|
|
34416
|
+
onChange: function () {
|
|
34417
|
+
var _onChange9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
34418
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
34419
|
+
while (1) {
|
|
34420
|
+
switch (_context9.prev = _context9.next) {
|
|
34421
|
+
case 0:
|
|
34422
|
+
_context9.next = 2;
|
|
34423
|
+
return controller.wait();
|
|
34424
|
+
|
|
34425
|
+
case 2:
|
|
34426
|
+
_context9.next = 4;
|
|
34427
|
+
return controller.setEditPassenger({
|
|
34428
|
+
zwdj: form.getFieldsValue().zwdj
|
|
34429
|
+
});
|
|
34430
|
+
|
|
34431
|
+
case 4:
|
|
34432
|
+
case "end":
|
|
34433
|
+
return _context9.stop();
|
|
34434
|
+
}
|
|
34435
|
+
}
|
|
34436
|
+
}, _callee9);
|
|
34437
|
+
}));
|
|
34438
|
+
|
|
34439
|
+
function onChange() {
|
|
34440
|
+
return _onChange9.apply(this, arguments);
|
|
34441
|
+
}
|
|
34442
|
+
|
|
34443
|
+
return onChange;
|
|
34444
|
+
}()
|
|
34445
|
+
})));
|
|
34446
|
+
} else {
|
|
34447
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
34448
|
+
style: {
|
|
34449
|
+
padding: '0 10px'
|
|
34450
|
+
}
|
|
34451
|
+
}, record.zwdj);
|
|
34452
|
+
}
|
|
34453
|
+
}
|
|
34454
|
+
}] // 只读
|
|
34455
|
+
.filter(function (e) {
|
|
34456
|
+
if (model === 'readOnly') {
|
|
34457
|
+
return e.key !== 'operating';
|
|
34458
|
+
} else {
|
|
34459
|
+
return true;
|
|
34460
|
+
}
|
|
34461
|
+
}).map(function (e) {
|
|
34462
|
+
return _objectSpread2(_objectSpread2({}, e), {}, {
|
|
34463
|
+
ellipsis: true
|
|
34464
|
+
});
|
|
34465
|
+
});
|
|
34466
|
+
}, [editGood, controller, model, getVehicle]);
|
|
34467
|
+
return columns;
|
|
34468
|
+
});
|
|
34469
|
+
|
|
34470
|
+
var MyInput$6 = /*#__PURE__*/function (_React$Component) {
|
|
34471
|
+
_inherits(MyInput, _React$Component);
|
|
34472
|
+
|
|
34473
|
+
var _super = _createSuper(MyInput);
|
|
34474
|
+
|
|
34475
|
+
function MyInput() {
|
|
34476
|
+
_classCallCheck(this, MyInput);
|
|
34477
|
+
|
|
34478
|
+
return _super.apply(this, arguments);
|
|
34479
|
+
}
|
|
34480
|
+
|
|
34481
|
+
_createClass(MyInput, [{
|
|
34482
|
+
key: "render",
|
|
34483
|
+
value: function render() {
|
|
34484
|
+
if (this.props.loading) {
|
|
34485
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Spin, {
|
|
34486
|
+
size: "small"
|
|
34487
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
34488
|
+
autoComplete: "off"
|
|
34489
|
+
})));
|
|
34490
|
+
} else {
|
|
34491
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
34492
|
+
autoComplete: "off"
|
|
34493
|
+
}));
|
|
34494
|
+
}
|
|
34495
|
+
}
|
|
34496
|
+
}]);
|
|
34497
|
+
|
|
34498
|
+
return MyInput;
|
|
34499
|
+
}(React__default['default'].Component);
|
|
34500
|
+
|
|
34501
|
+
var useOnRow$4 = (function () {
|
|
34502
|
+
/** 控制器 */
|
|
34503
|
+
var controller = Invoice.useInvoiceController();
|
|
34504
|
+
var model = controller.useMemo(function (s) {
|
|
34505
|
+
return s.model;
|
|
34506
|
+
}, []);
|
|
34507
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
34508
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
|
|
34509
|
+
var editGood;
|
|
34510
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
34511
|
+
while (1) {
|
|
34512
|
+
switch (_context2.prev = _context2.next) {
|
|
34513
|
+
case 0:
|
|
34514
|
+
if (!(model === 'readOnly')) {
|
|
34515
|
+
_context2.next = 2;
|
|
34516
|
+
break;
|
|
34517
|
+
}
|
|
34518
|
+
|
|
34519
|
+
return _context2.abrupt("return");
|
|
34520
|
+
|
|
34521
|
+
case 2:
|
|
34522
|
+
editGood = controller.state.passengerListState.editGood;
|
|
34523
|
+
|
|
34524
|
+
if (!editGood) {
|
|
34525
|
+
_context2.next = 14;
|
|
34526
|
+
break;
|
|
34527
|
+
}
|
|
34528
|
+
|
|
34529
|
+
if (!(editGood.$index === record.$index)) {
|
|
34530
|
+
_context2.next = 6;
|
|
34531
|
+
break;
|
|
34532
|
+
}
|
|
34533
|
+
|
|
34534
|
+
return _context2.abrupt("return");
|
|
34535
|
+
|
|
34536
|
+
case 6:
|
|
34537
|
+
_context2.next = 8;
|
|
34538
|
+
return controller.saveEditPassenger();
|
|
34539
|
+
|
|
34540
|
+
case 8:
|
|
34541
|
+
_context2.next = 10;
|
|
34542
|
+
return controller.wait();
|
|
34543
|
+
|
|
34544
|
+
case 10:
|
|
34545
|
+
_context2.next = 12;
|
|
34546
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
34547
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
34548
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
34549
|
+
while (1) {
|
|
34550
|
+
switch (_context.prev = _context.next) {
|
|
34551
|
+
case 0:
|
|
34552
|
+
_context.t0 = s.passengerListState.editGood;
|
|
34553
|
+
|
|
34554
|
+
if (_context.t0) {
|
|
34555
|
+
_context.next = 4;
|
|
34556
|
+
break;
|
|
34557
|
+
}
|
|
34558
|
+
|
|
34559
|
+
_context.next = 4;
|
|
34560
|
+
return controller.setEditPassenger(record);
|
|
34561
|
+
|
|
34562
|
+
case 4:
|
|
34563
|
+
case "end":
|
|
34564
|
+
return _context.stop();
|
|
34565
|
+
}
|
|
34566
|
+
}
|
|
34567
|
+
}, _callee);
|
|
34568
|
+
}));
|
|
34569
|
+
|
|
34570
|
+
return function (_x2) {
|
|
34571
|
+
return _ref2.apply(this, arguments);
|
|
34572
|
+
};
|
|
34573
|
+
}())();
|
|
34574
|
+
|
|
34575
|
+
case 12:
|
|
34576
|
+
_context2.next = 16;
|
|
34577
|
+
break;
|
|
34578
|
+
|
|
34579
|
+
case 14:
|
|
34580
|
+
_context2.next = 16;
|
|
34581
|
+
return controller.setEditPassenger(record);
|
|
34582
|
+
|
|
34583
|
+
case 16:
|
|
34584
|
+
case "end":
|
|
34585
|
+
return _context2.stop();
|
|
34586
|
+
}
|
|
34587
|
+
}
|
|
34588
|
+
}, _callee2);
|
|
34589
|
+
}));
|
|
34590
|
+
|
|
34591
|
+
return function (_x) {
|
|
34592
|
+
return _ref.apply(this, arguments);
|
|
34593
|
+
};
|
|
34594
|
+
}(), [controller, model]);
|
|
34595
|
+
return {
|
|
34596
|
+
onClick: onClick
|
|
34597
|
+
};
|
|
34598
|
+
});
|
|
34599
|
+
|
|
34600
|
+
/**
|
|
34601
|
+
* 点击组件外部 保存正在编辑的行
|
|
34602
|
+
*/
|
|
34603
|
+
/**
|
|
34604
|
+
* 点击组件外部 保存正在编辑的货物
|
|
34605
|
+
*/
|
|
34606
|
+
|
|
34607
|
+
function useWindowClick$4(controller) {
|
|
34608
|
+
/** 点击组件外部 保存正在编辑的货物 */
|
|
34609
|
+
React__default['default'].useEffect(function () {
|
|
34610
|
+
var click = function click() {
|
|
34611
|
+
setTimeout(controller.saveEditPassenger);
|
|
34612
|
+
};
|
|
34613
|
+
|
|
34614
|
+
window.addEventListener('click', click);
|
|
34615
|
+
return function () {
|
|
34616
|
+
window.removeEventListener('click', click);
|
|
34617
|
+
};
|
|
34618
|
+
}, [controller]);
|
|
34619
|
+
}
|
|
34620
|
+
|
|
34621
|
+
var useRowSelection$4 = (function () {
|
|
34622
|
+
/** 控制器 */
|
|
34623
|
+
var controller = Invoice.useInvoiceController();
|
|
34624
|
+
/** 列表选中的货物索引列表 */
|
|
34625
|
+
|
|
34626
|
+
var selectedRowKeys = controller.useMemo(function (s) {
|
|
34627
|
+
return s.passengerListState.selectedGoodIndex;
|
|
34628
|
+
}, []);
|
|
34629
|
+
/** 货物列表 */
|
|
34630
|
+
|
|
34631
|
+
var goodsList = controller.useMemo(function (s) {
|
|
34632
|
+
return s.passengerListState.goodsList;
|
|
34633
|
+
}, []);
|
|
34634
|
+
/** 组件模式 */
|
|
34635
|
+
|
|
34636
|
+
var model = controller.useMemo(function (s) {
|
|
34637
|
+
return s.model;
|
|
34638
|
+
}, []);
|
|
34639
|
+
/** 搜索条件 */
|
|
34640
|
+
// const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
|
|
34641
|
+
|
|
34642
|
+
/** 是否显示选择框 */
|
|
34643
|
+
|
|
34644
|
+
var isShow = React__default['default'].useMemo(function () {
|
|
34645
|
+
if (model === 'readOnly' || model === 'prefab') return false;
|
|
34646
|
+
return true;
|
|
34647
|
+
}, [model]);
|
|
34648
|
+
/** 是否全选 */
|
|
34649
|
+
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
34650
|
+
|
|
34651
|
+
var isAll = controller.useMemo(function (s) {
|
|
34652
|
+
if (s.passengerListState.selectedGoodIndex.length <= 0) return false;
|
|
34653
|
+
var seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
|
|
34654
|
+
return e.$index;
|
|
34655
|
+
});
|
|
34656
|
+
var selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
|
|
34657
|
+
return seeGoodsIndex.some(function (t) {
|
|
34658
|
+
return e === t;
|
|
34659
|
+
});
|
|
34660
|
+
});
|
|
34661
|
+
return selectedGoodIndex.length === seeGoodsIndex.length;
|
|
34662
|
+
}, []);
|
|
34663
|
+
var indeterminate = controller.useMemo(function (s) {
|
|
34664
|
+
var seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
|
|
34665
|
+
return e.$index;
|
|
34666
|
+
});
|
|
34667
|
+
var selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
|
|
34668
|
+
return seeGoodsIndex.some(function (t) {
|
|
34669
|
+
return e === t;
|
|
34670
|
+
});
|
|
34671
|
+
});
|
|
34672
|
+
if (selectedGoodIndex.length === 0) return false;
|
|
34673
|
+
return selectedGoodIndex.length < seeGoodsIndex.length;
|
|
34674
|
+
}, []);
|
|
34675
|
+
/** 点击了全选 */
|
|
34676
|
+
|
|
34677
|
+
var onClickSelectAll = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
34678
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
34679
|
+
while (1) {
|
|
34680
|
+
switch (_context3.prev = _context3.next) {
|
|
34681
|
+
case 0:
|
|
34682
|
+
if (!isAll) {
|
|
34683
|
+
_context3.next = 5;
|
|
34684
|
+
break;
|
|
34685
|
+
}
|
|
34686
|
+
|
|
34687
|
+
_context3.next = 3;
|
|
34688
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
34689
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
34690
|
+
var seeGoodsIndex;
|
|
34691
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
34692
|
+
while (1) {
|
|
34693
|
+
switch (_context.prev = _context.next) {
|
|
34694
|
+
case 0:
|
|
34695
|
+
seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
|
|
34696
|
+
return e.$index;
|
|
34697
|
+
});
|
|
34698
|
+
s.passengerListState.selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
|
|
34699
|
+
return !seeGoodsIndex.some(function (t) {
|
|
34700
|
+
return e === t;
|
|
34701
|
+
});
|
|
34702
|
+
});
|
|
34703
|
+
|
|
34704
|
+
case 2:
|
|
34705
|
+
case "end":
|
|
34706
|
+
return _context.stop();
|
|
34707
|
+
}
|
|
34708
|
+
}
|
|
34709
|
+
}, _callee);
|
|
34710
|
+
}));
|
|
34711
|
+
|
|
34712
|
+
return function (_x) {
|
|
34713
|
+
return _ref2.apply(this, arguments);
|
|
34714
|
+
};
|
|
34715
|
+
}())();
|
|
34716
|
+
|
|
34717
|
+
case 3:
|
|
34718
|
+
_context3.next = 7;
|
|
34719
|
+
break;
|
|
34720
|
+
|
|
34721
|
+
case 5:
|
|
34722
|
+
_context3.next = 7;
|
|
34723
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
34724
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
34725
|
+
var seeGoodsIndex;
|
|
34726
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
34727
|
+
while (1) {
|
|
34728
|
+
switch (_context2.prev = _context2.next) {
|
|
34729
|
+
case 0:
|
|
34730
|
+
seeGoodsIndex = s.passengerListState.goodsList.map(function (e) {
|
|
34731
|
+
return e.$index;
|
|
34732
|
+
});
|
|
34733
|
+
s.passengerListState.selectedGoodIndex = [].concat(_toConsumableArray(s.passengerListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
|
|
34734
|
+
s.passengerListState.selectedGoodIndex = Array.from(new Set(s.passengerListState.selectedGoodIndex));
|
|
34735
|
+
|
|
34736
|
+
case 3:
|
|
34737
|
+
case "end":
|
|
34738
|
+
return _context2.stop();
|
|
34739
|
+
}
|
|
34740
|
+
}
|
|
34741
|
+
}, _callee2);
|
|
34742
|
+
}));
|
|
34743
|
+
|
|
34744
|
+
return function (_x2) {
|
|
34745
|
+
return _ref3.apply(this, arguments);
|
|
34746
|
+
};
|
|
34747
|
+
}())();
|
|
34748
|
+
|
|
34749
|
+
case 7:
|
|
34750
|
+
case "end":
|
|
34751
|
+
return _context3.stop();
|
|
34752
|
+
}
|
|
34753
|
+
}
|
|
34754
|
+
}, _callee3);
|
|
34755
|
+
})), [controller, isAll]);
|
|
34756
|
+
var onSelect = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
34757
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
|
|
34758
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
34759
|
+
while (1) {
|
|
34760
|
+
switch (_context6.prev = _context6.next) {
|
|
34761
|
+
case 0:
|
|
34762
|
+
if (!selected) {
|
|
34763
|
+
_context6.next = 5;
|
|
34764
|
+
break;
|
|
34765
|
+
}
|
|
34766
|
+
|
|
34767
|
+
_context6.next = 3;
|
|
34768
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
34769
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
34770
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
34771
|
+
while (1) {
|
|
34772
|
+
switch (_context4.prev = _context4.next) {
|
|
34773
|
+
case 0:
|
|
34774
|
+
s.passengerListState.selectedGoodIndex = [].concat(_toConsumableArray(s.passengerListState.selectedGoodIndex), [record.$index]);
|
|
34775
|
+
s.passengerListState = _objectSpread2({}, s.passengerListState);
|
|
34776
|
+
|
|
34777
|
+
case 2:
|
|
34778
|
+
case "end":
|
|
34779
|
+
return _context4.stop();
|
|
34780
|
+
}
|
|
34781
|
+
}
|
|
34782
|
+
}, _callee4);
|
|
34783
|
+
}));
|
|
34784
|
+
|
|
34785
|
+
return function (_x5) {
|
|
34786
|
+
return _ref5.apply(this, arguments);
|
|
34787
|
+
};
|
|
34788
|
+
}())();
|
|
34789
|
+
|
|
34790
|
+
case 3:
|
|
34791
|
+
_context6.next = 7;
|
|
34792
|
+
break;
|
|
34793
|
+
|
|
34794
|
+
case 5:
|
|
34795
|
+
_context6.next = 7;
|
|
34796
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
34797
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
|
|
34798
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
34799
|
+
while (1) {
|
|
34800
|
+
switch (_context5.prev = _context5.next) {
|
|
34801
|
+
case 0:
|
|
34802
|
+
s.passengerListState.selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
|
|
34803
|
+
return e !== record.$index;
|
|
34804
|
+
});
|
|
34805
|
+
s.passengerListState = _objectSpread2({}, s.passengerListState);
|
|
34806
|
+
|
|
34807
|
+
case 2:
|
|
34808
|
+
case "end":
|
|
34809
|
+
return _context5.stop();
|
|
34810
|
+
}
|
|
34811
|
+
}
|
|
34812
|
+
}, _callee5);
|
|
34813
|
+
}));
|
|
34814
|
+
|
|
34815
|
+
return function (_x6) {
|
|
34816
|
+
return _ref6.apply(this, arguments);
|
|
34817
|
+
};
|
|
34818
|
+
}())();
|
|
34819
|
+
|
|
34820
|
+
case 7:
|
|
34821
|
+
case "end":
|
|
34822
|
+
return _context6.stop();
|
|
34823
|
+
}
|
|
34824
|
+
}
|
|
34825
|
+
}, _callee6);
|
|
34826
|
+
}));
|
|
34827
|
+
|
|
34828
|
+
return function (_x3, _x4) {
|
|
34829
|
+
return _ref4.apply(this, arguments);
|
|
34830
|
+
};
|
|
34831
|
+
}(), [controller]);
|
|
34832
|
+
var columnTitle = React__default['default'].useMemo(function () {
|
|
34833
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Checkbox, {
|
|
34834
|
+
onChange: onClickSelectAll,
|
|
34835
|
+
indeterminate: indeterminate,
|
|
34836
|
+
checked: isAll
|
|
34837
|
+
});
|
|
34838
|
+
}, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
|
|
34839
|
+
/** 选择了商品后 调整 折扣行 和 被折扣行 */
|
|
34840
|
+
|
|
34841
|
+
var sortOut = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
34842
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
|
|
34843
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
34844
|
+
while (1) {
|
|
34845
|
+
switch (_context8.prev = _context8.next) {
|
|
34846
|
+
case 0:
|
|
34847
|
+
_context8.next = 2;
|
|
34848
|
+
return controller.wait();
|
|
34849
|
+
|
|
34850
|
+
case 2:
|
|
34851
|
+
_context8.next = 4;
|
|
34852
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
34853
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
|
|
34854
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
34855
|
+
while (1) {
|
|
34856
|
+
switch (_context7.prev = _context7.next) {
|
|
34857
|
+
case 0:
|
|
34858
|
+
s.passengerListState.selectedGoodIndex.forEach(function ($index) {
|
|
34859
|
+
var goods = s.passengerListState.goodsMap.get($index);
|
|
34860
|
+
if (!goods) return; // 数组位置
|
|
34861
|
+
|
|
34862
|
+
var t = s.passengerListState.goodsList.indexOf(goods); // goods.lineAttribute === LineAttributeType.折扣行 ? t : t++;
|
|
34863
|
+
|
|
34864
|
+
var i = s.goodsListState.goodsList[t].$index;
|
|
34865
|
+
|
|
34866
|
+
if (selected) {
|
|
34867
|
+
if (s.passengerListState.selectedGoodIndex.indexOf(i) < 0) s.passengerListState.selectedGoodIndex = [].concat(_toConsumableArray(s.passengerListState.selectedGoodIndex), [i]);
|
|
34868
|
+
} else {
|
|
34869
|
+
if (s.passengerListState.selectedGoodIndex.indexOf(i) < 0) s.passengerListState.selectedGoodIndex = s.passengerListState.selectedGoodIndex.filter(function (e) {
|
|
34870
|
+
return e !== $index;
|
|
34871
|
+
});
|
|
34872
|
+
}
|
|
34873
|
+
});
|
|
34874
|
+
|
|
34875
|
+
case 1:
|
|
34876
|
+
case "end":
|
|
34877
|
+
return _context7.stop();
|
|
34878
|
+
}
|
|
34879
|
+
}
|
|
34880
|
+
}, _callee7);
|
|
34881
|
+
}));
|
|
34882
|
+
|
|
34883
|
+
return function (_x8) {
|
|
34884
|
+
return _ref8.apply(this, arguments);
|
|
34885
|
+
};
|
|
34886
|
+
}())();
|
|
34887
|
+
|
|
34888
|
+
case 4:
|
|
34889
|
+
case "end":
|
|
34890
|
+
return _context8.stop();
|
|
34891
|
+
}
|
|
34892
|
+
}
|
|
34893
|
+
}, _callee8);
|
|
34894
|
+
}));
|
|
34895
|
+
|
|
34896
|
+
return function (_x7) {
|
|
34897
|
+
return _ref7.apply(this, arguments);
|
|
34898
|
+
};
|
|
34899
|
+
}(), [controller]); // React.useEffect(() => {
|
|
34900
|
+
// sortOut(true);
|
|
34901
|
+
// }, [sortOut, goodsList])
|
|
34902
|
+
|
|
34903
|
+
if (isShow === false) return undefined;
|
|
34904
|
+
return {
|
|
34905
|
+
columnWidth: 45,
|
|
34906
|
+
columnTitle: columnTitle,
|
|
34907
|
+
onSelect: onSelect,
|
|
34908
|
+
selectedRowKeys: selectedRowKeys
|
|
34909
|
+
};
|
|
34910
|
+
});
|
|
34911
|
+
|
|
34912
|
+
var useDelRowButton$4 = (function () {
|
|
34913
|
+
var controller = Invoice.useInvoiceController();
|
|
34914
|
+
var model = controller.useMemo(function (s) {
|
|
34915
|
+
return s.model;
|
|
34916
|
+
}, []);
|
|
34917
|
+
var isRemRow = controller.useMemo(function (s) {
|
|
34918
|
+
return s.passengerListState.isRemRow;
|
|
34919
|
+
}, []);
|
|
34920
|
+
/** 是否禁用 */
|
|
34921
|
+
|
|
34922
|
+
var disabled = controller.useMemo(function (s) {
|
|
34923
|
+
if (s.passengerListState.selectedGoodIndex.length <= 0) return true;
|
|
34924
|
+
return false;
|
|
34925
|
+
}, []);
|
|
34926
|
+
/** 点击了删除 */
|
|
34927
|
+
|
|
34928
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
34929
|
+
var selectedGoodIndex, i;
|
|
34930
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
34931
|
+
while (1) {
|
|
34932
|
+
switch (_context2.prev = _context2.next) {
|
|
34933
|
+
case 0:
|
|
34934
|
+
selectedGoodIndex = controller.state.passengerListState.selectedGoodIndex.slice();
|
|
34935
|
+
i = 0;
|
|
34936
|
+
|
|
34937
|
+
case 2:
|
|
34938
|
+
if (!(i < selectedGoodIndex.length)) {
|
|
34939
|
+
_context2.next = 8;
|
|
34940
|
+
break;
|
|
34941
|
+
}
|
|
34942
|
+
|
|
34943
|
+
_context2.next = 5;
|
|
34944
|
+
return controller.delPassenger(selectedGoodIndex[i]);
|
|
34945
|
+
|
|
34946
|
+
case 5:
|
|
34947
|
+
i++;
|
|
34948
|
+
_context2.next = 2;
|
|
34949
|
+
break;
|
|
34950
|
+
|
|
34951
|
+
case 8:
|
|
34952
|
+
_context2.next = 10;
|
|
34953
|
+
return controller.run( /*#__PURE__*/function () {
|
|
34954
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
34955
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
34956
|
+
while (1) {
|
|
34957
|
+
switch (_context.prev = _context.next) {
|
|
34958
|
+
case 0:
|
|
34959
|
+
s.passengerListState.selectedGoodIndex = [];
|
|
34960
|
+
|
|
34961
|
+
case 1:
|
|
34962
|
+
case "end":
|
|
34963
|
+
return _context.stop();
|
|
34964
|
+
}
|
|
34965
|
+
}
|
|
34966
|
+
}, _callee);
|
|
34967
|
+
}));
|
|
34968
|
+
|
|
34969
|
+
return function (_x) {
|
|
34970
|
+
return _ref2.apply(this, arguments);
|
|
34971
|
+
};
|
|
34972
|
+
}());
|
|
34973
|
+
|
|
34974
|
+
case 10:
|
|
34975
|
+
case "end":
|
|
34976
|
+
return _context2.stop();
|
|
34977
|
+
}
|
|
34978
|
+
}
|
|
34979
|
+
}, _callee2);
|
|
34980
|
+
})), []);
|
|
34981
|
+
var menuItem = React__default['default'].useMemo(function () {
|
|
34982
|
+
if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
34983
|
+
if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
34984
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Menu.Item, {
|
|
34985
|
+
key: "1",
|
|
34986
|
+
onClick: onClick,
|
|
34987
|
+
disabled: disabled
|
|
34988
|
+
}, " \u5220\u9664\u884C ");
|
|
34989
|
+
}, [model, onClick, disabled]);
|
|
34990
|
+
var button = React__default['default'].useMemo(function () {
|
|
34991
|
+
if (isRemRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
34992
|
+
if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
34993
|
+
if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
34994
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
34995
|
+
size: 'small',
|
|
34996
|
+
onClick: onClick,
|
|
34997
|
+
disabled: disabled
|
|
34998
|
+
}, "\u5220\u9664");
|
|
34999
|
+
}, [model, onClick, disabled, isRemRow]);
|
|
35000
|
+
return {
|
|
35001
|
+
button: button,
|
|
35002
|
+
menuItem: menuItem
|
|
35003
|
+
};
|
|
35004
|
+
});
|
|
35005
|
+
|
|
35006
|
+
var css_248z$E = ".kts-invoice-operate-freight {\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-freight .real-estate-info-digtal-label {\n padding: 20px 20px 0;\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-freight .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-goods-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-goods-list-digtal .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list-digtal .kts-invoice-operate-freight-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-goods-list-digtal .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-be-discount .ktsAntX-table-cell {\n color: #f00;\n}\n.kts-invoice-operate-goods-list-table-digtal .ktsAnt3x-form-item-control.has-error {\n border: 1px solid #f00;\n}\n.kts-invoice-operate-goods-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-goods-list-table-digtal .kts-invoice-operate-goods-list-table-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n";
|
|
35007
|
+
styleInject(css_248z$E);
|
|
35008
|
+
|
|
35009
|
+
var BatchImportButton = (function () {
|
|
35010
|
+
var controller = Invoice.useInvoiceController();
|
|
35011
|
+
var model = controller.useMemo(function (s) {
|
|
35012
|
+
return s.model;
|
|
35013
|
+
}, []);
|
|
35014
|
+
var rootElement = controller.useMemo(function (s) {
|
|
35015
|
+
return s.rootElement;
|
|
35016
|
+
}, []);
|
|
35017
|
+
/** 产品数据量 */
|
|
35018
|
+
|
|
35019
|
+
var goodsNum = controller.useMemo(function (s) {
|
|
35020
|
+
return s.passengerListState.goodsList.length;
|
|
35021
|
+
}, []);
|
|
35022
|
+
var isBatchImport = controller.useMemo(function (s) {
|
|
35023
|
+
return s.passengerListState.isBatchImport;
|
|
35024
|
+
}, []);
|
|
35025
|
+
/** 产品最大数 */
|
|
35026
|
+
|
|
35027
|
+
var goodMax = controller.useMemo(function (s) {
|
|
35028
|
+
return s.passengerListState.goodMax;
|
|
35029
|
+
}, []);
|
|
35030
|
+
/** 按钮是否禁用 */
|
|
35031
|
+
|
|
35032
|
+
var disabled = React__default['default'].useMemo(function () {
|
|
35033
|
+
return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
|
|
35034
|
+
}, [goodMax, goodsNum]);
|
|
35035
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
35036
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
35037
|
+
while (1) {
|
|
35038
|
+
switch (_context.prev = _context.next) {
|
|
35039
|
+
case 0:
|
|
35040
|
+
_context.next = 2;
|
|
35041
|
+
return importGood(controller);
|
|
35042
|
+
|
|
35043
|
+
case 2:
|
|
35044
|
+
_context.next = 4;
|
|
35045
|
+
return rollBottom$5(controller, rootElement);
|
|
35046
|
+
|
|
35047
|
+
case 4:
|
|
35048
|
+
case "end":
|
|
35049
|
+
return _context.stop();
|
|
35050
|
+
}
|
|
35051
|
+
}
|
|
35052
|
+
}, _callee);
|
|
35053
|
+
})), [controller, rootElement]);
|
|
35054
|
+
if (isBatchImport === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
35055
|
+
if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
35056
|
+
if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
35057
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
35058
|
+
size: 'small',
|
|
35059
|
+
onClick: onClick,
|
|
35060
|
+
disabled: disabled
|
|
35061
|
+
}, "\u6279\u91CF\u5BFC\u5165");
|
|
35062
|
+
});
|
|
35063
|
+
/** 导入 */
|
|
35064
|
+
|
|
35065
|
+
function importGood(_x) {
|
|
35066
|
+
return _importGood.apply(this, arguments);
|
|
35067
|
+
}
|
|
35068
|
+
/** 货物列表,滚动到底部 */
|
|
35069
|
+
|
|
35070
|
+
|
|
35071
|
+
function _importGood() {
|
|
35072
|
+
_importGood = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
|
|
35073
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
35074
|
+
while (1) {
|
|
35075
|
+
switch (_context4.prev = _context4.next) {
|
|
35076
|
+
case 0:
|
|
35077
|
+
_context4.next = 2;
|
|
35078
|
+
return controller.saveEditPassenger();
|
|
35079
|
+
|
|
35080
|
+
case 2:
|
|
35081
|
+
_context4.next = 4;
|
|
35082
|
+
return controller.wait();
|
|
35083
|
+
|
|
35084
|
+
case 4:
|
|
35085
|
+
_context4.next = 6;
|
|
35086
|
+
return controller.run( /*#__PURE__*/function () {
|
|
35087
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
35088
|
+
var _controller$state$pas;
|
|
35089
|
+
|
|
35090
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
35091
|
+
while (1) {
|
|
35092
|
+
switch (_context3.prev = _context3.next) {
|
|
35093
|
+
case 0:
|
|
35094
|
+
if (!s.passengerListState.editGood) {
|
|
35095
|
+
_context3.next = 3;
|
|
35096
|
+
break;
|
|
35097
|
+
}
|
|
35098
|
+
|
|
35099
|
+
_context3.next = 3;
|
|
35100
|
+
return (_controller$state$pas = controller.state.passengerListState.form) === null || _controller$state$pas === void 0 ? void 0 : _controller$state$pas.validateFields( /*#__PURE__*/function () {
|
|
35101
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
35102
|
+
var firstError;
|
|
35103
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
35104
|
+
while (1) {
|
|
35105
|
+
switch (_context2.prev = _context2.next) {
|
|
35106
|
+
case 0:
|
|
35107
|
+
if (!err) {
|
|
35108
|
+
_context2.next = 4;
|
|
35109
|
+
break;
|
|
35110
|
+
}
|
|
35111
|
+
|
|
35112
|
+
firstError = Object.values(err)[0];
|
|
35113
|
+
ktsXui.message.error({
|
|
35114
|
+
content: firstError.errors[0].message,
|
|
35115
|
+
key: '你正在编辑一条数据'
|
|
35116
|
+
});
|
|
35117
|
+
return _context2.abrupt("return");
|
|
35118
|
+
|
|
35119
|
+
case 4:
|
|
35120
|
+
case "end":
|
|
35121
|
+
return _context2.stop();
|
|
35122
|
+
}
|
|
35123
|
+
}
|
|
35124
|
+
}, _callee2);
|
|
35125
|
+
}));
|
|
35126
|
+
|
|
35127
|
+
return function (_x5, _x6) {
|
|
35128
|
+
return _ref3.apply(this, arguments);
|
|
35129
|
+
};
|
|
35130
|
+
}());
|
|
35131
|
+
|
|
35132
|
+
case 3:
|
|
35133
|
+
s.passengerListState.isVisibleDrawer = true;
|
|
35134
|
+
|
|
35135
|
+
case 4:
|
|
35136
|
+
case "end":
|
|
35137
|
+
return _context3.stop();
|
|
35138
|
+
}
|
|
35139
|
+
}
|
|
35140
|
+
}, _callee3);
|
|
35141
|
+
}));
|
|
35142
|
+
|
|
35143
|
+
return function (_x4) {
|
|
35144
|
+
return _ref2.apply(this, arguments);
|
|
35145
|
+
};
|
|
35146
|
+
}());
|
|
35147
|
+
|
|
35148
|
+
case 6:
|
|
35149
|
+
case "end":
|
|
35150
|
+
return _context4.stop();
|
|
35151
|
+
}
|
|
35152
|
+
}
|
|
35153
|
+
}, _callee4);
|
|
35154
|
+
}));
|
|
35155
|
+
return _importGood.apply(this, arguments);
|
|
35156
|
+
}
|
|
35157
|
+
|
|
35158
|
+
function rollBottom$5(_x2, _x3) {
|
|
35159
|
+
return _rollBottom$5.apply(this, arguments);
|
|
35160
|
+
}
|
|
35161
|
+
|
|
35162
|
+
function _rollBottom$5() {
|
|
35163
|
+
_rollBottom$5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
|
|
35164
|
+
var cont;
|
|
35165
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
35166
|
+
while (1) {
|
|
35167
|
+
switch (_context5.prev = _context5.next) {
|
|
35168
|
+
case 0:
|
|
35169
|
+
_context5.next = 2;
|
|
35170
|
+
return controller.wait();
|
|
35171
|
+
|
|
35172
|
+
case 2:
|
|
35173
|
+
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
35174
|
+
|
|
35175
|
+
if (cont) {
|
|
35176
|
+
_context5.next = 5;
|
|
35177
|
+
break;
|
|
35178
|
+
}
|
|
35179
|
+
|
|
35180
|
+
return _context5.abrupt("return");
|
|
35181
|
+
|
|
35182
|
+
case 5:
|
|
35183
|
+
cont.scrollTop = cont.scrollHeight;
|
|
35184
|
+
|
|
35185
|
+
case 6:
|
|
35186
|
+
case "end":
|
|
35187
|
+
return _context5.stop();
|
|
35188
|
+
}
|
|
35189
|
+
}
|
|
35190
|
+
}, _callee5);
|
|
35191
|
+
}));
|
|
35192
|
+
return _rollBottom$5.apply(this, arguments);
|
|
35193
|
+
}
|
|
35194
|
+
|
|
35195
|
+
var PassengerList = /*#__PURE__*/function (_React$Component) {
|
|
35196
|
+
_inherits(PassengerList, _React$Component);
|
|
35197
|
+
|
|
35198
|
+
var _super = _createSuper(PassengerList);
|
|
35199
|
+
|
|
35200
|
+
function PassengerList() {
|
|
35201
|
+
_classCallCheck(this, PassengerList);
|
|
35202
|
+
|
|
35203
|
+
return _super.apply(this, arguments);
|
|
35204
|
+
}
|
|
35205
|
+
|
|
35206
|
+
_createClass(PassengerList, [{
|
|
35207
|
+
key: "render",
|
|
35208
|
+
value: function render() {
|
|
35209
|
+
return /*#__PURE__*/React__default['default'].createElement(Main$6, _objectSpread2({}, this.props));
|
|
35210
|
+
}
|
|
35211
|
+
}]);
|
|
35212
|
+
|
|
35213
|
+
return PassengerList;
|
|
35214
|
+
}(React__default['default'].Component);
|
|
35215
|
+
var Main$6 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
35216
|
+
var form = props.form;
|
|
35217
|
+
|
|
35218
|
+
var _React$useState = React__default['default'].useState(typeof props.required === 'boolean' ? props.required : true),
|
|
35219
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35220
|
+
isRequired = _React$useState2[0],
|
|
35221
|
+
setRequired = _React$useState2[1];
|
|
35222
|
+
/** 控制器 */
|
|
35223
|
+
|
|
35224
|
+
|
|
35225
|
+
var controller = Invoice.useInvoiceController();
|
|
35226
|
+
var goodsList = controller.useMemo(function (s) {
|
|
35227
|
+
return s.passengerListState.goodsList;
|
|
35228
|
+
}, []);
|
|
35229
|
+
/** 货物列表 */
|
|
35230
|
+
|
|
35231
|
+
var dataSource = controller.useMemo(function (s) {
|
|
35232
|
+
return s.passengerListState.goodsList;
|
|
35233
|
+
}, []);
|
|
35234
|
+
/** 表格行事件 */
|
|
35235
|
+
|
|
35236
|
+
var _onRow = useOnRow$4();
|
|
35237
|
+
/** 批量删除 */
|
|
35238
|
+
|
|
35239
|
+
|
|
35240
|
+
var delRowButton = useDelRowButton$4();
|
|
35241
|
+
useWindowClick$4(controller); // 点击组件外部 保存正在编辑的货物
|
|
35242
|
+
|
|
35243
|
+
/** 注册 from 对象 */
|
|
35244
|
+
|
|
35245
|
+
React__default['default'].useEffect(function () {
|
|
35246
|
+
controller.pipeline( /*#__PURE__*/function () {
|
|
35247
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, form) {
|
|
35248
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
35249
|
+
while (1) {
|
|
35250
|
+
switch (_context.prev = _context.next) {
|
|
35251
|
+
case 0:
|
|
35252
|
+
s.passengerListState = _objectSpread2(_objectSpread2({}, s.passengerListState), {}, {
|
|
35253
|
+
form: form
|
|
35254
|
+
});
|
|
35255
|
+
|
|
35256
|
+
case 1:
|
|
35257
|
+
case "end":
|
|
35258
|
+
return _context.stop();
|
|
35259
|
+
}
|
|
35260
|
+
}
|
|
35261
|
+
}, _callee);
|
|
35262
|
+
}));
|
|
35263
|
+
|
|
35264
|
+
return function (_x, _x2) {
|
|
35265
|
+
return _ref.apply(this, arguments);
|
|
35266
|
+
};
|
|
35267
|
+
}())(props.form);
|
|
35268
|
+
}, [controller, props.form]);
|
|
35269
|
+
React__default['default'].useEffect(function () {
|
|
35270
|
+
controller.run( /*#__PURE__*/function () {
|
|
35271
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
35272
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
35273
|
+
while (1) {
|
|
35274
|
+
switch (_context2.prev = _context2.next) {
|
|
35275
|
+
case 0:
|
|
35276
|
+
s.passengerListState.addressFieldNames = props.fieldNames;
|
|
35277
|
+
|
|
35278
|
+
case 1:
|
|
35279
|
+
case "end":
|
|
35280
|
+
return _context2.stop();
|
|
35281
|
+
}
|
|
35282
|
+
}
|
|
35283
|
+
}, _callee2);
|
|
35284
|
+
}));
|
|
35285
|
+
|
|
35286
|
+
return function (_x3) {
|
|
35287
|
+
return _ref2.apply(this, arguments);
|
|
35288
|
+
};
|
|
35289
|
+
}());
|
|
35290
|
+
}, [props.fieldNames]);
|
|
35291
|
+
React__default['default'].useEffect(function () {
|
|
35292
|
+
controller.run( /*#__PURE__*/function () {
|
|
35293
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
35294
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
35295
|
+
while (1) {
|
|
35296
|
+
switch (_context3.prev = _context3.next) {
|
|
35297
|
+
case 0:
|
|
35298
|
+
if (props.certificateTypeList) {
|
|
35299
|
+
s.passengerListState.certificateTypeList = props.certificateTypeList;
|
|
35300
|
+
}
|
|
35301
|
+
|
|
35302
|
+
if (props.vehicleTypeList) {
|
|
35303
|
+
s.passengerListState.vehicleTypeList = props.vehicleTypeList;
|
|
35304
|
+
}
|
|
35305
|
+
|
|
35306
|
+
case 2:
|
|
35307
|
+
case "end":
|
|
35308
|
+
return _context3.stop();
|
|
35309
|
+
}
|
|
35310
|
+
}
|
|
35311
|
+
}, _callee3);
|
|
35312
|
+
}));
|
|
35313
|
+
|
|
35314
|
+
return function (_x4) {
|
|
35315
|
+
return _ref3.apply(this, arguments);
|
|
35316
|
+
};
|
|
35317
|
+
}());
|
|
35318
|
+
}, [props.vehicleTypeList, props.certificateTypeList]);
|
|
35319
|
+
React__default['default'].useEffect(function () {
|
|
35320
|
+
controller.run( /*#__PURE__*/function () {
|
|
35321
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
35322
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
35323
|
+
while (1) {
|
|
35324
|
+
switch (_context4.prev = _context4.next) {
|
|
35325
|
+
case 0:
|
|
35326
|
+
s.passengerListState.area = props.addressOptions;
|
|
35327
|
+
|
|
35328
|
+
case 1:
|
|
35329
|
+
case "end":
|
|
35330
|
+
return _context4.stop();
|
|
35331
|
+
}
|
|
35332
|
+
}
|
|
35333
|
+
}, _callee4);
|
|
35334
|
+
}));
|
|
35335
|
+
|
|
35336
|
+
return function (_x5) {
|
|
35337
|
+
return _ref4.apply(this, arguments);
|
|
35338
|
+
};
|
|
35339
|
+
}());
|
|
35340
|
+
}, [props.addressOptions]); // 跟新 货物
|
|
35341
|
+
|
|
35342
|
+
React__default['default'].useEffect(function () {
|
|
35343
|
+
controller.run( /*#__PURE__*/function () {
|
|
35344
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
|
|
35345
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
35346
|
+
while (1) {
|
|
35347
|
+
switch (_context5.prev = _context5.next) {
|
|
35348
|
+
case 0:
|
|
35349
|
+
s.passengerListState.goodsMap = new Map();
|
|
35350
|
+
goodsList.forEach(function (e) {
|
|
35351
|
+
s.passengerListState.goodsMap.set(e.$index, e);
|
|
35352
|
+
});
|
|
35353
|
+
|
|
35354
|
+
case 2:
|
|
35355
|
+
case "end":
|
|
35356
|
+
return _context5.stop();
|
|
35357
|
+
}
|
|
35358
|
+
}
|
|
35359
|
+
}, _callee5);
|
|
35360
|
+
}));
|
|
35361
|
+
|
|
35362
|
+
return function (_x6) {
|
|
35363
|
+
return _ref5.apply(this, arguments);
|
|
35364
|
+
};
|
|
35365
|
+
}());
|
|
35366
|
+
}, [controller, goodsList]);
|
|
35367
|
+
/** props 产品最大数 更新 */
|
|
35368
|
+
|
|
35369
|
+
React__default['default'].useEffect(function () {
|
|
35370
|
+
controller.pipeline( /*#__PURE__*/function () {
|
|
35371
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
|
|
35372
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
35373
|
+
while (1) {
|
|
35374
|
+
switch (_context6.prev = _context6.next) {
|
|
35375
|
+
case 0:
|
|
35376
|
+
s.passengerListState.goodMax = props.goodMax;
|
|
35377
|
+
|
|
35378
|
+
case 1:
|
|
35379
|
+
case "end":
|
|
35380
|
+
return _context6.stop();
|
|
35381
|
+
}
|
|
35382
|
+
}
|
|
35383
|
+
}, _callee6);
|
|
35384
|
+
}));
|
|
35385
|
+
|
|
35386
|
+
return function (_x7) {
|
|
35387
|
+
return _ref6.apply(this, arguments);
|
|
35388
|
+
};
|
|
35389
|
+
}())();
|
|
35390
|
+
}, [controller, props.goodMax]); // 注册 form
|
|
35391
|
+
// controller.useForm('freightInfo', form);
|
|
35392
|
+
|
|
35393
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35394
|
+
className: "kts-invoice-operate-freight"
|
|
35395
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35396
|
+
className: 'real-estate-info-digtal-label'
|
|
35397
|
+
}, "\u7279\u5B9A\u4FE1\u606F-\u65C5\u5BA2\u8FD0\u8F93\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35398
|
+
className: "kts-invoice-operate-goods-list-digtal",
|
|
35399
|
+
onClick: function onClick(e) {
|
|
35400
|
+
e.stopPropagation();
|
|
35401
|
+
}
|
|
35402
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35403
|
+
className: "kts-invoice-operate-freight-list-able"
|
|
35404
|
+
}, /*#__PURE__*/React__default['default'].createElement(AddRowButton$4, null), delRowButton.button, /*#__PURE__*/React__default['default'].createElement(BatchImportButton, null), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35405
|
+
style: {
|
|
35406
|
+
flex: 1
|
|
35407
|
+
}
|
|
35408
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
35409
|
+
className: classnames__default['default']('kts-invoice-operate-goods-list-table-digtal')
|
|
35410
|
+
}, /*#__PURE__*/React__default['default'].createElement(TableVirtual$4, {
|
|
35411
|
+
size: "small",
|
|
35412
|
+
rowKey: "$index",
|
|
35413
|
+
pagination: false,
|
|
35414
|
+
scroll: {
|
|
35415
|
+
y: 280
|
|
35416
|
+
},
|
|
35417
|
+
components: {
|
|
35418
|
+
body: {
|
|
35419
|
+
row: TableRow$4
|
|
35420
|
+
}
|
|
35421
|
+
},
|
|
35422
|
+
dataSource: dataSource,
|
|
35423
|
+
columns: useColumns$4(props.form, isRequired),
|
|
35424
|
+
rowSelection: useRowSelection$4(),
|
|
35425
|
+
onRow: function onRow(record) {
|
|
35426
|
+
return {
|
|
35427
|
+
onClick: function onClick() {
|
|
35428
|
+
_onRow.onClick(record);
|
|
35429
|
+
}
|
|
35430
|
+
};
|
|
35431
|
+
}
|
|
35432
|
+
}))));
|
|
35433
|
+
});
|
|
35434
|
+
|
|
31980
35435
|
// const config = {
|
|
31981
35436
|
// number: 'BigNumber',
|
|
31982
35437
|
// precision: 64,
|
|
@@ -32040,7 +35495,7 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
32040
35495
|
if (this.props.invoiceType === 'digtal') {
|
|
32041
35496
|
return /*#__PURE__*/React__default['default'].createElement(Digtal, _objectSpread2({}, this.props));
|
|
32042
35497
|
} else {
|
|
32043
|
-
return /*#__PURE__*/React__default['default'].createElement(Main$
|
|
35498
|
+
return /*#__PURE__*/React__default['default'].createElement(Main$7, _objectSpread2({}, this.props));
|
|
32044
35499
|
}
|
|
32045
35500
|
}
|
|
32046
35501
|
}]);
|
|
@@ -32064,6 +35519,7 @@ Invoice.RealEstateInfo = RealEstateInfo;
|
|
|
32064
35519
|
Invoice.RealEstateSales = RealEstateSales;
|
|
32065
35520
|
Invoice.Architecture = Architecture;
|
|
32066
35521
|
Invoice.FreightList = FreightList;
|
|
35522
|
+
Invoice.PassengerList = PassengerList;
|
|
32067
35523
|
Invoice.PayList = PayList;
|
|
32068
35524
|
Invoice.GoodsListDigtal = GoodsList$1;
|
|
32069
35525
|
Invoice.idGenerator = idGenerator;
|
|
@@ -32074,7 +35530,7 @@ Invoice.useInvoiceController = function () {
|
|
|
32074
35530
|
return React__default['default'].useContext(InvoiceContext);
|
|
32075
35531
|
};
|
|
32076
35532
|
|
|
32077
|
-
var Main$
|
|
35533
|
+
var Main$7 = function Main(props) {
|
|
32078
35534
|
var controller = React__default['default'].useMemo(function () {
|
|
32079
35535
|
return props.controller || new InvoiceController();
|
|
32080
35536
|
}, [props.controller]);
|
|
@@ -32183,11 +35639,11 @@ var Digtal = function Digtal(props) {
|
|
|
32183
35639
|
/** 特殊信息 */
|
|
32184
35640
|
, props.sign || /*#__PURE__*/React__default['default'].createElement(SignDigtal, null)
|
|
32185
35641
|
/** 落款 */
|
|
32186
|
-
), /*#__PURE__*/React__default['default'].createElement(ImportGoodsDrawer, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeDrawer, null), /*#__PURE__*/React__default['default'].createElement(MeiTanModal, null), " ");
|
|
35642
|
+
), /*#__PURE__*/React__default['default'].createElement(ImportGoodsDrawer, null), /*#__PURE__*/React__default['default'].createElement(ImportPassengerDrawer, null), /*#__PURE__*/React__default['default'].createElement(EndowCodeDrawer, null), /*#__PURE__*/React__default['default'].createElement(MeiTanModal, null), " ");
|
|
32187
35643
|
};
|
|
32188
35644
|
|
|
32189
|
-
var css_248z$
|
|
32190
|
-
styleInject(css_248z$
|
|
35645
|
+
var css_248z$F = ".taxdetailsbox {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n}\n.taxdetailsbox .taxrightbox {\n width: 340px;\n position: absolute;\n right: 30px;\n top: 79px;\n bottom: 50px;\n min-height: 300px;\n}\n.taxdetailsbox .taxrightbox .taxdesc {\n height: calc(100vh - 323px);\n min-height: 105px;\n overflow: auto;\n}\n";
|
|
35646
|
+
styleInject(css_248z$F);
|
|
32191
35647
|
|
|
32192
35648
|
function TaxClassificationModal(props) {
|
|
32193
35649
|
var _props$info6;
|