kts-component-invoice-operate 3.2.78 → 3.2.79
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/index.d.ts +8 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +2 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.d.ts +2 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +5 -0
- package/dist/TaxClassificationCodeModal/_test/easiest/index.d.ts +3 -0
- package/dist/TaxClassificationCodeModal/index.d.ts +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +365 -44
- package/dist/index.js +361 -39
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +4 -3
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +15 -5
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +3 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +3 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +9 -4
- package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +112 -2
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +1 -1
- package/src/Invoice/ui/digtal/Sign/index.tsx +11 -1
- package/src/TaxClassificationCodeModal/_test/easiest/index.tsx +176 -0
- package/src/TaxClassificationCodeModal/index.less +0 -0
- package/src/TaxClassificationCodeModal/index.md +6 -0
- package/src/TaxClassificationCodeModal/index.tsx +63 -0
- package/src/index.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -1028,10 +1028,38 @@ var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
|
|
|
1028
1028
|
value: 3
|
|
1029
1029
|
}];
|
|
1030
1030
|
this.cache = {};
|
|
1031
|
+
this.onSearchTaxClassificationCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1032
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1033
|
+
while (1) {
|
|
1034
|
+
switch (_context2.prev = _context2.next) {
|
|
1035
|
+
case 0:
|
|
1036
|
+
return _context2.abrupt("return", []);
|
|
1037
|
+
|
|
1038
|
+
case 1:
|
|
1039
|
+
case "end":
|
|
1040
|
+
return _context2.stop();
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}, _callee2);
|
|
1044
|
+
}));
|
|
1045
|
+
this.onLoadTaxClassificationCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
1046
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1047
|
+
while (1) {
|
|
1048
|
+
switch (_context3.prev = _context3.next) {
|
|
1049
|
+
case 0:
|
|
1050
|
+
return _context3.abrupt("return", []);
|
|
1051
|
+
|
|
1052
|
+
case 1:
|
|
1053
|
+
case "end":
|
|
1054
|
+
return _context3.stop();
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}, _callee3);
|
|
1058
|
+
}));
|
|
1031
1059
|
});
|
|
1032
1060
|
|
|
1033
1061
|
function draft(value) {
|
|
1034
|
-
if (!value) return true; // isDiscount
|
|
1062
|
+
if (!value) return true; // isDiscount
|
|
1035
1063
|
|
|
1036
1064
|
var goods = value.endowCode.endowcodeGoodIndex.map(function (e) {
|
|
1037
1065
|
return value.goodsMap.get(e);
|
|
@@ -1162,6 +1190,7 @@ var Stakeholder = /*#__PURE__*/_createClass(function Stakeholder() {
|
|
|
1162
1190
|
_classCallCheck(this, Stakeholder);
|
|
1163
1191
|
|
|
1164
1192
|
this.disableds = void 0;
|
|
1193
|
+
this.enables = void 0;
|
|
1165
1194
|
this.rulesMap = void 0;
|
|
1166
1195
|
});
|
|
1167
1196
|
|
|
@@ -1190,6 +1219,7 @@ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControlle
|
|
|
1190
1219
|
this.rootElement = null;
|
|
1191
1220
|
this.typeModalProps = void 0;
|
|
1192
1221
|
this.autoComplete = new AutoComplete();
|
|
1222
|
+
this.taxClassificationProps = void 0;
|
|
1193
1223
|
});
|
|
1194
1224
|
|
|
1195
1225
|
/**
|
|
@@ -13176,7 +13206,7 @@ var useColumns = (function (form) {
|
|
|
13176
13206
|
dataIndex: 'taxRate',
|
|
13177
13207
|
key: 'taxRate',
|
|
13178
13208
|
align: 'right',
|
|
13179
|
-
width:
|
|
13209
|
+
width: 75,
|
|
13180
13210
|
render: function render(value, record) {
|
|
13181
13211
|
if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
|
|
13182
13212
|
return React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('taxRate', {
|
|
@@ -16652,15 +16682,25 @@ var SignDigtal = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(funct
|
|
|
16652
16682
|
var model = controller.useMemo(function (s) {
|
|
16653
16683
|
return s.model;
|
|
16654
16684
|
}, []);
|
|
16685
|
+
/** 禁用字段 */
|
|
16686
|
+
|
|
16655
16687
|
var disableds = controller.useMemo(function (s) {
|
|
16656
16688
|
return s.stakeholder.disableds || [];
|
|
16657
16689
|
}, []);
|
|
16690
|
+
/** 启用字段 */
|
|
16691
|
+
|
|
16692
|
+
var enables = controller.useMemo(function (s) {
|
|
16693
|
+
return s.stakeholder.enables || [];
|
|
16694
|
+
}, []);
|
|
16658
16695
|
var readOnly = React__default['default'].useMemo(function () {
|
|
16659
16696
|
return model === 'readOnly';
|
|
16660
16697
|
}, [model]);
|
|
16661
16698
|
var isReadOnly = React__default['default'].useCallback(function (field) {
|
|
16662
16699
|
return disableds.indexOf(field) >= 0;
|
|
16663
|
-
}, [disableds]);
|
|
16700
|
+
}, [disableds]);
|
|
16701
|
+
var isEnables = React__default['default'].useCallback(function (field) {
|
|
16702
|
+
return enables.indexOf(field) >= 0;
|
|
16703
|
+
}, [enables]); // 注册 form
|
|
16664
16704
|
|
|
16665
16705
|
controller.useForm('sign', form);
|
|
16666
16706
|
|
|
@@ -16671,7 +16711,12 @@ var SignDigtal = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(funct
|
|
|
16671
16711
|
className: 'sign-digtal-readOnly-cont'
|
|
16672
16712
|
}, React__default['default'].createElement("div", null, React__default['default'].createElement("span", null, "\u5907"), React__default['default'].createElement("span", null, "\u6CE8")), React__default['default'].createElement("div", null, getFieldDecorator('remarks', {
|
|
16673
16713
|
initialValue: props.defaultRemark
|
|
16674
|
-
})(
|
|
16714
|
+
})(isEnables('remarks') ? React__default['default'].createElement(ktsXui.Input.TextArea, {
|
|
16715
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
16716
|
+
style: {
|
|
16717
|
+
height: '100%'
|
|
16718
|
+
}
|
|
16719
|
+
}) : React__default['default'].createElement(MyDiv$1, null)))), React__default['default'].createElement(ktsComponentsAntdX3.Form, {
|
|
16675
16720
|
layout: 'inline',
|
|
16676
16721
|
className: 'digtal-readOnly-form'
|
|
16677
16722
|
}, React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
@@ -22040,6 +22085,39 @@ var getItemCode = function getItemCode(record, editGood) {
|
|
|
22040
22085
|
var css_248z$q = ".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";
|
|
22041
22086
|
styleInject(css_248z$q);
|
|
22042
22087
|
|
|
22088
|
+
function TaxClassificationModal(props) {
|
|
22089
|
+
var _Form$useForm = ktsXui.Form.useForm(),
|
|
22090
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
22091
|
+
form = _Form$useForm2[0];
|
|
22092
|
+
|
|
22093
|
+
React__default['default'].useEffect(function () {
|
|
22094
|
+
if (!props.open) {
|
|
22095
|
+
form.resetFields();
|
|
22096
|
+
}
|
|
22097
|
+
}, [form, props.open]);
|
|
22098
|
+
return React__default['default'].createElement(ktsXui.Drawer, {
|
|
22099
|
+
title: "\u5546\u54C1\u548C\u670D\u52A1\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
22100
|
+
placement: "right",
|
|
22101
|
+
open: props.open,
|
|
22102
|
+
width: 503,
|
|
22103
|
+
onClose: props.onCancel
|
|
22104
|
+
}, React__default['default'].createElement(ktsXui.Form, {
|
|
22105
|
+
form: form
|
|
22106
|
+
}, React__default['default'].createElement(ktsXui.Form.Item, {
|
|
22107
|
+
name: 'search'
|
|
22108
|
+
}, React__default['default'].createElement(ktsXui.Input, {
|
|
22109
|
+
placeholder: "\u8BF7\u8F93\u5165\u7A0E\u6536\u5206\u7C7B\u7F16\u7801\u3001\u7A0E\u6536\u5206\u7C7B\u540D\u79F0\u8FDB\u884C\u68C0\u7D22",
|
|
22110
|
+
onChange: props.onSearch
|
|
22111
|
+
})), React__default['default'].createElement(ktsXui.Tree, {
|
|
22112
|
+
onSelect: props.onSelect,
|
|
22113
|
+
loadData: props.onLoad,
|
|
22114
|
+
treeData: props.list,
|
|
22115
|
+
switcherIcon: React__default['default'].createElement(ktsComponentsAntdX3.Icon, {
|
|
22116
|
+
type: "down"
|
|
22117
|
+
})
|
|
22118
|
+
})));
|
|
22119
|
+
}
|
|
22120
|
+
|
|
22043
22121
|
var TreeNode = ktsComponentsAntdX3.Tree.TreeNode;
|
|
22044
22122
|
var confirm = ktsComponentsAntdX3.Modal.confirm;
|
|
22045
22123
|
var EndowCodeDrawer = (function () {
|
|
@@ -22163,6 +22241,9 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22163
22241
|
var actions = React__default['default'].useMemo(function () {
|
|
22164
22242
|
return antd.createAsyncFormActions();
|
|
22165
22243
|
}, []);
|
|
22244
|
+
var taxClassificationProps = controller.useMemo(function (s) {
|
|
22245
|
+
return s.taxClassificationProps;
|
|
22246
|
+
}, []);
|
|
22166
22247
|
/** 免税类型 是否需要 */
|
|
22167
22248
|
|
|
22168
22249
|
var isTaxFreeTypeNeeded = controller.useMemo(function (s) {
|
|
@@ -22536,21 +22617,255 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22536
22617
|
color: '#00000073'
|
|
22537
22618
|
}
|
|
22538
22619
|
}, "\u8BF7\u8F93\u5165\u201C\u4EA7\u54C1\u6216\u670D\u52A1\u7B80\u79F0\u201D\u6216\u201C\u7A0E\u6536\u5206\u7C7B\u7F16\u7801\u201D\u67E5\u627E\u6570\u636E\u3002")));
|
|
22539
|
-
}, [controller, actions]);
|
|
22620
|
+
}, [controller, actions]);
|
|
22621
|
+
/** 税收分类编码 选择组件3 */
|
|
22622
|
+
|
|
22623
|
+
var ShowSearch3 = React__default['default'].useCallback(function (props) {
|
|
22624
|
+
var _React$useState13 = React__default['default'].useState(false),
|
|
22625
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
22626
|
+
open = _React$useState14[0],
|
|
22627
|
+
setOpen = _React$useState14[1];
|
|
22628
|
+
|
|
22629
|
+
var _React$useState15 = React__default['default'].useState([]),
|
|
22630
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
22631
|
+
list = _React$useState16[0],
|
|
22632
|
+
setList = _React$useState16[1];
|
|
22633
|
+
|
|
22634
|
+
var onSearch = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
22635
|
+
var _value$target;
|
|
22636
|
+
|
|
22637
|
+
var value,
|
|
22638
|
+
arr,
|
|
22639
|
+
list,
|
|
22640
|
+
_args11 = arguments;
|
|
22641
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
22642
|
+
while (1) {
|
|
22643
|
+
switch (_context11.prev = _context11.next) {
|
|
22644
|
+
case 0:
|
|
22645
|
+
value = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : null;
|
|
22646
|
+
_context11.next = 3;
|
|
22647
|
+
return controller.state.goodsListState.endowCode.onSearchTaxClassificationCode(value === null || value === void 0 ? void 0 : (_value$target = value.target) === null || _value$target === void 0 ? void 0 : _value$target.value);
|
|
22648
|
+
|
|
22649
|
+
case 3:
|
|
22650
|
+
arr = _context11.sent;
|
|
22651
|
+
list = arr.map(function (item) {
|
|
22652
|
+
var _value$target2;
|
|
22653
|
+
|
|
22654
|
+
var data = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22655
|
+
title: "".concat(item.productName, " ").concat(item.taxCategoryCode),
|
|
22656
|
+
key: item.taxCategoryCode
|
|
22657
|
+
});
|
|
22658
|
+
|
|
22659
|
+
if (value === null || value === void 0 ? void 0 : (_value$target2 = value.target) === null || _value$target2 === void 0 ? void 0 : _value$target2.value) {
|
|
22660
|
+
data.isLeaf = true;
|
|
22661
|
+
} else {
|
|
22662
|
+
data.selectable = false;
|
|
22663
|
+
}
|
|
22540
22664
|
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
|
|
22544
|
-
|
|
22665
|
+
return data;
|
|
22666
|
+
});
|
|
22667
|
+
setList(list);
|
|
22668
|
+
|
|
22669
|
+
case 6:
|
|
22670
|
+
case "end":
|
|
22671
|
+
return _context11.stop();
|
|
22672
|
+
}
|
|
22673
|
+
}
|
|
22674
|
+
}, _callee11);
|
|
22675
|
+
})), []);
|
|
22676
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
22677
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
22678
|
+
while (1) {
|
|
22679
|
+
switch (_context12.prev = _context12.next) {
|
|
22680
|
+
case 0:
|
|
22681
|
+
_context12.next = 2;
|
|
22682
|
+
return onSearch();
|
|
22683
|
+
|
|
22684
|
+
case 2:
|
|
22685
|
+
setOpen(true);
|
|
22686
|
+
|
|
22687
|
+
case 3:
|
|
22688
|
+
case "end":
|
|
22689
|
+
return _context12.stop();
|
|
22690
|
+
}
|
|
22691
|
+
}
|
|
22692
|
+
}, _callee12);
|
|
22693
|
+
})), []);
|
|
22694
|
+
var onSelect = React__default['default'].useCallback(function (key, info) {
|
|
22695
|
+
actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
|
|
22696
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(s) {
|
|
22697
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
22698
|
+
while (1) {
|
|
22699
|
+
switch (_context13.prev = _context13.next) {
|
|
22700
|
+
case 0:
|
|
22701
|
+
s.value = info.node.taxCategoryCode;
|
|
22702
|
+
|
|
22703
|
+
case 1:
|
|
22704
|
+
case "end":
|
|
22705
|
+
return _context13.stop();
|
|
22706
|
+
}
|
|
22707
|
+
}
|
|
22708
|
+
}, _callee13);
|
|
22709
|
+
}));
|
|
22710
|
+
|
|
22711
|
+
return function (_x9) {
|
|
22712
|
+
return _ref13.apply(this, arguments);
|
|
22713
|
+
};
|
|
22714
|
+
}());
|
|
22715
|
+
actions.setFieldState('productName', /*#__PURE__*/function () {
|
|
22716
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
|
|
22717
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
22718
|
+
while (1) {
|
|
22719
|
+
switch (_context14.prev = _context14.next) {
|
|
22720
|
+
case 0:
|
|
22721
|
+
s.value = info.node.productName;
|
|
22722
|
+
|
|
22723
|
+
case 1:
|
|
22724
|
+
case "end":
|
|
22725
|
+
return _context14.stop();
|
|
22726
|
+
}
|
|
22727
|
+
}
|
|
22728
|
+
}, _callee14);
|
|
22729
|
+
}));
|
|
22730
|
+
|
|
22731
|
+
return function (_x10) {
|
|
22732
|
+
return _ref14.apply(this, arguments);
|
|
22733
|
+
};
|
|
22734
|
+
}());
|
|
22735
|
+
actions.setFieldState('shorthand', /*#__PURE__*/function () {
|
|
22736
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(s) {
|
|
22737
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
22738
|
+
while (1) {
|
|
22739
|
+
switch (_context15.prev = _context15.next) {
|
|
22740
|
+
case 0:
|
|
22741
|
+
s.value = info.node.shorthand;
|
|
22742
|
+
|
|
22743
|
+
case 1:
|
|
22744
|
+
case "end":
|
|
22745
|
+
return _context15.stop();
|
|
22746
|
+
}
|
|
22747
|
+
}
|
|
22748
|
+
}, _callee15);
|
|
22749
|
+
}));
|
|
22750
|
+
|
|
22751
|
+
return function (_x11) {
|
|
22752
|
+
return _ref15.apply(this, arguments);
|
|
22753
|
+
};
|
|
22754
|
+
}());
|
|
22755
|
+
actions.setFieldState('taxRate', /*#__PURE__*/function () {
|
|
22756
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(s) {
|
|
22757
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
22758
|
+
while (1) {
|
|
22759
|
+
switch (_context16.prev = _context16.next) {
|
|
22760
|
+
case 0:
|
|
22761
|
+
s.value = info.node.taxRate;
|
|
22762
|
+
|
|
22763
|
+
case 1:
|
|
22764
|
+
case "end":
|
|
22765
|
+
return _context16.stop();
|
|
22766
|
+
}
|
|
22767
|
+
}
|
|
22768
|
+
}, _callee16);
|
|
22769
|
+
}));
|
|
22770
|
+
|
|
22771
|
+
return function (_x12) {
|
|
22772
|
+
return _ref16.apply(this, arguments);
|
|
22773
|
+
};
|
|
22774
|
+
}());
|
|
22775
|
+
setOpen(false);
|
|
22776
|
+
}, [controller, actions]);
|
|
22777
|
+
|
|
22778
|
+
var updateTreeData = function updateTreeData(list, key, children) {
|
|
22779
|
+
var demo = list.map(function (node) {
|
|
22780
|
+
if (node.key === key) {
|
|
22781
|
+
return _objectSpread2(_objectSpread2({}, node), {}, {
|
|
22782
|
+
children: children
|
|
22783
|
+
});
|
|
22784
|
+
}
|
|
22785
|
+
|
|
22786
|
+
if (node.children) {
|
|
22787
|
+
return _objectSpread2(_objectSpread2({}, node), {}, {
|
|
22788
|
+
children: updateTreeData(node.children, key, children)
|
|
22789
|
+
});
|
|
22790
|
+
}
|
|
22791
|
+
|
|
22792
|
+
return node;
|
|
22793
|
+
});
|
|
22794
|
+
setList(demo);
|
|
22795
|
+
};
|
|
22796
|
+
|
|
22797
|
+
var onLoad = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
22798
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(value) {
|
|
22799
|
+
var arr, data;
|
|
22800
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
22801
|
+
while (1) {
|
|
22802
|
+
switch (_context17.prev = _context17.next) {
|
|
22803
|
+
case 0:
|
|
22804
|
+
if (!value.children) {
|
|
22805
|
+
_context17.next = 2;
|
|
22806
|
+
break;
|
|
22807
|
+
}
|
|
22808
|
+
|
|
22809
|
+
return _context17.abrupt("return", []);
|
|
22810
|
+
|
|
22811
|
+
case 2:
|
|
22812
|
+
_context17.next = 4;
|
|
22813
|
+
return controller.state.goodsListState.endowCode.onLoadTaxClassificationCode(value.taxCategoryCode);
|
|
22814
|
+
|
|
22815
|
+
case 4:
|
|
22816
|
+
arr = _context17.sent;
|
|
22817
|
+
data = arr.map(function (item) {
|
|
22818
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22819
|
+
title: "".concat(item.productName, " ").concat(item.taxCategoryCode),
|
|
22820
|
+
key: item.taxCategoryCode
|
|
22821
|
+
});
|
|
22822
|
+
});
|
|
22823
|
+
setList(function (origin) {
|
|
22824
|
+
updateTreeData(origin, value.key, data);
|
|
22825
|
+
});
|
|
22826
|
+
return _context17.abrupt("return", []);
|
|
22827
|
+
|
|
22828
|
+
case 8:
|
|
22829
|
+
case "end":
|
|
22830
|
+
return _context17.stop();
|
|
22831
|
+
}
|
|
22832
|
+
}
|
|
22833
|
+
}, _callee17);
|
|
22834
|
+
}));
|
|
22835
|
+
|
|
22836
|
+
return function (_x13) {
|
|
22837
|
+
return _ref17.apply(this, arguments);
|
|
22838
|
+
};
|
|
22839
|
+
}(), []);
|
|
22840
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(ktsComponentsAntdX3.Input, {
|
|
22841
|
+
readOnly: true,
|
|
22842
|
+
onClick: onClick,
|
|
22843
|
+
value: props.value
|
|
22844
|
+
}), React__default['default'].createElement(TaxClassificationModal, {
|
|
22845
|
+
list: list,
|
|
22846
|
+
open: open,
|
|
22847
|
+
onSelect: onSelect,
|
|
22848
|
+
onCancel: function onCancel() {
|
|
22849
|
+
setOpen(false);
|
|
22850
|
+
},
|
|
22851
|
+
onSearch: onSearch,
|
|
22852
|
+
onLoad: onLoad
|
|
22853
|
+
}));
|
|
22854
|
+
}, [controller]); // 是否享受优惠政策
|
|
22855
|
+
|
|
22856
|
+
var _React$useState17 = React__default['default'].useState(0),
|
|
22857
|
+
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
22858
|
+
favouredPolicyMark = _React$useState18[0],
|
|
22859
|
+
setFavouredPolicyMark = _React$useState18[1]; // 确定
|
|
22545
22860
|
|
|
22546
22861
|
|
|
22547
22862
|
var onSubmit = React__default['default'].useCallback(function (values) {
|
|
22548
22863
|
controller.pipeline( /*#__PURE__*/function () {
|
|
22549
|
-
var
|
|
22864
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(s) {
|
|
22550
22865
|
var endowCodeGood;
|
|
22551
|
-
return _regeneratorRuntime().wrap(function
|
|
22866
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
22552
22867
|
while (1) {
|
|
22553
|
-
switch (
|
|
22868
|
+
switch (_context18.prev = _context18.next) {
|
|
22554
22869
|
case 0:
|
|
22555
22870
|
endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
|
|
22556
22871
|
return s.goodsListState.goodsMap.get(e);
|
|
@@ -22577,14 +22892,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22577
22892
|
|
|
22578
22893
|
case 4:
|
|
22579
22894
|
case "end":
|
|
22580
|
-
return
|
|
22895
|
+
return _context18.stop();
|
|
22581
22896
|
}
|
|
22582
22897
|
}
|
|
22583
|
-
},
|
|
22898
|
+
}, _callee18);
|
|
22584
22899
|
}));
|
|
22585
22900
|
|
|
22586
|
-
return function (
|
|
22587
|
-
return
|
|
22901
|
+
return function (_x14) {
|
|
22902
|
+
return _ref18.apply(this, arguments);
|
|
22588
22903
|
};
|
|
22589
22904
|
}())();
|
|
22590
22905
|
}, [controller]);
|
|
@@ -22593,23 +22908,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22593
22908
|
antd.FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
|
|
22594
22909
|
setTaxRate(e.value);
|
|
22595
22910
|
actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
|
|
22596
|
-
var
|
|
22597
|
-
return _regeneratorRuntime().wrap(function
|
|
22911
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(s) {
|
|
22912
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
22598
22913
|
while (1) {
|
|
22599
|
-
switch (
|
|
22914
|
+
switch (_context19.prev = _context19.next) {
|
|
22600
22915
|
case 0:
|
|
22601
22916
|
if (e.value !== 0) s.value = undefined;
|
|
22602
22917
|
|
|
22603
22918
|
case 1:
|
|
22604
22919
|
case "end":
|
|
22605
|
-
return
|
|
22920
|
+
return _context19.stop();
|
|
22606
22921
|
}
|
|
22607
22922
|
}
|
|
22608
|
-
},
|
|
22923
|
+
}, _callee19);
|
|
22609
22924
|
}));
|
|
22610
22925
|
|
|
22611
|
-
return function (
|
|
22612
|
-
return
|
|
22926
|
+
return function (_x15) {
|
|
22927
|
+
return _ref19.apply(this, arguments);
|
|
22613
22928
|
};
|
|
22614
22929
|
}());
|
|
22615
22930
|
}); // 是否享受优惠政策
|
|
@@ -22617,23 +22932,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22617
22932
|
antd.FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
|
|
22618
22933
|
setFavouredPolicyMark(e.value);
|
|
22619
22934
|
actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
|
|
22620
|
-
var
|
|
22621
|
-
return _regeneratorRuntime().wrap(function
|
|
22935
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(s) {
|
|
22936
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
22622
22937
|
while (1) {
|
|
22623
|
-
switch (
|
|
22938
|
+
switch (_context20.prev = _context20.next) {
|
|
22624
22939
|
case 0:
|
|
22625
22940
|
if (e.value === 0) s.value = undefined;
|
|
22626
22941
|
|
|
22627
22942
|
case 1:
|
|
22628
22943
|
case "end":
|
|
22629
|
-
return
|
|
22944
|
+
return _context20.stop();
|
|
22630
22945
|
}
|
|
22631
22946
|
}
|
|
22632
|
-
},
|
|
22947
|
+
}, _callee20);
|
|
22633
22948
|
}));
|
|
22634
22949
|
|
|
22635
|
-
return function (
|
|
22636
|
-
return
|
|
22950
|
+
return function (_x16) {
|
|
22951
|
+
return _ref20.apply(this, arguments);
|
|
22637
22952
|
};
|
|
22638
22953
|
}());
|
|
22639
22954
|
});
|
|
@@ -22646,7 +22961,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22646
22961
|
actions: actions,
|
|
22647
22962
|
previewPlaceholder: " ",
|
|
22648
22963
|
components: _objectSpread2(_objectSpread2({}, components), {}, {
|
|
22649
|
-
showSearch: !!controller.state.goodsListState.endowCode.
|
|
22964
|
+
showSearch: !!controller.state.goodsListState.endowCode.onSearchTaxClassificationCode() ? ShowSearch3 : ShowSearch
|
|
22650
22965
|
}),
|
|
22651
22966
|
effects: effects
|
|
22652
22967
|
}, React__default['default'].createElement(antd.FormButtonGroup, null, React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
@@ -22659,6 +22974,12 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22659
22974
|
message: '请选择税收分类编码',
|
|
22660
22975
|
required: true
|
|
22661
22976
|
}]
|
|
22977
|
+
}), React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
22978
|
+
name: "productName",
|
|
22979
|
+
type: "string",
|
|
22980
|
+
readOnly: true,
|
|
22981
|
+
default: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.productName,
|
|
22982
|
+
title: "\u7A0E\u6536\u5206\u7C7B\u540D\u79F0"
|
|
22662
22983
|
}), React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
22663
22984
|
name: "shorthand",
|
|
22664
22985
|
type: "string",
|
|
@@ -22733,23 +23054,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22733
23054
|
}, "\u786E\u5B9A"), React__default['default'].createElement(ktsComponentsAntdX3.Button, {
|
|
22734
23055
|
onClick: function onClick() {
|
|
22735
23056
|
controller.pipeline( /*#__PURE__*/function () {
|
|
22736
|
-
var
|
|
22737
|
-
return _regeneratorRuntime().wrap(function
|
|
23057
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(s) {
|
|
23058
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
22738
23059
|
while (1) {
|
|
22739
|
-
switch (
|
|
23060
|
+
switch (_context21.prev = _context21.next) {
|
|
22740
23061
|
case 0:
|
|
22741
|
-
return
|
|
23062
|
+
return _context21.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
|
|
22742
23063
|
|
|
22743
23064
|
case 1:
|
|
22744
23065
|
case "end":
|
|
22745
|
-
return
|
|
23066
|
+
return _context21.stop();
|
|
22746
23067
|
}
|
|
22747
23068
|
}
|
|
22748
|
-
},
|
|
23069
|
+
}, _callee21);
|
|
22749
23070
|
}));
|
|
22750
23071
|
|
|
22751
|
-
return function (
|
|
22752
|
-
return
|
|
23072
|
+
return function (_x17) {
|
|
23073
|
+
return _ref21.apply(this, arguments);
|
|
22753
23074
|
};
|
|
22754
23075
|
}())();
|
|
22755
23076
|
}
|
|
@@ -23128,3 +23449,4 @@ var Digtal = function Digtal(props) {
|
|
|
23128
23449
|
exports.Invoice = Invoice;
|
|
23129
23450
|
exports.InvoiceController = InvoiceController;
|
|
23130
23451
|
exports.InvoiceTypeModal = InvoiceTypeModal;
|
|
23452
|
+
exports.TaxClassificationModal = TaxClassificationModal;
|
package/package.json
CHANGED
|
@@ -9,10 +9,11 @@ export default () => {
|
|
|
9
9
|
React.useEffect(() => {
|
|
10
10
|
(async () => {
|
|
11
11
|
await controller.run(async s => { s.model = 'readOnly' }); // 设置只读
|
|
12
|
+
await controller.run(async s => { s.stakeholder.enables = ['remarks'] });
|
|
12
13
|
await controller.formList.get('invoiceHeader')?.setFieldsValue({
|
|
13
14
|
no: '2029292029201920291029',
|
|
14
15
|
invoicingDate: '2023年7月6日',
|
|
15
|
-
tag:'成品油',
|
|
16
|
+
tag: '成品油',
|
|
16
17
|
})
|
|
17
18
|
await controller.formList.get('stakeholder')?.setFieldsValue({
|
|
18
19
|
buyerName: '国能供应链内蒙古有限公司',
|
|
@@ -30,8 +31,8 @@ export default () => {
|
|
|
30
31
|
sellerAccount: '9550880218186900195',
|
|
31
32
|
})
|
|
32
33
|
await controller.formList.get('sign')?.setFieldsValue({
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
remarks: '备注',
|
|
35
|
+
drawer: '张自豪',
|
|
35
36
|
})
|
|
36
37
|
})()
|
|
37
38
|
}, [controller])
|
package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx
CHANGED
|
@@ -7,7 +7,7 @@ export default class EndowCode {
|
|
|
7
7
|
/** 准备赋码的货物索引列表 */
|
|
8
8
|
endowcodeGoodIndex: string[] = [];
|
|
9
9
|
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
11
|
* 获取 税收分类编码列表 (弃用)
|
|
12
12
|
* @deprecated 请使用 getTaxCategoryCodeTree 替换
|
|
13
13
|
* */
|
|
@@ -27,7 +27,7 @@ export default class EndowCode {
|
|
|
27
27
|
/** 优惠政策 优惠政策 */
|
|
28
28
|
getReadOnlyFavouredPolicy?: (value?: GoodsListState) => boolean;
|
|
29
29
|
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
31
|
* 获取赋码时候的默认值
|
|
32
32
|
* @param value 商品信息
|
|
33
33
|
* @param length 商品数量
|
|
@@ -71,17 +71,27 @@ export default class EndowCode {
|
|
|
71
71
|
{ label: '普通零税率(0%)', value: 3 },
|
|
72
72
|
];
|
|
73
73
|
|
|
74
|
-
/**
|
|
74
|
+
/**
|
|
75
75
|
* 小规模纳税人 自动赋码缓存 、
|
|
76
76
|
* */
|
|
77
77
|
cache: { [key: string]: any } = {};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 打开侧边栏
|
|
81
|
+
* */
|
|
82
|
+
onSearchTaxClassificationCode: (value?: any) => Promise<any[]> = async () => [];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 动态加载
|
|
86
|
+
* */
|
|
87
|
+
onLoadTaxClassificationCode: (value?: any) => Promise<any[]> = async () => [];
|
|
78
88
|
}
|
|
79
89
|
|
|
80
90
|
/** 草稿发票 税率 是否可以编辑 校验函数 */
|
|
81
91
|
function draft(value?: GoodsListState) {
|
|
82
92
|
if (!value) return true;
|
|
83
93
|
|
|
84
|
-
// isDiscount
|
|
94
|
+
// isDiscount
|
|
85
95
|
const goods = value.endowCode.endowcodeGoodIndex.map(e => value.goodsMap.get(e)).filter(e => e?.lineAttribute !== LineAttributeType.折扣行);
|
|
86
96
|
const isDiscount = goods.some(e => e?.lineAttribute === LineAttributeType.被折扣行);
|
|
87
97
|
|
|
@@ -91,4 +101,4 @@ function draft(value?: GoodsListState) {
|
|
|
91
101
|
} else {
|
|
92
102
|
return false;
|
|
93
103
|
}
|
|
94
|
-
}
|
|
104
|
+
}
|