index.jsx 38 KB

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