index.jsx 39 KB

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