kts-component-invoice-operate 3.1.7 → 3.1.8
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 +2 -0
- package/dist/index.esm.js +8 -3
- package/dist/index.js +8 -3
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +3 -0
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +4 -1
- package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/hook/useAddDiscount/index.tsx +1 -1
- package/src/Invoice/ui/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -815,6 +815,7 @@ var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
|
|
|
815
815
|
DRAFT: draft
|
|
816
816
|
};
|
|
817
817
|
this.favouredPolicyNameList = ['100%先征后退', '即征即退30%', '即征即退50%', '即征即退70%', '按3%简易征收', '按5%简易征收', '按3%简易征收减按1.5%计征', '稀土产品', '简易征收', '50%先征后退', '不征税', '先征后退', '免税', '即征即退100%', '超税负3%即征即退', '超税负8%即征即退', '超税负12%即征即退'];
|
|
818
|
+
this.isTaxFreeTypeNeeded = true;
|
|
818
819
|
this.taxFreeTypeList = [{
|
|
819
820
|
label: '出口免税和其他免税优惠政策(免税)',
|
|
820
821
|
value: 1
|
|
@@ -2248,7 +2249,7 @@ var useAddDiscount = (function (goods) {
|
|
|
2248
2249
|
return _context.abrupt("return");
|
|
2249
2250
|
case 11:
|
|
2250
2251
|
goods = s.goodsListState.goodsMap.get(goods.$index);
|
|
2251
|
-
if (!(goods.taxRate === 0 && !goods.taxFreeType)) {
|
|
2252
|
+
if (!(goods.taxRate === 0 && s.goodsListState.endowCode.isTaxFreeTypeNeeded && !goods.taxFreeType)) {
|
|
2252
2253
|
_context.next = 15;
|
|
2253
2254
|
break;
|
|
2254
2255
|
}
|
|
@@ -10669,7 +10670,7 @@ var useAddDiscountRowButton = (function () {
|
|
|
10669
10670
|
case 4:
|
|
10670
10671
|
isOk = s.goodsListState.selectedGoodIndex.some(function ($index) {
|
|
10671
10672
|
var good = s.goodsListState.goodsMap.get($index);
|
|
10672
|
-
return !good || good.taxRate === 0 && !good.taxFreeType;
|
|
10673
|
+
return !good || good.taxRate === 0 && s.goodsListState.endowCode.isTaxFreeTypeNeeded && !good.taxFreeType;
|
|
10673
10674
|
});
|
|
10674
10675
|
if (!isOk) {
|
|
10675
10676
|
_context2.next = 8;
|
|
@@ -12090,6 +12091,10 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12090
12091
|
var actions = React.useMemo(function () {
|
|
12091
12092
|
return createAsyncFormActions();
|
|
12092
12093
|
}, []);
|
|
12094
|
+
/** 免税类型 是否需要 */
|
|
12095
|
+
var isTaxFreeTypeNeeded = controller.useMemo(function (s) {
|
|
12096
|
+
return s.goodsListState.endowCode.isTaxFreeTypeNeeded;
|
|
12097
|
+
}, []);
|
|
12093
12098
|
/** 税率 是否禁用 */
|
|
12094
12099
|
var readOnlyTaxRate = controller.useMemo(function (s) {
|
|
12095
12100
|
if (s.goodsListState.endowCode.getReadOnlyTaxRate) {
|
|
@@ -12534,7 +12539,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12534
12539
|
message: '请选择税率',
|
|
12535
12540
|
required: true
|
|
12536
12541
|
}]
|
|
12537
|
-
}), taxRate === 0 && /*#__PURE__*/React.createElement(SchemaMarkupField, {
|
|
12542
|
+
}), taxRate === 0 && isTaxFreeTypeNeeded && /*#__PURE__*/React.createElement(SchemaMarkupField, {
|
|
12538
12543
|
name: "taxFreeType",
|
|
12539
12544
|
type: "string",
|
|
12540
12545
|
title: "\u514D\u7A0E\u7C7B\u578B",
|
package/dist/index.js
CHANGED
|
@@ -825,6 +825,7 @@ var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
|
|
|
825
825
|
DRAFT: draft
|
|
826
826
|
};
|
|
827
827
|
this.favouredPolicyNameList = ['100%先征后退', '即征即退30%', '即征即退50%', '即征即退70%', '按3%简易征收', '按5%简易征收', '按3%简易征收减按1.5%计征', '稀土产品', '简易征收', '50%先征后退', '不征税', '先征后退', '免税', '即征即退100%', '超税负3%即征即退', '超税负8%即征即退', '超税负12%即征即退'];
|
|
828
|
+
this.isTaxFreeTypeNeeded = true;
|
|
828
829
|
this.taxFreeTypeList = [{
|
|
829
830
|
label: '出口免税和其他免税优惠政策(免税)',
|
|
830
831
|
value: 1
|
|
@@ -2258,7 +2259,7 @@ var useAddDiscount = (function (goods) {
|
|
|
2258
2259
|
return _context.abrupt("return");
|
|
2259
2260
|
case 11:
|
|
2260
2261
|
goods = s.goodsListState.goodsMap.get(goods.$index);
|
|
2261
|
-
if (!(goods.taxRate === 0 && !goods.taxFreeType)) {
|
|
2262
|
+
if (!(goods.taxRate === 0 && s.goodsListState.endowCode.isTaxFreeTypeNeeded && !goods.taxFreeType)) {
|
|
2262
2263
|
_context.next = 15;
|
|
2263
2264
|
break;
|
|
2264
2265
|
}
|
|
@@ -10679,7 +10680,7 @@ var useAddDiscountRowButton = (function () {
|
|
|
10679
10680
|
case 4:
|
|
10680
10681
|
isOk = s.goodsListState.selectedGoodIndex.some(function ($index) {
|
|
10681
10682
|
var good = s.goodsListState.goodsMap.get($index);
|
|
10682
|
-
return !good || good.taxRate === 0 && !good.taxFreeType;
|
|
10683
|
+
return !good || good.taxRate === 0 && s.goodsListState.endowCode.isTaxFreeTypeNeeded && !good.taxFreeType;
|
|
10683
10684
|
});
|
|
10684
10685
|
if (!isOk) {
|
|
10685
10686
|
_context2.next = 8;
|
|
@@ -12100,6 +12101,10 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12100
12101
|
var actions = React__default['default'].useMemo(function () {
|
|
12101
12102
|
return antd.createAsyncFormActions();
|
|
12102
12103
|
}, []);
|
|
12104
|
+
/** 免税类型 是否需要 */
|
|
12105
|
+
var isTaxFreeTypeNeeded = controller.useMemo(function (s) {
|
|
12106
|
+
return s.goodsListState.endowCode.isTaxFreeTypeNeeded;
|
|
12107
|
+
}, []);
|
|
12103
12108
|
/** 税率 是否禁用 */
|
|
12104
12109
|
var readOnlyTaxRate = controller.useMemo(function (s) {
|
|
12105
12110
|
if (s.goodsListState.endowCode.getReadOnlyTaxRate) {
|
|
@@ -12544,7 +12549,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
12544
12549
|
message: '请选择税率',
|
|
12545
12550
|
required: true
|
|
12546
12551
|
}]
|
|
12547
|
-
}), taxRate === 0 && /*#__PURE__*/React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
12552
|
+
}), taxRate === 0 && isTaxFreeTypeNeeded && /*#__PURE__*/React__default['default'].createElement(antd.SchemaMarkupField, {
|
|
12548
12553
|
name: "taxFreeType",
|
|
12549
12554
|
type: "string",
|
|
12550
12555
|
title: "\u514D\u7A0E\u7C7B\u578B",
|
package/package.json
CHANGED
|
@@ -87,6 +87,9 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
|
|
|
87
87
|
|
|
88
88
|
const actions = React.useMemo(() => createAsyncFormActions(), []);
|
|
89
89
|
|
|
90
|
+
/** 免税类型 是否需要 */
|
|
91
|
+
const isTaxFreeTypeNeeded = controller.useMemo(s => s.goodsListState.endowCode.isTaxFreeTypeNeeded, []);
|
|
92
|
+
|
|
90
93
|
/** 税率 是否禁用 */
|
|
91
94
|
const readOnlyTaxRate = controller.useMemo(s => {
|
|
92
95
|
if (s.goodsListState.endowCode.getReadOnlyTaxRate) {
|
|
@@ -377,7 +380,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
|
|
|
377
380
|
enum={taxRateList}
|
|
378
381
|
x-rules={[{ message: '请选择税率', required: true }]}
|
|
379
382
|
/>
|
|
380
|
-
{taxRate === 0 &&
|
|
383
|
+
{taxRate === 0 && isTaxFreeTypeNeeded &&
|
|
381
384
|
<Field
|
|
382
385
|
name="taxFreeType"
|
|
383
386
|
type="string"
|
|
@@ -30,7 +30,7 @@ export default (goods: IGood) => {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
goods = s.goodsListState.goodsMap.get(goods.$index) as any;
|
|
33
|
-
if (goods.taxRate === 0 && !goods.taxFreeType) {
|
|
33
|
+
if (goods.taxRate === 0 && s.goodsListState.endowCode.isTaxFreeTypeNeeded && !goods.taxFreeType) {
|
|
34
34
|
message.error({ content: '零税率需要设置免税类型,请在赋码中设置!', key: '零税率需要设置免税类型,请在赋码中设置!' });
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
@@ -66,7 +66,7 @@ export default () => {
|
|
|
66
66
|
|
|
67
67
|
isOk = s.goodsListState.selectedGoodIndex.some($index => {
|
|
68
68
|
const good = s.goodsListState.goodsMap.get($index);
|
|
69
|
-
return !good || (good.taxRate === 0 && !good.taxFreeType)
|
|
69
|
+
return !good || (good.taxRate === 0 && s.goodsListState.endowCode.isTaxFreeTypeNeeded && !good.taxFreeType)
|
|
70
70
|
})
|
|
71
71
|
if (isOk) {
|
|
72
72
|
message.error({ content: '零税率需要设置免税类型,请在赋码中设置!', key: '零税率需要设置免税类型,请在赋码中设置!' });
|