|
@@ -32,12 +32,17 @@ class PatentCheck extends Component{
|
|
dataSource:[],
|
|
dataSource:[],
|
|
|
|
|
|
addProjectCheckLoading:false,
|
|
addProjectCheckLoading:false,
|
|
- checkStatus:props.checkStatus, //核对状态 0未发起 1核对中 2核对完成 3已申请付款
|
|
|
|
}
|
|
}
|
|
this.addProjectCheck = this.addProjectCheck.bind(this);
|
|
this.addProjectCheck = this.addProjectCheck.bind(this);
|
|
this.getProjectCheckLog = this.getProjectCheckLog.bind(this);
|
|
this.getProjectCheckLog = this.getProjectCheckLog.bind(this);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ componentDidUpdate(prevProps, prevState, snapshot) {
|
|
|
|
+ console.log(prevProps.checkStatus,'prevProps')
|
|
|
|
+ console.log(prevState,'prevState')
|
|
|
|
+ console.log('=================================')
|
|
|
|
+ }
|
|
|
|
+
|
|
addProjectCheck(){
|
|
addProjectCheck(){
|
|
this.setState({
|
|
this.setState({
|
|
addProjectCheckLoading: true,
|
|
addProjectCheckLoading: true,
|
|
@@ -57,9 +62,7 @@ class PatentCheck extends Component{
|
|
})
|
|
})
|
|
if (!data.error.length) {
|
|
if (!data.error.length) {
|
|
message.success('发起成功!');
|
|
message.success('发起成功!');
|
|
- this.setState({
|
|
|
|
- checkStatus:1
|
|
|
|
- })
|
|
|
|
|
|
+ this.props.onRefresh && this.props.onRefresh();
|
|
} else {
|
|
} else {
|
|
message.warning(data.error[0].message)
|
|
message.warning(data.error[0].message)
|
|
}
|
|
}
|
|
@@ -125,15 +128,16 @@ class PatentCheck extends Component{
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{this.props.patentType === 0 ? <div style={{display:'flex',alignItems:'center'}}>
|
|
{this.props.patentType === 0 ? <div style={{display:'flex',alignItems:'center'}}>
|
|
|
|
+ {/*checkStatus 核对状态 0未发起 1核对中 2核对完成 3已申请付款*/}
|
|
<span style={{color:'#f00',paddingLeft:'20px',marginRight: '10px',whiteSpace:"nowrap"}}>
|
|
<span style={{color:'#f00',paddingLeft:'20px',marginRight: '10px',whiteSpace:"nowrap"}}>
|
|
{
|
|
{
|
|
- this.state.checkStatus === 1 ? '营销员核对中' :
|
|
|
|
- this.state.checkStatus === 2 ? '核对已完成' :
|
|
|
|
- this.state.checkStatus === 3 ? '已申请付款' : ''
|
|
|
|
|
|
+ this.props.checkStatus === 1 ? '营销员核对中' :
|
|
|
|
+ this.props.checkStatus === 2 ? '核对已完成' :
|
|
|
|
+ this.props.checkStatus === 3 ? '已申请付款' : ''
|
|
}
|
|
}
|
|
</span>
|
|
</span>
|
|
{
|
|
{
|
|
- this.state.checkStatus === 0 || this.state.checkStatus === 2 ?
|
|
|
|
|
|
+ this.props.checkStatus === 0 || this.props.checkStatus === 2 ?
|
|
<Popconfirm
|
|
<Popconfirm
|
|
title="是否发起核对?"
|
|
title="是否发起核对?"
|
|
onConfirm={() => {
|
|
onConfirm={() => {
|
|
@@ -205,7 +209,7 @@ class PatentCheck extends Component{
|
|
}}
|
|
}}
|
|
disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.orderTaskOfficialCost === 1)}
|
|
disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.orderTaskOfficialCost === 1)}
|
|
onClick={()=>{
|
|
onClick={()=>{
|
|
- if(this.state.checkStatus === 1){
|
|
|
|
|
|
+ if(this.props.checkStatus === 1){
|
|
message.warning('您已发起官费核对,暂不可发起付官费!')
|
|
message.warning('您已发起官费核对,暂不可发起付官费!')
|
|
}else{
|
|
}else{
|
|
this.props.onPayOfficialExpenses()
|
|
this.props.onPayOfficialExpenses()
|