index.jsx 43 KB

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