kts-component-invoice-operate 3.2.217 → 3.2.218-chinaship
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 +0 -4
- package/dist/index.esm.js +120 -204
- package/dist/index.js +119 -203
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +2 -8
- package/src/Invoice/Invoice-digtal/index.md +8 -10
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +7 -7
- package/src/Invoice/ui/digtal/RealEstateInfo/index.less +0 -7
- package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +101 -151
package/README.md
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -8,7 +8,7 @@ import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete
|
|
|
8
8
|
import classnames from 'classnames';
|
|
9
9
|
import { Table } from 'kts-components-antd-x4-v4';
|
|
10
10
|
import { render } from 'react-dom';
|
|
11
|
-
import { DatePicker, Row as Row$1, Col as Col$1, Input as Input$2,
|
|
11
|
+
import { DatePicker, Row as Row$1, Col as Col$1, Cascader, Input as Input$2, Select as Select$2 } from 'kts-components-antd-x4';
|
|
12
12
|
import { Input as Input$3, NumberPicker } from '@formily/antd-components';
|
|
13
13
|
import { createAsyncFormActions, FormEffectHooks, SchemaForm, FormButtonGroup, SchemaMarkupField } from '@formily/antd';
|
|
14
14
|
|
|
@@ -22156,7 +22156,7 @@ var useColumns$1 = (function (form) {
|
|
|
22156
22156
|
style: {
|
|
22157
22157
|
padding: '0 10px'
|
|
22158
22158
|
}
|
|
22159
|
-
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22159
|
+
}, value && formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22160
22160
|
}
|
|
22161
22161
|
}
|
|
22162
22162
|
}, {
|
|
@@ -22219,7 +22219,7 @@ var useColumns$1 = (function (form) {
|
|
|
22219
22219
|
style: {
|
|
22220
22220
|
padding: '0 10px'
|
|
22221
22221
|
}
|
|
22222
|
-
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22222
|
+
}, value && formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22223
22223
|
}
|
|
22224
22224
|
}
|
|
22225
22225
|
}, {
|
|
@@ -22331,7 +22331,7 @@ var useColumns$1 = (function (form) {
|
|
|
22331
22331
|
style: {
|
|
22332
22332
|
padding: '0 10px'
|
|
22333
22333
|
}
|
|
22334
|
-
}, isDutyFree$1(record) ? '***' : parseFloat(value).toFixed(2));
|
|
22334
|
+
}, isDutyFree$1(record) ? '***' : value && parseFloat(value).toFixed(2));
|
|
22335
22335
|
}
|
|
22336
22336
|
}
|
|
22337
22337
|
}] // 含税不含税
|
|
@@ -24309,7 +24309,7 @@ var Main$3 = decorator(Form.create())(function (props) {
|
|
|
24309
24309
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Statistics$1, null)));
|
|
24310
24310
|
});
|
|
24311
24311
|
|
|
24312
|
-
var css_248z$r = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n
|
|
24312
|
+
var css_248z$r = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n";
|
|
24313
24313
|
styleInject(css_248z$r);
|
|
24314
24314
|
|
|
24315
24315
|
var RangePicker = DatePicker.RangePicker;
|
|
@@ -24325,210 +24325,126 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24325
24325
|
}, []);
|
|
24326
24326
|
var readOnly = React.useMemo(function () {
|
|
24327
24327
|
return model === 'readOnly';
|
|
24328
|
-
}, [model]);
|
|
24329
|
-
var goodsList = controller.useMemo(function (s) {
|
|
24330
|
-
return s.goodsListState.goodsList;
|
|
24331
|
-
}, []);
|
|
24332
|
-
var indexRef = React.useRef([]);
|
|
24333
|
-
useEffect(function () {
|
|
24334
|
-
var dd = goodsList === null || goodsList === void 0 ? void 0 : goodsList.reduce(function (acc, cur) {
|
|
24335
|
-
if (cur.lineAttribute !== 1) {
|
|
24336
|
-
acc.push(cur.$index);
|
|
24337
|
-
}
|
|
24338
|
-
|
|
24339
|
-
return acc;
|
|
24340
|
-
}, []);
|
|
24341
|
-
indexRef.current = dd;
|
|
24342
|
-
}, [goodsList, indexRef]); // 注册 form
|
|
24328
|
+
}, [model]); // 注册 form
|
|
24343
24329
|
|
|
24344
24330
|
controller.useForm('realEstateInfo', form);
|
|
24345
|
-
|
|
24346
|
-
var getList = function getList() {
|
|
24347
|
-
var decrease = indexRef.current.length > goodsList.length;
|
|
24348
|
-
|
|
24349
|
-
if (decrease) {
|
|
24350
|
-
//已删行列表
|
|
24351
|
-
var diff = indexRef.current.filter(function (item) {
|
|
24352
|
-
return !goodsList.find(function (i) {
|
|
24353
|
-
return i.$index === item;
|
|
24354
|
-
});
|
|
24355
|
-
});
|
|
24356
|
-
var formData = form.getFieldValue('realEstateDataDto');
|
|
24357
|
-
|
|
24358
|
-
if (Array.isArray(formData) && diff.length > 0) {
|
|
24359
|
-
var newForm = formData === null || formData === void 0 ? void 0 : formData.filter(function (item) {
|
|
24360
|
-
return !diff.find(function (i) {
|
|
24361
|
-
return i === item.$index;
|
|
24362
|
-
});
|
|
24363
|
-
});
|
|
24364
|
-
form.setFieldsValue({
|
|
24365
|
-
realEstateDataDto: newForm
|
|
24366
|
-
});
|
|
24367
|
-
} else {
|
|
24368
|
-
form.setFieldsValue({
|
|
24369
|
-
realEstateDataDto: undefined
|
|
24370
|
-
});
|
|
24371
|
-
}
|
|
24372
|
-
}
|
|
24373
|
-
|
|
24374
|
-
console.log('goodsList', goodsList);
|
|
24375
|
-
return goodsList.filter(function (item) {
|
|
24376
|
-
return item.lineAttribute !== 1;
|
|
24377
|
-
}).map(function (item, index) {
|
|
24378
|
-
if (item.lineAttribute !== 1) {
|
|
24379
|
-
return /*#__PURE__*/React.createElement(Row$1, {
|
|
24380
|
-
gutter: [17, 0]
|
|
24381
|
-
}, /*#__PURE__*/React.createElement(Col$1, {
|
|
24382
|
-
span: 6
|
|
24383
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24384
|
-
style: {
|
|
24385
|
-
display: 'none'
|
|
24386
|
-
}
|
|
24387
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].$index"), {
|
|
24388
|
-
initialValue: item.$index
|
|
24389
|
-
})( /*#__PURE__*/React.createElement(Input$2, null))), /*#__PURE__*/React.createElement(Form.Item, {
|
|
24390
|
-
label: "\u4E0D\u52A8\u4EA7\u5730\u5740"
|
|
24391
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateAddress"), {
|
|
24392
|
-
rules: readOnly ? [] : [{
|
|
24393
|
-
required: true,
|
|
24394
|
-
message: '请选择不动产地址'
|
|
24395
|
-
}]
|
|
24396
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyArrString, null) : /*#__PURE__*/React.createElement(Cascader, {
|
|
24397
|
-
style: {
|
|
24398
|
-
width: '100%'
|
|
24399
|
-
},
|
|
24400
|
-
options: props.realEstateAddressOptions,
|
|
24401
|
-
fieldNames: props.realEstateAddressFieldNames,
|
|
24402
|
-
placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
|
|
24403
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24404
|
-
span: 6
|
|
24405
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24406
|
-
label: "\u8BE6\u7EC6\u5730\u5740"
|
|
24407
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateDetailedAddress"), {
|
|
24408
|
-
rules: readOnly ? [] : [{
|
|
24409
|
-
required: true,
|
|
24410
|
-
message: '请输入详细地址'
|
|
24411
|
-
}, {
|
|
24412
|
-
max: 120,
|
|
24413
|
-
message: '详细地址最多120个字符'
|
|
24414
|
-
}, {
|
|
24415
|
-
validator: function () {
|
|
24416
|
-
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value, callback) {
|
|
24417
|
-
var pattern;
|
|
24418
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
24419
|
-
while (1) {
|
|
24420
|
-
switch (_context.prev = _context.next) {
|
|
24421
|
-
case 0:
|
|
24422
|
-
pattern = /街|路|村|乡|镇|道|巷|号/;
|
|
24423
|
-
|
|
24424
|
-
if (pattern.test(value)) {
|
|
24425
|
-
callback();
|
|
24426
|
-
} else {
|
|
24427
|
-
callback('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
|
|
24428
|
-
}
|
|
24429
|
-
|
|
24430
|
-
case 2:
|
|
24431
|
-
case "end":
|
|
24432
|
-
return _context.stop();
|
|
24433
|
-
}
|
|
24434
|
-
}
|
|
24435
|
-
}, _callee);
|
|
24436
|
-
}));
|
|
24437
|
-
|
|
24438
|
-
function validator(_x, _x2, _x3) {
|
|
24439
|
-
return _validator.apply(this, arguments);
|
|
24440
|
-
}
|
|
24441
|
-
|
|
24442
|
-
return validator;
|
|
24443
|
-
}()
|
|
24444
|
-
}]
|
|
24445
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24446
|
-
autoComplete: 'off',
|
|
24447
|
-
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24448
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24449
|
-
span: 6
|
|
24450
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24451
|
-
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
24452
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].leaseTerm"), {
|
|
24453
|
-
rules: readOnly ? [] : [{
|
|
24454
|
-
required: true,
|
|
24455
|
-
message: '请输入租赁期'
|
|
24456
|
-
}]
|
|
24457
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyArrMoment, null) : /*#__PURE__*/React.createElement(RangePicker, {
|
|
24458
|
-
style: {
|
|
24459
|
-
width: '100%'
|
|
24460
|
-
}
|
|
24461
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24462
|
-
span: 6
|
|
24463
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24464
|
-
label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
|
|
24465
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].crossCitiesSign"), {
|
|
24466
|
-
rules: readOnly ? [] : [{
|
|
24467
|
-
required: true,
|
|
24468
|
-
message: '请选择跨地(市)标志'
|
|
24469
|
-
}]
|
|
24470
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyNY, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24471
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
24472
|
-
style: {
|
|
24473
|
-
width: '100%'
|
|
24474
|
-
}
|
|
24475
|
-
}, /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24476
|
-
value: 'Y'
|
|
24477
|
-
}, "\u662F"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24478
|
-
value: 'N'
|
|
24479
|
-
}, "\u5426"))))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24480
|
-
span: 6
|
|
24481
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24482
|
-
label: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7"
|
|
24483
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateNumber"), {
|
|
24484
|
-
rules: readOnly ? [] : [{
|
|
24485
|
-
required: true,
|
|
24486
|
-
message: '请输入证书编号,若没有证书填写“无”'
|
|
24487
|
-
}, {
|
|
24488
|
-
max: 40,
|
|
24489
|
-
message: '证书编号最多40个字符'
|
|
24490
|
-
}]
|
|
24491
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24492
|
-
autoComplete: 'off',
|
|
24493
|
-
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
|
|
24494
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24495
|
-
span: 6
|
|
24496
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24497
|
-
label: "\u9762\u79EF\u5355\u4F4D"
|
|
24498
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateUnit"), {
|
|
24499
|
-
rules: readOnly ? [] : [{
|
|
24500
|
-
required: true,
|
|
24501
|
-
message: '请选择面积单位'
|
|
24502
|
-
}]
|
|
24503
|
-
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24504
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
24505
|
-
style: {
|
|
24506
|
-
width: '100%'
|
|
24507
|
-
}
|
|
24508
|
-
}, /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24509
|
-
value: "\u5E73\u65B9\u5343\u7C73"
|
|
24510
|
-
}, "\u5E73\u65B9\u5343\u7C73"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24511
|
-
value: "\u5E73\u65B9\u7C73"
|
|
24512
|
-
}, "\u5E73\u65B9\u7C73"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24513
|
-
value: "\u516C\u9877"
|
|
24514
|
-
}, "\u516C\u9877"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24515
|
-
value: "\u4EA9"
|
|
24516
|
-
}, "\u4EA9"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24517
|
-
value: "h\u33A1"
|
|
24518
|
-
}, "h\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24519
|
-
value: "k\u33A1"
|
|
24520
|
-
}, "k\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24521
|
-
value: "\u33A1"
|
|
24522
|
-
}, "\u33A1"))))));
|
|
24523
|
-
}
|
|
24524
|
-
});
|
|
24525
|
-
};
|
|
24526
|
-
|
|
24527
24331
|
return /*#__PURE__*/React.createElement("div", {
|
|
24528
24332
|
className: "kts-invoice-operate-real-estate-info-digtal"
|
|
24529
24333
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24530
24334
|
className: 'real-estate-info-digtal-label'
|
|
24531
|
-
}, "\u7279\u6B8A\u4FE1\u606F-\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1"),
|
|
24335
|
+
}, "\u7279\u6B8A\u4FE1\u606F-\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1"), /*#__PURE__*/React.createElement(Row$1, {
|
|
24336
|
+
gutter: [17, 0]
|
|
24337
|
+
}, /*#__PURE__*/React.createElement(Col$1, {
|
|
24338
|
+
span: 6
|
|
24339
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24340
|
+
label: "\u4E0D\u52A8\u4EA7\u5730\u5740"
|
|
24341
|
+
}, getFieldDecorator('realEstateAddress', {
|
|
24342
|
+
rules: readOnly ? [] : [{
|
|
24343
|
+
required: true,
|
|
24344
|
+
message: '请选择不动产地址'
|
|
24345
|
+
}]
|
|
24346
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyArrString, null) : /*#__PURE__*/React.createElement(Cascader, {
|
|
24347
|
+
style: {
|
|
24348
|
+
width: '100%'
|
|
24349
|
+
},
|
|
24350
|
+
options: props.realEstateAddressOptions,
|
|
24351
|
+
fieldNames: props.realEstateAddressFieldNames,
|
|
24352
|
+
placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
|
|
24353
|
+
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24354
|
+
span: 6
|
|
24355
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24356
|
+
label: "\u8BE6\u7EC6\u5730\u5740"
|
|
24357
|
+
}, getFieldDecorator('realEstateDetailedAddress', {
|
|
24358
|
+
rules: readOnly ? [] : [{
|
|
24359
|
+
required: true,
|
|
24360
|
+
message: '请输入详细地址'
|
|
24361
|
+
}, {
|
|
24362
|
+
max: 120,
|
|
24363
|
+
message: '详细地址最多120个字符'
|
|
24364
|
+
}, {
|
|
24365
|
+
validator: function validator(_, value) {
|
|
24366
|
+
var pattern = /街|路|村|乡|镇|道|巷|号/;
|
|
24367
|
+
return pattern.test(value) ? Promise.resolve() : Promise.reject('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
|
|
24368
|
+
}
|
|
24369
|
+
}]
|
|
24370
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24371
|
+
autoComplete: 'off',
|
|
24372
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24373
|
+
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24374
|
+
span: 6
|
|
24375
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24376
|
+
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
24377
|
+
}, getFieldDecorator('leaseTerm', {
|
|
24378
|
+
rules: readOnly ? [] : [{
|
|
24379
|
+
required: true,
|
|
24380
|
+
message: '请输入租赁期'
|
|
24381
|
+
}]
|
|
24382
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyArrMoment, null) : /*#__PURE__*/React.createElement(RangePicker, {
|
|
24383
|
+
style: {
|
|
24384
|
+
width: '100%'
|
|
24385
|
+
}
|
|
24386
|
+
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24387
|
+
span: 6
|
|
24388
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24389
|
+
label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
|
|
24390
|
+
}, getFieldDecorator('crossCitiesSign', {
|
|
24391
|
+
rules: readOnly ? [] : [{
|
|
24392
|
+
required: true,
|
|
24393
|
+
message: '请选择跨地(市)标志'
|
|
24394
|
+
}]
|
|
24395
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyNY, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24396
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
24397
|
+
style: {
|
|
24398
|
+
width: '100%'
|
|
24399
|
+
}
|
|
24400
|
+
}, /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24401
|
+
value: 'Y'
|
|
24402
|
+
}, "\u662F"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24403
|
+
value: 'N'
|
|
24404
|
+
}, "\u5426"))))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24405
|
+
span: 6
|
|
24406
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24407
|
+
label: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7"
|
|
24408
|
+
}, getFieldDecorator('realEstateNumber', {
|
|
24409
|
+
rules: readOnly ? [] : [{
|
|
24410
|
+
required: true,
|
|
24411
|
+
message: '请输入证书编号,若没有证书填写“无”'
|
|
24412
|
+
}, {
|
|
24413
|
+
max: 40,
|
|
24414
|
+
message: '证书编号最多40个字符'
|
|
24415
|
+
}]
|
|
24416
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24417
|
+
autoComplete: 'off',
|
|
24418
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
|
|
24419
|
+
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24420
|
+
span: 6
|
|
24421
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24422
|
+
label: "\u9762\u79EF\u5355\u4F4D"
|
|
24423
|
+
}, getFieldDecorator('realEstateUnit', {
|
|
24424
|
+
rules: readOnly ? [] : [{
|
|
24425
|
+
required: true,
|
|
24426
|
+
message: '请选择面积单位'
|
|
24427
|
+
}]
|
|
24428
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24429
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
24430
|
+
style: {
|
|
24431
|
+
width: '100%'
|
|
24432
|
+
}
|
|
24433
|
+
}, /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24434
|
+
value: "\u5E73\u65B9\u5343\u7C73"
|
|
24435
|
+
}, "\u5E73\u65B9\u5343\u7C73"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24436
|
+
value: "\u5E73\u65B9\u7C73"
|
|
24437
|
+
}, "\u5E73\u65B9\u7C73"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24438
|
+
value: "\u516C\u9877"
|
|
24439
|
+
}, "\u516C\u9877"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24440
|
+
value: "\u4EA9"
|
|
24441
|
+
}, "\u4EA9"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24442
|
+
value: "h\u33A1"
|
|
24443
|
+
}, "h\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24444
|
+
value: "k\u33A1"
|
|
24445
|
+
}, "k\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24446
|
+
value: "\u33A1"
|
|
24447
|
+
}, "\u33A1")))))));
|
|
24532
24448
|
});
|
|
24533
24449
|
|
|
24534
24450
|
var MyDiv$3 = /*#__PURE__*/function (_React$Component) {
|
|
@@ -24604,7 +24520,7 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
|
|
|
24604
24520
|
color: '#9F603D',
|
|
24605
24521
|
fontWeight: 600
|
|
24606
24522
|
}
|
|
24607
|
-
}, " - "), /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[1]) && value[
|
|
24523
|
+
}, " - "), /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
|
|
24608
24524
|
}
|
|
24609
24525
|
}]);
|
|
24610
24526
|
|
package/dist/index.js
CHANGED
|
@@ -22166,7 +22166,7 @@ var useColumns$1 = (function (form) {
|
|
|
22166
22166
|
style: {
|
|
22167
22167
|
padding: '0 10px'
|
|
22168
22168
|
}
|
|
22169
|
-
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22169
|
+
}, value && formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22170
22170
|
}
|
|
22171
22171
|
}
|
|
22172
22172
|
}, {
|
|
@@ -22229,7 +22229,7 @@ var useColumns$1 = (function (form) {
|
|
|
22229
22229
|
style: {
|
|
22230
22230
|
padding: '0 10px'
|
|
22231
22231
|
}
|
|
22232
|
-
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22232
|
+
}, value && formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22233
22233
|
}
|
|
22234
22234
|
}
|
|
22235
22235
|
}, {
|
|
@@ -22341,7 +22341,7 @@ var useColumns$1 = (function (form) {
|
|
|
22341
22341
|
style: {
|
|
22342
22342
|
padding: '0 10px'
|
|
22343
22343
|
}
|
|
22344
|
-
}, isDutyFree$1(record) ? '***' : parseFloat(value).toFixed(2));
|
|
22344
|
+
}, isDutyFree$1(record) ? '***' : value && parseFloat(value).toFixed(2));
|
|
22345
22345
|
}
|
|
22346
22346
|
}
|
|
22347
22347
|
}] // 含税不含税
|
|
@@ -24319,7 +24319,7 @@ var Main$3 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
24319
24319
|
})), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Statistics$1, null)));
|
|
24320
24320
|
});
|
|
24321
24321
|
|
|
24322
|
-
var css_248z$r = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n
|
|
24322
|
+
var css_248z$r = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n";
|
|
24323
24323
|
styleInject(css_248z$r);
|
|
24324
24324
|
|
|
24325
24325
|
var RangePicker = ktsComponentsAntdX4.DatePicker.RangePicker;
|
|
@@ -24335,210 +24335,126 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24335
24335
|
}, []);
|
|
24336
24336
|
var readOnly = React__default['default'].useMemo(function () {
|
|
24337
24337
|
return model === 'readOnly';
|
|
24338
|
-
}, [model]);
|
|
24339
|
-
var goodsList = controller.useMemo(function (s) {
|
|
24340
|
-
return s.goodsListState.goodsList;
|
|
24341
|
-
}, []);
|
|
24342
|
-
var indexRef = React__default['default'].useRef([]);
|
|
24343
|
-
React.useEffect(function () {
|
|
24344
|
-
var dd = goodsList === null || goodsList === void 0 ? void 0 : goodsList.reduce(function (acc, cur) {
|
|
24345
|
-
if (cur.lineAttribute !== 1) {
|
|
24346
|
-
acc.push(cur.$index);
|
|
24347
|
-
}
|
|
24348
|
-
|
|
24349
|
-
return acc;
|
|
24350
|
-
}, []);
|
|
24351
|
-
indexRef.current = dd;
|
|
24352
|
-
}, [goodsList, indexRef]); // 注册 form
|
|
24338
|
+
}, [model]); // 注册 form
|
|
24353
24339
|
|
|
24354
24340
|
controller.useForm('realEstateInfo', form);
|
|
24355
|
-
|
|
24356
|
-
var getList = function getList() {
|
|
24357
|
-
var decrease = indexRef.current.length > goodsList.length;
|
|
24358
|
-
|
|
24359
|
-
if (decrease) {
|
|
24360
|
-
//已删行列表
|
|
24361
|
-
var diff = indexRef.current.filter(function (item) {
|
|
24362
|
-
return !goodsList.find(function (i) {
|
|
24363
|
-
return i.$index === item;
|
|
24364
|
-
});
|
|
24365
|
-
});
|
|
24366
|
-
var formData = form.getFieldValue('realEstateDataDto');
|
|
24367
|
-
|
|
24368
|
-
if (Array.isArray(formData) && diff.length > 0) {
|
|
24369
|
-
var newForm = formData === null || formData === void 0 ? void 0 : formData.filter(function (item) {
|
|
24370
|
-
return !diff.find(function (i) {
|
|
24371
|
-
return i === item.$index;
|
|
24372
|
-
});
|
|
24373
|
-
});
|
|
24374
|
-
form.setFieldsValue({
|
|
24375
|
-
realEstateDataDto: newForm
|
|
24376
|
-
});
|
|
24377
|
-
} else {
|
|
24378
|
-
form.setFieldsValue({
|
|
24379
|
-
realEstateDataDto: undefined
|
|
24380
|
-
});
|
|
24381
|
-
}
|
|
24382
|
-
}
|
|
24383
|
-
|
|
24384
|
-
console.log('goodsList', goodsList);
|
|
24385
|
-
return goodsList.filter(function (item) {
|
|
24386
|
-
return item.lineAttribute !== 1;
|
|
24387
|
-
}).map(function (item, index) {
|
|
24388
|
-
if (item.lineAttribute !== 1) {
|
|
24389
|
-
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
|
|
24390
|
-
gutter: [17, 0]
|
|
24391
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24392
|
-
span: 6
|
|
24393
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24394
|
-
style: {
|
|
24395
|
-
display: 'none'
|
|
24396
|
-
}
|
|
24397
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].$index"), {
|
|
24398
|
-
initialValue: item.$index
|
|
24399
|
-
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, null))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24400
|
-
label: "\u4E0D\u52A8\u4EA7\u5730\u5740"
|
|
24401
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateAddress"), {
|
|
24402
|
-
rules: readOnly ? [] : [{
|
|
24403
|
-
required: true,
|
|
24404
|
-
message: '请选择不动产地址'
|
|
24405
|
-
}]
|
|
24406
|
-
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrString, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Cascader, {
|
|
24407
|
-
style: {
|
|
24408
|
-
width: '100%'
|
|
24409
|
-
},
|
|
24410
|
-
options: props.realEstateAddressOptions,
|
|
24411
|
-
fieldNames: props.realEstateAddressFieldNames,
|
|
24412
|
-
placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
|
|
24413
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24414
|
-
span: 6
|
|
24415
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24416
|
-
label: "\u8BE6\u7EC6\u5730\u5740"
|
|
24417
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateDetailedAddress"), {
|
|
24418
|
-
rules: readOnly ? [] : [{
|
|
24419
|
-
required: true,
|
|
24420
|
-
message: '请输入详细地址'
|
|
24421
|
-
}, {
|
|
24422
|
-
max: 120,
|
|
24423
|
-
message: '详细地址最多120个字符'
|
|
24424
|
-
}, {
|
|
24425
|
-
validator: function () {
|
|
24426
|
-
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value, callback) {
|
|
24427
|
-
var pattern;
|
|
24428
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
24429
|
-
while (1) {
|
|
24430
|
-
switch (_context.prev = _context.next) {
|
|
24431
|
-
case 0:
|
|
24432
|
-
pattern = /街|路|村|乡|镇|道|巷|号/;
|
|
24433
|
-
|
|
24434
|
-
if (pattern.test(value)) {
|
|
24435
|
-
callback();
|
|
24436
|
-
} else {
|
|
24437
|
-
callback('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
|
|
24438
|
-
}
|
|
24439
|
-
|
|
24440
|
-
case 2:
|
|
24441
|
-
case "end":
|
|
24442
|
-
return _context.stop();
|
|
24443
|
-
}
|
|
24444
|
-
}
|
|
24445
|
-
}, _callee);
|
|
24446
|
-
}));
|
|
24447
|
-
|
|
24448
|
-
function validator(_x, _x2, _x3) {
|
|
24449
|
-
return _validator.apply(this, arguments);
|
|
24450
|
-
}
|
|
24451
|
-
|
|
24452
|
-
return validator;
|
|
24453
|
-
}()
|
|
24454
|
-
}]
|
|
24455
|
-
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24456
|
-
autoComplete: 'off',
|
|
24457
|
-
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24458
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24459
|
-
span: 6
|
|
24460
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24461
|
-
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
24462
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].leaseTerm"), {
|
|
24463
|
-
rules: readOnly ? [] : [{
|
|
24464
|
-
required: true,
|
|
24465
|
-
message: '请输入租赁期'
|
|
24466
|
-
}]
|
|
24467
|
-
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrMoment, null) : /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
24468
|
-
style: {
|
|
24469
|
-
width: '100%'
|
|
24470
|
-
}
|
|
24471
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24472
|
-
span: 6
|
|
24473
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24474
|
-
label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
|
|
24475
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].crossCitiesSign"), {
|
|
24476
|
-
rules: readOnly ? [] : [{
|
|
24477
|
-
required: true,
|
|
24478
|
-
message: '请选择跨地(市)标志'
|
|
24479
|
-
}]
|
|
24480
|
-
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyNY, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
|
|
24481
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
24482
|
-
style: {
|
|
24483
|
-
width: '100%'
|
|
24484
|
-
}
|
|
24485
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24486
|
-
value: 'Y'
|
|
24487
|
-
}, "\u662F"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24488
|
-
value: 'N'
|
|
24489
|
-
}, "\u5426"))))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24490
|
-
span: 6
|
|
24491
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24492
|
-
label: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7"
|
|
24493
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateNumber"), {
|
|
24494
|
-
rules: readOnly ? [] : [{
|
|
24495
|
-
required: true,
|
|
24496
|
-
message: '请输入证书编号,若没有证书填写“无”'
|
|
24497
|
-
}, {
|
|
24498
|
-
max: 40,
|
|
24499
|
-
message: '证书编号最多40个字符'
|
|
24500
|
-
}]
|
|
24501
|
-
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24502
|
-
autoComplete: 'off',
|
|
24503
|
-
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
|
|
24504
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24505
|
-
span: 6
|
|
24506
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24507
|
-
label: "\u9762\u79EF\u5355\u4F4D"
|
|
24508
|
-
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateUnit"), {
|
|
24509
|
-
rules: readOnly ? [] : [{
|
|
24510
|
-
required: true,
|
|
24511
|
-
message: '请选择面积单位'
|
|
24512
|
-
}]
|
|
24513
|
-
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
|
|
24514
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
24515
|
-
style: {
|
|
24516
|
-
width: '100%'
|
|
24517
|
-
}
|
|
24518
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24519
|
-
value: "\u5E73\u65B9\u5343\u7C73"
|
|
24520
|
-
}, "\u5E73\u65B9\u5343\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24521
|
-
value: "\u5E73\u65B9\u7C73"
|
|
24522
|
-
}, "\u5E73\u65B9\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24523
|
-
value: "\u516C\u9877"
|
|
24524
|
-
}, "\u516C\u9877"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24525
|
-
value: "\u4EA9"
|
|
24526
|
-
}, "\u4EA9"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24527
|
-
value: "h\u33A1"
|
|
24528
|
-
}, "h\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24529
|
-
value: "k\u33A1"
|
|
24530
|
-
}, "k\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24531
|
-
value: "\u33A1"
|
|
24532
|
-
}, "\u33A1"))))));
|
|
24533
|
-
}
|
|
24534
|
-
});
|
|
24535
|
-
};
|
|
24536
|
-
|
|
24537
24341
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24538
24342
|
className: "kts-invoice-operate-real-estate-info-digtal"
|
|
24539
24343
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24540
24344
|
className: 'real-estate-info-digtal-label'
|
|
24541
|
-
}, "\u7279\u6B8A\u4FE1\u606F-\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1"),
|
|
24345
|
+
}, "\u7279\u6B8A\u4FE1\u606F-\u4E0D\u52A8\u4EA7\u7ECF\u8425\u79DF\u8D41\u670D\u52A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
|
|
24346
|
+
gutter: [17, 0]
|
|
24347
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24348
|
+
span: 6
|
|
24349
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24350
|
+
label: "\u4E0D\u52A8\u4EA7\u5730\u5740"
|
|
24351
|
+
}, getFieldDecorator('realEstateAddress', {
|
|
24352
|
+
rules: readOnly ? [] : [{
|
|
24353
|
+
required: true,
|
|
24354
|
+
message: '请选择不动产地址'
|
|
24355
|
+
}]
|
|
24356
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrString, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Cascader, {
|
|
24357
|
+
style: {
|
|
24358
|
+
width: '100%'
|
|
24359
|
+
},
|
|
24360
|
+
options: props.realEstateAddressOptions,
|
|
24361
|
+
fieldNames: props.realEstateAddressFieldNames,
|
|
24362
|
+
placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A\u53BF"
|
|
24363
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24364
|
+
span: 6
|
|
24365
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24366
|
+
label: "\u8BE6\u7EC6\u5730\u5740"
|
|
24367
|
+
}, getFieldDecorator('realEstateDetailedAddress', {
|
|
24368
|
+
rules: readOnly ? [] : [{
|
|
24369
|
+
required: true,
|
|
24370
|
+
message: '请输入详细地址'
|
|
24371
|
+
}, {
|
|
24372
|
+
max: 120,
|
|
24373
|
+
message: '详细地址最多120个字符'
|
|
24374
|
+
}, {
|
|
24375
|
+
validator: function validator(_, value) {
|
|
24376
|
+
var pattern = /街|路|村|乡|镇|道|巷|号/;
|
|
24377
|
+
return pattern.test(value) ? Promise.resolve() : Promise.reject('地址必须包含“街”、“路”、“村”、“乡”、“镇”、“道”、“巷”、“号”等任意一个关键词');
|
|
24378
|
+
}
|
|
24379
|
+
}]
|
|
24380
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24381
|
+
autoComplete: 'off',
|
|
24382
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24383
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24384
|
+
span: 6
|
|
24385
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24386
|
+
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
24387
|
+
}, getFieldDecorator('leaseTerm', {
|
|
24388
|
+
rules: readOnly ? [] : [{
|
|
24389
|
+
required: true,
|
|
24390
|
+
message: '请输入租赁期'
|
|
24391
|
+
}]
|
|
24392
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrMoment, null) : /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
24393
|
+
style: {
|
|
24394
|
+
width: '100%'
|
|
24395
|
+
}
|
|
24396
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24397
|
+
span: 6
|
|
24398
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24399
|
+
label: "\u8DE8\u5730\uFF08\u5E02\uFF09\u6807\u5FD7"
|
|
24400
|
+
}, getFieldDecorator('crossCitiesSign', {
|
|
24401
|
+
rules: readOnly ? [] : [{
|
|
24402
|
+
required: true,
|
|
24403
|
+
message: '请选择跨地(市)标志'
|
|
24404
|
+
}]
|
|
24405
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyNY, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
|
|
24406
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
24407
|
+
style: {
|
|
24408
|
+
width: '100%'
|
|
24409
|
+
}
|
|
24410
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24411
|
+
value: 'Y'
|
|
24412
|
+
}, "\u662F"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24413
|
+
value: 'N'
|
|
24414
|
+
}, "\u5426"))))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24415
|
+
span: 6
|
|
24416
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24417
|
+
label: "\u4EA7\u6743\u8BC1\u4E66/\u4E0D\u52A8\u4EA7\u6743\u8BC1\u53F7"
|
|
24418
|
+
}, getFieldDecorator('realEstateNumber', {
|
|
24419
|
+
rules: readOnly ? [] : [{
|
|
24420
|
+
required: true,
|
|
24421
|
+
message: '请输入证书编号,若没有证书填写“无”'
|
|
24422
|
+
}, {
|
|
24423
|
+
max: 40,
|
|
24424
|
+
message: '证书编号最多40个字符'
|
|
24425
|
+
}]
|
|
24426
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24427
|
+
autoComplete: 'off',
|
|
24428
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
|
|
24429
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24430
|
+
span: 6
|
|
24431
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24432
|
+
label: "\u9762\u79EF\u5355\u4F4D"
|
|
24433
|
+
}, getFieldDecorator('realEstateUnit', {
|
|
24434
|
+
rules: readOnly ? [] : [{
|
|
24435
|
+
required: true,
|
|
24436
|
+
message: '请选择面积单位'
|
|
24437
|
+
}]
|
|
24438
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
|
|
24439
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
24440
|
+
style: {
|
|
24441
|
+
width: '100%'
|
|
24442
|
+
}
|
|
24443
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24444
|
+
value: "\u5E73\u65B9\u5343\u7C73"
|
|
24445
|
+
}, "\u5E73\u65B9\u5343\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24446
|
+
value: "\u5E73\u65B9\u7C73"
|
|
24447
|
+
}, "\u5E73\u65B9\u7C73"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24448
|
+
value: "\u516C\u9877"
|
|
24449
|
+
}, "\u516C\u9877"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24450
|
+
value: "\u4EA9"
|
|
24451
|
+
}, "\u4EA9"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24452
|
+
value: "h\u33A1"
|
|
24453
|
+
}, "h\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24454
|
+
value: "k\u33A1"
|
|
24455
|
+
}, "k\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24456
|
+
value: "\u33A1"
|
|
24457
|
+
}, "\u33A1")))))));
|
|
24542
24458
|
});
|
|
24543
24459
|
|
|
24544
24460
|
var MyDiv$3 = /*#__PURE__*/function (_React$Component) {
|
|
@@ -24614,7 +24530,7 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
|
|
|
24614
24530
|
color: '#9F603D',
|
|
24615
24531
|
fontWeight: 600
|
|
24616
24532
|
}
|
|
24617
|
-
}, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[
|
|
24533
|
+
}, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[0].format('YYYY-MM-DD')));
|
|
24618
24534
|
}
|
|
24619
24535
|
}]);
|
|
24620
24536
|
|
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
|
+
|
|
6
6
|
export default () => {
|
|
7
7
|
|
|
8
8
|
const controller = React.useMemo(() => new Invoice.InvoiceController(), []);
|
|
@@ -11,18 +11,12 @@ export default () => {
|
|
|
11
11
|
controller.run(async s => {
|
|
12
12
|
})
|
|
13
13
|
}, [])
|
|
14
|
-
|
|
15
|
-
const formValues = await controller.validateFields();
|
|
16
|
-
console.log(formValues)
|
|
17
|
-
}
|
|
14
|
+
|
|
18
15
|
return (
|
|
19
|
-
<>
|
|
20
|
-
<Button onClick={onSave}>输出表单内容</Button>
|
|
21
16
|
<Invoice
|
|
22
17
|
invoiceType='digtal'
|
|
23
18
|
controller={controller}
|
|
24
19
|
specialInfor={<Invoice.RealEstateInfo />}
|
|
25
20
|
/>
|
|
26
|
-
</>
|
|
27
21
|
)
|
|
28
22
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
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/
|
|
8
|
-
|
|
9
|
-
<!-- ## 建筑服务
|
|
10
|
-
<code src="./_test/architecture/index.tsx"></code> -->
|
|
6
|
+
## 建筑服务
|
|
7
|
+
<code src="./_test/architecture/index.tsx"></code>
|
|
11
8
|
|
|
12
9
|
<!-- ## 只读模式
|
|
13
10
|
<code src="./_test/readOnly/index.tsx"></code> -->
|
|
@@ -36,9 +33,10 @@
|
|
|
36
33
|
## 查看当前可用授信额度
|
|
37
34
|
<code src="./_test/lineCredit/index.tsx"></code>
|
|
38
35
|
|
|
39
|
-
|
|
36
|
+
## 不动产经营租赁服务
|
|
37
|
+
<code src="./_test/realEstateInfo/index.tsx"></code>
|
|
40
38
|
|
|
41
39
|
-->
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
<code src="./_test/freight/index.tsx"></code>
|
|
41
|
+
## 货物运输服务
|
|
42
|
+
<code src="./_test/freight/index.tsx"></code>
|
|
@@ -416,7 +416,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
416
416
|
</Form.Item>
|
|
417
417
|
);
|
|
418
418
|
} else {
|
|
419
|
-
return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
419
|
+
return <span style={{ padding: '0 10px' }}>{value && formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
420
420
|
}
|
|
421
421
|
},
|
|
422
422
|
},
|
|
@@ -458,7 +458,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
458
458
|
</Form.Item>
|
|
459
459
|
);
|
|
460
460
|
} else {
|
|
461
|
-
return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
461
|
+
return <span style={{ padding: '0 10px' }}>{value && formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
462
462
|
}
|
|
463
463
|
},
|
|
464
464
|
},
|
|
@@ -518,7 +518,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
518
518
|
align: 'right',
|
|
519
519
|
width: 119,
|
|
520
520
|
render: (value: string, record: IGood) => {
|
|
521
|
-
if (editGood?.$index === record.$index && !disableds.includes('taxAmount')&& model !== 'prefab') {
|
|
521
|
+
if (editGood?.$index === record.$index && !disableds.includes('taxAmount') && model !== 'prefab') {
|
|
522
522
|
return (
|
|
523
523
|
<Form.Item>
|
|
524
524
|
{getFieldDecorator('taxAmount', {
|
|
@@ -532,13 +532,13 @@ export default (form: WrappedFormUtils) => {
|
|
|
532
532
|
const lineAmountIncludeTax = editGood?.lineAmountIncludeTax || 0;
|
|
533
533
|
//不含税金额
|
|
534
534
|
// const lineAmountExcludeTax = lineAmountIncludeTax-value;
|
|
535
|
-
const lineAmountExcludeTax = chain(bignumber(lineAmountIncludeTax||0)).subtract(bignumber(value||0));
|
|
535
|
+
const lineAmountExcludeTax = chain(bignumber(lineAmountIncludeTax || 0)).subtract(bignumber(value || 0));
|
|
536
536
|
const taxRate = editGood?.taxRate;
|
|
537
537
|
if (lineAmountExcludeTax && taxRate && lineAmountIncludeTax) {
|
|
538
538
|
// const total = bignumber(lineAmountExcludeTax * taxRate / 100);
|
|
539
|
-
const total = lineAmountExcludeTax.multiply(bignumber(taxRate||0)).divide(bignumber(100));
|
|
539
|
+
const total = lineAmountExcludeTax.multiply(bignumber(taxRate || 0)).divide(bignumber(100));
|
|
540
540
|
// if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
|
|
541
|
-
if (Math.abs(total.subtract(bignumber(value||0)).done().toNumber()) <= 0.01) {
|
|
541
|
+
if (Math.abs(total.subtract(bignumber(value || 0)).done().toNumber()) <= 0.01) {
|
|
542
542
|
callback();
|
|
543
543
|
} else {
|
|
544
544
|
callback('税额填写错误,请重新输入')
|
|
@@ -568,7 +568,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
568
568
|
</Form.Item>
|
|
569
569
|
)
|
|
570
570
|
} else {
|
|
571
|
-
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '***' : parseFloat(value).toFixed(2)}</span>;
|
|
571
|
+
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '***' :value && parseFloat(value).toFixed(2)}</span>;
|
|
572
572
|
}
|
|
573
573
|
},
|
|
574
574
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import React
|
|
2
|
+
import React 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,160 +36,110 @@ 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])
|
|
50
39
|
// 注册 form
|
|
51
|
-
|
|
52
40
|
controller.useForm('realEstateInfo', form);
|
|
53
|
-
|
|
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
|
-
}
|
|
41
|
+
|
|
188
42
|
return (
|
|
189
43
|
<div className="kts-invoice-operate-real-estate-info-digtal">
|
|
190
44
|
<div className='real-estate-info-digtal-label' >特殊信息-不动产经营租赁服务</div>
|
|
191
|
-
{
|
|
192
|
-
|
|
45
|
+
<Row gutter={[17, 0]}>
|
|
46
|
+
<Col span={6} >
|
|
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>
|
|
193
143
|
</div>
|
|
194
144
|
)
|
|
195
145
|
})
|
|
@@ -222,7 +172,7 @@ class MyArrMoment extends React.Component<{ value?: moment.Moment[], style?: Rea
|
|
|
222
172
|
<div style={this.props.style}>
|
|
223
173
|
<span>{moment.isMoment(value[0]) && value[0].format('YYYY-MM-DD')}</span>
|
|
224
174
|
<span style={{ color: '#9F603D', fontWeight: 600 }} > - </span>
|
|
225
|
-
<span>{moment.isMoment(value[1]) && value[
|
|
175
|
+
<span>{moment.isMoment(value[1]) && value[0].format('YYYY-MM-DD')}</span>
|
|
226
176
|
</div>
|
|
227
177
|
)
|
|
228
178
|
}
|