HW преди 3 години
родител
ревизия
f7cbdbdc05

+ 13 - 9
js/component/common/patentCheck/index.jsx

@@ -32,12 +32,17 @@ class PatentCheck extends Component{
             dataSource:[],
 
             addProjectCheckLoading:false,
-            checkStatus:props.checkStatus,               //核对状态  0未发起 1核对中 2核对完成 3已申请付款
         }
         this.addProjectCheck = this.addProjectCheck.bind(this);
         this.getProjectCheckLog = this.getProjectCheckLog.bind(this);
     }
 
+    componentDidUpdate(prevProps, prevState, snapshot) {
+        console.log(prevProps.checkStatus,'prevProps')
+        console.log(prevState,'prevState')
+        console.log('=================================')
+    }
+
     addProjectCheck(){
         this.setState({
             addProjectCheckLoading: true,
@@ -57,9 +62,7 @@ class PatentCheck extends Component{
                 })
                 if (!data.error.length) {
                     message.success('发起成功!');
-                    this.setState({
-                        checkStatus:1
-                    })
+                    this.props.onRefresh && this.props.onRefresh();
                 } else {
                     message.warning(data.error[0].message)
                 }
@@ -125,15 +128,16 @@ class PatentCheck extends Component{
                     </span>
                 </div>
                 {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"}}>
                         {
-                            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>
                     {
-                        this.state.checkStatus === 0 || this.state.checkStatus === 2 ?
+                        this.props.checkStatus === 0 || this.props.checkStatus === 2 ?
                             <Popconfirm
                                 title="是否发起核对?"
                                 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)}
                     onClick={()=>{
-                        if(this.state.checkStatus === 1){
+                        if(this.props.checkStatus === 1){
                             message.warning('您已发起官费核对,暂不可发起付官费!')
                         }else{
                             this.props.onPayOfficialExpenses()

+ 1 - 0
js/component/manageCenter/components/checkProject/index.jsx

@@ -1127,6 +1127,7 @@ class CheckProject extends Component {
                                   orderTaskCostReduction={this.props.orderTaskCostReduction} //1有费减 0无费减
                                   isPreviewPay={this.props.isPreviewPay}
                                   status={this.props.status}
+                                  onRefresh={this.props.onRefresh}
                                   onPayOfficialExpenses={()=>{
                                     this.setState({
                                       previewPayVisible: true,

+ 10 - 3
js/component/manageCenter/components/checkProject/payRecord.js

@@ -150,6 +150,10 @@ class PayRecord extends Component{
                 console.log(err)
                 return;
             }
+            if(isNaN(parseFloat(values.quantity)) || values.quantity<=0){
+                message.warning('申请支付数量不能小于等于零');
+                return;
+            }
             const { paymentDetails } = this.state;
             this.setState({
                 loading: true
@@ -160,6 +164,9 @@ class PayRecord extends Component{
                 // paymentStatus: paymentDetails.paymentStatus,   //支付状态 0半款 1全款
                 status: status,//0 发起 1通过 2驳回(0重新发起,1通过审核,2驳回)
             }
+            if(paymentDetails.chooseType === 2){
+                data.paymentAmount = values.applicationAmount
+            }
             Object.assign(data,values)
             $.ajax({
                 type: 'post',
@@ -489,7 +496,7 @@ class PayRecord extends Component{
                                         </Form.Item>
                                     </div> : <div/>
                             }
-                            {paymentDetails.chooseType !== 2 ? <Form.Item
+                            <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'
                                 label="本次申请支付金额(万元):"
@@ -506,10 +513,10 @@ class PayRecord extends Component{
                                     <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)}
+                                        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> : null}
+                            </Form.Item>
                             <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'

+ 2 - 2
js/component/manageCenter/order/orderNew/costAuditList/component/orderPaymentModal.js

@@ -24,9 +24,9 @@ class OrderPaymentModal extends Component{
                     render: (text, record) => {
                         return (
                             <div>
-                                {text+'-'+record.tpcId}
+                                {record.chooseType === 2 ? text : text+'-'+record.tpcId}
                                 {
-                                    text !== record.tpcName ?
+                                    text !== record.tpcName && record.chooseType!==2 ?
                                         '('+record.tpcName+')' : ''
                                 }
                             </div>

+ 2 - 1
js/component/manageCenter/order/orderNew/costAuditList/index.js

@@ -256,7 +256,8 @@ class CostAuditList extends Component{
                 key: "officialCost",
                 render: (text,record) => {
                     return (
-                        (text === 1 ? '含官费' : '不含官费' ) + (record.costReduction === 1 ? '有费减' : '')
+                        (text === 1 ? '含官费' : '不含官费' ) +
+                        (text === 1 ? (record.costReduction === 1 ? '有费减' : record.costReduction === 0 ? '无费减' : '') : '')
                     )
                 }
             })

+ 8 - 0
js/component/manageCenter/project/task/myTask.jsx

@@ -4687,6 +4687,9 @@ const Task = React.createClass({
                                     orderTaskOfficialCost={this.state.orderTaskOfficialCost}  //1含官费 0不含官费
                                     orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
                                     isPreviewPay={false}
+                                    onRefresh={()=>{
+                                      this.xiangqing(this.state.tid);
+                                    }}
                                     status={this.state.refundStatus}
                                 />
                           }
@@ -4972,6 +4975,7 @@ const Task = React.createClass({
                                 projectStatus={this.state.projectStatus}
                                 onRefresh={()=>{
                                   this.waiDetail();
+                                  this.xiangqing(this.state.tid);
                                   this.thirdTable(this.state.tid);
                                   this.getSelectOutsourceLog(this.state.tid);
                                   this.payNodeTable(this.state.tid)
@@ -6051,6 +6055,9 @@ const Task = React.createClass({
                                   orderTaskOfficialCost={this.state.orderTaskOfficialCost}  //1含官费 0不含官费
                                   orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
                                   isPreviewPay={false}
+                                  onRefresh={()=>{
+                                    this.xiangqing(this.state.tid);
+                                  }}
                                   status={this.state.refundStatus}//0-待审核 ,1-审核通过,2-审核拒绝
                               />
                         }
@@ -6316,6 +6323,7 @@ const Task = React.createClass({
                               onRefresh={()=>{
                                 this.waiDetail();
                                 this.thirdTable(this.state.tid);
+                                this.xiangqing(this.state.tid);
                                 this.getSelectOutsourceLog(this.state.tid);
                                 this.payNodeTable(this.state.tid)
                                 this.loadData(this.state.page)

+ 5 - 0
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -4403,6 +4403,9 @@ const MyTaskOutsource = React.createClass({
                                             orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
                                             isPreviewPay={true}
                                             status={this.state.refundStatus}
+                                            onRefresh={()=>{
+                                              this.xiangqing(this.state.id);
+                                            }}
                                         />
                                   }
                                 </FormItem>
@@ -4655,6 +4658,7 @@ const MyTaskOutsource = React.createClass({
                             projectStatus={this.state.projectStatus}
                             onRefresh={()=>{
                               this.waiDetail();
+                              this.xiangqing(this.state.id);
                               this.loadData(this.state.page)
                             }}
                         />
@@ -5449,6 +5453,7 @@ const MyTaskOutsource = React.createClass({
                     onRefresh={()=>{
                       this.waiDetail();
                       this.loadData(this.state.page)
+                      this.xiangqing(this.state.id);
                     }}
                 />:<div/>}
               </Spin>

+ 1 - 0
js/component/project.jsx

@@ -1348,6 +1348,7 @@ const project = React.createClass({
                               this.waiDetail();
                               this.thirdTable();
                               this.payNodeTable()
+                              this.xiangqing(this.state.id);
                             }}
                         /> : <div/>
                   }