index.jsx 43 KB

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