index.jsx 46 KB

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