accountDetails.jsx 76 KB

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