index.jsx 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. import React, { Component } from 'react';
  2. import { Form, Input, Modal, Select, Spin } from "antd";
  3. import {
  4. getboutique,
  5. } from "@/tools";
  6. const formItemLayout = {
  7. labelCol: { span: 8 },
  8. wrapperCol: { span: 14 }
  9. };
  10. const FormItem = Form.Item;
  11. class ProjectDetailsReadOnly extends Component {
  12. constructor(props) {
  13. super(props);
  14. this.state = {
  15. loading: false,
  16. isIso: this.props.infor.commodityName.indexOf("贯标") !== -1,
  17. }
  18. }
  19. render() {
  20. const {
  21. commodityName,
  22. commodityQuantity,
  23. officialCost,
  24. costReduction,
  25. commodityPrice,
  26. main,
  27. taskComment,
  28. ifCertificationFee,//是否包含认证费
  29. certificationFee,//认证费
  30. certificationCorporate,//认证费公司
  31. declarationBatch,//批次
  32. type,//项目类型 0 正常 1专利 2软著 3审计 4双软 5高新 6商标,
  33. patentTypeName,//专利类型
  34. yearSum,//会员总服务年限
  35. serviceLife,//会员服务年限
  36. serviceYear,//本次派单
  37. cSort,//6会员项目
  38. } = this.props.infor;
  39. const { isIso } = this.state;
  40. return (
  41. <Modal
  42. maskClosable={false}
  43. visible={this.props.visible}
  44. onOk={this.props.onCancel}
  45. onCancel={this.props.onCancel}
  46. width="800px"
  47. title="项目任务详情"
  48. footer=""
  49. className="admin-desc-content"
  50. >
  51. <Form layout="horizontal" id="demand-form">
  52. <div className="clearfix">
  53. <FormItem
  54. className="half-item"
  55. {...formItemLayout}
  56. label="项目名称"
  57. >
  58. <span>{commodityName}</span>
  59. </FormItem>
  60. <FormItem
  61. className="half-item"
  62. {...formItemLayout}
  63. label="项目数量"
  64. >
  65. <span>{commodityQuantity}</span>
  66. </FormItem>
  67. <FormItem
  68. className="half-item"
  69. {...formItemLayout}
  70. label="专利类型"
  71. style={{ display: type === 1 ? 'block' : 'none' }}
  72. >
  73. <span>{patentTypeName}</span>
  74. </FormItem>
  75. <FormItem
  76. className="half-item"
  77. {...formItemLayout}
  78. label="官费"
  79. style={{ display: type === 1 ? 'block' : 'none' }}
  80. >
  81. <span>
  82. {officialCost === 0 ? "无官费" : "有官费"}
  83. </span>
  84. </FormItem>
  85. <FormItem
  86. className="half-item"
  87. {...formItemLayout}
  88. label="费减"
  89. style={{ display: type === 1 ? 'block' : 'none' }}
  90. >
  91. <span>
  92. {costReduction === 0 ? "无费减" : "有费减"}
  93. </span>
  94. </FormItem>
  95. <FormItem
  96. className="half-item"
  97. {...formItemLayout}
  98. label="金额(万元)"
  99. >
  100. <span>{commodityPrice === -1 ? '***' : commodityPrice}</span>
  101. </FormItem>
  102. <FormItem
  103. className="half-item"
  104. {...formItemLayout}
  105. label="主要项目"
  106. >
  107. <span>{getboutique(String(main))}</span>
  108. </FormItem>
  109. {type === 5 && <FormItem
  110. className="half-item"
  111. {...formItemLayout}
  112. label="企业申报批次"
  113. >
  114. <span>
  115. {
  116. declarationBatch === 1 ? '第一批' :
  117. declarationBatch === 2 ? '第二批' :
  118. declarationBatch === 3 ? '第三批' :
  119. declarationBatch === 4 ? '第四批' : '未知'
  120. }
  121. </span>
  122. </FormItem>}
  123. {isIso && <FormItem
  124. className="half-item"
  125. {...formItemLayout}
  126. label="认证费"
  127. >
  128. <span>
  129. {
  130. ifCertificationFee === 1 ? '包含' :
  131. ifCertificationFee === 0 ? '不包含' : '未知'
  132. }
  133. </span>
  134. </FormItem>}
  135. {/*{isIso && ifCertificationFee === 1 ?<FormItem*/}
  136. {/* className="half-item"*/}
  137. {/* {...formItemLayout}*/}
  138. {/* label="认证费(万元)"*/}
  139. {/*>*/}
  140. {/* <span>{certificationFee || '暂无'}</span>*/}
  141. {/*</FormItem> : null}*/}
  142. {/*{isIso && ifCertificationFee === 1 ? <FormItem*/}
  143. {/* className="half-item"*/}
  144. {/* {...formItemLayout}*/}
  145. {/* label=""*/}
  146. {/*/> : null}*/}
  147. {/*{isIso && ifCertificationFee === 1 ? <FormItem*/}
  148. {/* className="half-item"*/}
  149. {/* {...formItemLayout}*/}
  150. {/* label="付款公司名称"*/}
  151. {/*>*/}
  152. {/* <span>{certificationCorporate || '暂无'}</span>*/}
  153. {/*</FormItem>:null}*/}
  154. {
  155. cSort == 6 &&
  156. <FormItem
  157. className="half-item"
  158. {...formItemLayout}
  159. label="会员总服务年限"
  160. >
  161. <span>
  162. {
  163. yearSum == null ? "" :
  164. [
  165. { value: 0, key: "" },
  166. { value: 1, key: "一年" },
  167. { value: 2, key: "二年" },
  168. { value: 3, key: "三年" },
  169. { value: 4, key: "四年" },
  170. { value: 5, key: "五年" },
  171. ][yearSum]["key"]
  172. }
  173. </span>
  174. </FormItem>
  175. }
  176. {
  177. cSort == 6 &&
  178. <FormItem
  179. className="half-item"
  180. {...formItemLayout}
  181. label="会员服务年限"
  182. >
  183. <span>{!!serviceLife && JSON.parse(serviceLife).toString()}</span>
  184. </FormItem>
  185. }
  186. {
  187. cSort == 6 &&
  188. <FormItem
  189. className="half-item"
  190. {...formItemLayout}
  191. label="本次派单"
  192. >
  193. <span>{serviceYear}</span>
  194. </FormItem>
  195. }
  196. <div className="clearfix">
  197. <FormItem
  198. labelCol={{ span: 4 }}
  199. wrapperCol={{ span: 16 }}
  200. label="项目说明"
  201. >
  202. <span>{taskComment}</span>
  203. </FormItem>
  204. </div>
  205. </div>
  206. </Form>
  207. </Modal>
  208. );
  209. }
  210. }
  211. export default ProjectDetailsReadOnly;