| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 | import React, { Component } from "react";import { Form, Button, Radio, Modal, Input, message, Switch } from "antd";import { knowledgeList, auditList, addDeductionList, } from "@/dataDic.js";/** * 知识产权 */const RadioButton = Radio.Button;const RadioGroup = Radio.Group;const radioStyle = {  display: 'block',  height: '30px',  lineHeight: '30px',};const FormItem = Form.Item;class Property extends Component {  constructor(props) {    super(props);    this.state = {    }  }  componentDidMount() {  }  componentWillUnmount() {  }  componentWillReceiveProps(nextProps) {    // const { patentStatus } = this.props    // if (patentStatus != null) {    //   this.setState({    //     isProperty: 1,    //   })    // }  }  render() {    const { isCreat = false, isProperty, patentStatus, labelCol = 5, wrapperCol = 16 } = this.props    return (      <div>        {          // 是否可编辑          isCreat ?            <div className="clearfix">              <div className="clearfix">                <FormItem                  labelCol={{ span: 5 }}                  wrapperCol={{ span: 16 }}                  label={                    <span>                      <strong style={{ color: "#f00" }}>*</strong>                      知识产权情况                    </span>                  }                >                  <div>                    <div>                      <RadioGroup                        value={isProperty}                        onChange={e => {                          this.props.setProperty(e.target.value)                        }}>                        <RadioButton value={1}>纯知识产权合同</RadioButton>                        <RadioButton value={2}>非知识产权合同</RadioButton>                      </RadioGroup>                    </div>                    {                      isProperty == 2 &&                      <div style={{ marginTop: 10 }}>                        <RadioGroup                          value={patentStatus}                          onChange={e => {                            this.props.setPatentS(e.target.value)                          }}>                          <Radio value={1}>客户自己完成</Radio>                          <Radio value={2}>非客户自己完成</Radio>                        </RadioGroup>                      </div>                    }                  </div>                </FormItem>              </div>            </div> : (patentStatus == 0 || patentStatus == 1 || patentStatus == 2) &&            <div className="clearfix">              <div className="clearfix">                <FormItem                  labelCol={{ span: labelCol }}                  wrapperCol={{ span: wrapperCol }}                  label={                    <span>                      知识产权情况                    </span>                  }                >                  <div>                    <div>                      <Button type="primary" size="default">                        {patentStatus != 0 ? "非知识产权合同" : "纯知识产权合同"}                      </Button>                    </div>                    {patentStatus != 0 &&                      <div>                        <Button type="primary" size="default">                          {patentStatus == 2 ? "非客户自己完成" : " 客户自己完成 "}                        </Button>                      </div>}                  </div>                </FormItem>              </div>            </div>        }      </div >    );  }}export default Property;
 |