kts-component-invoice-operate 3.2.178 → 3.2.180
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/index.d.ts +0 -5
- package/dist/Invoice/InvoiceController/index.d.ts +0 -10
- package/dist/Invoice/index.d.ts +0 -4
- package/dist/index.esm.js +47 -1958
- package/dist/index.js +47 -1958
- package/package.json +3 -3
- package/src/Invoice/Invoice-digtal/index.md +1 -7
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +0 -6
- package/src/Invoice/InvoiceController/index.ts +1 -20
- package/src/Invoice/index.tsx +1 -8
- package/src/Invoice/tools/useToGenerateId/index.ts +0 -2
- package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +11 -10
- package/src/Invoice/ui/digtal/GoodsList/index.tsx +1 -0
- package/src/Invoice/ui/digtal/GoodsList/ui/TableRow/index.tsx +1 -0
- package/src/TaxClassificationCodeModal/index.less +8 -0
- package/src/TaxClassificationCodeModal/index.tsx +14 -6
- package/dist/Invoice/Invoice-digtal/_test/architecture/index.d.ts +0 -4
- package/dist/Invoice/Invoice-digtal/_test/freight/index.d.ts +0 -4
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.d.ts +0 -6
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.d.ts +0 -23
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.d.ts +0 -21
- package/dist/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.d.ts +0 -31
- package/dist/Invoice/InvoiceController/fns/addFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/delFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/saveEditFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/setEditFreight.d.ts +0 -6
- package/dist/Invoice/InvoiceController/fns/setFreight.d.ts +0 -6
- package/dist/Invoice/ui/digtal/Architecture/index.d.ts +0 -15
- package/dist/Invoice/ui/digtal/FreightList/hook/useColumns/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/hook/useOnRow/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.d.ts +0 -8
- package/dist/Invoice/ui/digtal/FreightList/index.d.ts +0 -15
- package/dist/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.d.ts +0 -6
- package/dist/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.d.ts +0 -6
- package/dist/Invoice/ui/digtal/FreightList/ui/TableRow/index.d.ts +0 -3
- package/dist/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.d.ts +0 -4
- package/src/Invoice/Invoice-digtal/_test/architecture/index.tsx +0 -22
- package/src/Invoice/Invoice-digtal/_test/freight/index.tsx +0 -14575
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IColumnsReplenish/index.ts +0 -10
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.ts +0 -33
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.ts +0 -81
- package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/index.ts +0 -40
- package/src/Invoice/InvoiceController/fns/addFreight.ts +0 -11
- package/src/Invoice/InvoiceController/fns/delFreight.ts +0 -38
- package/src/Invoice/InvoiceController/fns/saveEditFreight.ts +0 -24
- package/src/Invoice/InvoiceController/fns/setEditFreight.ts +0 -16
- package/src/Invoice/InvoiceController/fns/setFreight.ts +0 -11
- package/src/Invoice/ui/digtal/Architecture/index.less +0 -15
- package/src/Invoice/ui/digtal/Architecture/index.tsx +0 -166
- package/src/Invoice/ui/digtal/FreightList/hook/useColumns/dist/index.js +0 -616
- package/src/Invoice/ui/digtal/FreightList/hook/useColumns/index.tsx +0 -246
- package/src/Invoice/ui/digtal/FreightList/hook/useColumns/ui/TitleText/index.tsx +0 -20
- package/src/Invoice/ui/digtal/FreightList/hook/useOnRow/index.tsx +0 -37
- package/src/Invoice/ui/digtal/FreightList/hook/useRowSelection/index.tsx +0 -120
- package/src/Invoice/ui/digtal/FreightList/hook/useWindowClick/index.tsx +0 -23
- package/src/Invoice/ui/digtal/FreightList/index.less +0 -74
- package/src/Invoice/ui/digtal/FreightList/index.tsx +0 -129
- package/src/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.tsx +0 -65
- package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useDelRowButton/index.tsx +0 -50
- package/src/Invoice/ui/digtal/FreightList/ui/BulkMenu/hooks/useEmptyRefill/index.tsx +0 -37
- package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.less +0 -29
- package/src/Invoice/ui/digtal/FreightList/ui/TableRow/index.tsx +0 -21
- package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.less +0 -39
- package/src/Invoice/ui/digtal/FreightList/ui/TableVirtual/index.tsx +0 -109
package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/IGood/index.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export default interface IGood {
|
|
2
|
-
/** 数据索引 */
|
|
3
|
-
$index: string;
|
|
4
|
-
/** 序号 */
|
|
5
|
-
sortNumber?: number;
|
|
6
|
-
/** 运输工具种类列表 */
|
|
7
|
-
vehicleList?: any[] | null;
|
|
8
|
-
|
|
9
|
-
/** 运输工具种类 */
|
|
10
|
-
vehicle?: string;
|
|
11
|
-
|
|
12
|
-
type:string;
|
|
13
|
-
|
|
14
|
-
licensePlate:string;
|
|
15
|
-
|
|
16
|
-
itemName:string;
|
|
17
|
-
|
|
18
|
-
/** 运输工具牌号 */
|
|
19
|
-
vehicleNo?: string;
|
|
20
|
-
|
|
21
|
-
/** 起运地 */
|
|
22
|
-
origin?: string[];
|
|
23
|
-
|
|
24
|
-
/** 到达地 */
|
|
25
|
-
destination?: string[];
|
|
26
|
-
|
|
27
|
-
/** 运输货物名称 */
|
|
28
|
-
goodName?: string;
|
|
29
|
-
|
|
30
|
-
/** 地区 */
|
|
31
|
-
area?: string[];
|
|
32
|
-
|
|
33
|
-
}
|
package/src/Invoice/InvoiceController/InvoiceControllerState/FreightListState/ImportGoods/index.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { ColumnProps } from 'kts-components-antd-x3/lib/Table/interface';
|
|
2
|
-
import { PaginationConfig } from 'kts-components-antd-x3/lib/Table';
|
|
3
|
-
import { message } from 'kts-components-antd-x3';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
export interface IGetGoodsListOption {
|
|
7
|
-
/** 分页数据 */
|
|
8
|
-
pagination: PaginationConfig;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default class ImportGoods<ColumnType = any> {
|
|
12
|
-
/** 表头 */
|
|
13
|
-
columns: ColumnProps<ColumnType>[] = [
|
|
14
|
-
{
|
|
15
|
-
title: '商品分类',
|
|
16
|
-
dataIndex: 'itemType',
|
|
17
|
-
key: 'itemType',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: '商品编码',
|
|
21
|
-
dataIndex: 'itemNo',
|
|
22
|
-
key: 'itemNo',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: '商品名称',
|
|
26
|
-
dataIndex: 'itemName',
|
|
27
|
-
key: 'itemName',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
title: '规格型号',
|
|
31
|
-
dataIndex: 'itemModelName',
|
|
32
|
-
key: 'itemModelName',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
title: '计量单位',
|
|
36
|
-
dataIndex: 'unit',
|
|
37
|
-
key: 'unit',
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: '税率',
|
|
41
|
-
dataIndex: 'taxRate',
|
|
42
|
-
key: 'taxRate',
|
|
43
|
-
render: text => text || text === 0 ? `${text}%` : ''
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: '单价(含税)',
|
|
47
|
-
dataIndex: 'priceIncludeTax',
|
|
48
|
-
key: 'priceIncludeTax',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
title: '税收分类编码',
|
|
52
|
-
dataIndex: 'taxClassificationCode',
|
|
53
|
-
key: 'taxClassificationCode',
|
|
54
|
-
},
|
|
55
|
-
];
|
|
56
|
-
|
|
57
|
-
/** 货物列表 */
|
|
58
|
-
dataSource: ColumnType[] = [];
|
|
59
|
-
|
|
60
|
-
/** 分页数据 */
|
|
61
|
-
pagination: PaginationConfig = {};
|
|
62
|
-
|
|
63
|
-
/** 是否显示导入 */
|
|
64
|
-
isVisibleDrawer = false;
|
|
65
|
-
|
|
66
|
-
/** 顶部扩展 */
|
|
67
|
-
topExpand?: React.ReactNode;
|
|
68
|
-
|
|
69
|
-
/** 导入时校验函数 */
|
|
70
|
-
verifyFn: (record: any) => Promise<boolean> = async record => {
|
|
71
|
-
if (!record.taxClassificationCode) {
|
|
72
|
-
message.error({ content: '请维护该商品的税收分类编码!', key: '请维护该商品的税收分类编码!' })
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
if (record.productStatus === 0) {
|
|
76
|
-
message.error({ content: '当前货物为禁用', key: '当前货物为禁用' })
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
return true;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import IGood from './IGood';
|
|
2
|
-
import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
|
|
3
|
-
|
|
4
|
-
export default class FreightListState {
|
|
5
|
-
|
|
6
|
-
/** 产品最大数 */
|
|
7
|
-
goodMax?: number;
|
|
8
|
-
|
|
9
|
-
/** 正在编辑的货物 */
|
|
10
|
-
editGood?: IGood;
|
|
11
|
-
|
|
12
|
-
/** 是否可以添加行 */
|
|
13
|
-
isAddRow = true;
|
|
14
|
-
|
|
15
|
-
/** 是否可以删除行 */
|
|
16
|
-
isRemRow = true;
|
|
17
|
-
|
|
18
|
-
/** 货物字典 */
|
|
19
|
-
goodsMap = new Map<string, IGood>();
|
|
20
|
-
|
|
21
|
-
/** 被编辑行的form对象 */
|
|
22
|
-
form?: WrappedFormUtils;
|
|
23
|
-
|
|
24
|
-
/** 运输工具种类列表 */
|
|
25
|
-
vehicleTypeList: any[] = [];
|
|
26
|
-
|
|
27
|
-
/** 货物列表 */
|
|
28
|
-
goodsList: IGood[] = [];
|
|
29
|
-
|
|
30
|
-
/** 列表选中的货物索引列表 */
|
|
31
|
-
selectedGoodIndex: string[] = [];
|
|
32
|
-
|
|
33
|
-
/** 地区 */
|
|
34
|
-
area: any[] = [];
|
|
35
|
-
|
|
36
|
-
addressFieldNames: IFieldNames = { label: 'label', value: 'value', children: 'children' }
|
|
37
|
-
}
|
|
38
|
-
interface IFieldNames {
|
|
39
|
-
label: string; value: string; children: string
|
|
40
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { InvoiceControllerState } from '..';
|
|
2
|
-
import idGenerator from '../../tools/idGenerator';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 添加的编辑货物运输
|
|
6
|
-
*/
|
|
7
|
-
export default async (state: InvoiceControllerState, options?: any) => {
|
|
8
|
-
options.$index = idGenerator();
|
|
9
|
-
state.freightListState.goodsList = [...state.freightListState.goodsList, options];
|
|
10
|
-
return options;
|
|
11
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { InvoiceControllerState } from '..';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 删除一个货物运输
|
|
5
|
-
*/
|
|
6
|
-
export default async (state: InvoiceControllerState, $index?: string) => {
|
|
7
|
-
if (!$index) return;
|
|
8
|
-
// 查下要删除的货物
|
|
9
|
-
const goods = state.freightListState.goodsList.filter((e) => e.$index === $index)[0];
|
|
10
|
-
if (!goods) return;
|
|
11
|
-
|
|
12
|
-
// 如果正在编辑 就取消编辑
|
|
13
|
-
if (state.freightListState.editGood && state.freightListState.editGood.$index === $index) {
|
|
14
|
-
state.freightListState.editGood = undefined;
|
|
15
|
-
}
|
|
16
|
-
const goodsList = state.freightListState.goodsList;
|
|
17
|
-
const goodsMap = state.freightListState.goodsMap;
|
|
18
|
-
|
|
19
|
-
goodsMap.delete($index);
|
|
20
|
-
|
|
21
|
-
for (let i = 0; i < goodsList.length; i++) {
|
|
22
|
-
|
|
23
|
-
if (goodsList[i].$index === $index) {
|
|
24
|
-
// const good = goodsList[i];
|
|
25
|
-
|
|
26
|
-
// if (good.lineAttribute === LineAttributeType.折扣行 && goodsList[i - 1] && goodsList[i - 1].lineAttribute === LineAttributeType.被折扣行) {
|
|
27
|
-
// goodsList[i - 1].lineAttribute = LineAttributeType.正常;
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
goodsList.splice(i, 1);
|
|
31
|
-
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
state.freightListState.goodsList = [...goodsList];
|
|
37
|
-
state.freightListState.goodsMap = new Map(goodsMap);
|
|
38
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { InvoiceControllerState } from '..';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 保存正在编辑的货物
|
|
5
|
-
*/
|
|
6
|
-
export default async (state: InvoiceControllerState) => {
|
|
7
|
-
|
|
8
|
-
const editGood = state.freightListState.editGood;
|
|
9
|
-
const form = state.freightListState.form;
|
|
10
|
-
|
|
11
|
-
if (!editGood || !form ) return;
|
|
12
|
-
if ((await validateFields(form)).err) return;
|
|
13
|
-
|
|
14
|
-
state.freightListState.goodsList = state.freightListState.goodsList.map((e) =>
|
|
15
|
-
e.$index === editGood.$index ? { ...e, ...editGood } : e,
|
|
16
|
-
);
|
|
17
|
-
state.freightListState.editGood = undefined;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const validateFields = (form: any) => new Promise((resolve: (v: { err: any; values: any }) => void) => {
|
|
21
|
-
form.validateFields(async (err: any, values: any) => {
|
|
22
|
-
resolve({ err, values });
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InvoiceControllerState, IGood2 } from '..';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 设置当前的编辑货物运输
|
|
5
|
-
*/
|
|
6
|
-
export default async (state: InvoiceControllerState, newEditGood?: any) => {
|
|
7
|
-
if (newEditGood) {
|
|
8
|
-
const editGood = state.freightListState.editGood as IGood2;
|
|
9
|
-
state.freightListState = {
|
|
10
|
-
...state.freightListState,
|
|
11
|
-
editGood: { ...editGood, ...newEditGood },
|
|
12
|
-
};
|
|
13
|
-
} else {
|
|
14
|
-
state.freightListState = { ...state.freightListState, editGood: undefined };
|
|
15
|
-
}
|
|
16
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { InvoiceControllerState, IGood } from '..';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 设置单个货物属性
|
|
6
|
-
*/
|
|
7
|
-
export default async (state: InvoiceControllerState, options?: IGood) => {
|
|
8
|
-
if (!options || !options.$index) return;
|
|
9
|
-
const goodsList = state.freightListState.goodsList.map(e => e.$index === options.$index ? { ...e, ...options } : e);
|
|
10
|
-
state.freightListState = { ...state.freightListState, goodsList };
|
|
11
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.kts-invoice-operate-real-estate-info-digtal {
|
|
2
|
-
padding : 20px;
|
|
3
|
-
border-bottom: 2px solid #9F613E;
|
|
4
|
-
border-left : 2px solid #9F613E;
|
|
5
|
-
border-right : 2px solid #9F613E;
|
|
6
|
-
|
|
7
|
-
.real-estate-info-digtal-label {
|
|
8
|
-
color : #9F613E;
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.ktsAnt3x-row.ktsAnt3x-form-item {
|
|
13
|
-
margin-bottom: 0;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { decorator } from 'grey-react-box';
|
|
4
|
-
import { Form } from 'kts-components-antd-x3';
|
|
5
|
-
import { FormComponentProps } from 'kts-components-antd-x3/lib/form';
|
|
6
|
-
import Invoice from '../../..';
|
|
7
|
-
import './index.less';
|
|
8
|
-
import { Cascader, Col, Input, Row, Select } from "kts-components-antd-x4";
|
|
9
|
-
import moment from "moment";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export interface RealEstateInfoProps {
|
|
13
|
-
/**
|
|
14
|
-
* 建筑服务地址数据
|
|
15
|
-
*/
|
|
16
|
-
addressOptions?: any[];
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 建筑服务地址数据字段名
|
|
20
|
-
*/
|
|
21
|
-
fieldNames?: any;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** 特殊信息-建筑服务 */
|
|
25
|
-
export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInfoProps>(Form.create())(props => {
|
|
26
|
-
|
|
27
|
-
/** 控制器 */
|
|
28
|
-
const controller = Invoice.useInvoiceController();
|
|
29
|
-
|
|
30
|
-
const { form } = props;
|
|
31
|
-
|
|
32
|
-
const { getFieldDecorator } = form;
|
|
33
|
-
|
|
34
|
-
const model = controller.useMemo(s => s.model, []);
|
|
35
|
-
|
|
36
|
-
const readOnly = React.useMemo(() => model === 'readOnly', [model]);
|
|
37
|
-
|
|
38
|
-
// 注册 form
|
|
39
|
-
controller.useForm('realEstateInfo', form);
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<div className="kts-invoice-operate-real-estate-info-digtal">
|
|
43
|
-
<div className='real-estate-info-digtal-label' >特殊信息-建筑服务</div>
|
|
44
|
-
<Row gutter={[17, 0]}>
|
|
45
|
-
<Col span={6} >
|
|
46
|
-
<Form.Item label='土地增值税项目编号' >
|
|
47
|
-
{getFieldDecorator('landNumber', {
|
|
48
|
-
})(
|
|
49
|
-
readOnly
|
|
50
|
-
? <MyDiv />
|
|
51
|
-
: <Input autoComplete='off' placeholder="请输入" />
|
|
52
|
-
)}
|
|
53
|
-
</Form.Item>
|
|
54
|
-
</Col>
|
|
55
|
-
<Col span={6} >
|
|
56
|
-
<Form.Item label='跨地(市)标志' >
|
|
57
|
-
{getFieldDecorator('crossCitiesSign', {
|
|
58
|
-
rules: readOnly ? [] : [
|
|
59
|
-
{ required: true, message: '请选择跨地(市)标志' }
|
|
60
|
-
]
|
|
61
|
-
})(
|
|
62
|
-
readOnly
|
|
63
|
-
? <MyNY />
|
|
64
|
-
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
65
|
-
<Select.Option value='Y'>是</Select.Option>
|
|
66
|
-
<Select.Option value='N'>否</Select.Option>
|
|
67
|
-
</Select>
|
|
68
|
-
)}
|
|
69
|
-
</Form.Item>
|
|
70
|
-
</Col>
|
|
71
|
-
|
|
72
|
-
<Col span={6} >
|
|
73
|
-
<Form.Item label='建筑服务发生地' >
|
|
74
|
-
{getFieldDecorator('constructAddress', {
|
|
75
|
-
rules: readOnly ? [] : [{ required: true, message: '请选择省市区县' }]
|
|
76
|
-
})(
|
|
77
|
-
readOnly
|
|
78
|
-
? (<MyArrString />)
|
|
79
|
-
: (<Cascader
|
|
80
|
-
style={{ width: '100%' }}
|
|
81
|
-
options={props.addressOptions}
|
|
82
|
-
fieldNames={props.fieldNames}
|
|
83
|
-
placeholder="请选择省市区县"
|
|
84
|
-
/>)
|
|
85
|
-
)}
|
|
86
|
-
</Form.Item>
|
|
87
|
-
</Col>
|
|
88
|
-
<Col span={6} >
|
|
89
|
-
<Form.Item label='详细地址' >
|
|
90
|
-
{getFieldDecorator('constructDetailAddress', {
|
|
91
|
-
rules: readOnly ? [] : [
|
|
92
|
-
{ max: 200, message: '详细地址最多200个字符' },
|
|
93
|
-
]
|
|
94
|
-
})(
|
|
95
|
-
readOnly
|
|
96
|
-
? <MyDiv />
|
|
97
|
-
: <Input autoComplete='off' placeholder="请输入详细地址" />
|
|
98
|
-
)}
|
|
99
|
-
</Form.Item>
|
|
100
|
-
</Col>
|
|
101
|
-
<Col span={6} >
|
|
102
|
-
<Form.Item label='建筑项目名称' >
|
|
103
|
-
{getFieldDecorator('constructName', { rules: readOnly ? [] : [
|
|
104
|
-
{ required: true, message: '请输入建筑项目名称' },
|
|
105
|
-
{ max: 200, message: '建筑项目名称最多200个字符' },
|
|
106
|
-
|
|
107
|
-
]
|
|
108
|
-
})(
|
|
109
|
-
readOnly
|
|
110
|
-
? <MyDiv />
|
|
111
|
-
: <Input autoComplete='off' placeholder="请输入" />
|
|
112
|
-
)}
|
|
113
|
-
</Form.Item>
|
|
114
|
-
</Col>
|
|
115
|
-
|
|
116
|
-
</Row>
|
|
117
|
-
</div>
|
|
118
|
-
)
|
|
119
|
-
})
|
|
120
|
-
|
|
121
|
-
class MyDiv extends React.Component<{ value?: string, style?: React.CSSProperties }> {
|
|
122
|
-
render(): React.ReactNode {
|
|
123
|
-
return (
|
|
124
|
-
<div style={this.props.style}>{this.props.value}</div>
|
|
125
|
-
)
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
class MyArrString extends React.Component<{ value?: string[], style?: React.CSSProperties }> {
|
|
130
|
-
render(): React.ReactNode {
|
|
131
|
-
return (
|
|
132
|
-
<div style={this.props.style}>
|
|
133
|
-
{
|
|
134
|
-
this.props.value?.filter(e => !!e)
|
|
135
|
-
.join(',')
|
|
136
|
-
}
|
|
137
|
-
</div>
|
|
138
|
-
)
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
class MyArrMoment extends React.Component<{ value?: moment.Moment[], style?: React.CSSProperties }> {
|
|
143
|
-
render(): React.ReactNode {
|
|
144
|
-
const { value = [] } = this.props
|
|
145
|
-
return (
|
|
146
|
-
<div style={this.props.style}>
|
|
147
|
-
<span>{moment.isMoment(value[0]) && value[0].format('YYYY-MM-DD')}</span>
|
|
148
|
-
<span style={{ color: '#9F603D', fontWeight: 600 }} > - </span>
|
|
149
|
-
<span>{moment.isMoment(value[1]) && value[0].format('YYYY-MM-DD')}</span>
|
|
150
|
-
</div>
|
|
151
|
-
)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
class MyNY extends React.Component<{ value?: 'Y' | 'N', style?: React.CSSProperties }> {
|
|
156
|
-
render(): React.ReactNode {
|
|
157
|
-
return (
|
|
158
|
-
<div style={this.props.style}>
|
|
159
|
-
{
|
|
160
|
-
this.props.value === 'Y' ? '是' : '否'
|
|
161
|
-
}
|
|
162
|
-
</div>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|