kts-component-invoice-operate 3.2.153 → 3.2.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +6 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.d.ts +4 -0
- package/dist/Invoice/InvoiceController/index.d.ts +2 -0
- package/dist/Invoice/_test/children/index.d.ts +4 -0
- package/dist/Invoice/ui/default/GoodsList/hook/useColumns/ui/Expand/index.d.ts +6 -0
- package/dist/Invoice/ui/default/GoodsList/hook/useRowSelection/index.d.ts +6 -0
- package/dist/index.esm.js +498 -185
- package/dist/index.js +497 -184
- package/docs-dist/static/I001.4ff48f20.svg +1 -0
- package/docs-dist/static/I002.38b94da1.svg +1 -0
- package/docs-dist/umi.css +1 -1
- package/docs-dist/umi.js +1 -1
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +9 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +6 -0
- package/src/Invoice/InvoiceController/fns/saveEditGood.ts +1 -1
- package/src/Invoice/InvoiceController/index.ts +4 -0
- package/src/Invoice/_test/children/index.tsx +203 -0
- package/src/Invoice/index.md +3 -0
- package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +39 -3
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +15 -2
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Expand/index.tsx +53 -0
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Expand/svg/I001.svg +1 -0
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/Expand/svg/I002.svg +1 -0
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +1 -0
- package/src/Invoice/ui/default/GoodsList/hook/useOnRow/index.tsx +13 -0
- package/src/Invoice/ui/default/GoodsList/hook/useRowSelection/index.tsx +8 -2
- package/src/Invoice/ui/default/GoodsList/index.less +8 -1
- package/src/Invoice/ui/default/GoodsList/ui/TableVirtual/index.tsx +35 -12
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +14 -11
- package/src/Invoice/ui/digtal/GoodsList/hook/useOnRow/index.tsx +13 -1
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import GreyReactBox, { decorator } from 'grey-react-box';
|
|
|
4
4
|
import { chain as chain$1, bignumber, format as format$1, create, all, equal } from 'mathjs';
|
|
5
5
|
import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover as Popover$1, Table as Table$1, Tree, Modal as Modal$1, Row as Row$2, Col as Col$2 } from 'kts-components-antd-x3';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
|
-
import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Dropdown as Dropdown$1, Row, Col,
|
|
7
|
+
import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Dropdown as Dropdown$1, Row, Col, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal, Tree as Tree$1 } from 'kts-xui';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { Table } from 'kts-components-antd-x4-v4';
|
|
10
10
|
import { render } from 'react-dom';
|
|
@@ -1094,6 +1094,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
1094
1094
|
this.goodMax = void 0;
|
|
1095
1095
|
this.isSwitchTax = void 0;
|
|
1096
1096
|
this.isRecalculateWhenSwitchTax = false;
|
|
1097
|
+
this.isUpdateGoodsTaxRateList = false;
|
|
1097
1098
|
this.isAddDiscount = void 0;
|
|
1098
1099
|
this.isAddRow = true;
|
|
1099
1100
|
this.isRemRow = true;
|
|
@@ -1110,6 +1111,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
1110
1111
|
this.searchValue = '';
|
|
1111
1112
|
this.goodsList = [];
|
|
1112
1113
|
this.goodsMap = new Map();
|
|
1114
|
+
this.expandedRowKeys = [];
|
|
1113
1115
|
this.goodsMenuExpand = [];
|
|
1114
1116
|
this.amountIncludeTax = void 0;
|
|
1115
1117
|
this.amountExcludeTax = void 0;
|
|
@@ -9738,6 +9740,7 @@ var InvoiceController = /*#__PURE__*/function (_InvoiceControllerFor) {
|
|
|
9738
9740
|
_this.getGoodsList = void 0;
|
|
9739
9741
|
_this.getTaxCategoryCodeList = void 0;
|
|
9740
9742
|
_this.getGoodsSearch = getGoodsSearch;
|
|
9743
|
+
_this.getGoodsTaxRateList = void 0;
|
|
9741
9744
|
return _this;
|
|
9742
9745
|
} // ----------------- 发票头 模块相关 -----------------
|
|
9743
9746
|
|
|
@@ -10047,7 +10050,12 @@ var css_248z$2 = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {
|
|
|
10047
10050
|
styleInject(css_248z$2);
|
|
10048
10051
|
|
|
10049
10052
|
function TableVirtual (props) {
|
|
10050
|
-
var _props$
|
|
10053
|
+
var _props$dataSource;
|
|
10054
|
+
|
|
10055
|
+
var controller = Invoice.useInvoiceController();
|
|
10056
|
+
var expandedRowKeys = controller.useMemo(function (s) {
|
|
10057
|
+
return s.goodsListState.expandedRowKeys;
|
|
10058
|
+
}, []);
|
|
10051
10059
|
|
|
10052
10060
|
var _React$useState = React.useState(null),
|
|
10053
10061
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -10086,14 +10094,39 @@ function TableVirtual (props) {
|
|
|
10086
10094
|
}
|
|
10087
10095
|
|
|
10088
10096
|
return placeholder;
|
|
10089
|
-
}, [self, tableBody]);
|
|
10097
|
+
}, [self, tableBody]);
|
|
10098
|
+
/** 处理扩展行 */
|
|
10099
|
+
|
|
10100
|
+
var goodsList = React.useMemo(function () {
|
|
10101
|
+
if (!props.dataSource) return [];
|
|
10102
|
+
var gl = props.dataSource.map(function (e) {
|
|
10103
|
+
return _objectSpread2(_objectSpread2({}, e), {}, {
|
|
10104
|
+
level: 0
|
|
10105
|
+
});
|
|
10106
|
+
});
|
|
10107
|
+
|
|
10108
|
+
for (var i = 0; i < gl.length; i++) {
|
|
10109
|
+
var e = gl[i];
|
|
10110
|
+
|
|
10111
|
+
if (expandedRowKeys.includes(e.$index) && e.children) {
|
|
10112
|
+
var c = e.children.map(function (t) {
|
|
10113
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
10114
|
+
level: 1
|
|
10115
|
+
});
|
|
10116
|
+
});
|
|
10117
|
+
gl.splice.apply(gl, [i + 1, 0].concat(_toConsumableArray(c)));
|
|
10118
|
+
}
|
|
10119
|
+
}
|
|
10120
|
+
|
|
10121
|
+
return gl;
|
|
10122
|
+
}, [props.dataSource, expandedRowKeys]); // 设置占位dom的搞
|
|
10090
10123
|
|
|
10091
10124
|
var placeholderHeight = React.useMemo(function () {
|
|
10092
|
-
if (!self || !rowHeight || !
|
|
10093
|
-
var placeholderHeight = rowHeight *
|
|
10125
|
+
if (!self || !rowHeight || !goodsList || !placeholder) return;
|
|
10126
|
+
var placeholderHeight = rowHeight * goodsList.length;
|
|
10094
10127
|
placeholder.style.height = "".concat(placeholderHeight, "px");
|
|
10095
10128
|
return placeholderHeight;
|
|
10096
|
-
}, [self, rowHeight,
|
|
10129
|
+
}, [self, rowHeight, goodsList, placeholder]);
|
|
10097
10130
|
/** 可以容纳的行数 */
|
|
10098
10131
|
|
|
10099
10132
|
var rowSize = React.useMemo(function () {
|
|
@@ -10102,20 +10135,17 @@ function TableVirtual (props) {
|
|
|
10102
10135
|
}, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
|
|
10103
10136
|
|
|
10104
10137
|
var dataSource = React.useMemo(function () {
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10109
|
-
if (!rowSize) return [props.dataSource[0]];
|
|
10110
|
-
return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
|
|
10111
|
-
}, [props.dataSource, pointer, rowSize]); // 监听滚动
|
|
10138
|
+
if (goodsList.length < 10) return goodsList;
|
|
10139
|
+
if (!rowSize) return [goodsList[0]];
|
|
10140
|
+
return goodsList === null || goodsList === void 0 ? void 0 : goodsList.slice(pointer, pointer + 2 * rowSize);
|
|
10141
|
+
}, [pointer, rowSize, goodsList]); // 监听滚动
|
|
10112
10142
|
|
|
10113
10143
|
React.useEffect(function () {
|
|
10114
|
-
if (!self || !placeholder || !
|
|
10144
|
+
if (!self || !placeholder || !goodsList || !rowHeight || !tableBody) return;
|
|
10115
10145
|
|
|
10116
10146
|
var onScroll = function onScroll() {
|
|
10117
|
-
if (!
|
|
10118
|
-
setPointer(Math.floor((
|
|
10147
|
+
if (!goodsList || !tableBody) return;
|
|
10148
|
+
setPointer(Math.floor((goodsList.length - rowSize) * (tableBody.scrollTop / (placeholder.clientHeight - tableBody.clientHeight))));
|
|
10119
10149
|
};
|
|
10120
10150
|
|
|
10121
10151
|
onScroll();
|
|
@@ -10123,7 +10153,7 @@ function TableVirtual (props) {
|
|
|
10123
10153
|
return function () {
|
|
10124
10154
|
tableBody.removeEventListener('scroll', onScroll);
|
|
10125
10155
|
};
|
|
10126
|
-
}, [self, placeholder,
|
|
10156
|
+
}, [self, placeholder, goodsList, rowHeight, rowSize]); // 移动列表
|
|
10127
10157
|
|
|
10128
10158
|
React.useEffect(function () {
|
|
10129
10159
|
if (!self) return;
|
|
@@ -10136,7 +10166,8 @@ function TableVirtual (props) {
|
|
|
10136
10166
|
var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
|
|
10137
10167
|
if (!cont) return;
|
|
10138
10168
|
cont.scrollTop = 0;
|
|
10139
|
-
}, [(_props$
|
|
10169
|
+
}, [(_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.length]); // console.log('===> pointer', pointer, dataSource);
|
|
10170
|
+
|
|
10140
10171
|
return /*#__PURE__*/React.createElement("span", {
|
|
10141
10172
|
className: "kts-invoice-operate-goods-table-virtual",
|
|
10142
10173
|
ref: function ref(e) {
|
|
@@ -11151,6 +11182,10 @@ var RowMenu = (function (props) {
|
|
|
11151
11182
|
}));
|
|
11152
11183
|
}, [itemList]);
|
|
11153
11184
|
|
|
11185
|
+
if (props.goods.level && props.goods.level > 0) {
|
|
11186
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
11187
|
+
}
|
|
11188
|
+
|
|
11154
11189
|
if (itemList.length === 0) {
|
|
11155
11190
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
11156
11191
|
}
|
|
@@ -13009,6 +13044,129 @@ function DragDiv(props) {
|
|
|
13009
13044
|
}, /*#__PURE__*/React.createElement("span", null, props.itemName), /*#__PURE__*/React.createElement("span", null, props.itemModelName), /*#__PURE__*/React.createElement("span", null, props.unit));
|
|
13010
13045
|
}
|
|
13011
13046
|
|
|
13047
|
+
var _path$4, _path2$1, _path3$1;
|
|
13048
|
+
|
|
13049
|
+
function _extends$4() { _extends$4 = 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$4.apply(this, arguments); }
|
|
13050
|
+
|
|
13051
|
+
function SvgI001$1(props) {
|
|
13052
|
+
return /*#__PURE__*/createElement("svg", _extends$4({
|
|
13053
|
+
className: "I001_svg__icon",
|
|
13054
|
+
viewBox: "0 0 1024 1024",
|
|
13055
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13056
|
+
width: 200,
|
|
13057
|
+
height: 200
|
|
13058
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/createElement("path", {
|
|
13059
|
+
d: "M879.973 997.088H146.455c-67.235 0-122.213-54.978-122.213-122.213V141.236c0-67.235 54.978-122.212 122.213-122.212h733.639c67.235 0 122.212 54.977 122.212 122.212v733.64c0 67.113-54.977 122.212-122.333 122.212zM146.455 80.069c-36.652 0-61.167 24.394-61.167 61.167v733.64c0 36.65 24.394 61.166 61.167 61.166h733.639c36.651 0 61.167-24.394 61.167-61.167V141.236c0-36.651-24.394-61.167-61.167-61.167h-733.64zm0 0"
|
|
13060
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/createElement("path", {
|
|
13061
|
+
d: "M757.76 538.578H268.667c-18.326 0-30.583-12.257-30.583-30.583s12.257-30.583 30.583-30.583H757.76c18.326 0 30.583 12.257 30.583 30.583s-12.257 30.583-30.583 30.583zm0 0"
|
|
13062
|
+
})), _path3$1 || (_path3$1 = /*#__PURE__*/createElement("path", {
|
|
13063
|
+
d: "M513.214 783.125c-18.326 0-30.584-12.258-30.584-30.584V263.45c0-18.326 12.258-30.584 30.584-30.584s30.583 12.258 30.583 30.584V752.54c0 18.326-12.258 30.584-30.583 30.584zm0 0"
|
|
13064
|
+
})));
|
|
13065
|
+
}
|
|
13066
|
+
|
|
13067
|
+
var _path$5, _path2$2;
|
|
13068
|
+
|
|
13069
|
+
function _extends$5() { _extends$5 = 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$5.apply(this, arguments); }
|
|
13070
|
+
|
|
13071
|
+
function SvgI002(props) {
|
|
13072
|
+
return /*#__PURE__*/createElement("svg", _extends$5({
|
|
13073
|
+
className: "I002_svg__icon",
|
|
13074
|
+
viewBox: "0 0 1024 1024",
|
|
13075
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13076
|
+
width: 200,
|
|
13077
|
+
height: 200
|
|
13078
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/createElement("path", {
|
|
13079
|
+
d: "M879.973 997.088H146.455c-67.235 0-122.213-54.978-122.213-122.213V141.236c0-67.235 54.978-122.212 122.213-122.212h733.639c67.235 0 122.212 54.977 122.212 122.212v733.64c0 67.113-54.977 122.212-122.333 122.212zM146.455 80.069c-36.652 0-61.167 24.394-61.167 61.167v733.64c0 36.65 24.394 61.166 61.167 61.166h733.639c36.651 0 61.167-24.394 61.167-61.167V141.236c0-36.651-24.394-61.167-61.167-61.167h-733.64zm0 0"
|
|
13080
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/createElement("path", {
|
|
13081
|
+
d: "M757.76 538.578H268.667c-18.326 0-30.583-12.257-30.583-30.583s12.257-30.583 30.583-30.583H757.76c18.326 0 30.583 12.257 30.583 30.583s-12.257 30.583-30.583 30.583zm0 0"
|
|
13082
|
+
})));
|
|
13083
|
+
}
|
|
13084
|
+
|
|
13085
|
+
function Expand(props) {
|
|
13086
|
+
var _goodsMap$get;
|
|
13087
|
+
|
|
13088
|
+
var record = props.record;
|
|
13089
|
+
var controller = Invoice.useInvoiceController();
|
|
13090
|
+
var goodsMap = controller.useMemo(function (s) {
|
|
13091
|
+
return s.goodsListState.goodsMap;
|
|
13092
|
+
}, []);
|
|
13093
|
+
var expandedRowKeys = controller.useMemo(function (s) {
|
|
13094
|
+
return s.goodsListState.expandedRowKeys;
|
|
13095
|
+
}, []);
|
|
13096
|
+
|
|
13097
|
+
if ((_goodsMap$get = goodsMap.get(record.$index)) === null || _goodsMap$get === void 0 ? void 0 : _goodsMap$get.children) {
|
|
13098
|
+
if (expandedRowKeys.includes(record.$index)) {
|
|
13099
|
+
return /*#__PURE__*/React.createElement(Button$1, {
|
|
13100
|
+
type: 'text',
|
|
13101
|
+
style: {
|
|
13102
|
+
width: 'auto',
|
|
13103
|
+
color: "#0074ff"
|
|
13104
|
+
},
|
|
13105
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
13106
|
+
component: SvgI002
|
|
13107
|
+
}),
|
|
13108
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
13109
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, e) {
|
|
13110
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13111
|
+
while (1) {
|
|
13112
|
+
switch (_context.prev = _context.next) {
|
|
13113
|
+
case 0:
|
|
13114
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
13115
|
+
s.goodsListState.expandedRowKeys = s.goodsListState.expandedRowKeys.filter(function (e) {
|
|
13116
|
+
return e !== record.$index;
|
|
13117
|
+
});
|
|
13118
|
+
|
|
13119
|
+
case 2:
|
|
13120
|
+
case "end":
|
|
13121
|
+
return _context.stop();
|
|
13122
|
+
}
|
|
13123
|
+
}
|
|
13124
|
+
}, _callee);
|
|
13125
|
+
}));
|
|
13126
|
+
|
|
13127
|
+
return function (_x, _x2) {
|
|
13128
|
+
return _ref.apply(this, arguments);
|
|
13129
|
+
};
|
|
13130
|
+
}())
|
|
13131
|
+
});
|
|
13132
|
+
} else {
|
|
13133
|
+
return /*#__PURE__*/React.createElement(Button$1, {
|
|
13134
|
+
type: 'text',
|
|
13135
|
+
style: {
|
|
13136
|
+
width: 'auto',
|
|
13137
|
+
color: "#0074ff"
|
|
13138
|
+
},
|
|
13139
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
13140
|
+
component: SvgI001$1
|
|
13141
|
+
}),
|
|
13142
|
+
onClick: controller.pipeline( /*#__PURE__*/function () {
|
|
13143
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s, e) {
|
|
13144
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
13145
|
+
while (1) {
|
|
13146
|
+
switch (_context2.prev = _context2.next) {
|
|
13147
|
+
case 0:
|
|
13148
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
13149
|
+
s.goodsListState.expandedRowKeys = [].concat(_toConsumableArray(s.goodsListState.expandedRowKeys), [record.$index]);
|
|
13150
|
+
|
|
13151
|
+
case 2:
|
|
13152
|
+
case "end":
|
|
13153
|
+
return _context2.stop();
|
|
13154
|
+
}
|
|
13155
|
+
}
|
|
13156
|
+
}, _callee2);
|
|
13157
|
+
}));
|
|
13158
|
+
|
|
13159
|
+
return function (_x3, _x4) {
|
|
13160
|
+
return _ref2.apply(this, arguments);
|
|
13161
|
+
};
|
|
13162
|
+
}())
|
|
13163
|
+
});
|
|
13164
|
+
}
|
|
13165
|
+
} else {
|
|
13166
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
13167
|
+
}
|
|
13168
|
+
}
|
|
13169
|
+
|
|
13012
13170
|
var useColumns = (function (form) {
|
|
13013
13171
|
var getFieldDecorator = form.getFieldDecorator,
|
|
13014
13172
|
getFieldValue = form.getFieldValue;
|
|
@@ -13046,6 +13204,11 @@ var useColumns = (function (form) {
|
|
|
13046
13204
|
var editGood = controller.useMemo(function (e) {
|
|
13047
13205
|
return e.goodsListState.editGood;
|
|
13048
13206
|
}, []);
|
|
13207
|
+
/** 正在编辑的货物 */
|
|
13208
|
+
|
|
13209
|
+
var goodsList = controller.useMemo(function (e) {
|
|
13210
|
+
return e.goodsListState.goodsList;
|
|
13211
|
+
}, []);
|
|
13049
13212
|
/** 商品表格隐藏列 */
|
|
13050
13213
|
|
|
13051
13214
|
var columnshide = controller.useMemo(function (e) {
|
|
@@ -13139,6 +13302,16 @@ var useColumns = (function (form) {
|
|
|
13139
13302
|
record: record
|
|
13140
13303
|
});
|
|
13141
13304
|
}
|
|
13305
|
+
}, {
|
|
13306
|
+
title: ' ',
|
|
13307
|
+
key: 'expand',
|
|
13308
|
+
width: 40,
|
|
13309
|
+
align: 'center',
|
|
13310
|
+
render: function render(_, record) {
|
|
13311
|
+
return /*#__PURE__*/React.createElement(Expand, {
|
|
13312
|
+
record: record
|
|
13313
|
+
});
|
|
13314
|
+
}
|
|
13142
13315
|
}, {
|
|
13143
13316
|
title: '序号',
|
|
13144
13317
|
key: 'serialNo',
|
|
@@ -13836,7 +14009,7 @@ var useColumns = (function (form) {
|
|
|
13836
14009
|
setChangeField('taxRate');
|
|
13837
14010
|
onChangeTaxRate(controller, form, record);
|
|
13838
14011
|
}
|
|
13839
|
-
}, taxRateList.map(function (e, i) {
|
|
14012
|
+
}, (record.goodsTaxRateList || taxRateList).map(function (e, i) {
|
|
13840
14013
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
13841
14014
|
key: i,
|
|
13842
14015
|
value: e
|
|
@@ -13949,6 +14122,11 @@ var useColumns = (function (form) {
|
|
|
13949
14122
|
}) // 是否启动拖拽
|
|
13950
14123
|
.filter(function (e) {
|
|
13951
14124
|
return e.key !== 'drag' || isStart;
|
|
14125
|
+
}) // 是否启动展开
|
|
14126
|
+
.filter(function (e) {
|
|
14127
|
+
return e.key === 'expand' ? goodsList.some(function (e) {
|
|
14128
|
+
return !!e.children;
|
|
14129
|
+
}) : true;
|
|
13952
14130
|
}) // 只读
|
|
13953
14131
|
.filter(function (e) {
|
|
13954
14132
|
if (model === 'readOnly') {
|
|
@@ -13961,7 +14139,7 @@ var useColumns = (function (form) {
|
|
|
13961
14139
|
ellipsis: true
|
|
13962
14140
|
});
|
|
13963
14141
|
});
|
|
13964
|
-
}, [isTaxIncluded, editGood, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide, isStart]);
|
|
14142
|
+
}, [isTaxIncluded, editGood, goodsList, controller, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, columnshide, isStart]);
|
|
13965
14143
|
return columns;
|
|
13966
14144
|
});
|
|
13967
14145
|
/** 字段 */
|
|
@@ -14168,7 +14346,7 @@ var useOnRow = (function () {
|
|
|
14168
14346
|
while (1) {
|
|
14169
14347
|
switch (_context2.prev = _context2.next) {
|
|
14170
14348
|
case 0:
|
|
14171
|
-
if (!(
|
|
14349
|
+
if (!(record.level && record.level > 0)) {
|
|
14172
14350
|
_context2.next = 2;
|
|
14173
14351
|
break;
|
|
14174
14352
|
}
|
|
@@ -14176,38 +14354,58 @@ var useOnRow = (function () {
|
|
|
14176
14354
|
return _context2.abrupt("return");
|
|
14177
14355
|
|
|
14178
14356
|
case 2:
|
|
14357
|
+
if (!(model === 'readOnly')) {
|
|
14358
|
+
_context2.next = 4;
|
|
14359
|
+
break;
|
|
14360
|
+
}
|
|
14361
|
+
|
|
14362
|
+
return _context2.abrupt("return");
|
|
14363
|
+
|
|
14364
|
+
case 4:
|
|
14179
14365
|
editGood = controller.state.goodsListState.editGood;
|
|
14180
14366
|
|
|
14181
14367
|
if (!(record.lineAttribute !== LineAttributeType$1.正常)) {
|
|
14182
|
-
_context2.next =
|
|
14368
|
+
_context2.next = 7;
|
|
14183
14369
|
break;
|
|
14184
14370
|
}
|
|
14185
14371
|
|
|
14186
14372
|
return _context2.abrupt("return");
|
|
14187
14373
|
|
|
14188
|
-
case
|
|
14374
|
+
case 7:
|
|
14189
14375
|
if (!editGood) {
|
|
14190
|
-
_context2.next =
|
|
14376
|
+
_context2.next = 22;
|
|
14191
14377
|
break;
|
|
14192
14378
|
}
|
|
14193
14379
|
|
|
14194
14380
|
if (!(editGood.$index === record.$index)) {
|
|
14195
|
-
_context2.next =
|
|
14381
|
+
_context2.next = 10;
|
|
14196
14382
|
break;
|
|
14197
14383
|
}
|
|
14198
14384
|
|
|
14199
14385
|
return _context2.abrupt("return");
|
|
14200
14386
|
|
|
14201
|
-
case 8:
|
|
14202
|
-
_context2.next = 10;
|
|
14203
|
-
return controller.saveEditGood();
|
|
14204
|
-
|
|
14205
14387
|
case 10:
|
|
14206
14388
|
_context2.next = 12;
|
|
14207
|
-
return controller.
|
|
14389
|
+
return controller.saveEditGood();
|
|
14208
14390
|
|
|
14209
14391
|
case 12:
|
|
14210
14392
|
_context2.next = 14;
|
|
14393
|
+
return controller.wait();
|
|
14394
|
+
|
|
14395
|
+
case 14:
|
|
14396
|
+
if (!(controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList)) {
|
|
14397
|
+
_context2.next = 18;
|
|
14398
|
+
break;
|
|
14399
|
+
}
|
|
14400
|
+
|
|
14401
|
+
_context2.next = 17;
|
|
14402
|
+
return controller.getGoodsTaxRateList(record.taxClassificationCode);
|
|
14403
|
+
|
|
14404
|
+
case 17:
|
|
14405
|
+
record.goodsTaxRateList = _context2.sent;
|
|
14406
|
+
|
|
14407
|
+
case 18:
|
|
14408
|
+
_context2.next = 20;
|
|
14211
14409
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
14212
14410
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
14213
14411
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -14237,15 +14435,27 @@ var useOnRow = (function () {
|
|
|
14237
14435
|
};
|
|
14238
14436
|
}())();
|
|
14239
14437
|
|
|
14240
|
-
case
|
|
14241
|
-
_context2.next =
|
|
14438
|
+
case 20:
|
|
14439
|
+
_context2.next = 28;
|
|
14242
14440
|
break;
|
|
14243
14441
|
|
|
14244
|
-
case
|
|
14245
|
-
|
|
14442
|
+
case 22:
|
|
14443
|
+
if (!(controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList)) {
|
|
14444
|
+
_context2.next = 26;
|
|
14445
|
+
break;
|
|
14446
|
+
}
|
|
14447
|
+
|
|
14448
|
+
_context2.next = 25;
|
|
14449
|
+
return controller.getGoodsTaxRateList(record.taxClassificationCode);
|
|
14450
|
+
|
|
14451
|
+
case 25:
|
|
14452
|
+
record.goodsTaxRateList = _context2.sent;
|
|
14453
|
+
|
|
14454
|
+
case 26:
|
|
14455
|
+
_context2.next = 28;
|
|
14246
14456
|
return controller.setEditGood(record);
|
|
14247
14457
|
|
|
14248
|
-
case
|
|
14458
|
+
case 28:
|
|
14249
14459
|
case "end":
|
|
14250
14460
|
return _context2.stop();
|
|
14251
14461
|
}
|
|
@@ -14623,11 +14833,20 @@ var useRowSelection = (function () {
|
|
|
14623
14833
|
columnWidth: 45,
|
|
14624
14834
|
columnTitle: columnTitle,
|
|
14625
14835
|
onSelect: onSelect,
|
|
14626
|
-
selectedRowKeys: selectedRowKeys
|
|
14836
|
+
selectedRowKeys: selectedRowKeys,
|
|
14837
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
14838
|
+
// console.log('===> getCheckboxProps', record, record.level)
|
|
14839
|
+
return {
|
|
14840
|
+
disabled: record.level > 0,
|
|
14841
|
+
style: record.level > 0 ? {
|
|
14842
|
+
display: 'none'
|
|
14843
|
+
} : undefined
|
|
14844
|
+
};
|
|
14845
|
+
}
|
|
14627
14846
|
};
|
|
14628
14847
|
});
|
|
14629
14848
|
|
|
14630
|
-
var css_248z$a = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n display: flex;\n gap: 10px;\n padding-right: 10px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n gap: 5px;\n}\n.kts-invoice-operate-goods-list .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-be-discount .ktsAntX-table-cell,\n.kts-invoice-operate-goods-list .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-discount .ktsAntX-table-cell {\n background: #f5f5f5;\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-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-form-item-control {\n line-height: 1;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-input:focus {\n box-shadow: none;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-input,\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-select-selection--single {\n border: none;\n border-radius: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-form-explain {\n display: none;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-checked .ktsAntX-checkbox-inner::after {\n width: 5px;\n height: 10px;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-item-control.has-error {\n border: 1px solid #f00;\n}\n";
|
|
14849
|
+
var css_248z$a = ".kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-table-tax-rate .ktsAnt3x-select-selection-selected-value {\n float: right;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able {\n display: flex;\n padding: 10px;\n border-bottom: 1px solid #dcdcdc;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list {\n flex: 1;\n display: flex;\n gap: 10px;\n padding-right: 10px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button {\n padding-left: 10px;\n padding-right: 10px;\n border-radius: 12px;\n color: #0074ff;\n border: 1px solid #0074ff;\n height: 24px;\n line-height: 22px;\n cursor: pointer;\n font-size: 12px;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-list button[disabled] {\n color: rgba(0, 0, 0, 0.25);\n border: 1px solid;\n}\n.kts-invoice-operate-goods-list .kts-invoice-operate-goods-list-able-extend {\n flex: none;\n display: flex;\n gap: 5px;\n}\n.kts-invoice-operate-goods-list .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-be-discount .ktsAntX-table-cell,\n.kts-invoice-operate-goods-list .ktsAntX-table .ktsAntX-table-row.kts-invoice-operate-goods-discount .ktsAntX-table-cell {\n background: #f5f5f5;\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-search-protrude {\n background: #ff0;\n color: #000;\n font-weight: bold;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-form-item {\n margin: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-form-item-control {\n line-height: 1;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-input:focus {\n box-shadow: none;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-input,\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-select-selection--single {\n border: none;\n border-radius: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAnt3x-form-explain {\n display: none;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-checked .ktsAntX-checkbox-inner::after {\n width: 5px;\n height: 10px;\n}\n.kts-invoice-operate-goods-list-table .ktsAntX-table-row-indent + .ktsAntX-table-row-expand-icon {\n display: none;\n}\n.kts-invoice-operate-goods-list-table .ktsAnt3x-form-item-control.has-error {\n border: 1px solid #f00;\n}\n";
|
|
14631
14850
|
styleInject(css_248z$a);
|
|
14632
14851
|
|
|
14633
14852
|
var keys$1 = {};
|
|
@@ -16818,42 +17037,42 @@ var Tag = /*#__PURE__*/function (_React$Component2) {
|
|
|
16818
17037
|
return Tag;
|
|
16819
17038
|
}(React.Component);
|
|
16820
17039
|
|
|
16821
|
-
var _path$
|
|
17040
|
+
var _path$6;
|
|
16822
17041
|
|
|
16823
|
-
function _extends$
|
|
17042
|
+
function _extends$6() { _extends$6 = 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$6.apply(this, arguments); }
|
|
16824
17043
|
|
|
16825
17044
|
function SvgArrowUp(props) {
|
|
16826
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
17045
|
+
return /*#__PURE__*/createElement("svg", _extends$6({
|
|
16827
17046
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16828
17047
|
width: 13,
|
|
16829
17048
|
height: 13,
|
|
16830
17049
|
fill: "none"
|
|
16831
|
-
}, props), _path$
|
|
17050
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/createElement("path", {
|
|
16832
17051
|
d: "M9.557 8.573a.338.338 0 01-.252-.114L6.508 5.367 3.711 8.46a.333.333 0 01-.497.005.404.404 0 01-.005-.538l3.048-3.37a.339.339 0 01.251-.114c.095 0 .185.041.252.114l3.048 3.37a.404.404 0 01-.005.538.337.337 0 01-.246.11z"
|
|
16833
17052
|
})));
|
|
16834
17053
|
}
|
|
16835
17054
|
|
|
16836
|
-
var _path$
|
|
17055
|
+
var _path$7;
|
|
16837
17056
|
|
|
16838
|
-
function _extends$
|
|
17057
|
+
function _extends$7() { _extends$7 = 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$7.apply(this, arguments); }
|
|
16839
17058
|
|
|
16840
17059
|
function SvgArrowDown(props) {
|
|
16841
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
17060
|
+
return /*#__PURE__*/createElement("svg", _extends$7({
|
|
16842
17061
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16843
17062
|
width: 12,
|
|
16844
17063
|
height: 13,
|
|
16845
17064
|
fill: "none"
|
|
16846
|
-
}, props), _path$
|
|
17065
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/createElement("path", {
|
|
16847
17066
|
d: "M2.943 4.427c.092 0 .183.038.252.114l2.797 3.092L8.789 4.54a.333.333 0 01.497-.005.404.404 0 01.005.538l-3.048 3.37a.339.339 0 01-.251.114.339.339 0 01-.252-.114l-3.048-3.37a.404.404 0 01.005-.538.337.337 0 01.246-.11z"
|
|
16848
17067
|
})));
|
|
16849
17068
|
}
|
|
16850
17069
|
|
|
16851
17070
|
var _g, _defs$2;
|
|
16852
17071
|
|
|
16853
|
-
function _extends$
|
|
17072
|
+
function _extends$8() { _extends$8 = 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$8.apply(this, arguments); }
|
|
16854
17073
|
|
|
16855
17074
|
function SvgPlus(props) {
|
|
16856
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
17075
|
+
return /*#__PURE__*/createElement("svg", _extends$8({
|
|
16857
17076
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16858
17077
|
width: 16,
|
|
16859
17078
|
height: 15,
|
|
@@ -17633,10 +17852,10 @@ function TableVirtual$1 (props) {
|
|
|
17633
17852
|
|
|
17634
17853
|
var _g$1, _defs$3;
|
|
17635
17854
|
|
|
17636
|
-
function _extends$
|
|
17855
|
+
function _extends$9() { _extends$9 = 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$9.apply(this, arguments); }
|
|
17637
17856
|
|
|
17638
17857
|
function SvgFork(props) {
|
|
17639
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
17858
|
+
return /*#__PURE__*/createElement("svg", _extends$9({
|
|
17640
17859
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17641
17860
|
width: 16,
|
|
17642
17861
|
height: 16,
|
|
@@ -19240,18 +19459,18 @@ var TaxIncludedSwitch$1 = (function () {
|
|
|
19240
19459
|
}));
|
|
19241
19460
|
});
|
|
19242
19461
|
|
|
19243
|
-
var _path$
|
|
19462
|
+
var _path$8;
|
|
19244
19463
|
|
|
19245
|
-
function _extends$
|
|
19464
|
+
function _extends$a() { _extends$a = 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$a.apply(this, arguments); }
|
|
19246
19465
|
|
|
19247
19466
|
function SvgMagnifier$1(props) {
|
|
19248
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
19467
|
+
return /*#__PURE__*/createElement("svg", _extends$a({
|
|
19249
19468
|
className: "magnifier_svg__icon",
|
|
19250
19469
|
viewBox: "0 0 1024 1024",
|
|
19251
19470
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19252
19471
|
width: 200,
|
|
19253
19472
|
height: 200
|
|
19254
|
-
}, props), _path$
|
|
19473
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/createElement("path", {
|
|
19255
19474
|
d: "M985.781 918.594L820.773 765.526c27.373-32.973 49.655-69.577 66.437-109.258 22.933-54.219 34.56-111.795 34.56-171.13 0-59.333-11.627-116.91-34.56-171.13-22.143-52.354-53.838-99.365-94.2-139.729s-87.377-72.056-139.73-94.199c-54.219-22.933-111.795-34.561-171.13-34.561S365.24 57.148 311.022 80.08c-52.354 22.143-99.365 53.837-139.73 94.2s-72.057 87.375-94.2 139.73c-22.932 54.218-34.56 111.795-34.56 171.13 0 59.334 11.628 116.91 34.56 171.129 22.144 52.354 53.838 99.365 94.2 139.729s87.376 72.057 139.73 94.2c54.219 22.933 111.795 34.56 171.13 34.56s116.91-11.627 171.13-34.56c45.352-19.181 86.686-45.543 123.171-78.487l165.803 153.804a31.886 31.886 0 0021.756 8.54c8.593 0 17.163-3.442 23.467-10.238 12.019-12.956 11.26-33.205-1.698-45.223zm-503.63-57.836c-207.117 0-375.62-168.502-375.62-375.62 0-207.117 168.503-375.62 375.62-375.62s375.62 168.503 375.62 375.62c0 207.118-168.503 375.62-375.62 375.62z"
|
|
19256
19475
|
})));
|
|
19257
19476
|
}
|
|
@@ -19401,10 +19620,10 @@ function TableRow$1(props) {
|
|
|
19401
19620
|
|
|
19402
19621
|
var _g$2, _defs$4;
|
|
19403
19622
|
|
|
19404
|
-
function _extends$
|
|
19623
|
+
function _extends$b() { _extends$b = 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$b.apply(this, arguments); }
|
|
19405
19624
|
|
|
19406
19625
|
function SvgPlus$1(props) {
|
|
19407
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
19626
|
+
return /*#__PURE__*/createElement("svg", _extends$b({
|
|
19408
19627
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19409
19628
|
width: 16,
|
|
19410
19629
|
height: 15
|
|
@@ -19649,18 +19868,18 @@ function ItemNameInput$1(props) {
|
|
|
19649
19868
|
})));
|
|
19650
19869
|
}
|
|
19651
19870
|
|
|
19652
|
-
var _path$
|
|
19871
|
+
var _path$9;
|
|
19653
19872
|
|
|
19654
|
-
function _extends$
|
|
19873
|
+
function _extends$c() { _extends$c = 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$c.apply(this, arguments); }
|
|
19655
19874
|
|
|
19656
|
-
function SvgI001$
|
|
19657
|
-
return /*#__PURE__*/createElement("svg", _extends$
|
|
19875
|
+
function SvgI001$2(props) {
|
|
19876
|
+
return /*#__PURE__*/createElement("svg", _extends$c({
|
|
19658
19877
|
className: "I001_svg__icon",
|
|
19659
19878
|
viewBox: "0 0 1024 1024",
|
|
19660
19879
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19661
19880
|
width: 200,
|
|
19662
19881
|
height: 200
|
|
19663
|
-
}, props), _path$
|
|
19882
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/createElement("path", {
|
|
19664
19883
|
d: "M304.874-5.815h123.758v123.758H304.874V-5.815zm281.277 0H709.91v123.758H586.151V-5.815zM304.874 286.75h123.758v123.758H304.874V286.75zm281.277 0H709.91v123.758H586.151V286.75zM304.874 579.212h123.758V702.97H304.874V579.212zm281.277 0H709.91V702.97H586.151V579.212zM304.874 871.83h123.758v123.758H304.874V871.83zm281.277 0H709.91v123.758H586.151V871.83z"
|
|
19665
19884
|
})));
|
|
19666
19885
|
}
|
|
@@ -19961,7 +20180,7 @@ function Drag$2(props) {
|
|
|
19961
20180
|
className: "kts-invoice-operate-goods-list-itemName-drag",
|
|
19962
20181
|
onMouseOver: controller.saveEditGood
|
|
19963
20182
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19964
|
-
component: SvgI001$
|
|
20183
|
+
component: SvgI001$2
|
|
19965
20184
|
}));
|
|
19966
20185
|
}, [onMouseDown, controller]);
|
|
19967
20186
|
|
|
@@ -20032,6 +20251,11 @@ var useColumns$1 = (function (form) {
|
|
|
20032
20251
|
var model = controller.useMemo(function (e) {
|
|
20033
20252
|
return e.model;
|
|
20034
20253
|
}, []);
|
|
20254
|
+
/** 计算类型 */
|
|
20255
|
+
|
|
20256
|
+
var calculateType = controller.useMemo(function (e) {
|
|
20257
|
+
return e.goodsListState.calculateType;
|
|
20258
|
+
}, []);
|
|
20035
20259
|
/** 是否显示我方 */
|
|
20036
20260
|
|
|
20037
20261
|
var isMyShow = controller.useMemo(function (e) {
|
|
@@ -20158,7 +20382,7 @@ var useColumns$1 = (function (form) {
|
|
|
20158
20382
|
}, "\u9879\u76EE\u540D\u79F0"),
|
|
20159
20383
|
key: 'itemName',
|
|
20160
20384
|
render: function render(_, record) {
|
|
20161
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('itemName')) {
|
|
20385
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('itemName') && model !== 'prefab') {
|
|
20162
20386
|
return /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
20163
20387
|
style: {
|
|
20164
20388
|
display: 'flex'
|
|
@@ -20268,7 +20492,7 @@ var useColumns$1 = (function (form) {
|
|
|
20268
20492
|
key: 'itemModelName',
|
|
20269
20493
|
width: 119,
|
|
20270
20494
|
render: function render(_, record) {
|
|
20271
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('itemModelName')) {
|
|
20495
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('itemModelName') && model !== 'prefab') {
|
|
20272
20496
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('itemModelName', {
|
|
20273
20497
|
initialValue: isMyShow ? editGood.itemModelNameSelf : editGood.itemModelName,
|
|
20274
20498
|
rules: getReplenishRules('itemModelName')
|
|
@@ -20319,7 +20543,7 @@ var useColumns$1 = (function (form) {
|
|
|
20319
20543
|
key: 'unit',
|
|
20320
20544
|
width: 70,
|
|
20321
20545
|
render: function render(_, record) {
|
|
20322
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('unit')) {
|
|
20546
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('unit') && model !== 'prefab') {
|
|
20323
20547
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('unit', {
|
|
20324
20548
|
initialValue: editGood.unit,
|
|
20325
20549
|
rules: getReplenishRules('unit')
|
|
@@ -20377,7 +20601,7 @@ var useColumns$1 = (function (form) {
|
|
|
20377
20601
|
align: 'right',
|
|
20378
20602
|
width: 149,
|
|
20379
20603
|
render: function render(value, record) {
|
|
20380
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('quantity')) {
|
|
20604
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('quantity') && model !== 'prefab') {
|
|
20381
20605
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('quantity', {
|
|
20382
20606
|
initialValue: nonScientificNotation(editGood.quantity),
|
|
20383
20607
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -20472,7 +20696,7 @@ var useColumns$1 = (function (form) {
|
|
|
20472
20696
|
align: 'right',
|
|
20473
20697
|
width: 149,
|
|
20474
20698
|
render: function render(value, record) {
|
|
20475
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('priceIncludeTax')) {
|
|
20699
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('priceIncludeTax') && model !== 'prefab') {
|
|
20476
20700
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('priceIncludeTax', {
|
|
20477
20701
|
initialValue: nonScientificNotation(editGood.priceIncludeTax),
|
|
20478
20702
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -20547,7 +20771,7 @@ var useColumns$1 = (function (form) {
|
|
|
20547
20771
|
align: 'right',
|
|
20548
20772
|
width: 149,
|
|
20549
20773
|
render: function render(value, record) {
|
|
20550
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('priceExcludeTax')) {
|
|
20774
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('priceExcludeTax') && model !== 'prefab') {
|
|
20551
20775
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('priceExcludeTax', {
|
|
20552
20776
|
initialValue: nonScientificNotation(editGood.priceExcludeTax),
|
|
20553
20777
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -20622,7 +20846,7 @@ var useColumns$1 = (function (form) {
|
|
|
20622
20846
|
width: 119,
|
|
20623
20847
|
align: 'right',
|
|
20624
20848
|
render: function render(value, record) {
|
|
20625
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('lineAmountIncludeTax')) {
|
|
20849
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('lineAmountIncludeTax') && model !== 'prefab') {
|
|
20626
20850
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('lineAmountIncludeTax', {
|
|
20627
20851
|
initialValue: editGood.lineAmountIncludeTax,
|
|
20628
20852
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -20710,7 +20934,7 @@ var useColumns$1 = (function (form) {
|
|
|
20710
20934
|
align: 'right',
|
|
20711
20935
|
width: 119,
|
|
20712
20936
|
render: function render(value, record) {
|
|
20713
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('lineAmountExcludeTax')) {
|
|
20937
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('lineAmountExcludeTax') && model !== 'prefab') {
|
|
20714
20938
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('lineAmountExcludeTax', {
|
|
20715
20939
|
initialValue: editGood.lineAmountExcludeTax,
|
|
20716
20940
|
getValueFromEvent: onNumberValueChange,
|
|
@@ -20773,7 +20997,7 @@ var useColumns$1 = (function (form) {
|
|
|
20773
20997
|
align: 'right',
|
|
20774
20998
|
width: 70,
|
|
20775
20999
|
render: function render(value, record) {
|
|
20776
|
-
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('taxRate')) {
|
|
21000
|
+
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && !disableds.includes('taxRate') && !(model === 'prefab' && calculateType === '3')) {
|
|
20777
21001
|
return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('taxRate', {
|
|
20778
21002
|
initialValue: editGood.taxRate,
|
|
20779
21003
|
rules: [].concat(_toConsumableArray(getReplenishRules('taxRate')), [{
|
|
@@ -20797,7 +21021,7 @@ var useColumns$1 = (function (form) {
|
|
|
20797
21021
|
setChangeField('taxRate');
|
|
20798
21022
|
onChangeTaxRate$1(controller, form, record);
|
|
20799
21023
|
}
|
|
20800
|
-
}, taxRateList.map(function (e, i) {
|
|
21024
|
+
}, (record.goodsTaxRateList || taxRateList).map(function (e, i) {
|
|
20801
21025
|
return /*#__PURE__*/React.createElement(Select$1.Option, {
|
|
20802
21026
|
key: i,
|
|
20803
21027
|
value: e
|
|
@@ -20865,7 +21089,7 @@ var useColumns$1 = (function (form) {
|
|
|
20865
21089
|
ellipsis: true
|
|
20866
21090
|
});
|
|
20867
21091
|
});
|
|
20868
|
-
}, [isTaxIncluded, editGood, controller, taxRateList, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, isStart]); // React.useEffect(() => {
|
|
21092
|
+
}, [isTaxIncluded, editGood, controller, taxRateList, changeField, deduction, isMyShow, searchValue, model, columnsReplenish, isStart, calculateType]); // React.useEffect(() => {
|
|
20869
21093
|
// clearTimeout(t)
|
|
20870
21094
|
// const t = setTimeout(() => { setChangeField('') }, 1000);
|
|
20871
21095
|
// return () => { clearTimeout(t) }
|
|
@@ -21065,7 +21289,7 @@ var useOnRow$1 = (function () {
|
|
|
21065
21289
|
while (1) {
|
|
21066
21290
|
switch (_context2.prev = _context2.next) {
|
|
21067
21291
|
case 0:
|
|
21068
|
-
if (!(model === '
|
|
21292
|
+
if (!(model === 'readOnly')) {
|
|
21069
21293
|
_context2.next = 2;
|
|
21070
21294
|
break;
|
|
21071
21295
|
}
|
|
@@ -21073,46 +21297,50 @@ var useOnRow$1 = (function () {
|
|
|
21073
21297
|
return _context2.abrupt("return");
|
|
21074
21298
|
|
|
21075
21299
|
case 2:
|
|
21076
|
-
if (!(model === 'readOnly')) {
|
|
21077
|
-
_context2.next = 4;
|
|
21078
|
-
break;
|
|
21079
|
-
}
|
|
21080
|
-
|
|
21081
|
-
return _context2.abrupt("return");
|
|
21082
|
-
|
|
21083
|
-
case 4:
|
|
21084
21300
|
editGood = controller.state.goodsListState.editGood;
|
|
21085
21301
|
|
|
21086
21302
|
if (!(record.lineAttribute !== LineAttributeType$1.正常)) {
|
|
21087
|
-
_context2.next =
|
|
21303
|
+
_context2.next = 5;
|
|
21088
21304
|
break;
|
|
21089
21305
|
}
|
|
21090
21306
|
|
|
21091
21307
|
return _context2.abrupt("return");
|
|
21092
21308
|
|
|
21093
|
-
case
|
|
21309
|
+
case 5:
|
|
21094
21310
|
if (!editGood) {
|
|
21095
|
-
_context2.next =
|
|
21311
|
+
_context2.next = 20;
|
|
21096
21312
|
break;
|
|
21097
21313
|
}
|
|
21098
21314
|
|
|
21099
21315
|
if (!(editGood.$index === record.$index)) {
|
|
21100
|
-
_context2.next =
|
|
21316
|
+
_context2.next = 8;
|
|
21101
21317
|
break;
|
|
21102
21318
|
}
|
|
21103
21319
|
|
|
21104
21320
|
return _context2.abrupt("return");
|
|
21105
21321
|
|
|
21322
|
+
case 8:
|
|
21323
|
+
_context2.next = 10;
|
|
21324
|
+
return controller.saveEditGood();
|
|
21325
|
+
|
|
21106
21326
|
case 10:
|
|
21107
21327
|
_context2.next = 12;
|
|
21108
|
-
return controller.
|
|
21328
|
+
return controller.wait();
|
|
21109
21329
|
|
|
21110
21330
|
case 12:
|
|
21111
|
-
|
|
21112
|
-
|
|
21331
|
+
if (!(controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList)) {
|
|
21332
|
+
_context2.next = 16;
|
|
21333
|
+
break;
|
|
21334
|
+
}
|
|
21113
21335
|
|
|
21114
|
-
|
|
21115
|
-
|
|
21336
|
+
_context2.next = 15;
|
|
21337
|
+
return controller.getGoodsTaxRateList(record.taxClassificationCode);
|
|
21338
|
+
|
|
21339
|
+
case 15:
|
|
21340
|
+
record.goodsTaxRateList = _context2.sent;
|
|
21341
|
+
|
|
21342
|
+
case 16:
|
|
21343
|
+
_context2.next = 18;
|
|
21116
21344
|
return controller.pipeline( /*#__PURE__*/function () {
|
|
21117
21345
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s) {
|
|
21118
21346
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -21142,15 +21370,27 @@ var useOnRow$1 = (function () {
|
|
|
21142
21370
|
};
|
|
21143
21371
|
}())();
|
|
21144
21372
|
|
|
21145
|
-
case
|
|
21146
|
-
_context2.next =
|
|
21373
|
+
case 18:
|
|
21374
|
+
_context2.next = 26;
|
|
21147
21375
|
break;
|
|
21148
21376
|
|
|
21149
|
-
case
|
|
21150
|
-
|
|
21377
|
+
case 20:
|
|
21378
|
+
if (!(controller.getGoodsTaxRateList && record.taxClassificationCode && !record.goodsTaxRateList)) {
|
|
21379
|
+
_context2.next = 24;
|
|
21380
|
+
break;
|
|
21381
|
+
}
|
|
21382
|
+
|
|
21383
|
+
_context2.next = 23;
|
|
21384
|
+
return controller.getGoodsTaxRateList(record.taxClassificationCode);
|
|
21385
|
+
|
|
21386
|
+
case 23:
|
|
21387
|
+
record.goodsTaxRateList = _context2.sent;
|
|
21388
|
+
|
|
21389
|
+
case 24:
|
|
21390
|
+
_context2.next = 26;
|
|
21151
21391
|
return controller.setEditGood(record);
|
|
21152
21392
|
|
|
21153
|
-
case
|
|
21393
|
+
case 26:
|
|
21154
21394
|
case "end":
|
|
21155
21395
|
return _context2.stop();
|
|
21156
21396
|
}
|
|
@@ -23452,7 +23692,7 @@ var EndowCodeDrawer = (function () {
|
|
|
23452
23692
|
if (visible) {
|
|
23453
23693
|
controller.pipeline( /*#__PURE__*/function () {
|
|
23454
23694
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
|
|
23455
|
-
var endowcodeGoodIndex, good, getDefaultValue;
|
|
23695
|
+
var endowcodeGoodIndex, good, getDefaultValue, goodsTaxRateList;
|
|
23456
23696
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
23457
23697
|
while (1) {
|
|
23458
23698
|
switch (_context2.prev = _context2.next) {
|
|
@@ -23486,19 +23726,40 @@ var EndowCodeDrawer = (function () {
|
|
|
23486
23726
|
case 9:
|
|
23487
23727
|
_context2.t1 = _context2.sent;
|
|
23488
23728
|
(0, _context2.t0)(_context2.t1);
|
|
23489
|
-
_context2.next =
|
|
23729
|
+
_context2.next = 23;
|
|
23490
23730
|
break;
|
|
23491
23731
|
|
|
23492
23732
|
case 13:
|
|
23493
|
-
if (endowcodeGoodIndex.length === 1) {
|
|
23494
|
-
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23733
|
+
if (!(endowcodeGoodIndex.length === 1)) {
|
|
23734
|
+
_context2.next = 22;
|
|
23735
|
+
break;
|
|
23736
|
+
}
|
|
23737
|
+
|
|
23738
|
+
if (!(controller.state.goodsListState.isUpdateGoodsTaxRateList && controller.getGoodsTaxRateList && good.taxClassificationCode)) {
|
|
23739
|
+
_context2.next = 19;
|
|
23740
|
+
break;
|
|
23499
23741
|
}
|
|
23500
23742
|
|
|
23501
|
-
|
|
23743
|
+
_context2.next = 17;
|
|
23744
|
+
return controller.getGoodsTaxRateList(good.taxClassificationCode);
|
|
23745
|
+
|
|
23746
|
+
case 17:
|
|
23747
|
+
goodsTaxRateList = _context2.sent;
|
|
23748
|
+
good.goodsTaxRateList = goodsTaxRateList; // if (good.taxRate !== undefined && good.taxRate !== null && !goodsTaxRateList.includes(good.taxRate)) {
|
|
23749
|
+
// good.taxRate = undefined;
|
|
23750
|
+
// }
|
|
23751
|
+
|
|
23752
|
+
case 19:
|
|
23753
|
+
setDefaultValue(good);
|
|
23754
|
+
_context2.next = 23;
|
|
23755
|
+
break;
|
|
23756
|
+
|
|
23757
|
+
case 22:
|
|
23758
|
+
setDefaultValue({
|
|
23759
|
+
taxRate: good.taxRate
|
|
23760
|
+
});
|
|
23761
|
+
|
|
23762
|
+
case 23:
|
|
23502
23763
|
case "end":
|
|
23503
23764
|
return _context2.stop();
|
|
23504
23765
|
}
|
|
@@ -23564,12 +23825,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
23564
23825
|
/** 税率列表 */
|
|
23565
23826
|
|
|
23566
23827
|
var taxRateList = controller.useMemo(function (s) {
|
|
23567
|
-
return s.goodsListState.taxRateList
|
|
23568
|
-
return {
|
|
23569
|
-
label: "".concat(e, "%"),
|
|
23570
|
-
value: e
|
|
23571
|
-
};
|
|
23572
|
-
});
|
|
23828
|
+
return s.goodsListState.taxRateList;
|
|
23573
23829
|
}, []);
|
|
23574
23830
|
/** 免税类型 列表 */
|
|
23575
23831
|
|
|
@@ -23590,14 +23846,29 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
23590
23846
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
23591
23847
|
taxRate = _React$useState4[0],
|
|
23592
23848
|
setTaxRate = _React$useState4[1];
|
|
23593
|
-
/**
|
|
23849
|
+
/** 商品可用税率 */
|
|
23594
23850
|
|
|
23595
23851
|
|
|
23852
|
+
var _React$useState5 = React.useState(defaultValue.goodsTaxRateList),
|
|
23853
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
23854
|
+
goodsTaxRateList = _React$useState6[0],
|
|
23855
|
+
setGoodsTaxRateList = _React$useState6[1];
|
|
23856
|
+
|
|
23857
|
+
var formattedTaxRateList = React.useMemo(function () {
|
|
23858
|
+
return (goodsTaxRateList || taxRateList).map(function (e) {
|
|
23859
|
+
return {
|
|
23860
|
+
label: "".concat(e, "%"),
|
|
23861
|
+
value: e
|
|
23862
|
+
};
|
|
23863
|
+
});
|
|
23864
|
+
}, [goodsTaxRateList, taxRateList]);
|
|
23865
|
+
/** 税收分类编码 选择组件 */
|
|
23866
|
+
|
|
23596
23867
|
var ShowSearch = React.useCallback(function (props) {
|
|
23597
|
-
var _React$
|
|
23598
|
-
_React$
|
|
23599
|
-
dataSource = _React$
|
|
23600
|
-
setDataSource = _React$
|
|
23868
|
+
var _React$useState7 = React.useState([]),
|
|
23869
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
23870
|
+
dataSource = _React$useState8[0],
|
|
23871
|
+
setDataSource = _React$useState8[1];
|
|
23601
23872
|
|
|
23602
23873
|
var onSearch = React.useCallback( /*#__PURE__*/function () {
|
|
23603
23874
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
|
|
@@ -23680,22 +23951,22 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
23680
23951
|
|
|
23681
23952
|
var ShowSearch2 = React.useCallback(function (props) {
|
|
23682
23953
|
// 是否显示
|
|
23683
|
-
var _React$
|
|
23684
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
23685
|
-
visible = _React$useState8[0],
|
|
23686
|
-
setVisible = _React$useState8[1]; // 税收分类编码树
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
var _React$useState9 = React.useState(),
|
|
23954
|
+
var _React$useState9 = React.useState(false),
|
|
23690
23955
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
23691
|
-
|
|
23692
|
-
|
|
23956
|
+
visible = _React$useState10[0],
|
|
23957
|
+
setVisible = _React$useState10[1]; // 税收分类编码树
|
|
23693
23958
|
|
|
23694
23959
|
|
|
23695
23960
|
var _React$useState11 = React.useState(),
|
|
23696
23961
|
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
23697
|
-
|
|
23698
|
-
|
|
23962
|
+
list = _React$useState12[0],
|
|
23963
|
+
setList = _React$useState12[1]; // 搜索条件
|
|
23964
|
+
|
|
23965
|
+
|
|
23966
|
+
var _React$useState13 = React.useState(),
|
|
23967
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
23968
|
+
filter = _React$useState14[0],
|
|
23969
|
+
setFilter = _React$useState14[1];
|
|
23699
23970
|
/** 创建 树节点 */
|
|
23700
23971
|
|
|
23701
23972
|
|
|
@@ -23881,15 +24152,15 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
23881
24152
|
/** 税收分类编码 选择组件3 */
|
|
23882
24153
|
|
|
23883
24154
|
var ShowSearch3 = React.useCallback(function (props) {
|
|
23884
|
-
var _React$
|
|
23885
|
-
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
23886
|
-
open = _React$useState14[0],
|
|
23887
|
-
setOpen = _React$useState14[1];
|
|
23888
|
-
|
|
23889
|
-
var _React$useState15 = React.useState([]),
|
|
24155
|
+
var _React$useState15 = React.useState(false),
|
|
23890
24156
|
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
23891
|
-
|
|
23892
|
-
|
|
24157
|
+
open = _React$useState16[0],
|
|
24158
|
+
setOpen = _React$useState16[1];
|
|
24159
|
+
|
|
24160
|
+
var _React$useState17 = React.useState([]),
|
|
24161
|
+
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
24162
|
+
list = _React$useState18[0],
|
|
24163
|
+
setList = _React$useState18[1];
|
|
23893
24164
|
|
|
23894
24165
|
var onSearch = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
23895
24166
|
var _value$target;
|
|
@@ -23997,16 +24268,55 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
23997
24268
|
}, _callee11);
|
|
23998
24269
|
})), []);
|
|
23999
24270
|
var onSelect = React.useCallback(function (key, info) {
|
|
24000
|
-
//
|
|
24271
|
+
// 根据税编改变税率列表
|
|
24272
|
+
// 如果只有一个,默认选中,有多个时,置空,用户手选
|
|
24273
|
+
if (controller.state.goodsListState.isUpdateGoodsTaxRateList) {
|
|
24274
|
+
var _info$node$taxRateLis;
|
|
24275
|
+
|
|
24276
|
+
if ((_info$node$taxRateLis = info.node.taxRateList) === null || _info$node$taxRateLis === void 0 ? void 0 : _info$node$taxRateLis.length) {
|
|
24277
|
+
setGoodsTaxRateList(info.node.taxRateList);
|
|
24278
|
+
}
|
|
24279
|
+
|
|
24280
|
+
if (!readOnlyTaxRate) {
|
|
24281
|
+
actions.setFieldState('taxRate', /*#__PURE__*/function () {
|
|
24282
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
|
|
24283
|
+
var _info$node$taxRateLis2;
|
|
24284
|
+
|
|
24285
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
24286
|
+
while (1) {
|
|
24287
|
+
switch (_context12.prev = _context12.next) {
|
|
24288
|
+
case 0:
|
|
24289
|
+
if (info.node.taxRateList && ((_info$node$taxRateLis2 = info.node.taxRateList) === null || _info$node$taxRateLis2 === void 0 ? void 0 : _info$node$taxRateLis2.length) === 1) {
|
|
24290
|
+
s.value = info.node.taxRateList[0];
|
|
24291
|
+
} else {
|
|
24292
|
+
s.value = undefined;
|
|
24293
|
+
}
|
|
24294
|
+
|
|
24295
|
+
case 1:
|
|
24296
|
+
case "end":
|
|
24297
|
+
return _context12.stop();
|
|
24298
|
+
}
|
|
24299
|
+
}
|
|
24300
|
+
}, _callee12);
|
|
24301
|
+
}));
|
|
24302
|
+
|
|
24303
|
+
return function (_x8) {
|
|
24304
|
+
return _ref12.apply(this, arguments);
|
|
24305
|
+
};
|
|
24306
|
+
}());
|
|
24307
|
+
}
|
|
24308
|
+
} // !readOnlyTaxRate && actions.setFieldState('taxRate', async s => {
|
|
24001
24309
|
// if (info.node.taxRate || info.taxRate === 0) {
|
|
24002
24310
|
// s.value = info.node.taxRate
|
|
24003
24311
|
// }
|
|
24004
24312
|
// });
|
|
24313
|
+
|
|
24314
|
+
|
|
24005
24315
|
actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
|
|
24006
|
-
var
|
|
24007
|
-
return _regeneratorRuntime().wrap(function
|
|
24316
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(s) {
|
|
24317
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
24008
24318
|
while (1) {
|
|
24009
|
-
switch (
|
|
24319
|
+
switch (_context13.prev = _context13.next) {
|
|
24010
24320
|
case 0:
|
|
24011
24321
|
if (info.node.taxCategoryCode) {
|
|
24012
24322
|
s.value = info.node.taxCategoryCode;
|
|
@@ -24014,21 +24324,21 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24014
24324
|
|
|
24015
24325
|
case 1:
|
|
24016
24326
|
case "end":
|
|
24017
|
-
return
|
|
24327
|
+
return _context13.stop();
|
|
24018
24328
|
}
|
|
24019
24329
|
}
|
|
24020
|
-
},
|
|
24330
|
+
}, _callee13);
|
|
24021
24331
|
}));
|
|
24022
24332
|
|
|
24023
|
-
return function (
|
|
24024
|
-
return
|
|
24333
|
+
return function (_x9) {
|
|
24334
|
+
return _ref13.apply(this, arguments);
|
|
24025
24335
|
};
|
|
24026
24336
|
}());
|
|
24027
24337
|
actions.setFieldState('shorthand', /*#__PURE__*/function () {
|
|
24028
|
-
var
|
|
24029
|
-
return _regeneratorRuntime().wrap(function
|
|
24338
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
|
|
24339
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
24030
24340
|
while (1) {
|
|
24031
|
-
switch (
|
|
24341
|
+
switch (_context14.prev = _context14.next) {
|
|
24032
24342
|
case 0:
|
|
24033
24343
|
if (info.node.shorthand) {
|
|
24034
24344
|
s.value = info.node.shorthand;
|
|
@@ -24036,14 +24346,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24036
24346
|
|
|
24037
24347
|
case 1:
|
|
24038
24348
|
case "end":
|
|
24039
|
-
return
|
|
24349
|
+
return _context14.stop();
|
|
24040
24350
|
}
|
|
24041
24351
|
}
|
|
24042
|
-
},
|
|
24352
|
+
}, _callee14);
|
|
24043
24353
|
}));
|
|
24044
24354
|
|
|
24045
|
-
return function (
|
|
24046
|
-
return
|
|
24355
|
+
return function (_x10) {
|
|
24356
|
+
return _ref14.apply(this, arguments);
|
|
24047
24357
|
};
|
|
24048
24358
|
}());
|
|
24049
24359
|
setOpen(false);
|
|
@@ -24094,19 +24404,19 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24094
24404
|
}));
|
|
24095
24405
|
}, [controller, actions]); // 是否享受优惠政策
|
|
24096
24406
|
|
|
24097
|
-
var _React$
|
|
24098
|
-
_React$
|
|
24099
|
-
favouredPolicyMark = _React$
|
|
24100
|
-
setFavouredPolicyMark = _React$
|
|
24407
|
+
var _React$useState19 = React.useState(0),
|
|
24408
|
+
_React$useState20 = _slicedToArray(_React$useState19, 2),
|
|
24409
|
+
favouredPolicyMark = _React$useState20[0],
|
|
24410
|
+
setFavouredPolicyMark = _React$useState20[1]; // 确定
|
|
24101
24411
|
|
|
24102
24412
|
|
|
24103
24413
|
var onSubmit = React.useCallback(function (values) {
|
|
24104
24414
|
controller.pipeline( /*#__PURE__*/function () {
|
|
24105
|
-
var
|
|
24415
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(s) {
|
|
24106
24416
|
var endowCodeGood;
|
|
24107
|
-
return _regeneratorRuntime().wrap(function
|
|
24417
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
24108
24418
|
while (1) {
|
|
24109
|
-
switch (
|
|
24419
|
+
switch (_context15.prev = _context15.next) {
|
|
24110
24420
|
case 0:
|
|
24111
24421
|
endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
|
|
24112
24422
|
return s.goodsListState.goodsMap.get(e);
|
|
@@ -24129,46 +24439,49 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24129
24439
|
|
|
24130
24440
|
if (good.lineAmountExcludeTax && good.quantity) {
|
|
24131
24441
|
good.priceExcludeTax = countPrice(good.lineAmountExcludeTax, good.quantity, controller.state.calculatingDigits);
|
|
24132
|
-
}
|
|
24442
|
+
} //赋值商品的可用税率
|
|
24443
|
+
|
|
24444
|
+
|
|
24445
|
+
good.goodsTaxRateList = goodsTaxRateList;
|
|
24133
24446
|
});
|
|
24134
24447
|
s.goodsListState.goodsList = s.goodsListState.goodsList.slice();
|
|
24135
24448
|
s.goodsListState.endowCode.endowcodeGoodIndex = [];
|
|
24136
24449
|
|
|
24137
24450
|
case 4:
|
|
24138
24451
|
case "end":
|
|
24139
|
-
return
|
|
24452
|
+
return _context15.stop();
|
|
24140
24453
|
}
|
|
24141
24454
|
}
|
|
24142
|
-
},
|
|
24455
|
+
}, _callee15);
|
|
24143
24456
|
}));
|
|
24144
24457
|
|
|
24145
|
-
return function (
|
|
24146
|
-
return
|
|
24458
|
+
return function (_x11) {
|
|
24459
|
+
return _ref15.apply(this, arguments);
|
|
24147
24460
|
};
|
|
24148
24461
|
}())();
|
|
24149
|
-
}, [controller]);
|
|
24462
|
+
}, [controller, goodsTaxRateList]);
|
|
24150
24463
|
var effects = React.useCallback(function () {
|
|
24151
24464
|
// 税率变化
|
|
24152
24465
|
FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
|
|
24153
24466
|
setTaxRate(e.value);
|
|
24154
24467
|
actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
|
|
24155
|
-
var
|
|
24156
|
-
return _regeneratorRuntime().wrap(function
|
|
24468
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(s) {
|
|
24469
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
24157
24470
|
while (1) {
|
|
24158
|
-
switch (
|
|
24471
|
+
switch (_context16.prev = _context16.next) {
|
|
24159
24472
|
case 0:
|
|
24160
24473
|
if (e.value !== 0) s.value = undefined;
|
|
24161
24474
|
|
|
24162
24475
|
case 1:
|
|
24163
24476
|
case "end":
|
|
24164
|
-
return
|
|
24477
|
+
return _context16.stop();
|
|
24165
24478
|
}
|
|
24166
24479
|
}
|
|
24167
|
-
},
|
|
24480
|
+
}, _callee16);
|
|
24168
24481
|
}));
|
|
24169
24482
|
|
|
24170
|
-
return function (
|
|
24171
|
-
return
|
|
24483
|
+
return function (_x12) {
|
|
24484
|
+
return _ref16.apply(this, arguments);
|
|
24172
24485
|
};
|
|
24173
24486
|
}());
|
|
24174
24487
|
}); // 是否享受优惠政策
|
|
@@ -24176,23 +24489,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24176
24489
|
FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
|
|
24177
24490
|
setFavouredPolicyMark(e.value);
|
|
24178
24491
|
actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
|
|
24179
|
-
var
|
|
24180
|
-
return _regeneratorRuntime().wrap(function
|
|
24492
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(s) {
|
|
24493
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
24181
24494
|
while (1) {
|
|
24182
|
-
switch (
|
|
24495
|
+
switch (_context17.prev = _context17.next) {
|
|
24183
24496
|
case 0:
|
|
24184
24497
|
if (e.value === 0) s.value = undefined;
|
|
24185
24498
|
|
|
24186
24499
|
case 1:
|
|
24187
24500
|
case "end":
|
|
24188
|
-
return
|
|
24501
|
+
return _context17.stop();
|
|
24189
24502
|
}
|
|
24190
24503
|
}
|
|
24191
|
-
},
|
|
24504
|
+
}, _callee17);
|
|
24192
24505
|
}));
|
|
24193
24506
|
|
|
24194
|
-
return function (
|
|
24195
|
-
return
|
|
24507
|
+
return function (_x13) {
|
|
24508
|
+
return _ref17.apply(this, arguments);
|
|
24196
24509
|
};
|
|
24197
24510
|
}());
|
|
24198
24511
|
});
|
|
@@ -24232,7 +24545,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24232
24545
|
disabled: readOnlyTaxRate
|
|
24233
24546
|
},
|
|
24234
24547
|
default: (_defaultValue$taxRate = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.taxRate) !== null && _defaultValue$taxRate !== void 0 ? _defaultValue$taxRate : 0,
|
|
24235
|
-
enum:
|
|
24548
|
+
enum: formattedTaxRateList,
|
|
24236
24549
|
"x-rules": [{
|
|
24237
24550
|
message: '请选择税率',
|
|
24238
24551
|
required: true
|
|
@@ -24292,23 +24605,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
24292
24605
|
}, "\u786E\u5B9A"), /*#__PURE__*/React.createElement(Button, {
|
|
24293
24606
|
onClick: function onClick() {
|
|
24294
24607
|
controller.pipeline( /*#__PURE__*/function () {
|
|
24295
|
-
var
|
|
24296
|
-
return _regeneratorRuntime().wrap(function
|
|
24608
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(s) {
|
|
24609
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
24297
24610
|
while (1) {
|
|
24298
|
-
switch (
|
|
24611
|
+
switch (_context18.prev = _context18.next) {
|
|
24299
24612
|
case 0:
|
|
24300
|
-
return
|
|
24613
|
+
return _context18.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
|
|
24301
24614
|
|
|
24302
24615
|
case 1:
|
|
24303
24616
|
case "end":
|
|
24304
|
-
return
|
|
24617
|
+
return _context18.stop();
|
|
24305
24618
|
}
|
|
24306
24619
|
}
|
|
24307
|
-
},
|
|
24620
|
+
}, _callee18);
|
|
24308
24621
|
}));
|
|
24309
24622
|
|
|
24310
|
-
return function (
|
|
24311
|
-
return
|
|
24623
|
+
return function (_x14) {
|
|
24624
|
+
return _ref18.apply(this, arguments);
|
|
24312
24625
|
};
|
|
24313
24626
|
}())();
|
|
24314
24627
|
}
|