property.jsx 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. import React, { Component } from "react";
  2. import { Form, Button, Radio, Modal, Input, message, Switch } from "antd";
  3. import { knowledgeList, auditList, addDeductionList, } from "@/dataDic.js";
  4. /**
  5. * 知识产权
  6. */
  7. const RadioButton = Radio.Button;
  8. const RadioGroup = Radio.Group;
  9. const radioStyle = {
  10. display: 'block',
  11. height: '30px',
  12. lineHeight: '30px',
  13. };
  14. const FormItem = Form.Item;
  15. class Property extends Component {
  16. constructor(props) {
  17. super(props);
  18. this.state = {
  19. }
  20. }
  21. componentDidMount() {
  22. }
  23. componentWillUnmount() {
  24. }
  25. componentWillReceiveProps(nextProps) {
  26. // const { patentStatus } = this.props
  27. // if (patentStatus != null) {
  28. // this.setState({
  29. // isProperty: 1,
  30. // })
  31. // }
  32. }
  33. render() {
  34. const { isCreat = false, isProperty, patentStatus, labelCol = 5, wrapperCol = 16 } = this.props
  35. return (
  36. <div>
  37. {
  38. // 是否可编辑
  39. isCreat ?
  40. <div className="clearfix">
  41. <div className="clearfix">
  42. <FormItem
  43. labelCol={{ span: 5 }}
  44. wrapperCol={{ span: 16 }}
  45. label={
  46. <span>
  47. <strong style={{ color: "#f00" }}>*</strong>
  48. 知识产权情况
  49. </span>
  50. }
  51. >
  52. <div>
  53. <div>
  54. <RadioGroup
  55. value={isProperty}
  56. onChange={e => {
  57. this.props.setProperty(e.target.value)
  58. }}>
  59. <RadioButton value={1}>纯知识产权合同</RadioButton>
  60. <RadioButton value={2}>非知识产权合同</RadioButton>
  61. </RadioGroup>
  62. </div>
  63. {
  64. isProperty == 2 &&
  65. <div style={{ marginTop: 10 }}>
  66. <RadioGroup
  67. value={patentStatus}
  68. onChange={e => {
  69. this.props.setPatentS(e.target.value)
  70. }}>
  71. <Radio value={1}>客户自己完成</Radio>
  72. <Radio value={2}>非客户自己完成</Radio>
  73. </RadioGroup>
  74. </div>
  75. }
  76. </div>
  77. </FormItem>
  78. </div>
  79. </div> : (patentStatus == 0 || patentStatus == 1 || patentStatus == 2) &&
  80. <div className="clearfix">
  81. <div className="clearfix">
  82. <FormItem
  83. labelCol={{ span: labelCol }}
  84. wrapperCol={{ span: wrapperCol }}
  85. label={
  86. <span>
  87. 知识产权情况
  88. </span>
  89. }
  90. >
  91. <div>
  92. <div>
  93. <Button type="primary" size="default">
  94. {patentStatus != 0 ? "非知识产权合同" : "纯知识产权合同"}
  95. </Button>
  96. </div>
  97. {patentStatus != 0 &&
  98. <div>
  99. <Button type="primary" size="default">
  100. {patentStatus == 2 ? "非客户自己完成" : " 客户自己完成 "}
  101. </Button>
  102. </div>}
  103. </div>
  104. </FormItem>
  105. </div>
  106. </div>
  107. }
  108. </div >
  109. );
  110. }
  111. }
  112. export default Property;