import React, { Component } from "react";
import {
  message,
  Popconfirm,
  Modal,
  Form,
  DatePicker,
  Select,
  Radio,
  Tag,
  Spin,
  Input,
  Button,
  Checkbox,
  Table,
  AutoComplete,
} from "antd";
import $ from "jquery/src/ajax";
import Print from 'react-print-html';
import moment from 'moment';
import ReactToPrint from 'react-to-print';
import html2canvas from 'html2canvas';
import MyComponent from './progressSelect';

import './progress.less';

const { TextArea } = Input;
const RadioGroup = Radio.Group;
const CheckboxGroup = Checkbox.Group;
class Progress extends Component {
  constructor(props) {
    super(props);
    this.state = {
      visible: false,
      logvisible: false,
      loading: false,
      isPrint: false,
      data: {},
      obj: {},
      logData: [],
      columns: [
        {
          title: '检查开始时间',
          dataIndex: 'startTime',
          key: 'startTime',
          render: (text, record) => {
            return (
              <span>{text || record.startTimeStr}</span>
            )
          }
        },
        {
          title: '检查结束时间',
          dataIndex: 'endTime',
          key: 'endTime',
          render: (text, record) => {
            return (
              <span>{text || record.endTimeStr}</span>
            )
          }
        },
        {
          title: '检查部门',
          dataIndex: 'depName',
          key: 'depName',
        },
        {
          title: '被检查年度',
          dataIndex: 'yearFeature',
          key: 'yearFeature',
        },
        {
          title: '检查方式',
          dataIndex: 'inspectWay',
          key: 'inspectWay',
          render: (text, record) => {
            return (
              <span>{['线上', '线下'][text]}</span>
            )
          }
        },
        {
          title: '检查类别',
          dataIndex: 'type',
          key: 'type',
          render: (text, record) => {
            return (
              <span>{[record.typeOther, '高新技术税收优惠政策检查', '加计扣除税收优惠政策检查', '税务常规检查', '税务对研发费用检查', '税务稽查'][text]}</span>
            )
          }
        },
        {
          title: '检查事项',
          dataIndex: 'inspectionItems',
          key: 'inspectionItems',
          width: '10%',
          render: (text, record) => {
            return (
              <span>{[record.inspectionItemsOther, '高新产品收入不达标', '人员人工费用问题检查', '研发费用占比不达标', '属于多个类别', '其他事项检查'][text]}</span>
            )
          }
        },
        {
          title: '企业问题点',
          dataIndex: 'enterpriseProblems',
          key: 'enterpriseProblems',
          width: '10%',
        },
        {
          title: '解决方式',
          dataIndex: 'solution',
          key: 'solution',
          width: '10%',
        },
        {
          title: '检查后结论',
          dataIndex: 'inspectionConclusion',
          key: 'inspectionConclusion',
          width: '10%',
          render: (text, record) => {
            return (
              <span>{['其他', '被取消高新认定资格', '不通过', '合规通过', '通过', '无结论', '要求整改'][text]}</span>
            )
          }
        },
        {
          title: '是否提醒企业专人跟进事宜',
          dataIndex: 'remindFollow',
          key: 'remindFollow',
          width: 90,
          render: (text, record) => {
            return (
              <span>{['未提醒', '已提醒'][text]}</span>
            )
          }
        },
        {
          title: '备注',
          dataIndex: 'remarks',
          key: 'remarks',
          width: '10%',
        },

      ],
      logcolumns: [
        {
          title: '序号',
          dataIndex: 'id',
          key: 'id',
        },
        {
          title: '修改人',
          dataIndex: 'aname',
          key: 'aname',
        },
        {
          title: '修改时间',
          dataIndex: 'createTime',
          key: 'createTime',
        },
        {
          title: '操作',
          dataIndex: 'op',
          key: 'op',
          render: (text, record) => {
            return (
              <MyComponent id={record.id} />
            )
          }
        },
      ],
      pagination: {
        defaultCurrent: 1,
        defaultPageSize: 10,
        showQuickJumper: true,
        pageSize: 10,
        onChange: function (page) {
          this.logList(page);
        }.bind(this),
        showTotal: function (total) {
          return "共" + total + "条数据";
        },
      },
      projectV: false,
      HYlist: [],

    }
    this.onSubmit = this.onSubmit.bind(this);
    this.handleOk = this.handleOk.bind(this);
    this.handleCancel = this.handleCancel.bind(this);
    this.onRowDoubleClick = this.onRowDoubleClick.bind(this);
    this.deleteTaskFeature = this.deleteTaskFeature.bind(this);
  }

  componentDidMount() {
    this.getByTid()
  }

  // 项目进度详情
  getByTid() {
    this.setState({
      loading: true,
    })
    $.ajax({
      method: 'get',
      dataType: 'json',
      crossDomain: false,
      url: globalConfig.context + '/api/admin/taskDetails/getByTid',
      data: {
        id: this.props.tid,
      },
      success: function (data) {
        if (data.error && data.error.length) {
          message.warning(data.error[0].message)
        } else {
          let obj = data.data
          obj.phasedContent = !obj.phasedContent ? [] : obj.phasedContent.split(',')
          this.setState({
            data: obj,
          })
          if (!obj.projectId) {
            this.setState({
              projectV: true
            })
          }
        }
      }.bind(this),
    }).always(
      function () {
        this.setState({
          loading: false,
        })
      }.bind(this)
    )
  }
  // 创建、编辑项目进度表
  onSubmit() {
    const { data } = this.state
    const { tid } = this.props
    if (data.torchStatus == 0 && !data.torchOther) {
      message.warning("请填写火炬统计其他说明！")
      return
    }
    if (data.statisticsStatus == 0 && !data.statisticsOther) {
      message.warning("请填写统计年报其他说明！")
      return
    }
    if (data.chStatus == 0 && !data.chOther) {
      message.warning("请填写高企年报其他说明！")
      return
    }
    if (data.finalSettlementStatus == 0 && !data.finalSettlementOther) {
      message.warning("请填写汇算清缴其他说明！")
      return
    }
    if (data.rdReservesStatus == 0 && !data.rdReservesOther) {
      message.warning("请填写研发准备金备案其他说明！")
      return
    }
    if (data.rdAwardCompensationStatus == 0 && !data.rdAwardCompensationOther) {
      message.warning("请填写研发奖补申请其他说明！")
      return
    }
    if (data.adDeliverStatus == 0 && !data.adDeliverOther) {
      message.warning("请填写加扣备查交付其他说明！")
      return
    }
    if (data.htDeliverStatus == 0 && !data.htDeliverOther) {
      message.warning("请填写高新备查交付其他说明！")
      return
    }
    if (data.closeMeetingStatus == 0 && !data.closeMeetingOther) {
      message.warning("请填写召开上年度总结及本年工作计划其他说明！")
      return
    }
    if (data.adPrepareJulyStatus == 0 && !data.adPrepareJulyOther) {
      message.warning("请填写加计预申报7月其他说明！")
      return
    }
    if (data.adPrepareOctoberStatus == 0 && !data.adPrepareOctoberOther) {
      message.warning("请填写加计预申报10月其他说明！")
      return
    }
    if (data.reviewProvince == 1 && !data.reviewProvinceNumber) {
      message.warning("请填写公示序号！")
      return
    }
    if (data.reviewCountry == 1 && !data.reviewCountryNumber) {
      message.warning("请填写高企编号！")
      return
    }
    data.tid = tid;
    data.phasedContent = data.phasedContent.toString();
    this.setState({
      loading: true,
    })
    $.ajax({
      method: 'POST',
      dataType: 'json',
      crossDomain: false,
      url: globalConfig.context + (!data.id ? '/api/admin/taskDetails/add' : '/api/admin/taskDetails/update'),
      data,
    }).done(
      function (data) {
        this.setState({
          loading: false,
        })
        if (!data.error.length) {
          message.success('保存成功！')
          this.getByTid()
        } else {
          message.warning(data.error[0].message)
        }
      }.bind(this)
    )
  }
  // 下载图片
  download() {
    const canvas2 = document.createElement('canvas');
    let _canvas = document.getElementById('count'); // 指定要截图的DOM元素

    const w = parseInt(window.getComputedStyle(_canvas).width);
    const h = parseInt(window.getComputedStyle(_canvas).height);
    // 设置画布大小，可以根据需要调整
    canvas2.width = w * 3.3;
    canvas2.height = h * 2.3;

    const context = canvas2.getContext('2d');
    context.fillStyle = '#fff'
    context.scale(2, 2);
    window.scrollTo(0, 0); // 确保页面滚动到顶部，避免截图偏移

    this.updateDownload(this.state.data.id);

    html2canvas(_canvas, { canvas: canvas2 }).then(function (canvas) {
      const imgUri = canvas.toDataURL('image/png').replace('image/png', 'image/octet-stream');
      const timestamp = Date.now();
      // 此处可以添加下载图片的逻辑，如创建一个下载链接并触发点击事件
      const link = document.createElement("a");
      link.href = imgUri;
      link.download = `schedule${timestamp}.png`;
      document.body.appendChild(link);
      link.click();
      document.body.removeChild(link);
    });
  }
  // 数字判定
  onChange(e, lable) {
    const { data } = this.state
    const { value } = e.target;
    const reg = /^-?(0|[1-9][0-9]*)(\.[0-9]*)?$/;
    if ((!isNaN(value) && reg.test(value)) || value === '' || value === '-') {
      this.setState({
        data: Object.assign(data, {
          [lable]: value,
        }),
      })
    }
  }
  // 计算长度
  handleChange(lable, width = 40, type = "number") {
    const { data } = this.state
    let newWidth = width
    if (type == "number") {
      newWidth = !!data[lable] ? Math.max(width, data[lable].toString().length * 8) : width;
    } else {
      newWidth = !!data[lable] ? Math.max(width, data[lable].toString().length * 14) : width;
    }
    if (newWidth > 150) {
      return "150px"
    } else {
      return newWidth + "px"
    }

  }
  // 特色工作
  addTaskFeature() {
    const { obj, data } = this.state
    if (obj.type == 0 && !obj.typeOther) {
      message.warning("请填写检查类别其他说明！")
      return
    }
    if (obj.inspectionItems == 0 && !obj.inspectionItemsOther) {
      message.warning("请填写检查事项其他说明！")
      return
    }
    if (obj.id) {
      delete obj.createTime
      delete obj.startTime
      delete obj.endTime
    } else {
      obj.tdid = data.id
    }
    this.setState({
      loading: true,
    })
    $.ajax({
      method: 'POST',
      dataType: 'json',
      crossDomain: false,
      url: globalConfig.context + (!obj.id ? '/api/admin/taskDetails/addTaskFeature' : '/api/admin/taskDetails/updateTaskFeature'),
      data: obj,
    }).done(
      function (data) {
        this.setState({
          loading: false,
        })
        if (!data.error.length) {
          message.success('操作成功！')
          this.getByTid()
          this.handleCancel()
        } else {
          message.warning(data.error[0].message)
        }
      }.bind(this)
    )
  }
  // 删除特色工作
  deleteTaskFeature(id) {
    $.ajax({
      method: 'POST',
      dataType: 'json',
      crossDomain: false,
      url: '/api/admin/taskDetails/deleteTaskFeature',
      data: {
        id
      },
    }).done(
      function (data) {
        this.setState({
          loading: false,
        })
        if (!data.error.length) {
          message.success('删除成功！')
          this.getByTid()
          this.handleCancel()
        } else {
          message.warning(data.error[0].message)
        }
      }.bind(this)
    )
  }
  // 修改下载时间
  updateDownload(id) {
    $.ajax({
      method: 'POST',
      dataType: 'json',
      crossDomain: false,
      url: '/api/admin/taskDetails/updateDownload',
      data: {
        id
      },
    }).done(
      function (data) {
        this.setState({
          loading: false,
        })
        if (!data.error.length) {
          this.getByTid()
        } else {
          message.warning(data.error[0].message)
        }
      }.bind(this)
    )
  }
  // 日志
  logList(pageNo) {
    const { pagination } = this.state;
    let datas = {
      pageNo: pageNo || 1,
      pageSize: pagination.pageSize,
      id: this.state.data.id,
    };
    $.ajax({
      method: 'get',
      dataType: 'json',
      crossDomain: false,
      url: globalConfig.context + '/api/admin/taskDetails/logList',
      data: datas,
      success: function (data) {
        if (data.data.list) {
          pagination.current = data.data.pageNo;
          pagination.total = data.data.totalCount;
          if (data.data && data.data.list && !data.data.list.length) {
            pagination.current = 0;
            pagination.total = 0;
          }
          this.setState({
            logData: data.data.list,
            pagination: this.state.pagination,
            pageNo: data.data.pageNo,

          });
        } else {
          this.setState({
            logData: data.data,
            pagination: false,
          });
        }
      }.bind(this),
    }).always(
      function () {
        this.setState({
          loading: false,
        })
      }.bind(this)
    )
  }
  // 双击
  onRowDoubleClick(record) {
    let row = {}
    row.startTimeStr = record.startTime
    row.endTimeStr = record.endTime
    this.setState({
      obj: Object.assign(record, row),
      visible: true,
    })
  }
  // 占比计算
  getProportion(lable, num1, num2) {
    const { data } = this.state
    let formattedPercentage = 0
    if (!num1 || !num2) {
      formattedPercentage = 0
    } else {
      let percentage = (num1 / num2) * 100;
      formattedPercentage = percentage.toFixed(2);
    }
    // return formattedPercentage
    this.setState({
      data: Object.assign(data, {
        [lable]: formattedPercentage,
      }),
    })
  }
  // 查询订单负责人列表
  followUpHY(e) {
    this.setState({
      projectDirector: e
    });
    $.ajax({
      method: "get",
      dataType: "json",
      crossDomain: false,
      url: globalConfig.context + "/api/admin/customer/listAdminByName",
      data: {
        adminName: e,
      },
      success: function (data) {
        let thedata = data.data;
        if (!thedata) {
          if (data.error && data.error.length) {
            message.warning(data.error[0].message);
          }
          thedata = {};
        }
        this.setState({
          HYlist: thedata,
        });
      }.bind(this),
    }).always(
      function () {
        this.setState({
          loading: false,
        });
      }.bind(this)
    );
  }
  // 选中订单负责人
  selectHY(value) {
    const { HYlist } = this.state;
    const newdataSources = JSON.stringify(HYlist) == "{}" ? [] : HYlist;
    this.setState({
      projectId: newdataSources.find((item) => item.name == value).id,
    });
  }

  addProjectName() {
    const {  data } = this.state
    data.phasedContent = data.phasedContent.toString();
    if (!this.state.data.id) {
      $.ajax({
        method: 'POST',
        dataType: 'json',
        crossDomain: false,
        url: globalConfig.context + '/api/admin/taskDetails/add',
        data,
      }).done(
        function (data) {
          if (!data.error.length) {
            this.updateProjectName(data.data.id)
          } else {
            message.warning(data.error[0].message)
          }
        }.bind(this)
      )
    } else {
      this.updateProjectName()
    }
  }

  updateProjectName(id) {
    $.ajax({
      url: globalConfig.context + '/api/admin/taskDetails/update',
      method: 'post',
      data: {
        id: this.state.data.id || id,
        tid: this.state.data.tid,
        projectName: this.state.projectDirector,
        projectId: this.state.projectId,
      },
    }).done(
      function (data) {
        if (!data.error.length) {
          this.setState({
            projectV: false,
          })
          this.getByTid()
        } else {
          message.warning(data.error[0].message)
        }
      }.bind(this)
    )
  }

  handleOk() {
    this.addTaskFeature()
  }

  handleCancel() {
    this.setState({
      visible: false,
      obj: {}
    })
  }

  render() {
    const { columns, data, visible, obj } = this.state
    const radioStyle = {
      // display: 'block',
      // height: '30px',
      // lineHeight: '30px',
    };
    const formItemLayout = {
      labelCol: { span: 8 },
      wrapperCol: { span: 14 },
    }
    const mothOptions = [
      { label: '1月', value: '1' },
      { label: '2月', value: '2' },
      { label: '3月', value: '3' },
      { label: '4月', value: '4' },
      { label: '5月', value: '5' },
      { label: '6月', value: '6' },
      { label: '7月', value: '7' },
      { label: '8月', value: '8' },
      { label: '9月', value: '9' },
      { label: '10月', value: '10' },
      { label: '11月', value: '11' },
      { label: '12月', value: '12' },
    ]
    const dataSources = this.state.HYlist || [];
    const options = dataSources.map((group) => (
      <Select.Option key={group.id} value={group.name}>
        {group.name}
      </Select.Option>
    ));
    return (
      <div className="progress" >
        {data.updateStatus == 0 && <div className="popup"></div>}
        <Spin spinning={this.state.loading}>
          <div
            id="count"
            className="pro-content"
            ref={ref => {
              this.printTemp = ref;
            }}
          >
            <div className="pc-title">{data.userName}</div>
            <div className="pc-row">
              <div className="pr-item">
                <div><span>合同编号：</span>{data.contractNo}</div>
                <div>&nbsp;</div>
                <div>
                  <span>会员等级：</span>{['', 'A', 'AA', 'AAA'][data.memberLvl]}&nbsp;&nbsp;&nbsp;&nbsp;
                  <Tag color="#2db7f5"><span style={{ color: "#fff" }}>会员</span></Tag>
                </div>
              </div>
              <div className="pr-item">
                <div className="pi-tit">服务内容</div>
                {
                  !!data.taskList && data.taskList.map(item =>
                    <div key={item.id}>{item.taskName}&nbsp;{item.serviceYear}</div>
                  )
                }
              </div>
              <div className="pr-itemsss">
                <div className="pi-tit">服务团队</div>
                <div>
                  <span>业务负责人：</span>
                  <Input
                    style={{ width: this.handleChange('taskName', 60, 'string') }}
                    value={data.taskName}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          taskName: e.target.value,
                        }),
                      })
                    }}
                  />
                  {/* &nbsp;&nbsp;&nbsp;&nbsp; */}
                </div>
                <div>
                  <span>项目负责人：</span>
                  <Input
                    style={{ width: this.handleChange('projectName', 60, 'string') }}
                    value={data.projectName}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          projectName: e.target.value,
                        }),
                      })
                    }}
                    onClick={() => {
                      this.setState({
                        projectV: true
                      })
                    }}
                  />

                </div>
                <div>
                  <span>技术咨询师：</span>
                  <Input
                    style={{ width: this.handleChange('technologyName', 60, 'string') }}
                    value={data.technologyName}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          technologyName: e.target.value,
                        }),
                      })
                    }}
                  />
                  {/* &nbsp;&nbsp;&nbsp;&nbsp; */}
                </div>
                <div>
                  <span>财税咨询师：</span>
                  <Input
                    style={{ width: this.handleChange('financeTaxationName', 60, 'string') }}
                    value={data.financeTaxationName}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          financeTaxationName: e.target.value,
                        }),
                      })
                    }}
                  />
                </div>
              </div>
              {
                !this.state.isPrint &&
                <div className="pr-item no-print">
                  <div style={{ display: 'flex', justifyContent: 'center' }}>
                    <ReactToPrint
                      trigger={() => (
                        <Button
                          type="primary"
                        >
                          打印
                        </Button>
                      )}
                      content={() => this.printTemp}
                      onAfterPrint={() => {
                        this.updateDownload(data.id)
                      }}
                    />
                    <Button
                      type="primary"
                      onClick={() => {
                        const _this = this
                        this.setState({
                          isPrint: true
                        }, () => {
                          this.download()
                        })
                        setTimeout(function () {
                          _this.setState({
                            isPrint: false
                          })
                        }, 2000)
                      }}
                    >
                      下载整图
                    </Button>
                    <Button
                      type="primary"
                      onClick={() => {
                        this.setState({
                          logvisible: true
                        })
                        this.logList()
                      }}
                    >
                      日志
                    </Button>
                  </div>
                  <div className="pi-record">最近更新时间</div>
                  <div className="pi-record">{data.updateTime}</div>
                  <div className="pi-record">下载/打印时间</div>
                  <div className="pi-record">{data.downloadTime}</div>
                </div>
              }
            </div>
            <div className="pc-tit">基础数据</div>
            <div className="pc-row">
              <div className="pr-item">
                <div className="pi-tit">上年度（<Input style={{ width: this.handleChange('lastYear', 40) }} value={data.lastYear} onChange={e => { this.onChange(e, "lastYear") }} />年）</div>
                <div>销售收入：<Input
                  style={{ width: this.handleChange('lastRdSalesAmount', 40) }}
                  value={data.lastRdSalesAmount}
                  onChange={e => { this.onChange(e, "lastRdSalesAmount") }}
                  onBlur={e => {
                    this.getProportion('threeYearsRdBudgetRate',
                      (Number(data.rdBudget) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.rdSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    this.getProportion('threeYearsActualRdRate',
                      (Number(data.actualRdAmount) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.actualSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                  }}
                />万元</div>
                <div>高新研发费用：<Input
                  style={{ width: this.handleChange('lastRdBudget', 40) }}
                  value={data.lastRdBudget}
                  onChange={e => { this.onChange(e, "lastRdBudget") }}
                  onBlur={e => {
                    this.getProportion('threeYearsRdBudgetRate',
                      (Number(data.rdBudget) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.rdSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    this.getProportion('threeYearsActualRdRate',
                      (Number(data.actualRdAmount) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.actualSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                  }}
                />万元</div>
              </div>
              <div className="pr-item">
                <div className="pi-tit">上上年度（<Input style={{ width: this.handleChange('beforeLastYear', 40) }} value={data.beforeLastYear} onChange={e => { this.onChange(e, "beforeLastYear") }} />年）</div>
                <div>销售收入：<Input
                  style={{ width: this.handleChange('beforeLastRdSalesAmount', 40) }}
                  value={data.beforeLastRdSalesAmount}
                  onChange={e => { this.onChange(e, "beforeLastRdSalesAmount") }}
                  onBlur={e => {
                    this.getProportion('threeYearsRdBudgetRate',
                      (Number(data.rdBudget) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.rdSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    this.getProportion('threeYearsActualRdRate',
                      (Number(data.actualRdAmount) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.actualSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                  }}
                />万元</div>
                <div>高新研发费用：<Input
                  style={{ width: this.handleChange('beforeLastRdBudget', 40) }}
                  value={data.beforeLastRdBudget}
                  onChange={e => { this.onChange(e, "beforeLastRdBudget") }}
                  onBlur={e => {
                    this.getProportion('threeYearsRdBudgetRate',
                      (Number(data.rdBudget) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.rdSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    this.getProportion('threeYearsActualRdRate',
                      (Number(data.actualRdAmount) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                      (Number(data.actualSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                  }}
                />万元</div>
              </div>
              <div className="pr-items">
                <div className="pi-tit">本年度企业人员情况</div>
                <div>职工总数：<Input
                  style={{ width: this.handleChange('workersNumber', 25) }}
                  value={data.workersNumber}
                  onChange={e => { this.onChange(e, "workersNumber") }}
                  onBlur={e => {
                    this.getProportion('workersRate', Number(data.technologyNumber), Number(data.workersNumber))
                  }}
                />人
                  &nbsp;&nbsp;
                  科技人员：<Input
                    style={{ width: this.handleChange('technologyNumber', 25) }}
                    value={data.technologyNumber}
                    onChange={e => { this.onChange(e, "technologyNumber") }}
                    onBlur={e => {
                      this.getProportion('workersRate', Number(data.technologyNumber), Number(data.workersNumber))
                    }}
                  />人
                </div>
                <div>占比：{data.workersRate || 0}%</div>
              </div>
            </div>
            <div className="pc-tit">科研立项与研发投入</div>
            <div className="pc-row">
              <div className="pr-item">
                <div className="pi-tit">立项和预算</div>
                <div>研发立项数量：<Input
                  style={{ width: this.handleChange('projectApprovalNumber', 25) }}
                  value={data.projectApprovalNumber}
                  onChange={e => { this.onChange(e, "projectApprovalNumber") }}
                  onBlur={e => {
                    this.getProportion('projectApprovalWriteRate', Number(data.projectApprovalWriteNumber), Number(data.projectApprovalNumber))
                  }}
                />个</div>
                <div>年度研发预算总额：
                  <Input
                    style={{ width: this.handleChange('rdBudget', 40) }}
                    value={data.rdBudget}
                    onChange={e => { this.onChange(e, "rdBudget") }}
                    onBlur={e => {
                      this.getProportion('rdCompletionProgress', Number(data.actualRdAmount), Number(data.rdBudget))
                      this.getProportion('rdBudgetRate', Number(data.rdBudget), Number(data.rdSalesAmount))
                      this.getProportion('threeYearsRdBudgetRate',
                        (Number(data.rdBudget) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                        (Number(data.rdSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    }}
                  />万元</div>
                <div>年度销售收入预计：
                  <Input
                    style={{ width: this.handleChange('rdSalesAmount', 40) }}
                    value={data.rdSalesAmount}
                    onChange={e => { this.onChange(e, "rdSalesAmount") }}
                    onBlur={e => {
                      this.getProportion('rdBudgetRate', Number(data.rdBudget), Number(data.rdSalesAmount))
                      this.getProportion('threeYearsRdBudgetRate',
                        (Number(data.rdBudget) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                        (Number(data.rdSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    }}
                  />万元</div>
              </div>
              <div className="pr-item">
                <div className="pi-tit">&nbsp;</div>
                <div>&nbsp;</div>
                <div>本年度研发费用预算占比：{data.rdBudgetRate || 0}%</div>
                <div>三年研发费用占比预估：{data.threeYearsRdBudgetRate || 0}%</div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-items">
                <div className="pi-tit">实际情况</div>
                <div>数据周期（累计）：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          dataCycle: e.target.value,
                        }),
                      });
                    }}
                    value={data.dataCycle}
                  >
                    <Radio style={radioStyle} value={0}>第1季度</Radio>
                    <Radio style={radioStyle} value={1}>上半年</Radio>
                    <Radio style={radioStyle} value={2}>前3季度</Radio>
                    <Radio style={radioStyle} value={3}>全年</Radio>
                  </RadioGroup>
                </div>
                <div>
                  已立项RD数量：<Input style={{ width: this.handleChange('actualRdNumber', 25) }} value={data.actualRdNumber} onChange={e => { this.onChange(e, "actualRdNumber") }} />个，
                  其中委外项目<Input style={{ width: this.handleChange('actualOutsourcingNumber', 25) }} value={data.actualOutsourcingNumber} onChange={e => { this.onChange(e, "actualOutsourcingNumber") }} />个，
                  合作项目<Input style={{ width: this.handleChange('actualCooperateNumber', 25) }} value={data.actualCooperateNumber} onChange={e => { this.onChange(e, "actualCooperateNumber") }} />个，
                  完成技术合同登记<Input style={{ width: this.handleChange('actualRegistrationNumber', 25) }} value={data.actualRegistrationNumber} onChange={e => { this.onChange(e, "actualRegistrationNumber") }} />个
                </div>
                <div>已归集研发费用总额：
                  <Input
                    style={{ width: this.handleChange('actualRdAmount', 40) }}
                    value={data.actualRdAmount}
                    onChange={e => { this.onChange(e, "actualRdAmount") }}
                    onBlur={e => {
                      this.getProportion('rdCompletionProgress', Number(data.actualRdAmount), Number(data.rdBudget))
                      this.getProportion('actualRdRate', Number(data.actualRdAmount), Number(data.actualSalesAmount))
                      this.getProportion('threeYearsActualRdRate',
                        (Number(data.actualRdAmount) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                        (Number(data.actualSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    }}
                  />万元</div>
                <div>研发预算完成进度：{data.rdCompletionProgress || 0}%</div>
              </div>
              <div className="pr-items">
                <div className="pi-tit">&nbsp;</div>
                <div>年度实际销售收入：
                  <Input
                    style={{ width: this.handleChange('actualSalesAmount', 40) }}
                    value={data.actualSalesAmount}
                    onChange={e => { this.onChange(e, "actualSalesAmount") }}
                    onBlur={e => {
                      this.getProportion('actualRdRate', Number(data.actualRdAmount), Number(data.actualSalesAmount))
                      this.getProportion('threeYearsActualRdRate',
                        (Number(data.actualRdAmount) + Number(data.lastRdBudget) + Number(data.beforeLastRdBudget)),
                        (Number(data.actualSalesAmount) + Number(data.lastRdSalesAmount) + Number(data.beforeLastRdSalesAmount)))
                    }}
                  />万元</div>
                <div>本年度研发费用占比：{data.actualRdRate || 0}%</div>
                <div>三年研发费用占比：{data.threeYearsActualRdRate || 0}%</div>
              </div>
            </div>
            <div className="pc-tit">报表报送</div>
            <div className="pc-row">
              <div className="pr-items">
                <div>
                  <span>火炬统计：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          torchStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.torchStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.torchStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.torchOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                torchOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>统计年报：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          statisticsStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.statisticsStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.statisticsStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.statisticsOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                statisticsOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
              </div>
              <div className="pr-items">
                <div>
                  <span>高企年报：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          chStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.chStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.chStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.chOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                chOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>汇算清缴：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          finalSettlementStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.finalSettlementStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.finalSettlementStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.finalSettlementOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                finalSettlementOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>加扣RD<Input style={{ width: this.handleChange('reportFormsRdNumber', 25) }} value={data.reportFormsRdNumber} onChange={e => { this.onChange(e, "reportFormsRdNumber") }} />个，其中有知识产权的加扣费用
                  <Input style={{ width: this.handleChange('intellectualPropertyAmount', 40) }} value={data.intellectualPropertyAmount} onChange={e => { this.onChange(e, "intellectualPropertyAmount") }} />万元，加扣研发费用金额
                  <Input style={{ width: this.handleChange('reportRdAmount', 40) }} value={data.reportRdAmount} onChange={e => { this.onChange(e, "reportRdAmount") }} />万元</div>
              </div>
            </div>
            <div className="pc-tit">研发奖补</div>
            <div className="pc-row">
              <div className="pr-items">
                <div>
                  <span>研发准备金备案：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          rdReservesStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.rdReservesStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.rdReservesStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.rdReservesOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                rdReservesOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
              </div>
              <div className="pr-items">
                <div>
                  <span>研发奖补申请：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          rdAwardCompensationStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.rdAwardCompensationStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.rdAwardCompensationStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.rdAwardCompensationOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                rdAwardCompensationOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>申请金额：</span><Input style={{ width: this.handleChange('rdApplicationFee', 40) }} value={data.rdApplicationFee} onChange={e => { this.onChange(e, "rdApplicationFee") }} />万元，
                  <span>公示金额：</span><Input style={{ width: this.handleChange('rdAnnouncementAmount', 40) }} value={data.rdAnnouncementAmount} onChange={e => { this.onChange(e, "rdAnnouncementAmount") }} />万元，
                  其他<Input
                    style={{ width: this.handleChange('rdAnnouncementOther', 40, 'string') }}
                    value={data.rdAnnouncementOther}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          rdAnnouncementOther: e.target.value,
                        }),
                      })
                    }}
                  />
                </div>
              </div>
            </div>
            <div className="pc-tit">备查交付与归档</div>
            <div className="pc-row">
              <div className="pr-items">
                <div>
                  <span>加扣备查交付：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          adDeliverStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.adDeliverStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.adDeliverStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.adDeliverOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                adDeliverOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>是否归档：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          adDeliverFinish: e.target.value,
                        }),
                      });
                    }}
                    value={data.adDeliverFinish}
                  >
                    <Radio style={radioStyle} value={0}>未归档</Radio>
                    <Radio style={radioStyle} value={1}>已归档</Radio>
                  </RadioGroup>
                </div>
              </div>
              <div className="pr-items">
                <div>
                  <span>高新备查交付：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          htDeliverStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.htDeliverStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.htDeliverStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.htDeliverOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                htDeliverOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>是否归档：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          htDeliverFinish: e.target.value,
                        }),
                      });
                    }}
                    value={data.htDeliverFinish}
                  >
                    <Radio style={radioStyle} value={1}>未归档</Radio>
                    <Radio style={radioStyle} value={2}>已归档</Radio>
                  </RadioGroup>
                </div>
              </div>
            </div>
            <div className="pc-tit">日常工作</div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>召开上年度总结及本年工作计划：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          closeMeetingStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.closeMeetingStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.closeMeetingStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.closeMeetingOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                closeMeetingOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>阶段性汇报：</span>
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          phasedType: e.target.value,
                        }),
                      });
                    }}
                    value={data.phasedType}
                  >
                    <Radio style={radioStyle} value={1}>月度</Radio>
                    <Radio style={radioStyle} value={2}>季度</Radio>
                  </RadioGroup>
                </div>
                <div style={{ margin: '5px 0 0 72px', paddingTop: '5px', borderTop: '1px dashed #000000A6' }}>
                  <CheckboxGroup
                    options={mothOptions}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          phasedContent: e,
                        }),
                      });
                    }}
                    value={data.phasedContent}
                  />
                </div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>立项资料编写：</span>
                  完成数<Input
                    style={{ width: this.handleChange('projectApprovalWriteNumber', 25) }}
                    value={data.projectApprovalWriteNumber}
                    onChange={e => { this.onChange(e, "projectApprovalWriteNumber") }}
                    onBlur={e => {
                      this.getProportion('projectApprovalWriteRate', Number(data.projectApprovalWriteNumber), Number(data.projectApprovalNumber))
                    }}
                  />个
                  &nbsp;&nbsp;&nbsp;完成率（系统自动计算）{data.projectApprovalWriteRate}%</div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>加计预申报：</span>
                  7月：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          adPrepareJulyStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.adPrepareJulyStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.adPrepareJulyStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.adPrepareJulyOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                adPrepareJulyOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                  &nbsp;&nbsp;
                  10月：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          adPrepareOctoberStatus: e.target.value,
                        }),
                      });
                    }}
                    value={data.adPrepareOctoberStatus}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.adPrepareOctoberStatus === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.adPrepareOctoberOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                adPrepareOctoberOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div><span>知识产权情况：</span></div>
                <div>
                  <span>发明专利：</span>
                  当年申报数量<Input style={{ width: this.handleChange('ipInventionPatentDeclare', 25) }} value={data.ipInventionPatentDeclare} onChange={e => { this.onChange(e, "ipInventionPatentDeclare") }} />个，
                  当年授权数量<Input style={{ width: this.handleChange('ipInventionPatentAuthorize', 25) }} value={data.ipInventionPatentAuthorize} onChange={e => { this.onChange(e, "ipInventionPatentAuthorize") }} />个，
                  企业累计授权数量<Input style={{ width: this.handleChange('ipInventionPatentAuthorizeCount', 25) }} value={data.ipInventionPatentAuthorizeCount} onChange={e => { this.onChange(e, "ipInventionPatentAuthorizeCount") }} />个。</div>
                <div>
                  <span>实用新型专利：</span>
                  当年申报数量<Input style={{ width: this.handleChange('ipUtilityModelDeclare', 25) }} value={data.ipUtilityModelDeclare} onChange={e => { this.onChange(e, "ipUtilityModelDeclare") }} />个，
                  当年授权数量<Input style={{ width: this.handleChange('ipUtilityModelAuthorize', 25) }} value={data.ipUtilityModelAuthorize} onChange={e => { this.onChange(e, "ipUtilityModelAuthorize") }} />个，
                  企业累计授权数量<Input style={{ width: this.handleChange('ipUtilityModelAuthorizeCount', 25) }} value={data.ipUtilityModelAuthorizeCount} onChange={e => { this.onChange(e, "ipUtilityModelAuthorizeCount") }} />个。
                </div>
                <div><span>软著：</span>
                  当年申请数量<Input style={{ width: this.handleChange('ipSoftwareWorksDeclare', 25) }} value={data.ipSoftwareWorksDeclare} onChange={e => { this.onChange(e, "ipSoftwareWorksDeclare") }} />个，
                  当年下证数量<Input style={{ width: this.handleChange('ipSoftwareWorksAuthorize', 25) }} value={data.ipSoftwareWorksAuthorize} onChange={e => { this.onChange(e, "ipSoftwareWorksAuthorize") }} />个，
                  企业累计下证数量<Input style={{ width: this.handleChange('ipSoftwareWorksAuthorizeCount', 25) }} value={data.ipSoftwareWorksAuthorizeCount} onChange={e => { this.onChange(e, "ipSoftwareWorksAuthorizeCount") }} />个。
                </div>
                <div>
                  截止本年末可用于下次高新认定数量<Input style={{ width: this.handleChange('ipHt', 25) }} value={data.ipHt} onChange={e => { this.onChange(e, "ipHt") }} />个，
                  其中I类<Input style={{ width: this.handleChange('ipHtI', 25) }} value={data.ipHtI} onChange={e => { this.onChange(e, "ipHtI") }} />个，
                  II类<Input style={{ width: this.handleChange('ipHtIi', 25) }} value={data.ipHtIi} onChange={e => { this.onChange(e, "ipHtIi") }} />个。
                </div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>公出指标（本年度）：</span>
                  合同约定次数：<Input style={{ width: this.handleChange('publicReleaseStipulation', 25) }} value={data.publicReleaseStipulation} onChange={e => { this.onChange(e, "publicReleaseStipulation") }} />次&nbsp;&nbsp;&nbsp;
                  实际次数：<Input style={{ width: this.handleChange('publicReleaseActual', 25) }} value={data.publicReleaseActual} onChange={e => { this.onChange(e, "publicReleaseActual") }} />次&nbsp;&nbsp;&nbsp;
                </div>
              </div>
            </div>
            <div className="p-line"></div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>培训指标（本年度）：</span>
                  合同约定次数：<Input style={{ width: this.handleChange('trainingStipulation', 25) }} value={data.trainingStipulation} onChange={e => { this.onChange(e, "trainingStipulation") }} />次&nbsp;&nbsp;&nbsp;
                  实际次数：<Input style={{ width: this.handleChange('trainingActual', 25) }} value={data.trainingActual} onChange={e => { this.onChange(e, "trainingActual") }} />次&nbsp;&nbsp;&nbsp;
                  其他：<Input
                    style={{ width: this.handleChange('trainingOther', 40, 'string') }}
                    value={data.trainingOther}
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          trainingOther: e.target.value,
                        }),
                      })
                    }}
                  />
                </div>
              </div>
            </div>
            <div className="pc-tit">
              特色工作
              {
                !this.state.isPrint &&
                <div className="pt-bt no-print">
                  <Button
                    type="primary"
                    size="small"
                    onClick={() => {
                      // if (!this.state.data.id) {
                      //   this.onSubmit()
                      // }
                      this.onSubmit()
                      this.setState({
                        visible: true
                      })
                    }}
                  >
                    + 新增
                  </Button>
                </div>
              }
            </div>
            <div className="patent-table">
              <Spin spinning={this.state.loading}>
                <Table
                  bordered
                  columns={columns}
                  dataSource={data.featureList}
                  onRowDoubleClick={this.onRowDoubleClick}
                  pagination={false}
                />
              </Spin>
            </div>
            <div className="pc-tit">高新认定</div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div>
                  <span>1.基础情况：</span>
                  创新能力评价估分<Input style={{ width: this.handleChange('htScore', 25) }} value={data.htScore} onChange={e => { this.onChange(e, "htScore") }} />分，
                  实际申报批次：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          htBatch: e.target.value,
                        }),
                      });
                    }}
                    value={data.htBatch}
                  >
                    <Radio style={radioStyle} value={1}>第1批</Radio>
                    <Radio style={radioStyle} value={2}>第2批</Radio>
                    <Radio style={radioStyle} value={3}>第3批</Radio>
                  </RadioGroup>
                  ，是否重点关注：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          htFocus: e.target.value,
                        }),
                      });
                    }}
                    value={data.htFocus}
                  >
                    <Radio style={radioStyle} value={1}>是</Radio>
                    <Radio style={radioStyle} value={0}>否</Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>2.申报提交：</span>
                  网上系统提交：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          webSubmit: e.target.value,
                        }),
                      });
                    }}
                    value={data.webSubmit}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.webSubmit === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.webSubmitOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                webSubmitOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                  纸质材料提交：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          paperSubmit: e.target.value,
                        }),
                      });
                    }}
                    value={data.paperSubmit}
                  >
                    <Radio style={radioStyle} value={1}>待完成</Radio>
                    <Radio style={radioStyle} value={2}>已完成</Radio>
                    <Radio style={radioStyle} value={3}>合同无此项</Radio>
                    <Radio style={radioStyle} value={0}>
                      其他
                      {data.paperSubmit === 0 ?
                        <Input
                          style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                          value={data.paperSubmitOther}
                          onChange={e => {
                            this.setState({
                              data: Object.assign(data, {
                                paperSubmitOther: e.target.value,
                              }),
                            })
                          }}
                        /> : null}
                    </Radio>
                  </RadioGroup>
                </div>
                <div>
                  <span>3.评审情况：</span>
                  省级：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          reviewProvince: e.target.value,
                        }),
                      });
                    }}
                    value={data.reviewProvince}
                  >
                    <Radio style={radioStyle} value={0}>淘汰</Radio>
                    <Radio style={radioStyle} value={1}>公示，公示序号：
                      <Input
                        style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                        value={data.reviewProvinceNumber}
                        onChange={e => {
                          this.setState({
                            data: Object.assign(data, {
                              reviewProvinceNumber: e.target.value,
                            }),
                          })
                        }}
                      />
                    </Radio>
                  </RadioGroup>
                  国家级：
                  <RadioGroup
                    onChange={e => {
                      this.setState({
                        data: Object.assign(data, {
                          reviewCountry: e.target.value,
                        }),
                      });
                    }}
                    value={data.reviewCountry}
                  >
                    <Radio style={radioStyle} value={0}>淘汰</Radio>
                    <Radio style={radioStyle} value={1}>公示，高企编号：
                      <Input
                        style={{ width: 100, marginLeft: 10, textAlign: 'left' }}
                        value={data.reviewCountryNumber}
                        onChange={e => {
                          this.setState({
                            data: Object.assign(data, {
                              reviewCountryNumber: e.target.value,
                            }),
                          })
                        }}
                      />
                    </Radio>
                  </RadioGroup>
                </div>
              </div>
            </div>
            <div className="pc-tit">其他事项说明</div>
            <div className="pc-row">
              <TextArea
                rows={2}
                value={data.remarks}
                onChange={e => {
                  this.setState({
                    data: Object.assign(data, {
                      remarks: e.target.value,
                    }),
                  })
                }}
              />
            </div>
            <div className="pc-tit">客户签字</div>
            <div className="pc-row">
              <div className="pr-itemss">
                <div style={{ paddingBottom: 80 }}><span>授权代表（签字或盖章）：</span></div>
              </div>
            </div>
          </div>
        </Spin>
        <div className="pro-bottom">
          <Button
            type="primary"
            onClick={() => {
              this.onSubmit()
            }}
            style={{ margin: 25 }}
          >
            保存
          </Button>
          {/* <Button
            type="ghost"
            onClick={() => {
              console.log("--------", data)
            }}
            style={{ margin: 25 }}
          >
            取消
          </Button> */}
        </div>
        <Modal
          maskClosable={false}
          title="特色工作"
          visible={visible}
          width={600}
          footer=""
          onCancel={this.handleCancel}
        >
          <Form
            layout="horizontal"
          >
            <Spin spinning={this.state.loading}>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查开始时间">
                  <DatePicker
                    style={{ width: 200 }}
                    value={obj.startTimeStr ? moment(obj.startTimeStr) : null}
                    onChange={(date, dateString) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          startTimeStr: dateString,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查结束时间">
                  <DatePicker
                    style={{ width: 200 }}
                    value={obj.endTimeStr ? moment(obj.endTimeStr) : null}
                    onChange={(date, dateString) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          endTimeStr: dateString,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查部门">
                  <Input
                    style={{ width: 200 }}
                    value={obj.depName}
                    onChange={e => {
                      this.setState({
                        obj: Object.assign(obj, {
                          depName: e.target.value,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="被检查年度">
                  <Input
                    style={{ width: 200 }}
                    value={obj.yearFeature}
                    onChange={e => {
                      this.setState({
                        obj: Object.assign(obj, {
                          yearFeature: e.target.value,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查方式">
                  <RadioGroup
                    style={{ width: 200 }}
                    value={obj.inspectWay}
                    onChange={(e) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          inspectWay: e.target.value,
                        }),
                      })
                    }}
                  >
                    <Radio value={0}>线上</Radio>
                    <Radio value={1}>线下</Radio>
                  </RadioGroup>
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查类别">
                  <Select
                    style={{ width: 200 }}
                    value={obj.type}
                    onChange={(e) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          type: e,
                        }),
                      })
                    }}
                  >
                    <Select.Option value={1}>高新技术税收优惠政策检查</Select.Option>
                    <Select.Option value={2}>加计扣除税收优惠政策检查</Select.Option>
                    <Select.Option value={3}>税务常规检查</Select.Option>
                    <Select.Option value={4}>税务对研发费用检查</Select.Option>
                    <Select.Option value={5}>税务稽查</Select.Option>
                    <Select.Option value={0}>其他</Select.Option>
                  </Select>
                </Form.Item>
              </div>
              {
                obj.type == 0 &&
                <div>
                  <Form.Item
                    {...formItemLayout}
                    label="检查类别其他说明">
                    <TextArea
                      rows={2}
                      style={{ width: 200 }}
                      placeholder="检查类别其他说明"
                      value={obj.typeOther}
                      onChange={e => {
                        this.setState({
                          obj: Object.assign(obj, {
                            typeOther: e.target.value,
                          }),
                        })
                      }}
                    />
                  </Form.Item>
                </div>
              }
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查事项">
                  <Select
                    style={{ width: 200 }}
                    value={obj.inspectionItems}
                    onChange={(e) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          inspectionItems: e,
                        }),
                      })
                    }}
                  >
                    <Select.Option value={1}>高新产品收入不达标</Select.Option>
                    <Select.Option value={2}>人员人工费用问题检查</Select.Option>
                    <Select.Option value={3}>研发费用占比不达标</Select.Option>
                    <Select.Option value={4}>属于多个类别</Select.Option>
                    <Select.Option value={5}>其他事项检查</Select.Option>
                    <Select.Option value={0}>其他</Select.Option>
                  </Select>
                </Form.Item>
              </div>
              {
                obj.inspectionItems == 0 &&
                <div>
                  <Form.Item
                    {...formItemLayout}
                    label="检查事项其他说明">
                    <TextArea
                      rows={2}
                      style={{ width: 200 }}
                      placeholder="检查事项其他说明"
                      value={obj.inspectionItemsOther}
                      onChange={e => {
                        this.setState({
                          obj: Object.assign(obj, {
                            inspectionItemsOther: e.target.value,
                          }),
                        })
                      }}
                    />
                  </Form.Item>
                </div>
              }
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="企业问题点">
                  <TextArea
                    rows={2}
                    style={{ width: 200 }}
                    placeholder="企业问题点"
                    value={obj.enterpriseProblems}
                    onChange={e => {
                      this.setState({
                        obj: Object.assign(obj, {
                          enterpriseProblems: e.target.value,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="解决方式">
                  <TextArea
                    rows={2}
                    style={{ width: 200 }}
                    placeholder="解决方式"
                    value={obj.solution}
                    onChange={e => {
                      this.setState({
                        obj: Object.assign(obj, {
                          solution: e.target.value,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="检查后结论">
                  <Select
                    style={{ width: 200 }}
                    value={obj.inspectionConclusion}
                    onChange={(e) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          inspectionConclusion: e,
                        }),
                      })
                    }}
                  >
                    <Select.Option value={1}>被取消高新认定资格</Select.Option>
                    <Select.Option value={2}>不通过</Select.Option>
                    <Select.Option value={3}>合规通过</Select.Option>
                    <Select.Option value={4}>通过</Select.Option>
                    <Select.Option value={5}>无结论</Select.Option>
                    <Select.Option value={6}>要求整改</Select.Option>
                  </Select>
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="是否提醒企业专人跟进事宜">
                  <RadioGroup
                    style={{ width: 200 }}
                    value={obj.remindFollow}
                    onChange={(e) => {
                      this.setState({
                        obj: Object.assign(obj, {
                          remindFollow: e.target.value,
                        }),
                      })
                    }}
                  >
                    <Radio value={0}>未提醒</Radio>
                    <Radio value={1}>已提醒</Radio>
                  </RadioGroup>
                </Form.Item>
              </div>
              <div>
                <Form.Item
                  {...formItemLayout}
                  label="备注">
                  <TextArea
                    rows={2}
                    style={{ width: 200 }}
                    placeholder="备注"
                    value={obj.remarks}
                    onChange={e => {
                      this.setState({
                        obj: Object.assign(obj, {
                          remarks: e.target.value,
                        }),
                      })
                    }}
                  />
                </Form.Item>
              </div>
              <div>
                <div style={{ margin: '20px 0 50px 0', display: 'flex', flexDirection: 'row', justifyContent: 'center' }}>
                  <Button
                    type="primary"
                    style={{ margin: '0 25px' }}
                    onClick={this.handleOk}
                  >
                    保存
                  </Button>
                  {
                    this.state.obj.id &&
                    <Popconfirm
                      placement="top"
                      title="确定要删除吗?"
                      onConfirm={(e) => {
                        e.stopPropagation();
                        this.deleteTaskFeature(obj.id);
                      }}
                      okText="确定"
                      cancelText="取消"
                    >
                      <Button
                        type="primary"
                        style={{ margin: '0 25px', borderColor: 'red', background: 'red', color: '#fff' }}
                      >
                        删除
                      </Button>
                    </Popconfirm>
                  }
                  <Button
                    type="ghost"
                    style={{ margin: '0 25px' }}
                    onClick={this.handleCancel}
                  >
                    取消
                  </Button>
                </div>
              </div>
            </Spin>
          </Form>
        </Modal>
        <Modal
          title="记录"
          visible={this.state.logvisible}
          width={400}
          footer=""
          onCancel={() => {
            this.setState({
              logvisible: false
            })
          }}
        >
          <Table
            bordered
            columns={this.state.logcolumns}
            dataSource={this.state.logData}
            pagination={this.state.pagination}
          />
        </Modal>
        <Modal
          // closable={!data.id ? false : true}
          maskClosable={false}
          title="项目负责人"
          visible={this.state.projectV}
          width={240}
          footer=""
          onCancel={() => {
            this.setState({
              projectV: false,
            })
          }}
        >
          <div style={{
            width: 200,
            display: 'flex',
            flexDirection: 'column',
            alignItems: 'center',
          }}
          >
            <div
              style={{
                textAlign: 'center',
                color: 'black',
                fontSize: '18px',
                marginBottom: 15,
              }}
            >请设置会员负责人</div>
            <AutoComplete
              className="certain-category-search"
              dropdownClassName="certain-category-search-dropdown"
              dropdownMatchSelectWidth={false}
              style={{ width: "200px", textAlign: 'center', marginBottom: 15 }}
              dataSource={options}
              placeholder="请输入会员负责人姓名"
              value={this.state.projectDirector}
              onChange={this.followUpHY.bind(this)}
              filterOption={true}
              onSelect={this.selectHY.bind(this)}
            >
              <Input />
            </AutoComplete>
            <Button
              type="primary"
              size='large'
              onClick={() => {
                if (!this.state.projectId) {
                  message.warning('请先设置会员负责人')
                  return
                } else {
                  this.addProjectName()
                }
              }}>
              确定
            </Button>
          </div>
        </Modal>
      </div>
    )
  }
}

export default Progress;
