Browse Source

人事管理开发4-29

mentoswzq 5 years ago
parent
commit
f8e436a0f8

+ 2 - 1
js/component/manageCenter/order/orderNew/checkOutsourcing.jsx

@@ -28,7 +28,8 @@ const checkOutsourcing = Form.create()(
           name: this.state.nameSearch, //名称
           starTime: this.state.releaseDate[0], //开始时间
           endTime: this.state.releaseDate[1], //结束时间
-          refundStatus: this.state.refundStatusSearch //外包审核状态
+          refundStatus: this.state.refundStatusSearch, //外包审核状态
+          type: 0
         },
         success: function(data) {
           let theArr = [];

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

@@ -1697,7 +1697,7 @@ const IntentionCustomer = Form.create()(
                 </TabPane>
                 <TabPane tab="外包(不走总部)" key="2">
                   <Spin spinning={this.state.loading}>
-                    <div className="clearfix">
+                    <div className="clearfix" style={{ marginTop: 10 }} >
                       <FormItem
                         className="half-item"
                         {...formItemLayout}

+ 621 - 98
js/component/manageCenter/statistics/personnel/personnelAll.jsx

@@ -1,5 +1,6 @@
 import React from "react";
 import $ from "jquery/src/ajax";
+import moment from "moment";
 import "@/manageCenter/financialManage/distribute/public.less";
 import { ChooseList } from "../../order/orderNew/chooseList";
 import { citySelect, provinceList, areaSelect, Birthplace } from "@/areaList";
@@ -24,6 +25,7 @@ import {
 } from "antd";
 import { splitUrl } from "@/tools";
 import { getProvinceList } from "@/addressList";
+import PicModal from "./picModal"
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
 const { TextArea } = Input;
@@ -31,7 +33,6 @@ const PersonnelAll = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
     this.setState({
-      page: pageNo,
       loading: true,
     });
     $.ajax({
@@ -219,7 +220,7 @@ const PersonnelAll = React.createClass({
           },
         },
         {
-          title: "子女",
+          title: "子/女",
           dataIndex: "son",
           key: "son",
           render: (text, record) => {
@@ -317,38 +318,18 @@ const PersonnelAll = React.createClass({
         },
         {
           title: "户籍地址",
-          dataIndex: "residenceProvince",
-          key: "residenceProvince",
-          render: (text, record) => {
-            if (text) {
-              return (
-                text +
-                record.residenceCity +
-                record.residenceArea +
-                record.residenceAddress
-              );
-            }
-          },
+          dataIndex: "residenceName",
+          key: "residenceName",
         },
         {
           title: "籍贯",
-          dataIndex: "nativePlaceProvince",
-          key: "nativePlaceProvince",
-          render: (text, record) => {
-            if (text) {
-              return text + record.nativePlaceCity;
-            }
-          },
+          dataIndex: "nativePlaceName",
+          key: "nativePlaceName",
         },
         {
           title: "现住地址",
-          dataIndex: "nowProvince",
-          key: "nowProvince",
-          render: (text, record) => {
-            if (text) {
-              return text + record.nowCity + record.nowArea + record.nowAddress;
-            }
-          },
+          dataIndex: "nowName",
+          key: "nowName",
         },
         {
           title: "离职时间",
@@ -388,55 +369,65 @@ const PersonnelAll = React.createClass({
         },
         {
           key: "出生月份",
-          value: "name",
+          value: "month",
         },
         {
           key: "门禁编号",
-          value: "name",
+          value: "doorId",
         },
         {
           key: "性别",
-          value: "name",
+          value: "sex",
+          render: (e) => {
+            if (e == 0) {
+              return "男";
+            } else if (e == 1) {
+              return "女";
+            }
+          },
         },
         {
           key: "年龄",
-          value: "name",
+          value: "age",
         },
         {
           key: "民族",
-          value: "name",
+          value: "nation",
         },
         {
           key: "户籍地址",
-          value: "name",
+          value: "residenceName",
         },
         {
           key: "籍贯",
-          value: "name",
+          value: "nativePlaceName",
         },
         {
           key: "身份证",
-          value: "name",
+          value: "idCard",
         },
         {
           key: "领证机关",
-          value: "name",
+          value: "certificationAuthority",
         },
         {
           key: "现住地址",
-          value: "name",
+          value: "nowName",
         },
         {
           key: "婚姻状态",
-          value: "name",
+          value: "marriageName",
         },
         {
-          key: "子女",
-          value: "name",
+          key: "子/女",
+          value: "son",
+          render: (e, i) => {
+            return e + "/" + i
+          }
         },
         {
           key: "政治面貌",
-          value: "name",
+          value: "politicalOutlookName",
         },
       ],
     };
@@ -647,8 +638,92 @@ const PersonnelAll = React.createClass({
   tableRowClick(record) {
     this.setState({
       visible: true,
-      ModalData: record
     })
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/personnel/selectBypdId",
+      data: {
+        id: record.id
+      },
+      success: function (data) {
+        let theArr = [];
+        if (data.error && data.error.length) {
+          message.warning(data.error[0].message);
+        } else {
+          this.setState({
+            ModalData: data.data
+          })
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+  search() {
+    this.loadData()
+  },
+  reset() {
+    this.state.nameSearch = undefined
+    this.state.statusSearch = undefined;
+    this.state.departmenttList = undefined;
+    this.state.sexSearch = undefined;
+    this.state.marriageSearch = undefined;
+    this.state.politicalOutlookSearch = undefined;
+    this.state.birthdayMonthSearch = undefined;
+    this.state.systemSearch = undefined;
+    this.state.workingYearsSearch = undefined;
+    this.state.educationSearch = undefined;
+    this.state.promotionTime = [];
+    this.state.entryTime = [];
+    this.state.quitTime = [];
+    this.state.contractTime = [];
+    this.loadData()
+  },
+  peoStatus(e) {
+    if(e == 0) {
+      return "在职(试用期)"
+    }else if(e == 1) {
+      return "在职(正式工)"
+    }else if(e == 2) {
+      return "离职"
+    }
+  },
+  jobStatus(e, i) {
+    if(e == 0) {
+      return "全职"
+    }else if(e == 1) {
+      return "兼职"
+    }else if(e == 2) {
+      return i
+    }
+  },
+  educationStatus(e) {
+    if(e == 0) {
+      return "高中/中专"
+    }else if(e == 1) {
+      return "专科/高职"
+    }else if(e == 2) {
+      return "本科"
+    }else if(e == 3) {
+      return "研究生"
+    }else if(e == 5) {
+      return "博士"
+    } 
+  },
+  picToArr(e) {
+    let arr = e.split(",")
+    console.log(arr);
+    
+    return arr
   },
   render() {
     const rowSelection = {
@@ -897,13 +972,6 @@ const PersonnelAll = React.createClass({
             </Button>
             <Button
               type="primary"
-              onClick={this.stayModal}
-              style={{ margin: "11px 0px 10px 10px" }}
-            >
-              修改任职信息
-            </Button>
-            <Button
-              type="primary"
               onClick={this.phoneModal}
               style={{ margin: "11px 0px 10px 10px" }}
             >
@@ -1024,6 +1092,9 @@ const PersonnelAll = React.createClass({
                 label="出生日期"
               >
                 <DatePicker
+                  value={
+                    this.state.birthdays ? moment(this.state.birthdays) : null
+                  }
                   onChange={(e, t) => {
                     this.setState({
                       birthdays: t,
@@ -1131,11 +1202,11 @@ const PersonnelAll = React.createClass({
               <FormItem className="half-item" {...formItemLayout} label="籍贯">
                 <Cascader
                   options={this.state.Birthplaces}
-                  value={this.state.native}
+                  value={this.state.nativePlace}
                   placeholder="选择城市"
                   style={{ width: "200px" }}
                   onChange={(e, pre) => {
-                    this.setState({ native: e });
+                    this.setState({ nativePlace: e });
                     console.log(e, pre);
                   }}
                 />
@@ -1292,9 +1363,9 @@ const PersonnelAll = React.createClass({
                   placeholder="请选择状态"
                   style={{ width: 200 }}
                   onChange={(e) => {
-                    this.setState({ zhiwei: e });
+                    this.setState({ status: e });
                   }}
-                  value={this.state.zhiwei}
+                  value={this.state.status}
                 >
                   <Option value="0">实习生</Option>
                   <Option value="1">在职(试用期)</Option>
@@ -1342,11 +1413,11 @@ const PersonnelAll = React.createClass({
                 <Input
                   placeholder="输入性质"
                   style={{ width: 80 }}
-                  disabled={this.state.jobNature == 2 ? false : true}
-                  value={this.state.xingzhi}
+                  disabled={this.state.jobNatureRemarks == 2 ? false : true}
+                  value={this.state.jobNatureRemarks}
                   onChange={(e) => {
                     this.setState({
-                      xingzhi: e.target.value,
+                      jobNatureRemarks: e.target.value,
                     });
                   }}
                 />
@@ -1362,10 +1433,13 @@ const PersonnelAll = React.createClass({
                 label="入职时间"
               >
                 <DatePicker
+                  value={
+                    this.state.entryTimes ? moment(this.state.entryTimes) : null
+                  }
                   style={{ width: 200 }}
                   onChange={(e, t) => {
                     this.setState({
-                      ruzhi: t,
+                      entryTimes: t,
                     });
                   }}
                 />
@@ -1376,10 +1450,15 @@ const PersonnelAll = React.createClass({
                 label="转正时间"
               >
                 <DatePicker
+                  value={
+                    this.state.promotionTimes
+                      ? moment(this.state.promotionTimes)
+                      : null
+                  }
                   style={{ width: 200 }}
                   onChange={(e, t) => {
                     this.setState({
-                      zhuanzheng: t,
+                      promotionTimes: t,
                     });
                   }}
                 />
@@ -1394,9 +1473,9 @@ const PersonnelAll = React.createClass({
                 <Select
                   placeholder="选择公司"
                   style={{ width: 200, marginRight: 10 }}
-                  value={this.state.suoxuangongs}
+                  value={this.state.company}
                   onChange={(e) => {
-                    this.setState({ suoxuangongs: e });
+                    this.setState({ company: e });
                   }}
                 >
                   {departmentArr.map(function (item) {
@@ -1408,12 +1487,12 @@ const PersonnelAll = React.createClass({
               </FormItem>
               <FormItem className="half-item" {...formItemLayout} label="级别">
                 <Select
-                  placeholder="请选择所属系统"
+                  placeholder="请选择所属级别"
                   style={{ width: 200 }}
                   onChange={(e) => {
-                    this.setState({ jibie: e });
+                    this.setState({ lvl: e });
                   }}
-                  value={this.state.jibie}
+                  value={this.state.lvl}
                 >
                   <Option value="0">员工</Option>
                   <Option value="1">主管</Option>
@@ -1431,9 +1510,9 @@ const PersonnelAll = React.createClass({
                 <Select
                   placeholder="选择职位"
                   style={{ width: 200, marginRight: 10 }}
-                  value={this.state.zhiwei}
+                  value={this.state.jobs}
                   onChange={(e) => {
-                    this.setState({ zhiwei: e });
+                    this.setState({ jobs: e });
                   }}
                 >
                   <Option value="0">员工</Option>
@@ -1448,12 +1527,12 @@ const PersonnelAll = React.createClass({
               </FormItem>
               <FormItem className="half-item" {...formItemLayout} label="星级">
                 <Select
-                  placeholder="请选择所属系统"
+                  placeholder="请选择所属星级"
                   style={{ width: 200 }}
                   onChange={(e) => {
-                    this.setState({ xingji: e });
+                    this.setState({ star: e });
                   }}
-                  value={this.state.xingji}
+                  value={this.state.star}
                 >
                   <Option value="0">一级</Option>
                   <Option value="1">二级</Option>
@@ -1476,10 +1555,10 @@ const PersonnelAll = React.createClass({
                 <Input
                   placeholder="输入金额"
                   style={{ width: 200 }}
-                  value={this.state.jintie}
+                  value={this.state.allowance}
                   onChange={(e) => {
                     this.setState({
-                      jintie: e.target.value,
+                      allowance: e.target.value,
                     });
                   }}
                 />
@@ -1856,19 +1935,218 @@ const PersonnelAll = React.createClass({
               {this.state.ModalData.name + "人事档案"}
             </h2>
             <ul className="peo-table">
-              {this.state.table.map(item => {
+              {this.state.table.map((item) => {
+                let value = item.value;
+                if (item.render) {
+                  let fn = item.render;
+                  return (
+                    <li>
+                      <div className="peo-left">{item.key}</div>
+                      <Tooltip
+                        placement="top"
+                        title={fn(
+                          this.state.ModalData[value],
+                          value == "son" ? this.state.ModalData.girl : 0
+                        )}
+                      >
+                        <div className="peo-right">
+                          {fn(
+                            this.state.ModalData[value],
+                            value == "son" ? this.state.ModalData.girl : 0
+                          )}
+                        </div>
+                      </Tooltip>
+                    </li>
+                  );
+                }
                 return (
                   <li>
                     <div className="peo-left">{item.key}</div>
-                    <Tooltip placement="top" title={this.state.ModalData[item.value]}>
+                    <Tooltip
+                      placement="top"
+                      title={this.state.ModalData[item.value]}
+                    >
                       <div className="peo-right">
-                        {this.state.ModalData[item.value]}
+                        {this.state.ModalData[value] &&
+                        this.state.ModalData[value].length > 10
+                          ? this.state.ModalData[value].substring(0, 10) + "..."
+                          : this.state.ModalData[value]}
                       </div>
                     </Tooltip>
                   </li>
                 );
               })}
             </ul>
+            <div className="title-peo">
+              <span>任职信息</span>
+              <Button
+                type="primary"
+                onClick={e => {
+                  this.stayModal(this.state.ModalData.id)
+                }}
+                style={{ position: "absolute", right: 0, height: 30 }}
+              >
+                修改任职信息
+              </Button>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="员工状态"
+              >
+                {this.state.ModalData.statusName}
+              </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="所属系统"
+              >
+                {this.state.ModalData.systemName}
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="工作性质"
+              >
+                {this.jobStatus(
+                  this.state.ModalData.jobNature,
+                  this.state.ModalData.jobNatureRemarks
+                )}
+              </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="工龄"
+              >
+                {this.state.ModalData.workingYear}
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="入职时间"
+              >
+                {this.state.ModalData.entryTimes}
+              </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="转正时间"
+              >
+                {this.state.ModalData.promotionTimes}
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="所属公司"
+              >
+                {this.state.ModalData.entryTimes}
+              </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="级别"
+              >
+                {this.state.ModalData.lvlName}
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="职位"
+              >
+                {this.state.ModalData.jobsName}
+              </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="岗位津贴"
+              >
+                {this.state.ModalData.allowance}
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="星级"
+              >
+                {this.state.ModalData.starName}
+              </FormItem>
+            </div>
+            <div className="title-peo">
+              <span>联系信息</span>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="手机号码"
+              >
+                {this.state.ModalData.mobile}
+              </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="电话"
+              >
+                {this.state.ModalData.fixedTel}
+              </FormItem>
+            </div>
+            {this.state.ModalData.contactList &&
+            this.state.ModalData.contactList.length > 0 ? (
+              this.state.ModalData.contactList.map((item, index) => {
+                return (
+                  <div className="clearfix">
+                    <FormItem
+                      className="half-item"
+                      labelCol={{ span: 6 }}
+                      wrapperCol={{ span: 30 }}
+                      label={"紧急联系人" + index}
+                    >
+                      {item.emergencyContact}
+                    </FormItem>
+                    <FormItem
+                      className="half-item"
+                      labelCol={{ span: 6 }}
+                      wrapperCol={{ span: 30 }}
+                      label={"紧急联系人" + index + "电话"}
+                    >
+                      {item.emergencyMobile}
+                    </FormItem>
+                  </div>
+                );
+              })
+            ) : (
+              <div
+                style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
+              >
+                暂无紧急联系人信息
+              </div>
+            )}
+            <div className="title-peo">
+              <span>入职资料</span>
+            </div>
             <div className="clearfix">
               <FormItem
                 className="half-item"
@@ -1876,16 +2154,9 @@ const PersonnelAll = React.createClass({
                 wrapperCol={{ span: 30 }}
                 label="毕业学校"
               >
-                <Input
-                  placeholder="输入学校名称"
-                  style={{ width: 200 }}
-                  value={this.state.school}
-                  onChange={(e) => {
-                    this.setState({
-                      school: e.target.value,
-                    });
-                  }}
-                />
+                {this.state.ModalData.personnelEntry
+                  ? this.state.ModalData.personnelEntry.school
+                  : ""}
               </FormItem>
               <FormItem
                 className="half-item"
@@ -1893,22 +2164,274 @@ const PersonnelAll = React.createClass({
                 wrapperCol={{ span: 30 }}
                 label="学历"
               >
-                <Select
-                  placeholder="请选择学历"
-                  style={{ width: 200 }}
-                  onChange={(e) => {
-                    this.setState({ politicalOutlook: e });
-                  }}
-                  value={this.state.politicalOutlook}
-                >
-                  <Option value="0">高中/中专</Option>
-                  <Option value="1">专科/高职</Option>
-                  <Option value="2">本科</Option>
-                  <Option value="3">研究生</Option>
-                  <Option value="4">博士</Option>
-                </Select>
+                {this.state.ModalData.personnelEntry
+                  ? this.educationStatus(
+                      this.state.ModalData.personnelEntry.education
+                    )
+                  : ""}
+              </FormItem>
+            </div>
+            <div className="clearfix">
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="所学专业"
+              >
+                {this.state.ModalData.personnelEntry
+                  ? this.state.ModalData.personnelEntry.major
+                  : ""}
               </FormItem>
+              <FormItem
+                className="half-item"
+                labelCol={{ span: 6 }}
+                wrapperCol={{ span: 30 }}
+                label="职称"
+              >
+                {this.state.ModalData.personnelEntry
+                  ? this.state.ModalData.personnelEntry.title
+                  : ""}
+              </FormItem>
+            </div>
+            <div className="clearfix" style={{ paddingLeft: 70 }}>
+              <div style={{ marginBottom: 10 }}>附件:</div>
+              <PicModal
+                remarks={
+                  this.state.ModalData.personnelEntry
+                    ? this.picToArr(
+                        this.state.ModalData.personnelEntry.annexName
+                      )
+                    : []
+                }
+                picUrl={
+                  this.state.ModalData.personnelEntry
+                    ? this.picToArr(
+                        this.state.ModalData.personnelEntry.annexUrl
+                      )
+                    : []
+                }
+              />
+            </div>
+            <div className="title-peo">
+              <span>晋升情况</span>
             </div>
+            {this.state.ModalData.promotionList &&
+            this.state.ModalData.promotionList.length > 0 ? (
+              this.state.ModalData.promotionList.map((item, index) => {
+                return (
+                  <div
+                    style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
+                  >
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="晋升职位"
+                      >
+                        {item.oldJobsName + "--->" + item.newJobsName}
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="晋升等级"
+                      >
+                        {item.oldLvlName + "--->" + item.newLvlName}
+                      </FormItem>
+                    </div>
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="晋升时间"
+                      >
+                        {item.promotionTimes}
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="晋升备注"
+                      >
+                        {item.promotionRemarks}
+                      </FormItem>
+                    </div>
+                    <div
+                      className="clearfix"
+                      style={{ paddingLeft: 70, marginBottom: 10 }}
+                    >
+                      <div style={{ marginBottom: 10 }}>附件:</div>
+                      <PicModal
+                        remarks={this.picToArr(item.annexName)}
+                        picUrl={this.picToArr(item.annexUrl)}
+                      />
+                    </div>
+                  </div>
+                );
+              })
+            ) : (
+              <div
+                style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
+              >
+                暂无晋升情况
+              </div>
+            )}
+            <div className="title-peo">
+              <span>合同情况</span>
+            </div>
+            {this.state.ModalData.contractList &&
+            this.state.ModalData.contractList.length > 0 ? (
+              this.state.ModalData.contractList.map((item, index) => {
+                return (
+                  <div
+                    style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
+                  >
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="签订时间"
+                      >
+                        {item.startTimes}
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="到期时间"
+                      >
+                        {item.endTimes}
+                      </FormItem>
+                    </div>
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="备注"
+                      >
+                        {item.contractRemarks}
+                      </FormItem>
+                    </div>
+                    <div
+                      className="clearfix"
+                      style={{ paddingLeft: 70, marginBottom: 10 }}
+                    >
+                      <div style={{ marginBottom: 10 }}>附件:</div>
+                      <PicModal
+                        remarks={this.picToArr(item.annexName)}
+                        picUrl={this.picToArr(item.annexUrl)}
+                      />
+                    </div>
+                  </div>
+                );
+              })
+            ) : (
+              <div
+                style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
+              >
+                暂无合同情况
+              </div>
+            )}
+            <div className="title-peo">
+              <span>奖惩情况</span>
+            </div>
+            {this.state.ModalData.chooseList &&
+            this.state.ModalData.chooseList.length > 0 ? (
+              this.state.ModalData.chooseList.map((item, index) => {
+                return (
+                  <div
+                    style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
+                  >
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label={item.chooseStatus == 0 ? "奖励" : "惩罚"}
+                      >
+                        {item.chooseRemarks}
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="时间"
+                      >
+                        {item.effectTimes}
+                      </FormItem>
+                    </div>
+                    <div
+                      className="clearfix"
+                      style={{ paddingLeft: 70, marginBottom: 10 }}
+                    >
+                      <div style={{ marginBottom: 10 }}>附件:</div>
+                      <PicModal
+                        remarks={this.picToArr(item.annexName)}
+                        picUrl={this.picToArr(item.annexUrl)}
+                      />
+                    </div>
+                  </div>
+                );
+              })
+            ) : (
+              <div
+                style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
+              >
+                暂无奖惩情况
+              </div>
+            )}
+            <div className="title-peo">
+              <span>离职情况</span>
+            </div>
+            {this.state.ModalData.quitList &&
+            this.state.ModalData.quitList.length > 0 ? (
+              this.state.ModalData.quitList.map((item, index) => {
+                return (
+                  <div
+                    style={{ width: "100%", borderBottom: "1px dashed #ccc" }}
+                  >
+                    <div className="clearfix">
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="离职时间"
+                      >
+                        {item.effectTimes}
+                      </FormItem>
+                      <FormItem
+                        className="half-item"
+                        labelCol={{ span: 6 }}
+                        wrapperCol={{ span: 30 }}
+                        label="离职备注"
+                      >
+                        {item.quitRemarks}
+                      </FormItem>
+                    </div>
+                    <div
+                      className="clearfix"
+                      style={{ paddingLeft: 70, marginBottom: 10 }}
+                    >
+                      <div style={{ marginBottom: 10 }}>附件:</div>
+                      <PicModal
+                        remarks={this.picToArr(item.annexName)}
+                        picUrl={this.picToArr(item.annexUrl)}
+                      />
+                    </div>
+                  </div>
+                );
+              })
+            ) : (
+              <div
+                style={{ textAlign: "center", height: 60, lineHeight: "60px" }}
+              >
+                暂无奖惩情况
+              </div>
+            )}
           </Spin>
         </Modal>
       </div>

+ 16 - 0
js/component/manageCenter/statistics/personnel/personnelList.less

@@ -28,6 +28,7 @@
             border-right: 1px solid #ccc;
             box-sizing: border-box;
             float: left;
+            background-color: #eee;
         }
         .peo-right {
             width: 60%;
@@ -37,3 +38,18 @@
         }
     }
 }
+.title-peo {
+    margin-top: 10px;
+    width: 100%;
+    height: 30px;
+    line-height: 30px;
+    text-align: center;
+    font-size: 20px;
+    background-color: skyblue;
+    h6 {
+        line-height: 40px;
+    }
+}
+.ant-form-item {
+    margin-bottom: 0px !important;
+}

+ 100 - 9
js/component/manageCenter/statistics/personnel/picModal.jsx

@@ -1,10 +1,12 @@
 import React from "react";
-import { Spin, Button, Tabs, Table, message, Modal } from "antd";
+import { Spin, Button, Tabs, Table, message, Modal, Upload } from "antd";
+import { splitUrl } from "@/tools";
 
 const ShowModal = React.createClass({
   getInitialState() {
     return {
       newVisible: false,
+      rotateDeg: 0,
     };
   },
   componentWillReceiveProps(nextProps) {
@@ -22,20 +24,56 @@ const ShowModal = React.createClass({
     //   });
     // },)
   },
+  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
+    });
+  },
   render() {
     return (
       <div>
-          {this.props.picUrl.map(item => {
+        {this.props.picUrl.map((item, index) => {
+          return (
+            <div style={{ display: "inline-block" }}>
               <Upload
                 className="demandDetailShow-upload"
                 listType="picture-card"
                 fileList={
                   item
-                    ? splitUrl(
-                        item,
-                        ",",
-                        globalConfig.avatarHost + "/upload"
-                      )
+                    ? splitUrl(item, ",", globalConfig.avatarHost + "/upload")
                     : []
                 }
                 onPreview={(file) => {
@@ -44,8 +82,61 @@ const ShowModal = React.createClass({
                     previewVisible: true,
                   });
                 }}
-              />;
-          })}
+              />
+              <div style={{ textAlign: "center" }}>{this.props.remarks[index]}</div>
+            </div>
+          );
+        })}
+        <Modal
+          maskClosable={false}
+          footer={null}
+          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.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>
       </div>
     );
   },

+ 1 - 1
package.json

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