kts-component-invoice-operate 3.2.181-25 → 3.2.181-27
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/AutoComplete/index.d.ts +1 -0
- package/dist/index.esm.js +59 -14
- package/dist/index.js +58 -13
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/AutoComplete/index.ts +2 -0
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +48 -28
|
@@ -8,6 +8,7 @@ export default class AutoComplete {
|
|
|
8
8
|
onBuyerNameSearch?: (searchText: string) => Promise<any[]>;
|
|
9
9
|
/** 统一社会信用代码/纳税人识别号 */
|
|
10
10
|
onBuyerTaxIdSearch?: (searchText: string) => Promise<any[]>;
|
|
11
|
+
onBuyerCodeSearch?: (searchText: string) => Promise<any[]>;
|
|
11
12
|
/** 销售方名称自动补全 */
|
|
12
13
|
onSupplierNameSearch?: (searchText: string) => Promise<any[]>;
|
|
13
14
|
/** 统一社会信用代码/纳税人识别号 */
|
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import GreyReactBox, { decorator } from 'grey-react-box';
|
|
|
4
4
|
import { chain as chain$1, bignumber, format as format$1, create, all, equal } from 'mathjs';
|
|
5
5
|
import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Descriptions, Empty, Divider, Popover as Popover$1, Drawer as Drawer$1, Table as Table$1, Tree, Modal as Modal$1, Row as Row$2, Col as Col$2 } from 'kts-components-antd-x3';
|
|
6
6
|
import { v4 } from 'uuid';
|
|
7
|
-
import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Form as Form$1, Drawer, Space, Radio, InputNumber, Dropdown as Dropdown$1, Row, Col,
|
|
7
|
+
import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Button as Button$1, Form as Form$1, Drawer, Space, Radio, InputNumber, Dropdown as Dropdown$1, Row, Col, Checkbox as Checkbox$1, Tooltip as Tooltip$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Popconfirm, Modal, Cascader as Cascader$1, Tree as Tree$1, Card, FormReadOnly } from 'kts-xui';
|
|
8
8
|
import classnames from 'classnames';
|
|
9
9
|
import { Table } from 'kts-components-antd-x4-v4';
|
|
10
10
|
import { render } from 'react-dom';
|
|
@@ -1250,6 +1250,7 @@ var AutoComplete = /*#__PURE__*/_createClass(function AutoComplete() {
|
|
|
1250
1250
|
this.onItemNameBlur = void 0;
|
|
1251
1251
|
this.onBuyerNameSearch = void 0;
|
|
1252
1252
|
this.onBuyerTaxIdSearch = void 0;
|
|
1253
|
+
this.onBuyerCodeSearch = void 0;
|
|
1253
1254
|
this.onSupplierNameSearch = void 0;
|
|
1254
1255
|
this.onSupplierTaxIdSearch = void 0;
|
|
1255
1256
|
this.onItemCodeSearch = void 0;
|
|
@@ -18142,7 +18143,9 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
18142
18143
|
}, getFieldDecorator('naturalPersonFlag', {})( /*#__PURE__*/React.createElement(NaturalPersonFlag, {
|
|
18143
18144
|
readOnly: isReadOnly('naturalPersonFlag')
|
|
18144
18145
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
18145
|
-
style: {
|
|
18146
|
+
style: isReadOnly('buyerCode') ? {
|
|
18147
|
+
paddingTop: '3px'
|
|
18148
|
+
} : {
|
|
18146
18149
|
flex: 1
|
|
18147
18150
|
}
|
|
18148
18151
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -18153,10 +18156,29 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
18153
18156
|
required: true,
|
|
18154
18157
|
message: '客户代码必填'
|
|
18155
18158
|
}]
|
|
18156
|
-
})(
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
|
|
18159
|
+
})(
|
|
18160
|
+
/*#__PURE__*/
|
|
18161
|
+
// <Input style={{ width: '100%' }} />
|
|
18162
|
+
React.createElement(BuyerNameInput$1, {
|
|
18163
|
+
myform: form,
|
|
18164
|
+
fieldName: 'buyerCode',
|
|
18165
|
+
readOnly: isReadOnly('buyerCode'),
|
|
18166
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BA2\u6237\u4EE3\u7801",
|
|
18167
|
+
autoComplete: "off",
|
|
18168
|
+
suffix: isShowImportButton === true && /*#__PURE__*/React.createElement(Button$1, {
|
|
18169
|
+
type: 'link',
|
|
18170
|
+
style: {
|
|
18171
|
+
padding: 0,
|
|
18172
|
+
width: 20,
|
|
18173
|
+
height: '100%'
|
|
18174
|
+
},
|
|
18175
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
18176
|
+
component: SvgPlus
|
|
18177
|
+
}),
|
|
18178
|
+
onClick: function onClick() {
|
|
18179
|
+
onClickImportButton && onClickImportButton(controller);
|
|
18180
|
+
}
|
|
18181
|
+
})
|
|
18160
18182
|
})))))), /*#__PURE__*/React.createElement(Row, {
|
|
18161
18183
|
gutter: [16, 0]
|
|
18162
18184
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
@@ -18479,12 +18501,12 @@ function BuyerNameInput$1(props) {
|
|
|
18479
18501
|
(0, _context.t0)(_context.t1);
|
|
18480
18502
|
|
|
18481
18503
|
case 10:
|
|
18482
|
-
_context.next =
|
|
18504
|
+
_context.next = 28;
|
|
18483
18505
|
break;
|
|
18484
18506
|
|
|
18485
18507
|
case 12:
|
|
18486
18508
|
if (!(fieldName === 'buyerTaxId')) {
|
|
18487
|
-
_context.next =
|
|
18509
|
+
_context.next = 21;
|
|
18488
18510
|
break;
|
|
18489
18511
|
}
|
|
18490
18512
|
|
|
@@ -18502,21 +18524,44 @@ function BuyerNameInput$1(props) {
|
|
|
18502
18524
|
(0, _context.t2)(_context.t3);
|
|
18503
18525
|
|
|
18504
18526
|
case 19:
|
|
18505
|
-
_context.next =
|
|
18527
|
+
_context.next = 28;
|
|
18506
18528
|
break;
|
|
18507
18529
|
|
|
18508
18530
|
case 21:
|
|
18509
|
-
|
|
18510
|
-
|
|
18531
|
+
if (!(fieldName === 'buyerCode')) {
|
|
18532
|
+
_context.next = 28;
|
|
18533
|
+
break;
|
|
18534
|
+
}
|
|
18535
|
+
|
|
18536
|
+
if (!autoComplete.onBuyerCodeSearch) {
|
|
18537
|
+
_context.next = 28;
|
|
18538
|
+
break;
|
|
18539
|
+
}
|
|
18540
|
+
|
|
18541
|
+
_context.t4 = setOptions;
|
|
18542
|
+
_context.next = 26;
|
|
18543
|
+
return autoComplete.onBuyerCodeSearch(searchText);
|
|
18544
|
+
|
|
18545
|
+
case 26:
|
|
18546
|
+
_context.t5 = _context.sent;
|
|
18547
|
+
(0, _context.t4)(_context.t5);
|
|
18548
|
+
|
|
18549
|
+
case 28:
|
|
18550
|
+
_context.next = 34;
|
|
18551
|
+
break;
|
|
18552
|
+
|
|
18553
|
+
case 30:
|
|
18554
|
+
_context.prev = 30;
|
|
18555
|
+
_context.t6 = _context["catch"](2);
|
|
18511
18556
|
setOptions([]);
|
|
18512
|
-
throw _context.
|
|
18557
|
+
throw _context.t6;
|
|
18513
18558
|
|
|
18514
|
-
case
|
|
18559
|
+
case 34:
|
|
18515
18560
|
case "end":
|
|
18516
18561
|
return _context.stop();
|
|
18517
18562
|
}
|
|
18518
18563
|
}
|
|
18519
|
-
}, _callee, null, [[2,
|
|
18564
|
+
}, _callee, null, [[2, 30]]);
|
|
18520
18565
|
}));
|
|
18521
18566
|
|
|
18522
18567
|
return function (_x) {
|
package/dist/index.js
CHANGED
|
@@ -1260,6 +1260,7 @@ var AutoComplete = /*#__PURE__*/_createClass(function AutoComplete() {
|
|
|
1260
1260
|
this.onItemNameBlur = void 0;
|
|
1261
1261
|
this.onBuyerNameSearch = void 0;
|
|
1262
1262
|
this.onBuyerTaxIdSearch = void 0;
|
|
1263
|
+
this.onBuyerCodeSearch = void 0;
|
|
1263
1264
|
this.onSupplierNameSearch = void 0;
|
|
1264
1265
|
this.onSupplierTaxIdSearch = void 0;
|
|
1265
1266
|
this.onItemCodeSearch = void 0;
|
|
@@ -18152,7 +18153,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18152
18153
|
}, getFieldDecorator('naturalPersonFlag', {})( /*#__PURE__*/React__default['default'].createElement(NaturalPersonFlag, {
|
|
18153
18154
|
readOnly: isReadOnly('naturalPersonFlag')
|
|
18154
18155
|
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
18155
|
-
style: {
|
|
18156
|
+
style: isReadOnly('buyerCode') ? {
|
|
18157
|
+
paddingTop: '3px'
|
|
18158
|
+
} : {
|
|
18156
18159
|
flex: 1
|
|
18157
18160
|
}
|
|
18158
18161
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
@@ -18163,10 +18166,29 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
18163
18166
|
required: true,
|
|
18164
18167
|
message: '客户代码必填'
|
|
18165
18168
|
}]
|
|
18166
|
-
})(
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18169
|
+
})(
|
|
18170
|
+
/*#__PURE__*/
|
|
18171
|
+
// <Input style={{ width: '100%' }} />
|
|
18172
|
+
React__default['default'].createElement(BuyerNameInput$1, {
|
|
18173
|
+
myform: form,
|
|
18174
|
+
fieldName: 'buyerCode',
|
|
18175
|
+
readOnly: isReadOnly('buyerCode'),
|
|
18176
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BA2\u6237\u4EE3\u7801",
|
|
18177
|
+
autoComplete: "off",
|
|
18178
|
+
suffix: isShowImportButton === true && /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
|
|
18179
|
+
type: 'link',
|
|
18180
|
+
style: {
|
|
18181
|
+
padding: 0,
|
|
18182
|
+
width: 20,
|
|
18183
|
+
height: '100%'
|
|
18184
|
+
},
|
|
18185
|
+
icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
18186
|
+
component: SvgPlus
|
|
18187
|
+
}),
|
|
18188
|
+
onClick: function onClick() {
|
|
18189
|
+
onClickImportButton && onClickImportButton(controller);
|
|
18190
|
+
}
|
|
18191
|
+
})
|
|
18170
18192
|
})))))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Row, {
|
|
18171
18193
|
gutter: [16, 0]
|
|
18172
18194
|
}, /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
@@ -18489,12 +18511,12 @@ function BuyerNameInput$1(props) {
|
|
|
18489
18511
|
(0, _context.t0)(_context.t1);
|
|
18490
18512
|
|
|
18491
18513
|
case 10:
|
|
18492
|
-
_context.next =
|
|
18514
|
+
_context.next = 28;
|
|
18493
18515
|
break;
|
|
18494
18516
|
|
|
18495
18517
|
case 12:
|
|
18496
18518
|
if (!(fieldName === 'buyerTaxId')) {
|
|
18497
|
-
_context.next =
|
|
18519
|
+
_context.next = 21;
|
|
18498
18520
|
break;
|
|
18499
18521
|
}
|
|
18500
18522
|
|
|
@@ -18512,21 +18534,44 @@ function BuyerNameInput$1(props) {
|
|
|
18512
18534
|
(0, _context.t2)(_context.t3);
|
|
18513
18535
|
|
|
18514
18536
|
case 19:
|
|
18515
|
-
_context.next =
|
|
18537
|
+
_context.next = 28;
|
|
18516
18538
|
break;
|
|
18517
18539
|
|
|
18518
18540
|
case 21:
|
|
18519
|
-
|
|
18520
|
-
|
|
18541
|
+
if (!(fieldName === 'buyerCode')) {
|
|
18542
|
+
_context.next = 28;
|
|
18543
|
+
break;
|
|
18544
|
+
}
|
|
18545
|
+
|
|
18546
|
+
if (!autoComplete.onBuyerCodeSearch) {
|
|
18547
|
+
_context.next = 28;
|
|
18548
|
+
break;
|
|
18549
|
+
}
|
|
18550
|
+
|
|
18551
|
+
_context.t4 = setOptions;
|
|
18552
|
+
_context.next = 26;
|
|
18553
|
+
return autoComplete.onBuyerCodeSearch(searchText);
|
|
18554
|
+
|
|
18555
|
+
case 26:
|
|
18556
|
+
_context.t5 = _context.sent;
|
|
18557
|
+
(0, _context.t4)(_context.t5);
|
|
18558
|
+
|
|
18559
|
+
case 28:
|
|
18560
|
+
_context.next = 34;
|
|
18561
|
+
break;
|
|
18562
|
+
|
|
18563
|
+
case 30:
|
|
18564
|
+
_context.prev = 30;
|
|
18565
|
+
_context.t6 = _context["catch"](2);
|
|
18521
18566
|
setOptions([]);
|
|
18522
|
-
throw _context.
|
|
18567
|
+
throw _context.t6;
|
|
18523
18568
|
|
|
18524
|
-
case
|
|
18569
|
+
case 34:
|
|
18525
18570
|
case "end":
|
|
18526
18571
|
return _context.stop();
|
|
18527
18572
|
}
|
|
18528
18573
|
}
|
|
18529
|
-
}, _callee, null, [[2,
|
|
18574
|
+
}, _callee, null, [[2, 30]]);
|
|
18530
18575
|
}));
|
|
18531
18576
|
|
|
18532
18577
|
return function (_x) {
|
package/package.json
CHANGED
|
@@ -15,6 +15,8 @@ export default class AutoComplete {
|
|
|
15
15
|
/** 统一社会信用代码/纳税人识别号 */
|
|
16
16
|
onBuyerTaxIdSearch?: (searchText: string) => Promise<any[]>;
|
|
17
17
|
|
|
18
|
+
onBuyerCodeSearch?: (searchText: string) => Promise<any[]>;
|
|
19
|
+
|
|
18
20
|
/** 销售方名称自动补全 */
|
|
19
21
|
onSupplierNameSearch?: (searchText: string) => Promise<any[]>;
|
|
20
22
|
|
|
@@ -147,29 +147,45 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
147
147
|
</div>
|
|
148
148
|
<div>
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
150
|
+
<Form className="digtal-stakeholder-form" >
|
|
151
|
+
<Row gutter={[16, 0]} className='natural-person-flag' style={{ paddingRight: 0 }} >
|
|
152
|
+
<Col span={24} style={{ display: 'flex', marginBottom: '15px' }} >
|
|
153
|
+
{
|
|
154
|
+
props.isNaturalPerson === true &&
|
|
155
|
+
<Form.Item colon={false}>
|
|
156
|
+
{getFieldDecorator('naturalPersonFlag', {
|
|
157
|
+
})(
|
|
158
|
+
<NaturalPersonFlag readOnly={isReadOnly('naturalPersonFlag')} />
|
|
159
|
+
)}
|
|
160
|
+
</Form.Item>
|
|
161
|
+
}
|
|
162
|
+
<div style={isReadOnly('buyerCode') ? { paddingTop: '3px' } : {flex: 1}}>
|
|
163
|
+
<Form.Item label='客户代码' colon={false}>
|
|
164
|
+
{getFieldDecorator('buyerCode', {
|
|
165
|
+
rules: [{ required: true, message: '客户代码必填' }],
|
|
166
|
+
})(
|
|
167
|
+
// <Input style={{ width: '100%' }} />
|
|
168
|
+
<BuyerNameInput
|
|
169
|
+
myform={form}
|
|
170
|
+
fieldName='buyerCode'
|
|
171
|
+
readOnly={isReadOnly('buyerCode')}
|
|
172
|
+
placeholder="请输入客户代码"
|
|
173
|
+
autoComplete="off"
|
|
174
|
+
suffix={
|
|
175
|
+
isShowImportButton === true &&
|
|
176
|
+
<Button
|
|
177
|
+
type='link'
|
|
178
|
+
style={{ padding: 0, width: 20, height: '100%' }}
|
|
179
|
+
icon={<Icon component={PlusSvg} />}
|
|
180
|
+
onClick={() => { onClickImportButton && onClickImportButton(controller) }}
|
|
181
|
+
/>
|
|
182
|
+
}
|
|
183
|
+
/>
|
|
184
|
+
)}
|
|
185
|
+
</Form.Item>
|
|
186
|
+
</div>
|
|
187
|
+
</Col>
|
|
188
|
+
</Row>
|
|
173
189
|
<Row gutter={[16, 0]}>
|
|
174
190
|
<Col span={24} >
|
|
175
191
|
<Form.Item label='名称' colon={false}>
|
|
@@ -365,7 +381,7 @@ function NaturalPersonFlag(props: {
|
|
|
365
381
|
onChange={onChange}
|
|
366
382
|
>
|
|
367
383
|
是否开票给自然人
|
|
368
|
-
</Checkbox>
|
|
384
|
+
</Checkbox>
|
|
369
385
|
)
|
|
370
386
|
}
|
|
371
387
|
|
|
@@ -383,24 +399,28 @@ function BuyerNameInput(props: InputProps & { fieldName: string; myform: Wrapped
|
|
|
383
399
|
|
|
384
400
|
const onChangeAutoComplete = React.useCallback(value => {
|
|
385
401
|
const record = options.filter(e => e[fieldName] === value)[0] as any;
|
|
386
|
-
if (!record || !form) return;
|
|
402
|
+
if (!record || !form) return;
|
|
387
403
|
form.setFieldsValue(record);
|
|
388
404
|
setOptions([])
|
|
389
405
|
}, [options, fieldName, form])
|
|
390
406
|
|
|
391
407
|
const onSearch = React.useCallback(async (searchText: string) => {
|
|
392
|
-
await Discontinue.start();
|
|
408
|
+
await Discontinue.start();
|
|
393
409
|
try {
|
|
394
410
|
if (fieldName === 'buyerName') {
|
|
395
411
|
if (autoComplete.onBuyerNameSearch) {
|
|
396
412
|
setOptions(await autoComplete.onBuyerNameSearch(searchText));
|
|
397
413
|
}
|
|
398
|
-
} else if (fieldName === 'buyerTaxId') {
|
|
414
|
+
} else if (fieldName === 'buyerTaxId') {
|
|
399
415
|
if (autoComplete.onBuyerTaxIdSearch) {
|
|
400
416
|
setOptions(await autoComplete.onBuyerTaxIdSearch(searchText));
|
|
401
417
|
}
|
|
418
|
+
} else if (fieldName === 'buyerCode') {
|
|
419
|
+
if (autoComplete.onBuyerCodeSearch) {
|
|
420
|
+
setOptions(await autoComplete.onBuyerCodeSearch(searchText));
|
|
421
|
+
}
|
|
402
422
|
}
|
|
403
|
-
|
|
423
|
+
|
|
404
424
|
} catch (error) {
|
|
405
425
|
setOptions([]);
|
|
406
426
|
throw error;
|