index.jsx 48 KB

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