mentoswzq лет назад: 4
Родитель
Сommit
e10e846ea2

+ 1 - 1
js/component/manageCenter/components/checkProject/applyPaymentModal.js

@@ -115,7 +115,7 @@ class ApplyPaymentModal extends Component{
                                 {getFieldDecorator('companyName', {
                                     initialValue: previewPayInfor.companyName,
                                     rules: [{
-                                        required: false,
+                                        required: true,
                                         message: '请输入付款单位/个人!',
                                     }],
                                 })(

+ 9 - 2
js/component/manageCenter/components/checkProject/payRecord.js

@@ -31,6 +31,7 @@ class PayRecord extends Component{
         }
         this.examineOperation = this.examineOperation.bind(this);
         this.noExamineOperation = this.noExamineOperation.bind(this);
+        this.handleSubmit = this.handleSubmit.bind(this);
     }
 
     componentDidMount() {
@@ -279,11 +280,12 @@ class PayRecord extends Component{
                     重新发起申请
                 </Button>
                 <Button type="danger" style={{float:'right'}} onClick={(e)=>{
+                    let _this = this;
                     confirm({
                         title: '删除提醒?',
                         content: '您确定要删除它吗?',
                         onOk() {
-                            this.handleSubmit(e,4);
+                            _this.handleSubmit(e,4);
                         },
                         onCancel() {},
                     });
@@ -474,7 +476,12 @@ class PayRecord extends Component{
                             >
                                 {getFieldDecorator('applicationAmount', {
                                     initialValue: paymentDetails.applicationAmount,
-                                    rules: [{ required: true, message: '请输入本次申请支付金额!' }],
+                                    rules: [
+                                        {
+                                            required: !(this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2),
+                                            message: '请输入本次申请支付金额!'
+                                        }
+                                    ],
                                 })(
                                     <Input
                                         type={'number'}

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

@@ -12,7 +12,7 @@ class DetailsModal extends Component{
         super(props);
         this.state={
             loading: false,
-            activeKey:'2',
+            activeKey:'1',
             paySubject: [],
             orderDtails: {},
         }
@@ -25,6 +25,11 @@ class DetailsModal extends Component{
             this.thirdTable(this.props.tid);
             this.payNodeTable(this.props.tid)
         }
+        setTimeout(()=>{
+            this.setState({
+                activeKey:'2'
+            })
+        },500);
     }
 
     visitOk(){

+ 5 - 5
js/component/manageCenter/project/task/myTask.jsx

@@ -2171,7 +2171,7 @@ const Task = React.createClass({
     }
 
     //refundStatus   0-待审核 ,1-审核通过,2-审核拒绝
-    if(!this.state.reason && this.state.refundStatus === 2){
+    if(!this.state.reason && (this.state.refundStatus === 2 || typeof this.state.refundStatus === 'undefined')){
       message.warning('发起原因不能为空')
       return
     }
@@ -2208,8 +2208,8 @@ const Task = React.createClass({
             id: _this.state.refundStatus == 2 ? _this.state.mid : undefined,
           }
 
-          //refundStatus   0-待审核 ,1-审核通过,2-审核拒绝    审核被驳回时,要填写发起原因
-          if(_this.state.refundStatus === 2){
+          //refundStatus   0-待审核 ,1-审核通过,2-审核拒绝    审核被驳回时和第一次发起外包时,要填写发起原因
+          if(_this.state.refundStatus === 2 || typeof _this.state.refundStatus === 'undefined'){
             data.reason = _this.state.reason
           }
 
@@ -4478,8 +4478,8 @@ const Task = React.createClass({
                       <p style={{ color: 'red' }}>图片建议:要清晰。</p>
                     </FormItem>
                   </div>
-                  {/*只有审核拒绝的时候才要填写发起原因*/}
-                  {this.state.refundStatus === 2 ? <div className="clearfix">
+                  {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
+                  {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
                     <FormItem
                         className="half-item"
                         {...formItemLayout}

+ 9 - 2
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -1869,6 +1869,10 @@ const MyTaskOutsource = React.createClass({
             allTotalAmount = 0
           }
 
+          for(let d=0;d<theArr.length;d++){
+            theArr[d].companyName = theArr[d].companyName+ '-' + theArr[d].id;
+          }
+
           this.setState({
             tid: id,
             thirdInfoList: theArr,
@@ -1931,8 +1935,11 @@ const MyTaskOutsource = React.createClass({
               status: thisData.status, //催款状态 0-未支付 1-待全款 ,2已全款   status=2的时候已经全款,申请付款按钮可以去掉了
             })
           }
-          console.log(payNodeArr,'payNodeArr:')
-          // console.log('paySubject:', this.state.paySubject)
+
+          for(let d=0;d<payNodeArr.length;d++){
+            payNodeArr[d].companyName = payNodeArr[d].companyName+ '-' + payNodeArr[d].cid;
+          }
+
           this.setState({
             tid: id,
             payNodeList: payNodeArr,

+ 27 - 5
js/component/manageCenter/project/task/newSupplier.js

@@ -158,7 +158,6 @@ class NewSupplier extends Component{
             companyName: this.state.thirdCompanyName,   //第三方名称
             quantity: this.state.thirdQuantity,         //数量
             remarks: this.state.thirdRemarks,           //备注
-            unitPrice: this.state.thirdUnitPrice,       //单价
         }
         if(isHave){
             data.cid = customerId     //公司id            只有软著类要传cid,其他类型都是非必填的
@@ -190,6 +189,13 @@ class NewSupplier extends Component{
                 return false;
             }
         }
+
+        //projectType   0正常 1专利 2软著 3审计
+        //软著不需要传 单价
+        if(this.props.projectType !== 2){
+            data.unitPrice = this.state.thirdUnitPrice;       //单价
+        }
+
         if(this.props.projectType === 3){                   //审计
             data.assets = this.state.assets; //资产
             data.audit = this.state.audit;   //0无审计 1年审 2专审
@@ -297,9 +303,16 @@ class NewSupplier extends Component{
                                                 thirdUnitPrice: value,
                                             })
                                         }}
-                                        style={{ width: '220px' }}
+                                        dropdownStyle={{ width: 220 }}
+                                        style={{
+                                            width: '220px',
+                                        }}
                                     />
-                                    <span className="mandatory">*</span>
+                                    <span className="mandatory" style={{
+                                        marginLeft: '-2px',
+                                    }}>
+                                        *
+                                    </span>
                                 </Form.Item>
                             </div> : <div/>}
                             <div className="clearfix">
@@ -316,13 +329,22 @@ class NewSupplier extends Component{
                                         }}
                                         style={{ width: '220px' }}
                                     />
-                                    <span className="mandatory">*</span>
+                                    <span className="mandatory" style={{
+                                        marginLeft: '-2px',
+                                    }}>
+                                        *
+                                    </span>
                                 </Form.Item>
                             </div>
                             {/*专利 的专利申请 和 软著没有总价*/}
                             {this.props.projectType !== 2 && this.props.patentType !==0 ?<div className="clearfix">
                                 <Form.Item {...formItemLayout} label="总价(万元)">
-                                    <span>{(this.state.thirdQuantity * 1000000) * (this.state.thirdUnitPrice * 1000000) / 1000000 / 1000000}</span>
+                                    <span>
+                                        {
+                                            ((this.state.thirdQuantity || 0) * 1000000) *
+                                            ((this.state.thirdUnitPrice || 0) * 1000000) / 1000000 / 1000000
+                                        }
+                                    </span>
                                 </Form.Item>
                             </div> : <div/>}
                             {this.props.projectType === 2 ? <div>