kts-component-invoice-operate 3.2.181-17 → 3.2.181-18
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 +1 -0
- package/dist/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.d.ts +1 -1
- package/dist/index.esm.js +8 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +2 -0
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx +7 -1
package/dist/index.esm.js
CHANGED
|
@@ -11118,6 +11118,8 @@ function SvgSpot(props) {
|
|
|
11118
11118
|
}
|
|
11119
11119
|
|
|
11120
11120
|
var useDelItem = (function (goods) {
|
|
11121
|
+
var _goods$referenceLines;
|
|
11122
|
+
|
|
11121
11123
|
var controller = Invoice.useInvoiceController();
|
|
11122
11124
|
var model = controller.useMemo(function (s) {
|
|
11123
11125
|
return s.model;
|
|
@@ -11128,6 +11130,11 @@ var useDelItem = (function (goods) {
|
|
|
11128
11130
|
var onClick = React.useCallback(function () {
|
|
11129
11131
|
controller.delGood(goods.$index);
|
|
11130
11132
|
}, [controller, goods.$index]);
|
|
11133
|
+
console.log('111111111', goods);
|
|
11134
|
+
|
|
11135
|
+
if (goods.lineAttribute === LineAttributeType$1.正常 && (goods === null || goods === void 0 ? void 0 : goods.referenceLines) && (goods === null || goods === void 0 ? void 0 : (_goods$referenceLines = goods.referenceLines) === null || _goods$referenceLines === void 0 ? void 0 : _goods$referenceLines.length) > 0) {
|
|
11136
|
+
return undefined;
|
|
11137
|
+
}
|
|
11131
11138
|
|
|
11132
11139
|
if (goods.lineAttribute === LineAttributeType$1.被折扣行) {
|
|
11133
11140
|
return undefined;
|
|
@@ -11144,7 +11151,7 @@ var useDelItem = (function (goods) {
|
|
|
11144
11151
|
return {
|
|
11145
11152
|
key: 'delItem',
|
|
11146
11153
|
title: '删除',
|
|
11147
|
-
|
|
11154
|
+
disabled: onClick
|
|
11148
11155
|
}; // return React.useMemo(() => {
|
|
11149
11156
|
// return <Menu.Item key="delItem" onClick={onClick}><Text strong type="danger">删除</Text></Menu.Item>
|
|
11150
11157
|
// }, [onClick])
|
package/dist/index.js
CHANGED
|
@@ -11128,6 +11128,8 @@ function SvgSpot(props) {
|
|
|
11128
11128
|
}
|
|
11129
11129
|
|
|
11130
11130
|
var useDelItem = (function (goods) {
|
|
11131
|
+
var _goods$referenceLines;
|
|
11132
|
+
|
|
11131
11133
|
var controller = Invoice.useInvoiceController();
|
|
11132
11134
|
var model = controller.useMemo(function (s) {
|
|
11133
11135
|
return s.model;
|
|
@@ -11138,6 +11140,11 @@ var useDelItem = (function (goods) {
|
|
|
11138
11140
|
var onClick = React__default['default'].useCallback(function () {
|
|
11139
11141
|
controller.delGood(goods.$index);
|
|
11140
11142
|
}, [controller, goods.$index]);
|
|
11143
|
+
console.log('111111111', goods);
|
|
11144
|
+
|
|
11145
|
+
if (goods.lineAttribute === LineAttributeType$1.正常 && (goods === null || goods === void 0 ? void 0 : goods.referenceLines) && (goods === null || goods === void 0 ? void 0 : (_goods$referenceLines = goods.referenceLines) === null || _goods$referenceLines === void 0 ? void 0 : _goods$referenceLines.length) > 0) {
|
|
11146
|
+
return undefined;
|
|
11147
|
+
}
|
|
11141
11148
|
|
|
11142
11149
|
if (goods.lineAttribute === LineAttributeType$1.被折扣行) {
|
|
11143
11150
|
return undefined;
|
|
@@ -11154,7 +11161,7 @@ var useDelItem = (function (goods) {
|
|
|
11154
11161
|
return {
|
|
11155
11162
|
key: 'delItem',
|
|
11156
11163
|
title: '删除',
|
|
11157
|
-
|
|
11164
|
+
disabled: onClick
|
|
11158
11165
|
}; // return React.useMemo(() => {
|
|
11159
11166
|
// return <Menu.Item key="delItem" onClick={onClick}><Text strong type="danger">删除</Text></Menu.Item>
|
|
11160
11167
|
// }, [onClick])
|
package/package.json
CHANGED
package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/RowMenu/hook/useDelItem/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
// import { Menu, Typography } from 'kts-components-antd-x3';
|
|
3
3
|
import { IGood, LineAttributeType } from '../../../../../../../../../InvoiceController';
|
|
4
|
-
import Invoice from '../../../../../../../../..';
|
|
4
|
+
import Invoice from '../../../../../../../../..';
|
|
5
5
|
|
|
6
6
|
// const { Text } = Typography;
|
|
7
7
|
|
|
@@ -16,6 +16,11 @@ export default (goods: IGood) => {
|
|
|
16
16
|
const onClick = React.useCallback(() => {
|
|
17
17
|
controller.delGood(goods.$index);
|
|
18
18
|
}, [controller, goods.$index]);
|
|
19
|
+
console.log('111111111', goods);
|
|
20
|
+
|
|
21
|
+
if (goods.lineAttribute === LineAttributeType.正常 && goods?.referenceLines && goods?.referenceLines?.length > 0 ) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
19
24
|
|
|
20
25
|
if (goods.lineAttribute === LineAttributeType.被折扣行) {
|
|
21
26
|
return undefined;
|
|
@@ -32,6 +37,7 @@ export default (goods: IGood) => {
|
|
|
32
37
|
return {
|
|
33
38
|
key:'delItem',
|
|
34
39
|
title:'删除',
|
|
40
|
+
disabled:
|
|
35
41
|
onClick,
|
|
36
42
|
}
|
|
37
43
|
|