kts-component-invoice-operate 3.2.157 → 3.2.159

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
@@ -17729,16 +17729,6 @@ var RULES$1 = {
17729
17729
  }];
17730
17730
  }
17731
17731
  };
17732
-
17733
- var formatCompanyName$1 = function formatCompanyName(e) {
17734
- var _e$target;
17735
-
17736
- var value = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
17737
-
17738
- if (value) {
17739
- return value.replace('(', '(').replace(')', ')').replace(' ', '');
17740
- }
17741
- };
17742
17732
  /** 农产品干系人 */
17743
17733
 
17744
17734
 
@@ -17816,12 +17806,28 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
17816
17806
  label: "\u540D\u79F0",
17817
17807
  colon: false
17818
17808
  }, getFieldDecorator('supplierName', {
17819
- rules: getRules('supplierName', RULES$1.companyName('销售方名称')),
17820
- getValueFromEvent: formatCompanyName$1
17821
- })( /*#__PURE__*/React.createElement(MyInput$2, {
17809
+ rules: getRules('supplierName', RULES$1.companyName('销售方名称')) // getValueFromEvent: formatCompanyName
17810
+
17811
+ })( /*#__PURE__*/React.createElement(BuyerNameInput$2, {
17812
+ myform: form,
17813
+ fieldName: 'supplierName',
17822
17814
  readOnly: isReadOnly('supplierName'),
17823
17815
  placeholder: "\u8BF7\u8F93\u5165\u540D\u79F0",
17824
- autoComplete: "off"
17816
+ autoComplete: "off",
17817
+ suffix: isShowImportButton === true && /*#__PURE__*/React.createElement(Button$1, {
17818
+ type: 'link',
17819
+ style: {
17820
+ padding: 0,
17821
+ width: 20,
17822
+ height: '100%'
17823
+ },
17824
+ icon: /*#__PURE__*/React.createElement(Icon, {
17825
+ component: SvgPlus$1
17826
+ }),
17827
+ onClick: function onClick() {
17828
+ onClickImportButton && onClickImportButton(controller);
17829
+ }
17830
+ })
17825
17831
  })))), /*#__PURE__*/React.createElement(Col, {
17826
17832
  span: 24
17827
17833
  }, /*#__PURE__*/React.createElement(Form.Item, {
@@ -17832,7 +17838,9 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
17832
17838
  required: true,
17833
17839
  message: '销售方纳税人识别号必填'
17834
17840
  }].concat(_toConsumableArray(RULES$1.taxId('销售方纳税人识别号'))))
17835
- })( /*#__PURE__*/React.createElement(MyInput$2, {
17841
+ })( /*#__PURE__*/React.createElement(BuyerNameInput$2, {
17842
+ myform: form,
17843
+ fieldName: 'supplierTaxId',
17836
17844
  readOnly: isReadOnly('supplierTaxId'),
17837
17845
  placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
17838
17846
  autoComplete: "off"
@@ -18081,7 +18089,7 @@ function BuyerNameInput$2(props) {
18081
18089
  case 2:
18082
18090
  _context.prev = 2;
18083
18091
 
18084
- if (!(fieldName === 'buyerName')) {
18092
+ if (!(fieldName === 'buyerName' || fieldName === 'supplierName')) {
18085
18093
  _context.next = 12;
18086
18094
  break;
18087
18095
  }
@@ -18104,7 +18112,7 @@ function BuyerNameInput$2(props) {
18104
18112
  break;
18105
18113
 
18106
18114
  case 12:
18107
- if (!(fieldName === 'buyerTaxId')) {
18115
+ if (!(fieldName === 'buyerTaxId' || fieldName === 'supplierTaxId')) {
18108
18116
  _context.next = 19;
18109
18117
  break;
18110
18118
  }
package/dist/index.js CHANGED
@@ -17739,16 +17739,6 @@ var RULES$1 = {
17739
17739
  }];
17740
17740
  }
17741
17741
  };
17742
-
17743
- var formatCompanyName$1 = function formatCompanyName(e) {
17744
- var _e$target;
17745
-
17746
- var value = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
17747
-
17748
- if (value) {
17749
- return value.replace('(', '(').replace(')', ')').replace(' ', '');
17750
- }
17751
- };
17752
17742
  /** 农产品干系人 */
17753
17743
 
17754
17744
 
@@ -17826,12 +17816,28 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
17826
17816
  label: "\u540D\u79F0",
17827
17817
  colon: false
17828
17818
  }, getFieldDecorator('supplierName', {
17829
- rules: getRules('supplierName', RULES$1.companyName('销售方名称')),
17830
- getValueFromEvent: formatCompanyName$1
17831
- })( /*#__PURE__*/React__default['default'].createElement(MyInput$2, {
17819
+ rules: getRules('supplierName', RULES$1.companyName('销售方名称')) // getValueFromEvent: formatCompanyName
17820
+
17821
+ })( /*#__PURE__*/React__default['default'].createElement(BuyerNameInput$2, {
17822
+ myform: form,
17823
+ fieldName: 'supplierName',
17832
17824
  readOnly: isReadOnly('supplierName'),
17833
17825
  placeholder: "\u8BF7\u8F93\u5165\u540D\u79F0",
17834
- autoComplete: "off"
17826
+ autoComplete: "off",
17827
+ suffix: isShowImportButton === true && /*#__PURE__*/React__default['default'].createElement(ktsXui.Button, {
17828
+ type: 'link',
17829
+ style: {
17830
+ padding: 0,
17831
+ width: 20,
17832
+ height: '100%'
17833
+ },
17834
+ icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
17835
+ component: SvgPlus$1
17836
+ }),
17837
+ onClick: function onClick() {
17838
+ onClickImportButton && onClickImportButton(controller);
17839
+ }
17840
+ })
17835
17841
  })))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
17836
17842
  span: 24
17837
17843
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
@@ -17842,7 +17848,9 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
17842
17848
  required: true,
17843
17849
  message: '销售方纳税人识别号必填'
17844
17850
  }].concat(_toConsumableArray(RULES$1.taxId('销售方纳税人识别号'))))
17845
- })( /*#__PURE__*/React__default['default'].createElement(MyInput$2, {
17851
+ })( /*#__PURE__*/React__default['default'].createElement(BuyerNameInput$2, {
17852
+ myform: form,
17853
+ fieldName: 'supplierTaxId',
17846
17854
  readOnly: isReadOnly('supplierTaxId'),
17847
17855
  placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
17848
17856
  autoComplete: "off"
@@ -18091,7 +18099,7 @@ function BuyerNameInput$2(props) {
18091
18099
  case 2:
18092
18100
  _context.prev = 2;
18093
18101
 
18094
- if (!(fieldName === 'buyerName')) {
18102
+ if (!(fieldName === 'buyerName' || fieldName === 'supplierName')) {
18095
18103
  _context.next = 12;
18096
18104
  break;
18097
18105
  }
@@ -18114,7 +18122,7 @@ function BuyerNameInput$2(props) {
18114
18122
  break;
18115
18123
 
18116
18124
  case 12:
18117
- if (!(fieldName === 'buyerTaxId')) {
18125
+ if (!(fieldName === 'buyerTaxId' || fieldName === 'supplierTaxId')) {
18118
18126
  _context.next = 19;
18119
18127
  break;
18120
18128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.157",
3
+ "version": "3.2.159",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -6,7 +6,7 @@ export default () => {
6
6
  return (
7
7
  <Invoice
8
8
  invoiceType='digtal'
9
- stakeholder={<Invoice.StakeFarmerholder/>}
9
+ stakeholder={<Invoice.StakeFarmerholder isShowImportButton={true}/>}
10
10
  invoiceHeader={
11
11
  <Invoice.InvoiceHeader
12
12
  title='自定义'
@@ -140,8 +140,28 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
140
140
  <Form.Item label='名称' colon={false}>
141
141
  {getFieldDecorator('supplierName', {
142
142
  rules: getRules('supplierName', RULES.companyName('销售方名称')),
143
- getValueFromEvent: formatCompanyName
144
- })(<MyInput readOnly={isReadOnly('supplierName')} placeholder="请输入名称" autoComplete="off" />)}
143
+ // getValueFromEvent: formatCompanyName
144
+ })
145
+ // (<MyInput readOnly={isReadOnly('supplierName')} placeholder="请输入名称" autoComplete="off" />)
146
+ (
147
+ <BuyerNameInput
148
+ myform={form}
149
+ fieldName='supplierName'
150
+ readOnly={isReadOnly('supplierName')}
151
+ placeholder="请输入名称"
152
+ autoComplete="off"
153
+ suffix={
154
+ isShowImportButton === true &&
155
+ <Button
156
+ type='link'
157
+ style={{ padding: 0, width: 20, height: '100%' }}
158
+ icon={<Icon component={PlusSvg} />}
159
+ onClick={() => { onClickImportButton && onClickImportButton(controller) }}
160
+ />
161
+ }
162
+ />
163
+ )
164
+ }
145
165
  </Form.Item>
146
166
  </Col>
147
167
 
@@ -149,7 +169,16 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
149
169
  <Form.Item label='统一社会信用代码/纳税人识别号' colon={false}>
150
170
  {getFieldDecorator('supplierTaxId', {
151
171
  rules: getRules('supplierTaxId', [{ required: true, message: '销售方纳税人识别号必填' }, ...RULES.taxId('销售方纳税人识别号')])
152
- })(<MyInput readOnly={isReadOnly('supplierTaxId')} placeholder="请输入统一社会信用代码/纳税人识别号" autoComplete="off" />)}
172
+ })
173
+ // (<MyInput readOnly={isReadOnly('supplierTaxId')} placeholder="请输入统一社会信用代码/纳税人识别号" autoComplete="off" />)
174
+ (<BuyerNameInput
175
+ myform={form}
176
+ fieldName='supplierTaxId'
177
+ readOnly={isReadOnly('supplierTaxId')}
178
+ placeholder="请输入统一社会信用代码/纳税人识别号"
179
+ autoComplete="off"
180
+ />)
181
+ }
153
182
  </Form.Item>
154
183
  </Col>
155
184
 
@@ -343,11 +372,11 @@ function BuyerNameInput(props: InputProps & { fieldName: string; myform: Wrapped
343
372
  const onSearch = React.useCallback(async (searchText: string) => {
344
373
  await Discontinue.start();
345
374
  try {
346
- if (fieldName === 'buyerName') {
375
+ if (fieldName === 'buyerName' || fieldName === 'supplierName') {
347
376
  if (autoComplete.onBuyerNameSearch) {
348
377
  setOptions(await autoComplete.onBuyerNameSearch(searchText));
349
378
  }
350
- } else if (fieldName === 'buyerTaxId') {
379
+ } else if (fieldName === 'buyerTaxId' || fieldName === 'supplierTaxId') {
351
380
  if (autoComplete.onBuyerTaxIdSearch) {
352
381
  setOptions(await autoComplete.onBuyerTaxIdSearch(searchText));
353
382
  }