index.jsx 41 KB

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