index.jsx 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  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 || parseInt(this.props.startType) === 2) && 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 || parseInt(this.props.startType) === 2) && 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 || parseInt(this.props.startType) === 2) && 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 || parseInt(this.props.startType) === 2) && this.props.dataSource.length === 0)
  526. } type="primary" onClick={() => {
  527. this.setState({
  528. previewPayVisible: true,
  529. previewPayInfor: record,
  530. })
  531. }}>
  532. 申请付款
  533. </Button>
  534. {this.props.status === 2 && !this.props.isAuditPaymentGLY ? <Popconfirm
  535. title="是否删除?"
  536. onConfirm={() => {
  537. this.confirmDeletNew(record)
  538. }}
  539. okText="删除"
  540. cancelText="不删除"
  541. >
  542. <Button
  543. disabled={this.props.status !== 2}
  544. onClick={(e) => {
  545. e.stopPropagation()
  546. }}
  547. style={{
  548. marginLeft: '10px',
  549. color: '#ffffff',
  550. background: '#f00',
  551. border: 'none',
  552. }}
  553. >
  554. 删除
  555. </Button>
  556. </Popconfirm> : <div />}
  557. </div>
  558. )
  559. },
  560. },
  561. ],
  562. })
  563. } else {
  564. this.setState({
  565. ContactsListsNew: [
  566. {
  567. title: '供应商名称',
  568. dataIndex: 'companyName',
  569. key: 'companyName',
  570. render: (text, record, index) => {
  571. if (text) {
  572. return <span>{text}</span>
  573. }
  574. },
  575. },
  576. {
  577. title: '单价(万元)',
  578. dataIndex: 'unitPrice',
  579. key: 'unitPrice',
  580. render: (text, record) => {
  581. if (text) {
  582. return <span>
  583. {
  584. isNaN(text) ? text : parseFloat(text)
  585. }
  586. </span>
  587. }
  588. },
  589. },
  590. {
  591. title: '数量',
  592. dataIndex: 'quantity',
  593. key: 'quantity',
  594. render: (text, record) => {
  595. if (text) {
  596. return <span>{text}</span>
  597. }
  598. },
  599. },
  600. {
  601. title: '总价(万元)',
  602. dataIndex: 'totalAmount',
  603. key: 'totalAmount',
  604. render: (text, record) => {
  605. if (text) {
  606. return <span>
  607. {
  608. isNaN(text) ? text : parseFloat(text)
  609. }
  610. </span>
  611. }
  612. },
  613. },
  614. {
  615. title: '备注',
  616. dataIndex: 'remarks',
  617. key: 'remarks',
  618. render: (text) => {
  619. return (
  620. <Tooltip placement="topLeft" title={text}>
  621. <div style={{
  622. maxWidth: '150px',
  623. overflow: 'hidden',
  624. textOverflow: "ellipsis",
  625. whiteSpace: 'nowrap',
  626. }}>{text}</div>
  627. </Tooltip>
  628. )
  629. }
  630. },
  631. {
  632. title: '操作',
  633. dataIndex: 'action',
  634. key: 'action',
  635. render: (text, record) => {
  636. return (
  637. <div>
  638. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  639. {/*存在支付节点时不显示第三方的申请付款*/}
  640. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  641. {
  642. <Button disabled={
  643. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1 || parseInt(this.props.startType) === 2) && this.props.dataSource.length === 0)
  644. } type="primary" onClick={() => {
  645. this.setState({
  646. previewPayVisible: true,
  647. previewPayInfor: record,
  648. })
  649. }}>
  650. 申请付款
  651. </Button>
  652. }
  653. {this.props.status === 2 && !this.props.isAuditPaymentGLY ? <Popconfirm
  654. title="是否删除?"
  655. onConfirm={() => {
  656. this.confirmDeletNew(record)
  657. }}
  658. okText="删除"
  659. cancelText="不删除"
  660. >
  661. <Button
  662. disabled={this.props.status !== 2}
  663. onClick={(e) => {
  664. e.stopPropagation()
  665. }}
  666. style={{
  667. marginLeft: '10px',
  668. color: '#ffffff',
  669. background: '#f00',
  670. border: 'none',
  671. }}
  672. >
  673. 删除
  674. </Button>
  675. </Popconfirm> : <div />}
  676. </div>
  677. )
  678. },
  679. },
  680. ]
  681. })
  682. }
  683. } else if (projectType === 3) { //3审计
  684. this.setState({
  685. ContactsListsNew: [
  686. {
  687. title: '供应商名称',
  688. dataIndex: 'companyName',
  689. key: 'companyName',
  690. render: (text, record, index) => {
  691. if (text) {
  692. return <span>{text}</span>
  693. }
  694. },
  695. },
  696. {
  697. title: '单价(万元)',
  698. dataIndex: 'unitPrice',
  699. key: 'unitPrice',
  700. render: (text, record) => {
  701. if (text) {
  702. return <span>
  703. {
  704. isNaN(text) ? text : parseFloat(text)
  705. }
  706. </span>
  707. }
  708. },
  709. },
  710. {
  711. title: '数量',
  712. dataIndex: 'quantity',
  713. key: 'quantity',
  714. render: (text, record) => {
  715. if (text) {
  716. return <span>{text}</span>
  717. }
  718. },
  719. },
  720. {
  721. title: '总价(万元)',
  722. dataIndex: 'totalAmount',
  723. key: 'totalAmount',
  724. render: (text, record) => {
  725. if (text) {
  726. return <span>
  727. {
  728. isNaN(text) ? text : parseFloat(text)
  729. }
  730. </span>
  731. }
  732. },
  733. },
  734. {
  735. title: '审计',
  736. dataIndex: 'audit',
  737. key: 'audit',
  738. render: (text, record) => {
  739. if (text) {
  740. return <span>{text === 0 ? '无审计' : text === 1 ? '年审' : '专审'}</span>
  741. }
  742. },
  743. },
  744. {
  745. title: '公司资产(万元)',
  746. dataIndex: 'assets',
  747. key: 'assets',
  748. render: (text, record) => {
  749. if (text) {
  750. return <span>{text}</span>
  751. }
  752. },
  753. },
  754. {
  755. title: '收入(万元)',
  756. dataIndex: 'income',
  757. key: 'income',
  758. render: (text, record) => {
  759. if (text) {
  760. return <span>{text}</span>
  761. }
  762. },
  763. },
  764. {
  765. title: '操作',
  766. dataIndex: 'action',
  767. key: 'action',
  768. render: (text, record) => {
  769. return (
  770. <div>
  771. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  772. {/*存在支付节点时不显示第三方的申请付款*/}
  773. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  774. {
  775. <Button disabled={
  776. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1 || parseInt(this.props.startType) === 2) && this.props.dataSource.length === 0)
  777. } type="primary" onClick={() => {
  778. this.setState({
  779. previewPayVisible: true,
  780. previewPayInfor: record,
  781. })
  782. }}>
  783. 申请付款
  784. </Button>
  785. }
  786. {this.props.status === 2 && !this.props.isAuditPaymentGLY ? <Popconfirm
  787. title="是否删除?"
  788. onConfirm={() => {
  789. this.confirmDeletNew(record)
  790. }}
  791. okText="删除"
  792. cancelText="不删除"
  793. >
  794. <Button
  795. disabled={this.props.status !== 2}
  796. onClick={(e) => {
  797. e.stopPropagation()
  798. }}
  799. style={{
  800. marginLeft: '10px',
  801. color: '#ffffff',
  802. background: '#f00',
  803. border: 'none',
  804. }}
  805. >
  806. 删除
  807. </Button>
  808. </Popconfirm> : <div />}
  809. </div>
  810. )
  811. },
  812. },
  813. ]
  814. })
  815. }
  816. }
  817. tableRowClickOne(record) { }
  818. //点击付款节点详情
  819. payNodeTableRowClickOne(record) { }
  820. //外包日志列表
  821. getSelectOutsourceLog() {
  822. this.setState({
  823. outsourcingLogLoading: true
  824. })
  825. $.ajax({
  826. method: 'get',
  827. dataType: 'json',
  828. crossDomain: false,
  829. url: globalConfig.context + '/api/admin/outsourceOrg/selectOutsourceLog',
  830. data: {
  831. tid: this.props.tid,
  832. },
  833. success: function (data) {
  834. if (data.error.length) {
  835. if (data.error && data.error.length) {
  836. message.warning(data.error[0].message);
  837. }
  838. } else {
  839. this.setState({
  840. outsourceLogs: data.data
  841. })
  842. }
  843. }.bind(this),
  844. }).always(
  845. function () {
  846. this.setState({
  847. outsourcingLogLoading: false
  848. })
  849. }.bind(this)
  850. )
  851. }
  852. // 删除供应商信息
  853. confirmDeletNew(index) {
  854. this.setState({
  855. loading: true,
  856. ThirdListVisible: false,
  857. })
  858. $.ajax({
  859. url: globalConfig.context + '/api/admin/company/deleteCompany',
  860. method: 'post',
  861. data: {
  862. id: index.id,
  863. },
  864. }).done(
  865. function (data) {
  866. this.setState({
  867. loading: false,
  868. })
  869. if (!data.error.length) {
  870. message.success('删除成功!')
  871. this.props.onRefresh()
  872. } else {
  873. message.warning(data.error[0].message)
  874. }
  875. }.bind(this)
  876. )
  877. }
  878. //超级管理员
  879. superAdminReject() {
  880. let _this = this;
  881. confirm({
  882. title: '提醒',
  883. content: '确定要驳回吗?',
  884. onOk() {
  885. _this.setState({
  886. loading: true,
  887. })
  888. $.ajax({
  889. url: globalConfig.context + '/api/admin/outsourceOrg/superAdminReject',
  890. method: 'post',
  891. data: {
  892. id: _this.props.mid,
  893. },
  894. }).done(
  895. function (data) {
  896. _this.setState({
  897. loading: false,
  898. })
  899. if (!data.error.length) {
  900. message.success('驳回成功!')
  901. _this.props.onRefresh();
  902. _this.getSelectOutsourceLog();
  903. } else {
  904. message.warning(data.error[0].message)
  905. }
  906. }.bind(_this)
  907. )
  908. }
  909. })
  910. }
  911. render() {
  912. return (
  913. <div>
  914. {this.props.oldInfor && Object.keys(this.props.oldInfor).length > 0 ?
  915. <OldInforProject oldInfor={this.props.oldInfor} /> :
  916. <div className="App">
  917. <div className="projectType">
  918. <div className="typeTitle">
  919. <div>类型:</div>
  920. </div>
  921. {
  922. parseInt(this.props.startType) === 0
  923. ?
  924. <div>
  925. <div>外包(外包派单,不走总部)</div>
  926. <div className="tipsText">提示高于总部价格,费用个人承担</div>
  927. </div> : parseInt(this.props.startType) === 1
  928. ?
  929. <div>供应商信息(普通单)</div> : <div>高质量申请</div>
  930. }
  931. <div style={{ marginLeft: 'auto' }}>
  932. <span style={{ color: '#58a3ff' }}>项目状态:</span>{getProjectName(parseInt(this.props.projectStatus))}
  933. </div>
  934. </div>
  935. {
  936. this.props.projectType === 1 ?
  937. <div style={{
  938. display: 'flex',
  939. flexFlow: 'row nowrap',
  940. alignItems: 'center',
  941. padding: '0px 0px 10px 20px'
  942. }}>
  943. <div>
  944. 专利类型:<span style={{ marginLeft: '15px' }}>{this.props.patentType === 0 ? '专利申请/变更' : '专利转让'}</span>
  945. </div>
  946. <div style={{ paddingLeft: '100px' }}>
  947. 专利名称:<span style={{ marginLeft: '15px' }}>
  948. {
  949. this.props.patentNameType === 0 ? '实用新型专利' :
  950. this.props.patentNameType === 1 ? '发明专利' :
  951. this.props.patentNameType === 2 ? '外观专利' :
  952. this.props.patentNameType === 3 ? this.props.patentName : ''
  953. }
  954. </span>
  955. </div>
  956. </div> : <div />
  957. }
  958. {
  959. this.props.projectType === 1 && this.props.startType !== 0 ?
  960. <div style={{ padding: '0px 0px 10px 20px', display: 'flex', alignItems: 'center', }}>
  961. 官费:
  962. {
  963. this.props.patentType === 1 ?
  964. <span style={{ marginLeft: '15px' }}>{this.props.containOfficialFees === 0 ? '实际已缴费' : '实际未缴费'}</span> :
  965. <PatentCheck
  966. style={{
  967. display: 'flex',
  968. alignItems: 'center',
  969. }}
  970. id={this.props.tid}
  971. isAuditPayment={this.props.isAuditPayment}
  972. isAuditPaymentGLY={this.props.isAuditPaymentGLY}
  973. patentTypeName={this.props.patentTypeName}
  974. patentTypeId={this.props.patentTypeId}
  975. checkStatus={this.props.checkStatus} //核对状态
  976. projectType={this.props.projectType} //项目类型
  977. patentType={this.props.patentType} //专利类型
  978. startType={this.props.startType} //1供应商 0外包
  979. orderTaskOfficialCost={this.props.orderTaskOfficialCost} //1含官费 0不含官费
  980. orderTaskCostReduction={this.props.orderTaskCostReduction} //1有费减 0无费减
  981. isPreviewPay={this.props.isPreviewPay}
  982. status={this.props.status}
  983. onRefresh={this.props.onRefresh}
  984. onPayOfficialExpenses={() => {
  985. this.setState({
  986. previewPayVisible: true,
  987. type: 2,
  988. })
  989. }}
  990. />
  991. }
  992. </div> : null
  993. }
  994. <div className="thirdParty">
  995. <div>
  996. <span className="title">
  997. 第三方信息
  998. </span>
  999. {
  1000. // this.props.startType === 1 &&
  1001. !this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? <Button
  1002. type="primary"
  1003. onClick={(e) => {
  1004. this.setState({
  1005. ThirdListVisible: true,
  1006. })
  1007. }}
  1008. style={{
  1009. float: 'right',
  1010. marginRight: '50px',
  1011. marginBottom: '15px',
  1012. }}
  1013. >
  1014. +新增第三方信息
  1015. </Button> : null}
  1016. </div>
  1017. <div
  1018. className="clearfix"
  1019. >
  1020. <Spin spinning={this.state.loading}>
  1021. <Form layout="horizontal">
  1022. <Table
  1023. pagination={false}
  1024. columns={this.state.ContactsListsNew}
  1025. dataSource={this.props.thirdInfoList}
  1026. onRowClick={this.tableRowClickOne}
  1027. scroll={{ x: 'max-content', y: 0 }}
  1028. style={{
  1029. cursor: 'pointer',
  1030. }}
  1031. bordered
  1032. size="middle"
  1033. />
  1034. <Col span={24} offset={9} style={{ marginTop: '15px' }} />
  1035. </Form>
  1036. </Spin>
  1037. </div>
  1038. </div>
  1039. {/*如果是软著类或者专利类的专利申请,隐藏付款节点但当为外包类型时,无需隐藏*/}
  1040. {(!((this.props.projectType === 1 && this.props.patentType === 0) || this.props.projectType === 2)) || this.props.startType === 0 || this.props.startType === 2 ? <div className="thirdParty">
  1041. <div>
  1042. <span className="title">
  1043. 付款节点
  1044. </span>
  1045. {
  1046. // this.props.startType === 1 &&
  1047. !this.props.isAuditPayment && !this.props.isAuditPaymentGLY ? <Button
  1048. type="primary"
  1049. onClick={(e) => {
  1050. this.getPayNodeCompany();
  1051. this.setState({
  1052. PayNodeVisible: true,
  1053. })
  1054. }}
  1055. style={{
  1056. float: 'right',
  1057. marginRight: '50px',
  1058. marginBottom: '15px',
  1059. }}
  1060. >
  1061. +新增付款节点
  1062. </Button> : null}
  1063. </div>
  1064. <div
  1065. className="clearfix"
  1066. >
  1067. <Spin spinning={this.state.loading}>
  1068. <Form layout="horizontal">
  1069. <Table
  1070. pagination={false}
  1071. columns={this.state.PayNodeTableColunms}
  1072. dataSource={this.props.dataSource}
  1073. onRowClick={this.payNodeTableRowClickOne}
  1074. style={{
  1075. cursor: 'pointer',
  1076. }}
  1077. scroll={{ x: 'max-content', y: 0 }}
  1078. bordered
  1079. size="middle"
  1080. />
  1081. <Col span={24} offset={9} style={{ marginTop: '15px' }} />
  1082. </Form>
  1083. </Spin>
  1084. </div>
  1085. </div> : <div />}
  1086. <div
  1087. style={{
  1088. borderTop: '1px #000000 dashed',
  1089. padding: '10px 20px 0px 20px',
  1090. }}
  1091. >
  1092. <div>
  1093. <div className="title">备注</div>
  1094. <div style={{ fontSize: '15px' }}>
  1095. {this.props.outsourceRemarks}
  1096. </div>
  1097. </div>
  1098. {this.props.fileList && this.props.fileList.length > 0 ? <div style={{ paddingTop: '10px' }}>
  1099. <div className="title">合同/协议扫描件</div>
  1100. <div>
  1101. <ImgList fileList={this.props.fileList} ItemWidth={'96px'} />
  1102. </div>
  1103. {/*<Upload*/}
  1104. {/* className="demandDetailShow-upload"*/}
  1105. {/* listType="picture-card"*/}
  1106. {/* fileList={this.props.fileList}*/}
  1107. {/* onPreview={(file) => {*/}
  1108. {/* this.setState({*/}
  1109. {/* previewImage: file.url || file.thumbUrl,*/}
  1110. {/* previewVisible: true,*/}
  1111. {/* })*/}
  1112. {/* }}*/}
  1113. {/*/>*/}
  1114. <Modal
  1115. maskClosable={false}
  1116. footer={null}
  1117. visible={this.state.previewVisible}
  1118. onCancel={() => {
  1119. this.setState({ previewVisible: false })
  1120. }}
  1121. >
  1122. <img
  1123. alt=""
  1124. style={{ width: '100%' }}
  1125. src={this.state.previewImage || ''}
  1126. />
  1127. </Modal>
  1128. </div> : <div />}
  1129. </div>
  1130. <Spin spinning={this.state.outsourcingLogLoading}>
  1131. {parseInt(this.props.startType) !== 1 && this.state.outsourceLogs.length !== 0 ? <div className="outsourceLogConent">
  1132. <div className="title" style={{
  1133. paddingBottom: 0,
  1134. }}>外包状态</div>
  1135. <div className="outsourceLogList">
  1136. {
  1137. this.state.outsourceLogs && this.state.outsourceLogs.map((value, index) => (
  1138. <div key={index} className="outsourceLogItem outsource">
  1139. <div style={{
  1140. display: 'flex',
  1141. flexFlow: 'row nowrap',
  1142. paddingBottom: '3px',
  1143. paddingTop: '3px',
  1144. }}>
  1145. <div>
  1146. {value.aname}
  1147. </div>
  1148. <div style={{ paddingLeft: '5px' }}>
  1149. {
  1150. value.status === 0 ?
  1151. <Tag color="#2db7f5">发起外包审核</Tag> :
  1152. value.status === 1 ? <Tag color="#87d068">通过</Tag> :
  1153. <Tag color="#f50">驳回</Tag>
  1154. }
  1155. </div>
  1156. <div style={{
  1157. wordBreak: 'break-all',
  1158. maxWidth: '67%',
  1159. }}>
  1160. {value.remarks}
  1161. </div>
  1162. <div style={{ paddingLeft: '10px' }}>
  1163. {value.createTimes}
  1164. </div>
  1165. </div>
  1166. </div>
  1167. ))
  1168. }
  1169. </div>
  1170. </div> : <div />}
  1171. </Spin>
  1172. <Spin spinning={this.state.payRecordsLoading}>
  1173. <PaymentRecord
  1174. {...this.props}
  1175. ref={res => this.paymentRecordRef = res}
  1176. tid={this.props.tid}
  1177. isAuditPayment={this.props.isAuditPayment}
  1178. projectType={this.props.projectType}
  1179. patentType={this.props.patentType}
  1180. isAuditPaymentGLY={this.props.isAuditPaymentGLY}
  1181. />
  1182. </Spin>
  1183. {/*
  1184. 申请付款
  1185. tid:项目id
  1186. nodeId: 付款节点id
  1187. previewPayInfor: 项目或者节点信息
  1188. */}
  1189. {this.state.previewPayVisible ? <ApplyPaymentModal
  1190. {...this.props}
  1191. tid={this.props.tid}
  1192. type={this.state.type}
  1193. nodeId={this.state.nodeId}
  1194. projectType={this.props.projectType}
  1195. patentType={this.props.patentType}
  1196. previewPayInfor={this.state.previewPayInfor}
  1197. visible={this.state.previewPayVisible}
  1198. commodityQuantity={this.props.commodityQuantity}
  1199. startType={this.props.startType} //1供应商 0外包
  1200. onRefresh={() => {
  1201. this.props.onRefresh();
  1202. this.paymentRecordRef.refresh();
  1203. }}
  1204. changeVisible={() => {
  1205. this.setState({
  1206. previewPayVisible: false,
  1207. nodeId: 0, //付款节点id
  1208. previewPayInfor: {},
  1209. type: 1
  1210. })
  1211. }} /> : <div />}
  1212. </div>
  1213. }
  1214. {/*管理员在审核通过的情况下才有此操作*/}
  1215. {
  1216. window.adminData.isSuperAdmin && this.props.status === 1 ? <div style={{
  1217. flex: 1,
  1218. marginTop: '30px',
  1219. }}>
  1220. <Button
  1221. onClick={() => {
  1222. this.superAdminReject();
  1223. }}
  1224. style={{
  1225. color: '#ffffff',
  1226. background: '#f00',
  1227. border: 'none',
  1228. width: '30%',
  1229. height: '40px',
  1230. display: 'flex',
  1231. fontSize: '15px',
  1232. justifyContent: 'center',
  1233. alignItems: 'center',
  1234. margin: '0 auto',
  1235. }}>
  1236. 驳回
  1237. </Button>
  1238. </div> : null
  1239. }
  1240. {this.state.ThirdListVisible ? <NewSupplier
  1241. isLaunch//是否项目已经发起
  1242. patentNameType={this.props.patentNameType}
  1243. tid={this.props.tid}
  1244. patentType={this.props.patentType}
  1245. projectType={this.props.startType === 0 ? 0 : this.props.projectType}
  1246. realProjectType={this.props.projectType} //真实的项目类型
  1247. startType={this.props.startType} //项目类型 0外包 1供应商
  1248. visible={this.state.ThirdListVisible}
  1249. onCancel={() => {
  1250. this.props.onRefresh();
  1251. this.setState({
  1252. ThirdListVisible: false,
  1253. })
  1254. }} /> : null}
  1255. {this.state.PayNodeVisible ? <OperationPayNode
  1256. tid={this.props.tid}
  1257. cSort={this.props.sort}
  1258. visible={this.state.PayNodeVisible}
  1259. thirdInfoList={this.props.thirdInfoList}
  1260. supplierList={this.state.PayNodeCompany}
  1261. onCancel={() => {
  1262. this.setState({
  1263. PayNodeVisible: false,
  1264. PayNodeCompany: [],
  1265. })
  1266. this.props.onRefresh();
  1267. }}
  1268. /> : <div />}
  1269. </div>
  1270. )
  1271. }
  1272. }
  1273. export default CheckProject