kts-component-invoice-operate 1.2.28 → 1.2.30

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
@@ -2,7 +2,7 @@ import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
2
2
  import React, { createElement } from 'react';
3
3
  import GreyReactBox, { decorator } from 'grey-react-box';
4
4
  import { chain as chain$1, bignumber, create, all } from 'mathjs';
5
- import { message, Form, Input, Icon, Tag, Select, Row, Col, Table, Button, Switch, Typography, Drawer, Menu, Dropdown, AutoComplete, Spin, Checkbox, Descriptions, Empty, Divider, Popover, Tree, Modal } from 'kts-components-antd-x3';
5
+ import { message, Form, Input, Icon, Tag, Select, Table, Button, Switch, Typography, Drawer, Menu, Dropdown, AutoComplete, Spin, Checkbox, Descriptions, Empty, Divider, Popover, Tree, Modal } from 'kts-components-antd-x3';
6
6
  import { v4 } from 'uuid';
7
7
  import classnames from 'classnames';
8
8
  import { Input as Input$1, NumberPicker } from '@formily/antd-components';
@@ -1580,7 +1580,7 @@ function SvgAuto(props) {
1580
1580
  })));
1581
1581
  }
1582
1582
 
1583
- var css_248z$1 = ".kts-invoice-operate-invoice-header {\n padding: 20px 8px;\n background: #f6f7f9;\n position: relative;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n}\n.kts-invoice-operate-invoice-header label {\n margin-right: 5px;\n white-space: nowrap;\n}\n.kts-invoice-operate-invoice-header .invoice-header-title {\n top: 20px;\n left: 0;\n position: absolute;\n color: #e28b89;\n font-weight: 500;\n font-size: 22px;\n text-align: center;\n width: 100%;\n pointer-events: none;\n z-index: 1;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no {\n display: flex;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no .ktsAnt3x-tag {\n margin-left: 10px;\n height: 24px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-type {\n flex: 1;\n text-align: right;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property {\n margin: 20px 0 0;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col {\n display: flex;\n flex-direction: inherit;\n padding-right: 20px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col span {\n color: #999;\n}\n";
1583
+ var css_248z$1 = ".kts-invoice-operate-invoice-header {\n padding: 20px 8px;\n background: #f6f7f9;\n position: relative;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n}\n.kts-invoice-operate-invoice-header label {\n margin-right: 5px;\n white-space: nowrap;\n}\n.kts-invoice-operate-invoice-header .invoice-header-title {\n top: 20px;\n left: 0;\n position: absolute;\n color: #e28b89;\n font-weight: 500;\n font-size: 22px;\n text-align: center;\n width: 100%;\n pointer-events: none;\n z-index: 1;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no {\n display: flex;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no .ktsAnt3x-tag {\n margin-left: 10px;\n height: 24px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-type {\n flex: 1;\n text-align: right;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property {\n margin: 20px 0 0;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col {\n display: flex;\n flex-direction: inherit;\n padding-right: 20px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col span {\n color: #999;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property-fieldExpand {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n gap: 10px;\n align-items: center;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property-fieldExpand li {\n display: flex;\n align-items: center;\n flex: 1;\n}\n";
1584
1584
  styleInject(css_248z$1);
1585
1585
 
1586
1586
  var InvoiceHeader = decorator(Form.create())(function (props) {
@@ -1771,10 +1771,10 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
1771
1771
  }
1772
1772
  }, props.renderExpand && props.renderExpand(props.form)), React.createElement("div", {
1773
1773
  className: "invoice-header-property"
1774
- }, _toConsumableArray(props.fieldExpand || []).map(function (e) {}), React.createElement(Row, null, fieldExpand.map(function (e) {
1775
- return React.createElement(Col, {
1776
- span: 24 / fieldExpand.length
1777
- }, React.createElement("label", null, e.label), e.render(form));
1774
+ }, _toConsumableArray(props.fieldExpand || []).map(function (e) {}), React.createElement("ul", {
1775
+ className: 'invoice-header-property-fieldExpand'
1776
+ }, fieldExpand.map(function (e) {
1777
+ return React.createElement("li", null, React.createElement("label", null, e.label), e.render(form));
1778
1778
  }))));
1779
1779
  });
1780
1780
 
@@ -12763,7 +12763,7 @@ var DrawerBody$3 = function DrawerBody(props) {
12763
12763
  }), React.createElement(SchemaMarkupField, {
12764
12764
  name: "shorthand",
12765
12765
  type: "string",
12766
- default: getShorthand(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName),
12766
+ default: getShorthand((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.taxClassificationCode) ? defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName : ''),
12767
12767
  title: "\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0"
12768
12768
  }), React.createElement(SchemaMarkupField, {
12769
12769
  name: "taxRate",
@@ -12875,7 +12875,7 @@ var getItemName$1 = function getItemName(value, shorthand) {
12875
12875
 
12876
12876
  var arr = value.match(/\*[^*]+\*/);
12877
12877
 
12878
- if (arr) {
12878
+ if (arr && value.charAt(0) === '*') {
12879
12879
  return value.replace(/\*[^*]+\*/, "*".concat(shorthand, "*"));
12880
12880
  } else {
12881
12881
  return "*".concat(shorthand, "*").concat(value);
package/dist/index.js CHANGED
@@ -1590,7 +1590,7 @@ function SvgAuto(props) {
1590
1590
  })));
1591
1591
  }
1592
1592
 
1593
- var css_248z$1 = ".kts-invoice-operate-invoice-header {\n padding: 20px 8px;\n background: #f6f7f9;\n position: relative;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n}\n.kts-invoice-operate-invoice-header label {\n margin-right: 5px;\n white-space: nowrap;\n}\n.kts-invoice-operate-invoice-header .invoice-header-title {\n top: 20px;\n left: 0;\n position: absolute;\n color: #e28b89;\n font-weight: 500;\n font-size: 22px;\n text-align: center;\n width: 100%;\n pointer-events: none;\n z-index: 1;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no {\n display: flex;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no .ktsAnt3x-tag {\n margin-left: 10px;\n height: 24px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-type {\n flex: 1;\n text-align: right;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property {\n margin: 20px 0 0;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col {\n display: flex;\n flex-direction: inherit;\n padding-right: 20px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col span {\n color: #999;\n}\n";
1593
+ var css_248z$1 = ".kts-invoice-operate-invoice-header {\n padding: 20px 8px;\n background: #f6f7f9;\n position: relative;\n color: rgba(0, 0, 0, 0.85);\n font-weight: 500;\n}\n.kts-invoice-operate-invoice-header label {\n margin-right: 5px;\n white-space: nowrap;\n}\n.kts-invoice-operate-invoice-header .invoice-header-title {\n top: 20px;\n left: 0;\n position: absolute;\n color: #e28b89;\n font-weight: 500;\n font-size: 22px;\n text-align: center;\n width: 100%;\n pointer-events: none;\n z-index: 1;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no {\n display: flex;\n}\n.kts-invoice-operate-invoice-header .invoice-header-no .ktsAnt3x-tag {\n margin-left: 10px;\n height: 24px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-type {\n flex: 1;\n text-align: right;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property {\n margin: 20px 0 0;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col {\n display: flex;\n flex-direction: inherit;\n padding-right: 20px;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property .ktsAnt3x-col span {\n color: #999;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property-fieldExpand {\n display: flex;\n margin: 0;\n padding: 0;\n list-style-type: none;\n gap: 10px;\n align-items: center;\n}\n.kts-invoice-operate-invoice-header .invoice-header-property-fieldExpand li {\n display: flex;\n align-items: center;\n flex: 1;\n}\n";
1594
1594
  styleInject(css_248z$1);
1595
1595
 
1596
1596
  var InvoiceHeader = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
@@ -1781,10 +1781,10 @@ var InvoiceHeader = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
1781
1781
  }
1782
1782
  }, props.renderExpand && props.renderExpand(props.form)), React__default['default'].createElement("div", {
1783
1783
  className: "invoice-header-property"
1784
- }, _toConsumableArray(props.fieldExpand || []).map(function (e) {}), React__default['default'].createElement(ktsComponentsAntdX3.Row, null, fieldExpand.map(function (e) {
1785
- return React__default['default'].createElement(ktsComponentsAntdX3.Col, {
1786
- span: 24 / fieldExpand.length
1787
- }, React__default['default'].createElement("label", null, e.label), e.render(form));
1784
+ }, _toConsumableArray(props.fieldExpand || []).map(function (e) {}), React__default['default'].createElement("ul", {
1785
+ className: 'invoice-header-property-fieldExpand'
1786
+ }, fieldExpand.map(function (e) {
1787
+ return React__default['default'].createElement("li", null, React__default['default'].createElement("label", null, e.label), e.render(form));
1788
1788
  }))));
1789
1789
  });
1790
1790
 
@@ -12773,7 +12773,7 @@ var DrawerBody$3 = function DrawerBody(props) {
12773
12773
  }), React__default['default'].createElement(antd.SchemaMarkupField, {
12774
12774
  name: "shorthand",
12775
12775
  type: "string",
12776
- default: getShorthand(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName),
12776
+ default: getShorthand((defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.taxClassificationCode) ? defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.itemName : ''),
12777
12777
  title: "\u5546\u54C1\u548C\u670D\u52A1\u5206\u7C7B\u7B80\u79F0"
12778
12778
  }), React__default['default'].createElement(antd.SchemaMarkupField, {
12779
12779
  name: "taxRate",
@@ -12885,7 +12885,7 @@ var getItemName$1 = function getItemName(value, shorthand) {
12885
12885
 
12886
12886
  var arr = value.match(/\*[^*]+\*/);
12887
12887
 
12888
- if (arr) {
12888
+ if (arr && value.charAt(0) === '*') {
12889
12889
  return value.replace(/\*[^*]+\*/, "*".concat(shorthand, "*"));
12890
12890
  } else {
12891
12891
  return "*".concat(shorthand, "*").concat(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -390,7 +390,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
390
390
  <Field
391
391
  name="shorthand"
392
392
  type="string"
393
- default={getShorthand(defaultValue?.itemName)}
393
+ default={getShorthand(defaultValue?.taxClassificationCode?defaultValue?.itemName:'')}
394
394
  title="商品和服务分类简称"
395
395
  />
396
396
  <Field
@@ -471,7 +471,7 @@ const getItemName = (value?: string, shorthand?: string) => {
471
471
  }
472
472
 
473
473
  const arr = value.match(/\*[^*]+\*/);
474
- if (arr) {
474
+ if (arr&&value.charAt(0)==='*') {
475
475
  return value.replace(/\*[^*]+\*/, `*${shorthand}*`);
476
476
  } else {
477
477
  return `*${shorthand}*${value}`;
@@ -1,26 +1,26 @@
1
1
  .kts-invoice-operate-invoice-header {
2
- padding: 20px 8px;
3
- background: #f6f7f9;
4
- position: relative;
5
- color: rgba(0, 0, 0, 0.85);
2
+ padding : 20px 8px;
3
+ background : #f6f7f9;
4
+ position : relative;
5
+ color : rgba(0, 0, 0, 0.85);
6
6
  font-weight: 500;
7
7
 
8
8
  label {
9
9
  margin-right: 5px;
10
- white-space: nowrap;
10
+ white-space : nowrap;
11
11
  }
12
12
 
13
13
  .invoice-header-title {
14
- top: 20px;
15
- left: 0;
16
- position: absolute;
17
- color: #e28b89;
18
- font-weight: 500;
19
- font-size: 22px;
20
- text-align: center;
21
- width: 100%;
14
+ top : 20px;
15
+ left : 0;
16
+ position : absolute;
17
+ color : #e28b89;
18
+ font-weight : 500;
19
+ font-size : 22px;
20
+ text-align : center;
21
+ width : 100%;
22
22
  pointer-events: none;
23
- z-index: 1;
23
+ z-index : 1;
24
24
  }
25
25
 
26
26
  .invoice-header-no {
@@ -28,12 +28,12 @@
28
28
 
29
29
  .ktsAnt3x-tag {
30
30
  margin-left: 10px;
31
- height: 24px;
31
+ height : 24px;
32
32
  }
33
33
  }
34
34
 
35
- .invoice-header-type{
36
- flex: 1;
35
+ .invoice-header-type {
36
+ flex : 1;
37
37
  text-align: right;
38
38
  }
39
39
 
@@ -42,13 +42,29 @@
42
42
  margin: 20px 0 0;
43
43
 
44
44
  .ktsAnt3x-col {
45
- display: flex;
45
+ display : flex;
46
46
  flex-direction: inherit;
47
- padding-right: 20px;
47
+ padding-right : 20px;
48
48
 
49
49
  span {
50
50
  color: #999;
51
51
  }
52
52
  }
53
53
  }
54
- }
54
+
55
+ .invoice-header-property-fieldExpand {
56
+ display : flex;
57
+ margin : 0;
58
+ padding : 0;
59
+ list-style-type: none;
60
+ gap : 10px;
61
+ align-items : center;
62
+
63
+ li {
64
+ display : flex;
65
+ align-items: center;
66
+ flex : 1;
67
+ }
68
+ }
69
+
70
+ }
@@ -201,18 +201,31 @@ export default decorator<IInvoiceHeader, IInvoiceHeader & FormComponentProps>(Fo
201
201
  [...props.fieldExpand || []].map(e => {
202
202
  })
203
203
  }
204
- <Row>
204
+ {/* <Row>
205
205
  {
206
206
  fieldExpand.map(e => {
207
207
  return (
208
- <Col span={24 / fieldExpand.length}>
208
+ <Col span={parseInt(`${24 / fieldExpand.length}`)}>
209
209
  <label>{e.label}</label>
210
210
  {e.render(form)}
211
211
  </Col>
212
212
  )
213
213
  })
214
214
  }
215
- </Row>
215
+ </Row> */}
216
+ <ul className='invoice-header-property-fieldExpand' >
217
+ {
218
+ fieldExpand.map(e => {
219
+ return (
220
+ <li>
221
+ <label>{e.label}</label>
222
+ {e.render(form)}
223
+ </li>
224
+ )
225
+ })
226
+ }
227
+ </ul>
228
+
216
229
  </div>
217
230
  </div>
218
231
  );