index.jsx 42 KB

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