project.jsx 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. import React from "react";
  2. import { Spin, Button, Tabs, Table, message, Modal } from "antd";
  3. const project = React.createClass({
  4. getInitialState() {
  5. return {
  6. newVisible: false
  7. };
  8. },
  9. componentWillReceiveProps(nextProps) {
  10. this.setState({
  11. newVisible: nextProps.ShowModal
  12. });
  13. },
  14. handleOk() {
  15. this.setState({
  16. newVisible: false
  17. });
  18. // window.setTimeout( () => {
  19. // this.setState({
  20. // newVisible: true
  21. // });
  22. // },)
  23. },
  24. componentDidMount() {
  25. },
  26. render() {
  27. return (
  28. <Modal
  29. className="customeDetails"
  30. footer=""
  31. title="项目概况"
  32. width="900px"
  33. visible={this.state.visible}
  34. onOk={this.visitOk}
  35. onCancel={this.visitCancel}
  36. >
  37. <Form
  38. layout="horizontal"
  39. onSubmit={this.handleSubmit}
  40. id="demand-form"
  41. style={{ paddingBottom: "0px" }}
  42. >
  43. <Spin spinning={this.state.loading}>
  44. <div className="clearfix">
  45. <div className="clearfix">
  46. <FormItem
  47. className="half-item"
  48. {...formItemLayout}
  49. label="当前项目情况"
  50. >
  51. <span>{this.state.status ? "暂停" : "开启"}</span>
  52. <Button
  53. type="primary"
  54. size="small"
  55. style={{ marginTop: "5px", position: "absolute" }}
  56. onClick={this.caozuorizhi}
  57. >
  58. 操作日志
  59. </Button>
  60. </FormItem>
  61. <FormItem
  62. className="half-item"
  63. {...formItemLayout}
  64. label="合同编号"
  65. >
  66. <span>{this.state.contractNo}</span>
  67. </FormItem>
  68. </div>
  69. <div className="clearfix">
  70. <FormItem
  71. className="half-item"
  72. {...formItemLayout}
  73. label="项目状态"
  74. >
  75. <span>{getProcessStatus(this.state.projectStatus)}</span>
  76. </FormItem>
  77. <FormItem
  78. className="half-item"
  79. {...formItemLayout}
  80. label="是否特批"
  81. >
  82. <span>{getApproval(this.state.approval)}</span>
  83. </FormItem>
  84. <FormItem
  85. className="half-item"
  86. {...formItemLayout}
  87. label="结算状态"
  88. >
  89. <span>
  90. {getLiquidationStatus(this.state.liquidationStatus)}
  91. </span>
  92. </FormItem>
  93. <FormItem
  94. className="half-item"
  95. {...formItemLayout}
  96. label="流程状态"
  97. >
  98. <span>{getProcessStatus(this.state.processStatus)}</span>
  99. </FormItem>
  100. <FormItem
  101. className="half-item"
  102. {...formItemLayout}
  103. label="订单编号"
  104. >
  105. <span>{this.state.orderNo}</span>
  106. </FormItem>
  107. <FormItem
  108. className="half-item"
  109. {...formItemLayout}
  110. label="是否外包"
  111. >
  112. <span>{this.state.outsource == 0 ? "否" : "是"}</span>
  113. </FormItem>
  114. </div>
  115. <div className="clearfix">
  116. <FormItem
  117. className="half-item"
  118. {...formItemLayout}
  119. label="满意度表格"
  120. >
  121. <span>{utils.getSatisfaction(this.state.formRetrieve)}</span>
  122. </FormItem>
  123. <FormItem
  124. className="half-item"
  125. {...formItemLayout}
  126. label="退单"
  127. >
  128. <span>{utils.getChargeback(this.state.taskRefund)}</span>
  129. </FormItem>
  130. </div>
  131. <div className="clearfix">
  132. {
  133. <FormItem
  134. className="half-item"
  135. {...formItemLayout}
  136. label="(满意度)备注"
  137. >
  138. <span>{this.state.retrieveContent}</span>
  139. </FormItem>
  140. }
  141. {
  142. <FormItem
  143. className="half-item"
  144. {...formItemLayout}
  145. label="(退单)备注"
  146. >
  147. <span>{this.state.refundContent}</span>
  148. </FormItem>
  149. }
  150. </div>
  151. <div className="clearfix">
  152. <h3 className="sub-title">任务信息</h3>
  153. <FormItem
  154. className="half-item"
  155. {...formItemLayout}
  156. label="任务编号"
  157. >
  158. <span>{this.state.id}</span>
  159. </FormItem>
  160. <FormItem
  161. className="half-item"
  162. {...formItemLayout}
  163. label="任务名称"
  164. >
  165. <span>{this.state.taskName}</span>
  166. </FormItem>
  167. <FormItem
  168. className="half-item"
  169. {...formItemLayout}
  170. label="任务状态"
  171. >
  172. <span>{getTaskStatus(this.state.taskStatus)}</span>
  173. </FormItem>
  174. <FormItem
  175. className="half-item"
  176. {...formItemLayout}
  177. label="任务类别"
  178. >
  179. <span>{this.state.cname}</span>
  180. </FormItem>
  181. <FormItem
  182. className="half-item"
  183. {...formItemLayout}
  184. label="证书编号"
  185. >
  186. <span>{this.state.certificateNumber}</span>
  187. </FormItem>
  188. </div>
  189. {this.state.outsource === 1 ? (
  190. <div className="clearfix">
  191. <h3 className="sub-title">外包信息</h3>
  192. <FormItem
  193. className="half-item"
  194. {...formItemLayout}
  195. label="外包公司"
  196. >
  197. <span>{this.state.outsourceName}</span>
  198. </FormItem>
  199. <FormItem
  200. className="half-item"
  201. {...formItemLayout}
  202. label="外包成本(万元)"
  203. >
  204. <span>{this.state.outsourcePrice}</span>
  205. </FormItem>
  206. </div>
  207. ) : (
  208. ""
  209. )}
  210. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  211. <div className="clearfix">
  212. <h3 className="sub-title">联系信息</h3>
  213. <FormItem
  214. className="half-item"
  215. {...formItemLayout}
  216. label="客户名称"
  217. >
  218. <span>{this.state.userName}</span>
  219. </FormItem>
  220. <FormItem
  221. className="half-item"
  222. {...formItemLayout}
  223. label="企业法人"
  224. >
  225. <span>{this.state.legalPerson}</span>
  226. </FormItem>
  227. <FormItem
  228. className="half-item"
  229. {...formItemLayout}
  230. label="法人电话"
  231. >
  232. <span>{this.state.legalPersonTel}</span>
  233. </FormItem>
  234. <FormItem
  235. className="half-item"
  236. {...formItemLayout}
  237. label="客户联系人"
  238. >
  239. <span>{this.state.contacts}</span>
  240. </FormItem>
  241. <FormItem
  242. className="half-item"
  243. {...formItemLayout}
  244. label="联系人电话"
  245. >
  246. <span>{this.state.contactMobile}</span>
  247. </FormItem>
  248. <FormItem
  249. className="half-item"
  250. {...formItemLayout}
  251. label="企业地址"
  252. >
  253. <span>
  254. {getprovince(this.state.locationProvince)}/
  255. {getprovince(this.state.locationCity)}/
  256. {getprovince(this.state.locationArea)}
  257. </span>
  258. </FormItem>
  259. <FormItem
  260. className="half-item"
  261. {...formItemLayout}
  262. label=""
  263. ></FormItem>
  264. <FormItem className="half-item" {...formItemLayout}>
  265. <span style={{ paddingLeft: "12em" }}>
  266. {this.state.postalAddress}
  267. </span>
  268. </FormItem>
  269. </div>
  270. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  271. <div className="clearfix">
  272. <h3 className="sub-title">订单负责人信息</h3>
  273. <FormItem
  274. className="half-item"
  275. {...formItemLayout}
  276. label="负责人"
  277. >
  278. <span>
  279. {this.state.salesmanName + "(" + this.state.depName + ")"}
  280. </span>
  281. </FormItem>
  282. <FormItem
  283. className="half-item"
  284. {...formItemLayout}
  285. label="负责人电话"
  286. >
  287. <span>{this.state.salesmanMobile}</span>
  288. </FormItem>
  289. <FormItem
  290. className="half-item"
  291. {...formItemLayout}
  292. label="当前财务负责人"
  293. >
  294. <span>{this.state.nowFinance}</span>
  295. </FormItem>
  296. <FormItem
  297. className="half-item"
  298. {...formItemLayout}
  299. label="当前财务负责人电话"
  300. >
  301. <span>{this.state.nowFinanceMobile}</span>
  302. </FormItem>
  303. <FormItem
  304. className="half-item"
  305. {...formItemLayout}
  306. style={{ opacity: ".5" }}
  307. label="原负责人"
  308. >
  309. <span>{this.state.oldSalesmanName}</span>
  310. </FormItem>
  311. <FormItem
  312. className="half-item"
  313. {...formItemLayout}
  314. style={{ opacity: ".5" }}
  315. label="原负责人电话"
  316. >
  317. <span>{this.state.oldSalesmanMobile}</span>
  318. </FormItem>
  319. <FormItem
  320. className="half-item"
  321. {...formItemLayout}
  322. style={{ opacity: ".5" }}
  323. label="实际财务操作人"
  324. >
  325. <span>{this.state.financeName}</span>
  326. </FormItem>
  327. <FormItem
  328. className="half-item"
  329. {...formItemLayout}
  330. style={{ opacity: ".5" }}
  331. label="实际财务操作人电话"
  332. >
  333. <span>{this.state.financeMobile}</span>
  334. </FormItem>
  335. </div>
  336. <div className="clearfix">
  337. <h3 className="sub-title">申报系统账户信息</h3>
  338. {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}
  339. <FormItem
  340. className="half-item"
  341. {...formItemLayout}
  342. label="用户名"
  343. >
  344. <span>{this.state.declareUser ? "*" : ""}</span>
  345. </FormItem>
  346. <FormItem
  347. className="half-item"
  348. {...formItemLayout}
  349. label="密码"
  350. >
  351. <span>{this.state.declarePwd ? "*" : ""}</span>
  352. </FormItem>
  353. </div>
  354. <div className="clearfix">
  355. <h3 className="sub-title">项目申报进度</h3>
  356. <FormItem
  357. className="half-item"
  358. {...formItemLayout}
  359. label="启动时间"
  360. >
  361. <span>{this.state.startDate}</span>
  362. </FormItem>
  363. <FormItem
  364. className="half-item"
  365. {...formItemLayout}
  366. label="完成时间"
  367. >
  368. <span>{this.state.endDate}</span>
  369. </FormItem>
  370. <FormItem
  371. className="half-item"
  372. {...formItemLayout}
  373. label="受理时间"
  374. >
  375. <span>{this.state.acceptDate}</span>
  376. </FormItem>
  377. <FormItem
  378. className="half-item"
  379. {...formItemLayout}
  380. label="评审时间"
  381. >
  382. <span>{this.state.reviewDate}</span>
  383. </FormItem>
  384. <FormItem
  385. className="half-item"
  386. {...formItemLayout}
  387. label="公示时间"
  388. >
  389. <span>{this.state.publicityDate}</span>
  390. </FormItem>
  391. <FormItem
  392. className="half-item"
  393. {...formItemLayout}
  394. label="发证时间"
  395. >
  396. <span>{this.state.licenceDate}</span>
  397. </FormItem>
  398. <FormItem
  399. className="half-item"
  400. {...formItemLayout}
  401. label="立项金额(万元)"
  402. >
  403. <span>{this.state.setUpAmount}</span>
  404. </FormItem>
  405. <FormItem
  406. className="half-item"
  407. {...formItemLayout}
  408. label="是否到款"
  409. >
  410. <span>
  411. {this.state.arrivalMoney ? "已到企业" : "未到企业"}
  412. </span>
  413. </FormItem>
  414. </div>
  415. <div className="clearfix">
  416. <FormItem
  417. labelCol={{ span: 3 }}
  418. wrapperCol={{ span: 18 }}
  419. label="附件"
  420. >
  421. <Upload
  422. className="demandDetailShow-upload"
  423. listType="picture-card"
  424. fileList={this.state.attachmentUrl}
  425. onPreview={file => {
  426. this.setState({
  427. previewImage: file.url || file.thumbUrl,
  428. previewVisible: true
  429. });
  430. }}
  431. ></Upload>
  432. <Modal
  433. maskClosable={false}
  434. footer={null}
  435. visible={this.state.previewVisible}
  436. onCancel={() => {
  437. this.setState({ previewVisible: false });
  438. }}
  439. >
  440. <img
  441. alt=""
  442. style={{ width: "100%" }}
  443. src={this.state.previewImage || ""}
  444. />
  445. </Modal>
  446. </FormItem>
  447. </div>
  448. <div className="clearfix">
  449. <FormItem
  450. labelCol={{ span: 3 }}
  451. wrapperCol={{ span: 16 }}
  452. label="备注"
  453. >
  454. <span>{this.state.taskComment}</span>
  455. </FormItem>
  456. </div>
  457. <div>
  458. <h3 className="sub-title">项目业务</h3>
  459. {this.state.processStatus == 0 ? (
  460. <Button
  461. type="primary"
  462. onClick={this.addDetailed}
  463. style={{
  464. float: "right",
  465. marginRight: "50px",
  466. marginBottom: "15px"
  467. }}
  468. >
  469. 添加项目明细
  470. </Button>
  471. ) : (
  472. ""
  473. )}
  474. </div>
  475. <div className="patent-table">
  476. <Spin spinning={this.state.loading}>
  477. <Table
  478. columns={this.state.columnsX}
  479. dataSource={this.state.dataSourceX}
  480. pagination={this.state.paginations}
  481. onRowClick={this.tableRowClickX}
  482. bordered
  483. size="small"
  484. />
  485. </Spin>
  486. </div>
  487. </div>
  488. </Spin>
  489. </Form>
  490. </Modal>
  491. );
  492. }
  493. });
  494. export default project;