diff --git a/src/modules/FINANCE/components/ElectricInfo/PowerBillHead.jsx b/src/modules/FINANCE/components/ElectricInfo/PowerBillHead.jsx index b9664f4..1b41f05 100644 --- a/src/modules/FINANCE/components/ElectricInfo/PowerBillHead.jsx +++ b/src/modules/FINANCE/components/ElectricInfo/PowerBillHead.jsx @@ -90,19 +90,15 @@ class PowerBillHead extends React.Component { - - {getFieldDecorator('roomNumber')( + + {getFieldDecorator('clientName')( )} - - {getFieldDecorator('clientName')( + + {getFieldDecorator('roomNumber')( )} diff --git a/src/modules/FINANCE/components/WaterFee/WaterBillHead.jsx b/src/modules/FINANCE/components/WaterFee/WaterBillHead.jsx index 81c15c8..339f5ee 100644 --- a/src/modules/FINANCE/components/WaterFee/WaterBillHead.jsx +++ b/src/modules/FINANCE/components/WaterFee/WaterBillHead.jsx @@ -113,19 +113,15 @@ class WaterBillHead extends React.Component { - - {getFieldDecorator('roomNumber')( + + {getFieldDecorator('clientSubletName')( )} - - {getFieldDecorator('clientSubletName')( + + {getFieldDecorator('roomNumber')( )} diff --git a/src/modules/FINANCE/containers/Electricity.jsx b/src/modules/FINANCE/containers/Electricity.jsx index 8373cb4..70abff8 100644 --- a/src/modules/FINANCE/containers/Electricity.jsx +++ b/src/modules/FINANCE/containers/Electricity.jsx @@ -138,11 +138,11 @@ class Electricity extends React.Component { }, { title: '收费类型', dataIndex: 'wattHourType', - render: function (text, record, index) { + render: function (text) { let dataIndex = '固定单价' - if (record.wattHourType === 1) { + if (text === 1) { dataIndex = '差额单价' - } else if (record.wattHourType === 2) { + } else if (text === 2) { dataIndex = '功峰平谷' } return ( diff --git a/src/modules/FINANCE/containers/details/ElectricCharge/ElectricChargeDetails.jsx b/src/modules/FINANCE/containers/details/ElectricCharge/ElectricChargeDetails.jsx index a73c993..69f736d 100644 --- a/src/modules/FINANCE/containers/details/ElectricCharge/ElectricChargeDetails.jsx +++ b/src/modules/FINANCE/containers/details/ElectricCharge/ElectricChargeDetails.jsx @@ -151,7 +151,9 @@ class ElectricChargeDetails extends React.Component { } handleCancel = (e) => { this.setState({ visible: false, - isFirst: true}) + isFirst: true, + collectMoney: false, + collectPenal: false}) this.props.refresh({}, {}, {}) } initialRemarks = async (nextProps) => { @@ -376,7 +378,7 @@ class ElectricChargeDetails extends React.Component {
最后修改: {feesInfo.createName} - {feesInfo.updateDate ? feesInfo.updateDate : feesInfo.createDate} + {feesInfo.createDate}
@@ -562,7 +564,7 @@ function ExamineSuccessState (props) { pagination={false} /> - {props.fees.defaultPaymentStatus !== 2 && + {props.fees.liquidatedDamages > 0 &&

{ + console.log('powerType : ' + this.state.powerType) + this.deleteTotalColunm() let json = this.props.form.getFieldsValue() let jsonTwo = {} @@ -545,12 +547,16 @@ class sumElectricityAddUp extends React.Component { let powerLossRatio = this.state.Contract.powerLossRatio ? this.state.Contract.powerLossRatio / 100 : 0 if (this.state.powerType === 0) { - jsonTwo['electricLoss'] = 0 + jsonTwo['electricLoss'] = 0 // 电损 jsonTwo['sumElectricity'] = (jsonTwo.needElectricity * json.ratio) ? (json.needElectricity * json.ratio) : 0 } else { jsonTwo['electricLoss'] = this.state.Contract.powerLossRatio ? jsonTwo.needElectricity * jsonTwo.ratio * powerLossRatio : 0 jsonTwo['sumElectricity'] = jsonTwo.needElectricity * jsonTwo.ratio + jsonTwo['electricLoss'] } + + console.log('电量 : ' + jsonTwo.needElectricity) + console.log('变比 : ' + jsonTwo.ratio) + console.log('该用户电损百分比 : ' + powerLossRatio) jsonTwo['singleMoney'] = (jsonTwo.sumElectricity * jsonTwo.unitPrice) ? (jsonTwo.sumElectricity * jsonTwo.unitPrice) : 0 let sumElectricityRecordlList = this.state.sumElectricityRecordlList sumElectricityRecordlList.push(jsonTwo) @@ -638,28 +644,29 @@ class sumElectricityAddUp extends React.Component { } // 选择房间编号 chooseRoomNumber = async (value) => { - console.log(value) - // 查询上次抄表数 - this.setState({loading: true}) - let lastTimeData = await apiPost( - '/ElectricityFees/LastTimeNumber', - { - roomNumberOne: value, - buildingIdOne: this.state.Contract.buildId + if (value) { + // 查询上次抄表数 + this.setState({loading: true}) + let lastTimeData = await apiPost( + '/ElectricityFees/LastTimeNumber', + { + roomNumberOne: value, + buildingIdOne: this.state.Contract.buildId + } + ) + lastTimeData = lastTimeData.data + if (lastTimeData !== null && lastTimeData !== '' && typeof (lastTimeData) !== 'undefined') { + this.props.form.setFieldsValue({ + lastSurfaceNumber: this.props.id ? lastTimeData.lastSurfaceNumber : lastTimeData.surfaceNumber, + electricCostName: this.state.powerType !== 2 ? value : '' + }) + } else { + this.props.form.setFieldsValue({ + electricCostName: value + }) } - ) - lastTimeData = lastTimeData.data - if (lastTimeData !== null && lastTimeData !== '' && typeof (lastTimeData) !== 'undefined') { - this.props.form.setFieldsValue({ - lastSurfaceNumber: this.props.id ? lastTimeData.lastSurfaceNumber : lastTimeData.surfaceNumber, - electricCostName: this.state.powerType !== 2 ? value : '' - }) - } else { - this.props.form.setFieldsValue({ - electricCostName: value - }) + this.setState({loading: false}) } - this.setState({loading: false}) } handleConfirmPassword = (rule, value, callback) => { debugger @@ -878,6 +885,7 @@ class sumElectricityAddUp extends React.Component { >{getFieldDecorator('roomNumberOne')( )} - - {getFieldDecorator('clientName')( + + {getFieldDecorator('roomNumber')( )} diff --git a/src/modules/PROPERTY/components/ElectricCharge/PowerInfomation.jsx b/src/modules/PROPERTY/components/ElectricCharge/PowerInfomation.jsx index 328cf75..c747a0e 100644 --- a/src/modules/PROPERTY/components/ElectricCharge/PowerInfomation.jsx +++ b/src/modules/PROPERTY/components/ElectricCharge/PowerInfomation.jsx @@ -10,7 +10,8 @@ class PowerInfomation extends React.Component { list: [], isFirst: true, visible: false, - mainColumns: [] + mainColumns: [], + value: 2 } async initialRemarks (nextProps) { if (this.state.isFirst && nextProps.visible) { @@ -338,7 +339,7 @@ class PowerInfomation extends React.Component {
最后修改: {fees.createName} - {fees.updateDate ? fees.updateDate : fees.createDate} + {fees.createDate}
diff --git a/src/modules/PROPERTY/components/WaterCharge/WaterBillHead.jsx b/src/modules/PROPERTY/components/WaterCharge/WaterBillHead.jsx index 4f59ba8..dcf3b01 100644 --- a/src/modules/PROPERTY/components/WaterCharge/WaterBillHead.jsx +++ b/src/modules/PROPERTY/components/WaterCharge/WaterBillHead.jsx @@ -122,19 +122,15 @@ class WaterBillHead extends React.Component {
- - {getFieldDecorator('roomNumber')( + + {getFieldDecorator('clientSubletName')( )} - - {getFieldDecorator('clientSubletName')( + + {getFieldDecorator('roomNumber')( )} diff --git a/src/modules/PROPERTY/containers/ElectricCharge.jsx b/src/modules/PROPERTY/containers/ElectricCharge.jsx index 81b4b14..70e5b47 100644 --- a/src/modules/PROPERTY/containers/ElectricCharge.jsx +++ b/src/modules/PROPERTY/containers/ElectricCharge.jsx @@ -197,17 +197,15 @@ class ElectricCharge extends React.Component { title: '收费类型', dataIndex: 'wattHourType', render: function (text) { - if (text) { - let dataIndex = '固定单价' - if (text === 1) { - dataIndex = '差额单价' - } else if (text === 2) { - dataIndex = '功峰平谷' - } - return ( -

{dataIndex}

- ) + let dataIndex = '固定单价' + if (text === 1) { + dataIndex = '差额单价' + } else if (text === 2) { + dataIndex = '功峰平谷' } + return ( +

{dataIndex}

+ ) } }, { title: '本期电费周期', @@ -280,7 +278,7 @@ class ElectricCharge extends React.Component { }, { title: ' 操作', fixed: 'right', - width: '80', + width: '150', dataIndex: 'opt', render: function (text, record) { console.log(record) diff --git a/src/modules/PROPERTY/containers/details/Contract/ContractDetail.jsx b/src/modules/PROPERTY/containers/details/Contract/ContractDetail.jsx index b4e12d6..debf565 100644 --- a/src/modules/PROPERTY/containers/details/Contract/ContractDetail.jsx +++ b/src/modules/PROPERTY/containers/details/Contract/ContractDetail.jsx @@ -216,8 +216,12 @@ class ContractDetail extends React.Component { 元/度 变比 - {this.state.contract.powerRatio} 电损比 - {this.state.contract.powerLossRatio}% + {this.state.contract.powerRatio} + {this.state.contract.powerType !== 0 && + + 电损比{this.state.contract.powerLossRatio}% + + } diff --git a/src/modules/PROPERTY/containers/details/Contract/ElectricityDetail.jsx b/src/modules/PROPERTY/containers/details/Contract/ElectricityDetail.jsx index 1b47fb9..c00e3bd 100644 --- a/src/modules/PROPERTY/containers/details/Contract/ElectricityDetail.jsx +++ b/src/modules/PROPERTY/containers/details/Contract/ElectricityDetail.jsx @@ -121,7 +121,11 @@ class ElectricityDetail extends React.Component { 功峰平谷 } - 单价 {this.state.contract.powerUnitPrice} 元/度 变比 {this.state.contract.powerRatio} 电损比 {this.state.contract.powerLossRatio}% + 单价 {this.state.contract.powerUnitPrice} 元/度 变比 {this.state.contract.powerRatio} + {this.state.contract.powerType !== 0 && + 电损比 {this.state.contract.powerLossRatio}% + } + 水费收费方式: