kts-component-invoice-operate 1.2.3 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "1.2.3",
3
+ "version": "1.2.6",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -34,7 +34,7 @@ export interface IBuyerInfo {
34
34
  export interface IAutoContainer {
35
35
 
36
36
  /** 购买方变化 */
37
- onBuyNameChange: (e?: string) => Promise<{ recent: IBuyerInfo[], list: IBuyerInfo[] }>;
37
+ onBuyNameChange: (e?: string) => Promise<{ recent?: IBuyerInfo[], list?: IBuyerInfo[] }>;
38
38
  }
39
39
 
40
40
  export default class BuyerState {
@@ -19,16 +19,16 @@ class MyController extends Invoice.InvoiceController {
19
19
  await this.wait(2000);
20
20
  return {
21
21
  recent: [
22
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
23
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
24
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
22
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
23
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
24
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
25
25
  ],
26
26
  list: [
27
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
28
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
29
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
30
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
31
- { buyerName: '中科讯联科技北京网络有限公司', buyerAddress: '918273829182918291' },
27
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
28
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
29
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
30
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
31
+ { buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
32
32
  ],
33
33
  }
34
34
  }
@@ -1,6 +1,6 @@
1
1
 
2
2
  import React from 'react';
3
- import { Popover, Input, Divider, Spin } from 'kts-components-antd-x3';
3
+ import { Popover, Input, Divider, Spin, Empty } from 'kts-components-antd-x3';
4
4
  import Invoice from '../../../../';
5
5
  import { IBuyerInfo } from '../../../../InvoiceController/InvoiceControllerState/BuyerState';
6
6
 
@@ -42,21 +42,27 @@ export default (props: IBuyerNameInputProps) => {
42
42
  <div className='kts-invoice-operate-buyer-name-content-block' style={{ padding: '14px 10px' }} >
43
43
  <label style={{ marginBottom: 10 }} >最近开具</label>
44
44
  <ul className='kts-invoice-operate-buyer-name-content-recently-issued' >
45
- {dataSource.recent?.map((e, i) => <li key={i} onClick={() => { onClickItem(e) }} style={{ marginBottom: interval(i, dataSource.recent?.length ?? 0) }} ><MyTag>{e.buyerName}</MyTag></li>)}
45
+ {
46
+ !dataSource.recent || dataSource.recent.length <= 0
47
+ ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
48
+ : dataSource.recent?.map((e, i) => <li key={i} onClick={() => { onClickItem(e) }} style={{ marginBottom: interval(i, dataSource.recent?.length ?? 0) }} ><MyTag>{e.buyerName}</MyTag></li>)
49
+ }
46
50
  </ul>
47
51
  </div>
48
52
  <Divider style={{ margin: "0 6px" }} />
49
53
  <div className='kts-invoice-operate-buyer-name-content-block' style={{ padding: '14px 10px 4px' }} >
50
54
  <label style={{ padding: '0 10px' }} >选择公司</label>
51
55
  {
52
- dataSource.list?.map((e, i) => {
53
- return (
54
- <ul key={i} onClick={() => { onClickItem(e) }} className='kts-invoice-operate-buyer-name-content-select-company' >
55
- <li>{e.buyerName}</li>
56
- <li>{e.buyerAddress}</li>
57
- </ul>
58
- )
59
- })
56
+ !dataSource.list || dataSource.list.length <= 0
57
+ ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
58
+ : dataSource.list.map((e, i) => {
59
+ return (
60
+ <ul key={i} onClick={() => { onClickItem(e) }} className='kts-invoice-operate-buyer-name-content-select-company' >
61
+ <li>{e.buyerName}</li>
62
+ <li>{e.buyerNo}</li>
63
+ </ul>
64
+ )
65
+ })
60
66
  }
61
67
  </div>
62
68
  </>