index.jsx 39 KB

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