kts-component-invoice-operate 2.0.0 → 2.0.3
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/GoodsListState/IGood/index.d.ts +10 -12
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.d.ts +0 -2
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +2 -0
- package/dist/Invoice/InvoiceController/fns/getGoodsSearch.d.ts +2 -0
- package/dist/Invoice/InvoiceController/index.d.ts +3 -0
- package/dist/Invoice/ui/AddComparisonDrawer/index.d.ts +2 -3
- package/dist/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.d.ts +5 -2
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +5 -0
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +5 -0
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +5 -0
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/index.d.ts +2 -0
- package/dist/Invoice/ui/GoodsList/ui/Search/index.d.ts +3 -0
- package/dist/index.esm.js +820 -595
- package/dist/index.js +819 -594
- package/docs-dist/404.html +1 -1
- package/docs-dist/index.html +1 -1
- package/docs-dist/static/magnifier.2b26be6e.svg +1 -0
- package/docs-dist/umi.css +21 -20
- package/docs-dist/umi.js +1 -1
- package/package.json +5 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +10 -13
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +3 -0
- package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +17 -0
- package/src/Invoice/InvoiceController/index.ts +4 -0
- package/src/Invoice/tools/itemName/index.ts +0 -1
- package/src/Invoice/ui/AddComparisonDrawer/index.tsx +98 -142
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +1 -1
- package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +5 -4
- package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +61 -15
- package/src/Invoice/ui/GoodsList/hook/useRowSelection/index.tsx +34 -8
- package/src/Invoice/ui/GoodsList/index.less +10 -2
- package/src/Invoice/ui/GoodsList/index.tsx +17 -21
- package/src/Invoice/ui/GoodsList/ui/AddRowButton/index.tsx +5 -2
- package/src/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.less +0 -0
- package/src/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.tsx +20 -17
- package/src/Invoice/ui/GoodsList/ui/{CommodityComparisonButton → BulkMenu/hooks/useCommodityComparisonButton}/index.tsx +23 -22
- package/src/Invoice/ui/GoodsList/ui/{DelRowButton → BulkMenu/hooks/useDelRowButton}/index.tsx +15 -7
- package/src/Invoice/ui/GoodsList/ui/{EndowCodeButton → BulkMenu/hooks/useEndowCodeButton}/index.tsx +13 -9
- package/src/Invoice/ui/GoodsList/ui/BulkMenu/index.tsx +43 -0
- package/src/Invoice/ui/GoodsList/ui/Search/icon/magnifier.svg +1 -0
- package/src/Invoice/ui/GoodsList/ui/Search/index.less +10 -0
- package/src/Invoice/ui/GoodsList/ui/Search/index.tsx +47 -0
- package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +10 -10
- package/yarn.e.lock +14331 -0
- package/dist/Invoice/ui/GoodsList/ui/CommodityComparisonButton/index.d.ts +0 -3
- package/dist/Invoice/ui/GoodsList/ui/DelRowButton/index.d.ts +0 -3
- package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +0 -3
package/dist/index.esm.js
CHANGED
|
@@ -2,11 +2,12 @@ import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
|
|
|
2
2
|
import React, { createElement } from 'react';
|
|
3
3
|
import GreyReactBox, { decorator } from 'grey-react-box';
|
|
4
4
|
import { chain as chain$1, bignumber, create, all } from 'mathjs';
|
|
5
|
-
import { message, Form, Input, Icon, Tag, Select, Row, Col, Table, Button, Switch, Tooltip, Typography, Drawer,
|
|
5
|
+
import { message, Form, Input, Icon, Tag, Select, Row, Col, Table, Button, Switch, Tooltip, Menu, Typography, Drawer, Dropdown, AutoComplete, Spin, Checkbox, Descriptions, Empty, Divider, Popover, Tree, Modal } from 'kts-components-antd-x3';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
7
|
import classnames from 'classnames';
|
|
8
8
|
import { Input as Input$1, NumberPicker } from '@formily/antd-components';
|
|
9
9
|
import { createAsyncFormActions, FormEffectHooks, SchemaForm, FormButtonGroup, SchemaMarkupField } from '@formily/antd';
|
|
10
|
+
import { Form as Form$1, Drawer as Drawer$1 } from 'kts-xui';
|
|
10
11
|
|
|
11
12
|
function ownKeys(object, enumerableOnly) {
|
|
12
13
|
var keys = Object.keys(object);
|
|
@@ -976,7 +977,6 @@ var ProductComparison = /*#__PURE__*/_createClass(function ProductComparison() {
|
|
|
976
977
|
_classCallCheck(this, ProductComparison);
|
|
977
978
|
|
|
978
979
|
this.onComply = void 0;
|
|
979
|
-
this.onUpdateComparisonTable = void 0;
|
|
980
980
|
});
|
|
981
981
|
|
|
982
982
|
var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
@@ -993,6 +993,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
993
993
|
this.unitList = [];
|
|
994
994
|
this.defaultRate = 3;
|
|
995
995
|
this.taxRateList = [0, 3, 5, 6, 9, 13];
|
|
996
|
+
this.searchValue = '';
|
|
996
997
|
this.goodsList = [];
|
|
997
998
|
this.goodsMap = new Map();
|
|
998
999
|
this.goodsMenuExpand = [];
|
|
@@ -1519,6 +1520,23 @@ var validateFields = function validateFields(form) {
|
|
|
1519
1520
|
});
|
|
1520
1521
|
};
|
|
1521
1522
|
|
|
1523
|
+
function getGoodsSearch(goodsList, search) {
|
|
1524
|
+
if (!search) return goodsList;
|
|
1525
|
+
return goodsList.filter(function (e) {
|
|
1526
|
+
var _e$itemName$indexOf, _e$itemName, _e$itemModelName$inde, _e$itemModelName;
|
|
1527
|
+
|
|
1528
|
+
if (((_e$itemName$indexOf = (_e$itemName = e.itemName) === null || _e$itemName === void 0 ? void 0 : _e$itemName.indexOf(search)) !== null && _e$itemName$indexOf !== void 0 ? _e$itemName$indexOf : -1) >= 0) {
|
|
1529
|
+
return true;
|
|
1530
|
+
} else if (((_e$itemModelName$inde = (_e$itemModelName = e.itemModelName) === null || _e$itemModelName === void 0 ? void 0 : _e$itemModelName.indexOf(search)) !== null && _e$itemModelName$inde !== void 0 ? _e$itemModelName$inde : -1) >= 0) {
|
|
1531
|
+
return true;
|
|
1532
|
+
} else if ("".concat(e.lineAmountIncludeTax).indexOf(search) >= 0) {
|
|
1533
|
+
return true;
|
|
1534
|
+
} else {
|
|
1535
|
+
return false;
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1522
1540
|
var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
1523
1541
|
_inherits(InvoiceController, _InvoiceControllerFor);
|
|
1524
1542
|
|
|
@@ -1542,6 +1560,7 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
|
1542
1560
|
_this.addGoodDiscount = _this.pipeline(addGoodDiscount);
|
|
1543
1561
|
_this.getGoodsList = void 0;
|
|
1544
1562
|
_this.getTaxCategoryCodeList = void 0;
|
|
1563
|
+
_this.getGoodsSearch = getGoodsSearch;
|
|
1545
1564
|
return _this;
|
|
1546
1565
|
} // ----------------- 发票头 模块相关 -----------------
|
|
1547
1566
|
|
|
@@ -1622,7 +1641,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1622
1641
|
render: function render(form) {
|
|
1623
1642
|
return form.getFieldDecorator('code', {
|
|
1624
1643
|
initialValue: props.defaultCode
|
|
1625
|
-
})(
|
|
1644
|
+
})(React.createElement(FormSpanString, null));
|
|
1626
1645
|
}
|
|
1627
1646
|
});
|
|
1628
1647
|
}
|
|
@@ -1635,7 +1654,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1635
1654
|
render: function render(form) {
|
|
1636
1655
|
return form.getFieldDecorator('no', {
|
|
1637
1656
|
initialValue: props.defaultNo
|
|
1638
|
-
})(
|
|
1657
|
+
})(React.createElement(FormSpanString, null));
|
|
1639
1658
|
}
|
|
1640
1659
|
});
|
|
1641
1660
|
}
|
|
@@ -1646,7 +1665,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1646
1665
|
render: function render(form) {
|
|
1647
1666
|
return form.getFieldDecorator('invoicingDate', {
|
|
1648
1667
|
initialValue: props.defaultInvoicingDate
|
|
1649
|
-
})(
|
|
1668
|
+
})(React.createElement(FormSpanString, null));
|
|
1650
1669
|
}
|
|
1651
1670
|
});
|
|
1652
1671
|
}
|
|
@@ -1657,7 +1676,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1657
1676
|
render: function render(form) {
|
|
1658
1677
|
return form.getFieldDecorator('defaultValidationCode', {
|
|
1659
1678
|
initialValue: props.defaultValidationCode
|
|
1660
|
-
})(
|
|
1679
|
+
})(React.createElement(FormSpanString, null));
|
|
1661
1680
|
}
|
|
1662
1681
|
});
|
|
1663
1682
|
}
|
|
@@ -1677,21 +1696,21 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1677
1696
|
React.useEffect(function () {
|
|
1678
1697
|
setTypeIndex(props.typeOptionIndex || 0);
|
|
1679
1698
|
}, [props.typeOption]);
|
|
1680
|
-
return
|
|
1699
|
+
return React.createElement("div", {
|
|
1681
1700
|
className: "kts-invoice-operate-invoice-header"
|
|
1682
|
-
},
|
|
1701
|
+
}, React.createElement("div", {
|
|
1683
1702
|
className: "invoice-header-title"
|
|
1684
|
-
}, title),
|
|
1703
|
+
}, title), React.createElement("div", {
|
|
1685
1704
|
className: "invoice-header-no"
|
|
1686
|
-
}, isInvoiceNo ?
|
|
1705
|
+
}, isInvoiceNo ? React.createElement("div", null, React.createElement("label", null, "\u53D1\u7968\u5355\u636E\u7F16\u53F7 :"), getFieldDecorator('id', {
|
|
1687
1706
|
initialValue: props.defaultId
|
|
1688
|
-
})(
|
|
1707
|
+
})(React.createElement(Input, {
|
|
1689
1708
|
disabled: readOnlyInvoiceNo,
|
|
1690
1709
|
style: {
|
|
1691
1710
|
width: 230
|
|
1692
1711
|
},
|
|
1693
1712
|
size: "small",
|
|
1694
|
-
suffix: controller.updateInvoiceNo &&
|
|
1713
|
+
suffix: controller.updateInvoiceNo && React.createElement(Icon, {
|
|
1695
1714
|
style: {
|
|
1696
1715
|
cursor: 'pointer'
|
|
1697
1716
|
},
|
|
@@ -1735,15 +1754,15 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1735
1754
|
return onClick;
|
|
1736
1755
|
}()
|
|
1737
1756
|
})
|
|
1738
|
-
}))) :
|
|
1757
|
+
}))) : React.createElement("div", {
|
|
1739
1758
|
style: {
|
|
1740
1759
|
height: 20
|
|
1741
1760
|
}
|
|
1742
|
-
}), tag &&
|
|
1761
|
+
}), tag && React.createElement(Tag, null, tag), React.createElement("div", {
|
|
1743
1762
|
className: "invoice-header-type"
|
|
1744
1763
|
}, props.typeOption ? getFieldDecorator('type', {
|
|
1745
1764
|
initialValue: typeIndex
|
|
1746
|
-
})(
|
|
1765
|
+
})(React.createElement(Select, {
|
|
1747
1766
|
size: "small",
|
|
1748
1767
|
style: {
|
|
1749
1768
|
width: 230
|
|
@@ -1752,20 +1771,20 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1752
1771
|
setTypeIndex(e);
|
|
1753
1772
|
}
|
|
1754
1773
|
}, props.typeOption.map(function (e, i) {
|
|
1755
|
-
return
|
|
1774
|
+
return React.createElement(Select.Option, {
|
|
1756
1775
|
key: i,
|
|
1757
1776
|
value: i
|
|
1758
1777
|
}, e.title);
|
|
1759
|
-
}))) : props.renderExpand && props.renderExpand(props.form))), props.typeOption &&
|
|
1778
|
+
}))) : props.renderExpand && props.renderExpand(props.form))), props.typeOption && React.createElement("div", {
|
|
1760
1779
|
style: {
|
|
1761
1780
|
marginTop: 10
|
|
1762
1781
|
}
|
|
1763
|
-
}, props.renderExpand && props.renderExpand(props.form)),
|
|
1782
|
+
}, props.renderExpand && props.renderExpand(props.form)), React.createElement("div", {
|
|
1764
1783
|
className: "invoice-header-property"
|
|
1765
|
-
}, _toConsumableArray(props.fieldExpand || []).map(function (e) {}),
|
|
1766
|
-
return
|
|
1784
|
+
}, _toConsumableArray(props.fieldExpand || []).map(function (e) {}), React.createElement(Row, null, fieldExpand.map(function (e) {
|
|
1785
|
+
return React.createElement(Col, {
|
|
1767
1786
|
span: 24 / fieldExpand.length
|
|
1768
|
-
},
|
|
1787
|
+
}, React.createElement("label", null, e.label), e.render(form));
|
|
1769
1788
|
}))));
|
|
1770
1789
|
});
|
|
1771
1790
|
|
|
@@ -1784,7 +1803,7 @@ var FormSpanString = /*#__PURE__*/function (_React$Component) {
|
|
|
1784
1803
|
key: "render",
|
|
1785
1804
|
value: function render() {
|
|
1786
1805
|
// return <span>{this.props.value}</span>;
|
|
1787
|
-
return
|
|
1806
|
+
return React.createElement(Input, {
|
|
1788
1807
|
size: "small",
|
|
1789
1808
|
disabled: true,
|
|
1790
1809
|
value: this.props.value
|
|
@@ -1887,12 +1906,12 @@ function TableVirtual (props) {
|
|
|
1887
1906
|
if (!table) return;
|
|
1888
1907
|
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
1889
1908
|
}, [pointer, self, rowHeight]);
|
|
1890
|
-
return
|
|
1909
|
+
return React.createElement("span", {
|
|
1891
1910
|
className: "kts-invoice-operate-goods-table-virtual",
|
|
1892
1911
|
ref: function ref(e) {
|
|
1893
1912
|
setSelf(e);
|
|
1894
1913
|
}
|
|
1895
|
-
},
|
|
1914
|
+
}, React.createElement(Table, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1896
1915
|
dataSource: dataSource
|
|
1897
1916
|
})));
|
|
1898
1917
|
}
|
|
@@ -1964,50 +1983,50 @@ var Statistics = (function () {
|
|
|
1964
1983
|
});
|
|
1965
1984
|
return sum.done().toNumber();
|
|
1966
1985
|
}, []);
|
|
1967
|
-
return
|
|
1986
|
+
return React.createElement("div", {
|
|
1968
1987
|
className: "kts-invoice-operate-goods-list-statistics"
|
|
1969
|
-
},
|
|
1988
|
+
}, React.createElement("div", {
|
|
1970
1989
|
className: "kts-invoice-operate-goods-list-statistics-row"
|
|
1971
|
-
},
|
|
1990
|
+
}, React.createElement("div", {
|
|
1972
1991
|
style: {
|
|
1973
1992
|
width: 45
|
|
1974
1993
|
}
|
|
1975
|
-
}),
|
|
1994
|
+
}), React.createElement("div", {
|
|
1976
1995
|
style: {
|
|
1977
1996
|
flex: 1
|
|
1978
1997
|
}
|
|
1979
|
-
},
|
|
1998
|
+
}, React.createElement("label", null, "\u5408\u8BA1")), React.createElement("div", {
|
|
1980
1999
|
style: {
|
|
1981
2000
|
width: 119 + 70
|
|
1982
2001
|
}
|
|
1983
|
-
},
|
|
2002
|
+
}, React.createElement("label", null, parseFloat(isTaxIncluded ? lineAmountIncludeTax : lineAmountExcludeTax).toFixed(2))), React.createElement("div", {
|
|
1984
2003
|
style: {
|
|
1985
2004
|
width: 119 + 50 + 1
|
|
1986
2005
|
}
|
|
1987
|
-
},
|
|
2006
|
+
}, React.createElement("label", null, parseFloat(taxAmount).toFixed(2)))), React.createElement("div", {
|
|
1988
2007
|
className: "kts-invoice-operate-goods-list-statistics-row"
|
|
1989
|
-
},
|
|
2008
|
+
}, React.createElement("div", {
|
|
1990
2009
|
style: {
|
|
1991
2010
|
width: 45
|
|
1992
2011
|
}
|
|
1993
|
-
}),
|
|
2012
|
+
}), React.createElement("div", {
|
|
1994
2013
|
style: {
|
|
1995
2014
|
flex: 4,
|
|
1996
2015
|
border: 'none'
|
|
1997
2016
|
}
|
|
1998
|
-
},
|
|
2017
|
+
}, React.createElement("label", null, "\u4EF7\u7A0E\u5408\u8BA1\uFF08\u5927\u5199\uFF09"), React.createElement("label", null, nzhcn.toMoney(lineAmountIncludeTax, {
|
|
1999
2018
|
outSymbol: false
|
|
2000
|
-
}))),
|
|
2019
|
+
}))), React.createElement("div", {
|
|
2001
2020
|
style: {
|
|
2002
2021
|
flex: 1,
|
|
2003
2022
|
border: 'none'
|
|
2004
2023
|
}
|
|
2005
|
-
},
|
|
2024
|
+
}, React.createElement("label", null, "\uFF08\u5C0F\u5199\uFF09")), React.createElement("div", {
|
|
2006
2025
|
style: {
|
|
2007
2026
|
flex: 3,
|
|
2008
2027
|
border: 'none'
|
|
2009
2028
|
}
|
|
2010
|
-
},
|
|
2029
|
+
}, React.createElement("label", null, parseFloat(lineAmountIncludeTax).toFixed(2)))));
|
|
2011
2030
|
});
|
|
2012
2031
|
|
|
2013
2032
|
var AddRowButton = (function () {
|
|
@@ -2020,6 +2039,11 @@ var AddRowButton = (function () {
|
|
|
2020
2039
|
var goodsNum = controller.useMemo(function (s) {
|
|
2021
2040
|
return s.goodsListState.goodsList.length;
|
|
2022
2041
|
}, []);
|
|
2042
|
+
/** 搜索条件 */
|
|
2043
|
+
|
|
2044
|
+
var searchValue = controller.useMemo(function (s) {
|
|
2045
|
+
return s.goodsListState.searchValue;
|
|
2046
|
+
}, []);
|
|
2023
2047
|
/** 产品最大数 */
|
|
2024
2048
|
|
|
2025
2049
|
var goodMax = controller.useMemo(function (s) {
|
|
@@ -2028,8 +2052,8 @@ var AddRowButton = (function () {
|
|
|
2028
2052
|
/** 按钮是否禁用 */
|
|
2029
2053
|
|
|
2030
2054
|
var disabled = React.useMemo(function () {
|
|
2031
|
-
return typeof goodMax === 'number' ? goodsNum >= goodMax :
|
|
2032
|
-
}, [goodMax, goodsNum]);
|
|
2055
|
+
return typeof goodMax === 'number' ? goodsNum >= goodMax : !!searchValue;
|
|
2056
|
+
}, [goodMax, goodsNum, searchValue]);
|
|
2033
2057
|
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2034
2058
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2035
2059
|
while (1) {
|
|
@@ -2091,8 +2115,8 @@ var AddRowButton = (function () {
|
|
|
2091
2115
|
}
|
|
2092
2116
|
}, _callee2);
|
|
2093
2117
|
})), [controller]);
|
|
2094
|
-
if (model === 'prefab') return
|
|
2095
|
-
return
|
|
2118
|
+
if (model === 'prefab') return React.createElement(React.Fragment, null);
|
|
2119
|
+
return React.createElement(Button, {
|
|
2096
2120
|
icon: "plus-circle",
|
|
2097
2121
|
onClick: onClick,
|
|
2098
2122
|
disabled: disabled
|
|
@@ -2135,11 +2159,11 @@ var TaxIncludedSwitch = (function () {
|
|
|
2135
2159
|
};
|
|
2136
2160
|
}())();
|
|
2137
2161
|
}, []);
|
|
2138
|
-
return
|
|
2162
|
+
return React.createElement("span", null, React.createElement("label", {
|
|
2139
2163
|
style: {
|
|
2140
2164
|
marginRight: 2
|
|
2141
2165
|
}
|
|
2142
|
-
}, "\u542B\u7A0E:"),
|
|
2166
|
+
}, "\u542B\u7A0E:"), React.createElement(Switch, {
|
|
2143
2167
|
disabled: isSwitchTax === false,
|
|
2144
2168
|
checked: isTaxIncluded,
|
|
2145
2169
|
checkedChildren: "\u5F00",
|
|
@@ -2179,19 +2203,19 @@ var DescribeSwitch = (function () {
|
|
|
2179
2203
|
};
|
|
2180
2204
|
}());
|
|
2181
2205
|
}, []);
|
|
2182
|
-
if (!productComparison.onComply) return
|
|
2183
|
-
return
|
|
2206
|
+
if (!productComparison.onComply) return React.createElement(React.Fragment, null);
|
|
2207
|
+
return React.createElement("span", null, React.createElement("label", {
|
|
2184
2208
|
style: {
|
|
2185
2209
|
marginRight: 2
|
|
2186
2210
|
}
|
|
2187
|
-
},
|
|
2211
|
+
}, React.createElement(Tooltip, {
|
|
2188
2212
|
title: "\u84DD\u8272\u4EE3\u8868\u6211\u65B9\u5546\u54C1\u63CF\u8FF0\uFF0C\u9ED1\u8272\u4EE3\u8868\u5BF9\u65B9\u7684\u5546\u54C1\u63CF\u8FF0\u3002"
|
|
2189
|
-
},
|
|
2213
|
+
}, React.createElement(Icon, {
|
|
2190
2214
|
style: {
|
|
2191
2215
|
marginRight: 3
|
|
2192
2216
|
},
|
|
2193
2217
|
type: "info-circle"
|
|
2194
|
-
})), "\u4F7F\u7528\u54EA\u65B9\u5546\u54C1\u63CF\u8FF0:"),
|
|
2218
|
+
})), "\u4F7F\u7528\u54EA\u65B9\u5546\u54C1\u63CF\u8FF0:"), React.createElement(Switch, {
|
|
2195
2219
|
checked: isMyShow,
|
|
2196
2220
|
checkedChildren: "\u6211\u65B9",
|
|
2197
2221
|
unCheckedChildren: "\u5BF9\u65B9",
|
|
@@ -2200,6 +2224,108 @@ var DescribeSwitch = (function () {
|
|
|
2200
2224
|
}));
|
|
2201
2225
|
});
|
|
2202
2226
|
|
|
2227
|
+
var _path$1;
|
|
2228
|
+
|
|
2229
|
+
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
2230
|
+
|
|
2231
|
+
function SvgMagnifier(props) {
|
|
2232
|
+
return /*#__PURE__*/createElement("svg", _extends$1({
|
|
2233
|
+
className: "magnifier_svg__icon",
|
|
2234
|
+
viewBox: "0 0 1024 1024",
|
|
2235
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2236
|
+
width: 200,
|
|
2237
|
+
height: 200
|
|
2238
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/createElement("path", {
|
|
2239
|
+
d: "M985.781 918.594L820.773 765.526c27.373-32.973 49.655-69.577 66.437-109.258 22.933-54.219 34.56-111.795 34.56-171.13 0-59.333-11.627-116.91-34.56-171.13-22.143-52.354-53.838-99.365-94.2-139.729s-87.377-72.056-139.73-94.199c-54.219-22.933-111.795-34.561-171.13-34.561S365.24 57.148 311.022 80.08c-52.354 22.143-99.365 53.837-139.73 94.2s-72.057 87.375-94.2 139.73c-22.932 54.218-34.56 111.795-34.56 171.13 0 59.334 11.628 116.91 34.56 171.129 22.144 52.354 53.838 99.365 94.2 139.729s87.376 72.057 139.73 94.2c54.219 22.933 111.795 34.56 171.13 34.56s116.91-11.627 171.13-34.56c45.352-19.181 86.686-45.543 123.171-78.487l165.803 153.804a31.886 31.886 0 0021.756 8.54c8.593 0 17.163-3.442 23.467-10.238 12.019-12.956 11.26-33.205-1.698-45.223zm-503.63-57.836c-207.117 0-375.62-168.502-375.62-375.62 0-207.117 168.503-375.62 375.62-375.62s375.62 168.503 375.62 375.62c0 207.118-168.503 375.62-375.62 375.62z"
|
|
2240
|
+
})));
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
var css_248z$4 = ".kts-invoice-operate-goods-list-able-list .kts-invoice-operate-goods-list-search {\n width: 330px;\n}\n.kts-invoice-operate-goods-list-able-list .kts-invoice-operate-goods-list-search input {\n border-radius: 999px;\n border-color: #b8b8b8;\n}\n";
|
|
2244
|
+
styleInject(css_248z$4);
|
|
2245
|
+
|
|
2246
|
+
function Search() {
|
|
2247
|
+
var controller = Invoice.useInvoiceController();
|
|
2248
|
+
|
|
2249
|
+
var _React$useState = React.useState(''),
|
|
2250
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2251
|
+
value = _React$useState2[0],
|
|
2252
|
+
setValue = _React$useState2[1];
|
|
2253
|
+
|
|
2254
|
+
var readOnly = controller.useMemo(function (s) {
|
|
2255
|
+
return !!s.goodsListState.editGood;
|
|
2256
|
+
}, []);
|
|
2257
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2258
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2259
|
+
while (1) {
|
|
2260
|
+
switch (_context.prev = _context.next) {
|
|
2261
|
+
case 0:
|
|
2262
|
+
_context.next = 2;
|
|
2263
|
+
return controller.saveEditGood();
|
|
2264
|
+
|
|
2265
|
+
case 2:
|
|
2266
|
+
_context.next = 4;
|
|
2267
|
+
return controller.wait();
|
|
2268
|
+
|
|
2269
|
+
case 4:
|
|
2270
|
+
if (!controller.state.goodsListState.editGood) {
|
|
2271
|
+
_context.next = 7;
|
|
2272
|
+
break;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
message.error({
|
|
2276
|
+
content: '你正在编辑一个货物',
|
|
2277
|
+
key: '你正在编辑一个货物'
|
|
2278
|
+
});
|
|
2279
|
+
return _context.abrupt("return");
|
|
2280
|
+
|
|
2281
|
+
case 7:
|
|
2282
|
+
case "end":
|
|
2283
|
+
return _context.stop();
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}, _callee);
|
|
2287
|
+
})), []);
|
|
2288
|
+
React.useEffect(function () {
|
|
2289
|
+
controller.run( /*#__PURE__*/function () {
|
|
2290
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
2291
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2292
|
+
while (1) {
|
|
2293
|
+
switch (_context2.prev = _context2.next) {
|
|
2294
|
+
case 0:
|
|
2295
|
+
s.goodsListState.searchValue = value;
|
|
2296
|
+
|
|
2297
|
+
case 1:
|
|
2298
|
+
case "end":
|
|
2299
|
+
return _context2.stop();
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
}, _callee2);
|
|
2303
|
+
}));
|
|
2304
|
+
|
|
2305
|
+
return function (_x) {
|
|
2306
|
+
return _ref2.apply(this, arguments);
|
|
2307
|
+
};
|
|
2308
|
+
}());
|
|
2309
|
+
}, [value, controller]);
|
|
2310
|
+
return React.createElement(Input, {
|
|
2311
|
+
size: "small",
|
|
2312
|
+
readOnly: readOnly,
|
|
2313
|
+
value: value,
|
|
2314
|
+
className: "kts-invoice-operate-goods-list-search",
|
|
2315
|
+
placeholder: "\u8BF7\u60A8\u8F93\u5165\u8D27\u7269\u540D\u79F0\u3001\u89C4\u683C\u578B\u53F7\u3001\u91D1\u989D(\u542B\u7A0E)\u641C\u7D22",
|
|
2316
|
+
prefix: React.createElement(Icon, {
|
|
2317
|
+
component: SvgMagnifier,
|
|
2318
|
+
style: {
|
|
2319
|
+
color: "#b8b8b8"
|
|
2320
|
+
}
|
|
2321
|
+
}),
|
|
2322
|
+
onChange: function onChange(e) {
|
|
2323
|
+
setValue(e.target.value);
|
|
2324
|
+
},
|
|
2325
|
+
onClick: onClick
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2203
2329
|
function TableRow(props) {
|
|
2204
2330
|
var controller = Invoice.useInvoiceController();
|
|
2205
2331
|
var goodsMap = controller.useMemo(function (s) {
|
|
@@ -2210,11 +2336,75 @@ function TableRow(props) {
|
|
|
2210
2336
|
if (!i) return false;
|
|
2211
2337
|
return i.lineAttribute !== LineAttributeType$1.正常;
|
|
2212
2338
|
}, [props['data-row-key'], goodsMap]);
|
|
2213
|
-
return
|
|
2339
|
+
return React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2214
2340
|
className: "".concat(isR ? 'kts-invoice-operate-goods-discount ' : '').concat(props.className)
|
|
2215
2341
|
}));
|
|
2216
2342
|
}
|
|
2217
2343
|
|
|
2344
|
+
var useDelRowButton = (function () {
|
|
2345
|
+
var controller = Invoice.useInvoiceController();
|
|
2346
|
+
var model = controller.useMemo(function (s) {
|
|
2347
|
+
return s.model;
|
|
2348
|
+
}, []);
|
|
2349
|
+
/** 是否禁用 */
|
|
2350
|
+
|
|
2351
|
+
var disabled = controller.useMemo(function (s) {
|
|
2352
|
+
if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
|
|
2353
|
+
return s.goodsListState.selectedGoodIndex.some(function (e) {
|
|
2354
|
+
var good = s.goodsListState.goodsMap.get(e);
|
|
2355
|
+
if (!good) return true;
|
|
2356
|
+
return good.lineAttribute !== LineAttributeType$1.正常;
|
|
2357
|
+
});
|
|
2358
|
+
}, []);
|
|
2359
|
+
var onClick = React.useCallback(function () {
|
|
2360
|
+
controller.pipeline( /*#__PURE__*/function () {
|
|
2361
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2362
|
+
var goodsList;
|
|
2363
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2364
|
+
while (1) {
|
|
2365
|
+
switch (_context.prev = _context.next) {
|
|
2366
|
+
case 0:
|
|
2367
|
+
goodsList = s.goodsListState.goodsList.filter(function (e) {
|
|
2368
|
+
return s.goodsListState.selectedGoodIndex.indexOf(e.$index) < 0;
|
|
2369
|
+
});
|
|
2370
|
+
|
|
2371
|
+
if (s.goodsListState.editGood) {
|
|
2372
|
+
if (s.goodsListState.selectedGoodIndex.indexOf(s.goodsListState.editGood.$index) >= 0) {
|
|
2373
|
+
controller.setEditGood();
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
s.goodsListState = _objectSpread2(_objectSpread2({}, s.goodsListState), {}, {
|
|
2378
|
+
goodsList: goodsList,
|
|
2379
|
+
selectedGoodIndex: []
|
|
2380
|
+
});
|
|
2381
|
+
|
|
2382
|
+
case 3:
|
|
2383
|
+
case "end":
|
|
2384
|
+
return _context.stop();
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
}, _callee);
|
|
2388
|
+
}));
|
|
2389
|
+
|
|
2390
|
+
return function (_x) {
|
|
2391
|
+
return _ref.apply(this, arguments);
|
|
2392
|
+
};
|
|
2393
|
+
}())();
|
|
2394
|
+
}, [controller]);
|
|
2395
|
+
var menuItem = React.useMemo(function () {
|
|
2396
|
+
if (model === 'prefab') return React.createElement(React.Fragment, null);
|
|
2397
|
+
return React.createElement(Menu.Item, {
|
|
2398
|
+
key: "1",
|
|
2399
|
+
onClick: onClick,
|
|
2400
|
+
disabled: disabled
|
|
2401
|
+
}, "\u5220\u9664\u884C");
|
|
2402
|
+
}, [model, onClick, disabled]);
|
|
2403
|
+
return {
|
|
2404
|
+
menuItem: menuItem
|
|
2405
|
+
};
|
|
2406
|
+
});
|
|
2407
|
+
|
|
2218
2408
|
/** 延迟函数 */
|
|
2219
2409
|
var lazyFn = (function (fn) {
|
|
2220
2410
|
var delayed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
|
@@ -2250,8 +2440,8 @@ var evaluate = (function (expr) {
|
|
|
2250
2440
|
return parseFloat(math.evaluate(expr).toFixed(fractionDigits));
|
|
2251
2441
|
});
|
|
2252
2442
|
|
|
2253
|
-
var css_248z$
|
|
2254
|
-
styleInject(css_248z$
|
|
2443
|
+
var css_248z$5 = ".kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body .add-discount-row-body {\n flex: 1;\n overflow: auto;\n}\n.kts-invoice-operate-goods-list-add-discount-row .ktsAnt3x-drawer-wrapper-body .ktsAnt3x-drawer-body .add-discount-row-footer {\n flex: none;\n}\n";
|
|
2444
|
+
styleInject(css_248z$5);
|
|
2255
2445
|
|
|
2256
2446
|
var Text = Typography.Text;
|
|
2257
2447
|
|
|
@@ -2261,7 +2451,7 @@ var _create = create(all, {
|
|
|
2261
2451
|
}),
|
|
2262
2452
|
chain = _create.chain;
|
|
2263
2453
|
|
|
2264
|
-
var
|
|
2454
|
+
var useAddDiscountRowButton = (function () {
|
|
2265
2455
|
/** 控制器 */
|
|
2266
2456
|
var controller = Invoice.useInvoiceController();
|
|
2267
2457
|
var model = controller.useMemo(function (s) {
|
|
@@ -2407,20 +2597,28 @@ var AddDiscountRowButton = decorator(Form.create())(function (props) {
|
|
|
2407
2597
|
}
|
|
2408
2598
|
}, _callee3);
|
|
2409
2599
|
})), [controller]);
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2600
|
+
var menuItem = React.useMemo(function () {
|
|
2601
|
+
return model === 'prefab' ? React.createElement(React.Fragment, null) : isAddDiscount !== false ? React.createElement(Menu.Item, {
|
|
2602
|
+
key: "0",
|
|
2603
|
+
onClick: onClick,
|
|
2604
|
+
disabled: disabled
|
|
2605
|
+
}, "\u6DFB\u52A0\u6298\u6263\u884C") : undefined;
|
|
2606
|
+
}, [isAddDiscount, disabled, onClick]);
|
|
2607
|
+
var drawer = React.useMemo(function () {
|
|
2608
|
+
return React.createElement(Drawer, {
|
|
2609
|
+
className: "kts-invoice-operate-goods-list-add-discount-row",
|
|
2610
|
+
width: 540,
|
|
2611
|
+
title: "\u6DFB\u52A0\u6298\u6263\u884C",
|
|
2612
|
+
placement: "right",
|
|
2613
|
+
destroyOnClose: true,
|
|
2614
|
+
onClose: onClose,
|
|
2615
|
+
visible: visible
|
|
2616
|
+
}, React.createElement(DrawerBody, null));
|
|
2617
|
+
}, [visible, onClose]);
|
|
2618
|
+
return {
|
|
2619
|
+
menuItem: menuItem,
|
|
2620
|
+
drawer: drawer
|
|
2621
|
+
};
|
|
2424
2622
|
});
|
|
2425
2623
|
var DrawerBody = decorator(Form.create())(function (props) {
|
|
2426
2624
|
var form = props.form;
|
|
@@ -2532,13 +2730,13 @@ var DrawerBody = decorator(Form.create())(function (props) {
|
|
|
2532
2730
|
});
|
|
2533
2731
|
});
|
|
2534
2732
|
}, 300), [form, lineAmountSum]);
|
|
2535
|
-
return
|
|
2733
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
2536
2734
|
className: "add-discount-row-body"
|
|
2537
|
-
},
|
|
2735
|
+
}, React.createElement("p", null, "\u5F53\u524D\u9009\u62E9", React.createElement(Text, {
|
|
2538
2736
|
type: "danger"
|
|
2539
|
-
}, discountGoodIndex.length), "\u884C\u88AB\u6298\u6263\u5546\u54C1\u884C\uFF0C\u91D1\u989D\u5408\u8BA1\xA5",
|
|
2737
|
+
}, discountGoodIndex.length), "\u884C\u88AB\u6298\u6263\u5546\u54C1\u884C\uFF0C\u91D1\u989D\u5408\u8BA1\xA5", React.createElement(Text, {
|
|
2540
2738
|
type: "danger"
|
|
2541
|
-
}, lineAmountSum.toFixed(2))),
|
|
2739
|
+
}, lineAmountSum.toFixed(2))), React.createElement(Form.Item, {
|
|
2542
2740
|
label: "\u6298\u6263\u7387\uFF1A"
|
|
2543
2741
|
}, getFieldDecorator('discount', {
|
|
2544
2742
|
rules: [{
|
|
@@ -2568,11 +2766,11 @@ var DrawerBody = decorator(Form.create())(function (props) {
|
|
|
2568
2766
|
callback();
|
|
2569
2767
|
}
|
|
2570
2768
|
}]
|
|
2571
|
-
})(
|
|
2769
|
+
})(React.createElement(Input, {
|
|
2572
2770
|
placeholder: "\u8BF7\u8F93\u5165\u5927\u4E8E0\u5C0F\u4E8E100\u7684\u6570\u5B57",
|
|
2573
2771
|
suffix: "%",
|
|
2574
2772
|
onChange: onChangeDiscount
|
|
2575
|
-
}))),
|
|
2773
|
+
}))), React.createElement(Form.Item, {
|
|
2576
2774
|
label: "\u6298\u6263\u91D1\u989D\uFF1A"
|
|
2577
2775
|
}, getFieldDecorator('discolineAmountunt', {
|
|
2578
2776
|
rules: [{
|
|
@@ -2602,19 +2800,19 @@ var DrawerBody = decorator(Form.create())(function (props) {
|
|
|
2602
2800
|
callback();
|
|
2603
2801
|
}
|
|
2604
2802
|
}]
|
|
2605
|
-
})(
|
|
2803
|
+
})(React.createElement(Input, {
|
|
2606
2804
|
placeholder: "\u8BF7\u8F93\u5165\u5927\u4E8E0\u5C0F\u4E8E\u91D1\u989D\u5408\u8BA1\u7684\u6570\u5B57",
|
|
2607
2805
|
suffix: "\xA5",
|
|
2608
2806
|
onChange: onChangeDiscolineAmountunt
|
|
2609
|
-
})))),
|
|
2807
|
+
})))), React.createElement("div", {
|
|
2610
2808
|
className: "add-discount-row-footer"
|
|
2611
|
-
},
|
|
2809
|
+
}, React.createElement(Button, {
|
|
2612
2810
|
block: true,
|
|
2613
2811
|
style: {
|
|
2614
2812
|
marginBottom: 12
|
|
2615
2813
|
},
|
|
2616
2814
|
onClick: onClose
|
|
2617
|
-
}, "\u53D6\u6D88"),
|
|
2815
|
+
}, "\u53D6\u6D88"), React.createElement(Button, {
|
|
2618
2816
|
type: "primary",
|
|
2619
2817
|
block: true,
|
|
2620
2818
|
onClick: onClickSave
|
|
@@ -2644,7 +2842,7 @@ var coolingFn = (function () {
|
|
|
2644
2842
|
}
|
|
2645
2843
|
});
|
|
2646
2844
|
|
|
2647
|
-
var
|
|
2845
|
+
var useEndowCodeButton = (function () {
|
|
2648
2846
|
var controller = Invoice.useInvoiceController();
|
|
2649
2847
|
/** 是否禁用 */
|
|
2650
2848
|
|
|
@@ -2722,75 +2920,20 @@ var EndowCodeButton = (function () {
|
|
|
2722
2920
|
}
|
|
2723
2921
|
}, _callee2);
|
|
2724
2922
|
})), [controller]);
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
});
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
return s.model;
|
|
2736
|
-
}, []);
|
|
2737
|
-
/** 是否禁用 */
|
|
2738
|
-
|
|
2739
|
-
var disabled = controller.useMemo(function (s) {
|
|
2740
|
-
if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
|
|
2741
|
-
return s.goodsListState.selectedGoodIndex.some(function (e) {
|
|
2742
|
-
var good = s.goodsListState.goodsMap.get(e);
|
|
2743
|
-
if (!good) return true;
|
|
2744
|
-
return good.lineAttribute !== LineAttributeType$1.正常;
|
|
2745
|
-
});
|
|
2746
|
-
}, []);
|
|
2747
|
-
var onClick = React.useCallback(function () {
|
|
2748
|
-
controller.pipeline( /*#__PURE__*/function () {
|
|
2749
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2750
|
-
var goodsList;
|
|
2751
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2752
|
-
while (1) {
|
|
2753
|
-
switch (_context.prev = _context.next) {
|
|
2754
|
-
case 0:
|
|
2755
|
-
goodsList = s.goodsListState.goodsList.filter(function (e) {
|
|
2756
|
-
return s.goodsListState.selectedGoodIndex.indexOf(e.$index) < 0;
|
|
2757
|
-
});
|
|
2758
|
-
|
|
2759
|
-
if (s.goodsListState.editGood) {
|
|
2760
|
-
if (s.goodsListState.selectedGoodIndex.indexOf(s.goodsListState.editGood.$index) >= 0) {
|
|
2761
|
-
controller.setEditGood();
|
|
2762
|
-
}
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
s.goodsListState = _objectSpread2(_objectSpread2({}, s.goodsListState), {}, {
|
|
2766
|
-
goodsList: goodsList,
|
|
2767
|
-
selectedGoodIndex: []
|
|
2768
|
-
});
|
|
2769
|
-
|
|
2770
|
-
case 3:
|
|
2771
|
-
case "end":
|
|
2772
|
-
return _context.stop();
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
}, _callee);
|
|
2776
|
-
}));
|
|
2777
|
-
|
|
2778
|
-
return function (_x) {
|
|
2779
|
-
return _ref.apply(this, arguments);
|
|
2780
|
-
};
|
|
2781
|
-
}())();
|
|
2782
|
-
}, [controller]);
|
|
2783
|
-
if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2784
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
2785
|
-
icon: "delete",
|
|
2786
|
-
onClick: onClick,
|
|
2787
|
-
disabled: disabled
|
|
2788
|
-
}, "\u5220\u9664\u884C");
|
|
2923
|
+
var menuItem = React.useMemo(function () {
|
|
2924
|
+
return React.createElement(Menu.Item, {
|
|
2925
|
+
key: "2",
|
|
2926
|
+
onClick: onClick,
|
|
2927
|
+
disabled: disabled
|
|
2928
|
+
}, "\u6279\u91CF\u8D4B\u7801");
|
|
2929
|
+
}, [onClick, disabled]);
|
|
2930
|
+
return {
|
|
2931
|
+
menuItem: menuItem
|
|
2932
|
+
};
|
|
2789
2933
|
});
|
|
2790
2934
|
|
|
2791
2935
|
/** 拆分全称加简称 */
|
|
2792
2936
|
var getSN = function getSN(value) {
|
|
2793
|
-
debugger;
|
|
2794
2937
|
if (!value) return undefined;
|
|
2795
2938
|
var arr = value.match(/\*[^*]+\*/);
|
|
2796
2939
|
|
|
@@ -2825,7 +2968,7 @@ var setShorthand = function setShorthand(name, shorthand) {
|
|
|
2825
2968
|
return getItemName(sn);
|
|
2826
2969
|
};
|
|
2827
2970
|
|
|
2828
|
-
var
|
|
2971
|
+
var useCommodityComparisonButton = (function () {
|
|
2829
2972
|
var controller = Invoice.useInvoiceController();
|
|
2830
2973
|
|
|
2831
2974
|
var _controller$useMemo = controller.useMemo(function (s) {
|
|
@@ -2836,7 +2979,7 @@ var CommodityComparisonButton = (function () {
|
|
|
2836
2979
|
|
|
2837
2980
|
|
|
2838
2981
|
var disabled = controller.useMemo(function (s) {
|
|
2839
|
-
|
|
2982
|
+
return s.goodsListState.selectedGoodIndex.length <= 0;
|
|
2840
2983
|
}, []);
|
|
2841
2984
|
/** 点击了 */
|
|
2842
2985
|
|
|
@@ -2889,7 +3032,7 @@ var CommodityComparisonButton = (function () {
|
|
|
2889
3032
|
if (!t) return undefined;
|
|
2890
3033
|
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
2891
3034
|
itemName: (_getSN = getSN(t.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.full,
|
|
2892
|
-
|
|
3035
|
+
itemNameSelf: (_getSN2 = getSN(t.itemNameSelf)) === null || _getSN2 === void 0 ? void 0 : _getSN2.full
|
|
2893
3036
|
});
|
|
2894
3037
|
}).filter(function (e) {
|
|
2895
3038
|
return !!e;
|
|
@@ -2906,13 +3049,11 @@ var CommodityComparisonButton = (function () {
|
|
|
2906
3049
|
var vt = s.goodsListState.goodsMap.get(e.$index);
|
|
2907
3050
|
if (!vt) return undefined;
|
|
2908
3051
|
vt.itemName = e.itemName ? setShorthand(e.itemName, (_getSN3 = getSN(vt.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.shorthand) : vt.itemName;
|
|
2909
|
-
vt.
|
|
2910
|
-
vt.unit = e.unit ? e.unit : vt.unit;
|
|
2911
|
-
vt.unitOther = e.unitOther ? e.unitOther : vt.unitOther;
|
|
3052
|
+
vt.itemNameSelf = e.itemNameSelf ? setShorthand(e.itemNameSelf, (_getSN4 = getSN(vt.itemNameSelf)) === null || _getSN4 === void 0 ? void 0 : _getSN4.shorthand) : vt.itemNameSelf;
|
|
2912
3053
|
vt.itemModelName = e.itemModelName ? e.itemModelName : vt.itemModelName;
|
|
2913
|
-
vt.
|
|
3054
|
+
vt.itemModelNameSelf = e.itemModelNameSelf ? e.itemModelNameSelf : vt.itemModelNameSelf;
|
|
2914
3055
|
vt.itemCode = e.itemCode ? e.itemCode : vt.itemCode;
|
|
2915
|
-
vt.
|
|
3056
|
+
vt.itemCodeSelf = e.itemCodeSelf ? e.itemCodeSelf : vt.itemCodeSelf;
|
|
2916
3057
|
});
|
|
2917
3058
|
|
|
2918
3059
|
case 10:
|
|
@@ -2934,26 +3075,49 @@ var CommodityComparisonButton = (function () {
|
|
|
2934
3075
|
}
|
|
2935
3076
|
}
|
|
2936
3077
|
}, _callee2);
|
|
2937
|
-
})), []);
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
3078
|
+
})), []);
|
|
3079
|
+
var menuItem = React.useMemo(function () {
|
|
3080
|
+
// 没用 执行商品对照 的方法 不显示按钮
|
|
3081
|
+
if (!onComply) return React.createElement(React.Fragment, null);
|
|
3082
|
+
return React.createElement(Menu.Item, {
|
|
3083
|
+
key: "3",
|
|
3084
|
+
disabled: disabled,
|
|
3085
|
+
onClick: onClick
|
|
3086
|
+
}, "\u6267\u884C\u5546\u54C1\u5BF9\u7167");
|
|
3087
|
+
}, [disabled, onClick, onComply]);
|
|
3088
|
+
return {
|
|
3089
|
+
menuItem: menuItem
|
|
3090
|
+
};
|
|
2945
3091
|
});
|
|
2946
3092
|
|
|
2947
|
-
|
|
3093
|
+
function BulkMenu() {
|
|
3094
|
+
/** 删除行 */
|
|
3095
|
+
var delRowButton = useDelRowButton();
|
|
3096
|
+
/** 添加折扣行 */
|
|
2948
3097
|
|
|
2949
|
-
|
|
3098
|
+
var addDiscountRowButton = useAddDiscountRowButton();
|
|
3099
|
+
/** 批量赋码 */
|
|
3100
|
+
|
|
3101
|
+
var endowCodeButton = useEndowCodeButton();
|
|
3102
|
+
/** 执行商品对照 */
|
|
3103
|
+
|
|
3104
|
+
var commodityComparisonButton = useCommodityComparisonButton();
|
|
3105
|
+
var menu = React.createElement(Menu, null, delRowButton.menuItem, addDiscountRowButton.menuItem, endowCodeButton.menuItem, commodityComparisonButton.menuItem);
|
|
3106
|
+
return React.createElement(React.Fragment, null, React.createElement(Dropdown, {
|
|
3107
|
+
overlay: menu
|
|
3108
|
+
}, React.createElement(Button, null, "\u6279\u91CF\u64CD\u4F5C\u884C")), addDiscountRowButton.drawer);
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
var _defs$1, _path$2;
|
|
3112
|
+
|
|
3113
|
+
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
2950
3114
|
|
|
2951
3115
|
function SvgSpot(props) {
|
|
2952
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
3116
|
+
return /*#__PURE__*/createElement("svg", _extends$2({
|
|
2953
3117
|
className: "spot_svg__icon",
|
|
2954
3118
|
viewBox: "0 0 1024 1024",
|
|
2955
3119
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2956
|
-
}, props), _defs$1 || (_defs$1 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("style", null))), _path$
|
|
3120
|
+
}, props), _defs$1 || (_defs$1 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("style", null))), _path$2 || (_path$2 = /*#__PURE__*/createElement("path", {
|
|
2957
3121
|
d: "M416 512a1.5 1.5 0 10192 0 1.5 1.5 0 10-192 0zM416 96.64a1.5 1.5 0 10192 0 1.5 1.5 0 10-192 0zM416 927.36a1.5 1.5 0 10192 0 1.5 1.5 0 10-192 0z"
|
|
2958
3122
|
})));
|
|
2959
3123
|
}
|
|
@@ -2970,10 +3134,10 @@ var useDelItem = (function (goods) {
|
|
|
2970
3134
|
}
|
|
2971
3135
|
|
|
2972
3136
|
return React.useMemo(function () {
|
|
2973
|
-
return
|
|
3137
|
+
return React.createElement(Menu.Item, {
|
|
2974
3138
|
key: "delItem",
|
|
2975
3139
|
onClick: onClick
|
|
2976
|
-
},
|
|
3140
|
+
}, React.createElement(Text$1, {
|
|
2977
3141
|
strong: true,
|
|
2978
3142
|
type: "danger"
|
|
2979
3143
|
}, "\u5220\u9664"));
|
|
@@ -3092,10 +3256,10 @@ var useAddDiscount = (function (goods) {
|
|
|
3092
3256
|
return undefined;
|
|
3093
3257
|
}
|
|
3094
3258
|
|
|
3095
|
-
return
|
|
3259
|
+
return React.createElement(Menu.Item, {
|
|
3096
3260
|
key: "addDiscount",
|
|
3097
3261
|
onClick: onClick
|
|
3098
|
-
},
|
|
3262
|
+
}, React.createElement(Text$2, {
|
|
3099
3263
|
strong: true
|
|
3100
3264
|
}, "\u6DFB\u52A0\u6298\u6263\u884C"));
|
|
3101
3265
|
}, [onClick, goods.lineAttribute]);
|
|
@@ -9702,11 +9866,11 @@ var onChangeItemName = /*#__PURE__*/function () {
|
|
|
9702
9866
|
|
|
9703
9867
|
_context12.next = 5;
|
|
9704
9868
|
return controller.setEditGood({
|
|
9705
|
-
|
|
9869
|
+
itemNameSelf: value
|
|
9706
9870
|
});
|
|
9707
9871
|
|
|
9708
9872
|
case 5:
|
|
9709
|
-
_context12.t0 = record.
|
|
9873
|
+
_context12.t0 = record.itemName;
|
|
9710
9874
|
|
|
9711
9875
|
if (!_context12.t0) {
|
|
9712
9876
|
_context12.next = 9;
|
|
@@ -9715,7 +9879,7 @@ var onChangeItemName = /*#__PURE__*/function () {
|
|
|
9715
9879
|
|
|
9716
9880
|
_context12.next = 9;
|
|
9717
9881
|
return controller.setEditGood({
|
|
9718
|
-
|
|
9882
|
+
itemName: setShorthand(record.itemName, shorthand)
|
|
9719
9883
|
});
|
|
9720
9884
|
|
|
9721
9885
|
case 9:
|
|
@@ -9725,11 +9889,11 @@ var onChangeItemName = /*#__PURE__*/function () {
|
|
|
9725
9889
|
case 11:
|
|
9726
9890
|
_context12.next = 13;
|
|
9727
9891
|
return controller.setEditGood({
|
|
9728
|
-
|
|
9892
|
+
itemName: value
|
|
9729
9893
|
});
|
|
9730
9894
|
|
|
9731
9895
|
case 13:
|
|
9732
|
-
_context12.t1 = record.
|
|
9896
|
+
_context12.t1 = record.itemNameSelf;
|
|
9733
9897
|
|
|
9734
9898
|
if (!_context12.t1) {
|
|
9735
9899
|
_context12.next = 17;
|
|
@@ -9738,7 +9902,7 @@ var onChangeItemName = /*#__PURE__*/function () {
|
|
|
9738
9902
|
|
|
9739
9903
|
_context12.next = 17;
|
|
9740
9904
|
return controller.setEditGood({
|
|
9741
|
-
|
|
9905
|
+
itemNameSelf: setShorthand(record.itemNameSelf, shorthand)
|
|
9742
9906
|
});
|
|
9743
9907
|
|
|
9744
9908
|
case 17:
|
|
@@ -9785,10 +9949,10 @@ var useEndowCode = (function (goods) {
|
|
|
9785
9949
|
}, _callee);
|
|
9786
9950
|
})), [controller, goods]);
|
|
9787
9951
|
return React.useMemo(function () {
|
|
9788
|
-
return
|
|
9952
|
+
return React.createElement(Menu.Item, {
|
|
9789
9953
|
key: "endowCode",
|
|
9790
9954
|
onClick: onClick
|
|
9791
|
-
},
|
|
9955
|
+
}, React.createElement(Text$3, {
|
|
9792
9956
|
strong: true
|
|
9793
9957
|
}, "\u8D4B\u7801"));
|
|
9794
9958
|
}, [goods.lineAttribute, onClick]);
|
|
@@ -9873,20 +10037,20 @@ var useAddComparison = (function (goods) {
|
|
|
9873
10037
|
})), [controller, goods.$index]);
|
|
9874
10038
|
return React.useMemo(function () {
|
|
9875
10039
|
if (productComparison.onComply) {
|
|
9876
|
-
return
|
|
10040
|
+
return React.createElement(Menu.Item, {
|
|
9877
10041
|
key: "delItem",
|
|
9878
10042
|
onClick: onClick
|
|
9879
|
-
},
|
|
10043
|
+
}, React.createElement(Text$4, {
|
|
9880
10044
|
strong: true
|
|
9881
10045
|
}, "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167"));
|
|
9882
10046
|
} else {
|
|
9883
|
-
return
|
|
10047
|
+
return React.createElement(React.Fragment, null);
|
|
9884
10048
|
}
|
|
9885
10049
|
}, [onClick, productComparison]);
|
|
9886
10050
|
});
|
|
9887
10051
|
|
|
9888
|
-
var css_248z$
|
|
9889
|
-
styleInject(css_248z$
|
|
10052
|
+
var css_248z$6 = ".ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:focus,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu {\n font-size: 16px;\n color: #000;\n text-align: center;\n padding: 0;\n}\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu:hover,\n.ktsAnt3x-btn.kts-invoice-operate-goods-list-columns-row-menu.ktsAnt3x-dropdown-open {\n background: #ebebeb;\n border-radius: 9999px;\n}\n";
|
|
10053
|
+
styleInject(css_248z$6);
|
|
9890
10054
|
|
|
9891
10055
|
var RowMenu = (function (props) {
|
|
9892
10056
|
var controller = Invoice.useInvoiceController();
|
|
@@ -9916,7 +10080,7 @@ var RowMenu = (function (props) {
|
|
|
9916
10080
|
model !== 'prefab' && delItem && arr.push(delItem); // 删除
|
|
9917
10081
|
|
|
9918
10082
|
if (!goodsMenuExpand || goodsMenuExpand.length === 0) return arr;
|
|
9919
|
-
arr.unshift(
|
|
10083
|
+
arr.unshift(React.createElement(Menu.Divider, {
|
|
9920
10084
|
key: "divider-1"
|
|
9921
10085
|
}));
|
|
9922
10086
|
|
|
@@ -9929,16 +10093,16 @@ var RowMenu = (function (props) {
|
|
|
9929
10093
|
}, [controller, endowCode, addDiscount, delItem, goodsMenuExpand, props.goods, model, isAddDiscount]);
|
|
9930
10094
|
|
|
9931
10095
|
if (itemList.length === 0) {
|
|
9932
|
-
return
|
|
10096
|
+
return React.createElement(React.Fragment, null);
|
|
9933
10097
|
}
|
|
9934
10098
|
|
|
9935
|
-
return
|
|
9936
|
-
overlay:
|
|
10099
|
+
return React.createElement(Dropdown, {
|
|
10100
|
+
overlay: React.createElement(Menu, null, itemList),
|
|
9937
10101
|
trigger: ['click']
|
|
9938
|
-
},
|
|
10102
|
+
}, React.createElement(Button, {
|
|
9939
10103
|
className: "kts-invoice-operate-goods-list-columns-row-menu ant-btn-icon-only",
|
|
9940
10104
|
type: "link"
|
|
9941
|
-
},
|
|
10105
|
+
}, React.createElement(Icon, {
|
|
9942
10106
|
component: SvgSpot
|
|
9943
10107
|
})));
|
|
9944
10108
|
});
|
|
@@ -9963,6 +10127,11 @@ var useColumns = (function (form) {
|
|
|
9963
10127
|
var editGood = controller.useMemo(function (e) {
|
|
9964
10128
|
return e.goodsListState.editGood;
|
|
9965
10129
|
}, []);
|
|
10130
|
+
/** 搜索条件 */
|
|
10131
|
+
|
|
10132
|
+
var searchValue = controller.useMemo(function (e) {
|
|
10133
|
+
return e.goodsListState.searchValue;
|
|
10134
|
+
}, []);
|
|
9966
10135
|
/** 税率列表 */
|
|
9967
10136
|
|
|
9968
10137
|
var taxRateList = controller.useMemo(function (e) {
|
|
@@ -9989,7 +10158,7 @@ var useColumns = (function (form) {
|
|
|
9989
10158
|
|
|
9990
10159
|
var columns = React.useMemo(function () {
|
|
9991
10160
|
return [{
|
|
9992
|
-
title:
|
|
10161
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
9993
10162
|
type: "danger"
|
|
9994
10163
|
}, "*"), "\u8D27\u7269\u540D\u79F0"),
|
|
9995
10164
|
key: 'itemName',
|
|
@@ -9997,12 +10166,12 @@ var useColumns = (function (form) {
|
|
|
9997
10166
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9998
10167
|
var _editGood$itemName;
|
|
9999
10168
|
|
|
10000
|
-
return
|
|
10169
|
+
return React.createElement(Form.Item, null, React.createElement("div", {
|
|
10001
10170
|
style: {
|
|
10002
10171
|
display: 'flex'
|
|
10003
10172
|
}
|
|
10004
10173
|
}, getFieldDecorator('itemName', {
|
|
10005
|
-
initialValue: isMyShow ? record.
|
|
10174
|
+
initialValue: isMyShow ? record.itemNameSelf : record.itemName,
|
|
10006
10175
|
rules: [{
|
|
10007
10176
|
validator: function () {
|
|
10008
10177
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, __, callback) {
|
|
@@ -10017,7 +10186,7 @@ var useColumns = (function (form) {
|
|
|
10017
10186
|
case 2:
|
|
10018
10187
|
value = controller.state.goodsListState.editGood;
|
|
10019
10188
|
|
|
10020
|
-
if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.
|
|
10189
|
+
if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameSelf))) {
|
|
10021
10190
|
_context.next = 7;
|
|
10022
10191
|
break;
|
|
10023
10192
|
}
|
|
@@ -10044,22 +10213,22 @@ var useColumns = (function (form) {
|
|
|
10044
10213
|
return validator;
|
|
10045
10214
|
}()
|
|
10046
10215
|
}]
|
|
10047
|
-
})(
|
|
10216
|
+
})(React.createElement(MyInput, {
|
|
10048
10217
|
style: {
|
|
10049
10218
|
flex: 1
|
|
10050
10219
|
},
|
|
10051
10220
|
onChange: function onChange() {
|
|
10052
10221
|
onChangeItemName(controller, form, record);
|
|
10053
10222
|
}
|
|
10054
|
-
})),
|
|
10223
|
+
})), React.createElement("div", {
|
|
10055
10224
|
className: "kts-invoice-operate-goods-list-able-list-itemName-import"
|
|
10056
|
-
}, !((_editGood$itemName = editGood.itemName) === null || _editGood$itemName === void 0 ? void 0 : _editGood$itemName.match(/\*[^*]+\*/)) &&
|
|
10225
|
+
}, !((_editGood$itemName = editGood.itemName) === null || _editGood$itemName === void 0 ? void 0 : _editGood$itemName.match(/\*[^*]+\*/)) && React.createElement(Button, {
|
|
10057
10226
|
onClick: function onClick() {
|
|
10058
10227
|
endowCode(controller, record);
|
|
10059
10228
|
},
|
|
10060
10229
|
type: "link",
|
|
10061
10230
|
icon: "file-add"
|
|
10062
|
-
}), controller.getGoodsList &&
|
|
10231
|
+
}), controller.getGoodsList && React.createElement(Button, {
|
|
10063
10232
|
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
10064
10233
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
10065
10234
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -10084,11 +10253,13 @@ var useColumns = (function (form) {
|
|
|
10084
10253
|
icon: "plus-circle"
|
|
10085
10254
|
}))));
|
|
10086
10255
|
} else {
|
|
10087
|
-
return
|
|
10088
|
-
valueT: record.
|
|
10089
|
-
valueF: record.
|
|
10256
|
+
return React.createElement(MyItemNameDiv, {
|
|
10257
|
+
valueT: formatSearch(record.itemNameSelf, searchValue),
|
|
10258
|
+
valueF: formatSearch(record.itemName, searchValue),
|
|
10090
10259
|
isMyShow: isMyShow
|
|
10091
|
-
});
|
|
10260
|
+
}); // return (
|
|
10261
|
+
// <span style={{ padding: '0 10px' }}>{formatSearch(value, searchValue)}</span>
|
|
10262
|
+
// );
|
|
10092
10263
|
}
|
|
10093
10264
|
}
|
|
10094
10265
|
}, {
|
|
@@ -10097,9 +10268,9 @@ var useColumns = (function (form) {
|
|
|
10097
10268
|
width: 119,
|
|
10098
10269
|
render: function render(_, record) {
|
|
10099
10270
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10100
|
-
return
|
|
10101
|
-
initialValue: isMyShow ? editGood.
|
|
10102
|
-
})(
|
|
10271
|
+
return React.createElement(Form.Item, null, getFieldDecorator('itemModelName', {
|
|
10272
|
+
initialValue: isMyShow ? editGood.itemModelNameSelf : editGood.itemModelName
|
|
10273
|
+
})(React.createElement(MyInput, {
|
|
10103
10274
|
onChange: function () {
|
|
10104
10275
|
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
10105
10276
|
var key, value;
|
|
@@ -10111,7 +10282,7 @@ var useColumns = (function (form) {
|
|
|
10111
10282
|
return controller.wait();
|
|
10112
10283
|
|
|
10113
10284
|
case 2:
|
|
10114
|
-
key = isMyShow ? '
|
|
10285
|
+
key = isMyShow ? 'itemModelNameSelf' : 'itemModelName';
|
|
10115
10286
|
value = {};
|
|
10116
10287
|
value[key] = form.getFieldsValue().itemModelName;
|
|
10117
10288
|
controller.setEditGood(value);
|
|
@@ -10132,9 +10303,9 @@ var useColumns = (function (form) {
|
|
|
10132
10303
|
}()
|
|
10133
10304
|
})));
|
|
10134
10305
|
} else {
|
|
10135
|
-
return
|
|
10136
|
-
valueT: record.
|
|
10137
|
-
valueF: record.
|
|
10306
|
+
return React.createElement(MyItemNameDiv, {
|
|
10307
|
+
valueT: formatSearch(record.itemModelNameSelf, searchValue),
|
|
10308
|
+
valueF: formatSearch(record.itemModelName, searchValue),
|
|
10138
10309
|
isMyShow: isMyShow
|
|
10139
10310
|
});
|
|
10140
10311
|
}
|
|
@@ -10145,9 +10316,9 @@ var useColumns = (function (form) {
|
|
|
10145
10316
|
width: 70,
|
|
10146
10317
|
render: function render(_, record) {
|
|
10147
10318
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10148
|
-
return
|
|
10319
|
+
return React.createElement(Form.Item, null, getFieldDecorator('unit', {
|
|
10149
10320
|
initialValue: editGood.unit
|
|
10150
|
-
})(
|
|
10321
|
+
})(React.createElement(AutoComplete, {
|
|
10151
10322
|
style: {
|
|
10152
10323
|
width: '100%'
|
|
10153
10324
|
},
|
|
@@ -10184,11 +10355,7 @@ var useColumns = (function (form) {
|
|
|
10184
10355
|
}()
|
|
10185
10356
|
})));
|
|
10186
10357
|
} else {
|
|
10187
|
-
return
|
|
10188
|
-
valueT: record.unit,
|
|
10189
|
-
valueF: record.unitOther,
|
|
10190
|
-
isMyShow: isMyShow
|
|
10191
|
-
});
|
|
10358
|
+
return record.unit;
|
|
10192
10359
|
}
|
|
10193
10360
|
}
|
|
10194
10361
|
}, {
|
|
@@ -10199,7 +10366,7 @@ var useColumns = (function (form) {
|
|
|
10199
10366
|
width: 149,
|
|
10200
10367
|
render: function render(value, record) {
|
|
10201
10368
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10202
|
-
return
|
|
10369
|
+
return React.createElement(Form.Item, null, getFieldDecorator('quantity', {
|
|
10203
10370
|
initialValue: editGood.quantity,
|
|
10204
10371
|
rules: [{
|
|
10205
10372
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
@@ -10244,7 +10411,7 @@ var useColumns = (function (form) {
|
|
|
10244
10411
|
return validator;
|
|
10245
10412
|
}()
|
|
10246
10413
|
}]
|
|
10247
|
-
})(
|
|
10414
|
+
})(React.createElement(MyInput, {
|
|
10248
10415
|
style: {
|
|
10249
10416
|
textAlign: 'right'
|
|
10250
10417
|
},
|
|
@@ -10256,7 +10423,7 @@ var useColumns = (function (form) {
|
|
|
10256
10423
|
}
|
|
10257
10424
|
})));
|
|
10258
10425
|
} else {
|
|
10259
|
-
return
|
|
10426
|
+
return React.createElement("span", {
|
|
10260
10427
|
style: {
|
|
10261
10428
|
padding: '0 10px'
|
|
10262
10429
|
}
|
|
@@ -10271,7 +10438,7 @@ var useColumns = (function (form) {
|
|
|
10271
10438
|
width: 149,
|
|
10272
10439
|
render: function render(value, record) {
|
|
10273
10440
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10274
|
-
return
|
|
10441
|
+
return React.createElement(Form.Item, null, getFieldDecorator('priceIncludeTax', {
|
|
10275
10442
|
initialValue: editGood.priceIncludeTax,
|
|
10276
10443
|
rules: [{
|
|
10277
10444
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
@@ -10316,7 +10483,7 @@ var useColumns = (function (form) {
|
|
|
10316
10483
|
return validator;
|
|
10317
10484
|
}()
|
|
10318
10485
|
}]
|
|
10319
|
-
})(
|
|
10486
|
+
})(React.createElement(MyInput, {
|
|
10320
10487
|
style: {
|
|
10321
10488
|
textAlign: 'right'
|
|
10322
10489
|
},
|
|
@@ -10328,7 +10495,7 @@ var useColumns = (function (form) {
|
|
|
10328
10495
|
}
|
|
10329
10496
|
})));
|
|
10330
10497
|
} else {
|
|
10331
|
-
return
|
|
10498
|
+
return React.createElement("span", {
|
|
10332
10499
|
style: {
|
|
10333
10500
|
padding: '0 10px'
|
|
10334
10501
|
}
|
|
@@ -10343,7 +10510,7 @@ var useColumns = (function (form) {
|
|
|
10343
10510
|
width: 149,
|
|
10344
10511
|
render: function render(value, record) {
|
|
10345
10512
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10346
|
-
return
|
|
10513
|
+
return React.createElement(Form.Item, null, getFieldDecorator('priceExcludeTax', {
|
|
10347
10514
|
initialValue: editGood.priceExcludeTax,
|
|
10348
10515
|
rules: [{
|
|
10349
10516
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
@@ -10388,7 +10555,7 @@ var useColumns = (function (form) {
|
|
|
10388
10555
|
return validator;
|
|
10389
10556
|
}()
|
|
10390
10557
|
}]
|
|
10391
|
-
})(
|
|
10558
|
+
})(React.createElement(MyInput, {
|
|
10392
10559
|
style: {
|
|
10393
10560
|
textAlign: 'right'
|
|
10394
10561
|
},
|
|
@@ -10400,7 +10567,7 @@ var useColumns = (function (form) {
|
|
|
10400
10567
|
}
|
|
10401
10568
|
})));
|
|
10402
10569
|
} else {
|
|
10403
|
-
return
|
|
10570
|
+
return React.createElement("span", {
|
|
10404
10571
|
style: {
|
|
10405
10572
|
padding: '0 10px'
|
|
10406
10573
|
}
|
|
@@ -10408,7 +10575,7 @@ var useColumns = (function (form) {
|
|
|
10408
10575
|
}
|
|
10409
10576
|
}
|
|
10410
10577
|
}, {
|
|
10411
|
-
title:
|
|
10578
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
10412
10579
|
type: "danger"
|
|
10413
10580
|
}, "*"), "\u91D1\u989D(\u542B\u7A0E)"),
|
|
10414
10581
|
dataIndex: 'lineAmountIncludeTax',
|
|
@@ -10417,7 +10584,7 @@ var useColumns = (function (form) {
|
|
|
10417
10584
|
align: 'right',
|
|
10418
10585
|
render: function render(value, record) {
|
|
10419
10586
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10420
|
-
return
|
|
10587
|
+
return React.createElement(Form.Item, null, getFieldDecorator('lineAmountIncludeTax', {
|
|
10421
10588
|
initialValue: editGood.lineAmountIncludeTax,
|
|
10422
10589
|
rules: [{
|
|
10423
10590
|
required: true,
|
|
@@ -10476,7 +10643,7 @@ var useColumns = (function (form) {
|
|
|
10476
10643
|
return validator;
|
|
10477
10644
|
}()
|
|
10478
10645
|
}]
|
|
10479
|
-
})(
|
|
10646
|
+
})(React.createElement(MyInput, {
|
|
10480
10647
|
style: {
|
|
10481
10648
|
textAlign: 'right'
|
|
10482
10649
|
},
|
|
@@ -10487,15 +10654,15 @@ var useColumns = (function (form) {
|
|
|
10487
10654
|
}
|
|
10488
10655
|
})));
|
|
10489
10656
|
} else {
|
|
10490
|
-
return
|
|
10657
|
+
return React.createElement("span", {
|
|
10491
10658
|
style: {
|
|
10492
10659
|
padding: '0 10px'
|
|
10493
10660
|
}
|
|
10494
|
-
}, parseFloat(value).toFixed(2));
|
|
10661
|
+
}, formatSearch(parseFloat(value).toFixed(2), searchValue));
|
|
10495
10662
|
}
|
|
10496
10663
|
}
|
|
10497
10664
|
}, {
|
|
10498
|
-
title:
|
|
10665
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
10499
10666
|
type: "danger"
|
|
10500
10667
|
}, "*"), "\u91D1\u989D(\u4E0D\u542B\u7A0E)"),
|
|
10501
10668
|
dataIndex: 'lineAmountExcludeTax',
|
|
@@ -10504,7 +10671,7 @@ var useColumns = (function (form) {
|
|
|
10504
10671
|
width: 119,
|
|
10505
10672
|
render: function render(value, record) {
|
|
10506
10673
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10507
|
-
return
|
|
10674
|
+
return React.createElement(Form.Item, null, getFieldDecorator('lineAmountExcludeTax', {
|
|
10508
10675
|
initialValue: editGood.lineAmountExcludeTax,
|
|
10509
10676
|
rules: [{
|
|
10510
10677
|
required: true,
|
|
@@ -10538,7 +10705,7 @@ var useColumns = (function (form) {
|
|
|
10538
10705
|
return validator;
|
|
10539
10706
|
}()
|
|
10540
10707
|
}]
|
|
10541
|
-
})(
|
|
10708
|
+
})(React.createElement(MyInput, {
|
|
10542
10709
|
style: {
|
|
10543
10710
|
textAlign: 'right'
|
|
10544
10711
|
},
|
|
@@ -10549,7 +10716,7 @@ var useColumns = (function (form) {
|
|
|
10549
10716
|
}
|
|
10550
10717
|
})));
|
|
10551
10718
|
} else {
|
|
10552
|
-
return
|
|
10719
|
+
return React.createElement("span", {
|
|
10553
10720
|
style: {
|
|
10554
10721
|
padding: '0 10px'
|
|
10555
10722
|
}
|
|
@@ -10557,7 +10724,7 @@ var useColumns = (function (form) {
|
|
|
10557
10724
|
}
|
|
10558
10725
|
}
|
|
10559
10726
|
}, {
|
|
10560
|
-
title:
|
|
10727
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
10561
10728
|
type: "danger"
|
|
10562
10729
|
}, "*"), "\u7A0E\u7387"),
|
|
10563
10730
|
dataIndex: 'taxRate',
|
|
@@ -10566,7 +10733,7 @@ var useColumns = (function (form) {
|
|
|
10566
10733
|
width: 70,
|
|
10567
10734
|
render: function render(value, record) {
|
|
10568
10735
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10569
|
-
return
|
|
10736
|
+
return React.createElement(Form.Item, null, getFieldDecorator('taxRate', {
|
|
10570
10737
|
initialValue: editGood.taxRate,
|
|
10571
10738
|
rules: [{
|
|
10572
10739
|
required: true,
|
|
@@ -10575,7 +10742,7 @@ var useColumns = (function (form) {
|
|
|
10575
10742
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
10576
10743
|
message: ' '
|
|
10577
10744
|
}]
|
|
10578
|
-
})(
|
|
10745
|
+
})(React.createElement(Select, {
|
|
10579
10746
|
className: "kts-invoice-operate-goods-list-table-tax-rate",
|
|
10580
10747
|
dropdownMenuStyle: {
|
|
10581
10748
|
textAlign: "right"
|
|
@@ -10585,16 +10752,17 @@ var useColumns = (function (form) {
|
|
|
10585
10752
|
width: '100%'
|
|
10586
10753
|
},
|
|
10587
10754
|
onChange: function onChange() {
|
|
10755
|
+
setChangeField('taxRate');
|
|
10588
10756
|
onChangeTaxRate(controller, form, record);
|
|
10589
10757
|
}
|
|
10590
10758
|
}, taxRateList.map(function (e, i) {
|
|
10591
|
-
return
|
|
10759
|
+
return React.createElement(Select.Option, {
|
|
10592
10760
|
key: i,
|
|
10593
10761
|
value: e
|
|
10594
10762
|
}, e, "%");
|
|
10595
10763
|
}))));
|
|
10596
10764
|
} else {
|
|
10597
|
-
return
|
|
10765
|
+
return React.createElement("span", {
|
|
10598
10766
|
style: {
|
|
10599
10767
|
padding: '0 10px'
|
|
10600
10768
|
}
|
|
@@ -10611,9 +10779,11 @@ var useColumns = (function (form) {
|
|
|
10611
10779
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10612
10780
|
return getFieldDecorator('taxAmount', {
|
|
10613
10781
|
initialValue: editGood.taxAmount
|
|
10614
|
-
})(
|
|
10782
|
+
})(React.createElement(MyDiv, {
|
|
10783
|
+
loading: isCipher(changeField, 'taxAmount')
|
|
10784
|
+
}));
|
|
10615
10785
|
} else {
|
|
10616
|
-
return
|
|
10786
|
+
return React.createElement("span", {
|
|
10617
10787
|
style: {
|
|
10618
10788
|
padding: '0 10px'
|
|
10619
10789
|
}
|
|
@@ -10627,7 +10797,7 @@ var useColumns = (function (form) {
|
|
|
10627
10797
|
width: 50,
|
|
10628
10798
|
align: 'center',
|
|
10629
10799
|
render: function render(_value, record) {
|
|
10630
|
-
return
|
|
10800
|
+
return React.createElement(RowMenu, {
|
|
10631
10801
|
key: record.lineAttribute,
|
|
10632
10802
|
goods: record
|
|
10633
10803
|
});
|
|
@@ -10643,7 +10813,7 @@ var useColumns = (function (form) {
|
|
|
10643
10813
|
ellipsis: true
|
|
10644
10814
|
});
|
|
10645
10815
|
});
|
|
10646
|
-
}, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow]);
|
|
10816
|
+
}, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue]);
|
|
10647
10817
|
React.useEffect(function () {
|
|
10648
10818
|
if (!changeField) return;
|
|
10649
10819
|
var t = setTimeout(function () {
|
|
@@ -10677,13 +10847,13 @@ var MyInput = /*#__PURE__*/function (_React$Component) {
|
|
|
10677
10847
|
key: "render",
|
|
10678
10848
|
value: function render() {
|
|
10679
10849
|
if (this.props.loading) {
|
|
10680
|
-
return
|
|
10850
|
+
return React.createElement(Spin, {
|
|
10681
10851
|
size: "small"
|
|
10682
|
-
},
|
|
10852
|
+
}, React.createElement(Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
10683
10853
|
autoComplete: "off"
|
|
10684
10854
|
})));
|
|
10685
10855
|
} else {
|
|
10686
|
-
return
|
|
10856
|
+
return React.createElement(Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
10687
10857
|
autoComplete: "off"
|
|
10688
10858
|
}));
|
|
10689
10859
|
}
|
|
@@ -10707,11 +10877,21 @@ var MyDiv = /*#__PURE__*/function (_React$Component2) {
|
|
|
10707
10877
|
_createClass(MyDiv, [{
|
|
10708
10878
|
key: "render",
|
|
10709
10879
|
value: function render() {
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
}
|
|
10714
|
-
|
|
10880
|
+
if (this.props.loading) {
|
|
10881
|
+
return React.createElement(Spin, {
|
|
10882
|
+
size: "small"
|
|
10883
|
+
}, React.createElement("span", {
|
|
10884
|
+
style: {
|
|
10885
|
+
padding: '0 10px'
|
|
10886
|
+
}
|
|
10887
|
+
}, this.props.value));
|
|
10888
|
+
} else {
|
|
10889
|
+
return React.createElement("span", {
|
|
10890
|
+
style: {
|
|
10891
|
+
padding: '0 10px'
|
|
10892
|
+
}
|
|
10893
|
+
}, this.props.value);
|
|
10894
|
+
}
|
|
10715
10895
|
}
|
|
10716
10896
|
}]);
|
|
10717
10897
|
|
|
@@ -10739,14 +10919,14 @@ var MyItemNameDiv = /*#__PURE__*/function (_React$Component3) {
|
|
|
10739
10919
|
|
|
10740
10920
|
if (isMyShow) {
|
|
10741
10921
|
if (valueT) {
|
|
10742
|
-
return
|
|
10922
|
+
return React.createElement("span", {
|
|
10743
10923
|
style: {
|
|
10744
10924
|
padding: '0 10px',
|
|
10745
10925
|
color: '#0074ff'
|
|
10746
10926
|
}
|
|
10747
10927
|
}, valueT);
|
|
10748
10928
|
} else {
|
|
10749
|
-
return
|
|
10929
|
+
return React.createElement("span", {
|
|
10750
10930
|
style: {
|
|
10751
10931
|
padding: '0 10px'
|
|
10752
10932
|
}
|
|
@@ -10754,13 +10934,13 @@ var MyItemNameDiv = /*#__PURE__*/function (_React$Component3) {
|
|
|
10754
10934
|
}
|
|
10755
10935
|
} else {
|
|
10756
10936
|
if (valueF) {
|
|
10757
|
-
return
|
|
10937
|
+
return React.createElement("span", {
|
|
10758
10938
|
style: {
|
|
10759
10939
|
padding: '0 10px'
|
|
10760
10940
|
}
|
|
10761
10941
|
}, valueF);
|
|
10762
10942
|
} else {
|
|
10763
|
-
return
|
|
10943
|
+
return React.createElement("span", {
|
|
10764
10944
|
style: {
|
|
10765
10945
|
padding: '0 10px',
|
|
10766
10946
|
color: '#0074ff'
|
|
@@ -10773,6 +10953,38 @@ var MyItemNameDiv = /*#__PURE__*/function (_React$Component3) {
|
|
|
10773
10953
|
|
|
10774
10954
|
return MyItemNameDiv;
|
|
10775
10955
|
}(React.Component);
|
|
10956
|
+
/** 格式搜索结果 */
|
|
10957
|
+
|
|
10958
|
+
|
|
10959
|
+
function formatSearch(value, search) {
|
|
10960
|
+
if (!value || !search) return value;
|
|
10961
|
+
|
|
10962
|
+
var __html = ucoding(value).split(new RegExp(ucoding(search), 'g')).map(function (e) {
|
|
10963
|
+
return dcoding(e);
|
|
10964
|
+
}).join("<span class=\"kts-invoice-operate-goods-list-table-search-protrude\" >".concat(search, "</span>"));
|
|
10965
|
+
|
|
10966
|
+
return React.createElement("span", {
|
|
10967
|
+
dangerouslySetInnerHTML: {
|
|
10968
|
+
__html: __html
|
|
10969
|
+
}
|
|
10970
|
+
});
|
|
10971
|
+
}
|
|
10972
|
+
/** 编码 */
|
|
10973
|
+
|
|
10974
|
+
|
|
10975
|
+
function ucoding(v) {
|
|
10976
|
+
return v.split('').map(function (e) {
|
|
10977
|
+
return "U".concat(e.charCodeAt(0), "E");
|
|
10978
|
+
}).join('');
|
|
10979
|
+
}
|
|
10980
|
+
/** 解码 */
|
|
10981
|
+
|
|
10982
|
+
|
|
10983
|
+
function dcoding(v) {
|
|
10984
|
+
return v.split('U').map(function (e) {
|
|
10985
|
+
return e ? String.fromCharCode(parseInt(e.replace('E', ''))) : '';
|
|
10986
|
+
}).join('');
|
|
10987
|
+
}
|
|
10776
10988
|
|
|
10777
10989
|
var useOnRow = (function () {
|
|
10778
10990
|
/** 控制器 */
|
|
@@ -10970,105 +11182,168 @@ var useRowSelection = (function () {
|
|
|
10970
11182
|
var goodsList = controller.useMemo(function (s) {
|
|
10971
11183
|
return s.goodsListState.goodsList;
|
|
10972
11184
|
}, []);
|
|
11185
|
+
/** 搜索条件 */
|
|
11186
|
+
|
|
11187
|
+
var searchValue = controller.useMemo(function (s) {
|
|
11188
|
+
return s.goodsListState.searchValue;
|
|
11189
|
+
}, []);
|
|
10973
11190
|
/** 是否全选 */
|
|
11191
|
+
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
10974
11192
|
|
|
10975
11193
|
var isAll = controller.useMemo(function (s) {
|
|
10976
|
-
|
|
11194
|
+
if (s.goodsListState.selectedGoodIndex.length <= 0) return false;
|
|
11195
|
+
var seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11196
|
+
return e.$index;
|
|
11197
|
+
});
|
|
11198
|
+
var selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11199
|
+
return seeGoodsIndex.some(function (t) {
|
|
11200
|
+
return e === t;
|
|
11201
|
+
});
|
|
11202
|
+
});
|
|
11203
|
+
return selectedGoodIndex.length === seeGoodsIndex.length;
|
|
11204
|
+
}, []);
|
|
11205
|
+
var indeterminate = controller.useMemo(function (s) {
|
|
11206
|
+
var seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11207
|
+
return e.$index;
|
|
11208
|
+
});
|
|
11209
|
+
var selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11210
|
+
return seeGoodsIndex.some(function (t) {
|
|
11211
|
+
return e === t;
|
|
11212
|
+
});
|
|
11213
|
+
});
|
|
11214
|
+
if (selectedGoodIndex.length === 0) return false;
|
|
11215
|
+
return selectedGoodIndex.length < seeGoodsIndex.length;
|
|
10977
11216
|
}, []);
|
|
10978
11217
|
/** 点击了全选 */
|
|
10979
11218
|
|
|
10980
|
-
var onClickSelectAll = React.useCallback(function () {
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
s.goodsListState.selectedGoodIndex = [];
|
|
10989
|
-
|
|
10990
|
-
case 1:
|
|
10991
|
-
case "end":
|
|
10992
|
-
return _context.stop();
|
|
10993
|
-
}
|
|
11219
|
+
var onClickSelectAll = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
11220
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
11221
|
+
while (1) {
|
|
11222
|
+
switch (_context3.prev = _context3.next) {
|
|
11223
|
+
case 0:
|
|
11224
|
+
if (!isAll) {
|
|
11225
|
+
_context3.next = 5;
|
|
11226
|
+
break;
|
|
10994
11227
|
}
|
|
10995
|
-
}, _callee);
|
|
10996
|
-
}));
|
|
10997
11228
|
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11229
|
+
_context3.next = 3;
|
|
11230
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
11231
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
11232
|
+
var seeGoodsIndex;
|
|
11233
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11234
|
+
while (1) {
|
|
11235
|
+
switch (_context.prev = _context.next) {
|
|
11236
|
+
case 0:
|
|
11237
|
+
seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11238
|
+
return e.$index;
|
|
11239
|
+
});
|
|
11240
|
+
s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11241
|
+
return !seeGoodsIndex.some(function (t) {
|
|
11242
|
+
return e === t;
|
|
11243
|
+
});
|
|
11244
|
+
});
|
|
11012
11245
|
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11246
|
+
case 2:
|
|
11247
|
+
case "end":
|
|
11248
|
+
return _context.stop();
|
|
11249
|
+
}
|
|
11250
|
+
}
|
|
11251
|
+
}, _callee);
|
|
11252
|
+
}));
|
|
11020
11253
|
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11254
|
+
return function (_x) {
|
|
11255
|
+
return _ref2.apply(this, arguments);
|
|
11256
|
+
};
|
|
11257
|
+
}())();
|
|
11258
|
+
|
|
11259
|
+
case 3:
|
|
11260
|
+
_context3.next = 7;
|
|
11261
|
+
break;
|
|
11262
|
+
|
|
11263
|
+
case 5:
|
|
11264
|
+
_context3.next = 7;
|
|
11265
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
11266
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
11267
|
+
var seeGoodsIndex;
|
|
11268
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11269
|
+
while (1) {
|
|
11270
|
+
switch (_context2.prev = _context2.next) {
|
|
11271
|
+
case 0:
|
|
11272
|
+
seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11273
|
+
return e.$index;
|
|
11274
|
+
});
|
|
11275
|
+
s.goodsListState.selectedGoodIndex = [].concat(_toConsumableArray(s.goodsListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
|
|
11276
|
+
s.goodsListState.selectedGoodIndex = Array.from(new Set(s.goodsListState.selectedGoodIndex));
|
|
11277
|
+
|
|
11278
|
+
case 3:
|
|
11279
|
+
case "end":
|
|
11280
|
+
return _context2.stop();
|
|
11281
|
+
}
|
|
11282
|
+
}
|
|
11283
|
+
}, _callee2);
|
|
11284
|
+
}));
|
|
11285
|
+
|
|
11286
|
+
return function (_x2) {
|
|
11287
|
+
return _ref3.apply(this, arguments);
|
|
11288
|
+
};
|
|
11289
|
+
}())();
|
|
11290
|
+
|
|
11291
|
+
case 7:
|
|
11292
|
+
_context3.next = 9;
|
|
11293
|
+
return sortOut(true);
|
|
11294
|
+
|
|
11295
|
+
case 9:
|
|
11296
|
+
case "end":
|
|
11297
|
+
return _context3.stop();
|
|
11298
|
+
}
|
|
11299
|
+
}
|
|
11300
|
+
}, _callee3);
|
|
11301
|
+
})), [controller, isAll]);
|
|
11027
11302
|
var onSelect = React.useCallback( /*#__PURE__*/function () {
|
|
11028
|
-
var
|
|
11029
|
-
return _regeneratorRuntime().wrap(function
|
|
11303
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
|
|
11304
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
11030
11305
|
while (1) {
|
|
11031
|
-
switch (
|
|
11306
|
+
switch (_context6.prev = _context6.next) {
|
|
11032
11307
|
case 0:
|
|
11033
11308
|
if (!selected) {
|
|
11034
|
-
|
|
11309
|
+
_context6.next = 5;
|
|
11035
11310
|
break;
|
|
11036
11311
|
}
|
|
11037
11312
|
|
|
11038
|
-
|
|
11313
|
+
_context6.next = 3;
|
|
11039
11314
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
11040
|
-
var
|
|
11041
|
-
return _regeneratorRuntime().wrap(function
|
|
11315
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
11316
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
11042
11317
|
while (1) {
|
|
11043
|
-
switch (
|
|
11318
|
+
switch (_context4.prev = _context4.next) {
|
|
11044
11319
|
case 0:
|
|
11045
11320
|
s.goodsListState.selectedGoodIndex = [].concat(_toConsumableArray(s.goodsListState.selectedGoodIndex), [record.$index]);
|
|
11046
11321
|
s.goodsListState = _objectSpread2({}, s.goodsListState);
|
|
11047
11322
|
|
|
11048
11323
|
case 2:
|
|
11049
11324
|
case "end":
|
|
11050
|
-
return
|
|
11325
|
+
return _context4.stop();
|
|
11051
11326
|
}
|
|
11052
11327
|
}
|
|
11053
|
-
},
|
|
11328
|
+
}, _callee4);
|
|
11054
11329
|
}));
|
|
11055
11330
|
|
|
11056
11331
|
return function (_x5) {
|
|
11057
|
-
return
|
|
11332
|
+
return _ref5.apply(this, arguments);
|
|
11058
11333
|
};
|
|
11059
11334
|
}())();
|
|
11060
11335
|
|
|
11061
11336
|
case 3:
|
|
11062
|
-
|
|
11337
|
+
_context6.next = 7;
|
|
11063
11338
|
break;
|
|
11064
11339
|
|
|
11065
11340
|
case 5:
|
|
11066
|
-
|
|
11341
|
+
_context6.next = 7;
|
|
11067
11342
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
11068
|
-
var
|
|
11069
|
-
return _regeneratorRuntime().wrap(function
|
|
11343
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
|
|
11344
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
11070
11345
|
while (1) {
|
|
11071
|
-
switch (
|
|
11346
|
+
switch (_context5.prev = _context5.next) {
|
|
11072
11347
|
case 0:
|
|
11073
11348
|
s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11074
11349
|
return e !== record.$index;
|
|
@@ -11077,58 +11352,58 @@ var useRowSelection = (function () {
|
|
|
11077
11352
|
|
|
11078
11353
|
case 2:
|
|
11079
11354
|
case "end":
|
|
11080
|
-
return
|
|
11355
|
+
return _context5.stop();
|
|
11081
11356
|
}
|
|
11082
11357
|
}
|
|
11083
|
-
},
|
|
11358
|
+
}, _callee5);
|
|
11084
11359
|
}));
|
|
11085
11360
|
|
|
11086
11361
|
return function (_x6) {
|
|
11087
|
-
return
|
|
11362
|
+
return _ref6.apply(this, arguments);
|
|
11088
11363
|
};
|
|
11089
11364
|
}())();
|
|
11090
11365
|
|
|
11091
11366
|
case 7:
|
|
11092
|
-
|
|
11367
|
+
_context6.next = 9;
|
|
11093
11368
|
return sortOut(selected);
|
|
11094
11369
|
|
|
11095
11370
|
case 9:
|
|
11096
11371
|
case "end":
|
|
11097
|
-
return
|
|
11372
|
+
return _context6.stop();
|
|
11098
11373
|
}
|
|
11099
11374
|
}
|
|
11100
|
-
},
|
|
11375
|
+
}, _callee6);
|
|
11101
11376
|
}));
|
|
11102
11377
|
|
|
11103
11378
|
return function (_x3, _x4) {
|
|
11104
|
-
return
|
|
11379
|
+
return _ref4.apply(this, arguments);
|
|
11105
11380
|
};
|
|
11106
11381
|
}(), [controller]);
|
|
11107
11382
|
var columnTitle = React.useMemo(function () {
|
|
11108
|
-
return
|
|
11383
|
+
return React.createElement(Checkbox, {
|
|
11109
11384
|
onChange: onClickSelectAll,
|
|
11110
|
-
indeterminate:
|
|
11385
|
+
indeterminate: indeterminate,
|
|
11111
11386
|
checked: isAll
|
|
11112
11387
|
});
|
|
11113
|
-
}, [goodsList, selectedRowKeys, onClickSelectAll, isAll]);
|
|
11388
|
+
}, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
|
|
11114
11389
|
/** 选择了商品后 调整 折扣行 和 被折扣行 */
|
|
11115
11390
|
|
|
11116
11391
|
var sortOut = React.useCallback( /*#__PURE__*/function () {
|
|
11117
|
-
var
|
|
11118
|
-
return _regeneratorRuntime().wrap(function
|
|
11392
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
|
|
11393
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
11119
11394
|
while (1) {
|
|
11120
|
-
switch (
|
|
11395
|
+
switch (_context8.prev = _context8.next) {
|
|
11121
11396
|
case 0:
|
|
11122
|
-
|
|
11397
|
+
_context8.next = 2;
|
|
11123
11398
|
return controller.wait();
|
|
11124
11399
|
|
|
11125
11400
|
case 2:
|
|
11126
|
-
|
|
11401
|
+
_context8.next = 4;
|
|
11127
11402
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
11128
|
-
var
|
|
11129
|
-
return _regeneratorRuntime().wrap(function
|
|
11403
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
|
|
11404
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
11130
11405
|
while (1) {
|
|
11131
|
-
switch (
|
|
11406
|
+
switch (_context7.prev = _context7.next) {
|
|
11132
11407
|
case 0:
|
|
11133
11408
|
s.goodsListState.selectedGoodIndex.forEach(function ($index) {
|
|
11134
11409
|
var goods = s.goodsListState.goodsMap.get($index);
|
|
@@ -11149,27 +11424,27 @@ var useRowSelection = (function () {
|
|
|
11149
11424
|
|
|
11150
11425
|
case 1:
|
|
11151
11426
|
case "end":
|
|
11152
|
-
return
|
|
11427
|
+
return _context7.stop();
|
|
11153
11428
|
}
|
|
11154
11429
|
}
|
|
11155
|
-
},
|
|
11430
|
+
}, _callee7);
|
|
11156
11431
|
}));
|
|
11157
11432
|
|
|
11158
11433
|
return function (_x8) {
|
|
11159
|
-
return
|
|
11434
|
+
return _ref8.apply(this, arguments);
|
|
11160
11435
|
};
|
|
11161
11436
|
}())();
|
|
11162
11437
|
|
|
11163
11438
|
case 4:
|
|
11164
11439
|
case "end":
|
|
11165
|
-
return
|
|
11440
|
+
return _context8.stop();
|
|
11166
11441
|
}
|
|
11167
11442
|
}
|
|
11168
|
-
},
|
|
11443
|
+
}, _callee8);
|
|
11169
11444
|
}));
|
|
11170
11445
|
|
|
11171
11446
|
return function (_x7) {
|
|
11172
|
-
return
|
|
11447
|
+
return _ref7.apply(this, arguments);
|
|
11173
11448
|
};
|
|
11174
11449
|
}(), [controller]);
|
|
11175
11450
|
React.useEffect(function () {
|
|
@@ -11183,8 +11458,8 @@ var useRowSelection = (function () {
|
|
|
11183
11458
|
};
|
|
11184
11459
|
});
|
|
11185
11460
|
|
|
11186
|
-
var css_248z$
|
|
11187
|
-
styleInject(css_248z$
|
|
11461
|
+
var css_248z$7 = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n display: flex;\n gap: 10px;\n padding-right: 10px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n gap: 5px;\n}\n.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 {\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-discount {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import {\n display: flex;\n}\n.kts-invoice-operate-goods-list-table .kts-invoice-operate-goods-list-able-list-itemName-import .ktsAnt3x-btn {\n display: block;\n line-height: 0;\n width: auto;\n padding-right: 5px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-table-body {\n height: 263px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-explain {\n position: absolute;\n right: 6px;\n top: 6px;\n}\n.kts-invoice-operate-goods-list-table table {\n border-bottom: 1px solid #d9d9d9 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td {\n padding: 0 !important;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-explain {\n display: none;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item {\n padding: 0;\n margin: 0;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-form-item .ktsAnt3x-form-item-control {\n line-height: inherit;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-select-selection,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .has-error .ktsAnt3x-input:hover {\n border-right-width: 1px !important;\n border-top-width: 1px;\n border-left-width: 1px;\n border-bottom-width: 1px;\n}\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-selection--single,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-select-auto-complete.ktsAnt3x-select .ktsAnt3x-input:hover,\n.kts-invoice-operate-goods-list-table table > .ktsAnt3x-table-tbody > tr > td .ktsAnt3x-input {\n height: 30px;\n border-radius: 0;\n border-right-width: 0 !important;\n border-top-width: 0;\n border-left-width: 0;\n border-bottom-width: 0;\n box-shadow: none;\n}\n.kts-invoice-operate-goods-list-table-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n";
|
|
11462
|
+
styleInject(css_248z$7);
|
|
11188
11463
|
|
|
11189
11464
|
var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
11190
11465
|
_inherits(GoodsList, _React$Component);
|
|
@@ -11200,7 +11475,7 @@ var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
|
11200
11475
|
_createClass(GoodsList, [{
|
|
11201
11476
|
key: "render",
|
|
11202
11477
|
value: function render() {
|
|
11203
|
-
return
|
|
11478
|
+
return React.createElement(Main, _objectSpread2({}, this.props));
|
|
11204
11479
|
}
|
|
11205
11480
|
}]);
|
|
11206
11481
|
|
|
@@ -11215,6 +11490,15 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
11215
11490
|
var isprefab = controller.useMemo(function (s) {
|
|
11216
11491
|
return s.model === 'prefab';
|
|
11217
11492
|
}, []);
|
|
11493
|
+
var dataSource = controller.useMemo(function (s) {
|
|
11494
|
+
return s.goodsListState.goodsList;
|
|
11495
|
+
}, []);
|
|
11496
|
+
var searchValue = controller.useMemo(function (s) {
|
|
11497
|
+
return s.goodsListState.searchValue;
|
|
11498
|
+
}, []);
|
|
11499
|
+
var dataSourceSearch = React.useMemo(function () {
|
|
11500
|
+
return controller.getGoodsSearch(dataSource, searchValue);
|
|
11501
|
+
}, [dataSource, searchValue, controller]);
|
|
11218
11502
|
/** 表格行事件 */
|
|
11219
11503
|
|
|
11220
11504
|
var _onRow = useOnRow();
|
|
@@ -11273,7 +11557,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
11273
11557
|
}, [controller, props.form]); // 跟新 货物
|
|
11274
11558
|
|
|
11275
11559
|
React.useEffect(function () {
|
|
11276
|
-
controller.
|
|
11560
|
+
controller.run( /*#__PURE__*/function () {
|
|
11277
11561
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
11278
11562
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
11279
11563
|
while (1) {
|
|
@@ -11295,7 +11579,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
11295
11579
|
return function (_x4) {
|
|
11296
11580
|
return _ref3.apply(this, arguments);
|
|
11297
11581
|
};
|
|
11298
|
-
}())
|
|
11582
|
+
}());
|
|
11299
11583
|
}, [controller, goodsList]);
|
|
11300
11584
|
/** props 产品最大数 更新 */
|
|
11301
11585
|
|
|
@@ -11369,22 +11653,22 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
11369
11653
|
};
|
|
11370
11654
|
}())();
|
|
11371
11655
|
}, [controller, props.isSwitchTax]);
|
|
11372
|
-
return
|
|
11656
|
+
return React.createElement("div", {
|
|
11373
11657
|
className: "kts-invoice-operate-goods-list",
|
|
11374
11658
|
onClick: function onClick(e) {
|
|
11375
11659
|
e.stopPropagation();
|
|
11376
11660
|
}
|
|
11377
|
-
},
|
|
11661
|
+
}, React.createElement("div", {
|
|
11378
11662
|
className: "kts-invoice-operate-goods-list-able"
|
|
11379
|
-
},
|
|
11663
|
+
}, React.createElement("div", {
|
|
11380
11664
|
className: "kts-invoice-operate-goods-list-able-list"
|
|
11381
|
-
},
|
|
11665
|
+
}, React.createElement(AddRowButton, null), React.createElement(BulkMenu, null), React.createElement(Search, null)), React.createElement("div", {
|
|
11382
11666
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
11383
|
-
}, props.menuExpansion,
|
|
11667
|
+
}, props.menuExpansion, React.createElement(DescribeSwitch, null), React.createElement(TaxIncludedSwitch, null))), React.createElement("div", {
|
|
11384
11668
|
className: classnames('kts-invoice-operate-goods-list-table', {
|
|
11385
11669
|
'kts-invoice-operate-prefab': isprefab
|
|
11386
11670
|
})
|
|
11387
|
-
},
|
|
11671
|
+
}, React.createElement(TableVirtual, {
|
|
11388
11672
|
bordered: true,
|
|
11389
11673
|
size: "small",
|
|
11390
11674
|
rowKey: "$index",
|
|
@@ -11397,9 +11681,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
11397
11681
|
row: TableRow
|
|
11398
11682
|
}
|
|
11399
11683
|
},
|
|
11400
|
-
dataSource:
|
|
11401
|
-
return s.goodsListState.goodsList;
|
|
11402
|
-
}, [controller]),
|
|
11684
|
+
dataSource: dataSourceSearch,
|
|
11403
11685
|
columns: useColumns(props.form),
|
|
11404
11686
|
rowSelection: useRowSelection(),
|
|
11405
11687
|
onRow: function onRow(record) {
|
|
@@ -11409,11 +11691,11 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
11409
11691
|
}
|
|
11410
11692
|
};
|
|
11411
11693
|
}
|
|
11412
|
-
})),
|
|
11694
|
+
})), React.createElement("div", null, React.createElement(Statistics, null)));
|
|
11413
11695
|
});
|
|
11414
11696
|
|
|
11415
|
-
var css_248z$
|
|
11416
|
-
styleInject(css_248z$
|
|
11697
|
+
var css_248z$8 = ".kts-invoice-operate-seller {\n display: flex;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message {\n flex: 1;\n display: flex;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list {\n width: 100%;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-label::before {\n content: '*';\n position: relative;\n color: red;\n font-weight: bold;\n margin-right: 2px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 30px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-message .kts-invoice-operate-seller-message-list .ktsAnt3x-form-explain {\n position: absolute;\n right: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks-value {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-remarks-value textarea {\n flex: 1;\n margin-bottom: 0;\n border: none;\n border-radius: 0;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-seller .kts-invoice-operate-seller-title label {\n display: table-cell;\n vertical-align: middle;\n}\n";
|
|
11698
|
+
styleInject(css_248z$8);
|
|
11417
11699
|
|
|
11418
11700
|
var TextArea = Input.TextArea;
|
|
11419
11701
|
|
|
@@ -11434,7 +11716,7 @@ var Buyer = /*#__PURE__*/function (_React$Component) {
|
|
|
11434
11716
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
11435
11717
|
|
|
11436
11718
|
_this.render = function () {
|
|
11437
|
-
return
|
|
11719
|
+
return React.createElement(Main$1, _objectSpread2({}, _this.props));
|
|
11438
11720
|
};
|
|
11439
11721
|
|
|
11440
11722
|
return _this;
|
|
@@ -11465,7 +11747,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
11465
11747
|
return [{
|
|
11466
11748
|
id: 'sellerName',
|
|
11467
11749
|
label: '销售方名称',
|
|
11468
|
-
node:
|
|
11750
|
+
node: React.createElement(Input, {
|
|
11469
11751
|
readOnly: model === 'prefab',
|
|
11470
11752
|
size: "small"
|
|
11471
11753
|
}),
|
|
@@ -11478,7 +11760,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
11478
11760
|
}, {
|
|
11479
11761
|
id: 'sellerNo',
|
|
11480
11762
|
label: '销售方纳税人识别号',
|
|
11481
|
-
node:
|
|
11763
|
+
node: React.createElement(Input, {
|
|
11482
11764
|
readOnly: model === 'prefab',
|
|
11483
11765
|
size: "small"
|
|
11484
11766
|
}),
|
|
@@ -11491,7 +11773,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
11491
11773
|
}, {
|
|
11492
11774
|
id: 'sellerAddress',
|
|
11493
11775
|
label: '销售方地址及电话',
|
|
11494
|
-
node:
|
|
11776
|
+
node: React.createElement(Input, {
|
|
11495
11777
|
readOnly: model === 'prefab',
|
|
11496
11778
|
size: "small"
|
|
11497
11779
|
}),
|
|
@@ -11504,7 +11786,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
11504
11786
|
}, {
|
|
11505
11787
|
id: 'sellerBank',
|
|
11506
11788
|
label: '销售方开户行及账号',
|
|
11507
|
-
node:
|
|
11789
|
+
node: React.createElement(Input, {
|
|
11508
11790
|
readOnly: model === 'prefab',
|
|
11509
11791
|
size: "small"
|
|
11510
11792
|
}),
|
|
@@ -11530,35 +11812,35 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
11530
11812
|
return getFieldDecorator(e.id, e.options)(e.node);
|
|
11531
11813
|
}
|
|
11532
11814
|
}, [props.formRender]);
|
|
11533
|
-
return
|
|
11815
|
+
return React.createElement(Form, null, React.createElement("div", {
|
|
11534
11816
|
className: "kts-invoice-operate-seller"
|
|
11535
|
-
},
|
|
11817
|
+
}, React.createElement("div", {
|
|
11536
11818
|
className: "kts-invoice-operate-seller-message"
|
|
11537
|
-
},
|
|
11819
|
+
}, React.createElement("div", {
|
|
11538
11820
|
className: "kts-invoice-operate-seller-title"
|
|
11539
|
-
},
|
|
11821
|
+
}, React.createElement("label", null, "\u9500\u552E\u65B9")), React.createElement(Descriptions, {
|
|
11540
11822
|
className: "kts-invoice-operate-seller-message-list",
|
|
11541
11823
|
size: "small",
|
|
11542
11824
|
column: 1,
|
|
11543
11825
|
bordered: true
|
|
11544
11826
|
}, formItem.map(function (e, i) {
|
|
11545
|
-
return
|
|
11827
|
+
return React.createElement(Descriptions.Item, {
|
|
11546
11828
|
key: i,
|
|
11547
11829
|
label: e.label
|
|
11548
|
-
},
|
|
11549
|
-
}))),
|
|
11830
|
+
}, React.createElement(Form.Item, null, createFormItem(e)));
|
|
11831
|
+
}))), React.createElement("div", {
|
|
11550
11832
|
className: "kts-invoice-operate-seller-remarks"
|
|
11551
|
-
},
|
|
11833
|
+
}, React.createElement("div", {
|
|
11552
11834
|
className: "kts-invoice-operate-seller-title"
|
|
11553
|
-
},
|
|
11835
|
+
}, React.createElement("label", null, "\u5907\u6CE8")), React.createElement("div", {
|
|
11554
11836
|
className: "kts-invoice-operate-seller-remarks-value"
|
|
11555
11837
|
}, getFieldDecorator('remarks', {
|
|
11556
11838
|
initialValue: props.defaultsellerRemarks
|
|
11557
|
-
})(
|
|
11839
|
+
})(React.createElement(TextArea, null))))));
|
|
11558
11840
|
});
|
|
11559
11841
|
|
|
11560
|
-
var css_248z$
|
|
11561
|
-
styleInject(css_248z$
|
|
11842
|
+
var css_248z$9 = ".kts-invoice-operate-sign form {\n display: flex;\n}\n.kts-invoice-operate-sign form .ktsAnt3x-row.ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-sign form > div {\n flex: 1;\n text-align: center;\n}\n";
|
|
11843
|
+
styleInject(css_248z$9);
|
|
11562
11844
|
|
|
11563
11845
|
var Sign = decorator(Form.create())(function (props) {
|
|
11564
11846
|
var form = props.form;
|
|
@@ -11571,21 +11853,21 @@ var Sign = decorator(Form.create())(function (props) {
|
|
|
11571
11853
|
}, []); // 注册 form
|
|
11572
11854
|
|
|
11573
11855
|
controller.useForm('sign', form);
|
|
11574
|
-
return
|
|
11856
|
+
return React.createElement("div", {
|
|
11575
11857
|
className: "kts-invoice-operate-sign"
|
|
11576
|
-
},
|
|
11858
|
+
}, React.createElement(Form, _objectSpread2({}, formItemLayout), React.createElement("div", null, React.createElement(Form.Item, {
|
|
11577
11859
|
label: "\u6536\u6B3E\u4EBA"
|
|
11578
11860
|
}, getFieldDecorator('payee', {
|
|
11579
11861
|
initialValue: props.defaultPayee
|
|
11580
|
-
})(
|
|
11862
|
+
})(React.createElement(Input, {
|
|
11581
11863
|
size: "small"
|
|
11582
|
-
})))),
|
|
11864
|
+
})))), React.createElement("div", null, React.createElement(Form.Item, {
|
|
11583
11865
|
label: "\u590D\u6838\u4EBA"
|
|
11584
11866
|
}, getFieldDecorator('reviewer', {
|
|
11585
11867
|
initialValue: props.defaultReviewer
|
|
11586
|
-
})(
|
|
11868
|
+
})(React.createElement(Input, {
|
|
11587
11869
|
size: "small"
|
|
11588
|
-
})))),
|
|
11870
|
+
})))), React.createElement("div", null, React.createElement(Form.Item, {
|
|
11589
11871
|
label: "\u5F00\u7968\u4EBA"
|
|
11590
11872
|
}, getFieldDecorator('issuer', {
|
|
11591
11873
|
initialValue: props.defaultIssuer,
|
|
@@ -11593,7 +11875,7 @@ var Sign = decorator(Form.create())(function (props) {
|
|
|
11593
11875
|
required: true,
|
|
11594
11876
|
message: '请输入开票人'
|
|
11595
11877
|
}]
|
|
11596
|
-
})(
|
|
11878
|
+
})(React.createElement(Input, {
|
|
11597
11879
|
size: "small"
|
|
11598
11880
|
}))))));
|
|
11599
11881
|
});
|
|
@@ -11630,7 +11912,7 @@ var ImportBuyerButton = (function () {
|
|
|
11630
11912
|
};
|
|
11631
11913
|
}())();
|
|
11632
11914
|
}, [controller]);
|
|
11633
|
-
return
|
|
11915
|
+
return React.createElement(React.Fragment, null, controller.getBuyerList && React.createElement(Button, {
|
|
11634
11916
|
type: "link",
|
|
11635
11917
|
icon: "plus-circle",
|
|
11636
11918
|
onClick: onClick
|
|
@@ -11669,29 +11951,29 @@ var BuyerNameInput = (function (props) {
|
|
|
11669
11951
|
var content = React.useMemo(function () {
|
|
11670
11952
|
var _dataSource$recent;
|
|
11671
11953
|
|
|
11672
|
-
return
|
|
11954
|
+
return React.createElement("div", {
|
|
11673
11955
|
className: 'kts-invoice-operate-buyer-name-content'
|
|
11674
|
-
}, loading ?
|
|
11956
|
+
}, loading ? React.createElement("div", {
|
|
11675
11957
|
style: {
|
|
11676
11958
|
textAlign: 'center'
|
|
11677
11959
|
}
|
|
11678
|
-
},
|
|
11960
|
+
}, React.createElement(Spin, null)) : React.createElement(React.Fragment, null, React.createElement("div", {
|
|
11679
11961
|
className: 'kts-invoice-operate-buyer-name-content-block',
|
|
11680
11962
|
style: {
|
|
11681
11963
|
padding: '14px 10px'
|
|
11682
11964
|
}
|
|
11683
|
-
},
|
|
11965
|
+
}, React.createElement("label", {
|
|
11684
11966
|
style: {
|
|
11685
11967
|
marginBottom: 10
|
|
11686
11968
|
}
|
|
11687
|
-
}, "\u6700\u8FD1\u5F00\u5177"),
|
|
11969
|
+
}, "\u6700\u8FD1\u5F00\u5177"), React.createElement("ul", {
|
|
11688
11970
|
className: 'kts-invoice-operate-buyer-name-content-recently-issued'
|
|
11689
|
-
}, !dataSource.recent || dataSource.recent.length <= 0 ?
|
|
11971
|
+
}, !dataSource.recent || dataSource.recent.length <= 0 ? React.createElement(Empty, {
|
|
11690
11972
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
11691
11973
|
}) : (_dataSource$recent = dataSource.recent) === null || _dataSource$recent === void 0 ? void 0 : _dataSource$recent.map(function (e, i) {
|
|
11692
11974
|
var _dataSource$recent$le, _dataSource$recent2;
|
|
11693
11975
|
|
|
11694
|
-
return
|
|
11976
|
+
return React.createElement("li", {
|
|
11695
11977
|
key: i,
|
|
11696
11978
|
onClick: function onClick() {
|
|
11697
11979
|
onClickItem(e);
|
|
@@ -11699,37 +11981,37 @@ var BuyerNameInput = (function (props) {
|
|
|
11699
11981
|
style: {
|
|
11700
11982
|
marginBottom: interval(i, (_dataSource$recent$le = (_dataSource$recent2 = dataSource.recent) === null || _dataSource$recent2 === void 0 ? void 0 : _dataSource$recent2.length) !== null && _dataSource$recent$le !== void 0 ? _dataSource$recent$le : 0)
|
|
11701
11983
|
}
|
|
11702
|
-
},
|
|
11703
|
-
}))),
|
|
11984
|
+
}, React.createElement(MyTag, null, e.buyerName));
|
|
11985
|
+
}))), React.createElement(Divider, {
|
|
11704
11986
|
style: {
|
|
11705
11987
|
margin: "0 6px"
|
|
11706
11988
|
}
|
|
11707
|
-
}),
|
|
11989
|
+
}), React.createElement("div", {
|
|
11708
11990
|
className: 'kts-invoice-operate-buyer-name-content-block',
|
|
11709
11991
|
style: {
|
|
11710
11992
|
padding: '14px 10px 4px'
|
|
11711
11993
|
}
|
|
11712
|
-
},
|
|
11994
|
+
}, React.createElement("label", {
|
|
11713
11995
|
style: {
|
|
11714
11996
|
padding: '0 10px'
|
|
11715
11997
|
}
|
|
11716
|
-
}, "\u9009\u62E9\u516C\u53F8"),
|
|
11998
|
+
}, "\u9009\u62E9\u516C\u53F8"), React.createElement("div", {
|
|
11717
11999
|
style: {
|
|
11718
12000
|
maxHeight: 200,
|
|
11719
12001
|
overflow: "auto"
|
|
11720
12002
|
}
|
|
11721
|
-
}, !dataSource.list || dataSource.list.length <= 0 ?
|
|
12003
|
+
}, !dataSource.list || dataSource.list.length <= 0 ? React.createElement(Empty, {
|
|
11722
12004
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
11723
12005
|
}) : dataSource.list.map(function (e, i) {
|
|
11724
|
-
return
|
|
12006
|
+
return React.createElement("ul", {
|
|
11725
12007
|
key: i,
|
|
11726
12008
|
onClick: function onClick() {
|
|
11727
12009
|
onClickItem(e);
|
|
11728
12010
|
},
|
|
11729
12011
|
className: 'kts-invoice-operate-buyer-name-content-select-company'
|
|
11730
|
-
},
|
|
12012
|
+
}, React.createElement("li", {
|
|
11731
12013
|
title: e.buyerName
|
|
11732
|
-
}, e.buyerName),
|
|
12014
|
+
}, e.buyerName), React.createElement("li", {
|
|
11733
12015
|
title: e.buyerNo
|
|
11734
12016
|
}, e.buyerNo));
|
|
11735
12017
|
})))));
|
|
@@ -11770,7 +12052,7 @@ var BuyerNameInput = (function (props) {
|
|
|
11770
12052
|
}, [visible, props.value]);
|
|
11771
12053
|
|
|
11772
12054
|
if (model === 'prefab' || !autoContainer) {
|
|
11773
|
-
return
|
|
12055
|
+
return React.createElement(Input, {
|
|
11774
12056
|
size: "small",
|
|
11775
12057
|
autoComplete: "off",
|
|
11776
12058
|
value: props.value,
|
|
@@ -11781,14 +12063,14 @@ var BuyerNameInput = (function (props) {
|
|
|
11781
12063
|
});
|
|
11782
12064
|
}
|
|
11783
12065
|
|
|
11784
|
-
return
|
|
12066
|
+
return React.createElement(Popover, {
|
|
11785
12067
|
onVisibleChange: setVisible,
|
|
11786
12068
|
overlayClassName: 'kts-invoice-operate-buyer-name-popover',
|
|
11787
12069
|
placement: "bottomLeft",
|
|
11788
12070
|
trigger: "click",
|
|
11789
12071
|
visible: visible,
|
|
11790
12072
|
content: content
|
|
11791
|
-
},
|
|
12073
|
+
}, React.createElement(Input, {
|
|
11792
12074
|
size: "small",
|
|
11793
12075
|
autoComplete: "off",
|
|
11794
12076
|
value: props.value,
|
|
@@ -11866,7 +12148,7 @@ function useDataSource() {
|
|
|
11866
12148
|
}
|
|
11867
12149
|
|
|
11868
12150
|
function MyTag(props) {
|
|
11869
|
-
return
|
|
12151
|
+
return React.createElement("span", {
|
|
11870
12152
|
className: 'kts-invoice-operate-buyer-name-content-tag',
|
|
11871
12153
|
title: props.children
|
|
11872
12154
|
}, props.children);
|
|
@@ -11880,8 +12162,8 @@ function interval(i, t) {
|
|
|
11880
12162
|
}
|
|
11881
12163
|
}
|
|
11882
12164
|
|
|
11883
|
-
var css_248z$
|
|
11884
|
-
styleInject(css_248z$
|
|
12165
|
+
var css_248z$a = ".kts-invoice-operate-buyer {\n display: flex;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message {\n flex: 1;\n display: flex;\n position: relative;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .ktsAnt3x-descriptions-item-label {\n width: 179px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list {\n width: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-view {\n border: none;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-label {\n padding: 0 10px;\n font-size: 12px;\n background-color: #fff;\n line-height: 30px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content {\n padding: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input {\n box-shadow: none;\n border-color: #fff;\n border-radius: 0;\n padding: 0 10px;\n font-size: 12px;\n line-height: 30px;\n width: 100%;\n height: 100%;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .ktsAnt3x-input:hover {\n border: 1 solid;\n border-color: #40a9ff;\n border-right-width: 1px !important;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input,\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-descriptions-item-content .has-error .ktsAnt3x-input:hover {\n background-color: #fff;\n border: 1 solid;\n border-color: #f5222d;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-control {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children {\n height: 30px;\n display: block;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-item-children .ktsAnt3x-btn {\n line-height: 0;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-list .ktsAnt3x-form-explain {\n position: absolute;\n left: 5px;\n top: 6px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-message .kts-invoice-operate-buyer-message-Import {\n position: absolute;\n right: 0px;\n top: 0px;\n z-index: 10;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-password {\n border-left: 1px solid #dcdcdc;\n display: flex;\n flex: none;\n width: 458px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title {\n flex: none;\n width: 30px;\n height: 100%;\n text-align: center;\n border-right: 1px solid #dcdcdc;\n display: table;\n padding: 0 5px;\n}\n.kts-invoice-operate-buyer .kts-invoice-operate-buyer-title label {\n display: table-cell;\n vertical-align: middle;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover {\n padding-top: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-inner-content {\n padding: 6px 0;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .ktsAnt3x-popover-arrow {\n display: none;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content {\n width: 567px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block {\n padding: 14px 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-block label {\n display: block;\n font-size: 12px;\n color: #666666;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued {\n padding: 0;\n margin: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued li {\n list-style: none;\n width: 50%;\n float: left;\n margin-bottom: 20px;\n padding: 0 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-recently-issued::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company {\n padding: 0;\n margin: 0;\n font-size: 12px;\n padding: 10px;\n font-weight: bold;\n color: #000000;\n cursor: pointer;\n transition: background 0.4s;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:hover {\n background: #e6e6e6e6;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company:last-child {\n margin-bottom: 0;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company li {\n list-style: none;\n width: 50%;\n float: left;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding-right: 10px;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content .kts-invoice-operate-buyer-name-content-select-company::after {\n content: \".\";\n display: block;\n height: 0;\n clear: left;\n visibility: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag {\n line-height: 1;\n padding: 4px 12px;\n background: #F3F3F3;\n border-radius: 9999px;\n font-size: 12px;\n font-weight: bold;\n color: #000;\n cursor: pointer;\n transition: background 0.4s;\n display: inline-block;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.ktsAnt3x-popover.kts-invoice-operate-buyer-name-popover .kts-invoice-operate-buyer-name-content-tag:hover {\n background: #e6e6e6e6;\n}\n";
|
|
12166
|
+
styleInject(css_248z$a);
|
|
11885
12167
|
|
|
11886
12168
|
var Text$6 = Typography.Text;
|
|
11887
12169
|
|
|
@@ -11902,7 +12184,7 @@ var Buyer$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
11902
12184
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
11903
12185
|
|
|
11904
12186
|
_this.render = function () {
|
|
11905
|
-
return
|
|
12187
|
+
return React.createElement(Main$2, _objectSpread2({}, _this.props));
|
|
11906
12188
|
};
|
|
11907
12189
|
|
|
11908
12190
|
return _this;
|
|
@@ -11933,7 +12215,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11933
12215
|
return [{
|
|
11934
12216
|
id: 'buyerName',
|
|
11935
12217
|
label: '购买方名称',
|
|
11936
|
-
node:
|
|
12218
|
+
node: React.createElement(Input, {
|
|
11937
12219
|
size: "small",
|
|
11938
12220
|
autoComplete: "off",
|
|
11939
12221
|
readOnly: model === 'prefab'
|
|
@@ -11947,7 +12229,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11947
12229
|
}, {
|
|
11948
12230
|
id: 'buyerNo',
|
|
11949
12231
|
label: '购买方纳税人识别号',
|
|
11950
|
-
node:
|
|
12232
|
+
node: React.createElement(Input, {
|
|
11951
12233
|
size: "small",
|
|
11952
12234
|
autoComplete: "off",
|
|
11953
12235
|
readOnly: model === 'prefab'
|
|
@@ -11961,7 +12243,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11961
12243
|
}, {
|
|
11962
12244
|
id: 'buyerAddress',
|
|
11963
12245
|
label: '购买方地址及电话',
|
|
11964
|
-
node:
|
|
12246
|
+
node: React.createElement(Input, {
|
|
11965
12247
|
size: "small",
|
|
11966
12248
|
autoComplete: "off",
|
|
11967
12249
|
readOnly: model === 'prefab'
|
|
@@ -11975,7 +12257,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11975
12257
|
}, {
|
|
11976
12258
|
id: 'buyerBank',
|
|
11977
12259
|
label: '购买方开户行及账号',
|
|
11978
|
-
node:
|
|
12260
|
+
node: React.createElement(Input, {
|
|
11979
12261
|
size: "small",
|
|
11980
12262
|
autoComplete: "off",
|
|
11981
12263
|
readOnly: model === 'prefab'
|
|
@@ -11997,7 +12279,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11997
12279
|
if (e.options.rules.some(function (e) {
|
|
11998
12280
|
return e.required;
|
|
11999
12281
|
})) {
|
|
12000
|
-
return
|
|
12282
|
+
return React.createElement(React.Fragment, null, React.createElement(Text$6, {
|
|
12001
12283
|
type: "danger"
|
|
12002
12284
|
}, "*"), e.label);
|
|
12003
12285
|
} else {
|
|
@@ -12007,29 +12289,29 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
12007
12289
|
return e.label;
|
|
12008
12290
|
}
|
|
12009
12291
|
}, []);
|
|
12010
|
-
return
|
|
12292
|
+
return React.createElement(Form, null, React.createElement("div", {
|
|
12011
12293
|
className: "kts-invoice-operate-buyer"
|
|
12012
|
-
},
|
|
12294
|
+
}, React.createElement("div", {
|
|
12013
12295
|
className: "kts-invoice-operate-buyer-message"
|
|
12014
|
-
},
|
|
12296
|
+
}, React.createElement("div", {
|
|
12015
12297
|
className: "kts-invoice-operate-buyer-title"
|
|
12016
|
-
},
|
|
12298
|
+
}, React.createElement("label", null, "\u8D2D\u4E70\u65B9")), React.createElement("div", {
|
|
12017
12299
|
className: "kts-invoice-operate-buyer-message-Import"
|
|
12018
|
-
}, model !== 'prefab' &&
|
|
12300
|
+
}, model !== 'prefab' && React.createElement(ImportBuyerButton, null)), React.createElement(Descriptions, {
|
|
12019
12301
|
className: "kts-invoice-operate-buyer-message-list",
|
|
12020
12302
|
size: "small",
|
|
12021
12303
|
column: 1,
|
|
12022
12304
|
bordered: true
|
|
12023
12305
|
}, formItem.map(function (item, i) {
|
|
12024
|
-
return
|
|
12306
|
+
return React.createElement(Descriptions.Item, {
|
|
12025
12307
|
key: i,
|
|
12026
12308
|
label: getlabel(item)
|
|
12027
|
-
},
|
|
12028
|
-
}))),
|
|
12309
|
+
}, React.createElement(Form.Item, null, getFieldDecorator(item.id, item.options)(autoContainer ? item.id === 'buyerName' ? React.createElement(BuyerNameInput, null) : item.node : item.node)));
|
|
12310
|
+
}))), React.createElement("div", {
|
|
12029
12311
|
className: "kts-invoice-operate-buyer-password"
|
|
12030
|
-
},
|
|
12312
|
+
}, React.createElement("div", {
|
|
12031
12313
|
className: "kts-invoice-operate-buyer-title"
|
|
12032
|
-
},
|
|
12314
|
+
}, React.createElement("label", null, "\u5BC6\u7801\u533A")), React.createElement("div", null))));
|
|
12033
12315
|
});
|
|
12034
12316
|
|
|
12035
12317
|
var ImportBuyerDrawer = (function () {
|
|
@@ -12063,7 +12345,7 @@ var ImportBuyerDrawer = (function () {
|
|
|
12063
12345
|
};
|
|
12064
12346
|
}())();
|
|
12065
12347
|
}, [controller]);
|
|
12066
|
-
return
|
|
12348
|
+
return React.createElement(Drawer, {
|
|
12067
12349
|
title: "\u8D2D\u65B9\u5217\u8868",
|
|
12068
12350
|
placement: "right",
|
|
12069
12351
|
// closable={false}
|
|
@@ -12071,7 +12353,7 @@ var ImportBuyerDrawer = (function () {
|
|
|
12071
12353
|
width: 983,
|
|
12072
12354
|
onClose: onClose,
|
|
12073
12355
|
visible: visible
|
|
12074
|
-
}, topExpand,
|
|
12356
|
+
}, topExpand, React.createElement(DrawerBody$1, null));
|
|
12075
12357
|
});
|
|
12076
12358
|
|
|
12077
12359
|
var DrawerBody$1 = function DrawerBody() {
|
|
@@ -12092,7 +12374,7 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
12092
12374
|
}
|
|
12093
12375
|
});
|
|
12094
12376
|
}, [controller]);
|
|
12095
|
-
return
|
|
12377
|
+
return React.createElement(Table, {
|
|
12096
12378
|
bordered: true,
|
|
12097
12379
|
size: "small",
|
|
12098
12380
|
columns: columns,
|
|
@@ -12193,7 +12475,7 @@ var ImportGoodsDrawer = (function () {
|
|
|
12193
12475
|
};
|
|
12194
12476
|
}())();
|
|
12195
12477
|
}, [controller]);
|
|
12196
|
-
return
|
|
12478
|
+
return React.createElement(Drawer, {
|
|
12197
12479
|
title: "\u5546\u54C1\u5217\u8868",
|
|
12198
12480
|
placement: "right",
|
|
12199
12481
|
// closable={false}
|
|
@@ -12201,11 +12483,11 @@ var ImportGoodsDrawer = (function () {
|
|
|
12201
12483
|
width: 983,
|
|
12202
12484
|
onClose: onClose,
|
|
12203
12485
|
visible: visible
|
|
12204
|
-
}, topExpand &&
|
|
12486
|
+
}, topExpand && React.createElement("div", {
|
|
12205
12487
|
style: {
|
|
12206
12488
|
marginBottom: 10
|
|
12207
12489
|
}
|
|
12208
|
-
}, topExpand),
|
|
12490
|
+
}, topExpand), React.createElement(DrawerBody$2, null));
|
|
12209
12491
|
});
|
|
12210
12492
|
|
|
12211
12493
|
var DrawerBody$2 = function DrawerBody() {
|
|
@@ -12227,7 +12509,7 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
12227
12509
|
}
|
|
12228
12510
|
});
|
|
12229
12511
|
}, [controller]);
|
|
12230
|
-
return
|
|
12512
|
+
return React.createElement(Table, {
|
|
12231
12513
|
bordered: true,
|
|
12232
12514
|
size: "small",
|
|
12233
12515
|
columns: columns,
|
|
@@ -12307,13 +12589,12 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
12307
12589
|
|
|
12308
12590
|
|
|
12309
12591
|
if (s.goodsListState.isMyShow) {
|
|
12310
|
-
s.goodsListState.form.setFieldsValue(editGood);
|
|
12311
|
-
} else {
|
|
12312
12592
|
s.goodsListState.form.setFieldsValue(_objectSpread2(_objectSpread2({}, editGood), {}, {
|
|
12313
|
-
itemName: editGood.
|
|
12314
|
-
|
|
12315
|
-
itemModelName: editGood.itemModelNameOther
|
|
12593
|
+
itemName: editGood.itemNameSelf,
|
|
12594
|
+
itemModelName: editGood.itemModelNameSelf
|
|
12316
12595
|
}));
|
|
12596
|
+
} else {
|
|
12597
|
+
s.goodsListState.form.setFieldsValue(_objectSpread2({}, editGood));
|
|
12317
12598
|
}
|
|
12318
12599
|
|
|
12319
12600
|
s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
@@ -12363,10 +12644,10 @@ var getItemName$1 = function getItemName(record, editGood) {
|
|
|
12363
12644
|
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12364
12645
|
}
|
|
12365
12646
|
|
|
12366
|
-
shorthand = (_getSN = getSN(editGood.
|
|
12647
|
+
shorthand = (_getSN = getSN(editGood.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand;
|
|
12367
12648
|
|
|
12368
12649
|
if (shorthand) {
|
|
12369
|
-
return "*".concat(shorthand, "*").concat(record.
|
|
12650
|
+
return "*".concat(shorthand, "*").concat(record.itemNameSelf);
|
|
12370
12651
|
}
|
|
12371
12652
|
|
|
12372
12653
|
return record.itemName;
|
|
@@ -12374,15 +12655,15 @@ var getItemName$1 = function getItemName(record, editGood) {
|
|
|
12374
12655
|
|
|
12375
12656
|
|
|
12376
12657
|
var getItemNameOther = function getItemNameOther(record, editGood) {
|
|
12377
|
-
if (!editGood.
|
|
12658
|
+
if (!editGood.itemName) return editGood.itemName;
|
|
12378
12659
|
var shorthand;
|
|
12379
12660
|
shorthand = record.shorthand;
|
|
12380
12661
|
|
|
12381
12662
|
if (shorthand) {
|
|
12382
|
-
return "*".concat(shorthand, "*").concat(record.
|
|
12663
|
+
return "*".concat(shorthand, "*").concat(record.itemNameSelf);
|
|
12383
12664
|
}
|
|
12384
12665
|
|
|
12385
|
-
return record.
|
|
12666
|
+
return record.itemName;
|
|
12386
12667
|
};
|
|
12387
12668
|
|
|
12388
12669
|
/**
|
|
@@ -12436,8 +12717,8 @@ function cutStr(str, L) {
|
|
|
12436
12717
|
}
|
|
12437
12718
|
}
|
|
12438
12719
|
|
|
12439
|
-
var css_248z$
|
|
12440
|
-
styleInject(css_248z$
|
|
12720
|
+
var css_248z$b = ".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";
|
|
12721
|
+
styleInject(css_248z$b);
|
|
12441
12722
|
|
|
12442
12723
|
var TreeNode = Tree.TreeNode;
|
|
12443
12724
|
var confirm = Modal.confirm;
|
|
@@ -12541,7 +12822,7 @@ var EndowCodeDrawer = (function () {
|
|
|
12541
12822
|
setDefaultValue(undefined);
|
|
12542
12823
|
}
|
|
12543
12824
|
}, [visible]);
|
|
12544
|
-
return
|
|
12825
|
+
return React.createElement(Drawer, {
|
|
12545
12826
|
title: "\u8D4B\u7801",
|
|
12546
12827
|
placement: "right",
|
|
12547
12828
|
destroyOnClose: true,
|
|
@@ -12549,7 +12830,7 @@ var EndowCodeDrawer = (function () {
|
|
|
12549
12830
|
width: 383,
|
|
12550
12831
|
onClose: onClose,
|
|
12551
12832
|
visible: visible
|
|
12552
|
-
}, defaultValue &&
|
|
12833
|
+
}, defaultValue && React.createElement(DrawerBody$3, {
|
|
12553
12834
|
defaultValue: defaultValue
|
|
12554
12835
|
}));
|
|
12555
12836
|
});
|
|
@@ -12689,7 +12970,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12689
12970
|
};
|
|
12690
12971
|
}());
|
|
12691
12972
|
}, [actions, dataSource, readOnlyTaxRate]);
|
|
12692
|
-
return
|
|
12973
|
+
return React.createElement(Select, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
12693
12974
|
showSearch: true,
|
|
12694
12975
|
showArrow: false,
|
|
12695
12976
|
notFoundContent: null,
|
|
@@ -12697,7 +12978,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12697
12978
|
onSearch: onSearch,
|
|
12698
12979
|
onChange: onChange
|
|
12699
12980
|
}), dataSource.map(function (e) {
|
|
12700
|
-
return
|
|
12981
|
+
return React.createElement(Select.Option, {
|
|
12701
12982
|
key: e.value,
|
|
12702
12983
|
value: e.value
|
|
12703
12984
|
}, e.label);
|
|
@@ -12727,14 +13008,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12727
13008
|
|
|
12728
13009
|
|
|
12729
13010
|
var createTreeNode = React.useCallback(function () {
|
|
12730
|
-
if (!list) return
|
|
13011
|
+
if (!list) return React.createElement(React.Fragment, null);
|
|
12731
13012
|
return ctn(list);
|
|
12732
13013
|
|
|
12733
13014
|
function title(label) {
|
|
12734
13015
|
if (!filter) return label;
|
|
12735
13016
|
label = (filter.taxCategoryCode ? label.split(new RegExp(filter.taxCategoryCode, 'g')) : [label]).join("<span style=\"color: #1890ff;\">".concat(filter.taxCategoryCode, "</span>"));
|
|
12736
13017
|
label = (filter.val ? label.split(new RegExp(filter.val, 'g')) : [label]).join("<span style=\"color: #1890ff;\">".concat(filter.val, "</span>"));
|
|
12737
|
-
return
|
|
13018
|
+
return React.createElement("span", {
|
|
12738
13019
|
dangerouslySetInnerHTML: {
|
|
12739
13020
|
__html: label
|
|
12740
13021
|
}
|
|
@@ -12743,11 +13024,11 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12743
13024
|
|
|
12744
13025
|
function ctn(l) {
|
|
12745
13026
|
var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0';
|
|
12746
|
-
if (!l || !l.length) return [
|
|
13027
|
+
if (!l || !l.length) return [React.createElement(React.Fragment, null)];
|
|
12747
13028
|
return l.filter(function (e) {
|
|
12748
13029
|
return e.pid === p;
|
|
12749
13030
|
}).map(function (e) {
|
|
12750
|
-
return
|
|
13031
|
+
return React.createElement(TreeNode, {
|
|
12751
13032
|
title: title(e.label),
|
|
12752
13033
|
key: e.id
|
|
12753
13034
|
}, ctn(l, e.id));
|
|
@@ -12877,46 +13158,46 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12877
13158
|
setList([]);
|
|
12878
13159
|
}
|
|
12879
13160
|
}, [visible]);
|
|
12880
|
-
return
|
|
13161
|
+
return React.createElement(React.Fragment, null, React.createElement(Input, {
|
|
12881
13162
|
readOnly: true,
|
|
12882
13163
|
value: props.value,
|
|
12883
|
-
addonAfter:
|
|
13164
|
+
addonAfter: React.createElement(Button, {
|
|
12884
13165
|
size: "small",
|
|
12885
13166
|
type: "link",
|
|
12886
13167
|
onClick: function onClick() {
|
|
12887
13168
|
setVisible(true);
|
|
12888
13169
|
}
|
|
12889
13170
|
}, "\u70B9\u51FB\u9009\u62E9")
|
|
12890
|
-
}),
|
|
13171
|
+
}), React.createElement(Drawer, {
|
|
12891
13172
|
title: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
12892
13173
|
visible: visible,
|
|
12893
13174
|
width: 500,
|
|
12894
13175
|
onClose: function onClose() {
|
|
12895
13176
|
setVisible(false);
|
|
12896
13177
|
}
|
|
12897
|
-
},
|
|
13178
|
+
}, React.createElement(Form, {
|
|
12898
13179
|
key: "".concat(visible)
|
|
12899
|
-
},
|
|
13180
|
+
}, React.createElement(Form.Item, {
|
|
12900
13181
|
label: "\u4EA7\u54C1\u6216\u670D\u52A1\u7B80\u79F0"
|
|
12901
|
-
},
|
|
13182
|
+
}, React.createElement(Input, {
|
|
12902
13183
|
onChange: function onChange(e) {
|
|
12903
13184
|
setFilter(_objectSpread2(_objectSpread2({}, filter), {}, {
|
|
12904
13185
|
val: e.target.value
|
|
12905
13186
|
}));
|
|
12906
13187
|
}
|
|
12907
|
-
})),
|
|
13188
|
+
})), React.createElement(Form.Item, {
|
|
12908
13189
|
label: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801"
|
|
12909
|
-
},
|
|
13190
|
+
}, React.createElement(Input, {
|
|
12910
13191
|
onChange: function onChange(e) {
|
|
12911
13192
|
setFilter(_objectSpread2(_objectSpread2({}, filter), {}, {
|
|
12912
13193
|
taxCategoryCode: e.target.value
|
|
12913
13194
|
}));
|
|
12914
13195
|
}
|
|
12915
|
-
}))), list && list.length > 0 ?
|
|
13196
|
+
}))), list && list.length > 0 ? React.createElement(Tree, {
|
|
12916
13197
|
defaultExpandAll: true,
|
|
12917
13198
|
selectedKeys: [],
|
|
12918
13199
|
onSelect: onSelect
|
|
12919
|
-
}, createTreeNode()) :
|
|
13200
|
+
}, createTreeNode()) : React.createElement("span", {
|
|
12920
13201
|
style: {
|
|
12921
13202
|
color: '#00000073'
|
|
12922
13203
|
}
|
|
@@ -12944,7 +13225,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12944
13225
|
endowCodeGood.forEach(function (good) {
|
|
12945
13226
|
if (!good) return;
|
|
12946
13227
|
good.itemName = setShorthand(good.itemName, values.shorthand);
|
|
12947
|
-
good.
|
|
13228
|
+
good.itemNameSelf = setShorthand(good.itemNameSelf, values.shorthand); // const name = getItemName(good.itemName, values.shorthand);
|
|
12948
13229
|
// good.itemName = getItemName(good.itemName, values.shorthand); // `*${values.shorthand}*${name}`;
|
|
12949
13230
|
|
|
12950
13231
|
good.taxClassificationCode = values.taxClassificationCode;
|
|
@@ -13074,13 +13355,13 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
13074
13355
|
React.useEffect(function () {
|
|
13075
13356
|
if (controller.getTaxCategoryCodeList) controller.getTaxCategoryCodeList();
|
|
13076
13357
|
}, [controller]);
|
|
13077
|
-
return
|
|
13358
|
+
return React.createElement(SchemaForm, {
|
|
13078
13359
|
actions: actions,
|
|
13079
13360
|
components: _objectSpread2(_objectSpread2({}, components), {}, {
|
|
13080
13361
|
showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
|
|
13081
13362
|
}),
|
|
13082
13363
|
effects: effects
|
|
13083
|
-
},
|
|
13364
|
+
}, React.createElement(FormButtonGroup, null, React.createElement(SchemaMarkupField, {
|
|
13084
13365
|
name: "taxClassificationCode",
|
|
13085
13366
|
type: "showSearch",
|
|
13086
13367
|
title: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
@@ -13090,12 +13371,12 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
13090
13371
|
message: '请选择税收分类编码',
|
|
13091
13372
|
required: true
|
|
13092
13373
|
}]
|
|
13093
|
-
}),
|
|
13374
|
+
}), React.createElement(SchemaMarkupField, {
|
|
13094
13375
|
name: "shorthand",
|
|
13095
13376
|
type: "string",
|
|
13096
13377
|
default: getShorthand(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName),
|
|
13097
13378
|
title: "\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0"
|
|
13098
|
-
}),
|
|
13379
|
+
}), React.createElement(SchemaMarkupField, {
|
|
13099
13380
|
name: "taxRate",
|
|
13100
13381
|
type: "string",
|
|
13101
13382
|
title: "\u7A0E\u7387",
|
|
@@ -13108,7 +13389,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
13108
13389
|
message: '请选择税率',
|
|
13109
13390
|
required: true
|
|
13110
13391
|
}]
|
|
13111
|
-
}), taxRate === 0 &&
|
|
13392
|
+
}), taxRate === 0 && React.createElement(SchemaMarkupField, {
|
|
13112
13393
|
name: "taxFreeType",
|
|
13113
13394
|
type: "string",
|
|
13114
13395
|
title: "\u514D\u7A0E\u7C7B\u578B",
|
|
@@ -13118,7 +13399,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
13118
13399
|
message: '请选择免税类型',
|
|
13119
13400
|
required: true
|
|
13120
13401
|
}]
|
|
13121
|
-
}),
|
|
13402
|
+
}), React.createElement(SchemaMarkupField, {
|
|
13122
13403
|
name: "favouredPolicyMark",
|
|
13123
13404
|
type: "number",
|
|
13124
13405
|
title: "\u662F\u5426\u4EAB\u53D7\u4F18\u60E0\u653F\u7B56",
|
|
@@ -13134,7 +13415,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
13134
13415
|
message: '请选择是否享受优惠政策',
|
|
13135
13416
|
required: true
|
|
13136
13417
|
}]
|
|
13137
|
-
}), favouredPolicyMark === 1 &&
|
|
13418
|
+
}), favouredPolicyMark === 1 && React.createElement(SchemaMarkupField, {
|
|
13138
13419
|
name: "favouredPolicyName",
|
|
13139
13420
|
type: "string",
|
|
13140
13421
|
title: "\u4F18\u60E0\u653F\u7B56\u7C7B\u578B",
|
|
@@ -13144,14 +13425,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
13144
13425
|
message: '请选择是否享受优惠政策',
|
|
13145
13426
|
required: true
|
|
13146
13427
|
}]
|
|
13147
|
-
})),
|
|
13428
|
+
})), React.createElement("span", {
|
|
13148
13429
|
className: "kts-invoice-operate-goods-endow-code-button-list"
|
|
13149
|
-
},
|
|
13430
|
+
}, React.createElement(Button, {
|
|
13150
13431
|
onClick: function onClick() {
|
|
13151
13432
|
actions.submit(onSubmit);
|
|
13152
13433
|
},
|
|
13153
13434
|
type: "primary"
|
|
13154
|
-
}, "\u786E\u5B9A"),
|
|
13435
|
+
}, "\u786E\u5B9A"), React.createElement(Button, {
|
|
13155
13436
|
onClick: function onClick() {
|
|
13156
13437
|
controller.pipeline( /*#__PURE__*/function () {
|
|
13157
13438
|
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
|
|
@@ -13194,11 +13475,13 @@ var getShorthand = function getShorthand(value) {
|
|
|
13194
13475
|
}
|
|
13195
13476
|
};
|
|
13196
13477
|
|
|
13197
|
-
|
|
13198
|
-
var
|
|
13199
|
-
|
|
13478
|
+
function AddComparisonDrawer() {
|
|
13479
|
+
var _Form$useForm = Form$1.useForm(),
|
|
13480
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13481
|
+
form = _Form$useForm2[0];
|
|
13200
13482
|
/** 控制器 */
|
|
13201
13483
|
|
|
13484
|
+
|
|
13202
13485
|
var controller = Invoice.useInvoiceController();
|
|
13203
13486
|
/** 正在 添加商品对照 的货物索引 */
|
|
13204
13487
|
|
|
@@ -13242,9 +13525,7 @@ var AddComparisonDrawer = decorator(Form.create())(function (props) {
|
|
|
13242
13525
|
var onSubmit = React.useCallback(function () {
|
|
13243
13526
|
controller.run( /*#__PURE__*/function () {
|
|
13244
13527
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
13245
|
-
var _getSN, _getSN2,
|
|
13246
|
-
|
|
13247
|
-
var _yield$validateFields, err, values, shorthand;
|
|
13528
|
+
var _getSN, _getSN2, values, shorthand;
|
|
13248
13529
|
|
|
13249
13530
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13250
13531
|
while (1) {
|
|
@@ -13258,49 +13539,34 @@ var AddComparisonDrawer = decorator(Form.create())(function (props) {
|
|
|
13258
13539
|
return _context2.abrupt("return");
|
|
13259
13540
|
|
|
13260
13541
|
case 2:
|
|
13261
|
-
_context2.
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
case 4:
|
|
13265
|
-
_yield$validateFields = _context2.sent;
|
|
13266
|
-
err = _yield$validateFields.err;
|
|
13267
|
-
values = _yield$validateFields.values;
|
|
13268
|
-
|
|
13269
|
-
if (!err) {
|
|
13270
|
-
_context2.next = 9;
|
|
13271
|
-
break;
|
|
13272
|
-
}
|
|
13273
|
-
|
|
13274
|
-
return _context2.abrupt("return");
|
|
13542
|
+
_context2.prev = 2;
|
|
13543
|
+
_context2.next = 5;
|
|
13544
|
+
return form.validateFields();
|
|
13275
13545
|
|
|
13276
|
-
case
|
|
13277
|
-
|
|
13546
|
+
case 5:
|
|
13547
|
+
values = _context2.sent;
|
|
13548
|
+
shorthand = s.goodsListState.isMyShow ? (_getSN = getSN(good.itemNameSelf)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand : (_getSN2 = getSN(good.itemName)) === null || _getSN2 === void 0 ? void 0 : _getSN2.shorthand;
|
|
13278
13549
|
good.itemCode = values.itemCode;
|
|
13279
|
-
good.
|
|
13550
|
+
good.itemCodeSelf = values.itemCodeSelf;
|
|
13280
13551
|
good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
|
|
13281
|
-
good.
|
|
13552
|
+
good.itemNameSelf = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameSelf) : values.itemNameSelf;
|
|
13282
13553
|
good.itemModelName = values.itemModelName;
|
|
13283
|
-
good.
|
|
13284
|
-
good.unit = values.unit;
|
|
13285
|
-
good.unitOther = values.unitOther;
|
|
13554
|
+
good.itemModelNameSelf = values.itemModelNameSelf;
|
|
13286
13555
|
s.goodsListState.addComparisonIndex = undefined;
|
|
13287
13556
|
s.goodsListState.goodsList = _toConsumableArray(s.goodsListState.goodsList);
|
|
13557
|
+
_context2.next = 19;
|
|
13558
|
+
break;
|
|
13288
13559
|
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
}
|
|
13293
|
-
|
|
13294
|
-
debugger;
|
|
13295
|
-
_context2.next = 24;
|
|
13296
|
-
return s.goodsListState.productComparison.onUpdateComparisonTable(good, values);
|
|
13560
|
+
case 17:
|
|
13561
|
+
_context2.prev = 17;
|
|
13562
|
+
_context2.t0 = _context2["catch"](2);
|
|
13297
13563
|
|
|
13298
|
-
case
|
|
13564
|
+
case 19:
|
|
13299
13565
|
case "end":
|
|
13300
13566
|
return _context2.stop();
|
|
13301
13567
|
}
|
|
13302
13568
|
}
|
|
13303
|
-
}, _callee2);
|
|
13569
|
+
}, _callee2, null, [[2, 17]]);
|
|
13304
13570
|
}));
|
|
13305
13571
|
|
|
13306
13572
|
return function (_x2) {
|
|
@@ -13316,119 +13582,78 @@ var AddComparisonDrawer = decorator(Form.create())(function (props) {
|
|
|
13316
13582
|
|
|
13317
13583
|
form.setFieldsValue(_objectSpread2(_objectSpread2({}, good), {}, {
|
|
13318
13584
|
itemName: (_getSN3 = getSN(good.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.full,
|
|
13319
|
-
|
|
13585
|
+
itemNameSelf: (_getSN4 = getSN(good.itemNameSelf)) === null || _getSN4 === void 0 ? void 0 : _getSN4.full
|
|
13320
13586
|
}));
|
|
13321
13587
|
}
|
|
13322
13588
|
}, [good]);
|
|
13323
|
-
return
|
|
13589
|
+
return React.createElement(Drawer$1, {
|
|
13324
13590
|
width: 500,
|
|
13325
13591
|
onClose: onClose,
|
|
13326
13592
|
placement: "right",
|
|
13327
13593
|
title: "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167",
|
|
13328
|
-
visible: !!
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13594
|
+
visible: !!good,
|
|
13595
|
+
footer: React.createElement("div", {
|
|
13596
|
+
style: {
|
|
13597
|
+
display: 'flex',
|
|
13598
|
+
justifyContent: 'flex-end',
|
|
13599
|
+
gap: 10
|
|
13600
|
+
}
|
|
13601
|
+
}, React.createElement(Button, {
|
|
13602
|
+
type: "primary",
|
|
13603
|
+
onClick: onSubmit
|
|
13604
|
+
}, "\u63D0\u4EA4"), React.createElement(Button, {
|
|
13605
|
+
onClick: onClose
|
|
13606
|
+
}, "\u53D6\u6D88"))
|
|
13607
|
+
}, !!good && React.createElement(Form$1, {
|
|
13339
13608
|
layout: "vertical",
|
|
13340
13609
|
style: {
|
|
13341
13610
|
flex: 1
|
|
13342
|
-
}
|
|
13343
|
-
|
|
13611
|
+
},
|
|
13612
|
+
form: form
|
|
13613
|
+
}, React.createElement(Row, {
|
|
13344
13614
|
gutter: [8, 8]
|
|
13345
|
-
},
|
|
13615
|
+
}, React.createElement(Col, {
|
|
13346
13616
|
span: 12
|
|
13347
|
-
},
|
|
13617
|
+
}, React.createElement(Form$1.Item, {
|
|
13618
|
+
name: "itemCodeSelf",
|
|
13348
13619
|
label: "\u6211\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13349
|
-
},
|
|
13620
|
+
}, React.createElement(Input, null))), React.createElement(Col, {
|
|
13350
13621
|
span: 12
|
|
13351
|
-
},
|
|
13622
|
+
}, React.createElement(Form$1.Item, {
|
|
13623
|
+
name: "itemCode",
|
|
13352
13624
|
label: "\u5BF9\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13353
|
-
},
|
|
13625
|
+
}, React.createElement(Input, null))), React.createElement(Col, {
|
|
13354
13626
|
span: 12
|
|
13355
|
-
},
|
|
13356
|
-
|
|
13357
|
-
required: true,
|
|
13358
|
-
message: "请输入我方商品名称"
|
|
13359
|
-
}]
|
|
13360
|
-
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13627
|
+
}, React.createElement(Form$1.Item, {
|
|
13628
|
+
name: "itemNameSelf",
|
|
13361
13629
|
label: "\u6211\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13362
|
-
},
|
|
13630
|
+
}, React.createElement(Input, null))), React.createElement(Col, {
|
|
13363
13631
|
span: 12
|
|
13364
|
-
},
|
|
13365
|
-
|
|
13366
|
-
required: true,
|
|
13367
|
-
message: "请输入对方商品名称"
|
|
13368
|
-
}]
|
|
13369
|
-
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13632
|
+
}, React.createElement(Form$1.Item, {
|
|
13633
|
+
name: "itemName",
|
|
13370
13634
|
label: "\u5BF9\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13371
|
-
},
|
|
13635
|
+
}, React.createElement(Input, null))), React.createElement(Col, {
|
|
13372
13636
|
span: 12
|
|
13373
|
-
},
|
|
13637
|
+
}, React.createElement(Form$1.Item, {
|
|
13638
|
+
name: 'itemModelNameSelf',
|
|
13374
13639
|
label: "\u6211\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13375
|
-
},
|
|
13640
|
+
}, React.createElement(Input, null))), React.createElement(Col, {
|
|
13376
13641
|
span: 12
|
|
13377
|
-
},
|
|
13378
|
-
|
|
13379
|
-
required: true,
|
|
13380
|
-
message: "请输入对方规格型号"
|
|
13381
|
-
}]
|
|
13382
|
-
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13642
|
+
}, React.createElement(Form$1.Item, {
|
|
13643
|
+
name: "itemModelName",
|
|
13383
13644
|
label: "\u5BF9\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13384
|
-
},
|
|
13385
|
-
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
label: "\u6211\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13393
|
-
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13394
|
-
span: 12
|
|
13395
|
-
}, getFieldDecorator('unitOther', {
|
|
13396
|
-
rules: [{
|
|
13397
|
-
required: true,
|
|
13398
|
-
message: "请输入对方计量单位"
|
|
13399
|
-
}]
|
|
13400
|
-
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13401
|
-
label: "\u5BF9\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13402
|
-
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13403
|
-
span: 24
|
|
13404
|
-
}, getFieldDecorator('isUpdate', {})( /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Checkbox, null, "\u66F4\u65B0\u5230\u5546\u54C1\u5BF9\u7167\u8868\u4E2D")))))), /*#__PURE__*/React.createElement("div", {
|
|
13405
|
-
style: {
|
|
13406
|
-
display: 'flex',
|
|
13407
|
-
justifyContent: 'flex-end',
|
|
13408
|
-
gap: 10
|
|
13409
|
-
}
|
|
13410
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
13411
|
-
type: "primary",
|
|
13412
|
-
onClick: onSubmit
|
|
13413
|
-
}, "\u63D0\u4EA4"), /*#__PURE__*/React.createElement(Button, {
|
|
13414
|
-
onClick: onClose
|
|
13415
|
-
}, "\u53D6\u6D88")));
|
|
13416
|
-
});
|
|
13417
|
-
|
|
13418
|
-
function validateFields$1(form) {
|
|
13419
|
-
return new Promise(function (resolve) {
|
|
13420
|
-
form.validateFields(function (err, values) {
|
|
13421
|
-
resolve({
|
|
13422
|
-
err: err,
|
|
13423
|
-
values: values
|
|
13424
|
-
});
|
|
13425
|
-
});
|
|
13426
|
-
});
|
|
13427
|
-
}
|
|
13645
|
+
}, React.createElement(Input, null))))));
|
|
13646
|
+
} // function validateFields(form: WrappedFormUtils<any>) {
|
|
13647
|
+
// return new Promise<{ err: any, values: any }>(resolve => {
|
|
13648
|
+
// form.validateFields((err, values) => {
|
|
13649
|
+
// resolve({ err, values })
|
|
13650
|
+
// })
|
|
13651
|
+
// })
|
|
13652
|
+
// }
|
|
13428
13653
|
|
|
13429
13654
|
/** 发票组件的上下文 */
|
|
13430
13655
|
|
|
13431
|
-
var InvoiceContext =
|
|
13656
|
+
var InvoiceContext = React.createContext(undefined);
|
|
13432
13657
|
|
|
13433
13658
|
var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
13434
13659
|
_inherits(Invoice, _React$PureComponent);
|
|
@@ -13460,7 +13685,7 @@ var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
13460
13685
|
|
|
13461
13686
|
/** 获取控制器钩子 */
|
|
13462
13687
|
function render() {
|
|
13463
|
-
return
|
|
13688
|
+
return React.createElement(Main$3, _objectSpread2({}, this.props));
|
|
13464
13689
|
}
|
|
13465
13690
|
}]);
|
|
13466
13691
|
|
|
@@ -13492,22 +13717,22 @@ var Main$3 = function Main(props) {
|
|
|
13492
13717
|
React.useEffect(function () {
|
|
13493
13718
|
setKey(key + 1);
|
|
13494
13719
|
}, [controller]);
|
|
13495
|
-
return
|
|
13720
|
+
return React.createElement(InvoiceContext.Provider, {
|
|
13496
13721
|
key: key,
|
|
13497
13722
|
value: controller
|
|
13498
|
-
},
|
|
13723
|
+
}, React.createElement("div", {
|
|
13499
13724
|
className: "kts-invoice-operate"
|
|
13500
|
-
}, props.invoiceHeader ||
|
|
13725
|
+
}, props.invoiceHeader || React.createElement(InvoiceHeader, null)
|
|
13501
13726
|
/** 发票头 */
|
|
13502
|
-
, props.buyer ||
|
|
13727
|
+
, props.buyer || React.createElement(Buyer$1, null)
|
|
13503
13728
|
/** 购买方 */
|
|
13504
|
-
, props.goodsList ||
|
|
13729
|
+
, props.goodsList || React.createElement(GoodsList, null)
|
|
13505
13730
|
/** 货物列表 */
|
|
13506
|
-
, props.seller ||
|
|
13731
|
+
, props.seller || React.createElement(Buyer, null)
|
|
13507
13732
|
/** 销售方 */
|
|
13508
|
-
, props.sign ||
|
|
13733
|
+
, props.sign || React.createElement(Sign, null)
|
|
13509
13734
|
/** 落款 */
|
|
13510
|
-
, props.footExpand),
|
|
13735
|
+
, props.footExpand), React.createElement(ImportBuyerDrawer, null), React.createElement(ImportGoodsDrawer, null), React.createElement(EndowCodeDrawer, null), React.createElement(AddComparisonDrawer, null));
|
|
13511
13736
|
};
|
|
13512
13737
|
|
|
13513
13738
|
export { Invoice, InvoiceController };
|