瀏覽代碼

完成订单修改

hujie123456 5 年之前
父節點
當前提交
95c4b88fed
共有 38 個文件被更改,包括 12817 次插入2507 次删除
  1. 1 0
      css/base.less
  2. 15 0
      css/changeDetail.less
  3. 二進制
      image/tongguo.png
  4. 5 5
      js/component/dataDic.js
  5. 21 0
      js/component/manageCenter/financialManage/distribute/inSpecial.jsx
  6. 19 0
      js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx
  7. 20 0
      js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx
  8. 22 1
      js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx
  9. 28 0
      js/component/manageCenter/financialManage/distribute/outSpecial.jsx
  10. 3 0
      js/component/manageCenter/order/billing.less
  11. 70 26
      js/component/manageCenter/order/orderNew/addService.jsx
  12. 67 10
      js/component/manageCenter/order/orderNew/billing.jsx
  13. 28 5
      js/component/manageCenter/order/orderNew/changeComponent/agreeButton.js
  14. 10 2
      js/component/manageCenter/order/orderNew/changeComponent/changeApply.js
  15. 564 184
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzj.js
  16. 728 89
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js
  17. 275 110
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsjl.js
  18. 147 51
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsy.js
  19. 334 169
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailJszj.js
  20. 252 111
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxgly.js
  21. 230 61
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxy.js
  22. 4 0
      js/component/manageCenter/order/orderNew/changeComponent/searchInput.js
  23. 100 4
      js/component/manageCenter/order/orderNew/contractCwzj.js
  24. 124 4
      js/component/manageCenter/order/orderNew/contractCwzy.js
  25. 97 4
      js/component/manageCenter/order/orderNew/contractJsjl.js
  26. 41 6
      js/component/manageCenter/order/orderNew/contractJsy.js
  27. 97 4
      js/component/manageCenter/order/orderNew/contractJszj.js
  28. 101 8
      js/component/manageCenter/order/orderNew/contractYxgly.js
  29. 97 6
      js/component/manageCenter/order/orderNew/contractYxy.js
  30. 1 1
      js/component/manageCenter/project/project/outsourceTaskAssignment.jsx
  31. 15 2
      js/component/manageCenter/project/task/myTask.jsx
  32. 16 2
      js/component/manageCenter/project/task/myTaskOutsource.jsx
  33. 3 1
      js/component/manageCenter/project/task/taskAssignment.jsx
  34. 13 1
      js/component/manageCenter/publicComponent/assign.jsx
  35. 5 5
      js/component/manageCenter/set/userManagementS/newRole.jsx
  36. 1805 1634
      js/component/tools.js
  37. 1 1
      package.json
  38. 7458 0
      yarn.lock

+ 1 - 0
css/base.less

@@ -487,6 +487,7 @@ body {
     overflow: hidden;
 }
 
+
 .footer {
     border-top: 1px solid #d8d8d8;
 }

+ 15 - 0
css/changeDetail.less

@@ -0,0 +1,15 @@
+.changeDetail {
+    position: relative;
+    bottom: 15px;
+}
+
+.changeDetail .half-item {
+    margin-bottom: -5px;
+}
+.ant-form-item-control {
+    position: relative;
+}
+.ant-form-item-control p {
+    width: 731px !important;
+    height: auto !important;
+}

二進制
image/tongguo.png


+ 5 - 5
js/component/dataDic.js

@@ -2713,17 +2713,17 @@ module.exports = {
         },
         {
 		    value: "2",
-		    key: "技术员"
+		    key: "咨询师"
 		}, {
 		    value: "3",
-		    key: "技术经理"
+		    key: "咨询师经理"
         },
         {
 		    value: "4",
-		    key: "技术总监"
+		    key: "咨询师总监"
 		}, {
 		    value: "5",
-		    key: "财务专员(退单)"
+		    key: "财务专员"
         },
         {
 		    value: "6",
@@ -2737,7 +2737,7 @@ module.exports = {
 		    key: "董事长"
 		}, {
 		    value: "9",
-		    key: "财务专员(非退单)"
+		    key: "财务专员"
         }
     ],
     contractChangeStatus:[

+ 21 - 0
js/component/manageCenter/financialManage/distribute/inSpecial.jsx

@@ -17,6 +17,8 @@ import {
   getProvinceA,
   getInvoiceStatus,
   getprovince,
+  getStatus,
+  getPeople,
   splitUrl
 } from "@/tools";
 
@@ -98,6 +100,7 @@ const inSpecial = React.createClass({
               unitName: thisdata.unitName,
               orderno: thisdata.orderno,
               name: thisdata.name,
+              processStatus: thisdata.processStatus,
               projectStatus: thisdata.projectStatus,
               amount: thisdata.amount,
               sumAmount: thisdata.sumAmount,
@@ -160,6 +163,7 @@ const inSpecial = React.createClass({
           unitAddress: thisdata.unitAddress,
           invoiceRemarks: thisdata.invoiceRemarks,
           unitMobile: thisdata.unitMobile,
+          contractNo: thisdata.contractNo,
           post: thisdata.post,
           addressee: thisdata.addressee,
           addresseeMobile: thisdata.addresseeMobile,
@@ -195,6 +199,7 @@ const inSpecial = React.createClass({
       boHuivisible: false,
       selectedRowKeys: [],
       selectedRows: [],
+      contractNo: "",
       loading: false,
       reason: "",
       foo: 0,
@@ -228,6 +233,22 @@ const inSpecial = React.createClass({
           key: "name"
         },
         {
+          title: "开票状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return getStatus(text);
+          }
+        },
+        {
+          title: "流程状态",
+          dataIndex: "processStatus",
+          key: "processStatus",
+          render: text => {
+            return getPeople(text);
+          }
+        },
+        {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",

+ 19 - 0
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -17,6 +17,8 @@ import {
   getProvinceA,
   getInvoiceStatus,
   getprovince,
+  getStatus,
+  getPeople,
   splitUrl
 } from "@/tools";
 
@@ -97,6 +99,7 @@ const invoiceApplyList = React.createClass({
               unitName: thisdata.unitName,
               orderno: thisdata.orderno,
               name: thisdata.name,
+              processStatus: thisdata.processStatus,
               projectStatus: thisdata.projectStatus,
               amount: thisdata.amount,
               sumAmount: thisdata.sumAmount,
@@ -228,6 +231,22 @@ const invoiceApplyList = React.createClass({
           key: "name"
         },
         {
+          title: "开票状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return getStatus(text);
+          }
+        },
+        {
+          title: "流程状态",
+          dataIndex: "processStatus",
+          key: "processStatus",
+          render: text => {
+            return getPeople(text);
+          }
+        },
+        {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",

+ 20 - 0
js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx

@@ -17,6 +17,8 @@ import {
   getProvinceA,
   getInvoiceStatus,
   getprovince,
+  getStatus,
+  getPeople,
   splitUrl
 } from "@/tools";
 
@@ -98,6 +100,7 @@ const invoiceApplyListWai = React.createClass({
               orderno: thisdata.orderno,
               name: thisdata.name,
               projectStatus: thisdata.projectStatus,
+              processStatus: thisdata.processStatus,
               amount: thisdata.amount,
               sumAmount: thisdata.sumAmount,
               createTime: thisdata.createTime
@@ -196,6 +199,7 @@ const invoiceApplyListWai = React.createClass({
       selectedRowKeys: [],
       selectedRows: [],
       loading: false,
+      contractNo: "",
       reason: "",
       foo: 0,
       pagination: {
@@ -228,6 +232,22 @@ const invoiceApplyListWai = React.createClass({
           key: "name"
         },
         {
+          title: "开票状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return getStatus(text);
+          }
+        },
+        {
+          title: "流程状态",
+          dataIndex: "processStatus",
+          key: "processStatus",
+          render: text => {
+            return getPeople(text);
+          }
+        },
+        {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",

+ 22 - 1
js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx

@@ -18,6 +18,8 @@ import {
   getProvinceA,
   getInvoiceStatus,
   getprovince,
+  getStatus,
+  getPeople,
   splitUrl
 } from "@/tools";
 
@@ -101,6 +103,7 @@ const outInvoiceQuery = React.createClass({
               orderno: thisdata.orderno,
               name: thisdata.name,
               projectStatus: thisdata.projectStatus,
+              processStatus: thisdata.processStatus,
               amount: thisdata.amount,
               sumAmount: thisdata.sumAmount,
               createTime: thisdata.createTime
@@ -162,6 +165,7 @@ const outInvoiceQuery = React.createClass({
           unitAddress: thisdata.unitAddress,
           invoiceRemarks: thisdata.invoiceRemarks,
           unitMobile: thisdata.unitMobile,
+          contractNo: thisdata.contractNo,
           post: thisdata.post,
           addressee: thisdata.addressee,
           addresseeMobile: thisdata.addresseeMobile,
@@ -197,6 +201,7 @@ const outInvoiceQuery = React.createClass({
       boHuivisible: false,
       selectedRowKeys: [],
       selectedRows: [],
+      contractNo: "",
       loading: false,
       reason: "",
       foo: 0,
@@ -230,6 +235,22 @@ const outInvoiceQuery = React.createClass({
           key: "name"
         },
         {
+          title: "开票状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return getStatus(text);
+          }
+        },
+        {
+          title: "流程状态",
+          dataIndex: "processStatus",
+          key: "processStatus",
+          render: text => {
+            return getPeople(text);
+          }
+        },
+        {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",
@@ -248,7 +269,7 @@ const outInvoiceQuery = React.createClass({
         {
           title: "审核状态",
           dataIndex: "status",
-          key: "status",
+          key: "statusA",
           render: text => {
             return text === 1 ? "待审核" : "审核通过";
           }

+ 28 - 0
js/component/manageCenter/financialManage/distribute/outSpecial.jsx

@@ -7,6 +7,8 @@ import {
   getProvinceA,
   getInvoiceStatus,
   getprovince,
+  getStatus,
+  getPeople,
   splitUrl
 } from "@/tools";
 
@@ -88,6 +90,7 @@ const outSpecial = React.createClass({
               orderno: thisdata.orderno,
               name: thisdata.name,
               projectStatus: thisdata.projectStatus,
+              processStatus: thisdata.processStatus,
               amount: thisdata.amount,
               sumAmount: thisdata.sumAmount,
               createTime: thisdata.createTime
@@ -149,6 +152,7 @@ const outSpecial = React.createClass({
           unitAddress: thisdata.unitAddress,
           invoiceRemarks: thisdata.invoiceRemarks,
           unitMobile: thisdata.unitMobile,
+          contractNo: thisdata.contractNo,
           post: thisdata.post,
           addressee: thisdata.addressee,
           addresseeMobile: thisdata.addresseeMobile,
@@ -184,6 +188,7 @@ const outSpecial = React.createClass({
       boHuivisible: false,
       selectedRowKeys: [],
       selectedRows: [],
+      contractNo: "",
       loading: false,
       reason: "",
       foo: 0,
@@ -217,6 +222,22 @@ const outSpecial = React.createClass({
           key: "name"
         },
         {
+          title: "开票状态",
+          dataIndex: "status",
+          key: "status",
+          render: text => {
+            return getStatus(text);
+          }
+        },
+        {
+          title: "流程状态",
+          dataIndex: "processStatus",
+          key: "processStatus",
+          render: text => {
+            return getPeople(text);
+          }
+        },
+        {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",
@@ -522,6 +543,13 @@ const outSpecial = React.createClass({
     this.departmentList();
     this.loadData();
   },
+
+  // componentDidMount() {
+  //   window.setTimeout(() => {
+  //      console.log("321", this.state);
+  //   },100)
+    
+  // },
   reset() {
     this.state.nameSearch = "";
     this.state.releaseDate = [];

+ 3 - 0
js/component/manageCenter/order/billing.less

@@ -0,0 +1,3 @@
+.half-item>.ant-col-14>.ant-form-item-control {
+  width: 254px !important;
+}

+ 70 - 26
js/component/manageCenter/order/orderNew/addService.jsx

@@ -17,6 +17,7 @@ import {
 } from "antd";
 import $ from "jquery/src/ajax";
 import "../userMangagement.less";
+import "../billing.less";
 import moment from "moment";
 import Picture from "@/manageCenter/publicComponent/picture";
 import {
@@ -888,10 +889,10 @@ const NewService = Form.create()(
             orderNo: this.props.datauser.orderNo
           },
           success: function(data) {
-            console.log(data.data);
+            // console.log(data.data);
             if (data.data) {
               let thisdata = data.data;
-              console.log(this.state.userName);
+              // console.log(this.state.userName);
               Object.assign(thisdata, {
                 userName: this.state.userName,
                 contractNo: this.state.contractNo,
@@ -1288,6 +1289,10 @@ const NewService = Form.create()(
         message.warning("当前订单流程不能发起变更!");
         return false;
       }
+      if(this.state.changeAmount == "") {
+        message.warning("申请退款金额不能为空!");
+        return false;
+      }
       let theorgCodeUrl = [];
       if (this.state.voucherUrl.length) {
         let picArr = [];
@@ -1311,13 +1316,14 @@ const NewService = Form.create()(
           orderNo: this.state.orderNo, //订单编号
           processState: 0,
           status: 1,
+          startRemarks: this.state.startRemarks,
           remarks: this.state.remarksC,
           voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
-          totalAmount: this.state.totalAmountC,
-          settlementAmount: this.state.settlementAmountC,
+          totalAmount: this.state.totalAmount,
+          settlementAmount: this.state.settlementAmount,
           changeAmount: this.state.changeAmount,
-          applicant: this.state.applicant,
-          depName: this.state.depNameChange,
+          applicant: this.state.salesmanName,
+          depName: this.state.depName,
           type: this.state.typeChange
         }
       }).done(
@@ -1335,13 +1341,20 @@ const NewService = Form.create()(
         }.bind(this)
       );
     },
+    componentDidMount() {
+      window.setTimeout(() => {
+        // console.log("我看看", this.state);
+      },100)
+      
+    },
 
     reset() {
       this.setState({
+        startRemarks: undefined,
         remarksC: undefined,
         voucherUrl: [],
-        totalAmountC: undefined,
-        settlementAmountC: undefined,
+        totalAmount: undefined,
+        settlementAmount: undefined,
         changeAmount: undefined,
         applicant: undefined,
         depNameChange: undefined,
@@ -1398,14 +1411,14 @@ const NewService = Form.create()(
           label: "法人电话",
           content: <span>{this.state.legalPersonTel}</span>
         },
-        {
-          label: "签单金额(万元)",
-          content: <span>{this.state.totalAmount}</span>
-        },
-        {
-          label: "首付金额(万元)",
-          content: <span>{this.state.firstAmount}</span>
-        },
+        // {
+        //   label: "签单金额(万元)",
+        //   content: <span>{this.state.totalAmount}</span>
+        // },
+        // {
+        //   label: "首付金额(万元)",
+        //   content: <span>{this.state.firstAmount}</span>
+        // },
         {
           label: "特批立项",
           content: <span>{getApprovedState(this.state.approval)}</span>
@@ -2176,9 +2189,10 @@ const NewService = Form.create()(
                                   <Select
                                     placeholder="请输入变更部门"
                                     style={{ width: 240 }}
-                                    value={this.state.depNameChange}
+                                    value={this.state.depName}
                                     onChange={e => {
-                                      this.setState({ depNameChange: e });
+                                      this.setState({ depName: e });
+                                      // console.log("5454", e);
                                     }}
                                   >
                                     {departmentArr.map(function(item) {
@@ -2205,10 +2219,10 @@ const NewService = Form.create()(
                                   <Input
                                     placeholder="请输入申请人"
                                     ref="signTotalAmount"
-                                    value={this.state.applicant}
+                                    value={this.state.salesmanName}
                                     onChange={e => {
                                       this.setState({
-                                        applicant: e.target.value
+                                        salesmanName: e.target.value
                                       });
                                     }}
                                     style={{ width: "240px" }}
@@ -2259,10 +2273,10 @@ const NewService = Form.create()(
                                   <Input
                                     placeholder="请输入合同额"
                                     ref="signTotalAmount"
-                                    value={this.state.totalAmountC}
+                                    value={this.state.totalAmount}
                                     onChange={e => {
                                       this.setState({
-                                        totalAmountC: e.target.value
+                                        totalAmount: e.target.value
                                       });
                                     }}
                                     style={{ width: "240px" }}
@@ -2280,10 +2294,10 @@ const NewService = Form.create()(
                                   <Input
                                     placeholder="请输入已收款"
                                     ref="signTotalAmount"
-                                    value={this.state.settlementAmountC}
+                                    value={this.state.settlementAmount}
                                     onChange={e => {
                                       this.setState({
-                                        settlementAmountC: e.target.value
+                                        settlementAmount: e.target.value
                                       });
                                     }}
                                     style={{ width: "240px" }}
@@ -2319,12 +2333,12 @@ const NewService = Form.create()(
                                 style={{ height: "auto" }}
                                 labelCol={{ span: 4 }}
                                 wrapperCol={{ span: 18 }}
-                                label="备注"
+                                label="变更原因"
                               >
                                 {!this.state.mark ? (
                                   <TextArea
                                     rows={4}
-                                    placeholder="因企业政府补助费用与营销员签单承诺费用不一"
+                                    placeholder="请输入变更原因"
                                     ref="signTotalAmount"
                                     style={{ width: "95%" }}
                                     value={this.state.remarksC}
@@ -2339,6 +2353,36 @@ const NewService = Form.create()(
                                 )}
                               </FormItem>
                             </div>
+
+                            {/*-----  */}
+
+                            <div className="clearfix">
+                              <FormItem
+                                style={{ height: "auto" }}
+                                labelCol={{ span: 4 }}
+                                wrapperCol={{ span: 18 }}
+                                label="备注"
+                              >
+                                {!this.state.mark ? (
+                                  <TextArea
+                                    rows={4}
+                                    placeholder="请输入备注"
+                                    ref="signTotalAmount"
+                                    style={{ width: "95%" }}
+                                    value={this.state.startRemarks}
+                                    onChange={e => {
+                                      this.setState({
+                                        startRemarks: e.target.value
+                                      });
+                                    }}
+                                  />
+                                ) : (
+                                  <span>{contractData.startRemarks}</span>
+                                )}
+                              </FormItem>
+                            </div>
+
+                            {/* ---- */}
                             <div className="clearfix">
                               <FormItem
                                 labelCol={{ span: 4 }}

+ 67 - 10
js/component/manageCenter/order/orderNew/billing.jsx

@@ -215,13 +215,70 @@ const MyService=Form.create()(React.createClass({
 					dataIndex: 'abc',
 					key: 'abc',
 					render: (text, record, index) => {
-						return      <div> 
-										{<Button type="primary" style={{marginRight:'10px',color:'#ffffff',border:'none',marginTop:'5px',background:'red'}} onClick={(e) =>{ e.stopPropagation(), this.visit(record,index)}}>开票</Button>}
-										{<Button type="primary" onClick={(e) =>{ e.stopPropagation(), this.inRecord(record,index)}} style={{border:'none',background:'orangered',marginRight:'10px'}}>开票记录</Button>}
-										{record.liquidationStatus==2?<Popconfirm title="是否结项?" onConfirm={()=>{this.delectRow(record)}} okText="是" cancelText="否">
-										    <Button type="primary" style={{marginRight:'10px',color:'#ffffff',border:'none'}} onClick={(e) =>{ e.stopPropagation()}}>结项</Button>
-										</Popconfirm>:''}
-									</div>
+						return (
+              <div>
+                {
+                  <Button
+                    type="primary"
+                    disabled={record.processStatus == 0 ? true : false}
+                    style={{
+                      marginRight: "10px",
+                      color: "#ffffff",
+                      border: "none",
+                      marginTop: "5px",
+                      background: record.processStatus == 0 ? "#ccc" : "red"
+                    }}
+                    onClick={e => {
+                    //   console.log("2221", record);
+                      e.stopPropagation(), this.visit(record, index);
+                    }}
+                  >
+                    开票
+                  </Button>
+                }
+                {
+                  <Button
+                    type="primary"
+                    onClick={e => {
+                      e.stopPropagation(), this.inRecord(record, index);
+                    }}
+                    style={{
+                      border: "none",
+                      background: "orangered",
+                      marginRight: "10px"
+                    }}
+                  >
+                    开票记录
+                  </Button>
+                }
+                {record.liquidationStatus == 2 ? (
+                  <Popconfirm
+                    title="是否结项?"
+                    onConfirm={() => {
+                      this.delectRow(record);
+                    }}
+                    okText="是"
+                    cancelText="否"
+                  >
+                    <Button
+                      type="primary"
+                      style={{
+                        marginRight: "10px",
+                        color: "#ffffff",
+                        border: "none"
+                      }}
+                      onClick={e => {
+                        e.stopPropagation();
+                      }}
+                    >
+                      结项
+                    </Button>
+                  </Popconfirm>
+                ) : (
+                  ""
+                )}
+              </div>
+            );
 					}
 				}
             ],
@@ -400,7 +457,7 @@ const MyService=Form.create()(React.createClass({
 				return
 			}
 		}
-		console.log(this.state.flag,this.state.status)
+		// console.log(this.state.flag,this.state.status)
         this.setState({
             loading: true
         });
@@ -499,7 +556,7 @@ const MyService=Form.create()(React.createClass({
 	},
 	
 	recompose(record){
-		console.log(record)
+		// console.log(record)
 		this.setState({
 			avisible:true,
 			orderNo3:record.orderno,
@@ -1095,7 +1152,7 @@ const MyService=Form.create()(React.createClass({
 										        	</span> 
 										        } >                             
 										        {<Input placeholder="请输入开票金额" value={this.state.amount}
-										            	onChange={(e)=>{this.setState({amount:e.target.value}),console.log(typeof this.state.amount)}} style={{width:'240px'}} />}
+										            	onChange={(e)=>{this.setState({amount:e.target.value})}} style={{width:'240px'}} />}
 												<span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
 												退票请写负数<br></br>金额
 												</span>		

+ 28 - 5
js/component/manageCenter/order/orderNew/changeComponent/agreeButton.js

@@ -7,7 +7,9 @@ class ReasonInput extends Component {
     super(props);
     this.state = {
       visible: false,
-      reason: this.props.reason
+      reason: this.props.reason,
+      flag: false,
+      flagS: false,
     };
     this.reset = this.reset.bind(this);
     this.judge = this.judge.bind(this);
@@ -27,10 +29,13 @@ class ReasonInput extends Component {
     //     Object.assign(backData, ajaxData);
     // // this.sendRequest()
     // this.onOk(data,backData)
+    // console.log("222222",this.props);
+    
   }
     
   // 理由请求
   sendRequest(data, backData) {
+    if(this.state.flagS) return
     $.ajax({
       method: "post",
       dataType: "json",
@@ -47,13 +52,19 @@ class ReasonInput extends Component {
       success: function(data) {
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
+            if (!this.state.flag) return;
+            // message.warning(data.error[0].message);
+            return
           }
         } else {
+          this.setState({
+            flagS: !this.state.flagS
+          })
           message.success("操作成功!");
-          // this.props.visible();
+          this.props.visible();
           this.changeModal();
-          window.location.reload()
+          this.props.onCancel();
+          // window.location.reload()
         }
       }.bind(this)
     }).done(
@@ -67,6 +78,7 @@ class ReasonInput extends Component {
 
   // 输入框请求
   inputAjax(_data, backData) {
+    if (this.state.flag) return;
     $.ajax({
       method: "post",
       dataType: "json",
@@ -76,9 +88,14 @@ class ReasonInput extends Component {
       success: function(data) {
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
+            if (!this.state.flag) return;
             message.warning(data.error[0].message);
+            return
           }
         } else {
+          this.setState({
+            flag: !this.state.flag
+          });
         }
       }.bind(this)
     }).done(
@@ -106,7 +123,13 @@ class ReasonInput extends Component {
 
     const data = this.props.data;
     const backData = this.props.backData;
+    backData.consultantExamine = []
+    backData.managerExamine = []
     const ajaxData = this.props.ajaxData;
+    if(ajaxData.ContactsLists) {
+        ajaxData.ContactsLists = [];
+        ajaxData.contactList = [];
+    }
     Object.assign(backData, ajaxData);
     // this.sendRequest()
     this.onOk(data,backData)
@@ -174,7 +197,7 @@ class ReasonInput extends Component {
               placeholder={data.placeholder}
               value={this.state.reason}
               onChange={e => {
-                console.log(this.props);
+                // console.log(this.props);
                 
                 this.setState({
                   reason: e.target.value

+ 10 - 2
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -22,6 +22,12 @@ class ChangeApply extends Component {
     this.getVoucherUrl = this.getVoucherUrl.bind(this);
   }
 
+
+  componentDidMount() {
+    // console.log("看一下",this.props);
+    
+  }
+
   //变更申请
   changeApply() {
     let theorgCodeUrl = [];
@@ -37,7 +43,9 @@ class ChangeApply extends Component {
     Object.assign(this.state.data, {
       id: this.props.orderData.id, //订单编号
       changeType: 0,
-      voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : ""
+      voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
+      consultantExamine: [],
+      managerExamine: []
     });
     $.ajax({
       method: "post",
@@ -52,7 +60,7 @@ class ChangeApply extends Component {
         });
         if (!data.error.length) {
           message.success("变更成功!");
-          this.props.visitCancel();
+          this.props.onCancel();
         } else {
           message.warning(data.error[0].message);
         }

+ 564 - 184
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzj.js

@@ -1,9 +1,12 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Button, message, Input, Select } from "antd";
+import { Form, Upload, Modal, Button, message, Input, Select, Table } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "@/tools.js";
+import { shenghePeo } from "@/tools.js";
 import $ from "jquery/src/ajax";
+import "../../../../../../css/changeDetail.less"
+import tongguo from "../../../../../../image/tongguo.png";
 // import ReactToPrint from "react-to-print";
 const FormItem = Form.Item;
 const { TextArea } = Input;
@@ -89,11 +92,110 @@ class ChangeDetail extends Component {
       buttonStatus: true,
       dataSource: [],
       reason: "",
-      rejectState: 0
+      rejectState: 0,
+      contactList: [],
+      ContactsLists: [
+        {
+          title: "金额(万)",
+          dataIndex: "amount",
+          key: "amount",
+          render: (text, record) => {
+            return (
+              <div>
+                实际回收退票(万元)
+                <Input
+                  value={record.amount}
+                  placeholder="请输入金额(必填项)"
+                  disabled={record.load}
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.amount = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              </div>
+            );
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record) => {
+            return (
+              <div>
+                {/* <DatePicker
+                  showTime
+                  placeholder="请输入退票时间"
+                  onChange={v => {
+                    record.time = v._d;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  onOk={v => {
+                    record.time = v._d;
+                    this.setState({ contactList: this.state.contactList });
+                    console.log(this.state);
+                  }}
+                /> */}
+                {record.createTimes}
+              </div>
+            );
+          }
+        }
+        // {
+        //   title: "操作",
+        //   dataIndex: "dels",
+        //   key: "dels",
+        //   render: (text, record, index) => {
+        //     return (
+        //       <div style={{ display:
+        //         (this.props.data.processState == 7 ||
+        //           this.props.data.processState == 8) &&
+        //         this.props.data.status == 4
+        //           ? "none"
+        //           : "block"}}>
+        //         <Popconfirm
+        //           title="是否删除?"
+        //           onConfirm={() => {
+        //             this.confirmDelet(record);
+        //           }}
+        //           okText="删除"
+        //           cancelText="不删除"
+        //         >
+        //           <Button
+        //             style={{
+        //               marginRight: "10px",
+        //               color: "#ffffff",
+        //               background: "#f00",
+        //               border: "none"
+        //             }}
+        //           >
+        //             删除
+        //           </Button>
+        //         </Popconfirm>
+
+        //         {record.load != true ? (
+        //           <Button
+        //             type="primary"
+        //             onClick={() => {
+        //               this.contactSave(record);
+        //             }}
+        //           >
+        //             保存
+        //           </Button>
+        //         ) : (
+        //           ""
+        //         )}
+        //       </div>
+        //     );
+        //   }
+        // }
+      ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
-    this.loadDataChange = this.loadDataChange.bind(this);
   }
 
   getOrgCodeUrl(e) {
@@ -102,37 +204,50 @@ class ChangeDetail extends Component {
     });
   }
 
-  loadDataChange() {
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.props.data.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            dataSource: data.data
-          });
-        }
-      }.bind(this)
-    });
-  }
-
   componentDidMount() {
     window.setTimeout(() => {
-      this.loadDataChange();
-    }, 10);
-    console.log(this.props.processState);
-    
+      const contactList = this.props.contactList;
+      // console.log("看看props", this.props);
+
+      contactList.forEach(item => {
+        item.load = true;
+      });
+      this.setState({
+        contactList
+      });
+    }, 0);
   }
 
+  // loadDataChange() {
+  //   $.ajax({
+  //     method: "get",
+  //     dataType: "json",
+  //     crossDomain: false,
+  //     url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+  //     data: {
+  //       changeId: this.props.data.id
+  //     },
+  //     success: function(data) {
+  //       if (data.error.length || data.data.list == "") {
+  //         if (data.error && data.error.length) {
+  //           message.warning(data.error[0].message);
+  //         }
+  //       } else {
+  //         this.setState({
+  //           dataSource: data.data
+  //         });
+  //       }
+  //     }.bind(this)
+  //   });
+  // }
+
+  // componentDidMount() {
+  //   window.setTimeout(() => {
+  //     console.log(this.props);
+  //   },2000)
+
+  // }
+
   //同意拒绝按钮的有无
   changeButtonStatus() {
     this.setState({
@@ -140,6 +255,23 @@ class ChangeDetail extends Component {
     });
   }
 
+  componentWillReceiveProps(nextProps) {
+    this.setState({
+      paymentTimes: nextProps.data.paymentTimes,
+      paymentAmount: nextProps.data.paymentAmount,
+      invoiceTimes: nextProps.data.invoiceTimes,
+      invoiceAmount: nextProps.data.invoiceAmount,
+      cwCost: nextProps.data.cwCost,
+      refundableAmount: nextProps.data.refundableAmount,
+      cwRemarks: nextProps.data.cwRemarks,
+      contactList: nextProps.contactList,
+      refundInvoice: nextProps.data.refundInvoice
+    });
+    // if (!nextProps.reset) {
+    //   this.reset();
+    // }
+  }
+
   onRef(ref) {
     this.fun = ref;
   }
@@ -165,10 +297,19 @@ class ChangeDetail extends Component {
       {
         labelA: "当前进度",
         formItemLayoutA: formItemLayout,
+        // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
         dataA:
-          this.props.data.status !== 4
-            ? getProcessStatusNew(this.props.data.processState) + "审核中"
-            : getProcessStatusNew(this.props.data.processState) + "已完成",
+          this.props.data.processState == 2 || this.props.data.processState == 3
+            ? shenghePeo(
+                this.props.data.processState == 2
+                  ? this.props.data.consultantExamine
+                  : this.props.data.managerExamine,
+                this.props.data.processState
+              )
+            : getProcessStatusNew(
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
         dataB: getChangeType(this.props.data.type)
@@ -226,22 +367,22 @@ class ChangeDetail extends Component {
       }
     ];
     const financeData = [
-      {
-        labelA: "收款时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.paymentTimes,
-        labelB: "收款金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.paymentAmount
-      },
-      {
-        labelA: "开票时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.invoiceTimes,
-        labelB: "已开票金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.invoiceAmount
-      },
+      // {
+      //   labelA: "收款时间",
+      //   formItemLayoutA: formItemLayout,
+      //   dataA: this.props.data.paymentTimes,
+      //   labelB: "收款金额(万元)",
+      //   formItemLayoutB: formItemLayout,
+      //   dataB: this.props.data.paymentAmount
+      // },
+      // {
+      //   labelA: "开票时间",
+      //   formItemLayoutA: formItemLayout,
+      //   dataA: this.props.data.invoiceTimes,
+      //   labelB: "已开票金额(万元)",
+      //   formItemLayoutB: formItemLayout,
+      //   dataB: this.props.data.invoiceAmount
+      // },
       {
         labelA: "发生成本(万元)",
         formItemLayoutA: formItemLayout,
@@ -249,12 +390,12 @@ class ChangeDetail extends Component {
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.refundableAmount
-      },
-      {
-        labelA: "补充资料/备注",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.cwRemarks
       }
+      // {
+      //   labelA: "补充资料/备注",
+      //   formItemLayoutA: formItemLayout,
+      //   dataA: this.props.data.cwRemarks
+      // }
     ];
     const buttonData = [
       {
@@ -285,17 +426,47 @@ class ChangeDetail extends Component {
     const orgCodeUrl = this.props.pictureUrl;
 
     return (
-      <div className="clearfix">
+      <div className="clearfix changeDetail">
         <div
           className="clearfix"
-          style={{ marginTop: 20 }}
           ref={e => {
             this.refs = e;
           }}
         >
-          <h2 style={{ textAlign: "center", marginBottom: 10 }}>
-            合同变更记录
-          </h2>
+          <div
+            style={{
+              borderRadius: "50%",
+              width: 300,
+              height: 300,
+              position: "absolute",
+              top: 230,
+              left: 525,
+              transform: "rotate(-5deg)",
+              zIndex: 1,
+              display:
+                (this.props.data.processState == 7 ||
+                  this.props.data.processState == 8) &&
+                this.props.data.status == 4
+                  ? "block"
+                  : "none"
+            }}
+          >
+            {/* <span
+              style={{
+                fontSize: 29,
+                position: "absolute",
+                left: "50%",
+                top: "50%",
+                transform: "translate(-50%,-50%)",
+                color: "red"
+              }}
+            >
+              通过
+            </span> */}
+            <img src={tongguo} style={{ width: "100%" }} />
+          </div>
+
+          <h2 style={{ textAlign: "center" }}>合同变更记录</h2>
           {pageData.map((item, index) => {
             return <Itemlist key={index} pageData={item} />;
           })}
@@ -340,24 +511,122 @@ class ChangeDetail extends Component {
               width: "868px",
               overflow: "hidden",
               paddingLeft: "90px",
-              marginBottom: "20px"
+              position: "relative",
+              bottom: "20px"
             }}
           >
             {/* <span>操作人:</span> */}
-            {this.state.dataSource.map((item, index) => (
-              <li
-                key={index}
-                style={{
-                  width: "100%",
-                  height: "auto",
-                  wordBreak: "break-all",
-                  color: "black",
-                  marginBottom: "10px"
-                }}
-              >{`${item.aname}: ${item.remarks}`}</li>
-            ))}
+            {this.props.dataSource.map((item, index) => {
+              if (item.status == 0) {
+                item.status = "发起";
+              } else if (item.status == 1) {
+                item.status = "审核中";
+              } else if (item.status == 2) {
+                item.status = "通过";
+              } else if (item.status == 3) {
+                item.status = "驳回";
+              } else if (item.status == 4) {
+                item.status = "完成";
+              }
+              return (
+                <li
+                  key={index}
+                  style={{
+                    width: "100%",
+                    height: "auto",
+                    wordBreak: "break-all",
+                    marginBottom: "10px"
+                  }}
+                >
+                  {item.aname + ":" + "(" + item.status + ")" + item.remarks}
+                </li>
+              );
+            })}
           </ul>
 
+          <div className="clearfix">
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              收款情况
+            </h3>
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.bill || []).map((item, index) => (
+                  <li key={index}>
+                    {item.payTime +
+                      " " +
+                      item.aName +
+                      " 收款:" +
+                      item.transactionAmount +
+                      "万元"}
+                  </li>
+                ))}
+              </ul>
+
+              <div>收款总计:{this.props.proceedsTotal}万元</div>
+            </div>
+            <br />
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.invoice || []).map((item, index) => (
+                  <li key={index}>
+                    {item.createTime + " " + " 开票:" + item.amount + "万元"}
+                  </li>
+                ))}
+              </ul>
+              <div>开票总计:{this.props.invoiceTotal}万元</div>
+            </div>
+
+            <p style={{ marginLeft: "90px", color: "red" }}>
+              系统预估 产生成本(万元):
+              {this.props.data.estimateCost
+                ? this.props.data.estimateCost
+                : "0"}{" "}
+              &nbsp;应退金额(万元):
+              {this.props.data.estimateRefundable
+                ? this.props.data.estimateRefundable
+                : "0"}
+            </p>
+          </div>
+
+          <div
+            style={{
+              display:
+                (this.props.data.processState == 8 ||
+                  this.props.data.processState == 7) &&
+                (this.props.data.status == 2 || this.props.data.status == 4)
+                  ? "block"
+                  : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              回收退票
+            </h3>
+            {/* {this.state.processStatus == 0 ? ( */}
+            <Button
+              type="primary"
+              onClick={this.addcontact}
+              style={{
+                float: "right",
+                marginRight: "50px",
+                marginBottom: "15px",
+                position: "relative",
+                zIndex: "999",
+                display: "none"
+              }}
+            >
+              添加回收退票
+            </Button>
+            {/* ) : (
+              ""
+            )} */}
+            <Table
+              pagination={false}
+              bordered
+              columns={this.state.ContactsLists}
+              dataSource={this.state.contactList}
+            />
+          </div>
+
           {/* {this.props.data.type === 0 && this.props.data.processState >= 4 ? (
             <div>
               <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
@@ -398,134 +667,245 @@ class ChangeDetail extends Component {
             ""
           )} */}
         </div>
-        {this.props.data.status !== 4 ? (
-          this.state.buttonStatus ? (
-            <div>
+        {this.props.data.status !== 2 &&
+        this.props.data.status !== 4 &&
+        this.props.processState == this.props.data.processState ? (
+          // this.state.buttonStatus ? (
+          <div>
+            <div style={{ marginBottom: 10 }}>
               <div className="clearfix">
-                <FormItem
-                  style={{ height: "auto" }}
-                  labelCol={{ span: 4 }}
-                  wrapperCol={{ span: 18 }}
-                  label="备注"
+                {/* <Form.Item
+                  className="half-item"
+                  label="收款时间"
+                  labelCol={{ span: 8 }}
+                  wrapperCol={{ span: 14 }}
                 >
-                  <TextArea
-                    rows={4}
-                    placeholder="请输入备注信息"
-                    style={{ width: "95%" }}
-                    value={this.state.reason}
+                  <DatePicker
+                    style={{ width: 160 }}
+                    value={
+                      this.state.paymentTimes
+                        ? moment(this.state.paymentTimes)
+                        : null
+                    }
+                    onChange={(_data, dataString) => {
+                      this.setState({
+                        paymentTimes: dataString
+                      });
+                    }}
+                  />
+                </Form.Item>
+                <Form.Item
+                  className="half-item"
+                  label="收款金额(万元)"
+                  labelCol={{ span: 8 }}
+                  wrapperCol={{ span: 14 }}
+                >
+                  <Input
+                    style={{ width: 160 }}
+                    value={this.state.paymentAmount}
+                    placeholder="请输入收款金额"
+                    onChange={e => {
+                      this.setState({
+                        paymentAmount: e.target.value
+                      });
+                    }}
+                  />
+                </Form.Item>
+              </div>
+              <div className="clearfix">
+                <Form.Item
+                  className="half-item"
+                  label="开票时间"
+                  labelCol={{ span: 8 }}
+                  wrapperCol={{ span: 14 }}
+                >
+                  <DatePicker
+                    style={{ width: 160 }}
+                    value={
+                      this.state.invoiceTimes
+                        ? moment(this.state.invoiceTimes)
+                        : null
+                    }
+                    onChange={(_data, dataString) => {
+                      this.setState({
+                        invoiceTimes: dataString
+                      });
+                    }}
+                  />
+                </Form.Item>
+                <Form.Item
+                  className="half-item"
+                  label="开票金额(万元)"
+                  labelCol={{ span: 8 }}
+                  wrapperCol={{ span: 14 }}
+                >
+                  <Input
+                    style={{ width: 160 }}
+                    value={this.state.invoiceAmount}
+                    placeholder="请输入开票金额"
                     onChange={e => {
-                      let reason = e.target.value;
-                      this.setState({ reason });
+                      this.setState({
+                        invoiceAmount: e.target.value
+                      });
                     }}
                   />
-                </FormItem>
+                </Form.Item> */}
+
+                <div>
+                  <h3
+                    style={{
+                      marginLeft: 10,
+                      fontWeight: 800,
+                      marginBottom: 10
+                    }}
+                  >
+                    当前财务状态(财务填写)
+                  </h3>
+                  {financeData.map((item, index) => {
+                    return <Itemlist key={index} pageData={item} />;
+                  })}
+                </div>
               </div>
 
               <div
-                className="clearfix"
-                style={{ display: "flex", justifyContent: "space-around" }}
+                style={{
+                  marginTop: "10px",
+                  display:
+                    this.props.data.status == 2 ||
+                    this.props.processState != this.props.data.processState
+                      ? "none"
+                      : "block"
+                }}
               >
-                {buttonData.map((item, index) => {
-                  return (
-                    <AgreeButton
-                      data={item}
-                      key={index}
-                      backData={this.props.data}
-                      processState={this.props.processState}
-                      visible={this.changeButtonStatus}
-                      loadData={this.props.loadData}
-                      reason={this.state.reason}
-                      rejectState={this.state.rejectState}
-                    />
-                  );
-                })}
+                <Form.Item
+                  label="备注"
+                  labelCol={{ span: 4 }}
+                  wrapperCol={{ span: 14 }}
+                >
+                  <Input.TextArea
+                    rows={4}
+                    value={this.state.reason}
+                    placeholder="请输入补充资料/备注"
+                    onChange={e => {
+                      this.setState({
+                        reason: e.target.value
+                      });
+                    }}
+                  />
+                </Form.Item>
               </div>
+            </div>
+
+            <div
+              className="clearfix"
+              style={{ display: "flex", justifyContent: "space-around" }}
+            >
+              {buttonData.map((item, index) => {
+                return (
+                  <AgreeButton
+                    data={item}
+                    key={index}
+                    backData={this.props.data}
+                    processState={this.props.processState}
+                    visible={this.changeButtonStatus}
+                    ajaxData={this.state}
+                    loadData={this.props.loadData}
+                    reason={this.state.reason}
+                    rejectState={this.state.rejectState}
+                    onCancel={this.props.onCancel}
+                  />
+                );
+              })}
+            </div>
 
-              <Select
-                defaultValue="0"
+            <Select
+              defaultValue="0"
+              style={{
+                width: 120,
+                float: "left",
+                position: "relative",
+                bottom: "28px",
+                right: "-600px"
+              }}
+              onChange={val => {
+                this.setState({ rejectState: val });
+              }}
+            >
+              <Option
+                value="0"
                 style={{
-                  width: 120,
-                  float: "left",
-                  position: "relative",
-                  bottom: "28px",
-                  right: "-600px"
+                  display: this.props.processState >= 1 ? "block" : "none"
                 }}
-                onChange={val => {
-                  this.setState({ rejectState: val });
-                  console.log(val, this.state.rejectState);
+              >
+                营销员
+              </Option>
+              <Option
+                value="1"
+                style={{
+                  display: this.props.processState >= 2 ? "block" : "none"
                 }}
               >
-                <Option
-                  value="0"
-                  style={{
-                    display: this.props.processState >= 1 ? "block" : "none"
-                  }}
-                >
-                  营销员
-                </Option>
-                <Option
-                  value="1"
-                  style={{
-                    display: this.props.processState >= 2 ? "block" : "none"
-                  }}
-                >
-                  营销管理员
-                </Option>
-                <Option
-                  value="2"
-                  style={{
-                    display: this.props.processState >= 3 ? "block" : "none"
-                  }}
-                >
-                  技术员
-                </Option>
-                <Option
-                  value="3"
-                  style={{
-                    display: this.props.processState >= 4 ? "block" : "none"
-                  }}
-                >
-                  技术经理
-                </Option>
-                <Option
-                  value="4"
-                  style={{
-                    display: this.props.processState >= 5 ? "block" : "none"
-                  }}
-                >
-                  技术总监
-                </Option>
-                <Option
-                  value="5"
-                  style={{
-                    display: this.props.processState >= 6 ? "block" : "none"
-                  }}
-                >
-                  财务专员(退单)
-                </Option>
-                <Option
-                  value="6"
-                  style={{
-                    display: this.props.processState >= 7 ? "block" : "none"
-                  }}
-                >
-                  财务总监
-                </Option>
-                <Option
-                  value="7"
-                  style={{
-                    display: this.props.processState >= 8 ? "block" : "none"
-                  }}
-                >
-                  总裁
-                </Option>
-              </Select>
-            </div>
-          ) : (
-            ""
-          )
+                营销管理员
+              </Option>
+              <Option
+                value="2"
+                style={{
+                  display: this.props.processState >= 3 ? "block" : "none"
+                }}
+              >
+                咨询师
+              </Option>
+              <Option
+                value="3"
+                style={{
+                  display: this.props.processState >= 4 ? "block" : "none"
+                }}
+              >
+                咨询师经理
+              </Option>
+              <Option
+                value="4"
+                style={{
+                  display: this.props.processState >= 5 ? "block" : "none"
+                }}
+              >
+                咨询师总监
+              </Option>
+              <Option
+                value="5"
+                style={{
+                  display: this.props.processState >= 6 ? "block" : "none"
+                }}
+              >
+                财务专员(退单)
+              </Option>
+              <Option
+                value="6"
+                style={{
+                  display: this.props.processState >= 7 ? "block" : "none"
+                }}
+              >
+                财务总监
+              </Option>
+              <Option
+                value="7"
+                style={{
+                  display: this.props.processState >= 8 ? "block" : "none"
+                }}
+              >
+                总裁
+              </Option>
+            </Select>
+          </div>
         ) : (
-          ""
+          <div>
+            <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
+              当前财务状态(财务填写)
+            </h3>
+            {financeData.map((item, index) => {
+              return <Itemlist key={index} pageData={item} />;
+            })}
+          </div>
         )}
         {/* <ReactToPrint
           trigger={() => (

文件差異過大導致無法顯示
+ 728 - 89
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js


+ 275 - 110
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsjl.js

@@ -1,8 +1,9 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Input, Button, message, Select } from "antd";
+import { Form, Upload, Modal, Input, Button, message, Select, Table } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "@/tools.js";
+import { shenghePeo } from "@/tools.js";
 import $ from "jquery/src/ajax";
 // import ReactToPrint from "react-to-print";
 
@@ -88,7 +89,55 @@ class ChangeDetail extends Component {
       changeType: 1,
       dataSource: [],
       reason: "",
-      rejectState: 0
+      // 累计回收退票
+      refundInvoice: 0,
+      // 退票数组
+      contactList: [],
+      rejectState: 0,
+      // 收款信息
+      proceedsData: [],
+      proceedsTotal: this.props.proceedsTotal,
+      // 开票信息
+      invoiceData: [],
+      invoiceTotal: this.props.invoiceTotal,
+      cost: 10,
+      refund: 8,
+      // 测试添加退票
+      contactList: this.props.contactList,
+      ContactsLists: [
+        {
+          title: "金额(万)",
+          dataIndex: "amount",
+          key: "amount",
+          render: (text, record) => {
+            return (
+              <div>
+                实际回收退票(万元)
+                <Input
+                  value={record.amount}
+                  placeholder="请输入金额(必填项)"
+                  disabled={record.load}
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.amount = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              </div>
+            );
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record) => {
+            return <div>{record.createTimes}</div>;
+          }
+        }
+      ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
@@ -98,7 +147,16 @@ class ChangeDetail extends Component {
     this.setState({
       projectState: nextProps.data.projectState,
       zxsCost: nextProps.data.zxsCost,
-      zxsRemarks: nextProps.data.zxsRemarks
+      zxsRemarks: nextProps.data.zxsRemarks,
+      paymentTimes: nextProps.data.paymentTimes,
+      paymentAmount: nextProps.data.paymentAmount,
+      invoiceTimes: nextProps.data.invoiceTimes,
+      invoiceAmount: nextProps.data.invoiceAmount,
+      cwCost: nextProps.data.cwCost,
+      refundableAmount: nextProps.data.refundableAmount,
+      cwRemarks: nextProps.data.cwRemarks,
+      contactList: nextProps.contactList,
+      refundInvoice: nextProps.data.refundInvoice
     });
   }
 
@@ -115,36 +173,38 @@ class ChangeDetail extends Component {
     });
   }
 
-  loadData() {
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      async: false,
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.props.data.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            dataSource: data.data
-          });
-        }
-      }.bind(this)
-    });
-  }
+  // loadData() {
+  //   $.ajax({
+  //     method: "get",
+  //     dataType: "json",
+  //     async: false,
+  //     crossDomain: false,
+  //     url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+  //     data: {
+  //       changeId: this.props.data.id
+  //     },
+  //     success: function(data) {
+  //       if (data.error.length || data.data.list == "") {
+  //         if (data.error && data.error.length) {
+  //           message.warning(data.error[0].message);
+  //         }
+  //       } else {
+  //         this.setState({
+  //           dataSource: data.data
+  //         });
+  //       }
+  //     }.bind(this)
+  //   });
+  // }
 
-  componentDidMount() {
-    // this.loadData();
-    window.setTimeout(() => {
-      this.loadData();
-    }, 10);
-  }
+  // componentDidMount() {
+  //   // this.loadData();
+  //   window.setTimeout(() => {
+  //     this.loadData();
+  //   }, 10);
+  //   console.log(this.props.processState);
+    
+  // }
 
   render() {
     const pageData = [
@@ -167,10 +227,19 @@ class ChangeDetail extends Component {
       {
         labelA: "当前进度",
         formItemLayoutA: formItemLayout,
+        // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
         dataA:
-          this.props.data.status !== 4
-            ? getProcessStatusNew(this.props.data.processState) + "审核中"
-            : getProcessStatusNew(this.props.data.processState) + "已完成",
+          this.props.data.processState == 2 || this.props.data.processState == 3
+            ? shenghePeo(
+                this.props.data.processState == 2
+                  ? this.props.data.consultantExamine
+                  : this.props.data.managerExamine,
+                this.props.data.processState
+              )
+            : getProcessStatusNew(
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
         dataB: getChangeType(this.props.data.type)
@@ -229,33 +298,12 @@ class ChangeDetail extends Component {
     ];
     const financeData = [
       {
-        labelA: "收款时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.paymentTimes,
-        labelB: "收款金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.paymentAmount
-      },
-      {
-        labelA: "开票时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.invoiceTimes,
-        labelB: "已开票金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.invoiceAmount
-      },
-      {
         labelA: "发生成本(万元)",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.cwCost,
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.refundableAmount
-      },
-      {
-        labelA: "补充资料/备注",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.cwRemarks
       }
     ];
     const buttonData = [
@@ -287,10 +335,9 @@ class ChangeDetail extends Component {
     const orgCodeUrl = this.props.pictureUrl;
 
     return (
-      <div className="clearfix">
+      <div className="clearfix changeDetail">
         <div
           className="clearfix"
-          style={{ marginTop: 20 }}
           ref={e => {
             this.refs = e;
           }}
@@ -335,23 +382,135 @@ class ChangeDetail extends Component {
           </Form.Item>
 
           <ul
-            style={{ width: "868px", overflow: "hidden", paddingLeft: "90px" }}
+            style={{
+              width: "868px",
+              overflow: "hidden",
+              paddingLeft: "90px",
+              position: "relative",
+              bottom: "0px"
+            }}
           >
             {/* <span>操作人:</span> */}
-            {this.state.dataSource.map((item, index) => (
-              <li
-                key={index}
-                style={{
-                  width: "100%",
-                  height: "auto",
-                  wordBreak: "break-all",
-                  color: "black",
-                  marginBottom: "10px"
-                }}
-              >{`${item.aname}: ${item.remarks}`}</li>
-            ))}
+            {this.props.dataSource.map((item, index) => {
+              if (item.status == 0) {
+                item.status = "发起";
+              } else if (item.status == 1) {
+                item.status = "审核中";
+              } else if (item.status == 2) {
+                item.status = "通过";
+              } else if (item.status == 3) {
+                item.status = "驳回";
+              } else if (item.status == 4) {
+                item.status = "完成";
+              }
+              return (
+                <li
+                  key={index}
+                  style={{
+                    width: "100%",
+                    height: "auto",
+                    wordBreak: "break-all",
+                    marginBottom: "10px"
+                  }}
+                >
+                  {item.aname + ":" + "(" + item.status + ")" + item.remarks}
+                </li>
+              );
+            })}
           </ul>
 
+          <div className="clearfix">
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              收款情况
+            </h3>
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.bill || []).map((item, index) => (
+                  <li key={index}>
+                    {item.payTime +
+                      " " +
+                      item.aName +
+                      " 收款:" +
+                      item.transactionAmount +
+                      "万元"}
+                  </li>
+                ))}
+              </ul>
+
+              <div>收款总计:{this.props.proceedsTotal}万元</div>
+            </div>
+            <br />
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.invoice || []).map((item, index) => (
+                  <li key={index}>
+                    {item.createTime + " " + " 开票:" + item.amount + "万元"}
+                  </li>
+                ))}
+              </ul>
+              <div>开票总计:{this.props.invoiceTotal}万元</div>
+            </div>
+
+            <p style={{ marginLeft: "90px", color: "red" }}>
+              系统预估 产生成本(万元):
+              {this.props.data.estimateCost
+                ? this.props.data.estimateCost
+                : "0"}{" "}
+              &nbsp;应退金额(万元):
+              {this.props.data.estimateRefundable
+                ? this.props.data.estimateRefundable
+                : "0"}
+            </p>
+          </div>
+
+          {/* {this.props.data.type === 0 ? (
+            <div>
+              <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
+                当前项目进度(咨询师经理填写)
+              </h3>
+              {planData.map((item, index) => {
+                return <Itemlist key={index} pageData={item} />;
+              })}
+            </div>
+          ) : (
+            ""
+          )} */}
+
+          <div
+            style={{
+              display:
+                (this.props.data.processState == 8 ||
+                  this.props.data.processState == 7) &&
+                (this.props.data.status == 2 || this.props.data.status == 4)
+                  ? "block"
+                  : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              回收退票
+            </h3>
+
+            <Table
+              pagination={false}
+              bordered
+              columns={this.state.ContactsLists}
+              dataSource={this.state.contactList}
+            />
+          </div>
+
+          <div
+            style={{
+              display: this.props.data.processState > 5 ? "block" : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              当前财务状态(财务填写)
+            </h3>
+            {financeData.map((item, index) => {
+              return <Itemlist key={index} pageData={item} />;
+            })}
+          </div>
+
           {/* 
           
             (
@@ -415,24 +574,6 @@ class ChangeDetail extends Component {
             </div>
           )} */}
 
-          <div>
-            <Form.Item
-              label="备注"
-              labelCol={{ span: 4 }}
-              wrapperCol={{ span: 14 }}
-            >
-              <Input.TextArea
-                value={this.state.reason}
-                rows={4}
-                placeholder="请输入备注"
-                onChange={e => {
-                  let reason = e.target.value;
-                  this.setState({ reason });
-                }}
-              />
-            </Form.Item>
-          </div>
-
           {/* {this.props.data.processState >= 5 ? (
             <div>
               <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
@@ -449,24 +590,49 @@ class ChangeDetail extends Component {
         {this.props.processState === this.props.data.processState ? (
           this.state.buttonStatus ? (
             <div
-              className="clearfix"
-              style={{ display: "flex", justifyContent: "space-around" }}
+              style={{
+                display: this.props.data.isExamine == 0 ? "block" : "none"
+              }}
             >
-              {buttonData.map((item, index) => {
-                return (
-                  <AgreeButton
-                    data={item}
-                    key={index}
-                    backData={this.props.data}
-                    processState={this.props.processState}
-                    visible={this.changeButtonStatus}
-                    ajaxData={this.state}
-                    loadData={this.props.loadData}
-                    rejectState={this.state.rejectState}
-                    reason={this.state.reason}
+              <div style={{ marginBottom: "10px" }}>
+                <Form.Item
+                  label="备注"
+                  labelCol={{ span: 4 }}
+                  wrapperCol={{ span: 14 }}
+                >
+                  <Input.TextArea
+                    value={this.state.reason}
+                    rows={4}
+                    placeholder="请输入备注"
+                    onChange={e => {
+                      let reason = e.target.value;
+                      this.setState({ reason });
+                    }}
                   />
-                );
-              })}
+                </Form.Item>
+              </div>
+
+              <div
+                className="clearfix"
+                style={{ display: "flex", justifyContent: "space-around" }}
+              >
+                {buttonData.map((item, index) => {
+                  return (
+                    <AgreeButton
+                      data={item}
+                      key={index}
+                      backData={this.props.data}
+                      processState={this.props.processState}
+                      visible={this.changeButtonStatus}
+                      ajaxData={this.state}
+                      loadData={this.props.loadData}
+                      rejectState={this.state.rejectState}
+                      reason={this.state.reason}
+                      onCancel={this.props.onCancel}
+                    />
+                  );
+                })}
+              </div>
 
               <Select
                 defaultValue="0"
@@ -474,12 +640,11 @@ class ChangeDetail extends Component {
                   width: 120,
                   float: "left",
                   position: "relative",
-                  bottom: "28px",
+                  bottom: "0px",
                   right: "-600px"
                 }}
                 onChange={val => {
                   this.setState({ rejectState: val });
-                  console.log(val, this.state.rejectState);
                 }}
               >
                 <Option
@@ -504,7 +669,7 @@ class ChangeDetail extends Component {
                     display: this.props.processState >= 3 ? "block" : "none"
                   }}
                 >
-                  技术员
+                  咨询师
                 </Option>
                 <Option
                   value="3"
@@ -512,7 +677,7 @@ class ChangeDetail extends Component {
                     display: this.props.processState >= 4 ? "block" : "none"
                   }}
                 >
-                  技术经理
+                  咨询师经理
                 </Option>
                 <Option
                   value="4"
@@ -520,7 +685,7 @@ class ChangeDetail extends Component {
                     display: this.props.processState >= 5 ? "block" : "none"
                   }}
                 >
-                  技术总监
+                  咨询师总监
                 </Option>
                 <Option
                   value="5"

+ 147 - 51
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsy.js

@@ -3,6 +3,7 @@ import { Form, Upload, Modal, Button, message, Select, Input } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "@/tools.js";
+import {shenghePeo} from "@/tools.js"
 import $ from "jquery/src/ajax";
 // import ReactToPrint from "react-to-print";
 const FormItem = Form.Item;
@@ -87,10 +88,63 @@ class ChangeDetail extends Component {
     super(props);
     this.state = {
       previewVisible: false,
+      buttonStatus: true,
+      changeType: 1,
       dataSource: [],
-      reason: ""
+      reason: "",
+      // 累计回收退票
+      refundInvoice: 0,
+      // 退票数组
+      contactList: [],
+      rejectState: 0,
+      // 收款信息
+      proceedsData: [],
+      proceedsTotal: this.props.proceedsTotal,
+      // 开票信息
+      invoiceData: [],
+      invoiceTotal: this.props.invoiceTotal,
+      cost: 10,
+      refund: 8,
+      // 测试添加退票
+      contactList: this.props.contactList,
+      ContactsLists: [
+        {
+          title: "金额(万)",
+          dataIndex: "amount",
+          key: "amount",
+          render: (text, record) => {
+            return (
+              <div>
+                实际回收退票(万元)
+                <Input
+                  value={record.amount}
+                  placeholder="请输入金额(必填项)"
+                  disabled={record.load}
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.amount = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              </div>
+            );
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record) => {
+            return <div>{record.createTimes}</div>;
+          }
+        }
+      ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
+    this.changeButtonStatus = this.changeButtonStatus.bind(this);
+    // this.shenghePeo = this.shenghePeo.bind(this)
   }
 
   getOrgCodeUrl(e) {
@@ -99,36 +153,42 @@ class ChangeDetail extends Component {
     });
   }
 
-  loadData() {
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      async: false,
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.props.data.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            dataSource: data.data
-          });
-        }
-      }.bind(this)
+  changeButtonStatus() {
+    this.setState({
+      buttonStatus: !this.state.buttonStatus
     });
   }
+  // loadData() {
+  //   $.ajax({
+  //     method: "get",
+  //     dataType: "json",
+  //     async: false,
+  //     crossDomain: false,
+  //     url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+  //     data: {
+  //       changeId: this.props.data.id
+  //     },
+  //     success: function(data) {
+  //       if (data.error.length || data.data.list == "") {
+  //         if (data.error && data.error.length) {
+  //           message.warning(data.error[0].message);
+  //         }
+  //       } else {
+  //         this.setState({
+  //           dataSource: data.data
+  //         });
+  //       }
+  //     }.bind(this)
+  //   });
+  // }
 
   componentDidMount() {
     // this.loadData();
     window.setTimeout(() => {
-      this.loadData()
-    },10)
+      console.log(this.props);
+    }, 1000);
   }
+  
 
   render() {
     const pageData = [
@@ -151,10 +211,19 @@ class ChangeDetail extends Component {
       {
         labelA: "当前进度",
         formItemLayoutA: formItemLayout,
+        // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
         dataA:
-          this.props.data.status !== 4
-            ? getProcessStatusNew(this.props.data.processState) + "审核中"
-            : getProcessStatusNew(this.props.data.processState) + "已完成",
+          this.props.data.processState == 2 || this.props.data.processState == 3
+            ? shenghePeo(
+                this.props.data.processState == 2
+                  ? this.props.data.consultantExamine
+                  : this.props.data.managerExamine,
+                this.props.data.processState
+              )
+            : getProcessStatusNew(
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
         dataB: getChangeType(this.props.data.type)
@@ -256,10 +325,9 @@ class ChangeDetail extends Component {
     const orgCodeUrl = this.props.pictureUrl;
 
     return (
-      <div className="clearfix">
+      <div className="clearfix changeDetail">
         <div
           className="clearfix"
-          style={{ marginTop: 20 }}
           ref={e => {
             this.refs = e;
           }}
@@ -303,23 +371,51 @@ class ChangeDetail extends Component {
             <Rizhi changeId={this.props.data.id} />
           </Form.Item>
 
+          {/* <ul>
+            {this.props.data.consultantExamine.map((item, index) => {
+              return (
+                <li>
+              )
+            })}
+          </ul> */}
+
           {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
           <ul
-            style={{ width: "868px", overflow: "hidden", paddingLeft: "90px" }}
+            style={{
+              width: "868px",
+              overflow: "hidden",
+              paddingLeft: "90px",
+              position: "relative",
+              bottom: "0px"
+            }}
           >
             {/* <span>操作人:</span> */}
-            {this.state.dataSource.map((item, index) => (
-              <li
-                key={index}
-                style={{
-                  width: "100%",
-                  height: "auto",
-                  wordBreak: "break-all",
-                  color: "black",
-                  marginBottom: "10px"
-                }}
-              >{`${item.aname}: ${item.remarks}`}</li>
-            ))}
+            {this.props.dataSource.map((item, index) => {
+              if (item.status == 0) {
+                item.status = "发起";
+              } else if (item.status == 1) {
+                item.status = "审核中";
+              } else if (item.status == 2) {
+                item.status = "通过";
+              } else if (item.status == 3) {
+                item.status = "驳回";
+              } else if (item.status == 4) {
+                item.status = "完成";
+              }
+              return (
+                <li
+                  key={index}
+                  style={{
+                    width: "100%",
+                    height: "auto",
+                    wordBreak: "break-all",
+                    marginBottom: "10px"
+                  }}
+                >
+                  {item.aname + ":" + "(" + item.status + ")" + item.remarks}
+                </li>
+              );
+            })}
           </ul>
 
           {/* {this.props.data.processState >= 3 ? (
@@ -334,7 +430,7 @@ class ChangeDetail extends Component {
           ) : (
             ""
           )} */}
-          {this.props.data.processState >= 5 ? (
+          {/* {this.props.data.processState >= 5 ? (
             <div>
               <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
                 当前财务状态(财务填写)
@@ -345,10 +441,10 @@ class ChangeDetail extends Component {
             </div>
           ) : (
             ""
-          )}
+          )} */}
         </div>
         {this.props.processState === this.props.data.processState ? (
-          <div>
+          <div style={{ display: this.props.data.isExamine == 0 ? "block" : "none" }}>
             <div className="clearfix">
               <FormItem
                 style={{ height: "auto" }}
@@ -359,7 +455,6 @@ class ChangeDetail extends Component {
                 <TextArea
                   rows={4}
                   placeholder="请输入备注信息"
-                  ref="signTotalAmount"
                   style={{ width: "95%" }}
                   value={this.state.reason}
                   onChange={e => {
@@ -382,9 +477,11 @@ class ChangeDetail extends Component {
                     backData={this.props.data}
                     processState={this.props.processState}
                     visible={this.changeButtonStatus}
+                    ajaxData={this.state}
                     loadData={this.props.loadData}
-                    reason={this.state.reason}
                     rejectState={this.state.rejectState}
+                    reason={this.state.reason}
+                    onCancel={this.props.onCancel}
                   />
                 );
               })}
@@ -401,7 +498,6 @@ class ChangeDetail extends Component {
               }}
               onChange={val => {
                 this.setState({ rejectState: val });
-                console.log(val, this.state.rejectState);
               }}
             >
               <Option
@@ -426,7 +522,7 @@ class ChangeDetail extends Component {
                   display: this.props.processState >= 3 ? "block" : "none"
                 }}
               >
-                技术员
+                咨询师
               </Option>
               <Option
                 value="3"
@@ -434,7 +530,7 @@ class ChangeDetail extends Component {
                   display: this.props.processState >= 4 ? "block" : "none"
                 }}
               >
-                技术经理
+                咨询师经理
               </Option>
               <Option
                 value="4"
@@ -442,7 +538,7 @@ class ChangeDetail extends Component {
                   display: this.props.processState >= 5 ? "block" : "none"
                 }}
               >
-                技术总监
+                咨询师总监
               </Option>
               <Option
                 value="5"

+ 334 - 169
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJszj.js

@@ -1,8 +1,9 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Input, Button, message, Select } from "antd";
+import { Form, Upload, Modal, Input, Button, message, Select, Table } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "@/tools.js";
+import { shenghePeo } from "@/tools.js";
 import $ from "jquery/src/ajax";
 // import ReactToPrint from "react-to-print";
 
@@ -87,12 +88,75 @@ class ChangeDetail extends Component {
       previewVisible: false,
       buttonStatus: true,
       dataSource: [],
-      reason: ""
+      reason: "",
+      // 累计回收退票
+      refundInvoice: 0,
+      // 退票数组
+      contactList: [],
+      rejectState: 0,
+      // 收款信息
+      proceedsData: [],
+      proceedsTotal: this.props.proceedsTotal,
+      // 开票信息
+      invoiceData: [],
+      invoiceTotal: this.props.invoiceTotal,
+      cost: 10,
+      refund: 8,
+      // 测试添加退票
+      contactList: this.props.contactList,
+      ContactsLists: [
+        {
+          title: "金额(万)",
+          dataIndex: "amount",
+          key: "amount",
+          render: (text, record) => {
+            return (
+              <div>
+                实际回收退票(万元)
+                <Input
+                  value={record.amount}
+                  placeholder="请输入金额(必填项)"
+                  disabled={record.load}
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.amount = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              </div>
+            );
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record) => {
+            return <div>{record.createTimes}</div>;
+          }
+        }
+      ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
   }
 
+  componentWillReceiveProps(nextProps) {
+    this.setState({
+      paymentTimes: nextProps.data.paymentTimes,
+      paymentAmount: nextProps.data.paymentAmount,
+      invoiceTimes: nextProps.data.invoiceTimes,
+      invoiceAmount: nextProps.data.invoiceAmount,
+      cwCost: nextProps.data.cwCost,
+      refundableAmount: nextProps.data.refundableAmount,
+      cwRemarks: nextProps.data.cwRemarks,
+      contactList: nextProps.contactList,
+      refundInvoice: nextProps.data.refundInvoice
+    });
+  }
+
   getOrgCodeUrl(e) {
     this.setState({
       orgCodeUrl: e
@@ -106,35 +170,35 @@ class ChangeDetail extends Component {
     });
   }
 
-  loadDataChange() {
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      async: false,
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.props.data.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            dataSource: data.data
-          });
-        }
-      }.bind(this)
-    });
-  }
+  // loadDataChange() {
+  //   $.ajax({
+  //     method: "get",
+  //     dataType: "json",
+  //     async: false,
+  //     crossDomain: false,
+  //     url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+  //     data: {
+  //       changeId: this.props.data.id
+  //     },
+  //     success: function(data) {
+  //       if (data.error.length || data.data.list == "") {
+  //         if (data.error && data.error.length) {
+  //           message.warning(data.error[0].message);
+  //         }
+  //       } else {
+  //         this.setState({
+  //           dataSource: data.data
+  //         });
+  //       }
+  //     }.bind(this)
+  //   });
+  // }
 
-  componentDidMount() {
-    window.setTimeout(() => {
-      this.loadDataChange();
-    }, 10);
-  }
+  // componentDidMount() {
+  //   window.setTimeout(() => {
+  //     this.loadDataChange();
+  //   }, 10);
+  // }
 
   render() {
     const pageData = [
@@ -157,10 +221,19 @@ class ChangeDetail extends Component {
       {
         labelA: "当前进度",
         formItemLayoutA: formItemLayout,
+        // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
         dataA:
-          this.props.data.status !== 4
-            ? getProcessStatusNew(this.props.data.processState) + "审核中"
-            : getProcessStatusNew(this.props.data.processState) + "已完成",
+          this.props.data.processState == 2 || this.props.data.processState == 3
+            ? shenghePeo(
+                this.props.data.processState == 2
+                  ? this.props.data.consultantExamine
+                  : this.props.data.managerExamine,
+                this.props.data.processState
+              )
+            : getProcessStatusNew(
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
         dataB: getChangeType(this.props.data.type)
@@ -219,33 +292,12 @@ class ChangeDetail extends Component {
     ];
     const financeData = [
       {
-        labelA: "收款时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.paymentTimes,
-        labelB: "收款金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.paymentAmount
-      },
-      {
-        labelA: "开票时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.invoiceTimes,
-        labelB: "已开票金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.invoiceAmount
-      },
-      {
         labelA: "发生成本(万元)",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.cwCost,
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.refundableAmount
-      },
-      {
-        labelA: "补充资料/备注",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.cwRemarks
       }
     ];
     const buttonData = [
@@ -277,10 +329,9 @@ class ChangeDetail extends Component {
     const orgCodeUrl = this.props.pictureUrl;
 
     return (
-      <div className="clearfix">
+      <div className="clearfix changeDetail">
         <div
           className="clearfix"
-          style={{ marginTop: 20 }}
           ref={e => {
             this.refs = e;
           }}
@@ -325,23 +376,135 @@ class ChangeDetail extends Component {
           </Form.Item>
 
           <ul
-            style={{ width: "868px", overflow: "hidden", paddingLeft: "90px" }}
+            style={{
+              width: "868px",
+              overflow: "hidden",
+              paddingLeft: "90px",
+              position: "relative",
+              bottom: "0px"
+            }}
           >
             {/* <span>操作人:</span> */}
-            {this.state.dataSource.map((item, index) => (
-              <li
-                key={index}
-                style={{
-                  width: "100%",
-                  height: "auto",
-                  wordBreak: "break-all",
-                  color: "black",
-                  marginBottom: "10px"
-                }}
-              >{`${item.aname}: ${item.remarks}`}</li>
-            ))}
+            {this.props.dataSource.map((item, index) => {
+              if (item.status == 0) {
+                item.status = "发起";
+              } else if (item.status == 1) {
+                item.status = "审核中";
+              } else if (item.status == 2) {
+                item.status = "通过";
+              } else if (item.status == 3) {
+                item.status = "驳回";
+              } else if (item.status == 4) {
+                item.status = "完成";
+              }
+              return (
+                <li
+                  key={index}
+                  style={{
+                    width: "100%",
+                    height: "auto",
+                    wordBreak: "break-all",
+                    marginBottom: "10px"
+                  }}
+                >
+                  {item.aname + ":" + "(" + item.status + ")" + item.remarks}
+                </li>
+              );
+            })}
           </ul>
 
+          <div className="clearfix">
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              收款情况
+            </h3>
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.bill || []).map((item, index) => (
+                  <li key={index}>
+                    {item.payTime +
+                      " " +
+                      item.aName +
+                      " 收款:" +
+                      item.transactionAmount +
+                      "万元"}
+                  </li>
+                ))}
+              </ul>
+
+              <div>收款总计:{this.props.proceedsTotal}万元</div>
+            </div>
+            <br />
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.invoice || []).map((item, index) => (
+                  <li key={index}>
+                    {item.createTime + " " + " 开票:" + item.amount + "万元"}
+                  </li>
+                ))}
+              </ul>
+              <div>开票总计:{this.props.invoiceTotal}万元</div>
+            </div>
+
+            <p style={{ marginLeft: "90px", color: "red" }}>
+              系统预估 产生成本(万元):
+              {this.props.data.estimateCost
+                ? this.props.data.estimateCost
+                : "0"}{" "}
+              &nbsp;应退金额(万元):
+              {this.props.data.estimateRefundable
+                ? this.props.data.estimateRefundable
+                : "0"}
+            </p>
+          </div>
+
+          {/* {this.props.data.type === 0 ? (
+            <div>
+              <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
+                当前项目进度(咨询师经理填写)
+              </h3>
+              {planData.map((item, index) => {
+                return <Itemlist key={index} pageData={item} />;
+              })}
+            </div>
+          ) : (
+            ""
+          )} */}
+
+          <div
+            style={{
+              display:
+                (this.props.data.processState == 8 ||
+                  this.props.data.processState == 7) &&
+                (this.props.data.status == 2 || this.props.data.status == 4)
+                  ? "block"
+                  : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              回收退票
+            </h3>
+
+            <Table
+              pagination={false}
+              bordered
+              columns={this.state.ContactsLists}
+              dataSource={this.state.contactList}
+            />
+          </div>
+
+          <div
+            style={{
+              display: this.props.data.processState > 5 ? "block" : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              当前财务状态(财务填写)
+            </h3>
+            {financeData.map((item, index) => {
+              return <Itemlist key={index} pageData={item} />;
+            })}
+          </div>
+
           {/* {this.props.data.processState >= 4 ? (
             <div>
               <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
@@ -366,27 +529,29 @@ class ChangeDetail extends Component {
           ) : (
             ""
           )} */}
-
-          <div>
-            <Form.Item
-              label="备注"
-              labelCol={{ span: 4 }}
-              wrapperCol={{ span: 14 }}
-            >
-              <Input.TextArea
-                value={this.state.reason}
-                rows={4}
-                placeholder="请输入备注"
-                onChange={e => {
-                  let reason = e.target.value;
-                  this.setState({ reason });
-                }}
-              />
-            </Form.Item>
-          </div>
         </div>
-        {this.props.processState === this.props.data.processState ? (
-          this.state.buttonStatus ? (
+        {this.props.data.processState === 4 &&
+        (this.props.data.status == 1 || this.props.data.status == 3) ? (
+          // this.state.buttonStatus ? (
+          <div>
+            <div>
+              <Form.Item
+                label="备注"
+                labelCol={{ span: 4 }}
+                wrapperCol={{ span: 14 }}
+              >
+                <Input.TextArea
+                  value={this.state.reason}
+                  rows={4}
+                  placeholder="请输入备注"
+                  onChange={e => {
+                    let reason = e.target.value;
+                    this.setState({ reason });
+                  }}
+                />
+              </Form.Item>
+            </div>
+
             <div
               className="clearfix"
               style={{ display: "flex", justifyContent: "space-around" }}
@@ -403,94 +568,94 @@ class ChangeDetail extends Component {
                     ajaxData={this.state}
                     rejectState={this.state.rejectState}
                     reason={this.state.reason}
+                    onCancel={this.props.onCancel}
                   />
                 );
               })}
-
-              <Select
-                defaultValue="0"
+            </div>
+            <Select
+              defaultValue="0"
+              style={{
+                width: 120,
+                float: "left",
+                position: "relative",
+                bottom: "28px",
+                right: "-600px"
+              }}
+              onChange={val => {
+                this.setState({ rejectState: val });
+              }}
+            >
+              <Option
+                value="0"
                 style={{
-                  width: 120,
-                  float: "left",
-                  position: "relative",
-                  bottom: "28px",
-                  right: "-600px"
+                  display: this.props.processState >= 1 ? "block" : "none"
                 }}
-                onChange={val => {
-                  this.setState({ rejectState: val });
-                  console.log(val, this.state.rejectState);
+              >
+                营销员
+              </Option>
+              <Option
+                value="1"
+                style={{
+                  display: this.props.processState >= 2 ? "block" : "none"
                 }}
               >
-                <Option
-                  value="0"
-                  style={{
-                    display: this.props.processState >= 1 ? "block" : "none"
-                  }}
-                >
-                  营销员
-                </Option>
-                <Option
-                  value="1"
-                  style={{
-                    display: this.props.processState >= 2 ? "block" : "none"
-                  }}
-                >
-                  营销管理员
-                </Option>
-                <Option
-                  value="2"
-                  style={{
-                    display: this.props.processState >= 3 ? "block" : "none"
-                  }}
-                >
-                  技术员
-                </Option>
-                <Option
-                  value="3"
-                  style={{
-                    display: this.props.processState >= 4 ? "block" : "none"
-                  }}
-                >
-                  技术经理
-                </Option>
-                <Option
-                  value="4"
-                  style={{
-                    display: this.props.processState >= 5 ? "block" : "none"
-                  }}
-                >
-                  技术总监
-                </Option>
-                <Option
-                  value="5"
-                  style={{
-                    display: this.props.processState >= 6 ? "block" : "none"
-                  }}
-                >
-                  财务专员(退单)
-                </Option>
-                <Option
-                  value="6"
-                  style={{
-                    display: this.props.processState >= 7 ? "block" : "none"
-                  }}
-                >
-                  财务总监
-                </Option>
-                <Option
-                  value="7"
-                  style={{
-                    display: this.props.processState >= 8 ? "block" : "none"
-                  }}
-                >
-                  总裁
-                </Option>
-              </Select>
-            </div>
-          ) : (
-            ""
-          )
+                营销管理员
+              </Option>
+              <Option
+                value="2"
+                style={{
+                  display: this.props.processState >= 3 ? "block" : "none"
+                }}
+              >
+                咨询师
+              </Option>
+              <Option
+                value="3"
+                style={{
+                  display: this.props.processState >= 4 ? "block" : "none"
+                }}
+              >
+                咨询师经理
+              </Option>
+              <Option
+                value="4"
+                style={{
+                  display: this.props.processState >= 5 ? "block" : "none"
+                }}
+              >
+                咨询师总监
+              </Option>
+              <Option
+                value="5"
+                style={{
+                  display: this.props.processState >= 6 ? "block" : "none"
+                }}
+              >
+                财务专员(退单)
+              </Option>
+              <Option
+                value="6"
+                style={{
+                  display: this.props.processState >= 7 ? "block" : "none"
+                }}
+              >
+                财务总监
+              </Option>
+              <Option
+                value="7"
+                style={{
+                  display: this.props.processState >= 8 ? "block" : "none"
+                }}
+              >
+                总裁
+              </Option>
+            </Select>
+          </div>
         ) : (
+          // ) : (
+          //   ""
+          // )
           ""
         )}
         {/* <ReactToPrint

+ 252 - 111
js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxgly.js

@@ -1,8 +1,9 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Button, message, Input } from "antd";
+import { Form, Upload, Modal, Button, message, Input, Table } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "../../../../tools.js";
+import { shenghePeo } from "@/tools.js";
 import $ from "jquery/src/ajax";
 // import ReactToPrint from "react-to-print";
 const FormItem = Form.Item;
@@ -88,11 +89,60 @@ class ChangeDetail extends Component {
       previewVisible: false,
       buttonStatus: true,
       dataSource: [],
-      reason: ""
+      reason: "",
+      rejectState: 0,
+      // 累计回收退票
+      refundInvoice: 0,
+      // 退票数组
+      contactList: [],
+      rejectState: 0,
+      // 收款信息
+      proceedsData: [],
+      proceedsTotal: this.props.proceedsTotal,
+      // 开票信息
+      invoiceData: [],
+      invoiceTotal: this.props.invoiceTotal,
+      cost: 10,
+      refund: 8,
+      // 测试添加退票
+      contactList: this.props.contactList,
+      ContactsLists: [
+        {
+          title: "金额(万)",
+          dataIndex: "amount",
+          key: "amount",
+          render: (text, record) => {
+            return (
+              <div>
+                实际回收退票(万元)
+                <Input
+                  value={record.amount}
+                  placeholder="请输入金额(必填项)"
+                  disabled={record.load}
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.amount = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              </div>
+            );
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record) => {
+            return <div>{record.createTimes}</div>;
+          }
+        }
+      ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
-    this.loadDataChange = this.loadDataChange.bind(this);
   }
   // componentWillUpdate() {
   //   this.loadDataChange();
@@ -102,34 +152,45 @@ class ChangeDetail extends Component {
   //     this.loadDataChange();
   //   console.log(this.props);
   // }
-  componentDidMount() {
-    window.setTimeout(() => {
-      this.loadDataChange();
-    },10)
-  }
 
-  loadDataChange() {
-    console.log(this.props);
-    
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.props.data.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            dataSource: data.data
-          });
-        }
-      }.bind(this)
+  // loadDataChange() {
+  //   console.log(this.props);
+
+  //   $.ajax({
+  //     method: "get",
+  //     dataType: "json",
+  //     crossDomain: false,
+  //     url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+  //     data: {
+  //       changeId: this.props.data.id
+  //     },
+  //     success: function(data) {
+  //       if (data.error.length || data.data.list == "") {
+  //         if (data.error && data.error.length) {
+  //           message.warning(data.error[0].message);
+  //         }
+  //       } else {
+  //         this.setState({
+  //           dataSource: data.data
+  //         });
+  //       }
+  //     }.bind(this)
+  //   });
+  // }
+
+
+
+  componentWillReceiveProps(nextProps) {
+    this.setState({
+      paymentTimes: nextProps.data.paymentTimes,
+      paymentAmount: nextProps.data.paymentAmount,
+      invoiceTimes: nextProps.data.invoiceTimes,
+      invoiceAmount: nextProps.data.invoiceAmount,
+      cwCost: nextProps.data.cwCost,
+      refundableAmount: nextProps.data.refundableAmount,
+      cwRemarks: nextProps.data.cwRemarks,
+      contactList: nextProps.contactList,
+      refundInvoice: nextProps.data.refundInvoice
     });
   }
 
@@ -167,10 +228,19 @@ class ChangeDetail extends Component {
       {
         labelA: "当前进度",
         formItemLayoutA: formItemLayout,
+        // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
         dataA:
-          this.props.data.status !== 4
-            ? getProcessStatusNew(this.props.data.processState) + "审核中"
-            : getProcessStatusNew(this.props.data.processState) + "已完成",
+          this.props.data.processState == 2 || this.props.data.processState == 3
+            ? shenghePeo(
+                this.props.data.processState == 2
+                  ? this.props.data.consultantExamine
+                  : this.props.data.managerExamine,
+                this.props.data.processState
+              )
+            : getProcessStatusNew(
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
         dataB: getChangeType(this.props.data.type)
@@ -214,33 +284,12 @@ class ChangeDetail extends Component {
     ];
     const financeData = [
       {
-        labelA: "收款时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.paymentTimes,
-        labelB: "收款金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.paymentAmount
-      },
-      {
-        labelA: "开票时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.invoiceTimes,
-        labelB: "已开票金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.invoiceAmount
-      },
-      {
         labelA: "发生成本(万元)",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.cwCost,
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.refundableAmount
-      },
-      {
-        labelA: "补充资料/备注",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.cwRemarks
       }
     ];
     const buttonData = [
@@ -272,10 +321,9 @@ class ChangeDetail extends Component {
     const orgCodeUrl = this.props.pictureUrl;
 
     return (
-      <div className="clearfix">
+      <div className="clearfix changeDetail">
         <div
           className="clearfix"
-          style={{ marginTop: 20 }}
           ref={e => {
             this.refs = e;
           }}
@@ -325,25 +373,118 @@ class ChangeDetail extends Component {
               width: "868px",
               overflow: "hidden",
               paddingLeft: "90px",
-              marginBottom: "20px"
+              position: "relative",
+              bottom: "20px"
             }}
           >
             {/* <span>操作人:</span> */}
-            {this.state.dataSource.map((item, index) => (
-              <li
-                key={index}
-                style={{
-                  width: "100%",
-                  height: "auto",
-                  wordBreak: "break-all",
-                  color: "black",
-                  marginBottom: "10px"
-                }}
-              >{`${item.aname}: ${item.remarks}`}</li>
-            ))}
+            {this.props.dataSource.map((item, index) => {
+              if (item.status == 0) {
+                item.status = "发起";
+              } else if (item.status == 1) {
+                item.status = "审核中";
+              } else if (item.status == 2) {
+                item.status = "通过";
+              } else if (item.status == 3) {
+                item.status = "驳回";
+              } else if (item.status == 4) {
+                item.status = "完成";
+              }
+              return (
+                <li
+                  key={index}
+                  style={{
+                    width: "100%",
+                    height: "auto",
+                    wordBreak: "break-all",
+                    marginBottom: "10px"
+                  }}
+                >
+                  {item.aname + ":" + "(" + item.status + ")" + item.remarks}
+                </li>
+              );
+            })}
           </ul>
 
-          {this.props.data.type === 0 && this.props.data.processState >= 2 ? (
+          <div className="clearfix">
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              收款情况
+            </h3>
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.bill || []).map((item, index) => (
+                  <li key={index}>
+                    {item.payTime +
+                      " " +
+                      item.aName +
+                      " 收款:" +
+                      item.transactionAmount +
+                      "万元"}
+                  </li>
+                ))}
+              </ul>
+
+              <div>收款总计:{this.props.proceedsTotal}万元</div>
+            </div>
+            <br />
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.invoice || []).map((item, index) => (
+                  <li key={index}>
+                    {item.createTime + " " + " 开票:" + item.amount + "万元"}
+                  </li>
+                ))}
+              </ul>
+              <div>开票总计:{this.props.invoiceTotal}万元</div>
+            </div>
+
+            <p style={{ marginLeft: "90px", color: "red" }}>
+              系统预估 产生成本(万元):
+              {this.props.data.estimateCost
+                ? this.props.data.estimateCost
+                : "0"}{" "}
+              &nbsp;应退金额(万元):
+              {this.props.data.estimateRefundable
+                ? this.props.data.estimateRefundable
+                : "0"}
+            </p>
+          </div>
+
+          <div
+            style={{
+              display:
+                (this.props.data.processState == 8 ||
+                  this.props.data.processState == 7) &&
+                (this.props.data.status == 2 || this.props.data.status == 4)
+                  ? "block"
+                  : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              回收退票
+            </h3>
+
+            <Table
+              pagination={false}
+              bordered
+              columns={this.state.ContactsLists}
+              dataSource={this.state.contactList}
+            />
+          </div>
+
+          <div
+            style={{
+              display: this.props.data.processState > 5 ? "block" : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              当前财务状态(财务填写)
+            </h3>
+            {financeData.map((item, index) => {
+              return <Itemlist key={index} pageData={item} />;
+            })}
+          </div>
+          {/* {this.props.data.type === 0 && this.props.data.processState >= 2 ? (
             <div>
               <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
                 当前项目进度(咨询师经理填写)
@@ -381,53 +522,53 @@ class ChangeDetail extends Component {
             </div>
           ) : (
             ""
-          )}
+          )} */}
         </div>
 
-        
-
         {this.props.processState === this.props.data.processState ? (
           this.state.buttonStatus ? (
             <div>
-        <div className="clearfix">
-          <FormItem
-            style={{ height: "auto" }}
-            labelCol={{ span: 4 }}
-            wrapperCol={{ span: 18 }}
-            label="备注"
-          >
-            <TextArea
-              rows={4}
-              placeholder="请输入备注信息"
-              ref="signTotalAmount"
-              style={{ width: "95%" }}
-              value={this.state.reason}
-              onChange={e => {
-                let reason = e.target.value;
-                this.setState({ reason });
-              }}
-            />
-          </FormItem>
-        </div>
-
-            <div
-              className="clearfix"
-              style={{ display: "flex", justifyContent: "space-around" }}
-            >
-              {buttonData.map((item, index) => {
-                return (
-                  <AgreeButton
-                    data={item}
-                    key={index}
-                    backData={this.props.data}
-                    processState={this.props.processState}
-                    visible={this.changeButtonStatus}
-                    loadData={this.props.loadData}
-                    reason={this.state.reason}
+              <div className="clearfix">
+                <FormItem
+                  style={{ height: "auto" }}
+                  labelCol={{ span: 4 }}
+                  wrapperCol={{ span: 18 }}
+                  label="备注"
+                >
+                  <TextArea
+                    rows={4}
+                    placeholder="请输入备注信息"
+                    style={{ width: "95%" }}
+                    value={this.state.reason}
+                    onChange={e => {
+                      let reason = e.target.value;
+                      this.setState({ reason });
+                    }}
                   />
-                );
-              })}
-            </div>
+                </FormItem>
+              </div>
+
+              <div
+                className="clearfix"
+                style={{ display: "flex", justifyContent: "space-around" }}
+              >
+                {buttonData.map((item, index) => {
+                  return (
+                    <AgreeButton
+                      data={item}
+                      key={index}
+                      backData={this.props.data}
+                      processState={this.props.processState}
+                      visible={this.changeButtonStatus}
+                      loadData={this.props.loadData}
+                      reason={this.state.reason}
+                      ajaxData={this.state}
+                      rejectState={this.state.rejectState}
+                      onCancel={this.props.onCancel}
+                    />
+                  );
+                })}
+              </div>
             </div>
           ) : (
             ""

+ 230 - 61
js/component/manageCenter/order/orderNew/changeComponent/changeDetailYxy.js

@@ -1,9 +1,11 @@
 import React, { Component } from "react";
-import { Form, Upload, Modal, Button, message } from "antd";
+import { Form, Upload, Modal, Button, message, Table, Input } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
 import { getProcessStatusNew } from "@/tools.js";
+import { shenghePeo } from "@/tools.js";
 import $ from "jquery/src/ajax";
+import tongguo from "../../../../../../image/tongguo.png";
 // import ReactToPrint from "react-to-print";
 
 const formItemLayout = {
@@ -84,7 +86,60 @@ class ChangeDetail extends Component {
     super(props);
     this.state = {
       previewVisible: false,
-      dataSource: []
+      dataSource: [],
+      // 累计回收退票
+      refundInvoice: 0,
+      // 退票数组
+      contactList: [],
+      rejectState: 0,
+      // 收款信息
+      proceedsData: [],
+      proceedsTotal: this.props.proceedsTotal,
+      // 开票信息
+      invoiceData: [],
+      invoiceTotal: this.props.invoiceTotal,
+      cost: 10,
+      refund: 8,
+      // 测试添加退票
+      contactList: this.props.contactList,
+      ContactsLists: [
+        {
+          title: "金额(万)",
+          dataIndex: "amount",
+          key: "amount",
+          render: (text, record) => {
+            return (
+              <div>
+                实际回收退票(万元)
+                <Input
+                  value={record.amount}
+                  placeholder="请输入金额(必填项)"
+                  disabled={record.load}
+                  key={record.id}
+                  required="required"
+                  onChange={e => {
+                    record.amount = e.target.value;
+                    this.setState({ contactList: this.state.contactList });
+                  }}
+                  style={{ width: "120px" }}
+                />
+              </div>
+            );
+          }
+        },
+        {
+          title: "时间",
+          dataIndex: "createTimes",
+          key: "createTimes",
+          render: (text, record) => {
+            return (
+              <div>
+                {record.createTimes}
+              </div>
+            );
+          }
+        }
+      ]
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
   }
@@ -95,32 +150,42 @@ class ChangeDetail extends Component {
     });
   }
 
-  loadData() {
-    $.ajax({
-      method: "get",
-      dataType: "json",
-      async: false,
-      crossDomain: false,
-      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
-      data: {
-        changeId: this.props.data.id
-      },
-      success: function(data) {
-        if (data.error.length || data.data.list == "") {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          this.setState({
-            dataSource: data.data
-          });
-        }
-      }.bind(this)
-    });
-  }
+  // loadData() {
+  //   $.ajax({
+  //     method: "get",
+  //     dataType: "json",
+  //     async: false,
+  //     crossDomain: false,
+  //     url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+  //     data: {
+  //       changeId: this.props.data.id
+  //     },
+  //     success: function(data) {
+  //       if (data.error.length || data.data.list == "") {
+  //         if (data.error && data.error.length) {
+  //           message.warning(data.error[0].message);
+  //         }
+  //       } else {
+  //         this.setState({
+  //           dataSource: data.data
+  //         });
+  //       }
+  //     }.bind(this)
+  //   });
+  // }
 
-  componentDidMount() {
-    this.loadData()
+  componentWillReceiveProps(nextProps) {
+    this.setState({
+      paymentTimes: nextProps.data.paymentTimes,
+      paymentAmount: nextProps.data.paymentAmount,
+      invoiceTimes: nextProps.data.invoiceTimes,
+      invoiceAmount: nextProps.data.invoiceAmount,
+      cwCost: nextProps.data.cwCost,
+      refundableAmount: nextProps.data.refundableAmount,
+      cwRemarks: nextProps.data.cwRemarks,
+      contactList: nextProps.contactList,
+      refundInvoice: nextProps.data.refundInvoice
+    });
   }
 
   render() {
@@ -151,10 +216,19 @@ class ChangeDetail extends Component {
       {
         labelA: "当前进度",
         formItemLayoutA: formItemLayout,
+        // 当前是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示
         dataA:
-          this.props.data.status !== 4
-            ? getProcessStatusNew(this.props.data.processState) + "审核中"
-            : getProcessStatusNew(this.props.data.processState) + "已完成",
+          this.props.data.processState == 2 || this.props.data.processState == 3
+            ? shenghePeo(
+                this.props.data.processState == 2
+                  ? this.props.data.consultantExamine
+                  : this.props.data.managerExamine,
+                this.props.data.processState
+              )
+            : getProcessStatusNew(
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
         dataB: getChangeType(this.props.data.type)
@@ -198,22 +272,6 @@ class ChangeDetail extends Component {
     ];
     const financeData = [
       {
-        labelA: "收款时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.paymentTimes,
-        labelB: "收款金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.paymentAmount
-      },
-      {
-        labelA: "开票时间",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.invoiceTimes,
-        labelB: "已开票金额(万元)",
-        formItemLayoutB: formItemLayout,
-        dataB: this.props.data.invoiceAmount
-      },
-      {
         labelA: "发生成本(万元)",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.cwCost,
@@ -221,11 +279,6 @@ class ChangeDetail extends Component {
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.refundableAmount
       },
-      {
-        labelA: "补充资料/备注",
-        formItemLayoutA: formItemLayout,
-        dataA: this.props.data.cwRemarks
-      }
     ];
     const buttonData = [
       {
@@ -256,7 +309,7 @@ class ChangeDetail extends Component {
     const orgCodeUrl = this.props.pictureUrl;
 
     return (
-      <div className="clearfix">
+      <div className="clearfix changeDetail">
         <div
           className="clearfix"
           style={{ marginTop: 0 }}
@@ -314,17 +367,132 @@ class ChangeDetail extends Component {
           )} */}
           {/* <h2 style={{ textAlign: "center", marginBottom: 0 }}>变更日志</h2> */}
           <ul
-            style={{ width: "868px", overflow: "hidden", paddingLeft: "90px" }}
+            style={{
+              width: "868px",
+              overflow: "hidden",
+              paddingLeft: "90px",
+              position: "relative",
+              bottom: "20px"
+            }}
           >
             {/* <span>操作人:</span> */}
-            {this.state.dataSource.map((item, index) => (
-              <li
-                key={index}
-                style={{ width: "100%", height: "auto", wordBreak: "break-all", color: "black", marginBottom: "10px"}}
-              >{`${item.aname}: ${item.remarks}`}</li>
-            ))}
+            {this.props.dataSource.map((item, index) => {
+              if (item.status == 0) {
+                item.status = "发起";
+              } else if (item.status == 1) {
+                item.status = "审核中";
+              } else if (item.status == 2) {
+                item.status = "通过";
+              } else if (item.status == 3) {
+                item.status = "驳回";
+              } else if (item.status == 4) {
+                item.status = "完成";
+              }
+              return (
+                <li
+                  key={index}
+                  style={{
+                    width: "100%",
+                    height: "auto",
+                    wordBreak: "break-all",
+                    marginBottom: "10px"
+                  }}
+                >
+                  {item.aname + ":" + "(" + item.status + ")" + item.remarks}
+                </li>
+              );
+            })}
           </ul>
 
+          <div className="clearfix">
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              收款情况
+            </h3>
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.bill || []).map((item, index) => (
+                  <li key={index}>
+                    {item.payTime +
+                      " " +
+                      item.aName +
+                      " 收款:" +
+                      item.transactionAmount +
+                      "万元"}
+                  </li>
+                ))}
+              </ul>
+
+              <div>收款总计:{this.props.proceedsTotal}万元</div>
+            </div>
+            <br />
+            <div style={{ marginLeft: "90px" }}>
+              <ul>
+                {(this.props.proceedsData.invoice || []).map((item, index) => (
+                  <li key={index}>
+                    {item.createTime + " " + " 开票:" + item.amount + "万元"}
+                  </li>
+                ))}
+              </ul>
+              <div>开票总计:{this.props.invoiceTotal}万元</div>
+            </div>
+
+            <p style={{ marginLeft: "90px", color: "red" }}>
+              系统预估 产生成本(万元):
+              {this.props.data.estimateCost
+                ? this.props.data.estimateCost
+                : "0"}{" "}
+              &nbsp;应退金额(万元):
+              {this.props.data.estimateRefundable
+                ? this.props.data.estimateRefundable
+                : "0"}
+            </p>
+          </div>
+
+          {/* {this.props.data.type === 0 ? (
+            <div>
+              <h3 style={{ marginLeft: 10, fontWeight: 800, marginBottom: 10 }}>
+                当前项目进度(咨询师经理填写)
+              </h3>
+              {planData.map((item, index) => {
+                return <Itemlist key={index} pageData={item} />;
+              })}
+            </div>
+          ) : (
+            ""
+          )} */}
+
+          <div
+            style={{
+              display:
+                (this.props.data.processState == 8 ||
+                  this.props.data.processState == 7) &&
+                (this.props.data.status == 2 || this.props.data.status == 4)
+                  ? "block"
+                  : "none"
+            }}
+          >
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              回收退票
+            </h3>
+
+
+            <Table
+              pagination={false}
+              bordered
+              columns={this.state.ContactsLists}
+              dataSource={this.state.contactList}
+            />
+          </div>
+
+          <div style={{ display: this.props.data.processState > 5 ? "block" : "none"}}>
+            <h3 style={{ marginLeft: 20, fontWeight: 800, marginBottom: 10 }}>
+              当前财务状态(财务填写)
+            </h3>
+            {financeData.map((item, index) => {
+              return <Itemlist key={index} pageData={item} />;
+            })}
+          </div>
+
           {/* <ul>
             <span>备注</span>
             {this.state.dataSource.map((item, index) => (
@@ -332,7 +500,7 @@ class ChangeDetail extends Component {
             ))}
           </ul> */}
 
-          {this.props.data.type === 0 ? (
+          {/* {this.props.data.type === 0 ? (
             this.props.data.processState >= 5 ? (
               <div style={{ marginTop: "20px" }}>
                 <h3
@@ -358,7 +526,7 @@ class ChangeDetail extends Component {
             </div>
           ) : (
             ""
-          )}
+          )} */}
         </div>
         {this.props.processState === this.props.data.processState ? (
           <div
@@ -372,6 +540,7 @@ class ChangeDetail extends Component {
                   key={index}
                   backData={this.props.data}
                   processState={this.props.processState}
+                  onCancel={this.props.onCancel}
                 />
               );
             })}

+ 4 - 0
js/component/manageCenter/order/orderNew/changeComponent/searchInput.js

@@ -251,6 +251,10 @@ class SearchInput extends Component {
           {
             name: "已审核",
             id: "2"
+          },
+          {
+            name: "退票中",
+            id: "3"
           }
         ],
         getValue: value => {

+ 100 - 4
js/component/manageCenter/order/orderNew/contractCwzj.js

@@ -64,10 +64,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -101,7 +101,14 @@ const contractChange = Form.create()(
         pictureUrl: [],
         voucherUrl: [],
         attachmentUrl: [],
+        //收款数据
+        proceedsData: {},
+        proTotal: 0,
+        invTotal: 0,
         contractData: {},
+        // 回收退票数据
+        refundInvoice: [],
+        RefundInvoice: [],
         additionalOrderData: {},
         paginations: false,
         activeKey: "1",
@@ -188,6 +195,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -367,6 +376,57 @@ const contractChange = Form.create()(
           }
         }.bind(this)
       });
+
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderInvoiceAndBill",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: function(data) {
+          if (!data.data) return;
+          let proTotal = 0;
+          let invTotal = 0;
+          data.data.bill.forEach(item => {
+            proTotal += item.transactionAmount;
+          });
+          data.data.invoice.forEach(item => {
+            invTotal += item.amount;
+          });
+          this.setState({
+            proceedsData: data.data,
+            proTotal,
+            invTotal
+          });
+        }.bind(this)
+      });
+
+
+        $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderRefundInvoice",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: data => {
+          if(!data) return
+          data.data.forEach((item) => {
+            item.load = true
+          })
+          this.setState({
+            refundInvoice: data.data
+          });
+        }
+      });
+
     },
 
     //订单详情
@@ -701,6 +761,32 @@ const contractChange = Form.create()(
       });
     },
 
+    loadDataChange() {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            // console.log("拿到历史", data.data);
+
+            this.setState({
+              dataProps: data.data
+            });
+          }
+        }.bind(this)
+      });
+    },
+
     callback(key) {
       this.setState({
         activeKey: key
@@ -711,6 +797,7 @@ const contractChange = Form.create()(
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
+        this.loadDataChange();
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
@@ -905,6 +992,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -943,10 +1031,17 @@ const contractChange = Form.create()(
                 <TabPane tab="合同变更记录" key="2">
                   <ChangeDetail
                     data={this.state.contractData}
+                    txt={this.state.processStateText}
                     pictureUrl={this.state.voucherUrl}
                     processState={this.props.processState}
                     loadData={this.callback}
                     reset={this.state.visible}
+                    dataSource={this.state.dataProps}
+                    proceedsData={this.state.proceedsData}
+                    proceedsTotal={this.state.proTotal}
+                    invoiceTotal={this.state.invTotal}
+                    contactList={this.state.refundInvoice}
+                    onCancel={this.visitCancel}
                   />
                 </TabPane>
                 {this.state.status === 4 ? (
@@ -1110,6 +1205,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 124 - 4
js/component/manageCenter/order/orderNew/contractCwzy.js

@@ -64,10 +64,7 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText:getProcessStatusNew(thisdata.processState, thisdata.status)
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -101,7 +98,14 @@ const contractChange = Form.create()(
         pictureUrl: [],
         voucherUrl: [],
         attachmentUrl: [],
+        //收款数据
+        proceedsData: {},
+        proTotal: 0,
+        invTotal: 0,
         contractData: {},
+        // 回收退票数据
+        refundInvoice: [],
+        RefundInvoice: [],
         additionalOrderData: {},
         paginations: false,
         activeKey: "1",
@@ -188,6 +192,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -353,6 +359,8 @@ const contractChange = Form.create()(
               userName: this.state.userName,
               contractNo: this.state.contractNo
             });
+            // console.log("888",data);
+            
             this.setState({
               contractData: thisdata,
               voucherUrl: thisdata.voucherUrl
@@ -367,6 +375,56 @@ const contractChange = Form.create()(
           }
         }.bind(this)
       });
+
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderInvoiceAndBill",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: function(data) {
+          if(!data.data) return
+          let proTotal = 0
+          let invTotal = 0
+          data.data.bill.forEach(item => {
+            proTotal += item.transactionAmount;
+          });
+          data.data.invoice.forEach(item => {
+            invTotal += item.amount;
+          });
+          this.setState({
+            proceedsData: data.data,
+            proTotal,
+            invTotal
+          });
+        }.bind(this)
+      });
+
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderRefundInvoice",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: data => {
+          if(!data) return
+          data.data.forEach((item) => {
+            item.load = true
+          })
+          this.setState({
+            refundInvoice: data.data
+          });
+        }
+      });
+
     },
 
     //订单详情
@@ -493,6 +551,31 @@ const contractChange = Form.create()(
       });
     },
 
+    // 查看收款金额
+    getProceeds(id) {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/orderChangeDetailsById",
+        data: {
+          id: id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            // let thisdata = data.data;
+          }
+        }.bind(this)
+      });
+    },
+
+
     search(obj) {
       this.setState(
         {
@@ -700,6 +783,32 @@ const contractChange = Form.create()(
       });
     },
 
+    loadDataChange() {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            // console.log("拿到历史", data);
+
+            this.setState({
+              dataProps: data.data
+            });
+          }
+        }.bind(this)
+      });
+    },
+
     callback(key) {
       this.setState({
         activeKey: key
@@ -710,6 +819,8 @@ const contractChange = Form.create()(
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
+        this.loadDataChange();
+        this.getProceeds(this.state.id);
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
@@ -903,6 +1014,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -941,10 +1053,17 @@ const contractChange = Form.create()(
                 <TabPane tab="合同变更记录" key="2">
                   <ChangeDetail
                     data={this.state.contractData}
+                    txt={this.state.processStateText}
                     pictureUrl={this.state.voucherUrl}
                     processState={this.props.processState}
                     loadData={this.callback}
                     reset={this.state.visible}
+                    dataSource={this.state.dataProps}
+                    proceedsData={this.state.proceedsData}
+                    proceedsTotal={this.state.proTotal}
+                    invoiceTotal={this.state.invTotal}
+                    contactList={this.state.refundInvoice}
+                    onCancel={this.visitCancel}
                   />
                 </TabPane>
                 {this.state.status === 4 ? (
@@ -1108,6 +1227,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 97 - 4
js/component/manageCenter/order/orderNew/contractJsjl.js

@@ -64,10 +64,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -101,7 +101,13 @@ const contractChange = Form.create()(
         pictureUrl: [],
         voucherUrl: [],
         attachmentUrl: [],
+        proceedsData: {},
+        proTotal: 0,
+        invTotal: 0,
         contractData: {},
+        // 回收退票数据
+        refundInvoice: [],
+        RefundInvoice: [],
         additionalOrderData: {},
         paginations: false,
         activeKey: "1",
@@ -188,6 +194,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -367,6 +375,56 @@ const contractChange = Form.create()(
           }
         }.bind(this)
       });
+
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderInvoiceAndBill",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: function(data) {
+          if(!data.data) return
+          let proTotal = 0
+          let invTotal = 0
+          data.data.bill.forEach(item => {
+            proTotal += item.transactionAmount;
+          });
+          data.data.invoice.forEach(item => {
+            invTotal += item.amount;
+          });
+          this.setState({
+            proceedsData: data.data,
+            proTotal,
+            invTotal
+          });
+        }.bind(this)
+      });
+
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderRefundInvoice",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: data => {
+          if(!data) return
+          data.data.forEach((item) => {
+            item.load = true
+          })
+          this.setState({
+            refundInvoice: data.data
+          });
+        }
+      });
+
     },
 
     //订单详情
@@ -700,6 +758,32 @@ const contractChange = Form.create()(
       });
     },
 
+    loadDataChange() {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            // console.log("拿到历史", data.data);
+
+            this.setState({
+              dataProps: data.data
+            });
+          }
+        }.bind(this)
+      });
+    },
+
     callback(key) {
       this.setState({
         activeKey: key
@@ -710,6 +794,7 @@ const contractChange = Form.create()(
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
+        this.loadDataChange();
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
@@ -903,6 +988,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -945,6 +1031,12 @@ const contractChange = Form.create()(
                     processState={this.props.processState}
                     loadData={this.callback}
                     reset={this.state.visible}
+                    dataSource={this.state.dataProps}
+                    proceedsData={this.state.proceedsData}
+                    proceedsTotal={this.state.proTotal}
+                    invoiceTotal={this.state.invTotal}
+                    contactList={this.state.refundInvoice}
+                    onCancel={this.visitCancel}
                   />
                 </TabPane>
                 {this.state.status === 4 ? (
@@ -1108,6 +1200,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 41 - 6
js/component/manageCenter/order/orderNew/contractJsy.js

@@ -64,10 +64,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -197,6 +197,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -348,9 +350,11 @@ const contractChange = Form.create()(
         method: "get",
         dataType: "json",
         crossDomain: false,
-        url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/orderChangeDetailsById",
         data: {
-          orderNo: orderNo
+          id: this.state.id
         },
         success: function(data) {
           if (data.data) {
@@ -707,6 +711,32 @@ const contractChange = Form.create()(
       });
     },
 
+    loadDataChange() {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            // console.log("拿到历史", data.data);
+
+            this.setState({
+              dataProps: data.data
+            });
+          }
+        }.bind(this)
+      });
+    },
+
     callback(key) {
       this.setState({
         activeKey: key
@@ -717,6 +747,7 @@ const contractChange = Form.create()(
       }
       if (key === "2") {
         this.ChangeDetail(this.state.orderNo);
+        this.loadDataChange();
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
@@ -911,6 +942,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -954,6 +986,8 @@ const contractChange = Form.create()(
                     processState={this.props.processState}
                     loadData={this.callback}
                     reset={this.state.visible}
+                    dataSource={this.state.dataProps}
+                    onCancel={this.visitCancel}
                   />
                 </TabPane>
                 {this.state.status === 4 ? (
@@ -1119,6 +1153,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 97 - 4
js/component/manageCenter/order/orderNew/contractJszj.js

@@ -64,10 +64,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -101,7 +101,13 @@ const contractChange = Form.create()(
         pictureUrl: [],
         voucherUrl: [],
         attachmentUrl: [],
+        proceedsData: {},
+        proTotal: 0,
+        invTotal: 0,
         contractData: {},
+        // 回收退票数据
+        refundInvoice: [],
+        RefundInvoice: [],
         additionalOrderData: {},
         paginations: false,
         activeKey: "1",
@@ -188,6 +194,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -367,6 +375,56 @@ const contractChange = Form.create()(
           }
         }.bind(this)
       });
+
+        $.ajax({
+          method: "get",
+          dataType: "json",
+          crossDomain: false,
+          url:
+            globalConfig.context +
+            "/api/admin/orderChange/listOrderInvoiceAndBill",
+          data: {
+            orderNo: this.state.orderNo
+          },
+          success: function(data) {
+            if (!data.data) return;
+            let proTotal = 0;
+            let invTotal = 0;
+            data.data.bill.forEach(item => {
+              proTotal += item.transactionAmount;
+            });
+            data.data.invoice.forEach(item => {
+              invTotal += item.amount;
+            });
+            this.setState({
+              proceedsData: data.data,
+              proTotal,
+              invTotal
+            });
+          }.bind(this)
+        });
+
+        $.ajax({
+          method: "get",
+          dataType: "json",
+          crossDomain: false,
+          url:
+            globalConfig.context +
+            "/api/admin/orderChange/listOrderRefundInvoice",
+          data: {
+            orderNo: this.state.orderNo
+          },
+          success: data => {
+            if (!data) return;
+            data.data.forEach(item => {
+              item.load = true;
+            });
+            this.setState({
+              refundInvoice: data.data
+            });
+          }
+        });
+
     },
 
     //订单详情
@@ -700,6 +758,32 @@ const contractChange = Form.create()(
       });
     },
 
+    loadDataChange() {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            // console.log("拿到历史", data.data);
+
+            this.setState({
+              dataProps: data.data
+            });
+          }
+        }.bind(this)
+      });
+    },
+
     callback(key) {
       this.setState({
         activeKey: key
@@ -710,6 +794,7 @@ const contractChange = Form.create()(
       }
       if (key === "2") {
         this.ChangeDetail(this.state.id);
+        this.loadDataChange();
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
@@ -903,6 +988,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -945,6 +1031,12 @@ const contractChange = Form.create()(
                     processState={this.props.processState}
                     loadData={this.callback}
                     reset={this.state.visible}
+                    dataSource={this.state.dataProps}
+                    proceedsData={this.state.proceedsData}
+                    proceedsTotal={this.state.proTotal}
+                    invoiceTotal={this.state.invTotal}
+                    contactList={this.state.refundInvoice}
+                    onCancel={this.visitCancel}
                   />
                 </TabPane>
                 {this.state.status === 4 ? (
@@ -1108,6 +1200,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 101 - 8
js/component/manageCenter/order/orderNew/contractYxgly.js

@@ -64,10 +64,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -103,6 +103,7 @@ const contractChange = Form.create()(
         attachmentUrl: [],
         contractData: {},
         additionalOrderData: {},
+        proceedsData: [],
         paginations: false,
         activeKey: "1",
         confirmLoading: false,
@@ -188,6 +189,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -339,9 +342,9 @@ const contractChange = Form.create()(
         method: "get",
         dataType: "json",
         crossDomain: false,
-        url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeDetailsById",
         data: {
-          orderNo: orderNo
+          id: this.state.id
         },
         success: function(data) {
           if (data.data) {
@@ -365,6 +368,56 @@ const contractChange = Form.create()(
           }
         }.bind(this)
       });
+
+        $.ajax({
+          method: "get",
+          dataType: "json",
+          crossDomain: false,
+          url:
+            globalConfig.context +
+            "/api/admin/orderChange/listOrderInvoiceAndBill",
+          data: {
+            orderNo: this.state.orderNo
+          },
+          success: function(data) {
+            if (!data.data) return;
+            let proTotal = 0;
+            let invTotal = 0;
+            data.data.bill.forEach(item => {
+              proTotal += item.transactionAmount;
+            });
+            data.data.invoice.forEach(item => {
+              invTotal += item.amount;
+            });
+            this.setState({
+              proceedsData: data.data,
+              proTotal,
+              invTotal
+            });
+          }.bind(this)
+        });
+
+        $.ajax({
+          method: "get",
+          dataType: "json",
+          crossDomain: false,
+          url:
+            globalConfig.context +
+            "/api/admin/orderChange/listOrderRefundInvoice",
+          data: {
+            orderNo: this.state.orderNo
+          },
+          success: data => {
+            if (!data) return;
+            data.data.forEach(item => {
+              item.load = true;
+            });
+            this.setState({
+              refundInvoice: data.data
+            });
+          }
+        });
+
     },
 
     //订单详情
@@ -698,6 +751,39 @@ const contractChange = Form.create()(
       });
     },
 
+    // componentDidMount(){
+    //   window.setTimeout(() => {
+    //     console.log(this.state.dataProps);
+      
+    //   },100)
+    // },
+
+    loadDataChange() {
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        async: false,
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+        data: {
+          changeId: this.state.id
+        },
+        success: function(data) {
+          if (data.error.length || data.data.list == "") {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+          } else {
+            console.log("拿到历史", data.data);
+
+            this.setState({
+              dataProps: data.data,
+            });
+          }
+        }.bind(this)
+      });
+    },
+
     callback(key) {
       this.setState({
         activeKey: key
@@ -708,6 +794,7 @@ const contractChange = Form.create()(
       }
       if (key === "2") {
         this.ChangeDetail(this.state.orderNo);
+        this.loadDataChange();
       }
       if (key === "3") {
         this.primaryOrder(this.state.primaryOrderNo);
@@ -902,6 +989,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -942,8 +1030,12 @@ const contractChange = Form.create()(
                     data={this.state.contractData}
                     pictureUrl={this.state.voucherUrl}
                     processState={this.props.processState}
-                    loadData={this.callback}
-                    reset={this.state.visible}
+                    dataSource={this.state.dataProps}
+                    proceedsData={this.state.proceedsData}
+                    proceedsTotal={this.state.proTotal}
+                    invoiceTotal={this.state.invTotal}
+                    contactList={this.state.refundInvoice}
+                    onCancel={this.visitCancel}
                   />
                 </TabPane>
                 {this.state.status === 4 ? (
@@ -1107,6 +1199,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 97 - 6
js/component/manageCenter/order/orderNew/contractYxy.js

@@ -1,5 +1,5 @@
 import React from "react";
-import { Button, Input, Spin, Table, message, Form, Modal, Tabs } from "antd";
+import { Button, Input, Spin, Table, message, Form, Modal, Tabs, } from "antd";
 import $ from "jquery/src/ajax";
 import {
   getNewOrderStatus,
@@ -67,10 +67,10 @@ const contractChange = Form.create()(
                 type: thisdata.type,
                 status: thisdata.status,
                 id: thisdata.id,
-                processStateText:
-                  thisdata.status !== 4
-                    ? getProcessStatusNew(thisdata.processState) + "审核中"
-                    : getProcessStatusNew(thisdata.processState) + "已完成"
+                processStateText: getProcessStatusNew(
+                  thisdata.processState,
+                  thisdata.status
+                )
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -105,7 +105,13 @@ const contractChange = Form.create()(
         voucherUrl: [],
         buttonStatusA: true,
         attachmentUrl: [],
+        proceedsData: {},
+        proTotal: 0,
+        invTotal: 0,
         contractData: {},
+        // 回收退票数据
+        refundInvoice: [],
+        RefundInvoice: [],
         paginations: false,
         activeKey: "1",
         confirmLoading: false,
@@ -191,6 +197,8 @@ const contractChange = Form.create()(
           }
         ],
         dataSource: [],
+        // 传递给子组件的
+        dataProps: [],
         columnsX: [
           {
             title: "业务项目名称",
@@ -370,6 +378,56 @@ const contractChange = Form.create()(
           }
         }.bind(this)
       });
+
+
+        $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderInvoiceAndBill",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: function(data) {
+          if(!data.data) return
+          let proTotal = 0
+          let invTotal = 0
+          data.data.bill.forEach(item => {
+            proTotal += item.transactionAmount;
+          });
+          data.data.invoice.forEach(item => {
+            invTotal += item.amount;
+          });
+          this.setState({
+            proceedsData: data.data,
+            proTotal,
+            invTotal
+          });
+        }.bind(this)
+      });
+
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url:
+          globalConfig.context +
+          "/api/admin/orderChange/listOrderRefundInvoice",
+        data: {
+          orderNo: this.state.orderNo
+        },
+        success: data => {
+          if(!data) return
+          data.data.forEach((item) => {
+            item.load = true
+          })
+          this.setState({
+            refundInvoice: data.data
+          });
+        }
+      });
     },
 
     //订单详情
@@ -711,6 +769,31 @@ const contractChange = Form.create()(
       });
     },
 
+    loadDataChange() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      async: false,
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
+      data: {
+        changeId: this.state.id
+      },
+      success: function(data) {
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          
+          this.setState({
+            dataProps: data.data
+          });
+        }
+      }.bind(this)
+    });
+  },
+
     callback(key) {
       this.setState(
         {
@@ -719,6 +802,7 @@ const contractChange = Form.create()(
         () => {
           if (key === "2") {
             this.ChangeDetail(this.state.id);
+            this.loadDataChange();
           }
         }
       );
@@ -920,6 +1004,7 @@ const contractChange = Form.create()(
             <div className="patent-table">
               <Spin spinning={this.state.loading}>
                 <Table
+                  bordered
                   columns={this.state.columns}
                   dataSource={this.state.dataSource}
                   pagination={this.state.pagination}
@@ -974,13 +1059,18 @@ const contractChange = Form.create()(
                     <ChangeApply
                       orderData={this.state.contractData}
                       voucherUrl={this.state.voucherUrl}
-                      visitCancel={this.visitCancel}
+                      onCancel={this.visitCancel}
                     />
                   ) : (
                     <ChangeDetail
                       data={this.state.contractData}
                       pictureUrl={this.state.voucherUrl}
                       processState={this.props.processState}
+                      dataSource={this.state.dataProps}
+                      proceedsData={this.state.proceedsData}
+                      proceedsTotal={this.state.proTotal}
+                      invoiceTotal={this.state.invTotal}
+                      contactList={this.state.refundInvoice}
                     />
                   )}
                 </TabPane>
@@ -1147,6 +1237,7 @@ const contractChange = Form.create()(
               <div className="patent-table">
                 <Spin spinning={this.state.loading}>
                   <Table
+                    bordered
                     columns={this.state.columnsrizhi}
                     dataSource={this.state.dataSourcerizhi}
                     pagination={false}

+ 1 - 1
js/component/manageCenter/project/project/outsourceTaskAssignment.jsx

@@ -556,7 +556,7 @@ const OutsourceTaskAssignment = React.createClass({
           showDesc={this.state.assignVisible}
           closeDesc={this.closeAssign.bind(this)}
           fenpaiData={8}
-          specially={0}
+          specially={this.state.nub == "咨询师经理" ? 1 : 0}
           roleName={this.state.nub}
           requestMethod={"post"}
         />

+ 15 - 2
js/component/manageCenter/project/task/myTask.jsx

@@ -112,6 +112,8 @@ const Task = React.createClass({
       searchMore: true,
       assignVisible: false,
       releaseDate: [],
+      // 判断是否是退回给咨询师经理
+      flag: false,
       roleName: "",
       testFlag: true,
       boHuivisible: false,
@@ -214,6 +216,14 @@ const Task = React.createClass({
                 >
                   添加工时
                 </Button>
+                <Button
+                  type="primary"
+                  onClick={e => {
+                    e.stopPropagation(), this.evaluate(record, "咨询师经理",true);
+                  }}
+                >
+                  回退
+                </Button>
               </div>
             );
           }
@@ -398,11 +408,12 @@ const Task = React.createClass({
     };
   },
   /* 分派 */
-  evaluate(record, nub) {
+  evaluate(record, nub, flag) {
     this.setState(
       {
         nub: nub,
-        assignData: record
+        assignData: record,
+        flag
       },
       () => {
         this.setState({
@@ -1146,6 +1157,8 @@ const Task = React.createClass({
           specially={0}
           roleName={this.state.nub}
           requestMethod={"post"}
+          flag={this.state.flag}
+          all={this.state}
         />
         <Modal
           className="customeDetails"

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

@@ -115,6 +115,8 @@ const MyTaskOutsource = React.createClass({
       searchMore: true,
       assignVisible: false,
       releaseDate: [],
+      // 判断是否是退回给咨询师经理
+      flag: false,
       roleName: "",
       modKey: "1",
       testFlag: true,
@@ -224,6 +226,15 @@ const MyTaskOutsource = React.createClass({
                 >
                   添加工时
                 </Button>
+                <Button
+                  type="primary"
+                  onClick={e => {
+                    e.stopPropagation(),
+                      this.evaluate(record, "咨询师经理", true);
+                  }}
+                >
+                  回退
+                </Button>
               </div>
             );
           }
@@ -488,11 +499,13 @@ const MyTaskOutsource = React.createClass({
     };
   },
   /* 分派 */
-  evaluate(record, nub) {
+  evaluate(record, nub, flag) {
     this.state.assignData = record;
     this.setState(
       {
-        nub
+        nub,
+        assignData: record,
+        flag
       },
       () => {
         this.setState({
@@ -1428,6 +1441,7 @@ const MyTaskOutsource = React.createClass({
           specially={0}
           roleName={this.state.nub}
           requestMethod={"post"}
+          flag={this.state.flag}
         />
         <Modal
           className="customeDetails"

+ 3 - 1
js/component/manageCenter/project/task/taskAssignment.jsx

@@ -555,7 +555,9 @@ const Task = React.createClass({
           showDesc={this.state.assignVisible}
           closeDesc={this.closeAssign.bind(this)}
           fenpaiData={8}
-          specially={0}
+          specially={this.state.nub == "咨询师经理" ? 1 : 0}
+          // 判断是转交按钮还是分配任务按钮
+          // chooseBtn={this.state.nub == "咨询师经理" ? true : false}
           roleName={this.state.nub}
           requestMethod={"post"}
         />

+ 13 - 1
js/component/manageCenter/publicComponent/assign.jsx

@@ -211,6 +211,15 @@ const Assign=React.createClass({
 	/* 区分分派和两种转交 */
 	judge(props,record){
 		if (props.fenpaiData===8) {
+            if(props.flag === true) {
+                return {
+                  taskId: props.data.id, //任务ID
+                  taskReceiverId: this.state.contact
+                    ? record.id
+                    : record.contactId, //分配人物ID
+                  specially: 2 //退给咨询师经理
+                };
+            }
 			return {
             	taskId:props.data.id,//任务ID
             	taskReceiverId:this.state.contact?record.id:record.contactId,//分配人物ID
@@ -242,7 +251,8 @@ const Assign=React.createClass({
     	});
     },
     //初始加载组件,和主页面一起加载
-    componentWillMount() {
+    componentDidMount() {
+        
         
     },
     //组件调用初始加载函数,可用条件控制,在调用组件时可以拿到参数
@@ -258,6 +268,8 @@ const Assign=React.createClass({
         this.setState({
             contact:0
         })
+        // console.log("kan", this.props.specially);
+        // console.log("kan22", this.state);
     },
     render() {
         let departmentArr = this.state.departmentArr || [];

+ 5 - 5
js/component/manageCenter/set/userManagementS/newRole.jsx

@@ -55,11 +55,11 @@ const Newrole = Form.create()(React.createClass({
 				this.setState({
 					loading: true
 				});
-				if(selectAllId){
-					if(selectAllId[0]==null){
-						selectAllId.splice(0,1)
-					}
-				}
+				// if(selectAllId){
+				// 	if(selectAllId[0]==null){
+				// 		selectAllId.splice(0,1)
+				// 	}
+				// }
 				$.ajax({
 					method: "POST",
 					dataType: "json",

文件差異過大導致無法顯示
+ 1805 - 1634
js/component/tools.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.1.17",
+  "version": "1.1.18",
   "description": "",
   "main": "index.js",
   "scripts": {

文件差異過大導致無法顯示
+ 7458 - 0
yarn.lock