kts-component-invoice-operate 3.2.50 → 3.2.52
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 +11 -16
- package/dist/index.js +11 -16
- package/package.json +1 -1
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemCodeInput/index.tsx +1 -11
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +4 -2
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -9820,6 +9820,9 @@ function ItemNameInput(props) {
|
|
|
9820
9820
|
var autoComplete = controller.useMemo(function (s) {
|
|
9821
9821
|
return s.autoComplete;
|
|
9822
9822
|
}, []);
|
|
9823
|
+
var editGood = controller.useMemo(function (e) {
|
|
9824
|
+
return e.goodsListState.editGood;
|
|
9825
|
+
}, []);
|
|
9823
9826
|
var _React$useState = React.useState([]),
|
|
9824
9827
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
9825
9828
|
options = _React$useState2[0],
|
|
@@ -9947,7 +9950,8 @@ function ItemNameInput(props) {
|
|
|
9947
9950
|
}
|
|
9948
9951
|
}, "*", props.shorthand, "*"), /*#__PURE__*/React.createElement(AutoComplete$1, {
|
|
9949
9952
|
onSearch: onSearch,
|
|
9950
|
-
|
|
9953
|
+
defaultValue: props.value,
|
|
9954
|
+
value: editGood === null || editGood === void 0 ? void 0 : editGood.itemName,
|
|
9951
9955
|
options: options.map(function (e) {
|
|
9952
9956
|
return {
|
|
9953
9957
|
value: e.itemName
|
|
@@ -9959,6 +9963,7 @@ function ItemNameInput(props) {
|
|
|
9959
9963
|
height: '100%',
|
|
9960
9964
|
border: 'none'
|
|
9961
9965
|
},
|
|
9966
|
+
value: props.value,
|
|
9962
9967
|
onChange: onChange
|
|
9963
9968
|
})));
|
|
9964
9969
|
}
|
|
@@ -10033,7 +10038,7 @@ function ItemCodeInput(props) {
|
|
|
10033
10038
|
}(), [autoComplete.onItemCodeSearch, editGood]);
|
|
10034
10039
|
var onChangeAutoComplete = React.useCallback( /*#__PURE__*/function () {
|
|
10035
10040
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(itemName) {
|
|
10036
|
-
var record
|
|
10041
|
+
var record;
|
|
10037
10042
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10038
10043
|
while (1) switch (_context2.prev = _context2.next) {
|
|
10039
10044
|
case 0:
|
|
@@ -10046,19 +10051,9 @@ function ItemCodeInput(props) {
|
|
|
10046
10051
|
}
|
|
10047
10052
|
return _context2.abrupt("return");
|
|
10048
10053
|
case 3:
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
taxCategoryCode: record.taxCategoryCode,
|
|
10053
|
-
shorthand: record.shorthand,
|
|
10054
|
-
specification: record.specification,
|
|
10055
|
-
unit: record.unit,
|
|
10056
|
-
lineAmountIncludeTax: record.lineAmountIncludeTax,
|
|
10057
|
-
taxRate: record.taxRate
|
|
10058
|
-
};
|
|
10059
|
-
_context2.next = 6;
|
|
10060
|
-
return controller.setEditGood(option);
|
|
10061
|
-
case 6:
|
|
10054
|
+
_context2.next = 5;
|
|
10055
|
+
return controller.setEditGood(record);
|
|
10056
|
+
case 5:
|
|
10062
10057
|
case "end":
|
|
10063
10058
|
return _context2.stop();
|
|
10064
10059
|
}
|
|
@@ -14394,7 +14389,7 @@ var RULES = {
|
|
|
14394
14389
|
required: true,
|
|
14395
14390
|
message: "".concat(label, "\u5FC5\u586B")
|
|
14396
14391
|
}, {
|
|
14397
|
-
max:
|
|
14392
|
+
max: 100,
|
|
14398
14393
|
message: "".concat(label, "\u5185\u5BB9\u8D85\u957F")
|
|
14399
14394
|
}];
|
|
14400
14395
|
},
|
package/dist/index.js
CHANGED
|
@@ -9830,6 +9830,9 @@ function ItemNameInput(props) {
|
|
|
9830
9830
|
var autoComplete = controller.useMemo(function (s) {
|
|
9831
9831
|
return s.autoComplete;
|
|
9832
9832
|
}, []);
|
|
9833
|
+
var editGood = controller.useMemo(function (e) {
|
|
9834
|
+
return e.goodsListState.editGood;
|
|
9835
|
+
}, []);
|
|
9833
9836
|
var _React$useState = React__default['default'].useState([]),
|
|
9834
9837
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
9835
9838
|
options = _React$useState2[0],
|
|
@@ -9957,7 +9960,8 @@ function ItemNameInput(props) {
|
|
|
9957
9960
|
}
|
|
9958
9961
|
}, "*", props.shorthand, "*"), /*#__PURE__*/React__default['default'].createElement(ktsXui.AutoComplete, {
|
|
9959
9962
|
onSearch: onSearch,
|
|
9960
|
-
|
|
9963
|
+
defaultValue: props.value,
|
|
9964
|
+
value: editGood === null || editGood === void 0 ? void 0 : editGood.itemName,
|
|
9961
9965
|
options: options.map(function (e) {
|
|
9962
9966
|
return {
|
|
9963
9967
|
value: e.itemName
|
|
@@ -9969,6 +9973,7 @@ function ItemNameInput(props) {
|
|
|
9969
9973
|
height: '100%',
|
|
9970
9974
|
border: 'none'
|
|
9971
9975
|
},
|
|
9976
|
+
value: props.value,
|
|
9972
9977
|
onChange: onChange
|
|
9973
9978
|
})));
|
|
9974
9979
|
}
|
|
@@ -10043,7 +10048,7 @@ function ItemCodeInput(props) {
|
|
|
10043
10048
|
}(), [autoComplete.onItemCodeSearch, editGood]);
|
|
10044
10049
|
var onChangeAutoComplete = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
10045
10050
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(itemName) {
|
|
10046
|
-
var record
|
|
10051
|
+
var record;
|
|
10047
10052
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10048
10053
|
while (1) switch (_context2.prev = _context2.next) {
|
|
10049
10054
|
case 0:
|
|
@@ -10056,19 +10061,9 @@ function ItemCodeInput(props) {
|
|
|
10056
10061
|
}
|
|
10057
10062
|
return _context2.abrupt("return");
|
|
10058
10063
|
case 3:
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
taxCategoryCode: record.taxCategoryCode,
|
|
10063
|
-
shorthand: record.shorthand,
|
|
10064
|
-
specification: record.specification,
|
|
10065
|
-
unit: record.unit,
|
|
10066
|
-
lineAmountIncludeTax: record.lineAmountIncludeTax,
|
|
10067
|
-
taxRate: record.taxRate
|
|
10068
|
-
};
|
|
10069
|
-
_context2.next = 6;
|
|
10070
|
-
return controller.setEditGood(option);
|
|
10071
|
-
case 6:
|
|
10064
|
+
_context2.next = 5;
|
|
10065
|
+
return controller.setEditGood(record);
|
|
10066
|
+
case 5:
|
|
10072
10067
|
case "end":
|
|
10073
10068
|
return _context2.stop();
|
|
10074
10069
|
}
|
|
@@ -14404,7 +14399,7 @@ var RULES = {
|
|
|
14404
14399
|
required: true,
|
|
14405
14400
|
message: "".concat(label, "\u5FC5\u586B")
|
|
14406
14401
|
}, {
|
|
14407
|
-
max:
|
|
14402
|
+
max: 100,
|
|
14408
14403
|
message: "".concat(label, "\u5185\u5BB9\u8D85\u957F")
|
|
14409
14404
|
}];
|
|
14410
14405
|
},
|
package/package.json
CHANGED
|
@@ -35,17 +35,7 @@ export default function ItemCodeInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
35
35
|
const record = options.filter(e => e.itemCode === itemName)[0] as any;
|
|
36
36
|
if (!record) return;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
itemCode: record.itemCode,
|
|
40
|
-
itemName: record.itemName,
|
|
41
|
-
taxCategoryCode: record.taxCategoryCode,
|
|
42
|
-
shorthand: record.shorthand,
|
|
43
|
-
specification: record.specification,
|
|
44
|
-
unit: record.unit,
|
|
45
|
-
lineAmountIncludeTax: record.lineAmountIncludeTax,
|
|
46
|
-
taxRate: record.taxRate,
|
|
47
|
-
}
|
|
48
|
-
await controller.setEditGood(option);
|
|
38
|
+
await controller.setEditGood(record);
|
|
49
39
|
}, [options, controller])
|
|
50
40
|
|
|
51
41
|
return (
|
|
@@ -14,6 +14,8 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
14
14
|
|
|
15
15
|
const autoComplete = controller.useMemo(s => s.autoComplete, [])
|
|
16
16
|
|
|
17
|
+
const editGood = controller.useMemo((e) => e.goodsListState.editGood, []);
|
|
18
|
+
|
|
17
19
|
const [options, setOptions] = React.useState<IGood[]>([])
|
|
18
20
|
|
|
19
21
|
const onChange = React.useCallback((e: ChangeEvent<HTMLInputElement>) => {
|
|
@@ -99,8 +101,8 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
99
101
|
return (
|
|
100
102
|
<div className='kts-invoice-operate-goods-list-itemName-input'>
|
|
101
103
|
{props.shorthand && <span style={{ alignSelf: 'center', fontSize: 12 }} >*{props.shorthand}*</span>}
|
|
102
|
-
<AutoComplete onSearch={onSearch}
|
|
103
|
-
<Input style={{ height: '100%', border: 'none' }} onChange={onChange} />
|
|
104
|
+
<AutoComplete onSearch={onSearch} defaultValue={props.value} value={editGood?.itemName} options={options.map(e => ({ value: e.itemName }))} onSelect={onChangeAutoComplete} >
|
|
105
|
+
<Input style={{ height: '100%', border: 'none' }} value={props.value} onChange={onChange} />
|
|
104
106
|
</AutoComplete>
|
|
105
107
|
</div>
|
|
106
108
|
)
|
|
@@ -18,7 +18,7 @@ import classNames from 'classnames';
|
|
|
18
18
|
const RULES = {
|
|
19
19
|
companyName: (label: string) => [
|
|
20
20
|
{ required: true, message: `${label}必填` },
|
|
21
|
-
{ max:
|
|
21
|
+
{ max: 100, message: `${label}内容超长` }
|
|
22
22
|
],
|
|
23
23
|
taxId: (label: string) => [
|
|
24
24
|
{ max: 20, message: `${label}内容超长` },
|