kts-component-invoice-operate 3.2.178 → 3.2.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +0 -5
- package/dist/Invoice/InvoiceController/index.d.ts +0 -10
- package/dist/Invoice/index.d.ts +0 -4
- package/dist/index.esm.js +47 -1958
- package/dist/index.js +47 -1958
- package/package.json +3 -3
- package/src/Invoice/Invoice-digtal/index.md +1 -7
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +0 -6
- package/src/Invoice/InvoiceController/index.ts +1 -20
- package/src/Invoice/index.tsx +1 -8
- package/src/Invoice/tools/useToGenerateId/index.ts +0 -2
- package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +11 -10
- package/src/Invoice/ui/digtal/GoodsList/index.tsx +1 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +1 -0
- package/src/TaxClassificationCodeModal/index.less +8 -0
- package/src/TaxClassificationCodeModal/index.tsx +14 -6
- package/dist/Invoice/Invoice-digtal/_test/architecture/index.d.ts +0 -4
- package/dist/Invoice/Invoice-digtal/_test/freight/index.d.ts +0 -4
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.d.ts +0 -6
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.d.ts +0 -23
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.d.ts +0 -21
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.d.ts +0 -31
- package/dist/Invoice/InvoiceController/fns/addFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/delFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/saveEditFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/setEditFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/setFreight.d.ts +0 -6
- package/dist/Invoice/ui/digtal/Architecture/index.d.ts +0 -15
- package/dist/Invoice/ui/digtal/FreightList/hook/useColumns/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/hook/useOnRow/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/index.d.ts +0 -15
- package/dist/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +0 -6
- package/dist/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +0 -6
- package/dist/Invoice/ui/digtal/FreightList/ui/TableRow/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.d.ts +0 -4
- package/src/Invoice/Invoice-digtal/_test/architecture/index.tsx +0 -22
- package/src/Invoice/Invoice-digtal/_test/freight/index.tsx +0 -14575
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.ts +0 -10
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.ts +0 -33
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.ts +0 -81
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.ts +0 -40
- package/src/Invoice/InvoiceController/fns/addFreight.ts +0 -11
- package/src/Invoice/InvoiceController/fns/delFreight.ts +0 -38
- package/src/Invoice/InvoiceController/fns/saveEditFreight.ts +0 -24
- package/src/Invoice/InvoiceController/fns/setEditFreight.ts +0 -16
- package/src/Invoice/InvoiceController/fns/setFreight.ts +0 -11
- package/src/Invoice/ui/digtal/Architecture/index.less +0 -15
- package/src/Invoice/ui/digtal/Architecture/index.tsx +0 -166
- package/src/Invoice/ui/digtal/FreightList/hook/useColumns/dist/index.js +0 -616
- package/src/Invoice/ui/digtal/FreightList/hook/useColumns/index.tsx +0 -246
- package/src/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.tsx +0 -20
- package/src/Invoice/ui/digtal/FreightList/hook/useOnRow/index.tsx +0 -37
- package/src/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.tsx +0 -120
- package/src/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.tsx +0 -23
- package/src/Invoice/ui/digtal/FreightList/index.less +0 -74
- package/src/Invoice/ui/digtal/FreightList/index.tsx +0 -129
- package/src/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.tsx +0 -65
- package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +0 -50
- package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +0 -37
- package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.less +0 -29
- package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.tsx +0 -21
- package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.less +0 -39
- package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.tsx +0 -109
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,
|
|
8
|
-
import
|
|
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';
|
|
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';
|
|
@@ -1130,26 +1130,6 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
1130
1130
|
this.drag = new Drag();
|
|
1131
1131
|
});
|
|
1132
1132
|
|
|
1133
|
-
var FreightListState = /*#__PURE__*/_createClass(function FreightListState() {
|
|
1134
|
-
_classCallCheck(this, FreightListState);
|
|
1135
|
-
|
|
1136
|
-
this.goodMax = void 0;
|
|
1137
|
-
this.editGood = void 0;
|
|
1138
|
-
this.isAddRow = true;
|
|
1139
|
-
this.isRemRow = true;
|
|
1140
|
-
this.goodsMap = new Map();
|
|
1141
|
-
this.form = void 0;
|
|
1142
|
-
this.vehicleTypeList = [];
|
|
1143
|
-
this.goodsList = [];
|
|
1144
|
-
this.selectedGoodIndex = [];
|
|
1145
|
-
this.area = [];
|
|
1146
|
-
this.addressFieldNames = {
|
|
1147
|
-
label: 'label',
|
|
1148
|
-
value: 'value',
|
|
1149
|
-
children: 'children'
|
|
1150
|
-
};
|
|
1151
|
-
});
|
|
1152
|
-
|
|
1153
1133
|
var BuyerState = /*#__PURE__*/_createClass(function BuyerState() {
|
|
1154
1134
|
_classCallCheck(this, BuyerState);
|
|
1155
1135
|
|
|
@@ -1241,7 +1221,6 @@ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControlle
|
|
|
1241
1221
|
this.typeModalProps = void 0;
|
|
1242
1222
|
this.autoComplete = new AutoComplete();
|
|
1243
1223
|
this.taxClassificationProps = void 0;
|
|
1244
|
-
this.freightListState = new FreightListState();
|
|
1245
1224
|
});
|
|
1246
1225
|
|
|
1247
1226
|
/**
|
|
@@ -1278,40 +1257,6 @@ var setEditGood = /*#__PURE__*/(function () {
|
|
|
1278
1257
|
};
|
|
1279
1258
|
})();
|
|
1280
1259
|
|
|
1281
|
-
/**
|
|
1282
|
-
* 设置当前的编辑货物运输
|
|
1283
|
-
*/
|
|
1284
|
-
var setEditFreight = /*#__PURE__*/(function () {
|
|
1285
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, newEditGood) {
|
|
1286
|
-
var editGood;
|
|
1287
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1288
|
-
while (1) {
|
|
1289
|
-
switch (_context.prev = _context.next) {
|
|
1290
|
-
case 0:
|
|
1291
|
-
if (newEditGood) {
|
|
1292
|
-
editGood = state.freightListState.editGood;
|
|
1293
|
-
state.freightListState = _objectSpread2(_objectSpread2({}, state.freightListState), {}, {
|
|
1294
|
-
editGood: _objectSpread2(_objectSpread2({}, editGood), newEditGood)
|
|
1295
|
-
});
|
|
1296
|
-
} else {
|
|
1297
|
-
state.freightListState = _objectSpread2(_objectSpread2({}, state.freightListState), {}, {
|
|
1298
|
-
editGood: undefined
|
|
1299
|
-
});
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
case 1:
|
|
1303
|
-
case "end":
|
|
1304
|
-
return _context.stop();
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
}, _callee);
|
|
1308
|
-
}));
|
|
1309
|
-
|
|
1310
|
-
return function (_x, _x2) {
|
|
1311
|
-
return _ref.apply(this, arguments);
|
|
1312
|
-
};
|
|
1313
|
-
})();
|
|
1314
|
-
|
|
1315
1260
|
/**
|
|
1316
1261
|
* 设置单个货物属性
|
|
1317
1262
|
*/
|
|
@@ -1350,44 +1295,6 @@ var setGoods = /*#__PURE__*/(function () {
|
|
|
1350
1295
|
};
|
|
1351
1296
|
})();
|
|
1352
1297
|
|
|
1353
|
-
/**
|
|
1354
|
-
* 设置单个货物属性
|
|
1355
|
-
*/
|
|
1356
|
-
var setFreight = /*#__PURE__*/(function () {
|
|
1357
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
|
|
1358
|
-
var goodsList;
|
|
1359
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1360
|
-
while (1) {
|
|
1361
|
-
switch (_context.prev = _context.next) {
|
|
1362
|
-
case 0:
|
|
1363
|
-
if (!(!options || !options.$index)) {
|
|
1364
|
-
_context.next = 2;
|
|
1365
|
-
break;
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
return _context.abrupt("return");
|
|
1369
|
-
|
|
1370
|
-
case 2:
|
|
1371
|
-
goodsList = state.freightListState.goodsList.map(function (e) {
|
|
1372
|
-
return e.$index === options.$index ? _objectSpread2(_objectSpread2({}, e), options) : e;
|
|
1373
|
-
});
|
|
1374
|
-
state.freightListState = _objectSpread2(_objectSpread2({}, state.freightListState), {}, {
|
|
1375
|
-
goodsList: goodsList
|
|
1376
|
-
});
|
|
1377
|
-
|
|
1378
|
-
case 4:
|
|
1379
|
-
case "end":
|
|
1380
|
-
return _context.stop();
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
}, _callee);
|
|
1384
|
-
}));
|
|
1385
|
-
|
|
1386
|
-
return function (_x, _x2) {
|
|
1387
|
-
return _ref.apply(this, arguments);
|
|
1388
|
-
};
|
|
1389
|
-
})();
|
|
1390
|
-
|
|
1391
1298
|
/**
|
|
1392
1299
|
* 删除一个货物
|
|
1393
1300
|
*/
|
|
@@ -1472,87 +1379,6 @@ var delGood = /*#__PURE__*/(function () {
|
|
|
1472
1379
|
};
|
|
1473
1380
|
})();
|
|
1474
1381
|
|
|
1475
|
-
/**
|
|
1476
|
-
* 删除一个货物运输
|
|
1477
|
-
*/
|
|
1478
|
-
var delFreight = /*#__PURE__*/(function () {
|
|
1479
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, $index) {
|
|
1480
|
-
var goods, goodsList, goodsMap, i;
|
|
1481
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1482
|
-
while (1) {
|
|
1483
|
-
switch (_context.prev = _context.next) {
|
|
1484
|
-
case 0:
|
|
1485
|
-
if ($index) {
|
|
1486
|
-
_context.next = 2;
|
|
1487
|
-
break;
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
return _context.abrupt("return");
|
|
1491
|
-
|
|
1492
|
-
case 2:
|
|
1493
|
-
// 查下要删除的货物
|
|
1494
|
-
goods = state.freightListState.goodsList.filter(function (e) {
|
|
1495
|
-
return e.$index === $index;
|
|
1496
|
-
})[0];
|
|
1497
|
-
|
|
1498
|
-
if (goods) {
|
|
1499
|
-
_context.next = 5;
|
|
1500
|
-
break;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
return _context.abrupt("return");
|
|
1504
|
-
|
|
1505
|
-
case 5:
|
|
1506
|
-
// 如果正在编辑 就取消编辑
|
|
1507
|
-
if (state.freightListState.editGood && state.freightListState.editGood.$index === $index) {
|
|
1508
|
-
state.freightListState.editGood = undefined;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
goodsList = state.freightListState.goodsList;
|
|
1512
|
-
goodsMap = state.freightListState.goodsMap;
|
|
1513
|
-
goodsMap.delete($index);
|
|
1514
|
-
i = 0;
|
|
1515
|
-
|
|
1516
|
-
case 10:
|
|
1517
|
-
if (!(i < goodsList.length)) {
|
|
1518
|
-
_context.next = 17;
|
|
1519
|
-
break;
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
if (!(goodsList[i].$index === $index)) {
|
|
1523
|
-
_context.next = 14;
|
|
1524
|
-
break;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
// const good = goodsList[i];
|
|
1528
|
-
// if (good.lineAttribute === LineAttributeType.折扣行 && goodsList[i - 1] && goodsList[i - 1].lineAttribute === LineAttributeType.被折扣行) {
|
|
1529
|
-
// goodsList[i - 1].lineAttribute = LineAttributeType.正常;
|
|
1530
|
-
// }
|
|
1531
|
-
goodsList.splice(i, 1);
|
|
1532
|
-
return _context.abrupt("break", 17);
|
|
1533
|
-
|
|
1534
|
-
case 14:
|
|
1535
|
-
i++;
|
|
1536
|
-
_context.next = 10;
|
|
1537
|
-
break;
|
|
1538
|
-
|
|
1539
|
-
case 17:
|
|
1540
|
-
state.freightListState.goodsList = _toConsumableArray(goodsList);
|
|
1541
|
-
state.freightListState.goodsMap = new Map(goodsMap);
|
|
1542
|
-
|
|
1543
|
-
case 19:
|
|
1544
|
-
case "end":
|
|
1545
|
-
return _context.stop();
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
}, _callee);
|
|
1549
|
-
}));
|
|
1550
|
-
|
|
1551
|
-
return function (_x, _x2) {
|
|
1552
|
-
return _ref.apply(this, arguments);
|
|
1553
|
-
};
|
|
1554
|
-
})();
|
|
1555
|
-
|
|
1556
1382
|
var idGenerator = (function () {
|
|
1557
1383
|
return v4();
|
|
1558
1384
|
});
|
|
@@ -1918,33 +1744,6 @@ var addGood = /*#__PURE__*/(function () {
|
|
|
1918
1744
|
};
|
|
1919
1745
|
})();
|
|
1920
1746
|
|
|
1921
|
-
/**
|
|
1922
|
-
* 添加的编辑货物运输
|
|
1923
|
-
*/
|
|
1924
|
-
|
|
1925
|
-
var addFreight = /*#__PURE__*/(function () {
|
|
1926
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state, options) {
|
|
1927
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1928
|
-
while (1) {
|
|
1929
|
-
switch (_context.prev = _context.next) {
|
|
1930
|
-
case 0:
|
|
1931
|
-
options.$index = idGenerator();
|
|
1932
|
-
state.freightListState.goodsList = [].concat(_toConsumableArray(state.freightListState.goodsList), [options]);
|
|
1933
|
-
return _context.abrupt("return", options);
|
|
1934
|
-
|
|
1935
|
-
case 3:
|
|
1936
|
-
case "end":
|
|
1937
|
-
return _context.stop();
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
}, _callee);
|
|
1941
|
-
}));
|
|
1942
|
-
|
|
1943
|
-
return function (_x, _x2) {
|
|
1944
|
-
return _ref.apply(this, arguments);
|
|
1945
|
-
};
|
|
1946
|
-
})();
|
|
1947
|
-
|
|
1948
1747
|
/**
|
|
1949
1748
|
* 保存正在编辑的货物
|
|
1950
1749
|
*/
|
|
@@ -2024,85 +1823,6 @@ var validateFields = function validateFields(form) {
|
|
|
2024
1823
|
});
|
|
2025
1824
|
};
|
|
2026
1825
|
|
|
2027
|
-
/**
|
|
2028
|
-
* 保存正在编辑的货物
|
|
2029
|
-
*/
|
|
2030
|
-
var saveEditFreight = /*#__PURE__*/(function () {
|
|
2031
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(state) {
|
|
2032
|
-
var editGood, form;
|
|
2033
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2034
|
-
while (1) {
|
|
2035
|
-
switch (_context.prev = _context.next) {
|
|
2036
|
-
case 0:
|
|
2037
|
-
editGood = state.freightListState.editGood;
|
|
2038
|
-
form = state.freightListState.form;
|
|
2039
|
-
|
|
2040
|
-
if (!(!editGood || !form)) {
|
|
2041
|
-
_context.next = 4;
|
|
2042
|
-
break;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
return _context.abrupt("return");
|
|
2046
|
-
|
|
2047
|
-
case 4:
|
|
2048
|
-
_context.next = 6;
|
|
2049
|
-
return validateFields$1(form);
|
|
2050
|
-
|
|
2051
|
-
case 6:
|
|
2052
|
-
if (!_context.sent.err) {
|
|
2053
|
-
_context.next = 8;
|
|
2054
|
-
break;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
return _context.abrupt("return");
|
|
2058
|
-
|
|
2059
|
-
case 8:
|
|
2060
|
-
state.freightListState.goodsList = state.freightListState.goodsList.map(function (e) {
|
|
2061
|
-
return e.$index === editGood.$index ? _objectSpread2(_objectSpread2({}, e), editGood) : e;
|
|
2062
|
-
});
|
|
2063
|
-
state.freightListState.editGood = undefined;
|
|
2064
|
-
|
|
2065
|
-
case 10:
|
|
2066
|
-
case "end":
|
|
2067
|
-
return _context.stop();
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
}, _callee);
|
|
2071
|
-
}));
|
|
2072
|
-
|
|
2073
|
-
return function (_x) {
|
|
2074
|
-
return _ref.apply(this, arguments);
|
|
2075
|
-
};
|
|
2076
|
-
})();
|
|
2077
|
-
|
|
2078
|
-
var validateFields$1 = function validateFields(form) {
|
|
2079
|
-
return new Promise(function (resolve) {
|
|
2080
|
-
form.validateFields( /*#__PURE__*/function () {
|
|
2081
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
2082
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2083
|
-
while (1) {
|
|
2084
|
-
switch (_context2.prev = _context2.next) {
|
|
2085
|
-
case 0:
|
|
2086
|
-
resolve({
|
|
2087
|
-
err: err,
|
|
2088
|
-
values: values
|
|
2089
|
-
});
|
|
2090
|
-
|
|
2091
|
-
case 1:
|
|
2092
|
-
case "end":
|
|
2093
|
-
return _context2.stop();
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
}, _callee2);
|
|
2097
|
-
}));
|
|
2098
|
-
|
|
2099
|
-
return function (_x2, _x3) {
|
|
2100
|
-
return _ref2.apply(this, arguments);
|
|
2101
|
-
};
|
|
2102
|
-
}());
|
|
2103
|
-
});
|
|
2104
|
-
};
|
|
2105
|
-
|
|
2106
1826
|
/**
|
|
2107
1827
|
* 计算搜索商品
|
|
2108
1828
|
* @param goodsList 被搜索列表
|
|
@@ -10009,15 +9729,10 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
|
10009
9729
|
_this.updateInvoiceNo = void 0;
|
|
10010
9730
|
_this.getBuyerList = void 0;
|
|
10011
9731
|
_this.setGoods = _this.pipeline(setGoods);
|
|
10012
|
-
_this.setFreight = _this.pipeline(setFreight);
|
|
10013
|
-
_this.setEditFreight = _this.pipeline(setEditFreight);
|
|
10014
9732
|
_this.setEditGood = _this.pipeline(setEditGood);
|
|
10015
9733
|
_this.saveEditGood = _this.pipeline(saveEditGood);
|
|
10016
|
-
_this.saveEditFreight = _this.pipeline(saveEditFreight);
|
|
10017
9734
|
_this.delGood = _this.pipeline(delGood);
|
|
10018
|
-
_this.delFreight = _this.pipeline(delFreight);
|
|
10019
9735
|
_this.addGood = _this.pipeline(addGood);
|
|
10020
|
-
_this.addFreight = _this.pipeline(addFreight);
|
|
10021
9736
|
_this.mergeDetails = _this.pipeline(mergeDetails);
|
|
10022
9737
|
_this.mergeDiscount = _this.pipeline(mergeDiscount);
|
|
10023
9738
|
_this.addGoodDiscount = _this.pipeline(addGoodDiscount);
|
|
@@ -10049,14 +9764,6 @@ function useToGenerateId(controller) {
|
|
|
10049
9764
|
e.serialNo = i + 1;
|
|
10050
9765
|
});
|
|
10051
9766
|
}, [goodsList]);
|
|
10052
|
-
var freightList = controller.useMemo(function (s) {
|
|
10053
|
-
return s.freightListState.goodsList;
|
|
10054
|
-
}, []);
|
|
10055
|
-
React.useEffect(function () {
|
|
10056
|
-
freightList.forEach(function (e, i) {
|
|
10057
|
-
e.sortNumber = i + 1;
|
|
10058
|
-
});
|
|
10059
|
-
}, [freightList]);
|
|
10060
9767
|
}
|
|
10061
9768
|
|
|
10062
9769
|
var Nzh = require("nzh");
|
|
@@ -11044,7 +10751,7 @@ function TableRow(props) {
|
|
|
11044
10751
|
bottom: 0
|
|
11045
10752
|
}
|
|
11046
10753
|
})) : /*#__PURE__*/React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
11047
|
-
className:
|
|
10754
|
+
className: classNames(props.className, discount, expandedRow, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container-' + site : undefined)
|
|
11048
10755
|
}));
|
|
11049
10756
|
}
|
|
11050
10757
|
|
|
@@ -12928,8 +12635,8 @@ var Icon = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
12928
12635
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
12929
12636
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre;
|
|
12930
12637
|
|
|
12931
|
-
var classString =
|
|
12932
|
-
var svgClassString =
|
|
12638
|
+
var classString = classNames(prefixCls, className);
|
|
12639
|
+
var svgClassString = classNames(_defineProperty$1({}, "".concat(prefixCls, "-spin"), !!spin));
|
|
12933
12640
|
var svgStyle = rotate ? {
|
|
12934
12641
|
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
12935
12642
|
transform: "rotate(".concat(rotate, "deg)")
|
|
@@ -16568,7 +16275,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
16568
16275
|
}, /*#__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", {
|
|
16569
16276
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
16570
16277
|
}, props.menuExpansion, /*#__PURE__*/React.createElement(DescribeSwitch, null), /*#__PURE__*/React.createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React.createElement("div", {
|
|
16571
|
-
className:
|
|
16278
|
+
className: classNames('kts-invoice-operate-goods-list-table', {
|
|
16572
16279
|
'kts-invoice-operate-prefab': isprefab
|
|
16573
16280
|
})
|
|
16574
16281
|
}, /*#__PURE__*/React.createElement(TableVirtual, {
|
|
@@ -17485,7 +17192,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17485
17192
|
setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
|
|
17486
17193
|
}, [props.isExpand]);
|
|
17487
17194
|
return /*#__PURE__*/React.createElement("div", {
|
|
17488
|
-
className:
|
|
17195
|
+
className: classNames("kts-invoice-operate-invoice-digtal-stakeholder", {
|
|
17489
17196
|
readOnly: readOnly
|
|
17490
17197
|
})
|
|
17491
17198
|
}, /*#__PURE__*/React.createElement("div", null, '购买方信息'.split('').map(function (e) {
|
|
@@ -18073,7 +17780,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18073
17780
|
setExpand(typeof props.isExpand === 'boolean' ? props.isExpand : true);
|
|
18074
17781
|
}, [props.isExpand]);
|
|
18075
17782
|
return /*#__PURE__*/React.createElement("div", {
|
|
18076
|
-
className:
|
|
17783
|
+
className: classNames("kts-invoice-operate-invoice-digtal-stakeholder", {
|
|
18077
17784
|
readOnly: readOnly
|
|
18078
17785
|
})
|
|
18079
17786
|
}, /*#__PURE__*/React.createElement("div", null, '销售方信息'.split('').map(function (e) {
|
|
@@ -20540,7 +20247,7 @@ function TableRow$1(props) {
|
|
|
20540
20247
|
/*#__PURE__*/
|
|
20541
20248
|
// <tr {...props} className={classnames(props.className, discount, (rowKey === container && current) ? 'kts-invoice-operate-goods-list-itemName-drag-container' : '')} />
|
|
20542
20249
|
React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20543
|
-
className:
|
|
20250
|
+
className: classNames(props.className, discount, rowKey === container && current ? 'kts-invoice-operate-goods-list-itemName-drag-container-' + site : undefined)
|
|
20544
20251
|
}));
|
|
20545
20252
|
}
|
|
20546
20253
|
|
|
@@ -23940,7 +23647,7 @@ var Main$3 = decorator(Form.create())(function (props) {
|
|
|
23940
23647
|
flex: 1
|
|
23941
23648
|
}
|
|
23942
23649
|
}), props.menuExpansion, reselectInvoiceType.button, emptyRefill.button), /*#__PURE__*/React.createElement("div", {
|
|
23943
|
-
className:
|
|
23650
|
+
className: classNames('kts-invoice-operate-goods-list-table-digtal')
|
|
23944
23651
|
}, /*#__PURE__*/React.createElement(TableVirtual$1, {
|
|
23945
23652
|
size: "small",
|
|
23946
23653
|
rowKey: "$index",
|
|
@@ -24207,1632 +23914,10 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
|
|
|
24207
23914
|
return MyNY;
|
|
24208
23915
|
}(React.Component);
|
|
24209
23916
|
|
|
24210
|
-
var
|
|
24211
|
-
styleInject(css_248z$s);
|
|
24212
|
-
|
|
24213
|
-
/** 特殊信息-建筑服务 */
|
|
24214
|
-
|
|
24215
|
-
var Architecture = decorator(Form.create())(function (props) {
|
|
24216
|
-
/** 控制器 */
|
|
23917
|
+
var ImportBuyerDrawer = (function () {
|
|
24217
23918
|
var controller = Invoice.useInvoiceController();
|
|
24218
|
-
var
|
|
24219
|
-
|
|
24220
|
-
var model = controller.useMemo(function (s) {
|
|
24221
|
-
return s.model;
|
|
24222
|
-
}, []);
|
|
24223
|
-
var readOnly = React.useMemo(function () {
|
|
24224
|
-
return model === 'readOnly';
|
|
24225
|
-
}, [model]); // 注册 form
|
|
24226
|
-
|
|
24227
|
-
controller.useForm('realEstateInfo', form);
|
|
24228
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24229
|
-
className: "kts-invoice-operate-real-estate-info-digtal"
|
|
24230
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
24231
|
-
className: 'real-estate-info-digtal-label'
|
|
24232
|
-
}, "\u7279\u6B8A\u4FE1\u606F-\u5EFA\u7B51\u670D\u52A1"), /*#__PURE__*/React.createElement(Row$1, {
|
|
24233
|
-
gutter: [17, 0]
|
|
24234
|
-
}, /*#__PURE__*/React.createElement(Col$1, {
|
|
24235
|
-
span: 6
|
|
24236
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24237
|
-
label: "\u571F\u5730\u589E\u503C\u7A0E\u9879\u76EE\u7F16\u53F7"
|
|
24238
|
-
}, getFieldDecorator('landNumber', {})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24239
|
-
autoComplete: 'off',
|
|
24240
|
-
placeholder: "\u8BF7\u8F93\u5165"
|
|
24241
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24242
|
-
span: 6
|
|
24243
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24244
|
-
label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
|
|
24245
|
-
}, getFieldDecorator('crossCitiesSign', {
|
|
24246
|
-
rules: readOnly ? [] : [{
|
|
24247
|
-
required: true,
|
|
24248
|
-
message: '请选择跨地(市)标志'
|
|
24249
|
-
}]
|
|
24250
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyNY$1, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24251
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
24252
|
-
style: {
|
|
24253
|
-
width: '100%'
|
|
24254
|
-
}
|
|
24255
|
-
}, /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24256
|
-
value: 'Y'
|
|
24257
|
-
}, "\u662F"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24258
|
-
value: 'N'
|
|
24259
|
-
}, "\u5426"))))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24260
|
-
span: 6
|
|
24261
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24262
|
-
label: "\u5EFA\u7B51\u670D\u52A1\u53D1\u751F\u5730"
|
|
24263
|
-
}, getFieldDecorator('constructAddress', {
|
|
24264
|
-
rules: readOnly ? [] : [{
|
|
24265
|
-
required: true,
|
|
24266
|
-
message: '请选择省市区县'
|
|
24267
|
-
}]
|
|
24268
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyArrString$1, null) : /*#__PURE__*/React.createElement(Cascader, {
|
|
24269
|
-
style: {
|
|
24270
|
-
width: '100%'
|
|
24271
|
-
},
|
|
24272
|
-
options: props.addressOptions,
|
|
24273
|
-
fieldNames: props.fieldNames,
|
|
24274
|
-
placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
|
|
24275
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24276
|
-
span: 6
|
|
24277
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24278
|
-
label: "\u8BE6\u7EC6\u5730\u5740"
|
|
24279
|
-
}, getFieldDecorator('constructDetailAddress', {
|
|
24280
|
-
rules: readOnly ? [] : [{
|
|
24281
|
-
max: 200,
|
|
24282
|
-
message: '详细地址最多200个字符'
|
|
24283
|
-
}]
|
|
24284
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24285
|
-
autoComplete: 'off',
|
|
24286
|
-
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24287
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24288
|
-
span: 6
|
|
24289
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24290
|
-
label: "\u5EFA\u7B51\u9879\u76EE\u540D\u79F0"
|
|
24291
|
-
}, getFieldDecorator('constructName', {
|
|
24292
|
-
rules: readOnly ? [] : [{
|
|
24293
|
-
required: true,
|
|
24294
|
-
message: '请输入建筑项目名称'
|
|
24295
|
-
}, {
|
|
24296
|
-
max: 200,
|
|
24297
|
-
message: '建筑项目名称最多200个字符'
|
|
24298
|
-
}]
|
|
24299
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24300
|
-
autoComplete: 'off',
|
|
24301
|
-
placeholder: "\u8BF7\u8F93\u5165"
|
|
24302
|
-
}))))));
|
|
24303
|
-
});
|
|
24304
|
-
|
|
24305
|
-
var MyDiv$4 = /*#__PURE__*/function (_React$Component) {
|
|
24306
|
-
_inherits(MyDiv, _React$Component);
|
|
24307
|
-
|
|
24308
|
-
var _super = _createSuper(MyDiv);
|
|
24309
|
-
|
|
24310
|
-
function MyDiv() {
|
|
24311
|
-
_classCallCheck(this, MyDiv);
|
|
24312
|
-
|
|
24313
|
-
return _super.apply(this, arguments);
|
|
24314
|
-
}
|
|
24315
|
-
|
|
24316
|
-
_createClass(MyDiv, [{
|
|
24317
|
-
key: "render",
|
|
24318
|
-
value: function render() {
|
|
24319
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24320
|
-
style: this.props.style
|
|
24321
|
-
}, this.props.value);
|
|
24322
|
-
}
|
|
24323
|
-
}]);
|
|
24324
|
-
|
|
24325
|
-
return MyDiv;
|
|
24326
|
-
}(React.Component);
|
|
24327
|
-
|
|
24328
|
-
var MyArrString$1 = /*#__PURE__*/function (_React$Component2) {
|
|
24329
|
-
_inherits(MyArrString, _React$Component2);
|
|
24330
|
-
|
|
24331
|
-
var _super2 = _createSuper(MyArrString);
|
|
24332
|
-
|
|
24333
|
-
function MyArrString() {
|
|
24334
|
-
_classCallCheck(this, MyArrString);
|
|
24335
|
-
|
|
24336
|
-
return _super2.apply(this, arguments);
|
|
24337
|
-
}
|
|
24338
|
-
|
|
24339
|
-
_createClass(MyArrString, [{
|
|
24340
|
-
key: "render",
|
|
24341
|
-
value: function render() {
|
|
24342
|
-
var _this$props$value;
|
|
24343
|
-
|
|
24344
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24345
|
-
style: this.props.style
|
|
24346
|
-
}, (_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.filter(function (e) {
|
|
24347
|
-
return !!e;
|
|
24348
|
-
}).join(','));
|
|
24349
|
-
}
|
|
24350
|
-
}]);
|
|
24351
|
-
|
|
24352
|
-
return MyArrString;
|
|
24353
|
-
}(React.Component);
|
|
24354
|
-
|
|
24355
|
-
var MyArrMoment$1 = /*#__PURE__*/function (_React$Component3) {
|
|
24356
|
-
_inherits(MyArrMoment, _React$Component3);
|
|
24357
|
-
|
|
24358
|
-
var _super3 = _createSuper(MyArrMoment);
|
|
24359
|
-
|
|
24360
|
-
function MyArrMoment() {
|
|
24361
|
-
_classCallCheck(this, MyArrMoment);
|
|
24362
|
-
|
|
24363
|
-
return _super3.apply(this, arguments);
|
|
24364
|
-
}
|
|
24365
|
-
|
|
24366
|
-
_createClass(MyArrMoment, [{
|
|
24367
|
-
key: "render",
|
|
24368
|
-
value: function render() {
|
|
24369
|
-
var _this$props$value2 = this.props.value,
|
|
24370
|
-
value = _this$props$value2 === void 0 ? [] : _this$props$value2;
|
|
24371
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24372
|
-
style: this.props.style
|
|
24373
|
-
}, /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD')), /*#__PURE__*/React.createElement("span", {
|
|
24374
|
-
style: {
|
|
24375
|
-
color: '#9F603D',
|
|
24376
|
-
fontWeight: 600
|
|
24377
|
-
}
|
|
24378
|
-
}, " - "), /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
|
|
24379
|
-
}
|
|
24380
|
-
}]);
|
|
24381
|
-
|
|
24382
|
-
return MyArrMoment;
|
|
24383
|
-
}(React.Component);
|
|
24384
|
-
|
|
24385
|
-
var MyNY$1 = /*#__PURE__*/function (_React$Component4) {
|
|
24386
|
-
_inherits(MyNY, _React$Component4);
|
|
24387
|
-
|
|
24388
|
-
var _super4 = _createSuper(MyNY);
|
|
24389
|
-
|
|
24390
|
-
function MyNY() {
|
|
24391
|
-
_classCallCheck(this, MyNY);
|
|
24392
|
-
|
|
24393
|
-
return _super4.apply(this, arguments);
|
|
24394
|
-
}
|
|
24395
|
-
|
|
24396
|
-
_createClass(MyNY, [{
|
|
24397
|
-
key: "render",
|
|
24398
|
-
value: function render() {
|
|
24399
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24400
|
-
style: this.props.style
|
|
24401
|
-
}, this.props.value === 'Y' ? '是' : '否');
|
|
24402
|
-
}
|
|
24403
|
-
}]);
|
|
24404
|
-
|
|
24405
|
-
return MyNY;
|
|
24406
|
-
}(React.Component);
|
|
24407
|
-
|
|
24408
|
-
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";
|
|
24409
|
-
styleInject(css_248z$t);
|
|
24410
|
-
|
|
24411
|
-
function TableVirtual$2 (props) {
|
|
24412
|
-
var _props$dataSource2;
|
|
24413
|
-
|
|
24414
|
-
var _React$useState = React.useState(null),
|
|
24415
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24416
|
-
self = _React$useState2[0],
|
|
24417
|
-
setSelf = _React$useState2[1];
|
|
24418
|
-
|
|
24419
|
-
var tableBody = React.useMemo(function () {
|
|
24420
|
-
if (!self) return;
|
|
24421
|
-
return self.querySelector('.ktsAntX-table-body');
|
|
24422
|
-
}, [self]);
|
|
24423
|
-
/** 显示指针 */
|
|
24424
|
-
|
|
24425
|
-
var _React$useState3 = React.useState(0),
|
|
24426
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
24427
|
-
pointer = _React$useState4[0],
|
|
24428
|
-
setPointer = _React$useState4[1];
|
|
24429
|
-
/** 行高 */
|
|
24430
|
-
|
|
24431
|
-
|
|
24432
|
-
var rowHeight = React.useMemo(function () {
|
|
24433
|
-
if (!self) return 50;
|
|
24434
|
-
var td = self.querySelector('.ktsAntX-table-tbody .ktsAntX-table-row');
|
|
24435
|
-
if (!td) return 50;
|
|
24436
|
-
return td.clientHeight;
|
|
24437
|
-
}, [self, props.dataSource]);
|
|
24438
|
-
/** 间隔容器 */
|
|
24439
|
-
|
|
24440
|
-
var placeholder = React.useMemo(function () {
|
|
24441
|
-
if (!self || !tableBody) return;
|
|
24442
|
-
var placeholder = tableBody.querySelector('.table-virtual-placeholder');
|
|
24443
|
-
|
|
24444
|
-
if (!placeholder) {
|
|
24445
|
-
placeholder = document.createElement('div');
|
|
24446
|
-
placeholder.className = 'table-virtual-placeholder';
|
|
24447
|
-
tableBody.appendChild(placeholder);
|
|
24448
|
-
}
|
|
24449
|
-
|
|
24450
|
-
return placeholder;
|
|
24451
|
-
}, [self, tableBody]); // 设置占位dom的搞
|
|
24452
|
-
|
|
24453
|
-
var placeholderHeight = React.useMemo(function () {
|
|
24454
|
-
if (!self || !rowHeight || !props.dataSource || !placeholder) return;
|
|
24455
|
-
var placeholderHeight = rowHeight * props.dataSource.length;
|
|
24456
|
-
placeholder.style.height = "".concat(placeholderHeight, "px");
|
|
24457
|
-
return placeholderHeight;
|
|
24458
|
-
}, [self, rowHeight, props.dataSource, placeholder]);
|
|
24459
|
-
/** 可以容纳的行数 */
|
|
24460
|
-
|
|
24461
|
-
var rowSize = React.useMemo(function () {
|
|
24462
|
-
if (!tableBody || !rowHeight) return 0;
|
|
24463
|
-
return Math.ceil(tableBody.clientHeight / rowHeight);
|
|
24464
|
-
}, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
|
|
24465
|
-
|
|
24466
|
-
var dataSource = React.useMemo(function () {
|
|
24467
|
-
var _props$dataSource;
|
|
24468
|
-
|
|
24469
|
-
if (!props.dataSource) return [];
|
|
24470
|
-
if (props.dataSource.length < 10) return props.dataSource;
|
|
24471
|
-
if (!rowSize) return [props.dataSource[0]];
|
|
24472
|
-
return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
|
|
24473
|
-
}, [props.dataSource, pointer, rowSize]); // 监听滚动
|
|
24474
|
-
|
|
24475
|
-
React.useEffect(function () {
|
|
24476
|
-
if (!self || !placeholder || !props.dataSource || !rowHeight || !tableBody || props.dataSource.length < 10) return;
|
|
24477
|
-
|
|
24478
|
-
var onScroll = function onScroll() {
|
|
24479
|
-
if (!props.dataSource || !tableBody) return;
|
|
24480
|
-
setPointer(Math.floor((props.dataSource.length - rowSize) * (tableBody.scrollTop / (placeholder.clientHeight - tableBody.clientHeight))));
|
|
24481
|
-
};
|
|
24482
|
-
|
|
24483
|
-
onScroll();
|
|
24484
|
-
tableBody.addEventListener('scroll', onScroll);
|
|
24485
|
-
return function () {
|
|
24486
|
-
tableBody.removeEventListener('scroll', onScroll);
|
|
24487
|
-
};
|
|
24488
|
-
}, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
|
|
24489
|
-
|
|
24490
|
-
React.useEffect(function () {
|
|
24491
|
-
if (!self) return;
|
|
24492
|
-
var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
|
|
24493
|
-
if (!table) return;
|
|
24494
|
-
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
24495
|
-
}, [pointer, self, rowHeight]);
|
|
24496
|
-
React.useEffect(function () {
|
|
24497
|
-
if (!self) return;
|
|
24498
|
-
var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
|
|
24499
|
-
if (!cont) return;
|
|
24500
|
-
cont.scrollTop = 0;
|
|
24501
|
-
}, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
|
|
24502
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
24503
|
-
className: "kts-invoice-operate-goods-table-virtual",
|
|
24504
|
-
ref: function ref(e) {
|
|
24505
|
-
setSelf(e);
|
|
24506
|
-
}
|
|
24507
|
-
}, /*#__PURE__*/React.createElement(TableManual, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
24508
|
-
dataSource: dataSource,
|
|
24509
|
-
// 新版本Table会有输入框无法连续输入的问题,先兼容老版本
|
|
24510
|
-
tableComponent: Table
|
|
24511
|
-
})));
|
|
24512
|
-
}
|
|
24513
|
-
|
|
24514
|
-
var AddRowButton$2 = (function () {
|
|
24515
|
-
var controller = Invoice.useInvoiceController();
|
|
24516
|
-
var model = controller.useMemo(function (s) {
|
|
24517
|
-
return s.model;
|
|
24518
|
-
}, []);
|
|
24519
|
-
var rootElement = controller.useMemo(function (s) {
|
|
24520
|
-
return s.rootElement;
|
|
24521
|
-
}, []);
|
|
24522
|
-
/** 产品数据量 */
|
|
24523
|
-
|
|
24524
|
-
var goodsNum = controller.useMemo(function (s) {
|
|
24525
|
-
return s.freightListState.goodsList.length;
|
|
24526
|
-
}, []);
|
|
24527
|
-
/** 搜索条件 */
|
|
24528
|
-
|
|
24529
|
-
var isAddRow = controller.useMemo(function (s) {
|
|
24530
|
-
return s.freightListState.isAddRow;
|
|
24531
|
-
}, []);
|
|
24532
|
-
/** 产品最大数 */
|
|
24533
|
-
|
|
24534
|
-
var goodMax = controller.useMemo(function (s) {
|
|
24535
|
-
return s.freightListState.goodMax;
|
|
24536
|
-
}, []);
|
|
24537
|
-
/** 按钮是否禁用 */
|
|
24538
|
-
|
|
24539
|
-
var disabled = React.useMemo(function () {
|
|
24540
|
-
return typeof goodMax === 'number' ? goodsNum >= goodMax : false;
|
|
24541
|
-
}, [goodMax, goodsNum]);
|
|
24542
|
-
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
24543
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
24544
|
-
while (1) {
|
|
24545
|
-
switch (_context.prev = _context.next) {
|
|
24546
|
-
case 0:
|
|
24547
|
-
_context.next = 2;
|
|
24548
|
-
return addGood$3(controller);
|
|
24549
|
-
|
|
24550
|
-
case 2:
|
|
24551
|
-
_context.next = 4;
|
|
24552
|
-
return rollBottom$2(controller, rootElement);
|
|
24553
|
-
|
|
24554
|
-
case 4:
|
|
24555
|
-
case "end":
|
|
24556
|
-
return _context.stop();
|
|
24557
|
-
}
|
|
24558
|
-
}
|
|
24559
|
-
}, _callee);
|
|
24560
|
-
})), [controller, rootElement]);
|
|
24561
|
-
if (isAddRow === false) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
24562
|
-
if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
24563
|
-
if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
24564
|
-
return /*#__PURE__*/React.createElement(Button$1, {
|
|
24565
|
-
size: 'small',
|
|
24566
|
-
type: 'primary',
|
|
24567
|
-
onClick: onClick,
|
|
24568
|
-
disabled: disabled
|
|
24569
|
-
}, "\u589E\u884C");
|
|
24570
|
-
});
|
|
24571
|
-
/** 添加一个空货物 */
|
|
24572
|
-
|
|
24573
|
-
function addGood$3(_x) {
|
|
24574
|
-
return _addGood$2.apply(this, arguments);
|
|
24575
|
-
}
|
|
24576
|
-
/** 货物列表,滚动到底部 */
|
|
24577
|
-
|
|
24578
|
-
|
|
24579
|
-
function _addGood$2() {
|
|
24580
|
-
_addGood$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(controller) {
|
|
24581
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
24582
|
-
while (1) {
|
|
24583
|
-
switch (_context3.prev = _context3.next) {
|
|
24584
|
-
case 0:
|
|
24585
|
-
_context3.next = 2;
|
|
24586
|
-
return controller.saveEditFreight();
|
|
24587
|
-
|
|
24588
|
-
case 2:
|
|
24589
|
-
_context3.next = 4;
|
|
24590
|
-
return controller.wait();
|
|
24591
|
-
|
|
24592
|
-
case 4:
|
|
24593
|
-
_context3.next = 6;
|
|
24594
|
-
return controller.run( /*#__PURE__*/function () {
|
|
24595
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
24596
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
24597
|
-
while (1) {
|
|
24598
|
-
switch (_context2.prev = _context2.next) {
|
|
24599
|
-
case 0:
|
|
24600
|
-
if (!s.freightListState.editGood) {
|
|
24601
|
-
_context2.next = 3;
|
|
24602
|
-
break;
|
|
24603
|
-
}
|
|
24604
|
-
|
|
24605
|
-
message$1.error({
|
|
24606
|
-
content: '你正在编辑一个货物运输行',
|
|
24607
|
-
key: '你正在编辑一个货物运输行'
|
|
24608
|
-
});
|
|
24609
|
-
return _context2.abrupt("return");
|
|
24610
|
-
|
|
24611
|
-
case 3:
|
|
24612
|
-
_context2.next = 5;
|
|
24613
|
-
return controller.addFreight({});
|
|
24614
|
-
|
|
24615
|
-
case 5:
|
|
24616
|
-
s.freightListState.editGood = _context2.sent;
|
|
24617
|
-
|
|
24618
|
-
case 6:
|
|
24619
|
-
case "end":
|
|
24620
|
-
return _context2.stop();
|
|
24621
|
-
}
|
|
24622
|
-
}
|
|
24623
|
-
}, _callee2);
|
|
24624
|
-
}));
|
|
24625
|
-
|
|
24626
|
-
return function (_x4) {
|
|
24627
|
-
return _ref2.apply(this, arguments);
|
|
24628
|
-
};
|
|
24629
|
-
}());
|
|
24630
|
-
|
|
24631
|
-
case 6:
|
|
24632
|
-
case "end":
|
|
24633
|
-
return _context3.stop();
|
|
24634
|
-
}
|
|
24635
|
-
}
|
|
24636
|
-
}, _callee3);
|
|
24637
|
-
}));
|
|
24638
|
-
return _addGood$2.apply(this, arguments);
|
|
24639
|
-
}
|
|
24640
|
-
|
|
24641
|
-
function rollBottom$2(_x2, _x3) {
|
|
24642
|
-
return _rollBottom$2.apply(this, arguments);
|
|
24643
|
-
}
|
|
24644
|
-
|
|
24645
|
-
function _rollBottom$2() {
|
|
24646
|
-
_rollBottom$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller, rootElement) {
|
|
24647
|
-
var cont;
|
|
24648
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
24649
|
-
while (1) {
|
|
24650
|
-
switch (_context4.prev = _context4.next) {
|
|
24651
|
-
case 0:
|
|
24652
|
-
_context4.next = 2;
|
|
24653
|
-
return controller.wait();
|
|
24654
|
-
|
|
24655
|
-
case 2:
|
|
24656
|
-
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
24657
|
-
|
|
24658
|
-
if (cont) {
|
|
24659
|
-
_context4.next = 5;
|
|
24660
|
-
break;
|
|
24661
|
-
}
|
|
24662
|
-
|
|
24663
|
-
return _context4.abrupt("return");
|
|
24664
|
-
|
|
24665
|
-
case 5:
|
|
24666
|
-
cont.scrollTop = cont.scrollHeight;
|
|
24667
|
-
|
|
24668
|
-
case 6:
|
|
24669
|
-
case "end":
|
|
24670
|
-
return _context4.stop();
|
|
24671
|
-
}
|
|
24672
|
-
}
|
|
24673
|
-
}, _callee4);
|
|
24674
|
-
}));
|
|
24675
|
-
return _rollBottom$2.apply(this, arguments);
|
|
24676
|
-
}
|
|
24677
|
-
|
|
24678
|
-
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";
|
|
24679
|
-
styleInject(css_248z$u);
|
|
24680
|
-
|
|
24681
|
-
function TableRow$2(props) {
|
|
24682
|
-
var rowKey = props['data-row-key'];
|
|
24683
|
-
return /*#__PURE__*/React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
24684
|
-
className: classnames(props.className)
|
|
24685
|
-
}));
|
|
24686
|
-
}
|
|
24687
|
-
|
|
24688
|
-
var Text$6 = Typography.Text;
|
|
24689
|
-
var TitleText$2 = (function (props) {
|
|
24690
|
-
var rules = props.rules,
|
|
24691
|
-
children = props.children;
|
|
24692
|
-
var required = React.useMemo(function () {
|
|
24693
|
-
return (rules === null || rules === void 0 ? void 0 : rules.some(function (e) {
|
|
24694
|
-
return !!e.required;
|
|
24695
|
-
})) || props.required;
|
|
24696
|
-
}, [rules, props.required]);
|
|
24697
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, required ? /*#__PURE__*/React.createElement(Text$6, {
|
|
24698
|
-
type: "danger"
|
|
24699
|
-
}, "*") : /*#__PURE__*/React.createElement(React.Fragment, null), children);
|
|
24700
|
-
});
|
|
24701
|
-
|
|
24702
|
-
var useColumns$2 = (function (form) {
|
|
24703
|
-
var getFieldDecorator = form.getFieldDecorator;
|
|
24704
|
-
var controller = Invoice.useInvoiceController();
|
|
24705
|
-
var rootElement = controller.useMemo(function (s) {
|
|
24706
|
-
return s.rootElement;
|
|
24707
|
-
}, []);
|
|
24708
|
-
/** 组件模式 */
|
|
24709
|
-
|
|
24710
|
-
var model = controller.useMemo(function (e) {
|
|
24711
|
-
return e.model;
|
|
24712
|
-
}, []);
|
|
24713
|
-
/** 正在编辑的货物 */
|
|
24714
|
-
|
|
24715
|
-
var editGood = controller.useMemo(function (e) {
|
|
24716
|
-
return e.freightListState.editGood;
|
|
24717
|
-
}, []);
|
|
24718
|
-
/** 禁用字段 */
|
|
24719
|
-
|
|
24720
|
-
var disableds = controller.useMemo(function (e) {
|
|
24721
|
-
return e.stakeholder.disableds || [];
|
|
24722
|
-
}, []);
|
|
24723
|
-
/** 运输工具种类列表 */
|
|
24724
|
-
|
|
24725
|
-
var vehicleTypeList = controller.useMemo(function (e) {
|
|
24726
|
-
return e.freightListState.vehicleTypeList;
|
|
24727
|
-
}, []);
|
|
24728
|
-
var area = controller.useMemo(function (e) {
|
|
24729
|
-
return e.freightListState.area;
|
|
24730
|
-
}, []);
|
|
24731
|
-
var addressFieldNames = controller.useMemo(function (e) {
|
|
24732
|
-
return e.freightListState.addressFieldNames;
|
|
24733
|
-
}, []);
|
|
24734
|
-
var getVehicle = React.useCallback(function (value) {
|
|
24735
|
-
if (vehicleTypeList && vehicleTypeList.length > 0) {
|
|
24736
|
-
var _vehicleTypeList$find;
|
|
24737
|
-
|
|
24738
|
-
return ((_vehicleTypeList$find = vehicleTypeList.find(function (e) {
|
|
24739
|
-
return e.value === value;
|
|
24740
|
-
})) === null || _vehicleTypeList$find === void 0 ? void 0 : _vehicleTypeList$find.label) || '';
|
|
24741
|
-
}
|
|
24742
|
-
}, [vehicleTypeList]);
|
|
24743
|
-
var splitArea = React.useCallback(function (value) {
|
|
24744
|
-
if (value) {
|
|
24745
|
-
var _array = value.split(',');
|
|
24746
|
-
|
|
24747
|
-
return _array;
|
|
24748
|
-
} else {
|
|
24749
|
-
return [];
|
|
24750
|
-
}
|
|
24751
|
-
}, []);
|
|
24752
|
-
/** 表头 */
|
|
24753
|
-
|
|
24754
|
-
var columns = React.useMemo(function () {
|
|
24755
|
-
return [{
|
|
24756
|
-
title: '序号',
|
|
24757
|
-
key: 'sortNumber',
|
|
24758
|
-
dataIndex: 'sortNumber',
|
|
24759
|
-
width: 50,
|
|
24760
|
-
render: function render(e) {
|
|
24761
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
24762
|
-
style: {
|
|
24763
|
-
padding: '0 10px'
|
|
24764
|
-
}
|
|
24765
|
-
}, e);
|
|
24766
|
-
}
|
|
24767
|
-
}, {
|
|
24768
|
-
title: /*#__PURE__*/React.createElement(TitleText$2, {
|
|
24769
|
-
required: true
|
|
24770
|
-
}, "\u8FD0\u8F93\u5DE5\u5177\u79CD\u7C7B"),
|
|
24771
|
-
key: 'type',
|
|
24772
|
-
render: function render(_, record) {
|
|
24773
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('type') && !(model === 'prefab')) {
|
|
24774
|
-
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('type', {
|
|
24775
|
-
initialValue: editGood.type,
|
|
24776
|
-
rules: [{
|
|
24777
|
-
required: true,
|
|
24778
|
-
message: '请输入'
|
|
24779
|
-
}]
|
|
24780
|
-
})( /*#__PURE__*/React.createElement(Select$1, {
|
|
24781
|
-
className: "kts-invoice-operate-goods-list-table-tax-rate",
|
|
24782
|
-
showArrow: false,
|
|
24783
|
-
style: {
|
|
24784
|
-
width: '100%'
|
|
24785
|
-
},
|
|
24786
|
-
getPopupContainer: function getPopupContainer() {
|
|
24787
|
-
return rootElement || document.body;
|
|
24788
|
-
},
|
|
24789
|
-
onChange: function () {
|
|
24790
|
-
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
|
|
24791
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
24792
|
-
while (1) {
|
|
24793
|
-
switch (_context.prev = _context.next) {
|
|
24794
|
-
case 0:
|
|
24795
|
-
_context.next = 2;
|
|
24796
|
-
return controller.wait();
|
|
24797
|
-
|
|
24798
|
-
case 2:
|
|
24799
|
-
controller.setEditFreight({
|
|
24800
|
-
type: value
|
|
24801
|
-
});
|
|
24802
|
-
|
|
24803
|
-
case 3:
|
|
24804
|
-
case "end":
|
|
24805
|
-
return _context.stop();
|
|
24806
|
-
}
|
|
24807
|
-
}
|
|
24808
|
-
}, _callee);
|
|
24809
|
-
}));
|
|
24810
|
-
|
|
24811
|
-
function onChange(_x) {
|
|
24812
|
-
return _onChange.apply(this, arguments);
|
|
24813
|
-
}
|
|
24814
|
-
|
|
24815
|
-
return onChange;
|
|
24816
|
-
}()
|
|
24817
|
-
}, (record.vehicleList || vehicleTypeList).map(function (e, i) {
|
|
24818
|
-
return /*#__PURE__*/React.createElement(Select$1.Option, {
|
|
24819
|
-
key: i,
|
|
24820
|
-
value: e.value
|
|
24821
|
-
}, e.label);
|
|
24822
|
-
}))));
|
|
24823
|
-
} else {
|
|
24824
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
24825
|
-
style: {
|
|
24826
|
-
padding: '0 10px'
|
|
24827
|
-
}
|
|
24828
|
-
}, getVehicle(record.type));
|
|
24829
|
-
}
|
|
24830
|
-
}
|
|
24831
|
-
}, {
|
|
24832
|
-
title: /*#__PURE__*/React.createElement(TitleText$2, {
|
|
24833
|
-
required: true
|
|
24834
|
-
}, "\u8FD0\u8F93\u5DE5\u5177\u724C\u53F7"),
|
|
24835
|
-
key: 'licensePlate',
|
|
24836
|
-
width: 119,
|
|
24837
|
-
render: function render(_, record) {
|
|
24838
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('licensePlate') && model !== 'prefab') {
|
|
24839
|
-
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('licensePlate', {
|
|
24840
|
-
initialValue: editGood.licensePlate,
|
|
24841
|
-
rules: [{
|
|
24842
|
-
required: true,
|
|
24843
|
-
message: '请输入'
|
|
24844
|
-
}]
|
|
24845
|
-
})( /*#__PURE__*/React.createElement(MyInput$4, {
|
|
24846
|
-
maxLength: 200,
|
|
24847
|
-
onChange: function () {
|
|
24848
|
-
var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
24849
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
24850
|
-
while (1) {
|
|
24851
|
-
switch (_context2.prev = _context2.next) {
|
|
24852
|
-
case 0:
|
|
24853
|
-
_context2.next = 2;
|
|
24854
|
-
return controller.wait();
|
|
24855
|
-
|
|
24856
|
-
case 2:
|
|
24857
|
-
_context2.next = 4;
|
|
24858
|
-
return controller.setEditFreight({
|
|
24859
|
-
licensePlate: form.getFieldsValue().licensePlate
|
|
24860
|
-
});
|
|
24861
|
-
|
|
24862
|
-
case 4:
|
|
24863
|
-
case "end":
|
|
24864
|
-
return _context2.stop();
|
|
24865
|
-
}
|
|
24866
|
-
}
|
|
24867
|
-
}, _callee2);
|
|
24868
|
-
}));
|
|
24869
|
-
|
|
24870
|
-
function onChange() {
|
|
24871
|
-
return _onChange2.apply(this, arguments);
|
|
24872
|
-
}
|
|
24873
|
-
|
|
24874
|
-
return onChange;
|
|
24875
|
-
}()
|
|
24876
|
-
})));
|
|
24877
|
-
} else {
|
|
24878
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
24879
|
-
style: {
|
|
24880
|
-
padding: '0 10px'
|
|
24881
|
-
}
|
|
24882
|
-
}, record.licensePlate);
|
|
24883
|
-
}
|
|
24884
|
-
}
|
|
24885
|
-
}, {
|
|
24886
|
-
title: /*#__PURE__*/React.createElement(TitleText$2, {
|
|
24887
|
-
required: true
|
|
24888
|
-
}, "\u8D77\u8FD0\u5730"),
|
|
24889
|
-
key: 'origin',
|
|
24890
|
-
width: 150,
|
|
24891
|
-
render: function render(_, record) {
|
|
24892
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('origin') && model !== 'prefab') {
|
|
24893
|
-
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('origin', {
|
|
24894
|
-
initialValue: editGood.origin,
|
|
24895
|
-
rules: [{
|
|
24896
|
-
required: true,
|
|
24897
|
-
message: '请输入'
|
|
24898
|
-
}]
|
|
24899
|
-
})( /*#__PURE__*/React.createElement(Cascader$1, {
|
|
24900
|
-
style: {
|
|
24901
|
-
width: '100%'
|
|
24902
|
-
},
|
|
24903
|
-
options: area,
|
|
24904
|
-
fieldNames: addressFieldNames,
|
|
24905
|
-
onChange: function () {
|
|
24906
|
-
var _onChange3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(value) {
|
|
24907
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
24908
|
-
while (1) {
|
|
24909
|
-
switch (_context3.prev = _context3.next) {
|
|
24910
|
-
case 0:
|
|
24911
|
-
_context3.next = 2;
|
|
24912
|
-
return controller.setEditFreight({
|
|
24913
|
-
origin: value
|
|
24914
|
-
});
|
|
24915
|
-
|
|
24916
|
-
case 2:
|
|
24917
|
-
case "end":
|
|
24918
|
-
return _context3.stop();
|
|
24919
|
-
}
|
|
24920
|
-
}
|
|
24921
|
-
}, _callee3);
|
|
24922
|
-
}));
|
|
24923
|
-
|
|
24924
|
-
function onChange(_x2) {
|
|
24925
|
-
return _onChange3.apply(this, arguments);
|
|
24926
|
-
}
|
|
24927
|
-
|
|
24928
|
-
return onChange;
|
|
24929
|
-
}()
|
|
24930
|
-
})));
|
|
24931
|
-
} else {
|
|
24932
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
24933
|
-
style: {
|
|
24934
|
-
padding: '0 10px'
|
|
24935
|
-
}
|
|
24936
|
-
}, record.origin);
|
|
24937
|
-
}
|
|
24938
|
-
}
|
|
24939
|
-
}, {
|
|
24940
|
-
title: /*#__PURE__*/React.createElement(TitleText$2, {
|
|
24941
|
-
required: true
|
|
24942
|
-
}, "\u5230\u8FBE\u5730"),
|
|
24943
|
-
dataIndex: 'destination',
|
|
24944
|
-
key: 'destination',
|
|
24945
|
-
width: 149,
|
|
24946
|
-
render: function render(_, record) {
|
|
24947
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('destination') && model !== 'prefab') {
|
|
24948
|
-
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('destination', {
|
|
24949
|
-
initialValue: editGood.destination,
|
|
24950
|
-
rules: [{
|
|
24951
|
-
required: true,
|
|
24952
|
-
message: '请输入'
|
|
24953
|
-
}]
|
|
24954
|
-
})( /*#__PURE__*/React.createElement(Cascader$1, {
|
|
24955
|
-
options: area,
|
|
24956
|
-
fieldNames: addressFieldNames,
|
|
24957
|
-
style: {
|
|
24958
|
-
width: '100%'
|
|
24959
|
-
},
|
|
24960
|
-
onChange: function () {
|
|
24961
|
-
var _onChange4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(value) {
|
|
24962
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
24963
|
-
while (1) {
|
|
24964
|
-
switch (_context4.prev = _context4.next) {
|
|
24965
|
-
case 0:
|
|
24966
|
-
_context4.next = 2;
|
|
24967
|
-
return controller.setEditFreight({
|
|
24968
|
-
destination: value
|
|
24969
|
-
});
|
|
24970
|
-
|
|
24971
|
-
case 2:
|
|
24972
|
-
case "end":
|
|
24973
|
-
return _context4.stop();
|
|
24974
|
-
}
|
|
24975
|
-
}
|
|
24976
|
-
}, _callee4);
|
|
24977
|
-
}));
|
|
24978
|
-
|
|
24979
|
-
function onChange(_x3) {
|
|
24980
|
-
return _onChange4.apply(this, arguments);
|
|
24981
|
-
}
|
|
24982
|
-
|
|
24983
|
-
return onChange;
|
|
24984
|
-
}()
|
|
24985
|
-
})));
|
|
24986
|
-
} else {
|
|
24987
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
24988
|
-
style: {
|
|
24989
|
-
padding: '0 10px'
|
|
24990
|
-
}
|
|
24991
|
-
}, record.destination);
|
|
24992
|
-
}
|
|
24993
|
-
}
|
|
24994
|
-
}, {
|
|
24995
|
-
title: /*#__PURE__*/React.createElement(TitleText$2, {
|
|
24996
|
-
required: true
|
|
24997
|
-
}, "\u8FD0\u8F93\u8D27\u7269\u540D\u79F0"),
|
|
24998
|
-
dataIndex: 'itemName',
|
|
24999
|
-
key: 'itemName',
|
|
25000
|
-
width: 149,
|
|
25001
|
-
render: function render(_, record) {
|
|
25002
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('itemName') && model !== 'prefab') {
|
|
25003
|
-
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('itemName', {
|
|
25004
|
-
initialValue: editGood.itemName,
|
|
25005
|
-
rules: [{
|
|
25006
|
-
required: true,
|
|
25007
|
-
message: '请输入货物名称'
|
|
25008
|
-
}]
|
|
25009
|
-
})( /*#__PURE__*/React.createElement(MyInput$4, {
|
|
25010
|
-
maxLength: 200,
|
|
25011
|
-
onChange: function () {
|
|
25012
|
-
var _onChange5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
25013
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
25014
|
-
while (1) {
|
|
25015
|
-
switch (_context5.prev = _context5.next) {
|
|
25016
|
-
case 0:
|
|
25017
|
-
_context5.next = 2;
|
|
25018
|
-
return controller.wait();
|
|
25019
|
-
|
|
25020
|
-
case 2:
|
|
25021
|
-
_context5.next = 4;
|
|
25022
|
-
return controller.setEditFreight({
|
|
25023
|
-
itemName: form.getFieldsValue().itemName
|
|
25024
|
-
});
|
|
25025
|
-
|
|
25026
|
-
case 4:
|
|
25027
|
-
case "end":
|
|
25028
|
-
return _context5.stop();
|
|
25029
|
-
}
|
|
25030
|
-
}
|
|
25031
|
-
}, _callee5);
|
|
25032
|
-
}));
|
|
25033
|
-
|
|
25034
|
-
function onChange() {
|
|
25035
|
-
return _onChange5.apply(this, arguments);
|
|
25036
|
-
}
|
|
25037
|
-
|
|
25038
|
-
return onChange;
|
|
25039
|
-
}()
|
|
25040
|
-
})));
|
|
25041
|
-
} else {
|
|
25042
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
25043
|
-
style: {
|
|
25044
|
-
padding: '0 10px'
|
|
25045
|
-
}
|
|
25046
|
-
}, record.itemName);
|
|
25047
|
-
}
|
|
25048
|
-
}
|
|
25049
|
-
}] // 只读
|
|
25050
|
-
.filter(function (e) {
|
|
25051
|
-
if (model === 'readOnly') {
|
|
25052
|
-
return e.key !== 'operating';
|
|
25053
|
-
} else {
|
|
25054
|
-
return true;
|
|
25055
|
-
}
|
|
25056
|
-
}).map(function (e) {
|
|
25057
|
-
return _objectSpread2(_objectSpread2({}, e), {}, {
|
|
25058
|
-
ellipsis: true
|
|
25059
|
-
});
|
|
25060
|
-
});
|
|
25061
|
-
}, [editGood, controller, model, getVehicle]);
|
|
25062
|
-
return columns;
|
|
25063
|
-
});
|
|
25064
|
-
|
|
25065
|
-
var MyInput$4 = /*#__PURE__*/function (_React$Component) {
|
|
25066
|
-
_inherits(MyInput, _React$Component);
|
|
25067
|
-
|
|
25068
|
-
var _super = _createSuper(MyInput);
|
|
25069
|
-
|
|
25070
|
-
function MyInput() {
|
|
25071
|
-
_classCallCheck(this, MyInput);
|
|
25072
|
-
|
|
25073
|
-
return _super.apply(this, arguments);
|
|
25074
|
-
}
|
|
25075
|
-
|
|
25076
|
-
_createClass(MyInput, [{
|
|
25077
|
-
key: "render",
|
|
25078
|
-
value: function render() {
|
|
25079
|
-
if (this.props.loading) {
|
|
25080
|
-
return /*#__PURE__*/React.createElement(Spin$1, {
|
|
25081
|
-
size: "small"
|
|
25082
|
-
}, /*#__PURE__*/React.createElement(Input$1, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
25083
|
-
autoComplete: "off"
|
|
25084
|
-
})));
|
|
25085
|
-
} else {
|
|
25086
|
-
return /*#__PURE__*/React.createElement(Input$1, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
25087
|
-
autoComplete: "off"
|
|
25088
|
-
}));
|
|
25089
|
-
}
|
|
25090
|
-
}
|
|
25091
|
-
}]);
|
|
25092
|
-
|
|
25093
|
-
return MyInput;
|
|
25094
|
-
}(React.Component);
|
|
25095
|
-
|
|
25096
|
-
var useOnRow$2 = (function () {
|
|
25097
|
-
/** 控制器 */
|
|
25098
|
-
var controller = Invoice.useInvoiceController();
|
|
25099
|
-
var model = controller.useMemo(function (s) {
|
|
25100
|
-
return s.model;
|
|
25101
|
-
}, []);
|
|
25102
|
-
var onClick = React.useCallback( /*#__PURE__*/function () {
|
|
25103
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
|
|
25104
|
-
var editGood;
|
|
25105
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
25106
|
-
while (1) {
|
|
25107
|
-
switch (_context2.prev = _context2.next) {
|
|
25108
|
-
case 0:
|
|
25109
|
-
if (!(model === 'readOnly')) {
|
|
25110
|
-
_context2.next = 2;
|
|
25111
|
-
break;
|
|
25112
|
-
}
|
|
25113
|
-
|
|
25114
|
-
return _context2.abrupt("return");
|
|
25115
|
-
|
|
25116
|
-
case 2:
|
|
25117
|
-
editGood = controller.state.freightListState.editGood;
|
|
25118
|
-
|
|
25119
|
-
if (!editGood) {
|
|
25120
|
-
_context2.next = 14;
|
|
25121
|
-
break;
|
|
25122
|
-
}
|
|
25123
|
-
|
|
25124
|
-
if (!(editGood.$index === record.$index)) {
|
|
25125
|
-
_context2.next = 6;
|
|
25126
|
-
break;
|
|
25127
|
-
}
|
|
25128
|
-
|
|
25129
|
-
return _context2.abrupt("return");
|
|
25130
|
-
|
|
25131
|
-
case 6:
|
|
25132
|
-
_context2.next = 8;
|
|
25133
|
-
return controller.saveEditFreight();
|
|
25134
|
-
|
|
25135
|
-
case 8:
|
|
25136
|
-
_context2.next = 10;
|
|
25137
|
-
return controller.wait();
|
|
25138
|
-
|
|
25139
|
-
case 10:
|
|
25140
|
-
_context2.next = 12;
|
|
25141
|
-
return controller.pipeline( /*#__PURE__*/function () {
|
|
25142
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
25143
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25144
|
-
while (1) {
|
|
25145
|
-
switch (_context.prev = _context.next) {
|
|
25146
|
-
case 0:
|
|
25147
|
-
_context.t0 = s.freightListState.editGood;
|
|
25148
|
-
|
|
25149
|
-
if (_context.t0) {
|
|
25150
|
-
_context.next = 4;
|
|
25151
|
-
break;
|
|
25152
|
-
}
|
|
25153
|
-
|
|
25154
|
-
_context.next = 4;
|
|
25155
|
-
return controller.setEditFreight(record);
|
|
25156
|
-
|
|
25157
|
-
case 4:
|
|
25158
|
-
case "end":
|
|
25159
|
-
return _context.stop();
|
|
25160
|
-
}
|
|
25161
|
-
}
|
|
25162
|
-
}, _callee);
|
|
25163
|
-
}));
|
|
25164
|
-
|
|
25165
|
-
return function (_x2) {
|
|
25166
|
-
return _ref2.apply(this, arguments);
|
|
25167
|
-
};
|
|
25168
|
-
}())();
|
|
25169
|
-
|
|
25170
|
-
case 12:
|
|
25171
|
-
_context2.next = 16;
|
|
25172
|
-
break;
|
|
25173
|
-
|
|
25174
|
-
case 14:
|
|
25175
|
-
_context2.next = 16;
|
|
25176
|
-
return controller.setEditFreight(record);
|
|
25177
|
-
|
|
25178
|
-
case 16:
|
|
25179
|
-
case "end":
|
|
25180
|
-
return _context2.stop();
|
|
25181
|
-
}
|
|
25182
|
-
}
|
|
25183
|
-
}, _callee2);
|
|
25184
|
-
}));
|
|
25185
|
-
|
|
25186
|
-
return function (_x) {
|
|
25187
|
-
return _ref.apply(this, arguments);
|
|
25188
|
-
};
|
|
25189
|
-
}(), [controller, model]);
|
|
25190
|
-
return {
|
|
25191
|
-
onClick: onClick
|
|
25192
|
-
};
|
|
25193
|
-
});
|
|
25194
|
-
|
|
25195
|
-
/**
|
|
25196
|
-
* 点击组件外部 保存正在编辑的货物
|
|
25197
|
-
*/
|
|
25198
|
-
/**
|
|
25199
|
-
* 点击组件外部 保存正在编辑的货物
|
|
25200
|
-
*/
|
|
25201
|
-
|
|
25202
|
-
function useWindowClick$2(controller) {
|
|
25203
|
-
/** 点击组件外部 保存正在编辑的货物 */
|
|
25204
|
-
React.useEffect(function () {
|
|
25205
|
-
var click = function click() {
|
|
25206
|
-
setTimeout(controller.saveEditFreight);
|
|
25207
|
-
};
|
|
25208
|
-
|
|
25209
|
-
window.addEventListener('click', click);
|
|
25210
|
-
return function () {
|
|
25211
|
-
window.removeEventListener('click', click);
|
|
25212
|
-
};
|
|
25213
|
-
}, [controller]);
|
|
25214
|
-
}
|
|
25215
|
-
|
|
25216
|
-
var useRowSelection$2 = (function () {
|
|
25217
|
-
/** 控制器 */
|
|
25218
|
-
var controller = Invoice.useInvoiceController();
|
|
25219
|
-
/** 列表选中的货物索引列表 */
|
|
25220
|
-
|
|
25221
|
-
var selectedRowKeys = controller.useMemo(function (s) {
|
|
25222
|
-
return s.freightListState.selectedGoodIndex;
|
|
25223
|
-
}, []);
|
|
25224
|
-
/** 货物列表 */
|
|
25225
|
-
|
|
25226
|
-
var goodsList = controller.useMemo(function (s) {
|
|
25227
|
-
return s.freightListState.goodsList;
|
|
25228
|
-
}, []);
|
|
25229
|
-
/** 组件模式 */
|
|
25230
|
-
|
|
25231
|
-
var model = controller.useMemo(function (s) {
|
|
25232
|
-
return s.model;
|
|
25233
|
-
}, []);
|
|
25234
|
-
/** 搜索条件 */
|
|
25235
|
-
// const searchValue = controller.useMemo(s => s.goodsListState.searchValue, []);
|
|
25236
|
-
|
|
25237
|
-
/** 是否显示选择框 */
|
|
25238
|
-
|
|
25239
|
-
var isShow = React.useMemo(function () {
|
|
25240
|
-
if (model === 'readOnly') return false;
|
|
25241
|
-
return true;
|
|
25242
|
-
}, [model]);
|
|
25243
|
-
/** 是否全选 */
|
|
25244
|
-
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
25245
|
-
|
|
25246
|
-
var isAll = controller.useMemo(function (s) {
|
|
25247
|
-
if (s.freightListState.selectedGoodIndex.length <= 0) return false;
|
|
25248
|
-
var seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
|
|
25249
|
-
return e.$index;
|
|
25250
|
-
});
|
|
25251
|
-
var selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
|
|
25252
|
-
return seeGoodsIndex.some(function (t) {
|
|
25253
|
-
return e === t;
|
|
25254
|
-
});
|
|
25255
|
-
});
|
|
25256
|
-
return selectedGoodIndex.length === seeGoodsIndex.length;
|
|
25257
|
-
}, []);
|
|
25258
|
-
var indeterminate = controller.useMemo(function (s) {
|
|
25259
|
-
var seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
|
|
25260
|
-
return e.$index;
|
|
25261
|
-
});
|
|
25262
|
-
var selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
|
|
25263
|
-
return seeGoodsIndex.some(function (t) {
|
|
25264
|
-
return e === t;
|
|
25265
|
-
});
|
|
25266
|
-
});
|
|
25267
|
-
if (selectedGoodIndex.length === 0) return false;
|
|
25268
|
-
return selectedGoodIndex.length < seeGoodsIndex.length;
|
|
25269
|
-
}, []);
|
|
25270
|
-
/** 点击了全选 */
|
|
25271
|
-
|
|
25272
|
-
var onClickSelectAll = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
25273
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
25274
|
-
while (1) {
|
|
25275
|
-
switch (_context3.prev = _context3.next) {
|
|
25276
|
-
case 0:
|
|
25277
|
-
if (!isAll) {
|
|
25278
|
-
_context3.next = 5;
|
|
25279
|
-
break;
|
|
25280
|
-
}
|
|
25281
|
-
|
|
25282
|
-
_context3.next = 3;
|
|
25283
|
-
return controller.pipeline( /*#__PURE__*/function () {
|
|
25284
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
25285
|
-
var seeGoodsIndex;
|
|
25286
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25287
|
-
while (1) {
|
|
25288
|
-
switch (_context.prev = _context.next) {
|
|
25289
|
-
case 0:
|
|
25290
|
-
seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
|
|
25291
|
-
return e.$index;
|
|
25292
|
-
});
|
|
25293
|
-
s.freightListState.selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
|
|
25294
|
-
return !seeGoodsIndex.some(function (t) {
|
|
25295
|
-
return e === t;
|
|
25296
|
-
});
|
|
25297
|
-
});
|
|
25298
|
-
|
|
25299
|
-
case 2:
|
|
25300
|
-
case "end":
|
|
25301
|
-
return _context.stop();
|
|
25302
|
-
}
|
|
25303
|
-
}
|
|
25304
|
-
}, _callee);
|
|
25305
|
-
}));
|
|
25306
|
-
|
|
25307
|
-
return function (_x) {
|
|
25308
|
-
return _ref2.apply(this, arguments);
|
|
25309
|
-
};
|
|
25310
|
-
}())();
|
|
25311
|
-
|
|
25312
|
-
case 3:
|
|
25313
|
-
_context3.next = 7;
|
|
25314
|
-
break;
|
|
25315
|
-
|
|
25316
|
-
case 5:
|
|
25317
|
-
_context3.next = 7;
|
|
25318
|
-
return controller.pipeline( /*#__PURE__*/function () {
|
|
25319
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
25320
|
-
var seeGoodsIndex;
|
|
25321
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
25322
|
-
while (1) {
|
|
25323
|
-
switch (_context2.prev = _context2.next) {
|
|
25324
|
-
case 0:
|
|
25325
|
-
seeGoodsIndex = s.freightListState.goodsList.map(function (e) {
|
|
25326
|
-
return e.$index;
|
|
25327
|
-
});
|
|
25328
|
-
s.freightListState.selectedGoodIndex = [].concat(_toConsumableArray(s.freightListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
|
|
25329
|
-
s.freightListState.selectedGoodIndex = Array.from(new Set(s.freightListState.selectedGoodIndex));
|
|
25330
|
-
|
|
25331
|
-
case 3:
|
|
25332
|
-
case "end":
|
|
25333
|
-
return _context2.stop();
|
|
25334
|
-
}
|
|
25335
|
-
}
|
|
25336
|
-
}, _callee2);
|
|
25337
|
-
}));
|
|
25338
|
-
|
|
25339
|
-
return function (_x2) {
|
|
25340
|
-
return _ref3.apply(this, arguments);
|
|
25341
|
-
};
|
|
25342
|
-
}())();
|
|
25343
|
-
|
|
25344
|
-
case 7:
|
|
25345
|
-
case "end":
|
|
25346
|
-
return _context3.stop();
|
|
25347
|
-
}
|
|
25348
|
-
}
|
|
25349
|
-
}, _callee3);
|
|
25350
|
-
})), [controller, isAll]);
|
|
25351
|
-
var onSelect = React.useCallback( /*#__PURE__*/function () {
|
|
25352
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
|
|
25353
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
25354
|
-
while (1) {
|
|
25355
|
-
switch (_context6.prev = _context6.next) {
|
|
25356
|
-
case 0:
|
|
25357
|
-
if (!selected) {
|
|
25358
|
-
_context6.next = 5;
|
|
25359
|
-
break;
|
|
25360
|
-
}
|
|
25361
|
-
|
|
25362
|
-
_context6.next = 3;
|
|
25363
|
-
return controller.pipeline( /*#__PURE__*/function () {
|
|
25364
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
25365
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
25366
|
-
while (1) {
|
|
25367
|
-
switch (_context4.prev = _context4.next) {
|
|
25368
|
-
case 0:
|
|
25369
|
-
s.freightListState.selectedGoodIndex = [].concat(_toConsumableArray(s.freightListState.selectedGoodIndex), [record.$index]);
|
|
25370
|
-
s.freightListState = _objectSpread2({}, s.freightListState);
|
|
25371
|
-
|
|
25372
|
-
case 2:
|
|
25373
|
-
case "end":
|
|
25374
|
-
return _context4.stop();
|
|
25375
|
-
}
|
|
25376
|
-
}
|
|
25377
|
-
}, _callee4);
|
|
25378
|
-
}));
|
|
25379
|
-
|
|
25380
|
-
return function (_x5) {
|
|
25381
|
-
return _ref5.apply(this, arguments);
|
|
25382
|
-
};
|
|
25383
|
-
}())();
|
|
25384
|
-
|
|
25385
|
-
case 3:
|
|
25386
|
-
_context6.next = 7;
|
|
25387
|
-
break;
|
|
25388
|
-
|
|
25389
|
-
case 5:
|
|
25390
|
-
_context6.next = 7;
|
|
25391
|
-
return controller.pipeline( /*#__PURE__*/function () {
|
|
25392
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
|
|
25393
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
25394
|
-
while (1) {
|
|
25395
|
-
switch (_context5.prev = _context5.next) {
|
|
25396
|
-
case 0:
|
|
25397
|
-
s.freightListState.selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
|
|
25398
|
-
return e !== record.$index;
|
|
25399
|
-
});
|
|
25400
|
-
s.freightListState = _objectSpread2({}, s.freightListState);
|
|
25401
|
-
|
|
25402
|
-
case 2:
|
|
25403
|
-
case "end":
|
|
25404
|
-
return _context5.stop();
|
|
25405
|
-
}
|
|
25406
|
-
}
|
|
25407
|
-
}, _callee5);
|
|
25408
|
-
}));
|
|
25409
|
-
|
|
25410
|
-
return function (_x6) {
|
|
25411
|
-
return _ref6.apply(this, arguments);
|
|
25412
|
-
};
|
|
25413
|
-
}())();
|
|
25414
|
-
|
|
25415
|
-
case 7:
|
|
25416
|
-
case "end":
|
|
25417
|
-
return _context6.stop();
|
|
25418
|
-
}
|
|
25419
|
-
}
|
|
25420
|
-
}, _callee6);
|
|
25421
|
-
}));
|
|
25422
|
-
|
|
25423
|
-
return function (_x3, _x4) {
|
|
25424
|
-
return _ref4.apply(this, arguments);
|
|
25425
|
-
};
|
|
25426
|
-
}(), [controller]);
|
|
25427
|
-
var columnTitle = React.useMemo(function () {
|
|
25428
|
-
return /*#__PURE__*/React.createElement(Checkbox, {
|
|
25429
|
-
onChange: onClickSelectAll,
|
|
25430
|
-
indeterminate: indeterminate,
|
|
25431
|
-
checked: isAll
|
|
25432
|
-
});
|
|
25433
|
-
}, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
|
|
25434
|
-
/** 选择了商品后 调整 折扣行 和 被折扣行 */
|
|
25435
|
-
|
|
25436
|
-
var sortOut = React.useCallback( /*#__PURE__*/function () {
|
|
25437
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
|
|
25438
|
-
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
25439
|
-
while (1) {
|
|
25440
|
-
switch (_context8.prev = _context8.next) {
|
|
25441
|
-
case 0:
|
|
25442
|
-
_context8.next = 2;
|
|
25443
|
-
return controller.wait();
|
|
25444
|
-
|
|
25445
|
-
case 2:
|
|
25446
|
-
_context8.next = 4;
|
|
25447
|
-
return controller.pipeline( /*#__PURE__*/function () {
|
|
25448
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
|
|
25449
|
-
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
25450
|
-
while (1) {
|
|
25451
|
-
switch (_context7.prev = _context7.next) {
|
|
25452
|
-
case 0:
|
|
25453
|
-
s.freightListState.selectedGoodIndex.forEach(function ($index) {
|
|
25454
|
-
var goods = s.freightListState.goodsMap.get($index);
|
|
25455
|
-
if (!goods) return; // 数组位置
|
|
25456
|
-
|
|
25457
|
-
var t = s.freightListState.goodsList.indexOf(goods); // goods.lineAttribute === LineAttributeType.折扣行 ? t : t++;
|
|
25458
|
-
|
|
25459
|
-
var i = s.goodsListState.goodsList[t].$index;
|
|
25460
|
-
|
|
25461
|
-
if (selected) {
|
|
25462
|
-
if (s.freightListState.selectedGoodIndex.indexOf(i) < 0) s.freightListState.selectedGoodIndex = [].concat(_toConsumableArray(s.freightListState.selectedGoodIndex), [i]);
|
|
25463
|
-
} else {
|
|
25464
|
-
if (s.freightListState.selectedGoodIndex.indexOf(i) < 0) s.freightListState.selectedGoodIndex = s.freightListState.selectedGoodIndex.filter(function (e) {
|
|
25465
|
-
return e !== $index;
|
|
25466
|
-
});
|
|
25467
|
-
}
|
|
25468
|
-
});
|
|
25469
|
-
|
|
25470
|
-
case 1:
|
|
25471
|
-
case "end":
|
|
25472
|
-
return _context7.stop();
|
|
25473
|
-
}
|
|
25474
|
-
}
|
|
25475
|
-
}, _callee7);
|
|
25476
|
-
}));
|
|
25477
|
-
|
|
25478
|
-
return function (_x8) {
|
|
25479
|
-
return _ref8.apply(this, arguments);
|
|
25480
|
-
};
|
|
25481
|
-
}())();
|
|
25482
|
-
|
|
25483
|
-
case 4:
|
|
25484
|
-
case "end":
|
|
25485
|
-
return _context8.stop();
|
|
25486
|
-
}
|
|
25487
|
-
}
|
|
25488
|
-
}, _callee8);
|
|
25489
|
-
}));
|
|
25490
|
-
|
|
25491
|
-
return function (_x7) {
|
|
25492
|
-
return _ref7.apply(this, arguments);
|
|
25493
|
-
};
|
|
25494
|
-
}(), [controller]); // React.useEffect(() => {
|
|
25495
|
-
// sortOut(true);
|
|
25496
|
-
// }, [sortOut, goodsList])
|
|
25497
|
-
|
|
25498
|
-
if (isShow === false) return undefined;
|
|
25499
|
-
return {
|
|
25500
|
-
columnWidth: 45,
|
|
25501
|
-
columnTitle: columnTitle,
|
|
25502
|
-
onSelect: onSelect,
|
|
25503
|
-
selectedRowKeys: selectedRowKeys
|
|
25504
|
-
};
|
|
25505
|
-
});
|
|
25506
|
-
|
|
25507
|
-
var useDelRowButton$2 = (function () {
|
|
25508
|
-
var controller = Invoice.useInvoiceController();
|
|
25509
|
-
var model = controller.useMemo(function (s) {
|
|
25510
|
-
return s.model;
|
|
25511
|
-
}, []);
|
|
25512
|
-
var isRemRow = controller.useMemo(function (s) {
|
|
25513
|
-
return s.freightListState.isRemRow;
|
|
25514
|
-
}, []);
|
|
25515
|
-
/** 是否禁用 */
|
|
25516
|
-
|
|
25517
|
-
var disabled = controller.useMemo(function (s) {
|
|
25518
|
-
if (s.freightListState.selectedGoodIndex.length <= 0) return true;
|
|
25519
|
-
return false;
|
|
25520
|
-
}, []);
|
|
25521
|
-
/** 点击了删除 */
|
|
25522
|
-
|
|
25523
|
-
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
25524
|
-
var selectedGoodIndex, i;
|
|
25525
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
25526
|
-
while (1) {
|
|
25527
|
-
switch (_context2.prev = _context2.next) {
|
|
25528
|
-
case 0:
|
|
25529
|
-
selectedGoodIndex = controller.state.freightListState.selectedGoodIndex.slice();
|
|
25530
|
-
i = 0;
|
|
25531
|
-
|
|
25532
|
-
case 2:
|
|
25533
|
-
if (!(i < selectedGoodIndex.length)) {
|
|
25534
|
-
_context2.next = 8;
|
|
25535
|
-
break;
|
|
25536
|
-
}
|
|
25537
|
-
|
|
25538
|
-
_context2.next = 5;
|
|
25539
|
-
return controller.delFreight(selectedGoodIndex[i]);
|
|
25540
|
-
|
|
25541
|
-
case 5:
|
|
25542
|
-
i++;
|
|
25543
|
-
_context2.next = 2;
|
|
25544
|
-
break;
|
|
25545
|
-
|
|
25546
|
-
case 8:
|
|
25547
|
-
_context2.next = 10;
|
|
25548
|
-
return controller.run( /*#__PURE__*/function () {
|
|
25549
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
25550
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25551
|
-
while (1) {
|
|
25552
|
-
switch (_context.prev = _context.next) {
|
|
25553
|
-
case 0:
|
|
25554
|
-
s.freightListState.selectedGoodIndex = [];
|
|
25555
|
-
|
|
25556
|
-
case 1:
|
|
25557
|
-
case "end":
|
|
25558
|
-
return _context.stop();
|
|
25559
|
-
}
|
|
25560
|
-
}
|
|
25561
|
-
}, _callee);
|
|
25562
|
-
}));
|
|
25563
|
-
|
|
25564
|
-
return function (_x) {
|
|
25565
|
-
return _ref2.apply(this, arguments);
|
|
25566
|
-
};
|
|
25567
|
-
}());
|
|
25568
|
-
|
|
25569
|
-
case 10:
|
|
25570
|
-
case "end":
|
|
25571
|
-
return _context2.stop();
|
|
25572
|
-
}
|
|
25573
|
-
}
|
|
25574
|
-
}, _callee2);
|
|
25575
|
-
})), []);
|
|
25576
|
-
var menuItem = React.useMemo(function () {
|
|
25577
|
-
if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
25578
|
-
if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
25579
|
-
return /*#__PURE__*/React.createElement(Menu$1.Item, {
|
|
25580
|
-
key: "1",
|
|
25581
|
-
onClick: onClick,
|
|
25582
|
-
disabled: disabled
|
|
25583
|
-
}, " \u5220\u9664\u884C ");
|
|
25584
|
-
}, [model, onClick, disabled]);
|
|
25585
|
-
var button = React.useMemo(function () {
|
|
25586
|
-
if (isRemRow === false) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
25587
|
-
if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
25588
|
-
if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
25589
|
-
return /*#__PURE__*/React.createElement(Button$1, {
|
|
25590
|
-
size: 'small',
|
|
25591
|
-
onClick: onClick,
|
|
25592
|
-
disabled: disabled
|
|
25593
|
-
}, "\u5220\u9664");
|
|
25594
|
-
}, [model, onClick, disabled, isRemRow]);
|
|
25595
|
-
return {
|
|
25596
|
-
button: button,
|
|
25597
|
-
menuItem: menuItem
|
|
25598
|
-
};
|
|
25599
|
-
});
|
|
25600
|
-
|
|
25601
|
-
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";
|
|
25602
|
-
styleInject(css_248z$v);
|
|
25603
|
-
|
|
25604
|
-
var FreightList = /*#__PURE__*/function (_React$Component) {
|
|
25605
|
-
_inherits(FreightList, _React$Component);
|
|
25606
|
-
|
|
25607
|
-
var _super = _createSuper(FreightList);
|
|
25608
|
-
|
|
25609
|
-
function FreightList() {
|
|
25610
|
-
_classCallCheck(this, FreightList);
|
|
25611
|
-
|
|
25612
|
-
return _super.apply(this, arguments);
|
|
25613
|
-
}
|
|
25614
|
-
|
|
25615
|
-
_createClass(FreightList, [{
|
|
25616
|
-
key: "render",
|
|
25617
|
-
value: function render() {
|
|
25618
|
-
return /*#__PURE__*/React.createElement(Main$4, _objectSpread2({}, this.props));
|
|
25619
|
-
}
|
|
25620
|
-
}]);
|
|
25621
|
-
|
|
25622
|
-
return FreightList;
|
|
25623
|
-
}(React.Component);
|
|
25624
|
-
var Main$4 = decorator(Form.create())(function (props) {
|
|
25625
|
-
var form = props.form;
|
|
25626
|
-
/** 控制器 */
|
|
25627
|
-
|
|
25628
|
-
var controller = Invoice.useInvoiceController();
|
|
25629
|
-
var goodsList = controller.useMemo(function (s) {
|
|
25630
|
-
return s.freightListState.goodsList;
|
|
25631
|
-
}, []);
|
|
25632
|
-
/** 货物列表 */
|
|
25633
|
-
|
|
25634
|
-
var dataSource = controller.useMemo(function (s) {
|
|
25635
|
-
return s.freightListState.goodsList;
|
|
25636
|
-
}, []);
|
|
25637
|
-
/** 表格行事件 */
|
|
25638
|
-
|
|
25639
|
-
var _onRow = useOnRow$2();
|
|
25640
|
-
/** 批量删除 */
|
|
25641
|
-
|
|
25642
|
-
|
|
25643
|
-
var delRowButton = useDelRowButton$2();
|
|
25644
|
-
useWindowClick$2(controller); // 点击组件外部 保存正在编辑的货物
|
|
25645
|
-
|
|
25646
|
-
/** 注册 from 对象 */
|
|
25647
|
-
|
|
25648
|
-
React.useEffect(function () {
|
|
25649
|
-
controller.pipeline( /*#__PURE__*/function () {
|
|
25650
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, form) {
|
|
25651
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25652
|
-
while (1) {
|
|
25653
|
-
switch (_context.prev = _context.next) {
|
|
25654
|
-
case 0:
|
|
25655
|
-
s.freightListState = _objectSpread2(_objectSpread2({}, s.freightListState), {}, {
|
|
25656
|
-
form: form
|
|
25657
|
-
});
|
|
25658
|
-
|
|
25659
|
-
case 1:
|
|
25660
|
-
case "end":
|
|
25661
|
-
return _context.stop();
|
|
25662
|
-
}
|
|
25663
|
-
}
|
|
25664
|
-
}, _callee);
|
|
25665
|
-
}));
|
|
25666
|
-
|
|
25667
|
-
return function (_x, _x2) {
|
|
25668
|
-
return _ref.apply(this, arguments);
|
|
25669
|
-
};
|
|
25670
|
-
}())(props.form);
|
|
25671
|
-
}, [controller, props.form]);
|
|
25672
|
-
React.useEffect(function () {
|
|
25673
|
-
controller.run( /*#__PURE__*/function () {
|
|
25674
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
25675
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
25676
|
-
while (1) {
|
|
25677
|
-
switch (_context2.prev = _context2.next) {
|
|
25678
|
-
case 0:
|
|
25679
|
-
s.freightListState.addressFieldNames = props.fieldNames;
|
|
25680
|
-
|
|
25681
|
-
case 1:
|
|
25682
|
-
case "end":
|
|
25683
|
-
return _context2.stop();
|
|
25684
|
-
}
|
|
25685
|
-
}
|
|
25686
|
-
}, _callee2);
|
|
25687
|
-
}));
|
|
25688
|
-
|
|
25689
|
-
return function (_x3) {
|
|
25690
|
-
return _ref2.apply(this, arguments);
|
|
25691
|
-
};
|
|
25692
|
-
}());
|
|
25693
|
-
}, [props.fieldNames]);
|
|
25694
|
-
React.useEffect(function () {
|
|
25695
|
-
controller.run( /*#__PURE__*/function () {
|
|
25696
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
25697
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
25698
|
-
while (1) {
|
|
25699
|
-
switch (_context3.prev = _context3.next) {
|
|
25700
|
-
case 0:
|
|
25701
|
-
s.freightListState.vehicleTypeList = props.vehicleTypeList;
|
|
25702
|
-
|
|
25703
|
-
case 1:
|
|
25704
|
-
case "end":
|
|
25705
|
-
return _context3.stop();
|
|
25706
|
-
}
|
|
25707
|
-
}
|
|
25708
|
-
}, _callee3);
|
|
25709
|
-
}));
|
|
25710
|
-
|
|
25711
|
-
return function (_x4) {
|
|
25712
|
-
return _ref3.apply(this, arguments);
|
|
25713
|
-
};
|
|
25714
|
-
}());
|
|
25715
|
-
}, [props.vehicleTypeList]);
|
|
25716
|
-
React.useEffect(function () {
|
|
25717
|
-
controller.run( /*#__PURE__*/function () {
|
|
25718
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
25719
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
25720
|
-
while (1) {
|
|
25721
|
-
switch (_context4.prev = _context4.next) {
|
|
25722
|
-
case 0:
|
|
25723
|
-
s.freightListState.area = props.addressOptions;
|
|
25724
|
-
|
|
25725
|
-
case 1:
|
|
25726
|
-
case "end":
|
|
25727
|
-
return _context4.stop();
|
|
25728
|
-
}
|
|
25729
|
-
}
|
|
25730
|
-
}, _callee4);
|
|
25731
|
-
}));
|
|
25732
|
-
|
|
25733
|
-
return function (_x5) {
|
|
25734
|
-
return _ref4.apply(this, arguments);
|
|
25735
|
-
};
|
|
25736
|
-
}());
|
|
25737
|
-
}, [props.addressOptions]); // 跟新 货物
|
|
25738
|
-
|
|
25739
|
-
React.useEffect(function () {
|
|
25740
|
-
controller.run( /*#__PURE__*/function () {
|
|
25741
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
|
|
25742
|
-
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
25743
|
-
while (1) {
|
|
25744
|
-
switch (_context5.prev = _context5.next) {
|
|
25745
|
-
case 0:
|
|
25746
|
-
s.freightListState.goodsMap = new Map();
|
|
25747
|
-
goodsList.forEach(function (e) {
|
|
25748
|
-
s.freightListState.goodsMap.set(e.$index, e);
|
|
25749
|
-
});
|
|
25750
|
-
|
|
25751
|
-
case 2:
|
|
25752
|
-
case "end":
|
|
25753
|
-
return _context5.stop();
|
|
25754
|
-
}
|
|
25755
|
-
}
|
|
25756
|
-
}, _callee5);
|
|
25757
|
-
}));
|
|
25758
|
-
|
|
25759
|
-
return function (_x6) {
|
|
25760
|
-
return _ref5.apply(this, arguments);
|
|
25761
|
-
};
|
|
25762
|
-
}());
|
|
25763
|
-
}, [controller, goodsList]);
|
|
25764
|
-
/** props 产品最大数 更新 */
|
|
25765
|
-
|
|
25766
|
-
React.useEffect(function () {
|
|
25767
|
-
controller.pipeline( /*#__PURE__*/function () {
|
|
25768
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(s) {
|
|
25769
|
-
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
25770
|
-
while (1) {
|
|
25771
|
-
switch (_context6.prev = _context6.next) {
|
|
25772
|
-
case 0:
|
|
25773
|
-
s.freightListState.goodMax = props.goodMax;
|
|
25774
|
-
|
|
25775
|
-
case 1:
|
|
25776
|
-
case "end":
|
|
25777
|
-
return _context6.stop();
|
|
25778
|
-
}
|
|
25779
|
-
}
|
|
25780
|
-
}, _callee6);
|
|
25781
|
-
}));
|
|
25782
|
-
|
|
25783
|
-
return function (_x7) {
|
|
25784
|
-
return _ref6.apply(this, arguments);
|
|
25785
|
-
};
|
|
25786
|
-
}())();
|
|
25787
|
-
}, [controller, props.goodMax]); // 注册 form
|
|
25788
|
-
// controller.useForm('freightInfo', form);
|
|
25789
|
-
|
|
25790
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
25791
|
-
className: "kts-invoice-operate-freight"
|
|
25792
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
25793
|
-
className: 'real-estate-info-digtal-label'
|
|
25794
|
-
}, "\u7279\u6B8A\u4FE1\u606F-\u5EFA\u7B51\u670D\u52A1"), /*#__PURE__*/React.createElement("div", {
|
|
25795
|
-
className: "kts-invoice-operate-goods-list-digtal",
|
|
25796
|
-
onClick: function onClick(e) {
|
|
25797
|
-
e.stopPropagation();
|
|
25798
|
-
}
|
|
25799
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
25800
|
-
className: "kts-invoice-operate-goods-list-able"
|
|
25801
|
-
}, /*#__PURE__*/React.createElement(AddRowButton$2, null), delRowButton.button, /*#__PURE__*/React.createElement("div", {
|
|
25802
|
-
style: {
|
|
25803
|
-
flex: 1
|
|
25804
|
-
}
|
|
25805
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
25806
|
-
className: classnames('kts-invoice-operate-goods-list-table-digtal')
|
|
25807
|
-
}, /*#__PURE__*/React.createElement(TableVirtual$2, {
|
|
25808
|
-
size: "small",
|
|
25809
|
-
rowKey: "$index",
|
|
25810
|
-
pagination: false,
|
|
25811
|
-
scroll: {
|
|
25812
|
-
y: 280
|
|
25813
|
-
},
|
|
25814
|
-
components: {
|
|
25815
|
-
body: {
|
|
25816
|
-
row: TableRow$2
|
|
25817
|
-
}
|
|
25818
|
-
},
|
|
25819
|
-
dataSource: dataSource,
|
|
25820
|
-
columns: useColumns$2(props.form),
|
|
25821
|
-
rowSelection: useRowSelection$2(),
|
|
25822
|
-
onRow: function onRow(record) {
|
|
25823
|
-
return {
|
|
25824
|
-
onClick: function onClick() {
|
|
25825
|
-
_onRow.onClick(record);
|
|
25826
|
-
}
|
|
25827
|
-
};
|
|
25828
|
-
}
|
|
25829
|
-
}))));
|
|
25830
|
-
});
|
|
25831
|
-
|
|
25832
|
-
var ImportBuyerDrawer = (function () {
|
|
25833
|
-
var controller = Invoice.useInvoiceController();
|
|
25834
|
-
var visible = controller.useMemo(function (s) {
|
|
25835
|
-
return s.buyerState.isVisibleDrawer;
|
|
23919
|
+
var visible = controller.useMemo(function (s) {
|
|
23920
|
+
return s.buyerState.isVisibleDrawer;
|
|
25836
23921
|
}, []);
|
|
25837
23922
|
var topExpand = controller.useMemo(function (s) {
|
|
25838
23923
|
return s.buyerState.topExpand;
|
|
@@ -26205,8 +24290,8 @@ var getItemCode = function getItemCode(record, editGood) {
|
|
|
26205
24290
|
return record.productCode;
|
|
26206
24291
|
};
|
|
26207
24292
|
|
|
26208
|
-
var css_248z$
|
|
26209
|
-
styleInject(css_248z$
|
|
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);
|
|
26210
24295
|
|
|
26211
24296
|
var TreeNode = Tree.TreeNode;
|
|
26212
24297
|
var confirm = Modal$1.confirm;
|
|
@@ -26846,14 +24931,15 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
26846
24931
|
// s.value = info.node.taxRate
|
|
26847
24932
|
// }
|
|
26848
24933
|
// });
|
|
24934
|
+
var node = info.node || info;
|
|
26849
24935
|
actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
|
|
26850
24936
|
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
|
|
26851
24937
|
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
26852
24938
|
while (1) {
|
|
26853
24939
|
switch (_context12.prev = _context12.next) {
|
|
26854
24940
|
case 0:
|
|
26855
|
-
if (
|
|
26856
|
-
s.value =
|
|
24941
|
+
if (node.taxCategoryCode) {
|
|
24942
|
+
s.value = node.taxCategoryCode;
|
|
26857
24943
|
}
|
|
26858
24944
|
|
|
26859
24945
|
case 1:
|
|
@@ -26874,8 +24960,8 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
26874
24960
|
while (1) {
|
|
26875
24961
|
switch (_context13.prev = _context13.next) {
|
|
26876
24962
|
case 0:
|
|
26877
|
-
if (
|
|
26878
|
-
s.value =
|
|
24963
|
+
if (node.shorthand) {
|
|
24964
|
+
s.value = node.shorthand;
|
|
26879
24965
|
}
|
|
26880
24966
|
|
|
26881
24967
|
case 1:
|
|
@@ -26893,24 +24979,26 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
26893
24979
|
setOpen(false);
|
|
26894
24980
|
}, [controller, actions]);
|
|
26895
24981
|
var onSelect = React.useCallback(function (key, info) {
|
|
24982
|
+
var node = info.node || info;
|
|
24983
|
+
|
|
26896
24984
|
if (controller.state.goodsListState.isUpdateGoodsTaxRateList) {
|
|
26897
|
-
var
|
|
24985
|
+
var _node$taxRateList;
|
|
26898
24986
|
|
|
26899
|
-
if ((
|
|
26900
|
-
setGoodsTaxRateList(
|
|
24987
|
+
if ((_node$taxRateList = node.taxRateList) === null || _node$taxRateList === void 0 ? void 0 : _node$taxRateList.length) {
|
|
24988
|
+
setGoodsTaxRateList(node.taxRateList);
|
|
26901
24989
|
}
|
|
26902
24990
|
|
|
26903
24991
|
if (!readOnlyTaxRate) {
|
|
26904
24992
|
actions.setFieldState('taxRate', /*#__PURE__*/function () {
|
|
26905
24993
|
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
|
|
26906
|
-
var
|
|
24994
|
+
var _node$taxRateList2;
|
|
26907
24995
|
|
|
26908
24996
|
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
26909
24997
|
while (1) {
|
|
26910
24998
|
switch (_context14.prev = _context14.next) {
|
|
26911
24999
|
case 0:
|
|
26912
|
-
if (
|
|
26913
|
-
s.value =
|
|
25000
|
+
if (node.taxRateList && ((_node$taxRateList2 = node.taxRateList) === null || _node$taxRateList2 === void 0 ? void 0 : _node$taxRateList2.length) === 1) {
|
|
25001
|
+
s.value = node.taxRateList[0];
|
|
26914
25002
|
} else {
|
|
26915
25003
|
s.value = undefined;
|
|
26916
25004
|
}
|
|
@@ -26979,6 +25067,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
26979
25067
|
onSubmit: onSubmit1,
|
|
26980
25068
|
onCancel: function onCancel() {
|
|
26981
25069
|
setOpen(false);
|
|
25070
|
+
setInfo({});
|
|
26982
25071
|
},
|
|
26983
25072
|
onSearch: onSearch,
|
|
26984
25073
|
onLoad: onLoad
|
|
@@ -27438,8 +25527,6 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
27438
25527
|
|
|
27439
25528
|
/** 特殊信息-不动产经营租赁服务(数电) */
|
|
27440
25529
|
|
|
27441
|
-
/** 特殊信息-建筑服务(数电) */
|
|
27442
|
-
|
|
27443
25530
|
/** 货物列表(数电) */
|
|
27444
25531
|
|
|
27445
25532
|
/** 货物索引生成器 */
|
|
@@ -27453,7 +25540,7 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
27453
25540
|
if (this.props.invoiceType === 'digtal') {
|
|
27454
25541
|
return /*#__PURE__*/React.createElement(Digtal, _objectSpread2({}, this.props));
|
|
27455
25542
|
} else {
|
|
27456
|
-
return /*#__PURE__*/React.createElement(Main$
|
|
25543
|
+
return /*#__PURE__*/React.createElement(Main$4, _objectSpread2({}, this.props));
|
|
27457
25544
|
}
|
|
27458
25545
|
}
|
|
27459
25546
|
}]);
|
|
@@ -27474,8 +25561,6 @@ Invoice.Stakeholder = Stakeholder$1;
|
|
|
27474
25561
|
Invoice.StakeFarmerholder = StakeFarmerholder;
|
|
27475
25562
|
Invoice.SignDigtal = SignDigtal;
|
|
27476
25563
|
Invoice.RealEstateInfo = RealEstateInfo;
|
|
27477
|
-
Invoice.Architecture = Architecture;
|
|
27478
|
-
Invoice.FreightList = FreightList;
|
|
27479
25564
|
Invoice.GoodsListDigtal = GoodsList$1;
|
|
27480
25565
|
Invoice.idGenerator = idGenerator;
|
|
27481
25566
|
Invoice.calculator = calculator;
|
|
@@ -27485,7 +25570,7 @@ Invoice.useInvoiceController = function () {
|
|
|
27485
25570
|
return React.useContext(InvoiceContext);
|
|
27486
25571
|
};
|
|
27487
25572
|
|
|
27488
|
-
var Main$
|
|
25573
|
+
var Main$4 = function Main(props) {
|
|
27489
25574
|
var controller = React.useMemo(function () {
|
|
27490
25575
|
return props.controller || new InvoiceController();
|
|
27491
25576
|
}, [props.controller]);
|
|
@@ -27593,11 +25678,11 @@ var Digtal = function Digtal(props) {
|
|
|
27593
25678
|
), /*#__PURE__*/React.createElement(ImportGoodsDrawer, null), /*#__PURE__*/React.createElement(EndowCodeDrawer, null));
|
|
27594
25679
|
};
|
|
27595
25680
|
|
|
27596
|
-
var css_248z$
|
|
27597
|
-
styleInject(css_248z$
|
|
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);
|
|
27598
25683
|
|
|
27599
25684
|
function TaxClassificationModal(props) {
|
|
27600
|
-
var _props$
|
|
25685
|
+
var _props$info6;
|
|
27601
25686
|
|
|
27602
25687
|
var _Form$useForm = Form$1.useForm(),
|
|
27603
25688
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
@@ -27669,7 +25754,6 @@ function TaxClassificationModal(props) {
|
|
|
27669
25754
|
return;
|
|
27670
25755
|
}
|
|
27671
25756
|
|
|
27672
|
-
props.onCancel && props.onCancel();
|
|
27673
25757
|
onChildrenDrawerClose();
|
|
27674
25758
|
props.onSubmit && props.onSubmit((_props$info = props.info) === null || _props$info === void 0 ? void 0 : _props$info.key, _objectSpread2(_objectSpread2({}, props.info), values));
|
|
27675
25759
|
}).catch(function (errorInfo) {
|
|
@@ -27677,6 +25761,16 @@ function TaxClassificationModal(props) {
|
|
|
27677
25761
|
});
|
|
27678
25762
|
};
|
|
27679
25763
|
|
|
25764
|
+
React.useEffect(function () {
|
|
25765
|
+
var _props$info2, _props$info3, _props$info4, _props$info5;
|
|
25766
|
+
|
|
25767
|
+
form.setFieldsValue(_objectSpread2(_objectSpread2({}, form.getFieldsValue()), {}, {
|
|
25768
|
+
taxCategoryCode: props === null || props === void 0 ? void 0 : (_props$info2 = props.info) === null || _props$info2 === void 0 ? void 0 : _props$info2.taxCategoryCode,
|
|
25769
|
+
productName: props === null || props === void 0 ? void 0 : (_props$info3 = props.info) === null || _props$info3 === void 0 ? void 0 : _props$info3.productName,
|
|
25770
|
+
shorthand: props === null || props === void 0 ? void 0 : (_props$info4 = props.info) === null || _props$info4 === void 0 ? void 0 : _props$info4.shorthand,
|
|
25771
|
+
taxDesc: props === null || props === void 0 ? void 0 : (_props$info5 = props.info) === null || _props$info5 === void 0 ? void 0 : _props$info5.taxDesc
|
|
25772
|
+
}));
|
|
25773
|
+
}, [props === null || props === void 0 ? void 0 : (_props$info6 = props.info) === null || _props$info6 === void 0 ? void 0 : _props$info6.key]);
|
|
27680
25774
|
return /*#__PURE__*/React.createElement(Drawer$1, {
|
|
27681
25775
|
title: "\u5546\u54C1\u548C\u670D\u52A1\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
27682
25776
|
placement: "right",
|
|
@@ -27722,16 +25816,10 @@ function TaxClassificationModal(props) {
|
|
|
27722
25816
|
}))), /*#__PURE__*/React.createElement(Card, {
|
|
27723
25817
|
className: "taxrightbox"
|
|
27724
25818
|
}, /*#__PURE__*/React.createElement(Form$1, _objectSpread2(_objectSpread2({
|
|
27725
|
-
form: form
|
|
27726
|
-
key: props === null || props === void 0 ? void 0 : (_props$info2 = props.info) === null || _props$info2 === void 0 ? void 0 : _props$info2.key
|
|
25819
|
+
form: form
|
|
27727
25820
|
}, layout), {}, {
|
|
27728
25821
|
initialValues: props.info
|
|
27729
25822
|
}), /*#__PURE__*/React.createElement(Form$1.Item, {
|
|
27730
|
-
rules: [{
|
|
27731
|
-
required: true,
|
|
27732
|
-
message: '请勾选税收分类编码'
|
|
27733
|
-
}],
|
|
27734
|
-
initialValue: (_props$info3 = props.info) === null || _props$info3 === void 0 ? void 0 : _props$info3.taxCategoryCode,
|
|
27735
25823
|
name: "taxCategoryCode",
|
|
27736
25824
|
label: "\u7F16\u7801"
|
|
27737
25825
|
}, /*#__PURE__*/React.createElement(FormReadOnly, null)), /*#__PURE__*/React.createElement(Form$1.Item, {
|
|
@@ -27741,7 +25829,8 @@ function TaxClassificationModal(props) {
|
|
|
27741
25829
|
name: "shorthand",
|
|
27742
25830
|
label: "\u7B80\u79F0"
|
|
27743
25831
|
}, /*#__PURE__*/React.createElement(FormReadOnly, null)), /*#__PURE__*/React.createElement(Form$1.Item, {
|
|
27744
|
-
name: "
|
|
25832
|
+
name: "taxDesc",
|
|
25833
|
+
className: "taxdesc",
|
|
27745
25834
|
label: "\u8BF4\u660E"
|
|
27746
25835
|
}, /*#__PURE__*/React.createElement(FormReadOnly, null))))));
|
|
27747
25836
|
}
|