index.jsx 48 KB

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