index.jsx 46 KB

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