accountDetails.jsx 76 KB

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