Browse Source

5-15updata

mentoswzq 4 years ago
parent
commit
176948be6b
29 changed files with 6506 additions and 3318 deletions
  1. 55 1
      js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx
  2. 107 92
      js/component/manageCenter/customer/NEW/publicCustomer/publicCustomer.jsx
  3. 117 0
      js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx
  4. 327 210
      js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx
  5. 318 125
      js/component/manageCenter/financialManage/distribute/outOutsourcingList.jsx
  6. 343 151
      js/component/manageCenter/financialManage/distribute/outsourcingPaiDan.jsx
  7. 232 3
      js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx
  8. 7 0
      js/component/manageCenter/operate/personnel/personnelAll.jsx
  9. 616 365
      js/component/manageCenter/order/orderNew/addService.jsx
  10. 568 339
      js/component/manageCenter/order/orderNew/addorders.js
  11. 418 314
      js/component/manageCenter/order/orderNew/approveds.jsx
  12. 1 0
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwjl.js
  13. 1 0
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzj.js
  14. 1 0
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js
  15. 126 76
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsjl.js
  16. 121 62
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsy.js
  17. 126 74
      js/component/manageCenter/order/orderNew/changeComponent/changeDetailJszj.js
  18. 160 10
      js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js
  19. 2 3
      js/component/manageCenter/order/orderNew/changeComponent/picturesWall.js
  20. 335 141
      js/component/manageCenter/order/orderNew/chargeback.jsx
  21. 362 170
      js/component/manageCenter/order/orderNew/checkOutsourcing.jsx
  22. 27 16
      js/component/manageCenter/order/orderNew/contractCwjl.js
  23. 419 229
      js/component/manageCenter/order/orderNew/examine.jsx
  24. 555 365
      js/component/manageCenter/order/orderNew/inquiry.jsx
  25. 380 188
      js/component/manageCenter/order/orderNew/outsourcingList.jsx
  26. 293 99
      js/component/manageCenter/order/orderNew/outsourcingPro.jsx
  27. 269 257
      js/component/manageCenter/order/orderNew/reject.jsx
  28. 200 13
      js/component/manageCenter/project/project/projectQuery.jsx
  29. 20 15
      js/component/manageCenter/statistics/personnel/personnelAll.jsx

+ 55 - 1
js/component/manageCenter/customer/NEW/intentionCustomer/intentionCustomer.jsx

@@ -587,6 +587,51 @@ const IntentionCustomer = Form.create()(
         onCancel() {},
       });
     },
+    showConfirms(fn, record) {
+      Modal.confirm({
+        title: "您确定将当前客户移至公共客户吗?",
+        content: (
+          <span style={{ color: "red" }}>移除后,此客户将被别人领取!</span>
+        ),
+        onOk() {
+          fn(record);
+        },
+        onCancel() {},
+      });
+    },
+    release() {
+      this.setState({
+        loading: true
+      })
+      $.ajax({
+        method: "get",
+        dataType: "json",
+        crossDomain: false,
+        url: globalConfig.context + "/api/admin/customer/pushReleaseUser",
+        data: {
+          id: this.state.selectedRows[0].id,
+        },
+        success: function (data) {
+          let thedata = data.data;
+          if (!thedata) {
+            if (data.error && data.error.length) {
+              message.warning(data.error[0].message);
+            }
+            thedata = {};
+          }else {
+            message.success("移除成功");
+            this.loadData()
+          }
+          
+        }.bind(this),
+      }).always(
+        function () {
+          this.setState({
+            loading: false,
+          });
+        }.bind(this)
+      );
+    },
     render() {
       const FormItem = Form.Item;
       const rowSelection = {
@@ -807,7 +852,16 @@ const IntentionCustomer = Form.create()(
                 >
                   转交记录
                 </Button>
-                {/* </div> */}
+                <Button
+                  style={{ marginLeft: 10 }}
+                  onClick={(e) => {
+                    e.stopPropagation(), this.showConfirms(this.release);
+                  }}
+                  type="primary"
+                  disabled={!hasSelected}
+                >
+                  移除客户
+                </Button>
               </TabPane>
             </Tabs>
           </div>

+ 107 - 92
js/component/manageCenter/customer/NEW/publicCustomer/publicCustomer.jsx

@@ -14,59 +14,71 @@ const QueryCustomer = React.createClass({
 		});
 		let api=apiUrl?apiUrl:this.props.ApiUrl;
 		$.ajax({
-			method: "post",
-			dataType: "json",
-			crossDomain: false,
-			url: globalConfig.context + api,
-			data: {
-				pageNo: pageNo || 1,
-				pageSize: this.state.pagination.pageSize,
-				name: this.state.nameSearch,
-				province: !(this.state.addressSearch).length ? this.state.provinceSearch : this.state.addressSearch[0],
-				city: !(this.state.addressSearch).length ? '' : this.state.addressSearch[1],
-			},
-			success: function(data) {
-				ShowModal(this);
-				let theArr = [];
-				if(data.error.length || data.data.list == "") {
-					if(data.error && data.error.length) {
-						message.warning(data.error[0].message);
-					};
-				} else {
-					for(let i = 0; i < data.data.list.length; i++) {
-						let thisdata = data.data.list[i];
-						theArr.push({
-							key: i,
-							id: thisdata.uid,
-							name: thisdata.name,
-							contacts: thisdata.contacts,
-							contactMobile: thisdata.contactMobile,
-							createTime:thisdata.createTime&&thisdata.createTime.split(' ')[0],
-							transferTime:thisdata.transferTime&&thisdata.transferTime.split(' ')[0],
-							locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city + '-' + thisdata.area : '--'
-						});
-					};
-					this.state.pagination.current = data.data.pageNo;
-				    this.state.pagination.total = data.data.totalCount;
-				};
-				if(data.data&&data.data.list&&!data.data.list.length){
-					this.state.pagination.current=0;
-					this.state.pagination.total=0;
-				}
-				this.setState({
-					dataSource: theArr,
-					pagination: this.state.pagination,
-					selectedRowKeys:[]
-				});
-			}.bind(this),
-		}).always(function() {
-			this.setState({
-				loading: false
-			});
-		}.bind(this));
+      method: "post",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + api,
+      data: {
+        pageNo: pageNo || 1,
+        pageSize: this.state.pagination.pageSize,
+        name: this.state.nameSearch,
+        province: !this.state.addressSearch.length
+          ? this.state.provinceSearch
+          : this.state.addressSearch[0],
+        city: !this.state.addressSearch.length
+          ? ""
+          : this.state.addressSearch[1],
+        sort: this.state.sort
+      },
+      success: function (data) {
+        ShowModal(this);
+        let theArr = [];
+        if (data.error.length || data.data.list == "") {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          for (let i = 0; i < data.data.list.length; i++) {
+            let thisdata = data.data.list[i];
+            theArr.push({
+              key: i,
+              id: thisdata.uid,
+              name: thisdata.name,
+              contacts: thisdata.contacts,
+              contactMobile: thisdata.contactMobile,
+              createTime:
+                thisdata.createTime && thisdata.createTime.split(" ")[0],
+              transferTime:
+                thisdata.transferTime && thisdata.transferTime.split(" ")[0],
+              locationProvince: thisdata.province
+                ? thisdata.province + "-" + thisdata.city + "-" + thisdata.area
+                : "--",
+            });
+          }
+          this.state.pagination.current = data.data.pageNo;
+          this.state.pagination.total = data.data.totalCount;
+        }
+        if (data.data && data.data.list && !data.data.list.length) {
+          this.state.pagination.current = 0;
+          this.state.pagination.total = 0;
+        }
+        this.setState({
+          dataSource: theArr,
+          pagination: this.state.pagination,
+          selectedRowKeys: [],
+        });
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
 	},
 	getInitialState(){
 		return {
+			sort: 0,
 			addressSearch: [],
 			dataSource:[],
 			loading:false,
@@ -161,6 +173,7 @@ const QueryCustomer = React.createClass({
 		this.state.nameSearch='';
 		this.state.provinceSearch=undefined;
 		this.state.addressSearch=[];
+		this.state.sort = 0
 		this.loadData()
 	},
 	componentWillReceiveProps(nextProps) {
@@ -209,48 +222,50 @@ const QueryCustomer = React.createClass({
         <div className="content-title">
           <span>{!intentionState ? "单位公共客户" : "个人公共客户"}</span>
         </div>
-		<Tabs
-          defaultActiveKey="1"
-          onChange={this.callback}
-          className="test">
-             <TabPane tab="搜索" key="1">
-        	<div className="user-search">
-          <Input
-            placeholder="客户名称"
-			value={this.state.nameSearch}
-			style={{width:150}}
-            onChange={e => {
-              this.setState({ nameSearch: e.target.value });
-            }}
-          />
-          <Select
-            placeholder="省"
-            style={{ width: 80 }}
-            value={this.state.provinceSearch}
-            onChange={e => {
-              this.setState({ provinceSearch: e });
-            }}
-          >
-            {this.state.Provinces}
-          </Select>
-          <span style={{ marginRight: "10px" }}>
-            <Cascader
-              options={citySelect()}
-              value={this.state.addressSearch}
-              placeholder="选择城市"
-              onChange={(e, pre) => {
-                this.setState({ addressSearch: e });
-              }}
-            />
-          </span>
-          <Button type="primary" onClick={this.search}>
-            搜索
-          </Button>
-          <Button onClick={this.reset}>重置</Button>
-
-        </div>
-		</TabPane>
-		</Tabs>
+        <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
+          <TabPane tab="搜索" key="1">
+            <div className="user-search">
+              <Input
+                placeholder="客户名称"
+                value={this.state.nameSearch}
+                style={{ width: 150 }}
+                onChange={(e) => {
+                  this.setState({ nameSearch: e.target.value });
+                }}
+              />
+              <Select
+                placeholder="省"
+                style={{ width: 80 }}
+                value={this.state.provinceSearch}
+                onChange={(e) => {
+                  this.setState({ provinceSearch: e });
+                }}
+              >
+                {this.state.Provinces}
+              </Select>
+              <span style={{ marginRight: "10px" }}>
+                <Cascader
+                  options={citySelect()}
+                  value={this.state.addressSearch}
+                  placeholder="选择城市"
+                  onChange={(e, pre) => {
+                    this.setState({ addressSearch: e });
+                  }}
+                />
+              </span>
+			  <span>排序:</span>
+              <Select style={{ width: 120 }} value={this.state.sort} onChange={e => {this.setState({sort: e})}} placeholder="选择排序">
+                <Option value={0}>默认</Option>
+                <Option value={1}>降序</Option>
+                <Option value={2}>升序</Option>
+              </Select>
+              <Button type="primary" onClick={this.search}>
+                搜索
+              </Button>
+              <Button onClick={this.reset}>重置</Button>
+            </div>
+          </TabPane>
+        </Tabs>
         <div className="patent-table">
           <Spin spinning={this.state.loading}>
             <Table

+ 117 - 0
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -1789,6 +1789,13 @@ const approvedOutsourcing = React.createClass({
                 globalConfig.avatarHost + "/upload"
               )
             : [],
+          replenishUrl: thisData.agreementUrl
+            ? splitUrl(
+                thisData.agreementUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+            : [],
           orderNo: thisData.orderNo, //订单编号
           buyerId: thisData.buyerId,
           depName: thisData.depName,
@@ -2191,6 +2198,44 @@ const approvedOutsourcing = React.createClass({
       rotateDeg,
     });
   },
+  downImgs() {
+    let num = 0;
+    for (let i = 0; i < this.state.replenishUrl.length; i++) {
+      if (this.state.replenishUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.state.replenishUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.state.replenishUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  upImgs() {
+    let num = 0;
+    for (let i = 0; i < this.state.replenishUrl.length; i++) {
+      if (this.state.replenishUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.state.replenishUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  rotates() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
+    });
+  },
   timeData() {
     this.setState({
       loading: true,
@@ -3130,6 +3175,7 @@ const approvedOutsourcing = React.createClass({
                         <Modal
                           maskClosable={false}
                           footer={null}
+                          width={"70%"}
                           visible={this.state.previewVisible}
                           onCancel={() => {
                             this.setState({
@@ -3190,6 +3236,76 @@ const approvedOutsourcing = React.createClass({
                           查看订单日志
                         </Button>
                       </FormItem>
+                      <FormItem
+                        labelCol={{ span: 5 }}
+                        wrapperCol={{ span: 18 }}
+                        label="补充协议"
+                      >
+                        <Upload
+                          className="demandDetailShow-upload"
+                          listType="picture-card"
+                          fileList={this.state.replenishUrl}
+                          onPreview={(file) => {
+                            this.setState({
+                              previewImage: file.url || file.thumbUrl,
+                              previewVisible: true,
+                            });
+                          }}
+                        ></Upload>
+                        <Modal
+                          maskClosable={false}
+                          footer={null}
+                          width={"70%"}
+                          visible={this.state.previewVisible}
+                          onCancel={() => {
+                            this.setState({
+                              previewVisible: false,
+                              rotateDeg: 0,
+                            });
+                          }}
+                        >
+                          <img
+                            alt=""
+                            style={{
+                              width: "100%",
+                              transform: `rotate(${this.state.rotateDeg}deg)`,
+                            }}
+                            src={this.state.previewImage || ""}
+                          />
+                          <Button
+                            onClick={this.rotates}
+                            style={{
+                              position: "relative",
+                              left: "50%",
+                              transform: "translateX(-50%)",
+                            }}
+                          >
+                            旋转
+                          </Button>
+                          <Button
+                            onClick={this.upImgs}
+                            style={{
+                              position: "absolute",
+                              left: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            上一张
+                          </Button>
+                          <Button
+                            onClick={this.downImgs}
+                            style={{
+                              position: "absolute",
+                              right: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            下一张
+                          </Button>
+                        </Modal>
+                      </FormItem>
                     </div>
                     <div className="clearfix">
                       <FormItem
@@ -3486,6 +3602,7 @@ const approvedOutsourcing = React.createClass({
                     <Modal
                       maskClosable={false}
                       footer={null}
+                      width={"70%"}
                       visible={this.state.previewVisible}
                       onCancel={() => {
                         this.setState({ previewVisible: false });

File diff suppressed because it is too large
+ 327 - 210
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx


+ 318 - 125
js/component/manageCenter/financialManage/distribute/outOutsourcingList.jsx

@@ -34,7 +34,7 @@ const outsourcingPaiDan = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -49,9 +49,9 @@ const outsourcingPaiDan = React.createClass({
         startTime: this.state.releaseDate[0],
         endTime: this.state.releaseDate[1],
         processStatus: this.state.processStatus,
-        outsource: 1
+        outsource: 1,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -76,7 +76,7 @@ const outsourcingPaiDan = React.createClass({
               contractNo: thisdata.contractNo,
               financeId: thisdata.financeId,
               departmentName: thisdata.departmentName,
-              outsourceName: thisdata.outsourceName
+              outsourceName: thisdata.outsourceName,
             });
           }
         }
@@ -87,19 +87,20 @@ const outsourcingPaiDan = React.createClass({
         this.setState({
           totalPage: data.data.totalPage,
           dataSource: theArr,
-          pagination: this.state.pagination
+          pagination: this.state.pagination,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
   },
   getInitialState() {
     return {
+      rotateDeg: 0,
       searchMore: true,
       assignVisible: false,
       releaseDate: [],
@@ -115,83 +116,83 @@ const outsourcingPaiDan = React.createClass({
         defaultPageSize: 10,
         showQuickJumper: true,
         pageSize: 10,
-        onChange: function(page) {
+        onChange: function (page) {
           this.loadData(page);
         }.bind(this),
-        showTotal: function(total) {
+        showTotal: function (total) {
           return "共" + total + "条数据";
-        }
+        },
       },
       columns: [
         {
           title: "订单编号",
           dataIndex: "orderNo",
-          key: "orderNo"
+          key: "orderNo",
         },
         {
           title: "合同编号",
           dataIndex: "contractNo",
-          key: "contractNo"
+          key: "contractNo",
         },
         {
           title: "下单时间",
           dataIndex: "createTime",
-          key: "createTime"
+          key: "createTime",
         },
         {
           title: "签单时间",
           dataIndex: "signTime",
-          key: "signTime"
+          key: "signTime",
         },
         {
           title: "签单客户",
           dataIndex: "buyerName",
           key: "buyerName",
-          render: text => {
+          render: (text) => {
             return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
-          }
+          },
         },
         {
           title: "外包公司",
           dataIndex: "outsourceName",
           key: "outsourceName",
-          render: text => {
+          render: (text) => {
             return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
-          }
+          },
         },
         {
           title: "流程状态",
           dataIndex: "processStatus",
           key: "processStatus",
-          render: text => {
+          render: (text) => {
             return getProcessStatus(text);
-          }
+          },
         },
         {
           title: "订单部门",
           dataIndex: "departmentName",
           key: "departmentName",
-          render: text => {
+          render: (text) => {
             return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
-          }
+          },
         },
         {
           title: "订单总金额(万)",
           dataIndex: "signTotalAmount",
-          key: "signTotalAmount"
+          key: "signTotalAmount",
         },
         {
           title: "是否特批",
           dataIndex: "approval",
           key: "approval",
-          render: text => {
+          render: (text) => {
             return getApproval(text);
-          }
+          },
         },
         {
           title: "订单负责人",
           dataIndex: "sellerName",
-          key: "sellerName"
+          key: "sellerName",
         },
         {
           title: "操作",
@@ -199,26 +200,26 @@ const outsourcingPaiDan = React.createClass({
           key: "caouzo",
           render: (text, recard) => {
             return <div>{this.judgeFenpai(recard)}</div>;
-          }
-        }
+          },
+        },
       ],
       columnsX: [
         {
           title: "业务项目名称",
           dataIndex: "commodityName",
           key: "commodityName",
-          render: text => {
+          render: (text) => {
             return text && text.length > 6 ? (
               <span title={text}>{text.substr(0, 8)}...</span>
             ) : (
               text
             );
-          }
+          },
         },
         {
           title: "项目类别",
           dataIndex: "cname",
-          key: "cname"
+          key: "cname",
         },
         {
           title: "项目数量",
@@ -231,7 +232,7 @@ const outsourcingPaiDan = React.createClass({
                   {text}{" "}
                   <Tag
                     color="#108ee9"
-                    onClick={e => {
+                    onClick={(e) => {
                       e.stopPropagation();
                       this.showRes(record);
                     }}
@@ -243,85 +244,85 @@ const outsourcingPaiDan = React.createClass({
             } else {
               return text;
             }
-          }
+          },
         },
         {
           title: "服务市价(万元)",
           dataIndex: "commodityPrice",
-          key: "commodityPrice"
+          key: "commodityPrice",
         },
         {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",
-          render: text => {
+          render: (text) => {
             return getProjectStatus(text);
-          }
+          },
         },
         {
           title: "证书编号",
           dataIndex: "certificateNumber",
-          key: "certificateNumber"
+          key: "certificateNumber",
         },
         {
           title: "是否主要项目",
           dataIndex: "main",
           key: "main",
-          render: text => {
+          render: (text) => {
             return text ? "是" : "否";
-          }
+          },
         },
         {
           title: "项目说明",
           dataIndex: "taskComment",
           key: "taskComment",
-          render: text => {
+          render: (text) => {
             return text && text.length > 8 ? (
               <span title={text}>{text.substr(0, 8)}...</span>
             ) : (
               text
             );
-          }
-        }
+          },
+        },
       ],
       columnsY: [
         {
           title: "流程",
           dataIndex: "processName",
-          key: "processName"
+          key: "processName",
         },
         {
           title: "操作人",
           dataIndex: "adminName",
-          key: "adminName"
+          key: "adminName",
         },
         {
           title: "时间",
           dataIndex: "createDate",
-          key: "createDate"
-        }
+          key: "createDate",
+        },
       ],
       columnsW: [
         {
           title: "外包名称",
           dataIndex: "name",
-          key: "name"
+          key: "name",
         },
         {
           title: "联系人",
           dataIndex: "contacts",
-          key: "contacts"
+          key: "contacts",
         },
         {
           title: "联系人电话",
           dataIndex: "contactsMobile",
-          key: "contactsMobile"
+          key: "contactsMobile",
         },
         {
           title: "地址",
           dataIndex: "ProvinceCity",
           key: "ProvinceCity",
-          render: test => {
+          render: (test) => {
             return test[0] === null
               ? ""
               : getprovince(test[0]) +
@@ -329,42 +330,42 @@ const outsourcingPaiDan = React.createClass({
                   getprovince(test[1]) +
                   "/" +
                   getprovince(test[2]);
-          }
+          },
         },
         {
           title: "地址详情",
           dataIndex: "address",
           key: "address",
-          render: text => {
+          render: (text) => {
             return text && text.length > 8 ? text.substr(0, 8) + "..." : text;
-          }
+          },
         },
         {
           title: "创建时间",
           dataIndex: "createTimes",
-          key: "createTimes"
+          key: "createTimes",
         },
         {
           title: "任务名称",
           dataIndex: "tname",
-          key: "tname"
+          key: "tname",
         },
         {
           title: "合同编号",
           dataIndex: "contractNo",
-          key: "contractNo"
+          key: "contractNo",
         },
         {
           title: "项目状态",
           dataIndex: "projectStatus",
           key: "projectStatus",
-          render: text => {
+          render: (text) => {
             return getProjectStatus(text);
-          }
-        }
+          },
+        },
       ],
       dataSource: [],
-      searchTime: [,]
+      searchTime: [,],
     };
   },
 
@@ -375,7 +376,7 @@ const outsourcingPaiDan = React.createClass({
         return (
           <Button
             type="primary"
-            onClick={e => {
+            onClick={(e) => {
               e.stopPropagation(), this.evaluate(recard);
             }}
           >
@@ -389,7 +390,7 @@ const outsourcingPaiDan = React.createClass({
       return (
         <Button
           type="primary"
-          onClick={e => {
+          onClick={(e) => {
             e.stopPropagation(), this.evaluate(recard);
           }}
         >
@@ -408,9 +409,9 @@ const outsourcingPaiDan = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
       data: {
-        orderNo: orderNo
+        orderNo: orderNo,
       },
-      success: function(data) {
+      success: function (data) {
         let thisData = data.data;
         if (!thisData.length) {
           if (data.error && data.error.length) {
@@ -419,14 +420,14 @@ const outsourcingPaiDan = React.createClass({
           thisData = {};
         } else {
           this.setState({
-            jsDate: thisData
+            jsDate: thisData,
           });
         }
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -436,7 +437,7 @@ const outsourcingPaiDan = React.createClass({
   evaluate(recard) {
     this.state.assignData = recard;
     this.setState({
-      assignVisible: true
+      assignVisible: true,
     });
   },
   /* 驳回 */
@@ -444,12 +445,12 @@ const outsourcingPaiDan = React.createClass({
     this.setState({
       bohuiData: recard,
       boHuiVisible: true,
-      content: ""
+      content: "",
     });
   },
   boHuiOk() {
     this.setState({
-      boHuiVisible: false
+      boHuiVisible: false,
     });
     if (
       this.state.pagination.current == this.state.totalPage &&
@@ -462,7 +463,7 @@ const outsourcingPaiDan = React.createClass({
   },
   boHuiCancel() {
     this.setState({
-      boHuiVisible: false
+      boHuiVisible: false,
     });
   },
   componentWillMount() {
@@ -474,7 +475,7 @@ const outsourcingPaiDan = React.createClass({
       showDesc: true,
       visible: true,
       orderNo: record.orderNo,
-      modKey: "1"
+      modKey: "1",
     });
     this.jdDate(record.orderNo);
     this.loadXmu(record);
@@ -485,14 +486,14 @@ const outsourcingPaiDan = React.createClass({
     if (key === "2") {
       this.setState({
         modKey: key,
-        width: "1200px"
+        width: "1200px",
       });
       this.loadWaiBao();
     }
     if (key === "1") {
       this.setState({
         modKey: key,
-        width: "800px"
+        width: "800px",
       });
     }
   },
@@ -501,12 +502,12 @@ const outsourcingPaiDan = React.createClass({
   showRes(record) {
     this.setState({
       resVisible: true,
-      resRecord: record
+      resRecord: record,
     });
   },
   resCancel() {
     this.setState({
-      resVisible: false
+      resVisible: false,
     });
   },
 
@@ -520,9 +521,9 @@ const outsourcingPaiDan = React.createClass({
         globalConfig.context +
         "/api/admin/outsourceOrg/selectOrderOutsourceOrg",
       data: {
-        orderNo: this.state.orderNo
+        orderNo: this.state.orderNo,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (data.error.length || data.data.list == "") {
           if (data.error && data.error.length) {
@@ -552,21 +553,21 @@ const outsourcingPaiDan = React.createClass({
               createTimes: thisdata.createTimes,
               tname: thisdata.tname,
               contractNo: thisdata.contractNo,
-              projectStatus: thisdata.projectStatus
+              projectStatus: thisdata.projectStatus,
             });
           }
         }
         this.setState(
           {
-            dataSourceW: theArr
+            dataSourceW: theArr,
           },
           () => {}
         );
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -574,7 +575,7 @@ const outsourcingPaiDan = React.createClass({
   loadXmu(record) {
     this.state.data = [];
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -582,9 +583,9 @@ const outsourcingPaiDan = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
       data: {
-        orderNo: record.orderNo
+        orderNo: record.orderNo,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (!data.data) {
           if (data.error && data.error.length) {
@@ -608,19 +609,19 @@ const outsourcingPaiDan = React.createClass({
               cname: thisdata.cname,
               certificateNumber: thisdata.certificateNumber,
               projectStatus: thisdata.projectStatus,
-              splitStatus: thisdata.splitStatus
+              splitStatus: thisdata.splitStatus,
             });
           }
         }
         this.setState({
           dataSourceX: theArr,
-          pagination: false
+          pagination: false,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -633,9 +634,9 @@ const outsourcingPaiDan = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
       data: {
-        orderNo: record.orderNo
+        orderNo: record.orderNo,
       },
-      success: function(data) {
+      success: function (data) {
         let thisData = data.data;
         if (!thisData) {
           if (data.error && data.error.length) {
@@ -658,22 +659,29 @@ const outsourcingPaiDan = React.createClass({
                 globalConfig.avatarHost + "/upload"
               )
             : [],
+          replenishUrl: thisData.agreementUrl
+            ? splitUrl(
+                thisData.agreementUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+            : [],
           orderNo: thisData.orderNo, //订单编号
           buyerId: thisData.buyerId,
-          depName: thisData.depName
+          depName: thisData.depName,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
   },
   rizhi() {
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -681,9 +689,9 @@ const outsourcingPaiDan = React.createClass({
       crossDomain: false,
       url: "/api/admin/newOrder/selectOrderLog",
       data: {
-        orderNo: this.state.orderNo
+        orderNo: this.state.orderNo,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let thisData = data.data;
         if (!thisData.length) {
@@ -698,30 +706,30 @@ const outsourcingPaiDan = React.createClass({
               processName: thisdata.processName,
               adminName: thisdata.adminName,
               createDate: thisdata.createDate,
-              remarks: thisdata.remarks
+              remarks: thisdata.remarks,
             });
           }
         }
         this.setState({
-          dataSourceY: theArr
+          dataSourceY: theArr,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
   },
   closeOrderLog() {
     this.setState({
-      avisible: false
+      avisible: false,
     });
   },
   getOrderLog() {
     this.setState({
-      avisible: true
+      avisible: true,
     });
     this.rizhi();
   },
@@ -729,7 +737,7 @@ const outsourcingPaiDan = React.createClass({
     this.setState({
       visible: false,
       modKey: "1",
-      width: "800px"
+      width: "800px",
     });
   },
   closeDesc(e, s) {
@@ -754,6 +762,82 @@ const outsourcingPaiDan = React.createClass({
   search() {
     this.loadData();
   },
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+      if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.state.orgCodeUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+      if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
+    });
+  },
+  downImgs() {
+    let num = 0;
+    for (let i = 0; i < this.state.replenishUrl.length; i++) {
+      if (this.state.replenishUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.state.replenishUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.state.replenishUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  upImgs() {
+    let num = 0;
+    for (let i = 0; i < this.state.replenishUrl.length; i++) {
+      if (this.state.replenishUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.state.replenishUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  rotates() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
+    });
+  },
   reset() {
     this.state.nameSearch = "";
     this.state.releaseDate = [];
@@ -763,7 +847,7 @@ const outsourcingPaiDan = React.createClass({
   },
   searchSwitch() {
     this.setState({
-      searchMore: !this.state.searchMore
+      searchMore: !this.state.searchMore,
     });
   },
   render() {
@@ -772,7 +856,7 @@ const outsourcingPaiDan = React.createClass({
     const theData = this.state.orderList || {};
     const formItemLayout = {
       labelCol: { span: 10 },
-      wrapperCol: { span: 12 }
+      wrapperCol: { span: 12 },
     };
     const jsDate = this.state.jsDate || [];
     return (
@@ -794,20 +878,20 @@ const outsourcingPaiDan = React.createClass({
           <Input
             placeholder="客户名称"
             value={this.state.nameSearch}
-            onChange={e => {
+            onChange={(e) => {
               this.setState({ nameSearch: e.target.value });
             }}
           />
           <Input
             placeholder="订单编号"
             value={this.state.orderNoSearch}
-            onChange={e => {
+            onChange={(e) => {
               this.setState({ orderNoSearch: e.target.value });
             }}
           />
           <Select
             placeholder="流程状态"
-            onChange={e => {
+            onChange={(e) => {
               this.setState({ processStatus: e });
             }}
             style={{ width: 160, marginRight: 5 }}
@@ -824,7 +908,7 @@ const outsourcingPaiDan = React.createClass({
                 : null,
               this.state.releaseDate[1]
                 ? moment(this.state.releaseDate[1])
-                : null
+                : null,
             ]}
             onChange={(data, dataString) => {
               this.setState({ releaseDate: dataString });
@@ -957,38 +1041,147 @@ const outsourcingPaiDan = React.createClass({
                           className="demandDetailShow-upload"
                           listType="picture-card"
                           fileList={this.state.orgCodeUrl}
-                          onPreview={file => {
+                          onPreview={(file) => {
                             this.setState({
                               previewImage: file.url || file.thumbUrl,
-                              previewVisible: true
+                              previewVisible: true,
                             });
                           }}
                         ></Upload>
                         <Modal
                           maskClosable={false}
                           footer={null}
+                          width={"70%"}
                           visible={this.state.previewVisible}
                           onCancel={() => {
-                            this.setState({ previewVisible: false });
+                            this.setState({
+                              previewVisible: false,
+                              rotateDeg: 0,
+                            });
                           }}
                         >
                           <img
                             alt=""
-                            style={{ width: "100%" }}
+                            style={{
+                              width: "100%",
+                              transform: `rotate(${this.state.rotateDeg}deg)`,
+                            }}
                             src={this.state.previewImage || ""}
                           />
+                          <Button
+                            onClick={this.rotate}
+                            style={{
+                              position: "relative",
+                              left: "50%",
+                              transform: "translateX(-50%)",
+                            }}
+                          >
+                            旋转
+                          </Button>
+                          <Button
+                            onClick={this.upImg}
+                            style={{
+                              position: "absolute",
+                              left: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            上一张
+                          </Button>
+                          <Button
+                            onClick={this.downImg}
+                            style={{
+                              position: "absolute",
+                              right: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            下一张
+                          </Button>
                         </Modal>
                         <Button
                           style={{
                             float: "right",
                             marginRight: "140px",
-                            marginTop: "20px"
+                            marginTop: "20px",
                           }}
                           onClick={this.getOrderLog}
                         >
                           查看订单日志
                         </Button>
                       </FormItem>
+                      <FormItem
+                        labelCol={{ span: 5 }}
+                        wrapperCol={{ span: 18 }}
+                        label="补充协议"
+                      >
+                        <Upload
+                          className="demandDetailShow-upload"
+                          listType="picture-card"
+                          fileList={this.state.replenishUrl}
+                          onPreview={(file) => {
+                            this.setState({
+                              previewImage: file.url || file.thumbUrl,
+                              previewVisible: true,
+                            });
+                          }}
+                        ></Upload>
+                        <Modal
+                          maskClosable={false}
+                          footer={null}
+                          width={"70%"}
+                          visible={this.state.previewVisible}
+                          onCancel={() => {
+                            this.setState({
+                              previewVisible: false,
+                              rotateDeg: 0,
+                            });
+                          }}
+                        >
+                          <img
+                            alt=""
+                            style={{
+                              width: "100%",
+                              transform: `rotate(${this.state.rotateDeg}deg)`,
+                            }}
+                            src={this.state.previewImage || ""}
+                          />
+                          <Button
+                            onClick={this.rotates}
+                            style={{
+                              position: "relative",
+                              left: "50%",
+                              transform: "translateX(-50%)",
+                            }}
+                          >
+                            旋转
+                          </Button>
+                          <Button
+                            onClick={this.upImgs}
+                            style={{
+                              position: "absolute",
+                              left: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            上一张
+                          </Button>
+                          <Button
+                            onClick={this.downImgs}
+                            style={{
+                              position: "absolute",
+                              right: -81,
+                              top: "50%",
+                              transform: "translateY(-50%)",
+                            }}
+                          >
+                            下一张
+                          </Button>
+                        </Modal>
+                      </FormItem>
                     </div>
                     <div className="clearfix">
                       <FormItem
@@ -1023,7 +1216,7 @@ const outsourcingPaiDan = React.createClass({
                         wrapperCol={{ span: 18 }}
                         label="收款节点"
                       >
-                        {jsDate.map(item => {
+                        {jsDate.map((item) => {
                           return (
                             <p>
                               {getjiedian(item.dunSubject)} -- {item.money} 万元
@@ -1110,7 +1303,7 @@ const outsourcingPaiDan = React.createClass({
                         columns={this.state.columnsW}
                         dataSource={this.state.dataSourceW}
                         pagination={this.state.pagination}
-                        expandedRowRender={record => (
+                        expandedRowRender={(record) => (
                           <p style={{ margin: 0 }}>{record.remarks}</p>
                         )}
                         scroll={{ x: 300, y: 0 }}
@@ -1156,7 +1349,7 @@ const outsourcingPaiDan = React.createClass({
                   rows={4}
                   placeholder="请输入驳回原因"
                   value={this.state.content}
-                  onChange={e => {
+                  onChange={(e) => {
                     this.setState({ content: e.target.value });
                   }}
                 />
@@ -1183,7 +1376,7 @@ const outsourcingPaiDan = React.createClass({
         </Modal>
       </div>
     );
-  }
+  },
 });
 
 export default outsourcingPaiDan;

File diff suppressed because it is too large
+ 343 - 151
js/component/manageCenter/financialManage/distribute/outsourcingPaiDan.jsx


+ 232 - 3
js/component/manageCenter/financialManage/orderDetail/orderDetail.jsx

@@ -344,10 +344,17 @@ const OrderDetail = Form.create()(
                   globalConfig.avatarHost + "/upload"
                 )
               : [],
+            replenishUrl: thisData.agreementUrl
+              ? splitUrl(
+                  thisData.agreementUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
+              : [],
             orderNo: thisData.orderNo, //订单编号
             buyerId: thisData.buyerId,
             depName: thisData.depName,
-            outsource: thisData.outsource == 0 ? "否" : "是"
+            outsource: thisData.outsource == 0 ? "否" : "是",
           });
         }.bind(this)
       }).always(
@@ -515,6 +522,44 @@ const OrderDetail = Form.create()(
         rotateDeg
       });
     },
+    downImgs() {
+      let num = 0;
+      for (let i = 0; i < this.state.replenishUrl.length; i++) {
+        if (this.state.replenishUrl[i].url == this.state.previewImage) {
+          num = i;
+        }
+      }
+      if (num == this.state.replenishUrl.length - 1) {
+        return message.warning("已经是最后一张了哦");
+      }
+      this.state.previewImage = this.state.replenishUrl[num + 1].url;
+      this.setState({
+        previewImage: this.state.previewImage,
+        rotateDeg: 0
+      });
+    },
+    upImgs() {
+      let num = 0;
+      for (let i = 0; i < this.state.replenishUrl.length; i++) {
+        if (this.state.replenishUrl[i].url == this.state.previewImage) {
+          num = i;
+        }
+      }
+      if (num == 0) {
+        return message.warning("已经是第一张了哦");
+      }
+      this.state.previewImage = this.state.replenishUrl[num - 1].url;
+      this.setState({
+        previewImage: this.state.previewImage,
+        rotateDeg: 0
+      });
+    },
+    rotates() {
+      let rotateDeg = this.state.rotateDeg + 90;
+      this.setState({
+        rotateDeg
+      });
+    },
     //节点列表
     jiedian(orderNos) {
       $.ajax({
@@ -749,12 +794,13 @@ const OrderDetail = Form.create()(
                   <Modal
                     maskClosable={false}
                     footer={null}
+                    width={"70%"}
                     visible={this.state.previewVisible}
                     onCancel={() => {
                       this.setState({ previewVisible: false, rotateDeg: 0 });
                     }}
                   >
-                    <div
+                    {/* <div
                       onClick={this.upImg}
                       className="up-btn"
                       style={{
@@ -837,7 +883,7 @@ const OrderDetail = Form.create()(
                           borderRight: "none"
                         }}
                       ></span>
-                    </div>
+                    </div> */}
                     <img
                       alt=""
                       style={{
@@ -846,6 +892,38 @@ const OrderDetail = Form.create()(
                       }}
                       src={this.state.previewImage || ""}
                     />
+                    <Button
+                onClick={this.rotate}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                }}
+              >
+                旋转
+              </Button>
+              <Button
+                onClick={this.upImg}
+                style={{
+                  position: "absolute",
+                  left: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                上一张
+              </Button>
+              <Button
+                onClick={this.downImg}
+                style={{
+                  position: "absolute",
+                  right: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                下一张
+              </Button>
                   </Modal>
                   <Button
                     style={{
@@ -858,6 +936,157 @@ const OrderDetail = Form.create()(
                     查看订单日志
                   </Button>
                 </FormItem>
+                <FormItem
+                  labelCol={{ span: 5 }}
+                  wrapperCol={{ span: 18 }}
+                  label="补充协议"
+                >
+                  <Upload
+                    className="demandDetailShow-upload"
+                    listType="picture-card"
+                    fileList={this.state.replenishUrl}
+                    onPreview={file => {
+                      this.setState({
+                        previewImage: file.url || file.thumbUrl,
+                        previewVisible: true
+                      });
+                    }}
+                  ></Upload>
+                  <Modal
+                    maskClosable={false}
+                    footer={null}
+                    width={"70%"}
+                    visible={this.state.previewVisible}
+                    onCancel={() => {
+                      this.setState({ previewVisible: false, rotateDeg: 0 });
+                    }}
+                  >
+                    {/* <div
+                      onClick={this.upImg}
+                      className="up-btn"
+                      style={{
+                        cursor: "pointer",
+                        transition: "all .5s",
+                        opacity: ".2",
+                        width: "41px",
+                        height: "69px",
+                        backgroundColor: "rgba(0,0,0,.5)",
+                        position: "absolute",
+                        top: "50%",
+                        left: 16,
+                        transform: "translateY(-50%)",
+                        zIndex: 1
+                      }}
+                    >
+                      <span
+                        style={{
+                          position: "absolute",
+                          border: "1px solid #fff",
+                          width: "20px",
+                          height: "20px",
+                          left: "60%",
+                          top: "50%",
+                          transform: "translate(-50%, -50%) rotate(45deg)",
+                          borderTop: "none",
+                          borderRight: "none"
+                        }}
+                      ></span>
+                    </div>
+                    <div
+                      onClick={this.rotate}
+                      style={{
+                        textAlign: "center",
+                        lineHeight: "30px",
+                        color: "#000",
+                        cursor: "pointer",
+                        transition: "all .5s",
+                        width: "50px",
+                        height: "30px",
+                        backgroundColor: "white",
+                        position: "absolute",
+                        bottom: "-30",
+                        left: "50%",
+                        transform: "translateX(-50%)",
+                        zIndex: 1,
+                        borderRadius: "5px",
+                        border: "1px solid #ccc"
+                      }}
+                    >
+                      旋转
+                    </div>
+                    <div
+                      onClick={this.downImg}
+                      className="up-btn"
+                      style={{
+                        cursor: "pointer",
+                        transition: "all .5s",
+                        opacity: ".2",
+                        width: "41px",
+                        height: "69px",
+                        backgroundColor: "rgba(0,0,0,.5)",
+                        position: "absolute",
+                        top: "50%",
+                        right: 16,
+                        transform: "translateY(-50%)",
+                        zIndex: 1
+                      }}
+                    >
+                      <span
+                        style={{
+                          position: "absolute",
+                          border: "1px solid #fff",
+                          width: "20px",
+                          height: "20px",
+                          left: "40%",
+                          top: "50%",
+                          transform: "translate(-50%, -50%) rotate(225deg)",
+                          borderTop: "none",
+                          borderRight: "none"
+                        }}
+                      ></span>
+                    </div> */}
+                    <img
+                      alt=""
+                      style={{
+                        width: "100%",
+                        transform: `rotate(${this.state.rotateDeg}deg)`
+                      }}
+                      src={this.state.previewImage || ""}
+                    />
+                    <Button
+                onClick={this.rotates}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                }}
+              >
+                旋转
+              </Button>
+              <Button
+                onClick={this.upImgs}
+                style={{
+                  position: "absolute",
+                  left: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                上一张
+              </Button>
+              <Button
+                onClick={this.downImgs}
+                style={{
+                  position: "absolute",
+                  right: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                下一张
+              </Button>
+                  </Modal>
+                </FormItem>
               </div>
               <div className="clearfix">
                 <FormItem

+ 7 - 0
js/component/manageCenter/operate/personnel/personnelAll.jsx

@@ -396,6 +396,13 @@ const PersonnelAll = React.createClass({
                   globalConfig.avatarHost + "/upload"
                 )
               : [], //图片地址
+            replenishUrl: thisdata.agreementUrl
+              ? splitUrl(
+                  thisdata.agreementUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
+              : [],
             salesmanName: thisdata.salesmanName, //营销员名称
             salesmanMobile: thisdata.salesmanMobile, //营销员电话
             financeName: thisdata.financeName, //财务名称

File diff suppressed because it is too large
+ 616 - 365
js/component/manageCenter/order/orderNew/addService.jsx


File diff suppressed because it is too large
+ 568 - 339
js/component/manageCenter/order/orderNew/addorders.js


File diff suppressed because it is too large
+ 418 - 314
js/component/manageCenter/order/orderNew/approveds.jsx


+ 1 - 0
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwjl.js

@@ -1151,6 +1151,7 @@ class ChangeDetail extends Component {
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
                 this.setState({ previewVisible: false, rotateDeg: 0 }, () => {

+ 1 - 0
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzj.js

@@ -566,6 +566,7 @@ class ChangeDetail extends Component {
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
                 this.setState({ previewVisible: false }, () => {});

+ 1 - 0
js/component/manageCenter/order/orderNew/changeComponent/changeDetailCwzy.js

@@ -1163,6 +1163,7 @@ class ChangeDetail extends Component {
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
                 this.setState({ previewVisible: false, rotateDeg: 0 }, () => {

+ 126 - 76
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsjl.js

@@ -89,6 +89,7 @@ class ChangeDetail extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      rotateDeg: 0,
       previewVisible: false,
       buttonStatus: true,
       changeType: 1,
@@ -124,7 +125,7 @@ class ChangeDetail extends Component {
                   disabled={record.load}
                   key={record.id}
                   required="required"
-                  onChange={e => {
+                  onChange={(e) => {
                     record.amount = e.target.value;
                     this.setState({ contactList: this.state.contactList });
                   }}
@@ -132,7 +133,7 @@ class ChangeDetail extends Component {
                 />
               </div>
             );
-          }
+          },
         },
         {
           title: "时间",
@@ -140,13 +141,16 @@ class ChangeDetail extends Component {
           key: "createTimes",
           render: (text, record) => {
             return <div>{record.createTimes}</div>;
-          }
-        }
-      ]
+          },
+        },
+      ],
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
     this.moneyOld = this.moneyOld.bind(this);
+    this.rotate = this.rotate.bind(this);
+    this.downImg = this.downImg.bind(this);
+    this.upImg = this.upImg.bind(this);
   }
 
   componentWillReceiveProps(nextProps) {
@@ -162,60 +166,66 @@ class ChangeDetail extends Component {
       refundableAmount: nextProps.data.refundableAmount,
       cwRemarks: nextProps.data.cwRemarks,
       contactList: nextProps.contactList,
-      refundInvoice: nextProps.data.refundInvoice
+      refundInvoice: nextProps.data.refundInvoice,
     });
   }
 
   getOrgCodeUrl(e) {
     this.setState({
-      orgCodeUrl: e
+      orgCodeUrl: e,
     });
   }
 
   //同意拒绝按钮的有无
   changeButtonStatus() {
     this.setState({
-      buttonStatus: !this.state.buttonStatus
+      buttonStatus: !this.state.buttonStatus,
     });
     window.setTimeout(() => {
       this.setState({
-        reason: ""
+        reason: "",
       });
     }, 100);
   }
 
-  // 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.processState);
-
-  // }
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.props.pictureUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  }
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  }
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
+    });
+  }
 
   moneyOld(str, money) {
     if (money) {
@@ -241,7 +251,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.userName,
         labelB: "合同编号",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.contractNo
+        dataB: this.props.data.contractNo,
       },
       {
         labelA: "时间",
@@ -249,7 +259,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.createTimes,
         labelB: "发起人",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.applicant
+        dataB: this.props.data.applicant,
       },
       {
         labelA: "当前进度",
@@ -258,18 +268,18 @@ class ChangeDetail extends Component {
         dataA:
           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
-            )
+                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
-            ),
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
-        dataB: getChangeType(this.props.data.type)
+        dataB: getChangeType(this.props.data.type),
       },
       {
         labelA: "合同额(万元)",
@@ -277,7 +287,7 @@ class ChangeDetail extends Component {
         dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
         labelB: "已收款(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: changeColor(this.props.data.settlementAmount)
+        dataB: changeColor(this.props.data.settlementAmount),
       },
       {
         labelA: "欠款(万元)",
@@ -285,43 +295,43 @@ class ChangeDetail extends Component {
         dataA: changeColor(this.props.data.arrears),
         labelB: "申请退款(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: changeColor(this.props.data.changeAmount)
+        dataB: changeColor(this.props.data.changeAmount),
       },
       {
         labelA: "变更原因",
         formItemLayoutA: formItemLayout,
-        dataA: this.props.data.remarks
-      }
+        dataA: this.props.data.remarks,
+      },
     ];
     const planData = [
       {
         labelA: "项目进度",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.projectState,
-        onChangeA: value => {
+        onChangeA: (value) => {
           this.setState({
-            projectState: value
+            projectState: value,
           });
         },
         labelB: "发生成本费用(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.zxsCost,
-        onChangeB: value => {
+        onChangeB: (value) => {
           this.setState({
-            zxsCost: value
+            zxsCost: value,
           });
-        }
+        },
       },
       {
         labelA: "备注",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.zxsRemarks,
-        onChangeA: value => {
+        onChangeA: (value) => {
           this.setState({
-            zxsRemarks: value
+            zxsRemarks: value,
           });
-        }
-      }
+        },
+      },
     ];
     const financeData = [
       {
@@ -330,8 +340,8 @@ class ChangeDetail extends Component {
         dataA: this.props.data.cwCost,
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.refundableAmount
-      }
+        dataB: this.props.data.refundableAmount,
+      },
     ];
     const buttonData = [
       {
@@ -340,11 +350,11 @@ class ChangeDetail extends Component {
         placeholder: "请输入理由",
         type: "primary",
         status: 2,
-        onChange: value => {
+        onChange: (value) => {
           this.setState({
-            remarks: value
+            remarks: value,
           });
-        }
+        },
       },
       {
         name: "拒绝",
@@ -352,12 +362,12 @@ class ChangeDetail extends Component {
         placeholder: "请输入理由",
         type: "danger",
         status: 3,
-        onChange: value => {
+        onChange: (value) => {
           this.setState({
-            remarks: value
+            remarks: value,
           });
-        }
-      }
+        },
+      },
     ];
     const orgCodeUrl = this.props.pictureUrl;
 
@@ -442,16 +452,56 @@ class ChangeDetail extends Component {
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
-                this.setState({ previewVisible: false });
+                this.state.rotateDeg = 0;
+                this.setState({
+                  previewVisible: false,
+                  rotateDeg: this.state.rotateDeg,
+                });
               }}
             >
               <img
                 alt=""
-                style={{ width: "100%" }}
+                style={{
+                  width: "100%",
+                  transform: `rotate(${this.state.rotateDeg}deg)`,
+                }}
                 src={this.state.previewImage || ""}
               />
+              <Button
+                onClick={this.rotate}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                }}
+              >
+                旋转
+              </Button>
+              <Button
+                onClick={this.upImg}
+                style={{
+                  position: "absolute",
+                  left: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                上一张
+              </Button>
+              <Button
+                onClick={this.downImg}
+                style={{
+                  position: "absolute",
+                  right: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                下一张
+              </Button>
             </Modal>
             <Rizhi changeId={this.props.id} />
           </Form.Item>

+ 121 - 62
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJsy.js

@@ -92,6 +92,7 @@ class ChangeDetail extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      rotateDeg: 0,
       previewVisible: false,
       buttonStatus: true,
       changeType: 1,
@@ -127,7 +128,7 @@ class ChangeDetail extends Component {
                   disabled={record.load}
                   key={record.id}
                   required="required"
-                  onChange={e => {
+                  onChange={(e) => {
                     record.amount = e.target.value;
                     this.setState({ contactList: this.state.contactList });
                   }}
@@ -135,7 +136,7 @@ class ChangeDetail extends Component {
                 />
               </div>
             );
-          }
+          },
         },
         {
           title: "时间",
@@ -143,49 +144,67 @@ class ChangeDetail extends Component {
           key: "createTimes",
           render: (text, record) => {
             return <div>{record.createTimes}</div>;
-          }
-        }
-      ]
+          },
+        },
+      ],
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
     this.moneyOld = this.moneyOld.bind(this);
+    this.rotate = this.rotate.bind(this);
+    this.downImg = this.downImg.bind(this);
+    this.upImg = this.upImg.bind(this);
   }
 
   getOrgCodeUrl(e) {
     this.setState({
-      orgCodeUrl: e
+      orgCodeUrl: e,
     });
   }
 
   changeButtonStatus() {
     this.setState({
-      buttonStatus: !this.state.buttonStatus
+      buttonStatus: !this.state.buttonStatus,
+    });
+  }
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.props.pictureUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  }
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  }
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
     });
   }
-  // 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)
-  //   });
-  // }
 
   moneyOld(str, money) {
     if (money) {
@@ -211,7 +230,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.userName,
         labelB: "合同编号",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.contractNo
+        dataB: this.props.data.contractNo,
       },
       {
         labelA: "时间",
@@ -219,7 +238,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.createTimes,
         labelB: "发起人",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.applicant
+        dataB: this.props.data.applicant,
       },
       {
         labelA: "当前进度",
@@ -228,18 +247,18 @@ class ChangeDetail extends Component {
         dataA:
           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
-            )
+                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
-            ),
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
-        dataB: getChangeType(this.props.data.type)
+        dataB: getChangeType(this.props.data.type),
       },
       {
         labelA: "合同额(万元)",
@@ -247,7 +266,7 @@ class ChangeDetail extends Component {
         dataA: "***",
         labelB: "已收款(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: "***"
+        dataB: "***",
       },
       {
         labelA: "欠款(万元)",
@@ -255,13 +274,13 @@ class ChangeDetail extends Component {
         dataA: "***",
         labelB: "申请退款(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: "***"
+        dataB: "***",
       },
       {
         labelA: "变更原因",
         formItemLayoutA: formItemLayout,
-        dataA: this.props.data.remarks
-      }
+        dataA: this.props.data.remarks,
+      },
     ];
     const planData = [
       {
@@ -270,13 +289,13 @@ class ChangeDetail extends Component {
         dataA: this.props.data.projectState,
         labelB: "发生成本费用(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: "***"
+        dataB: "***",
       },
       {
         labelA: "备注",
         formItemLayoutA: formItemLayout,
-        dataA: this.props.data.zxsRemarks
-      }
+        dataA: this.props.data.zxsRemarks,
+      },
     ];
     const financeData = [
       {
@@ -285,7 +304,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.paymentTimes,
         labelB: "收款金额(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: "***"
+        dataB: "***",
       },
       {
         labelA: "开票时间",
@@ -293,7 +312,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.invoiceTimes,
         labelB: "已开票金额(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: "***"
+        dataB: "***",
       },
       {
         labelA: "发生成本(万元)",
@@ -301,13 +320,13 @@ class ChangeDetail extends Component {
         dataA: "***",
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: "***"
+        dataB: "***",
       },
       {
         labelA: "补充资料/备注",
         formItemLayoutA: formItemLayout,
-        dataA: this.props.data.cwRemarks
-      }
+        dataA: this.props.data.cwRemarks,
+      },
     ];
     const buttonData = [
       {
@@ -316,11 +335,11 @@ class ChangeDetail extends Component {
         placeholder: "请输入理由",
         type: "primary",
         status: 2,
-        onChange: value => {
+        onChange: (value) => {
           this.setState({
-            remarks: value
+            remarks: value,
           });
-        }
+        },
       },
       {
         name: "拒绝",
@@ -328,12 +347,12 @@ class ChangeDetail extends Component {
         placeholder: "请输入理由",
         type: "danger",
         status: 3,
-        onChange: value => {
+        onChange: (value) => {
           this.setState({
-            remarks: value
+            remarks: value,
           });
-        }
-      }
+        },
+      },
     ];
     const orgCodeUrl = this.props.pictureUrl;
 
@@ -418,16 +437,56 @@ class ChangeDetail extends Component {
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
-                this.setState({ previewVisible: false });
+                this.state.rotateDeg = 0;
+                this.setState({
+                  previewVisible: false,
+                  rotateDeg: this.state.rotateDeg,
+                });
               }}
             >
               <img
                 alt=""
-                style={{ width: "100%" }}
+                style={{
+                  width: "100%",
+                  transform: `rotate(${this.state.rotateDeg}deg)`,
+                }}
                 src={this.state.previewImage || ""}
               />
+              <Button
+                onClick={this.rotate}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                }}
+              >
+                旋转
+              </Button>
+              <Button
+                onClick={this.upImg}
+                style={{
+                  position: "absolute",
+                  left: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                上一张
+              </Button>
+              <Button
+                onClick={this.downImg}
+                style={{
+                  position: "absolute",
+                  right: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                下一张
+              </Button>
             </Modal>
             <Rizhi changeId={this.props.id} />
           </Form.Item>

+ 126 - 74
js/component/manageCenter/order/orderNew/changeComponent/changeDetailJszj.js

@@ -2,7 +2,7 @@ import React, { Component } from "react";
 import { Form, Upload, Modal, Input, Button, message, Select, Table } from "antd";
 import AgreeButton from "./agreeButton.js";
 import Rizhi from "./rizhi.js";
-import { getProcessStatusNew, changeColor } from "@/tools.js";
+import { getProcessStatusNew, changeColor, splitUrl } from "@/tools.js";
 import { shenghePeo } from "@/tools.js";
 import $ from "jquery/src/ajax";
 import tongguo from "../../../../../../image/tongguo.png";
@@ -90,6 +90,7 @@ class ChangeDetail extends Component {
   constructor(props) {
     super(props);
     this.state = {
+      rotateDeg: 0,
       previewVisible: false,
       buttonStatus: true,
       dataSource: [],
@@ -124,7 +125,7 @@ class ChangeDetail extends Component {
                   disabled={record.load}
                   key={record.id}
                   required="required"
-                  onChange={e => {
+                  onChange={(e) => {
                     record.amount = e.target.value;
                     this.setState({ contactList: this.state.contactList });
                   }}
@@ -132,7 +133,7 @@ class ChangeDetail extends Component {
                 />
               </div>
             );
-          }
+          },
         },
         {
           title: "时间",
@@ -140,13 +141,16 @@ class ChangeDetail extends Component {
           key: "createTimes",
           render: (text, record) => {
             return <div>{record.createTimes}</div>;
-          }
-        }
-      ]
+          },
+        },
+      ],
     };
     this.getOrgCodeUrl = this.getOrgCodeUrl.bind(this);
     this.changeButtonStatus = this.changeButtonStatus.bind(this);
     this.moneyOld = this.moneyOld.bind(this);
+    this.rotate = this.rotate.bind(this);
+    this.downImg = this.downImg.bind(this);
+    this.upImg = this.upImg.bind(this);
   }
 
   componentWillReceiveProps(nextProps) {
@@ -159,13 +163,13 @@ class ChangeDetail extends Component {
       refundableAmount: nextProps.data.refundableAmount,
       cwRemarks: nextProps.data.cwRemarks,
       contactList: nextProps.contactList,
-      refundInvoice: nextProps.data.refundInvoice
+      refundInvoice: nextProps.data.refundInvoice,
     });
   }
 
   getOrgCodeUrl(e) {
     this.setState({
-      orgCodeUrl: e
+      orgCodeUrl: e,
     });
   }
 
@@ -188,39 +192,47 @@ class ChangeDetail extends Component {
   //同意拒绝按钮的有无
   changeButtonStatus() {
     this.setState({
-      buttonStatus: !this.state.buttonStatus
+      buttonStatus: !this.state.buttonStatus,
+    });
+  }
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.props.pictureUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  }
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.props.pictureUrl.length; i++) {
+      if (this.props.pictureUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.props.pictureUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  }
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
     });
   }
-
-  // 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);
-  // }
 
   render() {
     const pageData = [
@@ -230,7 +242,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.userName,
         labelB: "合同编号",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.contractNo
+        dataB: this.props.data.contractNo,
       },
       {
         labelA: "时间",
@@ -238,7 +250,7 @@ class ChangeDetail extends Component {
         dataA: this.props.data.createTimes,
         labelB: "发起人",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.applicant
+        dataB: this.props.data.applicant,
       },
       {
         labelA: "当前进度",
@@ -247,18 +259,18 @@ class ChangeDetail extends Component {
         dataA:
           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
-            )
+                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
-            ),
+                this.props.data.processState,
+                this.props.data.status
+              ),
         labelB: "变更类型",
         formItemLayoutB: formItemLayout,
-        dataB: getChangeType(this.props.data.type)
+        dataB: getChangeType(this.props.data.type),
       },
       {
         labelA: "合同额(万元)",
@@ -266,7 +278,7 @@ class ChangeDetail extends Component {
         dataA: this.moneyOld(this.props.data.totalAmount, this.props.money),
         labelB: "已收款(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: changeColor(this.props.data.settlementAmount)
+        dataB: changeColor(this.props.data.settlementAmount),
       },
       {
         labelA: "欠款(万元)",
@@ -274,43 +286,43 @@ class ChangeDetail extends Component {
         dataA: changeColor(this.props.data.arrears),
         labelB: "申请退款(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: changeColor(this.props.data.changeAmount)
+        dataB: changeColor(this.props.data.changeAmount),
       },
       {
         labelA: "变更原因",
         formItemLayoutA: formItemLayout,
-        dataA: this.props.data.remarks
-      }
+        dataA: this.props.data.remarks,
+      },
     ];
     const planData = [
       {
         labelA: "项目进度",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.projectState,
-        onChangeA: value => {
+        onChangeA: (value) => {
           this.setState({
-            projectState: value
+            projectState: value,
           });
         },
         labelB: "发生成本费用(万元)",
         formItemLayoutB: formItemLayout,
         dataB: this.props.data.zxsCost,
-        onChangeB: value => {
+        onChangeB: (value) => {
           this.setState({
-            zxsCost: value
+            zxsCost: value,
           });
-        }
+        },
       },
       {
         labelA: "备注",
         formItemLayoutA: formItemLayout,
         dataA: this.props.data.zxsRemarks,
-        onChangeA: value => {
+        onChangeA: (value) => {
           this.setState({
-            zxsRemarks: value
+            zxsRemarks: value,
           });
-        }
-      }
+        },
+      },
     ];
     const financeData = [
       {
@@ -319,8 +331,8 @@ class ChangeDetail extends Component {
         dataA: this.props.data.cwCost,
         labelB: "应退金额(万元)",
         formItemLayoutB: formItemLayout,
-        dataB: this.props.data.refundableAmount
-      }
+        dataB: this.props.data.refundableAmount,
+      },
     ];
     const buttonData = [
       {
@@ -329,11 +341,11 @@ class ChangeDetail extends Component {
         placeholder: "请输入理由",
         type: "primary",
         status: 2,
-        onChange: value => {
+        onChange: (value) => {
           this.setState({
-            remarks: value
+            remarks: value,
           });
-        }
+        },
       },
       {
         name: "拒绝",
@@ -341,12 +353,12 @@ class ChangeDetail extends Component {
         placeholder: "请输入理由",
         type: "danger",
         status: 3,
-        onChange: value => {
+        onChange: (value) => {
           this.setState({
-            remarks: value
+            remarks: value,
           });
-        }
-      }
+        },
+      },
     ];
     const orgCodeUrl = this.props.pictureUrl;
 
@@ -431,16 +443,56 @@ class ChangeDetail extends Component {
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
-                this.setState({ previewVisible: false });
+                this.state.rotateDeg = 0;
+                this.setState({
+                  previewVisible: false,
+                  rotateDeg: this.state.rotateDeg,
+                });
               }}
             >
               <img
                 alt=""
-                style={{ width: "100%" }}
+                style={{
+                  width: "100%",
+                  transform: `rotate(${this.state.rotateDeg}deg)`,
+                }}
                 src={this.state.previewImage || ""}
               />
+              <Button
+                onClick={this.rotate}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                }}
+              >
+                旋转
+              </Button>
+              <Button
+                onClick={this.upImg}
+                style={{
+                  position: "absolute",
+                  left: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                上一张
+              </Button>
+              <Button
+                onClick={this.downImg}
+                style={{
+                  position: "absolute",
+                  right: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                下一张
+              </Button>
             </Modal>
             <Rizhi changeId={this.props.id} />
           </Form.Item>

+ 160 - 10
js/component/manageCenter/order/orderNew/changeComponent/orderDetail.js

@@ -210,6 +210,8 @@ class OrderDetail extends Component {
     this.rotate = this.rotate.bind(this);
     this.downImg = this.downImg.bind(this);
     this.upImg = this.upImg.bind(this);
+    this.downImgs = this.downImgs.bind(this);
+    this.upImgs = this.upImgs.bind(this);
     this.showRes = this.showRes.bind(this);
     this.resCancel = this.resCancel.bind(this);
   }
@@ -323,6 +325,74 @@ class OrderDetail extends Component {
       rotateDeg: 0
     });
   }
+  downImgs() {
+    const data = this.props.orderData;
+    let num = 0;
+    for (
+      let i = 0;
+      i <
+      splitUrl(
+        data.rep,
+        ",",
+        globalConfig.avatarHost + "/upload"
+      ).length;
+      i++
+    ) {
+      if (
+        splitUrl(data.agreementUrl, ",", globalConfig.avatarHost + "/upload")[i]
+          .url == this.state.previewImage
+      ) {
+        num = i;
+      }
+    }
+    if (
+      num ==
+      splitUrl(data.agreementUrl, ",", globalConfig.avatarHost + "/upload")
+        .length -
+        1
+    ) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = splitUrl(
+      data.agreementUrl,
+      ",",
+      globalConfig.avatarHost + "/upload"
+    )[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  }
+  upImgs() {
+    const data = this.props.orderData;
+    let num = 0;
+    for (
+      let i = 0;
+      i <
+      splitUrl(data.agreementUrl, ",", globalConfig.avatarHost + "/upload")
+        .length;
+      i++
+    ) {
+      if (
+        splitUrl(data.agreementUrl, ",", globalConfig.avatarHost + "/upload")[i]
+          .url == this.state.previewImage
+      ) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = splitUrl(
+      data.agreementUrl,
+      ",",
+      globalConfig.avatarHost + "/upload"
+    )[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  }
   // 拆分详细
   showRes(record) {
     this.setState({
@@ -346,7 +416,7 @@ class OrderDetail extends Component {
     return (
       <div
         className="clearfix"
-        ref={e => {
+        ref={(e) => {
           this.refs = e;
         }}
       >
@@ -462,22 +532,23 @@ class OrderDetail extends Component {
                     )
                   : []
               }
-              onPreview={file => {
+              onPreview={(file) => {
                 this.setState({
                   previewImage: file.url || file.thumbUrl,
-                  previewVisible: true
+                  previewVisible: true,
                 });
               }}
             />
             <Modal
               maskClosable={false}
               footer={null}
+              width={"70%"}
               visible={this.state.previewVisible}
               onCancel={() => {
                 this.state.rotateDeg = 0;
                 this.setState({
                   previewVisible: false,
-                  rotateDeg: this.state.rotateDeg
+                  rotateDeg: this.state.rotateDeg,
                 });
               }}
             >
@@ -485,7 +556,7 @@ class OrderDetail extends Component {
                 alt=""
                 style={{
                   width: "100%",
-                  transform: `rotate(${this.state.rotateDeg}deg)`
+                  transform: `rotate(${this.state.rotateDeg}deg)`,
                 }}
                 src={this.state.previewImage || ""}
               />
@@ -494,7 +565,7 @@ class OrderDetail extends Component {
                 style={{
                   position: "relative",
                   left: "50%",
-                  transform: "translateX(-50%)"
+                  transform: "translateX(-50%)",
                 }}
               >
                 旋转
@@ -505,7 +576,7 @@ class OrderDetail extends Component {
                   position: "absolute",
                   left: -81,
                   top: "50%",
-                  transform: "translateY(-50%)"
+                  transform: "translateY(-50%)",
                 }}
               >
                 上一张
@@ -516,7 +587,7 @@ class OrderDetail extends Component {
                   position: "absolute",
                   right: -81,
                   top: "50%",
-                  transform: "translateY(-50%)"
+                  transform: "translateY(-50%)",
                 }}
               >
                 下一张
@@ -526,7 +597,7 @@ class OrderDetail extends Component {
               style={{
                 float: "right",
                 marginRight: "140px",
-                marginTop: "20px"
+                marginTop: "20px",
               }}
               onClick={() => {
                 this.props.getOrderLog(data.orderNo);
@@ -535,6 +606,85 @@ class OrderDetail extends Component {
               查看订单日志
             </Button>
           </FormItem>
+          <FormItem
+            labelCol={{ span: 4 }}
+            wrapperCol={{ span: 18 }}
+            label="补充协议"
+          >
+            <Upload
+              className="demandDetailShow-upload"
+              listType="picture-card"
+              fileList={
+                data.agreementUrl
+                  ? splitUrl(
+                      data.agreementUrl,
+                      ",",
+                      globalConfig.avatarHost + "/upload"
+                    )
+                  : []
+              }
+              onPreview={(file) => {
+                this.setState({
+                  previewImage: file.url || file.thumbUrl,
+                  previewVisible: true,
+                });
+              }}
+            />
+            <Modal
+              maskClosable={false}
+              footer={null}
+              width={"70%"}
+              visible={this.state.previewVisible}
+              onCancel={() => {
+                this.state.rotateDeg = 0;
+                this.setState({
+                  previewVisible: false,
+                  rotateDeg: this.state.rotateDeg,
+                });
+              }}
+            >
+              <img
+                alt=""
+                style={{
+                  width: "100%",
+                  transform: `rotate(${this.state.rotateDeg}deg)`,
+                }}
+                src={this.state.previewImage || ""}
+              />
+              <Button
+                onClick={this.rotate}
+                style={{
+                  position: "relative",
+                  left: "50%",
+                  transform: "translateX(-50%)",
+                }}
+              >
+                旋转
+              </Button>
+              <Button
+                onClick={this.upImgs}
+                style={{
+                  position: "absolute",
+                  left: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                上一张
+              </Button>
+              <Button
+                onClick={this.downImgs}
+                style={{
+                  position: "absolute",
+                  right: -81,
+                  top: "50%",
+                  transform: "translateY(-50%)",
+                }}
+              >
+                下一张
+              </Button>
+            </Modal>
+          </FormItem>
         </div>
         <div className="clearfix">
           <FormItem
@@ -623,7 +773,7 @@ class OrderDetail extends Component {
             style={{
               display: propsList.length ? "none" : "inline-block",
               marginLeft: 10,
-              color: "red"
+              color: "red",
             }}
           >
             金额总计(万元): {this.props.totalCui}

+ 2 - 3
js/component/manageCenter/order/orderNew/changeComponent/picturesWall.js

@@ -52,9 +52,7 @@ class PicturesWall extends Component {
     return (
       <div style={{ display: "inline-block" }}>
         <Upload
-          action={
-            globalConfig.context + this.props.url
-          }
+          action={globalConfig.context + this.props.url}
           data={{ sign: this.props.sign }}
           listType="picture-card"
           fileList={fileList}
@@ -67,6 +65,7 @@ class PicturesWall extends Component {
           maskClosable={false}
           visible={previewVisible}
           footer={null}
+          width={"70%"}
           onCancel={this.handleCancel}
         >
           <img alt="example" style={{ width: "100%" }} src={previewImage} />

File diff suppressed because it is too large
+ 335 - 141
js/component/manageCenter/order/orderNew/chargeback.jsx


File diff suppressed because it is too large
+ 362 - 170
js/component/manageCenter/order/orderNew/checkOutsourcing.jsx


+ 27 - 16
js/component/manageCenter/order/orderNew/contractCwjl.js

@@ -522,11 +522,18 @@ const contractChange = Form.create()(
               isAddition: thisdata.additionalOrder ? true : false,
               contractPictureUrl: thisdata.contractPictureUrl
                 ? splitUrl(
-                  thisdata.contractPictureUrl,
-                  ",",
-                  globalConfig.avatarHost + "/upload"
-                )
-                : []
+                    thisdata.contractPictureUrl,
+                    ",",
+                    globalConfig.avatarHost + "/upload"
+                  )
+                : [],
+              replenishUrl: thisdata.agreementUrl
+                ? splitUrl(
+                    thisdata.agreementUrl,
+                    ",",
+                    globalConfig.avatarHost + "/upload"
+                  )
+                : [],
             });
             // console.log(thisdata.contractPictureUrl);
           }
@@ -1401,7 +1408,11 @@ const contractChange = Form.create()(
                     <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
                       <ChangeDetail
                         id={item.id}
-                        money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
+                        money={
+                          index == arr.length - 1
+                            ? this.state.orderData.totalAmount + ""
+                            : undefined
+                        }
                         data={this.state.contractData}
                         loadData={this.ChangeDetail}
                         txt={this.state.processStateText}
@@ -1491,11 +1502,11 @@ const contractChange = Form.create()(
                       />
                     </TabPane>
                   ) : (
-                      ""
-                    )
-                ) : (
                     ""
-                  )}
+                  )
+                ) : (
+                  ""
+                )}
               </Tabs>
             </Modal>
             <Modal
@@ -1577,7 +1588,7 @@ const contractChange = Form.create()(
                         placeholder="请输入拒绝理由"
                         rows={4}
                         value={this.state.reason}
-                        onChange={e => {
+                        onChange={(e) => {
                           this.setState({ reason: e.target.value });
                         }}
                       />
@@ -1640,11 +1651,11 @@ const contractChange = Form.create()(
               width="1300px"
               onCancel={() => {
                 this.setState({
-                  dvisible: false
+                  dvisible: false,
                 });
                 this.state.pagination.pageSize = 10;
                 this.setState({
-                  pagination: this.state.pagination
+                  pagination: this.state.pagination,
                 });
                 this.loadData();
               }}
@@ -1657,9 +1668,9 @@ const contractChange = Form.create()(
                     // position: "relative",
                     // left: "50%",
                     // transform: "translate(-50%)",
-                    padding: "25px 30px 30px 30px"
+                    padding: "25px 30px 30px 30px",
                   }}
-                  ref={e => {
+                  ref={(e) => {
                     this.refs.all = e;
                   }}
                 >
@@ -1682,7 +1693,7 @@ const contractChange = Form.create()(
                       marginTop: 10,
                       position: "absolute",
                       top: 0,
-                      right: 30
+                      right: 30,
                     }}
                   >
                     打印

File diff suppressed because it is too large
+ 419 - 229
js/component/manageCenter/order/orderNew/examine.jsx


File diff suppressed because it is too large
+ 555 - 365
js/component/manageCenter/order/orderNew/inquiry.jsx


File diff suppressed because it is too large
+ 380 - 188
js/component/manageCenter/order/orderNew/outsourcingList.jsx


+ 293 - 99
js/component/manageCenter/order/orderNew/outsourcingPro.jsx

@@ -108,7 +108,7 @@ const outsourcingPro = Form.create()(
         visitModul: false,
         loading: true,
         ispage: pageNo,
-        modalVisible: false
+        modalVisible: false,
       });
       $.ajax({
         method: "get",
@@ -125,9 +125,9 @@ const outsourcingPro = Form.create()(
           starTime: this.state.releaseDate[0], //开始时间
           endTime: this.state.releaseDate[1], //结束时间
           refundStatus: this.state.refundStatusSearch, //外包审核状态
-          type: 1
+          type: 1,
         },
-        success: function(data) {
+        success: function (data) {
           ShowModal(this);
           let theArr = [];
           if (data.error.length || data.data.list == "") {
@@ -153,7 +153,7 @@ const outsourcingPro = Form.create()(
                 refundStatus: thisdata.refundStatus,
                 pname: thisdata.pname,
                 cname: thisdata.cname,
-                bname: thisdata.bname
+                bname: thisdata.bname,
               });
             }
             this.state.pagination.total = data.data.totalCount;
@@ -166,19 +166,20 @@ const outsourcingPro = Form.create()(
             dataSource: theArr,
             pageNo: pageNo,
             pagination: this.state.pagination,
-            selectedRowKeys: []
+            selectedRowKeys: [],
           });
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
     },
     getInitialState() {
       return {
+        rotateDeg: 0,
         page: 1,
         releaseDate: [],
         selectedRowKeys: [],
@@ -504,12 +505,12 @@ const outsourcingPro = Form.create()(
       this.setState({
         visible: false,
         remarks: undefined,
-        activeKey: "1"
+        activeKey: "1",
       });
     },
     nextCancel() {
       this.setState({
-        addnextVisible: false
+        addnextVisible: false,
       });
     },
     //订单详情
@@ -520,9 +521,9 @@ const outsourcingPro = Form.create()(
         crossDomain: false,
         url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
         data: {
-          orderNo: orderNos
+          orderNo: orderNos,
         },
-        success: function(data) {
+        success: function (data) {
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -552,6 +553,13 @@ const outsourcingPro = Form.create()(
                     globalConfig.avatarHost + "/upload"
                   )
                 : [], //图片地址
+              replenishUrl: thisdata.agreementUrl
+                ? splitUrl(
+                    thisdata.agreementUrl,
+                    ",",
+                    globalConfig.avatarHost + "/upload"
+                  )
+                : [], //图片地址
               salesmanName: thisdata.salesmanName, //营销员名称
               salesmanMobile: thisdata.salesmanMobile, //营销员电话
               oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
@@ -561,14 +569,14 @@ const outsourcingPro = Form.create()(
               nowFinance: thisdata.nowFinance, //财务名称
               nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
               depName: thisdata.depName,
-              outsource: thisdata.outsource == 0 ? "否" : "是"
+              outsource: thisdata.outsource == 0 ? "否" : "是",
             });
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -581,9 +589,9 @@ const outsourcingPro = Form.create()(
         crossDomain: false,
         url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
         data: {
-          orderNo: orderNos
+          orderNo: orderNos,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
 
           if (data.error.length || data.data.list == "") {
@@ -607,18 +615,18 @@ const outsourcingPro = Form.create()(
                 contacts: thisdata.contacts, //联系人
                 contactsMobile: thisdata.contactsMobile, //联系人电话
                 projectStatus: thisdata.projectStatus, //项目状态
-                splitStatus: thisdata.splitStatus
+                splitStatus: thisdata.splitStatus,
               });
             }
           }
           this.setState({
-            dataSourceX: theArr
+            dataSourceX: theArr,
           });
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -628,18 +636,18 @@ const outsourcingPro = Form.create()(
     showRes(record) {
       this.setState({
         resVisible: true,
-        resRecord: record
+        resRecord: record,
       });
     },
     resCancel() {
       this.setState({
-        resVisible: false
+        resVisible: false,
       });
     },
 
     rizhi() {
       this.setState({
-        loading: true
+        loading: true,
       });
       $.ajax({
         method: "get",
@@ -647,9 +655,9 @@ const outsourcingPro = Form.create()(
         crossDomain: false,
         url: "/api/admin/newOrder/selectOrderLog",
         data: {
-          orderNo: this.state.orderNo
+          orderNo: this.state.orderNo,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
           let thisData = data.data;
           if (!thisData.length) {
@@ -664,18 +672,18 @@ const outsourcingPro = Form.create()(
                 processName: thisdata.processName,
                 adminName: thisdata.adminName,
                 createDate: thisdata.createDate,
-                remarks: thisdata.remarks
+                remarks: thisdata.remarks,
               });
             }
           }
           this.setState({
-            dataSourcerizhi: theArr
+            dataSourcerizhi: theArr,
           });
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -683,13 +691,13 @@ const outsourcingPro = Form.create()(
 
     getOrderLog() {
       this.setState({
-        rizhivisible: true
+        rizhivisible: true,
       });
       this.rizhi();
     },
     closeOrderLog() {
       this.setState({
-        rizhivisible: false
+        rizhivisible: false,
       });
     },
     //节点列表
@@ -700,9 +708,9 @@ const outsourcingPro = Form.create()(
         crossDomain: false,
         url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
         data: {
-          orderNo: orderNos
+          orderNo: orderNos,
         },
-        success: function(data) {
+        success: function (data) {
           let theArr = [];
           let thisData = [];
           if (data.error.length || data.data.list == "") {
@@ -719,18 +727,18 @@ const outsourcingPro = Form.create()(
                   : "", //催款科目
                 id: thisData.id, //节点Id
                 money: thisData.money, //催款金额
-                dunStatus: thisData.dunStatus //催款状态
+                dunStatus: thisData.dunStatus, //催款状态
               });
             }
             this.setState({
-              contactList: theArr
+              contactList: theArr,
             });
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -743,9 +751,9 @@ const outsourcingPro = Form.create()(
         url:
           globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
         data: {
-          orderNo: orderNos
+          orderNo: orderNos,
         },
-        success: function(data) {
+        success: function (data) {
           if (data.error && data.error.length) {
             message.warning(data.error[0].message);
           } else {
@@ -772,7 +780,7 @@ const outsourcingPro = Form.create()(
                 effectiveCount: thisData.effectiveCount,
                 startDate: thisData.startDate,
                 dunType: thisData.dunType,
-                appropriationRatio: thisData.appropriationRatio
+                appropriationRatio: thisData.appropriationRatio,
               });
             }
             if (!totalCui) {
@@ -781,14 +789,14 @@ const outsourcingPro = Form.create()(
             totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
             this.setState({
               contactListNew: theArr,
-              totalCui
+              totalCui,
             });
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -799,7 +807,7 @@ const outsourcingPro = Form.create()(
           visible: true,
           loading: true,
           refundStatus: record.refundStatus,
-          tid: record.tid
+          tid: record.tid,
         },
         () => {
           console.log(this.state.tid);
@@ -818,9 +826,9 @@ const outsourcingPro = Form.create()(
           globalConfig.context + "/api/admin/outsourceOrg/orderOutsourceDtails",
         data: {
           orderNo: record.orderNo,
-          tid: record.tid
+          tid: record.tid,
         },
-        success: function(data) {
+        success: function (data) {
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -845,14 +853,14 @@ const outsourcingPro = Form.create()(
               companyName: thisdata.companyName,
               outsourceRemarks: thisdata.outsourceRemarks,
               unitNumber: thisdata.unitNumber,
-              unitPrice: thisdata.unitPrice
+              unitPrice: thisdata.unitPrice,
             });
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -868,7 +876,7 @@ const outsourcingPro = Form.create()(
         return;
       }
       this.setState({
-        loading: true
+        loading: true,
       });
       $.ajax({
         method: "post",
@@ -881,9 +889,9 @@ const outsourcingPro = Form.create()(
           tid: this.state.tid,
           remarks: this.state.remarks,
           refundStatus: 1,
-          type: 1
+          type: 1,
         },
-        success: function(data) {
+        success: function (data) {
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -891,16 +899,16 @@ const outsourcingPro = Form.create()(
           } else {
             message.success("该订单已通过");
             this.setState({
-              visible: false
+              visible: false,
             });
             this.cancel();
             this.loadData();
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -911,7 +919,7 @@ const outsourcingPro = Form.create()(
         return;
       }
       this.setState({
-        loading: true
+        loading: true,
       });
       $.ajax({
         method: "post",
@@ -924,9 +932,9 @@ const outsourcingPro = Form.create()(
           tid: this.state.tid,
           remarks: this.state.remarks,
           refundStatus: 2,
-          type: 1
+          type: 1,
         },
-        success: function(data) {
+        success: function (data) {
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -934,16 +942,16 @@ const outsourcingPro = Form.create()(
           } else {
             message.success("该订单已驳回");
             this.setState({
-              visible: false
+              visible: false,
             });
             this.cancel();
             this.loadData();
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -952,7 +960,7 @@ const outsourcingPro = Form.create()(
     outsourcing() {
       if (this.state.flag) return;
       this.setState({
-        flag: true
+        flag: true,
       });
       $.ajax({
         method: "post",
@@ -962,9 +970,9 @@ const outsourcingPro = Form.create()(
         data: {
           orderNo: this.state.orderNo,
           orderStatus: 2,
-          outsource: 1
+          outsource: 1,
         },
-        success: function(data) {
+        success: function (data) {
           if (data.error.length || data.data.list == "") {
             if (data.error && data.error.length) {
               message.warning(data.error[0].message);
@@ -973,15 +981,15 @@ const outsourcingPro = Form.create()(
             message.success("该订单已通过审核~");
             this.setState({
               visible: false,
-              flag: false
+              flag: false,
             });
             this.reset();
           }
-        }.bind(this)
+        }.bind(this),
       }).always(
-        function() {
+        function () {
           this.setState({
-            loading: false
+            loading: false,
           });
         }.bind(this)
       );
@@ -991,7 +999,7 @@ const outsourcingPro = Form.create()(
       let theorgCodeUrl = [];
       if (url.length) {
         let picArr = [];
-        url.map(function(item) {
+        url.map(function (item) {
           if (
             item.response &&
             item.response.data &&
@@ -1028,14 +1036,91 @@ const outsourcingPro = Form.create()(
     },
     callback(e) {
       this.setState({
-        activeKey: e
+        activeKey: e,
+      });
+    },
+
+    downImg() {
+      let num = 0;
+      for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+        if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+          num = i;
+        }
+      }
+      if (num == this.state.orgCodeUrl.length - 1) {
+        return message.warning("已经是最后一张了哦");
+      }
+      this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
+      this.setState({
+        previewImage: this.state.previewImage,
+        rotateDeg: 0,
+      });
+    },
+    upImg() {
+      let num = 0;
+      for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+        if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+          num = i;
+        }
+      }
+      if (num == 0) {
+        return message.warning("已经是第一张了哦");
+      }
+      this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
+      this.setState({
+        previewImage: this.state.previewImage,
+        rotateDeg: 0,
+      });
+    },
+    rotate() {
+      let rotateDeg = this.state.rotateDeg + 90;
+      this.setState({
+        rotateDeg,
+      });
+    },
+    downImgs() {
+      let num = 0;
+      for (let i = 0; i < this.state.replenishUrl.length; i++) {
+        if (this.state.replenishUrl[i].url == this.state.previewImage) {
+          num = i;
+        }
+      }
+      if (num == this.state.replenishUrl.length - 1) {
+        return message.warning("已经是最后一张了哦");
+      }
+      this.state.previewImage = this.state.replenishUrl[num + 1].url;
+      this.setState({
+        previewImage: this.state.previewImage,
+        rotateDeg: 0,
+      });
+    },
+    upImgs() {
+      let num = 0;
+      for (let i = 0; i < this.state.replenishUrl.length; i++) {
+        if (this.state.replenishUrl[i].url == this.state.previewImage) {
+          num = i;
+        }
+      }
+      if (num == 0) {
+        return message.warning("已经是第一张了哦");
+      }
+      this.state.previewImage = this.state.replenishUrl[num - 1].url;
+      this.setState({
+        previewImage: this.state.previewImage,
+        rotateDeg: 0,
+      });
+    },
+    rotates() {
+      let rotateDeg = this.state.rotateDeg + 90;
+      this.setState({
+        rotateDeg,
       });
     },
 
     render() {
       const formItemLayout = {
         labelCol: { span: 8 },
-        wrapperCol: { span: 14 }
+        wrapperCol: { span: 14 },
       };
       const FormItem = Form.Item;
       const { TextArea } = Input;
@@ -1071,10 +1156,10 @@ const outsourcingPro = Form.create()(
                     width: "150px",
                     marginBottom: "10px",
                     marginLeft: 10,
-                    marginRight: 10
+                    marginRight: 10,
                   }}
                   value={this.state.nameSearch}
-                  onChange={e => {
+                  onChange={(e) => {
                     this.setState({ nameSearch: e.target.value });
                   }}
                 />
@@ -1082,7 +1167,7 @@ const outsourcingPro = Form.create()(
                   placeholder="合同编号"
                   style={{ width: "150px" }}
                   value={this.state.contractNoSearch}
-                  onChange={e => {
+                  onChange={(e) => {
                     this.setState({ contractNoSearch: e.target.value });
                   }}
                 />
@@ -1094,7 +1179,7 @@ const outsourcingPro = Form.create()(
                       : null,
                     this.state.releaseDate[1]
                       ? moment(this.state.releaseDate[1])
-                      : null
+                      : null,
                   ]}
                   onChange={(data, dataString) => {
                     this.setState({ releaseDate: dataString });
@@ -1104,9 +1189,9 @@ const outsourcingPro = Form.create()(
                 <Select
                   value={this.state.refundStatusSearch}
                   style={{ width: 150, marginLeft: "10px" }}
-                  onChange={e => {
+                  onChange={(e) => {
                     this.setState({
-                      refundStatusSearch: e
+                      refundStatusSearch: e,
                     });
                   }}
                   placeholder="审核状态"
@@ -1292,38 +1377,147 @@ const outsourcingPro = Form.create()(
                               className="demandDetailShow-upload"
                               listType="picture-card"
                               fileList={this.state.orgCodeUrl}
-                              onPreview={file => {
+                              onPreview={(file) => {
                                 this.setState({
                                   previewImage: file.url || file.thumbUrl,
-                                  previewVisible: true
+                                  previewVisible: true,
                                 });
                               }}
                             ></Upload>
                             <Modal
                               maskClosable={false}
                               footer={null}
+                              width={"70%"}
                               visible={this.state.previewVisible}
                               onCancel={() => {
-                                this.setState({ previewVisible: false });
+                                this.setState({
+                                  previewVisible: false,
+                                  rotateDeg: 0,
+                                });
                               }}
                             >
                               <img
                                 alt=""
-                                style={{ width: "100%" }}
+                                style={{
+                                  width: "100%",
+                                  transform: `rotate(${this.state.rotateDeg}deg)`,
+                                }}
                                 src={this.state.previewImage || ""}
                               />
+                              <Button
+                                onClick={this.rotate}
+                                style={{
+                                  position: "relative",
+                                  left: "50%",
+                                  transform: "translateX(-50%)",
+                                }}
+                              >
+                                旋转
+                              </Button>
+                              <Button
+                                onClick={this.upImg}
+                                style={{
+                                  position: "absolute",
+                                  left: -81,
+                                  top: "50%",
+                                  transform: "translateY(-50%)",
+                                }}
+                              >
+                                上一张
+                              </Button>
+                              <Button
+                                onClick={this.downImg}
+                                style={{
+                                  position: "absolute",
+                                  right: -81,
+                                  top: "50%",
+                                  transform: "translateY(-50%)",
+                                }}
+                              >
+                                下一张
+                              </Button>
                             </Modal>
                             <Button
                               style={{
                                 float: "right",
                                 marginRight: "140px",
-                                marginTop: "20px"
+                                marginTop: "20px",
                               }}
                               onClick={this.getOrderLog}
                             >
                               查看订单日志
                             </Button>
                           </FormItem>
+                          <FormItem
+                            labelCol={{ span: 4 }}
+                            wrapperCol={{ span: 18 }}
+                            label="补充协议"
+                          >
+                            <Upload
+                              className="demandDetailShow-upload"
+                              listType="picture-card"
+                              fileList={this.state.replenishUrl}
+                              onPreview={(file) => {
+                                this.setState({
+                                  previewImage: file.url || file.thumbUrl,
+                                  previewVisible: true,
+                                });
+                              }}
+                            ></Upload>
+                            <Modal
+                              maskClosable={false}
+                              footer={null}
+                              width={"70%"}
+                              visible={this.state.previewVisible}
+                              onCancel={() => {
+                                this.setState({
+                                  previewVisible: false,
+                                  rotateDeg: 0,
+                                });
+                              }}
+                            >
+                              <img
+                                alt=""
+                                style={{
+                                  width: "100%",
+                                  transform: `rotate(${this.state.rotateDeg}deg)`,
+                                }}
+                                src={this.state.previewImage || ""}
+                              />
+                              <Button
+                                onClick={this.rotate}
+                                style={{
+                                  position: "relative",
+                                  left: "50%",
+                                  transform: "translateX(-50%)",
+                                }}
+                              >
+                                旋转
+                              </Button>
+                              <Button
+                                onClick={this.upImgs}
+                                style={{
+                                  position: "absolute",
+                                  left: -81,
+                                  top: "50%",
+                                  transform: "translateY(-50%)",
+                                }}
+                              >
+                                上一张
+                              </Button>
+                              <Button
+                                onClick={this.downImgs}
+                                style={{
+                                  position: "absolute",
+                                  right: -81,
+                                  top: "50%",
+                                  transform: "translateY(-50%)",
+                                }}
+                              >
+                                下一张
+                              </Button>
+                            </Modal>
+                          </FormItem>
                         </div>
                         <div className="clearfix">
                           <FormItem
@@ -1406,7 +1600,7 @@ const outsourcingPro = Form.create()(
                               style={{
                                 float: "right",
                                 marginRight: "50px",
-                                marginBottom: "15px"
+                                marginBottom: "15px",
                               }}
                             >
                               添加项目明细
@@ -1437,7 +1631,7 @@ const outsourcingPro = Form.create()(
                                 ? "none"
                                 : "inline-block",
                               marginLeft: 10,
-                              color: "red"
+                              color: "red",
                             }}
                           >
                             金额总计(万元): {this.state.totalCui}
@@ -1530,10 +1724,10 @@ const outsourcingPro = Form.create()(
                           className="demandDetailShow-upload"
                           listType="picture-card"
                           fileList={this.state.pictureUrl}
-                          onPreview={file => {
+                          onPreview={(file) => {
                             this.setState({
                               previewImage: file.url || file.thumbUrl,
-                              previewVisible: true
+                              previewVisible: true,
                             });
                           }}
                         ></Upload>
@@ -1572,7 +1766,7 @@ const outsourcingPro = Form.create()(
                               placeholder="请输入备注"
                               rows={4}
                               value={this.state.remarks}
-                              onChange={e => {
+                              onChange={(e) => {
                                 this.setState({ remarks: e.target.value });
                               }}
                               style={{ width: "440px" }}
@@ -1583,7 +1777,7 @@ const outsourcingPro = Form.create()(
                                 width: "160px",
                                 verticalAlign: "top",
                                 display: "inline-block",
-                                marginLeft: "10px"
+                                marginLeft: "10px",
                               }}
                             >
                               通过或驳回都必须填写审核意见!
@@ -1597,7 +1791,7 @@ const outsourcingPro = Form.create()(
                             loading={this.state.loading}
                             style={{
                               color: "#fff",
-                              backgroundColor: "#f04134"
+                              backgroundColor: "#f04134",
                             }}
                           >
                             驳回
@@ -1673,7 +1867,7 @@ const outsourcingPro = Form.create()(
           </div>
         </div>
       );
-    }
+    },
   })
 );
 export default outsourcingPro;

File diff suppressed because it is too large
+ 269 - 257
js/component/manageCenter/order/orderNew/reject.jsx


+ 200 - 13
js/component/manageCenter/project/project/projectQuery.jsx

@@ -93,6 +93,7 @@ const PaiDan = React.createClass({
   },
   getInitialState() {
     return {
+      rotateDeg: 0,
       searchMore: true,
       assignVisible: false,
       releaseDate: [],
@@ -343,6 +344,13 @@ const PaiDan = React.createClass({
                   globalConfig.avatarHost + "/upload"
                 )
               : [], //图片地址
+            replenishUrl: thisdata.agreementUrl
+              ? splitUrl(
+                  thisdata.agreementUrl,
+                  ",",
+                  globalConfig.avatarHost + "/upload"
+                )
+              : [], //图片地址
             salesmanName: thisdata.salesmanName, //营销员名称
             salesmanMobile: thisdata.salesmanMobile, //营销员电话
             financeName: thisdata.financeName, //财务名称
@@ -352,7 +360,7 @@ const PaiDan = React.createClass({
             nowFinance: thisdata.nowFinance, //财务名称
             nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
             depName: thisdata.depName, //订单部门
-            outsource: thisdata.outsource == 0 ? "否" : "是"
+            outsource: thisdata.outsource == 0 ? "否" : "是",
           });
         }
       }.bind(this)
@@ -582,6 +590,82 @@ const PaiDan = React.createClass({
       }.bind(this)
     );
   },
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+      if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.state.orgCodeUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  },
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+      if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  },
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg
+    });
+  },
+  downImgs() {
+    let num = 0;
+    for (let i = 0; i < this.state.replenishUrl.length; i++) {
+      if (this.state.replenishUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.state.replenishUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.state.replenishUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  },
+  upImgs() {
+    let num = 0;
+    for (let i = 0; i < this.state.replenishUrl.length; i++) {
+      if (this.state.replenishUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.state.replenishUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0
+    });
+  },
+  rotates() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg
+    });
+  },
   render() {
     const rowSelection = {
       selectedRowKeys: this.state.selectedRowKeys,
@@ -623,14 +707,14 @@ const PaiDan = React.createClass({
                 placeholder="客户名称"
                 value={this.state.customerName}
                 style={{ marginLeft: 10 }}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ customerName: e.target.value });
                 }}
               />
               <Input
                 placeholder="订单编号"
                 value={this.state.orderNoSearch}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
@@ -638,18 +722,18 @@ const PaiDan = React.createClass({
                 placeholder="选择部门"
                 style={{ width: 150, marginRight: "10px" }}
                 value={this.state.departmenttSearch}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ departmenttSearch: e });
                 }}
               >
-                {departmentArr.map(function(item) {
+                {departmentArr.map(function (item) {
                   return (
                     <Select.Option key={item.id}>{item.name}</Select.Option>
                   );
                 })}
               </Select>
               <Select
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ distribution: e });
                 }}
                 style={{ width: 160, marginRight: 5 }}
@@ -683,7 +767,7 @@ const PaiDan = React.createClass({
                       : null,
                     this.state.releaseDate[1]
                       ? moment(this.state.releaseDate[1])
-                      : null
+                      : null,
                   ]}
                   onChange={(data, dataString) => {
                     this.setState({ releaseDate: dataString });
@@ -859,38 +943,141 @@ const PaiDan = React.createClass({
                       className="demandDetailShow-upload"
                       listType="picture-card"
                       fileList={this.state.orgCodeUrl}
-                      onPreview={file => {
+                      onPreview={(file) => {
                         this.setState({
                           previewImage: file.url || file.thumbUrl,
-                          previewVisible: true
+                          previewVisible: true,
                         });
                       }}
                     ></Upload>
                     <Modal
                       maskClosable={false}
                       footer={null}
+                      width={"70%"}
                       visible={this.state.previewVisible}
                       onCancel={() => {
-                        this.setState({ previewVisible: false });
+                        this.setState({ previewVisible: false,rotateDeg: 0 });
                       }}
                     >
                       <img
                         alt=""
-                        style={{ width: "100%" }}
+                        style={{
+                          width: "100%",
+                          transform: `rotate(${this.state.rotateDeg}deg)`,
+                        }}
                         src={this.state.previewImage || ""}
                       />
+                      <Button
+                        onClick={this.rotate}
+                        style={{
+                          position: "relative",
+                          left: "50%",
+                          transform: "translateX(-50%)",
+                        }}
+                      >
+                        旋转
+                      </Button>
+                      <Button
+                        onClick={this.upImg}
+                        style={{
+                          position: "absolute",
+                          left: -81,
+                          top: "50%",
+                          transform: "translateY(-50%)",
+                        }}
+                      >
+                        上一张
+                      </Button>
+                      <Button
+                        onClick={this.downImg}
+                        style={{
+                          position: "absolute",
+                          right: -81,
+                          top: "50%",
+                          transform: "translateY(-50%)",
+                        }}
+                      >
+                        下一张
+                      </Button>
                     </Modal>
                     <Button
                       style={{
                         float: "right",
                         marginRight: "140px",
-                        marginTop: "20px"
+                        marginTop: "20px",
                       }}
                       onClick={this.getOrderLog}
                     >
                       查看订单 日志
                     </Button>
                   </FormItem>
+                  <FormItem
+                    labelCol={{ span: 4 }}
+                    wrapperCol={{ span: 18 }}
+                    label="补充协议"
+                  >
+                    <Upload
+                      className="demandDetailShow-upload"
+                      listType="picture-card"
+                      fileList={this.state.replenishUrl}
+                      onPreview={(file) => {
+                        this.setState({
+                          previewImage: file.url || file.thumbUrl,
+                          previewVisible: true,
+                        });
+                      }}
+                    ></Upload>
+                    <Modal
+                      maskClosable={false}
+                      footer={null}
+                      width={"70%"}
+                      visible={this.state.previewVisible}
+                      onCancel={() => {
+                        this.setState({ previewVisible: false,rotateDeg: 0 });
+                      }}
+                    >
+                      <img
+                        alt=""
+                        style={{
+                          width: "100%",
+                          transform: `rotate(${this.state.rotateDeg}deg)`,
+                        }}
+                        src={this.state.previewImage || ""}
+                      />
+                      <Button
+                        onClick={this.rotate}
+                        style={{
+                          position: "relative",
+                          left: "50%",
+                          transform: "translateX(-50%)",
+                        }}
+                      >
+                        旋转
+                      </Button>
+                      <Button
+                        onClick={this.upImgs}
+                        style={{
+                          position: "absolute",
+                          left: -81,
+                          top: "50%",
+                          transform: "translateY(-50%)",
+                        }}
+                      >
+                        上一张
+                      </Button>
+                      <Button
+                        onClick={this.downImgs}
+                        style={{
+                          position: "absolute",
+                          right: -81,
+                          top: "50%",
+                          transform: "translateY(-50%)",
+                        }}
+                      >
+                        下一张
+                      </Button>
+                    </Modal>
+                  </FormItem>
                 </div>
                 <div className="clearfix">
                   <FormItem
@@ -978,7 +1165,7 @@ const PaiDan = React.createClass({
                       style={{
                         float: "right",
                         marginRight: "50px",
-                        marginBottom: "15px"
+                        marginBottom: "15px",
                       }}
                     >
                       添加项目明细

+ 20 - 15
js/component/manageCenter/statistics/personnel/personnelAll.jsx

@@ -97,6 +97,7 @@ const PersonnelAll = React.createClass({
   },
   getInitialState() {
     return {
+      active: "1",
       detailFlag: false,
       editWelfareData: {},
       contractList: [],
@@ -687,7 +688,8 @@ const PersonnelAll = React.createClass({
       url: globalConfig.context + "/api/admin/personnel/updateWelfare",
       data: {
         startTimes:
-          this.state.editWelfareData.status == 1
+          this.state.editWelfareData.status == 1 ||
+          this.state.editWelfareData.status == 2
             ? this.state.editWelfareData.startTimes
             : "",
         endTimes:
@@ -695,12 +697,14 @@ const PersonnelAll = React.createClass({
             ? this.state.editWelfareData.endTimes
             : "",
         pdId: this.state.editWelfareData.pdId,
-        welfareRemarks: this.state.editWelfareData.status == 0 ? this.state
-          .editWelfareData.welfareRemarks : "",
+        welfareRemarks:
+          this.state.editWelfareData.status == 0
+            ? this.state.editWelfareData.welfareRemarks
+            : "",
         type: this.state.editWelfareData.type,
         id: this.state.editWelfareData.id,
         status: this.state.editWelfareData.status,
-        depId: this.state.editWelfareData.depId,
+        depId: this.state.editWelfareData.status == 0 ? "" : this.state.editWelfareData.depId,
       },
       success: function (data) {
         let theArr = [];
@@ -1221,7 +1225,8 @@ const PersonnelAll = React.createClass({
   cancel() {
     this.setState({
       visible: false,
-      detailFlag: false
+      detailFlag: false,
+      active: "1",
     });
   },
   tableRowClick(record) {
@@ -2978,8 +2983,8 @@ const PersonnelAll = React.createClass({
                 </div>
               </div>
             ) : (
-              <Tabs defaultActiveKey="1">
-                <TabPane tab="任职信息" key="1">
+              <Tabs activeKey={this.state.active} onChange={e => {this.setState({active: e})}}>
+                <TabPane tab="任职信息" key={1}>
                   <div className="title-peo">
                     <span>任职信息</span>
                     <Button
@@ -3096,7 +3101,7 @@ const PersonnelAll = React.createClass({
                     </FormItem>
                   </div>
                 </TabPane>
-                <TabPane tab="联系信息" key="2">
+                <TabPane tab="联系信息" key={2}>
                   <div className="title-peo">
                     <span>联系信息</span>
                     <Button
@@ -3161,7 +3166,7 @@ const PersonnelAll = React.createClass({
                     </div>
                   )}
                 </TabPane>
-                <TabPane tab="入职资料" key="3">
+                <TabPane tab="入职资料" key={3}>
                   <div className="title-peo">
                     <span>入职资料</span>
                     <Button
@@ -3238,7 +3243,7 @@ const PersonnelAll = React.createClass({
                     />
                   </div>
                 </TabPane>
-                <TabPane tab="晋升情况" key="4">
+                <TabPane tab="晋升情况" key={4}>
                   <div className="title-peo">
                     <span>晋升情况</span>
                     <Button
@@ -3339,7 +3344,7 @@ const PersonnelAll = React.createClass({
                     </div>
                   )}
                 </TabPane>
-                <TabPane tab="合同情况" key="5">
+                <TabPane tab="合同情况" key={5}>
                   <div className="title-peo">
                     <span>合同情况</span>
                     <Button
@@ -3431,7 +3436,7 @@ const PersonnelAll = React.createClass({
                     </div>
                   )}
                 </TabPane>
-                <TabPane tab="奖惩情况" key="6">
+                <TabPane tab="奖惩情况" key={6}>
                   <div className="title-peo">
                     <span>奖惩情况</span>
                     <Button
@@ -3522,7 +3527,7 @@ const PersonnelAll = React.createClass({
                     </div>
                   )}
                 </TabPane>
-                <TabPane tab="离职情况" key="7">
+                <TabPane tab="离职情况" key={7}>
                   <div className="title-peo">
                     <span>离职情况</span>
                     <Button
@@ -3603,7 +3608,7 @@ const PersonnelAll = React.createClass({
                     </div>
                   )}
                 </TabPane>
-                <TabPane tab="福利情况" key="8">
+                <TabPane tab="福利情况" key={8}>
                   <div className="title-peo" style={{ marginBottom: 10 }}>
                     <span>福利情况</span>
                     <Button
@@ -3684,7 +3689,7 @@ const PersonnelAll = React.createClass({
                     placeholder=""
                     style={{ width: 200 }}
                     disabled
-                    value={this.state.id}
+                    value={!this.state.isAddPeo ? this.state.id : undefined}
                     onChange={(e) => {
                       this.setState({
                         id: e.target.value,