kts-component-invoice-operate 3.2.235-fuling → 3.2.236

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.
Files changed (35) hide show
  1. package/README.md +4 -0
  2. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +1 -0
  3. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ImportGoods/index.d.ts +2 -0
  4. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +2 -0
  5. package/dist/Invoice/ui/default/GoodsList/index.d.ts +1 -0
  6. package/dist/Invoice/ui/default/GoodsList/ui/AddRowButton/index.d.ts +1 -1
  7. package/dist/Invoice/ui/digtal/GoodsList/index.d.ts +1 -0
  8. package/dist/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.d.ts +4 -1
  9. package/dist/index.esm.js +970 -330
  10. package/dist/index.js +968 -328
  11. package/package.json +1 -1
  12. package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +1 -1
  13. package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +69 -7
  14. package/src/Invoice/Invoice-digtal/index.md +2 -9
  15. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +2 -0
  16. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ImportGoods/index.ts +3 -0
  17. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +3 -0
  18. package/src/Invoice/InvoiceController/fns/saveEditGood.ts +2 -2
  19. package/src/Invoice/_test/deduction/index.tsx +28 -6
  20. package/src/Invoice/index.md +4 -4
  21. package/src/Invoice/ui/default/GoodsList/index.tsx +3 -1
  22. package/src/Invoice/ui/default/GoodsList/ui/AddRowButton/index.tsx +8 -1
  23. package/src/Invoice/ui/default/ImportGoodsDrawer/index.tsx +4 -1
  24. package/src/Invoice/ui/digtal/Architecture/index.tsx +1 -1
  25. package/src/Invoice/ui/digtal/FreightList/index.tsx +1 -1
  26. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +37 -23
  27. package/src/Invoice/ui/digtal/GoodsList/index.tsx +3 -1
  28. package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +20 -10
  29. package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.tsx +11 -6
  30. package/src/Invoice/ui/digtal/GoodsList/ui/TaxIncludedSwitch/index.tsx +5 -2
  31. package/src/Invoice/ui/digtal/PayList/hook/useColumns/index.tsx +1 -1
  32. package/src/Invoice/ui/digtal/RealEstateInfo/index.less +7 -0
  33. package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +363 -104
  34. package/src/Invoice/ui/digtal/StakeFarmerholder/index.tsx +231 -72
  35. package/src/Invoice/ui/digtal/Stakeholder/index.tsx +22 -4
package/dist/index.js CHANGED
@@ -991,6 +991,7 @@ var ImportGoods = /*#__PURE__*/_createClass(function ImportGoods() {
991
991
  this.dataSource = [];
992
992
  this.pagination = {};
993
993
  this.isVisibleDrawer = false;
994
+ this.filter = {};
994
995
  this.topExpand = void 0;
995
996
 
996
997
  this.verifyFn = /*#__PURE__*/function () {
@@ -1184,6 +1185,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
1184
1185
  this.isSalesGifts = false;
1185
1186
  this.addComparisonIndex = void 0;
1186
1187
  this.drag = new Drag();
1188
+ this.isValidateGood = true;
1187
1189
  });
1188
1190
 
1189
1191
  var FreightListState = /*#__PURE__*/_createClass(function FreightListState() {
@@ -2227,7 +2229,7 @@ var saveEditGood = /*#__PURE__*/(function () {
2227
2229
  switch (_context.prev = _context.next) {
2228
2230
  case 0:
2229
2231
  editGood = state.goodsListState.editGood;
2230
- form = state.goodsListState.form;
2232
+ form = state.goodsListState.form; // const isValidateGood = state.goodsListState.isValidateGood
2231
2233
 
2232
2234
  if (!(!editGood || !form || state.goodsListState.importGoods.isVisibleDrawer || state.calculatingField)) {
2233
2235
  _context.next = 4;
@@ -10977,7 +10979,7 @@ var Statistics = (function () {
10977
10979
  }, /*#__PURE__*/React__default['default'].createElement("label", null, "\uFF08\u5C0F\u5199\uFF09 ", lineAmountIncludeTax === '' ? '' : parseFloat(lineAmountIncludeTax).toFixed(2)))));
10978
10980
  });
10979
10981
 
10980
- var AddRowButton = (function () {
10982
+ var AddRowButton = (function (props) {
10981
10983
  var controller = Invoice.useInvoiceController();
10982
10984
  var model = controller.useMemo(function (s) {
10983
10985
  return s.model;
@@ -11010,24 +11012,54 @@ var AddRowButton = (function () {
11010
11012
  var disabled = React__default['default'].useMemo(function () {
11011
11013
  return typeof goodMax === 'number' ? goodsNum >= goodMax : !!searchValue;
11012
11014
  }, [goodMax, goodsNum, searchValue]);
11013
- var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11014
- return _regeneratorRuntime().wrap(function _callee$(_context) {
11015
+ var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
11016
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11015
11017
  while (1) {
11016
- switch (_context.prev = _context.next) {
11018
+ switch (_context2.prev = _context2.next) {
11017
11019
  case 0:
11018
- _context.next = 2;
11019
- return addGood$1(controller);
11020
+ _context2.next = 2;
11021
+ return controller.run( /*#__PURE__*/function () {
11022
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
11023
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
11024
+ while (1) {
11025
+ switch (_context.prev = _context.next) {
11026
+ case 0:
11027
+ if (!s.addGoodsCheck) {
11028
+ _context.next = 3;
11029
+ break;
11030
+ }
11031
+
11032
+ _context.next = 3;
11033
+ return s.addGoodsCheck();
11034
+
11035
+ case 3:
11036
+ case "end":
11037
+ return _context.stop();
11038
+ }
11039
+ }
11040
+ }, _callee);
11041
+ }));
11042
+
11043
+ return function (_x) {
11044
+ return _ref2.apply(this, arguments);
11045
+ };
11046
+ }());
11020
11047
 
11021
11048
  case 2:
11022
- _context.next = 4;
11049
+ console.log('continue');
11050
+ _context2.next = 5;
11051
+ return addGood$1(controller);
11052
+
11053
+ case 5:
11054
+ _context2.next = 7;
11023
11055
  return rollBottom(controller, rootElement);
11024
11056
 
11025
- case 4:
11057
+ case 7:
11026
11058
  case "end":
11027
- return _context.stop();
11059
+ return _context2.stop();
11028
11060
  }
11029
11061
  }
11030
- }, _callee);
11062
+ }, _callee2);
11031
11063
  })), [controller, rootElement]);
11032
11064
  if (isAddRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
11033
11065
  if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
@@ -11039,35 +11071,35 @@ var AddRowButton = (function () {
11039
11071
  });
11040
11072
  /** 添加一个空货物 */
11041
11073
 
11042
- function addGood$1(_x) {
11074
+ function addGood$1(_x2) {
11043
11075
  return _addGood.apply(this, arguments);
11044
11076
  }
11045
11077
  /** 货物列表,滚动到底部 */
11046
11078
 
11047
11079
 
11048
11080
  function _addGood() {
11049
- _addGood = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(controller) {
11050
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11081
+ _addGood = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
11082
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
11051
11083
  while (1) {
11052
- switch (_context3.prev = _context3.next) {
11084
+ switch (_context4.prev = _context4.next) {
11053
11085
  case 0:
11054
- _context3.next = 2;
11086
+ _context4.next = 2;
11055
11087
  return controller.saveEditGood();
11056
11088
 
11057
11089
  case 2:
11058
- _context3.next = 4;
11090
+ _context4.next = 4;
11059
11091
  return controller.wait();
11060
11092
 
11061
11093
  case 4:
11062
- _context3.next = 6;
11094
+ _context4.next = 6;
11063
11095
  return controller.run( /*#__PURE__*/function () {
11064
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
11065
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
11096
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
11097
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
11066
11098
  while (1) {
11067
- switch (_context2.prev = _context2.next) {
11099
+ switch (_context3.prev = _context3.next) {
11068
11100
  case 0:
11069
11101
  if (!s.goodsListState.editGood) {
11070
- _context2.next = 3;
11102
+ _context3.next = 3;
11071
11103
  break;
11072
11104
  }
11073
11105
 
@@ -11075,74 +11107,74 @@ function _addGood() {
11075
11107
  content: '你正在编辑一个货物',
11076
11108
  key: '你正在编辑一个货物'
11077
11109
  });
11078
- return _context2.abrupt("return");
11110
+ return _context3.abrupt("return");
11079
11111
 
11080
11112
  case 3:
11081
- _context2.next = 5;
11113
+ _context3.next = 5;
11082
11114
  return controller.addGood({
11083
11115
  taxRate: s.goodsListState.defaultRate,
11084
11116
  lineAttribute: LineAttributeType$1.正常
11085
11117
  });
11086
11118
 
11087
11119
  case 5:
11088
- s.goodsListState.editGood = _context2.sent;
11120
+ s.goodsListState.editGood = _context3.sent;
11089
11121
 
11090
11122
  case 6:
11091
11123
  case "end":
11092
- return _context2.stop();
11124
+ return _context3.stop();
11093
11125
  }
11094
11126
  }
11095
- }, _callee2);
11127
+ }, _callee3);
11096
11128
  }));
11097
11129
 
11098
- return function (_x4) {
11099
- return _ref2.apply(this, arguments);
11130
+ return function (_x5) {
11131
+ return _ref3.apply(this, arguments);
11100
11132
  };
11101
11133
  }());
11102
11134
 
11103
11135
  case 6:
11104
11136
  case "end":
11105
- return _context3.stop();
11137
+ return _context4.stop();
11106
11138
  }
11107
11139
  }
11108
- }, _callee3);
11140
+ }, _callee4);
11109
11141
  }));
11110
11142
  return _addGood.apply(this, arguments);
11111
11143
  }
11112
11144
 
11113
- function rollBottom(_x2, _x3) {
11145
+ function rollBottom(_x3, _x4) {
11114
11146
  return _rollBottom.apply(this, arguments);
11115
11147
  }
11116
11148
 
11117
11149
  function _rollBottom() {
11118
- _rollBottom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller, rootElement) {
11150
+ _rollBottom = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
11119
11151
  var cont;
11120
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
11152
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
11121
11153
  while (1) {
11122
- switch (_context4.prev = _context4.next) {
11154
+ switch (_context5.prev = _context5.next) {
11123
11155
  case 0:
11124
- _context4.next = 2;
11156
+ _context5.next = 2;
11125
11157
  return controller.wait();
11126
11158
 
11127
11159
  case 2:
11128
11160
  cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
11129
11161
 
11130
11162
  if (cont) {
11131
- _context4.next = 5;
11163
+ _context5.next = 5;
11132
11164
  break;
11133
11165
  }
11134
11166
 
11135
- return _context4.abrupt("return");
11167
+ return _context5.abrupt("return");
11136
11168
 
11137
11169
  case 5:
11138
11170
  cont.scrollTop = cont.scrollHeight;
11139
11171
 
11140
11172
  case 6:
11141
11173
  case "end":
11142
- return _context4.stop();
11174
+ return _context5.stop();
11143
11175
  }
11144
11176
  }
11145
- }, _callee4);
11177
+ }, _callee5);
11146
11178
  }));
11147
11179
  return _rollBottom.apply(this, arguments);
11148
11180
  }
@@ -16928,7 +16960,9 @@ var Main = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (p
16928
16960
  className: "kts-invoice-operate-goods-list-able"
16929
16961
  }, /*#__PURE__*/React__default['default'].createElement("div", {
16930
16962
  className: "kts-invoice-operate-goods-list-able-list"
16931
- }, /*#__PURE__*/React__default['default'].createElement(AddRowButton, null), endowCodeButton.button, delRowButton.button, mergeDetails.button, mergeDiscount.button, addDiscountRowButton.drawer, salesDiscount.button, salesGifts.button, /*#__PURE__*/React__default['default'].createElement(Search, null)), /*#__PURE__*/React__default['default'].createElement("div", {
16963
+ }, /*#__PURE__*/React__default['default'].createElement(AddRowButton, {
16964
+ addGoodsCheck: props.addGoodsCheck
16965
+ }), endowCodeButton.button, delRowButton.button, mergeDetails.button, mergeDiscount.button, addDiscountRowButton.drawer, salesDiscount.button, salesGifts.button, /*#__PURE__*/React__default['default'].createElement(Search, null)), /*#__PURE__*/React__default['default'].createElement("div", {
16932
16966
  className: "kts-invoice-operate-goods-list-able-extend"
16933
16967
  }, props.menuExpansion, /*#__PURE__*/React__default['default'].createElement(DescribeSwitch, null), /*#__PURE__*/React__default['default'].createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React__default['default'].createElement("div", {
16934
16968
  className: classnames__default['default']('kts-invoice-operate-goods-list-table', {
@@ -17932,7 +17966,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
17932
17966
  placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
17933
17967
  autoComplete: "off"
17934
17968
  })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
17935
- span: 10 + riskspanW,
17969
+ span: 10 + leqispanW,
17936
17970
  style: {
17937
17971
  display: isExpand ? undefined : 'none'
17938
17972
  }
@@ -17949,7 +17983,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
17949
17983
  placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5730\u5740",
17950
17984
  autoComplete: "off"
17951
17985
  })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
17952
- span: 10 + riskspanW,
17986
+ span: 10 + leqispanW,
17953
17987
  style: {
17954
17988
  display: isExpand ? undefined : 'none'
17955
17989
  }
@@ -17963,7 +17997,22 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
17963
17997
  readOnly: isReadOnly('buyerPhone'),
17964
17998
  placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD",
17965
17999
  autoComplete: "off"
17966
- })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18000
+ })))), props.leqi && /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18001
+ span: 4,
18002
+ style: {
18003
+ display: isExpand ? undefined : 'none'
18004
+ }
18005
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
18006
+ colon: false
18007
+ }, getFieldDecorator('buyerAddressPhoneFlag', {
18008
+ valuePropName: 'checked'
18009
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
18010
+ onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
18011
+ disabled: isReadOnly('buyerAddressPhoneFlag'),
18012
+ style: {
18013
+ whiteSpace: 'nowrap'
18014
+ }
18015
+ }, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
17967
18016
  span: 10 + leqispanW,
17968
18017
  style: {
17969
18018
  display: isExpand ? undefined : 'none'
@@ -18055,7 +18104,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
18055
18104
  placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
18056
18105
  autoComplete: "off"
18057
18106
  })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18058
- span: 10 + riskspanW,
18107
+ span: 10 + leqispanW,
18059
18108
  style: {
18060
18109
  display: isExpand ? undefined : 'none'
18061
18110
  }
@@ -18072,7 +18121,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
18072
18121
  placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5730\u5740",
18073
18122
  autoComplete: "off"
18074
18123
  })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18075
- span: 10 + riskspanW,
18124
+ span: 10 + leqispanW,
18076
18125
  style: {
18077
18126
  display: isExpand ? undefined : 'none'
18078
18127
  }
@@ -18086,7 +18135,22 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
18086
18135
  readOnly: isReadOnly('sellerPhone'),
18087
18136
  placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD",
18088
18137
  autoComplete: "off"
18089
- })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18138
+ })))), props.leqi && /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18139
+ span: 4,
18140
+ style: {
18141
+ display: isExpand ? undefined : 'none'
18142
+ }
18143
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
18144
+ colon: false
18145
+ }, getFieldDecorator('sellerAddressPhoneFlag', {
18146
+ valuePropName: 'checked'
18147
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
18148
+ onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
18149
+ disabled: isReadOnly('sellerAddressPhoneFlag'),
18150
+ style: {
18151
+ whiteSpace: 'nowrap'
18152
+ }
18153
+ }, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
18090
18154
  span: 10 + leqispanW,
18091
18155
  style: {
18092
18156
  display: isExpand ? undefined : 'none'
@@ -18475,8 +18539,29 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18475
18539
  var rulesMap = controller.useMemo(function (s) {
18476
18540
  return s.stakeholder.rulesMap || {};
18477
18541
  }, []);
18542
+
18543
+ var _React$useState3 = React__default['default'].useState(''),
18544
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
18545
+ validateStatus = _React$useState4[0],
18546
+ setStatus = _React$useState4[1];
18547
+
18548
+ var _React$useState5 = React__default['default'].useState(''),
18549
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
18550
+ errorInfo = _React$useState6[0],
18551
+ setInfo = _React$useState6[1];
18552
+
18553
+ var _React$useState7 = React__default['default'].useState(''),
18554
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
18555
+ nation = _React$useState8[0],
18556
+ setNationStatue = _React$useState8[1];
18557
+
18558
+ var _React$useState9 = React__default['default'].useState(''),
18559
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
18560
+ nationInfo = _React$useState10[0],
18561
+ setNation = _React$useState10[1];
18478
18562
  /** 乐企 */
18479
18563
 
18564
+
18480
18565
  var leqispanW = React__default['default'].useMemo(function () {
18481
18566
  if (props.leqi) {
18482
18567
  return 0;
@@ -18517,6 +18602,200 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18517
18602
  React__default['default'].useEffect(function () {
18518
18603
  setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
18519
18604
  }, [props.isExpand]);
18605
+ var onChangeType = React.useCallback(function (value) {
18606
+ console.log(value);
18607
+
18608
+ if (value === "201") {
18609
+ // 当“自然人证件类型”选择“201:居民身份证”时,校验是否为“156:中国’
18610
+ form === null || form === void 0 ? void 0 : form.setFieldsValue({
18611
+ nationality: "156"
18612
+ });
18613
+ var supplierTaxId = form === null || form === void 0 ? void 0 : form.getFieldValue("supplierTaxId");
18614
+ var certificateNumber = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
18615
+
18616
+ if (supplierTaxId !== certificateNumber) {
18617
+ setStatus('error');
18618
+ setInfo('证件号码应与销方税号保持一致');
18619
+ }
18620
+ } else if (value === "227") {
18621
+ // 当“自然人证件类型”选择“227:中华人民共和国护照”时,校验是否为“156:中国
18622
+ form === null || form === void 0 ? void 0 : form.setFieldsValue({
18623
+ nationality: "156"
18624
+ });
18625
+ } else if (value === "213" || value === "238") {
18626
+ // 当“自然人证件类型”选择“213:台湾居民来往大陆通行证”时,校验是否为”158:中国台湾”
18627
+ // 当“自然人证件类型”选择“238:中华人民共和国台湾居民居住证”时,校验是否为“ 158:中国台湾”
18628
+ form === null || form === void 0 ? void 0 : form.setFieldsValue({
18629
+ nationality: "158"
18630
+ });
18631
+ }
18632
+ }, [form]);
18633
+ /** 校验证件号码*/
18634
+
18635
+ var validateIDCode = React.useCallback(function (_, value) {
18636
+ if (!value) {
18637
+ return Promise.resolve();
18638
+ }
18639
+
18640
+ var idtype = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateType");
18641
+ var nationality = form === null || form === void 0 ? void 0 : form.getFieldValue("nationality");
18642
+
18643
+ if (idtype === "210") {
18644
+ // 当“自然人证件类型”选择“210:港澳居民来往内地通行证”时,
18645
+ if (value.startsWith("M")) {
18646
+ //如果“证件号码”以M开头,"国籍(或地区头,)”必须为“446:中国澳门”;校验证件号码必须以H或M开头
18647
+ if (nationality !== '446') {
18648
+ setNationStatue('error');
18649
+ setNation('请选择正确的国籍');
18650
+ } else {
18651
+ setNationStatue('');
18652
+ setNation('');
18653
+ }
18654
+ } else if (value.startsWith("H")) {
18655
+ //如果“证件号码”以H开国籍(或地区)”必须为“344:中国香港”;
18656
+ if (nationality !== '344') {
18657
+ setNationStatue('error');
18658
+ setNation('请选择正确的国籍');
18659
+ } else {
18660
+ setNationStatue('');
18661
+ setNation('');
18662
+ }
18663
+ } else {
18664
+ return Promise.reject("请输入正确的证件号码");
18665
+ }
18666
+ } else if (idtype === "237") {
18667
+ //当“自然人证件类型”选择“237:中华人民共和国港澳居民居住证”时,校验证件号码必须以810000或820000开头,如果“证件号码”以810000开头,必须为“344:中国香国籍(或地区))港”;如果“证件号码”以820000开头,国籍(或地区)必须为“446:中国澳门”
18668
+ if (value.startsWith("810000")) {
18669
+ if (nationality !== '344') {
18670
+ setNationStatue('error');
18671
+ setNation('请选择正确的国籍');
18672
+ } else {
18673
+ setNationStatue('');
18674
+ setNation('');
18675
+ }
18676
+ } else if (value.startsWith("820000")) {
18677
+ if (nationality !== '446') {
18678
+ setNationStatue('error');
18679
+ setNation('请选择正确的国籍');
18680
+ } else {
18681
+ setNationStatue('');
18682
+ setNation('');
18683
+ }
18684
+ } else {
18685
+ setStatus('error');
18686
+ setInfo('请输入正确的证件号码');
18687
+ return Promise.reject("请输入正确的证件号码");
18688
+ }
18689
+ } // 当“销售方自然人证件类型”填写“201:居民身份证”,“销售方纳税人识别号”必须与“销售方自然人证件号码”完全一致
18690
+
18691
+
18692
+ if (idtype === "201") {
18693
+ var supplierTaxId = form === null || form === void 0 ? void 0 : form.getFieldValue("supplierTaxId");
18694
+
18695
+ if (value !== supplierTaxId) {
18696
+ setStatus('error');
18697
+ setInfo('证件号码应与销方税号保持一致');
18698
+ return Promise.reject("证件号码应与销方税号保持一致");
18699
+ } else if (value === supplierTaxId) {
18700
+ setStatus('');
18701
+ setInfo('');
18702
+ }
18703
+ }
18704
+
18705
+ setStatus('');
18706
+ setInfo('');
18707
+ return Promise.resolve();
18708
+ }, [form]);
18709
+ var validateIDCode2 = React.useCallback(function (e) {
18710
+ var value = e.target.value; // if (!value) {
18711
+ // setStatus('');
18712
+ // setInfo('')
18713
+ // }
18714
+
18715
+ var idtype = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateType"); // // 当“销售方自然人证件类型”填写“201:居民身份证”,“销售方纳税人识别号”必须与“销售方自然人证件号码”完全一致
18716
+
18717
+ if (idtype === "201") {
18718
+ var certificateNumber = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
18719
+ console.log(value, certificateNumber);
18720
+
18721
+ if (value !== certificateNumber) {
18722
+ setStatus('error');
18723
+ setInfo('证件号码应与销方税号保持一致');
18724
+ } else {
18725
+ setStatus('');
18726
+ setInfo('');
18727
+ }
18728
+ }
18729
+ }, [form]);
18730
+ var validateNationality = React.useCallback(function (_, value) {
18731
+ if (!value) {
18732
+ return Promise.resolve();
18733
+ }
18734
+
18735
+ var idtype = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateType");
18736
+ var idcode = form === null || form === void 0 ? void 0 : form.getFieldValue("certificateNumber");
18737
+ console.log(value, idtype, idcode);
18738
+
18739
+ if (idtype === "201" || idtype === "227") {
18740
+ // 当“自然人证件类型”选择“201:居民身份证”时,校验是否为“156:中国’
18741
+ // 当“自然人证件类型”选择“227:中华人民共和国护照”时,校验是否为“156:中国
18742
+ if (value !== "156") {
18743
+ setNationStatue('error');
18744
+ setNation('请选择正确的国籍');
18745
+ return Promise.reject("请选择正确的国籍");
18746
+ }
18747
+ } else if (idtype === "213" || idtype === "238") {
18748
+ // 当“自然人证件类型”选择“213:台湾居民来往大陆通行证”时,校验是否为”158:中国台湾”
18749
+ // 当“自然人证件类型”选择“238:中华人民共和国台湾居民居住证”时,校验是否为“ 158:中国台湾”
18750
+ if (value !== "158") {
18751
+ setNationStatue('error');
18752
+ setNation('请选择正确的国籍');
18753
+ return Promise.reject("请选择正确的国籍");
18754
+ }
18755
+ } else if (idtype === "210") {
18756
+ //当“自然人证件类型”选择“210:港澳居民来往内地通行证”时,如果“证件号码”以H开国籍(或地区)”必须为“344:中国香港”;如果“证件号码”以M开头,"国籍(或地区头,)”必须为“446:中国澳门”;
18757
+ var r = false;
18758
+
18759
+ if (idcode) {
18760
+ if (idcode.startsWith("M") && value === "446") {
18761
+ r = true;
18762
+ } else if (idcode.startsWith("H") && value === "344") {
18763
+ r = true;
18764
+ }
18765
+ } else if (value === "344" || value === "446") {
18766
+ r = true;
18767
+ }
18768
+
18769
+ if (!r) {
18770
+ setNationStatue('error');
18771
+ setNation('请选择正确的国籍');
18772
+ return Promise.reject("请选择正确的国籍");
18773
+ }
18774
+ } else if (idtype === "237") {
18775
+ //当“自然人证件类型”选择“237:中华人民共和国港澳居民居住证”时,校验证件号码必须以810000或820000开头,如果“证件号码”以810000开头,必须为“344:中国香国籍(或地区))港”;如果“证件号码”以820000开头,国籍(或地区)必须为“446:中国澳门”
18776
+ var _r = false;
18777
+
18778
+ if (idcode) {
18779
+ if (idcode.startsWith("820000") && value === "446") {
18780
+ _r = true;
18781
+ } else if (idcode.startsWith("810000") && value === "344") {
18782
+ _r = true;
18783
+ }
18784
+ } else if (value === "344" || value === "446") {
18785
+ _r = true;
18786
+ }
18787
+
18788
+ if (!_r) {
18789
+ setNationStatue('error');
18790
+ setNation('请选择正确的国籍');
18791
+ return Promise.reject("请选择正确的国籍");
18792
+ }
18793
+ }
18794
+
18795
+ setNationStatue('');
18796
+ setNation('');
18797
+ return Promise.resolve();
18798
+ }, [form]);
18520
18799
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
18521
18800
  className: classnames__default['default']("kts-invoice-operate-invoice-digtal-stakeholder", {
18522
18801
  readOnly: readOnly
@@ -18579,6 +18858,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18579
18858
  message: '销售方纳税人识别号必填'
18580
18859
  }].concat(_toConsumableArray(RULES$1.taxId('销售方纳税人识别号'))))
18581
18860
  })( /*#__PURE__*/React__default['default'].createElement(BuyerNameInput$2, {
18861
+ onChange: validateIDCode2,
18582
18862
  myform: form,
18583
18863
  fieldName: 'supplierTaxId',
18584
18864
  readOnly: isReadOnly('supplierTaxId'),
@@ -18853,6 +19133,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18853
19133
  message: '数据必填'
18854
19134
  }]
18855
19135
  })( /*#__PURE__*/React__default['default'].createElement(CardSelect, {
19136
+ onChange: onChangeType,
18856
19137
  readOnly: isReadOnly('certificateType'),
18857
19138
  placeholder: "\u6570\u636E\u5FC5\u586B",
18858
19139
  autoComplete: "off"
@@ -18860,7 +19141,9 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18860
19141
  span: 7
18861
19142
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
18862
19143
  label: "\u8BC1\u4EF6\u53F7\u7801",
18863
- colon: false
19144
+ colon: false,
19145
+ validateStatus: validateStatus,
19146
+ help: errorInfo
18864
19147
  }, getFieldDecorator('certificateNumber', {
18865
19148
  rules: [{
18866
19149
  required: true,
@@ -18868,6 +19151,8 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18868
19151
  }, {
18869
19152
  max: 30,
18870
19153
  message: "\u5185\u5BB9\u8D85\u957F"
19154
+ }, {
19155
+ validator: validateIDCode
18871
19156
  }]
18872
19157
  })( /*#__PURE__*/React__default['default'].createElement(MyInput$2, {
18873
19158
  readOnly: isReadOnly('certificateNumber'),
@@ -18877,13 +19162,28 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18877
19162
  span: 6
18878
19163
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
18879
19164
  label: "\u56FD\u7C4D(\u6216\u5730\u533A)",
18880
- colon: false
19165
+ colon: false,
19166
+ validateStatus: nation,
19167
+ help: nationInfo
18881
19168
  }, getFieldDecorator('nationality', {
18882
19169
  rules: [{
18883
19170
  required: true,
18884
19171
  message: '数据必填'
19172
+ }, {
19173
+ validator: validateNationality
18885
19174
  }]
18886
19175
  })( /*#__PURE__*/React__default['default'].createElement(NationalSelect, {
19176
+ showSearch: true,
19177
+ optionFilterProp: "children",
19178
+ filterOption: function filterOption(input, option) {
19179
+ if (option) {
19180
+ var _option$label;
19181
+
19182
+ return ((_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.indexOf(input)) >= 0;
19183
+ }
19184
+
19185
+ return false;
19186
+ },
18887
19187
  readOnly: isReadOnly('nationality'),
18888
19188
  placeholder: "\u6570\u636E\u5FC5\u586B",
18889
19189
  autoComplete: "off"
@@ -18891,10 +19191,10 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
18891
19191
  });
18892
19192
 
18893
19193
  function NaturalPersonFlag$1(props) {
18894
- var _React$useState3 = React__default['default'].useState(props.value || 'COMPANY'),
18895
- _React$useState4 = _slicedToArray(_React$useState3, 2),
18896
- value = _React$useState4[0],
18897
- setValue = _React$useState4[1];
19194
+ var _React$useState11 = React__default['default'].useState(props.value || 'COMPANY'),
19195
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
19196
+ value = _React$useState12[0],
19197
+ setValue = _React$useState12[1];
18898
19198
 
18899
19199
  var onChange = React__default['default'].useCallback(function (e) {
18900
19200
  if (props.readOnly) return;
@@ -18922,10 +19222,10 @@ function BuyerNameInput$2(props) {
18922
19222
  return s.autoComplete;
18923
19223
  }, []);
18924
19224
 
18925
- var _React$useState5 = React__default['default'].useState([]),
18926
- _React$useState6 = _slicedToArray(_React$useState5, 2),
18927
- options = _React$useState6[0],
18928
- setOptions = _React$useState6[1];
19225
+ var _React$useState13 = React__default['default'].useState([]),
19226
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
19227
+ options = _React$useState14[0],
19228
+ setOptions = _React$useState14[1];
18929
19229
 
18930
19230
  var onChangeAutoComplete = React__default['default'].useCallback(function (value) {
18931
19231
  var record = options.filter(function (e) {
@@ -19124,65 +19424,13 @@ var CardSelect = /*#__PURE__*/function (_React$Component2) {
19124
19424
  _createClass(CardSelect, [{
19125
19425
  key: "render",
19126
19426
  value: function render() {
19127
- var props = this.props; // const option = [
19128
- // { label: '组织机构代码证', value: '101' },
19129
- // { label: '营业执照', value: '102' },
19130
- // { label: '税务登记证', value: '103' },
19131
- // { label: '其他单位证件', value: '199' },
19132
- // { label: '居民身份证', value: '201' },
19133
- // { label: '军官证', value: '202' },
19134
- // { label: '武警警官证', value: '203' },
19135
- // { label: '士兵证', value: '204' },
19136
- // { label: '军队离退休干部证', value: '205' },
19137
- // { label: '残疾人证', value: '206' },
19138
- // { label: '残疾军人证(1-8级)', value: '207' },
19139
- // { label: '外国护照', value: '208', },
19140
- // { label: '港澳同胞回乡证', value: '209', },
19141
- // { label: '港澳居民来往内地通行证', value: '210', },
19142
- // { label: '台胞证', value: '211', },
19143
- // { label: '中华人民共和国往来港澳通行证', value: '212', },
19144
- // { label: '台湾居民来往大陆通行证', value: '213', },
19145
- // { label: '大陆居民往来台湾通行证', value: '214', },
19146
- // { label: '外国人居留证', value: '215', },
19147
- // { label: '外交官证', value: '216', },
19148
- // { label: '使(领事)馆证', value: '217', },
19149
- // { label: '海员证', value: '218', },
19150
- // { label: '香港永久性居民身份证', value: '219', },
19151
- // { label: '台湾身份证', value: '220', },
19152
- // { label: '澳门特别行政区永久性居民身份证', value: '221', },
19153
- // { label: '外国人身份证件', value: '222', },
19154
- // { label: '高校毕业生自主创业证', value: '223', },
19155
- // { label: '就业失业登记证', value: '224', },
19156
- // { label: '退休证', value: '225', },
19157
- // { label: '离休证', value: '226', },
19158
- // { label: '中国护照', value: '227', },
19159
- // { label: '城镇退役士兵自谋职业证', value: '228', },
19160
- // { label: '随军家属身份证明', value: '229', },
19161
- // { label: '中国护照', value: '230', },
19162
- // { label: '中国人民解放军义务兵退出现役证', value: '231', },
19163
- // { label: '中国人民解放军士官退出现役证', value: '232', },
19164
- // { label: '外国人永久居留身份证', value: '233', },
19165
- // { label: '就业创业证', value: '234', },
19166
- // { label: '香港特别行政区护照', value: '235', },
19167
- // { label: '澳门特别行政区护照', value: '236', },
19168
- // { label: '中华人民共和国港澳居民居住证', value: '237', },
19169
- // { label: '中华人民共和国台湾居民居住证', value: '238', },
19170
- // { label: '《中华人民共和国外国人工作许可证》(A类)', value: '239', },
19171
- // { label: '《中华人民共和国外国人工作许可证》(B类)', value: '240', },
19172
- // { label: '《中华人民共和国外国人工作许可证》(C类)', value: '241', },
19173
- // { label: '出生医学证明', value: '291', },
19174
- // { label: '其他个人证件', value: '299', },
19175
- // ]
19176
-
19427
+ var props = this.props;
19177
19428
  var option = [{
19178
19429
  label: "居民身份证",
19179
19430
  value: "201"
19180
19431
  }, {
19181
19432
  label: "外国护照",
19182
19433
  value: "208"
19183
- }, {
19184
- label: "港澳同胞回乡证",
19185
- value: "209"
19186
19434
  }, {
19187
19435
  label: "港澳居民来往内地通行证",
19188
19436
  value: "210"
@@ -19247,6 +19495,15 @@ var NationalSelect = /*#__PURE__*/function (_React$Component3) {
19247
19495
  var option = [{
19248
19496
  value: "156",
19249
19497
  label: "中国"
19498
+ }, {
19499
+ value: "344",
19500
+ label: "中国香港"
19501
+ }, {
19502
+ value: "158",
19503
+ label: "中国台湾"
19504
+ }, {
19505
+ value: "446",
19506
+ label: "中国澳门"
19250
19507
  }, {
19251
19508
  value: "004",
19252
19509
  label: "阿富汗"
@@ -19376,9 +19633,6 @@ var NationalSelect = /*#__PURE__*/function (_React$Component3) {
19376
19633
  }, {
19377
19634
  value: "152",
19378
19635
  label: "智利"
19379
- }, {
19380
- value: "158",
19381
- label: "中国台湾"
19382
19636
  }, {
19383
19637
  value: "162",
19384
19638
  label: "圣诞岛"
@@ -19538,9 +19792,6 @@ var NationalSelect = /*#__PURE__*/function (_React$Component3) {
19538
19792
  }, {
19539
19793
  value: "340",
19540
19794
  label: "洪都拉斯"
19541
- }, {
19542
- value: "344",
19543
- label: "中国香港"
19544
19795
  }, {
19545
19796
  value: "348",
19546
19797
  label: "匈牙利"
@@ -19625,9 +19876,6 @@ var NationalSelect = /*#__PURE__*/function (_React$Component3) {
19625
19876
  }, {
19626
19877
  value: "442",
19627
19878
  label: "卢森堡"
19628
- }, {
19629
- value: "446",
19630
- label: "中国澳门"
19631
19879
  }, {
19632
19880
  value: "450",
19633
19881
  label: "马达加斯加"
@@ -20134,7 +20382,7 @@ var css_248z$j = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {
20134
20382
  styleInject(css_248z$j);
20135
20383
 
20136
20384
  function TableVirtual$1 (props) {
20137
- var _props$dataSource2;
20385
+ var _props$dataSource4, _props$dataSource5;
20138
20386
 
20139
20387
  var _React$useState = React__default['default'].useState(null),
20140
20388
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -20176,8 +20424,10 @@ function TableVirtual$1 (props) {
20176
20424
  }, [self, tableBody]); // 设置占位dom的搞
20177
20425
 
20178
20426
  var placeholderHeight = React__default['default'].useMemo(function () {
20179
- if (!self || !rowHeight || !props.dataSource || !placeholder) return;
20180
- var placeholderHeight = rowHeight * props.dataSource.length;
20427
+ var _props$dataSource = props.dataSource,
20428
+ dataSource = _props$dataSource === void 0 ? [] : _props$dataSource;
20429
+ if (!self || !rowHeight || !dataSource || !placeholder) return;
20430
+ var placeholderHeight = rowHeight * dataSource.length;
20181
20431
  placeholder.style.height = "".concat(placeholderHeight, "px");
20182
20432
  return placeholderHeight;
20183
20433
  }, [self, rowHeight, props.dataSource, placeholder]);
@@ -20189,12 +20439,12 @@ function TableVirtual$1 (props) {
20189
20439
  }, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
20190
20440
 
20191
20441
  var dataSource = React__default['default'].useMemo(function () {
20192
- var _props$dataSource;
20442
+ var _props$dataSource2;
20193
20443
 
20194
20444
  if (!props.dataSource) return [];
20195
20445
  if (props.dataSource.length < 10) return props.dataSource;
20196
20446
  if (!rowSize) return [props.dataSource[0]];
20197
- return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
20447
+ return (_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.slice(pointer, pointer + 2 * rowSize);
20198
20448
  }, [props.dataSource, pointer, rowSize]); // 监听滚动
20199
20449
 
20200
20450
  React__default['default'].useEffect(function () {
@@ -20213,17 +20463,24 @@ function TableVirtual$1 (props) {
20213
20463
  }, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
20214
20464
 
20215
20465
  React__default['default'].useEffect(function () {
20466
+ var _props$dataSource3;
20467
+
20216
20468
  if (!self) return;
20217
20469
  var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
20218
20470
  if (!table) return;
20219
- table.style.top = "".concat(pointer * rowHeight, "px");
20220
- }, [pointer, self, rowHeight]);
20471
+
20472
+ if ((((_props$dataSource3 = props.dataSource) === null || _props$dataSource3 === void 0 ? void 0 : _props$dataSource3.length) || 0) < 10) {
20473
+ table.style.top = '0px';
20474
+ } else {
20475
+ table.style.top = "".concat(pointer * rowHeight, "px");
20476
+ }
20477
+ }, [pointer, self, rowHeight, (_props$dataSource4 = props.dataSource) === null || _props$dataSource4 === void 0 ? void 0 : _props$dataSource4.length]);
20221
20478
  React__default['default'].useEffect(function () {
20222
20479
  if (!self) return;
20223
20480
  var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
20224
20481
  if (!cont) return;
20225
20482
  cont.scrollTop = 0;
20226
- }, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
20483
+ }, [(_props$dataSource5 = props.dataSource) === null || _props$dataSource5 === void 0 ? void 0 : _props$dataSource5.length]);
20227
20484
  return /*#__PURE__*/React__default['default'].createElement("span", {
20228
20485
  className: "kts-invoice-operate-goods-table-virtual",
20229
20486
  ref: function ref(e) {
@@ -20466,43 +20723,86 @@ function addGood$2(_x) {
20466
20723
 
20467
20724
 
20468
20725
  function _addGood$1() {
20469
- _addGood$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
20470
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
20726
+ _addGood$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller) {
20727
+ var _controller$formList$;
20728
+
20729
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
20471
20730
  while (1) {
20472
- switch (_context4.prev = _context4.next) {
20731
+ switch (_context5.prev = _context5.next) {
20473
20732
  case 0:
20474
- _context4.next = 2;
20475
- return controller.saveEditGood();
20476
-
20477
- case 2:
20478
- _context4.next = 4;
20479
- return controller.wait();
20480
-
20481
- case 4:
20482
- _context4.next = 6;
20483
- return controller.run( /*#__PURE__*/function () {
20484
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
20485
- var _controller$state$goo;
20486
-
20487
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
20733
+ _context5.next = 2;
20734
+ return (_controller$formList$ = controller.formList.get('realEstateInfo')) === null || _controller$formList$ === void 0 ? void 0 : _controller$formList$.validateFields( /*#__PURE__*/function () {
20735
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
20736
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
20488
20737
  while (1) {
20489
- switch (_context3.prev = _context3.next) {
20738
+ switch (_context2.prev = _context2.next) {
20490
20739
  case 0:
20491
- if (!s.goodsListState.editGood) {
20492
- _context3.next = 3;
20740
+ if (!err) {
20741
+ _context2.next = 3;
20493
20742
  break;
20494
20743
  }
20495
20744
 
20496
- _context3.next = 3;
20497
- return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
20498
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
20745
+ ktsXui.message.error('请先填写发票行信息,再添加新的行');
20746
+ return _context2.abrupt("return");
20747
+
20748
+ case 3:
20749
+ case "end":
20750
+ return _context2.stop();
20751
+ }
20752
+ }
20753
+ }, _callee2);
20754
+ }));
20755
+
20756
+ return function (_x4, _x5) {
20757
+ return _ref2.apply(this, arguments);
20758
+ };
20759
+ }());
20760
+
20761
+ case 2:
20762
+ _context5.next = 4;
20763
+ return controller.saveEditGood();
20764
+
20765
+ case 4:
20766
+ _context5.next = 6;
20767
+ return controller.wait();
20768
+
20769
+ case 6:
20770
+ _context5.next = 8;
20771
+ return controller.run( /*#__PURE__*/function () {
20772
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
20773
+ var isValidateGood, _controller$state$goo;
20774
+
20775
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
20776
+ while (1) {
20777
+ switch (_context4.prev = _context4.next) {
20778
+ case 0:
20779
+ if (!s.goodsListState.editGood) {
20780
+ _context4.next = 5;
20781
+ break;
20782
+ }
20783
+
20784
+ // message.error({
20785
+ // content: '你正在编辑一个货物',
20786
+ // key: '你正在编辑一个货物',
20787
+ // });
20788
+ // return;
20789
+ isValidateGood = controller.state.goodsListState.isValidateGood;
20790
+
20791
+ if (!isValidateGood) {
20792
+ _context4.next = 5;
20793
+ break;
20794
+ }
20795
+
20796
+ _context4.next = 5;
20797
+ return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
20798
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
20499
20799
  var firstError;
20500
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
20800
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
20501
20801
  while (1) {
20502
- switch (_context2.prev = _context2.next) {
20802
+ switch (_context3.prev = _context3.next) {
20503
20803
  case 0:
20504
20804
  if (!err) {
20505
- _context2.next = 4;
20805
+ _context3.next = 4;
20506
20806
  break;
20507
20807
  }
20508
20808
 
@@ -20511,50 +20811,50 @@ function _addGood$1() {
20511
20811
  content: firstError.errors[0].message,
20512
20812
  key: '你正在编辑一个货物'
20513
20813
  });
20514
- return _context2.abrupt("return");
20814
+ return _context3.abrupt("return");
20515
20815
 
20516
20816
  case 4:
20517
20817
  case "end":
20518
- return _context2.stop();
20818
+ return _context3.stop();
20519
20819
  }
20520
20820
  }
20521
- }, _callee2);
20821
+ }, _callee3);
20522
20822
  }));
20523
20823
 
20524
- return function (_x5, _x6) {
20525
- return _ref3.apply(this, arguments);
20824
+ return function (_x7, _x8) {
20825
+ return _ref4.apply(this, arguments);
20526
20826
  };
20527
20827
  }());
20528
20828
 
20529
- case 3:
20530
- _context3.next = 5;
20829
+ case 5:
20830
+ _context4.next = 7;
20531
20831
  return controller.addGood({
20532
20832
  taxRate: s.goodsListState.defaultRate,
20533
20833
  lineAttribute: LineAttributeType$1.正常
20534
20834
  });
20535
20835
 
20536
- case 5:
20537
- s.goodsListState.editGood = _context3.sent;
20836
+ case 7:
20837
+ s.goodsListState.editGood = _context4.sent;
20538
20838
 
20539
- case 6:
20839
+ case 8:
20540
20840
  case "end":
20541
- return _context3.stop();
20841
+ return _context4.stop();
20542
20842
  }
20543
20843
  }
20544
- }, _callee3);
20844
+ }, _callee4);
20545
20845
  }));
20546
20846
 
20547
- return function (_x4) {
20548
- return _ref2.apply(this, arguments);
20847
+ return function (_x6) {
20848
+ return _ref3.apply(this, arguments);
20549
20849
  };
20550
20850
  }());
20551
20851
 
20552
- case 6:
20852
+ case 8:
20553
20853
  case "end":
20554
- return _context4.stop();
20854
+ return _context5.stop();
20555
20855
  }
20556
20856
  }
20557
- }, _callee4);
20857
+ }, _callee5);
20558
20858
  }));
20559
20859
  return _addGood$1.apply(this, arguments);
20560
20860
  }
@@ -20564,34 +20864,34 @@ function rollBottom$1(_x2, _x3) {
20564
20864
  }
20565
20865
 
20566
20866
  function _rollBottom$1() {
20567
- _rollBottom$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
20867
+ _rollBottom$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(controller, rootElement) {
20568
20868
  var cont;
20569
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
20869
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
20570
20870
  while (1) {
20571
- switch (_context5.prev = _context5.next) {
20871
+ switch (_context6.prev = _context6.next) {
20572
20872
  case 0:
20573
- _context5.next = 2;
20873
+ _context6.next = 2;
20574
20874
  return controller.wait();
20575
20875
 
20576
20876
  case 2:
20577
20877
  cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
20578
20878
 
20579
20879
  if (cont) {
20580
- _context5.next = 5;
20880
+ _context6.next = 5;
20581
20881
  break;
20582
20882
  }
20583
20883
 
20584
- return _context5.abrupt("return");
20884
+ return _context6.abrupt("return");
20585
20885
 
20586
20886
  case 5:
20587
20887
  cont.scrollTop = cont.scrollHeight;
20588
20888
 
20589
20889
  case 6:
20590
20890
  case "end":
20591
- return _context5.stop();
20891
+ return _context6.stop();
20592
20892
  }
20593
20893
  }
20594
- }, _callee5);
20894
+ }, _callee6);
20595
20895
  }));
20596
20896
  return _rollBottom$1.apply(this, arguments);
20597
20897
  }
@@ -21918,7 +22218,7 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
21918
22218
  };
21919
22219
  }();
21920
22220
 
21921
- var TaxIncludedSwitch$1 = (function () {
22221
+ var TaxIncludedSwitch$1 = (function (props) {
21922
22222
  var controller = Invoice.useInvoiceController();
21923
22223
  /** 是否含税 */
21924
22224
 
@@ -21937,8 +22237,9 @@ var TaxIncludedSwitch$1 = (function () {
21937
22237
  switch (_context.prev = _context.next) {
21938
22238
  case 0:
21939
22239
  onChangeSwitchTax$1(controller, e);
22240
+ props.onChange && props.onChange(e);
21940
22241
 
21941
- case 1:
22242
+ case 2:
21942
22243
  case "end":
21943
22244
  return _context.stop();
21944
22245
  }
@@ -22843,6 +23144,9 @@ var useColumns$1 = (function (form) {
22843
23144
  var changeField = controller.useMemo(function (e) {
22844
23145
  return e.calculatingField;
22845
23146
  }, []);
23147
+ var isValidateGood = controller.useMemo(function (s) {
23148
+ return s.goodsListState.isValidateGood;
23149
+ }, []);
22846
23150
  /** 计算中启动字段 */
22847
23151
 
22848
23152
  var setChangeField = React__default['default'].useCallback(function (value) {
@@ -22937,25 +23241,37 @@ var useColumns$1 = (function (form) {
22937
23241
  while (1) {
22938
23242
  switch (_context2.prev = _context2.next) {
22939
23243
  case 0:
22940
- _context2.next = 2;
23244
+ if (!isValidateGood) {
23245
+ _context2.next = 11;
23246
+ break;
23247
+ }
23248
+
23249
+ _context2.next = 3;
22941
23250
  return controller.wait();
22942
23251
 
22943
- case 2:
23252
+ case 3:
22944
23253
  value = controller.state.goodsListState.editGood;
22945
23254
 
22946
23255
  if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameSelf))) {
22947
- _context2.next = 7;
23256
+ _context2.next = 8;
22948
23257
  break;
22949
23258
  }
22950
23259
 
22951
23260
  callback('项目名称不能为空');
22952
- _context2.next = 8;
23261
+ _context2.next = 9;
22953
23262
  break;
22954
23263
 
22955
- case 7:
23264
+ case 8:
22956
23265
  return _context2.abrupt("return");
22957
23266
 
22958
- case 8:
23267
+ case 9:
23268
+ _context2.next = 12;
23269
+ break;
23270
+
23271
+ case 11:
23272
+ callback();
23273
+
23274
+ case 12:
22959
23275
  case "end":
22960
23276
  return _context2.stop();
22961
23277
  }
@@ -23156,24 +23472,34 @@ var useColumns$1 = (function (form) {
23156
23472
  while (1) {
23157
23473
  switch (_context6.prev = _context6.next) {
23158
23474
  case 0:
23159
- _context6.next = 2;
23475
+ if (!isValidateGood) {
23476
+ _context6.next = 10;
23477
+ break;
23478
+ }
23479
+
23480
+ _context6.next = 3;
23160
23481
  return controller.wait();
23161
23482
 
23162
- case 2:
23483
+ case 3:
23163
23484
  isvalue = !!value || value === 0;
23164
23485
  isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
23165
23486
 
23166
23487
  if (!(isvalue || isPrice === isvalue)) {
23167
- _context6.next = 6;
23488
+ _context6.next = 7;
23168
23489
  break;
23169
23490
  }
23170
23491
 
23171
23492
  return _context6.abrupt("return");
23172
23493
 
23173
- case 6:
23494
+ case 7:
23174
23495
  callback('请输入数量');
23496
+ _context6.next = 11;
23497
+ break;
23175
23498
 
23176
- case 7:
23499
+ case 10:
23500
+ callback();
23501
+
23502
+ case 11:
23177
23503
  case "end":
23178
23504
  return _context6.stop();
23179
23505
  }
@@ -23391,7 +23717,7 @@ var useColumns$1 = (function (form) {
23391
23717
  initialValue: editGood.lineAmountIncludeTax,
23392
23718
  getValueFromEvent: onNumberValueChange,
23393
23719
  rules: [].concat(_toConsumableArray(getReplenishRules('lineAmountIncludeTax')), [{
23394
- required: true,
23720
+ required: isValidateGood,
23395
23721
  message: '金额不能为空'
23396
23722
  }, {
23397
23723
  pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
@@ -23462,7 +23788,7 @@ var useColumns$1 = (function (form) {
23462
23788
  style: {
23463
23789
  padding: '0 10px'
23464
23790
  }
23465
- }, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
23791
+ }, value && formatSearch$1(parseFloat(value).toFixed(2), searchValue));
23466
23792
  }
23467
23793
  }
23468
23794
  }, {
@@ -23479,7 +23805,7 @@ var useColumns$1 = (function (form) {
23479
23805
  initialValue: editGood.lineAmountExcludeTax,
23480
23806
  getValueFromEvent: onNumberValueChange,
23481
23807
  rules: [].concat(_toConsumableArray(getReplenishRules('lineAmountExcludeTax')), [{
23482
- required: true,
23808
+ required: isValidateGood,
23483
23809
  message: '金额不能为空'
23484
23810
  }, {
23485
23811
  pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
@@ -23525,7 +23851,7 @@ var useColumns$1 = (function (form) {
23525
23851
  style: {
23526
23852
  padding: '0 10px'
23527
23853
  }
23528
- }, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
23854
+ }, value && formatSearch$1(parseFloat(value).toFixed(2), searchValue));
23529
23855
  }
23530
23856
  }
23531
23857
  }, {
@@ -23541,7 +23867,7 @@ var useColumns$1 = (function (form) {
23541
23867
  return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('taxRate', {
23542
23868
  initialValue: editGood.taxRate,
23543
23869
  rules: [].concat(_toConsumableArray(getReplenishRules('taxRate')), [{
23544
- required: true,
23870
+ required: isValidateGood,
23545
23871
  message: '请选择税率'
23546
23872
  }, {
23547
23873
  pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
@@ -23568,11 +23894,15 @@ var useColumns$1 = (function (form) {
23568
23894
  }, e, "%");
23569
23895
  }))));
23570
23896
  } else {
23571
- return /*#__PURE__*/React__default['default'].createElement("span", {
23572
- style: {
23573
- padding: '0 10px'
23574
- }
23575
- }, isDutyFree$1(record) ? '免税' : "".concat(value, "%"));
23897
+ if (value || value === '0' || value === 0) {
23898
+ return /*#__PURE__*/React__default['default'].createElement("span", {
23899
+ style: {
23900
+ padding: '0 10px'
23901
+ }
23902
+ }, isDutyFree$1(record) ? '免税' : "".concat(value, "%"));
23903
+ } else {
23904
+ return '';
23905
+ }
23576
23906
  }
23577
23907
  }
23578
23908
  }, {
@@ -23588,7 +23918,7 @@ var useColumns$1 = (function (form) {
23588
23918
  return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('taxAmount', {
23589
23919
  initialValue: editGood.taxAmount,
23590
23920
  rules: [].concat(_toConsumableArray(getReplenishRules('taxAmount')), [{
23591
- required: true,
23921
+ required: isValidateGood,
23592
23922
  message: '税额不能为空'
23593
23923
  }, {
23594
23924
  validator: function validator(rule, value, callback) {
@@ -23633,7 +23963,7 @@ var useColumns$1 = (function (form) {
23633
23963
  style: {
23634
23964
  padding: '0 10px'
23635
23965
  }
23636
- }, isDutyFree$1(record) ? '***' : parseFloat(value).toFixed(2));
23966
+ }, isDutyFree$1(record) ? '***' : value && parseFloat(value).toFixed(2));
23637
23967
  }
23638
23968
  }
23639
23969
  }] // 含税不含税
@@ -25578,7 +25908,9 @@ var Main$3 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25578
25908
  }
25579
25909
  }, /*#__PURE__*/React__default['default'].createElement("div", {
25580
25910
  className: "kts-invoice-operate-goods-list-able"
25581
- }, /*#__PURE__*/React__default['default'].createElement(AddRowButton$1, null), delRowButton.button, addDiscountRowButton.button, endowCodeButton.button, /*#__PURE__*/React__default['default'].createElement(TaxIncludedSwitch$1, null), /*#__PURE__*/React__default['default'].createElement(Search$1, null), /*#__PURE__*/React__default['default'].createElement("div", {
25911
+ }, /*#__PURE__*/React__default['default'].createElement(AddRowButton$1, null), delRowButton.button, addDiscountRowButton.button, endowCodeButton.button, /*#__PURE__*/React__default['default'].createElement(TaxIncludedSwitch$1, {
25912
+ onChange: props.onTaxSwitchChange
25913
+ }), /*#__PURE__*/React__default['default'].createElement(Search$1, null), /*#__PURE__*/React__default['default'].createElement("div", {
25582
25914
  style: {
25583
25915
  flex: 1
25584
25916
  }
@@ -25609,7 +25941,7 @@ var Main$3 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
25609
25941
  })), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Statistics$1, null)));
25610
25942
  });
25611
25943
 
25612
- var css_248z$r = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n";
25944
+ var css_248z$r = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAntX-row {\n border-bottom: 1px dashed #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAntX-row:last-child {\n border-bottom: none;\n}\n";
25613
25945
  styleInject(css_248z$r);
25614
25946
 
25615
25947
  var RangePicker = ktsComponentsAntdX4.DatePicker.RangePicker;
@@ -25625,126 +25957,272 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
25625
25957
  }, []);
25626
25958
  var readOnly = React__default['default'].useMemo(function () {
25627
25959
  return model === 'readOnly';
25628
- }, [model]); // 注册 form
25960
+ }, [model]);
25961
+ var goodsList = controller.useMemo(function (s) {
25962
+ return s.goodsListState.goodsList;
25963
+ }, []); //outcome-104 任务 https://wiki.dev.kingxunlian.com/pages/viewpage.action?pageId=180355189
25964
+ //商品和服务税收分类合并编码为“3040502020200000000”时,视为停车费业务,针对停车费业务,蓝字发票增加以下判断:
25965
+ // 单位必须为“平方米”;
25966
+ // 项目名称必须为“车辆停放服务”;
25967
+ // 车牌号必填,最多支持填写3个车牌号;除该场景车牌号必须为空;
25968
+ // 租赁期起止格式必须为“yyyy-MM-dd HH:mm(租赁期起)”+“空格”+“yyyy-MM-dd HH:mm(租赁期止)。
25969
+
25970
+ var isParkFee = React__default['default'].useCallback(function (taxClassificationCode) {
25971
+ if (taxClassificationCode === '3040502020200000000') {
25972
+ return true;
25973
+ } else {
25974
+ return false;
25975
+ }
25976
+ }, []);
25977
+ var indexRef = React__default['default'].useRef([]);
25978
+ React.useEffect(function () {
25979
+ var dd = goodsList === null || goodsList === void 0 ? void 0 : goodsList.reduce(function (acc, cur) {
25980
+ if (cur.lineAttribute !== 1) {
25981
+ acc.push(cur.$index);
25982
+ }
25983
+
25984
+ return acc;
25985
+ }, []);
25986
+ indexRef.current = dd;
25987
+ }, [goodsList, indexRef]); // 注册 form
25629
25988
 
25630
25989
  controller.useForm('realEstateInfo', form);
25990
+
25991
+ var getList = function getList() {
25992
+ var decrease = indexRef.current.length > goodsList.length;
25993
+
25994
+ if (decrease) {
25995
+ //已删行列表
25996
+ var diff = indexRef.current.filter(function (item) {
25997
+ return !goodsList.find(function (i) {
25998
+ return i.$index === item;
25999
+ });
26000
+ });
26001
+ var formData = form.getFieldValue('realEstateDataDto');
26002
+
26003
+ if (Array.isArray(formData) && diff.length > 0) {
26004
+ var newForm = formData === null || formData === void 0 ? void 0 : formData.filter(function (item) {
26005
+ return !diff.find(function (i) {
26006
+ return i === item.$index;
26007
+ });
26008
+ });
26009
+ form.setFieldsValue({
26010
+ realEstateDataDto: newForm
26011
+ });
26012
+ } else {
26013
+ form.setFieldsValue({
26014
+ realEstateDataDto: undefined
26015
+ });
26016
+ }
26017
+ }
26018
+
26019
+ return goodsList.filter(function (item) {
26020
+ return item.lineAttribute !== 1;
26021
+ }).map(function (item, index) {
26022
+ if (item.lineAttribute !== 1) {
26023
+ var isParkFeeItem = isParkFee(item.taxClassificationCode);
26024
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
26025
+ gutter: [17, 0]
26026
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26027
+ span: 6
26028
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26029
+ style: {
26030
+ display: 'none'
26031
+ }
26032
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].$index"), {
26033
+ initialValue: item.$index
26034
+ })( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, null))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26035
+ label: "\u4E0D\u52A8\u4EA7\u5730\u5740"
26036
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateAddress"), {
26037
+ rules: readOnly ? [] : [{
26038
+ required: true,
26039
+ message: '请选择不动产地址'
26040
+ }]
26041
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrString, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Cascader, {
26042
+ style: {
26043
+ width: '100%'
26044
+ },
26045
+ options: props.realEstateAddressOptions,
26046
+ fieldNames: props.realEstateAddressFieldNames,
26047
+ placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
26048
+ })))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26049
+ span: 6
26050
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26051
+ label: "\u8BE6\u7EC6\u5730\u5740"
26052
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateDetailedAddress"), {
26053
+ rules: readOnly ? [] : [{
26054
+ required: true,
26055
+ message: '请输入详细地址'
26056
+ }, {
26057
+ max: 120,
26058
+ message: '详细地址最多120个字符'
26059
+ }, {
26060
+ validator: function () {
26061
+ var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value, callback) {
26062
+ var pattern;
26063
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
26064
+ while (1) {
26065
+ switch (_context.prev = _context.next) {
26066
+ case 0:
26067
+ pattern = /街|路|村|乡|镇|道|巷|号/;
26068
+
26069
+ if (pattern.test(value)) {
26070
+ callback();
26071
+ } else {
26072
+ callback('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
26073
+ }
26074
+
26075
+ case 2:
26076
+ case "end":
26077
+ return _context.stop();
26078
+ }
26079
+ }
26080
+ }, _callee);
26081
+ }));
26082
+
26083
+ function validator(_x, _x2, _x3) {
26084
+ return _validator.apply(this, arguments);
26085
+ }
26086
+
26087
+ return validator;
26088
+ }()
26089
+ }]
26090
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
26091
+ autoComplete: 'off',
26092
+ placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
26093
+ })))), !isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26094
+ span: 6
26095
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26096
+ label: "\u79DF\u8D41\u671F\u8D77\u6B62"
26097
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].leaseTerm"), {
26098
+ rules: readOnly ? [] : [{
26099
+ required: true,
26100
+ message: '请输入租赁期'
26101
+ }]
26102
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrMoment, null) : /*#__PURE__*/React__default['default'].createElement(RangePicker, {
26103
+ style: {
26104
+ width: '100%'
26105
+ }
26106
+ })))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26107
+ span: 6
26108
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26109
+ label: "\u79DF\u8D41\u671F\u8D77\u6B62"
26110
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].leaseTerm"), {
26111
+ rules: readOnly ? [] : [{
26112
+ required: true,
26113
+ message: '请输入租赁期'
26114
+ }]
26115
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrMomentTime, null) : /*#__PURE__*/React__default['default'].createElement(RangePicker, {
26116
+ style: {
26117
+ width: '100%'
26118
+ },
26119
+ showTime: {
26120
+ format: 'HH:mm'
26121
+ },
26122
+ format: "YYYY-MM-DD HH:mm"
26123
+ })))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26124
+ span: 6
26125
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26126
+ label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
26127
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].crossCitiesSign"), {
26128
+ rules: readOnly ? [] : [{
26129
+ required: true,
26130
+ message: '请选择跨地(市)标志'
26131
+ }]
26132
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyNY, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
26133
+ placeholder: "\u8BF7\u9009\u62E9",
26134
+ style: {
26135
+ width: '100%'
26136
+ }
26137
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26138
+ value: 'Y'
26139
+ }, "\u662F"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26140
+ value: 'N'
26141
+ }, "\u5426"))))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26142
+ span: 6
26143
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26144
+ label: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7"
26145
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateNumber"), {
26146
+ rules: readOnly ? [] : [{
26147
+ required: true,
26148
+ message: '请输入证书编号,若没有证书填写“无”'
26149
+ }, {
26150
+ max: 40,
26151
+ message: '证书编号最多40个字符'
26152
+ }]
26153
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
26154
+ autoComplete: 'off',
26155
+ placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
26156
+ })))), !isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26157
+ span: 6
26158
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26159
+ label: "\u9762\u79EF\u5355\u4F4D"
26160
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateUnit"), {
26161
+ rules: readOnly ? [] : [{
26162
+ required: true,
26163
+ message: '请选择面积单位'
26164
+ }]
26165
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
26166
+ placeholder: "\u8BF7\u9009\u62E9",
26167
+ style: {
26168
+ width: '100%'
26169
+ }
26170
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26171
+ value: "\u5E73\u65B9\u5343\u7C73"
26172
+ }, "\u5E73\u65B9\u5343\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26173
+ value: "\u5E73\u65B9\u7C73"
26174
+ }, "\u5E73\u65B9\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26175
+ value: "\u516C\u9877"
26176
+ }, "\u516C\u9877"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26177
+ value: "\u4EA9"
26178
+ }, "\u4EA9"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26179
+ value: "h\u33A1"
26180
+ }, "h\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26181
+ value: "k\u33A1"
26182
+ }, "k\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26183
+ value: "\u33A1"
26184
+ }, "\u33A1"))))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26185
+ span: 6
26186
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26187
+ label: "\u9762\u79EF\u5355\u4F4D"
26188
+ }, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateUnit"), {
26189
+ rules: readOnly ? [] : [{
26190
+ required: true,
26191
+ message: '请选择面积单位'
26192
+ }]
26193
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
26194
+ placeholder: "\u8BF7\u9009\u62E9",
26195
+ style: {
26196
+ width: '100%'
26197
+ }
26198
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
26199
+ value: "\u5E73\u65B9\u7C73"
26200
+ }, "\u5E73\u65B9\u7C73"))))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(LicensePlateNumber, {
26201
+ form: form,
26202
+ index: index,
26203
+ cd: item.cd,
26204
+ readOnly: readOnly
26205
+ }) // <Col span={6} >
26206
+ // <Form.Item label='车牌号' >
26207
+ // {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
26208
+ // rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
26209
+ // })(
26210
+ // readOnly
26211
+ // ? <MyDiv />
26212
+ // : <LicensePlateNumber form={form}/>
26213
+ // )}
26214
+ // </Form.Item>
26215
+ // </Col>
26216
+ );
26217
+ }
26218
+ });
26219
+ };
26220
+
25631
26221
  return /*#__PURE__*/React__default['default'].createElement("div", {
25632
26222
  className: "kts-invoice-operate-real-estate-info-digtal"
25633
26223
  }, /*#__PURE__*/React__default['default'].createElement("div", {
25634
26224
  className: 'real-estate-info-digtal-label'
25635
- }, "\u7279\u6B8A\u4FE1\u606F-\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
25636
- gutter: [17, 0]
25637
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25638
- span: 6
25639
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
25640
- label: "\u4E0D\u52A8\u4EA7\u5730\u5740"
25641
- }, getFieldDecorator('realEstateAddress', {
25642
- rules: readOnly ? [] : [{
25643
- required: true,
25644
- message: '请选择不动产地址'
25645
- }]
25646
- })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrString, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Cascader, {
25647
- style: {
25648
- width: '100%'
25649
- },
25650
- options: props.realEstateAddressOptions,
25651
- fieldNames: props.realEstateAddressFieldNames,
25652
- placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
25653
- })))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25654
- span: 6
25655
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
25656
- label: "\u8BE6\u7EC6\u5730\u5740"
25657
- }, getFieldDecorator('realEstateDetailedAddress', {
25658
- rules: readOnly ? [] : [{
25659
- required: true,
25660
- message: '请输入详细地址'
25661
- }, {
25662
- max: 120,
25663
- message: '详细地址最多120个字符'
25664
- }, {
25665
- validator: function validator(_, value) {
25666
- var pattern = /街|路|村|乡|镇|道|巷|号/;
25667
- return pattern.test(value) ? Promise.resolve() : Promise.reject('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
25668
- }
25669
- }]
25670
- })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
25671
- autoComplete: 'off',
25672
- placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
25673
- })))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25674
- span: 6
25675
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
25676
- label: "\u79DF\u8D41\u671F\u8D77\u6B62"
25677
- }, getFieldDecorator('leaseTerm', {
25678
- rules: readOnly ? [] : [{
25679
- required: true,
25680
- message: '请输入租赁期'
25681
- }]
25682
- })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrMoment, null) : /*#__PURE__*/React__default['default'].createElement(RangePicker, {
25683
- style: {
25684
- width: '100%'
25685
- }
25686
- })))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25687
- span: 6
25688
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
25689
- label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
25690
- }, getFieldDecorator('crossCitiesSign', {
25691
- rules: readOnly ? [] : [{
25692
- required: true,
25693
- message: '请选择跨地(市)标志'
25694
- }]
25695
- })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyNY, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
25696
- placeholder: "\u8BF7\u9009\u62E9",
25697
- style: {
25698
- width: '100%'
25699
- }
25700
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25701
- value: 'Y'
25702
- }, "\u662F"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25703
- value: 'N'
25704
- }, "\u5426"))))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25705
- span: 6
25706
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
25707
- label: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7"
25708
- }, getFieldDecorator('realEstateNumber', {
25709
- rules: readOnly ? [] : [{
25710
- required: true,
25711
- message: '请输入证书编号,若没有证书填写“无”'
25712
- }, {
25713
- max: 40,
25714
- message: '证书编号最多40个字符'
25715
- }]
25716
- })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
25717
- autoComplete: 'off',
25718
- placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
25719
- })))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25720
- span: 6
25721
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
25722
- label: "\u9762\u79EF\u5355\u4F4D"
25723
- }, getFieldDecorator('realEstateUnit', {
25724
- rules: readOnly ? [] : [{
25725
- required: true,
25726
- message: '请选择面积单位'
25727
- }]
25728
- })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
25729
- placeholder: "\u8BF7\u9009\u62E9",
25730
- style: {
25731
- width: '100%'
25732
- }
25733
- }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25734
- value: "\u5E73\u65B9\u5343\u7C73"
25735
- }, "\u5E73\u65B9\u5343\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25736
- value: "\u5E73\u65B9\u7C73"
25737
- }, "\u5E73\u65B9\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25738
- value: "\u516C\u9877"
25739
- }, "\u516C\u9877"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25740
- value: "\u4EA9"
25741
- }, "\u4EA9"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25742
- value: "h\u33A1"
25743
- }, "h\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25744
- value: "k\u33A1"
25745
- }, "k\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
25746
- value: "\u33A1"
25747
- }, "\u33A1")))))));
26225
+ }, "\u7279\u5B9A\u4FE1\u606F-\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1"), getList());
25748
26226
  });
25749
26227
 
25750
26228
  var MyDiv$3 = /*#__PURE__*/function (_React$Component) {
@@ -25820,22 +26298,52 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
25820
26298
  color: '#9F603D',
25821
26299
  fontWeight: 600
25822
26300
  }
25823
- }, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
26301
+ }, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[1].format('YYYY-MM-DD')));
25824
26302
  }
25825
26303
  }]);
25826
26304
 
25827
26305
  return MyArrMoment;
25828
26306
  }(React__default['default'].Component);
25829
26307
 
25830
- var MyNY = /*#__PURE__*/function (_React$Component4) {
25831
- _inherits(MyNY, _React$Component4);
26308
+ var MyArrMomentTime = /*#__PURE__*/function (_React$Component4) {
26309
+ _inherits(MyArrMomentTime, _React$Component4);
25832
26310
 
25833
- var _super4 = _createSuper(MyNY);
26311
+ var _super4 = _createSuper(MyArrMomentTime);
26312
+
26313
+ function MyArrMomentTime() {
26314
+ _classCallCheck(this, MyArrMomentTime);
26315
+
26316
+ return _super4.apply(this, arguments);
26317
+ }
26318
+
26319
+ _createClass(MyArrMomentTime, [{
26320
+ key: "render",
26321
+ value: function render() {
26322
+ var _this$props$value3 = this.props.value,
26323
+ value = _this$props$value3 === void 0 ? [] : _this$props$value3;
26324
+ return /*#__PURE__*/React__default['default'].createElement("div", {
26325
+ style: this.props.style
26326
+ }, /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD HH:mm')), /*#__PURE__*/React__default['default'].createElement("span", {
26327
+ style: {
26328
+ color: '#9F603D',
26329
+ fontWeight: 600
26330
+ }
26331
+ }, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[1].format('YYYY-MM-DD HH:mm')));
26332
+ }
26333
+ }]);
26334
+
26335
+ return MyArrMomentTime;
26336
+ }(React__default['default'].Component);
26337
+
26338
+ var MyNY = /*#__PURE__*/function (_React$Component5) {
26339
+ _inherits(MyNY, _React$Component5);
26340
+
26341
+ var _super5 = _createSuper(MyNY);
25834
26342
 
25835
26343
  function MyNY() {
25836
26344
  _classCallCheck(this, MyNY);
25837
26345
 
25838
- return _super4.apply(this, arguments);
26346
+ return _super5.apply(this, arguments);
25839
26347
  }
25840
26348
 
25841
26349
  _createClass(MyNY, [{
@@ -25850,6 +26358,137 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
25850
26358
  return MyNY;
25851
26359
  }(React__default['default'].Component);
25852
26360
 
26361
+ var LicensePlateNumber = function LicensePlateNumber(props) {
26362
+ var _formData$props$index2;
26363
+
26364
+ var form = props.form,
26365
+ readOnly = props.readOnly;
26366
+ var getFieldDecorator = form.getFieldDecorator;
26367
+ var licenceLimit = 3; // 最多支持填写3个车牌号
26368
+
26369
+ var formData = form.getFieldValue('realEstateDataDto');
26370
+
26371
+ var _React$useState = React__default['default'].useState(new Array(props.cd || 1).fill('')),
26372
+ _React$useState2 = _slicedToArray(_React$useState, 2),
26373
+ value = _React$useState2[0],
26374
+ setVal = _React$useState2[1];
26375
+
26376
+ var cd = React__default['default'].useMemo(function () {
26377
+ var _formData$props$index;
26378
+
26379
+ return (_formData$props$index = formData[props.index]) === null || _formData$props$index === void 0 ? void 0 : _formData$props$index.cd;
26380
+ }, [(_formData$props$index2 = formData[props.index]) === null || _formData$props$index2 === void 0 ? void 0 : _formData$props$index2.cd]); // useEffect(() => {
26381
+ // if (cd) {
26382
+ // const dd = value.concat(new Array(cd.length-1).fill(''))
26383
+ // setVal(dd);
26384
+ // }
26385
+ // }, [cd])
26386
+
26387
+ var onAdd = function onAdd() {
26388
+ if (value.length < licenceLimit) {
26389
+ setVal([].concat(_toConsumableArray(value), ['']));
26390
+ } else {
26391
+ ktsComponentsAntdX3.message.warn('最多支持填写3个车牌号');
26392
+ }
26393
+ }; // 删除车牌号
26394
+
26395
+
26396
+ var onDelete = function onDelete() {
26397
+ if (value.length > 0) {
26398
+ var dd = value.slice(0, -1);
26399
+ setVal(dd);
26400
+ }
26401
+ };
26402
+
26403
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, value.length > 0 && value.map(function (item, key) {
26404
+ return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26405
+ span: 6
26406
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
26407
+ label: "\u8F66\u724C\u53F7",
26408
+ key: key
26409
+ }, getFieldDecorator("realEstateDataDto[".concat(props.index, "].cphList[").concat(key, "]"), {
26410
+ rules: readOnly ? [] : [{
26411
+ required: true,
26412
+ message: '请输入车牌号,最多20位'
26413
+ }]
26414
+ })(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
26415
+ style: {
26416
+ width: '100%'
26417
+ },
26418
+ maxLength: 20,
26419
+ autoComplete: 'off',
26420
+ placeholder: "\u8BF7\u8F93\u5165\u8F66\u724C\u53F7"
26421
+ }))));
26422
+ }), !readOnly && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
26423
+ span: 6
26424
+ }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
26425
+ style: {
26426
+ color: 'white'
26427
+ }
26428
+ }, "1"), /*#__PURE__*/React__default['default'].createElement("a", {
26429
+ style: {
26430
+ marginRight: 10
26431
+ },
26432
+ onClick: onAdd
26433
+ }, "\u6DFB\u52A0\u8F66\u724C\u53F7"), value.length > 1 && /*#__PURE__*/React__default['default'].createElement("a", {
26434
+ onClick: onDelete
26435
+ }, "\u5220\u9664"))));
26436
+ }; // const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
26437
+ // const { form } = props;
26438
+ // const { getFieldDecorator } = form;
26439
+ // const licenceLimit = 3; // 最多支持填写3个车牌号
26440
+ // // const { value = [] } = this.props;
26441
+ // const [value, setVal] = React.useState(props.value || ['']);
26442
+ // // const newArr = value.filter(e => !!e);
26443
+ // const newArrLength = value.length;
26444
+ // console.log(value, newArrLength)
26445
+ // // 新增车牌号
26446
+ // const onAdd = () => {
26447
+ // if (newArrLength < licenceLimit) {
26448
+ // setVal([...value, '']);
26449
+ // props.onChange?.([...value, ''])
26450
+ // }
26451
+ // }
26452
+ // // 删除车牌号
26453
+ // const onDelete = () => {
26454
+ // if (newArrLength > 0) {
26455
+ // const dd = value.slice(0, -1)
26456
+ // setVal(dd);
26457
+ // props.onChange?.(dd)
26458
+ // }
26459
+ // }
26460
+ // const onInputChange = (e: React.ChangeEvent<HTMLInputElement>, index: number) => {
26461
+ // console.log(e.target.value);
26462
+ // const dd = value.map((item, i) => {
26463
+ // if (i === index) {
26464
+ // return e.target.value
26465
+ // }
26466
+ // return item
26467
+ // })
26468
+ // setVal(dd);
26469
+ // props.onChange?.(dd)
26470
+ // }
26471
+ // return (
26472
+ // <>
26473
+ // {newArrLength > 0 && value.map((item, index) => {
26474
+ // return
26475
+ // <Form.Item label='车牌号' >
26476
+ // {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
26477
+ // rules: [{ required: true, }]
26478
+ // })(
26479
+ // <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
26480
+ // )}
26481
+ // </Form.Item>
26482
+ // // <Col span={6} >
26483
+ // // <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
26484
+ // // </Col>
26485
+ // })}
26486
+ // <Button type="link" onClick={onAdd}>添加车牌号</Button>
26487
+ // {newArrLength > 1 && <Button type="link" onClick={onDelete}>删除</Button>}
26488
+ // </>
26489
+ // )
26490
+ // }
26491
+
25853
26492
  var css_248z$s = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-real-estate-info-digtal .break-word {\n word-break: break-word;\n}\n";
25854
26493
  styleInject(css_248z$s);
25855
26494
 
@@ -25872,7 +26511,7 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
25872
26511
  className: "kts-invoice-operate-real-estate-info-digtal"
25873
26512
  }, /*#__PURE__*/React__default['default'].createElement("div", {
25874
26513
  className: 'real-estate-info-digtal-label'
25875
- }, "\u7279\u6B8A\u4FE1\u606F-\u5EFA\u7B51\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
26514
+ }, "\u7279\u5B9A\u4FE1\u606F-\u5EFA\u7B51\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
25876
26515
  gutter: [17, 0]
25877
26516
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
25878
26517
  span: 6
@@ -27478,7 +28117,7 @@ var Main$4 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
27478
28117
  className: "kts-invoice-operate-freight"
27479
28118
  }, /*#__PURE__*/React__default['default'].createElement("div", {
27480
28119
  className: 'real-estate-info-digtal-label'
27481
- }, "\u7279\u6B8A\u4FE1\u606F-\u8D27\u7269\u8FD0\u8F93"), /*#__PURE__*/React__default['default'].createElement("div", {
28120
+ }, "\u7279\u5B9A\u4FE1\u606F-\u8D27\u7269\u8FD0\u8F93"), /*#__PURE__*/React__default['default'].createElement("div", {
27482
28121
  className: "kts-invoice-operate-goods-list-digtal",
27483
28122
  onClick: function onClick(e) {
27484
28123
  e.stopPropagation();
@@ -27995,7 +28634,7 @@ var useColumns$3 = (function (form) {
27995
28634
  message: '请输入'
27996
28635
  }]
27997
28636
  })( /*#__PURE__*/React__default['default'].createElement(MyInput$5, {
27998
- maxLength: 200,
28637
+ maxLength: 40,
27999
28638
  onChange: function () {
28000
28639
  var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
28001
28640
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -28941,9 +29580,10 @@ var ImportGoodsDrawer = (function () {
28941
29580
  while (1) {
28942
29581
  switch (_context.prev = _context.next) {
28943
29582
  case 0:
29583
+ s.goodsListState.importGoods.filter = {};
28944
29584
  s.goodsListState.importGoods.isVisibleDrawer = false;
28945
29585
 
28946
- case 1:
29586
+ case 2:
28947
29587
  case "end":
28948
29588
  return _context.stop();
28949
29589
  }