|
@@ -150,7 +150,7 @@ class PayRecord extends Component{
|
|
console.log(err)
|
|
console.log(err)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(isNaN(parseFloat(values.quantity)) || values.quantity<=0){
|
|
|
|
|
|
+ if(values.quantity !== undefined && (isNaN(parseFloat(values.quantity)) || values.quantity<=0)){
|
|
message.warning('申请支付数量不能小于等于零');
|
|
message.warning('申请支付数量不能小于等于零');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -386,6 +386,7 @@ class PayRecord extends Component{
|
|
const { paymentLogs,paymentDetails,financialPaymentList } = this.state;
|
|
const { paymentLogs,paymentDetails,financialPaymentList } = this.state;
|
|
return(
|
|
return(
|
|
<Modal
|
|
<Modal
|
|
|
|
+ title={paymentDetails.status !== 4 ? (paymentDetails.chooseType === 2 ? '申请支付官费' : '申请支付外包费用') : '支付详情'}
|
|
className='payRecordComponent'
|
|
className='payRecordComponent'
|
|
width={700}
|
|
width={700}
|
|
maskClosable={false}
|
|
maskClosable={false}
|
|
@@ -398,7 +399,6 @@ class PayRecord extends Component{
|
|
<Spin spinning={this.state.loading}>
|
|
<Spin spinning={this.state.loading}>
|
|
<div>
|
|
<div>
|
|
{/*0第三方 1催款 2官费*/}
|
|
{/*0第三方 1催款 2官费*/}
|
|
- <div>{paymentDetails.chooseType === 2 ? '申请支付官费' : '申请支付外包费用'}</div>
|
|
|
|
<Form
|
|
<Form
|
|
{...layout}
|
|
{...layout}
|
|
name="basic"
|
|
name="basic"
|
|
@@ -409,130 +409,133 @@ class PayRecord extends Component{
|
|
this.handleSubmit(e)
|
|
this.handleSubmit(e)
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="付款单位/个人:"
|
|
|
|
- >
|
|
|
|
- <div>{paymentDetails.companyName}</div>
|
|
|
|
- </Form.Item>
|
|
|
|
- {/*0第三方 1催款 2官费*/}
|
|
|
|
- {paymentDetails.chooseType !== 2 ? <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label={'单价(万元):'}
|
|
|
|
- >
|
|
|
|
|
|
+ {paymentDetails.status !== 4 ?
|
|
<div>
|
|
<div>
|
|
|
|
+ <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="付款单位/个人:"
|
|
|
|
+ >
|
|
|
|
+ <div>{paymentDetails.companyName}</div>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ {/*0第三方 1催款 2官费*/}
|
|
|
|
+ {paymentDetails.chooseType !== 2 ? <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label={'单价(万元):'}
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ {/* projectType 0正常 1专利 2软著 3审计*/}
|
|
|
|
+ {/* isAuditPayment 是否为财务*/}
|
|
|
|
+ {/* isAuditPaymentGLY 是否为财务经理或者为财务管理员*/}
|
|
|
|
+ {/* chooseType 0第三方 1催款 2官费*/}
|
|
|
|
+ {/*{*/}
|
|
|
|
+ {/* (paymentDetails.chooseType === 2 || this.props.projectType === 2 || (this.props.projectType === 3 && this.props.patentType === 0) ) && !this.props.isAuditPayment?*/}
|
|
|
|
+ {/* '***':*/}
|
|
|
|
+ {/* paymentDetails.initialUnitPrice*/}
|
|
|
|
+ {/*}*/}
|
|
|
|
+ {isNaN(parseFloat(paymentDetails.initialUnitPrice)) ? paymentDetails.initialUnitPrice : parseFloat(paymentDetails.initialUnitPrice)}
|
|
|
|
+ </div>
|
|
|
|
+ </Form.Item> : null}
|
|
|
|
+ <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="数量:"
|
|
|
|
+ >
|
|
|
|
+ {getFieldDecorator('initialQuantity', {
|
|
|
|
+ initialValue: parseInt(paymentDetails.initialQuantity),
|
|
|
|
+ rules: [{ required: false, message: '请输入數量!' }],
|
|
|
|
+ })(
|
|
|
|
+ <Input disabled={true} style={{ width: '200px' }} placeholder="请输入數量" type={'number'}/>
|
|
|
|
+ )}
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="总价(万元):"
|
|
|
|
+ >
|
|
|
|
+ <div>{isNaN(parseFloat(paymentDetails.initialTotalAmount)) ? paymentDetails.initialTotalAmount : parseFloat(paymentDetails.initialTotalAmount)}</div>
|
|
|
|
+ </Form.Item>
|
|
|
|
+ {/*官费不显示已付*/}
|
|
|
|
+ {paymentDetails.chooseType !== 2 ? <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="已付(万元):"
|
|
|
|
+ >
|
|
|
|
+ <div>{isNaN(parseFloat(paymentDetails.initialPaymentAmount)) ? paymentDetails.initialPaymentAmount : parseFloat(paymentDetails.initialPaymentAmount)}</div>
|
|
|
|
+ </Form.Item> : <div/>}
|
|
|
|
+ {/*0第三方 1催款 2官费*/}
|
|
{/* projectType 0正常 1专利 2软著 3审计*/}
|
|
{/* projectType 0正常 1专利 2软著 3审计*/}
|
|
- {/* isAuditPayment 是否为财务*/}
|
|
|
|
- {/* isAuditPaymentGLY 是否为财务经理或者为财务管理员*/}
|
|
|
|
- {/* chooseType 0第三方 1催款 2官费*/}
|
|
|
|
- {/*{*/}
|
|
|
|
- {/* (paymentDetails.chooseType === 2 || this.props.projectType === 2 || (this.props.projectType === 3 && this.props.patentType === 0) ) && !this.props.isAuditPayment?*/}
|
|
|
|
- {/* '***':*/}
|
|
|
|
- {/* paymentDetails.initialUnitPrice*/}
|
|
|
|
- {/*}*/}
|
|
|
|
- {isNaN(parseFloat(paymentDetails.initialUnitPrice)) ? paymentDetails.initialUnitPrice : parseFloat(paymentDetails.initialUnitPrice)}
|
|
|
|
- </div>
|
|
|
|
- </Form.Item> : null}
|
|
|
|
- <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="数量:"
|
|
|
|
- >
|
|
|
|
- {getFieldDecorator('initialQuantity', {
|
|
|
|
- initialValue: parseInt(paymentDetails.initialQuantity),
|
|
|
|
- rules: [{ required: false, message: '请输入數量!' }],
|
|
|
|
- })(
|
|
|
|
- <Input disabled={true} style={{ width: '200px' }} placeholder="请输入數量" type={'number'}/>
|
|
|
|
- )}
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="总价(万元):"
|
|
|
|
- >
|
|
|
|
- <div>{isNaN(parseFloat(paymentDetails.initialTotalAmount)) ? paymentDetails.initialTotalAmount : parseFloat(paymentDetails.initialTotalAmount)}</div>
|
|
|
|
- </Form.Item>
|
|
|
|
- {/*官费不显示已付*/}
|
|
|
|
- {paymentDetails.chooseType !== 2 ? <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="已付(万元):"
|
|
|
|
- >
|
|
|
|
- <div>{isNaN(parseFloat(paymentDetails.initialPaymentAmount)) ? paymentDetails.initialPaymentAmount : parseFloat(paymentDetails.initialPaymentAmount)}</div>
|
|
|
|
- </Form.Item> : <div/>}
|
|
|
|
- {/*0第三方 1催款 2官费*/}
|
|
|
|
- {/* projectType 0正常 1专利 2软著 3审计*/}
|
|
|
|
- {
|
|
|
|
- paymentDetails.chooseType === 2 || this.props.projectType === 1 || this.props.projectType === 2 ?
|
|
|
|
- <div style={{
|
|
|
|
- marginBottom:'8px',
|
|
|
|
- marginTop:'8px'
|
|
|
|
- }}>
|
|
|
|
- <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="本次申请支付数量:"
|
|
|
|
- >
|
|
|
|
- {getFieldDecorator('quantity', {
|
|
|
|
- initialValue: paymentDetails.quantity,
|
|
|
|
- rules: [{ required: true, message: '请输入本次申请支付数量!' }],
|
|
|
|
- })(
|
|
|
|
- <Input
|
|
|
|
- type={'number'}
|
|
|
|
- style={{ width: '200px' }}
|
|
|
|
- disabled={this.props.isAuditPaymentGLY ? this.props.isAuditPaymentGLY : ( this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2)}
|
|
|
|
- placeholder="请输入本次申请支付数量"
|
|
|
|
- onChange={(e)=>{
|
|
|
|
- if(!isNaN(parseFloat(paymentDetails.initialUnitPrice))){
|
|
|
|
- this.props.form.setFieldsValue({
|
|
|
|
- applicationAmount: ((parseFloat(paymentDetails.initialUnitPrice) * 1000000) * e.target.value) / 1000000,
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }}
|
|
|
|
- />
|
|
|
|
- )}
|
|
|
|
- </Form.Item>
|
|
|
|
- </div> : <div/>
|
|
|
|
- }
|
|
|
|
- <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="本次申请支付金额(万元):"
|
|
|
|
- >
|
|
|
|
- {getFieldDecorator('applicationAmount', {
|
|
|
|
- initialValue: parseFloat(paymentDetails.applicationAmount),
|
|
|
|
- rules: [
|
|
|
|
|
|
+ {
|
|
|
|
+ paymentDetails.chooseType === 2 || this.props.projectType === 1 || this.props.projectType === 2 ?
|
|
|
|
+ <div style={{
|
|
|
|
+ marginBottom:'8px',
|
|
|
|
+ marginTop:'8px'
|
|
|
|
+ }}>
|
|
|
|
+ <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="本次申请支付数量:"
|
|
|
|
+ >
|
|
|
|
+ {getFieldDecorator('quantity', {
|
|
|
|
+ initialValue: paymentDetails.quantity,
|
|
|
|
+ rules: [{ required: true, message: '请输入本次申请支付数量!' }],
|
|
|
|
+ })(
|
|
|
|
+ <Input
|
|
|
|
+ type={'number'}
|
|
|
|
+ style={{ width: '200px' }}
|
|
|
|
+ disabled={this.props.isAuditPaymentGLY ? this.props.isAuditPaymentGLY : ( this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2)}
|
|
|
|
+ placeholder="请输入本次申请支付数量"
|
|
|
|
+ onChange={(e)=>{
|
|
|
|
+ if(!isNaN(parseFloat(paymentDetails.initialUnitPrice))){
|
|
|
|
+ this.props.form.setFieldsValue({
|
|
|
|
+ applicationAmount: ((parseFloat(paymentDetails.initialUnitPrice) * 1000000) * e.target.value) / 1000000,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ )}
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div> : <div/>
|
|
|
|
+ }
|
|
|
|
+ <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="本次申请支付金额(万元):"
|
|
|
|
+ >
|
|
|
|
+ {getFieldDecorator('applicationAmount', {
|
|
|
|
+ initialValue: parseFloat(paymentDetails.applicationAmount),
|
|
|
|
+ rules: [
|
|
|
|
+ {
|
|
|
|
+ required: !(this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2),
|
|
|
|
+ message: '请输入本次申请支付金额!'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ })(
|
|
|
|
+ <Input
|
|
|
|
+ type={'number'}
|
|
|
|
+ style={{ width: '200px' }}
|
|
|
|
+ disabled={this.props.isAuditPaymentGLY ? this.props.isAuditPaymentGLY : paymentDetails.chooseType === 2 || (this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2)}
|
|
|
|
+ placeholder="请输入本次申请支付金额"/>
|
|
|
|
+ )}
|
|
|
|
+ </Form.Item>
|
|
|
|
+ <Form.Item
|
|
|
|
+ {...formItemLayout}
|
|
|
|
+ className='formItemStyle'
|
|
|
|
+ label="备注:"
|
|
|
|
+ >
|
|
{
|
|
{
|
|
- required: !(this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2),
|
|
|
|
- message: '请输入本次申请支付金额!'
|
|
|
|
|
|
+ (!this.props.isAuditPaymentGLY && !this.props.isAuditPayment && this.state.paymentDetails.status === 2) ?
|
|
|
|
+ getFieldDecorator('remarks', {
|
|
|
|
+ initialValue: paymentDetails.remarks,
|
|
|
|
+ rules: [{ required: true, message: '请输入备注!' }],
|
|
|
|
+ })(
|
|
|
|
+ <Input style={{ width: '200px' }} placeholder="请输入备注" type={'textarea'}/>
|
|
|
|
+ ) : <div>{paymentDetails.remarks}</div>
|
|
}
|
|
}
|
|
- ],
|
|
|
|
- })(
|
|
|
|
- <Input
|
|
|
|
- type={'number'}
|
|
|
|
- style={{ width: '200px' }}
|
|
|
|
- disabled={this.props.isAuditPaymentGLY ? this.props.isAuditPaymentGLY : paymentDetails.chooseType === 2 || (this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2)}
|
|
|
|
- placeholder="请输入本次申请支付金额"/>
|
|
|
|
- )}
|
|
|
|
- </Form.Item>
|
|
|
|
- <Form.Item
|
|
|
|
- {...formItemLayout}
|
|
|
|
- className='formItemStyle'
|
|
|
|
- label="备注:"
|
|
|
|
- >
|
|
|
|
- {
|
|
|
|
- (!this.props.isAuditPaymentGLY && !this.props.isAuditPayment && this.state.paymentDetails.status === 2) ?
|
|
|
|
- getFieldDecorator('remarks', {
|
|
|
|
- initialValue: paymentDetails.remarks,
|
|
|
|
- rules: [{ required: true, message: '请输入备注!' }],
|
|
|
|
- })(
|
|
|
|
- <Input style={{ width: '200px' }} placeholder="请输入备注" type={'textarea'}/>
|
|
|
|
- ) : <div>{paymentDetails.remarks}</div>
|
|
|
|
- }
|
|
|
|
- </Form.Item>
|
|
|
|
- <div className='payStateList'>
|
|
|
|
|
|
+ </Form.Item>
|
|
|
|
+ </div> : null}
|
|
|
|
+ <div className='payStateList' style={{borderTop:paymentDetails.status !== 4? '1px #000 dashed' : '0'}}>
|
|
<div className='listTitle' style={{color:'#F00'}}>
|
|
<div className='listTitle' style={{color:'#F00'}}>
|
|
支付状态:
|
|
支付状态:
|
|
<span style={{paddingLeft:'20px'}}>
|
|
<span style={{paddingLeft:'20px'}}>
|
|
@@ -561,7 +564,8 @@ class PayRecord extends Component{
|
|
value.status === 0 ? '(发起)' :
|
|
value.status === 0 ? '(发起)' :
|
|
value.status === 1 ? '(通过)':
|
|
value.status === 1 ? '(通过)':
|
|
value.status === 2 ? '(驳回)' :
|
|
value.status === 2 ? '(驳回)' :
|
|
- value.status === 3 ? '(完成)' : ''
|
|
|
|
|
|
+ value.status === 3 ? '(完成)' :
|
|
|
|
+ value.status === 4 ? '(取消)' :''
|
|
}
|
|
}
|
|
{value.remarks}
|
|
{value.remarks}
|
|
</span>
|
|
</span>
|