kts-component-invoice-operate 3.2.180 → 3.2.182

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 (65) hide show
  1. package/dist/Invoice/Invoice-digtal/_test/architecture/index.d.ts +4 -0
  2. package/dist/Invoice/Invoice-digtal/_test/freight/index.d.ts +4 -0
  3. package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.d.ts +6 -0
  4. package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.d.ts +23 -0
  5. package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.d.ts +21 -0
  6. package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.d.ts +31 -0
  7. package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +5 -0
  8. package/dist/Invoice/InvoiceController/fns/addFreight.d.ts +6 -0
  9. package/dist/Invoice/InvoiceController/fns/delFreight.d.ts +6 -0
  10. package/dist/Invoice/InvoiceController/fns/saveEditFreight.d.ts +6 -0
  11. package/dist/Invoice/InvoiceController/fns/setEditFreight.d.ts +6 -0
  12. package/dist/Invoice/InvoiceController/fns/setFreight.d.ts +6 -0
  13. package/dist/Invoice/InvoiceController/index.d.ts +10 -0
  14. package/dist/Invoice/index.d.ts +4 -0
  15. package/dist/Invoice/ui/digtal/Architecture/index.d.ts +15 -0
  16. package/dist/Invoice/ui/digtal/FreightList/hook/useColumns/index.d.ts +3 -0
  17. package/dist/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.d.ts +8 -0
  18. package/dist/Invoice/ui/digtal/FreightList/hook/useOnRow/index.d.ts +8 -0
  19. package/dist/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.d.ts +8 -0
  20. package/dist/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.d.ts +8 -0
  21. package/dist/Invoice/ui/digtal/FreightList/index.d.ts +15 -0
  22. package/dist/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.d.ts +3 -0
  23. package/dist/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +6 -0
  24. package/dist/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +6 -0
  25. package/dist/Invoice/ui/digtal/FreightList/ui/TableRow/index.d.ts +3 -0
  26. package/dist/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.d.ts +4 -0
  27. package/dist/index.esm.js +1974 -21
  28. package/dist/index.js +1974 -21
  29. package/package.json +3 -3
  30. package/src/Invoice/Invoice-digtal/_test/architecture/index.tsx +22 -0
  31. package/src/Invoice/Invoice-digtal/_test/freight/index.tsx +14575 -0
  32. package/src/Invoice/Invoice-digtal/index.md +7 -1
  33. package/src/Invoice/InvoiceController/InvoiceControllerForm/index.ts +11 -1
  34. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.ts +10 -0
  35. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.ts +33 -0
  36. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.ts +81 -0
  37. package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.ts +40 -0
  38. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +6 -0
  39. package/src/Invoice/InvoiceController/fns/addFreight.ts +11 -0
  40. package/src/Invoice/InvoiceController/fns/delFreight.ts +38 -0
  41. package/src/Invoice/InvoiceController/fns/saveEditFreight.ts +24 -0
  42. package/src/Invoice/InvoiceController/fns/setEditFreight.ts +16 -0
  43. package/src/Invoice/InvoiceController/fns/setFreight.ts +11 -0
  44. package/src/Invoice/InvoiceController/index.ts +20 -1
  45. package/src/Invoice/index.tsx +8 -1
  46. package/src/Invoice/tools/useToGenerateId/index.ts +2 -0
  47. package/src/Invoice/ui/digtal/Architecture/index.less +15 -0
  48. package/src/Invoice/ui/digtal/Architecture/index.tsx +175 -0
  49. package/src/Invoice/ui/digtal/FreightList/hook/useColumns/dist/index.js +616 -0
  50. package/src/Invoice/ui/digtal/FreightList/hook/useColumns/index.tsx +246 -0
  51. package/src/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.tsx +20 -0
  52. package/src/Invoice/ui/digtal/FreightList/hook/useOnRow/index.tsx +37 -0
  53. package/src/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.tsx +120 -0
  54. package/src/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.tsx +23 -0
  55. package/src/Invoice/ui/digtal/FreightList/index.less +74 -0
  56. package/src/Invoice/ui/digtal/FreightList/index.tsx +129 -0
  57. package/src/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.tsx +65 -0
  58. package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +50 -0
  59. package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +37 -0
  60. package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.less +29 -0
  61. package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.tsx +21 -0
  62. package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.less +39 -0
  63. package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.tsx +109 -0
  64. package/src/Invoice/ui/digtal/GoodsList/index.tsx +0 -1
  65. package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +0 -1
package/dist/index.esm.js CHANGED
@@ -4,8 +4,8 @@ import GreyReactBox, { decorator } from 'grey-react-box';
4
4
  import { chain as chain$1, bignumber, format as format$1, create, all, equal } from 'mathjs';
5
5
  import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover as Popover$1, Table as Table$1, Tree, Modal as Modal$1, Row as Row$2, Col as Col$2 } from 'kts-components-antd-x3';
6
6
  import { v4 } from 'uuid';
7
- import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Dropdown as Dropdown$1, Row, Col, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal, Tree as Tree$1, Card, FormReadOnly } from 'kts-xui';
8
- import classNames from 'classnames';
7
+ import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Dropdown as Dropdown$1, Row, Col, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal, Cascader as Cascader$1, Tree as Tree$1, Card, FormReadOnly } from 'kts-xui';
8
+ import classnames from 'classnames';
9
9
  import { Table } from 'kts-components-antd-x4-v4';
10
10
  import { render } from 'react-dom';
11
11
  import { DatePicker, Row as Row$1, Col as Col$1, Cascader, Input as Input$2, Select as Select$2 } from 'kts-components-antd-x4';
@@ -759,7 +759,7 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
759
759
  var _validateFields2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
760
760
  var _this3 = this;
761
761
 
762
- var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList;
762
+ var _errors, _values, arr, i, key, _yield$_validateField, errors, values, _this$state$goodsList, _this$state$freightLi;
763
763
 
764
764
  return _regeneratorRuntime().wrap(function _callee$(_context) {
765
765
  while (1) {
@@ -817,7 +817,30 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
817
817
  _errors.set('goodsList', _context.t0.errors);
818
818
 
819
819
  case 27:
820
- _values.set('goodsList', this.state.goodsListState.goodsList.slice()); // 金额(含税)
820
+ _values.set('goodsList', this.state.goodsListState.goodsList.slice()); //货物运输列表
821
+
822
+
823
+ if (!this.state.freightListState.form) {
824
+ _context.next = 37;
825
+ break;
826
+ }
827
+
828
+ _context.prev = 29;
829
+ _context.next = 32;
830
+ return (_this$state$freightLi = this.state.freightListState.form) === null || _this$state$freightLi === void 0 ? void 0 : _this$state$freightLi.validateFields();
831
+
832
+ case 32:
833
+ _context.next = 37;
834
+ break;
835
+
836
+ case 34:
837
+ _context.prev = 34;
838
+ _context.t1 = _context["catch"](29);
839
+
840
+ _errors.set('freightList', _context.t1.errors);
841
+
842
+ case 37:
843
+ _values.set('freightList', this.state.freightListState.goodsList.slice()); // 金额(含税)
821
844
 
822
845
 
823
846
  _values.set('lineAmountIncludeTax', function () {
@@ -863,12 +886,12 @@ var InvoiceControllerForm = /*#__PURE__*/function (_GreyReactBox) {
863
886
  values: _values
864
887
  });
865
888
 
866
- case 33:
889
+ case 43:
867
890
  case "end":
868
891
  return _context.stop();
869
892
  }
870
893
  }
871
- }, _callee, this, [[19, 24]]);
894
+ }, _callee, this, [[19, 24], [29, 34]]);
872
895
  }));
873
896
 
874
897
  function validateFields() {
@@ -1130,6 +1153,26 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
1130
1153
  this.drag = new Drag();
1131
1154
  });
1132
1155
 
1156
+ var FreightListState = /*#__PURE__*/_createClass(function FreightListState() {
1157
+ _classCallCheck(this, FreightListState);
1158
+
1159
+ this.goodMax = void 0;
1160
+ this.editGood = void 0;
1161
+ this.isAddRow = true;
1162
+ this.isRemRow = true;
1163
+ this.goodsMap = new Map();
1164
+ this.form = void 0;
1165
+ this.vehicleTypeList = [];
1166
+ this.goodsList = [];
1167
+ this.selectedGoodIndex = [];
1168
+ this.area = [];
1169
+ this.addressFieldNames = {
1170
+ label: 'label',
1171
+ value: 'value',
1172
+ children: 'children'
1173
+ };
1174
+ });
1175
+
1133
1176
  var BuyerState = /*#__PURE__*/_createClass(function BuyerState() {
1134
1177
  _classCallCheck(this, BuyerState);
1135
1178
 
@@ -1221,6 +1264,7 @@ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControlle
1221
1264
  this.typeModalProps = void 0;
1222
1265
  this.autoComplete = new AutoComplete();
1223
1266
  this.taxClassificationProps = void 0;
1267
+ this.freightListState = new FreightListState();
1224
1268
  });
1225
1269
 
1226
1270
  /**
@@ -1257,6 +1301,40 @@ var setEditGood = /*#__PURE__*/(function () {
1257
1301
  };
1258
1302
  })();
1259
1303
 
1304
+ /**
1305
+ * 设置当前的编辑货物运输
1306
+ */
1307
+ var setEditFreight = /*#__PURE__*/(function () {
1308
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, newEditGood) {
1309
+ var editGood;
1310
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1311
+ while (1) {
1312
+ switch (_context.prev = _context.next) {
1313
+ case 0:
1314
+ if (newEditGood) {
1315
+ editGood = state.freightListState.editGood;
1316
+ state.freightListState = _objectSpread2(_objectSpread2({}, state.freightListState), {}, {
1317
+ editGood: _objectSpread2(_objectSpread2({}, editGood), newEditGood)
1318
+ });
1319
+ } else {
1320
+ state.freightListState = _objectSpread2(_objectSpread2({}, state.freightListState), {}, {
1321
+ editGood: undefined
1322
+ });
1323
+ }
1324
+
1325
+ case 1:
1326
+ case "end":
1327
+ return _context.stop();
1328
+ }
1329
+ }
1330
+ }, _callee);
1331
+ }));
1332
+
1333
+ return function (_x, _x2) {
1334
+ return _ref.apply(this, arguments);
1335
+ };
1336
+ })();
1337
+
1260
1338
  /**
1261
1339
  * 设置单个货物属性
1262
1340
  */
@@ -1295,6 +1373,44 @@ var setGoods = /*#__PURE__*/(function () {
1295
1373
  };
1296
1374
  })();
1297
1375
 
1376
+ /**
1377
+ * 设置单个货物属性
1378
+ */
1379
+ var setFreight = /*#__PURE__*/(function () {
1380
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
1381
+ var goodsList;
1382
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1383
+ while (1) {
1384
+ switch (_context.prev = _context.next) {
1385
+ case 0:
1386
+ if (!(!options || !options.$index)) {
1387
+ _context.next = 2;
1388
+ break;
1389
+ }
1390
+
1391
+ return _context.abrupt("return");
1392
+
1393
+ case 2:
1394
+ goodsList = state.freightListState.goodsList.map(function (e) {
1395
+ return e.$index === options.$index ? _objectSpread2(_objectSpread2({}, e), options) : e;
1396
+ });
1397
+ state.freightListState = _objectSpread2(_objectSpread2({}, state.freightListState), {}, {
1398
+ goodsList: goodsList
1399
+ });
1400
+
1401
+ case 4:
1402
+ case "end":
1403
+ return _context.stop();
1404
+ }
1405
+ }
1406
+ }, _callee);
1407
+ }));
1408
+
1409
+ return function (_x, _x2) {
1410
+ return _ref.apply(this, arguments);
1411
+ };
1412
+ })();
1413
+
1298
1414
  /**
1299
1415
  * 删除一个货物
1300
1416
  */
@@ -1379,6 +1495,87 @@ var delGood = /*#__PURE__*/(function () {
1379
1495
  };
1380
1496
  })();
1381
1497
 
1498
+ /**
1499
+ * 删除一个货物运输
1500
+ */
1501
+ var delFreight = /*#__PURE__*/(function () {
1502
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, $index) {
1503
+ var goods, goodsList, goodsMap, i;
1504
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1505
+ while (1) {
1506
+ switch (_context.prev = _context.next) {
1507
+ case 0:
1508
+ if ($index) {
1509
+ _context.next = 2;
1510
+ break;
1511
+ }
1512
+
1513
+ return _context.abrupt("return");
1514
+
1515
+ case 2:
1516
+ // 查下要删除的货物
1517
+ goods = state.freightListState.goodsList.filter(function (e) {
1518
+ return e.$index === $index;
1519
+ })[0];
1520
+
1521
+ if (goods) {
1522
+ _context.next = 5;
1523
+ break;
1524
+ }
1525
+
1526
+ return _context.abrupt("return");
1527
+
1528
+ case 5:
1529
+ // 如果正在编辑 就取消编辑
1530
+ if (state.freightListState.editGood && state.freightListState.editGood.$index === $index) {
1531
+ state.freightListState.editGood = undefined;
1532
+ }
1533
+
1534
+ goodsList = state.freightListState.goodsList;
1535
+ goodsMap = state.freightListState.goodsMap;
1536
+ goodsMap.delete($index);
1537
+ i = 0;
1538
+
1539
+ case 10:
1540
+ if (!(i < goodsList.length)) {
1541
+ _context.next = 17;
1542
+ break;
1543
+ }
1544
+
1545
+ if (!(goodsList[i].$index === $index)) {
1546
+ _context.next = 14;
1547
+ break;
1548
+ }
1549
+
1550
+ // const good = goodsList[i];
1551
+ // if (good.lineAttribute === LineAttributeType.折扣行 && goodsList[i - 1] && goodsList[i - 1].lineAttribute === LineAttributeType.被折扣行) {
1552
+ // goodsList[i - 1].lineAttribute = LineAttributeType.正常;
1553
+ // }
1554
+ goodsList.splice(i, 1);
1555
+ return _context.abrupt("break", 17);
1556
+
1557
+ case 14:
1558
+ i++;
1559
+ _context.next = 10;
1560
+ break;
1561
+
1562
+ case 17:
1563
+ state.freightListState.goodsList = _toConsumableArray(goodsList);
1564
+ state.freightListState.goodsMap = new Map(goodsMap);
1565
+
1566
+ case 19:
1567
+ case "end":
1568
+ return _context.stop();
1569
+ }
1570
+ }
1571
+ }, _callee);
1572
+ }));
1573
+
1574
+ return function (_x, _x2) {
1575
+ return _ref.apply(this, arguments);
1576
+ };
1577
+ })();
1578
+
1382
1579
  var idGenerator = (function () {
1383
1580
  return v4();
1384
1581
  });
@@ -1744,6 +1941,33 @@ var addGood = /*#__PURE__*/(function () {
1744
1941
  };
1745
1942
  })();
1746
1943
 
1944
+ /**
1945
+ * 添加的编辑货物运输
1946
+ */
1947
+
1948
+ var addFreight = /*#__PURE__*/(function () {
1949
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
1950
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1951
+ while (1) {
1952
+ switch (_context.prev = _context.next) {
1953
+ case 0:
1954
+ options.$index = idGenerator();
1955
+ state.freightListState.goodsList = [].concat(_toConsumableArray(state.freightListState.goodsList), [options]);
1956
+ return _context.abrupt("return", options);
1957
+
1958
+ case 3:
1959
+ case "end":
1960
+ return _context.stop();
1961
+ }
1962
+ }
1963
+ }, _callee);
1964
+ }));
1965
+
1966
+ return function (_x, _x2) {
1967
+ return _ref.apply(this, arguments);
1968
+ };
1969
+ })();
1970
+
1747
1971
  /**
1748
1972
  * 保存正在编辑的货物
1749
1973
  */
@@ -1823,6 +2047,85 @@ var validateFields = function validateFields(form) {
1823
2047
  });
1824
2048
  };
1825
2049
 
2050
+ /**
2051
+ * 保存正在编辑的货物
2052
+ */
2053
+ var saveEditFreight = /*#__PURE__*/(function () {
2054
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state) {
2055
+ var editGood, form;
2056
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2057
+ while (1) {
2058
+ switch (_context.prev = _context.next) {
2059
+ case 0:
2060
+ editGood = state.freightListState.editGood;
2061
+ form = state.freightListState.form;
2062
+
2063
+ if (!(!editGood || !form)) {
2064
+ _context.next = 4;
2065
+ break;
2066
+ }
2067
+
2068
+ return _context.abrupt("return");
2069
+
2070
+ case 4:
2071
+ _context.next = 6;
2072
+ return validateFields$1(form);
2073
+
2074
+ case 6:
2075
+ if (!_context.sent.err) {
2076
+ _context.next = 8;
2077
+ break;
2078
+ }
2079
+
2080
+ return _context.abrupt("return");
2081
+
2082
+ case 8:
2083
+ state.freightListState.goodsList = state.freightListState.goodsList.map(function (e) {
2084
+ return e.$index === editGood.$index ? _objectSpread2(_objectSpread2({}, e), editGood) : e;
2085
+ });
2086
+ state.freightListState.editGood = undefined;
2087
+
2088
+ case 10:
2089
+ case "end":
2090
+ return _context.stop();
2091
+ }
2092
+ }
2093
+ }, _callee);
2094
+ }));
2095
+
2096
+ return function (_x) {
2097
+ return _ref.apply(this, arguments);
2098
+ };
2099
+ })();
2100
+
2101
+ var validateFields$1 = function validateFields(form) {
2102
+ return new Promise(function (resolve) {
2103
+ form.validateFields( /*#__PURE__*/function () {
2104
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
2105
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2106
+ while (1) {
2107
+ switch (_context2.prev = _context2.next) {
2108
+ case 0:
2109
+ resolve({
2110
+ err: err,
2111
+ values: values
2112
+ });
2113
+
2114
+ case 1:
2115
+ case "end":
2116
+ return _context2.stop();
2117
+ }
2118
+ }
2119
+ }, _callee2);
2120
+ }));
2121
+
2122
+ return function (_x2, _x3) {
2123
+ return _ref2.apply(this, arguments);
2124
+ };
2125
+ }());
2126
+ });
2127
+ };
2128
+
1826
2129
  /**
1827
2130
  * 计算搜索商品
1828
2131
  * @param goodsList 被搜索列表
@@ -9729,10 +10032,15 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
9729
10032
  _this.updateInvoiceNo = void 0;
9730
10033
  _this.getBuyerList = void 0;
9731
10034
  _this.setGoods = _this.pipeline(setGoods);
10035
+ _this.setFreight = _this.pipeline(setFreight);
10036
+ _this.setEditFreight = _this.pipeline(setEditFreight);
9732
10037
  _this.setEditGood = _this.pipeline(setEditGood);
9733
10038
  _this.saveEditGood = _this.pipeline(saveEditGood);
10039
+ _this.saveEditFreight = _this.pipeline(saveEditFreight);
9734
10040
  _this.delGood = _this.pipeline(delGood);
10041
+ _this.delFreight = _this.pipeline(delFreight);
9735
10042
  _this.addGood = _this.pipeline(addGood);
10043
+ _this.addFreight = _this.pipeline(addFreight);
9736
10044
  _this.mergeDetails = _this.pipeline(mergeDetails);
9737
10045
  _this.mergeDiscount = _this.pipeline(mergeDiscount);
9738
10046
  _this.addGoodDiscount = _this.pipeline(addGoodDiscount);
@@ -9764,6 +10072,14 @@ function useToGenerateId(controller) {
9764
10072
  e.serialNo = i + 1;
9765
10073
  });
9766
10074
  }, [goodsList]);
10075
+ var freightList = controller.useMemo(function (s) {
10076
+ return s.freightListState.goodsList;
10077
+ }, []);
10078
+ React.useEffect(function () {
10079
+ freightList.forEach(function (e, i) {
10080
+ e.sortNumber = i + 1;
10081
+ });
10082
+ }, [freightList]);
9767
10083
  }
9768
10084
 
9769
10085
  var Nzh = require("nzh");
@@ -10751,7 +11067,7 @@ function TableRow(props) {
10751
11067
  bottom: 0
10752
11068
  }
10753
11069
  })) : /*#__PURE__*/React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
10754
- className: classNames(props.className, discount, expandedRow, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container-' + site : undefined)
11070
+ className: classnames(props.className, discount, expandedRow, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container-' + site : undefined)
10755
11071
  }));
10756
11072
  }
10757
11073
 
@@ -12635,8 +12951,8 @@ var Icon = /*#__PURE__*/forwardRef(function (props, ref) {
12635
12951
  _React$useContext$pre = _React$useContext.prefixCls,
12636
12952
  prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre;
12637
12953
 
12638
- var classString = classNames(prefixCls, className);
12639
- var svgClassString = classNames(_defineProperty$1({}, "".concat(prefixCls, "-spin"), !!spin));
12954
+ var classString = classnames(prefixCls, className);
12955
+ var svgClassString = classnames(_defineProperty$1({}, "".concat(prefixCls, "-spin"), !!spin));
12640
12956
  var svgStyle = rotate ? {
12641
12957
  msTransform: "rotate(".concat(rotate, "deg)"),
12642
12958
  transform: "rotate(".concat(rotate, "deg)")
@@ -16275,7 +16591,7 @@ var Main = decorator(Form.create())(function (props) {
16275
16591
  }, /*#__PURE__*/React.createElement(AddRowButton, null), endowCodeButton.button, delRowButton.button, mergeDetails.button, mergeDiscount.button, addDiscountRowButton.drawer, salesDiscount.button, salesGifts.button, /*#__PURE__*/React.createElement(Search, null)), /*#__PURE__*/React.createElement("div", {
16276
16592
  className: "kts-invoice-operate-goods-list-able-extend"
16277
16593
  }, props.menuExpansion, /*#__PURE__*/React.createElement(DescribeSwitch, null), /*#__PURE__*/React.createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React.createElement("div", {
16278
- className: classNames('kts-invoice-operate-goods-list-table', {
16594
+ className: classnames('kts-invoice-operate-goods-list-table', {
16279
16595
  'kts-invoice-operate-prefab': isprefab
16280
16596
  })
16281
16597
  }, /*#__PURE__*/React.createElement(TableVirtual, {
@@ -17192,7 +17508,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
17192
17508
  setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
17193
17509
  }, [props.isExpand]);
17194
17510
  return /*#__PURE__*/React.createElement("div", {
17195
- className: classNames("kts-invoice-operate-invoice-digtal-stakeholder", {
17511
+ className: classnames("kts-invoice-operate-invoice-digtal-stakeholder", {
17196
17512
  readOnly: readOnly
17197
17513
  })
17198
17514
  }, /*#__PURE__*/React.createElement("div", null, '购买方信息'.split('').map(function (e) {
@@ -17780,7 +18096,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
17780
18096
  setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
17781
18097
  }, [props.isExpand]);
17782
18098
  return /*#__PURE__*/React.createElement("div", {
17783
- className: classNames("kts-invoice-operate-invoice-digtal-stakeholder", {
18099
+ className: classnames("kts-invoice-operate-invoice-digtal-stakeholder", {
17784
18100
  readOnly: readOnly
17785
18101
  })
17786
18102
  }, /*#__PURE__*/React.createElement("div", null, '销售方信息'.split('').map(function (e) {
@@ -20247,7 +20563,7 @@ function TableRow$1(props) {
20247
20563
  /*#__PURE__*/
20248
20564
  // <tr {...props} className={classnames(props.className, discount, (rowKey === container && current) ? 'kts-invoice-operate-goods-list-itemName-drag-container' : '')} />
20249
20565
  React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
20250
- className: classNames(props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container-' + site : undefined)
20566
+ className: classnames(props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container-' + site : undefined)
20251
20567
  }));
20252
20568
  }
20253
20569
 
@@ -23647,7 +23963,7 @@ var Main$3 = decorator(Form.create())(function (props) {
23647
23963
  flex: 1
23648
23964
  }
23649
23965
  }), props.menuExpansion, reselectInvoiceType.button, emptyRefill.button), /*#__PURE__*/React.createElement("div", {
23650
- className: classNames('kts-invoice-operate-goods-list-table-digtal')
23966
+ className: classnames('kts-invoice-operate-goods-list-table-digtal')
23651
23967
  }, /*#__PURE__*/React.createElement(TableVirtual$1, {
23652
23968
  size: "small",
23653
23969
  rowKey: "$index",
@@ -23914,7 +24230,1640 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
23914
24230
  return MyNY;
23915
24231
  }(React.Component);
23916
24232
 
23917
- var ImportBuyerDrawer = (function () {
24233
+ 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";
24234
+ styleInject(css_248z$s);
24235
+
24236
+ /** 特殊信息-建筑服务 */
24237
+
24238
+ var Architecture = decorator(Form.create())(function (props) {
24239
+ /** 控制器 */
24240
+ var controller = Invoice.useInvoiceController();
24241
+ var form = props.form;
24242
+ var getFieldDecorator = form.getFieldDecorator;
24243
+ var model = controller.useMemo(function (s) {
24244
+ return s.model;
24245
+ }, []);
24246
+ var readOnly = React.useMemo(function () {
24247
+ return model === 'readOnly';
24248
+ }, [model]); // 注册 form
24249
+
24250
+ controller.useForm('serviceDataDtoInfo', form);
24251
+ return /*#__PURE__*/React.createElement("div", {
24252
+ className: "kts-invoice-operate-real-estate-info-digtal"
24253
+ }, /*#__PURE__*/React.createElement("div", {
24254
+ className: 'real-estate-info-digtal-label'
24255
+ }, "\u7279\u6B8A\u4FE1\u606F-\u5EFA\u7B51\u670D\u52A1"), /*#__PURE__*/React.createElement(Row$1, {
24256
+ gutter: [17, 0]
24257
+ }, /*#__PURE__*/React.createElement(Col$1, {
24258
+ span: 6
24259
+ }, /*#__PURE__*/React.createElement(Form.Item, {
24260
+ label: "\u571F\u5730\u589E\u503C\u7A0E\u9879\u76EE\u7F16\u53F7"
24261
+ }, getFieldDecorator('landNumber', {
24262
+ rules: [{
24263
+ max: 16,
24264
+ message: '最多16个字符'
24265
+ }]
24266
+ })(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
24267
+ maxLength: 16,
24268
+ autoComplete: 'off',
24269
+ placeholder: "\u8BF7\u8F93\u5165"
24270
+ })))), /*#__PURE__*/React.createElement(Col$1, {
24271
+ span: 6
24272
+ }, /*#__PURE__*/React.createElement(Form.Item, {
24273
+ label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
24274
+ }, getFieldDecorator('crossCitiesSign', {
24275
+ rules: readOnly ? [] : [{
24276
+ required: true,
24277
+ message: '请选择跨地(市)标志'
24278
+ }]
24279
+ })(readOnly ? /*#__PURE__*/React.createElement(MyNY$1, null) : /*#__PURE__*/React.createElement(Select$2, {
24280
+ placeholder: "\u8BF7\u9009\u62E9",
24281
+ style: {
24282
+ width: '100%'
24283
+ }
24284
+ }, /*#__PURE__*/React.createElement(Select$2.Option, {
24285
+ value: 'Y'
24286
+ }, "\u662F"), /*#__PURE__*/React.createElement(Select$2.Option, {
24287
+ value: 'N'
24288
+ }, "\u5426"))))), /*#__PURE__*/React.createElement(Col$1, {
24289
+ span: 6
24290
+ }, /*#__PURE__*/React.createElement(Form.Item, {
24291
+ label: "\u5EFA\u7B51\u670D\u52A1\u53D1\u751F\u5730"
24292
+ }, getFieldDecorator('constructAddress', {
24293
+ rules: readOnly ? [] : [{
24294
+ required: true,
24295
+ message: '请选择省市区县'
24296
+ }]
24297
+ })(readOnly ? /*#__PURE__*/React.createElement(MyArrString$1, null) : /*#__PURE__*/React.createElement(Cascader, {
24298
+ style: {
24299
+ width: '100%'
24300
+ },
24301
+ options: props.addressOptions,
24302
+ fieldNames: props.fieldNames,
24303
+ placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
24304
+ })))), /*#__PURE__*/React.createElement(Col$1, {
24305
+ span: 6
24306
+ }, /*#__PURE__*/React.createElement(Form.Item, {
24307
+ label: "\u8BE6\u7EC6\u5730\u5740"
24308
+ }, getFieldDecorator('constructDetailAddress', {
24309
+ rules: readOnly ? [] : [{
24310
+ max: 200,
24311
+ message: '详细地址最多200个字符'
24312
+ }, {
24313
+ validator: function validator(_, value) {
24314
+ var pattern = /街|路|村|乡|镇|道|巷|号/;
24315
+ return pattern.test(value) ? Promise.resolve() : Promise.reject('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
24316
+ }
24317
+ }]
24318
+ })(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
24319
+ autoComplete: 'off',
24320
+ placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
24321
+ })))), /*#__PURE__*/React.createElement(Col$1, {
24322
+ span: 6
24323
+ }, /*#__PURE__*/React.createElement(Form.Item, {
24324
+ label: "\u5EFA\u7B51\u9879\u76EE\u540D\u79F0"
24325
+ }, getFieldDecorator('constructName', {
24326
+ rules: readOnly ? [] : [{
24327
+ required: true,
24328
+ message: '请输入建筑项目名称'
24329
+ }, {
24330
+ max: 200,
24331
+ message: '建筑项目名称最多200个字符'
24332
+ }]
24333
+ })(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
24334
+ autoComplete: 'off',
24335
+ placeholder: "\u8BF7\u8F93\u5165"
24336
+ }))))));
24337
+ });
24338
+
24339
+ var MyDiv$4 = /*#__PURE__*/function (_React$Component) {
24340
+ _inherits(MyDiv, _React$Component);
24341
+
24342
+ var _super = _createSuper(MyDiv);
24343
+
24344
+ function MyDiv() {
24345
+ _classCallCheck(this, MyDiv);
24346
+
24347
+ return _super.apply(this, arguments);
24348
+ }
24349
+
24350
+ _createClass(MyDiv, [{
24351
+ key: "render",
24352
+ value: function render() {
24353
+ return /*#__PURE__*/React.createElement("div", {
24354
+ style: this.props.style
24355
+ }, this.props.value);
24356
+ }
24357
+ }]);
24358
+
24359
+ return MyDiv;
24360
+ }(React.Component);
24361
+
24362
+ var MyArrString$1 = /*#__PURE__*/function (_React$Component2) {
24363
+ _inherits(MyArrString, _React$Component2);
24364
+
24365
+ var _super2 = _createSuper(MyArrString);
24366
+
24367
+ function MyArrString() {
24368
+ _classCallCheck(this, MyArrString);
24369
+
24370
+ return _super2.apply(this, arguments);
24371
+ }
24372
+
24373
+ _createClass(MyArrString, [{
24374
+ key: "render",
24375
+ value: function render() {
24376
+ var _this$props$value;
24377
+
24378
+ return /*#__PURE__*/React.createElement("div", {
24379
+ style: this.props.style
24380
+ }, (_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.filter(function (e) {
24381
+ return !!e;
24382
+ }).join(','));
24383
+ }
24384
+ }]);
24385
+
24386
+ return MyArrString;
24387
+ }(React.Component);
24388
+
24389
+ var MyArrMoment$1 = /*#__PURE__*/function (_React$Component3) {
24390
+ _inherits(MyArrMoment, _React$Component3);
24391
+
24392
+ var _super3 = _createSuper(MyArrMoment);
24393
+
24394
+ function MyArrMoment() {
24395
+ _classCallCheck(this, MyArrMoment);
24396
+
24397
+ return _super3.apply(this, arguments);
24398
+ }
24399
+
24400
+ _createClass(MyArrMoment, [{
24401
+ key: "render",
24402
+ value: function render() {
24403
+ var _this$props$value2 = this.props.value,
24404
+ value = _this$props$value2 === void 0 ? [] : _this$props$value2;
24405
+ return /*#__PURE__*/React.createElement("div", {
24406
+ style: this.props.style
24407
+ }, /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD')), /*#__PURE__*/React.createElement("span", {
24408
+ style: {
24409
+ color: '#9F603D',
24410
+ fontWeight: 600
24411
+ }
24412
+ }, " - "), /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
24413
+ }
24414
+ }]);
24415
+
24416
+ return MyArrMoment;
24417
+ }(React.Component);
24418
+
24419
+ var MyNY$1 = /*#__PURE__*/function (_React$Component4) {
24420
+ _inherits(MyNY, _React$Component4);
24421
+
24422
+ var _super4 = _createSuper(MyNY);
24423
+
24424
+ function MyNY() {
24425
+ _classCallCheck(this, MyNY);
24426
+
24427
+ return _super4.apply(this, arguments);
24428
+ }
24429
+
24430
+ _createClass(MyNY, [{
24431
+ key: "render",
24432
+ value: function render() {
24433
+ return /*#__PURE__*/React.createElement("div", {
24434
+ style: this.props.style
24435
+ }, this.props.value === 'Y' ? '是' : '否');
24436
+ }
24437
+ }]);
24438
+
24439
+ return MyNY;
24440
+ }(React.Component);
24441
+
24442
+ var css_248z$t = ".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";
24443
+ styleInject(css_248z$t);
24444
+
24445
+ function TableVirtual$2 (props) {
24446
+ var _props$dataSource2;
24447
+
24448
+ var _React$useState = React.useState(null),
24449
+ _React$useState2 = _slicedToArray(_React$useState, 2),
24450
+ self = _React$useState2[0],
24451
+ setSelf = _React$useState2[1];
24452
+
24453
+ var tableBody = React.useMemo(function () {
24454
+ if (!self) return;
24455
+ return self.querySelector('.ktsAntX-table-body');
24456
+ }, [self]);
24457
+ /** 显示指针 */
24458
+
24459
+ var _React$useState3 = React.useState(0),
24460
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
24461
+ pointer = _React$useState4[0],
24462
+ setPointer = _React$useState4[1];
24463
+ /** 行高 */
24464
+
24465
+
24466
+ var rowHeight = React.useMemo(function () {
24467
+ if (!self) return 50;
24468
+ var td = self.querySelector('.ktsAntX-table-tbody .ktsAntX-table-row');
24469
+ if (!td) return 50;
24470
+ return td.clientHeight;
24471
+ }, [self, props.dataSource]);
24472
+ /** 间隔容器 */
24473
+
24474
+ var placeholder = React.useMemo(function () {
24475
+ if (!self || !tableBody) return;
24476
+ var placeholder = tableBody.querySelector('.table-virtual-placeholder');
24477
+
24478
+ if (!placeholder) {
24479
+ placeholder = document.createElement('div');
24480
+ placeholder.className = 'table-virtual-placeholder';
24481
+ tableBody.appendChild(placeholder);
24482
+ }
24483
+
24484
+ return placeholder;
24485
+ }, [self, tableBody]); // 设置占位dom的搞
24486
+
24487
+ var placeholderHeight = React.useMemo(function () {
24488
+ if (!self || !rowHeight || !props.dataSource || !placeholder) return;
24489
+ var placeholderHeight = rowHeight * props.dataSource.length;
24490
+ placeholder.style.height = "".concat(placeholderHeight, "px");
24491
+ return placeholderHeight;
24492
+ }, [self, rowHeight, props.dataSource, placeholder]);
24493
+ /** 可以容纳的行数 */
24494
+
24495
+ var rowSize = React.useMemo(function () {
24496
+ if (!tableBody || !rowHeight) return 0;
24497
+ return Math.ceil(tableBody.clientHeight / rowHeight);
24498
+ }, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
24499
+
24500
+ var dataSource = React.useMemo(function () {
24501
+ var _props$dataSource;
24502
+
24503
+ if (!props.dataSource) return [];
24504
+ if (props.dataSource.length < 10) return props.dataSource;
24505
+ if (!rowSize) return [props.dataSource[0]];
24506
+ return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
24507
+ }, [props.dataSource, pointer, rowSize]); // 监听滚动
24508
+
24509
+ React.useEffect(function () {
24510
+ if (!self || !placeholder || !props.dataSource || !rowHeight || !tableBody || props.dataSource.length < 10) return;
24511
+
24512
+ var onScroll = function onScroll() {
24513
+ if (!props.dataSource || !tableBody) return;
24514
+ setPointer(Math.floor((props.dataSource.length - rowSize) * (tableBody.scrollTop / (placeholder.clientHeight - tableBody.clientHeight))));
24515
+ };
24516
+
24517
+ onScroll();
24518
+ tableBody.addEventListener('scroll', onScroll);
24519
+ return function () {
24520
+ tableBody.removeEventListener('scroll', onScroll);
24521
+ };
24522
+ }, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
24523
+
24524
+ React.useEffect(function () {
24525
+ if (!self) return;
24526
+ var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
24527
+ if (!table) return;
24528
+ table.style.top = "".concat(pointer * rowHeight, "px");
24529
+ }, [pointer, self, rowHeight]);
24530
+ React.useEffect(function () {
24531
+ if (!self) return;
24532
+ var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
24533
+ if (!cont) return;
24534
+ cont.scrollTop = 0;
24535
+ }, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
24536
+ return /*#__PURE__*/React.createElement("span", {
24537
+ className: "kts-invoice-operate-goods-table-virtual",
24538
+ ref: function ref(e) {
24539
+ setSelf(e);
24540
+ }
24541
+ }, /*#__PURE__*/React.createElement(TableManual, _objectSpread2(_objectSpread2({}, props), {}, {
24542
+ dataSource: dataSource,
24543
+ // 新版本Table会有输入框无法连续输入的问题,先兼容老版本
24544
+ tableComponent: Table
24545
+ })));
24546
+ }
24547
+
24548
+ var AddRowButton$2 = (function () {
24549
+ var controller = Invoice.useInvoiceController();
24550
+ var model = controller.useMemo(function (s) {
24551
+ return s.model;
24552
+ }, []);
24553
+ var rootElement = controller.useMemo(function (s) {
24554
+ return s.rootElement;
24555
+ }, []);
24556
+ /** 产品数据量 */
24557
+
24558
+ var goodsNum = controller.useMemo(function (s) {
24559
+ return s.freightListState.goodsList.length;
24560
+ }, []);
24561
+ /** 搜索条件 */
24562
+
24563
+ var isAddRow = controller.useMemo(function (s) {
24564
+ return s.freightListState.isAddRow;
24565
+ }, []);
24566
+ /** 产品最大数 */
24567
+
24568
+ var goodMax = controller.useMemo(function (s) {
24569
+ return s.freightListState.goodMax;
24570
+ }, []);
24571
+ /** 按钮是否禁用 */
24572
+
24573
+ var disabled = React.useMemo(function () {
24574
+ return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
24575
+ }, [goodMax, goodsNum]);
24576
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
24577
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
24578
+ while (1) {
24579
+ switch (_context.prev = _context.next) {
24580
+ case 0:
24581
+ _context.next = 2;
24582
+ return addGood$3(controller);
24583
+
24584
+ case 2:
24585
+ _context.next = 4;
24586
+ return rollBottom$2(controller, rootElement);
24587
+
24588
+ case 4:
24589
+ case "end":
24590
+ return _context.stop();
24591
+ }
24592
+ }
24593
+ }, _callee);
24594
+ })), [controller, rootElement]);
24595
+ if (isAddRow === false) return /*#__PURE__*/React.createElement(React.Fragment, null);
24596
+ if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
24597
+ if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
24598
+ return /*#__PURE__*/React.createElement(Button$1, {
24599
+ size: 'small',
24600
+ type: 'primary',
24601
+ onClick: onClick,
24602
+ disabled: disabled
24603
+ }, "\u589E\u884C");
24604
+ });
24605
+ /** 添加一个空货物 */
24606
+
24607
+ function addGood$3(_x) {
24608
+ return _addGood$2.apply(this, arguments);
24609
+ }
24610
+ /** 货物列表,滚动到底部 */
24611
+
24612
+
24613
+ function _addGood$2() {
24614
+ _addGood$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(controller) {
24615
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
24616
+ while (1) {
24617
+ switch (_context3.prev = _context3.next) {
24618
+ case 0:
24619
+ _context3.next = 2;
24620
+ return controller.saveEditFreight();
24621
+
24622
+ case 2:
24623
+ _context3.next = 4;
24624
+ return controller.wait();
24625
+
24626
+ case 4:
24627
+ _context3.next = 6;
24628
+ return controller.run( /*#__PURE__*/function () {
24629
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
24630
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
24631
+ while (1) {
24632
+ switch (_context2.prev = _context2.next) {
24633
+ case 0:
24634
+ if (!s.freightListState.editGood) {
24635
+ _context2.next = 3;
24636
+ break;
24637
+ }
24638
+
24639
+ message$1.error({
24640
+ content: '你正在编辑一个货物运输行',
24641
+ key: '你正在编辑一个货物运输行'
24642
+ });
24643
+ return _context2.abrupt("return");
24644
+
24645
+ case 3:
24646
+ _context2.next = 5;
24647
+ return controller.addFreight({});
24648
+
24649
+ case 5:
24650
+ s.freightListState.editGood = _context2.sent;
24651
+
24652
+ case 6:
24653
+ case "end":
24654
+ return _context2.stop();
24655
+ }
24656
+ }
24657
+ }, _callee2);
24658
+ }));
24659
+
24660
+ return function (_x4) {
24661
+ return _ref2.apply(this, arguments);
24662
+ };
24663
+ }());
24664
+
24665
+ case 6:
24666
+ case "end":
24667
+ return _context3.stop();
24668
+ }
24669
+ }
24670
+ }, _callee3);
24671
+ }));
24672
+ return _addGood$2.apply(this, arguments);
24673
+ }
24674
+
24675
+ function rollBottom$2(_x2, _x3) {
24676
+ return _rollBottom$2.apply(this, arguments);
24677
+ }
24678
+
24679
+ function _rollBottom$2() {
24680
+ _rollBottom$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller, rootElement) {
24681
+ var cont;
24682
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
24683
+ while (1) {
24684
+ switch (_context4.prev = _context4.next) {
24685
+ case 0:
24686
+ _context4.next = 2;
24687
+ return controller.wait();
24688
+
24689
+ case 2:
24690
+ cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
24691
+
24692
+ if (cont) {
24693
+ _context4.next = 5;
24694
+ break;
24695
+ }
24696
+
24697
+ return _context4.abrupt("return");
24698
+
24699
+ case 5:
24700
+ cont.scrollTop = cont.scrollHeight;
24701
+
24702
+ case 6:
24703
+ case "end":
24704
+ return _context4.stop();
24705
+ }
24706
+ }
24707
+ }, _callee4);
24708
+ }));
24709
+ return _rollBottom$2.apply(this, arguments);
24710
+ }
24711
+
24712
+ var css_248z$u = ".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";
24713
+ styleInject(css_248z$u);
24714
+
24715
+ function TableRow$2(props) {
24716
+ var rowKey = props['data-row-key'];
24717
+ return /*#__PURE__*/React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
24718
+ className: classnames(props.className)
24719
+ }));
24720
+ }
24721
+
24722
+ var Text$6 = Typography.Text;
24723
+ var TitleText$2 = (function (props) {
24724
+ var rules = props.rules,
24725
+ children = props.children;
24726
+ var required = React.useMemo(function () {
24727
+ return (rules === null || rules === void 0 ? void 0 : rules.some(function (e) {
24728
+ return !!e.required;
24729
+ })) || props.required;
24730
+ }, [rules, props.required]);
24731
+ return /*#__PURE__*/React.createElement(React.Fragment, null, required ? /*#__PURE__*/React.createElement(Text$6, {
24732
+ type: "danger"
24733
+ }, "*") : /*#__PURE__*/React.createElement(React.Fragment, null), children);
24734
+ });
24735
+
24736
+ var useColumns$2 = (function (form) {
24737
+ var getFieldDecorator = form.getFieldDecorator;
24738
+ var controller = Invoice.useInvoiceController();
24739
+ var rootElement = controller.useMemo(function (s) {
24740
+ return s.rootElement;
24741
+ }, []);
24742
+ /** 组件模式 */
24743
+
24744
+ var model = controller.useMemo(function (e) {
24745
+ return e.model;
24746
+ }, []);
24747
+ /** 正在编辑的货物 */
24748
+
24749
+ var editGood = controller.useMemo(function (e) {
24750
+ return e.freightListState.editGood;
24751
+ }, []);
24752
+ /** 禁用字段 */
24753
+
24754
+ var disableds = controller.useMemo(function (e) {
24755
+ return e.stakeholder.disableds || [];
24756
+ }, []);
24757
+ /** 运输工具种类列表 */
24758
+
24759
+ var vehicleTypeList = controller.useMemo(function (e) {
24760
+ return e.freightListState.vehicleTypeList;
24761
+ }, []);
24762
+ var area = controller.useMemo(function (e) {
24763
+ return e.freightListState.area;
24764
+ }, []);
24765
+ var addressFieldNames = controller.useMemo(function (e) {
24766
+ return e.freightListState.addressFieldNames;
24767
+ }, []);
24768
+ var getVehicle = React.useCallback(function (value) {
24769
+ if (vehicleTypeList && vehicleTypeList.length > 0) {
24770
+ var _vehicleTypeList$find;
24771
+
24772
+ return ((_vehicleTypeList$find = vehicleTypeList.find(function (e) {
24773
+ return e.value === value;
24774
+ })) === null || _vehicleTypeList$find === void 0 ? void 0 : _vehicleTypeList$find.label) || '';
24775
+ }
24776
+ }, [vehicleTypeList]);
24777
+ var splitArea = React.useCallback(function (value) {
24778
+ if (value) {
24779
+ var _array = value.split(',');
24780
+
24781
+ return _array;
24782
+ } else {
24783
+ return [];
24784
+ }
24785
+ }, []);
24786
+ /** 表头 */
24787
+
24788
+ var columns = React.useMemo(function () {
24789
+ return [{
24790
+ title: '序号',
24791
+ key: 'sortNumber',
24792
+ dataIndex: 'sortNumber',
24793
+ width: 50,
24794
+ render: function render(e) {
24795
+ return /*#__PURE__*/React.createElement("span", {
24796
+ style: {
24797
+ padding: '0 10px'
24798
+ }
24799
+ }, e);
24800
+ }
24801
+ }, {
24802
+ title: /*#__PURE__*/React.createElement(TitleText$2, {
24803
+ required: true
24804
+ }, "\u8FD0\u8F93\u5DE5\u5177\u79CD\u7C7B"),
24805
+ key: 'type',
24806
+ render: function render(_, record) {
24807
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('type') && !(model === 'prefab')) {
24808
+ return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('type', {
24809
+ initialValue: editGood.type,
24810
+ rules: [{
24811
+ required: true,
24812
+ message: '请输入'
24813
+ }]
24814
+ })( /*#__PURE__*/React.createElement(Select$1, {
24815
+ className: "kts-invoice-operate-goods-list-table-tax-rate",
24816
+ showArrow: false,
24817
+ style: {
24818
+ width: '100%'
24819
+ },
24820
+ getPopupContainer: function getPopupContainer() {
24821
+ return rootElement || document.body;
24822
+ },
24823
+ onChange: function () {
24824
+ var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
24825
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
24826
+ while (1) {
24827
+ switch (_context.prev = _context.next) {
24828
+ case 0:
24829
+ _context.next = 2;
24830
+ return controller.wait();
24831
+
24832
+ case 2:
24833
+ controller.setEditFreight({
24834
+ type: value
24835
+ });
24836
+
24837
+ case 3:
24838
+ case "end":
24839
+ return _context.stop();
24840
+ }
24841
+ }
24842
+ }, _callee);
24843
+ }));
24844
+
24845
+ function onChange(_x) {
24846
+ return _onChange.apply(this, arguments);
24847
+ }
24848
+
24849
+ return onChange;
24850
+ }()
24851
+ }, (record.vehicleList || vehicleTypeList).map(function (e, i) {
24852
+ return /*#__PURE__*/React.createElement(Select$1.Option, {
24853
+ key: i,
24854
+ value: e.value
24855
+ }, e.label);
24856
+ }))));
24857
+ } else {
24858
+ return /*#__PURE__*/React.createElement("span", {
24859
+ style: {
24860
+ padding: '0 10px'
24861
+ }
24862
+ }, getVehicle(record.type));
24863
+ }
24864
+ }
24865
+ }, {
24866
+ title: /*#__PURE__*/React.createElement(TitleText$2, {
24867
+ required: true
24868
+ }, "\u8FD0\u8F93\u5DE5\u5177\u724C\u53F7"),
24869
+ key: 'licensePlate',
24870
+ width: 119,
24871
+ render: function render(_, record) {
24872
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('licensePlate') && model !== 'prefab') {
24873
+ return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('licensePlate', {
24874
+ initialValue: editGood.licensePlate,
24875
+ rules: [{
24876
+ required: true,
24877
+ message: '请输入'
24878
+ }]
24879
+ })( /*#__PURE__*/React.createElement(MyInput$4, {
24880
+ maxLength: 200,
24881
+ onChange: function () {
24882
+ var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
24883
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
24884
+ while (1) {
24885
+ switch (_context2.prev = _context2.next) {
24886
+ case 0:
24887
+ _context2.next = 2;
24888
+ return controller.wait();
24889
+
24890
+ case 2:
24891
+ _context2.next = 4;
24892
+ return controller.setEditFreight({
24893
+ licensePlate: form.getFieldsValue().licensePlate
24894
+ });
24895
+
24896
+ case 4:
24897
+ case "end":
24898
+ return _context2.stop();
24899
+ }
24900
+ }
24901
+ }, _callee2);
24902
+ }));
24903
+
24904
+ function onChange() {
24905
+ return _onChange2.apply(this, arguments);
24906
+ }
24907
+
24908
+ return onChange;
24909
+ }()
24910
+ })));
24911
+ } else {
24912
+ return /*#__PURE__*/React.createElement("span", {
24913
+ style: {
24914
+ padding: '0 10px'
24915
+ }
24916
+ }, record.licensePlate);
24917
+ }
24918
+ }
24919
+ }, {
24920
+ title: /*#__PURE__*/React.createElement(TitleText$2, {
24921
+ required: true
24922
+ }, "\u8D77\u8FD0\u5730"),
24923
+ key: 'origin',
24924
+ width: 150,
24925
+ render: function render(_, record) {
24926
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('origin') && model !== 'prefab') {
24927
+ return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('origin', {
24928
+ initialValue: editGood.origin,
24929
+ rules: [{
24930
+ required: true,
24931
+ message: '请输入'
24932
+ }]
24933
+ })( /*#__PURE__*/React.createElement(Cascader$1, {
24934
+ style: {
24935
+ width: '100%'
24936
+ },
24937
+ options: area,
24938
+ fieldNames: addressFieldNames,
24939
+ onChange: function () {
24940
+ var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(value) {
24941
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
24942
+ while (1) {
24943
+ switch (_context3.prev = _context3.next) {
24944
+ case 0:
24945
+ _context3.next = 2;
24946
+ return controller.setEditFreight({
24947
+ origin: value
24948
+ });
24949
+
24950
+ case 2:
24951
+ case "end":
24952
+ return _context3.stop();
24953
+ }
24954
+ }
24955
+ }, _callee3);
24956
+ }));
24957
+
24958
+ function onChange(_x2) {
24959
+ return _onChange3.apply(this, arguments);
24960
+ }
24961
+
24962
+ return onChange;
24963
+ }()
24964
+ })));
24965
+ } else {
24966
+ return /*#__PURE__*/React.createElement("span", {
24967
+ style: {
24968
+ padding: '0 10px'
24969
+ }
24970
+ }, record.origin);
24971
+ }
24972
+ }
24973
+ }, {
24974
+ title: /*#__PURE__*/React.createElement(TitleText$2, {
24975
+ required: true
24976
+ }, "\u5230\u8FBE\u5730"),
24977
+ dataIndex: 'destination',
24978
+ key: 'destination',
24979
+ width: 149,
24980
+ render: function render(_, record) {
24981
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('destination') && model !== 'prefab') {
24982
+ return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('destination', {
24983
+ initialValue: editGood.destination,
24984
+ rules: [{
24985
+ required: true,
24986
+ message: '请输入'
24987
+ }]
24988
+ })( /*#__PURE__*/React.createElement(Cascader$1, {
24989
+ options: area,
24990
+ fieldNames: addressFieldNames,
24991
+ style: {
24992
+ width: '100%'
24993
+ },
24994
+ onChange: function () {
24995
+ var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(value) {
24996
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
24997
+ while (1) {
24998
+ switch (_context4.prev = _context4.next) {
24999
+ case 0:
25000
+ _context4.next = 2;
25001
+ return controller.setEditFreight({
25002
+ destination: value
25003
+ });
25004
+
25005
+ case 2:
25006
+ case "end":
25007
+ return _context4.stop();
25008
+ }
25009
+ }
25010
+ }, _callee4);
25011
+ }));
25012
+
25013
+ function onChange(_x3) {
25014
+ return _onChange4.apply(this, arguments);
25015
+ }
25016
+
25017
+ return onChange;
25018
+ }()
25019
+ })));
25020
+ } else {
25021
+ return /*#__PURE__*/React.createElement("span", {
25022
+ style: {
25023
+ padding: '0 10px'
25024
+ }
25025
+ }, record.destination);
25026
+ }
25027
+ }
25028
+ }, {
25029
+ title: /*#__PURE__*/React.createElement(TitleText$2, {
25030
+ required: true
25031
+ }, "\u8FD0\u8F93\u8D27\u7269\u540D\u79F0"),
25032
+ dataIndex: 'itemName',
25033
+ key: 'itemName',
25034
+ width: 149,
25035
+ render: function render(_, record) {
25036
+ if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('itemName') && model !== 'prefab') {
25037
+ return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('itemName', {
25038
+ initialValue: editGood.itemName,
25039
+ rules: [{
25040
+ required: true,
25041
+ message: '请输入货物名称'
25042
+ }]
25043
+ })( /*#__PURE__*/React.createElement(MyInput$4, {
25044
+ maxLength: 200,
25045
+ onChange: function () {
25046
+ var _onChange5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
25047
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
25048
+ while (1) {
25049
+ switch (_context5.prev = _context5.next) {
25050
+ case 0:
25051
+ _context5.next = 2;
25052
+ return controller.wait();
25053
+
25054
+ case 2:
25055
+ _context5.next = 4;
25056
+ return controller.setEditFreight({
25057
+ itemName: form.getFieldsValue().itemName
25058
+ });
25059
+
25060
+ case 4:
25061
+ case "end":
25062
+ return _context5.stop();
25063
+ }
25064
+ }
25065
+ }, _callee5);
25066
+ }));
25067
+
25068
+ function onChange() {
25069
+ return _onChange5.apply(this, arguments);
25070
+ }
25071
+
25072
+ return onChange;
25073
+ }()
25074
+ })));
25075
+ } else {
25076
+ return /*#__PURE__*/React.createElement("span", {
25077
+ style: {
25078
+ padding: '0 10px'
25079
+ }
25080
+ }, record.itemName);
25081
+ }
25082
+ }
25083
+ }] // 只读
25084
+ .filter(function (e) {
25085
+ if (model === 'readOnly') {
25086
+ return e.key !== 'operating';
25087
+ } else {
25088
+ return true;
25089
+ }
25090
+ }).map(function (e) {
25091
+ return _objectSpread2(_objectSpread2({}, e), {}, {
25092
+ ellipsis: true
25093
+ });
25094
+ });
25095
+ }, [editGood, controller, model, getVehicle]);
25096
+ return columns;
25097
+ });
25098
+
25099
+ var MyInput$4 = /*#__PURE__*/function (_React$Component) {
25100
+ _inherits(MyInput, _React$Component);
25101
+
25102
+ var _super = _createSuper(MyInput);
25103
+
25104
+ function MyInput() {
25105
+ _classCallCheck(this, MyInput);
25106
+
25107
+ return _super.apply(this, arguments);
25108
+ }
25109
+
25110
+ _createClass(MyInput, [{
25111
+ key: "render",
25112
+ value: function render() {
25113
+ if (this.props.loading) {
25114
+ return /*#__PURE__*/React.createElement(Spin$1, {
25115
+ size: "small"
25116
+ }, /*#__PURE__*/React.createElement(Input$1, _objectSpread2(_objectSpread2({}, this.props), {}, {
25117
+ autoComplete: "off"
25118
+ })));
25119
+ } else {
25120
+ return /*#__PURE__*/React.createElement(Input$1, _objectSpread2(_objectSpread2({}, this.props), {}, {
25121
+ autoComplete: "off"
25122
+ }));
25123
+ }
25124
+ }
25125
+ }]);
25126
+
25127
+ return MyInput;
25128
+ }(React.Component);
25129
+
25130
+ var useOnRow$2 = (function () {
25131
+ /** 控制器 */
25132
+ var controller = Invoice.useInvoiceController();
25133
+ var model = controller.useMemo(function (s) {
25134
+ return s.model;
25135
+ }, []);
25136
+ var onClick = React.useCallback( /*#__PURE__*/function () {
25137
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
25138
+ var editGood;
25139
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25140
+ while (1) {
25141
+ switch (_context2.prev = _context2.next) {
25142
+ case 0:
25143
+ if (!(model === 'readOnly')) {
25144
+ _context2.next = 2;
25145
+ break;
25146
+ }
25147
+
25148
+ return _context2.abrupt("return");
25149
+
25150
+ case 2:
25151
+ editGood = controller.state.freightListState.editGood;
25152
+
25153
+ if (!editGood) {
25154
+ _context2.next = 14;
25155
+ break;
25156
+ }
25157
+
25158
+ if (!(editGood.$index === record.$index)) {
25159
+ _context2.next = 6;
25160
+ break;
25161
+ }
25162
+
25163
+ return _context2.abrupt("return");
25164
+
25165
+ case 6:
25166
+ _context2.next = 8;
25167
+ return controller.saveEditFreight();
25168
+
25169
+ case 8:
25170
+ _context2.next = 10;
25171
+ return controller.wait();
25172
+
25173
+ case 10:
25174
+ _context2.next = 12;
25175
+ return controller.pipeline( /*#__PURE__*/function () {
25176
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
25177
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25178
+ while (1) {
25179
+ switch (_context.prev = _context.next) {
25180
+ case 0:
25181
+ _context.t0 = s.freightListState.editGood;
25182
+
25183
+ if (_context.t0) {
25184
+ _context.next = 4;
25185
+ break;
25186
+ }
25187
+
25188
+ _context.next = 4;
25189
+ return controller.setEditFreight(record);
25190
+
25191
+ case 4:
25192
+ case "end":
25193
+ return _context.stop();
25194
+ }
25195
+ }
25196
+ }, _callee);
25197
+ }));
25198
+
25199
+ return function (_x2) {
25200
+ return _ref2.apply(this, arguments);
25201
+ };
25202
+ }())();
25203
+
25204
+ case 12:
25205
+ _context2.next = 16;
25206
+ break;
25207
+
25208
+ case 14:
25209
+ _context2.next = 16;
25210
+ return controller.setEditFreight(record);
25211
+
25212
+ case 16:
25213
+ case "end":
25214
+ return _context2.stop();
25215
+ }
25216
+ }
25217
+ }, _callee2);
25218
+ }));
25219
+
25220
+ return function (_x) {
25221
+ return _ref.apply(this, arguments);
25222
+ };
25223
+ }(), [controller, model]);
25224
+ return {
25225
+ onClick: onClick
25226
+ };
25227
+ });
25228
+
25229
+ /**
25230
+ * 点击组件外部 保存正在编辑的货物
25231
+ */
25232
+ /**
25233
+ * 点击组件外部 保存正在编辑的货物
25234
+ */
25235
+
25236
+ function useWindowClick$2(controller) {
25237
+ /** 点击组件外部 保存正在编辑的货物 */
25238
+ React.useEffect(function () {
25239
+ var click = function click() {
25240
+ setTimeout(controller.saveEditFreight);
25241
+ };
25242
+
25243
+ window.addEventListener('click', click);
25244
+ return function () {
25245
+ window.removeEventListener('click', click);
25246
+ };
25247
+ }, [controller]);
25248
+ }
25249
+
25250
+ var useRowSelection$2 = (function () {
25251
+ /** 控制器 */
25252
+ var controller = Invoice.useInvoiceController();
25253
+ /** 列表选中的货物索引列表 */
25254
+
25255
+ var selectedRowKeys = controller.useMemo(function (s) {
25256
+ return s.freightListState.selectedGoodIndex;
25257
+ }, []);
25258
+ /** 货物列表 */
25259
+
25260
+ var goodsList = controller.useMemo(function (s) {
25261
+ return s.freightListState.goodsList;
25262
+ }, []);
25263
+ /** 组件模式 */
25264
+
25265
+ var model = controller.useMemo(function (s) {
25266
+ return s.model;
25267
+ }, []);
25268
+ /** 搜索条件 */
25269
+ // const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
25270
+
25271
+ /** 是否显示选择框 */
25272
+
25273
+ var isShow = React.useMemo(function () {
25274
+ if (model === 'readOnly') return false;
25275
+ return true;
25276
+ }, [model]);
25277
+ /** 是否全选 */
25278
+ // const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
25279
+
25280
+ var isAll = controller.useMemo(function (s) {
25281
+ if (s.freightListState.selectedGoodIndex.length <= 0) return false;
25282
+ var seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
25283
+ return e.$index;
25284
+ });
25285
+ var selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
25286
+ return seeGoodsIndex.some(function (t) {
25287
+ return e === t;
25288
+ });
25289
+ });
25290
+ return selectedGoodIndex.length === seeGoodsIndex.length;
25291
+ }, []);
25292
+ var indeterminate = controller.useMemo(function (s) {
25293
+ var seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
25294
+ return e.$index;
25295
+ });
25296
+ var selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
25297
+ return seeGoodsIndex.some(function (t) {
25298
+ return e === t;
25299
+ });
25300
+ });
25301
+ if (selectedGoodIndex.length === 0) return false;
25302
+ return selectedGoodIndex.length < seeGoodsIndex.length;
25303
+ }, []);
25304
+ /** 点击了全选 */
25305
+
25306
+ var onClickSelectAll = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
25307
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
25308
+ while (1) {
25309
+ switch (_context3.prev = _context3.next) {
25310
+ case 0:
25311
+ if (!isAll) {
25312
+ _context3.next = 5;
25313
+ break;
25314
+ }
25315
+
25316
+ _context3.next = 3;
25317
+ return controller.pipeline( /*#__PURE__*/function () {
25318
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
25319
+ var seeGoodsIndex;
25320
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25321
+ while (1) {
25322
+ switch (_context.prev = _context.next) {
25323
+ case 0:
25324
+ seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
25325
+ return e.$index;
25326
+ });
25327
+ s.freightListState.selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
25328
+ return !seeGoodsIndex.some(function (t) {
25329
+ return e === t;
25330
+ });
25331
+ });
25332
+
25333
+ case 2:
25334
+ case "end":
25335
+ return _context.stop();
25336
+ }
25337
+ }
25338
+ }, _callee);
25339
+ }));
25340
+
25341
+ return function (_x) {
25342
+ return _ref2.apply(this, arguments);
25343
+ };
25344
+ }())();
25345
+
25346
+ case 3:
25347
+ _context3.next = 7;
25348
+ break;
25349
+
25350
+ case 5:
25351
+ _context3.next = 7;
25352
+ return controller.pipeline( /*#__PURE__*/function () {
25353
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
25354
+ var seeGoodsIndex;
25355
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25356
+ while (1) {
25357
+ switch (_context2.prev = _context2.next) {
25358
+ case 0:
25359
+ seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
25360
+ return e.$index;
25361
+ });
25362
+ s.freightListState.selectedGoodIndex = [].concat(_toConsumableArray(s.freightListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
25363
+ s.freightListState.selectedGoodIndex = Array.from(new Set(s.freightListState.selectedGoodIndex));
25364
+
25365
+ case 3:
25366
+ case "end":
25367
+ return _context2.stop();
25368
+ }
25369
+ }
25370
+ }, _callee2);
25371
+ }));
25372
+
25373
+ return function (_x2) {
25374
+ return _ref3.apply(this, arguments);
25375
+ };
25376
+ }())();
25377
+
25378
+ case 7:
25379
+ case "end":
25380
+ return _context3.stop();
25381
+ }
25382
+ }
25383
+ }, _callee3);
25384
+ })), [controller, isAll]);
25385
+ var onSelect = React.useCallback( /*#__PURE__*/function () {
25386
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
25387
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
25388
+ while (1) {
25389
+ switch (_context6.prev = _context6.next) {
25390
+ case 0:
25391
+ if (!selected) {
25392
+ _context6.next = 5;
25393
+ break;
25394
+ }
25395
+
25396
+ _context6.next = 3;
25397
+ return controller.pipeline( /*#__PURE__*/function () {
25398
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
25399
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
25400
+ while (1) {
25401
+ switch (_context4.prev = _context4.next) {
25402
+ case 0:
25403
+ s.freightListState.selectedGoodIndex = [].concat(_toConsumableArray(s.freightListState.selectedGoodIndex), [record.$index]);
25404
+ s.freightListState = _objectSpread2({}, s.freightListState);
25405
+
25406
+ case 2:
25407
+ case "end":
25408
+ return _context4.stop();
25409
+ }
25410
+ }
25411
+ }, _callee4);
25412
+ }));
25413
+
25414
+ return function (_x5) {
25415
+ return _ref5.apply(this, arguments);
25416
+ };
25417
+ }())();
25418
+
25419
+ case 3:
25420
+ _context6.next = 7;
25421
+ break;
25422
+
25423
+ case 5:
25424
+ _context6.next = 7;
25425
+ return controller.pipeline( /*#__PURE__*/function () {
25426
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
25427
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
25428
+ while (1) {
25429
+ switch (_context5.prev = _context5.next) {
25430
+ case 0:
25431
+ s.freightListState.selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
25432
+ return e !== record.$index;
25433
+ });
25434
+ s.freightListState = _objectSpread2({}, s.freightListState);
25435
+
25436
+ case 2:
25437
+ case "end":
25438
+ return _context5.stop();
25439
+ }
25440
+ }
25441
+ }, _callee5);
25442
+ }));
25443
+
25444
+ return function (_x6) {
25445
+ return _ref6.apply(this, arguments);
25446
+ };
25447
+ }())();
25448
+
25449
+ case 7:
25450
+ case "end":
25451
+ return _context6.stop();
25452
+ }
25453
+ }
25454
+ }, _callee6);
25455
+ }));
25456
+
25457
+ return function (_x3, _x4) {
25458
+ return _ref4.apply(this, arguments);
25459
+ };
25460
+ }(), [controller]);
25461
+ var columnTitle = React.useMemo(function () {
25462
+ return /*#__PURE__*/React.createElement(Checkbox, {
25463
+ onChange: onClickSelectAll,
25464
+ indeterminate: indeterminate,
25465
+ checked: isAll
25466
+ });
25467
+ }, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
25468
+ /** 选择了商品后 调整 折扣行 和 被折扣行 */
25469
+
25470
+ var sortOut = React.useCallback( /*#__PURE__*/function () {
25471
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
25472
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
25473
+ while (1) {
25474
+ switch (_context8.prev = _context8.next) {
25475
+ case 0:
25476
+ _context8.next = 2;
25477
+ return controller.wait();
25478
+
25479
+ case 2:
25480
+ _context8.next = 4;
25481
+ return controller.pipeline( /*#__PURE__*/function () {
25482
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
25483
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
25484
+ while (1) {
25485
+ switch (_context7.prev = _context7.next) {
25486
+ case 0:
25487
+ s.freightListState.selectedGoodIndex.forEach(function ($index) {
25488
+ var goods = s.freightListState.goodsMap.get($index);
25489
+ if (!goods) return; // 数组位置
25490
+
25491
+ var t = s.freightListState.goodsList.indexOf(goods); // goods.lineAttribute === LineAttributeType.折扣行 ? t : t++;
25492
+
25493
+ var i = s.goodsListState.goodsList[t].$index;
25494
+
25495
+ if (selected) {
25496
+ if (s.freightListState.selectedGoodIndex.indexOf(i) < 0) s.freightListState.selectedGoodIndex = [].concat(_toConsumableArray(s.freightListState.selectedGoodIndex), [i]);
25497
+ } else {
25498
+ if (s.freightListState.selectedGoodIndex.indexOf(i) < 0) s.freightListState.selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
25499
+ return e !== $index;
25500
+ });
25501
+ }
25502
+ });
25503
+
25504
+ case 1:
25505
+ case "end":
25506
+ return _context7.stop();
25507
+ }
25508
+ }
25509
+ }, _callee7);
25510
+ }));
25511
+
25512
+ return function (_x8) {
25513
+ return _ref8.apply(this, arguments);
25514
+ };
25515
+ }())();
25516
+
25517
+ case 4:
25518
+ case "end":
25519
+ return _context8.stop();
25520
+ }
25521
+ }
25522
+ }, _callee8);
25523
+ }));
25524
+
25525
+ return function (_x7) {
25526
+ return _ref7.apply(this, arguments);
25527
+ };
25528
+ }(), [controller]); // React.useEffect(() => {
25529
+ // sortOut(true);
25530
+ // }, [sortOut, goodsList])
25531
+
25532
+ if (isShow === false) return undefined;
25533
+ return {
25534
+ columnWidth: 45,
25535
+ columnTitle: columnTitle,
25536
+ onSelect: onSelect,
25537
+ selectedRowKeys: selectedRowKeys
25538
+ };
25539
+ });
25540
+
25541
+ var useDelRowButton$2 = (function () {
25542
+ var controller = Invoice.useInvoiceController();
25543
+ var model = controller.useMemo(function (s) {
25544
+ return s.model;
25545
+ }, []);
25546
+ var isRemRow = controller.useMemo(function (s) {
25547
+ return s.freightListState.isRemRow;
25548
+ }, []);
25549
+ /** 是否禁用 */
25550
+
25551
+ var disabled = controller.useMemo(function (s) {
25552
+ if (s.freightListState.selectedGoodIndex.length <= 0) return true;
25553
+ return false;
25554
+ }, []);
25555
+ /** 点击了删除 */
25556
+
25557
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
25558
+ var selectedGoodIndex, i;
25559
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25560
+ while (1) {
25561
+ switch (_context2.prev = _context2.next) {
25562
+ case 0:
25563
+ selectedGoodIndex = controller.state.freightListState.selectedGoodIndex.slice();
25564
+ i = 0;
25565
+
25566
+ case 2:
25567
+ if (!(i < selectedGoodIndex.length)) {
25568
+ _context2.next = 8;
25569
+ break;
25570
+ }
25571
+
25572
+ _context2.next = 5;
25573
+ return controller.delFreight(selectedGoodIndex[i]);
25574
+
25575
+ case 5:
25576
+ i++;
25577
+ _context2.next = 2;
25578
+ break;
25579
+
25580
+ case 8:
25581
+ _context2.next = 10;
25582
+ return controller.run( /*#__PURE__*/function () {
25583
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
25584
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25585
+ while (1) {
25586
+ switch (_context.prev = _context.next) {
25587
+ case 0:
25588
+ s.freightListState.selectedGoodIndex = [];
25589
+
25590
+ case 1:
25591
+ case "end":
25592
+ return _context.stop();
25593
+ }
25594
+ }
25595
+ }, _callee);
25596
+ }));
25597
+
25598
+ return function (_x) {
25599
+ return _ref2.apply(this, arguments);
25600
+ };
25601
+ }());
25602
+
25603
+ case 10:
25604
+ case "end":
25605
+ return _context2.stop();
25606
+ }
25607
+ }
25608
+ }, _callee2);
25609
+ })), []);
25610
+ var menuItem = React.useMemo(function () {
25611
+ if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
25612
+ if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
25613
+ return /*#__PURE__*/React.createElement(Menu$1.Item, {
25614
+ key: "1",
25615
+ onClick: onClick,
25616
+ disabled: disabled
25617
+ }, " \u5220\u9664\u884C ");
25618
+ }, [model, onClick, disabled]);
25619
+ var button = React.useMemo(function () {
25620
+ if (isRemRow === false) return /*#__PURE__*/React.createElement(React.Fragment, null);
25621
+ if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
25622
+ if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
25623
+ return /*#__PURE__*/React.createElement(Button$1, {
25624
+ size: 'small',
25625
+ onClick: onClick,
25626
+ disabled: disabled
25627
+ }, "\u5220\u9664");
25628
+ }, [model, onClick, disabled, isRemRow]);
25629
+ return {
25630
+ button: button,
25631
+ menuItem: menuItem
25632
+ };
25633
+ });
25634
+
25635
+ var css_248z$v = ".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-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 2px solid #9F613E;\n gap: 10px;\n align-items: center;\n height: 48px;\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";
25636
+ styleInject(css_248z$v);
25637
+
25638
+ var FreightList = /*#__PURE__*/function (_React$Component) {
25639
+ _inherits(FreightList, _React$Component);
25640
+
25641
+ var _super = _createSuper(FreightList);
25642
+
25643
+ function FreightList() {
25644
+ _classCallCheck(this, FreightList);
25645
+
25646
+ return _super.apply(this, arguments);
25647
+ }
25648
+
25649
+ _createClass(FreightList, [{
25650
+ key: "render",
25651
+ value: function render() {
25652
+ return /*#__PURE__*/React.createElement(Main$4, _objectSpread2({}, this.props));
25653
+ }
25654
+ }]);
25655
+
25656
+ return FreightList;
25657
+ }(React.Component);
25658
+ var Main$4 = decorator(Form.create())(function (props) {
25659
+ var form = props.form;
25660
+ /** 控制器 */
25661
+
25662
+ var controller = Invoice.useInvoiceController();
25663
+ var goodsList = controller.useMemo(function (s) {
25664
+ return s.freightListState.goodsList;
25665
+ }, []);
25666
+ /** 货物列表 */
25667
+
25668
+ var dataSource = controller.useMemo(function (s) {
25669
+ return s.freightListState.goodsList;
25670
+ }, []);
25671
+ /** 表格行事件 */
25672
+
25673
+ var _onRow = useOnRow$2();
25674
+ /** 批量删除 */
25675
+
25676
+
25677
+ var delRowButton = useDelRowButton$2();
25678
+ useWindowClick$2(controller); // 点击组件外部 保存正在编辑的货物
25679
+
25680
+ /** 注册 from 对象 */
25681
+
25682
+ React.useEffect(function () {
25683
+ controller.pipeline( /*#__PURE__*/function () {
25684
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, form) {
25685
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
25686
+ while (1) {
25687
+ switch (_context.prev = _context.next) {
25688
+ case 0:
25689
+ s.freightListState = _objectSpread2(_objectSpread2({}, s.freightListState), {}, {
25690
+ form: form
25691
+ });
25692
+
25693
+ case 1:
25694
+ case "end":
25695
+ return _context.stop();
25696
+ }
25697
+ }
25698
+ }, _callee);
25699
+ }));
25700
+
25701
+ return function (_x, _x2) {
25702
+ return _ref.apply(this, arguments);
25703
+ };
25704
+ }())(props.form);
25705
+ }, [controller, props.form]);
25706
+ React.useEffect(function () {
25707
+ controller.run( /*#__PURE__*/function () {
25708
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
25709
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25710
+ while (1) {
25711
+ switch (_context2.prev = _context2.next) {
25712
+ case 0:
25713
+ s.freightListState.addressFieldNames = props.fieldNames;
25714
+
25715
+ case 1:
25716
+ case "end":
25717
+ return _context2.stop();
25718
+ }
25719
+ }
25720
+ }, _callee2);
25721
+ }));
25722
+
25723
+ return function (_x3) {
25724
+ return _ref2.apply(this, arguments);
25725
+ };
25726
+ }());
25727
+ }, [props.fieldNames]);
25728
+ React.useEffect(function () {
25729
+ controller.run( /*#__PURE__*/function () {
25730
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
25731
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
25732
+ while (1) {
25733
+ switch (_context3.prev = _context3.next) {
25734
+ case 0:
25735
+ s.freightListState.vehicleTypeList = props.vehicleTypeList;
25736
+
25737
+ case 1:
25738
+ case "end":
25739
+ return _context3.stop();
25740
+ }
25741
+ }
25742
+ }, _callee3);
25743
+ }));
25744
+
25745
+ return function (_x4) {
25746
+ return _ref3.apply(this, arguments);
25747
+ };
25748
+ }());
25749
+ }, [props.vehicleTypeList]);
25750
+ React.useEffect(function () {
25751
+ controller.run( /*#__PURE__*/function () {
25752
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
25753
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
25754
+ while (1) {
25755
+ switch (_context4.prev = _context4.next) {
25756
+ case 0:
25757
+ s.freightListState.area = props.addressOptions;
25758
+
25759
+ case 1:
25760
+ case "end":
25761
+ return _context4.stop();
25762
+ }
25763
+ }
25764
+ }, _callee4);
25765
+ }));
25766
+
25767
+ return function (_x5) {
25768
+ return _ref4.apply(this, arguments);
25769
+ };
25770
+ }());
25771
+ }, [props.addressOptions]); // 跟新 货物
25772
+
25773
+ React.useEffect(function () {
25774
+ controller.run( /*#__PURE__*/function () {
25775
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
25776
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
25777
+ while (1) {
25778
+ switch (_context5.prev = _context5.next) {
25779
+ case 0:
25780
+ s.freightListState.goodsMap = new Map();
25781
+ goodsList.forEach(function (e) {
25782
+ s.freightListState.goodsMap.set(e.$index, e);
25783
+ });
25784
+
25785
+ case 2:
25786
+ case "end":
25787
+ return _context5.stop();
25788
+ }
25789
+ }
25790
+ }, _callee5);
25791
+ }));
25792
+
25793
+ return function (_x6) {
25794
+ return _ref5.apply(this, arguments);
25795
+ };
25796
+ }());
25797
+ }, [controller, goodsList]);
25798
+ /** props 产品最大数 更新 */
25799
+
25800
+ React.useEffect(function () {
25801
+ controller.pipeline( /*#__PURE__*/function () {
25802
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
25803
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
25804
+ while (1) {
25805
+ switch (_context6.prev = _context6.next) {
25806
+ case 0:
25807
+ s.freightListState.goodMax = props.goodMax;
25808
+
25809
+ case 1:
25810
+ case "end":
25811
+ return _context6.stop();
25812
+ }
25813
+ }
25814
+ }, _callee6);
25815
+ }));
25816
+
25817
+ return function (_x7) {
25818
+ return _ref6.apply(this, arguments);
25819
+ };
25820
+ }())();
25821
+ }, [controller, props.goodMax]); // 注册 form
25822
+ // controller.useForm('freightInfo', form);
25823
+
25824
+ return /*#__PURE__*/React.createElement("div", {
25825
+ className: "kts-invoice-operate-freight"
25826
+ }, /*#__PURE__*/React.createElement("div", {
25827
+ className: 'real-estate-info-digtal-label'
25828
+ }, "\u7279\u6B8A\u4FE1\u606F-\u5EFA\u7B51\u670D\u52A1"), /*#__PURE__*/React.createElement("div", {
25829
+ className: "kts-invoice-operate-goods-list-digtal",
25830
+ onClick: function onClick(e) {
25831
+ e.stopPropagation();
25832
+ }
25833
+ }, /*#__PURE__*/React.createElement("div", {
25834
+ className: "kts-invoice-operate-goods-list-able"
25835
+ }, /*#__PURE__*/React.createElement(AddRowButton$2, null), delRowButton.button, /*#__PURE__*/React.createElement("div", {
25836
+ style: {
25837
+ flex: 1
25838
+ }
25839
+ })), /*#__PURE__*/React.createElement("div", {
25840
+ className: classnames('kts-invoice-operate-goods-list-table-digtal')
25841
+ }, /*#__PURE__*/React.createElement(TableVirtual$2, {
25842
+ size: "small",
25843
+ rowKey: "$index",
25844
+ pagination: false,
25845
+ scroll: {
25846
+ y: 280
25847
+ },
25848
+ components: {
25849
+ body: {
25850
+ row: TableRow$2
25851
+ }
25852
+ },
25853
+ dataSource: dataSource,
25854
+ columns: useColumns$2(props.form),
25855
+ rowSelection: useRowSelection$2(),
25856
+ onRow: function onRow(record) {
25857
+ return {
25858
+ onClick: function onClick() {
25859
+ _onRow.onClick(record);
25860
+ }
25861
+ };
25862
+ }
25863
+ }))));
25864
+ });
25865
+
25866
+ var ImportBuyerDrawer = (function () {
23918
25867
  var controller = Invoice.useInvoiceController();
23919
25868
  var visible = controller.useMemo(function (s) {
23920
25869
  return s.buyerState.isVisibleDrawer;
@@ -24290,8 +26239,8 @@ var getItemCode = function getItemCode(record, editGood) {
24290
26239
  return record.productCode;
24291
26240
  };
24292
26241
 
24293
- var css_248z$s = ".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";
24294
- styleInject(css_248z$s);
26242
+ var css_248z$w = ".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";
26243
+ styleInject(css_248z$w);
24295
26244
 
24296
26245
  var TreeNode = Tree.TreeNode;
24297
26246
  var confirm = Modal$1.confirm;
@@ -25527,6 +27476,8 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
25527
27476
 
25528
27477
  /** 特殊信息-不动产经营租赁服务(数电) */
25529
27478
 
27479
+ /** 特殊信息-建筑服务(数电) */
27480
+
25530
27481
  /** 货物列表(数电) */
25531
27482
 
25532
27483
  /** 货物索引生成器 */
@@ -25540,7 +27491,7 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
25540
27491
  if (this.props.invoiceType === 'digtal') {
25541
27492
  return /*#__PURE__*/React.createElement(Digtal, _objectSpread2({}, this.props));
25542
27493
  } else {
25543
- return /*#__PURE__*/React.createElement(Main$4, _objectSpread2({}, this.props));
27494
+ return /*#__PURE__*/React.createElement(Main$5, _objectSpread2({}, this.props));
25544
27495
  }
25545
27496
  }
25546
27497
  }]);
@@ -25561,6 +27512,8 @@ Invoice.Stakeholder = Stakeholder$1;
25561
27512
  Invoice.StakeFarmerholder = StakeFarmerholder;
25562
27513
  Invoice.SignDigtal = SignDigtal;
25563
27514
  Invoice.RealEstateInfo = RealEstateInfo;
27515
+ Invoice.Architecture = Architecture;
27516
+ Invoice.FreightList = FreightList;
25564
27517
  Invoice.GoodsListDigtal = GoodsList$1;
25565
27518
  Invoice.idGenerator = idGenerator;
25566
27519
  Invoice.calculator = calculator;
@@ -25570,7 +27523,7 @@ Invoice.useInvoiceController = function () {
25570
27523
  return React.useContext(InvoiceContext);
25571
27524
  };
25572
27525
 
25573
- var Main$4 = function Main(props) {
27526
+ var Main$5 = function Main(props) {
25574
27527
  var controller = React.useMemo(function () {
25575
27528
  return props.controller || new InvoiceController();
25576
27529
  }, [props.controller]);
@@ -25678,8 +27631,8 @@ var Digtal = function Digtal(props) {
25678
27631
  ), /*#__PURE__*/React.createElement(ImportGoodsDrawer, null), /*#__PURE__*/React.createElement(EndowCodeDrawer, null));
25679
27632
  };
25680
27633
 
25681
- var css_248z$t = ".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";
25682
- styleInject(css_248z$t);
27634
+ var css_248z$x = ".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";
27635
+ styleInject(css_248z$x);
25683
27636
 
25684
27637
  function TaxClassificationModal(props) {
25685
27638
  var _props$info6;