kts-component-invoice-operate 3.2.224 → 3.2.226
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/index.esm.js
CHANGED
|
@@ -24722,7 +24722,8 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24722
24722
|
}, "\u5E73\u65B9\u7C73"))))), isParkFeeItem && /*#__PURE__*/React.createElement(LicensePlateNumber, {
|
|
24723
24723
|
form: form,
|
|
24724
24724
|
index: index,
|
|
24725
|
-
cd: item.cd
|
|
24725
|
+
cd: item.cd,
|
|
24726
|
+
readOnly: readOnly
|
|
24726
24727
|
}) // <Col span={6} >
|
|
24727
24728
|
// <Form.Item label='车牌号' >
|
|
24728
24729
|
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
@@ -24882,7 +24883,8 @@ var MyNY = /*#__PURE__*/function (_React$Component5) {
|
|
|
24882
24883
|
var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
24883
24884
|
var _formData$props$index2;
|
|
24884
24885
|
|
|
24885
|
-
var form = props.form
|
|
24886
|
+
var form = props.form,
|
|
24887
|
+
readOnly = props.readOnly;
|
|
24886
24888
|
var getFieldDecorator = form.getFieldDecorator;
|
|
24887
24889
|
var licenceLimit = 3; // 最多支持填写3个车牌号
|
|
24888
24890
|
|
|
@@ -24907,6 +24909,8 @@ var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
|
24907
24909
|
var onAdd = function onAdd() {
|
|
24908
24910
|
if (value.length < licenceLimit) {
|
|
24909
24911
|
setVal([].concat(_toConsumableArray(value), ['']));
|
|
24912
|
+
} else {
|
|
24913
|
+
message.warn('最多支持填写3个车牌号');
|
|
24910
24914
|
}
|
|
24911
24915
|
}; // 删除车牌号
|
|
24912
24916
|
|
|
@@ -24918,7 +24922,6 @@ var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
|
24918
24922
|
}
|
|
24919
24923
|
};
|
|
24920
24924
|
|
|
24921
|
-
console.log(value.length);
|
|
24922
24925
|
return /*#__PURE__*/React.createElement(React.Fragment, null, value.length > 0 && value.map(function (item, key) {
|
|
24923
24926
|
return /*#__PURE__*/React.createElement(Col$1, {
|
|
24924
24927
|
span: 6
|
|
@@ -24926,18 +24929,18 @@ var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
|
24926
24929
|
label: "\u8F66\u724C\u53F7",
|
|
24927
24930
|
key: key
|
|
24928
24931
|
}, getFieldDecorator("realEstateDataDto[".concat(props.index, "].cphList[").concat(key, "]"), {
|
|
24929
|
-
rules: [{
|
|
24932
|
+
rules: readOnly ? [] : [{
|
|
24930
24933
|
required: true,
|
|
24931
24934
|
message: '请输入车牌号'
|
|
24932
24935
|
}]
|
|
24933
|
-
})( /*#__PURE__*/React.createElement(Input$2, {
|
|
24936
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24934
24937
|
style: {
|
|
24935
24938
|
width: '100%'
|
|
24936
24939
|
},
|
|
24937
24940
|
autoComplete: 'off',
|
|
24938
24941
|
placeholder: "\u8BF7\u8F93\u5165\u8F66\u724C\u53F7"
|
|
24939
24942
|
}))));
|
|
24940
|
-
}), /*#__PURE__*/React.createElement(Col$1, {
|
|
24943
|
+
}), !readOnly && /*#__PURE__*/React.createElement(Col$1, {
|
|
24941
24944
|
span: 6
|
|
24942
24945
|
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
24943
24946
|
style: {
|
package/dist/index.js
CHANGED
|
@@ -24732,7 +24732,8 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24732
24732
|
}, "\u5E73\u65B9\u7C73"))))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(LicensePlateNumber, {
|
|
24733
24733
|
form: form,
|
|
24734
24734
|
index: index,
|
|
24735
|
-
cd: item.cd
|
|
24735
|
+
cd: item.cd,
|
|
24736
|
+
readOnly: readOnly
|
|
24736
24737
|
}) // <Col span={6} >
|
|
24737
24738
|
// <Form.Item label='车牌号' >
|
|
24738
24739
|
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
@@ -24892,7 +24893,8 @@ var MyNY = /*#__PURE__*/function (_React$Component5) {
|
|
|
24892
24893
|
var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
24893
24894
|
var _formData$props$index2;
|
|
24894
24895
|
|
|
24895
|
-
var form = props.form
|
|
24896
|
+
var form = props.form,
|
|
24897
|
+
readOnly = props.readOnly;
|
|
24896
24898
|
var getFieldDecorator = form.getFieldDecorator;
|
|
24897
24899
|
var licenceLimit = 3; // 最多支持填写3个车牌号
|
|
24898
24900
|
|
|
@@ -24917,6 +24919,8 @@ var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
|
24917
24919
|
var onAdd = function onAdd() {
|
|
24918
24920
|
if (value.length < licenceLimit) {
|
|
24919
24921
|
setVal([].concat(_toConsumableArray(value), ['']));
|
|
24922
|
+
} else {
|
|
24923
|
+
ktsComponentsAntdX3.message.warn('最多支持填写3个车牌号');
|
|
24920
24924
|
}
|
|
24921
24925
|
}; // 删除车牌号
|
|
24922
24926
|
|
|
@@ -24928,7 +24932,6 @@ var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
|
24928
24932
|
}
|
|
24929
24933
|
};
|
|
24930
24934
|
|
|
24931
|
-
console.log(value.length);
|
|
24932
24935
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, value.length > 0 && value.map(function (item, key) {
|
|
24933
24936
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24934
24937
|
span: 6
|
|
@@ -24936,18 +24939,18 @@ var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
|
24936
24939
|
label: "\u8F66\u724C\u53F7",
|
|
24937
24940
|
key: key
|
|
24938
24941
|
}, getFieldDecorator("realEstateDataDto[".concat(props.index, "].cphList[").concat(key, "]"), {
|
|
24939
|
-
rules: [{
|
|
24942
|
+
rules: readOnly ? [] : [{
|
|
24940
24943
|
required: true,
|
|
24941
24944
|
message: '请输入车牌号'
|
|
24942
24945
|
}]
|
|
24943
|
-
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24946
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24944
24947
|
style: {
|
|
24945
24948
|
width: '100%'
|
|
24946
24949
|
},
|
|
24947
24950
|
autoComplete: 'off',
|
|
24948
24951
|
placeholder: "\u8BF7\u8F93\u5165\u8F66\u724C\u53F7"
|
|
24949
24952
|
}))));
|
|
24950
|
-
}), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24953
|
+
}), !readOnly && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24951
24954
|
span: 6
|
|
24952
24955
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24953
24956
|
style: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import React, { useEffect } from "react";
|
|
3
3
|
import { decorator } from 'grey-react-box';
|
|
4
|
-
import { Form } from 'kts-components-antd-x3';
|
|
4
|
+
import { Form, message } from 'kts-components-antd-x3';
|
|
5
5
|
import { FormComponentProps } from 'kts-components-antd-x3/lib/form';
|
|
6
6
|
import Invoice from '../../..';
|
|
7
7
|
import './index.less';
|
|
@@ -227,7 +227,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
227
227
|
</Col>
|
|
228
228
|
}
|
|
229
229
|
{isParkFeeItem &&
|
|
230
|
-
<LicensePlateNumber form={form} index={index} cd={item.cd} />
|
|
230
|
+
<LicensePlateNumber form={form} index={index} cd={item.cd} readOnly={readOnly} />
|
|
231
231
|
// <Col span={6} >
|
|
232
232
|
// <Form.Item label='车牌号' >
|
|
233
233
|
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
@@ -316,10 +316,11 @@ interface PriceInputProps {
|
|
|
316
316
|
form: any,
|
|
317
317
|
index: number
|
|
318
318
|
cd?: number
|
|
319
|
+
readOnly: boolean
|
|
319
320
|
}
|
|
320
321
|
const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
321
322
|
|
|
322
|
-
const { form } = props;
|
|
323
|
+
const { form, readOnly } = props;
|
|
323
324
|
|
|
324
325
|
const { getFieldDecorator } = form;
|
|
325
326
|
const licenceLimit = 3; // 最多支持填写3个车牌号
|
|
@@ -335,6 +336,8 @@ const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
|
335
336
|
const onAdd = () => {
|
|
336
337
|
if (value.length < licenceLimit) {
|
|
337
338
|
setVal([...value, '']);
|
|
339
|
+
}else{
|
|
340
|
+
message.warn('最多支持填写3个车牌号')
|
|
338
341
|
}
|
|
339
342
|
}
|
|
340
343
|
// 删除车牌号
|
|
@@ -345,16 +348,17 @@ const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
|
345
348
|
}
|
|
346
349
|
}
|
|
347
350
|
|
|
348
|
-
console.log(value.length)
|
|
349
351
|
return <>
|
|
350
352
|
{
|
|
351
353
|
value.length > 0 && value.map((item: string[], key: number) => {
|
|
352
354
|
|
|
353
355
|
return <Col span={6} ><Form.Item label='车牌号' key={key}>
|
|
354
356
|
{getFieldDecorator(`realEstateDataDto[${props.index}].cphList[${key}]`, {
|
|
355
|
-
rules: [{ required: true, message: '请输入车牌号' }]
|
|
357
|
+
rules: readOnly ? [] : [{ required: true, message: '请输入车牌号' }]
|
|
356
358
|
})(
|
|
357
|
-
|
|
359
|
+
readOnly
|
|
360
|
+
? <MyDiv /> :
|
|
361
|
+
<Input style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
358
362
|
)}
|
|
359
363
|
</Form.Item>
|
|
360
364
|
</Col>
|
|
@@ -370,13 +374,15 @@ const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
|
370
374
|
)}
|
|
371
375
|
</Form.Item>
|
|
372
376
|
</Col> */}
|
|
373
|
-
|
|
374
|
-
<
|
|
375
|
-
<
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
{!readOnly &&
|
|
378
|
+
<Col span={6} >
|
|
379
|
+
<Form.Item >
|
|
380
|
+
<div style={{ color: 'white' }}>1</div>
|
|
381
|
+
<a style={{ marginRight: 10 }} onClick={onAdd}>添加车牌号</a>
|
|
382
|
+
{value.length > 1 && <a onClick={onDelete}>删除</a>}
|
|
383
|
+
</Form.Item>
|
|
384
|
+
</Col>
|
|
385
|
+
}
|
|
380
386
|
</>
|
|
381
387
|
}
|
|
382
388
|
|