index.jsx 41 KB

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