kts-component-invoice-operate 3.2.189 → 3.2.190

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
@@ -17662,7 +17662,9 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
17662
17662
  }
17663
17663
  }, /*#__PURE__*/React.createElement(Form.Item, {
17664
17664
  colon: false
17665
- }, getFieldDecorator('buyerBankAccountFlag', {})( /*#__PURE__*/React.createElement(Checkbox$1, {
17665
+ }, getFieldDecorator('buyerBankAccountFlag', {
17666
+ valuePropName: 'checked'
17667
+ })( /*#__PURE__*/React.createElement(Checkbox$1, {
17666
17668
  onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
17667
17669
  disabled: isReadOnly('buyerBankAccountFlag'),
17668
17670
  style: {
@@ -17783,7 +17785,9 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
17783
17785
  }
17784
17786
  }, /*#__PURE__*/React.createElement(Form.Item, {
17785
17787
  colon: false
17786
- }, getFieldDecorator('sellerBankAccountFlag', {})( /*#__PURE__*/React.createElement(Checkbox$1, {
17788
+ }, getFieldDecorator('sellerBankAccountFlag', {
17789
+ valuePropName: 'checked'
17790
+ })( /*#__PURE__*/React.createElement(Checkbox$1, {
17787
17791
  onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
17788
17792
  disabled: isReadOnly('sellerBankAccountFlag'),
17789
17793
  style: {
package/dist/index.js CHANGED
@@ -17672,7 +17672,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
17672
17672
  }
17673
17673
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
17674
17674
  colon: false
17675
- }, getFieldDecorator('buyerBankAccountFlag', {})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
17675
+ }, getFieldDecorator('buyerBankAccountFlag', {
17676
+ valuePropName: 'checked'
17677
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
17676
17678
  onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
17677
17679
  disabled: isReadOnly('buyerBankAccountFlag'),
17678
17680
  style: {
@@ -17793,7 +17795,9 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
17793
17795
  }
17794
17796
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
17795
17797
  colon: false
17796
- }, getFieldDecorator('sellerBankAccountFlag', {})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
17798
+ }, getFieldDecorator('sellerBankAccountFlag', {
17799
+ valuePropName: 'checked'
17800
+ })( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
17797
17801
  onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
17798
17802
  disabled: isReadOnly('sellerBankAccountFlag'),
17799
17803
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.189",
3
+ "version": "3.2.190",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -6,11 +6,30 @@ export default () => {
6
6
  const callback = (e: any) => {
7
7
  console.log(e.target.checked)
8
8
  }
9
+
10
+ const controller = React.useMemo(() => new Invoice.InvoiceController(), [])
11
+
12
+ React.useEffect(() => {
13
+ (async () => {
14
+ window.setTimeout(async () => {
15
+ await controller.formList.get('stakeholder')?.setFieldsValue({
16
+ buyerName: '国能供应链内蒙古有限公司',
17
+ buyerTaxId: '91150291552838725H',
18
+ buyerAddress: '内蒙古自治区包头稀士高新区总部经济园区9号楼204号',
19
+ buyerPhone: '0472-5368680',
20
+ buyerBank: '11050167360000000932中国银行股份有限公司包头开发区支行',
21
+ buyerBankAccountFlag: true,
22
+ })
23
+ }, 1000)
24
+
25
+ })()
26
+ }, [controller])
9
27
  return (
10
28
  <Invoice
11
29
  invoiceType='digtal'
12
- stakeholder={<Invoice.Stakeholder isShowImportButton={true} leqi={true} invoiceMarkCallback={callback}/>}
13
- invoiceHeader={
30
+ controller={controller}
31
+ stakeholder={<Invoice.Stakeholder leqi={true} invoiceMarkCallback={callback} />}
32
+ invoiceHeader={
14
33
  <Invoice.InvoiceHeader
15
34
  title='自定义'
16
35
  />
@@ -9,7 +9,7 @@ export default () => {
9
9
 
10
10
  React.useEffect(() => {
11
11
  (async () => {
12
- await controller.run(async s => { s.model = 'readOnly' }); // 设置只读
12
+ // await controller.run(async s => { s.model = 'readOnly' }); // 设置只读
13
13
  // await controller.run(async s => { s.stakeholder.enables = ['remarks'] });
14
14
  await controller.formList.get('invoiceHeader')?.setFieldsValue({
15
15
  no: '2029292029201920291029',
@@ -3,10 +3,10 @@
3
3
  ## 简单用法
4
4
  <code src="./_test/easiest/index.tsx"></code>
5
5
 
6
- <!-- ## 只读模式
6
+ ## 只读模式
7
7
  <code src="./_test/readOnly/index.tsx"></code>
8
8
 
9
- ## 发票号码 & 开票日期 & 标签
9
+ <!-- ## 发票号码 & 开票日期 & 标签
10
10
  <code src="./_test/header/index.tsx"></code>
11
11
 
12
12
  ## 导入关系人
@@ -232,6 +232,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
232
232
  <Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
233
233
  <Form.Item colon={false}>
234
234
  {getFieldDecorator('buyerBankAccountFlag', {
235
+ valuePropName: 'checked',
235
236
  })(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('buyerBankAccountFlag')} style={{whiteSpace:'nowrap'}}>是否展示</Checkbox>)}
236
237
  </Form.Item>
237
238
  </Col>
@@ -312,6 +313,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
312
313
  <Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
313
314
  <Form.Item colon={false}>
314
315
  {getFieldDecorator('sellerBankAccountFlag', {
316
+ valuePropName: 'checked',
315
317
  })(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('sellerBankAccountFlag')} style={{whiteSpace:'nowrap'}}>是否展示</Checkbox>)}
316
318
  </Form.Item>
317
319
  </Col>