kts-component-invoice-operate 3.2.156-4 → 3.2.156-5
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/index.d.ts +1 -0
- package/dist/index.esm.js +6 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/index.ts +1 -0
- package/src/Invoice/ui/default/GoodsList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1098,6 +1098,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
1098
1098
|
this.isAddDiscount = void 0;
|
|
1099
1099
|
this.isAddRow = true;
|
|
1100
1100
|
this.isRemRow = true;
|
|
1101
|
+
this.isBatchRemRow = false;
|
|
1101
1102
|
this.isTaxIncluded = true;
|
|
1102
1103
|
this.calculateType = '3';
|
|
1103
1104
|
this.isMyShow = false;
|
|
@@ -13522,6 +13523,9 @@ var useDelRowButton = (function () {
|
|
|
13522
13523
|
var isRemRow = controller.useMemo(function (s) {
|
|
13523
13524
|
return s.goodsListState.isRemRow;
|
|
13524
13525
|
}, []);
|
|
13526
|
+
var isBatchRemRow = controller.useMemo(function (s) {
|
|
13527
|
+
return s.goodsListState.isBatchRemRow;
|
|
13528
|
+
}, []);
|
|
13525
13529
|
/** 是否禁用 */
|
|
13526
13530
|
|
|
13527
13531
|
var disabled = controller.useMemo(function (s) {
|
|
@@ -13578,6 +13582,7 @@ var useDelRowButton = (function () {
|
|
|
13578
13582
|
}, " \u5220\u9664\u884C ");
|
|
13579
13583
|
}, [model, onClick, disabled]);
|
|
13580
13584
|
var button = React.useMemo(function () {
|
|
13585
|
+
if (isBatchRemRow === false) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
13581
13586
|
if (isRemRow === false) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
13582
13587
|
if (model === 'prefab') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
13583
13588
|
if (model === 'readOnly') return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
@@ -13585,7 +13590,7 @@ var useDelRowButton = (function () {
|
|
|
13585
13590
|
onClick: onClick,
|
|
13586
13591
|
disabled: disabled
|
|
13587
13592
|
}, "\u6279\u91CF\u5220\u9664");
|
|
13588
|
-
}, [model, onClick, disabled, isRemRow]);
|
|
13593
|
+
}, [model, onClick, disabled, isRemRow, isBatchRemRow]);
|
|
13589
13594
|
return {
|
|
13590
13595
|
button: button,
|
|
13591
13596
|
menuItem: menuItem
|
package/dist/index.js
CHANGED
|
@@ -1108,6 +1108,7 @@ var GoodsListState = /*#__PURE__*/_createClass(function GoodsListState() {
|
|
|
1108
1108
|
this.isAddDiscount = void 0;
|
|
1109
1109
|
this.isAddRow = true;
|
|
1110
1110
|
this.isRemRow = true;
|
|
1111
|
+
this.isBatchRemRow = false;
|
|
1111
1112
|
this.isTaxIncluded = true;
|
|
1112
1113
|
this.calculateType = '3';
|
|
1113
1114
|
this.isMyShow = false;
|
|
@@ -13532,6 +13533,9 @@ var useDelRowButton = (function () {
|
|
|
13532
13533
|
var isRemRow = controller.useMemo(function (s) {
|
|
13533
13534
|
return s.goodsListState.isRemRow;
|
|
13534
13535
|
}, []);
|
|
13536
|
+
var isBatchRemRow = controller.useMemo(function (s) {
|
|
13537
|
+
return s.goodsListState.isBatchRemRow;
|
|
13538
|
+
}, []);
|
|
13535
13539
|
/** 是否禁用 */
|
|
13536
13540
|
|
|
13537
13541
|
var disabled = controller.useMemo(function (s) {
|
|
@@ -13588,6 +13592,7 @@ var useDelRowButton = (function () {
|
|
|
13588
13592
|
}, " \u5220\u9664\u884C ");
|
|
13589
13593
|
}, [model, onClick, disabled]);
|
|
13590
13594
|
var button = React__default['default'].useMemo(function () {
|
|
13595
|
+
if (isBatchRemRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
13591
13596
|
if (isRemRow === false) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
13592
13597
|
if (model === 'prefab') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
13593
13598
|
if (model === 'readOnly') return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
@@ -13595,7 +13600,7 @@ var useDelRowButton = (function () {
|
|
|
13595
13600
|
onClick: onClick,
|
|
13596
13601
|
disabled: disabled
|
|
13597
13602
|
}, "\u6279\u91CF\u5220\u9664");
|
|
13598
|
-
}, [model, onClick, disabled, isRemRow]);
|
|
13603
|
+
}, [model, onClick, disabled, isRemRow, isBatchRemRow]);
|
|
13599
13604
|
return {
|
|
13600
13605
|
button: button,
|
|
13601
13606
|
menuItem: menuItem
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ export default () => {
|
|
|
10
10
|
const model = controller.useMemo(s => s.model, []);
|
|
11
11
|
|
|
12
12
|
const isRemRow = controller.useMemo(s => s.goodsListState.isRemRow, []);
|
|
13
|
-
|
|
13
|
+
const isBatchRemRow = controller.useMemo(s => s.goodsListState.isBatchRemRow, []);
|
|
14
14
|
/** 是否禁用 */
|
|
15
15
|
const disabled = controller.useMemo((s) => {
|
|
16
16
|
if (s.goodsListState.selectedGoodIndex.length <= 0) return true;
|
|
@@ -55,7 +55,7 @@ export default () => {
|
|
|
55
55
|
}, [model, onClick, disabled])
|
|
56
56
|
|
|
57
57
|
const button = React.useMemo(() => {
|
|
58
|
-
|
|
58
|
+
if (isBatchRemRow === false) return <></>;
|
|
59
59
|
if (isRemRow === false) return <></>;
|
|
60
60
|
if (model === 'prefab') return <></>;
|
|
61
61
|
if (model === 'readOnly') return <></>;
|
|
@@ -63,7 +63,7 @@ export default () => {
|
|
|
63
63
|
return (
|
|
64
64
|
<Button onClick={onClick} disabled={disabled} >批量删除</Button>
|
|
65
65
|
)
|
|
66
|
-
}, [model, onClick, disabled, isRemRow])
|
|
66
|
+
}, [model, onClick, disabled, isRemRow, isBatchRemRow])
|
|
67
67
|
|
|
68
68
|
return { button, menuItem };
|
|
69
69
|
};
|