index.jsx 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181
  1. import React, { Component } from 'react'
  2. import {
  3. Form,
  4. Spin,
  5. Table,
  6. Modal,
  7. Col,
  8. Tag,
  9. Button,
  10. message,
  11. Row,
  12. Popconfirm,
  13. } from 'antd'
  14. import {getProjectStatus,} from '@/tools'
  15. import { getMaterialStatus, getUrgentStatus } from '@/tools'
  16. import ApplyPaymentModal from './applyPaymentModal';
  17. import PayRecord from './payRecord';
  18. import ImgList from '../../../common/imgList/index';
  19. import './index.less'
  20. import $ from "jquery";
  21. class CheckProject extends Component {
  22. constructor(props) {
  23. super(props)
  24. this.state = {
  25. value: '',
  26. loading: false,
  27. previewImage: '',
  28. previewVisible: false,
  29. payRecordVisible: false,
  30. orderPaymentsId: 0,
  31. previewPayVisible: false,
  32. type: 1,//1 申请付款 2 申请付官费
  33. previewPayInfor: {}, //点击申请付款的第三方信息或者支付节点信息
  34. nodeId: 0,
  35. // 专利
  36. ContactsListsNew: [],
  37. //付款节点表头
  38. PayNodeTableColunms: [],
  39. outsourceLogs: [],//审核日志
  40. selectOrderPayments: [],//支付列表
  41. }
  42. }
  43. componentDidMount() {
  44. if(this.props.tid){
  45. setTimeout(()=>{
  46. this.getSelectOutsourceLog();
  47. this.getSelectOrderPayment();
  48. this.projectTypeTabContent(this.props.projectType);
  49. },500)
  50. }
  51. }
  52. projectTypeTabContent(projectType) {
  53. this.setState({
  54. //付款节点表头
  55. PayNodeTableColunms: [
  56. {
  57. title: '供应商名称',
  58. dataIndex: 'companyName',
  59. key: 'companyName',
  60. render: (text, record, index) => {
  61. if (text) {
  62. return <span>{text}</span>
  63. }
  64. },
  65. },
  66. {
  67. title: '付款科目',
  68. dataIndex: 'dunType',
  69. key: 'dunType',
  70. render: (text, record) => {
  71. if (text) {
  72. return <span>{text}</span>
  73. }
  74. },
  75. },
  76. {
  77. title: '付款时间',
  78. dataIndex: 'partyTimes',
  79. key: 'partyTimes',
  80. render: (text, record) => {
  81. return <span>{text ? text : '/'}</span>
  82. },
  83. },
  84. {
  85. title: '数量',
  86. dataIndex: 'quantity',
  87. key: 'quantity',
  88. render: (text, record) => {
  89. if (text) {
  90. return <span>{text}</span>
  91. }
  92. },
  93. },
  94. {
  95. title: '总价(万元)',
  96. dataIndex: 'totalAmount',
  97. key: 'totalAmount',
  98. render: (text, record) => {
  99. return <span>{text}</span>
  100. },
  101. },
  102. {
  103. title: '已付',
  104. dataIndex: 'partyAmount',
  105. key: 'partyAmount',
  106. render: (text, record) => {
  107. if (text) {
  108. return <span>{text}</span>
  109. }
  110. },
  111. },
  112. {
  113. title: '操作',
  114. dataIndex: 'dels',
  115. key: 'dels',
  116. render: (text, record, index) => {
  117. return (
  118. <div>
  119. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  120. {/*存在支付节点时不显示第三方的申请付款*/}
  121. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  122. {/*this.props.startType 0外包 1供应商(不需要审核)*/}
  123. {/*record.status 0-未支付 1-待全款 ,2已全款 status=2的时候已经全款,按钮可以去掉了*/}
  124. <Button disabled={
  125. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && record.status !==2 )
  126. } type="primary" onClick={() => {
  127. this.setState({
  128. previewPayVisible: true,
  129. previewPayInfor: record,
  130. })
  131. }}>
  132. 申请付款
  133. </Button>
  134. {this.props.status === 2 ? <Popconfirm
  135. title="是否删除?"
  136. onConfirm={() => {
  137. this.payNodeConfirmDeletNew(record)
  138. }}
  139. okText="删除"
  140. cancelText="不删除"
  141. >
  142. <Button
  143. disabled={this.props.status !== 2}
  144. onClick={(e) => {
  145. e.stopPropagation()
  146. }}
  147. style={{
  148. marginLeft: '10px',
  149. color: '#ffffff',
  150. background: '#f00',
  151. border: 'none',
  152. }}
  153. >
  154. 删除
  155. </Button>
  156. </Popconfirm> : <div/>}
  157. </div>
  158. )
  159. },
  160. },
  161. ],
  162. })
  163. if(projectType === 0 || !projectType){ //0正常 1专利 2软著 3审计
  164. this.setState({
  165. ContactsListsNew: [
  166. {
  167. title: '供应商名称',
  168. dataIndex: 'companyName',
  169. key: 'companyName',
  170. render: (text, record, index) => {
  171. if (text) {
  172. return <span>{text}</span>
  173. }
  174. },
  175. },
  176. {
  177. title: '单价(万元)',
  178. dataIndex: 'unitPrice',
  179. key: 'unitPrice',
  180. render: (text, record) => {
  181. if (text) {
  182. return <span>{text}</span>
  183. }
  184. },
  185. },
  186. {
  187. title: '数量',
  188. dataIndex: 'quantity',
  189. key: 'quantity',
  190. render: (text, record) => {
  191. if (text) {
  192. return <span>{text}</span>
  193. }
  194. },
  195. },
  196. {
  197. title: '总价(万元)',
  198. dataIndex: 'totalAmount',
  199. key: 'totalAmount',
  200. render: (text, record) => {
  201. if (text) {
  202. return <span>{text}</span>
  203. }
  204. },
  205. },
  206. {
  207. title: '备注',
  208. dataIndex: 'remarks',
  209. key: 'remarks',
  210. },
  211. {
  212. title: '操作',
  213. dataIndex: 'action',
  214. key: 'action',
  215. render: (text, record) => {
  216. return (
  217. <div>
  218. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  219. {/*存在支付节点时不显示第三方的申请付款*/}
  220. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  221. {/*this.props.startType 0外包 1供应商(不需要审核)*/}
  222. <Button disabled={
  223. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  224. } type="primary" onClick={() => {
  225. this.setState({
  226. previewPayVisible: true,
  227. previewPayInfor: record,
  228. })
  229. }}>
  230. 申请付款
  231. </Button>
  232. {this.props.status === 2 ? <Popconfirm
  233. title="是否删除?"
  234. onConfirm={() => {
  235. this.confirmDeletNew(record)
  236. }}
  237. okText="删除"
  238. cancelText="不删除"
  239. >
  240. <Button
  241. disabled={this.props.status !== 2}
  242. onClick={(e) => {
  243. e.stopPropagation()
  244. }}
  245. style={{
  246. marginLeft: '10px',
  247. color: '#ffffff',
  248. background: '#f00',
  249. border: 'none',
  250. }}
  251. >
  252. 删除
  253. </Button>
  254. </Popconfirm> : <div/>}
  255. </div>
  256. )
  257. },
  258. },
  259. ],
  260. })
  261. }else if(projectType === 2){ //2软著
  262. this.setState({
  263. ContactsListsNew: [
  264. {
  265. title: '供应商名称',
  266. dataIndex: 'companyName',
  267. key: 'companyName',
  268. render: (text, record, index) => {
  269. if (text) {
  270. return <span>{text}</span>
  271. }
  272. },
  273. },
  274. {
  275. title: '单价(万元)',
  276. dataIndex: 'unitPrice',
  277. key: 'unitPrice',
  278. render: (text, record) => {
  279. if (text) {
  280. return <span>{text}</span>
  281. }
  282. },
  283. },
  284. {
  285. title: '数量',
  286. dataIndex: 'quantity',
  287. key: 'quantity',
  288. render: (text, record) => {
  289. if (text) {
  290. return <span>{text}</span>
  291. }
  292. },
  293. },
  294. {
  295. title: '总价(万元)',
  296. dataIndex: 'totalAmount',
  297. key: 'totalAmount',
  298. render: (text, record) => {
  299. if (text) {
  300. return <span>***</span>
  301. }
  302. },
  303. },
  304. {
  305. title: '材料',
  306. dataIndex: 'material',
  307. key: 'material',
  308. render: (text, record) => {
  309. return getMaterialStatus(text)
  310. },
  311. },
  312. {
  313. title: '加急',
  314. dataIndex: 'urgent',
  315. key: 'urgent',
  316. render: (text, record) => {
  317. return getUrgentStatus(text)
  318. },
  319. },
  320. {
  321. title: '操作',
  322. dataIndex: 'action',
  323. key: 'action',
  324. render: (text, record) => {
  325. return (
  326. <div>
  327. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  328. {/*存在支付节点时不显示第三方的申请付款*/}
  329. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  330. {
  331. <Button disabled={
  332. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  333. } type="primary" onClick={() => {
  334. this.setState({
  335. previewPayVisible: true,
  336. previewPayInfor: record,
  337. })
  338. }}>
  339. 申请付款
  340. </Button>
  341. }
  342. {this.props.status === 2 ? <Popconfirm
  343. title="是否删除?"
  344. onConfirm={() => {
  345. this.confirmDeletNew(record)
  346. }}
  347. okText="删除"
  348. cancelText="不删除"
  349. >
  350. <Button
  351. disabled={this.props.status !== 2}
  352. onClick={(e) => {
  353. e.stopPropagation()
  354. }}
  355. style={{
  356. marginLeft: '10px',
  357. color: '#ffffff',
  358. background: '#f00',
  359. border: 'none',
  360. }}
  361. >
  362. 删除
  363. </Button>
  364. </Popconfirm> : <div/>}
  365. </div>
  366. )
  367. },
  368. },
  369. ],
  370. })
  371. }else if(projectType === 1){ //1专利
  372. if(this.props.patentType === 0){ //专利申请
  373. this.setState({
  374. ContactsListsNew: [
  375. {
  376. title: '供应商名称',
  377. dataIndex: 'companyName',
  378. key: 'companyName',
  379. render: (text, record, index) => {
  380. if (text) {
  381. return <span>{text}</span>
  382. }
  383. },
  384. },
  385. {
  386. title: '单价(万元)',
  387. dataIndex: 'unitPrice',
  388. key: 'unitPrice',
  389. render: (text, record) => {
  390. if (text) {
  391. return <span>{text}</span>
  392. }
  393. },
  394. },
  395. {
  396. title: '数量',
  397. dataIndex: 'quantity',
  398. key: 'quantity',
  399. render: (text, record) => {
  400. if (text) {
  401. return <span>{text}</span>
  402. }
  403. },
  404. },
  405. {
  406. title: "官费",
  407. dataIndex: "officialCost",
  408. key: "officialCost",
  409. render: (text) => {
  410. return text === 1 ? '含官费' : '不含官费'
  411. },
  412. },
  413. {
  414. title: "费减",
  415. dataIndex: "costReduction",
  416. key: "costReduction",
  417. render: (text) => {
  418. return text === 1 ? '有费减' : '无费减'
  419. },
  420. },
  421. {
  422. title: '总价(万元)',
  423. dataIndex: 'totalAmount',
  424. key: 'totalAmount',
  425. render: (text, record) => {
  426. if (text) {
  427. return <span>{text}</span>
  428. }
  429. },
  430. },
  431. {
  432. title: '备注',
  433. dataIndex: 'remarks',
  434. key: 'remarks',
  435. },
  436. {
  437. title: '操作',
  438. dataIndex: 'action',
  439. key: 'action',
  440. render: (text, record) => {
  441. return (
  442. <div>
  443. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  444. {/*存在支付节点时不显示第三方的申请付款*/}
  445. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  446. <Button disabled={
  447. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  448. } type="primary" onClick={() => {
  449. this.setState({
  450. previewPayVisible: true,
  451. previewPayInfor: record,
  452. })
  453. }}>
  454. 申请付款
  455. </Button>
  456. {record.officialCost === 1? <Button
  457. type="primary"
  458. style={{
  459. marginLeft: '10px',
  460. }}
  461. disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1))}
  462. onClick={() => {
  463. this.setState({
  464. previewPayVisible: true,
  465. previewPayInfor: record,
  466. type: 2,
  467. })
  468. }}>
  469. 付官费
  470. </Button> : <div/>}
  471. {this.props.status === 2 ? <Popconfirm
  472. title="是否删除?"
  473. onConfirm={() => {
  474. this.confirmDeletNew(record)
  475. }}
  476. okText="删除"
  477. cancelText="不删除"
  478. >
  479. <Button
  480. disabled={this.props.status !== 2}
  481. onClick={(e) => {
  482. e.stopPropagation()
  483. }}
  484. style={{
  485. marginLeft: '10px',
  486. color: '#ffffff',
  487. background: '#f00',
  488. border: 'none',
  489. }}
  490. >
  491. 删除
  492. </Button>
  493. </Popconfirm> : <div/>}
  494. </div>
  495. )
  496. },
  497. },
  498. ],
  499. })
  500. }else{
  501. this.setState({
  502. ContactsListsNew: [
  503. {
  504. title: '供应商名称',
  505. dataIndex: 'companyName',
  506. key: 'companyName',
  507. render: (text, record, index) => {
  508. if (text) {
  509. return <span>{text}</span>
  510. }
  511. },
  512. },
  513. {
  514. title: '单价(万元)',
  515. dataIndex: 'unitPrice',
  516. key: 'unitPrice',
  517. render: (text, record) => {
  518. if (text) {
  519. return <span>{text}</span>
  520. }
  521. },
  522. },
  523. {
  524. title: '数量',
  525. dataIndex: 'quantity',
  526. key: 'quantity',
  527. render: (text, record) => {
  528. if (text) {
  529. return <span>{text}</span>
  530. }
  531. },
  532. },
  533. {
  534. title: '总价(万元)',
  535. dataIndex: 'totalAmount',
  536. key: 'totalAmount',
  537. render: (text, record) => {
  538. if (text) {
  539. return <span>{text}</span>
  540. }
  541. },
  542. },
  543. {
  544. title: '备注',
  545. dataIndex: 'remarks',
  546. key: 'remarks',
  547. },
  548. {
  549. title: '操作',
  550. dataIndex: 'action',
  551. key: 'action',
  552. render: (text, record) => {
  553. return (
  554. <div>
  555. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  556. {/*存在支付节点时不显示第三方的申请付款*/}
  557. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  558. {
  559. <Button disabled={
  560. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  561. } type="primary" onClick={() => {
  562. this.setState({
  563. previewPayVisible: true,
  564. previewPayInfor: record,
  565. })
  566. }}>
  567. 申请付款
  568. </Button>
  569. }
  570. {this.props.status === 2 ? <Popconfirm
  571. title="是否删除?"
  572. onConfirm={() => {
  573. this.confirmDeletNew(record)
  574. }}
  575. okText="删除"
  576. cancelText="不删除"
  577. >
  578. <Button
  579. disabled={this.props.status !== 2}
  580. onClick={(e) => {
  581. e.stopPropagation()
  582. }}
  583. style={{
  584. marginLeft: '10px',
  585. color: '#ffffff',
  586. background: '#f00',
  587. border: 'none',
  588. }}
  589. >
  590. 删除
  591. </Button>
  592. </Popconfirm> : <div/>}
  593. </div>
  594. )
  595. },
  596. },
  597. ]
  598. })
  599. }
  600. }else if(projectType === 3){ //3审计
  601. this.setState({
  602. ContactsListsNew: [
  603. {
  604. title: '供应商名称',
  605. dataIndex: 'companyName',
  606. key: 'companyName',
  607. render: (text, record, index) => {
  608. if (text) {
  609. return <span>{text}</span>
  610. }
  611. },
  612. },
  613. {
  614. title: '单价(万元)',
  615. dataIndex: 'unitPrice',
  616. key: 'unitPrice',
  617. render: (text, record) => {
  618. if (text) {
  619. return <span>{text}</span>
  620. }
  621. },
  622. },
  623. {
  624. title: '数量',
  625. dataIndex: 'quantity',
  626. key: 'quantity',
  627. render: (text, record) => {
  628. if (text) {
  629. return <span>{text}</span>
  630. }
  631. },
  632. },
  633. {
  634. title: '总价(万元)',
  635. dataIndex: 'totalAmount',
  636. key: 'totalAmount',
  637. render: (text, record) => {
  638. if (text) {
  639. return <span>***</span>
  640. }
  641. },
  642. },
  643. {
  644. title: '审计',
  645. dataIndex: 'audit',
  646. key: 'audit',
  647. render: (text, record) => {
  648. if (text) {
  649. return <span>{text===0?'无审计':text===1?'年审':'专审'}</span>
  650. }
  651. },
  652. },
  653. {
  654. title: '公司资产(万元)',
  655. dataIndex: 'assets',
  656. key: 'assets',
  657. render: (text, record) => {
  658. if (text) {
  659. return <span>{text}</span>
  660. }
  661. },
  662. },
  663. {
  664. title: '收入(万元)',
  665. dataIndex: 'income',
  666. key: 'income',
  667. render: (text, record) => {
  668. if (text) {
  669. return <span>{text}</span>
  670. }
  671. },
  672. },
  673. {
  674. title: '操作',
  675. dataIndex: 'action',
  676. key: 'action',
  677. render: (text, record) => {
  678. return (
  679. <div>
  680. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  681. {/*存在支付节点时不显示第三方的申请付款*/}
  682. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  683. {
  684. <Button disabled={
  685. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  686. } type="primary" onClick={() => {
  687. this.setState({
  688. previewPayVisible: true,
  689. previewPayInfor: record,
  690. })
  691. }}>
  692. 申请付款
  693. </Button>
  694. }
  695. {this.props.status === 2 ? <Popconfirm
  696. title="是否删除?"
  697. onConfirm={() => {
  698. this.confirmDeletNew(record)
  699. }}
  700. okText="删除"
  701. cancelText="不删除"
  702. >
  703. <Button
  704. disabled={this.props.status !== 2}
  705. onClick={(e) => {
  706. e.stopPropagation()
  707. }}
  708. style={{
  709. marginLeft: '10px',
  710. color: '#ffffff',
  711. background: '#f00',
  712. border: 'none',
  713. }}
  714. >
  715. 删除
  716. </Button>
  717. </Popconfirm> : <div/>}
  718. </div>
  719. )
  720. },
  721. },
  722. ]
  723. })
  724. }
  725. }
  726. onChange() {
  727. this.setState({
  728. value: e.target.value,
  729. })
  730. }
  731. tableRowClickOne(record) {}
  732. //点击付款节点详情
  733. payNodeTableRowClickOne(record) {}
  734. //外包日志列表
  735. getSelectOutsourceLog(){
  736. $.ajax({
  737. method: 'get',
  738. dataType: 'json',
  739. crossDomain: false,
  740. url: globalConfig.context + '/api/admin/outsourceOrg/selectOutsourceLog',
  741. data: {
  742. tid: this.props.tid,
  743. },
  744. success: function (data) {
  745. if (data.error.length) {
  746. if (data.error && data.error.length) {
  747. message.warning(data.error[0].message);
  748. }
  749. } else {
  750. this.setState({
  751. outsourceLogs: data.data
  752. })
  753. }
  754. }.bind(this),
  755. }).always(
  756. function () {
  757. }.bind(this)
  758. )
  759. }
  760. //支付列表
  761. getSelectOrderPayment() {
  762. $.ajax({
  763. method: 'get',
  764. dataType: 'json',
  765. crossDomain: false,
  766. url: globalConfig.context + '/api/admin/company/selectOrderPayment',
  767. data: {
  768. id: this.props.tid,
  769. },
  770. success: function (data) {
  771. if (data.error.length) {
  772. if (data.error && data.error.length) {
  773. message.warning(data.error[0].message);
  774. }
  775. } else {
  776. this.setState({
  777. selectOrderPayments: data.data
  778. })
  779. }
  780. }.bind(this),
  781. }).always(
  782. function () {
  783. }.bind(this)
  784. )
  785. }
  786. //0审核 1待支付 2驳回 3已支付 4取消
  787. operationJudgmentName(id) {
  788. if(this.props.isAuditPayment){ //财务
  789. return id === 0 ? '待审核' :
  790. id === 1 ? '待支付' :
  791. id === 2 ? '查看详情' : '查看详情'
  792. }else{
  793. return id === 0 ? '待审核' :
  794. id === 1 ? '待支付' :
  795. id === 2 ? '查看详情' : '查看详情'
  796. }
  797. }
  798. // 删除供应商信息
  799. confirmDeletNew(index) {
  800. this.setState({
  801. loading: true,
  802. ThirdListVisible: false,
  803. })
  804. $.ajax({
  805. url: globalConfig.context + '/api/admin/company/deleteCompany',
  806. method: 'post',
  807. data: {
  808. id: index.id,
  809. },
  810. }).done(
  811. function (data) {
  812. this.setState({
  813. loading: false,
  814. })
  815. if (!data.error.length) {
  816. message.success('删除成功!')
  817. this.props.onRefresh()
  818. } else {
  819. message.warning(data.error[0].message)
  820. }
  821. }.bind(this)
  822. )
  823. }
  824. render() {
  825. return (
  826. <div className="App">
  827. <div className="projectType">
  828. <div className="typeTitle">
  829. <div>类型:</div>
  830. </div>
  831. {
  832. parseInt(this.props.startType) === 0 ?
  833. <div>
  834. <div>外包(外包派单,不走总部)</div>
  835. <div className="tipsText">提示高于总部价格,费用个人承担</div>
  836. </div> :
  837. <div>供应商信息(普通单)</div>
  838. }
  839. <div style={{marginLeft:'auto'}}>
  840. <span style={{color:'#58a3ff'}}>项目状态:</span>{getProjectStatus(this.props.projectStatus)}
  841. </div>
  842. </div>
  843. {
  844. this.props.projectType === 1?
  845. <div style={{
  846. display:'flex',
  847. flexFlow:'row nowrap',
  848. alignItems:'center',
  849. padding:'0px 0px 10px 20px'
  850. }}>
  851. <div>
  852. 专利类型:<span style={{marginLeft:'15px'}}>{this.props.patentType === 0 ? '专利申请/变更/转让' : '专利买卖'}</span>
  853. </div>
  854. <div style={{paddingLeft:'100px'}}>
  855. 专利名称:<span style={{marginLeft:'15px'}}>
  856. {
  857. this.props.patentNameType === 0 ? '实用新型专利' :
  858. this.props.patentNameType === 1 ? '发明专利' :
  859. this.props.patentNameType === 2 ? '外观专利' :
  860. this.props.patentNameType === 3 ? this.props.patentName : ''
  861. }
  862. </span>
  863. </div>
  864. </div> : <div/>
  865. }
  866. <div className="thirdParty">
  867. <div>
  868. <span className="title">
  869. 第三方信息
  870. </span>
  871. </div>
  872. <div
  873. className="clearfix"
  874. >
  875. <Spin spinning={this.state.loading}>
  876. <Form layout="horizontal">
  877. <Table
  878. pagination={false}
  879. columns={this.state.ContactsListsNew}
  880. dataSource={this.props.thirdInfoList}
  881. onRowClick={this.tableRowClickOne}
  882. scroll={{ x: 'max-content', y: 0 }}
  883. bordered
  884. size="small"
  885. />
  886. <Col span={24} offset={9} style={{ marginTop: '15px' }}/>
  887. </Form>
  888. </Spin>
  889. </div>
  890. </div>
  891. {/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
  892. {!((this.props.projectType === 1 && this.props.patentType === 0) || this.props.projectType === 2) ? <div className="thirdParty">
  893. <div>
  894. <span className="title">
  895. 付款节点
  896. </span>
  897. </div>
  898. <div
  899. className="clearfix"
  900. >
  901. <Spin spinning={this.state.loading}>
  902. <Form layout="horizontal">
  903. <Table
  904. pagination={false}
  905. columns={this.state.PayNodeTableColunms}
  906. dataSource={this.props.dataSource}
  907. onRowClick={this.payNodeTableRowClickOne}
  908. scroll={{ x: 'max-content', y: 0 }}
  909. bordered
  910. size="small"
  911. />
  912. <Col span={24} offset={9} style={{ marginTop: '15px' }}/>
  913. </Form>
  914. </Spin>
  915. </div>
  916. </div> : <div/>}
  917. <div
  918. style={{
  919. borderTop: '1px #000000 dashed',
  920. padding: '10px 20px 0px 20px',
  921. }}
  922. >
  923. <div>
  924. <div className="title">备注</div>
  925. <div style={{fontSize:'15px'}}>
  926. {this.props.outsourceRemarks}
  927. </div>
  928. </div>
  929. {this.props.fileList && this.props.fileList.length > 0 ? <div style={{paddingTop:'10px'}}>
  930. <div className="title">合同/协议扫描件</div>
  931. <div>
  932. <ImgList fileList={this.props.fileList} ItemWidth={'96px'}/>
  933. </div>
  934. {/*<Upload*/}
  935. {/* className="demandDetailShow-upload"*/}
  936. {/* listType="picture-card"*/}
  937. {/* fileList={this.props.fileList}*/}
  938. {/* onPreview={(file) => {*/}
  939. {/* this.setState({*/}
  940. {/* previewImage: file.url || file.thumbUrl,*/}
  941. {/* previewVisible: true,*/}
  942. {/* })*/}
  943. {/* }}*/}
  944. {/*/>*/}
  945. <Modal
  946. maskClosable={false}
  947. footer={null}
  948. visible={this.state.previewVisible}
  949. onCancel={() => {
  950. this.setState({ previewVisible: false })
  951. }}
  952. >
  953. <img
  954. alt=""
  955. style={{ width: '100%' }}
  956. src={this.state.previewImage || ''}
  957. />
  958. </Modal>
  959. </div> : <div/>}
  960. </div>
  961. {parseInt(this.props.startType) !== 1 && this.state.outsourceLogs.length !== 0 ? <div className="outsourceLogConent">
  962. <div className="title" style={{
  963. paddingBottom: 0,
  964. }}>外包状态</div>
  965. <div className="outsourceLogList">
  966. {
  967. this.state.outsourceLogs && this.state.outsourceLogs.map((value,index)=>(
  968. <div key={index} className="outsourceLogItem outsource">
  969. <div style={{
  970. display:'flex',
  971. flexFlow:'row nowrap',
  972. paddingBottom: '3px',
  973. paddingTop: '3px',
  974. }}>
  975. <div>
  976. {value.aname}
  977. </div>
  978. <div style={{paddingLeft:'5px'}}>
  979. {
  980. value.status === 0 ?
  981. <Tag color="#2db7f5">发起外包审核</Tag> :
  982. value.status === 1 ? <Tag color="#87d068">通过</Tag> :
  983. <Tag color="#f50">驳回</Tag>
  984. }
  985. </div>
  986. <div style={{
  987. wordBreak: 'break-all',
  988. maxWidth:'67%',
  989. }}>
  990. {value.remarks}
  991. </div>
  992. <div style={{paddingLeft: '10px'}}>
  993. {value.createTimes}
  994. </div>
  995. </div>
  996. </div>
  997. ))
  998. }
  999. </div>
  1000. </div> : <div/>}
  1001. {this.state.selectOrderPayments.length !== 0 ? <div className="outsourceLogConent">
  1002. <div className="title">支付记录</div>
  1003. <div className="outsourceLogItem" style={{
  1004. fontWeight: 'bold',
  1005. }}>
  1006. <Row gutter={16}>
  1007. <Col className="gutter-row" span={2}>
  1008. <div>
  1009. 编号
  1010. </div>
  1011. </Col>
  1012. <Col className="gutter-row" span={5}>
  1013. <div className="gutter-box">
  1014. 供应商名称
  1015. </div>
  1016. </Col>
  1017. <Col className="gutter-row" span={3}>
  1018. <div className="gutter-box">
  1019. 支付类型
  1020. </div>
  1021. </Col>
  1022. <Col className="gutter-row" span={4}>
  1023. <div className="gutter-box">
  1024. {this.props.projectType === 2 || (this.props.projectType === 1 && this.props.patentType === 0) ? '申请支付数量' : '申请支付金额(万元)'}
  1025. </div>
  1026. </Col>
  1027. <Col className="gutter-row" span={4}>
  1028. <div className="gutter-box">
  1029. 申请时间
  1030. </div>
  1031. </Col>
  1032. <Col className="gutter-row" span={6}>
  1033. <div className="gutter-box">
  1034. 状态
  1035. </div>
  1036. </Col>
  1037. </Row>
  1038. </div>
  1039. <div className="outsourceLogList" style={{paddingTop:'5px'}}>
  1040. {
  1041. this.state.selectOrderPayments.map((value,index)=>(
  1042. <div key={index} className="orderPayItem" onClick={()=>{
  1043. this.setState({
  1044. payRecordVisible: true,
  1045. orderPaymentsId: value.id,
  1046. })
  1047. }}>
  1048. <Row gutter={16}>
  1049. <Col className="gutter-row" span={2}>
  1050. <div>
  1051. {value.id}
  1052. </div>
  1053. </Col>
  1054. <Col className="gutter-row" span={5}>
  1055. <div className="gutter-box">
  1056. {value.companyName+'-'+value.tpcId}
  1057. {
  1058. value.companyName !== value.tpcName ?
  1059. '('+value.tpcName+')' : ''
  1060. }
  1061. </div>
  1062. </Col>
  1063. <Col className="gutter-row" span={3}>
  1064. <div className="gutter-box">
  1065. {/*0第三方 1催款 2官费*/}
  1066. {value.chooseType === 0 ? '第三方' : value.chooseType === 1 ? '催款' : '官费'}
  1067. </div>
  1068. </Col>
  1069. <Col className="gutter-row" span={4}>
  1070. <div className="gutter-box">
  1071. {
  1072. this.props.projectType === 2 || (this.props.projectType === 1 && this.props.patentType === 0) ?
  1073. value.quantity:
  1074. value.applicationAmount
  1075. }
  1076. </div>
  1077. </Col>
  1078. <Col className="gutter-row" span={4}>
  1079. <div className="gutter-box">
  1080. {value.createTimes}
  1081. </div>
  1082. </Col>
  1083. <Col className="operationItem" span={6}>
  1084. <div className="gutter-box" style={{
  1085. width: '100%',
  1086. display: 'flex',
  1087. justifyContent: 'center',
  1088. }}>
  1089. <div className="operation">
  1090. {
  1091. value.status === 0 ? '审核中' :
  1092. value.status === 1 ? '审核通过' :
  1093. value.status === 2 ? '已驳回' :
  1094. value.status === 3 ? '支付完成' : '已取消'
  1095. }
  1096. </div>
  1097. <Button type="primary" size='small' onClick={()=>{
  1098. this.setState({
  1099. payRecordVisible: true,
  1100. orderPaymentsId: value.id,
  1101. })
  1102. }}>
  1103. {this.operationJudgmentName(value.status)}
  1104. </Button>
  1105. </div>
  1106. </Col>
  1107. </Row>
  1108. </div>
  1109. ))
  1110. }
  1111. </div>
  1112. </div> : <div/>}
  1113. {/*
  1114. 申请付款
  1115. tid:项目id
  1116. nodeId: 付款节点id
  1117. previewPayInfor: 项目或者节点信息
  1118. */}
  1119. {this.state.previewPayVisible ? <ApplyPaymentModal
  1120. {...this.props}
  1121. tid={this.props.tid}
  1122. type={this.state.type}
  1123. nodeId={this.state.nodeId}
  1124. projectType={this.props.projectType}
  1125. patentType={this.props.patentType}
  1126. previewPayInfor={this.state.previewPayInfor}
  1127. visible={this.state.previewPayVisible}
  1128. onRefresh={()=>{
  1129. this.props.onRefresh();
  1130. this.getSelectOrderPayment();
  1131. }}
  1132. changeVisible={()=>{
  1133. this.setState({
  1134. previewPayVisible: false,
  1135. nodeId: 0, //付款节点id
  1136. previewPayInfor: {},
  1137. type: 1
  1138. })
  1139. }}/> : <div/>}
  1140. {/* 支付记录操作弹出 */}
  1141. {this.state.payRecordVisible ? <PayRecord
  1142. {...this.props}
  1143. tid={this.props.tid}
  1144. projectType={this.props.projectType}
  1145. patentType={this.props.patentType}
  1146. payId={this.state.orderPaymentsId}
  1147. visible={this.state.payRecordVisible}
  1148. isAuditPayment={this.props.isAuditPayment}
  1149. onRefresh={()=>{
  1150. this.props.onRefresh();
  1151. this.getSelectOrderPayment();
  1152. }}
  1153. changeVisible={()=>{
  1154. this.getSelectOrderPayment();
  1155. this.props.onRefresh && this.props.onRefresh();
  1156. this.setState({
  1157. payRecordVisible: false,
  1158. })
  1159. }}
  1160. /> : <div/>}
  1161. </div>
  1162. )
  1163. }
  1164. }
  1165. export default CheckProject