kts-component-invoice-operate 1.2.22 → 2.0.1
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/d.dio +2 -69
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.d.ts → EndowCode/index.d.ts} +2 -2
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.d.ts → IGood/index.d.ts} +15 -5
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.d.ts → ImportGoods/index.d.ts} +0 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.d.ts → LineAttributeType/index.d.ts} +0 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.d.ts +7 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +9 -0
- package/dist/Invoice/InvoiceController/fns/getGoodsSearch.d.ts +2 -0
- package/dist/Invoice/InvoiceController/index.d.ts +3 -0
- package/dist/Invoice/index.d.ts +1 -1
- package/dist/Invoice/tools/itemName/index.d.ts +14 -0
- package/dist/Invoice/ui/AddComparisonDrawer/index.d.ts +3 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.d.ts +2 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.d.ts +4 -0
- package/dist/Invoice/ui/GoodsList/ui/{AddDiscountRowButton → BulkMenu/hooks/useAddDiscountRowButton}/index.d.ts +4 -2
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useCommodityComparisonButton/index.d.ts +4 -0
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +4 -0
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useEndowCodeButton/index.d.ts +4 -0
- package/dist/Invoice/ui/GoodsList/ui/BulkMenu/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/{DelRowButton → DescribeSwitch}/index.d.ts +0 -0
- package/dist/Invoice/ui/GoodsList/ui/Search/index.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1650 -615
- package/dist/index.js +1649 -614
- package/docs/index.md +1 -1
- package/package.json +6 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{EndowCode.tsx → EndowCode/index.tsx} +3 -3
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{IGood.ts → IGood/index.ts} +20 -5
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{ImportGoods.ts → ImportGoods/index.ts} +0 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/{LineAttributeType.ts → LineAttributeType/index.ts} +0 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/ProductComparison/index.ts +10 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +14 -1
- package/src/Invoice/InvoiceController/fns/getGoodsSearch.ts +17 -0
- package/src/Invoice/InvoiceController/index.ts +4 -0
- package/src/Invoice/_test/importGoods/index.tsx +21 -3
- package/src/Invoice/index.tsx +5 -1
- package/src/Invoice/tools/itemName/index.ts +48 -0
- package/src/Invoice/ui/AddComparisonDrawer/index.tsx +175 -0
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +6 -17
- package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +15 -0
- package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +100 -32
- package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.tsx +39 -0
- package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +5 -2
- package/src/Invoice/ui/GoodsList/hook/useRowSelection/index.tsx +34 -8
- package/src/Invoice/ui/GoodsList/index.less +42 -37
- package/src/Invoice/ui/GoodsList/index.tsx +21 -17
- 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/BulkMenu/hooks/useCommodityComparisonButton/index.tsx +80 -0
- 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/DescribeSwitch/index.tsx +37 -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/GoodsList/ui/TaxIncludedSwitch/index.tsx +2 -2
- package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +70 -18
- package/src/index.ts +1 -0
- package/yarn.e.lock +14331 -0
- package/yarn.o.lock +14800 -0
- package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +0 -2
- package/docs-dist/404.html +0 -33
- package/docs-dist/index.html +0 -33
- package/docs-dist/static/auto.a6cd905c.svg +0 -1
- package/docs-dist/static/spot.42e620e1.svg +0 -1
- package/docs-dist/umi.css +0 -20
- package/docs-dist/umi.js +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ 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, 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';
|
|
@@ -972,6 +972,13 @@ function draft(value) {
|
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
+
var ProductComparison = /*#__PURE__*/_createClass(function ProductComparison() {
|
|
976
|
+
_classCallCheck(this, ProductComparison);
|
|
977
|
+
|
|
978
|
+
this.onComply = void 0;
|
|
979
|
+
this.onUpdateComparisonTable = void 0;
|
|
980
|
+
});
|
|
981
|
+
|
|
975
982
|
var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
976
983
|
_classCallCheck(this, GoodsListState);
|
|
977
984
|
|
|
@@ -980,11 +987,13 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
980
987
|
this.isSwitchTax = void 0;
|
|
981
988
|
this.isAddDiscount = void 0;
|
|
982
989
|
this.isTaxIncluded = true;
|
|
990
|
+
this.isMyShow = false;
|
|
983
991
|
this.editGood = void 0;
|
|
984
992
|
this.form = void 0;
|
|
985
993
|
this.unitList = [];
|
|
986
994
|
this.defaultRate = 3;
|
|
987
995
|
this.taxRateList = [0, 3, 5, 6, 9, 13];
|
|
996
|
+
this.searchValue = '';
|
|
988
997
|
this.goodsList = [];
|
|
989
998
|
this.goodsMap = new Map();
|
|
990
999
|
this.goodsMenuExpand = [];
|
|
@@ -992,7 +1001,9 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
992
1001
|
this.discountGoodIndex = [];
|
|
993
1002
|
this.endowCode = new EndowCode();
|
|
994
1003
|
this.importGoods = new ImportGoods();
|
|
1004
|
+
this.productComparison = new ProductComparison();
|
|
995
1005
|
this.isVisibleDrawer = false;
|
|
1006
|
+
this.addComparisonIndex = void 0;
|
|
996
1007
|
});
|
|
997
1008
|
|
|
998
1009
|
var BuyerState = /*#__PURE__*/_createClass(function BuyerState() {
|
|
@@ -1509,6 +1520,23 @@ var validateFields = function validateFields(form) {
|
|
|
1509
1520
|
});
|
|
1510
1521
|
};
|
|
1511
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
|
+
|
|
1512
1540
|
var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
1513
1541
|
_inherits(InvoiceController, _InvoiceControllerFor);
|
|
1514
1542
|
|
|
@@ -1532,6 +1560,7 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
|
1532
1560
|
_this.addGoodDiscount = _this.pipeline(addGoodDiscount);
|
|
1533
1561
|
_this.getGoodsList = void 0;
|
|
1534
1562
|
_this.getTaxCategoryCodeList = void 0;
|
|
1563
|
+
_this.getGoodsSearch = getGoodsSearch;
|
|
1535
1564
|
return _this;
|
|
1536
1565
|
} // ----------------- 发票头 模块相关 -----------------
|
|
1537
1566
|
|
|
@@ -1579,7 +1608,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1579
1608
|
/** 控制器 */
|
|
1580
1609
|
|
|
1581
1610
|
|
|
1582
|
-
var controller =
|
|
1611
|
+
var controller = Invoice.useInvoiceController();
|
|
1583
1612
|
var model = controller.useMemo(function (s) {
|
|
1584
1613
|
return s.model;
|
|
1585
1614
|
}, []);
|
|
@@ -1612,7 +1641,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1612
1641
|
render: function render(form) {
|
|
1613
1642
|
return form.getFieldDecorator('code', {
|
|
1614
1643
|
initialValue: props.defaultCode
|
|
1615
|
-
})(
|
|
1644
|
+
})(React.createElement(FormSpanString, null));
|
|
1616
1645
|
}
|
|
1617
1646
|
});
|
|
1618
1647
|
}
|
|
@@ -1625,7 +1654,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1625
1654
|
render: function render(form) {
|
|
1626
1655
|
return form.getFieldDecorator('no', {
|
|
1627
1656
|
initialValue: props.defaultNo
|
|
1628
|
-
})(
|
|
1657
|
+
})(React.createElement(FormSpanString, null));
|
|
1629
1658
|
}
|
|
1630
1659
|
});
|
|
1631
1660
|
}
|
|
@@ -1636,7 +1665,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1636
1665
|
render: function render(form) {
|
|
1637
1666
|
return form.getFieldDecorator('invoicingDate', {
|
|
1638
1667
|
initialValue: props.defaultInvoicingDate
|
|
1639
|
-
})(
|
|
1668
|
+
})(React.createElement(FormSpanString, null));
|
|
1640
1669
|
}
|
|
1641
1670
|
});
|
|
1642
1671
|
}
|
|
@@ -1647,7 +1676,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1647
1676
|
render: function render(form) {
|
|
1648
1677
|
return form.getFieldDecorator('defaultValidationCode', {
|
|
1649
1678
|
initialValue: props.defaultValidationCode
|
|
1650
|
-
})(
|
|
1679
|
+
})(React.createElement(FormSpanString, null));
|
|
1651
1680
|
}
|
|
1652
1681
|
});
|
|
1653
1682
|
}
|
|
@@ -1667,21 +1696,21 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1667
1696
|
React.useEffect(function () {
|
|
1668
1697
|
setTypeIndex(props.typeOptionIndex || 0);
|
|
1669
1698
|
}, [props.typeOption]);
|
|
1670
|
-
return
|
|
1699
|
+
return React.createElement("div", {
|
|
1671
1700
|
className: "kts-invoice-operate-invoice-header"
|
|
1672
|
-
},
|
|
1701
|
+
}, React.createElement("div", {
|
|
1673
1702
|
className: "invoice-header-title"
|
|
1674
|
-
}, title),
|
|
1703
|
+
}, title), React.createElement("div", {
|
|
1675
1704
|
className: "invoice-header-no"
|
|
1676
|
-
}, isInvoiceNo ?
|
|
1705
|
+
}, isInvoiceNo ? React.createElement("div", null, React.createElement("label", null, "\u53D1\u7968\u5355\u636E\u7F16\u53F7 :"), getFieldDecorator('id', {
|
|
1677
1706
|
initialValue: props.defaultId
|
|
1678
|
-
})(
|
|
1707
|
+
})(React.createElement(Input, {
|
|
1679
1708
|
disabled: readOnlyInvoiceNo,
|
|
1680
1709
|
style: {
|
|
1681
1710
|
width: 230
|
|
1682
1711
|
},
|
|
1683
1712
|
size: "small",
|
|
1684
|
-
suffix: controller.updateInvoiceNo &&
|
|
1713
|
+
suffix: controller.updateInvoiceNo && React.createElement(Icon, {
|
|
1685
1714
|
style: {
|
|
1686
1715
|
cursor: 'pointer'
|
|
1687
1716
|
},
|
|
@@ -1725,15 +1754,15 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1725
1754
|
return onClick;
|
|
1726
1755
|
}()
|
|
1727
1756
|
})
|
|
1728
|
-
}))) :
|
|
1757
|
+
}))) : React.createElement("div", {
|
|
1729
1758
|
style: {
|
|
1730
1759
|
height: 20
|
|
1731
1760
|
}
|
|
1732
|
-
}), tag &&
|
|
1761
|
+
}), tag && React.createElement(Tag, null, tag), React.createElement("div", {
|
|
1733
1762
|
className: "invoice-header-type"
|
|
1734
1763
|
}, props.typeOption ? getFieldDecorator('type', {
|
|
1735
1764
|
initialValue: typeIndex
|
|
1736
|
-
})(
|
|
1765
|
+
})(React.createElement(Select, {
|
|
1737
1766
|
size: "small",
|
|
1738
1767
|
style: {
|
|
1739
1768
|
width: 230
|
|
@@ -1742,20 +1771,20 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1742
1771
|
setTypeIndex(e);
|
|
1743
1772
|
}
|
|
1744
1773
|
}, props.typeOption.map(function (e, i) {
|
|
1745
|
-
return
|
|
1774
|
+
return React.createElement(Select.Option, {
|
|
1746
1775
|
key: i,
|
|
1747
1776
|
value: i
|
|
1748
1777
|
}, e.title);
|
|
1749
|
-
}))) : props.renderExpand && props.renderExpand(props.form))), props.typeOption &&
|
|
1778
|
+
}))) : props.renderExpand && props.renderExpand(props.form))), props.typeOption && React.createElement("div", {
|
|
1750
1779
|
style: {
|
|
1751
1780
|
marginTop: 10
|
|
1752
1781
|
}
|
|
1753
|
-
}, props.renderExpand && props.renderExpand(props.form)),
|
|
1782
|
+
}, props.renderExpand && props.renderExpand(props.form)), React.createElement("div", {
|
|
1754
1783
|
className: "invoice-header-property"
|
|
1755
|
-
}, _toConsumableArray(props.fieldExpand || []).map(function (e) {}),
|
|
1756
|
-
return
|
|
1784
|
+
}, _toConsumableArray(props.fieldExpand || []).map(function (e) {}), React.createElement(Row, null, fieldExpand.map(function (e) {
|
|
1785
|
+
return React.createElement(Col, {
|
|
1757
1786
|
span: 24 / fieldExpand.length
|
|
1758
|
-
},
|
|
1787
|
+
}, React.createElement("label", null, e.label), e.render(form));
|
|
1759
1788
|
}))));
|
|
1760
1789
|
});
|
|
1761
1790
|
|
|
@@ -1774,7 +1803,7 @@ var FormSpanString = /*#__PURE__*/function (_React$Component) {
|
|
|
1774
1803
|
key: "render",
|
|
1775
1804
|
value: function render() {
|
|
1776
1805
|
// return <span>{this.props.value}</span>;
|
|
1777
|
-
return
|
|
1806
|
+
return React.createElement(Input, {
|
|
1778
1807
|
size: "small",
|
|
1779
1808
|
disabled: true,
|
|
1780
1809
|
value: this.props.value
|
|
@@ -1877,12 +1906,12 @@ function TableVirtual (props) {
|
|
|
1877
1906
|
if (!table) return;
|
|
1878
1907
|
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
1879
1908
|
}, [pointer, self, rowHeight]);
|
|
1880
|
-
return
|
|
1909
|
+
return React.createElement("span", {
|
|
1881
1910
|
className: "kts-invoice-operate-goods-table-virtual",
|
|
1882
1911
|
ref: function ref(e) {
|
|
1883
1912
|
setSelf(e);
|
|
1884
1913
|
}
|
|
1885
|
-
},
|
|
1914
|
+
}, React.createElement(Table, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1886
1915
|
dataSource: dataSource
|
|
1887
1916
|
})));
|
|
1888
1917
|
}
|
|
@@ -1893,7 +1922,7 @@ styleInject(css_248z$3);
|
|
|
1893
1922
|
var nzhcn = require('nzh').cn;
|
|
1894
1923
|
|
|
1895
1924
|
var Statistics = (function () {
|
|
1896
|
-
var controller =
|
|
1925
|
+
var controller = Invoice.useInvoiceController();
|
|
1897
1926
|
/** 是否不含税) */
|
|
1898
1927
|
|
|
1899
1928
|
var isTaxIncluded = controller.useMemo(function (s) {
|
|
@@ -1954,54 +1983,54 @@ var Statistics = (function () {
|
|
|
1954
1983
|
});
|
|
1955
1984
|
return sum.done().toNumber();
|
|
1956
1985
|
}, []);
|
|
1957
|
-
return
|
|
1986
|
+
return React.createElement("div", {
|
|
1958
1987
|
className: "kts-invoice-operate-goods-list-statistics"
|
|
1959
|
-
},
|
|
1988
|
+
}, React.createElement("div", {
|
|
1960
1989
|
className: "kts-invoice-operate-goods-list-statistics-row"
|
|
1961
|
-
},
|
|
1990
|
+
}, React.createElement("div", {
|
|
1962
1991
|
style: {
|
|
1963
1992
|
width: 45
|
|
1964
1993
|
}
|
|
1965
|
-
}),
|
|
1994
|
+
}), React.createElement("div", {
|
|
1966
1995
|
style: {
|
|
1967
1996
|
flex: 1
|
|
1968
1997
|
}
|
|
1969
|
-
},
|
|
1998
|
+
}, React.createElement("label", null, "\u5408\u8BA1")), React.createElement("div", {
|
|
1970
1999
|
style: {
|
|
1971
2000
|
width: 119 + 70
|
|
1972
2001
|
}
|
|
1973
|
-
},
|
|
2002
|
+
}, React.createElement("label", null, parseFloat(isTaxIncluded ? lineAmountIncludeTax : lineAmountExcludeTax).toFixed(2))), React.createElement("div", {
|
|
1974
2003
|
style: {
|
|
1975
2004
|
width: 119 + 50 + 1
|
|
1976
2005
|
}
|
|
1977
|
-
},
|
|
2006
|
+
}, React.createElement("label", null, parseFloat(taxAmount).toFixed(2)))), React.createElement("div", {
|
|
1978
2007
|
className: "kts-invoice-operate-goods-list-statistics-row"
|
|
1979
|
-
},
|
|
2008
|
+
}, React.createElement("div", {
|
|
1980
2009
|
style: {
|
|
1981
2010
|
width: 45
|
|
1982
2011
|
}
|
|
1983
|
-
}),
|
|
2012
|
+
}), React.createElement("div", {
|
|
1984
2013
|
style: {
|
|
1985
2014
|
flex: 4,
|
|
1986
2015
|
border: 'none'
|
|
1987
2016
|
}
|
|
1988
|
-
},
|
|
2017
|
+
}, React.createElement("label", null, "\u4EF7\u7A0E\u5408\u8BA1\uFF08\u5927\u5199\uFF09"), React.createElement("label", null, nzhcn.toMoney(lineAmountIncludeTax, {
|
|
1989
2018
|
outSymbol: false
|
|
1990
|
-
}))),
|
|
2019
|
+
}))), React.createElement("div", {
|
|
1991
2020
|
style: {
|
|
1992
2021
|
flex: 1,
|
|
1993
2022
|
border: 'none'
|
|
1994
2023
|
}
|
|
1995
|
-
},
|
|
2024
|
+
}, React.createElement("label", null, "\uFF08\u5C0F\u5199\uFF09")), React.createElement("div", {
|
|
1996
2025
|
style: {
|
|
1997
2026
|
flex: 3,
|
|
1998
2027
|
border: 'none'
|
|
1999
2028
|
}
|
|
2000
|
-
},
|
|
2029
|
+
}, React.createElement("label", null, parseFloat(lineAmountIncludeTax).toFixed(2)))));
|
|
2001
2030
|
});
|
|
2002
2031
|
|
|
2003
2032
|
var AddRowButton = (function () {
|
|
2004
|
-
var controller =
|
|
2033
|
+
var controller = Invoice.useInvoiceController();
|
|
2005
2034
|
var model = controller.useMemo(function (s) {
|
|
2006
2035
|
return s.model;
|
|
2007
2036
|
}, []);
|
|
@@ -2010,6 +2039,11 @@ var AddRowButton = (function () {
|
|
|
2010
2039
|
var goodsNum = controller.useMemo(function (s) {
|
|
2011
2040
|
return s.goodsListState.goodsList.length;
|
|
2012
2041
|
}, []);
|
|
2042
|
+
/** 搜索条件 */
|
|
2043
|
+
|
|
2044
|
+
var searchValue = controller.useMemo(function (s) {
|
|
2045
|
+
return s.goodsListState.searchValue;
|
|
2046
|
+
}, []);
|
|
2013
2047
|
/** 产品最大数 */
|
|
2014
2048
|
|
|
2015
2049
|
var goodMax = controller.useMemo(function (s) {
|
|
@@ -2018,8 +2052,8 @@ var AddRowButton = (function () {
|
|
|
2018
2052
|
/** 按钮是否禁用 */
|
|
2019
2053
|
|
|
2020
2054
|
var disabled = React.useMemo(function () {
|
|
2021
|
-
return typeof goodMax === 'number' ? goodsNum >= goodMax :
|
|
2022
|
-
}, [goodMax, goodsNum]);
|
|
2055
|
+
return typeof goodMax === 'number' ? goodsNum >= goodMax : !!searchValue;
|
|
2056
|
+
}, [goodMax, goodsNum, searchValue]);
|
|
2023
2057
|
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2024
2058
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2025
2059
|
while (1) {
|
|
@@ -2081,8 +2115,8 @@ var AddRowButton = (function () {
|
|
|
2081
2115
|
}
|
|
2082
2116
|
}, _callee2);
|
|
2083
2117
|
})), [controller]);
|
|
2084
|
-
if (model === 'prefab') return
|
|
2085
|
-
return
|
|
2118
|
+
if (model === 'prefab') return React.createElement(React.Fragment, null);
|
|
2119
|
+
return React.createElement(Button, {
|
|
2086
2120
|
icon: "plus-circle",
|
|
2087
2121
|
onClick: onClick,
|
|
2088
2122
|
disabled: disabled
|
|
@@ -2090,7 +2124,7 @@ var AddRowButton = (function () {
|
|
|
2090
2124
|
});
|
|
2091
2125
|
|
|
2092
2126
|
var TaxIncludedSwitch = (function () {
|
|
2093
|
-
var controller =
|
|
2127
|
+
var controller = Invoice.useInvoiceController();
|
|
2094
2128
|
/** 是否含税 */
|
|
2095
2129
|
|
|
2096
2130
|
var isTaxIncluded = controller.useMemo(function (e) {
|
|
@@ -2125,7 +2159,11 @@ var TaxIncludedSwitch = (function () {
|
|
|
2125
2159
|
};
|
|
2126
2160
|
}())();
|
|
2127
2161
|
}, []);
|
|
2128
|
-
return
|
|
2162
|
+
return React.createElement("span", null, React.createElement("label", {
|
|
2163
|
+
style: {
|
|
2164
|
+
marginRight: 2
|
|
2165
|
+
}
|
|
2166
|
+
}, "\u542B\u7A0E:"), React.createElement(Switch, {
|
|
2129
2167
|
disabled: isSwitchTax === false,
|
|
2130
2168
|
checked: isTaxIncluded,
|
|
2131
2169
|
checkedChildren: "\u5F00",
|
|
@@ -2135,8 +2173,161 @@ var TaxIncludedSwitch = (function () {
|
|
|
2135
2173
|
}));
|
|
2136
2174
|
});
|
|
2137
2175
|
|
|
2176
|
+
var DescribeSwitch = (function () {
|
|
2177
|
+
var controller = Invoice.useInvoiceController();
|
|
2178
|
+
var productComparison = controller.useMemo(function (s) {
|
|
2179
|
+
return s.goodsListState.productComparison;
|
|
2180
|
+
}, []);
|
|
2181
|
+
var isMyShow = controller.useMemo(function (s) {
|
|
2182
|
+
return s.goodsListState.isMyShow;
|
|
2183
|
+
}, []);
|
|
2184
|
+
var onChange = React.useCallback(function (e) {
|
|
2185
|
+
controller.run( /*#__PURE__*/function () {
|
|
2186
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2187
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2188
|
+
while (1) {
|
|
2189
|
+
switch (_context.prev = _context.next) {
|
|
2190
|
+
case 0:
|
|
2191
|
+
return _context.abrupt("return", s.goodsListState.isMyShow = !s.goodsListState.isMyShow);
|
|
2192
|
+
|
|
2193
|
+
case 1:
|
|
2194
|
+
case "end":
|
|
2195
|
+
return _context.stop();
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
}, _callee);
|
|
2199
|
+
}));
|
|
2200
|
+
|
|
2201
|
+
return function (_x) {
|
|
2202
|
+
return _ref.apply(this, arguments);
|
|
2203
|
+
};
|
|
2204
|
+
}());
|
|
2205
|
+
}, []);
|
|
2206
|
+
if (!productComparison.onComply) return React.createElement(React.Fragment, null);
|
|
2207
|
+
return React.createElement("span", null, React.createElement("label", {
|
|
2208
|
+
style: {
|
|
2209
|
+
marginRight: 2
|
|
2210
|
+
}
|
|
2211
|
+
}, React.createElement(Tooltip, {
|
|
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"
|
|
2213
|
+
}, React.createElement(Icon, {
|
|
2214
|
+
style: {
|
|
2215
|
+
marginRight: 3
|
|
2216
|
+
},
|
|
2217
|
+
type: "info-circle"
|
|
2218
|
+
})), "\u4F7F\u7528\u54EA\u65B9\u5546\u54C1\u63CF\u8FF0:"), React.createElement(Switch, {
|
|
2219
|
+
checked: isMyShow,
|
|
2220
|
+
checkedChildren: "\u6211\u65B9",
|
|
2221
|
+
unCheckedChildren: "\u5BF9\u65B9",
|
|
2222
|
+
defaultChecked: true,
|
|
2223
|
+
onChange: onChange
|
|
2224
|
+
}));
|
|
2225
|
+
});
|
|
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
|
+
|
|
2138
2329
|
function TableRow(props) {
|
|
2139
|
-
var controller =
|
|
2330
|
+
var controller = Invoice.useInvoiceController();
|
|
2140
2331
|
var goodsMap = controller.useMemo(function (s) {
|
|
2141
2332
|
return s.goodsListState.goodsMap;
|
|
2142
2333
|
}, []);
|
|
@@ -2145,11 +2336,75 @@ function TableRow(props) {
|
|
|
2145
2336
|
if (!i) return false;
|
|
2146
2337
|
return i.lineAttribute !== LineAttributeType$1.正常;
|
|
2147
2338
|
}, [props['data-row-key'], goodsMap]);
|
|
2148
|
-
return
|
|
2339
|
+
return React.createElement("tr", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2149
2340
|
className: "".concat(isR ? 'kts-invoice-operate-goods-discount ' : '').concat(props.className)
|
|
2150
2341
|
}));
|
|
2151
2342
|
}
|
|
2152
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
|
+
|
|
2153
2408
|
/** 延迟函数 */
|
|
2154
2409
|
var lazyFn = (function (fn) {
|
|
2155
2410
|
var delayed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
|
@@ -2185,8 +2440,8 @@ var evaluate = (function (expr) {
|
|
|
2185
2440
|
return parseFloat(math.evaluate(expr).toFixed(fractionDigits));
|
|
2186
2441
|
});
|
|
2187
2442
|
|
|
2188
|
-
var css_248z$
|
|
2189
|
-
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);
|
|
2190
2445
|
|
|
2191
2446
|
var Text = Typography.Text;
|
|
2192
2447
|
|
|
@@ -2196,9 +2451,9 @@ var _create = create(all, {
|
|
|
2196
2451
|
}),
|
|
2197
2452
|
chain = _create.chain;
|
|
2198
2453
|
|
|
2199
|
-
var
|
|
2454
|
+
var useAddDiscountRowButton = (function () {
|
|
2200
2455
|
/** 控制器 */
|
|
2201
|
-
var controller =
|
|
2456
|
+
var controller = Invoice.useInvoiceController();
|
|
2202
2457
|
var model = controller.useMemo(function (s) {
|
|
2203
2458
|
return s.model;
|
|
2204
2459
|
}, []);
|
|
@@ -2342,25 +2597,33 @@ var AddDiscountRowButton = decorator(Form.create())(function (props) {
|
|
|
2342
2597
|
}
|
|
2343
2598
|
}, _callee3);
|
|
2344
2599
|
})), [controller]);
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
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
|
+
};
|
|
2359
2622
|
});
|
|
2360
2623
|
var DrawerBody = decorator(Form.create())(function (props) {
|
|
2361
2624
|
var form = props.form;
|
|
2362
2625
|
var getFieldDecorator = form.getFieldDecorator;
|
|
2363
|
-
var controller =
|
|
2626
|
+
var controller = Invoice.useInvoiceController();
|
|
2364
2627
|
/** 选中的货物索引列表 */
|
|
2365
2628
|
|
|
2366
2629
|
var discountGoodIndex = controller.useMemo(function (s) {
|
|
@@ -2467,13 +2730,13 @@ var DrawerBody = decorator(Form.create())(function (props) {
|
|
|
2467
2730
|
});
|
|
2468
2731
|
});
|
|
2469
2732
|
}, 300), [form, lineAmountSum]);
|
|
2470
|
-
return
|
|
2733
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
2471
2734
|
className: "add-discount-row-body"
|
|
2472
|
-
},
|
|
2735
|
+
}, React.createElement("p", null, "\u5F53\u524D\u9009\u62E9", React.createElement(Text, {
|
|
2473
2736
|
type: "danger"
|
|
2474
|
-
}, 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, {
|
|
2475
2738
|
type: "danger"
|
|
2476
|
-
}, lineAmountSum.toFixed(2))),
|
|
2739
|
+
}, lineAmountSum.toFixed(2))), React.createElement(Form.Item, {
|
|
2477
2740
|
label: "\u6298\u6263\u7387\uFF1A"
|
|
2478
2741
|
}, getFieldDecorator('discount', {
|
|
2479
2742
|
rules: [{
|
|
@@ -2503,11 +2766,11 @@ var DrawerBody = decorator(Form.create())(function (props) {
|
|
|
2503
2766
|
callback();
|
|
2504
2767
|
}
|
|
2505
2768
|
}]
|
|
2506
|
-
})(
|
|
2769
|
+
})(React.createElement(Input, {
|
|
2507
2770
|
placeholder: "\u8BF7\u8F93\u5165\u5927\u4E8E0\u5C0F\u4E8E100\u7684\u6570\u5B57",
|
|
2508
2771
|
suffix: "%",
|
|
2509
2772
|
onChange: onChangeDiscount
|
|
2510
|
-
}))),
|
|
2773
|
+
}))), React.createElement(Form.Item, {
|
|
2511
2774
|
label: "\u6298\u6263\u91D1\u989D\uFF1A"
|
|
2512
2775
|
}, getFieldDecorator('discolineAmountunt', {
|
|
2513
2776
|
rules: [{
|
|
@@ -2537,19 +2800,19 @@ var DrawerBody = decorator(Form.create())(function (props) {
|
|
|
2537
2800
|
callback();
|
|
2538
2801
|
}
|
|
2539
2802
|
}]
|
|
2540
|
-
})(
|
|
2803
|
+
})(React.createElement(Input, {
|
|
2541
2804
|
placeholder: "\u8BF7\u8F93\u5165\u5927\u4E8E0\u5C0F\u4E8E\u91D1\u989D\u5408\u8BA1\u7684\u6570\u5B57",
|
|
2542
2805
|
suffix: "\xA5",
|
|
2543
2806
|
onChange: onChangeDiscolineAmountunt
|
|
2544
|
-
})))),
|
|
2807
|
+
})))), React.createElement("div", {
|
|
2545
2808
|
className: "add-discount-row-footer"
|
|
2546
|
-
},
|
|
2809
|
+
}, React.createElement(Button, {
|
|
2547
2810
|
block: true,
|
|
2548
2811
|
style: {
|
|
2549
2812
|
marginBottom: 12
|
|
2550
2813
|
},
|
|
2551
2814
|
onClick: onClose
|
|
2552
|
-
}, "\u53D6\u6D88"),
|
|
2815
|
+
}, "\u53D6\u6D88"), React.createElement(Button, {
|
|
2553
2816
|
type: "primary",
|
|
2554
2817
|
block: true,
|
|
2555
2818
|
onClick: onClickSave
|
|
@@ -2579,8 +2842,8 @@ var coolingFn = (function () {
|
|
|
2579
2842
|
}
|
|
2580
2843
|
});
|
|
2581
2844
|
|
|
2582
|
-
var
|
|
2583
|
-
var controller =
|
|
2845
|
+
var useEndowCodeButton = (function () {
|
|
2846
|
+
var controller = Invoice.useInvoiceController();
|
|
2584
2847
|
/** 是否禁用 */
|
|
2585
2848
|
|
|
2586
2849
|
var disabled = controller.useMemo(function (s) {
|
|
@@ -2657,89 +2920,214 @@ var EndowCodeButton = (function () {
|
|
|
2657
2920
|
}
|
|
2658
2921
|
}, _callee2);
|
|
2659
2922
|
})), [controller]);
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
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
|
+
};
|
|
2665
2933
|
});
|
|
2666
2934
|
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2935
|
+
/** 拆分全称加简称 */
|
|
2936
|
+
var getSN = function getSN(value) {
|
|
2937
|
+
debugger;
|
|
2938
|
+
if (!value) return undefined;
|
|
2939
|
+
var arr = value.match(/\*[^*]+\*/);
|
|
2940
|
+
|
|
2941
|
+
if (arr && arr[0]) {
|
|
2942
|
+
return {
|
|
2943
|
+
shorthand: arr[0].split('*')[1],
|
|
2944
|
+
full: value.replace(arr[0], '')
|
|
2945
|
+
};
|
|
2946
|
+
} else {
|
|
2947
|
+
return {
|
|
2948
|
+
shorthand: undefined,
|
|
2949
|
+
full: value
|
|
2950
|
+
};
|
|
2951
|
+
}
|
|
2952
|
+
};
|
|
2953
|
+
/** 组合全称加简称 */
|
|
2954
|
+
|
|
2955
|
+
var getItemName = function getItemName(value) {
|
|
2956
|
+
if (value.shorthand) {
|
|
2957
|
+
return "*".concat(value.shorthand, "*").concat(value.full);
|
|
2958
|
+
} else {
|
|
2959
|
+
return value.full;
|
|
2960
|
+
}
|
|
2961
|
+
};
|
|
2962
|
+
/** 设置简称 */
|
|
2963
|
+
|
|
2964
|
+
var setShorthand = function setShorthand(name, shorthand) {
|
|
2965
|
+
if (!name) return undefined;
|
|
2966
|
+
var sn = getSN(name);
|
|
2967
|
+
if (!sn) return undefined;
|
|
2968
|
+
sn.shorthand = shorthand || '';
|
|
2969
|
+
return getItemName(sn);
|
|
2970
|
+
};
|
|
2971
|
+
|
|
2972
|
+
var useCommodityComparisonButton = (function () {
|
|
2973
|
+
var controller = Invoice.useInvoiceController();
|
|
2974
|
+
|
|
2975
|
+
var _controller$useMemo = controller.useMemo(function (s) {
|
|
2976
|
+
return s.goodsListState.productComparison;
|
|
2977
|
+
}, []),
|
|
2978
|
+
onComply = _controller$useMemo.onComply;
|
|
2672
2979
|
/** 是否禁用 */
|
|
2673
2980
|
|
|
2981
|
+
|
|
2674
2982
|
var disabled = controller.useMemo(function (s) {
|
|
2675
2983
|
if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
|
|
2676
|
-
return s.goodsListState.selectedGoodIndex.some(function (e) {
|
|
2677
|
-
var good = s.goodsListState.goodsMap.get(e);
|
|
2678
|
-
if (!good) return true;
|
|
2679
|
-
return good.lineAttribute !== LineAttributeType$1.正常;
|
|
2680
|
-
});
|
|
2681
2984
|
}, []);
|
|
2682
|
-
|
|
2683
|
-
controller.pipeline( /*#__PURE__*/function () {
|
|
2684
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2685
|
-
var goodsList;
|
|
2686
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2687
|
-
while (1) {
|
|
2688
|
-
switch (_context.prev = _context.next) {
|
|
2689
|
-
case 0:
|
|
2690
|
-
goodsList = s.goodsListState.goodsList.filter(function (e) {
|
|
2691
|
-
return s.goodsListState.selectedGoodIndex.indexOf(e.$index) < 0;
|
|
2692
|
-
});
|
|
2985
|
+
/** 点击了 */
|
|
2693
2986
|
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2987
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2988
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2989
|
+
while (1) {
|
|
2990
|
+
switch (_context2.prev = _context2.next) {
|
|
2991
|
+
case 0:
|
|
2992
|
+
_context2.next = 2;
|
|
2993
|
+
return controller.saveEditGood();
|
|
2699
2994
|
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
});
|
|
2995
|
+
case 2:
|
|
2996
|
+
_context2.next = 4;
|
|
2997
|
+
return controller.wait();
|
|
2704
2998
|
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
}, _callee);
|
|
2711
|
-
}));
|
|
2999
|
+
case 4:
|
|
3000
|
+
_context2.next = 6;
|
|
3001
|
+
return controller.run( /*#__PURE__*/function () {
|
|
3002
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
3003
|
+
var _s$goodsListState, _s$goodsListState$pro;
|
|
2712
3004
|
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
3005
|
+
var goods, newGoods;
|
|
3006
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3007
|
+
while (1) {
|
|
3008
|
+
switch (_context.prev = _context.next) {
|
|
3009
|
+
case 0:
|
|
3010
|
+
if (!(s.goodsListState.editGood && s.goodsListState.selectedGoodIndex.indexOf(s.goodsListState.editGood.$index) >= 0)) {
|
|
3011
|
+
_context.next = 3;
|
|
3012
|
+
break;
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
coolingFn('不能给正在编辑的货物执行商品对照', 3000, function () {
|
|
3016
|
+
message.error('不能给正在编辑的货物执行商品对照');
|
|
3017
|
+
});
|
|
3018
|
+
return _context.abrupt("return");
|
|
3019
|
+
|
|
3020
|
+
case 3:
|
|
3021
|
+
if ((_s$goodsListState = s.goodsListState) === null || _s$goodsListState === void 0 ? void 0 : (_s$goodsListState$pro = _s$goodsListState.productComparison) === null || _s$goodsListState$pro === void 0 ? void 0 : _s$goodsListState$pro.onComply) {
|
|
3022
|
+
_context.next = 5;
|
|
3023
|
+
break;
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
return _context.abrupt("return");
|
|
3027
|
+
|
|
3028
|
+
case 5:
|
|
3029
|
+
goods = s.goodsListState.selectedGoodIndex.map(function (e) {
|
|
3030
|
+
var _getSN, _getSN2;
|
|
3031
|
+
|
|
3032
|
+
var t = s.goodsListState.goodsMap.get(e);
|
|
3033
|
+
if (!t) return undefined;
|
|
3034
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
3035
|
+
itemName: (_getSN = getSN(t.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.full,
|
|
3036
|
+
itemNameOther: (_getSN2 = getSN(t.itemNameOther)) === null || _getSN2 === void 0 ? void 0 : _getSN2.full
|
|
3037
|
+
});
|
|
3038
|
+
}).filter(function (e) {
|
|
3039
|
+
return !!e;
|
|
3040
|
+
}); // 比对后的商品
|
|
3041
|
+
|
|
3042
|
+
_context.next = 8;
|
|
3043
|
+
return s.goodsListState.productComparison.onComply(goods);
|
|
3044
|
+
|
|
3045
|
+
case 8:
|
|
3046
|
+
newGoods = _context.sent;
|
|
3047
|
+
newGoods.filter(function (e) {
|
|
3048
|
+
var _getSN3, _getSN4;
|
|
3049
|
+
|
|
3050
|
+
var vt = s.goodsListState.goodsMap.get(e.$index);
|
|
3051
|
+
if (!vt) return undefined;
|
|
3052
|
+
vt.itemName = e.itemName ? setShorthand(e.itemName, (_getSN3 = getSN(vt.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.shorthand) : vt.itemName;
|
|
3053
|
+
vt.itemNameOther = e.itemNameOther ? setShorthand(e.itemNameOther, (_getSN4 = getSN(vt.itemNameOther)) === null || _getSN4 === void 0 ? void 0 : _getSN4.shorthand) : vt.itemNameOther;
|
|
3054
|
+
vt.unit = e.unit ? e.unit : vt.unit;
|
|
3055
|
+
vt.unitOther = e.unitOther ? e.unitOther : vt.unitOther;
|
|
3056
|
+
vt.itemModelName = e.itemModelName ? e.itemModelName : vt.itemModelName;
|
|
3057
|
+
vt.itemModelNameOther = e.itemModelNameOther ? e.itemModelNameOther : vt.itemModelNameOther;
|
|
3058
|
+
vt.itemCode = e.itemCode ? e.itemCode : vt.itemCode;
|
|
3059
|
+
vt.itemCodeOther = e.itemCodeOther ? e.itemCodeOther : vt.itemCodeOther;
|
|
3060
|
+
});
|
|
3061
|
+
|
|
3062
|
+
case 10:
|
|
3063
|
+
case "end":
|
|
3064
|
+
return _context.stop();
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
}, _callee);
|
|
3068
|
+
}));
|
|
3069
|
+
|
|
3070
|
+
return function (_x) {
|
|
3071
|
+
return _ref2.apply(this, arguments);
|
|
3072
|
+
};
|
|
3073
|
+
}());
|
|
3074
|
+
|
|
3075
|
+
case 6:
|
|
3076
|
+
case "end":
|
|
3077
|
+
return _context2.stop();
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
}, _callee2);
|
|
3081
|
+
})), []);
|
|
3082
|
+
var menuItem = React.useMemo(function () {
|
|
3083
|
+
// 没用 执行商品对照 的方法 不显示按钮
|
|
3084
|
+
if (!onComply) return React.createElement(React.Fragment, null);
|
|
3085
|
+
return React.createElement(Menu.Item, {
|
|
3086
|
+
key: "3",
|
|
3087
|
+
disabled: disabled,
|
|
3088
|
+
onClick: onClick
|
|
3089
|
+
}, "\u6267\u884C\u5546\u54C1\u5BF9\u7167");
|
|
3090
|
+
}, []);
|
|
3091
|
+
return {
|
|
3092
|
+
menuItem: menuItem
|
|
3093
|
+
};
|
|
2724
3094
|
});
|
|
2725
3095
|
|
|
2726
|
-
|
|
3096
|
+
function BulkMenu() {
|
|
3097
|
+
/** 删除行 */
|
|
3098
|
+
var delRowButton = useDelRowButton();
|
|
3099
|
+
/** 添加折扣行 */
|
|
2727
3100
|
|
|
2728
|
-
|
|
3101
|
+
var addDiscountRowButton = useAddDiscountRowButton();
|
|
3102
|
+
/** 批量赋码 */
|
|
3103
|
+
|
|
3104
|
+
var endowCodeButton = useEndowCodeButton();
|
|
3105
|
+
/** 执行商品对照 */
|
|
3106
|
+
|
|
3107
|
+
var commodityComparisonButton = useCommodityComparisonButton();
|
|
3108
|
+
var menu = React.createElement(Menu, null, delRowButton.menuItem, addDiscountRowButton.menuItem, endowCodeButton.menuItem, commodityComparisonButton.menuItem);
|
|
3109
|
+
return React.createElement(React.Fragment, null, React.createElement(Dropdown, {
|
|
3110
|
+
overlay: menu
|
|
3111
|
+
}, React.createElement(Button, null, "\u6279\u91CF\u64CD\u4F5C\u884C")), addDiscountRowButton.drawer);
|
|
3112
|
+
}
|
|
3113
|
+
|
|
3114
|
+
var _defs$1, _path$2;
|
|
3115
|
+
|
|
3116
|
+
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); }
|
|
2729
3117
|
|
|
2730
3118
|
function SvgSpot(props) {
|
|
2731
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
3119
|
+
return /*#__PURE__*/createElement("svg", _extends$2({
|
|
2732
3120
|
className: "spot_svg__icon",
|
|
2733
3121
|
viewBox: "0 0 1024 1024",
|
|
2734
3122
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2735
|
-
}, props), _defs$1 || (_defs$1 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("style", null))), _path$
|
|
3123
|
+
}, props), _defs$1 || (_defs$1 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("style", null))), _path$2 || (_path$2 = /*#__PURE__*/createElement("path", {
|
|
2736
3124
|
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"
|
|
2737
3125
|
})));
|
|
2738
3126
|
}
|
|
2739
3127
|
|
|
2740
3128
|
var Text$1 = Typography.Text;
|
|
2741
3129
|
var useDelItem = (function (goods) {
|
|
2742
|
-
var controller =
|
|
3130
|
+
var controller = Invoice.useInvoiceController();
|
|
2743
3131
|
var onClick = React.useCallback(function () {
|
|
2744
3132
|
controller.delGood(goods.$index);
|
|
2745
3133
|
}, [controller, goods.$index]);
|
|
@@ -2749,10 +3137,10 @@ var useDelItem = (function (goods) {
|
|
|
2749
3137
|
}
|
|
2750
3138
|
|
|
2751
3139
|
return React.useMemo(function () {
|
|
2752
|
-
return
|
|
3140
|
+
return React.createElement(Menu.Item, {
|
|
2753
3141
|
key: "delItem",
|
|
2754
3142
|
onClick: onClick
|
|
2755
|
-
},
|
|
3143
|
+
}, React.createElement(Text$1, {
|
|
2756
3144
|
strong: true,
|
|
2757
3145
|
type: "danger"
|
|
2758
3146
|
}, "\u5220\u9664"));
|
|
@@ -2761,7 +3149,7 @@ var useDelItem = (function (goods) {
|
|
|
2761
3149
|
|
|
2762
3150
|
var Text$2 = Typography.Text;
|
|
2763
3151
|
var useAddDiscount = (function (goods) {
|
|
2764
|
-
var controller =
|
|
3152
|
+
var controller = Invoice.useInvoiceController();
|
|
2765
3153
|
/** 点击了 添加折扣行 按钮 */
|
|
2766
3154
|
|
|
2767
3155
|
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
@@ -2871,10 +3259,10 @@ var useAddDiscount = (function (goods) {
|
|
|
2871
3259
|
return undefined;
|
|
2872
3260
|
}
|
|
2873
3261
|
|
|
2874
|
-
return
|
|
3262
|
+
return React.createElement(Menu.Item, {
|
|
2875
3263
|
key: "addDiscount",
|
|
2876
3264
|
onClick: onClick
|
|
2877
|
-
},
|
|
3265
|
+
}, React.createElement(Text$2, {
|
|
2878
3266
|
strong: true
|
|
2879
3267
|
}, "\u6DFB\u52A0\u6298\u6263\u884C"));
|
|
2880
3268
|
}, [onClick, goods.lineAttribute]);
|
|
@@ -9359,44 +9747,6 @@ var updateUnitPriceTax = function updateUnitPriceTax(controller, form, record) {
|
|
|
9359
9747
|
};
|
|
9360
9748
|
}());
|
|
9361
9749
|
};
|
|
9362
|
-
/** 保存到编辑货物 */
|
|
9363
|
-
|
|
9364
|
-
var onSaveEditGood = lazyFn$1(function (controller, form, record, id) {
|
|
9365
|
-
form.validateFields( /*#__PURE__*/function () {
|
|
9366
|
-
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(err, values) {
|
|
9367
|
-
var v;
|
|
9368
|
-
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
9369
|
-
while (1) {
|
|
9370
|
-
switch (_context9.prev = _context9.next) {
|
|
9371
|
-
case 0:
|
|
9372
|
-
err = err || {};
|
|
9373
|
-
|
|
9374
|
-
if (!err[id]) {
|
|
9375
|
-
_context9.next = 3;
|
|
9376
|
-
break;
|
|
9377
|
-
}
|
|
9378
|
-
|
|
9379
|
-
return _context9.abrupt("return");
|
|
9380
|
-
|
|
9381
|
-
case 3:
|
|
9382
|
-
v = {};
|
|
9383
|
-
v[id] = values[id];
|
|
9384
|
-
_context9.next = 7;
|
|
9385
|
-
return controller.setEditGood(_objectSpread2({}, v));
|
|
9386
|
-
|
|
9387
|
-
case 7:
|
|
9388
|
-
case "end":
|
|
9389
|
-
return _context9.stop();
|
|
9390
|
-
}
|
|
9391
|
-
}
|
|
9392
|
-
}, _callee9);
|
|
9393
|
-
}));
|
|
9394
|
-
|
|
9395
|
-
return function (_x17, _x18) {
|
|
9396
|
-
return _ref9.apply(this, arguments);
|
|
9397
|
-
};
|
|
9398
|
-
}());
|
|
9399
|
-
}, 1000);
|
|
9400
9750
|
/** 单调赋码 */
|
|
9401
9751
|
|
|
9402
9752
|
var endowCode = /*#__PURE__*/function () {
|
|
@@ -9492,10 +9842,101 @@ var endowCode = /*#__PURE__*/function () {
|
|
|
9492
9842
|
return _ref10.apply(this, arguments);
|
|
9493
9843
|
};
|
|
9494
9844
|
}();
|
|
9845
|
+
/** 修改了 货物名称 */
|
|
9846
|
+
|
|
9847
|
+
var onChangeItemName = /*#__PURE__*/function () {
|
|
9848
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(controller, form, record) {
|
|
9849
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
9850
|
+
while (1) {
|
|
9851
|
+
switch (_context13.prev = _context13.next) {
|
|
9852
|
+
case 0:
|
|
9853
|
+
controller.run( /*#__PURE__*/function () {
|
|
9854
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
|
|
9855
|
+
var _getSN$shorthand, _getSN;
|
|
9856
|
+
|
|
9857
|
+
var value, shorthand;
|
|
9858
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
9859
|
+
while (1) {
|
|
9860
|
+
switch (_context12.prev = _context12.next) {
|
|
9861
|
+
case 0:
|
|
9862
|
+
value = form.getFieldsValue().itemName;
|
|
9863
|
+
shorthand = (_getSN$shorthand = (_getSN = getSN(value)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand) !== null && _getSN$shorthand !== void 0 ? _getSN$shorthand : '';
|
|
9864
|
+
|
|
9865
|
+
if (!s.goodsListState.isMyShow) {
|
|
9866
|
+
_context12.next = 11;
|
|
9867
|
+
break;
|
|
9868
|
+
}
|
|
9869
|
+
|
|
9870
|
+
_context12.next = 5;
|
|
9871
|
+
return controller.setEditGood({
|
|
9872
|
+
itemName: value
|
|
9873
|
+
});
|
|
9874
|
+
|
|
9875
|
+
case 5:
|
|
9876
|
+
_context12.t0 = record.itemNameOther;
|
|
9877
|
+
|
|
9878
|
+
if (!_context12.t0) {
|
|
9879
|
+
_context12.next = 9;
|
|
9880
|
+
break;
|
|
9881
|
+
}
|
|
9882
|
+
|
|
9883
|
+
_context12.next = 9;
|
|
9884
|
+
return controller.setEditGood({
|
|
9885
|
+
itemNameOther: setShorthand(record.itemNameOther, shorthand)
|
|
9886
|
+
});
|
|
9887
|
+
|
|
9888
|
+
case 9:
|
|
9889
|
+
_context12.next = 17;
|
|
9890
|
+
break;
|
|
9891
|
+
|
|
9892
|
+
case 11:
|
|
9893
|
+
_context12.next = 13;
|
|
9894
|
+
return controller.setEditGood({
|
|
9895
|
+
itemNameOther: value
|
|
9896
|
+
});
|
|
9897
|
+
|
|
9898
|
+
case 13:
|
|
9899
|
+
_context12.t1 = record.itemName;
|
|
9900
|
+
|
|
9901
|
+
if (!_context12.t1) {
|
|
9902
|
+
_context12.next = 17;
|
|
9903
|
+
break;
|
|
9904
|
+
}
|
|
9905
|
+
|
|
9906
|
+
_context12.next = 17;
|
|
9907
|
+
return controller.setEditGood({
|
|
9908
|
+
itemName: setShorthand(record.itemName, shorthand)
|
|
9909
|
+
});
|
|
9910
|
+
|
|
9911
|
+
case 17:
|
|
9912
|
+
case "end":
|
|
9913
|
+
return _context12.stop();
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
}, _callee12);
|
|
9917
|
+
}));
|
|
9918
|
+
|
|
9919
|
+
return function (_x25) {
|
|
9920
|
+
return _ref13.apply(this, arguments);
|
|
9921
|
+
};
|
|
9922
|
+
}());
|
|
9923
|
+
|
|
9924
|
+
case 1:
|
|
9925
|
+
case "end":
|
|
9926
|
+
return _context13.stop();
|
|
9927
|
+
}
|
|
9928
|
+
}
|
|
9929
|
+
}, _callee13);
|
|
9930
|
+
}));
|
|
9931
|
+
|
|
9932
|
+
return function onChangeItemName(_x22, _x23, _x24) {
|
|
9933
|
+
return _ref12.apply(this, arguments);
|
|
9934
|
+
};
|
|
9935
|
+
}();
|
|
9495
9936
|
|
|
9496
9937
|
var Text$3 = Typography.Text;
|
|
9497
9938
|
var useEndowCode = (function (goods) {
|
|
9498
|
-
var controller =
|
|
9939
|
+
var controller = Invoice.useInvoiceController();
|
|
9499
9940
|
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9500
9941
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9501
9942
|
while (1) {
|
|
@@ -9511,20 +9952,111 @@ var useEndowCode = (function (goods) {
|
|
|
9511
9952
|
}, _callee);
|
|
9512
9953
|
})), [controller, goods]);
|
|
9513
9954
|
return React.useMemo(function () {
|
|
9514
|
-
return
|
|
9955
|
+
return React.createElement(Menu.Item, {
|
|
9515
9956
|
key: "endowCode",
|
|
9516
9957
|
onClick: onClick
|
|
9517
|
-
},
|
|
9958
|
+
}, React.createElement(Text$3, {
|
|
9518
9959
|
strong: true
|
|
9519
9960
|
}, "\u8D4B\u7801"));
|
|
9520
9961
|
}, [goods.lineAttribute, onClick]);
|
|
9521
9962
|
});
|
|
9522
9963
|
|
|
9523
|
-
var
|
|
9524
|
-
|
|
9964
|
+
var Text$4 = Typography.Text;
|
|
9965
|
+
var useAddComparison = (function (goods) {
|
|
9966
|
+
var controller = Invoice.useInvoiceController();
|
|
9967
|
+
var productComparison = controller.useMemo(function (s) {
|
|
9968
|
+
return s.goodsListState.productComparison;
|
|
9969
|
+
}, []);
|
|
9970
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
9971
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9972
|
+
while (1) {
|
|
9973
|
+
switch (_context2.prev = _context2.next) {
|
|
9974
|
+
case 0:
|
|
9975
|
+
_context2.next = 2;
|
|
9976
|
+
return controller.saveEditGood();
|
|
9977
|
+
|
|
9978
|
+
case 2:
|
|
9979
|
+
_context2.next = 4;
|
|
9980
|
+
return controller.wait();
|
|
9981
|
+
|
|
9982
|
+
case 4:
|
|
9983
|
+
_context2.next = 6;
|
|
9984
|
+
return controller.run( /*#__PURE__*/function () {
|
|
9985
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
9986
|
+
var err, key;
|
|
9987
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9988
|
+
while (1) {
|
|
9989
|
+
switch (_context.prev = _context.next) {
|
|
9990
|
+
case 0:
|
|
9991
|
+
if (!s.goodsListState.form) {
|
|
9992
|
+
_context.next = 11;
|
|
9993
|
+
break;
|
|
9994
|
+
}
|
|
9995
|
+
|
|
9996
|
+
err = s.goodsListState.form.getFieldsError();
|
|
9997
|
+
_context.t0 = _regeneratorRuntime().keys(err);
|
|
9998
|
+
|
|
9999
|
+
case 3:
|
|
10000
|
+
if ((_context.t1 = _context.t0()).done) {
|
|
10001
|
+
_context.next = 11;
|
|
10002
|
+
break;
|
|
10003
|
+
}
|
|
10004
|
+
|
|
10005
|
+
key = _context.t1.value;
|
|
10006
|
+
|
|
10007
|
+
if (err[key]) {
|
|
10008
|
+
_context.next = 7;
|
|
10009
|
+
break;
|
|
10010
|
+
}
|
|
10011
|
+
|
|
10012
|
+
return _context.abrupt("continue", 3);
|
|
10013
|
+
|
|
10014
|
+
case 7:
|
|
10015
|
+
message.error(err[key][0]);
|
|
10016
|
+
return _context.abrupt("return");
|
|
10017
|
+
|
|
10018
|
+
case 11:
|
|
10019
|
+
s.goodsListState.addComparisonIndex = goods.$index;
|
|
10020
|
+
|
|
10021
|
+
case 12:
|
|
10022
|
+
case "end":
|
|
10023
|
+
return _context.stop();
|
|
10024
|
+
}
|
|
10025
|
+
}
|
|
10026
|
+
}, _callee);
|
|
10027
|
+
}));
|
|
10028
|
+
|
|
10029
|
+
return function (_x) {
|
|
10030
|
+
return _ref2.apply(this, arguments);
|
|
10031
|
+
};
|
|
10032
|
+
}());
|
|
10033
|
+
|
|
10034
|
+
case 6:
|
|
10035
|
+
case "end":
|
|
10036
|
+
return _context2.stop();
|
|
10037
|
+
}
|
|
10038
|
+
}
|
|
10039
|
+
}, _callee2);
|
|
10040
|
+
})), [controller, goods.$index]);
|
|
10041
|
+
return React.useMemo(function () {
|
|
10042
|
+
if (productComparison.onComply) {
|
|
10043
|
+
return React.createElement(Menu.Item, {
|
|
10044
|
+
key: "delItem",
|
|
10045
|
+
onClick: onClick
|
|
10046
|
+
}, React.createElement(Text$4, {
|
|
10047
|
+
strong: true
|
|
10048
|
+
}, "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167"));
|
|
10049
|
+
} else {
|
|
10050
|
+
return React.createElement(React.Fragment, null);
|
|
10051
|
+
}
|
|
10052
|
+
}, [onClick, productComparison]);
|
|
10053
|
+
});
|
|
10054
|
+
|
|
10055
|
+
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";
|
|
10056
|
+
styleInject(css_248z$6);
|
|
9525
10057
|
|
|
9526
10058
|
var RowMenu = (function (props) {
|
|
9527
|
-
var controller =
|
|
10059
|
+
var controller = Invoice.useInvoiceController();
|
|
9528
10060
|
var model = controller.useMemo(function (s) {
|
|
9529
10061
|
return s.model;
|
|
9530
10062
|
}, []);
|
|
@@ -9539,16 +10071,19 @@ var RowMenu = (function (props) {
|
|
|
9539
10071
|
var delItem = useDelItem(props.goods);
|
|
9540
10072
|
var addDiscount = useAddDiscount(props.goods);
|
|
9541
10073
|
var endowCode = useEndowCode(props.goods);
|
|
10074
|
+
var addComparison = useAddComparison(props.goods);
|
|
9542
10075
|
var itemList = React.useMemo(function () {
|
|
9543
10076
|
var arr = [];
|
|
9544
10077
|
model !== 'prefab' && isAddDiscount !== false && addDiscount && arr.push(addDiscount); // 添加折扣行
|
|
9545
10078
|
|
|
10079
|
+
arr.push(addComparison); // 添加商品对照
|
|
10080
|
+
|
|
9546
10081
|
endowCode && arr.push(endowCode); // 赋码
|
|
9547
10082
|
|
|
9548
10083
|
model !== 'prefab' && delItem && arr.push(delItem); // 删除
|
|
9549
10084
|
|
|
9550
10085
|
if (!goodsMenuExpand || goodsMenuExpand.length === 0) return arr;
|
|
9551
|
-
arr.unshift(
|
|
10086
|
+
arr.unshift(React.createElement(Menu.Divider, {
|
|
9552
10087
|
key: "divider-1"
|
|
9553
10088
|
}));
|
|
9554
10089
|
|
|
@@ -9561,35 +10096,45 @@ var RowMenu = (function (props) {
|
|
|
9561
10096
|
}, [controller, endowCode, addDiscount, delItem, goodsMenuExpand, props.goods, model, isAddDiscount]);
|
|
9562
10097
|
|
|
9563
10098
|
if (itemList.length === 0) {
|
|
9564
|
-
return
|
|
10099
|
+
return React.createElement(React.Fragment, null);
|
|
9565
10100
|
}
|
|
9566
10101
|
|
|
9567
|
-
return
|
|
9568
|
-
overlay:
|
|
10102
|
+
return React.createElement(Dropdown, {
|
|
10103
|
+
overlay: React.createElement(Menu, null, itemList),
|
|
9569
10104
|
trigger: ['click']
|
|
9570
|
-
},
|
|
10105
|
+
}, React.createElement(Button, {
|
|
9571
10106
|
className: "kts-invoice-operate-goods-list-columns-row-menu ant-btn-icon-only",
|
|
9572
10107
|
type: "link"
|
|
9573
|
-
},
|
|
10108
|
+
}, React.createElement(Icon, {
|
|
9574
10109
|
component: SvgSpot
|
|
9575
10110
|
})));
|
|
9576
10111
|
});
|
|
9577
10112
|
|
|
9578
|
-
var Text$
|
|
10113
|
+
var Text$5 = Typography.Text;
|
|
9579
10114
|
var useColumns = (function (form) {
|
|
9580
10115
|
var getFieldDecorator = form.getFieldDecorator,
|
|
9581
10116
|
getFieldValue = form.getFieldValue;
|
|
9582
|
-
var controller =
|
|
10117
|
+
var controller = Invoice.useInvoiceController();
|
|
9583
10118
|
/** 是否含税 */
|
|
9584
10119
|
|
|
9585
10120
|
var isTaxIncluded = controller.useMemo(function (e) {
|
|
9586
10121
|
return e.goodsListState.isTaxIncluded;
|
|
9587
10122
|
}, []);
|
|
10123
|
+
/** 是否显示我方 */
|
|
10124
|
+
|
|
10125
|
+
var isMyShow = controller.useMemo(function (e) {
|
|
10126
|
+
return e.goodsListState.isMyShow;
|
|
10127
|
+
}, []);
|
|
9588
10128
|
/** 正在编辑的货物 */
|
|
9589
10129
|
|
|
9590
10130
|
var editGood = controller.useMemo(function (e) {
|
|
9591
10131
|
return e.goodsListState.editGood;
|
|
9592
10132
|
}, []);
|
|
10133
|
+
/** 搜索条件 */
|
|
10134
|
+
|
|
10135
|
+
var searchValue = controller.useMemo(function (e) {
|
|
10136
|
+
return e.goodsListState.searchValue;
|
|
10137
|
+
}, []);
|
|
9593
10138
|
/** 税率列表 */
|
|
9594
10139
|
|
|
9595
10140
|
var taxRateList = controller.useMemo(function (e) {
|
|
@@ -9616,120 +10161,208 @@ var useColumns = (function (form) {
|
|
|
9616
10161
|
|
|
9617
10162
|
var columns = React.useMemo(function () {
|
|
9618
10163
|
return [{
|
|
9619
|
-
title:
|
|
10164
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
9620
10165
|
type: "danger"
|
|
9621
10166
|
}, "*"), "\u8D27\u7269\u540D\u79F0"),
|
|
9622
|
-
dataIndex: 'itemName',
|
|
9623
10167
|
key: 'itemName',
|
|
9624
|
-
render: function render(
|
|
10168
|
+
render: function render(_, record) {
|
|
9625
10169
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9626
10170
|
var _editGood$itemName;
|
|
9627
10171
|
|
|
9628
|
-
return
|
|
10172
|
+
return React.createElement(Form.Item, null, React.createElement("div", {
|
|
9629
10173
|
style: {
|
|
9630
10174
|
display: 'flex'
|
|
9631
10175
|
}
|
|
9632
10176
|
}, getFieldDecorator('itemName', {
|
|
9633
|
-
initialValue:
|
|
10177
|
+
initialValue: isMyShow ? record.itemName : record.itemNameOther,
|
|
9634
10178
|
rules: [{
|
|
9635
|
-
|
|
9636
|
-
|
|
10179
|
+
validator: function () {
|
|
10180
|
+
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, __, callback) {
|
|
10181
|
+
var value;
|
|
10182
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10183
|
+
while (1) {
|
|
10184
|
+
switch (_context.prev = _context.next) {
|
|
10185
|
+
case 0:
|
|
10186
|
+
_context.next = 2;
|
|
10187
|
+
return controller.wait();
|
|
10188
|
+
|
|
10189
|
+
case 2:
|
|
10190
|
+
value = controller.state.goodsListState.editGood;
|
|
10191
|
+
|
|
10192
|
+
if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameOther))) {
|
|
10193
|
+
_context.next = 7;
|
|
10194
|
+
break;
|
|
10195
|
+
}
|
|
10196
|
+
|
|
10197
|
+
callback('货物名称不能为空');
|
|
10198
|
+
_context.next = 8;
|
|
10199
|
+
break;
|
|
10200
|
+
|
|
10201
|
+
case 7:
|
|
10202
|
+
return _context.abrupt("return");
|
|
10203
|
+
|
|
10204
|
+
case 8:
|
|
10205
|
+
case "end":
|
|
10206
|
+
return _context.stop();
|
|
10207
|
+
}
|
|
10208
|
+
}
|
|
10209
|
+
}, _callee);
|
|
10210
|
+
}));
|
|
10211
|
+
|
|
10212
|
+
function validator(_x, _x2, _x3) {
|
|
10213
|
+
return _validator.apply(this, arguments);
|
|
10214
|
+
}
|
|
10215
|
+
|
|
10216
|
+
return validator;
|
|
10217
|
+
}()
|
|
9637
10218
|
}]
|
|
9638
|
-
})(
|
|
10219
|
+
})(React.createElement(MyInput, {
|
|
9639
10220
|
style: {
|
|
9640
10221
|
flex: 1
|
|
9641
10222
|
},
|
|
9642
10223
|
onChange: function onChange() {
|
|
9643
|
-
|
|
10224
|
+
onChangeItemName(controller, form, record);
|
|
9644
10225
|
}
|
|
9645
|
-
})),
|
|
10226
|
+
})), React.createElement("div", {
|
|
9646
10227
|
className: "kts-invoice-operate-goods-list-able-list-itemName-import"
|
|
9647
|
-
}, !((_editGood$itemName = editGood.itemName) === null || _editGood$itemName === void 0 ? void 0 : _editGood$itemName.match(/\*[^*]+\*/)) &&
|
|
10228
|
+
}, !((_editGood$itemName = editGood.itemName) === null || _editGood$itemName === void 0 ? void 0 : _editGood$itemName.match(/\*[^*]+\*/)) && React.createElement(Button, {
|
|
9648
10229
|
onClick: function onClick() {
|
|
9649
10230
|
endowCode(controller, record);
|
|
9650
10231
|
},
|
|
9651
10232
|
type: "link",
|
|
9652
10233
|
icon: "file-add"
|
|
9653
|
-
}), controller.getGoodsList &&
|
|
9654
|
-
onClick: function
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
10234
|
+
}), controller.getGoodsList && React.createElement(Button, {
|
|
10235
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
10236
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
10237
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10238
|
+
while (1) {
|
|
10239
|
+
switch (_context2.prev = _context2.next) {
|
|
10240
|
+
case 0:
|
|
10241
|
+
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
9662
10242
|
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
}
|
|
10243
|
+
case 1:
|
|
10244
|
+
case "end":
|
|
10245
|
+
return _context2.stop();
|
|
9667
10246
|
}
|
|
9668
|
-
}
|
|
9669
|
-
})
|
|
10247
|
+
}
|
|
10248
|
+
}, _callee2);
|
|
10249
|
+
}));
|
|
9670
10250
|
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
},
|
|
10251
|
+
return function (_x4) {
|
|
10252
|
+
return _ref.apply(this, arguments);
|
|
10253
|
+
};
|
|
10254
|
+
}()),
|
|
9676
10255
|
type: "link",
|
|
9677
10256
|
icon: "plus-circle"
|
|
9678
10257
|
}))));
|
|
9679
10258
|
} else {
|
|
9680
|
-
return
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
}
|
|
10259
|
+
return React.createElement(MyItemNameDiv, {
|
|
10260
|
+
valueT: formatSearch(record.itemName, searchValue),
|
|
10261
|
+
valueF: record.itemNameOther,
|
|
10262
|
+
isMyShow: isMyShow
|
|
10263
|
+
}); // return (
|
|
10264
|
+
// <span style={{ padding: '0 10px' }}>{formatSearch(value, searchValue)}</span>
|
|
10265
|
+
// );
|
|
9685
10266
|
}
|
|
9686
10267
|
}
|
|
9687
10268
|
}, {
|
|
9688
10269
|
title: '货物规格型号',
|
|
9689
|
-
dataIndex: 'itemModelName',
|
|
9690
10270
|
key: 'itemModelName',
|
|
9691
10271
|
width: 119,
|
|
9692
|
-
render: function render(
|
|
10272
|
+
render: function render(_, record) {
|
|
9693
10273
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9694
|
-
return
|
|
9695
|
-
initialValue: editGood.itemModelName
|
|
9696
|
-
})(
|
|
9697
|
-
onChange: function
|
|
9698
|
-
|
|
9699
|
-
|
|
10274
|
+
return React.createElement(Form.Item, null, getFieldDecorator('itemModelName', {
|
|
10275
|
+
initialValue: isMyShow ? editGood.itemModelName : editGood.itemModelNameOther
|
|
10276
|
+
})(React.createElement(MyInput, {
|
|
10277
|
+
onChange: function () {
|
|
10278
|
+
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
10279
|
+
var key, value;
|
|
10280
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
10281
|
+
while (1) {
|
|
10282
|
+
switch (_context3.prev = _context3.next) {
|
|
10283
|
+
case 0:
|
|
10284
|
+
_context3.next = 2;
|
|
10285
|
+
return controller.wait();
|
|
10286
|
+
|
|
10287
|
+
case 2:
|
|
10288
|
+
key = isMyShow ? 'itemModelName' : 'itemModelNameOther';
|
|
10289
|
+
value = {};
|
|
10290
|
+
value[key] = form.getFieldsValue().itemModelName;
|
|
10291
|
+
controller.setEditGood(value);
|
|
10292
|
+
|
|
10293
|
+
case 6:
|
|
10294
|
+
case "end":
|
|
10295
|
+
return _context3.stop();
|
|
10296
|
+
}
|
|
10297
|
+
}
|
|
10298
|
+
}, _callee3);
|
|
10299
|
+
}));
|
|
10300
|
+
|
|
10301
|
+
function onChange() {
|
|
10302
|
+
return _onChange.apply(this, arguments);
|
|
10303
|
+
}
|
|
10304
|
+
|
|
10305
|
+
return onChange;
|
|
10306
|
+
}()
|
|
9700
10307
|
})));
|
|
9701
10308
|
} else {
|
|
9702
|
-
return
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
},
|
|
10309
|
+
return React.createElement(MyItemNameDiv, {
|
|
10310
|
+
valueT: formatSearch(record.itemModelName, searchValue),
|
|
10311
|
+
valueF: formatSearch(record.itemModelNameOther, searchValue),
|
|
10312
|
+
isMyShow: isMyShow
|
|
10313
|
+
}); // return <span style={{ padding: '0 10px' }}>{formatSearch(value, searchValue)}</span>;
|
|
9707
10314
|
}
|
|
9708
10315
|
}
|
|
9709
10316
|
}, {
|
|
9710
10317
|
title: '单位',
|
|
9711
|
-
dataIndex: 'unit',
|
|
9712
10318
|
key: 'unit',
|
|
9713
10319
|
width: 70,
|
|
9714
|
-
render: function render(
|
|
10320
|
+
render: function render(_, record) {
|
|
9715
10321
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9716
|
-
return
|
|
10322
|
+
return React.createElement(Form.Item, null, getFieldDecorator('unit', {
|
|
9717
10323
|
initialValue: editGood.unit
|
|
9718
|
-
})(
|
|
10324
|
+
})(React.createElement(AutoComplete, {
|
|
9719
10325
|
style: {
|
|
9720
10326
|
width: '100%'
|
|
9721
10327
|
},
|
|
9722
10328
|
dataSource: unitList,
|
|
9723
|
-
onChange: function
|
|
9724
|
-
|
|
9725
|
-
|
|
10329
|
+
onChange: function () {
|
|
10330
|
+
var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10331
|
+
var key, value;
|
|
10332
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10333
|
+
while (1) {
|
|
10334
|
+
switch (_context4.prev = _context4.next) {
|
|
10335
|
+
case 0:
|
|
10336
|
+
_context4.next = 2;
|
|
10337
|
+
return controller.wait();
|
|
10338
|
+
|
|
10339
|
+
case 2:
|
|
10340
|
+
key = isMyShow ? 'unit' : 'unitOther';
|
|
10341
|
+
value = {};
|
|
10342
|
+
value[key] = form.getFieldsValue().unit;
|
|
10343
|
+
controller.setEditGood(value);
|
|
10344
|
+
|
|
10345
|
+
case 6:
|
|
10346
|
+
case "end":
|
|
10347
|
+
return _context4.stop();
|
|
10348
|
+
}
|
|
10349
|
+
}
|
|
10350
|
+
}, _callee4);
|
|
10351
|
+
}));
|
|
10352
|
+
|
|
10353
|
+
function onChange() {
|
|
10354
|
+
return _onChange2.apply(this, arguments);
|
|
10355
|
+
}
|
|
10356
|
+
|
|
10357
|
+
return onChange;
|
|
10358
|
+
}()
|
|
9726
10359
|
})));
|
|
9727
10360
|
} else {
|
|
9728
|
-
return
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
}
|
|
10361
|
+
return React.createElement(MyItemNameDiv, {
|
|
10362
|
+
valueT: record.unit,
|
|
10363
|
+
valueF: record.unitOther,
|
|
10364
|
+
isMyShow: isMyShow
|
|
10365
|
+
});
|
|
9733
10366
|
}
|
|
9734
10367
|
}
|
|
9735
10368
|
}, {
|
|
@@ -9740,20 +10373,20 @@ var useColumns = (function (form) {
|
|
|
9740
10373
|
width: 149,
|
|
9741
10374
|
render: function render(value, record) {
|
|
9742
10375
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9743
|
-
return
|
|
10376
|
+
return React.createElement(Form.Item, null, getFieldDecorator('quantity', {
|
|
9744
10377
|
initialValue: editGood.quantity,
|
|
9745
10378
|
rules: [{
|
|
9746
10379
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
9747
10380
|
message: '数量必须为数字'
|
|
9748
10381
|
}, {
|
|
9749
10382
|
validator: function () {
|
|
9750
|
-
var
|
|
10383
|
+
var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_, value, callback) {
|
|
9751
10384
|
var isvalue, isPrice;
|
|
9752
|
-
return _regeneratorRuntime().wrap(function
|
|
10385
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
9753
10386
|
while (1) {
|
|
9754
|
-
switch (
|
|
10387
|
+
switch (_context5.prev = _context5.next) {
|
|
9755
10388
|
case 0:
|
|
9756
|
-
|
|
10389
|
+
_context5.next = 2;
|
|
9757
10390
|
return controller.wait();
|
|
9758
10391
|
|
|
9759
10392
|
case 2:
|
|
@@ -9761,31 +10394,31 @@ var useColumns = (function (form) {
|
|
|
9761
10394
|
isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
9762
10395
|
|
|
9763
10396
|
if (!(isvalue || isPrice === isvalue)) {
|
|
9764
|
-
|
|
10397
|
+
_context5.next = 6;
|
|
9765
10398
|
break;
|
|
9766
10399
|
}
|
|
9767
10400
|
|
|
9768
|
-
return
|
|
10401
|
+
return _context5.abrupt("return");
|
|
9769
10402
|
|
|
9770
10403
|
case 6:
|
|
9771
10404
|
callback('请输入数量');
|
|
9772
10405
|
|
|
9773
10406
|
case 7:
|
|
9774
10407
|
case "end":
|
|
9775
|
-
return
|
|
10408
|
+
return _context5.stop();
|
|
9776
10409
|
}
|
|
9777
10410
|
}
|
|
9778
|
-
},
|
|
10411
|
+
}, _callee5);
|
|
9779
10412
|
}));
|
|
9780
10413
|
|
|
9781
|
-
function validator(
|
|
9782
|
-
return
|
|
10414
|
+
function validator(_x5, _x6, _x7) {
|
|
10415
|
+
return _validator2.apply(this, arguments);
|
|
9783
10416
|
}
|
|
9784
10417
|
|
|
9785
10418
|
return validator;
|
|
9786
10419
|
}()
|
|
9787
10420
|
}]
|
|
9788
|
-
})(
|
|
10421
|
+
})(React.createElement(MyInput, {
|
|
9789
10422
|
style: {
|
|
9790
10423
|
textAlign: 'right'
|
|
9791
10424
|
},
|
|
@@ -9797,7 +10430,7 @@ var useColumns = (function (form) {
|
|
|
9797
10430
|
}
|
|
9798
10431
|
})));
|
|
9799
10432
|
} else {
|
|
9800
|
-
return
|
|
10433
|
+
return React.createElement("span", {
|
|
9801
10434
|
style: {
|
|
9802
10435
|
padding: '0 10px'
|
|
9803
10436
|
}
|
|
@@ -9812,20 +10445,20 @@ var useColumns = (function (form) {
|
|
|
9812
10445
|
width: 149,
|
|
9813
10446
|
render: function render(value, record) {
|
|
9814
10447
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9815
|
-
return
|
|
10448
|
+
return React.createElement(Form.Item, null, getFieldDecorator('priceIncludeTax', {
|
|
9816
10449
|
initialValue: editGood.priceIncludeTax,
|
|
9817
10450
|
rules: [{
|
|
9818
10451
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
9819
10452
|
message: '单价必须为数字'
|
|
9820
10453
|
}, {
|
|
9821
10454
|
validator: function () {
|
|
9822
|
-
var
|
|
10455
|
+
var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_, value, callback) {
|
|
9823
10456
|
var isQuantity, isvalue;
|
|
9824
|
-
return _regeneratorRuntime().wrap(function
|
|
10457
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
9825
10458
|
while (1) {
|
|
9826
|
-
switch (
|
|
10459
|
+
switch (_context6.prev = _context6.next) {
|
|
9827
10460
|
case 0:
|
|
9828
|
-
|
|
10461
|
+
_context6.next = 2;
|
|
9829
10462
|
return controller.wait();
|
|
9830
10463
|
|
|
9831
10464
|
case 2:
|
|
@@ -9833,31 +10466,31 @@ var useColumns = (function (form) {
|
|
|
9833
10466
|
isvalue = !!value || value === 0;
|
|
9834
10467
|
|
|
9835
10468
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
9836
|
-
|
|
10469
|
+
_context6.next = 6;
|
|
9837
10470
|
break;
|
|
9838
10471
|
}
|
|
9839
10472
|
|
|
9840
|
-
return
|
|
10473
|
+
return _context6.abrupt("return");
|
|
9841
10474
|
|
|
9842
10475
|
case 6:
|
|
9843
10476
|
callback('请输入单价');
|
|
9844
10477
|
|
|
9845
10478
|
case 7:
|
|
9846
10479
|
case "end":
|
|
9847
|
-
return
|
|
10480
|
+
return _context6.stop();
|
|
9848
10481
|
}
|
|
9849
10482
|
}
|
|
9850
|
-
},
|
|
10483
|
+
}, _callee6);
|
|
9851
10484
|
}));
|
|
9852
10485
|
|
|
9853
|
-
function validator(
|
|
9854
|
-
return
|
|
10486
|
+
function validator(_x8, _x9, _x10) {
|
|
10487
|
+
return _validator3.apply(this, arguments);
|
|
9855
10488
|
}
|
|
9856
10489
|
|
|
9857
10490
|
return validator;
|
|
9858
10491
|
}()
|
|
9859
10492
|
}]
|
|
9860
|
-
})(
|
|
10493
|
+
})(React.createElement(MyInput, {
|
|
9861
10494
|
style: {
|
|
9862
10495
|
textAlign: 'right'
|
|
9863
10496
|
},
|
|
@@ -9869,7 +10502,7 @@ var useColumns = (function (form) {
|
|
|
9869
10502
|
}
|
|
9870
10503
|
})));
|
|
9871
10504
|
} else {
|
|
9872
|
-
return
|
|
10505
|
+
return React.createElement("span", {
|
|
9873
10506
|
style: {
|
|
9874
10507
|
padding: '0 10px'
|
|
9875
10508
|
}
|
|
@@ -9884,20 +10517,20 @@ var useColumns = (function (form) {
|
|
|
9884
10517
|
width: 149,
|
|
9885
10518
|
render: function render(value, record) {
|
|
9886
10519
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9887
|
-
return
|
|
10520
|
+
return React.createElement(Form.Item, null, getFieldDecorator('priceExcludeTax', {
|
|
9888
10521
|
initialValue: editGood.priceExcludeTax,
|
|
9889
10522
|
rules: [{
|
|
9890
10523
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
9891
10524
|
message: '单价必须为数字'
|
|
9892
10525
|
}, {
|
|
9893
10526
|
validator: function () {
|
|
9894
|
-
var
|
|
10527
|
+
var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
|
|
9895
10528
|
var isQuantity, isvalue;
|
|
9896
|
-
return _regeneratorRuntime().wrap(function
|
|
10529
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
9897
10530
|
while (1) {
|
|
9898
|
-
switch (
|
|
10531
|
+
switch (_context7.prev = _context7.next) {
|
|
9899
10532
|
case 0:
|
|
9900
|
-
|
|
10533
|
+
_context7.next = 2;
|
|
9901
10534
|
return controller.wait();
|
|
9902
10535
|
|
|
9903
10536
|
case 2:
|
|
@@ -9905,31 +10538,31 @@ var useColumns = (function (form) {
|
|
|
9905
10538
|
isvalue = !!value || value === 0;
|
|
9906
10539
|
|
|
9907
10540
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
9908
|
-
|
|
10541
|
+
_context7.next = 6;
|
|
9909
10542
|
break;
|
|
9910
10543
|
}
|
|
9911
10544
|
|
|
9912
|
-
return
|
|
10545
|
+
return _context7.abrupt("return");
|
|
9913
10546
|
|
|
9914
10547
|
case 6:
|
|
9915
10548
|
callback('请输入单价');
|
|
9916
10549
|
|
|
9917
10550
|
case 7:
|
|
9918
10551
|
case "end":
|
|
9919
|
-
return
|
|
10552
|
+
return _context7.stop();
|
|
9920
10553
|
}
|
|
9921
10554
|
}
|
|
9922
|
-
},
|
|
10555
|
+
}, _callee7);
|
|
9923
10556
|
}));
|
|
9924
10557
|
|
|
9925
|
-
function validator(
|
|
9926
|
-
return
|
|
10558
|
+
function validator(_x11, _x12, _x13) {
|
|
10559
|
+
return _validator4.apply(this, arguments);
|
|
9927
10560
|
}
|
|
9928
10561
|
|
|
9929
10562
|
return validator;
|
|
9930
10563
|
}()
|
|
9931
10564
|
}]
|
|
9932
|
-
})(
|
|
10565
|
+
})(React.createElement(MyInput, {
|
|
9933
10566
|
style: {
|
|
9934
10567
|
textAlign: 'right'
|
|
9935
10568
|
},
|
|
@@ -9941,7 +10574,7 @@ var useColumns = (function (form) {
|
|
|
9941
10574
|
}
|
|
9942
10575
|
})));
|
|
9943
10576
|
} else {
|
|
9944
|
-
return
|
|
10577
|
+
return React.createElement("span", {
|
|
9945
10578
|
style: {
|
|
9946
10579
|
padding: '0 10px'
|
|
9947
10580
|
}
|
|
@@ -9949,7 +10582,7 @@ var useColumns = (function (form) {
|
|
|
9949
10582
|
}
|
|
9950
10583
|
}
|
|
9951
10584
|
}, {
|
|
9952
|
-
title:
|
|
10585
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
9953
10586
|
type: "danger"
|
|
9954
10587
|
}, "*"), "\u91D1\u989D(\u542B\u7A0E)"),
|
|
9955
10588
|
dataIndex: 'lineAmountIncludeTax',
|
|
@@ -9958,7 +10591,7 @@ var useColumns = (function (form) {
|
|
|
9958
10591
|
align: 'right',
|
|
9959
10592
|
render: function render(value, record) {
|
|
9960
10593
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9961
|
-
return
|
|
10594
|
+
return React.createElement(Form.Item, null, getFieldDecorator('lineAmountIncludeTax', {
|
|
9962
10595
|
initialValue: editGood.lineAmountIncludeTax,
|
|
9963
10596
|
rules: [{
|
|
9964
10597
|
required: true,
|
|
@@ -9968,10 +10601,10 @@ var useColumns = (function (form) {
|
|
|
9968
10601
|
message: '金额必须为数字'
|
|
9969
10602
|
}, {
|
|
9970
10603
|
validator: function () {
|
|
9971
|
-
var
|
|
9972
|
-
return _regeneratorRuntime().wrap(function
|
|
10604
|
+
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
|
|
10605
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
9973
10606
|
while (1) {
|
|
9974
|
-
switch (
|
|
10607
|
+
switch (_context8.prev = _context8.next) {
|
|
9975
10608
|
case 0:
|
|
9976
10609
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
9977
10610
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -9979,24 +10612,24 @@ var useColumns = (function (form) {
|
|
|
9979
10612
|
|
|
9980
10613
|
case 1:
|
|
9981
10614
|
case "end":
|
|
9982
|
-
return
|
|
10615
|
+
return _context8.stop();
|
|
9983
10616
|
}
|
|
9984
10617
|
}
|
|
9985
|
-
},
|
|
10618
|
+
}, _callee8);
|
|
9986
10619
|
}));
|
|
9987
10620
|
|
|
9988
|
-
function validator(
|
|
9989
|
-
return
|
|
10621
|
+
function validator(_x14, _x15, _x16) {
|
|
10622
|
+
return _validator5.apply(this, arguments);
|
|
9990
10623
|
}
|
|
9991
10624
|
|
|
9992
10625
|
return validator;
|
|
9993
10626
|
}()
|
|
9994
10627
|
}, {
|
|
9995
10628
|
validator: function () {
|
|
9996
|
-
var
|
|
9997
|
-
return _regeneratorRuntime().wrap(function
|
|
10629
|
+
var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
|
|
10630
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
9998
10631
|
while (1) {
|
|
9999
|
-
switch (
|
|
10632
|
+
switch (_context9.prev = _context9.next) {
|
|
10000
10633
|
case 0:
|
|
10001
10634
|
if (deduction && parseFloat(value) <= deduction) {
|
|
10002
10635
|
callback('扣除额不能大于等于价税合计');
|
|
@@ -10004,20 +10637,20 @@ var useColumns = (function (form) {
|
|
|
10004
10637
|
|
|
10005
10638
|
case 1:
|
|
10006
10639
|
case "end":
|
|
10007
|
-
return
|
|
10640
|
+
return _context9.stop();
|
|
10008
10641
|
}
|
|
10009
10642
|
}
|
|
10010
|
-
},
|
|
10643
|
+
}, _callee9);
|
|
10011
10644
|
}));
|
|
10012
10645
|
|
|
10013
|
-
function validator(
|
|
10014
|
-
return
|
|
10646
|
+
function validator(_x17, _x18, _x19) {
|
|
10647
|
+
return _validator6.apply(this, arguments);
|
|
10015
10648
|
}
|
|
10016
10649
|
|
|
10017
10650
|
return validator;
|
|
10018
10651
|
}()
|
|
10019
10652
|
}]
|
|
10020
|
-
})(
|
|
10653
|
+
})(React.createElement(MyInput, {
|
|
10021
10654
|
style: {
|
|
10022
10655
|
textAlign: 'right'
|
|
10023
10656
|
},
|
|
@@ -10028,15 +10661,15 @@ var useColumns = (function (form) {
|
|
|
10028
10661
|
}
|
|
10029
10662
|
})));
|
|
10030
10663
|
} else {
|
|
10031
|
-
return
|
|
10664
|
+
return React.createElement("span", {
|
|
10032
10665
|
style: {
|
|
10033
10666
|
padding: '0 10px'
|
|
10034
10667
|
}
|
|
10035
|
-
}, parseFloat(value).toFixed(2));
|
|
10668
|
+
}, formatSearch(parseFloat(value).toFixed(2), searchValue));
|
|
10036
10669
|
}
|
|
10037
10670
|
}
|
|
10038
10671
|
}, {
|
|
10039
|
-
title:
|
|
10672
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
10040
10673
|
type: "danger"
|
|
10041
10674
|
}, "*"), "\u91D1\u989D(\u4E0D\u542B\u7A0E)"),
|
|
10042
10675
|
dataIndex: 'lineAmountExcludeTax',
|
|
@@ -10045,7 +10678,7 @@ var useColumns = (function (form) {
|
|
|
10045
10678
|
width: 119,
|
|
10046
10679
|
render: function render(value, record) {
|
|
10047
10680
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10048
|
-
return
|
|
10681
|
+
return React.createElement(Form.Item, null, getFieldDecorator('lineAmountExcludeTax', {
|
|
10049
10682
|
initialValue: editGood.lineAmountExcludeTax,
|
|
10050
10683
|
rules: [{
|
|
10051
10684
|
required: true,
|
|
@@ -10055,10 +10688,10 @@ var useColumns = (function (form) {
|
|
|
10055
10688
|
message: '金额必须为数字'
|
|
10056
10689
|
}, {
|
|
10057
10690
|
validator: function () {
|
|
10058
|
-
var
|
|
10059
|
-
return _regeneratorRuntime().wrap(function
|
|
10691
|
+
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
|
|
10692
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
10060
10693
|
while (1) {
|
|
10061
|
-
switch (
|
|
10694
|
+
switch (_context10.prev = _context10.next) {
|
|
10062
10695
|
case 0:
|
|
10063
10696
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
10064
10697
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -10066,20 +10699,20 @@ var useColumns = (function (form) {
|
|
|
10066
10699
|
|
|
10067
10700
|
case 1:
|
|
10068
10701
|
case "end":
|
|
10069
|
-
return
|
|
10702
|
+
return _context10.stop();
|
|
10070
10703
|
}
|
|
10071
10704
|
}
|
|
10072
|
-
},
|
|
10705
|
+
}, _callee10);
|
|
10073
10706
|
}));
|
|
10074
10707
|
|
|
10075
|
-
function validator(
|
|
10076
|
-
return
|
|
10708
|
+
function validator(_x20, _x21, _x22) {
|
|
10709
|
+
return _validator7.apply(this, arguments);
|
|
10077
10710
|
}
|
|
10078
10711
|
|
|
10079
10712
|
return validator;
|
|
10080
10713
|
}()
|
|
10081
10714
|
}]
|
|
10082
|
-
})(
|
|
10715
|
+
})(React.createElement(MyInput, {
|
|
10083
10716
|
style: {
|
|
10084
10717
|
textAlign: 'right'
|
|
10085
10718
|
},
|
|
@@ -10090,7 +10723,7 @@ var useColumns = (function (form) {
|
|
|
10090
10723
|
}
|
|
10091
10724
|
})));
|
|
10092
10725
|
} else {
|
|
10093
|
-
return
|
|
10726
|
+
return React.createElement("span", {
|
|
10094
10727
|
style: {
|
|
10095
10728
|
padding: '0 10px'
|
|
10096
10729
|
}
|
|
@@ -10098,7 +10731,7 @@ var useColumns = (function (form) {
|
|
|
10098
10731
|
}
|
|
10099
10732
|
}
|
|
10100
10733
|
}, {
|
|
10101
|
-
title:
|
|
10734
|
+
title: React.createElement(React.Fragment, null, React.createElement(Text$5, {
|
|
10102
10735
|
type: "danger"
|
|
10103
10736
|
}, "*"), "\u7A0E\u7387"),
|
|
10104
10737
|
dataIndex: 'taxRate',
|
|
@@ -10107,7 +10740,7 @@ var useColumns = (function (form) {
|
|
|
10107
10740
|
width: 70,
|
|
10108
10741
|
render: function render(value, record) {
|
|
10109
10742
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10110
|
-
return
|
|
10743
|
+
return React.createElement(Form.Item, null, getFieldDecorator('taxRate', {
|
|
10111
10744
|
initialValue: editGood.taxRate,
|
|
10112
10745
|
rules: [{
|
|
10113
10746
|
required: true,
|
|
@@ -10116,7 +10749,7 @@ var useColumns = (function (form) {
|
|
|
10116
10749
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
10117
10750
|
message: ' '
|
|
10118
10751
|
}]
|
|
10119
|
-
})(
|
|
10752
|
+
})(React.createElement(Select, {
|
|
10120
10753
|
className: "kts-invoice-operate-goods-list-table-tax-rate",
|
|
10121
10754
|
dropdownMenuStyle: {
|
|
10122
10755
|
textAlign: "right"
|
|
@@ -10129,13 +10762,13 @@ var useColumns = (function (form) {
|
|
|
10129
10762
|
onChangeTaxRate(controller, form, record);
|
|
10130
10763
|
}
|
|
10131
10764
|
}, taxRateList.map(function (e, i) {
|
|
10132
|
-
return
|
|
10765
|
+
return React.createElement(Select.Option, {
|
|
10133
10766
|
key: i,
|
|
10134
10767
|
value: e
|
|
10135
10768
|
}, e, "%");
|
|
10136
10769
|
}))));
|
|
10137
10770
|
} else {
|
|
10138
|
-
return
|
|
10771
|
+
return React.createElement("span", {
|
|
10139
10772
|
style: {
|
|
10140
10773
|
padding: '0 10px'
|
|
10141
10774
|
}
|
|
@@ -10152,9 +10785,9 @@ var useColumns = (function (form) {
|
|
|
10152
10785
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
10153
10786
|
return getFieldDecorator('taxAmount', {
|
|
10154
10787
|
initialValue: editGood.taxAmount
|
|
10155
|
-
})(
|
|
10788
|
+
})(React.createElement(MyDiv, null));
|
|
10156
10789
|
} else {
|
|
10157
|
-
return
|
|
10790
|
+
return React.createElement("span", {
|
|
10158
10791
|
style: {
|
|
10159
10792
|
padding: '0 10px'
|
|
10160
10793
|
}
|
|
@@ -10168,7 +10801,7 @@ var useColumns = (function (form) {
|
|
|
10168
10801
|
width: 50,
|
|
10169
10802
|
align: 'center',
|
|
10170
10803
|
render: function render(_value, record) {
|
|
10171
|
-
return
|
|
10804
|
+
return React.createElement(RowMenu, {
|
|
10172
10805
|
key: record.lineAttribute,
|
|
10173
10806
|
goods: record
|
|
10174
10807
|
});
|
|
@@ -10184,7 +10817,7 @@ var useColumns = (function (form) {
|
|
|
10184
10817
|
ellipsis: true
|
|
10185
10818
|
});
|
|
10186
10819
|
});
|
|
10187
|
-
}, [isTaxIncluded, editGood, controller, changeField, deduction]);
|
|
10820
|
+
}, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue]);
|
|
10188
10821
|
React.useEffect(function () {
|
|
10189
10822
|
if (!changeField) return;
|
|
10190
10823
|
var t = setTimeout(function () {
|
|
@@ -10218,13 +10851,13 @@ var MyInput = /*#__PURE__*/function (_React$Component) {
|
|
|
10218
10851
|
key: "render",
|
|
10219
10852
|
value: function render() {
|
|
10220
10853
|
if (this.props.loading) {
|
|
10221
|
-
return
|
|
10854
|
+
return React.createElement(Spin, {
|
|
10222
10855
|
size: "small"
|
|
10223
|
-
},
|
|
10856
|
+
}, React.createElement(Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
10224
10857
|
autoComplete: "off"
|
|
10225
10858
|
})));
|
|
10226
10859
|
} else {
|
|
10227
|
-
return
|
|
10860
|
+
return React.createElement(Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
|
10228
10861
|
autoComplete: "off"
|
|
10229
10862
|
}));
|
|
10230
10863
|
}
|
|
@@ -10248,7 +10881,7 @@ var MyDiv = /*#__PURE__*/function (_React$Component2) {
|
|
|
10248
10881
|
_createClass(MyDiv, [{
|
|
10249
10882
|
key: "render",
|
|
10250
10883
|
value: function render() {
|
|
10251
|
-
return
|
|
10884
|
+
return React.createElement("span", {
|
|
10252
10885
|
style: {
|
|
10253
10886
|
padding: '0 10px'
|
|
10254
10887
|
}
|
|
@@ -10259,9 +10892,79 @@ var MyDiv = /*#__PURE__*/function (_React$Component2) {
|
|
|
10259
10892
|
return MyDiv;
|
|
10260
10893
|
}(React.Component);
|
|
10261
10894
|
|
|
10895
|
+
var MyItemNameDiv = /*#__PURE__*/function (_React$Component3) {
|
|
10896
|
+
_inherits(MyItemNameDiv, _React$Component3);
|
|
10897
|
+
|
|
10898
|
+
var _super3 = _createSuper(MyItemNameDiv);
|
|
10899
|
+
|
|
10900
|
+
function MyItemNameDiv() {
|
|
10901
|
+
_classCallCheck(this, MyItemNameDiv);
|
|
10902
|
+
|
|
10903
|
+
return _super3.apply(this, arguments);
|
|
10904
|
+
}
|
|
10905
|
+
|
|
10906
|
+
_createClass(MyItemNameDiv, [{
|
|
10907
|
+
key: "render",
|
|
10908
|
+
value: function render() {
|
|
10909
|
+
var _this$props = this.props,
|
|
10910
|
+
isMyShow = _this$props.isMyShow,
|
|
10911
|
+
valueT = _this$props.valueT,
|
|
10912
|
+
valueF = _this$props.valueF;
|
|
10913
|
+
|
|
10914
|
+
if (isMyShow) {
|
|
10915
|
+
if (valueT) {
|
|
10916
|
+
return React.createElement("span", {
|
|
10917
|
+
style: {
|
|
10918
|
+
padding: '0 10px',
|
|
10919
|
+
color: '#0074ff'
|
|
10920
|
+
}
|
|
10921
|
+
}, valueT);
|
|
10922
|
+
} else {
|
|
10923
|
+
return React.createElement("span", {
|
|
10924
|
+
style: {
|
|
10925
|
+
padding: '0 10px'
|
|
10926
|
+
}
|
|
10927
|
+
}, valueF);
|
|
10928
|
+
}
|
|
10929
|
+
} else {
|
|
10930
|
+
if (valueF) {
|
|
10931
|
+
return React.createElement("span", {
|
|
10932
|
+
style: {
|
|
10933
|
+
padding: '0 10px'
|
|
10934
|
+
}
|
|
10935
|
+
}, valueF);
|
|
10936
|
+
} else {
|
|
10937
|
+
return React.createElement("span", {
|
|
10938
|
+
style: {
|
|
10939
|
+
padding: '0 10px',
|
|
10940
|
+
color: '#0074ff'
|
|
10941
|
+
}
|
|
10942
|
+
}, valueT);
|
|
10943
|
+
}
|
|
10944
|
+
}
|
|
10945
|
+
}
|
|
10946
|
+
}]);
|
|
10947
|
+
|
|
10948
|
+
return MyItemNameDiv;
|
|
10949
|
+
}(React.Component);
|
|
10950
|
+
/** 格式搜索结果 */
|
|
10951
|
+
|
|
10952
|
+
|
|
10953
|
+
function formatSearch(value, search) {
|
|
10954
|
+
if (!value || !search) return value;
|
|
10955
|
+
|
|
10956
|
+
var __html = value.split(new RegExp(search, 'g')).join("<span class=\"kts-invoice-operate-goods-list-table-search-protrude\" >".concat(search, "</span>"));
|
|
10957
|
+
|
|
10958
|
+
return React.createElement("span", {
|
|
10959
|
+
dangerouslySetInnerHTML: {
|
|
10960
|
+
__html: __html
|
|
10961
|
+
}
|
|
10962
|
+
});
|
|
10963
|
+
}
|
|
10964
|
+
|
|
10262
10965
|
var useOnRow = (function () {
|
|
10263
10966
|
/** 控制器 */
|
|
10264
|
-
var controller =
|
|
10967
|
+
var controller = Invoice.useInvoiceController();
|
|
10265
10968
|
var model = controller.useMemo(function (s) {
|
|
10266
10969
|
return s.model;
|
|
10267
10970
|
}, []);
|
|
@@ -10444,7 +11147,7 @@ function useWindowClick(controller) {
|
|
|
10444
11147
|
|
|
10445
11148
|
var useRowSelection = (function () {
|
|
10446
11149
|
/** 控制器 */
|
|
10447
|
-
var controller =
|
|
11150
|
+
var controller = Invoice.useInvoiceController();
|
|
10448
11151
|
/** 列表选中的货物索引列表 */
|
|
10449
11152
|
|
|
10450
11153
|
var selectedRowKeys = controller.useMemo(function (s) {
|
|
@@ -10455,105 +11158,168 @@ var useRowSelection = (function () {
|
|
|
10455
11158
|
var goodsList = controller.useMemo(function (s) {
|
|
10456
11159
|
return s.goodsListState.goodsList;
|
|
10457
11160
|
}, []);
|
|
11161
|
+
/** 搜索条件 */
|
|
11162
|
+
|
|
11163
|
+
var searchValue = controller.useMemo(function (s) {
|
|
11164
|
+
return s.goodsListState.searchValue;
|
|
11165
|
+
}, []);
|
|
10458
11166
|
/** 是否全选 */
|
|
11167
|
+
// const isAll = controller.useMemo(s => s.goodsListState.goodsList.length > 0 && s.goodsListState.selectedGoodIndex.length === s.goodsListState.goodsList.length, [])
|
|
10459
11168
|
|
|
10460
11169
|
var isAll = controller.useMemo(function (s) {
|
|
10461
|
-
|
|
11170
|
+
if (s.goodsListState.selectedGoodIndex.length <= 0) return false;
|
|
11171
|
+
var seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11172
|
+
return e.$index;
|
|
11173
|
+
});
|
|
11174
|
+
var selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11175
|
+
return seeGoodsIndex.some(function (t) {
|
|
11176
|
+
return e === t;
|
|
11177
|
+
});
|
|
11178
|
+
});
|
|
11179
|
+
return selectedGoodIndex.length === seeGoodsIndex.length;
|
|
11180
|
+
}, []);
|
|
11181
|
+
var indeterminate = controller.useMemo(function (s) {
|
|
11182
|
+
var seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11183
|
+
return e.$index;
|
|
11184
|
+
});
|
|
11185
|
+
var selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11186
|
+
return seeGoodsIndex.some(function (t) {
|
|
11187
|
+
return e === t;
|
|
11188
|
+
});
|
|
11189
|
+
});
|
|
11190
|
+
if (selectedGoodIndex.length === 0) return false;
|
|
11191
|
+
return selectedGoodIndex.length < seeGoodsIndex.length;
|
|
10462
11192
|
}, []);
|
|
10463
11193
|
/** 点击了全选 */
|
|
10464
11194
|
|
|
10465
|
-
var onClickSelectAll = React.useCallback(function () {
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
11195
|
+
var onClickSelectAll = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
11196
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
11197
|
+
while (1) {
|
|
11198
|
+
switch (_context3.prev = _context3.next) {
|
|
11199
|
+
case 0:
|
|
11200
|
+
if (!isAll) {
|
|
11201
|
+
_context3.next = 5;
|
|
11202
|
+
break;
|
|
11203
|
+
}
|
|
11204
|
+
|
|
11205
|
+
_context3.next = 3;
|
|
11206
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
11207
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
11208
|
+
var seeGoodsIndex;
|
|
11209
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11210
|
+
while (1) {
|
|
11211
|
+
switch (_context.prev = _context.next) {
|
|
11212
|
+
case 0:
|
|
11213
|
+
seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11214
|
+
return e.$index;
|
|
11215
|
+
});
|
|
11216
|
+
s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
11217
|
+
return !seeGoodsIndex.some(function (t) {
|
|
11218
|
+
return e === t;
|
|
11219
|
+
});
|
|
11220
|
+
});
|
|
11221
|
+
|
|
11222
|
+
case 2:
|
|
11223
|
+
case "end":
|
|
11224
|
+
return _context.stop();
|
|
11225
|
+
}
|
|
11226
|
+
}
|
|
11227
|
+
}, _callee);
|
|
11228
|
+
}));
|
|
11229
|
+
|
|
11230
|
+
return function (_x) {
|
|
11231
|
+
return _ref2.apply(this, arguments);
|
|
11232
|
+
};
|
|
11233
|
+
}())();
|
|
11234
|
+
|
|
11235
|
+
case 3:
|
|
11236
|
+
_context3.next = 7;
|
|
11237
|
+
break;
|
|
10474
11238
|
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
11239
|
+
case 5:
|
|
11240
|
+
_context3.next = 7;
|
|
11241
|
+
return controller.pipeline( /*#__PURE__*/function () {
|
|
11242
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
11243
|
+
var seeGoodsIndex;
|
|
11244
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11245
|
+
while (1) {
|
|
11246
|
+
switch (_context2.prev = _context2.next) {
|
|
11247
|
+
case 0:
|
|
11248
|
+
seeGoodsIndex = controller.getGoodsSearch(s.goodsListState.goodsList, s.goodsListState.searchValue).map(function (e) {
|
|
11249
|
+
return e.$index;
|
|
11250
|
+
});
|
|
11251
|
+
s.goodsListState.selectedGoodIndex = [].concat(_toConsumableArray(s.goodsListState.selectedGoodIndex), _toConsumableArray(seeGoodsIndex));
|
|
11252
|
+
s.goodsListState.selectedGoodIndex = Array.from(new Set(s.goodsListState.selectedGoodIndex));
|
|
10482
11253
|
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10491
|
-
while (1) {
|
|
10492
|
-
switch (_context2.prev = _context2.next) {
|
|
10493
|
-
case 0:
|
|
10494
|
-
s.goodsListState.selectedGoodIndex = s.goodsListState.goodsList.map(function (e) {
|
|
10495
|
-
return e.$index;
|
|
10496
|
-
});
|
|
11254
|
+
case 3:
|
|
11255
|
+
case "end":
|
|
11256
|
+
return _context2.stop();
|
|
11257
|
+
}
|
|
11258
|
+
}
|
|
11259
|
+
}, _callee2);
|
|
11260
|
+
}));
|
|
10497
11261
|
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
}
|
|
10503
|
-
}, _callee2);
|
|
10504
|
-
}));
|
|
11262
|
+
return function (_x2) {
|
|
11263
|
+
return _ref3.apply(this, arguments);
|
|
11264
|
+
};
|
|
11265
|
+
}())();
|
|
10505
11266
|
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
11267
|
+
case 7:
|
|
11268
|
+
_context3.next = 9;
|
|
11269
|
+
return sortOut(true);
|
|
11270
|
+
|
|
11271
|
+
case 9:
|
|
11272
|
+
case "end":
|
|
11273
|
+
return _context3.stop();
|
|
11274
|
+
}
|
|
11275
|
+
}
|
|
11276
|
+
}, _callee3);
|
|
11277
|
+
})), [controller, isAll]);
|
|
10512
11278
|
var onSelect = React.useCallback( /*#__PURE__*/function () {
|
|
10513
|
-
var
|
|
10514
|
-
return _regeneratorRuntime().wrap(function
|
|
11279
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(record, selected) {
|
|
11280
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
10515
11281
|
while (1) {
|
|
10516
|
-
switch (
|
|
11282
|
+
switch (_context6.prev = _context6.next) {
|
|
10517
11283
|
case 0:
|
|
10518
11284
|
if (!selected) {
|
|
10519
|
-
|
|
11285
|
+
_context6.next = 5;
|
|
10520
11286
|
break;
|
|
10521
11287
|
}
|
|
10522
11288
|
|
|
10523
|
-
|
|
11289
|
+
_context6.next = 3;
|
|
10524
11290
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
10525
|
-
var
|
|
10526
|
-
return _regeneratorRuntime().wrap(function
|
|
11291
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
11292
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10527
11293
|
while (1) {
|
|
10528
|
-
switch (
|
|
11294
|
+
switch (_context4.prev = _context4.next) {
|
|
10529
11295
|
case 0:
|
|
10530
11296
|
s.goodsListState.selectedGoodIndex = [].concat(_toConsumableArray(s.goodsListState.selectedGoodIndex), [record.$index]);
|
|
10531
11297
|
s.goodsListState = _objectSpread2({}, s.goodsListState);
|
|
10532
11298
|
|
|
10533
11299
|
case 2:
|
|
10534
11300
|
case "end":
|
|
10535
|
-
return
|
|
11301
|
+
return _context4.stop();
|
|
10536
11302
|
}
|
|
10537
11303
|
}
|
|
10538
|
-
},
|
|
11304
|
+
}, _callee4);
|
|
10539
11305
|
}));
|
|
10540
11306
|
|
|
10541
11307
|
return function (_x5) {
|
|
10542
|
-
return
|
|
11308
|
+
return _ref5.apply(this, arguments);
|
|
10543
11309
|
};
|
|
10544
11310
|
}())();
|
|
10545
11311
|
|
|
10546
11312
|
case 3:
|
|
10547
|
-
|
|
11313
|
+
_context6.next = 7;
|
|
10548
11314
|
break;
|
|
10549
11315
|
|
|
10550
11316
|
case 5:
|
|
10551
|
-
|
|
11317
|
+
_context6.next = 7;
|
|
10552
11318
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
10553
|
-
var
|
|
10554
|
-
return _regeneratorRuntime().wrap(function
|
|
11319
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(s) {
|
|
11320
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
10555
11321
|
while (1) {
|
|
10556
|
-
switch (
|
|
11322
|
+
switch (_context5.prev = _context5.next) {
|
|
10557
11323
|
case 0:
|
|
10558
11324
|
s.goodsListState.selectedGoodIndex = s.goodsListState.selectedGoodIndex.filter(function (e) {
|
|
10559
11325
|
return e !== record.$index;
|
|
@@ -10562,58 +11328,58 @@ var useRowSelection = (function () {
|
|
|
10562
11328
|
|
|
10563
11329
|
case 2:
|
|
10564
11330
|
case "end":
|
|
10565
|
-
return
|
|
11331
|
+
return _context5.stop();
|
|
10566
11332
|
}
|
|
10567
11333
|
}
|
|
10568
|
-
},
|
|
11334
|
+
}, _callee5);
|
|
10569
11335
|
}));
|
|
10570
11336
|
|
|
10571
11337
|
return function (_x6) {
|
|
10572
|
-
return
|
|
11338
|
+
return _ref6.apply(this, arguments);
|
|
10573
11339
|
};
|
|
10574
11340
|
}())();
|
|
10575
11341
|
|
|
10576
11342
|
case 7:
|
|
10577
|
-
|
|
11343
|
+
_context6.next = 9;
|
|
10578
11344
|
return sortOut(selected);
|
|
10579
11345
|
|
|
10580
11346
|
case 9:
|
|
10581
11347
|
case "end":
|
|
10582
|
-
return
|
|
11348
|
+
return _context6.stop();
|
|
10583
11349
|
}
|
|
10584
11350
|
}
|
|
10585
|
-
},
|
|
11351
|
+
}, _callee6);
|
|
10586
11352
|
}));
|
|
10587
11353
|
|
|
10588
11354
|
return function (_x3, _x4) {
|
|
10589
|
-
return
|
|
11355
|
+
return _ref4.apply(this, arguments);
|
|
10590
11356
|
};
|
|
10591
11357
|
}(), [controller]);
|
|
10592
11358
|
var columnTitle = React.useMemo(function () {
|
|
10593
|
-
return
|
|
11359
|
+
return React.createElement(Checkbox, {
|
|
10594
11360
|
onChange: onClickSelectAll,
|
|
10595
|
-
indeterminate:
|
|
11361
|
+
indeterminate: indeterminate,
|
|
10596
11362
|
checked: isAll
|
|
10597
11363
|
});
|
|
10598
|
-
}, [goodsList, selectedRowKeys, onClickSelectAll, isAll]);
|
|
11364
|
+
}, [goodsList, selectedRowKeys, onClickSelectAll, isAll, indeterminate]);
|
|
10599
11365
|
/** 选择了商品后 调整 折扣行 和 被折扣行 */
|
|
10600
11366
|
|
|
10601
11367
|
var sortOut = React.useCallback( /*#__PURE__*/function () {
|
|
10602
|
-
var
|
|
10603
|
-
return _regeneratorRuntime().wrap(function
|
|
11368
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(selected) {
|
|
11369
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
10604
11370
|
while (1) {
|
|
10605
|
-
switch (
|
|
11371
|
+
switch (_context8.prev = _context8.next) {
|
|
10606
11372
|
case 0:
|
|
10607
|
-
|
|
11373
|
+
_context8.next = 2;
|
|
10608
11374
|
return controller.wait();
|
|
10609
11375
|
|
|
10610
11376
|
case 2:
|
|
10611
|
-
|
|
11377
|
+
_context8.next = 4;
|
|
10612
11378
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
10613
|
-
var
|
|
10614
|
-
return _regeneratorRuntime().wrap(function
|
|
11379
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(s) {
|
|
11380
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
10615
11381
|
while (1) {
|
|
10616
|
-
switch (
|
|
11382
|
+
switch (_context7.prev = _context7.next) {
|
|
10617
11383
|
case 0:
|
|
10618
11384
|
s.goodsListState.selectedGoodIndex.forEach(function ($index) {
|
|
10619
11385
|
var goods = s.goodsListState.goodsMap.get($index);
|
|
@@ -10634,27 +11400,27 @@ var useRowSelection = (function () {
|
|
|
10634
11400
|
|
|
10635
11401
|
case 1:
|
|
10636
11402
|
case "end":
|
|
10637
|
-
return
|
|
11403
|
+
return _context7.stop();
|
|
10638
11404
|
}
|
|
10639
11405
|
}
|
|
10640
|
-
},
|
|
11406
|
+
}, _callee7);
|
|
10641
11407
|
}));
|
|
10642
11408
|
|
|
10643
11409
|
return function (_x8) {
|
|
10644
|
-
return
|
|
11410
|
+
return _ref8.apply(this, arguments);
|
|
10645
11411
|
};
|
|
10646
11412
|
}())();
|
|
10647
11413
|
|
|
10648
11414
|
case 4:
|
|
10649
11415
|
case "end":
|
|
10650
|
-
return
|
|
11416
|
+
return _context8.stop();
|
|
10651
11417
|
}
|
|
10652
11418
|
}
|
|
10653
|
-
},
|
|
11419
|
+
}, _callee8);
|
|
10654
11420
|
}));
|
|
10655
11421
|
|
|
10656
11422
|
return function (_x7) {
|
|
10657
|
-
return
|
|
11423
|
+
return _ref7.apply(this, arguments);
|
|
10658
11424
|
};
|
|
10659
11425
|
}(), [controller]);
|
|
10660
11426
|
React.useEffect(function () {
|
|
@@ -10668,8 +11434,8 @@ var useRowSelection = (function () {
|
|
|
10668
11434
|
};
|
|
10669
11435
|
});
|
|
10670
11436
|
|
|
10671
|
-
var css_248z$
|
|
10672
|
-
styleInject(css_248z$
|
|
11437
|
+
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";
|
|
11438
|
+
styleInject(css_248z$7);
|
|
10673
11439
|
|
|
10674
11440
|
var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
10675
11441
|
_inherits(GoodsList, _React$Component);
|
|
@@ -10685,7 +11451,7 @@ var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
|
10685
11451
|
_createClass(GoodsList, [{
|
|
10686
11452
|
key: "render",
|
|
10687
11453
|
value: function render() {
|
|
10688
|
-
return
|
|
11454
|
+
return React.createElement(Main, _objectSpread2({}, this.props));
|
|
10689
11455
|
}
|
|
10690
11456
|
}]);
|
|
10691
11457
|
|
|
@@ -10693,13 +11459,22 @@ var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
|
10693
11459
|
}(React.Component);
|
|
10694
11460
|
var Main = decorator(Form.create())(function (props) {
|
|
10695
11461
|
/** 控制器 */
|
|
10696
|
-
var controller =
|
|
11462
|
+
var controller = Invoice.useInvoiceController();
|
|
10697
11463
|
var goodsList = controller.useMemo(function (s) {
|
|
10698
11464
|
return s.goodsListState.goodsList;
|
|
10699
11465
|
}, []);
|
|
10700
11466
|
var isprefab = controller.useMemo(function (s) {
|
|
10701
11467
|
return s.model === 'prefab';
|
|
10702
11468
|
}, []);
|
|
11469
|
+
var dataSource = controller.useMemo(function (s) {
|
|
11470
|
+
return s.goodsListState.goodsList;
|
|
11471
|
+
}, []);
|
|
11472
|
+
var searchValue = controller.useMemo(function (s) {
|
|
11473
|
+
return s.goodsListState.searchValue;
|
|
11474
|
+
}, []);
|
|
11475
|
+
var dataSourceSearch = React.useMemo(function () {
|
|
11476
|
+
return controller.getGoodsSearch(dataSource, searchValue);
|
|
11477
|
+
}, [dataSource, searchValue, controller]);
|
|
10703
11478
|
/** 表格行事件 */
|
|
10704
11479
|
|
|
10705
11480
|
var _onRow = useOnRow();
|
|
@@ -10758,7 +11533,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
10758
11533
|
}, [controller, props.form]); // 跟新 货物
|
|
10759
11534
|
|
|
10760
11535
|
React.useEffect(function () {
|
|
10761
|
-
controller.
|
|
11536
|
+
controller.run( /*#__PURE__*/function () {
|
|
10762
11537
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
10763
11538
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
10764
11539
|
while (1) {
|
|
@@ -10780,7 +11555,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
10780
11555
|
return function (_x4) {
|
|
10781
11556
|
return _ref3.apply(this, arguments);
|
|
10782
11557
|
};
|
|
10783
|
-
}())
|
|
11558
|
+
}());
|
|
10784
11559
|
}, [controller, goodsList]);
|
|
10785
11560
|
/** props 产品最大数 更新 */
|
|
10786
11561
|
|
|
@@ -10854,22 +11629,22 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
10854
11629
|
};
|
|
10855
11630
|
}())();
|
|
10856
11631
|
}, [controller, props.isSwitchTax]);
|
|
10857
|
-
return
|
|
11632
|
+
return React.createElement("div", {
|
|
10858
11633
|
className: "kts-invoice-operate-goods-list",
|
|
10859
11634
|
onClick: function onClick(e) {
|
|
10860
11635
|
e.stopPropagation();
|
|
10861
11636
|
}
|
|
10862
|
-
},
|
|
11637
|
+
}, React.createElement("div", {
|
|
10863
11638
|
className: "kts-invoice-operate-goods-list-able"
|
|
10864
|
-
},
|
|
11639
|
+
}, React.createElement("div", {
|
|
10865
11640
|
className: "kts-invoice-operate-goods-list-able-list"
|
|
10866
|
-
},
|
|
11641
|
+
}, React.createElement(AddRowButton, null), React.createElement(BulkMenu, null), React.createElement(Search, null)), React.createElement("div", {
|
|
10867
11642
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
10868
|
-
}, props.menuExpansion,
|
|
11643
|
+
}, props.menuExpansion, React.createElement(DescribeSwitch, null), React.createElement(TaxIncludedSwitch, null))), React.createElement("div", {
|
|
10869
11644
|
className: classnames('kts-invoice-operate-goods-list-table', {
|
|
10870
11645
|
'kts-invoice-operate-prefab': isprefab
|
|
10871
11646
|
})
|
|
10872
|
-
},
|
|
11647
|
+
}, React.createElement(TableVirtual, {
|
|
10873
11648
|
bordered: true,
|
|
10874
11649
|
size: "small",
|
|
10875
11650
|
rowKey: "$index",
|
|
@@ -10882,9 +11657,7 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
10882
11657
|
row: TableRow
|
|
10883
11658
|
}
|
|
10884
11659
|
},
|
|
10885
|
-
dataSource:
|
|
10886
|
-
return s.goodsListState.goodsList;
|
|
10887
|
-
}, [controller]),
|
|
11660
|
+
dataSource: dataSourceSearch,
|
|
10888
11661
|
columns: useColumns(props.form),
|
|
10889
11662
|
rowSelection: useRowSelection(),
|
|
10890
11663
|
onRow: function onRow(record) {
|
|
@@ -10894,11 +11667,11 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
10894
11667
|
}
|
|
10895
11668
|
};
|
|
10896
11669
|
}
|
|
10897
|
-
})),
|
|
11670
|
+
})), React.createElement("div", null, React.createElement(Statistics, null)));
|
|
10898
11671
|
});
|
|
10899
11672
|
|
|
10900
|
-
var css_248z$
|
|
10901
|
-
styleInject(css_248z$
|
|
11673
|
+
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";
|
|
11674
|
+
styleInject(css_248z$8);
|
|
10902
11675
|
|
|
10903
11676
|
var TextArea = Input.TextArea;
|
|
10904
11677
|
|
|
@@ -10919,7 +11692,7 @@ var Buyer = /*#__PURE__*/function (_React$Component) {
|
|
|
10919
11692
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
10920
11693
|
|
|
10921
11694
|
_this.render = function () {
|
|
10922
|
-
return
|
|
11695
|
+
return React.createElement(Main$1, _objectSpread2({}, _this.props));
|
|
10923
11696
|
};
|
|
10924
11697
|
|
|
10925
11698
|
return _this;
|
|
@@ -10932,7 +11705,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
10932
11705
|
var getFieldDecorator = form.getFieldDecorator;
|
|
10933
11706
|
/** 控制器 */
|
|
10934
11707
|
|
|
10935
|
-
var controller =
|
|
11708
|
+
var controller = Invoice.useInvoiceController();
|
|
10936
11709
|
/** 控制器 */
|
|
10937
11710
|
|
|
10938
11711
|
var model = controller.useMemo(function (s) {
|
|
@@ -10950,7 +11723,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
10950
11723
|
return [{
|
|
10951
11724
|
id: 'sellerName',
|
|
10952
11725
|
label: '销售方名称',
|
|
10953
|
-
node:
|
|
11726
|
+
node: React.createElement(Input, {
|
|
10954
11727
|
readOnly: model === 'prefab',
|
|
10955
11728
|
size: "small"
|
|
10956
11729
|
}),
|
|
@@ -10963,7 +11736,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
10963
11736
|
}, {
|
|
10964
11737
|
id: 'sellerNo',
|
|
10965
11738
|
label: '销售方纳税人识别号',
|
|
10966
|
-
node:
|
|
11739
|
+
node: React.createElement(Input, {
|
|
10967
11740
|
readOnly: model === 'prefab',
|
|
10968
11741
|
size: "small"
|
|
10969
11742
|
}),
|
|
@@ -10976,7 +11749,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
10976
11749
|
}, {
|
|
10977
11750
|
id: 'sellerAddress',
|
|
10978
11751
|
label: '销售方地址及电话',
|
|
10979
|
-
node:
|
|
11752
|
+
node: React.createElement(Input, {
|
|
10980
11753
|
readOnly: model === 'prefab',
|
|
10981
11754
|
size: "small"
|
|
10982
11755
|
}),
|
|
@@ -10989,7 +11762,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
10989
11762
|
}, {
|
|
10990
11763
|
id: 'sellerBank',
|
|
10991
11764
|
label: '销售方开户行及账号',
|
|
10992
|
-
node:
|
|
11765
|
+
node: React.createElement(Input, {
|
|
10993
11766
|
readOnly: model === 'prefab',
|
|
10994
11767
|
size: "small"
|
|
10995
11768
|
}),
|
|
@@ -11015,62 +11788,62 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
11015
11788
|
return getFieldDecorator(e.id, e.options)(e.node);
|
|
11016
11789
|
}
|
|
11017
11790
|
}, [props.formRender]);
|
|
11018
|
-
return
|
|
11791
|
+
return React.createElement(Form, null, React.createElement("div", {
|
|
11019
11792
|
className: "kts-invoice-operate-seller"
|
|
11020
|
-
},
|
|
11793
|
+
}, React.createElement("div", {
|
|
11021
11794
|
className: "kts-invoice-operate-seller-message"
|
|
11022
|
-
},
|
|
11795
|
+
}, React.createElement("div", {
|
|
11023
11796
|
className: "kts-invoice-operate-seller-title"
|
|
11024
|
-
},
|
|
11797
|
+
}, React.createElement("label", null, "\u9500\u552E\u65B9")), React.createElement(Descriptions, {
|
|
11025
11798
|
className: "kts-invoice-operate-seller-message-list",
|
|
11026
11799
|
size: "small",
|
|
11027
11800
|
column: 1,
|
|
11028
11801
|
bordered: true
|
|
11029
11802
|
}, formItem.map(function (e, i) {
|
|
11030
|
-
return
|
|
11803
|
+
return React.createElement(Descriptions.Item, {
|
|
11031
11804
|
key: i,
|
|
11032
11805
|
label: e.label
|
|
11033
|
-
},
|
|
11034
|
-
}))),
|
|
11806
|
+
}, React.createElement(Form.Item, null, createFormItem(e)));
|
|
11807
|
+
}))), React.createElement("div", {
|
|
11035
11808
|
className: "kts-invoice-operate-seller-remarks"
|
|
11036
|
-
},
|
|
11809
|
+
}, React.createElement("div", {
|
|
11037
11810
|
className: "kts-invoice-operate-seller-title"
|
|
11038
|
-
},
|
|
11811
|
+
}, React.createElement("label", null, "\u5907\u6CE8")), React.createElement("div", {
|
|
11039
11812
|
className: "kts-invoice-operate-seller-remarks-value"
|
|
11040
11813
|
}, getFieldDecorator('remarks', {
|
|
11041
11814
|
initialValue: props.defaultsellerRemarks
|
|
11042
|
-
})(
|
|
11815
|
+
})(React.createElement(TextArea, null))))));
|
|
11043
11816
|
});
|
|
11044
11817
|
|
|
11045
|
-
var css_248z$
|
|
11046
|
-
styleInject(css_248z$
|
|
11818
|
+
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";
|
|
11819
|
+
styleInject(css_248z$9);
|
|
11047
11820
|
|
|
11048
11821
|
var Sign = decorator(Form.create())(function (props) {
|
|
11049
11822
|
var form = props.form;
|
|
11050
11823
|
var getFieldDecorator = form.getFieldDecorator;
|
|
11051
11824
|
/** 控制器 */
|
|
11052
11825
|
|
|
11053
|
-
var controller =
|
|
11826
|
+
var controller = Invoice.useInvoiceController();
|
|
11054
11827
|
var model = controller.useMemo(function (s) {
|
|
11055
11828
|
return s.model;
|
|
11056
11829
|
}, []); // 注册 form
|
|
11057
11830
|
|
|
11058
11831
|
controller.useForm('sign', form);
|
|
11059
|
-
return
|
|
11832
|
+
return React.createElement("div", {
|
|
11060
11833
|
className: "kts-invoice-operate-sign"
|
|
11061
|
-
},
|
|
11834
|
+
}, React.createElement(Form, _objectSpread2({}, formItemLayout), React.createElement("div", null, React.createElement(Form.Item, {
|
|
11062
11835
|
label: "\u6536\u6B3E\u4EBA"
|
|
11063
11836
|
}, getFieldDecorator('payee', {
|
|
11064
11837
|
initialValue: props.defaultPayee
|
|
11065
|
-
})(
|
|
11838
|
+
})(React.createElement(Input, {
|
|
11066
11839
|
size: "small"
|
|
11067
|
-
})))),
|
|
11840
|
+
})))), React.createElement("div", null, React.createElement(Form.Item, {
|
|
11068
11841
|
label: "\u590D\u6838\u4EBA"
|
|
11069
11842
|
}, getFieldDecorator('reviewer', {
|
|
11070
11843
|
initialValue: props.defaultReviewer
|
|
11071
|
-
})(
|
|
11844
|
+
})(React.createElement(Input, {
|
|
11072
11845
|
size: "small"
|
|
11073
|
-
})))),
|
|
11846
|
+
})))), React.createElement("div", null, React.createElement(Form.Item, {
|
|
11074
11847
|
label: "\u5F00\u7968\u4EBA"
|
|
11075
11848
|
}, getFieldDecorator('issuer', {
|
|
11076
11849
|
initialValue: props.defaultIssuer,
|
|
@@ -11078,7 +11851,7 @@ var Sign = decorator(Form.create())(function (props) {
|
|
|
11078
11851
|
required: true,
|
|
11079
11852
|
message: '请输入开票人'
|
|
11080
11853
|
}]
|
|
11081
|
-
})(
|
|
11854
|
+
})(React.createElement(Input, {
|
|
11082
11855
|
size: "small"
|
|
11083
11856
|
}))))));
|
|
11084
11857
|
});
|
|
@@ -11092,7 +11865,7 @@ var formItemLayout = {
|
|
|
11092
11865
|
};
|
|
11093
11866
|
|
|
11094
11867
|
var ImportBuyerButton = (function () {
|
|
11095
|
-
var controller =
|
|
11868
|
+
var controller = Invoice.useInvoiceController();
|
|
11096
11869
|
var onClick = React.useCallback(function () {
|
|
11097
11870
|
controller.pipeline( /*#__PURE__*/function () {
|
|
11098
11871
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
@@ -11115,7 +11888,7 @@ var ImportBuyerButton = (function () {
|
|
|
11115
11888
|
};
|
|
11116
11889
|
}())();
|
|
11117
11890
|
}, [controller]);
|
|
11118
|
-
return
|
|
11891
|
+
return React.createElement(React.Fragment, null, controller.getBuyerList && React.createElement(Button, {
|
|
11119
11892
|
type: "link",
|
|
11120
11893
|
icon: "plus-circle",
|
|
11121
11894
|
onClick: onClick
|
|
@@ -11124,7 +11897,7 @@ var ImportBuyerButton = (function () {
|
|
|
11124
11897
|
|
|
11125
11898
|
var BuyerNameInput = (function (props) {
|
|
11126
11899
|
/** 控制器 */
|
|
11127
|
-
var controller =
|
|
11900
|
+
var controller = Invoice.useInvoiceController();
|
|
11128
11901
|
/** 组件模式 */
|
|
11129
11902
|
|
|
11130
11903
|
var model = controller.useMemo(function (s) {
|
|
@@ -11154,29 +11927,29 @@ var BuyerNameInput = (function (props) {
|
|
|
11154
11927
|
var content = React.useMemo(function () {
|
|
11155
11928
|
var _dataSource$recent;
|
|
11156
11929
|
|
|
11157
|
-
return
|
|
11930
|
+
return React.createElement("div", {
|
|
11158
11931
|
className: 'kts-invoice-operate-buyer-name-content'
|
|
11159
|
-
}, loading ?
|
|
11932
|
+
}, loading ? React.createElement("div", {
|
|
11160
11933
|
style: {
|
|
11161
11934
|
textAlign: 'center'
|
|
11162
11935
|
}
|
|
11163
|
-
},
|
|
11936
|
+
}, React.createElement(Spin, null)) : React.createElement(React.Fragment, null, React.createElement("div", {
|
|
11164
11937
|
className: 'kts-invoice-operate-buyer-name-content-block',
|
|
11165
11938
|
style: {
|
|
11166
11939
|
padding: '14px 10px'
|
|
11167
11940
|
}
|
|
11168
|
-
},
|
|
11941
|
+
}, React.createElement("label", {
|
|
11169
11942
|
style: {
|
|
11170
11943
|
marginBottom: 10
|
|
11171
11944
|
}
|
|
11172
|
-
}, "\u6700\u8FD1\u5F00\u5177"),
|
|
11945
|
+
}, "\u6700\u8FD1\u5F00\u5177"), React.createElement("ul", {
|
|
11173
11946
|
className: 'kts-invoice-operate-buyer-name-content-recently-issued'
|
|
11174
|
-
}, !dataSource.recent || dataSource.recent.length <= 0 ?
|
|
11947
|
+
}, !dataSource.recent || dataSource.recent.length <= 0 ? React.createElement(Empty, {
|
|
11175
11948
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
11176
11949
|
}) : (_dataSource$recent = dataSource.recent) === null || _dataSource$recent === void 0 ? void 0 : _dataSource$recent.map(function (e, i) {
|
|
11177
11950
|
var _dataSource$recent$le, _dataSource$recent2;
|
|
11178
11951
|
|
|
11179
|
-
return
|
|
11952
|
+
return React.createElement("li", {
|
|
11180
11953
|
key: i,
|
|
11181
11954
|
onClick: function onClick() {
|
|
11182
11955
|
onClickItem(e);
|
|
@@ -11184,37 +11957,37 @@ var BuyerNameInput = (function (props) {
|
|
|
11184
11957
|
style: {
|
|
11185
11958
|
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)
|
|
11186
11959
|
}
|
|
11187
|
-
},
|
|
11188
|
-
}))),
|
|
11960
|
+
}, React.createElement(MyTag, null, e.buyerName));
|
|
11961
|
+
}))), React.createElement(Divider, {
|
|
11189
11962
|
style: {
|
|
11190
11963
|
margin: "0 6px"
|
|
11191
11964
|
}
|
|
11192
|
-
}),
|
|
11965
|
+
}), React.createElement("div", {
|
|
11193
11966
|
className: 'kts-invoice-operate-buyer-name-content-block',
|
|
11194
11967
|
style: {
|
|
11195
11968
|
padding: '14px 10px 4px'
|
|
11196
11969
|
}
|
|
11197
|
-
},
|
|
11970
|
+
}, React.createElement("label", {
|
|
11198
11971
|
style: {
|
|
11199
11972
|
padding: '0 10px'
|
|
11200
11973
|
}
|
|
11201
|
-
}, "\u9009\u62E9\u516C\u53F8"),
|
|
11974
|
+
}, "\u9009\u62E9\u516C\u53F8"), React.createElement("div", {
|
|
11202
11975
|
style: {
|
|
11203
11976
|
maxHeight: 200,
|
|
11204
11977
|
overflow: "auto"
|
|
11205
11978
|
}
|
|
11206
|
-
}, !dataSource.list || dataSource.list.length <= 0 ?
|
|
11979
|
+
}, !dataSource.list || dataSource.list.length <= 0 ? React.createElement(Empty, {
|
|
11207
11980
|
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
11208
11981
|
}) : dataSource.list.map(function (e, i) {
|
|
11209
|
-
return
|
|
11982
|
+
return React.createElement("ul", {
|
|
11210
11983
|
key: i,
|
|
11211
11984
|
onClick: function onClick() {
|
|
11212
11985
|
onClickItem(e);
|
|
11213
11986
|
},
|
|
11214
11987
|
className: 'kts-invoice-operate-buyer-name-content-select-company'
|
|
11215
|
-
},
|
|
11988
|
+
}, React.createElement("li", {
|
|
11216
11989
|
title: e.buyerName
|
|
11217
|
-
}, e.buyerName),
|
|
11990
|
+
}, e.buyerName), React.createElement("li", {
|
|
11218
11991
|
title: e.buyerNo
|
|
11219
11992
|
}, e.buyerNo));
|
|
11220
11993
|
})))));
|
|
@@ -11255,7 +12028,7 @@ var BuyerNameInput = (function (props) {
|
|
|
11255
12028
|
}, [visible, props.value]);
|
|
11256
12029
|
|
|
11257
12030
|
if (model === 'prefab' || !autoContainer) {
|
|
11258
|
-
return
|
|
12031
|
+
return React.createElement(Input, {
|
|
11259
12032
|
size: "small",
|
|
11260
12033
|
autoComplete: "off",
|
|
11261
12034
|
value: props.value,
|
|
@@ -11266,14 +12039,14 @@ var BuyerNameInput = (function (props) {
|
|
|
11266
12039
|
});
|
|
11267
12040
|
}
|
|
11268
12041
|
|
|
11269
|
-
return
|
|
12042
|
+
return React.createElement(Popover, {
|
|
11270
12043
|
onVisibleChange: setVisible,
|
|
11271
12044
|
overlayClassName: 'kts-invoice-operate-buyer-name-popover',
|
|
11272
12045
|
placement: "bottomLeft",
|
|
11273
12046
|
trigger: "click",
|
|
11274
12047
|
visible: visible,
|
|
11275
12048
|
content: content
|
|
11276
|
-
},
|
|
12049
|
+
}, React.createElement(Input, {
|
|
11277
12050
|
size: "small",
|
|
11278
12051
|
autoComplete: "off",
|
|
11279
12052
|
value: props.value,
|
|
@@ -11284,7 +12057,7 @@ var BuyerNameInput = (function (props) {
|
|
|
11284
12057
|
|
|
11285
12058
|
function useDataSource() {
|
|
11286
12059
|
/** 控制器 */
|
|
11287
|
-
var controller =
|
|
12060
|
+
var controller = Invoice.useInvoiceController();
|
|
11288
12061
|
|
|
11289
12062
|
var _React$useState3 = React.useState(false),
|
|
11290
12063
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
@@ -11351,7 +12124,7 @@ function useDataSource() {
|
|
|
11351
12124
|
}
|
|
11352
12125
|
|
|
11353
12126
|
function MyTag(props) {
|
|
11354
|
-
return
|
|
12127
|
+
return React.createElement("span", {
|
|
11355
12128
|
className: 'kts-invoice-operate-buyer-name-content-tag',
|
|
11356
12129
|
title: props.children
|
|
11357
12130
|
}, props.children);
|
|
@@ -11365,10 +12138,10 @@ function interval(i, t) {
|
|
|
11365
12138
|
}
|
|
11366
12139
|
}
|
|
11367
12140
|
|
|
11368
|
-
var css_248z$
|
|
11369
|
-
styleInject(css_248z$
|
|
12141
|
+
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";
|
|
12142
|
+
styleInject(css_248z$a);
|
|
11370
12143
|
|
|
11371
|
-
var Text$
|
|
12144
|
+
var Text$6 = Typography.Text;
|
|
11372
12145
|
|
|
11373
12146
|
var Buyer$1 = /*#__PURE__*/function (_React$Component) {
|
|
11374
12147
|
_inherits(Buyer, _React$Component);
|
|
@@ -11387,7 +12160,7 @@ var Buyer$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
11387
12160
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
11388
12161
|
|
|
11389
12162
|
_this.render = function () {
|
|
11390
|
-
return
|
|
12163
|
+
return React.createElement(Main$2, _objectSpread2({}, _this.props));
|
|
11391
12164
|
};
|
|
11392
12165
|
|
|
11393
12166
|
return _this;
|
|
@@ -11400,7 +12173,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11400
12173
|
var getFieldDecorator = form.getFieldDecorator;
|
|
11401
12174
|
/** 控制器 */
|
|
11402
12175
|
|
|
11403
|
-
var controller =
|
|
12176
|
+
var controller = Invoice.useInvoiceController();
|
|
11404
12177
|
/** 组件模式 */
|
|
11405
12178
|
|
|
11406
12179
|
var model = controller.useMemo(function (s) {
|
|
@@ -11418,7 +12191,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11418
12191
|
return [{
|
|
11419
12192
|
id: 'buyerName',
|
|
11420
12193
|
label: '购买方名称',
|
|
11421
|
-
node:
|
|
12194
|
+
node: React.createElement(Input, {
|
|
11422
12195
|
size: "small",
|
|
11423
12196
|
autoComplete: "off",
|
|
11424
12197
|
readOnly: model === 'prefab'
|
|
@@ -11432,7 +12205,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11432
12205
|
}, {
|
|
11433
12206
|
id: 'buyerNo',
|
|
11434
12207
|
label: '购买方纳税人识别号',
|
|
11435
|
-
node:
|
|
12208
|
+
node: React.createElement(Input, {
|
|
11436
12209
|
size: "small",
|
|
11437
12210
|
autoComplete: "off",
|
|
11438
12211
|
readOnly: model === 'prefab'
|
|
@@ -11446,7 +12219,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11446
12219
|
}, {
|
|
11447
12220
|
id: 'buyerAddress',
|
|
11448
12221
|
label: '购买方地址及电话',
|
|
11449
|
-
node:
|
|
12222
|
+
node: React.createElement(Input, {
|
|
11450
12223
|
size: "small",
|
|
11451
12224
|
autoComplete: "off",
|
|
11452
12225
|
readOnly: model === 'prefab'
|
|
@@ -11460,7 +12233,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11460
12233
|
}, {
|
|
11461
12234
|
id: 'buyerBank',
|
|
11462
12235
|
label: '购买方开户行及账号',
|
|
11463
|
-
node:
|
|
12236
|
+
node: React.createElement(Input, {
|
|
11464
12237
|
size: "small",
|
|
11465
12238
|
autoComplete: "off",
|
|
11466
12239
|
readOnly: model === 'prefab'
|
|
@@ -11482,7 +12255,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11482
12255
|
if (e.options.rules.some(function (e) {
|
|
11483
12256
|
return e.required;
|
|
11484
12257
|
})) {
|
|
11485
|
-
return
|
|
12258
|
+
return React.createElement(React.Fragment, null, React.createElement(Text$6, {
|
|
11486
12259
|
type: "danger"
|
|
11487
12260
|
}, "*"), e.label);
|
|
11488
12261
|
} else {
|
|
@@ -11492,33 +12265,33 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11492
12265
|
return e.label;
|
|
11493
12266
|
}
|
|
11494
12267
|
}, []);
|
|
11495
|
-
return
|
|
12268
|
+
return React.createElement(Form, null, React.createElement("div", {
|
|
11496
12269
|
className: "kts-invoice-operate-buyer"
|
|
11497
|
-
},
|
|
12270
|
+
}, React.createElement("div", {
|
|
11498
12271
|
className: "kts-invoice-operate-buyer-message"
|
|
11499
|
-
},
|
|
12272
|
+
}, React.createElement("div", {
|
|
11500
12273
|
className: "kts-invoice-operate-buyer-title"
|
|
11501
|
-
},
|
|
12274
|
+
}, React.createElement("label", null, "\u8D2D\u4E70\u65B9")), React.createElement("div", {
|
|
11502
12275
|
className: "kts-invoice-operate-buyer-message-Import"
|
|
11503
|
-
}, model !== 'prefab' &&
|
|
12276
|
+
}, model !== 'prefab' && React.createElement(ImportBuyerButton, null)), React.createElement(Descriptions, {
|
|
11504
12277
|
className: "kts-invoice-operate-buyer-message-list",
|
|
11505
12278
|
size: "small",
|
|
11506
12279
|
column: 1,
|
|
11507
12280
|
bordered: true
|
|
11508
12281
|
}, formItem.map(function (item, i) {
|
|
11509
|
-
return
|
|
12282
|
+
return React.createElement(Descriptions.Item, {
|
|
11510
12283
|
key: i,
|
|
11511
12284
|
label: getlabel(item)
|
|
11512
|
-
},
|
|
11513
|
-
}))),
|
|
12285
|
+
}, React.createElement(Form.Item, null, getFieldDecorator(item.id, item.options)(autoContainer ? item.id === 'buyerName' ? React.createElement(BuyerNameInput, null) : item.node : item.node)));
|
|
12286
|
+
}))), React.createElement("div", {
|
|
11514
12287
|
className: "kts-invoice-operate-buyer-password"
|
|
11515
|
-
},
|
|
12288
|
+
}, React.createElement("div", {
|
|
11516
12289
|
className: "kts-invoice-operate-buyer-title"
|
|
11517
|
-
},
|
|
12290
|
+
}, React.createElement("label", null, "\u5BC6\u7801\u533A")), React.createElement("div", null))));
|
|
11518
12291
|
});
|
|
11519
12292
|
|
|
11520
12293
|
var ImportBuyerDrawer = (function () {
|
|
11521
|
-
var controller =
|
|
12294
|
+
var controller = Invoice.useInvoiceController();
|
|
11522
12295
|
var visible = controller.useMemo(function (s) {
|
|
11523
12296
|
return s.buyerState.isVisibleDrawer;
|
|
11524
12297
|
}, []);
|
|
@@ -11548,7 +12321,7 @@ var ImportBuyerDrawer = (function () {
|
|
|
11548
12321
|
};
|
|
11549
12322
|
}())();
|
|
11550
12323
|
}, [controller]);
|
|
11551
|
-
return
|
|
12324
|
+
return React.createElement(Drawer, {
|
|
11552
12325
|
title: "\u8D2D\u65B9\u5217\u8868",
|
|
11553
12326
|
placement: "right",
|
|
11554
12327
|
// closable={false}
|
|
@@ -11556,11 +12329,11 @@ var ImportBuyerDrawer = (function () {
|
|
|
11556
12329
|
width: 983,
|
|
11557
12330
|
onClose: onClose,
|
|
11558
12331
|
visible: visible
|
|
11559
|
-
}, topExpand,
|
|
12332
|
+
}, topExpand, React.createElement(DrawerBody$1, null));
|
|
11560
12333
|
});
|
|
11561
12334
|
|
|
11562
12335
|
var DrawerBody$1 = function DrawerBody() {
|
|
11563
|
-
var controller =
|
|
12336
|
+
var controller = Invoice.useInvoiceController();
|
|
11564
12337
|
var columns = controller.useMemo(function (e) {
|
|
11565
12338
|
return e.buyerState.columns;
|
|
11566
12339
|
}, []);
|
|
@@ -11577,7 +12350,7 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
11577
12350
|
}
|
|
11578
12351
|
});
|
|
11579
12352
|
}, [controller]);
|
|
11580
|
-
return
|
|
12353
|
+
return React.createElement(Table, {
|
|
11581
12354
|
bordered: true,
|
|
11582
12355
|
size: "small",
|
|
11583
12356
|
columns: columns,
|
|
@@ -11648,7 +12421,7 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
11648
12421
|
};
|
|
11649
12422
|
|
|
11650
12423
|
var ImportGoodsDrawer = (function () {
|
|
11651
|
-
var controller =
|
|
12424
|
+
var controller = Invoice.useInvoiceController();
|
|
11652
12425
|
var visible = controller.useMemo(function (s) {
|
|
11653
12426
|
return s.goodsListState.importGoods.isVisibleDrawer;
|
|
11654
12427
|
}, []);
|
|
@@ -11678,7 +12451,7 @@ var ImportGoodsDrawer = (function () {
|
|
|
11678
12451
|
};
|
|
11679
12452
|
}())();
|
|
11680
12453
|
}, [controller]);
|
|
11681
|
-
return
|
|
12454
|
+
return React.createElement(Drawer, {
|
|
11682
12455
|
title: "\u5546\u54C1\u5217\u8868",
|
|
11683
12456
|
placement: "right",
|
|
11684
12457
|
// closable={false}
|
|
@@ -11686,15 +12459,15 @@ var ImportGoodsDrawer = (function () {
|
|
|
11686
12459
|
width: 983,
|
|
11687
12460
|
onClose: onClose,
|
|
11688
12461
|
visible: visible
|
|
11689
|
-
}, topExpand &&
|
|
12462
|
+
}, topExpand && React.createElement("div", {
|
|
11690
12463
|
style: {
|
|
11691
12464
|
marginBottom: 10
|
|
11692
12465
|
}
|
|
11693
|
-
}, topExpand),
|
|
12466
|
+
}, topExpand), React.createElement(DrawerBody$2, null));
|
|
11694
12467
|
});
|
|
11695
12468
|
|
|
11696
12469
|
var DrawerBody$2 = function DrawerBody() {
|
|
11697
|
-
var controller =
|
|
12470
|
+
var controller = Invoice.useInvoiceController();
|
|
11698
12471
|
var columns = controller.useMemo(function (s) {
|
|
11699
12472
|
return s.goodsListState.importGoods.columns;
|
|
11700
12473
|
}, []);
|
|
@@ -11712,7 +12485,7 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11712
12485
|
}
|
|
11713
12486
|
});
|
|
11714
12487
|
}, [controller]);
|
|
11715
|
-
return
|
|
12488
|
+
return React.createElement(Table, {
|
|
11716
12489
|
bordered: true,
|
|
11717
12490
|
size: "small",
|
|
11718
12491
|
columns: columns,
|
|
@@ -11728,6 +12501,7 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11728
12501
|
onClick: function onClick() {
|
|
11729
12502
|
controller.run( /*#__PURE__*/function () {
|
|
11730
12503
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
12504
|
+
var between, editGood;
|
|
11731
12505
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11732
12506
|
while (1) {
|
|
11733
12507
|
switch (_context2.prev = _context2.next) {
|
|
@@ -11736,7 +12510,8 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11736
12510
|
return !record[e] && record[e] !== 0;
|
|
11737
12511
|
}).forEach(function (e) {
|
|
11738
12512
|
delete record[e];
|
|
11739
|
-
});
|
|
12513
|
+
}); // 导入时校验函数
|
|
12514
|
+
|
|
11740
12515
|
_context2.next = 3;
|
|
11741
12516
|
return s.goodsListState.importGoods.verifyFn(record);
|
|
11742
12517
|
|
|
@@ -11764,30 +12539,41 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11764
12539
|
record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
|
|
11765
12540
|
record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
|
|
11766
12541
|
record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
|
|
11767
|
-
}
|
|
12542
|
+
} // 中间数据
|
|
11768
12543
|
|
|
11769
|
-
s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), record);
|
|
11770
12544
|
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
12545
|
+
between = _objectSpread2({}, record);
|
|
12546
|
+
between.itemName = getItemName$1(record, s.goodsListState.editGood);
|
|
12547
|
+
between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood); // 设置编辑货物
|
|
12548
|
+
|
|
12549
|
+
editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
|
|
12550
|
+
|
|
12551
|
+
if (editGood.taxRate) {
|
|
12552
|
+
editGood.taxRate = dutyFree(controller, editGood.taxRate, s.goodsListState.form, editGood);
|
|
11774
12553
|
}
|
|
11775
12554
|
|
|
11776
|
-
|
|
12555
|
+
if ("".concat(editGood.priceIncludeTax) === '0') {
|
|
12556
|
+
editGood.priceIncludeTax = undefined;
|
|
12557
|
+
editGood.priceExcludeTax = undefined;
|
|
12558
|
+
} else {
|
|
12559
|
+
editGood.priceExcludeTax = getPriceExcludeTax(editGood, record);
|
|
12560
|
+
}
|
|
11777
12561
|
|
|
11778
|
-
|
|
11779
|
-
|
|
12562
|
+
if (editGood.quantity && editGood.priceIncludeTax) {
|
|
12563
|
+
editGood.lineAmountIncludeTax = countAmountIncludeTax(editGood.quantity, editGood.priceIncludeTax);
|
|
12564
|
+
} // 导入FORM里
|
|
11780
12565
|
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
s.goodsListState.editGood
|
|
12566
|
+
|
|
12567
|
+
if (s.goodsListState.isMyShow) {
|
|
12568
|
+
s.goodsListState.form.setFieldsValue(editGood);
|
|
11784
12569
|
} else {
|
|
11785
|
-
s.goodsListState.
|
|
12570
|
+
s.goodsListState.form.setFieldsValue(_objectSpread2(_objectSpread2({}, editGood), {}, {
|
|
12571
|
+
itemName: editGood.itemNameOther,
|
|
12572
|
+
unit: editGood.unitOther,
|
|
12573
|
+
itemModelName: editGood.itemModelNameOther
|
|
12574
|
+
}));
|
|
11786
12575
|
}
|
|
11787
12576
|
|
|
11788
|
-
if (s.goodsListState.editGood.quantity && s.goodsListState.editGood.priceIncludeTax) s.goodsListState.editGood.lineAmountIncludeTax = countAmountIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
11789
|
-
s.goodsListState.editGood.itemName = getItemName(record);
|
|
11790
|
-
s.goodsListState.form.setFieldsValue(s.goodsListState.editGood);
|
|
11791
12577
|
s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
11792
12578
|
s.goodsListState.isTaxIncluded ? updateUnitPriceExcludingTax(controller, s.goodsListState.form) : updateUnitPriceTax(controller, s.goodsListState.form);
|
|
11793
12579
|
|
|
@@ -11809,11 +12595,12 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11809
12595
|
});
|
|
11810
12596
|
};
|
|
11811
12597
|
/** 货物名称 */
|
|
12598
|
+
// const getItemName = (record: any) => {
|
|
12599
|
+
// return record.shorthand
|
|
12600
|
+
// ? `*${record.shorthand}*${record.itemName}`
|
|
12601
|
+
// : record.itemName;
|
|
12602
|
+
// };
|
|
11812
12603
|
|
|
11813
|
-
|
|
11814
|
-
var getItemName = function getItemName(record) {
|
|
11815
|
-
return record.shorthand ? "*".concat(record.shorthand, "*").concat(record.itemName) : record.itemName;
|
|
11816
|
-
};
|
|
11817
12604
|
/** 货物单价,不含税 */
|
|
11818
12605
|
|
|
11819
12606
|
|
|
@@ -11821,6 +12608,39 @@ var getPriceExcludeTax = function getPriceExcludeTax(s, record) {
|
|
|
11821
12608
|
if (!s.taxRate && s.taxRate !== 0 || !record.priceIncludeTax && record.priceIncludeTax !== 0) return; // 单价(含税)/(1+税率) = 单价(不含税)
|
|
11822
12609
|
|
|
11823
12610
|
return format15(evaluate("".concat(record.priceIncludeTax, " / (1+").concat(s.taxRate, "/100)")));
|
|
12611
|
+
}; // 获取我方名称
|
|
12612
|
+
|
|
12613
|
+
|
|
12614
|
+
var getItemName$1 = function getItemName(record, editGood) {
|
|
12615
|
+
var _getSN;
|
|
12616
|
+
|
|
12617
|
+
var shorthand;
|
|
12618
|
+
shorthand = record.shorthand;
|
|
12619
|
+
|
|
12620
|
+
if (shorthand) {
|
|
12621
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12622
|
+
}
|
|
12623
|
+
|
|
12624
|
+
shorthand = (_getSN = getSN(editGood.itemNameOther)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand;
|
|
12625
|
+
|
|
12626
|
+
if (shorthand) {
|
|
12627
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12628
|
+
}
|
|
12629
|
+
|
|
12630
|
+
return record.itemName;
|
|
12631
|
+
}; // 获取他方名称
|
|
12632
|
+
|
|
12633
|
+
|
|
12634
|
+
var getItemNameOther = function getItemNameOther(record, editGood) {
|
|
12635
|
+
if (!editGood.itemNameOther) return editGood.itemNameOther;
|
|
12636
|
+
var shorthand;
|
|
12637
|
+
shorthand = record.shorthand;
|
|
12638
|
+
|
|
12639
|
+
if (shorthand) {
|
|
12640
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12641
|
+
}
|
|
12642
|
+
|
|
12643
|
+
return record.itemNameOther;
|
|
11824
12644
|
};
|
|
11825
12645
|
|
|
11826
12646
|
/**
|
|
@@ -11874,13 +12694,13 @@ function cutStr(str, L) {
|
|
|
11874
12694
|
}
|
|
11875
12695
|
}
|
|
11876
12696
|
|
|
11877
|
-
var css_248z$
|
|
11878
|
-
styleInject(css_248z$
|
|
12697
|
+
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";
|
|
12698
|
+
styleInject(css_248z$b);
|
|
11879
12699
|
|
|
11880
12700
|
var TreeNode = Tree.TreeNode;
|
|
11881
12701
|
var confirm = Modal.confirm;
|
|
11882
12702
|
var EndowCodeDrawer = (function () {
|
|
11883
|
-
var controller =
|
|
12703
|
+
var controller = Invoice.useInvoiceController();
|
|
11884
12704
|
var visible = controller.useMemo(function (s) {
|
|
11885
12705
|
return s.goodsListState.endowCode.endowcodeGoodIndex.length > 0;
|
|
11886
12706
|
}, []);
|
|
@@ -11979,7 +12799,7 @@ var EndowCodeDrawer = (function () {
|
|
|
11979
12799
|
setDefaultValue(undefined);
|
|
11980
12800
|
}
|
|
11981
12801
|
}, [visible]);
|
|
11982
|
-
return
|
|
12802
|
+
return React.createElement(Drawer, {
|
|
11983
12803
|
title: "\u8D4B\u7801",
|
|
11984
12804
|
placement: "right",
|
|
11985
12805
|
destroyOnClose: true,
|
|
@@ -11987,7 +12807,7 @@ var EndowCodeDrawer = (function () {
|
|
|
11987
12807
|
width: 383,
|
|
11988
12808
|
onClose: onClose,
|
|
11989
12809
|
visible: visible
|
|
11990
|
-
}, defaultValue &&
|
|
12810
|
+
}, defaultValue && React.createElement(DrawerBody$3, {
|
|
11991
12811
|
defaultValue: defaultValue
|
|
11992
12812
|
}));
|
|
11993
12813
|
});
|
|
@@ -11995,7 +12815,7 @@ var EndowCodeDrawer = (function () {
|
|
|
11995
12815
|
var DrawerBody$3 = function DrawerBody(props) {
|
|
11996
12816
|
var _defaultValue$taxRate, _defaultValue$favoure;
|
|
11997
12817
|
|
|
11998
|
-
var controller =
|
|
12818
|
+
var controller = Invoice.useInvoiceController();
|
|
11999
12819
|
var defaultValue = props.defaultValue;
|
|
12000
12820
|
var actions = React.useMemo(function () {
|
|
12001
12821
|
return createAsyncFormActions();
|
|
@@ -12127,7 +12947,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12127
12947
|
};
|
|
12128
12948
|
}());
|
|
12129
12949
|
}, [actions, dataSource, readOnlyTaxRate]);
|
|
12130
|
-
return
|
|
12950
|
+
return React.createElement(Select, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
12131
12951
|
showSearch: true,
|
|
12132
12952
|
showArrow: false,
|
|
12133
12953
|
notFoundContent: null,
|
|
@@ -12135,7 +12955,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12135
12955
|
onSearch: onSearch,
|
|
12136
12956
|
onChange: onChange
|
|
12137
12957
|
}), dataSource.map(function (e) {
|
|
12138
|
-
return
|
|
12958
|
+
return React.createElement(Select.Option, {
|
|
12139
12959
|
key: e.value,
|
|
12140
12960
|
value: e.value
|
|
12141
12961
|
}, e.label);
|
|
@@ -12165,14 +12985,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12165
12985
|
|
|
12166
12986
|
|
|
12167
12987
|
var createTreeNode = React.useCallback(function () {
|
|
12168
|
-
if (!list) return
|
|
12988
|
+
if (!list) return React.createElement(React.Fragment, null);
|
|
12169
12989
|
return ctn(list);
|
|
12170
12990
|
|
|
12171
12991
|
function title(label) {
|
|
12172
12992
|
if (!filter) return label;
|
|
12173
12993
|
label = (filter.taxCategoryCode ? label.split(new RegExp(filter.taxCategoryCode, 'g')) : [label]).join("<span style=\"color: #1890ff;\">".concat(filter.taxCategoryCode, "</span>"));
|
|
12174
12994
|
label = (filter.val ? label.split(new RegExp(filter.val, 'g')) : [label]).join("<span style=\"color: #1890ff;\">".concat(filter.val, "</span>"));
|
|
12175
|
-
return
|
|
12995
|
+
return React.createElement("span", {
|
|
12176
12996
|
dangerouslySetInnerHTML: {
|
|
12177
12997
|
__html: label
|
|
12178
12998
|
}
|
|
@@ -12181,11 +13001,11 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12181
13001
|
|
|
12182
13002
|
function ctn(l) {
|
|
12183
13003
|
var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0';
|
|
12184
|
-
if (!l || !l.length) return [
|
|
13004
|
+
if (!l || !l.length) return [React.createElement(React.Fragment, null)];
|
|
12185
13005
|
return l.filter(function (e) {
|
|
12186
13006
|
return e.pid === p;
|
|
12187
13007
|
}).map(function (e) {
|
|
12188
|
-
return
|
|
13008
|
+
return React.createElement(TreeNode, {
|
|
12189
13009
|
title: title(e.label),
|
|
12190
13010
|
key: e.id
|
|
12191
13011
|
}, ctn(l, e.id));
|
|
@@ -12315,46 +13135,46 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12315
13135
|
setList([]);
|
|
12316
13136
|
}
|
|
12317
13137
|
}, [visible]);
|
|
12318
|
-
return
|
|
13138
|
+
return React.createElement(React.Fragment, null, React.createElement(Input, {
|
|
12319
13139
|
readOnly: true,
|
|
12320
13140
|
value: props.value,
|
|
12321
|
-
addonAfter:
|
|
13141
|
+
addonAfter: React.createElement(Button, {
|
|
12322
13142
|
size: "small",
|
|
12323
13143
|
type: "link",
|
|
12324
13144
|
onClick: function onClick() {
|
|
12325
13145
|
setVisible(true);
|
|
12326
13146
|
}
|
|
12327
13147
|
}, "\u70B9\u51FB\u9009\u62E9")
|
|
12328
|
-
}),
|
|
13148
|
+
}), React.createElement(Drawer, {
|
|
12329
13149
|
title: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
12330
13150
|
visible: visible,
|
|
12331
13151
|
width: 500,
|
|
12332
13152
|
onClose: function onClose() {
|
|
12333
13153
|
setVisible(false);
|
|
12334
13154
|
}
|
|
12335
|
-
},
|
|
13155
|
+
}, React.createElement(Form, {
|
|
12336
13156
|
key: "".concat(visible)
|
|
12337
|
-
},
|
|
13157
|
+
}, React.createElement(Form.Item, {
|
|
12338
13158
|
label: "\u4EA7\u54C1\u6216\u670D\u52A1\u7B80\u79F0"
|
|
12339
|
-
},
|
|
13159
|
+
}, React.createElement(Input, {
|
|
12340
13160
|
onChange: function onChange(e) {
|
|
12341
13161
|
setFilter(_objectSpread2(_objectSpread2({}, filter), {}, {
|
|
12342
13162
|
val: e.target.value
|
|
12343
13163
|
}));
|
|
12344
13164
|
}
|
|
12345
|
-
})),
|
|
13165
|
+
})), React.createElement(Form.Item, {
|
|
12346
13166
|
label: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801"
|
|
12347
|
-
},
|
|
13167
|
+
}, React.createElement(Input, {
|
|
12348
13168
|
onChange: function onChange(e) {
|
|
12349
13169
|
setFilter(_objectSpread2(_objectSpread2({}, filter), {}, {
|
|
12350
13170
|
taxCategoryCode: e.target.value
|
|
12351
13171
|
}));
|
|
12352
13172
|
}
|
|
12353
|
-
}))), list && list.length > 0 ?
|
|
13173
|
+
}))), list && list.length > 0 ? React.createElement(Tree, {
|
|
12354
13174
|
defaultExpandAll: true,
|
|
12355
13175
|
selectedKeys: [],
|
|
12356
13176
|
onSelect: onSelect
|
|
12357
|
-
}, createTreeNode()) :
|
|
13177
|
+
}, createTreeNode()) : React.createElement("span", {
|
|
12358
13178
|
style: {
|
|
12359
13179
|
color: '#00000073'
|
|
12360
13180
|
}
|
|
@@ -12380,9 +13200,10 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12380
13200
|
}); // 赋码
|
|
12381
13201
|
|
|
12382
13202
|
endowCodeGood.forEach(function (good) {
|
|
12383
|
-
if (!good) return;
|
|
12384
|
-
|
|
12385
|
-
good.
|
|
13203
|
+
if (!good) return;
|
|
13204
|
+
good.itemName = setShorthand(good.itemName, values.shorthand);
|
|
13205
|
+
good.itemNameOther = setShorthand(good.itemNameOther, values.shorthand); // const name = getItemName(good.itemName, values.shorthand);
|
|
13206
|
+
// good.itemName = getItemName(good.itemName, values.shorthand); // `*${values.shorthand}*${name}`;
|
|
12386
13207
|
|
|
12387
13208
|
good.taxClassificationCode = values.taxClassificationCode;
|
|
12388
13209
|
good.taxRate = values.taxRate;
|
|
@@ -12511,13 +13332,13 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12511
13332
|
React.useEffect(function () {
|
|
12512
13333
|
if (controller.getTaxCategoryCodeList) controller.getTaxCategoryCodeList();
|
|
12513
13334
|
}, [controller]);
|
|
12514
|
-
return
|
|
13335
|
+
return React.createElement(SchemaForm, {
|
|
12515
13336
|
actions: actions,
|
|
12516
13337
|
components: _objectSpread2(_objectSpread2({}, components), {}, {
|
|
12517
13338
|
showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
|
|
12518
13339
|
}),
|
|
12519
13340
|
effects: effects
|
|
12520
|
-
},
|
|
13341
|
+
}, React.createElement(FormButtonGroup, null, React.createElement(SchemaMarkupField, {
|
|
12521
13342
|
name: "taxClassificationCode",
|
|
12522
13343
|
type: "showSearch",
|
|
12523
13344
|
title: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
@@ -12527,12 +13348,12 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12527
13348
|
message: '请选择税收分类编码',
|
|
12528
13349
|
required: true
|
|
12529
13350
|
}]
|
|
12530
|
-
}),
|
|
13351
|
+
}), React.createElement(SchemaMarkupField, {
|
|
12531
13352
|
name: "shorthand",
|
|
12532
13353
|
type: "string",
|
|
12533
13354
|
default: getShorthand(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName),
|
|
12534
13355
|
title: "\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0"
|
|
12535
|
-
}),
|
|
13356
|
+
}), React.createElement(SchemaMarkupField, {
|
|
12536
13357
|
name: "taxRate",
|
|
12537
13358
|
type: "string",
|
|
12538
13359
|
title: "\u7A0E\u7387",
|
|
@@ -12545,7 +13366,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12545
13366
|
message: '请选择税率',
|
|
12546
13367
|
required: true
|
|
12547
13368
|
}]
|
|
12548
|
-
}), taxRate === 0 &&
|
|
13369
|
+
}), taxRate === 0 && React.createElement(SchemaMarkupField, {
|
|
12549
13370
|
name: "taxFreeType",
|
|
12550
13371
|
type: "string",
|
|
12551
13372
|
title: "\u514D\u7A0E\u7C7B\u578B",
|
|
@@ -12555,7 +13376,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12555
13376
|
message: '请选择免税类型',
|
|
12556
13377
|
required: true
|
|
12557
13378
|
}]
|
|
12558
|
-
}),
|
|
13379
|
+
}), React.createElement(SchemaMarkupField, {
|
|
12559
13380
|
name: "favouredPolicyMark",
|
|
12560
13381
|
type: "number",
|
|
12561
13382
|
title: "\u662F\u5426\u4EAB\u53D7\u4F18\u60E0\u653F\u7B56",
|
|
@@ -12571,7 +13392,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12571
13392
|
message: '请选择是否享受优惠政策',
|
|
12572
13393
|
required: true
|
|
12573
13394
|
}]
|
|
12574
|
-
}), favouredPolicyMark === 1 &&
|
|
13395
|
+
}), favouredPolicyMark === 1 && React.createElement(SchemaMarkupField, {
|
|
12575
13396
|
name: "favouredPolicyName",
|
|
12576
13397
|
type: "string",
|
|
12577
13398
|
title: "\u4F18\u60E0\u653F\u7B56\u7C7B\u578B",
|
|
@@ -12581,14 +13402,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12581
13402
|
message: '请选择是否享受优惠政策',
|
|
12582
13403
|
required: true
|
|
12583
13404
|
}]
|
|
12584
|
-
})),
|
|
13405
|
+
})), React.createElement("span", {
|
|
12585
13406
|
className: "kts-invoice-operate-goods-endow-code-button-list"
|
|
12586
|
-
},
|
|
13407
|
+
}, React.createElement(Button, {
|
|
12587
13408
|
onClick: function onClick() {
|
|
12588
13409
|
actions.submit(onSubmit);
|
|
12589
13410
|
},
|
|
12590
13411
|
type: "primary"
|
|
12591
|
-
}, "\u786E\u5B9A"),
|
|
13412
|
+
}, "\u786E\u5B9A"), React.createElement(Button, {
|
|
12592
13413
|
onClick: function onClick() {
|
|
12593
13414
|
controller.pipeline( /*#__PURE__*/function () {
|
|
12594
13415
|
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
|
|
@@ -12630,41 +13451,255 @@ var getShorthand = function getShorthand(value) {
|
|
|
12630
13451
|
return undefined;
|
|
12631
13452
|
}
|
|
12632
13453
|
};
|
|
12633
|
-
/** 简称填入名称 */
|
|
12634
13454
|
|
|
13455
|
+
var AddComparisonDrawer = decorator(Form.create())(function (props) {
|
|
13456
|
+
var form = props.form;
|
|
13457
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
13458
|
+
/** 控制器 */
|
|
12635
13459
|
|
|
12636
|
-
var
|
|
12637
|
-
|
|
13460
|
+
var controller = Invoice.useInvoiceController();
|
|
13461
|
+
/** 正在 添加商品对照 的货物索引 */
|
|
12638
13462
|
|
|
12639
|
-
|
|
12640
|
-
return
|
|
12641
|
-
}
|
|
13463
|
+
var addComparisonIndex = controller.useMemo(function (s) {
|
|
13464
|
+
return s.goodsListState.addComparisonIndex;
|
|
13465
|
+
}, []);
|
|
13466
|
+
/** 货物字典 */
|
|
12642
13467
|
|
|
12643
|
-
var
|
|
13468
|
+
var goodsMap = controller.useMemo(function (s) {
|
|
13469
|
+
return s.goodsListState.goodsMap;
|
|
13470
|
+
}, []);
|
|
13471
|
+
/** 正在 对照 的货物 */
|
|
12644
13472
|
|
|
12645
|
-
|
|
12646
|
-
return
|
|
12647
|
-
}
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
13473
|
+
var good = React.useMemo(function () {
|
|
13474
|
+
return addComparisonIndex ? goodsMap.get(addComparisonIndex) : undefined;
|
|
13475
|
+
}, [addComparisonIndex]);
|
|
13476
|
+
/** 关闭对照 */
|
|
13477
|
+
|
|
13478
|
+
var onClose = React.useCallback(controller.pipeline( /*#__PURE__*/function () {
|
|
13479
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
13480
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13481
|
+
while (1) {
|
|
13482
|
+
switch (_context.prev = _context.next) {
|
|
13483
|
+
case 0:
|
|
13484
|
+
s.goodsListState.addComparisonIndex = undefined;
|
|
13485
|
+
|
|
13486
|
+
case 1:
|
|
13487
|
+
case "end":
|
|
13488
|
+
return _context.stop();
|
|
13489
|
+
}
|
|
13490
|
+
}
|
|
13491
|
+
}, _callee);
|
|
13492
|
+
}));
|
|
13493
|
+
|
|
13494
|
+
return function (_x) {
|
|
13495
|
+
return _ref.apply(this, arguments);
|
|
13496
|
+
};
|
|
13497
|
+
}()), [controller]);
|
|
13498
|
+
/** 提交数据 */
|
|
13499
|
+
|
|
13500
|
+
var onSubmit = React.useCallback(function () {
|
|
13501
|
+
controller.run( /*#__PURE__*/function () {
|
|
13502
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
13503
|
+
var _getSN, _getSN2, _s$goodsListState, _s$goodsListState$pro;
|
|
13504
|
+
|
|
13505
|
+
var _yield$validateFields, err, values, shorthand;
|
|
13506
|
+
|
|
13507
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13508
|
+
while (1) {
|
|
13509
|
+
switch (_context2.prev = _context2.next) {
|
|
13510
|
+
case 0:
|
|
13511
|
+
if (good) {
|
|
13512
|
+
_context2.next = 2;
|
|
13513
|
+
break;
|
|
13514
|
+
}
|
|
13515
|
+
|
|
13516
|
+
return _context2.abrupt("return");
|
|
13517
|
+
|
|
13518
|
+
case 2:
|
|
13519
|
+
_context2.next = 4;
|
|
13520
|
+
return validateFields$1(form);
|
|
13521
|
+
|
|
13522
|
+
case 4:
|
|
13523
|
+
_yield$validateFields = _context2.sent;
|
|
13524
|
+
err = _yield$validateFields.err;
|
|
13525
|
+
values = _yield$validateFields.values;
|
|
13526
|
+
|
|
13527
|
+
if (!err) {
|
|
13528
|
+
_context2.next = 9;
|
|
13529
|
+
break;
|
|
13530
|
+
}
|
|
13531
|
+
|
|
13532
|
+
return _context2.abrupt("return");
|
|
13533
|
+
|
|
13534
|
+
case 9:
|
|
13535
|
+
shorthand = s.goodsListState.isMyShow ? (_getSN = getSN(good.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand : (_getSN2 = getSN(good.itemNameOther)) === null || _getSN2 === void 0 ? void 0 : _getSN2.shorthand;
|
|
13536
|
+
good.itemCode = values.itemCode;
|
|
13537
|
+
good.itemCodeOther = values.itemCodeOther;
|
|
13538
|
+
good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
|
|
13539
|
+
good.itemNameOther = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameOther) : values.itemNameOther;
|
|
13540
|
+
good.itemModelName = values.itemModelName;
|
|
13541
|
+
good.itemModelNameOther = values.itemModelNameOther;
|
|
13542
|
+
good.unit = values.unit;
|
|
13543
|
+
good.unitOther = values.unitOther;
|
|
13544
|
+
s.goodsListState.addComparisonIndex = undefined;
|
|
13545
|
+
s.goodsListState.goodsList = _toConsumableArray(s.goodsListState.goodsList);
|
|
13546
|
+
|
|
13547
|
+
if (!(((_s$goodsListState = s.goodsListState) === null || _s$goodsListState === void 0 ? void 0 : (_s$goodsListState$pro = _s$goodsListState.productComparison) === null || _s$goodsListState$pro === void 0 ? void 0 : _s$goodsListState$pro.onUpdateComparisonTable) && values.isUpdate)) {
|
|
13548
|
+
_context2.next = 24;
|
|
13549
|
+
break;
|
|
13550
|
+
}
|
|
13551
|
+
|
|
13552
|
+
debugger;
|
|
13553
|
+
_context2.next = 24;
|
|
13554
|
+
return s.goodsListState.productComparison.onUpdateComparisonTable(good, values);
|
|
13555
|
+
|
|
13556
|
+
case 24:
|
|
13557
|
+
case "end":
|
|
13558
|
+
return _context2.stop();
|
|
13559
|
+
}
|
|
13560
|
+
}
|
|
13561
|
+
}, _callee2);
|
|
13562
|
+
}));
|
|
13563
|
+
|
|
13564
|
+
return function (_x2) {
|
|
13565
|
+
return _ref2.apply(this, arguments);
|
|
13566
|
+
};
|
|
13567
|
+
}());
|
|
13568
|
+
}, [form, good]);
|
|
13569
|
+
React.useEffect(function () {
|
|
13570
|
+
form.resetFields();
|
|
13571
|
+
|
|
13572
|
+
if (good) {
|
|
13573
|
+
var _getSN3, _getSN4;
|
|
13574
|
+
|
|
13575
|
+
form.setFieldsValue(_objectSpread2(_objectSpread2({}, good), {}, {
|
|
13576
|
+
itemName: (_getSN3 = getSN(good.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.full,
|
|
13577
|
+
itemNameOther: (_getSN4 = getSN(good.itemNameOther)) === null || _getSN4 === void 0 ? void 0 : _getSN4.full
|
|
13578
|
+
}));
|
|
13579
|
+
}
|
|
13580
|
+
}, [good]);
|
|
13581
|
+
return React.createElement(Drawer, {
|
|
13582
|
+
width: 500,
|
|
13583
|
+
onClose: onClose,
|
|
13584
|
+
placement: "right",
|
|
13585
|
+
title: "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167",
|
|
13586
|
+
visible: !!addComparisonIndex,
|
|
13587
|
+
drawerStyle: {
|
|
13588
|
+
display: 'flex',
|
|
13589
|
+
flexDirection: 'column'
|
|
13590
|
+
},
|
|
13591
|
+
bodyStyle: {
|
|
13592
|
+
flex: 1,
|
|
13593
|
+
display: 'flex',
|
|
13594
|
+
flexDirection: 'column'
|
|
13595
|
+
}
|
|
13596
|
+
}, React.createElement(Form, {
|
|
13597
|
+
layout: "vertical",
|
|
13598
|
+
style: {
|
|
13599
|
+
flex: 1
|
|
13600
|
+
}
|
|
13601
|
+
}, React.createElement(Row, {
|
|
13602
|
+
gutter: [8, 8]
|
|
13603
|
+
}, React.createElement(Col, {
|
|
13604
|
+
span: 12
|
|
13605
|
+
}, getFieldDecorator('itemCode', {})(React.createElement(Form.Item, {
|
|
13606
|
+
label: "\u6211\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13607
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13608
|
+
span: 12
|
|
13609
|
+
}, getFieldDecorator('itemCodeOther', {})(React.createElement(Form.Item, {
|
|
13610
|
+
label: "\u5BF9\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13611
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13612
|
+
span: 12
|
|
13613
|
+
}, getFieldDecorator('itemName', {
|
|
13614
|
+
rules: [{
|
|
13615
|
+
required: true,
|
|
13616
|
+
message: "请输入我方商品名称"
|
|
13617
|
+
}]
|
|
13618
|
+
})(React.createElement(Form.Item, {
|
|
13619
|
+
label: "\u6211\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13620
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13621
|
+
span: 12
|
|
13622
|
+
}, getFieldDecorator('itemNameOther', {
|
|
13623
|
+
rules: [{
|
|
13624
|
+
required: true,
|
|
13625
|
+
message: "请输入对方商品名称"
|
|
13626
|
+
}]
|
|
13627
|
+
})(React.createElement(Form.Item, {
|
|
13628
|
+
label: "\u5BF9\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13629
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13630
|
+
span: 12
|
|
13631
|
+
}, React.createElement(Form.Item, {
|
|
13632
|
+
label: "\u6211\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13633
|
+
}, React.createElement(Input, null))), React.createElement(Col, {
|
|
13634
|
+
span: 12
|
|
13635
|
+
}, getFieldDecorator('itemModelNameOther', {
|
|
13636
|
+
rules: [{
|
|
13637
|
+
required: true,
|
|
13638
|
+
message: "请输入对方规格型号"
|
|
13639
|
+
}]
|
|
13640
|
+
})(React.createElement(Form.Item, {
|
|
13641
|
+
label: "\u5BF9\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13642
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13643
|
+
span: 12
|
|
13644
|
+
}, getFieldDecorator('unit', {
|
|
13645
|
+
rules: [{
|
|
13646
|
+
required: true,
|
|
13647
|
+
message: "请输入对方规格型号"
|
|
13648
|
+
}]
|
|
13649
|
+
})(React.createElement(Form.Item, {
|
|
13650
|
+
label: "\u6211\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13651
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13652
|
+
span: 12
|
|
13653
|
+
}, getFieldDecorator('unitOther', {
|
|
13654
|
+
rules: [{
|
|
13655
|
+
required: true,
|
|
13656
|
+
message: "请输入对方计量单位"
|
|
13657
|
+
}]
|
|
13658
|
+
})(React.createElement(Form.Item, {
|
|
13659
|
+
label: "\u5BF9\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13660
|
+
}, React.createElement(Input, null)))), React.createElement(Col, {
|
|
13661
|
+
span: 24
|
|
13662
|
+
}, getFieldDecorator('isUpdate', {})(React.createElement(Form.Item, null, React.createElement(Checkbox, null, "\u66F4\u65B0\u5230\u5546\u54C1\u5BF9\u7167\u8868\u4E2D")))))), React.createElement("div", {
|
|
13663
|
+
style: {
|
|
13664
|
+
display: 'flex',
|
|
13665
|
+
justifyContent: 'flex-end',
|
|
13666
|
+
gap: 10
|
|
13667
|
+
}
|
|
13668
|
+
}, React.createElement(Button, {
|
|
13669
|
+
type: "primary",
|
|
13670
|
+
onClick: onSubmit
|
|
13671
|
+
}, "\u63D0\u4EA4"), React.createElement(Button, {
|
|
13672
|
+
onClick: onClose
|
|
13673
|
+
}, "\u53D6\u6D88")));
|
|
13674
|
+
});
|
|
13675
|
+
|
|
13676
|
+
function validateFields$1(form) {
|
|
13677
|
+
return new Promise(function (resolve) {
|
|
13678
|
+
form.validateFields(function (err, values) {
|
|
13679
|
+
resolve({
|
|
13680
|
+
err: err,
|
|
13681
|
+
values: values
|
|
13682
|
+
});
|
|
13683
|
+
});
|
|
13684
|
+
});
|
|
13685
|
+
}
|
|
12651
13686
|
|
|
12652
13687
|
/** 发票组件的上下文 */
|
|
12653
13688
|
|
|
12654
|
-
var InvoiceContext =
|
|
13689
|
+
var InvoiceContext = React.createContext(undefined);
|
|
12655
13690
|
|
|
12656
|
-
var
|
|
12657
|
-
_inherits(
|
|
13691
|
+
var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
13692
|
+
_inherits(Invoice, _React$PureComponent);
|
|
12658
13693
|
|
|
12659
|
-
var _super = _createSuper(
|
|
13694
|
+
var _super = _createSuper(Invoice);
|
|
12660
13695
|
|
|
12661
|
-
function
|
|
12662
|
-
_classCallCheck(this,
|
|
13696
|
+
function Invoice() {
|
|
13697
|
+
_classCallCheck(this, Invoice);
|
|
12663
13698
|
|
|
12664
13699
|
return _super.apply(this, arguments);
|
|
12665
13700
|
}
|
|
12666
13701
|
|
|
12667
|
-
_createClass(
|
|
13702
|
+
_createClass(Invoice, [{
|
|
12668
13703
|
key: "render",
|
|
12669
13704
|
value:
|
|
12670
13705
|
/** 控制器 */
|
|
@@ -12683,22 +13718,22 @@ var default_1 = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
12683
13718
|
|
|
12684
13719
|
/** 获取控制器钩子 */
|
|
12685
13720
|
function render() {
|
|
12686
|
-
return
|
|
13721
|
+
return React.createElement(Main$3, _objectSpread2({}, this.props));
|
|
12687
13722
|
}
|
|
12688
13723
|
}]);
|
|
12689
13724
|
|
|
12690
|
-
return
|
|
13725
|
+
return Invoice;
|
|
12691
13726
|
}(React.PureComponent);
|
|
12692
13727
|
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
13728
|
+
Invoice.InvoiceController = InvoiceController;
|
|
13729
|
+
Invoice.InvoiceHeader = InvoiceHeader;
|
|
13730
|
+
Invoice.GoodsList = GoodsList;
|
|
13731
|
+
Invoice.Seller = Buyer;
|
|
13732
|
+
Invoice.Sign = Sign;
|
|
13733
|
+
Invoice.Buyer = Buyer$1;
|
|
13734
|
+
Invoice.idGenerator = idGenerator;
|
|
12700
13735
|
|
|
12701
|
-
|
|
13736
|
+
Invoice.useInvoiceController = function () {
|
|
12702
13737
|
return React.useContext(InvoiceContext);
|
|
12703
13738
|
};
|
|
12704
13739
|
|
|
@@ -12715,22 +13750,22 @@ var Main$3 = function Main(props) {
|
|
|
12715
13750
|
React.useEffect(function () {
|
|
12716
13751
|
setKey(key + 1);
|
|
12717
13752
|
}, [controller]);
|
|
12718
|
-
return
|
|
13753
|
+
return React.createElement(InvoiceContext.Provider, {
|
|
12719
13754
|
key: key,
|
|
12720
13755
|
value: controller
|
|
12721
|
-
},
|
|
13756
|
+
}, React.createElement("div", {
|
|
12722
13757
|
className: "kts-invoice-operate"
|
|
12723
|
-
}, props.invoiceHeader ||
|
|
13758
|
+
}, props.invoiceHeader || React.createElement(InvoiceHeader, null)
|
|
12724
13759
|
/** 发票头 */
|
|
12725
|
-
, props.buyer ||
|
|
13760
|
+
, props.buyer || React.createElement(Buyer$1, null)
|
|
12726
13761
|
/** 购买方 */
|
|
12727
|
-
, props.goodsList ||
|
|
13762
|
+
, props.goodsList || React.createElement(GoodsList, null)
|
|
12728
13763
|
/** 货物列表 */
|
|
12729
|
-
, props.seller ||
|
|
13764
|
+
, props.seller || React.createElement(Buyer, null)
|
|
12730
13765
|
/** 销售方 */
|
|
12731
|
-
, props.sign ||
|
|
13766
|
+
, props.sign || React.createElement(Sign, null)
|
|
12732
13767
|
/** 落款 */
|
|
12733
|
-
, props.footExpand),
|
|
13768
|
+
, props.footExpand), React.createElement(ImportBuyerDrawer, null), React.createElement(ImportGoodsDrawer, null), React.createElement(EndowCodeDrawer, null), React.createElement(AddComparisonDrawer, null));
|
|
12734
13769
|
};
|
|
12735
13770
|
|
|
12736
|
-
export {
|
|
13771
|
+
export { Invoice, InvoiceController };
|