kts-component-invoice-operate 3.2.99 → 3.2.100
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/index.esm.js
CHANGED
|
@@ -10968,22 +10968,20 @@ function ItemNameInput(props) {
|
|
|
10968
10968
|
return _context3.abrupt("return");
|
|
10969
10969
|
|
|
10970
10970
|
case 3:
|
|
10971
|
-
|
|
10971
|
+
setValue(record.itemName);
|
|
10972
|
+
setSelectLine(record);
|
|
10973
|
+
_context3.next = 7;
|
|
10972
10974
|
return controller.setEditGood({
|
|
10973
10975
|
itemName: record.itemName
|
|
10974
10976
|
});
|
|
10975
10977
|
|
|
10976
|
-
case 5:
|
|
10977
|
-
_context3.next = 7;
|
|
10978
|
-
return controller.importGoodsDrawer(record);
|
|
10979
|
-
|
|
10980
10978
|
case 7:
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10979
|
+
_context3.next = 9;
|
|
10980
|
+
return controller.importGoodsDrawer(_objectSpread2(_objectSpread2({}, record), {}, {
|
|
10981
|
+
$index: undefined
|
|
10982
|
+
}));
|
|
10985
10983
|
|
|
10986
|
-
case
|
|
10984
|
+
case 9:
|
|
10987
10985
|
case "end":
|
|
10988
10986
|
return _context3.stop();
|
|
10989
10987
|
}
|
|
@@ -11007,7 +11005,7 @@ function ItemNameInput(props) {
|
|
|
11007
11005
|
}
|
|
11008
11006
|
}, "*", props.shorthand, "*"), React.createElement(AutoComplete$1, {
|
|
11009
11007
|
onSearch: onSearch,
|
|
11010
|
-
value: value,
|
|
11008
|
+
value: props.value,
|
|
11011
11009
|
options: options.map(function (e) {
|
|
11012
11010
|
return {
|
|
11013
11011
|
value: e.$index,
|
|
@@ -11020,6 +11018,7 @@ function ItemNameInput(props) {
|
|
|
11020
11018
|
height: '100%',
|
|
11021
11019
|
border: 'none'
|
|
11022
11020
|
},
|
|
11021
|
+
value: value,
|
|
11023
11022
|
onChange: onChange,
|
|
11024
11023
|
onBlur: onBlur
|
|
11025
11024
|
})));
|
package/dist/index.js
CHANGED
|
@@ -10978,22 +10978,20 @@ function ItemNameInput(props) {
|
|
|
10978
10978
|
return _context3.abrupt("return");
|
|
10979
10979
|
|
|
10980
10980
|
case 3:
|
|
10981
|
-
|
|
10981
|
+
setValue(record.itemName);
|
|
10982
|
+
setSelectLine(record);
|
|
10983
|
+
_context3.next = 7;
|
|
10982
10984
|
return controller.setEditGood({
|
|
10983
10985
|
itemName: record.itemName
|
|
10984
10986
|
});
|
|
10985
10987
|
|
|
10986
|
-
case 5:
|
|
10987
|
-
_context3.next = 7;
|
|
10988
|
-
return controller.importGoodsDrawer(record);
|
|
10989
|
-
|
|
10990
10988
|
case 7:
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10989
|
+
_context3.next = 9;
|
|
10990
|
+
return controller.importGoodsDrawer(_objectSpread2(_objectSpread2({}, record), {}, {
|
|
10991
|
+
$index: undefined
|
|
10992
|
+
}));
|
|
10995
10993
|
|
|
10996
|
-
case
|
|
10994
|
+
case 9:
|
|
10997
10995
|
case "end":
|
|
10998
10996
|
return _context3.stop();
|
|
10999
10997
|
}
|
|
@@ -11017,7 +11015,7 @@ function ItemNameInput(props) {
|
|
|
11017
11015
|
}
|
|
11018
11016
|
}, "*", props.shorthand, "*"), React__default['default'].createElement(ktsXui.AutoComplete, {
|
|
11019
11017
|
onSearch: onSearch,
|
|
11020
|
-
value: value,
|
|
11018
|
+
value: props.value,
|
|
11021
11019
|
options: options.map(function (e) {
|
|
11022
11020
|
return {
|
|
11023
11021
|
value: e.$index,
|
|
@@ -11030,6 +11028,7 @@ function ItemNameInput(props) {
|
|
|
11030
11028
|
height: '100%',
|
|
11031
11029
|
border: 'none'
|
|
11032
11030
|
},
|
|
11031
|
+
value: value,
|
|
11033
11032
|
onChange: onChange,
|
|
11034
11033
|
onBlur: onBlur
|
|
11035
11034
|
})));
|
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ export default async (s: InvoiceControllerState, record: any, controller:any) =>
|
|
|
32
32
|
between.lineAmountExcludeTax = record.lineAmountExcludeTax;
|
|
33
33
|
between.taxRate = record.taxRate;
|
|
34
34
|
between.taxAmount = record.taxAmount;
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
// 设置编辑货物
|
|
37
37
|
const editGood: IGood = s.goodsListState.editGood = { ...s.goodsListState.editGood, ...between };
|
|
38
38
|
|
|
@@ -24,24 +24,24 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
24
24
|
}, [])
|
|
25
25
|
|
|
26
26
|
const onBlur = React.useCallback(async (searchText: any) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
try {
|
|
28
|
+
if (autoComplete.onItemNameBlur) {
|
|
29
|
+
if (!selectLine?.shorthand) {
|
|
30
|
+
const taxCategoryData: any = await autoComplete.onItemNameBlur(searchText);
|
|
31
|
+
if (taxCategoryData && taxCategoryData[0]) {
|
|
32
|
+
const params = {
|
|
33
|
+
...props.editGood,
|
|
34
|
+
taxClassificationCode: taxCategoryData[0].taxCategoryCode,
|
|
35
|
+
shorthand: taxCategoryData[0].shorthand
|
|
36
|
+
}
|
|
37
|
+
controller.importGoodsDrawer(params);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
setSelectLine(null);
|
|
38
41
|
}
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw error;
|
|
41
44
|
}
|
|
42
|
-
} catch (error) {
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
45
|
}, [autoComplete.onItemNameBlur, selectLine, props.editGood])
|
|
46
46
|
|
|
47
47
|
const onSearch = React.useCallback(async (searchText: string) => {
|
|
@@ -62,15 +62,13 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
62
62
|
const record = options.filter(e => e.$index === i.value)[0] as any;
|
|
63
63
|
if (!record) return;
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
setValue(record.itemName);
|
|
66
|
+
setSelectLine(record);
|
|
66
67
|
|
|
67
|
-
await controller.
|
|
68
|
+
await controller.setEditGood({ itemName: record.itemName });
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
setSelectLine(record[0]);
|
|
71
|
-
controller.importGoodsDrawer(record);
|
|
70
|
+
await controller.importGoodsDrawer({ ...record, $index: undefined });
|
|
72
71
|
|
|
73
|
-
setOptions([]);
|
|
74
72
|
}, [options, controller])
|
|
75
73
|
|
|
76
74
|
React.useEffect(() => { setValue(props.value) }, [props.value])
|
|
@@ -80,11 +78,11 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
80
78
|
{props.shorthand && <span style={{ alignSelf: 'center', fontSize: 12 }} >*{props.shorthand}*</span>}
|
|
81
79
|
<AutoComplete
|
|
82
80
|
onSearch={onSearch}
|
|
83
|
-
value={value}
|
|
81
|
+
value={props.value}
|
|
84
82
|
options={options.map(e => ({ value: e.$index, label: e.itemName }))}
|
|
85
83
|
onSelect={onChangeAutoComplete}
|
|
86
84
|
>
|
|
87
|
-
<Input style={{ height: '100%', border: 'none' }} onChange={onChange} onBlur={onBlur} />
|
|
85
|
+
<Input style={{ height: '100%', border: 'none' }} value={value} onChange={onChange} onBlur={onBlur} />
|
|
88
86
|
</AutoComplete>
|
|
89
87
|
</div>
|
|
90
88
|
)
|