kts-component-invoice-operate 1.2.22 → 2.0.0
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 +7 -0
- package/dist/Invoice/_test/buyerNameSearch/index.d.ts +1 -0
- package/dist/Invoice/_test/deduction/index.d.ts +1 -0
- package/dist/Invoice/_test/draft/index.d.ts +1 -0
- package/dist/Invoice/_test/easiest/index.d.ts +1 -0
- package/dist/Invoice/_test/endowCode/index.d.ts +1 -0
- package/dist/Invoice/_test/goodsMenuExpand/index.d.ts +1 -0
- package/dist/Invoice/_test/importBuyer/index.d.ts +1 -0
- package/dist/Invoice/_test/importGoods/index.d.ts +1 -0
- package/dist/Invoice/_test/invoiceType/index.d.ts +1 -0
- package/dist/Invoice/_test/isInvoiceNo/index.d.ts +1 -0
- package/dist/Invoice/_test/replaceHead/index.d.ts +1 -0
- package/dist/Invoice/_test/retrieveData/index.d.ts +1 -0
- package/dist/Invoice/_test/seller/index.d.ts +1 -0
- package/dist/Invoice/_test/setDataSource/index.d.ts +1 -0
- package/dist/Invoice/_test/unit/index.d.ts +1 -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/Buyer/ui/BuyerNameInput/index.d.ts +1 -0
- package/dist/Invoice/ui/Buyer/ui/ImportBuyerButton/index.d.ts +1 -0
- package/dist/Invoice/ui/EndowCodeDrawer/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.d.ts +2 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowEditButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddComparison/index.d.ts +5 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useEndowCode/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useColumns/ui/RowSaveButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/hook/useRowSelection/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/AddRowButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/CommodityComparisonButton/index.d.ts +3 -0
- package/dist/Invoice/ui/GoodsList/ui/DelRowButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/DescribeSwitch/index.d.ts +3 -0
- package/dist/Invoice/ui/GoodsList/ui/EndowCodeButton/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/Statistics/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/TableRow/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/TableVirtual/index.d.ts +1 -0
- package/dist/Invoice/ui/GoodsList/ui/TaxIncludedSwitch/index.d.ts +1 -0
- package/dist/Invoice/ui/ImportBuyerDrawer/index.d.ts +1 -0
- package/dist/Invoice/ui/ImportGoodsDrawer/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1044 -267
- package/dist/index.js +1043 -266
- package/docs/index.md +1 -1
- package/package.json +4 -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 +11 -1
- 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 +179 -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 +71 -29
- 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/index.less +34 -37
- package/src/Invoice/ui/GoodsList/index.tsx +8 -0
- package/src/Invoice/ui/GoodsList/ui/CommodityComparisonButton/index.tsx +74 -0
- package/src/Invoice/ui/GoodsList/ui/DescribeSwitch/index.tsx +37 -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.o.lock +14800 -0
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, Menu, Dropdown, AutoComplete, Spin, Checkbox, Descriptions, Empty, Divider, Popover, Tree, Modal } from 'kts-components-antd-x3';
|
|
5
|
+
import { message, Form, Input, Icon, Tag, Select, Row, Col, Table, Button, Switch, Tooltip, Typography, Drawer, Menu, 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,6 +987,7 @@ 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 = [];
|
|
@@ -992,7 +1000,9 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
992
1000
|
this.discountGoodIndex = [];
|
|
993
1001
|
this.endowCode = new EndowCode();
|
|
994
1002
|
this.importGoods = new ImportGoods();
|
|
1003
|
+
this.productComparison = new ProductComparison();
|
|
995
1004
|
this.isVisibleDrawer = false;
|
|
1005
|
+
this.addComparisonIndex = void 0;
|
|
996
1006
|
});
|
|
997
1007
|
|
|
998
1008
|
var BuyerState = /*#__PURE__*/_createClass(function BuyerState() {
|
|
@@ -1579,7 +1589,7 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1579
1589
|
/** 控制器 */
|
|
1580
1590
|
|
|
1581
1591
|
|
|
1582
|
-
var controller =
|
|
1592
|
+
var controller = Invoice.useInvoiceController();
|
|
1583
1593
|
var model = controller.useMemo(function (s) {
|
|
1584
1594
|
return s.model;
|
|
1585
1595
|
}, []);
|
|
@@ -1893,7 +1903,7 @@ styleInject(css_248z$3);
|
|
|
1893
1903
|
var nzhcn = require('nzh').cn;
|
|
1894
1904
|
|
|
1895
1905
|
var Statistics = (function () {
|
|
1896
|
-
var controller =
|
|
1906
|
+
var controller = Invoice.useInvoiceController();
|
|
1897
1907
|
/** 是否不含税) */
|
|
1898
1908
|
|
|
1899
1909
|
var isTaxIncluded = controller.useMemo(function (s) {
|
|
@@ -2001,7 +2011,7 @@ var Statistics = (function () {
|
|
|
2001
2011
|
});
|
|
2002
2012
|
|
|
2003
2013
|
var AddRowButton = (function () {
|
|
2004
|
-
var controller =
|
|
2014
|
+
var controller = Invoice.useInvoiceController();
|
|
2005
2015
|
var model = controller.useMemo(function (s) {
|
|
2006
2016
|
return s.model;
|
|
2007
2017
|
}, []);
|
|
@@ -2090,7 +2100,7 @@ var AddRowButton = (function () {
|
|
|
2090
2100
|
});
|
|
2091
2101
|
|
|
2092
2102
|
var TaxIncludedSwitch = (function () {
|
|
2093
|
-
var controller =
|
|
2103
|
+
var controller = Invoice.useInvoiceController();
|
|
2094
2104
|
/** 是否含税 */
|
|
2095
2105
|
|
|
2096
2106
|
var isTaxIncluded = controller.useMemo(function (e) {
|
|
@@ -2125,7 +2135,11 @@ var TaxIncludedSwitch = (function () {
|
|
|
2125
2135
|
};
|
|
2126
2136
|
}())();
|
|
2127
2137
|
}, []);
|
|
2128
|
-
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("label",
|
|
2138
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("label", {
|
|
2139
|
+
style: {
|
|
2140
|
+
marginRight: 2
|
|
2141
|
+
}
|
|
2142
|
+
}, "\u542B\u7A0E:"), /*#__PURE__*/React.createElement(Switch, {
|
|
2129
2143
|
disabled: isSwitchTax === false,
|
|
2130
2144
|
checked: isTaxIncluded,
|
|
2131
2145
|
checkedChildren: "\u5F00",
|
|
@@ -2135,8 +2149,59 @@ var TaxIncludedSwitch = (function () {
|
|
|
2135
2149
|
}));
|
|
2136
2150
|
});
|
|
2137
2151
|
|
|
2152
|
+
var DescribeSwitch = (function () {
|
|
2153
|
+
var controller = Invoice.useInvoiceController();
|
|
2154
|
+
var productComparison = controller.useMemo(function (s) {
|
|
2155
|
+
return s.goodsListState.productComparison;
|
|
2156
|
+
}, []);
|
|
2157
|
+
var isMyShow = controller.useMemo(function (s) {
|
|
2158
|
+
return s.goodsListState.isMyShow;
|
|
2159
|
+
}, []);
|
|
2160
|
+
var onChange = React.useCallback(function (e) {
|
|
2161
|
+
controller.run( /*#__PURE__*/function () {
|
|
2162
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2163
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2164
|
+
while (1) {
|
|
2165
|
+
switch (_context.prev = _context.next) {
|
|
2166
|
+
case 0:
|
|
2167
|
+
return _context.abrupt("return", s.goodsListState.isMyShow = !s.goodsListState.isMyShow);
|
|
2168
|
+
|
|
2169
|
+
case 1:
|
|
2170
|
+
case "end":
|
|
2171
|
+
return _context.stop();
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
}, _callee);
|
|
2175
|
+
}));
|
|
2176
|
+
|
|
2177
|
+
return function (_x) {
|
|
2178
|
+
return _ref.apply(this, arguments);
|
|
2179
|
+
};
|
|
2180
|
+
}());
|
|
2181
|
+
}, []);
|
|
2182
|
+
if (!productComparison.onComply) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2183
|
+
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("label", {
|
|
2184
|
+
style: {
|
|
2185
|
+
marginRight: 2
|
|
2186
|
+
}
|
|
2187
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
2188
|
+
title: "\u84DD\u8272\u4EE3\u8868\u6211\u65B9\u5546\u54C1\u63CF\u8FF0\uFF0C\u9ED1\u8272\u4EE3\u8868\u5BF9\u65B9\u7684\u5546\u54C1\u63CF\u8FF0\u3002"
|
|
2189
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
2190
|
+
style: {
|
|
2191
|
+
marginRight: 3
|
|
2192
|
+
},
|
|
2193
|
+
type: "info-circle"
|
|
2194
|
+
})), "\u4F7F\u7528\u54EA\u65B9\u5546\u54C1\u63CF\u8FF0:"), /*#__PURE__*/React.createElement(Switch, {
|
|
2195
|
+
checked: isMyShow,
|
|
2196
|
+
checkedChildren: "\u6211\u65B9",
|
|
2197
|
+
unCheckedChildren: "\u5BF9\u65B9",
|
|
2198
|
+
defaultChecked: true,
|
|
2199
|
+
onChange: onChange
|
|
2200
|
+
}));
|
|
2201
|
+
});
|
|
2202
|
+
|
|
2138
2203
|
function TableRow(props) {
|
|
2139
|
-
var controller =
|
|
2204
|
+
var controller = Invoice.useInvoiceController();
|
|
2140
2205
|
var goodsMap = controller.useMemo(function (s) {
|
|
2141
2206
|
return s.goodsListState.goodsMap;
|
|
2142
2207
|
}, []);
|
|
@@ -2198,7 +2263,7 @@ var _create = create(all, {
|
|
|
2198
2263
|
|
|
2199
2264
|
var AddDiscountRowButton = decorator(Form.create())(function (props) {
|
|
2200
2265
|
/** 控制器 */
|
|
2201
|
-
var controller =
|
|
2266
|
+
var controller = Invoice.useInvoiceController();
|
|
2202
2267
|
var model = controller.useMemo(function (s) {
|
|
2203
2268
|
return s.model;
|
|
2204
2269
|
}, []);
|
|
@@ -2360,7 +2425,7 @@ var AddDiscountRowButton = decorator(Form.create())(function (props) {
|
|
|
2360
2425
|
var DrawerBody = decorator(Form.create())(function (props) {
|
|
2361
2426
|
var form = props.form;
|
|
2362
2427
|
var getFieldDecorator = form.getFieldDecorator;
|
|
2363
|
-
var controller =
|
|
2428
|
+
var controller = Invoice.useInvoiceController();
|
|
2364
2429
|
/** 选中的货物索引列表 */
|
|
2365
2430
|
|
|
2366
2431
|
var discountGoodIndex = controller.useMemo(function (s) {
|
|
@@ -2580,7 +2645,7 @@ var coolingFn = (function () {
|
|
|
2580
2645
|
});
|
|
2581
2646
|
|
|
2582
2647
|
var EndowCodeButton = (function () {
|
|
2583
|
-
var controller =
|
|
2648
|
+
var controller = Invoice.useInvoiceController();
|
|
2584
2649
|
/** 是否禁用 */
|
|
2585
2650
|
|
|
2586
2651
|
var disabled = controller.useMemo(function (s) {
|
|
@@ -2665,7 +2730,7 @@ var EndowCodeButton = (function () {
|
|
|
2665
2730
|
});
|
|
2666
2731
|
|
|
2667
2732
|
var DelRowButton = (function () {
|
|
2668
|
-
var controller =
|
|
2733
|
+
var controller = Invoice.useInvoiceController();
|
|
2669
2734
|
var model = controller.useMemo(function (s) {
|
|
2670
2735
|
return s.model;
|
|
2671
2736
|
}, []);
|
|
@@ -2723,6 +2788,162 @@ var DelRowButton = (function () {
|
|
|
2723
2788
|
}, "\u5220\u9664\u884C");
|
|
2724
2789
|
});
|
|
2725
2790
|
|
|
2791
|
+
/** 拆分全称加简称 */
|
|
2792
|
+
var getSN = function getSN(value) {
|
|
2793
|
+
debugger;
|
|
2794
|
+
if (!value) return undefined;
|
|
2795
|
+
var arr = value.match(/\*[^*]+\*/);
|
|
2796
|
+
|
|
2797
|
+
if (arr && arr[0]) {
|
|
2798
|
+
return {
|
|
2799
|
+
shorthand: arr[0].split('*')[1],
|
|
2800
|
+
full: value.replace(arr[0], '')
|
|
2801
|
+
};
|
|
2802
|
+
} else {
|
|
2803
|
+
return {
|
|
2804
|
+
shorthand: undefined,
|
|
2805
|
+
full: value
|
|
2806
|
+
};
|
|
2807
|
+
}
|
|
2808
|
+
};
|
|
2809
|
+
/** 组合全称加简称 */
|
|
2810
|
+
|
|
2811
|
+
var getItemName = function getItemName(value) {
|
|
2812
|
+
if (value.shorthand) {
|
|
2813
|
+
return "*".concat(value.shorthand, "*").concat(value.full);
|
|
2814
|
+
} else {
|
|
2815
|
+
return value.full;
|
|
2816
|
+
}
|
|
2817
|
+
};
|
|
2818
|
+
/** 设置简称 */
|
|
2819
|
+
|
|
2820
|
+
var setShorthand = function setShorthand(name, shorthand) {
|
|
2821
|
+
if (!name) return undefined;
|
|
2822
|
+
var sn = getSN(name);
|
|
2823
|
+
if (!sn) return undefined;
|
|
2824
|
+
sn.shorthand = shorthand || '';
|
|
2825
|
+
return getItemName(sn);
|
|
2826
|
+
};
|
|
2827
|
+
|
|
2828
|
+
var CommodityComparisonButton = (function () {
|
|
2829
|
+
var controller = Invoice.useInvoiceController();
|
|
2830
|
+
|
|
2831
|
+
var _controller$useMemo = controller.useMemo(function (s) {
|
|
2832
|
+
return s.goodsListState.productComparison;
|
|
2833
|
+
}, []),
|
|
2834
|
+
onComply = _controller$useMemo.onComply;
|
|
2835
|
+
/** 是否禁用 */
|
|
2836
|
+
|
|
2837
|
+
|
|
2838
|
+
var disabled = controller.useMemo(function (s) {
|
|
2839
|
+
if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
|
|
2840
|
+
}, []);
|
|
2841
|
+
/** 点击了 */
|
|
2842
|
+
|
|
2843
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
2844
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
2845
|
+
while (1) {
|
|
2846
|
+
switch (_context2.prev = _context2.next) {
|
|
2847
|
+
case 0:
|
|
2848
|
+
_context2.next = 2;
|
|
2849
|
+
return controller.saveEditGood();
|
|
2850
|
+
|
|
2851
|
+
case 2:
|
|
2852
|
+
_context2.next = 4;
|
|
2853
|
+
return controller.wait();
|
|
2854
|
+
|
|
2855
|
+
case 4:
|
|
2856
|
+
_context2.next = 6;
|
|
2857
|
+
return controller.run( /*#__PURE__*/function () {
|
|
2858
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
2859
|
+
var _s$goodsListState, _s$goodsListState$pro;
|
|
2860
|
+
|
|
2861
|
+
var goods, newGoods;
|
|
2862
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2863
|
+
while (1) {
|
|
2864
|
+
switch (_context.prev = _context.next) {
|
|
2865
|
+
case 0:
|
|
2866
|
+
if (!(s.goodsListState.editGood && s.goodsListState.selectedGoodIndex.indexOf(s.goodsListState.editGood.$index) >= 0)) {
|
|
2867
|
+
_context.next = 3;
|
|
2868
|
+
break;
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
coolingFn('不能给正在编辑的货物执行商品对照', 3000, function () {
|
|
2872
|
+
message.error('不能给正在编辑的货物执行商品对照');
|
|
2873
|
+
});
|
|
2874
|
+
return _context.abrupt("return");
|
|
2875
|
+
|
|
2876
|
+
case 3:
|
|
2877
|
+
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) {
|
|
2878
|
+
_context.next = 5;
|
|
2879
|
+
break;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
return _context.abrupt("return");
|
|
2883
|
+
|
|
2884
|
+
case 5:
|
|
2885
|
+
goods = s.goodsListState.selectedGoodIndex.map(function (e) {
|
|
2886
|
+
var _getSN, _getSN2;
|
|
2887
|
+
|
|
2888
|
+
var t = s.goodsListState.goodsMap.get(e);
|
|
2889
|
+
if (!t) return undefined;
|
|
2890
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
2891
|
+
itemName: (_getSN = getSN(t.itemName)) === null || _getSN === void 0 ? void 0 : _getSN.full,
|
|
2892
|
+
itemNameOther: (_getSN2 = getSN(t.itemNameOther)) === null || _getSN2 === void 0 ? void 0 : _getSN2.full
|
|
2893
|
+
});
|
|
2894
|
+
}).filter(function (e) {
|
|
2895
|
+
return !!e;
|
|
2896
|
+
}); // 比对后的商品
|
|
2897
|
+
|
|
2898
|
+
_context.next = 8;
|
|
2899
|
+
return s.goodsListState.productComparison.onComply(goods);
|
|
2900
|
+
|
|
2901
|
+
case 8:
|
|
2902
|
+
newGoods = _context.sent;
|
|
2903
|
+
newGoods.filter(function (e) {
|
|
2904
|
+
var _getSN3, _getSN4;
|
|
2905
|
+
|
|
2906
|
+
var vt = s.goodsListState.goodsMap.get(e.$index);
|
|
2907
|
+
if (!vt) return undefined;
|
|
2908
|
+
vt.itemName = e.itemName ? setShorthand(e.itemName, (_getSN3 = getSN(vt.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.shorthand) : vt.itemName;
|
|
2909
|
+
vt.itemNameOther = e.itemNameOther ? setShorthand(e.itemNameOther, (_getSN4 = getSN(vt.itemNameOther)) === null || _getSN4 === void 0 ? void 0 : _getSN4.shorthand) : vt.itemNameOther;
|
|
2910
|
+
vt.unit = e.unit ? e.unit : vt.unit;
|
|
2911
|
+
vt.unitOther = e.unitOther ? e.unitOther : vt.unitOther;
|
|
2912
|
+
vt.itemModelName = e.itemModelName ? e.itemModelName : vt.itemModelName;
|
|
2913
|
+
vt.itemModelNameOther = e.itemModelNameOther ? e.itemModelNameOther : vt.itemModelNameOther;
|
|
2914
|
+
vt.itemCode = e.itemCode ? e.itemCode : vt.itemCode;
|
|
2915
|
+
vt.itemCodeOther = e.itemCodeOther ? e.itemCodeOther : vt.itemCodeOther;
|
|
2916
|
+
});
|
|
2917
|
+
|
|
2918
|
+
case 10:
|
|
2919
|
+
case "end":
|
|
2920
|
+
return _context.stop();
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
}, _callee);
|
|
2924
|
+
}));
|
|
2925
|
+
|
|
2926
|
+
return function (_x) {
|
|
2927
|
+
return _ref2.apply(this, arguments);
|
|
2928
|
+
};
|
|
2929
|
+
}());
|
|
2930
|
+
|
|
2931
|
+
case 6:
|
|
2932
|
+
case "end":
|
|
2933
|
+
return _context2.stop();
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
}, _callee2);
|
|
2937
|
+
})), []); // 没用 执行商品对照 的方法 不显示按钮
|
|
2938
|
+
|
|
2939
|
+
if (!onComply) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
2940
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
2941
|
+
icon: 'swap',
|
|
2942
|
+
disabled: disabled,
|
|
2943
|
+
onClick: onClick
|
|
2944
|
+
}, "\u6267\u884C\u5546\u54C1\u5BF9\u7167");
|
|
2945
|
+
});
|
|
2946
|
+
|
|
2726
2947
|
var _defs$1, _path$1;
|
|
2727
2948
|
|
|
2728
2949
|
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); }
|
|
@@ -2739,7 +2960,7 @@ function SvgSpot(props) {
|
|
|
2739
2960
|
|
|
2740
2961
|
var Text$1 = Typography.Text;
|
|
2741
2962
|
var useDelItem = (function (goods) {
|
|
2742
|
-
var controller =
|
|
2963
|
+
var controller = Invoice.useInvoiceController();
|
|
2743
2964
|
var onClick = React.useCallback(function () {
|
|
2744
2965
|
controller.delGood(goods.$index);
|
|
2745
2966
|
}, [controller, goods.$index]);
|
|
@@ -2761,7 +2982,7 @@ var useDelItem = (function (goods) {
|
|
|
2761
2982
|
|
|
2762
2983
|
var Text$2 = Typography.Text;
|
|
2763
2984
|
var useAddDiscount = (function (goods) {
|
|
2764
|
-
var controller =
|
|
2985
|
+
var controller = Invoice.useInvoiceController();
|
|
2765
2986
|
/** 点击了 添加折扣行 按钮 */
|
|
2766
2987
|
|
|
2767
2988
|
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
@@ -9359,44 +9580,6 @@ var updateUnitPriceTax = function updateUnitPriceTax(controller, form, record) {
|
|
|
9359
9580
|
};
|
|
9360
9581
|
}());
|
|
9361
9582
|
};
|
|
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
9583
|
/** 单调赋码 */
|
|
9401
9584
|
|
|
9402
9585
|
var endowCode = /*#__PURE__*/function () {
|
|
@@ -9492,10 +9675,101 @@ var endowCode = /*#__PURE__*/function () {
|
|
|
9492
9675
|
return _ref10.apply(this, arguments);
|
|
9493
9676
|
};
|
|
9494
9677
|
}();
|
|
9678
|
+
/** 修改了 货物名称 */
|
|
9679
|
+
|
|
9680
|
+
var onChangeItemName = /*#__PURE__*/function () {
|
|
9681
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(controller, form, record) {
|
|
9682
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
9683
|
+
while (1) {
|
|
9684
|
+
switch (_context13.prev = _context13.next) {
|
|
9685
|
+
case 0:
|
|
9686
|
+
controller.run( /*#__PURE__*/function () {
|
|
9687
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
|
|
9688
|
+
var _getSN$shorthand, _getSN;
|
|
9689
|
+
|
|
9690
|
+
var value, shorthand;
|
|
9691
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
9692
|
+
while (1) {
|
|
9693
|
+
switch (_context12.prev = _context12.next) {
|
|
9694
|
+
case 0:
|
|
9695
|
+
value = form.getFieldsValue().itemName;
|
|
9696
|
+
shorthand = (_getSN$shorthand = (_getSN = getSN(value)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand) !== null && _getSN$shorthand !== void 0 ? _getSN$shorthand : '';
|
|
9697
|
+
|
|
9698
|
+
if (!s.goodsListState.isMyShow) {
|
|
9699
|
+
_context12.next = 11;
|
|
9700
|
+
break;
|
|
9701
|
+
}
|
|
9702
|
+
|
|
9703
|
+
_context12.next = 5;
|
|
9704
|
+
return controller.setEditGood({
|
|
9705
|
+
itemName: value
|
|
9706
|
+
});
|
|
9707
|
+
|
|
9708
|
+
case 5:
|
|
9709
|
+
_context12.t0 = record.itemNameOther;
|
|
9710
|
+
|
|
9711
|
+
if (!_context12.t0) {
|
|
9712
|
+
_context12.next = 9;
|
|
9713
|
+
break;
|
|
9714
|
+
}
|
|
9715
|
+
|
|
9716
|
+
_context12.next = 9;
|
|
9717
|
+
return controller.setEditGood({
|
|
9718
|
+
itemNameOther: setShorthand(record.itemNameOther, shorthand)
|
|
9719
|
+
});
|
|
9720
|
+
|
|
9721
|
+
case 9:
|
|
9722
|
+
_context12.next = 17;
|
|
9723
|
+
break;
|
|
9724
|
+
|
|
9725
|
+
case 11:
|
|
9726
|
+
_context12.next = 13;
|
|
9727
|
+
return controller.setEditGood({
|
|
9728
|
+
itemNameOther: value
|
|
9729
|
+
});
|
|
9730
|
+
|
|
9731
|
+
case 13:
|
|
9732
|
+
_context12.t1 = record.itemName;
|
|
9733
|
+
|
|
9734
|
+
if (!_context12.t1) {
|
|
9735
|
+
_context12.next = 17;
|
|
9736
|
+
break;
|
|
9737
|
+
}
|
|
9738
|
+
|
|
9739
|
+
_context12.next = 17;
|
|
9740
|
+
return controller.setEditGood({
|
|
9741
|
+
itemName: setShorthand(record.itemName, shorthand)
|
|
9742
|
+
});
|
|
9743
|
+
|
|
9744
|
+
case 17:
|
|
9745
|
+
case "end":
|
|
9746
|
+
return _context12.stop();
|
|
9747
|
+
}
|
|
9748
|
+
}
|
|
9749
|
+
}, _callee12);
|
|
9750
|
+
}));
|
|
9751
|
+
|
|
9752
|
+
return function (_x25) {
|
|
9753
|
+
return _ref13.apply(this, arguments);
|
|
9754
|
+
};
|
|
9755
|
+
}());
|
|
9756
|
+
|
|
9757
|
+
case 1:
|
|
9758
|
+
case "end":
|
|
9759
|
+
return _context13.stop();
|
|
9760
|
+
}
|
|
9761
|
+
}
|
|
9762
|
+
}, _callee13);
|
|
9763
|
+
}));
|
|
9764
|
+
|
|
9765
|
+
return function onChangeItemName(_x22, _x23, _x24) {
|
|
9766
|
+
return _ref12.apply(this, arguments);
|
|
9767
|
+
};
|
|
9768
|
+
}();
|
|
9495
9769
|
|
|
9496
9770
|
var Text$3 = Typography.Text;
|
|
9497
9771
|
var useEndowCode = (function (goods) {
|
|
9498
|
-
var controller =
|
|
9772
|
+
var controller = Invoice.useInvoiceController();
|
|
9499
9773
|
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9500
9774
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9501
9775
|
while (1) {
|
|
@@ -9520,45 +9794,139 @@ var useEndowCode = (function (goods) {
|
|
|
9520
9794
|
}, [goods.lineAttribute, onClick]);
|
|
9521
9795
|
});
|
|
9522
9796
|
|
|
9523
|
-
var
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
var
|
|
9527
|
-
|
|
9528
|
-
var model = controller.useMemo(function (s) {
|
|
9529
|
-
return s.model;
|
|
9530
|
-
}, []);
|
|
9531
|
-
/** 是否能添加折扣行 */
|
|
9532
|
-
|
|
9533
|
-
var isAddDiscount = controller.useMemo(function (s) {
|
|
9534
|
-
return s.goodsListState.isAddDiscount;
|
|
9535
|
-
}, []);
|
|
9536
|
-
var goodsMenuExpand = controller.useMemo(function (s) {
|
|
9537
|
-
return s.goodsListState.goodsMenuExpand;
|
|
9797
|
+
var Text$4 = Typography.Text;
|
|
9798
|
+
var useAddComparison = (function (goods) {
|
|
9799
|
+
var controller = Invoice.useInvoiceController();
|
|
9800
|
+
var productComparison = controller.useMemo(function (s) {
|
|
9801
|
+
return s.goodsListState.productComparison;
|
|
9538
9802
|
}, []);
|
|
9539
|
-
var
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9803
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
9804
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9805
|
+
while (1) {
|
|
9806
|
+
switch (_context2.prev = _context2.next) {
|
|
9807
|
+
case 0:
|
|
9808
|
+
_context2.next = 2;
|
|
9809
|
+
return controller.saveEditGood();
|
|
9545
9810
|
|
|
9546
|
-
|
|
9811
|
+
case 2:
|
|
9812
|
+
_context2.next = 4;
|
|
9813
|
+
return controller.wait();
|
|
9547
9814
|
|
|
9548
|
-
|
|
9815
|
+
case 4:
|
|
9816
|
+
_context2.next = 6;
|
|
9817
|
+
return controller.run( /*#__PURE__*/function () {
|
|
9818
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
9819
|
+
var err, key;
|
|
9820
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9821
|
+
while (1) {
|
|
9822
|
+
switch (_context.prev = _context.next) {
|
|
9823
|
+
case 0:
|
|
9824
|
+
if (!s.goodsListState.form) {
|
|
9825
|
+
_context.next = 11;
|
|
9826
|
+
break;
|
|
9827
|
+
}
|
|
9549
9828
|
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
key: "divider-1"
|
|
9553
|
-
}));
|
|
9829
|
+
err = s.goodsListState.form.getFieldsError();
|
|
9830
|
+
_context.t0 = _regeneratorRuntime().keys(err);
|
|
9554
9831
|
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9832
|
+
case 3:
|
|
9833
|
+
if ((_context.t1 = _context.t0()).done) {
|
|
9834
|
+
_context.next = 11;
|
|
9835
|
+
break;
|
|
9836
|
+
}
|
|
9559
9837
|
|
|
9560
|
-
|
|
9561
|
-
|
|
9838
|
+
key = _context.t1.value;
|
|
9839
|
+
|
|
9840
|
+
if (err[key]) {
|
|
9841
|
+
_context.next = 7;
|
|
9842
|
+
break;
|
|
9843
|
+
}
|
|
9844
|
+
|
|
9845
|
+
return _context.abrupt("continue", 3);
|
|
9846
|
+
|
|
9847
|
+
case 7:
|
|
9848
|
+
message.error(err[key][0]);
|
|
9849
|
+
return _context.abrupt("return");
|
|
9850
|
+
|
|
9851
|
+
case 11:
|
|
9852
|
+
s.goodsListState.addComparisonIndex = goods.$index;
|
|
9853
|
+
|
|
9854
|
+
case 12:
|
|
9855
|
+
case "end":
|
|
9856
|
+
return _context.stop();
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9859
|
+
}, _callee);
|
|
9860
|
+
}));
|
|
9861
|
+
|
|
9862
|
+
return function (_x) {
|
|
9863
|
+
return _ref2.apply(this, arguments);
|
|
9864
|
+
};
|
|
9865
|
+
}());
|
|
9866
|
+
|
|
9867
|
+
case 6:
|
|
9868
|
+
case "end":
|
|
9869
|
+
return _context2.stop();
|
|
9870
|
+
}
|
|
9871
|
+
}
|
|
9872
|
+
}, _callee2);
|
|
9873
|
+
})), [controller, goods.$index]);
|
|
9874
|
+
return React.useMemo(function () {
|
|
9875
|
+
if (productComparison.onComply) {
|
|
9876
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
9877
|
+
key: "delItem",
|
|
9878
|
+
onClick: onClick
|
|
9879
|
+
}, /*#__PURE__*/React.createElement(Text$4, {
|
|
9880
|
+
strong: true
|
|
9881
|
+
}, "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167"));
|
|
9882
|
+
} else {
|
|
9883
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
9884
|
+
}
|
|
9885
|
+
}, [onClick, productComparison]);
|
|
9886
|
+
});
|
|
9887
|
+
|
|
9888
|
+
var css_248z$5 = ".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";
|
|
9889
|
+
styleInject(css_248z$5);
|
|
9890
|
+
|
|
9891
|
+
var RowMenu = (function (props) {
|
|
9892
|
+
var controller = Invoice.useInvoiceController();
|
|
9893
|
+
var model = controller.useMemo(function (s) {
|
|
9894
|
+
return s.model;
|
|
9895
|
+
}, []);
|
|
9896
|
+
/** 是否能添加折扣行 */
|
|
9897
|
+
|
|
9898
|
+
var isAddDiscount = controller.useMemo(function (s) {
|
|
9899
|
+
return s.goodsListState.isAddDiscount;
|
|
9900
|
+
}, []);
|
|
9901
|
+
var goodsMenuExpand = controller.useMemo(function (s) {
|
|
9902
|
+
return s.goodsListState.goodsMenuExpand;
|
|
9903
|
+
}, []);
|
|
9904
|
+
var delItem = useDelItem(props.goods);
|
|
9905
|
+
var addDiscount = useAddDiscount(props.goods);
|
|
9906
|
+
var endowCode = useEndowCode(props.goods);
|
|
9907
|
+
var addComparison = useAddComparison(props.goods);
|
|
9908
|
+
var itemList = React.useMemo(function () {
|
|
9909
|
+
var arr = [];
|
|
9910
|
+
model !== 'prefab' && isAddDiscount !== false && addDiscount && arr.push(addDiscount); // 添加折扣行
|
|
9911
|
+
|
|
9912
|
+
arr.push(addComparison); // 添加商品对照
|
|
9913
|
+
|
|
9914
|
+
endowCode && arr.push(endowCode); // 赋码
|
|
9915
|
+
|
|
9916
|
+
model !== 'prefab' && delItem && arr.push(delItem); // 删除
|
|
9917
|
+
|
|
9918
|
+
if (!goodsMenuExpand || goodsMenuExpand.length === 0) return arr;
|
|
9919
|
+
arr.unshift( /*#__PURE__*/React.createElement(Menu.Divider, {
|
|
9920
|
+
key: "divider-1"
|
|
9921
|
+
}));
|
|
9922
|
+
|
|
9923
|
+
for (var i = goodsMenuExpand.length - 1; i >= 0; i--) {
|
|
9924
|
+
var fn = goodsMenuExpand[i];
|
|
9925
|
+
arr.unshift(fn(props.goods.$index, controller));
|
|
9926
|
+
}
|
|
9927
|
+
|
|
9928
|
+
return arr;
|
|
9929
|
+
}, [controller, endowCode, addDiscount, delItem, goodsMenuExpand, props.goods, model, isAddDiscount]);
|
|
9562
9930
|
|
|
9563
9931
|
if (itemList.length === 0) {
|
|
9564
9932
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -9575,16 +9943,21 @@ var RowMenu = (function (props) {
|
|
|
9575
9943
|
})));
|
|
9576
9944
|
});
|
|
9577
9945
|
|
|
9578
|
-
var Text$
|
|
9946
|
+
var Text$5 = Typography.Text;
|
|
9579
9947
|
var useColumns = (function (form) {
|
|
9580
9948
|
var getFieldDecorator = form.getFieldDecorator,
|
|
9581
9949
|
getFieldValue = form.getFieldValue;
|
|
9582
|
-
var controller =
|
|
9950
|
+
var controller = Invoice.useInvoiceController();
|
|
9583
9951
|
/** 是否含税 */
|
|
9584
9952
|
|
|
9585
9953
|
var isTaxIncluded = controller.useMemo(function (e) {
|
|
9586
9954
|
return e.goodsListState.isTaxIncluded;
|
|
9587
9955
|
}, []);
|
|
9956
|
+
/** 是否显示我方 */
|
|
9957
|
+
|
|
9958
|
+
var isMyShow = controller.useMemo(function (e) {
|
|
9959
|
+
return e.goodsListState.isMyShow;
|
|
9960
|
+
}, []);
|
|
9588
9961
|
/** 正在编辑的货物 */
|
|
9589
9962
|
|
|
9590
9963
|
var editGood = controller.useMemo(function (e) {
|
|
@@ -9616,12 +9989,11 @@ var useColumns = (function (form) {
|
|
|
9616
9989
|
|
|
9617
9990
|
var columns = React.useMemo(function () {
|
|
9618
9991
|
return [{
|
|
9619
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$
|
|
9992
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$5, {
|
|
9620
9993
|
type: "danger"
|
|
9621
9994
|
}, "*"), "\u8D27\u7269\u540D\u79F0"),
|
|
9622
|
-
dataIndex: 'itemName',
|
|
9623
9995
|
key: 'itemName',
|
|
9624
|
-
render: function render(
|
|
9996
|
+
render: function render(_, record) {
|
|
9625
9997
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9626
9998
|
var _editGood$itemName;
|
|
9627
9999
|
|
|
@@ -9630,17 +10002,54 @@ var useColumns = (function (form) {
|
|
|
9630
10002
|
display: 'flex'
|
|
9631
10003
|
}
|
|
9632
10004
|
}, getFieldDecorator('itemName', {
|
|
9633
|
-
initialValue:
|
|
10005
|
+
initialValue: isMyShow ? record.itemName : record.itemNameOther,
|
|
9634
10006
|
rules: [{
|
|
9635
|
-
|
|
9636
|
-
|
|
10007
|
+
validator: function () {
|
|
10008
|
+
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, __, callback) {
|
|
10009
|
+
var value;
|
|
10010
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10011
|
+
while (1) {
|
|
10012
|
+
switch (_context.prev = _context.next) {
|
|
10013
|
+
case 0:
|
|
10014
|
+
_context.next = 2;
|
|
10015
|
+
return controller.wait();
|
|
10016
|
+
|
|
10017
|
+
case 2:
|
|
10018
|
+
value = controller.state.goodsListState.editGood;
|
|
10019
|
+
|
|
10020
|
+
if (!(!(value === null || value === void 0 ? void 0 : value.itemName) && !(value === null || value === void 0 ? void 0 : value.itemNameOther))) {
|
|
10021
|
+
_context.next = 7;
|
|
10022
|
+
break;
|
|
10023
|
+
}
|
|
10024
|
+
|
|
10025
|
+
callback('货物名称不能为空');
|
|
10026
|
+
_context.next = 8;
|
|
10027
|
+
break;
|
|
10028
|
+
|
|
10029
|
+
case 7:
|
|
10030
|
+
return _context.abrupt("return");
|
|
10031
|
+
|
|
10032
|
+
case 8:
|
|
10033
|
+
case "end":
|
|
10034
|
+
return _context.stop();
|
|
10035
|
+
}
|
|
10036
|
+
}
|
|
10037
|
+
}, _callee);
|
|
10038
|
+
}));
|
|
10039
|
+
|
|
10040
|
+
function validator(_x, _x2, _x3) {
|
|
10041
|
+
return _validator.apply(this, arguments);
|
|
10042
|
+
}
|
|
10043
|
+
|
|
10044
|
+
return validator;
|
|
10045
|
+
}()
|
|
9637
10046
|
}]
|
|
9638
10047
|
})( /*#__PURE__*/React.createElement(MyInput, {
|
|
9639
10048
|
style: {
|
|
9640
10049
|
flex: 1
|
|
9641
10050
|
},
|
|
9642
10051
|
onChange: function onChange() {
|
|
9643
|
-
|
|
10052
|
+
onChangeItemName(controller, form, record);
|
|
9644
10053
|
}
|
|
9645
10054
|
})), /*#__PURE__*/React.createElement("div", {
|
|
9646
10055
|
className: "kts-invoice-operate-goods-list-able-list-itemName-import"
|
|
@@ -9651,67 +10060,90 @@ var useColumns = (function (form) {
|
|
|
9651
10060
|
type: "link",
|
|
9652
10061
|
icon: "file-add"
|
|
9653
10062
|
}), controller.getGoodsList && /*#__PURE__*/React.createElement(Button, {
|
|
9654
|
-
onClick: function
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
10063
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
10064
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
10065
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10066
|
+
while (1) {
|
|
10067
|
+
switch (_context2.prev = _context2.next) {
|
|
10068
|
+
case 0:
|
|
10069
|
+
s.goodsListState.importGoods.isVisibleDrawer = true;
|
|
9662
10070
|
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
}
|
|
10071
|
+
case 1:
|
|
10072
|
+
case "end":
|
|
10073
|
+
return _context2.stop();
|
|
9667
10074
|
}
|
|
9668
|
-
}
|
|
9669
|
-
})
|
|
10075
|
+
}
|
|
10076
|
+
}, _callee2);
|
|
10077
|
+
}));
|
|
9670
10078
|
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
},
|
|
10079
|
+
return function (_x4) {
|
|
10080
|
+
return _ref.apply(this, arguments);
|
|
10081
|
+
};
|
|
10082
|
+
}()),
|
|
9676
10083
|
type: "link",
|
|
9677
10084
|
icon: "plus-circle"
|
|
9678
10085
|
}))));
|
|
9679
10086
|
} else {
|
|
9680
|
-
return /*#__PURE__*/React.createElement(
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
}
|
|
10087
|
+
return /*#__PURE__*/React.createElement(MyItemNameDiv, {
|
|
10088
|
+
valueT: record.itemName,
|
|
10089
|
+
valueF: record.itemNameOther,
|
|
10090
|
+
isMyShow: isMyShow
|
|
10091
|
+
});
|
|
9685
10092
|
}
|
|
9686
10093
|
}
|
|
9687
10094
|
}, {
|
|
9688
10095
|
title: '货物规格型号',
|
|
9689
|
-
dataIndex: 'itemModelName',
|
|
9690
10096
|
key: 'itemModelName',
|
|
9691
10097
|
width: 119,
|
|
9692
|
-
render: function render(
|
|
10098
|
+
render: function render(_, record) {
|
|
9693
10099
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9694
10100
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('itemModelName', {
|
|
9695
|
-
initialValue: editGood.itemModelName
|
|
10101
|
+
initialValue: isMyShow ? editGood.itemModelName : editGood.itemModelNameOther
|
|
9696
10102
|
})( /*#__PURE__*/React.createElement(MyInput, {
|
|
9697
|
-
onChange: function
|
|
9698
|
-
|
|
9699
|
-
|
|
10103
|
+
onChange: function () {
|
|
10104
|
+
var _onChange = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
10105
|
+
var key, value;
|
|
10106
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
10107
|
+
while (1) {
|
|
10108
|
+
switch (_context3.prev = _context3.next) {
|
|
10109
|
+
case 0:
|
|
10110
|
+
_context3.next = 2;
|
|
10111
|
+
return controller.wait();
|
|
10112
|
+
|
|
10113
|
+
case 2:
|
|
10114
|
+
key = isMyShow ? 'itemModelName' : 'itemModelNameOther';
|
|
10115
|
+
value = {};
|
|
10116
|
+
value[key] = form.getFieldsValue().itemModelName;
|
|
10117
|
+
controller.setEditGood(value);
|
|
10118
|
+
|
|
10119
|
+
case 6:
|
|
10120
|
+
case "end":
|
|
10121
|
+
return _context3.stop();
|
|
10122
|
+
}
|
|
10123
|
+
}
|
|
10124
|
+
}, _callee3);
|
|
10125
|
+
}));
|
|
10126
|
+
|
|
10127
|
+
function onChange() {
|
|
10128
|
+
return _onChange.apply(this, arguments);
|
|
10129
|
+
}
|
|
10130
|
+
|
|
10131
|
+
return onChange;
|
|
10132
|
+
}()
|
|
9700
10133
|
})));
|
|
9701
10134
|
} else {
|
|
9702
|
-
return /*#__PURE__*/React.createElement(
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
}
|
|
10135
|
+
return /*#__PURE__*/React.createElement(MyItemNameDiv, {
|
|
10136
|
+
valueT: record.itemModelName,
|
|
10137
|
+
valueF: record.itemModelNameOther,
|
|
10138
|
+
isMyShow: isMyShow
|
|
10139
|
+
});
|
|
9707
10140
|
}
|
|
9708
10141
|
}
|
|
9709
10142
|
}, {
|
|
9710
10143
|
title: '单位',
|
|
9711
|
-
dataIndex: 'unit',
|
|
9712
10144
|
key: 'unit',
|
|
9713
10145
|
width: 70,
|
|
9714
|
-
render: function render(
|
|
10146
|
+
render: function render(_, record) {
|
|
9715
10147
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
9716
10148
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('unit', {
|
|
9717
10149
|
initialValue: editGood.unit
|
|
@@ -9720,16 +10152,43 @@ var useColumns = (function (form) {
|
|
|
9720
10152
|
width: '100%'
|
|
9721
10153
|
},
|
|
9722
10154
|
dataSource: unitList,
|
|
9723
|
-
onChange: function
|
|
9724
|
-
|
|
9725
|
-
|
|
10155
|
+
onChange: function () {
|
|
10156
|
+
var _onChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
10157
|
+
var key, value;
|
|
10158
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
10159
|
+
while (1) {
|
|
10160
|
+
switch (_context4.prev = _context4.next) {
|
|
10161
|
+
case 0:
|
|
10162
|
+
_context4.next = 2;
|
|
10163
|
+
return controller.wait();
|
|
10164
|
+
|
|
10165
|
+
case 2:
|
|
10166
|
+
key = isMyShow ? 'unit' : 'unitOther';
|
|
10167
|
+
value = {};
|
|
10168
|
+
value[key] = form.getFieldsValue().unit;
|
|
10169
|
+
controller.setEditGood(value);
|
|
10170
|
+
|
|
10171
|
+
case 6:
|
|
10172
|
+
case "end":
|
|
10173
|
+
return _context4.stop();
|
|
10174
|
+
}
|
|
10175
|
+
}
|
|
10176
|
+
}, _callee4);
|
|
10177
|
+
}));
|
|
10178
|
+
|
|
10179
|
+
function onChange() {
|
|
10180
|
+
return _onChange2.apply(this, arguments);
|
|
10181
|
+
}
|
|
10182
|
+
|
|
10183
|
+
return onChange;
|
|
10184
|
+
}()
|
|
9726
10185
|
})));
|
|
9727
10186
|
} else {
|
|
9728
|
-
return /*#__PURE__*/React.createElement(
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
}
|
|
10187
|
+
return /*#__PURE__*/React.createElement(MyItemNameDiv, {
|
|
10188
|
+
valueT: record.unit,
|
|
10189
|
+
valueF: record.unitOther,
|
|
10190
|
+
isMyShow: isMyShow
|
|
10191
|
+
});
|
|
9733
10192
|
}
|
|
9734
10193
|
}
|
|
9735
10194
|
}, {
|
|
@@ -9747,13 +10206,13 @@ var useColumns = (function (form) {
|
|
|
9747
10206
|
message: '数量必须为数字'
|
|
9748
10207
|
}, {
|
|
9749
10208
|
validator: function () {
|
|
9750
|
-
var
|
|
10209
|
+
var _validator2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(_, value, callback) {
|
|
9751
10210
|
var isvalue, isPrice;
|
|
9752
|
-
return _regeneratorRuntime().wrap(function
|
|
10211
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
9753
10212
|
while (1) {
|
|
9754
|
-
switch (
|
|
10213
|
+
switch (_context5.prev = _context5.next) {
|
|
9755
10214
|
case 0:
|
|
9756
|
-
|
|
10215
|
+
_context5.next = 2;
|
|
9757
10216
|
return controller.wait();
|
|
9758
10217
|
|
|
9759
10218
|
case 2:
|
|
@@ -9761,25 +10220,25 @@ var useColumns = (function (form) {
|
|
|
9761
10220
|
isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
9762
10221
|
|
|
9763
10222
|
if (!(isvalue || isPrice === isvalue)) {
|
|
9764
|
-
|
|
10223
|
+
_context5.next = 6;
|
|
9765
10224
|
break;
|
|
9766
10225
|
}
|
|
9767
10226
|
|
|
9768
|
-
return
|
|
10227
|
+
return _context5.abrupt("return");
|
|
9769
10228
|
|
|
9770
10229
|
case 6:
|
|
9771
10230
|
callback('请输入数量');
|
|
9772
10231
|
|
|
9773
10232
|
case 7:
|
|
9774
10233
|
case "end":
|
|
9775
|
-
return
|
|
10234
|
+
return _context5.stop();
|
|
9776
10235
|
}
|
|
9777
10236
|
}
|
|
9778
|
-
},
|
|
10237
|
+
}, _callee5);
|
|
9779
10238
|
}));
|
|
9780
10239
|
|
|
9781
|
-
function validator(
|
|
9782
|
-
return
|
|
10240
|
+
function validator(_x5, _x6, _x7) {
|
|
10241
|
+
return _validator2.apply(this, arguments);
|
|
9783
10242
|
}
|
|
9784
10243
|
|
|
9785
10244
|
return validator;
|
|
@@ -9819,13 +10278,13 @@ var useColumns = (function (form) {
|
|
|
9819
10278
|
message: '单价必须为数字'
|
|
9820
10279
|
}, {
|
|
9821
10280
|
validator: function () {
|
|
9822
|
-
var
|
|
10281
|
+
var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_, value, callback) {
|
|
9823
10282
|
var isQuantity, isvalue;
|
|
9824
|
-
return _regeneratorRuntime().wrap(function
|
|
10283
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
9825
10284
|
while (1) {
|
|
9826
|
-
switch (
|
|
10285
|
+
switch (_context6.prev = _context6.next) {
|
|
9827
10286
|
case 0:
|
|
9828
|
-
|
|
10287
|
+
_context6.next = 2;
|
|
9829
10288
|
return controller.wait();
|
|
9830
10289
|
|
|
9831
10290
|
case 2:
|
|
@@ -9833,25 +10292,25 @@ var useColumns = (function (form) {
|
|
|
9833
10292
|
isvalue = !!value || value === 0;
|
|
9834
10293
|
|
|
9835
10294
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
9836
|
-
|
|
10295
|
+
_context6.next = 6;
|
|
9837
10296
|
break;
|
|
9838
10297
|
}
|
|
9839
10298
|
|
|
9840
|
-
return
|
|
10299
|
+
return _context6.abrupt("return");
|
|
9841
10300
|
|
|
9842
10301
|
case 6:
|
|
9843
10302
|
callback('请输入单价');
|
|
9844
10303
|
|
|
9845
10304
|
case 7:
|
|
9846
10305
|
case "end":
|
|
9847
|
-
return
|
|
10306
|
+
return _context6.stop();
|
|
9848
10307
|
}
|
|
9849
10308
|
}
|
|
9850
|
-
},
|
|
10309
|
+
}, _callee6);
|
|
9851
10310
|
}));
|
|
9852
10311
|
|
|
9853
|
-
function validator(
|
|
9854
|
-
return
|
|
10312
|
+
function validator(_x8, _x9, _x10) {
|
|
10313
|
+
return _validator3.apply(this, arguments);
|
|
9855
10314
|
}
|
|
9856
10315
|
|
|
9857
10316
|
return validator;
|
|
@@ -9891,13 +10350,13 @@ var useColumns = (function (form) {
|
|
|
9891
10350
|
message: '单价必须为数字'
|
|
9892
10351
|
}, {
|
|
9893
10352
|
validator: function () {
|
|
9894
|
-
var
|
|
10353
|
+
var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(_, value, callback) {
|
|
9895
10354
|
var isQuantity, isvalue;
|
|
9896
|
-
return _regeneratorRuntime().wrap(function
|
|
10355
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
9897
10356
|
while (1) {
|
|
9898
|
-
switch (
|
|
10357
|
+
switch (_context7.prev = _context7.next) {
|
|
9899
10358
|
case 0:
|
|
9900
|
-
|
|
10359
|
+
_context7.next = 2;
|
|
9901
10360
|
return controller.wait();
|
|
9902
10361
|
|
|
9903
10362
|
case 2:
|
|
@@ -9905,25 +10364,25 @@ var useColumns = (function (form) {
|
|
|
9905
10364
|
isvalue = !!value || value === 0;
|
|
9906
10365
|
|
|
9907
10366
|
if (!(isvalue || isQuantity === isvalue)) {
|
|
9908
|
-
|
|
10367
|
+
_context7.next = 6;
|
|
9909
10368
|
break;
|
|
9910
10369
|
}
|
|
9911
10370
|
|
|
9912
|
-
return
|
|
10371
|
+
return _context7.abrupt("return");
|
|
9913
10372
|
|
|
9914
10373
|
case 6:
|
|
9915
10374
|
callback('请输入单价');
|
|
9916
10375
|
|
|
9917
10376
|
case 7:
|
|
9918
10377
|
case "end":
|
|
9919
|
-
return
|
|
10378
|
+
return _context7.stop();
|
|
9920
10379
|
}
|
|
9921
10380
|
}
|
|
9922
|
-
},
|
|
10381
|
+
}, _callee7);
|
|
9923
10382
|
}));
|
|
9924
10383
|
|
|
9925
|
-
function validator(
|
|
9926
|
-
return
|
|
10384
|
+
function validator(_x11, _x12, _x13) {
|
|
10385
|
+
return _validator4.apply(this, arguments);
|
|
9927
10386
|
}
|
|
9928
10387
|
|
|
9929
10388
|
return validator;
|
|
@@ -9949,7 +10408,7 @@ var useColumns = (function (form) {
|
|
|
9949
10408
|
}
|
|
9950
10409
|
}
|
|
9951
10410
|
}, {
|
|
9952
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$
|
|
10411
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$5, {
|
|
9953
10412
|
type: "danger"
|
|
9954
10413
|
}, "*"), "\u91D1\u989D(\u542B\u7A0E)"),
|
|
9955
10414
|
dataIndex: 'lineAmountIncludeTax',
|
|
@@ -9968,10 +10427,10 @@ var useColumns = (function (form) {
|
|
|
9968
10427
|
message: '金额必须为数字'
|
|
9969
10428
|
}, {
|
|
9970
10429
|
validator: function () {
|
|
9971
|
-
var
|
|
9972
|
-
return _regeneratorRuntime().wrap(function
|
|
10430
|
+
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
|
|
10431
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
9973
10432
|
while (1) {
|
|
9974
|
-
switch (
|
|
10433
|
+
switch (_context8.prev = _context8.next) {
|
|
9975
10434
|
case 0:
|
|
9976
10435
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
9977
10436
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -9979,24 +10438,24 @@ var useColumns = (function (form) {
|
|
|
9979
10438
|
|
|
9980
10439
|
case 1:
|
|
9981
10440
|
case "end":
|
|
9982
|
-
return
|
|
10441
|
+
return _context8.stop();
|
|
9983
10442
|
}
|
|
9984
10443
|
}
|
|
9985
|
-
},
|
|
10444
|
+
}, _callee8);
|
|
9986
10445
|
}));
|
|
9987
10446
|
|
|
9988
|
-
function validator(
|
|
9989
|
-
return
|
|
10447
|
+
function validator(_x14, _x15, _x16) {
|
|
10448
|
+
return _validator5.apply(this, arguments);
|
|
9990
10449
|
}
|
|
9991
10450
|
|
|
9992
10451
|
return validator;
|
|
9993
10452
|
}()
|
|
9994
10453
|
}, {
|
|
9995
10454
|
validator: function () {
|
|
9996
|
-
var
|
|
9997
|
-
return _regeneratorRuntime().wrap(function
|
|
10455
|
+
var _validator6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
|
|
10456
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
9998
10457
|
while (1) {
|
|
9999
|
-
switch (
|
|
10458
|
+
switch (_context9.prev = _context9.next) {
|
|
10000
10459
|
case 0:
|
|
10001
10460
|
if (deduction && parseFloat(value) <= deduction) {
|
|
10002
10461
|
callback('扣除额不能大于等于价税合计');
|
|
@@ -10004,14 +10463,14 @@ var useColumns = (function (form) {
|
|
|
10004
10463
|
|
|
10005
10464
|
case 1:
|
|
10006
10465
|
case "end":
|
|
10007
|
-
return
|
|
10466
|
+
return _context9.stop();
|
|
10008
10467
|
}
|
|
10009
10468
|
}
|
|
10010
|
-
},
|
|
10469
|
+
}, _callee9);
|
|
10011
10470
|
}));
|
|
10012
10471
|
|
|
10013
|
-
function validator(
|
|
10014
|
-
return
|
|
10472
|
+
function validator(_x17, _x18, _x19) {
|
|
10473
|
+
return _validator6.apply(this, arguments);
|
|
10015
10474
|
}
|
|
10016
10475
|
|
|
10017
10476
|
return validator;
|
|
@@ -10036,7 +10495,7 @@ var useColumns = (function (form) {
|
|
|
10036
10495
|
}
|
|
10037
10496
|
}
|
|
10038
10497
|
}, {
|
|
10039
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$
|
|
10498
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$5, {
|
|
10040
10499
|
type: "danger"
|
|
10041
10500
|
}, "*"), "\u91D1\u989D(\u4E0D\u542B\u7A0E)"),
|
|
10042
10501
|
dataIndex: 'lineAmountExcludeTax',
|
|
@@ -10055,10 +10514,10 @@ var useColumns = (function (form) {
|
|
|
10055
10514
|
message: '金额必须为数字'
|
|
10056
10515
|
}, {
|
|
10057
10516
|
validator: function () {
|
|
10058
|
-
var
|
|
10059
|
-
return _regeneratorRuntime().wrap(function
|
|
10517
|
+
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
|
|
10518
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
10060
10519
|
while (1) {
|
|
10061
|
-
switch (
|
|
10520
|
+
switch (_context10.prev = _context10.next) {
|
|
10062
10521
|
case 0:
|
|
10063
10522
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
10064
10523
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -10066,14 +10525,14 @@ var useColumns = (function (form) {
|
|
|
10066
10525
|
|
|
10067
10526
|
case 1:
|
|
10068
10527
|
case "end":
|
|
10069
|
-
return
|
|
10528
|
+
return _context10.stop();
|
|
10070
10529
|
}
|
|
10071
10530
|
}
|
|
10072
|
-
},
|
|
10531
|
+
}, _callee10);
|
|
10073
10532
|
}));
|
|
10074
10533
|
|
|
10075
|
-
function validator(
|
|
10076
|
-
return
|
|
10534
|
+
function validator(_x20, _x21, _x22) {
|
|
10535
|
+
return _validator7.apply(this, arguments);
|
|
10077
10536
|
}
|
|
10078
10537
|
|
|
10079
10538
|
return validator;
|
|
@@ -10098,7 +10557,7 @@ var useColumns = (function (form) {
|
|
|
10098
10557
|
}
|
|
10099
10558
|
}
|
|
10100
10559
|
}, {
|
|
10101
|
-
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$
|
|
10560
|
+
title: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$5, {
|
|
10102
10561
|
type: "danger"
|
|
10103
10562
|
}, "*"), "\u7A0E\u7387"),
|
|
10104
10563
|
dataIndex: 'taxRate',
|
|
@@ -10184,7 +10643,7 @@ var useColumns = (function (form) {
|
|
|
10184
10643
|
ellipsis: true
|
|
10185
10644
|
});
|
|
10186
10645
|
});
|
|
10187
|
-
}, [isTaxIncluded, editGood, controller, changeField, deduction]);
|
|
10646
|
+
}, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow]);
|
|
10188
10647
|
React.useEffect(function () {
|
|
10189
10648
|
if (!changeField) return;
|
|
10190
10649
|
var t = setTimeout(function () {
|
|
@@ -10259,9 +10718,65 @@ var MyDiv = /*#__PURE__*/function (_React$Component2) {
|
|
|
10259
10718
|
return MyDiv;
|
|
10260
10719
|
}(React.Component);
|
|
10261
10720
|
|
|
10721
|
+
var MyItemNameDiv = /*#__PURE__*/function (_React$Component3) {
|
|
10722
|
+
_inherits(MyItemNameDiv, _React$Component3);
|
|
10723
|
+
|
|
10724
|
+
var _super3 = _createSuper(MyItemNameDiv);
|
|
10725
|
+
|
|
10726
|
+
function MyItemNameDiv() {
|
|
10727
|
+
_classCallCheck(this, MyItemNameDiv);
|
|
10728
|
+
|
|
10729
|
+
return _super3.apply(this, arguments);
|
|
10730
|
+
}
|
|
10731
|
+
|
|
10732
|
+
_createClass(MyItemNameDiv, [{
|
|
10733
|
+
key: "render",
|
|
10734
|
+
value: function render() {
|
|
10735
|
+
var _this$props = this.props,
|
|
10736
|
+
isMyShow = _this$props.isMyShow,
|
|
10737
|
+
valueT = _this$props.valueT,
|
|
10738
|
+
valueF = _this$props.valueF;
|
|
10739
|
+
|
|
10740
|
+
if (isMyShow) {
|
|
10741
|
+
if (valueT) {
|
|
10742
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
10743
|
+
style: {
|
|
10744
|
+
padding: '0 10px',
|
|
10745
|
+
color: '#0074ff'
|
|
10746
|
+
}
|
|
10747
|
+
}, valueT);
|
|
10748
|
+
} else {
|
|
10749
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
10750
|
+
style: {
|
|
10751
|
+
padding: '0 10px'
|
|
10752
|
+
}
|
|
10753
|
+
}, valueF);
|
|
10754
|
+
}
|
|
10755
|
+
} else {
|
|
10756
|
+
if (valueF) {
|
|
10757
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
10758
|
+
style: {
|
|
10759
|
+
padding: '0 10px'
|
|
10760
|
+
}
|
|
10761
|
+
}, valueF);
|
|
10762
|
+
} else {
|
|
10763
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
10764
|
+
style: {
|
|
10765
|
+
padding: '0 10px',
|
|
10766
|
+
color: '#0074ff'
|
|
10767
|
+
}
|
|
10768
|
+
}, valueT);
|
|
10769
|
+
}
|
|
10770
|
+
}
|
|
10771
|
+
}
|
|
10772
|
+
}]);
|
|
10773
|
+
|
|
10774
|
+
return MyItemNameDiv;
|
|
10775
|
+
}(React.Component);
|
|
10776
|
+
|
|
10262
10777
|
var useOnRow = (function () {
|
|
10263
10778
|
/** 控制器 */
|
|
10264
|
-
var controller =
|
|
10779
|
+
var controller = Invoice.useInvoiceController();
|
|
10265
10780
|
var model = controller.useMemo(function (s) {
|
|
10266
10781
|
return s.model;
|
|
10267
10782
|
}, []);
|
|
@@ -10444,7 +10959,7 @@ function useWindowClick(controller) {
|
|
|
10444
10959
|
|
|
10445
10960
|
var useRowSelection = (function () {
|
|
10446
10961
|
/** 控制器 */
|
|
10447
|
-
var controller =
|
|
10962
|
+
var controller = Invoice.useInvoiceController();
|
|
10448
10963
|
/** 列表选中的货物索引列表 */
|
|
10449
10964
|
|
|
10450
10965
|
var selectedRowKeys = controller.useMemo(function (s) {
|
|
@@ -10668,7 +11183,7 @@ var useRowSelection = (function () {
|
|
|
10668
11183
|
};
|
|
10669
11184
|
});
|
|
10670
11185
|
|
|
10671
|
-
var css_248z$6 = ".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}\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 margin: 0 10px;\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
|
|
11186
|
+
var css_248z$6 = ".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}\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 margin: 0 10px;\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";
|
|
10672
11187
|
styleInject(css_248z$6);
|
|
10673
11188
|
|
|
10674
11189
|
var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
@@ -10693,7 +11208,7 @@ var GoodsList = /*#__PURE__*/function (_React$Component) {
|
|
|
10693
11208
|
}(React.Component);
|
|
10694
11209
|
var Main = decorator(Form.create())(function (props) {
|
|
10695
11210
|
/** 控制器 */
|
|
10696
|
-
var controller =
|
|
11211
|
+
var controller = Invoice.useInvoiceController();
|
|
10697
11212
|
var goodsList = controller.useMemo(function (s) {
|
|
10698
11213
|
return s.goodsListState.goodsList;
|
|
10699
11214
|
}, []);
|
|
@@ -10863,9 +11378,9 @@ var Main = decorator(Form.create())(function (props) {
|
|
|
10863
11378
|
className: "kts-invoice-operate-goods-list-able"
|
|
10864
11379
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10865
11380
|
className: "kts-invoice-operate-goods-list-able-list"
|
|
10866
|
-
}, /*#__PURE__*/React.createElement(AddRowButton, null), /*#__PURE__*/React.createElement(DelRowButton, null), /*#__PURE__*/React.createElement(AddDiscountRowButton, null), /*#__PURE__*/React.createElement(EndowCodeButton, null)), /*#__PURE__*/React.createElement("div", {
|
|
11381
|
+
}, /*#__PURE__*/React.createElement(AddRowButton, null), /*#__PURE__*/React.createElement(DelRowButton, null), /*#__PURE__*/React.createElement(AddDiscountRowButton, null), /*#__PURE__*/React.createElement(EndowCodeButton, null), /*#__PURE__*/React.createElement(CommodityComparisonButton, null)), /*#__PURE__*/React.createElement("div", {
|
|
10867
11382
|
className: "kts-invoice-operate-goods-list-able-extend"
|
|
10868
|
-
}, props.menuExpansion, /*#__PURE__*/React.createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React.createElement("div", {
|
|
11383
|
+
}, props.menuExpansion, /*#__PURE__*/React.createElement(DescribeSwitch, null), /*#__PURE__*/React.createElement(TaxIncludedSwitch, null))), /*#__PURE__*/React.createElement("div", {
|
|
10869
11384
|
className: classnames('kts-invoice-operate-goods-list-table', {
|
|
10870
11385
|
'kts-invoice-operate-prefab': isprefab
|
|
10871
11386
|
})
|
|
@@ -10932,7 +11447,7 @@ var Main$1 = decorator(Form.create())(function (props) {
|
|
|
10932
11447
|
var getFieldDecorator = form.getFieldDecorator;
|
|
10933
11448
|
/** 控制器 */
|
|
10934
11449
|
|
|
10935
|
-
var controller =
|
|
11450
|
+
var controller = Invoice.useInvoiceController();
|
|
10936
11451
|
/** 控制器 */
|
|
10937
11452
|
|
|
10938
11453
|
var model = controller.useMemo(function (s) {
|
|
@@ -11050,7 +11565,7 @@ var Sign = decorator(Form.create())(function (props) {
|
|
|
11050
11565
|
var getFieldDecorator = form.getFieldDecorator;
|
|
11051
11566
|
/** 控制器 */
|
|
11052
11567
|
|
|
11053
|
-
var controller =
|
|
11568
|
+
var controller = Invoice.useInvoiceController();
|
|
11054
11569
|
var model = controller.useMemo(function (s) {
|
|
11055
11570
|
return s.model;
|
|
11056
11571
|
}, []); // 注册 form
|
|
@@ -11092,7 +11607,7 @@ var formItemLayout = {
|
|
|
11092
11607
|
};
|
|
11093
11608
|
|
|
11094
11609
|
var ImportBuyerButton = (function () {
|
|
11095
|
-
var controller =
|
|
11610
|
+
var controller = Invoice.useInvoiceController();
|
|
11096
11611
|
var onClick = React.useCallback(function () {
|
|
11097
11612
|
controller.pipeline( /*#__PURE__*/function () {
|
|
11098
11613
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
@@ -11124,7 +11639,7 @@ var ImportBuyerButton = (function () {
|
|
|
11124
11639
|
|
|
11125
11640
|
var BuyerNameInput = (function (props) {
|
|
11126
11641
|
/** 控制器 */
|
|
11127
|
-
var controller =
|
|
11642
|
+
var controller = Invoice.useInvoiceController();
|
|
11128
11643
|
/** 组件模式 */
|
|
11129
11644
|
|
|
11130
11645
|
var model = controller.useMemo(function (s) {
|
|
@@ -11284,7 +11799,7 @@ var BuyerNameInput = (function (props) {
|
|
|
11284
11799
|
|
|
11285
11800
|
function useDataSource() {
|
|
11286
11801
|
/** 控制器 */
|
|
11287
|
-
var controller =
|
|
11802
|
+
var controller = Invoice.useInvoiceController();
|
|
11288
11803
|
|
|
11289
11804
|
var _React$useState3 = React.useState(false),
|
|
11290
11805
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
@@ -11368,7 +11883,7 @@ function interval(i, t) {
|
|
|
11368
11883
|
var css_248z$9 = ".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";
|
|
11369
11884
|
styleInject(css_248z$9);
|
|
11370
11885
|
|
|
11371
|
-
var Text$
|
|
11886
|
+
var Text$6 = Typography.Text;
|
|
11372
11887
|
|
|
11373
11888
|
var Buyer$1 = /*#__PURE__*/function (_React$Component) {
|
|
11374
11889
|
_inherits(Buyer, _React$Component);
|
|
@@ -11400,7 +11915,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11400
11915
|
var getFieldDecorator = form.getFieldDecorator;
|
|
11401
11916
|
/** 控制器 */
|
|
11402
11917
|
|
|
11403
|
-
var controller =
|
|
11918
|
+
var controller = Invoice.useInvoiceController();
|
|
11404
11919
|
/** 组件模式 */
|
|
11405
11920
|
|
|
11406
11921
|
var model = controller.useMemo(function (s) {
|
|
@@ -11482,7 +11997,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11482
11997
|
if (e.options.rules.some(function (e) {
|
|
11483
11998
|
return e.required;
|
|
11484
11999
|
})) {
|
|
11485
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$
|
|
12000
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text$6, {
|
|
11486
12001
|
type: "danger"
|
|
11487
12002
|
}, "*"), e.label);
|
|
11488
12003
|
} else {
|
|
@@ -11518,7 +12033,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
11518
12033
|
});
|
|
11519
12034
|
|
|
11520
12035
|
var ImportBuyerDrawer = (function () {
|
|
11521
|
-
var controller =
|
|
12036
|
+
var controller = Invoice.useInvoiceController();
|
|
11522
12037
|
var visible = controller.useMemo(function (s) {
|
|
11523
12038
|
return s.buyerState.isVisibleDrawer;
|
|
11524
12039
|
}, []);
|
|
@@ -11560,7 +12075,7 @@ var ImportBuyerDrawer = (function () {
|
|
|
11560
12075
|
});
|
|
11561
12076
|
|
|
11562
12077
|
var DrawerBody$1 = function DrawerBody() {
|
|
11563
|
-
var controller =
|
|
12078
|
+
var controller = Invoice.useInvoiceController();
|
|
11564
12079
|
var columns = controller.useMemo(function (e) {
|
|
11565
12080
|
return e.buyerState.columns;
|
|
11566
12081
|
}, []);
|
|
@@ -11648,7 +12163,7 @@ var DrawerBody$1 = function DrawerBody() {
|
|
|
11648
12163
|
};
|
|
11649
12164
|
|
|
11650
12165
|
var ImportGoodsDrawer = (function () {
|
|
11651
|
-
var controller =
|
|
12166
|
+
var controller = Invoice.useInvoiceController();
|
|
11652
12167
|
var visible = controller.useMemo(function (s) {
|
|
11653
12168
|
return s.goodsListState.importGoods.isVisibleDrawer;
|
|
11654
12169
|
}, []);
|
|
@@ -11694,7 +12209,7 @@ var ImportGoodsDrawer = (function () {
|
|
|
11694
12209
|
});
|
|
11695
12210
|
|
|
11696
12211
|
var DrawerBody$2 = function DrawerBody() {
|
|
11697
|
-
var controller =
|
|
12212
|
+
var controller = Invoice.useInvoiceController();
|
|
11698
12213
|
var columns = controller.useMemo(function (s) {
|
|
11699
12214
|
return s.goodsListState.importGoods.columns;
|
|
11700
12215
|
}, []);
|
|
@@ -11728,6 +12243,7 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11728
12243
|
onClick: function onClick() {
|
|
11729
12244
|
controller.run( /*#__PURE__*/function () {
|
|
11730
12245
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
12246
|
+
var between, editGood;
|
|
11731
12247
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
11732
12248
|
while (1) {
|
|
11733
12249
|
switch (_context2.prev = _context2.next) {
|
|
@@ -11736,7 +12252,8 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11736
12252
|
return !record[e] && record[e] !== 0;
|
|
11737
12253
|
}).forEach(function (e) {
|
|
11738
12254
|
delete record[e];
|
|
11739
|
-
});
|
|
12255
|
+
}); // 导入时校验函数
|
|
12256
|
+
|
|
11740
12257
|
_context2.next = 3;
|
|
11741
12258
|
return s.goodsListState.importGoods.verifyFn(record);
|
|
11742
12259
|
|
|
@@ -11764,30 +12281,41 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11764
12281
|
record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
|
|
11765
12282
|
record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
|
|
11766
12283
|
record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
|
|
11767
|
-
}
|
|
12284
|
+
} // 中间数据
|
|
11768
12285
|
|
|
11769
|
-
s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), record);
|
|
11770
12286
|
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
12287
|
+
between = _objectSpread2({}, record);
|
|
12288
|
+
between.itemName = getItemName$1(record, s.goodsListState.editGood);
|
|
12289
|
+
between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood); // 设置编辑货物
|
|
12290
|
+
|
|
12291
|
+
editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
|
|
12292
|
+
|
|
12293
|
+
if (editGood.taxRate) {
|
|
12294
|
+
editGood.taxRate = dutyFree(controller, editGood.taxRate, s.goodsListState.form, editGood);
|
|
11774
12295
|
}
|
|
11775
12296
|
|
|
11776
|
-
|
|
12297
|
+
if ("".concat(editGood.priceIncludeTax) === '0') {
|
|
12298
|
+
editGood.priceIncludeTax = undefined;
|
|
12299
|
+
editGood.priceExcludeTax = undefined;
|
|
12300
|
+
} else {
|
|
12301
|
+
editGood.priceExcludeTax = getPriceExcludeTax(editGood, record);
|
|
12302
|
+
}
|
|
12303
|
+
|
|
12304
|
+
if (editGood.quantity && editGood.priceIncludeTax) {
|
|
12305
|
+
editGood.lineAmountIncludeTax = countAmountIncludeTax(editGood.quantity, editGood.priceIncludeTax);
|
|
12306
|
+
} // 导入FORM里
|
|
11777
12307
|
|
|
11778
|
-
case 12:
|
|
11779
|
-
if (s.goodsListState.editGood.taxRate) s.goodsListState.editGood.taxRate = dutyFree(controller, s.goodsListState.editGood.taxRate, s.goodsListState.form, s.goodsListState.editGood);
|
|
11780
12308
|
|
|
11781
|
-
if (
|
|
11782
|
-
s.goodsListState.editGood
|
|
11783
|
-
s.goodsListState.editGood.priceExcludeTax = undefined;
|
|
12309
|
+
if (s.goodsListState.isMyShow) {
|
|
12310
|
+
s.goodsListState.form.setFieldsValue(editGood);
|
|
11784
12311
|
} else {
|
|
11785
|
-
s.goodsListState.
|
|
12312
|
+
s.goodsListState.form.setFieldsValue(_objectSpread2(_objectSpread2({}, editGood), {}, {
|
|
12313
|
+
itemName: editGood.itemNameOther,
|
|
12314
|
+
unit: editGood.unitOther,
|
|
12315
|
+
itemModelName: editGood.itemModelNameOther
|
|
12316
|
+
}));
|
|
11786
12317
|
}
|
|
11787
12318
|
|
|
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
12319
|
s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
11792
12320
|
s.goodsListState.isTaxIncluded ? updateUnitPriceExcludingTax(controller, s.goodsListState.form) : updateUnitPriceTax(controller, s.goodsListState.form);
|
|
11793
12321
|
|
|
@@ -11809,11 +12337,12 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
11809
12337
|
});
|
|
11810
12338
|
};
|
|
11811
12339
|
/** 货物名称 */
|
|
12340
|
+
// const getItemName = (record: any) => {
|
|
12341
|
+
// return record.shorthand
|
|
12342
|
+
// ? `*${record.shorthand}*${record.itemName}`
|
|
12343
|
+
// : record.itemName;
|
|
12344
|
+
// };
|
|
11812
12345
|
|
|
11813
|
-
|
|
11814
|
-
var getItemName = function getItemName(record) {
|
|
11815
|
-
return record.shorthand ? "*".concat(record.shorthand, "*").concat(record.itemName) : record.itemName;
|
|
11816
|
-
};
|
|
11817
12346
|
/** 货物单价,不含税 */
|
|
11818
12347
|
|
|
11819
12348
|
|
|
@@ -11821,6 +12350,39 @@ var getPriceExcludeTax = function getPriceExcludeTax(s, record) {
|
|
|
11821
12350
|
if (!s.taxRate && s.taxRate !== 0 || !record.priceIncludeTax && record.priceIncludeTax !== 0) return; // 单价(含税)/(1+税率) = 单价(不含税)
|
|
11822
12351
|
|
|
11823
12352
|
return format15(evaluate("".concat(record.priceIncludeTax, " / (1+").concat(s.taxRate, "/100)")));
|
|
12353
|
+
}; // 获取我方名称
|
|
12354
|
+
|
|
12355
|
+
|
|
12356
|
+
var getItemName$1 = function getItemName(record, editGood) {
|
|
12357
|
+
var _getSN;
|
|
12358
|
+
|
|
12359
|
+
var shorthand;
|
|
12360
|
+
shorthand = record.shorthand;
|
|
12361
|
+
|
|
12362
|
+
if (shorthand) {
|
|
12363
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12364
|
+
}
|
|
12365
|
+
|
|
12366
|
+
shorthand = (_getSN = getSN(editGood.itemNameOther)) === null || _getSN === void 0 ? void 0 : _getSN.shorthand;
|
|
12367
|
+
|
|
12368
|
+
if (shorthand) {
|
|
12369
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12370
|
+
}
|
|
12371
|
+
|
|
12372
|
+
return record.itemName;
|
|
12373
|
+
}; // 获取他方名称
|
|
12374
|
+
|
|
12375
|
+
|
|
12376
|
+
var getItemNameOther = function getItemNameOther(record, editGood) {
|
|
12377
|
+
if (!editGood.itemNameOther) return editGood.itemNameOther;
|
|
12378
|
+
var shorthand;
|
|
12379
|
+
shorthand = record.shorthand;
|
|
12380
|
+
|
|
12381
|
+
if (shorthand) {
|
|
12382
|
+
return "*".concat(shorthand, "*").concat(record.itemName);
|
|
12383
|
+
}
|
|
12384
|
+
|
|
12385
|
+
return record.itemNameOther;
|
|
11824
12386
|
};
|
|
11825
12387
|
|
|
11826
12388
|
/**
|
|
@@ -11880,7 +12442,7 @@ styleInject(css_248z$a);
|
|
|
11880
12442
|
var TreeNode = Tree.TreeNode;
|
|
11881
12443
|
var confirm = Modal.confirm;
|
|
11882
12444
|
var EndowCodeDrawer = (function () {
|
|
11883
|
-
var controller =
|
|
12445
|
+
var controller = Invoice.useInvoiceController();
|
|
11884
12446
|
var visible = controller.useMemo(function (s) {
|
|
11885
12447
|
return s.goodsListState.endowCode.endowcodeGoodIndex.length > 0;
|
|
11886
12448
|
}, []);
|
|
@@ -11995,7 +12557,7 @@ var EndowCodeDrawer = (function () {
|
|
|
11995
12557
|
var DrawerBody$3 = function DrawerBody(props) {
|
|
11996
12558
|
var _defaultValue$taxRate, _defaultValue$favoure;
|
|
11997
12559
|
|
|
11998
|
-
var controller =
|
|
12560
|
+
var controller = Invoice.useInvoiceController();
|
|
11999
12561
|
var defaultValue = props.defaultValue;
|
|
12000
12562
|
var actions = React.useMemo(function () {
|
|
12001
12563
|
return createAsyncFormActions();
|
|
@@ -12380,9 +12942,10 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12380
12942
|
}); // 赋码
|
|
12381
12943
|
|
|
12382
12944
|
endowCodeGood.forEach(function (good) {
|
|
12383
|
-
if (!good) return;
|
|
12384
|
-
|
|
12385
|
-
good.
|
|
12945
|
+
if (!good) return;
|
|
12946
|
+
good.itemName = setShorthand(good.itemName, values.shorthand);
|
|
12947
|
+
good.itemNameOther = setShorthand(good.itemNameOther, values.shorthand); // const name = getItemName(good.itemName, values.shorthand);
|
|
12948
|
+
// good.itemName = getItemName(good.itemName, values.shorthand); // `*${values.shorthand}*${name}`;
|
|
12386
12949
|
|
|
12387
12950
|
good.taxClassificationCode = values.taxClassificationCode;
|
|
12388
12951
|
good.taxRate = values.taxRate;
|
|
@@ -12630,41 +13193,255 @@ var getShorthand = function getShorthand(value) {
|
|
|
12630
13193
|
return undefined;
|
|
12631
13194
|
}
|
|
12632
13195
|
};
|
|
12633
|
-
/** 简称填入名称 */
|
|
12634
13196
|
|
|
13197
|
+
var AddComparisonDrawer = decorator(Form.create())(function (props) {
|
|
13198
|
+
var form = props.form;
|
|
13199
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
13200
|
+
/** 控制器 */
|
|
12635
13201
|
|
|
12636
|
-
var
|
|
12637
|
-
|
|
13202
|
+
var controller = Invoice.useInvoiceController();
|
|
13203
|
+
/** 正在 添加商品对照 的货物索引 */
|
|
12638
13204
|
|
|
12639
|
-
|
|
12640
|
-
return
|
|
12641
|
-
}
|
|
13205
|
+
var addComparisonIndex = controller.useMemo(function (s) {
|
|
13206
|
+
return s.goodsListState.addComparisonIndex;
|
|
13207
|
+
}, []);
|
|
13208
|
+
/** 货物字典 */
|
|
12642
13209
|
|
|
12643
|
-
var
|
|
13210
|
+
var goodsMap = controller.useMemo(function (s) {
|
|
13211
|
+
return s.goodsListState.goodsMap;
|
|
13212
|
+
}, []);
|
|
13213
|
+
/** 正在 对照 的货物 */
|
|
12644
13214
|
|
|
12645
|
-
|
|
12646
|
-
return
|
|
12647
|
-
}
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
13215
|
+
var good = React.useMemo(function () {
|
|
13216
|
+
return addComparisonIndex ? goodsMap.get(addComparisonIndex) : undefined;
|
|
13217
|
+
}, [addComparisonIndex]);
|
|
13218
|
+
/** 关闭对照 */
|
|
13219
|
+
|
|
13220
|
+
var onClose = React.useCallback(controller.pipeline( /*#__PURE__*/function () {
|
|
13221
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
13222
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13223
|
+
while (1) {
|
|
13224
|
+
switch (_context.prev = _context.next) {
|
|
13225
|
+
case 0:
|
|
13226
|
+
s.goodsListState.addComparisonIndex = undefined;
|
|
13227
|
+
|
|
13228
|
+
case 1:
|
|
13229
|
+
case "end":
|
|
13230
|
+
return _context.stop();
|
|
13231
|
+
}
|
|
13232
|
+
}
|
|
13233
|
+
}, _callee);
|
|
13234
|
+
}));
|
|
13235
|
+
|
|
13236
|
+
return function (_x) {
|
|
13237
|
+
return _ref.apply(this, arguments);
|
|
13238
|
+
};
|
|
13239
|
+
}()), [controller]);
|
|
13240
|
+
/** 提交数据 */
|
|
13241
|
+
|
|
13242
|
+
var onSubmit = React.useCallback(function () {
|
|
13243
|
+
controller.run( /*#__PURE__*/function () {
|
|
13244
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
13245
|
+
var _getSN, _getSN2, _s$goodsListState, _s$goodsListState$pro;
|
|
13246
|
+
|
|
13247
|
+
var _yield$validateFields, err, values, shorthand;
|
|
13248
|
+
|
|
13249
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13250
|
+
while (1) {
|
|
13251
|
+
switch (_context2.prev = _context2.next) {
|
|
13252
|
+
case 0:
|
|
13253
|
+
if (good) {
|
|
13254
|
+
_context2.next = 2;
|
|
13255
|
+
break;
|
|
13256
|
+
}
|
|
13257
|
+
|
|
13258
|
+
return _context2.abrupt("return");
|
|
13259
|
+
|
|
13260
|
+
case 2:
|
|
13261
|
+
_context2.next = 4;
|
|
13262
|
+
return validateFields$1(form);
|
|
13263
|
+
|
|
13264
|
+
case 4:
|
|
13265
|
+
_yield$validateFields = _context2.sent;
|
|
13266
|
+
err = _yield$validateFields.err;
|
|
13267
|
+
values = _yield$validateFields.values;
|
|
13268
|
+
|
|
13269
|
+
if (!err) {
|
|
13270
|
+
_context2.next = 9;
|
|
13271
|
+
break;
|
|
13272
|
+
}
|
|
13273
|
+
|
|
13274
|
+
return _context2.abrupt("return");
|
|
13275
|
+
|
|
13276
|
+
case 9:
|
|
13277
|
+
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;
|
|
13278
|
+
good.itemCode = values.itemCode;
|
|
13279
|
+
good.itemCodeOther = values.itemCodeOther;
|
|
13280
|
+
good.itemName = shorthand ? "*".concat(shorthand, "*").concat(values.itemName) : values.itemName;
|
|
13281
|
+
good.itemNameOther = shorthand ? "*".concat(shorthand, "*").concat(values.itemNameOther) : values.itemNameOther;
|
|
13282
|
+
good.itemModelName = values.itemModelName;
|
|
13283
|
+
good.itemModelNameOther = values.itemModelNameOther;
|
|
13284
|
+
good.unit = values.unit;
|
|
13285
|
+
good.unitOther = values.unitOther;
|
|
13286
|
+
s.goodsListState.addComparisonIndex = undefined;
|
|
13287
|
+
s.goodsListState.goodsList = _toConsumableArray(s.goodsListState.goodsList);
|
|
13288
|
+
|
|
13289
|
+
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)) {
|
|
13290
|
+
_context2.next = 24;
|
|
13291
|
+
break;
|
|
13292
|
+
}
|
|
13293
|
+
|
|
13294
|
+
debugger;
|
|
13295
|
+
_context2.next = 24;
|
|
13296
|
+
return s.goodsListState.productComparison.onUpdateComparisonTable(good, values);
|
|
13297
|
+
|
|
13298
|
+
case 24:
|
|
13299
|
+
case "end":
|
|
13300
|
+
return _context2.stop();
|
|
13301
|
+
}
|
|
13302
|
+
}
|
|
13303
|
+
}, _callee2);
|
|
13304
|
+
}));
|
|
13305
|
+
|
|
13306
|
+
return function (_x2) {
|
|
13307
|
+
return _ref2.apply(this, arguments);
|
|
13308
|
+
};
|
|
13309
|
+
}());
|
|
13310
|
+
}, [form, good]);
|
|
13311
|
+
React.useEffect(function () {
|
|
13312
|
+
form.resetFields();
|
|
13313
|
+
|
|
13314
|
+
if (good) {
|
|
13315
|
+
var _getSN3, _getSN4;
|
|
13316
|
+
|
|
13317
|
+
form.setFieldsValue(_objectSpread2(_objectSpread2({}, good), {}, {
|
|
13318
|
+
itemName: (_getSN3 = getSN(good.itemName)) === null || _getSN3 === void 0 ? void 0 : _getSN3.full,
|
|
13319
|
+
itemNameOther: (_getSN4 = getSN(good.itemNameOther)) === null || _getSN4 === void 0 ? void 0 : _getSN4.full
|
|
13320
|
+
}));
|
|
13321
|
+
}
|
|
13322
|
+
}, [good]);
|
|
13323
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
13324
|
+
width: 500,
|
|
13325
|
+
onClose: onClose,
|
|
13326
|
+
placement: "right",
|
|
13327
|
+
title: "\u6DFB\u52A0\u5546\u54C1\u5BF9\u7167",
|
|
13328
|
+
visible: !!addComparisonIndex,
|
|
13329
|
+
drawerStyle: {
|
|
13330
|
+
display: 'flex',
|
|
13331
|
+
flexDirection: 'column'
|
|
13332
|
+
},
|
|
13333
|
+
bodyStyle: {
|
|
13334
|
+
flex: 1,
|
|
13335
|
+
display: 'flex',
|
|
13336
|
+
flexDirection: 'column'
|
|
13337
|
+
}
|
|
13338
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
13339
|
+
layout: "vertical",
|
|
13340
|
+
style: {
|
|
13341
|
+
flex: 1
|
|
13342
|
+
}
|
|
13343
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
13344
|
+
gutter: [8, 8]
|
|
13345
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
13346
|
+
span: 12
|
|
13347
|
+
}, getFieldDecorator('itemCode', {})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13348
|
+
label: "\u6211\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13349
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13350
|
+
span: 12
|
|
13351
|
+
}, getFieldDecorator('itemCodeOther', {})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13352
|
+
label: "\u5BF9\u65B9\u5546\u54C1\u7F16\u7801"
|
|
13353
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13354
|
+
span: 12
|
|
13355
|
+
}, getFieldDecorator('itemName', {
|
|
13356
|
+
rules: [{
|
|
13357
|
+
required: true,
|
|
13358
|
+
message: "请输入我方商品名称"
|
|
13359
|
+
}]
|
|
13360
|
+
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13361
|
+
label: "\u6211\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13362
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13363
|
+
span: 12
|
|
13364
|
+
}, getFieldDecorator('itemNameOther', {
|
|
13365
|
+
rules: [{
|
|
13366
|
+
required: true,
|
|
13367
|
+
message: "请输入对方商品名称"
|
|
13368
|
+
}]
|
|
13369
|
+
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13370
|
+
label: "\u5BF9\u65B9\u5546\u54C1\u540D\u79F0"
|
|
13371
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13372
|
+
span: 12
|
|
13373
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
13374
|
+
label: "\u6211\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13375
|
+
}, /*#__PURE__*/React.createElement(Input, null))), /*#__PURE__*/React.createElement(Col, {
|
|
13376
|
+
span: 12
|
|
13377
|
+
}, getFieldDecorator('itemModelNameOther', {
|
|
13378
|
+
rules: [{
|
|
13379
|
+
required: true,
|
|
13380
|
+
message: "请输入对方规格型号"
|
|
13381
|
+
}]
|
|
13382
|
+
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13383
|
+
label: "\u5BF9\u65B9\u89C4\u683C\u578B\u53F7"
|
|
13384
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13385
|
+
span: 12
|
|
13386
|
+
}, getFieldDecorator('unit', {
|
|
13387
|
+
rules: [{
|
|
13388
|
+
required: true,
|
|
13389
|
+
message: "请输入对方规格型号"
|
|
13390
|
+
}]
|
|
13391
|
+
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13392
|
+
label: "\u6211\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13393
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13394
|
+
span: 12
|
|
13395
|
+
}, getFieldDecorator('unitOther', {
|
|
13396
|
+
rules: [{
|
|
13397
|
+
required: true,
|
|
13398
|
+
message: "请输入对方计量单位"
|
|
13399
|
+
}]
|
|
13400
|
+
})( /*#__PURE__*/React.createElement(Form.Item, {
|
|
13401
|
+
label: "\u5BF9\u65B9\u8BA1\u91CF\u5355\u4F4D"
|
|
13402
|
+
}, /*#__PURE__*/React.createElement(Input, null)))), /*#__PURE__*/React.createElement(Col, {
|
|
13403
|
+
span: 24
|
|
13404
|
+
}, getFieldDecorator('isUpdate', {})( /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Checkbox, null, "\u66F4\u65B0\u5230\u5546\u54C1\u5BF9\u7167\u8868\u4E2D")))))), /*#__PURE__*/React.createElement("div", {
|
|
13405
|
+
style: {
|
|
13406
|
+
display: 'flex',
|
|
13407
|
+
justifyContent: 'flex-end',
|
|
13408
|
+
gap: 10
|
|
13409
|
+
}
|
|
13410
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
13411
|
+
type: "primary",
|
|
13412
|
+
onClick: onSubmit
|
|
13413
|
+
}, "\u63D0\u4EA4"), /*#__PURE__*/React.createElement(Button, {
|
|
13414
|
+
onClick: onClose
|
|
13415
|
+
}, "\u53D6\u6D88")));
|
|
13416
|
+
});
|
|
13417
|
+
|
|
13418
|
+
function validateFields$1(form) {
|
|
13419
|
+
return new Promise(function (resolve) {
|
|
13420
|
+
form.validateFields(function (err, values) {
|
|
13421
|
+
resolve({
|
|
13422
|
+
err: err,
|
|
13423
|
+
values: values
|
|
13424
|
+
});
|
|
13425
|
+
});
|
|
13426
|
+
});
|
|
13427
|
+
}
|
|
12651
13428
|
|
|
12652
13429
|
/** 发票组件的上下文 */
|
|
12653
13430
|
|
|
12654
13431
|
var InvoiceContext = /*#__PURE__*/React.createContext(undefined);
|
|
12655
13432
|
|
|
12656
|
-
var
|
|
12657
|
-
_inherits(
|
|
13433
|
+
var Invoice = /*#__PURE__*/function (_React$PureComponent) {
|
|
13434
|
+
_inherits(Invoice, _React$PureComponent);
|
|
12658
13435
|
|
|
12659
|
-
var _super = _createSuper(
|
|
13436
|
+
var _super = _createSuper(Invoice);
|
|
12660
13437
|
|
|
12661
|
-
function
|
|
12662
|
-
_classCallCheck(this,
|
|
13438
|
+
function Invoice() {
|
|
13439
|
+
_classCallCheck(this, Invoice);
|
|
12663
13440
|
|
|
12664
13441
|
return _super.apply(this, arguments);
|
|
12665
13442
|
}
|
|
12666
13443
|
|
|
12667
|
-
_createClass(
|
|
13444
|
+
_createClass(Invoice, [{
|
|
12668
13445
|
key: "render",
|
|
12669
13446
|
value:
|
|
12670
13447
|
/** 控制器 */
|
|
@@ -12687,18 +13464,18 @@ var default_1 = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
12687
13464
|
}
|
|
12688
13465
|
}]);
|
|
12689
13466
|
|
|
12690
|
-
return
|
|
13467
|
+
return Invoice;
|
|
12691
13468
|
}(React.PureComponent);
|
|
12692
13469
|
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
13470
|
+
Invoice.InvoiceController = InvoiceController;
|
|
13471
|
+
Invoice.InvoiceHeader = InvoiceHeader;
|
|
13472
|
+
Invoice.GoodsList = GoodsList;
|
|
13473
|
+
Invoice.Seller = Buyer;
|
|
13474
|
+
Invoice.Sign = Sign;
|
|
13475
|
+
Invoice.Buyer = Buyer$1;
|
|
13476
|
+
Invoice.idGenerator = idGenerator;
|
|
12700
13477
|
|
|
12701
|
-
|
|
13478
|
+
Invoice.useInvoiceController = function () {
|
|
12702
13479
|
return React.useContext(InvoiceContext);
|
|
12703
13480
|
};
|
|
12704
13481
|
|
|
@@ -12730,7 +13507,7 @@ var Main$3 = function Main(props) {
|
|
|
12730
13507
|
/** 销售方 */
|
|
12731
13508
|
, props.sign || /*#__PURE__*/React.createElement(Sign, null)
|
|
12732
13509
|
/** 落款 */
|
|
12733
|
-
, props.footExpand), /*#__PURE__*/React.createElement(ImportBuyerDrawer, null), /*#__PURE__*/React.createElement(ImportGoodsDrawer, null), /*#__PURE__*/React.createElement(EndowCodeDrawer, null));
|
|
13510
|
+
, props.footExpand), /*#__PURE__*/React.createElement(ImportBuyerDrawer, null), /*#__PURE__*/React.createElement(ImportGoodsDrawer, null), /*#__PURE__*/React.createElement(EndowCodeDrawer, null), /*#__PURE__*/React.createElement(AddComparisonDrawer, null));
|
|
12734
13511
|
};
|
|
12735
13512
|
|
|
12736
|
-
export {
|
|
13513
|
+
export { Invoice, InvoiceController };
|