index.jsx 38 KB

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