kts-component-invoice-operate 1.2.9 → 1.2.13
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/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode.d.ts +1 -1
- package/dist/index.esm.js +60 -65
- package/dist/index.js +60 -65
- package/docs/index.md +1 -1
- package/docs-dist/umi.css +1 -1
- package/docs-dist/umi.js +1 -1
- package/package.json +2 -2
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode.tsx +1 -1
- package/src/Invoice/_test/buyerNameSearch/index.tsx +1 -0
- package/src/Invoice/_test/endowCode/index.tsx +3 -3
- package/src/Invoice/ui/Buyer/index.less +7 -0
- package/src/Invoice/ui/Buyer/ui/BuyerNameInput/index.tsx +2 -2
- package/src/Invoice/ui/EndowCodeDrawer/index.tsx +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kts-component-invoice-operate",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.13",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@formily/antd-components": "^1.3.17",
|
|
29
29
|
"@types/uuid": "^8.3.0",
|
|
30
30
|
"classnames": "^2.3.1",
|
|
31
|
-
"grey-react-box": "^0.2.
|
|
31
|
+
"grey-react-box": "^0.2.20",
|
|
32
32
|
"kts-components-antd-x3": "^3.26.20-5",
|
|
33
33
|
"mathjs": "^9.4.2",
|
|
34
34
|
"next": "^11.0.1",
|
|
@@ -19,7 +19,7 @@ export default class EndowCode {
|
|
|
19
19
|
* @param val val
|
|
20
20
|
* @returns 税收分类编码树
|
|
21
21
|
*/
|
|
22
|
-
getTaxCategoryCodeTree
|
|
22
|
+
getTaxCategoryCodeTree?: (taxCategoryCode?: string, val?: string) => Promise<{ id: string, pid: string }[]>;
|
|
23
23
|
|
|
24
24
|
/** 税率 是否可以编辑 */
|
|
25
25
|
getReadOnlyTaxRate?: (value?: GoodsListState) => boolean;
|
|
@@ -19,6 +19,7 @@ class MyController extends Invoice.InvoiceController {
|
|
|
19
19
|
await this.wait(2000);
|
|
20
20
|
return {
|
|
21
21
|
recent: [
|
|
22
|
+
{ buyerName: '中科讯联科技北京网络有限公司中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
|
|
22
23
|
{ buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
|
|
23
24
|
{ buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
|
|
24
25
|
{ buyerName: '中科讯联科技北京网络有限公司', buyerNo: '918273829182918291' },
|
|
@@ -63,8 +63,8 @@ class MyController1 extends Invoice.InvoiceController {
|
|
|
63
63
|
|
|
64
64
|
getTaxCategoryCodeList = this.pipeline(async (s) => {
|
|
65
65
|
console.log('===> 准备赋码的货物索引列表', s.goodsListState.endowCode.endowcodeGoodIndex);
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
s.goodsListState.endowCode.getTaxCategoryCodeTree = async (taxCategoryCode?: string | undefined, val?: string | undefined) => {
|
|
67
|
+
if(! taxCategoryCode && !val) return [];
|
|
68
68
|
return moke.map(e => {
|
|
69
69
|
return {
|
|
70
70
|
label: `${e.taxCategoryCode}-${e.shorthand}`,
|
|
@@ -73,7 +73,7 @@ class MyController1 extends Invoice.InvoiceController {
|
|
|
73
73
|
pid: e.pid
|
|
74
74
|
}
|
|
75
75
|
})
|
|
76
|
-
}
|
|
76
|
+
};;
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -146,6 +146,7 @@
|
|
|
146
146
|
width : 50%;
|
|
147
147
|
float : left;
|
|
148
148
|
margin-bottom: 20px;
|
|
149
|
+
padding : 0 10px;
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
&::after {
|
|
@@ -205,6 +206,12 @@
|
|
|
205
206
|
color : #000;
|
|
206
207
|
cursor : pointer;
|
|
207
208
|
transition : background .4s;
|
|
209
|
+
display : inline-block;
|
|
210
|
+
|
|
211
|
+
max-width : 100%;
|
|
212
|
+
text-overflow: ellipsis;
|
|
213
|
+
white-space : nowrap;
|
|
214
|
+
overflow : hidden;
|
|
208
215
|
|
|
209
216
|
&:hover {
|
|
210
217
|
background: #e6e6e6e6;
|
|
@@ -108,7 +108,7 @@ export default (props: IBuyerNameInputProps) => {
|
|
|
108
108
|
overlayClassName='kts-invoice-operate-buyer-name-popover'
|
|
109
109
|
placement="bottomLeft"
|
|
110
110
|
trigger="click"
|
|
111
|
-
visible={visible}
|
|
111
|
+
visible={visible}
|
|
112
112
|
content={content}
|
|
113
113
|
>
|
|
114
114
|
<Input
|
|
@@ -154,7 +154,7 @@ function useDataSource() {
|
|
|
154
154
|
|
|
155
155
|
function MyTag(props: any) {
|
|
156
156
|
return (
|
|
157
|
-
<span className='kts-invoice-operate-buyer-name-content-tag' >{props.children}</span>
|
|
157
|
+
<span className='kts-invoice-operate-buyer-name-content-tag' title={props.children} >{props.children}</span>
|
|
158
158
|
)
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -104,6 +104,9 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
|
|
|
104
104
|
/** 优惠政策类型列表 */
|
|
105
105
|
const favouredPolicyNameList = controller.useMemo(s => s.goodsListState.endowCode.favouredPolicyNameList, []);
|
|
106
106
|
|
|
107
|
+
/** 优惠政策类型列表 */
|
|
108
|
+
// const getTaxCategoryCodeTree = controller.useMemo(s => s.goodsListState.endowCode.getTaxCategoryCodeTree, []);
|
|
109
|
+
|
|
107
110
|
/** 税率 */
|
|
108
111
|
const [taxRate, setTaxRate] = React.useState<number>(0);
|
|
109
112
|
|
|
@@ -228,7 +231,9 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
|
|
|
228
231
|
|
|
229
232
|
React.useEffect(() => {
|
|
230
233
|
(async () => {
|
|
231
|
-
|
|
234
|
+
const fn = controller.state.goodsListState.endowCode.getTaxCategoryCodeTree || (async () => []);
|
|
235
|
+
const list = await fn(filter?.taxCategoryCode, filter?.val);
|
|
236
|
+
setList(list || []);
|
|
232
237
|
})()
|
|
233
238
|
}, [filter])
|
|
234
239
|
|
|
@@ -366,7 +371,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
|
|
|
366
371
|
}, [controller]);
|
|
367
372
|
|
|
368
373
|
return (
|
|
369
|
-
<SchemaForm actions={actions} components={{ ...components, showSearch: ShowSearch2 }} effects={effects}>
|
|
374
|
+
<SchemaForm actions={actions} components={{ ...components, showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch }} effects={effects}>
|
|
370
375
|
<FormButtonGroup>
|
|
371
376
|
<Field
|
|
372
377
|
name="taxClassificationCode"
|