kts-component-invoice-operate 3.2.0 → 3.2.1

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.
Files changed (28) hide show
  1. package/dist/Invoice/Invoice-digtal/_test/importGoods/index.d.ts +3 -0
  2. package/dist/Invoice/Invoice-digtal/_test/importStakeholder/index.d.ts +4 -0
  3. package/dist/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.d.ts +2 -1
  4. package/dist/Invoice/ui/digtal/Stakeholder/index.d.ts +5 -0
  5. package/dist/index.esm.js +125 -48
  6. package/dist/index.js +125 -48
  7. package/docs-dist/404.html +33 -33
  8. package/docs-dist/index.html +33 -33
  9. package/docs-dist/static/add.a70623b4.svg +12 -0
  10. package/docs-dist/static/arrowDown.a1cbf0d8.svg +3 -0
  11. package/docs-dist/static/arrowUp.4c482054.svg +3 -0
  12. package/docs-dist/static/fork.5431267d.svg +12 -0
  13. package/docs-dist/umi.css +19 -19
  14. package/docs-dist/umi.js +1 -1
  15. package/package.json +1 -1
  16. package/src/Invoice/Invoice-digtal/_test/importGoods/index.tsx +471 -0
  17. package/src/Invoice/Invoice-digtal/_test/importStakeholder/index.tsx +17 -0
  18. package/src/Invoice/Invoice-digtal/index.md +6 -0
  19. package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +1 -1
  20. package/src/Invoice/index.tsx +8 -6
  21. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +15 -2
  22. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/svg/plus.svg +12 -0
  23. package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +7 -2
  24. package/src/Invoice/ui/digtal/GoodsList/index.tsx +0 -1
  25. package/src/Invoice/ui/digtal/GoodsList/ui/BulkMenu/hooks/useAddDiscountRowButton/index.tsx +1 -2
  26. package/src/Invoice/ui/digtal/Stakeholder/index.tsx +25 -2
  27. package/src/Invoice/ui/digtal/Stakeholder/svg/plus.svg +12 -0
  28. package/src/InvoiceTypeModal/index.tsx +5 -1
@@ -7,6 +7,8 @@ import { Button, Col, Input, InputProps, Row } from 'kts-xui'
7
7
  import { FormComponentProps } from "kts-components-antd-x3/lib/form";
8
8
  import { ReactComponent as ArrowUpSvg } from './svg/arrowUp.svg';
9
9
  import { ReactComponent as ArrowDownSvg } from './svg/arrowDown.svg';
10
+ import { ReactComponent as PlusSvg } from './svg/plus.svg'
11
+ import InvoiceController from "../../../InvoiceController";
10
12
  import Invoice from "../../../../Invoice";
11
13
  import './index.less';
12
14
 
@@ -38,12 +40,18 @@ const formatCompanyName = (e: any) => {
38
40
  }
39
41
 
40
42
  export interface IStakeholder {
43
+
44
+ /** 是否显示导入按钮 */
45
+ isShowImportButton?: boolean;
46
+
47
+ /** 点击了 */
48
+ onClickImportButton?: (e: InvoiceController) => void
41
49
  }
42
50
 
43
51
  /** 干系人 */
44
52
  export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.create())(props => {
45
53
 
46
- const { form } = props;
54
+ const { form, isShowImportButton, onClickImportButton } = props;
47
55
 
48
56
  const [isExpand, setExpand] = React.useState(true);
49
57
 
@@ -91,7 +99,22 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
91
99
  {getFieldDecorator('buyerName', {
92
100
  rules: getRules('buyerName', RULES.companyName('购买方名称')),
93
101
  getValueFromEvent: formatCompanyName
94
- })(<MyInput readOnly={isReadOnly('buyerName')} placeholder="请输入" autoComplete="off" />)}
102
+ })(
103
+ <MyInput
104
+ readOnly={isReadOnly('buyerName')}
105
+ placeholder="请输入"
106
+ autoComplete="off"
107
+ suffix={
108
+ isShowImportButton === true &&
109
+ <Button
110
+ type='link'
111
+ style={{ padding: 0, width: 20 }}
112
+ icon={<Icon component={PlusSvg} />}
113
+ onClick={() => { onClickImportButton && onClickImportButton(controller) }}
114
+ />
115
+ }
116
+ />
117
+ )}
95
118
  </Form.Item>
96
119
  </Col>
97
120
 
@@ -0,0 +1,12 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 16 15" fill="none">
2
+ <g clip-path="url(#clip0_715_360)">
3
+ <path d="M8 14.5312C4.11687 14.5312 0.96875 11.3831 0.96875 7.5C0.96875 3.61687 4.11687 0.46875 8 0.46875C11.8831 0.46875 15.0312 3.61687 15.0312 7.5C15.0312 11.3831 11.8831 14.5312 8 14.5312ZM8 13.5938C11.3656 13.5938 14.0938 10.8656 14.0938 7.5C14.0938 4.13438 11.3656 1.40625 8 1.40625C4.63438 1.40625 1.90625 4.13438 1.90625 7.5C1.90625 10.8656 4.63438 13.5938 8 13.5938Z"/>
4
+ <path d="M4.25 7.96875C4.12568 7.96875 4.00645 7.91936 3.91854 7.83146C3.83064 7.74355 3.78125 7.62432 3.78125 7.5C3.78125 7.37568 3.83064 7.25645 3.91854 7.16854C4.00645 7.08064 4.12568 7.03125 4.25 7.03125H11.75C11.8743 7.03125 11.9935 7.08064 12.0815 7.16854C12.1694 7.25645 12.2188 7.37568 12.2188 7.5C12.2188 7.62432 12.1694 7.74355 12.0815 7.83146C11.9935 7.91936 11.8743 7.96875 11.75 7.96875H4.25Z"/>
5
+ <path d="M7.53125 3.75C7.53125 3.62568 7.58064 3.50645 7.66854 3.41854C7.75645 3.33064 7.87568 3.28125 8 3.28125C8.12432 3.28125 8.24355 3.33064 8.33146 3.41854C8.41936 3.50645 8.46875 3.62568 8.46875 3.75V11.25C8.46875 11.3743 8.41936 11.4935 8.33146 11.5815C8.24355 11.6694 8.12432 11.7188 8 11.7188C7.87568 11.7188 7.75645 11.6694 7.66854 11.5815C7.58064 11.4935 7.53125 11.3743 7.53125 11.25V3.75Z"/>
6
+ </g>
7
+ <defs>
8
+ <clipPath id="clip0_715_360">
9
+ <rect width="15" height="15" transform="translate(0.5)"/>
10
+ </clipPath>
11
+ </defs>
12
+ </svg>
@@ -98,7 +98,11 @@ export default function InvoiceTypeModal(props: IInvoiceTypeModalProps) {
98
98
  </Col>
99
99
 
100
100
  <Col span={12} >
101
- <Form.Item name='invoiceType' label="选择票类" >
101
+ <Form.Item
102
+ name='invoiceType'
103
+ label="选择票类"
104
+ rules={[{ required: true, message: '选择票类必填' }]}
105
+ >
102
106
  <Select
103
107
  size='large'
104
108
  disabled={disableds.indexOf('invoiceType') >= 0}