kts-component-invoice-operate 3.2.222 → 3.2.223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +1 -0
- package/dist/index.esm.js +227 -8
- package/dist/index.js +227 -8
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/realEstateInfo/index.tsx +47 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +2 -0
- package/src/Invoice/ui/digtal/RealEstateInfo/index.tsx +239 -36
package/dist/index.esm.js
CHANGED
|
@@ -24482,6 +24482,19 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24482
24482
|
}, [model]);
|
|
24483
24483
|
var goodsList = controller.useMemo(function (s) {
|
|
24484
24484
|
return s.goodsListState.goodsList;
|
|
24485
|
+
}, []); //outcome-104 任务 https://wiki.dev.kingxunlian.com/pages/viewpage.action?pageId=180355189
|
|
24486
|
+
//商品和服务税收分类合并编码为“3040502020200000000”时,视为停车费业务,针对停车费业务,蓝字发票增加以下判断:
|
|
24487
|
+
// 单位必须为“平方米”;
|
|
24488
|
+
// 项目名称必须为“车辆停放服务”;
|
|
24489
|
+
// 车牌号必填,最多支持填写3个车牌号;除该场景车牌号必须为空;
|
|
24490
|
+
// 租赁期起止格式必须为“yyyy-MM-dd HH:mm(租赁期起)”+“空格”+“yyyy-MM-dd HH:mm(租赁期止)。
|
|
24491
|
+
|
|
24492
|
+
var isParkFee = React.useCallback(function (taxClassificationCode) {
|
|
24493
|
+
if (taxClassificationCode === '3040502020200000000') {
|
|
24494
|
+
return false;
|
|
24495
|
+
} else {
|
|
24496
|
+
return true;
|
|
24497
|
+
}
|
|
24485
24498
|
}, []);
|
|
24486
24499
|
var indexRef = React.useRef([]);
|
|
24487
24500
|
useEffect(function () {
|
|
@@ -24525,11 +24538,11 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24525
24538
|
}
|
|
24526
24539
|
}
|
|
24527
24540
|
|
|
24528
|
-
console.log('goodsList', goodsList);
|
|
24529
24541
|
return goodsList.filter(function (item) {
|
|
24530
24542
|
return item.lineAttribute !== 1;
|
|
24531
24543
|
}).map(function (item, index) {
|
|
24532
24544
|
if (item.lineAttribute !== 1) {
|
|
24545
|
+
var isParkFeeItem = isParkFee(item.taxClassificationCode);
|
|
24533
24546
|
return /*#__PURE__*/React.createElement(Row$1, {
|
|
24534
24547
|
gutter: [17, 0]
|
|
24535
24548
|
}, /*#__PURE__*/React.createElement(Col$1, {
|
|
@@ -24599,7 +24612,7 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24599
24612
|
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24600
24613
|
autoComplete: 'off',
|
|
24601
24614
|
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24602
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24615
|
+
})))), !isParkFeeItem && /*#__PURE__*/React.createElement(Col$1, {
|
|
24603
24616
|
span: 6
|
|
24604
24617
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24605
24618
|
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
@@ -24612,6 +24625,23 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24612
24625
|
style: {
|
|
24613
24626
|
width: '100%'
|
|
24614
24627
|
}
|
|
24628
|
+
})))), isParkFeeItem && /*#__PURE__*/React.createElement(Col$1, {
|
|
24629
|
+
span: 6
|
|
24630
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24631
|
+
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
24632
|
+
}, getFieldDecorator("realEstateDataDto[".concat(index, "].leaseTerm"), {
|
|
24633
|
+
rules: readOnly ? [] : [{
|
|
24634
|
+
required: true,
|
|
24635
|
+
message: '请输入租赁期'
|
|
24636
|
+
}]
|
|
24637
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyArrMomentTime, null) : /*#__PURE__*/React.createElement(RangePicker, {
|
|
24638
|
+
style: {
|
|
24639
|
+
width: '100%'
|
|
24640
|
+
},
|
|
24641
|
+
showTime: {
|
|
24642
|
+
format: 'HH:mm'
|
|
24643
|
+
},
|
|
24644
|
+
format: "YYYY-MM-DD HH:mm"
|
|
24615
24645
|
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24616
24646
|
span: 6
|
|
24617
24647
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -24645,7 +24675,7 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24645
24675
|
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24646
24676
|
autoComplete: 'off',
|
|
24647
24677
|
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
|
|
24648
|
-
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24678
|
+
})))), !isParkFeeItem && /*#__PURE__*/React.createElement(Col$1, {
|
|
24649
24679
|
span: 6
|
|
24650
24680
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24651
24681
|
label: "\u9762\u79EF\u5355\u4F4D"
|
|
@@ -24673,7 +24703,38 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
|
|
|
24673
24703
|
value: "k\u33A1"
|
|
24674
24704
|
}, "k\u33A1"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24675
24705
|
value: "\u33A1"
|
|
24676
|
-
}, "\u33A1")))))
|
|
24706
|
+
}, "\u33A1"))))), isParkFeeItem && /*#__PURE__*/React.createElement(Col$1, {
|
|
24707
|
+
span: 6
|
|
24708
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24709
|
+
label: "\u9762\u79EF\u5355\u4F4D"
|
|
24710
|
+
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateUnit"), {
|
|
24711
|
+
rules: readOnly ? [] : [{
|
|
24712
|
+
required: true,
|
|
24713
|
+
message: '请选择面积单位'
|
|
24714
|
+
}]
|
|
24715
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$3, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24716
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
24717
|
+
style: {
|
|
24718
|
+
width: '100%'
|
|
24719
|
+
}
|
|
24720
|
+
}, /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24721
|
+
value: "\u5E73\u65B9\u7C73"
|
|
24722
|
+
}, "\u5E73\u65B9\u7C73"))))), isParkFeeItem && /*#__PURE__*/React.createElement(LicensePlateNumber, {
|
|
24723
|
+
form: form,
|
|
24724
|
+
index: index,
|
|
24725
|
+
cd: item.cd
|
|
24726
|
+
}) // <Col span={6} >
|
|
24727
|
+
// <Form.Item label='车牌号' >
|
|
24728
|
+
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
24729
|
+
// rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
24730
|
+
// })(
|
|
24731
|
+
// readOnly
|
|
24732
|
+
// ? <MyDiv />
|
|
24733
|
+
// : <LicensePlateNumber form={form}/>
|
|
24734
|
+
// )}
|
|
24735
|
+
// </Form.Item>
|
|
24736
|
+
// </Col>
|
|
24737
|
+
);
|
|
24677
24738
|
}
|
|
24678
24739
|
});
|
|
24679
24740
|
};
|
|
@@ -24765,15 +24826,45 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
|
|
|
24765
24826
|
return MyArrMoment;
|
|
24766
24827
|
}(React.Component);
|
|
24767
24828
|
|
|
24768
|
-
var
|
|
24769
|
-
_inherits(
|
|
24829
|
+
var MyArrMomentTime = /*#__PURE__*/function (_React$Component4) {
|
|
24830
|
+
_inherits(MyArrMomentTime, _React$Component4);
|
|
24770
24831
|
|
|
24771
|
-
var _super4 = _createSuper(
|
|
24832
|
+
var _super4 = _createSuper(MyArrMomentTime);
|
|
24833
|
+
|
|
24834
|
+
function MyArrMomentTime() {
|
|
24835
|
+
_classCallCheck(this, MyArrMomentTime);
|
|
24836
|
+
|
|
24837
|
+
return _super4.apply(this, arguments);
|
|
24838
|
+
}
|
|
24839
|
+
|
|
24840
|
+
_createClass(MyArrMomentTime, [{
|
|
24841
|
+
key: "render",
|
|
24842
|
+
value: function render() {
|
|
24843
|
+
var _this$props$value3 = this.props.value,
|
|
24844
|
+
value = _this$props$value3 === void 0 ? [] : _this$props$value3;
|
|
24845
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24846
|
+
style: this.props.style
|
|
24847
|
+
}, /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD HH:mm')), /*#__PURE__*/React.createElement("span", {
|
|
24848
|
+
style: {
|
|
24849
|
+
color: '#9F603D',
|
|
24850
|
+
fontWeight: 600
|
|
24851
|
+
}
|
|
24852
|
+
}, " - "), /*#__PURE__*/React.createElement("span", null, hooks.isMoment(value[1]) && value[1].format('YYYY-MM-DD HH:mm')));
|
|
24853
|
+
}
|
|
24854
|
+
}]);
|
|
24855
|
+
|
|
24856
|
+
return MyArrMomentTime;
|
|
24857
|
+
}(React.Component);
|
|
24858
|
+
|
|
24859
|
+
var MyNY = /*#__PURE__*/function (_React$Component5) {
|
|
24860
|
+
_inherits(MyNY, _React$Component5);
|
|
24861
|
+
|
|
24862
|
+
var _super5 = _createSuper(MyNY);
|
|
24772
24863
|
|
|
24773
24864
|
function MyNY() {
|
|
24774
24865
|
_classCallCheck(this, MyNY);
|
|
24775
24866
|
|
|
24776
|
-
return
|
|
24867
|
+
return _super5.apply(this, arguments);
|
|
24777
24868
|
}
|
|
24778
24869
|
|
|
24779
24870
|
_createClass(MyNY, [{
|
|
@@ -24788,6 +24879,134 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
|
|
|
24788
24879
|
return MyNY;
|
|
24789
24880
|
}(React.Component);
|
|
24790
24881
|
|
|
24882
|
+
var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
24883
|
+
var _formData$props$index2;
|
|
24884
|
+
|
|
24885
|
+
var form = props.form;
|
|
24886
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
24887
|
+
var licenceLimit = 3; // 最多支持填写3个车牌号
|
|
24888
|
+
|
|
24889
|
+
var formData = form.getFieldValue('realEstateDataDto');
|
|
24890
|
+
|
|
24891
|
+
var _React$useState = React.useState(new Array(props.cd || 1).fill('')),
|
|
24892
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24893
|
+
value = _React$useState2[0],
|
|
24894
|
+
setVal = _React$useState2[1];
|
|
24895
|
+
|
|
24896
|
+
var cd = React.useMemo(function () {
|
|
24897
|
+
var _formData$props$index;
|
|
24898
|
+
|
|
24899
|
+
return (_formData$props$index = formData[props.index]) === null || _formData$props$index === void 0 ? void 0 : _formData$props$index.cd;
|
|
24900
|
+
}, [(_formData$props$index2 = formData[props.index]) === null || _formData$props$index2 === void 0 ? void 0 : _formData$props$index2.cd]); // useEffect(() => {
|
|
24901
|
+
// if (cd) {
|
|
24902
|
+
// const dd = value.concat(new Array(cd.length-1).fill(''))
|
|
24903
|
+
// setVal(dd);
|
|
24904
|
+
// }
|
|
24905
|
+
// }, [cd])
|
|
24906
|
+
|
|
24907
|
+
var onAdd = function onAdd() {
|
|
24908
|
+
if (value.length < licenceLimit) {
|
|
24909
|
+
setVal([].concat(_toConsumableArray(value), ['']));
|
|
24910
|
+
}
|
|
24911
|
+
}; // 删除车牌号
|
|
24912
|
+
|
|
24913
|
+
|
|
24914
|
+
var onDelete = function onDelete() {
|
|
24915
|
+
if (value.length > 0) {
|
|
24916
|
+
var dd = value.slice(0, -1);
|
|
24917
|
+
setVal(dd);
|
|
24918
|
+
}
|
|
24919
|
+
};
|
|
24920
|
+
|
|
24921
|
+
console.log(value.length);
|
|
24922
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, value.length > 0 && value.map(function (item, key) {
|
|
24923
|
+
return /*#__PURE__*/React.createElement(Col$1, {
|
|
24924
|
+
span: 6
|
|
24925
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24926
|
+
label: "\u8F66\u724C\u53F7",
|
|
24927
|
+
key: key
|
|
24928
|
+
}, getFieldDecorator("realEstateDataDto[".concat(props.index, "].cphList[").concat(key, "]"), {
|
|
24929
|
+
rules: [{
|
|
24930
|
+
required: true,
|
|
24931
|
+
message: '请输入车牌号'
|
|
24932
|
+
}]
|
|
24933
|
+
})( /*#__PURE__*/React.createElement(Input$2, {
|
|
24934
|
+
style: {
|
|
24935
|
+
width: '100%'
|
|
24936
|
+
},
|
|
24937
|
+
autoComplete: 'off',
|
|
24938
|
+
placeholder: "\u8BF7\u8F93\u5165\u8F66\u724C\u53F7"
|
|
24939
|
+
}))));
|
|
24940
|
+
}), /*#__PURE__*/React.createElement(Col$1, {
|
|
24941
|
+
span: 6
|
|
24942
|
+
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
24943
|
+
style: {
|
|
24944
|
+
color: 'white'
|
|
24945
|
+
}
|
|
24946
|
+
}, "1"), /*#__PURE__*/React.createElement("a", {
|
|
24947
|
+
style: {
|
|
24948
|
+
marginRight: 10
|
|
24949
|
+
},
|
|
24950
|
+
onClick: onAdd
|
|
24951
|
+
}, "\u6DFB\u52A0\u8F66\u724C\u53F7"), value.length > 1 && /*#__PURE__*/React.createElement("a", {
|
|
24952
|
+
onClick: onDelete
|
|
24953
|
+
}, "\u5220\u9664"))));
|
|
24954
|
+
}; // const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
24955
|
+
// const { form } = props;
|
|
24956
|
+
// const { getFieldDecorator } = form;
|
|
24957
|
+
// const licenceLimit = 3; // 最多支持填写3个车牌号
|
|
24958
|
+
// // const { value = [] } = this.props;
|
|
24959
|
+
// const [value, setVal] = React.useState(props.value || ['']);
|
|
24960
|
+
// // const newArr = value.filter(e => !!e);
|
|
24961
|
+
// const newArrLength = value.length;
|
|
24962
|
+
// console.log(value, newArrLength)
|
|
24963
|
+
// // 新增车牌号
|
|
24964
|
+
// const onAdd = () => {
|
|
24965
|
+
// if (newArrLength < licenceLimit) {
|
|
24966
|
+
// setVal([...value, '']);
|
|
24967
|
+
// props.onChange?.([...value, ''])
|
|
24968
|
+
// }
|
|
24969
|
+
// }
|
|
24970
|
+
// // 删除车牌号
|
|
24971
|
+
// const onDelete = () => {
|
|
24972
|
+
// if (newArrLength > 0) {
|
|
24973
|
+
// const dd = value.slice(0, -1)
|
|
24974
|
+
// setVal(dd);
|
|
24975
|
+
// props.onChange?.(dd)
|
|
24976
|
+
// }
|
|
24977
|
+
// }
|
|
24978
|
+
// const onInputChange = (e: React.ChangeEvent<HTMLInputElement>, index: number) => {
|
|
24979
|
+
// console.log(e.target.value);
|
|
24980
|
+
// const dd = value.map((item, i) => {
|
|
24981
|
+
// if (i === index) {
|
|
24982
|
+
// return e.target.value
|
|
24983
|
+
// }
|
|
24984
|
+
// return item
|
|
24985
|
+
// })
|
|
24986
|
+
// setVal(dd);
|
|
24987
|
+
// props.onChange?.(dd)
|
|
24988
|
+
// }
|
|
24989
|
+
// return (
|
|
24990
|
+
// <>
|
|
24991
|
+
// {newArrLength > 0 && value.map((item, index) => {
|
|
24992
|
+
// return
|
|
24993
|
+
// <Form.Item label='车牌号' >
|
|
24994
|
+
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
24995
|
+
// rules: [{ required: true, }]
|
|
24996
|
+
// })(
|
|
24997
|
+
// <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
24998
|
+
// )}
|
|
24999
|
+
// </Form.Item>
|
|
25000
|
+
// // <Col span={6} >
|
|
25001
|
+
// // <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
25002
|
+
// // </Col>
|
|
25003
|
+
// })}
|
|
25004
|
+
// <Button type="link" onClick={onAdd}>添加车牌号</Button>
|
|
25005
|
+
// {newArrLength > 1 && <Button type="link" onClick={onDelete}>删除</Button>}
|
|
25006
|
+
// </>
|
|
25007
|
+
// )
|
|
25008
|
+
// }
|
|
25009
|
+
|
|
24791
25010
|
var css_248z$s = ".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.kts-invoice-operate-real-estate-info-digtal .break-word {\n word-break: break-word;\n}\n";
|
|
24792
25011
|
styleInject(css_248z$s);
|
|
24793
25012
|
|
package/dist/index.js
CHANGED
|
@@ -24492,6 +24492,19 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24492
24492
|
}, [model]);
|
|
24493
24493
|
var goodsList = controller.useMemo(function (s) {
|
|
24494
24494
|
return s.goodsListState.goodsList;
|
|
24495
|
+
}, []); //outcome-104 任务 https://wiki.dev.kingxunlian.com/pages/viewpage.action?pageId=180355189
|
|
24496
|
+
//商品和服务税收分类合并编码为“3040502020200000000”时,视为停车费业务,针对停车费业务,蓝字发票增加以下判断:
|
|
24497
|
+
// 单位必须为“平方米”;
|
|
24498
|
+
// 项目名称必须为“车辆停放服务”;
|
|
24499
|
+
// 车牌号必填,最多支持填写3个车牌号;除该场景车牌号必须为空;
|
|
24500
|
+
// 租赁期起止格式必须为“yyyy-MM-dd HH:mm(租赁期起)”+“空格”+“yyyy-MM-dd HH:mm(租赁期止)。
|
|
24501
|
+
|
|
24502
|
+
var isParkFee = React__default['default'].useCallback(function (taxClassificationCode) {
|
|
24503
|
+
if (taxClassificationCode === '3040502020200000000') {
|
|
24504
|
+
return false;
|
|
24505
|
+
} else {
|
|
24506
|
+
return true;
|
|
24507
|
+
}
|
|
24495
24508
|
}, []);
|
|
24496
24509
|
var indexRef = React__default['default'].useRef([]);
|
|
24497
24510
|
React.useEffect(function () {
|
|
@@ -24535,11 +24548,11 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24535
24548
|
}
|
|
24536
24549
|
}
|
|
24537
24550
|
|
|
24538
|
-
console.log('goodsList', goodsList);
|
|
24539
24551
|
return goodsList.filter(function (item) {
|
|
24540
24552
|
return item.lineAttribute !== 1;
|
|
24541
24553
|
}).map(function (item, index) {
|
|
24542
24554
|
if (item.lineAttribute !== 1) {
|
|
24555
|
+
var isParkFeeItem = isParkFee(item.taxClassificationCode);
|
|
24543
24556
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
|
|
24544
24557
|
gutter: [17, 0]
|
|
24545
24558
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
@@ -24609,7 +24622,7 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24609
24622
|
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24610
24623
|
autoComplete: 'off',
|
|
24611
24624
|
placeholder: "\u8BF7\u8F93\u5165\u8BE6\u7EC6\u5730\u5740"
|
|
24612
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24625
|
+
})))), !isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24613
24626
|
span: 6
|
|
24614
24627
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24615
24628
|
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
@@ -24622,6 +24635,23 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24622
24635
|
style: {
|
|
24623
24636
|
width: '100%'
|
|
24624
24637
|
}
|
|
24638
|
+
})))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24639
|
+
span: 6
|
|
24640
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24641
|
+
label: "\u79DF\u8D41\u671F\u8D77\u6B62"
|
|
24642
|
+
}, getFieldDecorator("realEstateDataDto[".concat(index, "].leaseTerm"), {
|
|
24643
|
+
rules: readOnly ? [] : [{
|
|
24644
|
+
required: true,
|
|
24645
|
+
message: '请输入租赁期'
|
|
24646
|
+
}]
|
|
24647
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyArrMomentTime, null) : /*#__PURE__*/React__default['default'].createElement(RangePicker, {
|
|
24648
|
+
style: {
|
|
24649
|
+
width: '100%'
|
|
24650
|
+
},
|
|
24651
|
+
showTime: {
|
|
24652
|
+
format: 'HH:mm'
|
|
24653
|
+
},
|
|
24654
|
+
format: "YYYY-MM-DD HH:mm"
|
|
24625
24655
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24626
24656
|
span: 6
|
|
24627
24657
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
@@ -24655,7 +24685,7 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24655
24685
|
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24656
24686
|
autoComplete: 'off',
|
|
24657
24687
|
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4E66\u7F16\u53F7\uFF0C\u82E5\u6CA1\u6709\u8BC1\u4E66\u586B\u5199\u201C\u65E0\u201D"
|
|
24658
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24688
|
+
})))), !isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24659
24689
|
span: 6
|
|
24660
24690
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24661
24691
|
label: "\u9762\u79EF\u5355\u4F4D"
|
|
@@ -24683,7 +24713,38 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
|
|
|
24683
24713
|
value: "k\u33A1"
|
|
24684
24714
|
}, "k\u33A1"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24685
24715
|
value: "\u33A1"
|
|
24686
|
-
}, "\u33A1")))))
|
|
24716
|
+
}, "\u33A1"))))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24717
|
+
span: 6
|
|
24718
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24719
|
+
label: "\u9762\u79EF\u5355\u4F4D"
|
|
24720
|
+
}, getFieldDecorator("realEstateDataDto[".concat(index, "].realEstateUnit"), {
|
|
24721
|
+
rules: readOnly ? [] : [{
|
|
24722
|
+
required: true,
|
|
24723
|
+
message: '请选择面积单位'
|
|
24724
|
+
}]
|
|
24725
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$3, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
|
|
24726
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
24727
|
+
style: {
|
|
24728
|
+
width: '100%'
|
|
24729
|
+
}
|
|
24730
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24731
|
+
value: "\u5E73\u65B9\u7C73"
|
|
24732
|
+
}, "\u5E73\u65B9\u7C73"))))), isParkFeeItem && /*#__PURE__*/React__default['default'].createElement(LicensePlateNumber, {
|
|
24733
|
+
form: form,
|
|
24734
|
+
index: index,
|
|
24735
|
+
cd: item.cd
|
|
24736
|
+
}) // <Col span={6} >
|
|
24737
|
+
// <Form.Item label='车牌号' >
|
|
24738
|
+
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
24739
|
+
// rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
24740
|
+
// })(
|
|
24741
|
+
// readOnly
|
|
24742
|
+
// ? <MyDiv />
|
|
24743
|
+
// : <LicensePlateNumber form={form}/>
|
|
24744
|
+
// )}
|
|
24745
|
+
// </Form.Item>
|
|
24746
|
+
// </Col>
|
|
24747
|
+
);
|
|
24687
24748
|
}
|
|
24688
24749
|
});
|
|
24689
24750
|
};
|
|
@@ -24775,15 +24836,45 @@ var MyArrMoment = /*#__PURE__*/function (_React$Component3) {
|
|
|
24775
24836
|
return MyArrMoment;
|
|
24776
24837
|
}(React__default['default'].Component);
|
|
24777
24838
|
|
|
24778
|
-
var
|
|
24779
|
-
_inherits(
|
|
24839
|
+
var MyArrMomentTime = /*#__PURE__*/function (_React$Component4) {
|
|
24840
|
+
_inherits(MyArrMomentTime, _React$Component4);
|
|
24780
24841
|
|
|
24781
|
-
var _super4 = _createSuper(
|
|
24842
|
+
var _super4 = _createSuper(MyArrMomentTime);
|
|
24843
|
+
|
|
24844
|
+
function MyArrMomentTime() {
|
|
24845
|
+
_classCallCheck(this, MyArrMomentTime);
|
|
24846
|
+
|
|
24847
|
+
return _super4.apply(this, arguments);
|
|
24848
|
+
}
|
|
24849
|
+
|
|
24850
|
+
_createClass(MyArrMomentTime, [{
|
|
24851
|
+
key: "render",
|
|
24852
|
+
value: function render() {
|
|
24853
|
+
var _this$props$value3 = this.props.value,
|
|
24854
|
+
value = _this$props$value3 === void 0 ? [] : _this$props$value3;
|
|
24855
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24856
|
+
style: this.props.style
|
|
24857
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[0]) && value[0].format('YYYY-MM-DD HH:mm')), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
24858
|
+
style: {
|
|
24859
|
+
color: '#9F603D',
|
|
24860
|
+
fontWeight: 600
|
|
24861
|
+
}
|
|
24862
|
+
}, " - "), /*#__PURE__*/React__default['default'].createElement("span", null, hooks.isMoment(value[1]) && value[1].format('YYYY-MM-DD HH:mm')));
|
|
24863
|
+
}
|
|
24864
|
+
}]);
|
|
24865
|
+
|
|
24866
|
+
return MyArrMomentTime;
|
|
24867
|
+
}(React__default['default'].Component);
|
|
24868
|
+
|
|
24869
|
+
var MyNY = /*#__PURE__*/function (_React$Component5) {
|
|
24870
|
+
_inherits(MyNY, _React$Component5);
|
|
24871
|
+
|
|
24872
|
+
var _super5 = _createSuper(MyNY);
|
|
24782
24873
|
|
|
24783
24874
|
function MyNY() {
|
|
24784
24875
|
_classCallCheck(this, MyNY);
|
|
24785
24876
|
|
|
24786
|
-
return
|
|
24877
|
+
return _super5.apply(this, arguments);
|
|
24787
24878
|
}
|
|
24788
24879
|
|
|
24789
24880
|
_createClass(MyNY, [{
|
|
@@ -24798,6 +24889,134 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
|
|
|
24798
24889
|
return MyNY;
|
|
24799
24890
|
}(React__default['default'].Component);
|
|
24800
24891
|
|
|
24892
|
+
var LicensePlateNumber = function LicensePlateNumber(props) {
|
|
24893
|
+
var _formData$props$index2;
|
|
24894
|
+
|
|
24895
|
+
var form = props.form;
|
|
24896
|
+
var getFieldDecorator = form.getFieldDecorator;
|
|
24897
|
+
var licenceLimit = 3; // 最多支持填写3个车牌号
|
|
24898
|
+
|
|
24899
|
+
var formData = form.getFieldValue('realEstateDataDto');
|
|
24900
|
+
|
|
24901
|
+
var _React$useState = React__default['default'].useState(new Array(props.cd || 1).fill('')),
|
|
24902
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24903
|
+
value = _React$useState2[0],
|
|
24904
|
+
setVal = _React$useState2[1];
|
|
24905
|
+
|
|
24906
|
+
var cd = React__default['default'].useMemo(function () {
|
|
24907
|
+
var _formData$props$index;
|
|
24908
|
+
|
|
24909
|
+
return (_formData$props$index = formData[props.index]) === null || _formData$props$index === void 0 ? void 0 : _formData$props$index.cd;
|
|
24910
|
+
}, [(_formData$props$index2 = formData[props.index]) === null || _formData$props$index2 === void 0 ? void 0 : _formData$props$index2.cd]); // useEffect(() => {
|
|
24911
|
+
// if (cd) {
|
|
24912
|
+
// const dd = value.concat(new Array(cd.length-1).fill(''))
|
|
24913
|
+
// setVal(dd);
|
|
24914
|
+
// }
|
|
24915
|
+
// }, [cd])
|
|
24916
|
+
|
|
24917
|
+
var onAdd = function onAdd() {
|
|
24918
|
+
if (value.length < licenceLimit) {
|
|
24919
|
+
setVal([].concat(_toConsumableArray(value), ['']));
|
|
24920
|
+
}
|
|
24921
|
+
}; // 删除车牌号
|
|
24922
|
+
|
|
24923
|
+
|
|
24924
|
+
var onDelete = function onDelete() {
|
|
24925
|
+
if (value.length > 0) {
|
|
24926
|
+
var dd = value.slice(0, -1);
|
|
24927
|
+
setVal(dd);
|
|
24928
|
+
}
|
|
24929
|
+
};
|
|
24930
|
+
|
|
24931
|
+
console.log(value.length);
|
|
24932
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, value.length > 0 && value.map(function (item, key) {
|
|
24933
|
+
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24934
|
+
span: 6
|
|
24935
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24936
|
+
label: "\u8F66\u724C\u53F7",
|
|
24937
|
+
key: key
|
|
24938
|
+
}, getFieldDecorator("realEstateDataDto[".concat(props.index, "].cphList[").concat(key, "]"), {
|
|
24939
|
+
rules: [{
|
|
24940
|
+
required: true,
|
|
24941
|
+
message: '请输入车牌号'
|
|
24942
|
+
}]
|
|
24943
|
+
})( /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24944
|
+
style: {
|
|
24945
|
+
width: '100%'
|
|
24946
|
+
},
|
|
24947
|
+
autoComplete: 'off',
|
|
24948
|
+
placeholder: "\u8BF7\u8F93\u5165\u8F66\u724C\u53F7"
|
|
24949
|
+
}))));
|
|
24950
|
+
}), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24951
|
+
span: 6
|
|
24952
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24953
|
+
style: {
|
|
24954
|
+
color: 'white'
|
|
24955
|
+
}
|
|
24956
|
+
}, "1"), /*#__PURE__*/React__default['default'].createElement("a", {
|
|
24957
|
+
style: {
|
|
24958
|
+
marginRight: 10
|
|
24959
|
+
},
|
|
24960
|
+
onClick: onAdd
|
|
24961
|
+
}, "\u6DFB\u52A0\u8F66\u724C\u53F7"), value.length > 1 && /*#__PURE__*/React__default['default'].createElement("a", {
|
|
24962
|
+
onClick: onDelete
|
|
24963
|
+
}, "\u5220\u9664"))));
|
|
24964
|
+
}; // const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
24965
|
+
// const { form } = props;
|
|
24966
|
+
// const { getFieldDecorator } = form;
|
|
24967
|
+
// const licenceLimit = 3; // 最多支持填写3个车牌号
|
|
24968
|
+
// // const { value = [] } = this.props;
|
|
24969
|
+
// const [value, setVal] = React.useState(props.value || ['']);
|
|
24970
|
+
// // const newArr = value.filter(e => !!e);
|
|
24971
|
+
// const newArrLength = value.length;
|
|
24972
|
+
// console.log(value, newArrLength)
|
|
24973
|
+
// // 新增车牌号
|
|
24974
|
+
// const onAdd = () => {
|
|
24975
|
+
// if (newArrLength < licenceLimit) {
|
|
24976
|
+
// setVal([...value, '']);
|
|
24977
|
+
// props.onChange?.([...value, ''])
|
|
24978
|
+
// }
|
|
24979
|
+
// }
|
|
24980
|
+
// // 删除车牌号
|
|
24981
|
+
// const onDelete = () => {
|
|
24982
|
+
// if (newArrLength > 0) {
|
|
24983
|
+
// const dd = value.slice(0, -1)
|
|
24984
|
+
// setVal(dd);
|
|
24985
|
+
// props.onChange?.(dd)
|
|
24986
|
+
// }
|
|
24987
|
+
// }
|
|
24988
|
+
// const onInputChange = (e: React.ChangeEvent<HTMLInputElement>, index: number) => {
|
|
24989
|
+
// console.log(e.target.value);
|
|
24990
|
+
// const dd = value.map((item, i) => {
|
|
24991
|
+
// if (i === index) {
|
|
24992
|
+
// return e.target.value
|
|
24993
|
+
// }
|
|
24994
|
+
// return item
|
|
24995
|
+
// })
|
|
24996
|
+
// setVal(dd);
|
|
24997
|
+
// props.onChange?.(dd)
|
|
24998
|
+
// }
|
|
24999
|
+
// return (
|
|
25000
|
+
// <>
|
|
25001
|
+
// {newArrLength > 0 && value.map((item, index) => {
|
|
25002
|
+
// return
|
|
25003
|
+
// <Form.Item label='车牌号' >
|
|
25004
|
+
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
25005
|
+
// rules: [{ required: true, }]
|
|
25006
|
+
// })(
|
|
25007
|
+
// <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
25008
|
+
// )}
|
|
25009
|
+
// </Form.Item>
|
|
25010
|
+
// // <Col span={6} >
|
|
25011
|
+
// // <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
25012
|
+
// // </Col>
|
|
25013
|
+
// })}
|
|
25014
|
+
// <Button type="link" onClick={onAdd}>添加车牌号</Button>
|
|
25015
|
+
// {newArrLength > 1 && <Button type="link" onClick={onDelete}>删除</Button>}
|
|
25016
|
+
// </>
|
|
25017
|
+
// )
|
|
25018
|
+
// }
|
|
25019
|
+
|
|
24801
25020
|
var css_248z$s = ".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.kts-invoice-operate-real-estate-info-digtal .break-word {\n word-break: break-word;\n}\n";
|
|
24802
25021
|
styleInject(css_248z$s);
|
|
24803
25022
|
|
package/package.json
CHANGED
|
@@ -9,6 +9,53 @@ export default () => {
|
|
|
9
9
|
|
|
10
10
|
React.useEffect(() => {
|
|
11
11
|
controller.run(async s => {
|
|
12
|
+
controller.state.goodsListState.goodsList = [{
|
|
13
|
+
"taxRate": 3,
|
|
14
|
+
"lineAttribute": 0,
|
|
15
|
+
"$index": "88a5549b-ede2-488a-962b-26dc1d5e4e3a",
|
|
16
|
+
"serialNo": 1,
|
|
17
|
+
"itemName": "车辆停放服务",
|
|
18
|
+
"lineAmountIncludeTax": 6,
|
|
19
|
+
"taxAmount": 0.17,
|
|
20
|
+
"lineAmountExcludeTax": 5.83,
|
|
21
|
+
cd:3,
|
|
22
|
+
},{
|
|
23
|
+
"taxRate": 3,
|
|
24
|
+
"lineAttribute": 0,
|
|
25
|
+
"$index": "88a5549b-ede2-488a-962b-26dc1d5e4e31",
|
|
26
|
+
"serialNo": 1,
|
|
27
|
+
"itemName": "车辆停放服务",
|
|
28
|
+
"lineAmountIncludeTax": 6,
|
|
29
|
+
"taxAmount": 0.17,
|
|
30
|
+
"lineAmountExcludeTax": 5.83,
|
|
31
|
+
cd:2
|
|
32
|
+
}]
|
|
33
|
+
window.setTimeout(() => {
|
|
34
|
+
controller.formList.get('realEstateInfo')?.setFieldsValue({
|
|
35
|
+
realEstateDataDto: [
|
|
36
|
+
{
|
|
37
|
+
"$index": "88a5549b-ede2-488a-962b-26dc1d5e4e3a",
|
|
38
|
+
realEstateAddress: ['北京市', '北京市', '东城区'],
|
|
39
|
+
realEstateDetailedAddress: '东城区东华门大街',
|
|
40
|
+
leaseTerm: [moment('2023-07-06 10:43'), moment('2023-07-06 10:59')],
|
|
41
|
+
crossCitiesSign: 'Y',
|
|
42
|
+
realEstateNumber: '123456789',
|
|
43
|
+
realEstateUnit: '平方米',
|
|
44
|
+
cphList:['京b22132','渝a12345','渝a1x212'],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"$index": "88a5549b-ede2-488a-962b-26dc1d5e4e31",
|
|
48
|
+
realEstateAddress: ['北京市', '北京市', '东城区'],
|
|
49
|
+
realEstateDetailedAddress: '东城区东华门大街',
|
|
50
|
+
leaseTerm: [moment('2023-07-06 10:43'), moment('2023-07-06 10:59')],
|
|
51
|
+
crossCitiesSign: 'Y',
|
|
52
|
+
realEstateNumber: '123456789',
|
|
53
|
+
realEstateUnit: '平方米',
|
|
54
|
+
cphList:['渝b22132','陕a12345',],
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
}, 1000)
|
|
12
59
|
})
|
|
13
60
|
}, [])
|
|
14
61
|
const onSave = async () => {
|
|
@@ -5,7 +5,7 @@ import { Form } 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';
|
|
8
|
-
import { Cascader, Col, DatePicker, Input, Row, Select } from "kts-components-antd-x4";
|
|
8
|
+
import { Button, Cascader, Col, DatePicker, Input, Row, Select } from "kts-components-antd-x4";
|
|
9
9
|
import moment from "moment";
|
|
10
10
|
|
|
11
11
|
const { RangePicker } = DatePicker;
|
|
@@ -37,10 +37,24 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
37
37
|
const readOnly = React.useMemo(() => model === 'readOnly', [model]);
|
|
38
38
|
|
|
39
39
|
const goodsList = controller.useMemo(s => s.goodsListState.goodsList, []);
|
|
40
|
+
//outcome-104 任务 https://wiki.dev.kingxunlian.com/pages/viewpage.action?pageId=180355189
|
|
41
|
+
//商品和服务税收分类合并编码为“3040502020200000000”时,视为停车费业务,针对停车费业务,蓝字发票增加以下判断:
|
|
42
|
+
// 单位必须为“平方米”;
|
|
43
|
+
// 项目名称必须为“车辆停放服务”;
|
|
44
|
+
// 车牌号必填,最多支持填写3个车牌号;除该场景车牌号必须为空;
|
|
45
|
+
// 租赁期起止格式必须为“yyyy-MM-dd HH:mm(租赁期起)”+“空格”+“yyyy-MM-dd HH:mm(租赁期止)。
|
|
46
|
+
const isParkFee = React.useCallback((taxClassificationCode?: string) => {
|
|
47
|
+
if (taxClassificationCode === '3040502020200000000') {
|
|
48
|
+
return false
|
|
49
|
+
} else {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}, [])
|
|
53
|
+
|
|
40
54
|
const indexRef = React.useRef<any>([]);
|
|
41
55
|
useEffect(() => {
|
|
42
56
|
const dd = goodsList?.reduce((acc: any, cur: any) => {
|
|
43
|
-
if (cur.lineAttribute !==1) {
|
|
57
|
+
if (cur.lineAttribute !== 1) {
|
|
44
58
|
acc.push(cur.$index)
|
|
45
59
|
}
|
|
46
60
|
return acc
|
|
@@ -48,7 +62,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
48
62
|
indexRef.current = dd;
|
|
49
63
|
}, [goodsList, indexRef])
|
|
50
64
|
// 注册 form
|
|
51
|
-
|
|
65
|
+
|
|
52
66
|
controller.useForm('realEstateInfo', form);
|
|
53
67
|
const getList = () => {
|
|
54
68
|
const decrease = indexRef.current.length > goodsList.length
|
|
@@ -70,9 +84,9 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
70
84
|
});
|
|
71
85
|
}
|
|
72
86
|
}
|
|
73
|
-
|
|
74
|
-
return goodsList.filter(item=>item.lineAttribute !== 1).map((item, index) => {
|
|
87
|
+
return goodsList.filter(item => item.lineAttribute !== 1).map((item, index) => {
|
|
75
88
|
if (item.lineAttribute !== 1) {
|
|
89
|
+
const isParkFeeItem = isParkFee(item.taxClassificationCode)
|
|
76
90
|
return <Row gutter={[17, 0]} >
|
|
77
91
|
<Col span={6} >
|
|
78
92
|
<Form.Item style={{ display: 'none' }}>
|
|
@@ -121,17 +135,31 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
121
135
|
)}
|
|
122
136
|
</Form.Item>
|
|
123
137
|
</Col>
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
138
|
+
{!isParkFeeItem &&
|
|
139
|
+
<Col span={6} >
|
|
140
|
+
<Form.Item label='租赁期起止' >
|
|
141
|
+
{getFieldDecorator(`realEstateDataDto[${index}].leaseTerm`, {
|
|
142
|
+
rules: readOnly ? [] : [{ required: true, message: '请输入租赁期' }]
|
|
143
|
+
})(
|
|
144
|
+
readOnly
|
|
145
|
+
? <MyArrMoment />
|
|
146
|
+
: <RangePicker style={{ width: '100%' }} />
|
|
147
|
+
)}
|
|
148
|
+
</Form.Item>
|
|
149
|
+
</Col>}
|
|
150
|
+
{isParkFeeItem &&
|
|
151
|
+
<Col span={6} >
|
|
152
|
+
<Form.Item label='租赁期起止' >
|
|
153
|
+
{getFieldDecorator(`realEstateDataDto[${index}].leaseTerm`, {
|
|
154
|
+
rules: readOnly ? [] : [{ required: true, message: '请输入租赁期' }]
|
|
155
|
+
})(
|
|
156
|
+
readOnly
|
|
157
|
+
? <MyArrMomentTime />
|
|
158
|
+
: <RangePicker style={{ width: '100%' }} showTime={{ format: 'HH:mm' }} format="YYYY-MM-DD HH:mm" />
|
|
159
|
+
)}
|
|
160
|
+
</Form.Item>
|
|
161
|
+
</Col>
|
|
162
|
+
}
|
|
135
163
|
<Col span={6} >
|
|
136
164
|
<Form.Item label='跨地(市)标志' >
|
|
137
165
|
{getFieldDecorator(`realEstateDataDto[${index}].crossCitiesSign`, {
|
|
@@ -162,25 +190,56 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
162
190
|
)}
|
|
163
191
|
</Form.Item>
|
|
164
192
|
</Col>
|
|
165
|
-
|
|
166
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
<Select
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
193
|
+
{!isParkFeeItem &&
|
|
194
|
+
<Col span={6} >
|
|
195
|
+
<Form.Item label='面积单位' >
|
|
196
|
+
{getFieldDecorator(`realEstateDataDto[${index}].realEstateUnit`, {
|
|
197
|
+
rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
198
|
+
})(
|
|
199
|
+
readOnly
|
|
200
|
+
? <MyDiv />
|
|
201
|
+
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
202
|
+
<Select.Option value="平方千米">平方千米</Select.Option>
|
|
203
|
+
<Select.Option value="平方米">平方米</Select.Option>
|
|
204
|
+
<Select.Option value="公顷">公顷</Select.Option>
|
|
205
|
+
<Select.Option value="亩">亩</Select.Option>
|
|
206
|
+
<Select.Option value="h㎡">h㎡</Select.Option>
|
|
207
|
+
<Select.Option value="k㎡">k㎡</Select.Option>
|
|
208
|
+
<Select.Option value="㎡">㎡</Select.Option>
|
|
209
|
+
</Select>
|
|
210
|
+
)}
|
|
211
|
+
</Form.Item>
|
|
212
|
+
</Col>
|
|
213
|
+
}
|
|
214
|
+
{isParkFeeItem &&
|
|
215
|
+
<Col span={6} >
|
|
216
|
+
<Form.Item label='面积单位' >
|
|
217
|
+
{getFieldDecorator(`realEstateDataDto[${index}].realEstateUnit`, {
|
|
218
|
+
rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
219
|
+
})(
|
|
220
|
+
readOnly
|
|
221
|
+
? <MyDiv />
|
|
222
|
+
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
223
|
+
<Select.Option value="平方米">平方米</Select.Option>
|
|
224
|
+
</Select>
|
|
225
|
+
)}
|
|
226
|
+
</Form.Item>
|
|
227
|
+
</Col>
|
|
228
|
+
}
|
|
229
|
+
{isParkFeeItem &&
|
|
230
|
+
<LicensePlateNumber form={form} index={index} cd={item.cd} />
|
|
231
|
+
// <Col span={6} >
|
|
232
|
+
// <Form.Item label='车牌号' >
|
|
233
|
+
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
234
|
+
// rules: readOnly ? [] : [{ required: true, message: '请选择面积单位' }]
|
|
235
|
+
// })(
|
|
236
|
+
// readOnly
|
|
237
|
+
// ? <MyDiv />
|
|
238
|
+
// : <LicensePlateNumber form={form}/>
|
|
239
|
+
// )}
|
|
240
|
+
// </Form.Item>
|
|
241
|
+
// </Col>
|
|
242
|
+
}
|
|
184
243
|
</Row>
|
|
185
244
|
}
|
|
186
245
|
})
|
|
@@ -227,7 +286,18 @@ class MyArrMoment extends React.Component<{ value?: moment.Moment[], style?: Rea
|
|
|
227
286
|
)
|
|
228
287
|
}
|
|
229
288
|
}
|
|
230
|
-
|
|
289
|
+
class MyArrMomentTime extends React.Component<{ value?: moment.Moment[], style?: React.CSSProperties }> {
|
|
290
|
+
render(): React.ReactNode {
|
|
291
|
+
const { value = [] } = this.props
|
|
292
|
+
return (
|
|
293
|
+
<div style={this.props.style}>
|
|
294
|
+
<span>{moment.isMoment(value[0]) && value[0].format('YYYY-MM-DD HH:mm')}</span>
|
|
295
|
+
<span style={{ color: '#9F603D', fontWeight: 600 }} > - </span>
|
|
296
|
+
<span>{moment.isMoment(value[1]) && value[1].format('YYYY-MM-DD HH:mm')}</span>
|
|
297
|
+
</div>
|
|
298
|
+
)
|
|
299
|
+
}
|
|
300
|
+
}
|
|
231
301
|
class MyNY extends React.Component<{ value?: 'Y' | 'N', style?: React.CSSProperties }> {
|
|
232
302
|
render(): React.ReactNode {
|
|
233
303
|
return (
|
|
@@ -239,4 +309,137 @@ class MyNY extends React.Component<{ value?: 'Y' | 'N', style?: React.CSSPropert
|
|
|
239
309
|
)
|
|
240
310
|
}
|
|
241
311
|
}
|
|
312
|
+
interface PriceInputProps {
|
|
313
|
+
// value?: string[];
|
|
314
|
+
// style?: React.CSSProperties
|
|
315
|
+
// onChange?: (value: string[]) => void;
|
|
316
|
+
form: any,
|
|
317
|
+
index: number
|
|
318
|
+
cd?: number
|
|
319
|
+
}
|
|
320
|
+
const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
321
|
+
|
|
322
|
+
const { form } = props;
|
|
323
|
+
|
|
324
|
+
const { getFieldDecorator } = form;
|
|
325
|
+
const licenceLimit = 3; // 最多支持填写3个车牌号
|
|
326
|
+
const formData: any[] = form.getFieldValue('realEstateDataDto');
|
|
327
|
+
const [value, setVal] = React.useState(new Array(props.cd || 1).fill(''));
|
|
328
|
+
const cd = React.useMemo(() => formData[props.index]?.cd, [formData[props.index]?.cd])
|
|
329
|
+
// useEffect(() => {
|
|
330
|
+
// if (cd) {
|
|
331
|
+
// const dd = value.concat(new Array(cd.length-1).fill(''))
|
|
332
|
+
// setVal(dd);
|
|
333
|
+
// }
|
|
334
|
+
// }, [cd])
|
|
335
|
+
const onAdd = () => {
|
|
336
|
+
if (value.length < licenceLimit) {
|
|
337
|
+
setVal([...value, '']);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
// 删除车牌号
|
|
341
|
+
const onDelete = () => {
|
|
342
|
+
if (value.length > 0) {
|
|
343
|
+
const dd = value.slice(0, -1)
|
|
344
|
+
setVal(dd);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
console.log(value.length)
|
|
349
|
+
return <>
|
|
350
|
+
{
|
|
351
|
+
value.length > 0 && value.map((item: string[], key: number) => {
|
|
352
|
+
|
|
353
|
+
return <Col span={6} ><Form.Item label='车牌号' key={key}>
|
|
354
|
+
{getFieldDecorator(`realEstateDataDto[${props.index}].cphList[${key}]`, {
|
|
355
|
+
rules: [{ required: true, message: '请输入车牌号' }]
|
|
356
|
+
})(
|
|
357
|
+
<Input style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
358
|
+
)}
|
|
359
|
+
</Form.Item>
|
|
360
|
+
</Col>
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
}
|
|
365
|
+
{/* <Col span={6} style={{ display: 'none' }}><Form.Item label='长度' >
|
|
366
|
+
{getFieldDecorator(`realEstateDataDto[${props.index}].cd`, {
|
|
367
|
+
|
|
368
|
+
})(
|
|
369
|
+
<Select />
|
|
370
|
+
)}
|
|
371
|
+
</Form.Item>
|
|
372
|
+
</Col> */}
|
|
373
|
+
<Col span={6} >
|
|
374
|
+
<Form.Item >
|
|
375
|
+
<div style={{ color: 'white' }}>1</div>
|
|
376
|
+
<a style={{ marginRight: 10 }} onClick={onAdd}>添加车牌号</a>
|
|
377
|
+
{value.length > 1 && <a onClick={onDelete}>删除</a>}
|
|
378
|
+
</Form.Item>
|
|
379
|
+
</Col>
|
|
380
|
+
</>
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
// const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
|
|
385
|
+
|
|
386
|
+
// const { form } = props;
|
|
387
|
+
|
|
388
|
+
// const { getFieldDecorator } = form;
|
|
389
|
+
// const licenceLimit = 3; // 最多支持填写3个车牌号
|
|
390
|
+
// // const { value = [] } = this.props;
|
|
391
|
+
// const [value, setVal] = React.useState(props.value || ['']);
|
|
392
|
+
// // const newArr = value.filter(e => !!e);
|
|
393
|
+
// const newArrLength = value.length;
|
|
394
|
+
// console.log(value, newArrLength)
|
|
395
|
+
// // 新增车牌号
|
|
396
|
+
// const onAdd = () => {
|
|
397
|
+
// if (newArrLength < licenceLimit) {
|
|
398
|
+
// setVal([...value, '']);
|
|
399
|
+
// props.onChange?.([...value, ''])
|
|
400
|
+
// }
|
|
401
|
+
// }
|
|
402
|
+
// // 删除车牌号
|
|
403
|
+
// const onDelete = () => {
|
|
404
|
+
// if (newArrLength > 0) {
|
|
405
|
+
// const dd = value.slice(0, -1)
|
|
406
|
+
// setVal(dd);
|
|
407
|
+
// props.onChange?.(dd)
|
|
408
|
+
// }
|
|
409
|
+
// }
|
|
410
|
+
// const onInputChange = (e: React.ChangeEvent<HTMLInputElement>, index: number) => {
|
|
411
|
+
// console.log(e.target.value);
|
|
412
|
+
// const dd = value.map((item, i) => {
|
|
413
|
+
// if (i === index) {
|
|
414
|
+
// return e.target.value
|
|
415
|
+
// }
|
|
416
|
+
// return item
|
|
417
|
+
// })
|
|
418
|
+
// setVal(dd);
|
|
419
|
+
// props.onChange?.(dd)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
// }
|
|
423
|
+
// return (
|
|
424
|
+
|
|
425
|
+
// <>
|
|
426
|
+
// {newArrLength > 0 && value.map((item, index) => {
|
|
427
|
+
// return
|
|
428
|
+
// <Form.Item label='车牌号' >
|
|
429
|
+
// {getFieldDecorator(`realEstateDataDto[${index}].licensePlateNumber`, {
|
|
430
|
+
// rules: [{ required: true, }]
|
|
431
|
+
// })(
|
|
432
|
+
// <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
433
|
+
// )}
|
|
434
|
+
// </Form.Item>
|
|
435
|
+
// // <Col span={6} >
|
|
436
|
+
// // <Input onChange={(e) => { onInputChange(e, index) }} key={index} style={{ width: '100%' }} autoComplete='off' placeholder="请输入车牌号" />
|
|
437
|
+
// // </Col>
|
|
438
|
+
// })}
|
|
439
|
+
|
|
440
|
+
// <Button type="link" onClick={onAdd}>添加车牌号</Button>
|
|
441
|
+
// {newArrLength > 1 && <Button type="link" onClick={onDelete}>删除</Button>}
|
|
442
|
+
// </>
|
|
242
443
|
|
|
444
|
+
// )
|
|
445
|
+
// }
|