index.jsx 43 KB

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