index.jsx 47 KB

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