kts-component-invoice-operate 1.0.102 → 1.0.103
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/.dumi/theme/builtins/API.tsx +66 -66
- package/.editorconfig +16 -16
- package/.fatherrc.ts +4 -4
- package/.prettierignore +7 -7
- package/.prettierrc +11 -11
- package/.umirc.ts +8 -8
- package/README.md +5 -5
- package/dist/index.esm.js +27 -15
- package/dist/index.js +27 -15
- package/docs-dist/404.html +1 -1
- package/docs-dist/index.html +1 -1
- package/docs-dist/umi.css +1 -1
- package/docs-dist/umi.js +1 -1
- package/package.json +1 -1
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode.tsx +71 -71
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood.ts +57 -57
- package/src/Invoice/InvoiceController/fns/addGood.ts +11 -11
- package/src/Invoice/InvoiceController/fns/delGood.ts +45 -45
- package/src/Invoice/InvoiceController/fns/saveEditGood.ts +23 -23
- package/src/Invoice/InvoiceController/fns/setEditGood.ts +16 -16
- package/src/Invoice/InvoiceController/fns/updateInvoiceNo.ts +8 -8
- package/src/Invoice/InvoiceController/index.ts +57 -57
- package/src/Invoice/_test/draft/index.tsx +2 -3
- package/src/Invoice/_test/easiest/index.tsx +5 -5
- package/src/Invoice/_test/importBuyer/index.tsx +74 -74
- package/src/Invoice/_test/isInvoiceNo/index.tsx +12 -12
- package/src/Invoice/_test/setDataSource/index.tsx +22 -22
- package/src/Invoice/_test/unit/index.tsx +19 -19
- package/src/Invoice/index.less +12 -12
- package/src/Invoice/index.tsx +104 -104
- package/src/Invoice/tools/evaluate/index.ts +7 -7
- package/src/Invoice/ui/EndowCodeDrawer/index.less +8 -8
- package/src/Invoice/ui/InvoiceHeader/index.tsx +13 -8
- package/tsconfig.json +31 -31
- package/typings.d.ts +3 -3
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import type { IApiComponentProps } from 'dumi/theme';
|
|
3
|
-
import { context, useApiData, AnchorLink } from 'dumi/theme';
|
|
4
|
-
|
|
5
|
-
const LOCALE_TEXTS = {
|
|
6
|
-
'zh-CN': {
|
|
7
|
-
name: '属性名',
|
|
8
|
-
description: '描述',
|
|
9
|
-
type: '类型',
|
|
10
|
-
default: '默认值',
|
|
11
|
-
required: '(必选)',
|
|
12
|
-
},
|
|
13
|
-
'en-US': {
|
|
14
|
-
name: 'Name',
|
|
15
|
-
description: 'Description',
|
|
16
|
-
type: 'Type',
|
|
17
|
-
default: 'Default',
|
|
18
|
-
required: '(required)',
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default ({
|
|
23
|
-
name,
|
|
24
|
-
identifier,
|
|
25
|
-
export: expt,
|
|
26
|
-
}: IApiComponentProps & { name: string }) => {
|
|
27
|
-
const data = useApiData(identifier);
|
|
28
|
-
const { locale } = useContext(context);
|
|
29
|
-
const texts = /^zh|cn$/i.test(locale)
|
|
30
|
-
? LOCALE_TEXTS['zh-CN']
|
|
31
|
-
: LOCALE_TEXTS['en-US'];
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<>
|
|
35
|
-
<p>{name}</p>
|
|
36
|
-
{data && (
|
|
37
|
-
<table style={{ marginTop: 24 }}>
|
|
38
|
-
<thead>
|
|
39
|
-
<tr>
|
|
40
|
-
<th>{texts.name}</th>
|
|
41
|
-
<th>{texts.description}</th>
|
|
42
|
-
<th>{texts.type}</th>
|
|
43
|
-
<th>{texts.default}</th>
|
|
44
|
-
</tr>
|
|
45
|
-
</thead>
|
|
46
|
-
<tbody>
|
|
47
|
-
{data[expt]?.map((row) => (
|
|
48
|
-
<tr key={row.identifier}>
|
|
49
|
-
<td>{row.identifier}</td>
|
|
50
|
-
<td>{row.description || '--'}</td>
|
|
51
|
-
<td>
|
|
52
|
-
<code>{row.type}</code>
|
|
53
|
-
</td>
|
|
54
|
-
<td>
|
|
55
|
-
<code>
|
|
56
|
-
{row.default || (row.required && texts.required) || '--'}
|
|
57
|
-
</code>
|
|
58
|
-
</td>
|
|
59
|
-
</tr>
|
|
60
|
-
))}
|
|
61
|
-
</tbody>
|
|
62
|
-
</table>
|
|
63
|
-
)}
|
|
64
|
-
</>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import type { IApiComponentProps } from 'dumi/theme';
|
|
3
|
+
import { context, useApiData, AnchorLink } from 'dumi/theme';
|
|
4
|
+
|
|
5
|
+
const LOCALE_TEXTS = {
|
|
6
|
+
'zh-CN': {
|
|
7
|
+
name: '属性名',
|
|
8
|
+
description: '描述',
|
|
9
|
+
type: '类型',
|
|
10
|
+
default: '默认值',
|
|
11
|
+
required: '(必选)',
|
|
12
|
+
},
|
|
13
|
+
'en-US': {
|
|
14
|
+
name: 'Name',
|
|
15
|
+
description: 'Description',
|
|
16
|
+
type: 'Type',
|
|
17
|
+
default: 'Default',
|
|
18
|
+
required: '(required)',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default ({
|
|
23
|
+
name,
|
|
24
|
+
identifier,
|
|
25
|
+
export: expt,
|
|
26
|
+
}: IApiComponentProps & { name: string }) => {
|
|
27
|
+
const data = useApiData(identifier);
|
|
28
|
+
const { locale } = useContext(context);
|
|
29
|
+
const texts = /^zh|cn$/i.test(locale)
|
|
30
|
+
? LOCALE_TEXTS['zh-CN']
|
|
31
|
+
: LOCALE_TEXTS['en-US'];
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
<p>{name}</p>
|
|
36
|
+
{data && (
|
|
37
|
+
<table style={{ marginTop: 24 }}>
|
|
38
|
+
<thead>
|
|
39
|
+
<tr>
|
|
40
|
+
<th>{texts.name}</th>
|
|
41
|
+
<th>{texts.description}</th>
|
|
42
|
+
<th>{texts.type}</th>
|
|
43
|
+
<th>{texts.default}</th>
|
|
44
|
+
</tr>
|
|
45
|
+
</thead>
|
|
46
|
+
<tbody>
|
|
47
|
+
{data[expt]?.map((row) => (
|
|
48
|
+
<tr key={row.identifier}>
|
|
49
|
+
<td>{row.identifier}</td>
|
|
50
|
+
<td>{row.description || '--'}</td>
|
|
51
|
+
<td>
|
|
52
|
+
<code>{row.type}</code>
|
|
53
|
+
</td>
|
|
54
|
+
<td>
|
|
55
|
+
<code>
|
|
56
|
+
{row.default || (row.required && texts.required) || '--'}
|
|
57
|
+
</code>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
))}
|
|
61
|
+
</tbody>
|
|
62
|
+
</table>
|
|
63
|
+
)}
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
};
|
package/.editorconfig
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# http://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
indent_style = space
|
|
6
|
-
indent_size = 2
|
|
7
|
-
end_of_line = lf
|
|
8
|
-
charset = utf-8
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
insert_final_newline = true
|
|
11
|
-
|
|
12
|
-
[*.md]
|
|
13
|
-
trim_trailing_whitespace = false
|
|
14
|
-
|
|
15
|
-
[Makefile]
|
|
16
|
-
indent_style = tab
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
charset = utf-8
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
insert_final_newline = true
|
|
11
|
+
|
|
12
|
+
[*.md]
|
|
13
|
+
trim_trailing_whitespace = false
|
|
14
|
+
|
|
15
|
+
[Makefile]
|
|
16
|
+
indent_style = tab
|
package/.fatherrc.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
esm: 'rollup',
|
|
3
|
-
cjs: 'rollup',
|
|
4
|
-
};
|
|
1
|
+
export default {
|
|
2
|
+
esm: 'rollup',
|
|
3
|
+
cjs: 'rollup',
|
|
4
|
+
};
|
package/.prettierignore
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
**/*.svg
|
|
2
|
-
**/*.ejs
|
|
3
|
-
**/*.html
|
|
4
|
-
package.json
|
|
5
|
-
.umi
|
|
6
|
-
.umi-production
|
|
7
|
-
.umi-test
|
|
1
|
+
**/*.svg
|
|
2
|
+
**/*.ejs
|
|
3
|
+
**/*.html
|
|
4
|
+
package.json
|
|
5
|
+
.umi
|
|
6
|
+
.umi-production
|
|
7
|
+
.umi-test
|
package/.prettierrc
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"singleQuote": true,
|
|
3
|
-
"trailingComma": "all",
|
|
4
|
-
"printWidth": 80,
|
|
5
|
-
"overrides": [
|
|
6
|
-
{
|
|
7
|
-
"files": ".prettierrc",
|
|
8
|
-
"options": { "parser": "json" }
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"singleQuote": true,
|
|
3
|
+
"trailingComma": "all",
|
|
4
|
+
"printWidth": 80,
|
|
5
|
+
"overrides": [
|
|
6
|
+
{
|
|
7
|
+
"files": ".prettierrc",
|
|
8
|
+
"options": { "parser": "json" }
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/.umirc.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineConfig } from 'dumi';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
locales: [['zh-CN', '中文']],
|
|
5
|
-
title: '发票组件',
|
|
6
|
-
outputPath: 'docs-dist',
|
|
7
|
-
publicPath:'/docs-dist/',
|
|
8
|
-
});
|
|
1
|
+
import { defineConfig } from 'dumi';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
locales: [['zh-CN', '中文']],
|
|
5
|
+
title: '发票组件',
|
|
6
|
+
outputPath: 'docs-dist',
|
|
7
|
+
publicPath:'/docs-dist/',
|
|
8
|
+
});
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# kts-component-invoice-operate
|
|
2
|
-
|
|
3
|
-
文档地址:http://kts-component-invoice-operate.dev.kingxunlian.com/
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# kts-component-invoice-operate
|
|
2
|
+
|
|
3
|
+
文档地址:http://kts-component-invoice-operate.dev.kingxunlian.com/
|
|
4
|
+
|
|
5
|
+
|
|
6
6
|
南湖:https://lanhuapp.com/web/#/item/project/detailDetach?pid=7daf94b0-9aa7-4372-89a7-226f389b021d&project_id=7daf94b0-9aa7-4372-89a7-226f389b021d&image_id=3bc42812-5718-4aa5-b088-5bc7e0c9a62f&fromEditor=true
|
package/dist/index.esm.js
CHANGED
|
@@ -1176,21 +1176,33 @@ var InvoiceHeader = decorator(Form.create())(function (props) {
|
|
|
1176
1176
|
return '增值税电子专用发票';
|
|
1177
1177
|
}, [props.typeOption, props.title, typeIndex]);
|
|
1178
1178
|
var fieldExpand = React.useMemo(function () {
|
|
1179
|
-
var fieldExpand = [
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1179
|
+
var fieldExpand = [];
|
|
1180
|
+
|
|
1181
|
+
if (!props.fieldExpand || props.fieldExpand.some(function (e) {
|
|
1182
|
+
return "".concat(e.label).replace(" :", '') === '发票代码';
|
|
1183
|
+
}) === false) {
|
|
1184
|
+
fieldExpand.push({
|
|
1185
|
+
label: '发票代码 :',
|
|
1186
|
+
render: function render(form) {
|
|
1187
|
+
return form.getFieldDecorator('code', {
|
|
1188
|
+
initialValue: props.defaultCode
|
|
1189
|
+
})( /*#__PURE__*/React.createElement(FormSpanString, null));
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
if (!props.fieldExpand || props.fieldExpand.some(function (e) {
|
|
1195
|
+
return "".concat(e.label).replace(" :", '') === '发票号码';
|
|
1196
|
+
}) === false) {
|
|
1197
|
+
fieldExpand.push({
|
|
1198
|
+
label: '发票号码 :',
|
|
1199
|
+
render: function render(form) {
|
|
1200
|
+
return form.getFieldDecorator('no', {
|
|
1201
|
+
initialValue: props.defaultNo
|
|
1202
|
+
})( /*#__PURE__*/React.createElement(FormSpanString, null));
|
|
1203
|
+
}
|
|
1204
|
+
});
|
|
1205
|
+
}
|
|
1194
1206
|
|
|
1195
1207
|
if (props.defaultInvoicingDate) {
|
|
1196
1208
|
fieldExpand.push({
|
package/dist/index.js
CHANGED
|
@@ -1186,21 +1186,33 @@ var InvoiceHeader = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
1186
1186
|
return '增值税电子专用发票';
|
|
1187
1187
|
}, [props.typeOption, props.title, typeIndex]);
|
|
1188
1188
|
var fieldExpand = React__default['default'].useMemo(function () {
|
|
1189
|
-
var fieldExpand = [
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1189
|
+
var fieldExpand = [];
|
|
1190
|
+
|
|
1191
|
+
if (!props.fieldExpand || props.fieldExpand.some(function (e) {
|
|
1192
|
+
return "".concat(e.label).replace(" :", '') === '发票代码';
|
|
1193
|
+
}) === false) {
|
|
1194
|
+
fieldExpand.push({
|
|
1195
|
+
label: '发票代码 :',
|
|
1196
|
+
render: function render(form) {
|
|
1197
|
+
return form.getFieldDecorator('code', {
|
|
1198
|
+
initialValue: props.defaultCode
|
|
1199
|
+
})( /*#__PURE__*/React__default['default'].createElement(FormSpanString, null));
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
if (!props.fieldExpand || props.fieldExpand.some(function (e) {
|
|
1205
|
+
return "".concat(e.label).replace(" :", '') === '发票号码';
|
|
1206
|
+
}) === false) {
|
|
1207
|
+
fieldExpand.push({
|
|
1208
|
+
label: '发票号码 :',
|
|
1209
|
+
render: function render(form) {
|
|
1210
|
+
return form.getFieldDecorator('no', {
|
|
1211
|
+
initialValue: props.defaultNo
|
|
1212
|
+
})( /*#__PURE__*/React__default['default'].createElement(FormSpanString, null));
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
}
|
|
1204
1216
|
|
|
1205
1217
|
if (props.defaultInvoicingDate) {
|
|
1206
1218
|
fieldExpand.push({
|
package/docs-dist/404.html
CHANGED