Browse Source

修改发起项目传参

mentoswzq 4 years ago
parent
commit
acc85dcc64

+ 112 - 22
js/component/manageCenter/order/orderNew/addService.jsx

@@ -22,6 +22,7 @@ import $ from "jquery/src/ajax";
 import "../userMangagement.less";
 import "../billing.less";
 import moment from "moment";
+import { shenghePeo } from "@/tools.js";
 import Picture from "@/manageCenter/publicComponent/picture";
 import ResolutionDetail from "@/resolutionDetail";
 import quxiao from "../../../../../image/quxiao.png";
@@ -2452,7 +2453,7 @@ const NewService = Form.create()(
       if (key === "3") {
         this.getChangeData();
       }
-      if (key === "2") {
+      if (key === "2" || key === "3") {
         let url = window.location.href.substring(7);
         $.ajax({
           method: "get",
@@ -3346,34 +3347,24 @@ const NewService = Form.create()(
           // console.log(data.data);
           if (data.data && data.data.length) {
             let thisdata = data.data[data.data.length - 1];
-            let obj = {
-              id: thisdata.id,
-              typeChange: thisdata.type,
-              totalAmount: thisdata.totalAmount,
-              settlementAmount: thisdata.settlementAmount,
-              changeAmount: thisdata.changeAmount,
-              remarksC: thisdata.remarks,
-              startRemarks: thisdata.zxsRemarks,
-              processState: thisdata.processState,
-              status: thisdata.status,
-              arrears: thisdata.arrears,
-              createTimes: thisdata.createTimes,
-              voucherUrl: thisdata.voucherUrl
+            thisdata.typeChange = thisdata.type;
+            thisdata.remarksC = thisdata.remarks;
+            thisdata.startRemarks = thisdata.zxsRemarks;
+            thisdata.voucherUrl = thisdata.voucherUrl
                 ? splitUrl(
                     thisdata.voucherUrl,
                     ",",
                     globalConfig.avatarHost + "/upload",
                     url
-                  )
-                : [],
-            };
+                )
+                : [];
             this.proList(thisdata.id);
             this.cuiList(thisdata.id);
             this.logList(thisdata.id);
             this.setState({
               //判断是否有合同变更记录
               isJilu: true,
-              detailChange: obj,
+              detailChange: thisdata,
             });
           }
         }.bind(this),
@@ -3946,6 +3937,47 @@ const NewService = Form.create()(
         rotateDeg,
       });
     },
+    showConfirmChange(fn, record) {
+      confirm({
+        title: "确定取消本次变更吗?",
+        content: (
+            <span style={{ color: "red" }}>
+          取消后本次变更将作废!!!
+        </span>
+        ),
+        onOk() {
+          fn();
+        },
+        onCancel() { }
+      });
+    },
+    deleteChange() {
+      this.setState({
+        loading: true,
+      });
+      $.ajax({
+        url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
+        method: "post",
+        data: {
+          id: this.state.changeId,
+          status: this.state.status,
+          processState: this.state.processState,
+          orderNo: this.state.orderNo
+        },
+      }).done(
+          function (data) {
+            this.setState({
+              loading: false,
+            });
+            if (!data.error.length) {
+              message.success("取消成功!");
+              this.handleCancelclose()
+            } else {
+              message.warning(data.error[0].message);
+            }
+          }.bind(this)
+      );
+    },
     render() {
       const expandedRowRender = (e) => {
         const data = e.list;
@@ -5450,6 +5482,30 @@ const NewService = Form.create()(
                                 >
                                   重置
                                 </Button>
+                                {this.state.status === 3 ? (
+                                    <Button
+                                        type="danger"
+                                        style={{
+                                          float: "right",
+                                          backgroundColor: "red",
+                                          color: "white",
+                                          position: "absolute",
+                                          right: 0,
+                                          height: 50,
+                                          borderRadius: 20,
+                                          zIndex: 100,
+                                          top: 0,
+                                        }}
+                                        onClick={(e) => {
+                                          e.stopPropagation();
+                                          this.showConfirmChange(this.deleteChange);
+                                        }}
+                                    >
+                                      取消本次变更
+                                    </Button>
+                                ) : (
+                                    ""
+                                )}
                                 {/* <Button type="danger" >取消本次变更</Button> */}
                               </FormItem>
                             </div>
@@ -5840,10 +5896,20 @@ const NewService = Form.create()(
                                 label="当前进度"
                               >
                                 <span>
-                                  {getProcessStatusNew(
-                                    this.state.detailChange.processState,
-                                    this.state.detailChange.status
-                                  )}
+                                  {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
+                                  {
+                                    this.state.detailChange.processState === 2 || this.state.detailChange.processState === 3
+                                        ? shenghePeo(
+                                        this.state.detailChange.processState === 2
+                                            ? this.state.detailChange.consultantExamine
+                                            : this.state.detailChange.managerExamine,
+                                        this.state.detailChange.processState
+                                        )
+                                        : getProcessStatusNew(
+                                        this.state.detailChange.processState,
+                                        this.state.detailChange.status
+                                        )
+                                  }
                                 </span>
                               </FormItem>
                               {/* <FormItem
@@ -5986,6 +6052,30 @@ const NewService = Form.create()(
                                   {/*    src={this.state.previewImage || ""}*/}
                                   {/*  />*/}
                                   {/*</Modal>*/}
+                                  {this.state.status === 3 ? (
+                                      <Button
+                                          type="danger"
+                                          style={{
+                                            float: "right",
+                                            backgroundColor: "red",
+                                            color: "white",
+                                            position: "absolute",
+                                            right: 0,
+                                            height: 50,
+                                            borderRadius: 20,
+                                            zIndex: 100,
+                                            top: 0,
+                                          }}
+                                          onClick={(e) => {
+                                            e.stopPropagation();
+                                            this.showConfirmChange(this.deleteChange);
+                                          }}
+                                      >
+                                        取消本次变更
+                                      </Button>
+                                  ) : (
+                                      ""
+                                  )}
                                 </div>
                               </FormItem>
                             </div>

+ 23 - 8
js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxgly.js

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Button, message, Input, Table } from "antd";
+import {Form, Upload, Modal, Button, message, Input, Table, Tooltip} from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "../../../../tools.js";
@@ -68,13 +68,28 @@ class Itemlist extends Component {
     let pageData = this.props.pageData;
     return (
       <div className="clearfix">
-        <Form.Item
-          label={pageData.labelA}
-          {...pageData.formItemLayoutA}
-          className="half-item"
-        >
-          <p style={{ width: 350, wordWrap: "break-word" }}>{pageData.dataA}</p>
-        </Form.Item>
+        {pageData.labelA !== '当前进度' ? <Form.Item
+                label={pageData.labelA}
+                {...pageData.formItemLayoutA}
+                className="half-item"
+            >
+              <div>{pageData.dataA}</div>
+            </Form.Item> :
+            <Form.Item
+                label={pageData.labelA}
+                {...pageData.formItemLayoutA}
+                className="half-item"
+            >
+              <Tooltip placement="topLeft" title={pageData.dataA}>
+                <div style={{
+                  width: '350px !important',
+                  whiteSpace: 'nowrap',
+                  wordBreak: 'break-all',
+                  overflow: 'hidden',
+                  textOverflow: 'ellipsis',
+                }}>{pageData.dataA}</div>
+              </Tooltip>
+            </Form.Item>}
         <Form.Item
           label={pageData.labelB}
           {...pageData.formItemLayoutB}

+ 23 - 5
js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxy.js

@@ -1,5 +1,5 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Button, message, Table, Input } from "antd";
+import { Form, Tooltip, Modal, Button, message, Table, Input } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew, changeColor } from "@/tools.js";
@@ -67,13 +67,28 @@ class Itemlist extends Component {
     let pageData = this.props.pageData;
     return (
       <div className="clearfix" style={{ height: "30px", overflow: "hidden" }}>
-        <Form.Item
+        {pageData.labelA !== '当前进度' ? <Form.Item
           label={pageData.labelA}
           {...pageData.formItemLayoutA}
           className="half-item"
         >
-          <p style={{ width: 350, wordWrap: "break-word" }}>{pageData.dataA}</p>
-        </Form.Item>
+          <div>{pageData.dataA}</div>
+        </Form.Item> :
+          <Form.Item
+              label={pageData.labelA}
+              {...pageData.formItemLayoutA}
+              className="half-item"
+          >
+            <Tooltip placement="topLeft" title={pageData.dataA}>
+            <div style={{
+              width: '350px !important',
+              whiteSpace: 'nowrap',
+              wordBreak: 'break-all',
+              overflow: 'hidden',
+              textOverflow: 'ellipsis',
+            }}>{pageData.dataA}</div>
+            </Tooltip>
+          </Form.Item>}
         <Form.Item
           label={pageData.labelB}
           {...pageData.formItemLayoutB}
@@ -461,7 +476,9 @@ class ChangeDetail extends Component {
             {orgCodeUrl ? <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
               <ImgList fileList={orgCodeUrl} ItemWidth={'96px'}/>
             </div> : <div/>}
-            <Rizhi changeId={this.props.id} />
+            <div style={{marginLeft: '-60px'}}>
+              <Rizhi changeId={this.props.id} />
+            </div>
           </Form.Item>
           {/* {this.props.data.type === 0 && this.props.data.processState >= 2 ? (
             <div>
@@ -483,6 +500,7 @@ class ChangeDetail extends Component {
               paddingLeft: "90px",
               position: "relative",
               bottom: "20px",
+              paddingTop: '28px'
             }}
           >
             {/* <span>操作人:</span> */}

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

@@ -2678,7 +2678,7 @@ const Task = React.createClass({
             thisData.key = i;
             thisData.patentType = thisData.type;
             theArr.push(thisData);
-            type=thisData.type;
+            type=thisData.patentType;
             startType=thisData.startType;
             patentNameType= thisData.patentNameType
           }
@@ -2694,9 +2694,9 @@ const Task = React.createClass({
             }
           }
 
-          if(type === 1 || type === 2){
+          if(type === 0 || type === 1){
             this.setState({
-              patentType: type === 1 ? 0 : type === 2 ? 1 : -1,    //0其他 1专利申请 2专利买卖
+              patentType: type === 0 ? 1 : 2,    //0其他 1专利申请 2专利买卖
               patentNameType: patentNameType,                         //0实用新型 1发明专利 2外观专利 3 其他
             })
           }

+ 3 - 2
js/component/manageCenter/project/task/newSupplier.js

@@ -177,9 +177,10 @@ class NewSupplier extends Component{
             data.calculation = 2;                       //0 其他 1软著 2专利
         }
 
-        data.type = this.props.realProjectType === 1 ? (this.props.patentType === 0 ? 1 : 2) : 0   //0其他 1专利申请 2专利买卖
+        // data.type = this.props.realProjectType === 1 ? (this.props.patentType === 0 ? 1 : 2) : 0   //0其他 1专利申请 2专利买卖
         if(this.props.realProjectType === 1){                   //专利
-            data.patentType = this.props.patentNameType     //专利名称
+            data.patentType = this.props.patentType === 0 ? 0 : 1;     //专利类型
+            data.patentNameType =this.props.patentNameType;                                                     //专利名称
         }
 
         data.startType = this.props.startType;     //项目类型 0外包  1供应商