kts-component-invoice-operate 3.2.219-chinaship → 3.2.219
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/README.md +4 -0
- package/dist/Invoice/ui/default/GoodsList/index.d.ts +1 -0
- package/dist/Invoice/ui/default/GoodsList/ui/AddRowButton/index.d.ts +1 -1
- package/dist/index.esm.js +307 -218
- package/dist/index.js +306 -217
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +22 -7
- package/src/Invoice/Invoice-digtal/index.md +10 -8
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +1 -0
- package/src/Invoice/_test/deduction/index.tsx +22 -6
- package/src/Invoice/index.md +4 -4
- package/src/Invoice/ui/default/GoodsList/index.tsx +3 -1
- package/src/Invoice/ui/default/GoodsList/ui/AddRowButton/index.tsx +4 -1
- package/src/Invoice/ui/digtal/Architecture/index.tsx +1 -1
- package/src/Invoice/ui/digtal/FreightList/index.tsx +1 -1
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +12 -16
- package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +8 -0
- package/src/Invoice/ui/digtal/RealEstateInfo/index.less +7 -0
- package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +152 -102
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +4 -22
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Invoice from '../../..';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import 'antd/dist/antd.css';
|
|
5
|
-
|
|
5
|
+
import { Button } from 'kts-components-antd-x3';
|
|
6
6
|
export default () => {
|
|
7
7
|
|
|
8
8
|
const controller = React.useMemo(() => new Invoice.InvoiceController(), []);
|
|
@@ -11,12 +11,27 @@ export default () => {
|
|
|
11
11
|
controller.run(async s => {
|
|
12
12
|
})
|
|
13
13
|
}, [])
|
|
14
|
-
|
|
14
|
+
const onSave = async () => {
|
|
15
|
+
const formValues = await controller.validateFields();
|
|
16
|
+
console.log(formValues)
|
|
17
|
+
}
|
|
15
18
|
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
<>
|
|
20
|
+
<Button onClick={onSave}>输出表单内容</Button>
|
|
21
|
+
<Invoice
|
|
22
|
+
invoiceType='digtal'
|
|
23
|
+
controller={controller}
|
|
24
|
+
specialInfor={<Invoice.RealEstateInfo realEstateAddressOptions={[
|
|
25
|
+
{
|
|
26
|
+
"code": "11",
|
|
27
|
+
"name": "北京市"
|
|
28
|
+
}] || []}
|
|
29
|
+
realEstateAddressFieldNames={{
|
|
30
|
+
label: 'name',
|
|
31
|
+
value: 'name',
|
|
32
|
+
children: 'children'
|
|
33
|
+
}} />}
|
|
34
|
+
/>
|
|
35
|
+
</>
|
|
21
36
|
)
|
|
22
37
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# 数电
|
|
2
2
|
|
|
3
|
-
## 简单用法
|
|
4
|
-
<code src="./_test/easiest/index.tsx"></code>
|
|
3
|
+
<!-- ## 简单用法
|
|
4
|
+
<code src="./_test/easiest/index.tsx"></code> -->
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
<code src="./_test/
|
|
6
|
+
## 不动产经营租赁服务
|
|
7
|
+
<code src="./_test/realEstateInfo/index.tsx"></code>
|
|
8
|
+
|
|
9
|
+
<!-- ## 建筑服务
|
|
10
|
+
<code src="./_test/architecture/index.tsx"></code> -->
|
|
8
11
|
|
|
9
12
|
<!-- ## 只读模式
|
|
10
13
|
<code src="./_test/readOnly/index.tsx"></code> -->
|
|
@@ -33,10 +36,9 @@
|
|
|
33
36
|
## 查看当前可用授信额度
|
|
34
37
|
<code src="./_test/lineCredit/index.tsx"></code>
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
<code src="./_test/realEstateInfo/index.tsx"></code>
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
-->
|
|
40
42
|
|
|
41
|
-
## 货物运输服务
|
|
42
|
-
<code src="./_test/freight/index.tsx"></code>
|
|
43
|
+
<!-- ## 货物运输服务
|
|
44
|
+
<code src="./_test/freight/index.tsx"></code> -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Input } from 'kts-components-antd-x3';
|
|
2
|
+
import { Input, message } from 'kts-components-antd-x3';
|
|
3
3
|
import Invoice from '../../';
|
|
4
4
|
import 'antd/dist/antd.css';
|
|
5
5
|
|
|
@@ -29,17 +29,33 @@ export default () => {
|
|
|
29
29
|
</span>
|
|
30
30
|
)
|
|
31
31
|
}, [])
|
|
32
|
+
const checkGood = async () => {
|
|
33
|
+
await new Promise((resolve,) => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
const a = Math.random();
|
|
36
|
+
if (a > 0.5) {
|
|
37
|
+
message.error('请先填写发票行信息,再添加新的行');
|
|
38
|
+
return false;
|
|
39
|
+
} else {
|
|
40
|
+
resolve(true)
|
|
41
|
+
console.log(11112)
|
|
42
|
+
}
|
|
32
43
|
|
|
44
|
+
}, 1000)
|
|
45
|
+
})
|
|
46
|
+
}
|
|
33
47
|
return (
|
|
34
48
|
<Invoice
|
|
35
49
|
controller={controller}
|
|
36
50
|
goodsList={
|
|
37
51
|
<Invoice.GoodsList
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
|
|
53
|
+
addGoodsCheck={checkGood}
|
|
54
|
+
// isSwitchTax={false} // 是否可以切换(含税/不含税)状态
|
|
55
|
+
// isAddDiscount={false} // 不能添加折扣行
|
|
56
|
+
// goodMax={goodMax} // 控制能可以添加的货物函数
|
|
57
|
+
// deduction={deduction} // 扣除额
|
|
58
|
+
// menuExpansion={menuExpansion} // 扩展
|
|
43
59
|
/>
|
|
44
60
|
}
|
|
45
61
|
/>
|
package/src/Invoice/index.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# 默认
|
|
2
2
|
|
|
3
|
-
## 简单用法
|
|
3
|
+
<!-- ## 简单用法
|
|
4
4
|
<code src="./_test/easiest/index.tsx"></code>
|
|
5
5
|
|
|
6
6
|
## 设置为草稿,设置默认参数 扩展按钮
|
|
7
7
|
<code src="./_test/draft/index.tsx" title="类似的操作,请查看API" ></code>
|
|
8
8
|
|
|
9
9
|
## 设置购买方名称搜索
|
|
10
|
-
<code src="./_test/buyerNameSearch/index.tsx"></code>
|
|
10
|
+
<code src="./_test/buyerNameSearch/index.tsx"></code> -->
|
|
11
11
|
|
|
12
12
|
## 设置扣除额(差额征税)
|
|
13
13
|
<code src="./_test/deduction/index.tsx"></code>
|
|
14
14
|
|
|
15
|
-
## 设置单位列表、税率列表
|
|
15
|
+
<!-- ## 设置单位列表、税率列表
|
|
16
16
|
<code src="./_test/unit/index.tsx" ></code>
|
|
17
17
|
|
|
18
18
|
## 发票头类型设置和购买方信息配置
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
<API name="GoodsList 商品列表 API" exports='["default"]' src="./ui/default/GoodsList/index.tsx"></API>
|
|
54
54
|
<API name="Buyer 购买方 API" exports='["default"]' src="./ui/default/Buyer/index.tsx"></API>
|
|
55
55
|
<API name="Seller 销售方 API" exports='["default"]' src="./ui/default/Seller/index.tsx"></API>
|
|
56
|
-
<API name="Sign 落款 API" exports='["default"]' src="./ui/default/Sign/index.tsx"></API>
|
|
56
|
+
<API name="Sign 落款 API" exports='["default"]' src="./ui/default/Sign/index.tsx"></API> -->
|
|
@@ -47,6 +47,8 @@ export interface IGoodsListProps {
|
|
|
47
47
|
|
|
48
48
|
/** 是否可以切换(含税/不含税)状态 */
|
|
49
49
|
isSwitchTax?: boolean;
|
|
50
|
+
|
|
51
|
+
addGoodsCheck?:()=>void;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
export default class GoodsList extends React.Component<IGoodsListProps>{
|
|
@@ -137,7 +139,7 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
|
|
|
137
139
|
<div className="kts-invoice-operate-goods-list-able">
|
|
138
140
|
<div className="kts-invoice-operate-goods-list-able-list">
|
|
139
141
|
{/* 添加行 */}
|
|
140
|
-
<AddRowButton />
|
|
142
|
+
<AddRowButton addGoodsCheck={props.addGoodsCheck}/>
|
|
141
143
|
|
|
142
144
|
{/* 批量菜单 */}
|
|
143
145
|
{/* <BulkMenu /> */}
|
|
@@ -3,7 +3,7 @@ import Invoice from '../../../../..';
|
|
|
3
3
|
import { Button, message } from 'kts-components-antd-x3';
|
|
4
4
|
import InvoiceController, { LineAttributeType } from '../../../../../InvoiceController';
|
|
5
5
|
|
|
6
|
-
export default () => {
|
|
6
|
+
export default (props: any) => {
|
|
7
7
|
const controller = Invoice.useInvoiceController();
|
|
8
8
|
|
|
9
9
|
const model = controller.useMemo(s => s.model, []);
|
|
@@ -26,6 +26,8 @@ export default () => {
|
|
|
26
26
|
const disabled = React.useMemo(() => typeof goodMax === 'number' ? goodsNum >= goodMax : !!searchValue, [goodMax, goodsNum, searchValue])
|
|
27
27
|
|
|
28
28
|
const onClick = React.useCallback(async () => {
|
|
29
|
+
props.addGoodsCheck &&await props.addGoodsCheck();
|
|
30
|
+
console.log('continue')
|
|
29
31
|
await addGood(controller);
|
|
30
32
|
await rollBottom(controller, rootElement);
|
|
31
33
|
}, [controller, rootElement]);
|
|
@@ -43,6 +45,7 @@ export default () => {
|
|
|
43
45
|
|
|
44
46
|
/** 添加一个空货物 */
|
|
45
47
|
async function addGood(controller: InvoiceController) {
|
|
48
|
+
|
|
46
49
|
await controller.saveEditGood();
|
|
47
50
|
await controller.wait();
|
|
48
51
|
await controller.run(async (s) => {
|
|
@@ -40,7 +40,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
40
40
|
|
|
41
41
|
return (
|
|
42
42
|
<div className="kts-invoice-operate-real-estate-info-digtal">
|
|
43
|
-
<div className='real-estate-info-digtal-label'
|
|
43
|
+
<div className='real-estate-info-digtal-label' >特定信息-建筑服务</div>
|
|
44
44
|
<Row gutter={[17, 0]}>
|
|
45
45
|
<Col span={6} >
|
|
46
46
|
<Form.Item label='土地增值税项目编号' >
|
|
@@ -94,7 +94,7 @@ const Main = decorator<IGoodsListProps, FormComponentProps & IGoodsListProps>(Fo
|
|
|
94
94
|
// controller.useForm('freightInfo', form);
|
|
95
95
|
return (
|
|
96
96
|
<div className="kts-invoice-operate-freight">
|
|
97
|
-
<div className='real-estate-info-digtal-label'
|
|
97
|
+
<div className='real-estate-info-digtal-label' >特定信息-货物运输</div>
|
|
98
98
|
<div className="kts-invoice-operate-goods-list-digtal" onClick={(e) => { e.stopPropagation() }} >
|
|
99
99
|
<div className="kts-invoice-operate-freight-list-able">
|
|
100
100
|
{/* 添加行 */}
|
|
@@ -257,15 +257,11 @@ export default (form: WrappedFormUtils) => {
|
|
|
257
257
|
{ pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '数量必须为数字' },
|
|
258
258
|
{
|
|
259
259
|
validator: async (_, value, callback) => {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
callback('请输入数量');
|
|
266
|
-
}else{
|
|
267
|
-
callback();
|
|
268
|
-
}
|
|
260
|
+
await controller.wait();
|
|
261
|
+
const isvalue = !!value || value === 0;
|
|
262
|
+
const isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
263
|
+
if (isvalue || isPrice === isvalue) return;
|
|
264
|
+
callback('请输入数量');
|
|
269
265
|
}
|
|
270
266
|
}
|
|
271
267
|
],
|
|
@@ -420,7 +416,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
420
416
|
</Form.Item>
|
|
421
417
|
);
|
|
422
418
|
} else {
|
|
423
|
-
return <span style={{ padding: '0 10px' }}>{
|
|
419
|
+
return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
424
420
|
}
|
|
425
421
|
},
|
|
426
422
|
},
|
|
@@ -462,7 +458,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
462
458
|
</Form.Item>
|
|
463
459
|
);
|
|
464
460
|
} else {
|
|
465
|
-
return <span style={{ padding: '0 10px' }}>{
|
|
461
|
+
return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
466
462
|
}
|
|
467
463
|
},
|
|
468
464
|
},
|
|
@@ -522,7 +518,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
522
518
|
align: 'right',
|
|
523
519
|
width: 119,
|
|
524
520
|
render: (value: string, record: IGood) => {
|
|
525
|
-
if (editGood?.$index === record.$index && !disableds.includes('taxAmount')
|
|
521
|
+
if (editGood?.$index === record.$index && !disableds.includes('taxAmount')&& model !== 'prefab') {
|
|
526
522
|
return (
|
|
527
523
|
<Form.Item>
|
|
528
524
|
{getFieldDecorator('taxAmount', {
|
|
@@ -536,13 +532,13 @@ export default (form: WrappedFormUtils) => {
|
|
|
536
532
|
const lineAmountIncludeTax = editGood?.lineAmountIncludeTax || 0;
|
|
537
533
|
//不含税金额
|
|
538
534
|
// const lineAmountExcludeTax = lineAmountIncludeTax-value;
|
|
539
|
-
const lineAmountExcludeTax = chain(bignumber(lineAmountIncludeTax
|
|
535
|
+
const lineAmountExcludeTax = chain(bignumber(lineAmountIncludeTax||0)).subtract(bignumber(value||0));
|
|
540
536
|
const taxRate = editGood?.taxRate;
|
|
541
537
|
if (lineAmountExcludeTax && taxRate && lineAmountIncludeTax) {
|
|
542
538
|
// const total = bignumber(lineAmountExcludeTax * taxRate / 100);
|
|
543
|
-
const total = lineAmountExcludeTax.multiply(bignumber(taxRate
|
|
539
|
+
const total = lineAmountExcludeTax.multiply(bignumber(taxRate||0)).divide(bignumber(100));
|
|
544
540
|
// if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
|
|
545
|
-
if (Math.abs(total.subtract(bignumber(value
|
|
541
|
+
if (Math.abs(total.subtract(bignumber(value||0)).done().toNumber()) <= 0.01) {
|
|
546
542
|
callback();
|
|
547
543
|
} else {
|
|
548
544
|
callback('税额填写错误,请重新输入')
|
|
@@ -572,7 +568,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
572
568
|
</Form.Item>
|
|
573
569
|
)
|
|
574
570
|
} else {
|
|
575
|
-
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '***' :
|
|
571
|
+
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '***' : parseFloat(value).toFixed(2)}</span>;
|
|
576
572
|
}
|
|
577
573
|
},
|
|
578
574
|
},
|
|
@@ -45,6 +45,13 @@ export default () => {
|
|
|
45
45
|
|
|
46
46
|
/** 添加一个空货物 */
|
|
47
47
|
async function addGood(controller: InvoiceController) {
|
|
48
|
+
await controller.formList.get('realEstateInfo')?.validateFields(async (err: any, values: any) => {
|
|
49
|
+
|
|
50
|
+
if (err) {
|
|
51
|
+
message.error('请先填写发票行信息,再添加新的行');
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
48
55
|
await controller.saveEditGood();
|
|
49
56
|
await controller.wait();
|
|
50
57
|
await controller.run(async (s) => {
|
|
@@ -64,6 +71,7 @@ async function addGood(controller: InvoiceController) {
|
|
|
64
71
|
return;
|
|
65
72
|
}
|
|
66
73
|
});
|
|
74
|
+
|
|
67
75
|
}
|
|
68
76
|
s.goodsListState.editGood = await controller.addGood({ taxRate: s.goodsListState.defaultRate, lineAttribute: LineAttributeType.正常 });
|
|
69
77
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useEffect } from "react";
|
|
3
3
|
import { decorator } from 'grey-react-box';
|
|
4
4
|
import { Form } from 'kts-components-antd-x3';
|
|
5
5
|
import { FormComponentProps } from 'kts-components-antd-x3/lib/form';
|
|
@@ -36,110 +36,160 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
36
36
|
|
|
37
37
|
const readOnly = React.useMemo(() => model === 'readOnly', [model]);
|
|
38
38
|
|
|
39
|
+
const goodsList = controller.useMemo(s => s.goodsListState.goodsList, []);
|
|
40
|
+
const indexRef = React.useRef<any>([]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const dd = goodsList?.reduce((acc: any, cur: any) => {
|
|
43
|
+
if (cur.lineAttribute !==1) {
|
|
44
|
+
acc.push(cur.$index)
|
|
45
|
+
}
|
|
46
|
+
return acc
|
|
47
|
+
}, [])
|
|
48
|
+
indexRef.current = dd;
|
|
49
|
+
}, [goodsList, indexRef])
|
|
39
50
|
// 注册 form
|
|
51
|
+
|
|
40
52
|
controller.useForm('realEstateInfo', form);
|
|
41
|
-
|
|
53
|
+
const getList = () => {
|
|
54
|
+
const decrease = indexRef.current.length > goodsList.length
|
|
55
|
+
if (decrease) {
|
|
56
|
+
//已删行列表
|
|
57
|
+
const diff = indexRef.current.filter((item: any) => !goodsList.find(i => i.$index === item));
|
|
58
|
+
|
|
59
|
+
const formData: any[] = form.getFieldValue('realEstateDataDto');
|
|
60
|
+
if (Array.isArray(formData) && diff.length > 0) {
|
|
61
|
+
|
|
62
|
+
const newForm = formData?.filter(item => !diff.find((i: any) => i === item.$index));
|
|
63
|
+
|
|
64
|
+
form.setFieldsValue({
|
|
65
|
+
realEstateDataDto: newForm
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
form.setFieldsValue({
|
|
69
|
+
realEstateDataDto: undefined
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
console.log('goodsList',goodsList)
|
|
74
|
+
return goodsList.filter(item=>item.lineAttribute !== 1).map((item, index) => {
|
|
75
|
+
if (item.lineAttribute !== 1) {
|
|
76
|
+
return <Row gutter={[17, 0]} >
|
|
77
|
+
<Col span={6} >
|
|
78
|
+
<Form.Item style={{ display: 'none' }}>
|
|
79
|
+
{getFieldDecorator(`realEstateDataDto[${index}].$index`, {
|
|
80
|
+
initialValue: item.$index,
|
|
81
|
+
})(
|
|
82
|
+
<Input />
|
|
83
|
+
)}
|
|
84
|
+
</Form.Item>
|
|
85
|
+
<Form.Item label='不动产地址'>
|
|
86
|
+
{getFieldDecorator(`realEstateDataDto[${index}].realEstateAddress`, {
|
|
87
|
+
rules: readOnly ? [] : [{ required: true, message: '请选择不动产地址' }]
|
|
88
|
+
})(
|
|
89
|
+
readOnly
|
|
90
|
+
? (<MyArrString />)
|
|
91
|
+
: (<Cascader
|
|
92
|
+
style={{ width: '100%' }}
|
|
93
|
+
options={props.realEstateAddressOptions}
|
|
94
|
+
fieldNames={props.realEstateAddressFieldNames}
|
|
95
|
+
placeholder="请选择省市区县"
|
|
96
|
+
/>)
|
|
97
|
+
)}
|
|
98
|
+
</Form.Item>
|
|
99
|
+
</Col>
|
|
100
|
+
<Col span={6} >
|
|
101
|
+
<Form.Item label='详细地址' >
|
|
102
|
+
{getFieldDecorator(`realEstateDataDto[${index}].realEstateDetailedAddress`, {
|
|
103
|
+
rules: readOnly ? [] : [
|
|
104
|
+
{ required: true, message: '请输入详细地址' },
|
|
105
|
+
{ max: 120, message: '详细地址最多120个字符' },
|
|
106
|
+
{
|
|
107
|
+
validator: async (_, value, callback) => {
|
|
108
|
+
const pattern = /街|路|村|乡|镇|道|巷|号/;
|
|
109
|
+
if (pattern.test(value)) {
|
|
110
|
+
callback()
|
|
111
|
+
} else {
|
|
112
|
+
callback('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词')
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
})(
|
|
118
|
+
readOnly
|
|
119
|
+
? <MyDiv />
|
|
120
|
+
: <Input autoComplete='off' placeholder="请输入详细地址" />
|
|
121
|
+
)}
|
|
122
|
+
</Form.Item>
|
|
123
|
+
</Col>
|
|
124
|
+
<Col span={6} >
|
|
125
|
+
<Form.Item label='租赁期起止' >
|
|
126
|
+
{getFieldDecorator(`realEstateDataDto[${index}].leaseTerm`, {
|
|
127
|
+
rules: readOnly ? [] : [{ required: true, message: '请输入租赁期' }]
|
|
128
|
+
})(
|
|
129
|
+
readOnly
|
|
130
|
+
? <MyArrMoment />
|
|
131
|
+
: <RangePicker style={{ width: '100%' }} />
|
|
132
|
+
)}
|
|
133
|
+
</Form.Item>
|
|
134
|
+
</Col>
|
|
135
|
+
<Col span={6} >
|
|
136
|
+
<Form.Item label='跨地(市)标志' >
|
|
137
|
+
{getFieldDecorator(`realEstateDataDto[${index}].crossCitiesSign`, {
|
|
138
|
+
rules: readOnly ? [] : [
|
|
139
|
+
{ required: true, message: '请选择跨地(市)标志' }
|
|
140
|
+
]
|
|
141
|
+
})(
|
|
142
|
+
readOnly
|
|
143
|
+
? <MyNY />
|
|
144
|
+
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
145
|
+
<Select.Option value='Y'>是</Select.Option>
|
|
146
|
+
<Select.Option value='N'>否</Select.Option>
|
|
147
|
+
</Select>
|
|
148
|
+
)}
|
|
149
|
+
</Form.Item>
|
|
150
|
+
</Col>
|
|
151
|
+
<Col span={6} >
|
|
152
|
+
<Form.Item label='产权证书/不动产权证号' >
|
|
153
|
+
{getFieldDecorator(`realEstateDataDto[${index}].realEstateNumber`, {
|
|
154
|
+
rules: readOnly ? [] : [
|
|
155
|
+
{ required: true, message: '请输入证书编号,若没有证书填写“无”' },
|
|
156
|
+
{ max: 40, message: '证书编号最多40个字符' },
|
|
157
|
+
]
|
|
158
|
+
})(
|
|
159
|
+
readOnly
|
|
160
|
+
? <MyDiv />
|
|
161
|
+
: <Input autoComplete='off' placeholder="请输入证书编号,若没有证书填写“无”" />
|
|
162
|
+
)}
|
|
163
|
+
</Form.Item>
|
|
164
|
+
</Col>
|
|
165
|
+
<Col span={6} >
|
|
166
|
+
<Form.Item label='面积单位' >
|
|
167
|
+
{getFieldDecorator(`realEstateDataDto[${index}].realEstateUnit`, {
|
|
168
|
+
rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
169
|
+
})(
|
|
170
|
+
readOnly
|
|
171
|
+
? <MyDiv />
|
|
172
|
+
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
173
|
+
<Select.Option value="平方千米">平方千米</Select.Option>
|
|
174
|
+
<Select.Option value="平方米">平方米</Select.Option>
|
|
175
|
+
<Select.Option value="公顷">公顷</Select.Option>
|
|
176
|
+
<Select.Option value="亩">亩</Select.Option>
|
|
177
|
+
<Select.Option value="h㎡">h㎡</Select.Option>
|
|
178
|
+
<Select.Option value="k㎡">k㎡</Select.Option>
|
|
179
|
+
<Select.Option value="㎡">㎡</Select.Option>
|
|
180
|
+
</Select>
|
|
181
|
+
)}
|
|
182
|
+
</Form.Item>
|
|
183
|
+
</Col>
|
|
184
|
+
</Row>
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
}
|
|
42
188
|
return (
|
|
43
189
|
<div className="kts-invoice-operate-real-estate-info-digtal">
|
|
44
|
-
<div className='real-estate-info-digtal-label'
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<Form.Item label='不动产地址' >
|
|
48
|
-
{getFieldDecorator('realEstateAddress', {
|
|
49
|
-
rules: readOnly ? [] : [{ required: true, message: '请选择不动产地址' }]
|
|
50
|
-
})(
|
|
51
|
-
readOnly
|
|
52
|
-
? (<MyArrString />)
|
|
53
|
-
: (<Cascader
|
|
54
|
-
style={{ width: '100%' }}
|
|
55
|
-
options={props.realEstateAddressOptions}
|
|
56
|
-
fieldNames={props.realEstateAddressFieldNames}
|
|
57
|
-
placeholder="请选择省市区县"
|
|
58
|
-
/>)
|
|
59
|
-
)}
|
|
60
|
-
</Form.Item>
|
|
61
|
-
</Col>
|
|
62
|
-
<Col span={6} >
|
|
63
|
-
<Form.Item label='详细地址' >
|
|
64
|
-
{getFieldDecorator('realEstateDetailedAddress', {
|
|
65
|
-
rules: readOnly ? [] : [
|
|
66
|
-
{ required: true, message: '请输入详细地址' },
|
|
67
|
-
{ max: 120, message: '详细地址最多120个字符' },
|
|
68
|
-
{
|
|
69
|
-
validator: (_, value) => {
|
|
70
|
-
const pattern = /街|路|村|乡|镇|道|巷|号/;
|
|
71
|
-
return pattern.test(value) ? Promise.resolve() : Promise.reject('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
})(
|
|
76
|
-
readOnly
|
|
77
|
-
? <MyDiv />
|
|
78
|
-
: <Input autoComplete='off' placeholder="请输入详细地址" />
|
|
79
|
-
)}
|
|
80
|
-
</Form.Item>
|
|
81
|
-
</Col>
|
|
82
|
-
<Col span={6} >
|
|
83
|
-
<Form.Item label='租赁期起止' >
|
|
84
|
-
{getFieldDecorator('leaseTerm', {
|
|
85
|
-
rules: readOnly ? [] : [{ required: true, message: '请输入租赁期' }]
|
|
86
|
-
})(
|
|
87
|
-
readOnly
|
|
88
|
-
? <MyArrMoment />
|
|
89
|
-
: <RangePicker style={{ width: '100%' }} />
|
|
90
|
-
)}
|
|
91
|
-
</Form.Item>
|
|
92
|
-
</Col>
|
|
93
|
-
<Col span={6} >
|
|
94
|
-
<Form.Item label='跨地(市)标志' >
|
|
95
|
-
{getFieldDecorator('crossCitiesSign', {
|
|
96
|
-
rules: readOnly ? [] : [
|
|
97
|
-
{ required: true, message: '请选择跨地(市)标志' }
|
|
98
|
-
]
|
|
99
|
-
})(
|
|
100
|
-
readOnly
|
|
101
|
-
? <MyNY />
|
|
102
|
-
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
103
|
-
<Select.Option value='Y'>是</Select.Option>
|
|
104
|
-
<Select.Option value='N'>否</Select.Option>
|
|
105
|
-
</Select>
|
|
106
|
-
)}
|
|
107
|
-
</Form.Item>
|
|
108
|
-
</Col>
|
|
109
|
-
<Col span={6} >
|
|
110
|
-
<Form.Item label='产权证书/不动产权证号' >
|
|
111
|
-
{getFieldDecorator('realEstateNumber', {
|
|
112
|
-
rules: readOnly ? [] : [
|
|
113
|
-
{ required: true, message: '请输入证书编号,若没有证书填写“无”' },
|
|
114
|
-
{ max: 40, message: '证书编号最多40个字符' },
|
|
115
|
-
]
|
|
116
|
-
})(
|
|
117
|
-
readOnly
|
|
118
|
-
? <MyDiv />
|
|
119
|
-
: <Input autoComplete='off' placeholder="请输入证书编号,若没有证书填写“无”" />
|
|
120
|
-
)}
|
|
121
|
-
</Form.Item>
|
|
122
|
-
</Col>
|
|
123
|
-
<Col span={6} >
|
|
124
|
-
<Form.Item label='面积单位' >
|
|
125
|
-
{getFieldDecorator('realEstateUnit', {
|
|
126
|
-
rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
127
|
-
})(
|
|
128
|
-
readOnly
|
|
129
|
-
? <MyDiv />
|
|
130
|
-
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
131
|
-
<Select.Option value="平方千米">平方千米</Select.Option>
|
|
132
|
-
<Select.Option value="平方米">平方米</Select.Option>
|
|
133
|
-
<Select.Option value="公顷">公顷</Select.Option>
|
|
134
|
-
<Select.Option value="亩">亩</Select.Option>
|
|
135
|
-
<Select.Option value="h㎡">h㎡</Select.Option>
|
|
136
|
-
<Select.Option value="k㎡">k㎡</Select.Option>
|
|
137
|
-
<Select.Option value="㎡">㎡</Select.Option>
|
|
138
|
-
</Select>
|
|
139
|
-
)}
|
|
140
|
-
</Form.Item>
|
|
141
|
-
</Col>
|
|
142
|
-
</Row>
|
|
190
|
+
<div className='real-estate-info-digtal-label' >特定信息-不动产经营租赁服务</div>
|
|
191
|
+
{getList()}
|
|
192
|
+
|
|
143
193
|
</div>
|
|
144
194
|
)
|
|
145
195
|
})
|
|
@@ -172,7 +222,7 @@ class MyArrMoment extends React.Component<{ value?: moment.Moment[], style?: Rea
|
|
|
172
222
|
<div style={this.props.style}>
|
|
173
223
|
<span>{moment.isMoment(value[0]) && value[0].format('YYYY-MM-DD')}</span>
|
|
174
224
|
<span style={{ color: '#9F603D', fontWeight: 600 }} > - </span>
|
|
175
|
-
<span>{moment.isMoment(value[1]) && value[
|
|
225
|
+
<span>{moment.isMoment(value[1]) && value[1].format('YYYY-MM-DD')}</span>
|
|
176
226
|
</div>
|
|
177
227
|
)
|
|
178
228
|
}
|