index.jsx 46 KB

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