Browse Source

官费支付修改

HW 3 years ago
parent
commit
0294790dc1

+ 70 - 35
js/component/common/patentCheck/index.jsx

@@ -29,7 +29,10 @@ class PatentCheck extends Component{
                     key: 'remarks',
                 },
             ],
-            dataSource:[]
+            dataSource:[],
+
+            addProjectCheckLoading:false,
+            checkStatus:props.checkStatus,               //核对状态  0未发起 1核对中 2核对完成 3已申请付款
         }
         this.addProjectCheck = this.addProjectCheck.bind(this);
         this.getProjectCheckLog = this.getProjectCheckLog.bind(this);
@@ -37,7 +40,7 @@ class PatentCheck extends Component{
 
     addProjectCheck(){
         this.setState({
-            loading: true,
+            addProjectCheckLoading: true,
         })
         $.ajax({
             method: 'POST',
@@ -50,10 +53,13 @@ class PatentCheck extends Component{
         }).done(
             function (data) {
                 this.setState({
-                    loading: false,
+                    addProjectCheckLoading: false,
                 })
                 if (!data.error.length) {
-                    message.success('发起成功!')
+                    message.success('发起成功!');
+                    this.setState({
+                        checkStatus:1
+                    })
                 } else {
                     message.warning(data.error[0].message)
                 }
@@ -93,13 +99,18 @@ class PatentCheck extends Component{
 
     render() {
         return (
-            this.props.projectType === 1 ? <div style={this.props.style}>
-                {/*&& this.props.startType === 1*/}
-                <div style={{display:'flex',alignItems:'center',paddingBottom:'10px'}}>
-                    <span style={{paddingRight:'15px'}}>官费信息:</span>
+            this.props.projectType === 1 && this.props.startType === 1 ? <div style={this.props.style}>
+                <div style={{display:'flex',alignItems:'center',whiteSpace:"nowrap"}}>
                     {/*startType 1供应商 0外包*/}
+                    {/*patentTypeName 官费类型名称*/}
+                    {/*projectType 项目类型 0正常 1专利 2软著 3审计 */}
+                    {/*patentType 专利类型  0专利申请 1专利买卖*/}
                     {/*orderTaskOfficialCost 1含官费 0不含官费*/}
                     {/*orderTaskCostReduction: 1有费减 0无费减*/}
+
+                    <span style={{paddingLeft:'10px',paddingRight:'20px',color:'#4472f5'}}>
+                        <span style={{color:"#333"}}>官费类型:</span>{this.props.patentTypeName}
+                    </span>
                     <span style={{paddingRight:'20px',color:'#4472f5'}}>
                       {
                           this.props.orderTaskOfficialCost === 1?
@@ -113,7 +124,40 @@ class PatentCheck extends Component{
                       }
                     </span>
                 </div>
-                <div style={{display:'flex',alignItems:'center'}}>
+                {this.props.patentType === 0 ? <div style={{display:'flex',alignItems:'center'}}>
+                    <span style={{color:'#f00',paddingLeft:'20px',marginRight: '10px',whiteSpace:"nowrap"}}>
+                        {
+                            this.state.checkStatus === 1 ? '营销员核对中' :
+                                this.state.checkStatus === 2 ? '核对已完成' :
+                                    this.state.checkStatus === 3 ? '已申请付款' : ''
+                        }
+                    </span>
+                    {
+                        this.state.checkStatus === 0 || this.state.checkStatus === 2 ?
+                            <Popconfirm
+                                title="是否发起核对?"
+                                onConfirm={() => {
+                                    this.addProjectCheck();
+                                }}
+                                okText="发起"
+                                cancelText="取消"
+                            >
+                                <Button
+                                    loading={this.state.addProjectCheckLoading}
+                                    onClick={(e) => {
+                                        e.stopPropagation()
+                                    }}
+                                    type="primary"
+                                    style={{
+                                        marginRight: '10px',
+                                        border: 'none',
+                                        background:'#f00',
+                                    }}
+                                >
+                                    核对
+                                </Button>
+                            </Popconfirm> : null
+                    }
                     <Button
                         loading={this.state.loading}
                         onClick={(e) => {
@@ -126,37 +170,13 @@ class PatentCheck extends Component{
                         }}
                         type="primary"
                         style={{
-                            marginRight: '25px',
+                            marginRight: '10px',
                             border: 'none',
                         }}
                     >
                         核对日志
                     </Button>
-                    <div>
-                        <Popconfirm
-                            title="是否发起核对?"
-                            onConfirm={() => {
-                                this.addProjectCheck();
-                            }}
-                            okText="发起"
-                            cancelText="取消"
-                        >
-                            <Button
-                                loading={this.state.loading}
-                                onClick={(e) => {
-                                    e.stopPropagation()
-                                }}
-                                type="primary"
-                                style={{
-                                    marginRight: '10px',
-                                    border: 'none',
-                                }}
-                            >
-                                核对
-                            </Button>
-                        </Popconfirm>
-                    </div>
-                </div>
+                </div> : null}
                 {this.state.visible ? <Modal
                     title="核对日志"
                     visible={this.state.visible}
@@ -178,6 +198,21 @@ class PatentCheck extends Component{
                         />
                     </Spin>
                 </Modal> : null}
+                <Button
+                    type="primary"
+                    style={{
+                        marginLeft: '10px',
+                    }}
+                    disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1))}
+                    onClick={()=>{
+                        if(this.state.checkStatus === 1){
+                            message.warning('您已发起官费核对,暂不可发起付官费!')
+                        }else{
+                            this.props.onPayOfficialExpenses()
+                        }
+                    }}>
+                    付官费
+                </Button>
             </div> : null
         )
     }

+ 6 - 6
js/component/common/projectOperation/index.jsx

@@ -91,7 +91,7 @@ class ProjectOperation extends Component{
                 message.warning("请选择官费!");
                 return false;
             }
-            if (this.state.costReduction === "" && this.state.patentType !== 1) {
+            if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2)) {
                 message.warning("请选择费减!");
                 return false;
             }
@@ -133,7 +133,7 @@ class ProjectOperation extends Component{
 
             main: this.state.main, //是否为主要项目
             officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
-            costReduction: this.state.displayFees==='block' && this.state.patentType !== 1 ?this.state.costReduction : '', //是否有费减
+            costReduction: this.state.displayFees==='block' && (this.state.patentType === 0 || this.state.patentType === 2) ?this.state.costReduction : '', //是否有费减
             patentType: this.state.displayFees==='block' ? this.state.patentType : '', // 专利类型
         }
         if(this.state.addProjectType === 5){
@@ -197,7 +197,7 @@ class ProjectOperation extends Component{
                 commodityQuantity: this.state.commodityQuantity, //数量
                 taskComment: this.state.taskComment, //备注
                 officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
-                costReduction: this.state.displayFees==='block' && this.state.patentType !== 1 ?this.state.costReduction : '', //是否有费减
+                costReduction: this.state.displayFees==='block' && (this.state.patentType === 0 || this.state.patentType === 2) ?this.state.costReduction : '', //是否有费减
                 patentType: this.state.displayFees==='block' ? this.state.patentType : '', //专利类型
                 declarationBatch: this.state.declarationBatch || undefined,//申报批次
                 ifCertificationFee: isNaN(parseInt(this.state.ifCertificationFee)) ? undefined : this.state.ifCertificationFee,
@@ -393,7 +393,7 @@ class ProjectOperation extends Component{
                                     value={this.state.patentType}
                                     onChange={(e) => {
                                         this.setState({ patentType: e });
-                                        if(e === 1){
+                                        if(e !== 0 && e !== 2){
                                             this.setState({
                                                 costReduction: ''
                                             })
@@ -448,9 +448,9 @@ class ProjectOperation extends Component{
                                     marginLeft: "63px",
                                 }}
                             >
-                                {/*不含官费或者专利类型为变更时置灰*/}
+                                {/*不含官费或者专利类型不为复审或者申请时置灰*/}
                                 {readOnly ? (this.state.costReduction === 1 ? '有费减': this.state.costReduction === 0 ? '无费减' : '') : <Radio.Group
-                                    disabled={this.state.officialCost === 0 || this.state.patentType === 1}
+                                    disabled={this.state.officialCost === 0 || (this.state.patentType !== 0 && this.state.patentType !== 2)}
                                     value={this.state.costReduction}
                                     onChange={(e) => {
                                         this.setState({ costReduction: e.target.value });

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

@@ -38,16 +38,17 @@ class ApplyPaymentModal extends Component{
                 loading: true
             })
             values.tid = this.props.tid;
-            if(this.props.previewPayInfor.nodeId){                      //催款
-                values.nodeId = this.props.previewPayInfor.nodeId;
-                values.chooseType = 1;                          //支付选择 0第三方 1催款 2官费
-                values.tpcId = this.props.previewPayInfor.cid;  //第三方机构id
-            }else{
-                values.chooseType = 0                           //支付选择 0第三方 1催款 2官费
-                values.tpcId = this.props.previewPayInfor.id;   //第三方机构id
-            }
             if(this.props.type === 2){
                 values.chooseType = 2;                 //支付类型 0第三方 1催款 2官费
+            }else{
+                if(this.props.previewPayInfor.nodeId){                      //催款
+                    values.nodeId = this.props.previewPayInfor.nodeId;
+                    values.chooseType = 1;                          //支付选择 0第三方 1催款 2官费
+                    values.tpcId = this.props.previewPayInfor.cid;  //第三方机构id
+                }else{
+                    values.chooseType = 0                           //支付选择 0第三方 1催款 2官费
+                    values.tpcId = this.props.previewPayInfor.id;   //第三方机构id
+                }
             }
             values.companyName = values.companyName.split('-')[0];
             $.ajax({
@@ -76,9 +77,7 @@ class ApplyPaymentModal extends Component{
     render() {
         const { getFieldDecorator,setFieldsValue } = this.props.form;
         const { previewPayInfor } = this.props;
-        if(!previewPayInfor){
-            return;
-        }
+        if(this.props.type !== 2 && !previewPayInfor){return;}
         return(
             <Modal
                 maskClosable={false}
@@ -113,7 +112,7 @@ class ApplyPaymentModal extends Component{
                                 label="付款单位/个人:"
                             >
                                 {getFieldDecorator('companyName', {
-                                    initialValue: previewPayInfor.companyName,
+                                    initialValue: this.props.type === 2 ? '国家知识产权局' : previewPayInfor.companyName,
                                     rules: [{
                                         required: true,
                                         message: '请输入付款单位/个人!',
@@ -126,43 +125,43 @@ class ApplyPaymentModal extends Component{
                                 )}
                             </Form.Item>
                             {/* 0正常 1专利 2软著 3审计 */}
-                            {this.props.projectType === 1 && this.props.patentType === 1 ?<Form.Item
-                                        {...formItemLayout}
-                                        style={{
-                                            display:'flex'
-                                        }}
-                                        label="支付状态:"
-                                    >
-                                        {getFieldDecorator('paymentStatus', {
-                                            constructor: this.state.paymentStatus,
-                                            rules: [{ required: false, message: '请选择支付状态!' }],
-                                        })(
-                                            <Radio.Group onChange={(e)=>{
-                                                this.setState({
-                                                    paymentStatus: e.target.value
-                                                })
-                                                if(e.target.value === 1){
-                                                    setFieldsValue({
-                                                        quantity:parseInt(previewPayInfor.quantity),
-                                                        applicationAmount:(previewPayInfor.partyAmount ?
-                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
-                                                            parseFloat(previewPayInfor.totalAmount))/2
-                                                    });
-                                                } else if(e.target.value === 2){
-                                                    setFieldsValue({
-                                                        quantity:parseInt(previewPayInfor.quantity),
-                                                        applicationAmount:(previewPayInfor.partyAmount ?
-                                                            ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :
-                                                            parseFloat(previewPayInfor.totalAmount))
-                                                    });
-                                                }
-                                            }}>
-                                                <Radio value={0}>自定义</Radio>
-                                                <Radio value={1}>半款</Radio>
-                                                <Radio value={2}>全款</Radio>
-                                            </Radio.Group>
-                                        )}
-                                    </Form.Item> : <div/>}
+                            {/*{this.props.projectType === 1 && this.props.patentType === 1 ?<Form.Item*/}
+                            {/*            {...formItemLayout}*/}
+                            {/*            style={{*/}
+                            {/*                display:'flex'*/}
+                            {/*            }}*/}
+                            {/*            label="支付状态:"*/}
+                            {/*        >*/}
+                            {/*            {getFieldDecorator('paymentStatus', {*/}
+                            {/*                constructor: this.state.paymentStatus,*/}
+                            {/*                rules: [{ required: false, message: '请选择支付状态!' }],*/}
+                            {/*            })(*/}
+                            {/*                <Radio.Group onChange={(e)=>{*/}
+                            {/*                    this.setState({*/}
+                            {/*                        paymentStatus: e.target.value*/}
+                            {/*                    })*/}
+                            {/*                    if(e.target.value === 1){*/}
+                            {/*                        setFieldsValue({*/}
+                            {/*                            quantity:parseInt(previewPayInfor.quantity),*/}
+                            {/*                            applicationAmount:(previewPayInfor.partyAmount ?*/}
+                            {/*                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :*/}
+                            {/*                                parseFloat(previewPayInfor.totalAmount))/2*/}
+                            {/*                        });*/}
+                            {/*                    } else if(e.target.value === 2){*/}
+                            {/*                        setFieldsValue({*/}
+                            {/*                            quantity:parseInt(previewPayInfor.quantity),*/}
+                            {/*                            applicationAmount:(previewPayInfor.partyAmount ?*/}
+                            {/*                                ((parseFloat(previewPayInfor.totalAmount) * 1000000) - (parseFloat(previewPayInfor.partyAmount) * 1000000)) / 1000000 :*/}
+                            {/*                                parseFloat(previewPayInfor.totalAmount))*/}
+                            {/*                        });*/}
+                            {/*                    }*/}
+                            {/*                }}>*/}
+                            {/*                    <Radio value={0}>自定义</Radio>*/}
+                            {/*                    <Radio value={1}>半款</Radio>*/}
+                            {/*                    <Radio value={2}>全款</Radio>*/}
+                            {/*                </Radio.Group>*/}
+                            {/*            )}*/}
+                            {/*        </Form.Item> : <div/>}*/}
                             {this.props.type !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 style={{
@@ -182,27 +181,27 @@ class ApplyPaymentModal extends Component{
                                     )
                                 }
                             </Form.Item> : <div/>}
-                            {
-                                this.props.type === 2 ?
-                                    <Form.Item
-                                        {...formItemLayout}
-                                        style={{
-                                            display:'flex'
-                                        }}
-                                        label="官费(万元):"
-                                    >
-                                        {/*costReduction  费减 0否 1 是*/}
-                                        {/*reductionAmount  费减金额*/}
-                                        {/*officialUnitPrice  官费单价*/}
-                                        <div>
-                                          {
-                                              previewPayInfor.costReduction === 1 ?
-                                                  (isNaN(parseFloat(previewPayInfor.reductionAmount)) ? previewPayInfor.reductionAmount : parseFloat(previewPayInfor.reductionAmount)):
-                                                  (isNaN(parseFloat(previewPayInfor.officialUnitPrice)) ? previewPayInfor.officialUnitPrice : parseFloat(previewPayInfor.officialUnitPrice))
-                                          }
-                                        </div>
-                                    </Form.Item> : <div/>
-                            }
+                            {/*{*/}
+                            {/*    this.props.type === 2 ?*/}
+                            {/*        <Form.Item*/}
+                            {/*            {...formItemLayout}*/}
+                            {/*            style={{*/}
+                            {/*                display:'flex'*/}
+                            {/*            }}*/}
+                            {/*            label="官费(万元):"*/}
+                            {/*        >*/}
+                            {/*            /!*costReduction  费减 0否 1 是*!/*/}
+                            {/*            /!*reductionAmount  费减金额*!/*/}
+                            {/*            /!*officialUnitPrice  官费单价*!/*/}
+                            {/*            <div>*/}
+                            {/*              {*/}
+                            {/*                  previewPayInfor.costReduction === 1 ?*/}
+                            {/*                      (isNaN(parseFloat(previewPayInfor.reductionAmount)) ? previewPayInfor.reductionAmount : parseFloat(previewPayInfor.reductionAmount)):*/}
+                            {/*                      (isNaN(parseFloat(previewPayInfor.officialUnitPrice)) ? previewPayInfor.officialUnitPrice : parseFloat(previewPayInfor.officialUnitPrice))*/}
+                            {/*              }*/}
+                            {/*            </div>*/}
+                            {/*        </Form.Item> : <div/>*/}
+                            {/*}*/}
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
@@ -210,9 +209,9 @@ class ApplyPaymentModal extends Component{
                                 }}
                                 label="数量(个):"
                             >
-                                {previewPayInfor.quantity}
+                                {this.props.type === 2 ? this.props.commodityQuantity : previewPayInfor.quantity}
                             </Form.Item>
-                            <Form.Item
+                            {this.props.type !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 style={{
                                     display:'flex'
@@ -225,7 +224,7 @@ class ApplyPaymentModal extends Component{
 
                                     }
                                 </div>
-                            </Form.Item>
+                            </Form.Item> : null}
                             <Form.Item
                                 {...formItemLayout}
                                 style={{
@@ -239,34 +238,35 @@ class ApplyPaymentModal extends Component{
                                 })(
                                     <InputNumber
                                         // disabled={previewPayInfor.quantity <= 1 || this.state.paymentStatus !== 0}
-                                        disabled={true}
+                                        disabled={this.props.type !== 2}
                                         style={{ width: '200px' }}
                                         precision={0}
                                         placeholder="请输入本次申请支付数量"
+                                        min={1}
                                         onChange={(e)=>{
                                             //0正常 1专利 2软著 3审计
                                             //软著 专利申请不需要计算,因为单价未知
-                                            if(!(this.props.projectType === 2 || (this.props.projectType === 1 && this.props.patentType === 0))){
-                                                //官费
-                                                if(this.props.type === 2){
-                                                    this.props.form.setFieldsValue({
-                                                        applicationAmount: (previewPayInfor.costReduction === 1 ?
-                                                            previewPayInfor.reductionAmount :
-                                                            previewPayInfor.officialUnitPrice) * 1000000 * e / 1000000,
-                                                    });
-                                                }else {
-                                                    let num = previewPayInfor.unitPrice * 1000000 * e / 1000000;
-                                                    this.props.form.setFieldsValue({
-                                                        applicationAmount: num,
-                                                    });
-                                                }
-                                            }
+                                            // if(!(this.props.projectType === 2 || (this.props.projectType === 1 && this.props.patentType === 0))){
+                                            //     //官费
+                                            //     if(this.props.type === 2){
+                                            //         this.props.form.setFieldsValue({
+                                            //             applicationAmount: (previewPayInfor.costReduction === 1 ?
+                                            //                 previewPayInfor.reductionAmount :
+                                            //                 previewPayInfor.officialUnitPrice) * 1000000 * e / 1000000,
+                                            //         });
+                                            //     }else {
+                                            //         let num = previewPayInfor.unitPrice * 1000000 * e / 1000000;
+                                            //         this.props.form.setFieldsValue({
+                                            //             applicationAmount: num,
+                                            //         });
+                                            //     }
+                                            // }
                                         }}
                                     />
                                 )}
                             </Form.Item>
                             {/* 0正常 1专利 2软著 3审计 */}
-                            <Form.Item
+                            {this.props.type !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 style={{
                                     display:'flex'
@@ -296,7 +296,7 @@ class ApplyPaymentModal extends Component{
                                         style={{ width: '200px' }}
                                         placeholder="请输入本次申请支付金额"/>
                                 )}
-                            </Form.Item>
+                            </Form.Item> : null}
                             <Form.Item
                                 {...formItemLayout}
                                 style={{

+ 54 - 29
js/component/manageCenter/components/checkProject/index.jsx

@@ -59,7 +59,9 @@ class CheckProject extends Component {
           key: 'companyName',
           render: (text, record) => {
             return <span>
-              {text+'-'+record.tpcId}
+              {
+                text === 2 ? text : (text+'-'+record.tpcId)
+              }
               {
                 text !== record.tpcName ?
                     '('+record.tpcName+')' : ''
@@ -607,21 +609,21 @@ class CheckProject extends Component {
                       }}>
                         申请付款
                       </Button>
-                      {record.officialCost === 1? <Button
-                          type="primary"
-                          style={{
-                            marginLeft: '10px',
-                          }}
-                          disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1))}
-                          onClick={() => {
-                            this.setState({
-                              previewPayVisible: true,
-                              previewPayInfor: record,
-                              type: 2,
-                            })
-                          }}>
-                        付官费
-                      </Button> : <div/>}
+                      {/*{record.officialCost === 1? <Button*/}
+                      {/*    type="primary"*/}
+                      {/*    style={{*/}
+                      {/*      marginLeft: '10px',*/}
+                      {/*    }}*/}
+                      {/*    disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1))}*/}
+                      {/*    onClick={() => {*/}
+                      {/*      this.setState({*/}
+                      {/*        previewPayVisible: true,*/}
+                      {/*        previewPayInfor: record,*/}
+                      {/*        type: 2,*/}
+                      {/*      })*/}
+                      {/*    }}>*/}
+                      {/*  付官费*/}
+                      {/*</Button> : <div/>}*/}
                       {this.props.status === 2 && !this.props.isAuditPaymentGLY ? <Popconfirm
                           title="是否删除?"
                           onConfirm={() => {
@@ -1104,21 +1106,43 @@ class CheckProject extends Component {
                     </div> : <div/>
                 }
                 {
-                  this.props.orderTaskOfficialCost === 1 && this.props.startType !== 0?
-                      <div style={{padding:'0px 0px 10px 20px'}}>
-                        官费:<span style={{marginLeft:'15px'}}>{this.props.containOfficialFees === 0 ? '实际已缴费' : '实际未缴费'}</span>
+                  this.props.projectType === 1 && this.props.startType !== 0?
+                      <div style={{padding:'0px 0px 10px 20px',display:'flex', alignItems:'center',}}>
+                        官费:
+                        {
+                          this.props.patentType === 1 ?
+                              <span style={{marginLeft:'15px'}}>{this.props.containOfficialFees === 0 ? '实际已缴费' : '实际未缴费'}</span>:
+                              <PatentCheck
+                                  style={{
+                                    display:'flex',
+                                    alignItems:'center',
+                                  }}
+                                  id={this.props.tid}
+                                  patentTypeName={this.props.patentTypeName}
+                                  checkStatus={this.props.checkStatus}  //核对状态
+                                  projectType={this.props.projectType}  //项目类型
+                                  patentType={this.props.patentType}   //专利类型
+                                  startType={this.props.startType}   //1供应商 0外包
+                                  orderTaskOfficialCost={this.props.orderTaskOfficialCost}  //1含官费 0不含官费
+                                  orderTaskCostReduction={this.props.orderTaskCostReduction} //1有费减 0无费减
+                                  isPreviewPay={this.props.isPreviewPay}
+                                  status={this.props.status}
+                                  onPayOfficialExpenses={()=>{
+                                    this.setState({
+                                      previewPayVisible: true,
+                                      type: 2,
+                                    })
+                                  }}
+                              />
+                        }
                       </div> : null
                 }
-                <PatentCheck
-                    style={{
-                      padding:'0px 0px 20px 20px'
-                    }}
-                    id={this.props.tid}
-                    projectType={this.props.projectType}  //项目类型
-                    startType={this.props.startType}   //1供应商 0外包
-                    orderTaskOfficialCost={this.props.orderTaskOfficialCost}  //1含官费 0不含官费
-                    orderTaskCostReduction={this.props.orderTaskCostReduction} //1有费减 0无费减
-                />
+                {/*{*/}
+                {/*  this.props.orderTaskOfficialCost === 1 && this.props.startType !== 0?*/}
+                {/*      <div style={{padding:'0px 0px 10px 20px'}}>*/}
+                {/*        官费:<span style={{marginLeft:'15px'}}>{this.props.containOfficialFees === 0 ? '实际已缴费' : '实际未缴费'}</span>*/}
+                {/*      </div> : null*/}
+                {/*}*/}
                 <div className="thirdParty">
                   <div>
                     <span className="title">
@@ -1304,6 +1328,7 @@ class CheckProject extends Component {
                     patentType={this.props.patentType}
                     previewPayInfor={this.state.previewPayInfor}
                     visible={this.state.previewPayVisible}
+                    commodityQuantity={this.props.commodityQuantity}
                     onRefresh={()=>{
                       this.props.onRefresh();
                       this.getSelectOrderPayment();

+ 8 - 8
js/component/manageCenter/components/checkProject/payRecord.js

@@ -410,10 +410,10 @@ class PayRecord extends Component{
                                 <div>{paymentDetails.companyName}</div>
                             </Form.Item>
                             {/*0第三方 1催款 2官费*/}
-                            <Form.Item
+                            {paymentDetails.chooseType !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'
-                                label={paymentDetails.chooseType === 2 ? '官费(万元):' : '单价(万元):'}
+                                label={'单价(万元):'}
                             >
                                 <div>
                                     {/* projectType 0正常 1专利 2软著 3审计*/}
@@ -427,7 +427,7 @@ class PayRecord extends Component{
                                     {/*}*/}
                                     {isNaN(parseFloat(paymentDetails.initialUnitPrice)) ? paymentDetails.initialUnitPrice : parseFloat(paymentDetails.initialUnitPrice)}
                                 </div>
-                            </Form.Item>
+                            </Form.Item> : null}
                             <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'
@@ -440,13 +440,13 @@ class PayRecord extends Component{
                                     <Input disabled={true} style={{ width: '200px' }} placeholder="请输入數量" type={'number'}/>
                                 )}
                             </Form.Item>
-                            <Form.Item
+                            {paymentDetails.chooseType !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'
                                 label="总价(万元):"
                             >
                                 <div>{isNaN(parseFloat(paymentDetails.initialTotalAmount)) ? paymentDetails.initialTotalAmount : parseFloat(paymentDetails.initialTotalAmount)}</div>
-                            </Form.Item>
+                            </Form.Item> : null}
                             {/*官费不显示已付*/}
                             {paymentDetails.chooseType !== 2 ? <Form.Item
                                 {...formItemLayout}
@@ -488,7 +488,7 @@ class PayRecord extends Component{
                                         </Form.Item>
                                     </div> : <div/>
                             }
-                            <Form.Item
+                            {paymentDetails.chooseType !== 2 ? <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'
                                 label="本次申请支付金额(万元):"
@@ -508,7 +508,7 @@ class PayRecord extends Component{
                                         disabled={this.props.isAuditPaymentGLY ? this.props.isAuditPaymentGLY : (this.props.isAuditPayment ? this.state.paymentDetails.status !== 0 : this.state.paymentDetails.status !== 2)}
                                         placeholder="请输入本次申请支付金额"/>
                                 )}
-                            </Form.Item>
+                            </Form.Item> : null}
                             <Form.Item
                                 {...formItemLayout}
                                 className='formItemStyle'
@@ -607,4 +607,4 @@ class PayRecord extends Component{
 
 const WrappedNormalLoginForm = Form.create()(PayRecord);
 
-export default WrappedNormalLoginForm
+export default WrappedNormalLoginForm

+ 1 - 1
js/component/manageCenter/order/orderNew/addService.jsx

@@ -6156,7 +6156,7 @@ const NewService = Form.create()(
                         value={this.state.patentType}
                         onChange={(e) => {
                           this.setState({ patentType: e });
-                          if(e === 1){
+                          if(e !== 0 && e !== 2){
                             this.setState({
                               costReduction: ''
                             })

+ 134 - 21
js/component/manageCenter/project/task/businessManagement/checkInfor.jsx

@@ -1,8 +1,9 @@
 import React,{Component} from 'react';
-import {Form, Input, Modal, Select, Spin} from "antd";
+import {Button, Form, Input, message, Modal, Radio, Select, Spin} from "antd";
 import {
     getboutique,
 } from "@/tools";
+import $ from "jquery";
 
 const formItemLayout = {
     labelCol: { span: 8 },
@@ -16,7 +17,66 @@ class checkInfor extends Component{
         super(props);
         this.state={
             loading: false,
+            patentType:props.infor ? props.infor.patentType : '',
+            officialCost:props.infor ? props.infor.officialCost : '',
+            costReduction:props.infor ? props.infor.costReduction : '',
+
+            patentTypeList:[],
         }
+        this.onChange = this.onChange.bind(this);
+        this.getpatentTypeList = this.getpatentTypeList.bind(this);
+    }
+
+    componentDidMount() {
+        this.getpatentTypeList();
+    }
+
+    onChange() {
+        this.setState({
+            loading: true,
+        });
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
+            data: {
+                id: this.props.infor.id, //项目ID
+                officialCost: this.state.officialCost, //是否有官费
+                costReduction: this.state.patentType === 0 || this.state.patentType === 2 ?this.state.costReduction : '', //是否有费减
+                patentType: this.state.patentType, //专利类型
+            },
+        }).done(
+            function (data) {
+                this.setState({
+                    loading: false,
+                });
+                if (!data.error.length) {
+                    message.success("保存成功!");
+                    this.props.onCancel();
+                } else {
+                    message.warning(data.error[0].message);
+                }
+            }.bind(this)
+        );
+    }
+
+    getpatentTypeList() {
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + '/api/admin/orderProject/getPatentType',
+            success: function (data) {
+                if (data.error.length === 0) {
+                    this.setState({
+                        patentTypeList:data.data
+                    })
+                }else{
+                    message.warning(data.error[0].message);
+                };
+            }.bind(this)
+        });
     }
 
     render() {
@@ -31,6 +91,8 @@ class checkInfor extends Component{
             ifCertificationFee,//是否包含认证费
             declarationBatch,//批次
             type,//项目类型  0 正常 1专利 2软著 3审计 4双软 5高新 6商标
+            patentType,//项目类型
+            patentTypeName,//项目类型名称
         } = this.props.infor;
         return (
             <Modal
@@ -62,26 +124,6 @@ class checkInfor extends Component{
                         <FormItem
                             className="half-item"
                             {...formItemLayout}
-                            label="官费"
-                            style={{ display: this.state.displayFees }}
-                        >
-                              <span>
-                                {officialCost === 0 ? "无官费" : "有官费"}
-                              </span>
-                        </FormItem>
-                        <FormItem
-                            className="half-item"
-                            {...formItemLayout}
-                            label="费减"
-                            style={{ display: this.state.displayFees }}
-                        >
-                              <span>
-                                {costReduction === 0 ? "无费减" : "有费减"}
-                              </span>
-                        </FormItem>
-                        <FormItem
-                            className="half-item"
-                            {...formItemLayout}
                             label="金额(万元)"
                         >
                             <span>{commodityPrice}</span>
@@ -116,6 +158,77 @@ class checkInfor extends Component{
                                 <span>{taskComment}</span>
                             </FormItem>
                         </div>
+                        <FormItem
+                            className="half-item"
+                            {...formItemLayout}
+                            label="专利类型"
+                        >
+                            <Select
+                                placeholder="请选择专利类型"
+                                style={{ width: "200px" }}
+                                value={this.state.patentType}
+                                onChange={(e) => {
+                                    this.setState({ patentType: e });
+                                    if(e !== 0 && e !== 2){
+                                        this.setState({
+                                            costReduction: ''
+                                        })
+                                    }
+                                }}
+                            >
+                                {this.state.patentTypeList.map(function (v,k) {
+                                    return (
+                                        <Select.Option key={k} value={v.id}>{v.name}</Select.Option>
+                                    );
+                                })}
+                            </Select>
+                        </FormItem>
+                        <FormItem
+                            className="half-item"
+                            {...formItemLayout}
+                            label="官费"
+                            style={{ display: this.state.displayFees }}
+                        >
+                            <Radio.Group
+                                value={this.state.officialCost}
+                                onChange={(e) => {
+                                    this.setState({ officialCost: e.target.value });
+                                    if(e.target.value === 0){
+                                        this.setState({
+                                            costReduction: ''
+                                        })
+                                    }
+                                }}
+                            >
+                                <Radio value={1}>含官费</Radio>
+                                <Radio value={0}>不含官费</Radio>
+                            </Radio.Group>
+                        </FormItem>
+                        <FormItem
+                            className="half-item"
+                            {...formItemLayout}
+                            label="费减"
+                            style={{ display: this.state.displayFees }}
+                        >
+                            <Radio.Group
+                                disabled={this.state.officialCost === 0 || (this.state.patentType !== 0 && this.state.patentType !== 2)}
+                                value={this.state.costReduction}
+                                onChange={(e) => {
+                                    this.setState({ costReduction: e.target.value });
+                                }}
+                            >
+                                <Radio value={1}>有费减</Radio>
+                                <Radio value={0}>无费减</Radio>
+                            </Radio.Group>
+                        </FormItem>
+                    </div>
+                    <div style={{color:'#f00',paddingLeft: '67px',paddingBottom: '10px'}}>
+                        注意:技术员已发起二次确认,请核对本次费用情况,填写有误,将影响到成本支付情况
+                    </div>
+                    <div style={{display:'flex',justifyContent:"center"}}>
+                        <Button type='primary' onClick={()=>{
+                            this.onChange();
+                        }}>确认核对</Button>
                     </div>
                 </Form>
             </Modal>

+ 5 - 5
js/component/manageCenter/project/task/businessManagement/index.jsx

@@ -1,10 +1,7 @@
 import React,{Component} from "react";
-import {Button, Cascader, Icon, Input, message, Select, Spin, Table, Tabs, Tag, Tooltip} from "antd";
+import {Button, Cascader, Input, message, Select, Spin, Table, Tabs, Tooltip} from "antd";
 import $ from "jquery/src/ajax";
 import {ChooseList} from "../../../order/orderNew/chooseList";
-import {
-    getTaskStatus,
-    getProjectName} from '@/tools';
 import {projectStatusCascader } from '@/dataDic.js';
 import CheckInfor from './checkInfor';
 import OrderInfor from "./orderInfor";
@@ -16,6 +13,7 @@ class BusinessManagement extends Component{
         super(props);
         this.state={
             changeList:[],
+            pageNo:1,
             columns:[
                 {
                     title: '项目编号',
@@ -205,6 +203,7 @@ class BusinessManagement extends Component{
                     this.setState({
                         dataSource: theArr,
                         pagination: this.state.pagination,
+                        pageNo:data.data.pageNo
                     })
                 }else{
                     message.warning(data.error[0].message)
@@ -412,7 +411,7 @@ class BusinessManagement extends Component{
                                         : this.state.columns
                                 }
                                 dataSource={this.state.dataSource}
-                                pagination={false}
+                                pagination={this.state.pagination}
                                 onRowClick={(record)=>{
                                     this.setState({
                                         orderVisible:true,
@@ -431,6 +430,7 @@ class BusinessManagement extends Component{
                             visible:false,
                             infor:{}
                         })
+                        this.loadData(this.state.pageNo);
                     }}
                 /> : null}
                 {this.state.orderVisible ? <OrderInfor

+ 73 - 54
js/component/manageCenter/project/task/myTask.jsx

@@ -1027,22 +1027,6 @@ const Task = React.createClass({
                           申请付款
                         </Button>
                       }
-                      {
-                        <Button
-                            type="primary"
-                            style={{
-                              marginLeft: '10px',
-                            }}
-                            disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)}
-                            onClick={() => {
-                              this.setState({
-                                previewPayVisible: true,
-                                previewPayInfor: record,
-                              })
-                        }}>
-                          付官费
-                        </Button>
-                      }
                       <Popconfirm
                           title="是否删除?"
                           onConfirm={() => {
@@ -1682,6 +1666,8 @@ const Task = React.createClass({
             commodityQuantity:thisdata.commodityQuantity, //派单项目数
             timeRecord: thisdata.timeRecord || '{}',//项目状态JSON
             timeRecordparse: thisdata.timeRecord ? JSON.parse(thisdata.timeRecord) : {},//项目状态JSON
+            checkStatus:thisdata.checkStatus,//核对状态
+            patentTypeName:thisdata.patentTypeName
           })
         }
       }.bind(this),
@@ -2333,7 +2319,13 @@ const Task = React.createClass({
             id: _this.state.refundStatus === 2 ? _this.state.mid : undefined,//被拒绝外包申请时,需要传id
           }
 
-          if(_this.state.startType !== 0){
+          for(let i of Object.keys(data)){
+            if(data[i] === null){
+              delete data[i];
+            }
+          }
+
+          if(_this.state.startType !== 0 && _this.state.patentType === 1){
             data.actualOfficial = _this.state.containOfficialFees;//0实际已缴费 1实际未缴费
           }
 
@@ -4544,19 +4536,6 @@ const Task = React.createClass({
                           <Radio value={1}>供应商信息</Radio>
                         </Radio.Group>
                       </FormItem>
-                        <PatentCheck
-                            style={{
-                              position:"absolute",
-                              right: '102px',
-                              border: '1px solid rgb(199 187 187)',
-                              padding:'20px 18px 20px 20px'
-                            }}
-                            id={this.state.id}
-                            projectType={this.state.projectType}  //项目类型
-                            startType={this.state.startType}   //1供应商 0外包
-                            orderTaskOfficialCost={this.state.orderTaskOfficialCost}  //1含官费 0不含官费
-                            orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
-                        />
                     </div>
                     {/* 专利类型 */}
                     <div
@@ -4677,21 +4656,39 @@ const Task = React.createClass({
                       </FormItem>
                     </div>
                     {/*外包类型无此选项*/}
-                    {this.state.orderTaskOfficialCost === 1 && this.state.startType !== 0 ? <div className="clearfix">
+                    {this.state.startType !== 0 && this.state.projectType === 1 ? <div className="clearfix">
                       <FormItem
                           className="half-item"
-                          labelCol={{ span: 4 }}
-                          wrapperCol={{ span: 14 }}
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 15 }}
                           label={<span>官费</span>}>
-                          <Radio.Group
-                              value={this.state.containOfficialFees}
-                              onChange={(e) => {
-                                  this.setState({ containOfficialFees: e.target.value })
-                              }}
-                          >
-                              <Radio value={0}>实际已缴费</Radio>
-                              <Radio value={1}>实际未缴费</Radio>
-                          </Radio.Group>
+                          {
+                            this.state.patentType === 1 ?
+                                <Radio.Group
+                                    value={this.state.containOfficialFees}
+                                    onChange={(e) => {
+                                      this.setState({ containOfficialFees: e.target.value })
+                                    }}
+                                >
+                                  <Radio value={0}>实际已缴费</Radio>
+                                  <Radio value={1}>实际未缴费</Radio>
+                                </Radio.Group>:
+                                <PatentCheck
+                                    style={{
+                                      display:'flex',
+                                      alignItems:'center',
+                                    }}
+                                    id={this.state.id}
+                                    checkStatus={this.state.checkStatus}  //核对状态
+                                    projectType={this.state.projectType}  //项目类型
+                                    patentType={this.state.patentType}   //专利类型
+                                    startType={this.state.startType}   //1供应商 0外包
+                                    orderTaskOfficialCost={this.state.orderTaskOfficialCost}  //1含官费 0不含官费
+                                    orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
+                                    isPreviewPay={false}
+                                    status={this.state.refundStatus}
+                                />
+                          }
                       </FormItem>
                     </div> : <div/>}
                     {/* 第三方信息专利 */}
@@ -4951,6 +4948,9 @@ const Task = React.createClass({
                         this.state.visible && this.state.activeKey === '2' ?
                             <CheckProject
                                 {...this.props}
+                                patentTypeName={this.state.patentTypeName}                  //官费类型
+                                commodityQuantity={this.state.commodityQuantity}            //项目数量
+                                checkStatus={this.state.checkStatus}                        //核对状态
                                 orderTaskOfficialCost={this.state.orderTaskOfficialCost}    //是否含官费  0无1有
                                 orderTaskCostReduction={this.state.orderTaskCostReduction}    //是否含费减  0无1有
                                 containOfficialFees={this.state.containOfficialFees}        //0:实际已缴费 1:实际未缴费
@@ -6019,21 +6019,39 @@ const Task = React.createClass({
                         </Radio.Group>
                       </FormItem>
                     </div>
-                    {this.state.orderTaskOfficialCost === 1 && this.state.startType !== 0 ? <div className="clearfix">
+                    {this.state.startType !== 0 && this.state.projectType === 1 ? <div className="clearfix">
                       <FormItem
                           className="half-item"
-                          labelCol={{ span: 4 }}
-                          wrapperCol={{ span: 14 }}
+                          labelCol={{ span: 3 }}
+                          wrapperCol={{ span: 15 }}
                           label={<span>官费</span>}>
-                        <Radio.Group
-                            value={this.state.containOfficialFees}
-                            onChange={(e) => {
-                              this.setState({ containOfficialFees: e.target.value })
-                            }}
-                        >
-                          <Radio value={0}>实际已缴费</Radio>
-                          <Radio value={1}>实际未缴费</Radio>
-                        </Radio.Group>
+                        {
+                          this.state.patentType === 1 ?
+                              <Radio.Group
+                                  value={this.state.containOfficialFees}
+                                  onChange={(e) => {
+                                    this.setState({ containOfficialFees: e.target.value })
+                                  }}
+                              >
+                                <Radio value={0}>实际已缴费</Radio>
+                                <Radio value={1}>实际未缴费</Radio>
+                              </Radio.Group>:
+                              <PatentCheck
+                                  style={{
+                                    display:'flex',
+                                    alignItems:'center',
+                                  }}
+                                  id={this.state.id}
+                                  checkStatus={this.state.checkStatus}  //核对状态
+                                  projectType={this.state.projectType}  //项目类型
+                                  patentType={this.state.patentType}   //专利类型
+                                  startType={this.state.startType}   //1供应商 0外包
+                                  orderTaskOfficialCost={this.state.orderTaskOfficialCost}  //1含官费 0不含官费
+                                  orderTaskCostReduction={this.state.orderTaskCostReduction} //1有费减 0无费减
+                                  isPreviewPay={false}
+                                  status={this.state.refundStatus}
+                              />
+                        }
                       </FormItem>
                     </div> : <div/>}
                     {/* 第三方信息专利 */}
@@ -6273,6 +6291,7 @@ const Task = React.createClass({
                           <CheckProject
                               {...this.props}
                               tid={this.state.tid}
+                              checkStatus={this.state.checkStatus}                        //核对状态
                               orderTaskOfficialCost={this.state.orderTaskOfficialCost}    //是否含官费  0无1有
                               containOfficialFees={this.state.containOfficialFees}        //0:实际已缴费 1:实际未缴费
                               oldInfor={this.state.oldInfor}