index.jsx 36 KB

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