index.jsx 37 KB

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