kts-component-invoice-operate 1.0.106 → 1.1.2
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/EndowCode.d.ts +14 -1
- package/dist/index.esm.js +294 -45
- package/dist/index.js +293 -44
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode.tsx +13 -2
- package/src/Invoice/_test/endowCode/index.tsx +889 -18
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +116 -3
- package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +11 -1
|
@@ -3,11 +3,24 @@ import IGood from './IGood';
|
|
|
3
3
|
export default class EndowCode {
|
|
4
4
|
/** 准备赋码的货物索引列表 */
|
|
5
5
|
endowcodeGoodIndex: number[];
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* 获取 税收分类编码列表 (弃用)
|
|
8
|
+
* @deprecated 请使用 getTaxCategoryCodeTree 替换
|
|
9
|
+
* */
|
|
7
10
|
getTaxCategoryCodeList: (value: string) => Promise<{
|
|
8
11
|
value: string;
|
|
9
12
|
label: string;
|
|
10
13
|
}[]>;
|
|
14
|
+
/**
|
|
15
|
+
* 获取 税收分类编码树
|
|
16
|
+
* @param taxCategoryCode 税收分类编码
|
|
17
|
+
* @param val val
|
|
18
|
+
* @returns 税收分类编码树
|
|
19
|
+
*/
|
|
20
|
+
getTaxCategoryCodeTree: (taxCategoryCode?: string, val?: string) => Promise<{
|
|
21
|
+
id: string;
|
|
22
|
+
pid: string;
|
|
23
|
+
}[]>;
|
|
11
24
|
/** 税率 是否可以编辑 */
|
|
12
25
|
getReadOnlyTaxRate?: (value?: GoodsListState) => boolean;
|
|
13
26
|
/**
|
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, Modal } from 'kts-components-antd-x3';
|
|
5
|
+
import { message, Form, Input, Icon, Tag, Select, Row, Col, Table, Button, Switch, Typography, Drawer, Menu, Dropdown, AutoComplete, Spin, Checkbox, Descriptions, 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';
|
|
@@ -586,6 +586,20 @@ var EndowCode = function EndowCode() {
|
|
|
586
586
|
}
|
|
587
587
|
}, _callee);
|
|
588
588
|
}));
|
|
589
|
+
this.getTaxCategoryCodeTree = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
590
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
591
|
+
while (1) {
|
|
592
|
+
switch (_context2.prev = _context2.next) {
|
|
593
|
+
case 0:
|
|
594
|
+
return _context2.abrupt("return", []);
|
|
595
|
+
|
|
596
|
+
case 1:
|
|
597
|
+
case "end":
|
|
598
|
+
return _context2.stop();
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}, _callee2);
|
|
602
|
+
}));
|
|
589
603
|
this.getReadOnlyTaxRate = void 0;
|
|
590
604
|
this.getDefaultValue = void 0;
|
|
591
605
|
this.readOnlyTaxRateMap = {
|
|
@@ -3529,6 +3543,11 @@ var useColumns = (function (form) {
|
|
|
3529
3543
|
var unitList = controller.useMemo(function (e) {
|
|
3530
3544
|
return e.goodsListState.unitList;
|
|
3531
3545
|
}, []);
|
|
3546
|
+
/** 扣除额 */
|
|
3547
|
+
|
|
3548
|
+
var deduction = controller.useMemo(function (e) {
|
|
3549
|
+
return e.goodsListState.deduction;
|
|
3550
|
+
}, []);
|
|
3532
3551
|
/** 变动的字段 */
|
|
3533
3552
|
|
|
3534
3553
|
var _React$useState = React.useState(''),
|
|
@@ -3913,6 +3932,31 @@ var useColumns = (function (form) {
|
|
|
3913
3932
|
return _validator4.apply(this, arguments);
|
|
3914
3933
|
}
|
|
3915
3934
|
|
|
3935
|
+
return validator;
|
|
3936
|
+
}()
|
|
3937
|
+
}, {
|
|
3938
|
+
validator: function () {
|
|
3939
|
+
var _validator5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(_, value, callback) {
|
|
3940
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
3941
|
+
while (1) {
|
|
3942
|
+
switch (_context6.prev = _context6.next) {
|
|
3943
|
+
case 0:
|
|
3944
|
+
if (deduction && parseFloat(value) <= deduction) {
|
|
3945
|
+
callback('扣除额不能大于等于价税合计');
|
|
3946
|
+
}
|
|
3947
|
+
|
|
3948
|
+
case 1:
|
|
3949
|
+
case "end":
|
|
3950
|
+
return _context6.stop();
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
}, _callee6);
|
|
3954
|
+
}));
|
|
3955
|
+
|
|
3956
|
+
function validator(_x14, _x15, _x16) {
|
|
3957
|
+
return _validator5.apply(this, arguments);
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3916
3960
|
return validator;
|
|
3917
3961
|
}()
|
|
3918
3962
|
}]
|
|
@@ -3954,10 +3998,10 @@ var useColumns = (function (form) {
|
|
|
3954
3998
|
message: '金额必须为数字'
|
|
3955
3999
|
}, {
|
|
3956
4000
|
validator: function () {
|
|
3957
|
-
var
|
|
3958
|
-
return regeneratorRuntime.wrap(function
|
|
4001
|
+
var _validator6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_, value, callback) {
|
|
4002
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
3959
4003
|
while (1) {
|
|
3960
|
-
switch (
|
|
4004
|
+
switch (_context7.prev = _context7.next) {
|
|
3961
4005
|
case 0:
|
|
3962
4006
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
3963
4007
|
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
@@ -3965,14 +4009,14 @@ var useColumns = (function (form) {
|
|
|
3965
4009
|
|
|
3966
4010
|
case 1:
|
|
3967
4011
|
case "end":
|
|
3968
|
-
return
|
|
4012
|
+
return _context7.stop();
|
|
3969
4013
|
}
|
|
3970
4014
|
}
|
|
3971
|
-
},
|
|
4015
|
+
}, _callee7);
|
|
3972
4016
|
}));
|
|
3973
4017
|
|
|
3974
|
-
function validator(
|
|
3975
|
-
return
|
|
4018
|
+
function validator(_x17, _x18, _x19) {
|
|
4019
|
+
return _validator6.apply(this, arguments);
|
|
3976
4020
|
}
|
|
3977
4021
|
|
|
3978
4022
|
return validator;
|
|
@@ -4083,7 +4127,7 @@ var useColumns = (function (form) {
|
|
|
4083
4127
|
ellipsis: true
|
|
4084
4128
|
});
|
|
4085
4129
|
});
|
|
4086
|
-
}, [isTaxIncluded, editGood, controller, changeField]);
|
|
4130
|
+
}, [isTaxIncluded, editGood, controller, changeField, deduction]);
|
|
4087
4131
|
React.useEffect(function () {
|
|
4088
4132
|
if (!changeField) return;
|
|
4089
4133
|
var t = setTimeout(function () {
|
|
@@ -5499,6 +5543,7 @@ function cutStr(str, L) {
|
|
|
5499
5543
|
var css_248z$a = ".kts-invoice-operate-goods-endow-code-button-list {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-endow-code-button-list > button {\n margin-bottom: 10px;\n}\n";
|
|
5500
5544
|
styleInject(css_248z$a);
|
|
5501
5545
|
|
|
5546
|
+
var TreeNode = Tree.TreeNode;
|
|
5502
5547
|
var confirm = Modal.confirm;
|
|
5503
5548
|
var EndowCodeDrawer = (function () {
|
|
5504
5549
|
var controller = default_1.useInvoiceController();
|
|
@@ -5758,21 +5803,225 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5758
5803
|
value: e.value
|
|
5759
5804
|
}, e.label);
|
|
5760
5805
|
}));
|
|
5806
|
+
}, [controller, actions]);
|
|
5807
|
+
/** 税收分类编码 选择组件2 */
|
|
5808
|
+
|
|
5809
|
+
var ShowSearch2 = React.useCallback(function (props) {
|
|
5810
|
+
// 是否显示
|
|
5811
|
+
var _React$useState7 = React.useState(false),
|
|
5812
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
5813
|
+
visible = _React$useState8[0],
|
|
5814
|
+
setVisible = _React$useState8[1]; // 税收分类编码树
|
|
5815
|
+
|
|
5816
|
+
|
|
5817
|
+
var _React$useState9 = React.useState(),
|
|
5818
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
5819
|
+
list = _React$useState10[0],
|
|
5820
|
+
setList = _React$useState10[1]; // 搜索条件
|
|
5821
|
+
|
|
5822
|
+
|
|
5823
|
+
var _React$useState11 = React.useState(),
|
|
5824
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
5825
|
+
filter = _React$useState12[0],
|
|
5826
|
+
setFilter = _React$useState12[1];
|
|
5827
|
+
/** 创建 树节点 */
|
|
5828
|
+
|
|
5829
|
+
|
|
5830
|
+
var createTreeNode = React.useCallback(function () {
|
|
5831
|
+
if (!list) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
5832
|
+
return ctn(list);
|
|
5833
|
+
|
|
5834
|
+
function ctn(l) {
|
|
5835
|
+
var p = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '0';
|
|
5836
|
+
if (!l || !l.length) return [/*#__PURE__*/React.createElement(React.Fragment, null)];
|
|
5837
|
+
var ls = l.filter(function (e) {
|
|
5838
|
+
return e.pid === p;
|
|
5839
|
+
});
|
|
5840
|
+
debugger;
|
|
5841
|
+
return l.filter(function (e) {
|
|
5842
|
+
return e.pid === p;
|
|
5843
|
+
}).map(function (e) {
|
|
5844
|
+
return /*#__PURE__*/React.createElement(TreeNode, {
|
|
5845
|
+
title: e.label,
|
|
5846
|
+
key: e.id
|
|
5847
|
+
}, ctn(l, e.id));
|
|
5848
|
+
});
|
|
5849
|
+
}
|
|
5850
|
+
}, [list]);
|
|
5851
|
+
/** 点击了节点 */
|
|
5852
|
+
|
|
5853
|
+
var onSelect = React.useCallback(function (e) {
|
|
5854
|
+
var id = e[0]; // 是否叶子节点
|
|
5855
|
+
|
|
5856
|
+
if ((list === null || list === void 0 ? void 0 : list.filter(function (e) {
|
|
5857
|
+
return e.pid === id;
|
|
5858
|
+
}).length) !== 0) {
|
|
5859
|
+
return;
|
|
5860
|
+
}
|
|
5861
|
+
|
|
5862
|
+
var info = list === null || list === void 0 ? void 0 : list.filter(function (e) {
|
|
5863
|
+
return e.id === id;
|
|
5864
|
+
})[0];
|
|
5865
|
+
!readOnlyTaxRate && actions.setFieldState('taxRate', /*#__PURE__*/function () {
|
|
5866
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(s) {
|
|
5867
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
5868
|
+
while (1) {
|
|
5869
|
+
switch (_context6.prev = _context6.next) {
|
|
5870
|
+
case 0:
|
|
5871
|
+
if (info.taxRate || info.taxRate === 0) {
|
|
5872
|
+
s.value = info.taxRate;
|
|
5873
|
+
}
|
|
5874
|
+
|
|
5875
|
+
case 1:
|
|
5876
|
+
case "end":
|
|
5877
|
+
return _context6.stop();
|
|
5878
|
+
}
|
|
5879
|
+
}
|
|
5880
|
+
}, _callee6);
|
|
5881
|
+
}));
|
|
5882
|
+
|
|
5883
|
+
return function (_x6) {
|
|
5884
|
+
return _ref6.apply(this, arguments);
|
|
5885
|
+
};
|
|
5886
|
+
}());
|
|
5887
|
+
actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
|
|
5888
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(s) {
|
|
5889
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
5890
|
+
while (1) {
|
|
5891
|
+
switch (_context7.prev = _context7.next) {
|
|
5892
|
+
case 0:
|
|
5893
|
+
if (info.id) {
|
|
5894
|
+
s.value = info.id;
|
|
5895
|
+
}
|
|
5896
|
+
|
|
5897
|
+
case 1:
|
|
5898
|
+
case "end":
|
|
5899
|
+
return _context7.stop();
|
|
5900
|
+
}
|
|
5901
|
+
}
|
|
5902
|
+
}, _callee7);
|
|
5903
|
+
}));
|
|
5904
|
+
|
|
5905
|
+
return function (_x7) {
|
|
5906
|
+
return _ref7.apply(this, arguments);
|
|
5907
|
+
};
|
|
5908
|
+
}());
|
|
5909
|
+
actions.setFieldState('shorthand', /*#__PURE__*/function () {
|
|
5910
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(s) {
|
|
5911
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
5912
|
+
while (1) {
|
|
5913
|
+
switch (_context8.prev = _context8.next) {
|
|
5914
|
+
case 0:
|
|
5915
|
+
if (info.shorthand) {
|
|
5916
|
+
s.value = info.shorthand;
|
|
5917
|
+
}
|
|
5918
|
+
|
|
5919
|
+
case 1:
|
|
5920
|
+
case "end":
|
|
5921
|
+
return _context8.stop();
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
}, _callee8);
|
|
5925
|
+
}));
|
|
5926
|
+
|
|
5927
|
+
return function (_x8) {
|
|
5928
|
+
return _ref8.apply(this, arguments);
|
|
5929
|
+
};
|
|
5930
|
+
}());
|
|
5931
|
+
setVisible(false);
|
|
5932
|
+
}, [list, actions, readOnlyTaxRate]);
|
|
5933
|
+
React.useEffect(function () {
|
|
5934
|
+
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
|
|
5935
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
5936
|
+
while (1) {
|
|
5937
|
+
switch (_context9.prev = _context9.next) {
|
|
5938
|
+
case 0:
|
|
5939
|
+
_context9.t0 = setList;
|
|
5940
|
+
_context9.next = 3;
|
|
5941
|
+
return controller.state.goodsListState.endowCode.getTaxCategoryCodeTree(filter === null || filter === void 0 ? void 0 : filter.taxCategoryCode, filter === null || filter === void 0 ? void 0 : filter.val);
|
|
5942
|
+
|
|
5943
|
+
case 3:
|
|
5944
|
+
_context9.t1 = _context9.sent;
|
|
5945
|
+
|
|
5946
|
+
if (_context9.t1) {
|
|
5947
|
+
_context9.next = 6;
|
|
5948
|
+
break;
|
|
5949
|
+
}
|
|
5950
|
+
|
|
5951
|
+
_context9.t1 = [];
|
|
5952
|
+
|
|
5953
|
+
case 6:
|
|
5954
|
+
_context9.t2 = _context9.t1;
|
|
5955
|
+
(0, _context9.t0)(_context9.t2);
|
|
5956
|
+
|
|
5957
|
+
case 8:
|
|
5958
|
+
case "end":
|
|
5959
|
+
return _context9.stop();
|
|
5960
|
+
}
|
|
5961
|
+
}
|
|
5962
|
+
}, _callee9);
|
|
5963
|
+
}))();
|
|
5964
|
+
}, [filter]);
|
|
5965
|
+
React.useEffect(function () {
|
|
5966
|
+
if (visible) {
|
|
5967
|
+
setList([]);
|
|
5968
|
+
}
|
|
5969
|
+
}, [visible]);
|
|
5970
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, {
|
|
5971
|
+
readOnly: true,
|
|
5972
|
+
value: props.value,
|
|
5973
|
+
onClick: function onClick() {
|
|
5974
|
+
setVisible(true);
|
|
5975
|
+
}
|
|
5976
|
+
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
5977
|
+
title: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
5978
|
+
visible: visible,
|
|
5979
|
+
width: 500,
|
|
5980
|
+
onClose: function onClose() {
|
|
5981
|
+
setVisible(false);
|
|
5982
|
+
}
|
|
5983
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
5984
|
+
key: "".concat(visible)
|
|
5985
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
5986
|
+
label: "\u4EA7\u54C1\u6216\u670D\u52A1\u7B80\u79F0"
|
|
5987
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
5988
|
+
onChange: function onChange(e) {
|
|
5989
|
+
setFilter(_objectSpread2(_objectSpread2({}, filter), {}, {
|
|
5990
|
+
val: e.target.value
|
|
5991
|
+
}));
|
|
5992
|
+
}
|
|
5993
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
5994
|
+
label: "\u7A0E\u6536\u5206\u7C7B\u7F16\u7801"
|
|
5995
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
5996
|
+
onChange: function onChange(e) {
|
|
5997
|
+
setFilter(_objectSpread2(_objectSpread2({}, filter), {}, {
|
|
5998
|
+
taxCategoryCode: e.target.value
|
|
5999
|
+
}));
|
|
6000
|
+
}
|
|
6001
|
+
}))), list && list.length > 0 ? /*#__PURE__*/React.createElement(Tree, {
|
|
6002
|
+
defaultExpandAll: true,
|
|
6003
|
+
selectedKeys: [],
|
|
6004
|
+
onSelect: onSelect
|
|
6005
|
+
}, createTreeNode()) : /*#__PURE__*/React.createElement("span", {
|
|
6006
|
+
style: {
|
|
6007
|
+
color: '#00000073'
|
|
6008
|
+
}
|
|
6009
|
+
}, "\u672A\u627E\u5230\u5339\u914D\u7684\u6570\u636E")));
|
|
5761
6010
|
}, [controller, actions]); // 是否享受优惠政策
|
|
5762
6011
|
|
|
5763
|
-
var _React$
|
|
5764
|
-
_React$
|
|
5765
|
-
favouredPolicyMark = _React$
|
|
5766
|
-
setFavouredPolicyMark = _React$
|
|
6012
|
+
var _React$useState13 = React.useState(0),
|
|
6013
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
6014
|
+
favouredPolicyMark = _React$useState14[0],
|
|
6015
|
+
setFavouredPolicyMark = _React$useState14[1]; // 确定
|
|
5767
6016
|
|
|
5768
6017
|
|
|
5769
6018
|
var onSubmit = React.useCallback(function (values) {
|
|
5770
6019
|
controller.pipeline( /*#__PURE__*/function () {
|
|
5771
|
-
var
|
|
6020
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(s) {
|
|
5772
6021
|
var endowCodeGood;
|
|
5773
|
-
return regeneratorRuntime.wrap(function
|
|
6022
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
5774
6023
|
while (1) {
|
|
5775
|
-
switch (
|
|
6024
|
+
switch (_context10.prev = _context10.next) {
|
|
5776
6025
|
case 0:
|
|
5777
6026
|
endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
|
|
5778
6027
|
return s.goodsListState.goodsMap.get(e);
|
|
@@ -5808,11 +6057,11 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5808
6057
|
if (!endowCodeGood.some(function (e) {
|
|
5809
6058
|
return bytesLnegth((e === null || e === void 0 ? void 0 : e.itemName) || '') > 92;
|
|
5810
6059
|
})) {
|
|
5811
|
-
|
|
6060
|
+
_context10.next = 5;
|
|
5812
6061
|
break;
|
|
5813
6062
|
}
|
|
5814
6063
|
|
|
5815
|
-
|
|
6064
|
+
_context10.next = 5;
|
|
5816
6065
|
return function () {
|
|
5817
6066
|
return new Promise(function (resolve) {
|
|
5818
6067
|
confirm({
|
|
@@ -5841,14 +6090,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5841
6090
|
|
|
5842
6091
|
case 7:
|
|
5843
6092
|
case "end":
|
|
5844
|
-
return
|
|
6093
|
+
return _context10.stop();
|
|
5845
6094
|
}
|
|
5846
6095
|
}
|
|
5847
|
-
},
|
|
6096
|
+
}, _callee10);
|
|
5848
6097
|
}));
|
|
5849
6098
|
|
|
5850
|
-
return function (
|
|
5851
|
-
return
|
|
6099
|
+
return function (_x9) {
|
|
6100
|
+
return _ref10.apply(this, arguments);
|
|
5852
6101
|
};
|
|
5853
6102
|
}())();
|
|
5854
6103
|
}, [controller]);
|
|
@@ -5857,23 +6106,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5857
6106
|
FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
|
|
5858
6107
|
setTaxRate(e.value);
|
|
5859
6108
|
actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
|
|
5860
|
-
var
|
|
5861
|
-
return regeneratorRuntime.wrap(function
|
|
6109
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(s) {
|
|
6110
|
+
return regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
5862
6111
|
while (1) {
|
|
5863
|
-
switch (
|
|
6112
|
+
switch (_context11.prev = _context11.next) {
|
|
5864
6113
|
case 0:
|
|
5865
6114
|
if (e.value !== 0) s.value = undefined;
|
|
5866
6115
|
|
|
5867
6116
|
case 1:
|
|
5868
6117
|
case "end":
|
|
5869
|
-
return
|
|
6118
|
+
return _context11.stop();
|
|
5870
6119
|
}
|
|
5871
6120
|
}
|
|
5872
|
-
},
|
|
6121
|
+
}, _callee11);
|
|
5873
6122
|
}));
|
|
5874
6123
|
|
|
5875
|
-
return function (
|
|
5876
|
-
return
|
|
6124
|
+
return function (_x10) {
|
|
6125
|
+
return _ref11.apply(this, arguments);
|
|
5877
6126
|
};
|
|
5878
6127
|
}());
|
|
5879
6128
|
}); // 是否享受优惠政策
|
|
@@ -5881,23 +6130,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5881
6130
|
FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
|
|
5882
6131
|
setFavouredPolicyMark(e.value);
|
|
5883
6132
|
actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
|
|
5884
|
-
var
|
|
5885
|
-
return regeneratorRuntime.wrap(function
|
|
6133
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(s) {
|
|
6134
|
+
return regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
5886
6135
|
while (1) {
|
|
5887
|
-
switch (
|
|
6136
|
+
switch (_context12.prev = _context12.next) {
|
|
5888
6137
|
case 0:
|
|
5889
6138
|
if (e.value === 0) s.value = undefined;
|
|
5890
6139
|
|
|
5891
6140
|
case 1:
|
|
5892
6141
|
case "end":
|
|
5893
|
-
return
|
|
6142
|
+
return _context12.stop();
|
|
5894
6143
|
}
|
|
5895
6144
|
}
|
|
5896
|
-
},
|
|
6145
|
+
}, _callee12);
|
|
5897
6146
|
}));
|
|
5898
6147
|
|
|
5899
|
-
return function (
|
|
5900
|
-
return
|
|
6148
|
+
return function (_x11) {
|
|
6149
|
+
return _ref12.apply(this, arguments);
|
|
5901
6150
|
};
|
|
5902
6151
|
}());
|
|
5903
6152
|
});
|
|
@@ -5909,7 +6158,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5909
6158
|
return /*#__PURE__*/React.createElement(SchemaForm, {
|
|
5910
6159
|
actions: actions,
|
|
5911
6160
|
components: _objectSpread2(_objectSpread2({}, components), {}, {
|
|
5912
|
-
showSearch:
|
|
6161
|
+
showSearch: ShowSearch2
|
|
5913
6162
|
}),
|
|
5914
6163
|
effects: effects
|
|
5915
6164
|
}, /*#__PURE__*/React.createElement(FormButtonGroup, null, /*#__PURE__*/React.createElement(SchemaMarkupField, {
|
|
@@ -5986,23 +6235,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
5986
6235
|
}, "\u786E\u5B9A"), /*#__PURE__*/React.createElement(Button, {
|
|
5987
6236
|
onClick: function onClick() {
|
|
5988
6237
|
controller.pipeline( /*#__PURE__*/function () {
|
|
5989
|
-
var
|
|
5990
|
-
return regeneratorRuntime.wrap(function
|
|
6238
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(s) {
|
|
6239
|
+
return regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
5991
6240
|
while (1) {
|
|
5992
|
-
switch (
|
|
6241
|
+
switch (_context13.prev = _context13.next) {
|
|
5993
6242
|
case 0:
|
|
5994
|
-
return
|
|
6243
|
+
return _context13.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
|
|
5995
6244
|
|
|
5996
6245
|
case 1:
|
|
5997
6246
|
case "end":
|
|
5998
|
-
return
|
|
6247
|
+
return _context13.stop();
|
|
5999
6248
|
}
|
|
6000
6249
|
}
|
|
6001
|
-
},
|
|
6250
|
+
}, _callee13);
|
|
6002
6251
|
}));
|
|
6003
6252
|
|
|
6004
|
-
return function (
|
|
6005
|
-
return
|
|
6253
|
+
return function (_x12) {
|
|
6254
|
+
return _ref13.apply(this, arguments);
|
|
6006
6255
|
};
|
|
6007
6256
|
}())();
|
|
6008
6257
|
}
|