index.jsx 46 KB

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