confidenBreachView.jsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import React, { Component } from "react";
  2. import { Form } from "antd";
  3. import ImgList from "../../../common/imgList/index.js";
  4. import { splitUrl } from "../../../tools.js";
  5. /**
  6. * 订单保密&违约说明详情
  7. */
  8. const FormItem = Form.Item;
  9. const ndaOptions = {
  10. 1: '是',
  11. 0: '否'
  12. };
  13. const breachClauseOptions = {
  14. 0: '否',
  15. 1: '有,有限责任违约条款,与技术服务有关',
  16. 2: '有,有限责任违约条款,与技术服务无关',
  17. 3: '无,无限责任违约条款,与技术服务有关',
  18. 4: '无,无限责任违约条款,与技术服务无关'
  19. };
  20. class ConfidenBreachView extends Component {
  21. constructor(props) {
  22. super(props);
  23. }
  24. onChange(value, updateKey) {
  25. this.props.onChange(value, updateKey)
  26. }
  27. getFileList(url) {
  28. let fileList = []
  29. if (url instanceof Array) {
  30. fileList = url
  31. } else {
  32. fileList = url ? splitUrl(url, ",", globalConfig.avatarHost + "/upload") : []
  33. }
  34. return fileList
  35. }
  36. render() {
  37. let _data = {}
  38. if (!!this.props.data) {
  39. _data = this.props.data
  40. }
  41. const { nda, ndaUrl, breachClauseUrl, breachClause } = _data;
  42. console.log(nda, ndaUrl, breachClause, breachClauseUrl)
  43. return (
  44. <div>
  45. <div style={{display: 'flex', alignItems: 'center' }}>
  46. <h3
  47. style={{
  48. marginLeft: 10,
  49. fontWeight: 800,
  50. marginBottom: 10,
  51. }}
  52. >
  53. 保密&违约说明 &nbsp; &nbsp; &nbsp;
  54. </h3>
  55. <div style={{ padding: '10px', backgroundColor: 'yellow', color: '#000' }}>
  56. <p>营销说明:未如实填报,责任由营销本人全部承担</p>
  57. <p>技术说明:请认真阅读保密/违约条款,并规避相关事项,含保密要求的企业,发送任何资料必须脱密</p>
  58. </div>
  59. </div>
  60. <FormItem
  61. labelCol={{ span: this.props.labelCol || 5 }}
  62. wrapperCol={{ span: this.props.wrapperCol || 19 }}
  63. label='是否签订保密协议'
  64. >
  65. <div>{ndaOptions[nda]}</div>
  66. {nda === 1 ? <ImgList domId={"ndaImg"} fileList={this.getFileList(ndaUrl)} ItemWidth={'96px'} /> : null}
  67. </FormItem>
  68. <FormItem
  69. labelCol={{ span: this.props.labelCol || 5 }}
  70. wrapperCol={{ span: this.props.wrapperCol || 19 }}
  71. label='是否有违约条款'
  72. >
  73. <div>{breachClauseOptions[breachClause]}</div>
  74. {breachClause !== 0 ? <ImgList domId={"breachClauseImg"} fileList={this.getFileList(breachClauseUrl)} ItemWidth={'96px'} /> : null}
  75. </FormItem>
  76. </div >
  77. );
  78. }
  79. }
  80. export default ConfidenBreachView;