accountDetails.jsx 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338
  1. import React, { Component } from "react";
  2. import { Form, Input, Button, message, Modal, Spin, Table, Radio, Select, Tooltip, Tag, AutoComplete } from "antd";
  3. import {
  4. ShowModal, splitUrl, getAccountName, getSecondaryAccountName,
  5. getVehicleName, getTypeName, getClockState
  6. } from "../../../tools"
  7. import { accountType, accountStatus } from "@/dataDic";
  8. import ImgList from "../../../common/imgList";
  9. import OrderDetail from '../../order/orderNew/changeComponent/orderDetail';
  10. import ReactToPrint from "react-to-print";
  11. import Print from 'react-print-html';
  12. import moment from "moment";
  13. import $ from "jquery/src/ajax";
  14. import './accountReview.less';
  15. const FormItem = Form.Item;
  16. const RadioGroup = Radio.Group;
  17. const RadioButton = Radio.Button;
  18. class AccountDetails extends Component {
  19. constructor(props) {
  20. super(props);
  21. this.state = {
  22. isPrint: false,
  23. cNo: 0,
  24. editA: "",
  25. isTable: true,
  26. sloading: false,
  27. loading: false,
  28. visible: "",
  29. data: {},
  30. logvisible: false,
  31. logdataSour: [],
  32. logcolumns: [
  33. {
  34. title: "审核人",
  35. dataIndex: "auditorName",
  36. key: "auditorName"
  37. },
  38. {
  39. title: "操作",
  40. dataIndex: "status",
  41. key: "status",
  42. width: 120,
  43. render: (text, record) => {
  44. return (
  45. <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][text] }}>
  46. {["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][text]}
  47. {this.state.processStatus == record.processStatus && !record.id &&
  48. <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
  49. </span>
  50. );
  51. },
  52. },
  53. {
  54. title: "操作时间",
  55. dataIndex: "createTimeStr",
  56. key: "createTimeStr",
  57. width: 88,
  58. },
  59. {
  60. title: "备注",
  61. dataIndex: "remarks",
  62. key: "remarks",
  63. render: (text, record) => {
  64. return (
  65. <div style={{ minWidth: 250 }}>{text}</div>
  66. )
  67. }
  68. }
  69. ],
  70. columns: [
  71. {
  72. title: "序号",
  73. dataIndex: "a",
  74. key: "a",
  75. width: 40,
  76. render: (text, record, index) => {
  77. return (
  78. <div>{index + 1}</div>
  79. )
  80. }
  81. },
  82. {
  83. title: "费用时间",
  84. dataIndex: "agreeTime",
  85. key: "agreeTime",
  86. width: "10%",
  87. render: (text, record) => {
  88. return (
  89. <div>{record.types == 1
  90. ? (moment(record.releaseStart).format("YYYY-MM-DD HH:mm") + " 至 " + moment(record.releaseEnd).format("YYYY-MM-DD HH:mm")) : !!text
  91. ? text : record.startTime}</div>
  92. )
  93. }
  94. },
  95. {
  96. title: "时长",
  97. dataIndex: "duration",
  98. key: "duration",
  99. width: 40,
  100. render: (text, record) => {
  101. return (
  102. <div>{record.types == 1 ? text : ""}</div>
  103. )
  104. }
  105. },
  106. {
  107. title: "出差地址",
  108. dataIndex: "districtName",
  109. key: "districtName",
  110. width: "10%",
  111. render: (text, record) => {
  112. return (
  113. <div>{text}</div>
  114. )
  115. }
  116. },
  117. {
  118. title: "出差企业",
  119. dataIndex: "userNames",
  120. key: "userNames",
  121. width: "10%",
  122. render: (text, record) => {
  123. return (
  124. <div>{text}</div>
  125. )
  126. }
  127. },
  128. {
  129. title: "合同编号",
  130. dataIndex: "contractNo",
  131. key: "contractNo",
  132. width: "8%",
  133. render: (text, record) => {
  134. return (
  135. <div
  136. style={{ minHeight: "15px", cursor: !!record.types && this.props.isOperate && "pointer" }}
  137. onClick={() => {
  138. !!record.types && this.props.isOperate &&
  139. this.setState({
  140. editA: "contractNo",
  141. editTit: "修改合同编号",
  142. upId: record.erid,
  143. // upUserNames: record.userNames,
  144. })
  145. }}
  146. >{text}
  147. {!!text && !this.state.check && !this.state.isPrint && this.props.isOperate &&
  148. <Button type="primary"
  149. onClick={e => {
  150. e.stopPropagation()
  151. this.setState({
  152. check: true,
  153. checkInfo: record,
  154. }, () => {
  155. this.getOrder()
  156. this.getListA()
  157. })
  158. }}
  159. >合同详情</Button>}
  160. </div>
  161. )
  162. }
  163. },
  164. {
  165. title: "类型",
  166. dataIndex: "types",
  167. key: "types",
  168. width: "6%",
  169. render: (text, record) => {
  170. return (
  171. <div style={{ color: record.publicReleaseType != null && "red", cursor: text == 0 && this.props.isOperate && "pointer" }}
  172. onClick={() => {
  173. text == 0 && this.props.isOperate &&
  174. this.setState({
  175. editA: "typesOther",
  176. editTit: "修改其他类型说明",
  177. upId: record.erid,
  178. upTypesOther: record.typesOther,
  179. })
  180. }}
  181. >
  182. {getAccountName(text, record.typesOther)}
  183. </div>
  184. )
  185. }
  186. },
  187. {
  188. title: "详细",
  189. dataIndex: "cost",
  190. key: "cost",
  191. width: "8%",
  192. render: (text, record) => {
  193. return (
  194. <div
  195. style={{ cursor: !text && !record.vehicle && record.type != 1 && this.props.isOperate && "pointer" }}
  196. onClick={() => {
  197. !text && !record.vehicle && record.type != 1 && this.props.isOperate &&
  198. this.setState({
  199. editA: "detTypeOther",
  200. editTit: "修改其他详细说明",
  201. upId: record.id,
  202. detTypeOther: record.typeOther,
  203. })
  204. }}
  205. >{!!text ? text : (!!record.vehicle && record.type == 1 ? (
  206. getVehicleName(record.vehicle, record.vehicleOther) +
  207. "(" + record.startDistrict + " - " + record.endDistrict + ")"
  208. ) : getTypeName(record.type, record.typeOther))}</div>
  209. )
  210. }
  211. },
  212. {
  213. title: "费用",
  214. dataIndex: "amount",
  215. key: "amount",
  216. width: "5%",
  217. render: (text, record) => {
  218. return (
  219. <div>{text}</div>
  220. )
  221. }
  222. },
  223. {
  224. title: "实报",
  225. dataIndex: "realAmount",
  226. key: "realAmount",
  227. width: "5%",
  228. render: (text, record) => {
  229. return (
  230. <div style={{ color: "red", cursor: !record.noEdit && this.props.isOperate && "pointer" }}
  231. onClick={() => {
  232. !record.noEdit && this.props.isOperate &&
  233. this.setState({
  234. editA: "amount",
  235. editTit: "修改金额",
  236. upAmount: text,
  237. upId: record.id,
  238. })
  239. }}
  240. >{text}</div>
  241. )
  242. }
  243. },
  244. {
  245. title: "出差事由",
  246. dataIndex: "plan",
  247. key: "plan",
  248. // width: "10%",
  249. render: (text, record) => {
  250. return (
  251. <div>{text}</div>
  252. )
  253. }
  254. },
  255. {
  256. title: "报销订单/部门",
  257. dataIndex: "orderNo",
  258. key: "orderNo",
  259. // width: "10%",
  260. render: (text, record) => {
  261. return (
  262. <div>
  263. <div>{text}</div>
  264. <div>{record.applyDepName}</div>
  265. </div>
  266. )
  267. }
  268. },
  269. // {
  270. // title: "报销事由",
  271. // dataIndex: "remarks",
  272. // key: "remarks",
  273. // // width: "10%",
  274. // render: (text, record) => {
  275. // return (
  276. // <div>{text}</div>
  277. // )
  278. // }
  279. // },
  280. ],
  281. checkInfo: {},
  282. check: false,
  283. checkType: "a",
  284. dataSourceA: [],
  285. dataSourceB: [],
  286. dataSourceC: [],
  287. columnsA: [
  288. {
  289. title: "类型",
  290. dataIndex: "type",
  291. key: "type",
  292. render: (text, record) => {
  293. return (
  294. <span>
  295. {(text == 0 && !record.typeOther)
  296. ? getAccountName(record.sonType, record.sonTypeOther)
  297. : getSecondaryAccountName(text, record.typeOther)}
  298. </span>
  299. );
  300. },
  301. },
  302. {
  303. title: "报销时间",
  304. dataIndex: "releaseStart",
  305. key: "releaseStart",
  306. render: (text, record) => {
  307. return (
  308. <div>
  309. <div style={{ textAlign: "center" }}>{text}</div>
  310. <div style={{ textAlign: "center" }}>至</div>
  311. <div style={{ textAlign: "center" }}>{record.releaseEnd}</div>
  312. </div>
  313. );
  314. },
  315. },
  316. {
  317. title: "工时",
  318. dataIndex: "duration",
  319. key: "duration",
  320. },
  321. {
  322. title: "报销金额(元)",
  323. dataIndex: "amount",
  324. key: "amount",
  325. width: 70,
  326. },
  327. {
  328. title: "实报金额(元)",
  329. dataIndex: "realAmount",
  330. key: "realAmount",
  331. width: 70,
  332. },
  333. {
  334. title: "天数",
  335. dataIndex: "days",
  336. key: "days",
  337. },
  338. {
  339. title: "报销编号",
  340. dataIndex: "checkNo",
  341. key: "checkNo",
  342. },
  343. {
  344. title: "报销合同",
  345. dataIndex: "contractNo",
  346. key: "contractNo",
  347. },
  348. {
  349. title: "客户",
  350. dataIndex: "buyerName",
  351. key: "buyerName",
  352. },
  353. {
  354. title: "报销人",
  355. dataIndex: "aname",
  356. key: "aname",
  357. },
  358. {
  359. title: "财务负责人",
  360. dataIndex: "financeName",
  361. key: "financeName",
  362. },
  363. {
  364. title: "报销公司/支付公司",
  365. dataIndex: "payDepName",
  366. key: "payDepName",
  367. render: (text, record) => {
  368. return (
  369. <div>
  370. <div>{record.applyDepName || ""}</div>
  371. <div>{text || ""}</div>
  372. </div>
  373. );
  374. },
  375. },
  376. {
  377. title: "发起时间",
  378. dataIndex: "createTimeStr",
  379. key: "createTimeStr",
  380. },
  381. {
  382. title: "状态",
  383. dataIndex: "status",
  384. key: "status",
  385. render: (text, record) => {
  386. return (
  387. <span style={{ color: accountStatus[text].color }}>
  388. {accountStatus[text].label}
  389. </span>
  390. );
  391. },
  392. },
  393. ],
  394. columnsB: [
  395. {
  396. title: "类型",
  397. dataIndex: "type",
  398. key: "type",
  399. width: 140,
  400. render: (text, record) => {
  401. return (
  402. <span>
  403. {text == 0 ? record.typeOther : accountType.find(item => item.value === text).label}
  404. </span>
  405. );
  406. },
  407. },
  408. {
  409. title: "报销金额(元)",
  410. dataIndex: "amount",
  411. key: "amount",
  412. },
  413. {
  414. title: "实报金额(元)",
  415. dataIndex: "realAmount",
  416. key: "realAmount",
  417. },
  418. {
  419. title: "报销编号",
  420. dataIndex: "checkNo",
  421. key: "checkNo",
  422. },
  423. {
  424. title: "报销人",
  425. dataIndex: "aname",
  426. key: "aname",
  427. },
  428. {
  429. title: "财务负责人",
  430. dataIndex: "financeName",
  431. key: "financeName",
  432. },
  433. {
  434. title: "状态",
  435. dataIndex: "status",
  436. key: "status",
  437. render: (text, record) => {
  438. return (
  439. <span style={{ color: accountStatus[text].color }}>
  440. {accountStatus[text].label}
  441. </span>
  442. );
  443. },
  444. },
  445. {
  446. title: "报销公司/支付公司",
  447. dataIndex: "payDepName",
  448. key: "payDepName",
  449. render: (text, record) => {
  450. return (
  451. <div>
  452. <div>{record.applyDepName || ""}</div>
  453. <div>{text || ""}</div>
  454. </div>
  455. );
  456. },
  457. },
  458. {
  459. title: "报销时间",
  460. dataIndex: "createTimeStr",
  461. key: "createTimeStr",
  462. },
  463. ],
  464. columnsC: [
  465. {
  466. title: "编号",
  467. dataIndex: "key",
  468. key: "key",
  469. width: 45,
  470. fixed: "left",
  471. },
  472. {
  473. title: "客户名称",
  474. dataIndex: "userName",
  475. key: "userName",
  476. width: 150,
  477. fixed: "left",
  478. render: (text, record) => {
  479. return (
  480. <div>
  481. <div>{text}</div>
  482. <div style={{ color: ["red", "green"][record.signBills] }}>
  483. {["未签单", "已签单"][record.signBills]}
  484. {record.signBills == 1 && `(${record.signTime})`}
  485. </div>
  486. </div >
  487. );
  488. },
  489. },
  490. {
  491. title: "公出地点",
  492. dataIndex: "districtName",
  493. key: "districtName",
  494. width: 120,
  495. render: (text) => {
  496. return (
  497. <div>{text}</div>
  498. );
  499. },
  500. },
  501. {
  502. title: "跟单人",
  503. dataIndex: "sname",
  504. key: "sname",
  505. width: 90,
  506. render: (text, record) => {
  507. return (
  508. <Tooltip title={text}>
  509. <div>{text}</div>
  510. </Tooltip>
  511. );
  512. },
  513. },
  514. {
  515. title: "公出人员",
  516. dataIndex: "aname",
  517. key: "aname",
  518. width: 190,
  519. render: (text, record) => {
  520. return (
  521. <Tooltip title={text}>
  522. <div>
  523. <p style={{ color: "red" }}>[ 打卡人:{text} ]</p>
  524. {record.assist !== 0 && <p style={{ color: "#8552A1" }} >[ 协单人:{record.assistAidName}]</p>}
  525. {!!record.assistantName && <p style={{ color: "#228fbd" }} >[ 协单助手:{record.assistantName}]</p>}
  526. </div>
  527. </Tooltip>
  528. );
  529. },
  530. },
  531. {
  532. title: "申请时间",
  533. dataIndex: "createTimes",
  534. key: "createTimes",
  535. width: 80,
  536. },
  537. {
  538. title: "公出时间",
  539. dataIndex: "releaseStarts",
  540. key: "releaseStarts",
  541. width: 130,
  542. render: (text, record) => (
  543. <div>
  544. <div>{text}</div>
  545. <div style={{ paddingLeft: "44px" }}>至</div>
  546. <div>{record.releaseEnds}</div>
  547. </div>
  548. ),
  549. },
  550. {
  551. title: "公出时长(时)",
  552. dataIndex: "duration",
  553. key: "duration",
  554. width: 50,
  555. },
  556. {
  557. title: "打卡时间",
  558. dataIndex: "clockInTimes",
  559. key: "clockInTimes",
  560. width: 80,
  561. render: (text, record) => (
  562. <span>
  563. <div style={{ width: 70 }}>{text}</div>
  564. <Tag color={["#F21212", "#34DE38", "#ffd400"][record.clockIn]}>{["未打卡", "已打卡", "异常打卡"][record.clockIn]}</Tag>
  565. </span>
  566. )
  567. },
  568. {
  569. title: "标签",
  570. dataIndex: "status",
  571. key: "status",
  572. width: 200,
  573. render: (text, record) => (
  574. <div>
  575. <div style={{ display: "flex", flexDirection: "row" }}>
  576. <Tag
  577. color={["#45b97c", "#69541b", "#f47920", "#8552a1", "#228fbd"][record.type]}
  578. >
  579. {
  580. record.type === 0
  581. ? "业务公出" : record.type === 1
  582. ? "技术公出" : record.type === 2
  583. ? "行政公出" : record.type === 3
  584. ? "技术协单" : record.type === 4
  585. ? "协单助手" : ""
  586. }
  587. </Tag>
  588. <Tag color={getClockState(text).color}>
  589. {getClockState(text).title}
  590. </Tag>
  591. {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
  592. </div>
  593. {record.type === 1 && <div style={{ marginTop: 5 }}>{record.contractNo}</div>}
  594. {record.type === 1 && <div>{record.totalAmout + "(万元)"}</div>}
  595. </div>
  596. ),
  597. },
  598. {
  599. title: "公出目标",
  600. dataIndex: "remarks",
  601. key: "remarks",
  602. width: 280,
  603. render: (text) => {
  604. return (
  605. <div>{text}</div>
  606. );
  607. },
  608. },
  609. {
  610. title: "公出计划",
  611. dataIndex: "plan",
  612. key: "plan",
  613. width: 280,
  614. render: (text) => {
  615. return (
  616. <div>{text}</div>
  617. );
  618. },
  619. },
  620. {
  621. title: "预计效果",
  622. dataIndex: "expectedEffect",
  623. key: "expectedEffect",
  624. width: 280,
  625. render: (text) => {
  626. return (
  627. <div>{text}</div>
  628. );
  629. },
  630. },
  631. {
  632. title: "本次公出目标总结",
  633. dataIndex: "supplement",
  634. key: "supplement",
  635. width: 280,
  636. render: (text) => {
  637. return (
  638. <div>{text}</div>
  639. );
  640. },
  641. },
  642. {
  643. title: "下一次公出计划",
  644. dataIndex: "nextPlan",
  645. key: "nextPlan",
  646. width: 280,
  647. render: (text) => {
  648. return (
  649. <div>{text}</div>
  650. );
  651. },
  652. },
  653. {
  654. title: "审核/指导",
  655. dataIndex: "auditInfo",
  656. key: "auditInfo",
  657. width: 200,
  658. render: (text, record) => {
  659. return <div style={{ wordBreak: "break-all" }} >
  660. {record.auditTimes && `审核时间:${record.auditTimes}`}
  661. {text}
  662. </div >;
  663. },
  664. },
  665. ],
  666. paginationA: {
  667. defaultCurrent: 1,
  668. defaultPageSize: 9999,
  669. showQuickJumper: true,
  670. pageSize: 9999,
  671. onChange: function (page) {
  672. this.getListA(page);
  673. }.bind(this),
  674. showTotal: function (total) {
  675. return "共" + total + "条数据";
  676. },
  677. },
  678. paginationB: {
  679. defaultCurrent: 1,
  680. defaultPageSize: 9999,
  681. showQuickJumper: true,
  682. pageSize: 9999,
  683. onChange: function (page) {
  684. this.getListB(page);
  685. }.bind(this),
  686. showTotal: function (total) {
  687. return "共" + total + "条数据";
  688. },
  689. },
  690. paginationC: {
  691. defaultCurrent: 1,
  692. defaultPageSize: 9999,
  693. showQuickJumper: true,
  694. pageSize: 9999,
  695. onChange: function (page) {
  696. this.getListC(page);
  697. }.bind(this),
  698. showTotal: function (total) {
  699. return "共" + total + "条数据";
  700. },
  701. },
  702. orderList: [],
  703. orderData: {},
  704. };
  705. this.addRowColor = this.addRowColor.bind(this)
  706. }
  707. componentDidMount() {
  708. const { id } = this.props
  709. !!id && this.getDetails(id)
  710. }
  711. // 报销信息详情
  712. getDetails(id) {
  713. this.setState({
  714. loading: true,
  715. });
  716. $.ajax({
  717. method: "get",
  718. dataType: "json",
  719. crossDomain: false,
  720. url: globalConfig.context + "/api/admin/expenseAccount/mainExpense",
  721. data: { id, },
  722. success: function (data) {
  723. ShowModal(this);
  724. this.setState({
  725. loading: false,
  726. });
  727. if (data.error.length === 0) {
  728. let allData = data.data;
  729. let allList = [];
  730. for (var i = 0; i < allData.sonList.length; i++) {
  731. let dlist = allData.sonList[i].detList
  732. for (var j = 0; j < dlist.length; j++) {
  733. let obj = dlist[j]
  734. allData.sonList[0].detList[0].applyDepName = allData.applyDepName; // 部门
  735. allData.sonList[0].detList[0].remarks = allData.remarks; // 报销事由
  736. dlist[0].contractNo = allData.sonList[i].contractNo; // 合同编号
  737. dlist[0].buyerId = allData.sonList[i].buyerId; // 客户id
  738. dlist[0].buyerName = allData.sonList[i].buyerName;
  739. dlist[0].orderNo = allData.sonList[i].orderNo; // 订单号
  740. dlist[0].releaseStart = allData.sonList[i].releaseStart;
  741. dlist[0].releaseEnd = allData.sonList[i].releaseEnd; // 公出时间
  742. dlist[0].duration = allData.sonList[i].duration; // 费用时间
  743. dlist[0].districtName = allData.sonList[i].districtName; // 出差地址
  744. dlist[0].userNames = allData.sonList[i].userNames; // 出差企业
  745. dlist[0].plan = allData.sonList[i].plan; // 出差事由
  746. dlist[0].publicReleaseType = allData.sonList[i].publicReleaseType; // 公出关联
  747. dlist[0].types = allData.sonList[i].type; // 报销类型
  748. dlist[0].erid = allData.sonList[i].id; // 二级报销id
  749. dlist[0].typesOther = allData.sonList[i].typeOther;
  750. if (allData.sonList[i].type == 2) { // 非业务报销
  751. obj.type = allData.sonList[i].secondaryType;
  752. obj.typeOther = allData.sonList[i].secondaryTypeOther;
  753. } else if (allData.sonList[i].type == 3 || allData.sonList[i].type == 0) { // 第三方付款 其他
  754. obj.cost = "费用"
  755. } else if (allData.sonList[i].type == 4) { // 申请借支
  756. obj.cost = "借支费用"
  757. } else if (allData.sonList[i].type == 4) { // 申请抵扣
  758. obj.cost = "抵扣费用"
  759. }
  760. allList.push(obj)
  761. }
  762. allData.sonList[i].settlementAmount != 0 &&
  763. allList.push({ noEdit: true, id: allData.sonList[i].id, cost: "抵扣", amount: allData.sonList[i].settlementAmount, realAmount: " " })
  764. allList.push({ noEdit: true, id: allData.sonList[i].id, cost: "小计", amount: allData.sonList[i].amount, realAmount: allData.sonList[i].realAmount })
  765. }
  766. allList.push({ noEdit: true, id: allData.id, cost: "合计", amount: allData.amount, realAmount: allData.realAmount })
  767. this.setState({
  768. data: data.data,
  769. newList: allList,
  770. })
  771. // this.setState({
  772. // data: data.data,
  773. // imgs: data.data.attachmentUrl
  774. // ? splitUrl(data.data.attachmentUrl, ",", globalConfig.avatarHost + "/upload")
  775. // : [],
  776. // })
  777. // this.getAccountList(id)
  778. this.getLogData(id)
  779. } else {
  780. message.warning(data.error[0].message)
  781. }
  782. }.bind(this),
  783. }).always(
  784. function () {
  785. this.setState({
  786. loading: false,
  787. });
  788. }.bind(this)
  789. );
  790. }
  791. // 报销费用详情
  792. // getAccountList(eaid) {
  793. // const { data } = this.state
  794. // $.ajax({
  795. // method: "get",
  796. // dataType: "json",
  797. // crossDomain: false,
  798. // url: globalConfig.context + "/api/admin/expenseAccount/details/list",
  799. // data: { eaid, },
  800. // success: function (datas) {
  801. // if (datas.error.length === 0) {
  802. // let sum = 0
  803. // for (var i = 0; i < datas.data.length; i++) {
  804. // sum = commonAdd(sum, datas.data[i].amount)
  805. // }
  806. // let leftList = JSON.parse(JSON.stringify(datas.data)) || []
  807. // let jsonArray = []
  808. // if (data.type != 4 && data.type != 5 && data.debitTotalAmount) {
  809. // leftList.push({ "other": "预借支", "amount": data.debitTotalAmount },)
  810. // }
  811. // if (data.type != 4 && data.type != 5) {
  812. // leftList.push(
  813. // { "other": "总金额", "amount": sum },
  814. // { "other": "实报金额", "amount": (sum > data.debitTotalAmount) ? commonAdd(sum, -data.debitTotalAmount) : 0 })
  815. // }
  816. // if (data.type == 1) {
  817. // // 差旅费
  818. // jsonArray = [
  819. // { "head": `支付公司:${data.payDepName}` },
  820. // { "head": `事由:${data.remarks}` },
  821. // { "head": `公出企业:${data.userNames}` },
  822. // { "head": `公出地点:${data.districtName}` },
  823. // { "head": `时间:${moment(data.releaseStartStr).format('YYYY-MM-DD HH:mm') + " 至 " + moment(data.releaseEndStr).format('YYYY-MM-DD HH:mm')}` },
  824. // { "head": `公出时长:${data.duration}` },
  825. // ]
  826. // } else if (data.type == 3) {
  827. // // 第三方付款
  828. // jsonArray = [
  829. // { "head": `支付公司:${data.payDepName}` },
  830. // { "head": `事由:${data.remarks}` },
  831. // ]
  832. // } else {
  833. // // 通用
  834. // jsonArray = [
  835. // { "head": `事由:${data.remarks}` },
  836. // ]
  837. // }
  838. // let newArray = []
  839. // if (jsonArray.length >= leftList.length) {
  840. // for (var i = 0; i < leftList.length; i++) {
  841. // jsonArray[i] = Object.assign(jsonArray[i], leftList[i])
  842. // }
  843. // newArray = jsonArray
  844. // } else {
  845. // for (var i = 0; i < jsonArray.length; i++) {
  846. // leftList[i] = Object.assign(jsonArray[i], leftList[i])
  847. // }
  848. // newArray = leftList
  849. // }
  850. // newArray.push({}, {})
  851. // this.setState({
  852. // list: datas.data || [],
  853. // newList: newArray,
  854. // total: sum,
  855. // })
  856. // } else {
  857. // message.warning(datas.error[0].message);
  858. // }
  859. // }.bind(this),
  860. // }).always(
  861. // function () {
  862. // this.setState({
  863. // loading: false,
  864. // });
  865. // }.bind(this)
  866. // );
  867. // }
  868. isHere(list = []) {
  869. for (var i = 0; i < list.length; i++) {
  870. if (!list[i].id) {
  871. this.setState({
  872. processStatus: list[i].processStatus
  873. })
  874. return
  875. }
  876. }
  877. }
  878. // 日志
  879. getLogData(eaid) {
  880. $.ajax({
  881. method: "get",
  882. dataType: "json",
  883. crossDomain: false,
  884. url: globalConfig.context + "/api/admin/expenseAccount/log/list",
  885. data: { eaid },
  886. success: function (data) {
  887. if (data.error.length === 0) {
  888. this.setState({
  889. logdataSour: data.data || []
  890. });
  891. this.isHere(data.data || [])
  892. } else {
  893. message.warning(data.error[0].message);
  894. }
  895. }.bind(this)
  896. }).always(
  897. function () {
  898. }.bind(this)
  899. );
  900. }
  901. // 审核
  902. toExamine(num) {
  903. const { checkData, reason } = this.state
  904. if (!reason) {
  905. message.warning("请填写审核说明~");
  906. return;
  907. }
  908. this.setState({
  909. loading: true,
  910. });
  911. $.ajax({
  912. method: "POST",
  913. dataType: "json",
  914. crossDomain: false,
  915. url: globalConfig.context + "/api/admin/expenseAccount/examine",
  916. data: {
  917. id: checkData.id,
  918. reason,
  919. status: num,//1同意 3驳回
  920. },
  921. }).done(
  922. function (data) {
  923. if (!data.error.length) {
  924. message.success("审核成功!");
  925. this.setState({
  926. visible: "",
  927. reason: "",
  928. showDetails: false,
  929. checkData: {},
  930. });
  931. this.getDetails(this.state.data.id)
  932. this.getLogData(this.state.data.id)
  933. } else {
  934. message.warning(data.error[0].message);
  935. }
  936. }.bind(this)
  937. );
  938. }
  939. distinct(arr, key) {
  940. let hash = {};
  941. let result = [];
  942. for (let i = arr.length - 1; i >= 0; i--) {
  943. let value = arr[i][key];
  944. if (!hash[value]) {
  945. hash[value] = true;
  946. result.unshift(arr[i]);
  947. }
  948. }
  949. return result;
  950. }
  951. // 修改
  952. updateRealAmount() {
  953. const { editA } = this.state
  954. this.setState({
  955. upLoading: true,
  956. })
  957. if (editA == "typesOther" && !this.state.upTypesOther) {
  958. message.warn("其他类型说明不能为空!");
  959. return
  960. }
  961. if (editA == "remarks" && !this.state.upRemarks) {
  962. message.warn("报销事由不能为空!");
  963. return
  964. }
  965. if (editA == "contractNo" && this.state.cNo != 1 && this.state.cNo != 2) {
  966. message.warn("请先选择!");
  967. return
  968. }
  969. if (editA == "contractNo" && this.state.cNo == 1 && !this.state.upOrderNo) {
  970. message.warn("请选择合同编号!");
  971. return
  972. }
  973. if (editA == "detTypeOther" && !this.state.detTypeOther) {
  974. message.warn("其他类型说明不能为空!");
  975. return
  976. }
  977. let obj1 = {
  978. id: this.state.upId,
  979. amount: this.state.upAmount,
  980. }
  981. let obj2 = {
  982. id: this.state.upId,
  983. remarks: this.state.upRemarks,
  984. }
  985. let obj3 = {
  986. id: this.state.upId,
  987. typeOther: this.state.upTypesOther,
  988. }
  989. let obj4 = {
  990. id: this.state.upId,
  991. orderNo: this.state.cNo == 2 ? "" : this.state.upOrderNo,
  992. }
  993. let obj5 = {
  994. id: this.state.upId,
  995. typeOther: this.state.detTypeOther,
  996. }
  997. $.ajax({
  998. method: "POST",
  999. dataType: "json",
  1000. crossDomain: false,
  1001. url: globalConfig.context + editA == "amount"
  1002. ? "/api/admin/expenseAccount/updateRealAmount" : editA == "detTypeOther"
  1003. ? "/api/admin/expenseAccount/updateDetailsTypeOther" : "/api/admin/expenseAccount/updateTypeOther",
  1004. data: editA == "amount"
  1005. ? obj1 : editA == "remarks"
  1006. ? obj2 : editA == "typesOther"
  1007. ? obj3 : editA == "contractNo"
  1008. ? obj4 : editA == "detTypeOther" && obj5,
  1009. }).done(
  1010. function (data) {
  1011. this.setState({
  1012. upLoading: false,
  1013. })
  1014. if (!data.error.length) {
  1015. message.success("修改成功!");
  1016. this.setState({
  1017. editA: "",
  1018. upId: "",
  1019. upUserNames: "",
  1020. upUserId: "",
  1021. upList: [],
  1022. });
  1023. this.getDetails(this.state.data.id)
  1024. } else {
  1025. message.warning(data.error[0].message);
  1026. }
  1027. }.bind(this)
  1028. );
  1029. }
  1030. // 查询合同编号
  1031. selectOrderByUid() {
  1032. this.setState({
  1033. sloading: true
  1034. })
  1035. $.ajax({
  1036. method: "GET",
  1037. dataType: "json",
  1038. crossDomain: false,
  1039. url: "/api/admin/release/selectOrderByUid",
  1040. data: {
  1041. uid: this.state.upUserId,
  1042. },
  1043. }).done(
  1044. function (data) {
  1045. this.setState({
  1046. sloading: false
  1047. })
  1048. if (!data.error.length) {
  1049. this.setState({
  1050. upList: data.data
  1051. })
  1052. } else {
  1053. message.warning(data.error[0].message);
  1054. }
  1055. }.bind(this)
  1056. );
  1057. }
  1058. // 查询企业
  1059. httpChange(e) {
  1060. this.setState({
  1061. upUserNames: e,
  1062. });
  1063. if (e.length >= 1) {
  1064. this.supervisor(e);
  1065. }
  1066. }
  1067. //
  1068. supervisor(e) {
  1069. $.ajax({
  1070. method: "get",
  1071. dataType: "json",
  1072. crossDomain: false,
  1073. url: globalConfig.context + "/api/admin/customer/getUserByNames",
  1074. data: {
  1075. name: e,
  1076. type: 1,
  1077. pageNo: 1,
  1078. pageSize: 10,
  1079. },
  1080. success: function (data) {
  1081. let thedata = data.data;
  1082. if (!thedata) {
  1083. if (data.error && data.error.length) {
  1084. message.warning(data.error[0].message);
  1085. }
  1086. thedata = {};
  1087. }
  1088. this.setState({
  1089. customerArr: thedata.list,
  1090. });
  1091. }.bind(this),
  1092. }).always(
  1093. function () {
  1094. }.bind(this)
  1095. );
  1096. }
  1097. selectAuto(value) {
  1098. const { customerArr } = this.state
  1099. this.setState({
  1100. upUserId: customerArr.find((item) => item.name == value).id,
  1101. });
  1102. }
  1103. radioChange(e) {
  1104. const _this = this
  1105. this.setState({
  1106. checkType: e.target.value,
  1107. orderData: {}
  1108. }, () => {
  1109. if (e.target.value == "a") {
  1110. this.getListA()
  1111. } else if (e.target.value == "b") {
  1112. this.getListB()
  1113. } else if (e.target.value == "c") {
  1114. this.getListC()
  1115. } else {
  1116. this.xiangmu(e.target.value)
  1117. this.jiedianNew(e.target.value)
  1118. setTimeout(function () {
  1119. _this.orderDetailData(e.target.value)
  1120. }, 100)
  1121. }
  1122. })
  1123. }
  1124. addRowColor(record) {
  1125. if (record.assist === 1 || record.assist === 2 || record.assist === 3) {
  1126. return 'light'
  1127. } else {
  1128. return 'dark'
  1129. }
  1130. }
  1131. getOrder() {
  1132. $.ajax({
  1133. method: "get",
  1134. dataType: "json",
  1135. crossDomain: false,
  1136. url: globalConfig.context + "/api/admin/release/selectOrderByUid",
  1137. data: {
  1138. uid: this.state.checkInfo.buyerId,
  1139. },
  1140. success: function (data) {
  1141. if (data.error && data.error.length === 0) {
  1142. if (data.data) {
  1143. this.setState({
  1144. orderList: data.data
  1145. })
  1146. }
  1147. } else {
  1148. message.warning(data.error[0].message);
  1149. }
  1150. }.bind(this),
  1151. })
  1152. }
  1153. getListA(pageNoA) {
  1154. const { paginationA, } = this.state;
  1155. this.setState({
  1156. loading: true,
  1157. });
  1158. let data = {
  1159. pageNo: pageNoA || 1,
  1160. pageSize: paginationA.pageSize,
  1161. contractNo: this.state.checkInfo.contractNo,
  1162. };
  1163. $.ajax({
  1164. method: "get",
  1165. dataType: "json",
  1166. crossDomain: false,
  1167. url: globalConfig.context + "/api/admin/expenseAccount/detailsList",
  1168. data: data,
  1169. success: function (data) {
  1170. ShowModal(this);
  1171. this.setState({
  1172. loading: false,
  1173. });
  1174. if (data.error && data.error.length === 0) {
  1175. if (data.data.list) {
  1176. paginationA.current = data.data.pageNo;
  1177. paginationA.total = data.data.totalCount;
  1178. if (data.data && data.data.list && !data.data.list.length) {
  1179. paginationA.current = 0;
  1180. paginationA.total = 0;
  1181. }
  1182. this.setState({
  1183. dataSourceA: data.data.list,
  1184. paginationA: this.state.paginationA,
  1185. pageNoA: data.data.pageNo,
  1186. totalAmountA: data.data.totalAmount,
  1187. });
  1188. } else {
  1189. this.setState({
  1190. dataSource: data.data,
  1191. pagination: false,
  1192. });
  1193. }
  1194. } else {
  1195. message.warning(data.error[0].message);
  1196. }
  1197. }.bind(this),
  1198. }).always(
  1199. function () {
  1200. this.setState({
  1201. loading: false,
  1202. });
  1203. }.bind(this)
  1204. );
  1205. }
  1206. getListB(pageNoB) {
  1207. const { paginationB, } = this.state;
  1208. this.setState({
  1209. loading: true,
  1210. });
  1211. let data = {
  1212. pageNo: pageNoB || 1,
  1213. pageSize: paginationB.pageSize,
  1214. expenseMain: 1,
  1215. username: this.state.checkInfo.buyerName,
  1216. }
  1217. $.ajax({
  1218. method: "get",
  1219. dataType: "json",
  1220. crossDomain: false,
  1221. url: globalConfig.context + "/api/admin/expenseAccount/pageList",
  1222. data: data,
  1223. success: function (data) {
  1224. ShowModal(this);
  1225. this.setState({
  1226. loading: false,
  1227. });
  1228. if (data.error && data.error.length === 0) {
  1229. if (data.data.list) {
  1230. paginationB.current = data.data.pageNo;
  1231. paginationB.total = data.data.totalCount;
  1232. if (data.data && data.data.list && !data.data.list.length) {
  1233. paginationB.current = 0;
  1234. paginationB.total = 0;
  1235. }
  1236. this.setState({
  1237. dataSourceB: data.data.list,
  1238. paginationB: this.state.paginationB,
  1239. pageNoB: data.data.pageNo,
  1240. totalAmountB: data.data.totalAmount,
  1241. });
  1242. }
  1243. } else {
  1244. message.warning(data.error[0].message);
  1245. }
  1246. }.bind(this),
  1247. }).always(
  1248. function () {
  1249. this.setState({
  1250. loading: false,
  1251. });
  1252. }.bind(this)
  1253. );
  1254. }
  1255. // 公出信息
  1256. getListC(pageNoC) {
  1257. const { paginationC, } = this.state;
  1258. this.setState({
  1259. loading: true,
  1260. });
  1261. $.ajax({
  1262. method: "get",
  1263. dataType: "json",
  1264. crossDomain: false,
  1265. url: globalConfig.context + "/api/admin/release/publicReleaseAndCount",
  1266. data: {
  1267. pageNo: pageNoC || 1,
  1268. pageSize: paginationC.pageSize,
  1269. status: 2,
  1270. uid: this.state.checkInfo.buyerId,
  1271. },
  1272. success: function (data) {
  1273. this.setState({
  1274. loading: false,
  1275. });
  1276. if (data.error && data.error.length === 0) {
  1277. if (data.data.list) {
  1278. paginationC.current = data.data.pageNo;
  1279. paginationC.total = data.data.totalCount;
  1280. if (data.data && data.data.list && !data.data.list.length) {
  1281. paginationC.current = 0;
  1282. paginationC.total = 0;
  1283. }
  1284. }
  1285. this.setState({
  1286. dataSourceC: data.data.list,
  1287. paginationC: this.state.paginationC,
  1288. pageNoC: data.data.pageNo,
  1289. peopleCount: data.data.peopleCount,
  1290. count: data.data.count,
  1291. durationCount: data.data.durationCount,
  1292. });
  1293. } else {
  1294. message.warning(data.error[0].message);
  1295. }
  1296. }.bind(this),
  1297. }).always(
  1298. function () {
  1299. this.setState({
  1300. loading: false,
  1301. });
  1302. }.bind(this)
  1303. );
  1304. }
  1305. jiedianNew(orderNos) {
  1306. $.ajax({
  1307. method: "get",
  1308. dataType: "json",
  1309. crossDomain: false,
  1310. url:
  1311. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1312. data: {
  1313. orderNo: orderNos
  1314. },
  1315. success: function (data) {
  1316. if (data.error && data.error.length) {
  1317. message.warning(data.error[0].message);
  1318. } else {
  1319. let theArr = [];
  1320. let thisData = [];
  1321. let arr = data.data || [];
  1322. let totalCui = 0;
  1323. for (let i = 0; i < arr.length; i++) {
  1324. thisData = arr[i];
  1325. totalCui += +thisData.money;
  1326. theArr.push({
  1327. key: i,
  1328. dunSubject: thisData.dunSubject
  1329. ? thisData.dunSubject.toString()
  1330. : "", //催款科目
  1331. id: thisData.id, //节点Id
  1332. money: thisData.money, //催款金额
  1333. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1334. commodityName: thisData.commodityName,
  1335. projectType: thisData.projectType,
  1336. dunTypeName: thisData.dunTypeName,
  1337. status: thisData.status,
  1338. waitDay: thisData.waitDay,
  1339. effectiveCount: thisData.effectiveCount,
  1340. startDate: thisData.startDate,
  1341. dunType: thisData.dunType,
  1342. appropriationRatio: thisData.appropriationRatio,
  1343. customizeName: thisData.customizeName,
  1344. customizeTimes: thisData.customizeTimes,
  1345. tid: thisData.tid,
  1346. });
  1347. }
  1348. if (!totalCui) {
  1349. totalCui = 0;
  1350. }
  1351. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  1352. this.setState({
  1353. contactListNew: theArr,
  1354. totalCui
  1355. });
  1356. }
  1357. }.bind(this)
  1358. }).always(
  1359. function () {
  1360. this.setState({
  1361. loading: false
  1362. });
  1363. }.bind(this)
  1364. );
  1365. }
  1366. orderDetailData(orderNos) {
  1367. this.setState({
  1368. loading: true,
  1369. });
  1370. $.ajax({
  1371. method: "get",
  1372. dataType: "json",
  1373. crossDomain: false,
  1374. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1375. data: {
  1376. orderNo: orderNos,
  1377. },
  1378. success: function (data) {
  1379. if (data.error.length || data.data.list == "") {
  1380. if (data.error && data.error.length) {
  1381. message.warning(data.error[0].message);
  1382. this.setState({
  1383. loading: false,
  1384. });
  1385. }
  1386. } else {
  1387. let thisdata = data.data;
  1388. this.setState({
  1389. loading: false,
  1390. orderUid: thisdata.uid,
  1391. userName: thisdata.userName,
  1392. primaryOrderNo: thisdata.primaryOrder,
  1393. additionalOrder: thisdata.additionalOrder,
  1394. contractNo: thisdata.contractNo,
  1395. orderData: thisdata,
  1396. isAddition: thisdata.additionalOrder ? true : false,
  1397. deleteSign: thisdata.deleteSign,
  1398. contractPictureUrl: thisdata.contractPictureUrl
  1399. ? splitUrl(
  1400. thisdata.contractPictureUrl,
  1401. ",",
  1402. globalConfig.avatarHost + "/upload"
  1403. )
  1404. : [],
  1405. });
  1406. }
  1407. }.bind(this),
  1408. });
  1409. }
  1410. xiangmu(orderNos) {
  1411. $.ajax({
  1412. method: "get",
  1413. dataType: "json",
  1414. crossDomain: false,
  1415. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1416. data: {
  1417. orderNo: orderNos
  1418. },
  1419. success: function (data) {
  1420. let theArr = [];
  1421. if (data.error.length || data.data.list == "") {
  1422. if (data.error && data.error.length) {
  1423. message.warning(data.error[0].message);
  1424. }
  1425. } else {
  1426. for (let i = 0; i < data.data.length; i++) {
  1427. let thisdata = data.data[i];
  1428. thisdata.key = i;
  1429. thisdata.sort = thisdata.cSort;
  1430. theArr.push(thisdata);
  1431. }
  1432. }
  1433. this.setState({
  1434. dataSourceX: theArr
  1435. });
  1436. }.bind(this)
  1437. });
  1438. }
  1439. render() {
  1440. const { TextArea } = Input
  1441. const { data, visible, newList, logdataSour, columns, customerArr = [], checkInfo } = this.state
  1442. const { onCancel } = this.props
  1443. const formItemLayout = {
  1444. labelCol: { span: 5 },
  1445. wrapperCol: { span: 18 },
  1446. };
  1447. const radioStyle = {
  1448. display: 'block',
  1449. height: '30px',
  1450. lineHeight: '30px',
  1451. };
  1452. const options = customerArr.map((group) => (
  1453. <Select.Option key={group.id} value={group.name}>
  1454. {group.name}
  1455. </Select.Option>
  1456. ));
  1457. return (
  1458. <Modal
  1459. maskClosable={false}
  1460. visible={true}
  1461. onOk={false}
  1462. onCancel={onCancel}
  1463. width={1400}
  1464. title={<span style={{ fontWeight: "bold" }}>报销详情
  1465. <Button
  1466. type="primary"
  1467. style={{ marginLeft: 30 }}
  1468. onClick={() => { this.setState({ isTable: !this.state.isTable }) }}
  1469. >{this.state.isTable ? "切换列表显示" : "切换表格显示"}</Button>
  1470. </span>}
  1471. footer=""
  1472. >
  1473. <Spin spinning={this.state.loading}>
  1474. <div className="m_body"
  1475. ref={ref => {
  1476. this.printTemp = ref;
  1477. }}
  1478. >
  1479. {this.state.isTable
  1480. ? <div className="m_table">
  1481. <div className="m_title">报销明细表</div>
  1482. <div className="m_head">
  1483. <div>报销编号:{data.checkNo}</div>
  1484. <div>申请部门:{data.applyDepName}</div>
  1485. <div>报销人:{data.aname}</div>
  1486. <div>报销日期:{moment(data.createTimeStr).format('YYYY年MM月DD日')}</div>
  1487. <div
  1488. style={{ cursor: this.props.isOperate && "pointer" }}
  1489. onClick={() => {
  1490. this.props.isOperate &&
  1491. this.setState({
  1492. editA: "remarks",
  1493. editTit: "修改报销事由",
  1494. upId: data.id,
  1495. upRemarks: data.remarks,
  1496. })
  1497. }}
  1498. >报销事由:{data.remarks}</div>
  1499. <div>收款方式:{!data.name ? "" : (data.bank + " " + data.accounts + " " + data.name)}</div>
  1500. </div>
  1501. <Table
  1502. columns={columns}
  1503. dataSource={newList}
  1504. bordered
  1505. size="middle"
  1506. pagination={false}
  1507. />
  1508. <div className="m_head">
  1509. <div style={{ width: "100%", marginTop: 8 }}>审核日志:
  1510. {
  1511. this.state.logdataSour.map(item =>
  1512. item.showStatus == 0 && <span key={item.id}>【{item.auditorName}&nbsp;&nbsp;{item.createTimeStr}&nbsp;&nbsp;{item.remarks}】&nbsp;&nbsp;</span>
  1513. )
  1514. }
  1515. </div>
  1516. </div>
  1517. </div>
  1518. : <Form layout="horizontal" id="demand-form">
  1519. <Spin spinning={this.state.loading}>
  1520. <div className="clearfix">
  1521. <FormItem
  1522. {...formItemLayout}
  1523. label="报销编号"
  1524. >
  1525. <span>{data.checkNo}</span>
  1526. </FormItem>
  1527. </div>
  1528. {/* <div className="clearfix">
  1529. <FormItem
  1530. {...formItemLayout}
  1531. label="总金额"
  1532. >
  1533. <span>{data.totalAmount}</span>
  1534. </FormItem>
  1535. </div> */}
  1536. {/* <div className="clearfix">
  1537. <FormItem
  1538. {...formItemLayout}
  1539. label="报销至订单"
  1540. >
  1541. <div>
  1542. <div>{data.buyerName}</div>
  1543. <div>{data.contractNo}</div>
  1544. </div>
  1545. </FormItem>
  1546. </div> */}
  1547. <div className="clearfix">
  1548. <FormItem
  1549. {...formItemLayout}
  1550. label="报销时间"
  1551. >
  1552. <span>{data.createTimeStr}</span>
  1553. </FormItem>
  1554. </div>
  1555. {data.type == 1 &&
  1556. <div>
  1557. <div style={{ fontSize: 13, fontWeight: "bold" }}>公出信息</div>
  1558. <div className="clearfix">
  1559. <FormItem
  1560. {...formItemLayout}
  1561. label="公出企业"
  1562. >
  1563. <span>{data.userNames}</span>
  1564. </FormItem>
  1565. </div>
  1566. <div className="clearfix">
  1567. <FormItem
  1568. {...formItemLayout}
  1569. label="公出地点"
  1570. >
  1571. <span>{data.districtName}</span>
  1572. </FormItem>
  1573. </div>
  1574. <div className="clearfix">
  1575. <FormItem
  1576. {...formItemLayout}
  1577. label="时间"
  1578. >
  1579. <span>{data.releaseStartStr} 至 {data.releaseEndStr}</span>
  1580. </FormItem>
  1581. </div>
  1582. <div className="clearfix">
  1583. <FormItem
  1584. {...formItemLayout}
  1585. label="公出时长"
  1586. >
  1587. <span>{data.duration}小时</span>
  1588. </FormItem>
  1589. </div>
  1590. </div>}
  1591. <div style={{ fontSize: 13, fontWeight: "bold" }}>报销详细</div>
  1592. <div className="clearfix">
  1593. <FormItem
  1594. {...formItemLayout}
  1595. label="报销人"
  1596. >
  1597. <span>{data.aname}</span>
  1598. </FormItem>
  1599. </div>
  1600. <div className="clearfix">
  1601. <FormItem
  1602. {...formItemLayout}
  1603. label="报销公司"
  1604. >
  1605. <span>{data.applyDepName}</span>
  1606. </FormItem>
  1607. </div>
  1608. <div className="clearfix">
  1609. <FormItem
  1610. {...formItemLayout}
  1611. label="支付公司"
  1612. >
  1613. <span>{data.payDepName}</span>
  1614. </FormItem>
  1615. </div>
  1616. <div className="clearfix">
  1617. <FormItem
  1618. labelCol={{ span: 5 }}
  1619. wrapperCol={{ span: 18 }}
  1620. label="报销事由"
  1621. >
  1622. <p style={{ maxWidth: 500, wordWrap: "break-word" }}>
  1623. {data.remarks}
  1624. </p>
  1625. </FormItem>
  1626. </div>
  1627. <div style={{ fontSize: 13, fontWeight: "bold" }}>报销费用详细</div>
  1628. {
  1629. data.sonList.map(it =>
  1630. <div key={it.id} style={{ borderBottom: "1px solid #000" }}>
  1631. <div className="clearfix">
  1632. <FormItem
  1633. {...formItemLayout}
  1634. label="报销金额"
  1635. >
  1636. <span style={{ fontWeight: "bold" }}>{it.amount}(元)</span>
  1637. </FormItem>
  1638. </div>
  1639. <div className="clearfix">
  1640. <FormItem
  1641. {...formItemLayout}
  1642. label="报销类型"
  1643. >
  1644. <span style={{ fontWeight: "bold" }}>
  1645. {getAccountName(it.type, it.typeOther)}
  1646. {it.type == 2 && (" - " + getSecondaryAccountName(it.secondaryType, it.secondaryTypeOther))}
  1647. </span>
  1648. </FormItem>
  1649. </div>
  1650. {
  1651. !!it.publicReleaseType &&
  1652. <div className="clearfix">
  1653. <FormItem
  1654. {...formItemLayout}
  1655. label="报销来源"
  1656. >
  1657. <span style={{ fontWeight: "bold" }}>
  1658. {["业务公出", "技术公出", "行政公出", "技术协单", "技术助手"][it.publicReleaseType]}
  1659. </span>
  1660. </FormItem>
  1661. </div>
  1662. }
  1663. {
  1664. !!it.contractNo ?
  1665. <div className="clearfix">
  1666. <FormItem
  1667. {...formItemLayout}
  1668. label="报销至订单"
  1669. >
  1670. <span style={{ fontWeight: "bold" }}>{it.contractNo}</span>
  1671. </FormItem>
  1672. </div>
  1673. : <FormItem
  1674. {...formItemLayout}
  1675. label=" "
  1676. ><span style={{ fontWeight: "bold" }}>报销至部门</span></FormItem>
  1677. }
  1678. {/* 差旅费显示 */}
  1679. {it.type == 1 &&
  1680. it.detList.map(item =>
  1681. item.type == 1
  1682. ? <div>
  1683. <div className="clearfix" >
  1684. <FormItem
  1685. {...formItemLayout}
  1686. label="交通费"
  1687. >
  1688. <span>
  1689. {getVehicleName(item.vehicle, item.vehicleOther)}
  1690. ({item.startDistrict + " - " + item.endDistrict})
  1691. {item.amount}(元)
  1692. </span>
  1693. </FormItem>
  1694. </div>
  1695. </div>
  1696. : <div className="clearfix" >
  1697. <FormItem
  1698. {...formItemLayout}
  1699. label={getTypeName(item.type)}
  1700. >
  1701. <span>{item.amount}(元)</span>
  1702. </FormItem>
  1703. </div>
  1704. )
  1705. }
  1706. {/* 通用 */}
  1707. {(it.type == 0 || it.type == 2 || it.type == 4 || it.type == 5) &&
  1708. it.detList.map(item =>
  1709. <div className="clearfix" >
  1710. {!!item.agreeTimeStr &&
  1711. <FormItem
  1712. {...formItemLayout}
  1713. label={it.type == 5 ? "支付时间:" : "需付款时间:"}
  1714. >
  1715. <span>{item.agreeTimeStr.slice(0, 10)}</span>
  1716. </FormItem>}
  1717. <FormItem
  1718. {...formItemLayout}
  1719. label={it.type == 4
  1720. ? "预借支金额:" : it.type == 5
  1721. ? "抵扣金额:" : "金额:"}
  1722. >
  1723. <span>{item.amount}(元)</span>
  1724. </FormItem>
  1725. </div>
  1726. )
  1727. }
  1728. {/* 第三方付款 */}
  1729. {it.type == 3 &&
  1730. it.detList.map(item =>
  1731. <div className="clearfix" >
  1732. {!!item.agreeTimeStr &&
  1733. <FormItem
  1734. {...formItemLayout}
  1735. label="需付款时间"
  1736. >
  1737. <span>{item.agreeTimeStr.slice(0, 10)}</span>
  1738. </FormItem>
  1739. }
  1740. <FormItem
  1741. {...formItemLayout}
  1742. label="付款方式"
  1743. >
  1744. <span>{["公对公转账"][item.payType]}</span>
  1745. </FormItem>
  1746. <FormItem
  1747. {...formItemLayout}
  1748. label="发票类型"
  1749. >
  1750. <span>{["普票", "专票"][item.invoiceType]}</span>
  1751. </FormItem>
  1752. <FormItem
  1753. {...formItemLayout}
  1754. label="发票号"
  1755. >
  1756. <span>{item.invoiceNo}</span>
  1757. </FormItem>
  1758. <FormItem
  1759. {...formItemLayout}
  1760. label="付款单位"
  1761. >
  1762. <span>{item.payerName}</span>
  1763. </FormItem>
  1764. <FormItem
  1765. {...formItemLayout}
  1766. label="开户银行"
  1767. >
  1768. <span>{item.openBank}</span>
  1769. </FormItem>
  1770. <FormItem
  1771. {...formItemLayout}
  1772. label="银行账户"
  1773. >
  1774. <span>{item.bankAccounts}</span>
  1775. </FormItem>
  1776. <FormItem
  1777. {...formItemLayout}
  1778. label="开户行地址"
  1779. >
  1780. <span>{item.openBankAddress}</span>
  1781. </FormItem>
  1782. <FormItem
  1783. {...formItemLayout}
  1784. label="金额(元)"
  1785. >
  1786. <span>{item.amount}</span>
  1787. </FormItem>
  1788. </div>
  1789. )
  1790. }
  1791. {
  1792. it.settlementAmount != 0 && it.type != 4 && it.type != 5 &&
  1793. <div className="clearfix">
  1794. <FormItem
  1795. {...formItemLayout}
  1796. label="抵扣金额"
  1797. >
  1798. <span>{it.settlementAmount}(元)</span>
  1799. </FormItem>
  1800. </div>
  1801. }
  1802. <div className="clearfix">
  1803. <FormItem
  1804. {...formItemLayout}
  1805. label="附件"
  1806. >
  1807. <div style={{ paddingTop: '10px', paddingBottom: '10px' }}>
  1808. {!!it.attachmentUrl ? <ImgList domId={it.id} fileList={splitUrl(it.attachmentUrl, ",", globalConfig.avatarHost + "/upload")} ItemWidth={'96px'} /> : <div />}
  1809. </div>
  1810. </FormItem>
  1811. </div>
  1812. </div>
  1813. )
  1814. }
  1815. {data.type != 4 && data.debitTotalAmount &&
  1816. <div className="clearfix">
  1817. <FormItem
  1818. {...formItemLayout}
  1819. label="预借支"
  1820. >
  1821. <span style={{ color: "red" }}>{data.debitTotalAmount}(元)</span>
  1822. </FormItem>
  1823. </div>}
  1824. {data.type != 4 && data.type != 5 &&
  1825. <div className="clearfix">
  1826. <FormItem
  1827. {...formItemLayout}
  1828. label="本次报销金额"
  1829. >
  1830. <span style={{ color: "red", fontWeight: "bold" }}>{data.amount}(元)</span>
  1831. </FormItem>
  1832. </div>}
  1833. {data.type != 4 && data.type != 5 &&
  1834. <div className="clearfix">
  1835. <FormItem
  1836. {...formItemLayout}
  1837. label="实报金额"
  1838. >
  1839. <span style={{ color: "red", fontWeight: "bold" }}>{data.realAmount}(元)</span>
  1840. </FormItem>
  1841. </div>}
  1842. <div style={{ fontSize: 13, fontWeight: "bold" }}>收款详情</div>
  1843. {data.type != 3 && data.type != 5 &&
  1844. <div>
  1845. <div className="clearfix">
  1846. <FormItem
  1847. {...formItemLayout}
  1848. label="收款人"
  1849. >
  1850. <span>{!!data.name && data.name}</span>
  1851. </FormItem>
  1852. </div>
  1853. <div className="clearfix">
  1854. <FormItem
  1855. {...formItemLayout}
  1856. label="收款银行"
  1857. >
  1858. <span>{!!data.bank && data.bank}</span>
  1859. </FormItem>
  1860. </div>
  1861. <div className="clearfix">
  1862. <FormItem
  1863. {...formItemLayout}
  1864. label="收款账户"
  1865. >
  1866. <span>{!!data.accounts && data.accounts}</span>
  1867. </FormItem>
  1868. </div>
  1869. </div>}
  1870. <div style={{ fontSize: 13, fontWeight: "bold" }}>审核意见</div>
  1871. <ul
  1872. style={{
  1873. // width: "560px",
  1874. overflow: "hidden",
  1875. paddingLeft: "90px",
  1876. position: "relative",
  1877. }}
  1878. >
  1879. {logdataSour.map((item, index) => {
  1880. return (
  1881. <li
  1882. key={index}
  1883. style={{
  1884. width: "100%",
  1885. height: "auto",
  1886. wordBreak: "break-all",
  1887. marginBottom: "10px",
  1888. }}
  1889. >
  1890. <span>{item.auditorName}:</span>
  1891. <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][item.status] }}>
  1892. {["【发起】,", "【通过】,", "【完成】,", "【驳回】,", "【撤销】,", "【修改】,"][item.status]}
  1893. {this.state.processStatus == item.processStatus && !item.id && data.status != 0 &&
  1894. <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
  1895. </span>
  1896. <span>{item.remarks}</span>
  1897. <span>&nbsp;&nbsp;&nbsp;{item.createTimeStr}</span>
  1898. </li>
  1899. );
  1900. })}
  1901. </ul>
  1902. <div className="clearfix" style={{ marginTop: 20 }}>
  1903. <Button
  1904. type="primary"
  1905. style={{
  1906. float: "right",
  1907. }}
  1908. onClick={() => {
  1909. this.setState({
  1910. logvisible: true
  1911. })
  1912. this.getLogData(data.id)
  1913. }}
  1914. >
  1915. 查看日志
  1916. </Button>
  1917. </div>
  1918. {/* 暂时隐藏 */}
  1919. {false && this.props.isOperate && data.examine == 1 &&
  1920. <div className="clearfix"
  1921. style={{ width: 500, margin: "20px auto" }}>
  1922. <TextArea
  1923. rows={4}
  1924. value={this.state.reason}
  1925. onChange={(e) => {
  1926. this.setState({
  1927. reason: e.target.value,
  1928. })
  1929. }}
  1930. placeholder="请填写审核内容"
  1931. />
  1932. <div
  1933. style={{
  1934. width: 250,
  1935. display: "flex",
  1936. justifyContent: "space-between",
  1937. margin: "20px auto 0"
  1938. }}
  1939. >
  1940. <Button type="primary"
  1941. style={{ margin: 4 }}
  1942. onClick={(e) => {
  1943. this.setState({
  1944. checkData: data
  1945. }, () => {
  1946. this.toExamine(1)
  1947. })
  1948. }}
  1949. >同意</Button>
  1950. <Button type="danger"
  1951. style={{ margin: 4 }}
  1952. onClick={(e) => {
  1953. this.setState({
  1954. checkData: data
  1955. }, () => {
  1956. this.toExamine(3)
  1957. })
  1958. }}
  1959. >驳回</Button>
  1960. </div>
  1961. </div>
  1962. }
  1963. </Spin>
  1964. </Form>
  1965. }
  1966. </div>
  1967. </Spin>
  1968. <Button
  1969. type="primary"
  1970. style={{
  1971. float: "right",
  1972. marginTop: 10,
  1973. position: "absolute",
  1974. top: 0,
  1975. right: 50,
  1976. }}
  1977. onClick={() => {
  1978. const _this = this
  1979. this.setState({
  1980. isPrint: true
  1981. }, () => {
  1982. Print(_this.printTemp)
  1983. })
  1984. setTimeout(function () {
  1985. _this.setState({
  1986. isPrint: false
  1987. })
  1988. }, 2000)
  1989. }}
  1990. >
  1991. 打印
  1992. </Button>
  1993. {/* <ReactToPrint
  1994. trigger={() => (
  1995. <Button
  1996. type="primary"
  1997. style={{
  1998. float: "right",
  1999. marginTop: 10,
  2000. position: "absolute",
  2001. top: 0,
  2002. right: 50,
  2003. }}
  2004. >
  2005. 打印
  2006. </Button>
  2007. )}
  2008. content={() => this.refs.all}
  2009. bodyClass="print-body"
  2010. /> */}
  2011. {
  2012. //审核弹窗
  2013. this.state.visible != "" &&
  2014. <Modal
  2015. width="400px"
  2016. maskClosable={false}
  2017. title="审核"
  2018. confirmLoading={this.state.loading}
  2019. visible={this.state.visible != ""}
  2020. onOk={() => { this.toExamine(visible == "adopt" ? 1 : visible == "reject" && 3) }}
  2021. okText={this.state.visible == "adopt" ? "通过" : this.state.visible == "reject" && "驳回"}
  2022. onCancel={() => {
  2023. this.setState({
  2024. visible: '',
  2025. reason: "",
  2026. checkData: {},
  2027. })
  2028. }}
  2029. >
  2030. <TextArea
  2031. rows={4}
  2032. value={this.state.reason}
  2033. onChange={(e) => {
  2034. this.setState({
  2035. reason: e.target.value,
  2036. })
  2037. }}
  2038. placeholder="请填写审核内容"
  2039. />
  2040. </Modal>
  2041. }
  2042. {
  2043. // 审核日志
  2044. this.state.logvisible &&
  2045. <Modal
  2046. visible={this.state.logvisible}
  2047. className="admin-desc-content"
  2048. width="800px"
  2049. maskClosable={false}
  2050. title="审核日志"
  2051. footer={null}
  2052. onCancel={() => {
  2053. this.setState({
  2054. logvisible: false,
  2055. })
  2056. }}
  2057. >
  2058. <div className="patent-table">
  2059. <Spin spinning={this.state.loading}>
  2060. <Table
  2061. columns={this.state.logcolumns}
  2062. dataSource={this.state.logdataSour}
  2063. pagination={false}
  2064. bordered
  2065. size="small"
  2066. />
  2067. </Spin>
  2068. </div>
  2069. </Modal>
  2070. }
  2071. {
  2072. // 修改
  2073. this.state.editA != "" &&
  2074. <Modal
  2075. visible={this.state.editA != ""}
  2076. maskClosable={false}
  2077. title={this.state.editTit}
  2078. cancelText="取消"
  2079. width={300}
  2080. okText="确认"
  2081. onOk={() => { this.updateRealAmount() }}
  2082. onCancel={() => { this.setState({ editA: "" }) }}
  2083. >
  2084. {
  2085. this.state.editA == "amount" &&
  2086. <Input
  2087. placeholder='请输入'
  2088. type='number'
  2089. value={this.state.upAmount}
  2090. onChange={e => {
  2091. this.setState({
  2092. upAmount: e.target.value
  2093. })
  2094. }}
  2095. />
  2096. }
  2097. {
  2098. this.state.editA == "remarks" &&
  2099. <TextArea
  2100. rows={4}
  2101. value={this.state.upRemarks}
  2102. onChange={(e) => {
  2103. this.setState({
  2104. upRemarks: e.target.value,
  2105. })
  2106. }}
  2107. placeholder="报销事由"
  2108. />
  2109. }
  2110. {
  2111. this.state.editA == "typesOther" &&
  2112. <Input
  2113. placeholder='请填写类型说明'
  2114. value={this.state.upTypesOther}
  2115. onChange={e => {
  2116. this.setState({
  2117. upTypesOther: e.target.value
  2118. })
  2119. }}
  2120. />
  2121. }
  2122. {
  2123. this.state.editA == "contractNo" &&
  2124. <RadioGroup onChange={e => { this.setState({ cNo: e.target.value }) }} value={this.state.cNo}>
  2125. <Radio value={1}>修改合同编号</Radio>
  2126. <Radio value={2}>删除合同编号</Radio>
  2127. </RadioGroup>
  2128. }
  2129. {
  2130. this.state.editA == "contractNo" && this.state.cNo == 1 &&
  2131. <div>
  2132. <div style={{ margin: "20px 0" }}>
  2133. <AutoComplete
  2134. className="certain-category-search"
  2135. dropdownClassName="certain-category-search-dropdown"
  2136. dropdownMatchSelectWidth={false}
  2137. style={{ width: 180 }}
  2138. dataSource={options}
  2139. placeholder="企业名称"
  2140. value={this.state.upUserNames}
  2141. onChange={this.httpChange.bind(this)}
  2142. filterOption={true}
  2143. onSelect={this.selectAuto.bind(this)}
  2144. >
  2145. <Input />
  2146. </AutoComplete>
  2147. <Button
  2148. disabled={!this.state.upUserId}
  2149. style={{ marginLeft: 10 }}
  2150. type="primary"
  2151. onClick={() => {
  2152. this.selectOrderByUid()
  2153. }}>搜索</Button>
  2154. </div>
  2155. <div>
  2156. <Spin spinning={this.state.sloading}>
  2157. {
  2158. !!this.state.upList && this.state.upList.length == 0 &&
  2159. <div style={{ color: "red", margin: "20px auto", textAlign: "center" }}>该企业暂无订单</div>
  2160. }
  2161. <RadioGroup
  2162. onChange={(e) => {
  2163. this.setState({
  2164. upOrderNo: e.target.value
  2165. })
  2166. }} value={this.state.upOrderNo}>
  2167. {
  2168. !!this.state.upList && this.state.upList.map(item =>
  2169. <Radio key={item.contractNo} style={radioStyle} value={item.orderNo}>编号:{item.contractNo}</Radio>
  2170. )
  2171. }
  2172. </RadioGroup>
  2173. </Spin>
  2174. </div>
  2175. </div>
  2176. }
  2177. {
  2178. this.state.editA == "detTypeOther" &&
  2179. <Input
  2180. placeholder='请填写详细说明'
  2181. value={this.state.detTypeOther}
  2182. onChange={e => {
  2183. this.setState({
  2184. detTypeOther: e.target.value
  2185. })
  2186. }}
  2187. />
  2188. }
  2189. </Modal>
  2190. }
  2191. {
  2192. this.state.check &&
  2193. <Modal
  2194. visible={this.state.check}
  2195. maskClosable={false}
  2196. footer={false}
  2197. width={1400}
  2198. onCancel={() => { this.setState({ check: false }) }}
  2199. >
  2200. <Spin spinning={this.state.loading}>
  2201. <Table
  2202. columns={columns}
  2203. dataSource={[checkInfo]}
  2204. bordered
  2205. size="middle"
  2206. pagination={false}
  2207. />
  2208. <div style={{ textAlign: "center", fontSize: "30px", fontWeight: "bold", margin: "30px 0" }}>{checkInfo.contractNo}报销/公出/订单详细</div>
  2209. <div style={{ margin: "30px 0" }}>
  2210. <RadioGroup size="large" onChange={e => { this.radioChange(e) }} value={this.state.checkType}>
  2211. <RadioButton value="a">报销详情</RadioButton>
  2212. <RadioButton value="b">全部报销</RadioButton>
  2213. <RadioButton value="c">所有公出</RadioButton>
  2214. {
  2215. this.state.orderList.map(item =>
  2216. <RadioButton value={item.orderNo} key={item.contractNo}>{item.contractNo}签单</RadioButton>
  2217. )
  2218. }
  2219. </RadioGroup>
  2220. </div>
  2221. {
  2222. this.state.checkType == "a" &&
  2223. <Table
  2224. columns={this.state.columnsA}
  2225. dataSource={this.state.dataSourceA}
  2226. bordered
  2227. size="middle"
  2228. pagination={false}
  2229. />
  2230. }
  2231. {
  2232. this.state.checkType == "a" &&
  2233. <p style={{ display: "inline-block", fontSize: "14px", color: "red" }}>
  2234. <span style={{ marginRight: 10 }}>
  2235. {`报销总计:${this.state.totalAmountA} 元`}
  2236. </span>
  2237. </p>
  2238. }
  2239. {
  2240. this.state.checkType == "b" &&
  2241. <Table
  2242. columns={this.state.columnsB}
  2243. dataSource={this.state.dataSourceB}
  2244. bordered
  2245. size="middle"
  2246. pagination={false}
  2247. />
  2248. }
  2249. {
  2250. this.state.checkType == "b" &&
  2251. <p style={{ display: "inline-block", fontSize: "14px", color: "red" }}>
  2252. <span style={{ marginRight: 10 }}>
  2253. {`报销总计:${this.state.totalAmountB} 元`}
  2254. </span>
  2255. </p>
  2256. }
  2257. {
  2258. this.state.checkType == "c" &&
  2259. <Table
  2260. scroll={{ x: "120%" }}
  2261. columns={this.state.columnsC}
  2262. dataSource={this.state.dataSourceC}
  2263. bordered
  2264. size="middle"
  2265. pagination={false}
  2266. rowClassName={this.addRowColor}
  2267. />
  2268. }
  2269. {
  2270. this.state.checkType == "c" &&
  2271. <p style={{ display: "inline-block", fontSize: "14px", color: "red" }}>
  2272. <span style={{ marginRight: 10 }}>
  2273. {`公出总计:${this.state.peopleCount}人公出,${this.state.count}人次,${this.state.durationCount}小时`}
  2274. </span>
  2275. </p>
  2276. }
  2277. {
  2278. !!this.state.orderData.orderNo &&
  2279. <OrderDetail
  2280. domId={this.state.checkType}
  2281. orderUid={this.state.checkInfo.buyerId}
  2282. orderData={this.state.orderData}
  2283. dataSourceX={this.state.dataSourceX}
  2284. orderNo={this.state.checkType}
  2285. totalCui={this.state.totalCui}
  2286. contactListNew={this.state.contactListNew}
  2287. pictureUrl={this.state.contractPictureUrl}
  2288. />
  2289. }
  2290. </Spin>
  2291. </Modal>
  2292. }
  2293. </Modal>
  2294. );
  2295. }
  2296. }
  2297. export default AccountDetails;