index.jsx 39 KB

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