index.jsx 39 KB

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