mentoswzq 4 роки тому
батько
коміт
66d6ce5bf5

+ 44 - 30
js/component/manageCenter/components/checkProject/applyPaymentModal.js

@@ -51,16 +51,14 @@ class ApplyPaymentModal extends Component{
             values.tid = this.props.tid;
             if(this.props.previewPayInfor.nodeId){                      //催款
                 values.nodeId = this.props.previewPayInfor.nodeId;
-                values.chooseType = 1;                          //支付选择 0第三方 1催款
-                values.tcpid = this.props.previewPayInfor.cid;  //第三方机构id
+                values.chooseType = 1;                          //支付选择 0第三方 1催款 2官费
+                values.tpcId = this.props.previewPayInfor.cid;  //第三方机构id
             }else{
-                values.chooseType = 0                           //支付选择 0第三方 1催款
-                values.tcpid = this.props.previewPayInfor.id;   //第三方机构id
+                values.chooseType = 0                           //支付选择 0第三方 1催款 2官费
+                values.tpcId = this.props.previewPayInfor.id;   //第三方机构id
             }
             if(this.props.type === 2){
-                values.paymentType = 1;                 //支付类型 0第三方 1官费(用来做判断发起区别)
-            }else{
-                values.paymentType = 0;                 //支付类型 0第三方 1官费(用来做判断发起区别)
+                values.chooseType = 2;                 //支付类型 0第三方 1催款 2官费
             }
             values.companyName = values.companyName.split('-')[0];
             $.ajax({
@@ -139,7 +137,7 @@ class ApplyPaymentModal extends Component{
                                 )}
                             </Form.Item>
                             {/* 0正常 1专利 2软著 3审计 */}
-                            {this.props.projectType === 3 && this.props.patentType === 3 ?<Form.Item
+                            {this.props.projectType === 1 && this.props.patentType === 1 ?<Form.Item
                                         {...formItemLayout}
                                         style={{
                                             display:'flex'
@@ -202,36 +200,31 @@ class ApplyPaymentModal extends Component{
                                         <div>***</div>
                                     </Form.Item> : <div/>
                             }
-                            <Form.Item
-                                {...formItemLayout}
-                                style={{
-                                    display:'flex'
-                                }}
-                                label="数量(个):"
-                            >
-                                {getFieldDecorator('quantity', {
-                                    initialValue: parseInt(previewPayInfor.quantity),
-                                    rules: [{ required: false, message: '请输入數量!' }],
-                                })(
-                                    <Input disabled={previewPayInfor.quantity <= 1 || (this.props.projectType === 3 && this.props.patentType === 3)} style={{ width: '200px' }} placeholder="请输入數量" type={'number'}/>
-                                )}
-                            </Form.Item>
                             {
-                                this.props.projectType === 3 && this.props.patentType === 3 ?
+                                this.props.projectType !== 0?
                                     <Form.Item
                                         {...formItemLayout}
                                         style={{
                                             display:'flex'
                                         }}
-                                        label="本次申请支付数量:"
+                                        label="数量(个):"
+                                    >
+                                        {previewPayInfor.quantity}
+                                    </Form.Item>:
+                                    <Form.Item
+                                        {...formItemLayout}
+                                        style={{
+                                            display:'flex'
+                                        }}
+                                        label="数量(个):"
                                     >
                                         {getFieldDecorator('quantity', {
                                             initialValue: parseInt(previewPayInfor.quantity),
-                                            rules: [{ required: false, message: '请输入支付数量!' }],
+                                            rules: [{ required: false, message: '请输入量!' }],
                                         })(
-                                            <Input disabled={previewPayInfor.quantity <= 1 || this.state.paymentStatus !== 0} style={{ width: '200px' }} placeholder="请输入數量" type={'number'}/>
+                                            <Input disabled={previewPayInfor.quantity <= 1} style={{ width: '200px' }} placeholder="请输入數量" type={'number'}/>
                                         )}
-                                    </Form.Item> : <div/>}
+                                    </Form.Item>
                             }
                             <Form.Item
                                 {...formItemLayout}
@@ -247,6 +240,22 @@ class ApplyPaymentModal extends Component{
                                 {/*    <Input disabled={true} style={{ width: '200px' }} placeholder="请输入总价" type={'number'}/>*/}
                                 {/*)}*/}
                             </Form.Item>
+                            {
+                                this.props.projectType === 1 && this.props.type === 2?
+                                    <Form.Item
+                                        {...formItemLayout}
+                                        style={{
+                                            display:'flex'
+                                        }}
+                                        label="本次申请支付数量:"
+                                    >
+                                        {getFieldDecorator('quantity', {
+                                            initialValue: 1,
+                                            rules: [{ required: false, message: '请输入本次申请支付数量!' }],
+                                        })(
+                                            <Input disabled={previewPayInfor.quantity <= 1 || this.state.paymentStatus !== 0} style={{ width: '200px' }} placeholder="请输入本次申请支付数量" type={'number'}/>
+                                        )}
+                                    </Form.Item> : <div/>}
                             {/*<Form.Item*/}
                             {/*    {...formItemLayout}*/}
                             {/*    style={{*/}
@@ -294,9 +303,14 @@ class ApplyPaymentModal extends Component{
                                 )}
                             </Form.Item>
                             <Form.Item>
-                                <Button type="primary" htmlType="submit">
-                                    确定申请支付
-                                </Button>
+                                <div style={{
+                                    display: 'flex',
+                                    justifyContent: 'center',
+                                }}>
+                                    <Button type="primary" htmlType="submit" style={{width:'60%',height:'40px'}}>
+                                        {this.props.type === 2 ? "确定申请付官费" : "确定申请支付"}
+                                    </Button>
+                                </div>
                             </Form.Item>
                         </Form>
                     </div>

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

@@ -1,3 +1,4 @@
+//nodeUnitPrice 即是单价也可是官费
 import React,{Component} from 'react';
 import {Button, DatePicker, Form, Input, message, Modal, Spin} from "antd";
 import $ from "jquery/src/ajax";
@@ -379,7 +380,8 @@ class PayRecord extends Component{
             >
                 <Spin spinning={this.state.loading}>
                     <div>
-                        <div>申请支付外包费用</div>
+                        {/*0第三方 1催款 2官费*/}
+                        <div>{paymentDetails.chooseType === 2 ? '申请支付外包费用' : '申请支付官费'}</div>
                         <Form
                             {...layout}
                             name="basic"
@@ -399,12 +401,13 @@ class PayRecord extends Component{
                             >
                                 <div>{paymentDetails.companyName}</div>
                             </Form.Item>
+                            {/*0第三方 1催款 2官费*/}
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
                                     display:'flex'
                                 }}
-                                label="单价(万元):"
+                                label={paymentDetails.chooseType === 2 ? "官费(万元):":"单价(万元):"}
                             >
                                 <div>{paymentDetails.nodeUnitPrice}</div>
                             </Form.Item>
@@ -440,6 +443,28 @@ class PayRecord extends Component{
                             >
                                 <div>{paymentDetails.nodePartyAmount}</div>
                             </Form.Item>
+                            {/*0第三方 1催款 2官费*/}
+                            {
+                                paymentDetails.chooseType === 2 ?
+                                    <Form.Item
+                                        {...formItemLayout}
+                                        style={{
+                                            display:'flex'
+                                        }}
+                                        label="本次申请支付数量:"
+                                    >
+                                        {getFieldDecorator('nodeQuantity', {
+                                            initialValue: paymentDetails.nodeQuantity,
+                                            rules: [{ required: true, message: '请输入本次申请支付数量!' }],
+                                        })(
+                                            <Input
+                                                type={'number'}
+                                                style={{ width: '200px' }}
+                                                disabled={ this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2}
+                                                placeholder="请输入本次申请支付数量"/>
+                                        )}
+                                    </Form.Item> : <div/>
+                            }
                             <Form.Item
                                 {...formItemLayout}
                                 style={{

+ 3 - 0
js/component/manageCenter/order/orderNew/costAuditList/detailsModal/index.js

@@ -226,11 +226,14 @@ class DetailsModal extends Component{
                         <ProjectOverview projectStatus={this.props.projectStatus} tid={this.props.tid}/>
                     </TabPane>
                     <TabPane tab="外包/供应商信息" key="2">
+                        {this.props.projectType}
                         <CheckProject
                             {...this.props}
                             tid={this.props.tid}
                             isAuditPayment={true}
                             status={this.state.refundStatus}
+                            patentNameType={this.props.patentNameType}
+                            projectType={this.props.projectType}
                             projectStatus={this.props.projectStatus}
                             patentName={this.props.patentName}
                             patentType={this.props.patentType}

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

@@ -229,6 +229,8 @@ class CostAuditList extends Component{
               {
                   this.state.visible ?
                       <DetailsModal
+                          patentNameType={this.state.selectInfor.patentNameType}
+                          projectType={this.state.selectInfor.projectType}
                           projectStatus={this.state.selectInfor.projectStatus}
                           patentName={this.state.selectInfor.patentName}
                           patentType={this.state.selectInfor.patentType}

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

@@ -63,7 +63,8 @@ class NewSupplier extends Component{
             url: globalConfig.context + '/api/admin/company/selectVague',
             data: {
                 name: e,
-                type: this.props.projectType === 2 ? 0 : 1
+                type: this.props.projectType === 2 ? 0 :
+                    (this.props.projectType === 1 && this.props.patentType === 0) ? 2 : 1     //this.props.projectType 0正常 1专利 2软著 3审计    this.props.patentType 0:专利申请/变更/转让  1:专利买卖
             },
             success: function (data) {
                 let thedata = data.data
@@ -118,7 +119,7 @@ class NewSupplier extends Component{
             return;
         }
 
-        if(!this.state.thirdUnitPrice && this.props.projectType !== 2){
+        if(!this.state.thirdUnitPrice && this.props.projectType !== 2 && !(this.props.projectType === 1 && this.props.patentType ===0)){
             message.warning('请输入正确的单价')
             return;
         }
@@ -141,6 +142,12 @@ class NewSupplier extends Component{
             return;
         }
 
+        //专利  必须要使用查询出来第三方名称和对应id
+        if(!isHave && this.props.projectType === 1 && this.props.patentType === 0){   //projectType   0正常 1专利 2软著 3审计   patentType  0:专利申请/变更/转让  1:专利买卖
+            message.warning('请输入正确的供应商名称')
+            return;
+        }
+
         let data = {
             id: this.props.ThirdId,                     //id
             tid: this.props.tid,                        //订单编号
@@ -155,10 +162,13 @@ class NewSupplier extends Component{
         if(this.props.projectType === 2){
             data.material = this.state.thirdMaterial    //材料
             data.urgent = this.state.thirdUrgent        //加急
-            data.calculation = 1;                       //0 其他 1软著
+            data.calculation = 1;                       //0 其他 1软著 2专利
         }else{                                          //非软著类需要传总金额
             data.totalAmount = this.state.thirdQuantity * this.state.thirdUnitPrice;
-            data.calculation = 0;                       //0 其他 1软著
+            data.calculation = 0;                       //0 其他 1软著 2专利
+        }
+        if(this.props.projectType === 1 && this.props.patentType === 0){
+            data.calculation = 2;                       //0 其他 1软著 2专利
         }
 
         data.type = this.props.projectType === 1 ? (this.props.patentType === 0 ? 1 : 2) : 0   //0其他 1专利申请 2专利买卖
@@ -258,7 +268,8 @@ class NewSupplier extends Component{
                                     <span className="mandatory">*</span>
                                 </Form.Item>
                             </div>
-                            {this.props.projectType !== 2 ?<div className="clearfix">
+                            {/*projectType 0正常 1专利 2软著 3审计*/}
+                            {this.props.projectType !== 2 && !(this.props.projectType === 1 && this.props.patentType ===0) ?<div className="clearfix">
                                 <Form.Item {...formItemLayout} label="单价(万元)">
                                     <Input
                                         value={this.state.thirdUnitPrice}