shouKuang.jsx 79 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846
  1. import React from "react";
  2. import $ from "jquery/src/ajax";
  3. import moment from "moment";
  4. import "./public.less";
  5. import "./shouKuan.less";
  6. import {
  7. Button,
  8. Form,
  9. Input,
  10. Spin,
  11. Table,
  12. Select,
  13. message,
  14. DatePicker,
  15. Modal,
  16. Tabs,
  17. Col,
  18. Tag,
  19. Popconfirm, Tooltip
  20. } from "antd";
  21. import OrderDesc from "../orderDetail/orderDesc";
  22. import ResolutionDetail from "@/resolutionDetail";
  23. import Receivable from "./receivable";
  24. import Assign from "@/manageCenter/publicComponent/assign";
  25. import KaiPiaoModal from "./kaiPiaoModal";
  26. import ReactToPrint from "react-to-print";
  27. import {
  28. getLiquidationStatus,
  29. getProcessStatus,
  30. getApproval,
  31. getInvoiceStatus,
  32. getTransactionProject,
  33. getTaskStatus,
  34. getNewOrderStatus,
  35. getProjectStatus,
  36. getjiedian,
  37. splitUrl,
  38. } from "@/tools";
  39. import { ChooseList } from "../../order/orderNew/chooseList"
  40. import Project from "../../../../component/project"
  41. import { throws } from "assert";
  42. import {getProjectName} from "../../../tools";
  43. const FormItem = Form.Item;
  44. const { TabPane } = Tabs;
  45. const { TextArea } = Input;
  46. const ShouKuang = React.createClass({
  47. departmentList() {
  48. // this.setState({
  49. // loading: true
  50. // });
  51. $.ajax({
  52. method: "get",
  53. dataType: "json",
  54. crossDomain: false,
  55. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  56. data: {},
  57. success: function (data) {
  58. let thedata = data.data;
  59. let theArr = [];
  60. if (!thedata) {
  61. if (data.error && data.error.length) {
  62. message.warning(data.error[0].message);
  63. }
  64. } else {
  65. thedata.map(function (item, index) {
  66. theArr.push({
  67. key: index,
  68. name: item.name,
  69. id: item.id,
  70. });
  71. });
  72. }
  73. this.setState({
  74. departmentArr: theArr,
  75. });
  76. }.bind(this),
  77. }).always(
  78. function () {
  79. // this.setState({
  80. // loading: false
  81. // });
  82. }.bind(this)
  83. );
  84. },
  85. loadData(pageNo, pageSize) {
  86. this.state.data = [];
  87. this.state.pagination.pageSize = 10;
  88. this.setState({
  89. // selectedRowKeys: [],
  90. // selectedRowKey: [],
  91. page: pageNo || this.state.pageNo,
  92. loadingA: true,
  93. pagination: this.state.pagination,
  94. });
  95. $.ajax({
  96. method: "get",
  97. dataType: "json",
  98. crossDomain: false,
  99. url: globalConfig.context + "/api/admin/financial/financeList",
  100. data: {
  101. pageNo: pageNo || 1,
  102. pageSize: pageSize || this.state.pagination.pageSize,
  103. buyerName: this.state.nameSearch, //客户名称
  104. orderNo: this.state.orderNoSearch,
  105. startTime: this.state.releaseDate[0],
  106. endTime: this.state.releaseDate[1],
  107. startFinalReceivablesTime: this.state.shouKuanDate[0],
  108. endFinalReceivablesTime: this.state.shouKuanDate[1],
  109. departmentId: this.state.departmenttList,
  110. processStatus: this.state.processStatusSearch,
  111. contractNo: this.state.contractNoSearch,
  112. liquidationStatus: this.state.liquidationStatus,
  113. amountStatus: this.state.amountStatus,
  114. },
  115. success: function (data) {
  116. let theArr = [];
  117. if (!data.data || !data.data.pagination.list) {
  118. if (data.error && data.error.length) {
  119. message.warning(data.error[0].message);
  120. }
  121. } else {
  122. for (let i = 0; i < data.data.pagination.list.length; i++) {
  123. let thisdata = data.data.pagination.list[i];
  124. thisdata.key = thisdata.orderNo;
  125. theArr.push(thisdata);
  126. }
  127. }
  128. this.state.pagination.current = data.data.pagination.pageNo;
  129. this.state.pagination.total = data.data.pagination.totalCount;
  130. if (
  131. data.data &&
  132. data.data.pagination.list &&
  133. !data.data.pagination.list.length
  134. ) {
  135. this.state.pagination.current = 0;
  136. this.state.pagination.total = 0;
  137. }
  138. this.setState({
  139. totalPage: data.data.pagination.totalPage,
  140. dataSource: theArr,
  141. pagination: this.state.pagination,
  142. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  143. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0,
  144. });
  145. }.bind(this),
  146. }).always(
  147. function () {
  148. // window.setTimeout(() => {
  149. this.setState({
  150. loadingA: false,
  151. });
  152. // },5000)
  153. }.bind(this)
  154. );
  155. },
  156. getInitialState() {
  157. return {
  158. cuiTabKey: "1",
  159. //默认搜索无流程状态
  160. processStatusSearch: [],
  161. searchMore: true,
  162. dvisible: false,
  163. pageNo: 1,
  164. assignVisibleX: false,
  165. assignVisibleY: false,
  166. releaseDate: [],
  167. shouKuanDate: [],
  168. assignDataX: [],
  169. assignDataY: [],
  170. totalPage: 0,
  171. // processStatusSearch: "3",
  172. boHuivisible: false,
  173. selectedRowKeys: [],
  174. selectedRows: [],
  175. loading: false,
  176. loadingA: false,
  177. pagination: {
  178. defaultCurrent: 1,
  179. defaultPageSize: 10,
  180. showQuickJumper: true,
  181. pageSize: 10,
  182. onChange: function (page) {
  183. // console.log(page);
  184. this.setState({
  185. pageNo: page,
  186. });
  187. this.loadData(page);
  188. }.bind(this),
  189. showTotal: function (total) {
  190. return "共" + total + "条数据";
  191. },
  192. },
  193. // 子组件改变的表格title数组
  194. changeList: undefined,
  195. proColumns: [
  196. {
  197. title: "序号",
  198. dataIndex: "key",
  199. key: "key",
  200. },
  201. {
  202. title: "合同编号",
  203. dataIndex: "contractNo",
  204. key: "contractNo",
  205. },
  206. {
  207. title: "订单编号",
  208. dataIndex: "orderNo",
  209. key: "orderNo",
  210. },
  211. // {
  212. // title: "项目编号",
  213. // dataIndex: "id",
  214. // key: "id"
  215. // },
  216. {
  217. title: "客户名称",
  218. dataIndex: "userName",
  219. key: "userName",
  220. render: text => {
  221. return (
  222. <Tooltip title={text}>
  223. <div style={{
  224. maxWidth:'150px',
  225. overflow:'hidden',
  226. textOverflow: "ellipsis",
  227. whiteSpace:'nowrap',
  228. }}>{text}</div>
  229. </Tooltip>
  230. )
  231. }
  232. },
  233. {
  234. title: "订单负责人",
  235. dataIndex: "salesmanName",
  236. key: "salesmanName",
  237. },
  238. {
  239. title: "是否主项目",
  240. dataIndex: "main",
  241. key: "main",
  242. render: (text) => {
  243. return text == 0 ? "否" : "是";
  244. },
  245. },
  246. {
  247. title: "项目类别",
  248. dataIndex: "cname",
  249. key: "cname",
  250. },
  251. {
  252. title: "项目名称",
  253. dataIndex: "commodityName",
  254. key: "commodityName",
  255. },
  256. {
  257. title: "项目数量",
  258. dataIndex: "commodityQuantity",
  259. key: "commodityQuantity",
  260. render: (text, record) => {
  261. if (record.splitStatus == 1) {
  262. return (
  263. <span>
  264. {text}{" "}
  265. <Tag
  266. color="#108ee9"
  267. onClick={(e) => {
  268. e.stopPropagation();
  269. this.showRes(record);
  270. }}
  271. >
  272. 已拆
  273. </Tag>
  274. </span>
  275. );
  276. } else {
  277. return text;
  278. }
  279. },
  280. },
  281. {
  282. title: "服务市价",
  283. dataIndex: "commodityPrice",
  284. key: "commodityPrice",
  285. },
  286. {
  287. title: "证书编号",
  288. dataIndex: "certificateNumber",
  289. key: "certificateNumber",
  290. },
  291. {
  292. title: "项目状态",
  293. dataIndex: "projectStatus",
  294. key: "projectStatus",
  295. render: (text) => {
  296. return getProjectName(text);
  297. },
  298. },
  299. {
  300. title: "项目说明",
  301. dataIndex: "taskComment",
  302. key: "taskComment",
  303. },
  304. {
  305. title: "是否外包",
  306. dataIndex: "outsource",
  307. key: "outsource",
  308. render: (text) => {
  309. if (text == 0) {
  310. return "否";
  311. } else if (text == 1) {
  312. return "是";
  313. }
  314. },
  315. },
  316. // {
  317. // title: "外包(内部)公司",
  318. // dataIndex: "outsourceName",
  319. // key: "outsourceName",
  320. // },
  321. // {
  322. // title: "外包(内部)价格",
  323. // dataIndex: "outsourcePrice",
  324. // key: "outsourcePrice",
  325. // },
  326. ],
  327. qianColumns: [
  328. {
  329. title: "序号",
  330. dataIndex: "key",
  331. key: "key",
  332. },
  333. {
  334. title: "合同编号",
  335. dataIndex: "contractNo",
  336. key: "contractNo",
  337. },
  338. {
  339. title: "订单编号",
  340. dataIndex: "orderNo",
  341. key: "orderNo",
  342. },
  343. {
  344. title: "客户名称",
  345. dataIndex: "userName",
  346. key: "userName",
  347. render: text => {
  348. return (
  349. <Tooltip title={text}>
  350. <div style={{
  351. maxWidth:'150px',
  352. overflow:'hidden',
  353. textOverflow: "ellipsis",
  354. whiteSpace:'nowrap',
  355. }}>{text}</div>
  356. </Tooltip>
  357. )
  358. }
  359. },
  360. {
  361. title: "订单负责人",
  362. dataIndex: "salesmanName",
  363. key: "salesmanName",
  364. },
  365. {
  366. title: "订单部门",
  367. dataIndex: "depName",
  368. key: "depName",
  369. },
  370. {
  371. title: "订单状态",
  372. dataIndex: "orderStatus",
  373. key: "orderStatus",
  374. render: (text) => {
  375. return getNewOrderStatus(text);
  376. },
  377. },
  378. {
  379. title: "项目状态",
  380. dataIndex: "projectStatus",
  381. key: "projectStatus",
  382. render: (text) => {
  383. return getProjectName(text);
  384. },
  385. },
  386. {
  387. title: "签单金额",
  388. dataIndex: "totalAmount",
  389. key: "totalAmount",
  390. },
  391. {
  392. title: "结算状态",
  393. dataIndex: "liquidationStatus",
  394. key: "liquidationStatus",
  395. render: (text) => {
  396. return getLiquidationStatus(text);
  397. },
  398. },
  399. {
  400. title: "已收款",
  401. dataIndex: "settlementAmount",
  402. key: "settlementAmount",
  403. },
  404. {
  405. title: "欠款",
  406. dataIndex: "orderArrears",
  407. key: "orderArrears",
  408. },
  409. {
  410. title: "催收科目",
  411. dataIndex: "type",
  412. key: "type",
  413. render: (text) => {
  414. return "按时触发应收欠款";
  415. },
  416. },
  417. {
  418. title: "催款状态",
  419. dataIndex: "dunStatus",
  420. key: "dunStatus",
  421. render: (text) => {
  422. if (text == 0) {
  423. return "未启动";
  424. } else if (text == 1) {
  425. return "催款中";
  426. } else if (text == 2) {
  427. return "已完成";
  428. } else if (text == 3) {
  429. return "已停止";
  430. }
  431. },
  432. },
  433. {
  434. title: "催收启动时间",
  435. dataIndex: "startDate",
  436. key: "startDate",
  437. },
  438. ],
  439. cuiColumns: [
  440. {
  441. title: "序号",
  442. dataIndex: "key",
  443. key: "key",
  444. },
  445. {
  446. title: "合同编号",
  447. dataIndex: "contractNo",
  448. key: "contractNo",
  449. },
  450. {
  451. title: "订单编号",
  452. dataIndex: "orderNo",
  453. key: "orderNo",
  454. },
  455. {
  456. title: "客户名称",
  457. dataIndex: "userName",
  458. key: "userName",
  459. render: text => {
  460. return (
  461. <Tooltip title={text}>
  462. <div style={{
  463. maxWidth:'150px',
  464. overflow:'hidden',
  465. textOverflow: "ellipsis",
  466. whiteSpace:'nowrap',
  467. }}>{text}</div>
  468. </Tooltip>
  469. )
  470. }
  471. },
  472. {
  473. title: "订单负责人",
  474. dataIndex: "salesmanName",
  475. key: "salesmanName",
  476. },
  477. {
  478. title: "订单部门",
  479. dataIndex: "depName",
  480. key: "depName",
  481. },
  482. {
  483. title: "订单状态",
  484. dataIndex: "orderStatus",
  485. key: "orderStatus",
  486. render: (text) => {
  487. return getNewOrderStatus(text);
  488. },
  489. },
  490. {
  491. title: "项目状态",
  492. dataIndex: "projectStatus",
  493. key: "projectStatus",
  494. render: (text) => {
  495. return getProjectName(text);
  496. },
  497. },
  498. {
  499. title: "签单金额",
  500. dataIndex: "totalAmount",
  501. key: "totalAmount",
  502. },
  503. {
  504. title: "结算状态",
  505. dataIndex: "liquidationStatus",
  506. key: "liquidationStatus",
  507. render: (text) => {
  508. return getLiquidationStatus(text);
  509. },
  510. },
  511. {
  512. title: "已收款",
  513. dataIndex: "settlementAmount",
  514. key: "settlementAmount",
  515. },
  516. {
  517. title: "应收款",
  518. dataIndex: "accountsReceivable",
  519. key: "accountsReceivable",
  520. },
  521. {
  522. title: "催收科目",
  523. dataIndex: "dunSubject",
  524. key: "dunSubject",
  525. // render: text => {
  526. // return getjiedian(text);
  527. // }
  528. },
  529. {
  530. title: "催款状态",
  531. dataIndex: "dunStatus",
  532. key: "dunStatus",
  533. },
  534. {
  535. title: "催收启动时间",
  536. dataIndex: "startDate",
  537. key: "startDate",
  538. },
  539. ],
  540. timeColumns: [
  541. {
  542. title: "合同编号",
  543. dataIndex: "contractNo",
  544. key: "contractNo",
  545. },
  546. {
  547. title: "订单编号",
  548. dataIndex: "orderNo",
  549. key: "orderNo",
  550. },
  551. {
  552. title: "项目编号",
  553. dataIndex: "id",
  554. key: "id",
  555. render: (text, record) => {
  556. if (record.splitStatus == 2) {
  557. return <span>{record.splitSuper + "-" + record.splitId}</span>;
  558. } else {
  559. return text;
  560. }
  561. },
  562. },
  563. {
  564. title: "客户名称",
  565. dataIndex: "userName",
  566. key: "userName",
  567. render: text => {
  568. return (
  569. <Tooltip title={text}>
  570. <div style={{
  571. maxWidth:'150px',
  572. overflow:'hidden',
  573. textOverflow: "ellipsis",
  574. whiteSpace:'nowrap',
  575. }}>{text}</div>
  576. </Tooltip>
  577. )
  578. }
  579. },
  580. {
  581. title: "订单部门",
  582. dataIndex: "depName",
  583. key: "depName",
  584. },
  585. {
  586. title: "订单负责人",
  587. dataIndex: "salesmanName",
  588. key: "salesmanName",
  589. },
  590. {
  591. title: "项目类别",
  592. dataIndex: "cname",
  593. key: "cname",
  594. },
  595. {
  596. title: "项目名称",
  597. dataIndex: "taskName",
  598. key: "taskName",
  599. },
  600. {
  601. title: "项目负责人",
  602. dataIndex: "receiverName",
  603. key: "receiverName",
  604. },
  605. {
  606. title: "项目价格(万元)",
  607. dataIndex: "commodityPrice",
  608. key: "commodityPrice",
  609. },
  610. {
  611. title: "数量(个)",
  612. dataIndex: "commodityQuantity",
  613. key: "commodityQuantity",
  614. },
  615. {
  616. title: "任务状态",
  617. dataIndex: "taskStatus",
  618. key: "taskStatus",
  619. render: (text) => {
  620. return getTaskStatus(text);
  621. },
  622. },
  623. {
  624. title: "项目状态",
  625. dataIndex: "projectStatus",
  626. key: "projectStatus",
  627. render: (text) => {
  628. return getProjectName(text);
  629. },
  630. },
  631. {
  632. title: "工时",
  633. dataIndex: "hours",
  634. key: "hours",
  635. },
  636. {
  637. title: "是否外包",
  638. dataIndex: "outsource",
  639. key: "outsource",
  640. render: (text) => {
  641. if (text == 0) {
  642. return "否";
  643. } else if (text == 1) {
  644. return "是";
  645. }
  646. },
  647. },
  648. {
  649. title: "签单日期",
  650. dataIndex: "signTime",
  651. key: "signTime",
  652. },
  653. {
  654. title: "派单日期",
  655. dataIndex: "creteTime",
  656. key: "creteTime",
  657. },
  658. {
  659. title: "分配时间",
  660. dataIndex: "taskDistributionTime",
  661. key: "taskDistributionTime",
  662. },
  663. {
  664. title: "完成时间",
  665. dataIndex: "taskEndTime",
  666. key: "taskEndTime",
  667. },
  668. ],
  669. printColumns: [
  670. {
  671. title: "合同编号",
  672. dataIndex: "contractNo",
  673. key: "contractNo",
  674. },
  675. {
  676. title: "订单编号",
  677. dataIndex: "orderNo",
  678. key: "orderNo",
  679. // fixed: "left"
  680. },
  681. {
  682. title: "客户名称",
  683. dataIndex: "buyerName",
  684. key: "buyerName",
  685. render: text => {
  686. return (
  687. <Tooltip title={text}>
  688. <div style={{
  689. maxWidth:'150px',
  690. overflow:'hidden',
  691. textOverflow: "ellipsis",
  692. whiteSpace:'nowrap',
  693. }}>{text}</div>
  694. </Tooltip>
  695. )
  696. }
  697. },
  698. {
  699. title: "订单部门",
  700. dataIndex: "departmentName",
  701. key: "departmentName",
  702. },
  703. {
  704. title: "订单负责人",
  705. dataIndex: "sellerName",
  706. key: "sellerName",
  707. },
  708. {
  709. title: "签单日期",
  710. dataIndex: "signTime",
  711. key: "signTime",
  712. },
  713. {
  714. title: "下单日期",
  715. dataIndex: "createTime",
  716. key: "createTime",
  717. },
  718. {
  719. title: "签单金额(万元)",
  720. dataIndex: "signTotalAmount",
  721. key: "signTotalAmount",
  722. render: (text) => {
  723. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  724. },
  725. },
  726. {
  727. title: "开票金额(万元)",
  728. dataIndex: "invoiceAmount",
  729. key: "invoiceAmount",
  730. render: (text) => {
  731. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  732. },
  733. },
  734. {
  735. title: "已收款(万元)",
  736. dataIndex: "actuallyTotalAmount",
  737. key: "actuallyTotalAmount",
  738. render: (text) => {
  739. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  740. },
  741. },
  742. {
  743. title: "总成本(万元)",
  744. dataIndex: "costAmount",
  745. key: "costAmount",
  746. render: (text) => {
  747. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  748. }
  749. },
  750. {
  751. title: "已付成本(万元)",
  752. dataIndex: "paymentAmount",
  753. key: "paymentAmount",
  754. render: (text) => {
  755. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  756. },
  757. },
  758. {
  759. title: "最近收款(万元)",
  760. dataIndex: "finalReceivables",
  761. key: "finalReceivables",
  762. render: (text) => {
  763. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  764. },
  765. },
  766. {
  767. title: "最近收款时间",
  768. dataIndex: "finalReceivablesTime",
  769. key: "finalReceivablesTime",
  770. },
  771. {
  772. title: "结算状态",
  773. dataIndex: "liquidationStatus",
  774. key: "liquidationStatus",
  775. render: (text) => {
  776. return getLiquidationStatus(text);
  777. },
  778. },
  779. {
  780. title: "流程状态",
  781. dataIndex: "processStatus",
  782. key: "processStatus",
  783. render: (text) => {
  784. return getProcessStatus(text);
  785. },
  786. },
  787. {
  788. title: "特批状态",
  789. dataIndex: "approval",
  790. key: "approval",
  791. render: (text) => {
  792. return getApproval(text);
  793. },
  794. },
  795. ],
  796. columns: [
  797. {
  798. title: "合同编号",
  799. dataIndex: "contractNo",
  800. key: "contractNo",
  801. className: "title-table",
  802. fixed: "left",
  803. },
  804. {
  805. title: "客户名称",
  806. dataIndex: "buyerName",
  807. key: "buyerName",
  808. className: "title-table",
  809. fixed: "left",
  810. width:150,
  811. render: text => {
  812. return (
  813. <Tooltip title={text}>
  814. <div style={{
  815. maxWidth:'150px',
  816. overflow:'hidden',
  817. textOverflow: "ellipsis",
  818. whiteSpace:'nowrap',
  819. }}>{text}</div>
  820. </Tooltip>
  821. )
  822. }
  823. },
  824. {
  825. title: "订单编号",
  826. dataIndex: "orderNo",
  827. key: "orderNo",
  828. className: "title-table",
  829. // fixed: "left"
  830. },
  831. {
  832. title: "特批状态",
  833. dataIndex: "approval",
  834. key: "approval",
  835. className: "title-table",
  836. render: (text) => {
  837. if (text == 1 || text == 2) {
  838. return <Tag color="#f50">{getApproval(text)}</Tag>;
  839. }
  840. return getApproval(text);
  841. },
  842. },
  843. {
  844. title: "订单部门",
  845. dataIndex: "departmentName",
  846. key: "departmentName",
  847. className: "title-table",
  848. },
  849. {
  850. title: "订单负责人",
  851. dataIndex: "sellerName",
  852. key: "sellerName",
  853. className: "title-table",
  854. },
  855. {
  856. title: "财务负责人",
  857. dataIndex: "financeName",
  858. key: "financeName",
  859. className: "title-table",
  860. },
  861. {
  862. title: "签单日期",
  863. dataIndex: "signTime",
  864. key: "signTime",
  865. className: "title-table",
  866. },
  867. {
  868. title: "下单日期",
  869. dataIndex: "createTime",
  870. key: "createTime",
  871. className: "title-table",
  872. },
  873. {
  874. title: "签单金额(万元)",
  875. dataIndex: "signTotalAmount",
  876. key: "signTotalAmount",
  877. className: "title-table",
  878. render: (text) => {
  879. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  880. }
  881. },
  882. {
  883. title: "开票金额(万元)",
  884. dataIndex: "invoiceAmount",
  885. key: "invoiceAmount",
  886. className: "title-table",
  887. render: (text) => {
  888. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  889. }
  890. },
  891. {
  892. title: "已收款(万元)",
  893. dataIndex: "actuallyTotalAmount",
  894. key: "actuallyTotalAmount",
  895. className: "title-table",
  896. render: (text) => {
  897. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  898. }
  899. },
  900. {
  901. title: "应收款(万元)",
  902. dataIndex: "orderReceivables",
  903. key: "orderReceivables",
  904. className: "title-table",
  905. render: (text) => {
  906. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  907. }
  908. },
  909. {
  910. title: "欠款(万元)",
  911. dataIndex: "orderArrears",
  912. key: "orderArrears",
  913. className: "title-table",
  914. render: (text) => {
  915. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  916. }
  917. },
  918. {
  919. title: "总成本(万元)",
  920. dataIndex: "costAmount",
  921. key: "costAmount",
  922. className: "title-table",
  923. render: (text) => {
  924. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  925. }
  926. },
  927. {
  928. title: "已付成本(万元)",
  929. dataIndex: "paymentAmount",
  930. key: "paymentAmount",
  931. className: "title-table",
  932. render: (text) => {
  933. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  934. }
  935. },
  936. {
  937. title: "最近收款(万元)",
  938. dataIndex: "finalReceivables",
  939. key: "finalReceivables",
  940. className: "title-table",
  941. render: (text) => {
  942. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  943. }
  944. },
  945. {
  946. title: "最近收款时间",
  947. dataIndex: "finalReceivablesTime",
  948. key: "finalReceivablesTime",
  949. className: "title-table",
  950. },
  951. {
  952. title: "结算状态",
  953. dataIndex: "liquidationStatus",
  954. key: "liquidationStatus",
  955. className: "title-table",
  956. render: (text) => {
  957. return getLiquidationStatus(text);
  958. },
  959. },
  960. {
  961. title: "流程状态",
  962. dataIndex: "processStatus",
  963. key: "processStatus",
  964. className: "title-table",
  965. render: (text) => {
  966. return getProcessStatus(text);
  967. },
  968. },
  969. // {
  970. // title: '订单状态',
  971. // dataIndex: 'orderStatus',
  972. // key: 'orderStatus',
  973. // render: text => { return getNewOrderStatus(text)}
  974. // },
  975. {
  976. title: "操作",
  977. dataIndex: "caozuo",
  978. key: "caouzo",
  979. className: "title-table",
  980. render: (text, recard) => {
  981. return (
  982. <div>
  983. {/* {recard.liquidationStatus < 2 &&
  984. (recard.approval === 1 || recard.approval === 2) ? (
  985. <Button
  986. style={{ background: "rgb(192,192,192)" }}
  987. onClick={e => {
  988. e.stopPropagation(), this.evaluateX(recard);
  989. }}
  990. >
  991. 收款
  992. </Button>
  993. ) : (
  994. <Button
  995. type="primary"
  996. onClick={e => {
  997. e.stopPropagation(), this.evaluateX(recard);
  998. }}
  999. >
  1000. 收款
  1001. </Button>
  1002. )} */}
  1003. {recard.backStatus == 3 ? <Tag>已驳回</Tag> : ""}
  1004. {recard.processStatus == 3 ? (
  1005. <Button
  1006. type="primary"
  1007. onClick={(e) => {
  1008. // e.stopPropagation(), this.evaluateZ(recard);
  1009. e.stopPropagation(), this.checkRemark(recard);
  1010. }}
  1011. style={{ marginLeft: "5px" }}
  1012. >
  1013. 通过
  1014. </Button>
  1015. ) : (
  1016. ""
  1017. )}
  1018. {!(
  1019. recard.actuallyTotalAmount &&
  1020. Number(recard.actuallyTotalAmount) > 0
  1021. ) && (
  1022. <Button
  1023. type="danger"
  1024. style={{
  1025. marginLeft: "5px",
  1026. display:
  1027. recard.processStatus == 3 ? "inline-block" : "none",
  1028. }}
  1029. onClick={(e) => {
  1030. e.stopPropagation(), this.reject(recard);
  1031. }}
  1032. >
  1033. 驳回
  1034. </Button>
  1035. )}
  1036. {
  1037. // <Button
  1038. // type="primary"
  1039. // style={{ marginLeft: "5px" }}
  1040. // onClick={e => {
  1041. // e.stopPropagation(), this.evaluateY(recard, "财务专员");
  1042. // console.log(recard);
  1043. // }}
  1044. // >
  1045. // 转交
  1046. // </Button>
  1047. }
  1048. </div>
  1049. );
  1050. },
  1051. },
  1052. ],
  1053. dataSource: [],
  1054. searchTime: [],
  1055. columnsDate: [
  1056. {
  1057. title: "编号",
  1058. dataIndex: "id",
  1059. key: "id",
  1060. },
  1061. {
  1062. title: "订单编号",
  1063. dataIndex: "orderno",
  1064. key: "orderno",
  1065. },
  1066. {
  1067. title: "开票金额(万元)",
  1068. dataIndex: "amount",
  1069. key: "amount",
  1070. },
  1071. {
  1072. title: "申请时间",
  1073. dataIndex: "createTime",
  1074. key: "createTime",
  1075. },
  1076. {
  1077. title: "开票状态",
  1078. dataIndex: "status",
  1079. key: "status",
  1080. render: (text) => {
  1081. return getInvoiceStatus(text);
  1082. },
  1083. },
  1084. ],
  1085. waterlistDate: [
  1086. {
  1087. title: "订单编号",
  1088. dataIndex: "orderNo",
  1089. key: "orderNo",
  1090. },
  1091. {
  1092. title: "平台流水号",
  1093. dataIndex: "billNo",
  1094. key: "billNo",
  1095. // fixed: "left"
  1096. },
  1097. {
  1098. title: "收款金额(万元)",
  1099. dataIndex: "transactionAmount",
  1100. key: "transactionAmount",
  1101. },
  1102. {
  1103. title: "收款方",
  1104. dataIndex: "payeeName",
  1105. key: "payeeName",
  1106. },
  1107. {
  1108. title: "付款方",
  1109. dataIndex: "payerName",
  1110. key: "payerName",
  1111. },
  1112. {
  1113. title: "流水科目",
  1114. dataIndex: "transactionSubject",
  1115. key: "transactionSubject",
  1116. render: (text) => {
  1117. return getTransactionProject(text);
  1118. },
  1119. },
  1120. {
  1121. title: "收款类型",
  1122. dataIndex: "type",
  1123. key: "type",
  1124. },
  1125. {
  1126. title: "财务流水时间",
  1127. dataIndex: "financialPayTimes",
  1128. key: "financialPayTimes",
  1129. },
  1130. {
  1131. title: "财务流水号",
  1132. dataIndex: "financialPayNo",
  1133. key: "financialPayNo",
  1134. },
  1135. {
  1136. title: "订单负责人",
  1137. dataIndex: "saleName",
  1138. key: "saleName",
  1139. },
  1140. {
  1141. title: "创建时间",
  1142. dataIndex: "createTimes",
  1143. key: "createTimes",
  1144. },
  1145. {
  1146. title: "退款时间",
  1147. dataIndex: "refundTimes",
  1148. key: "refundTimes",
  1149. },
  1150. {
  1151. title: "删除时间",
  1152. dataIndex: "deleteTimes",
  1153. key: "deleteTimes",
  1154. },
  1155. {
  1156. title: "备注",
  1157. dataIndex: "remarks",
  1158. key: "remarks",
  1159. },
  1160. {
  1161. title: "流水状态",
  1162. dataIndex: "deleteSign",
  1163. key: "deleteSign",
  1164. render: (text, record) => {
  1165. if (!text) {
  1166. return (
  1167. <Popconfirm
  1168. title="是否删除?"
  1169. onConfirm={() => {
  1170. this.changeWater(record.billNo);
  1171. }}
  1172. okText="删除"
  1173. cancelText="不删除"
  1174. >
  1175. <Button>删除</Button>
  1176. </Popconfirm>
  1177. );
  1178. } else {
  1179. return <Tag>已删除</Tag>;
  1180. }
  1181. },
  1182. },
  1183. ],
  1184. waterData: [],
  1185. };
  1186. },
  1187. changeWater(billNo) {
  1188. this.setState({
  1189. loading: true,
  1190. });
  1191. $.ajax({
  1192. method: "get",
  1193. dataType: "json",
  1194. crossDomain: false,
  1195. url: globalConfig.context + "/api/admin/financial/deleteMyBill",
  1196. data: {
  1197. billNo,
  1198. },
  1199. success: function (data) {
  1200. let theArr = [];
  1201. if (data.error && data.error.length) {
  1202. message.warning(data.error[0].message);
  1203. } else {
  1204. message.warning("删除流水成功!");
  1205. this.waterData();
  1206. this.loadData();
  1207. }
  1208. }.bind(this),
  1209. }).always(
  1210. function () {
  1211. this.setState({
  1212. loading: false,
  1213. });
  1214. }.bind(this)
  1215. );
  1216. },
  1217. // 特批通过
  1218. evaluateZ(record) {
  1219. $.ajax({
  1220. method: "POST",
  1221. dataType: "json",
  1222. crossDomain: false,
  1223. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1224. data: {
  1225. orderNo: record.orderNo,
  1226. },
  1227. }).done(
  1228. function (data) {
  1229. if (!data.error.length) {
  1230. message.success("通过成功!");
  1231. this.setState({
  1232. loading: false,
  1233. });
  1234. this.loadData();
  1235. } else {
  1236. message.warning(data.error[0].message);
  1237. }
  1238. }.bind(this)
  1239. );
  1240. },
  1241. /* 收款 */
  1242. evaluateX(recard) {
  1243. this.state.assignDataX = recard;
  1244. this.setState({
  1245. assignVisibleX: true,
  1246. });
  1247. },
  1248. /* 转交 */
  1249. evaluateY(recard, nub) {
  1250. this.state.assignDataY = recard;
  1251. this.setState({
  1252. nub,
  1253. assignVisibleY: true,
  1254. });
  1255. },
  1256. /* 驳回 */
  1257. reject(recard) {
  1258. this.setState({
  1259. bohuiData: recard,
  1260. boHuiVisible: true,
  1261. content: "",
  1262. });
  1263. },
  1264. boHuiOk() {
  1265. this.setState({
  1266. boHuiVisible: false,
  1267. });
  1268. if (
  1269. this.state.pagination.current == this.state.totalPage &&
  1270. this.state.pagination.total % 10 == 1
  1271. ) {
  1272. this.loadData(this.state.page - 1);
  1273. } else {
  1274. this.loadData(this.state.page);
  1275. }
  1276. },
  1277. boHuiCancel() {
  1278. this.setState({
  1279. boHuiVisible: false,
  1280. });
  1281. },
  1282. componentWillMount() {
  1283. this.loadData();
  1284. this.departmentList();
  1285. },
  1286. tableRowClick(record) {
  1287. this.state.RowData = record;
  1288. this.setState({
  1289. showDesc: true,
  1290. });
  1291. },
  1292. closeDesc(e, s) {
  1293. this.state.showDesc = e;
  1294. if (s) {
  1295. this.loadData(this.state.page);
  1296. }
  1297. },
  1298. closeAssignX(e, s) {
  1299. this.state.assignDataX = {};
  1300. this.state.assignVisibleX = e;
  1301. if (s) {
  1302. this.loadData(this.state.page);
  1303. }
  1304. },
  1305. closeAssignY(e, s) {
  1306. this.state.assignDataY = {};
  1307. this.state.assignVisibleY = e;
  1308. if (s) {
  1309. this.loadData(this.state.page);
  1310. }
  1311. },
  1312. search() {
  1313. this.setState({
  1314. selectedRowKeys: []
  1315. })
  1316. this.loadData();
  1317. },
  1318. // 拆分详细
  1319. showRes(record) {
  1320. this.setState({
  1321. resVisible: true,
  1322. resRecord: record,
  1323. });
  1324. },
  1325. resCancel() {
  1326. this.setState({
  1327. resVisible: false,
  1328. });
  1329. },
  1330. reset() {
  1331. this.state.nameSearch = "";
  1332. this.state.releaseDate = [];
  1333. this.state.shouKuanDate = [];
  1334. this.state.orderNoSearch = "";
  1335. this.state.departmenttList = undefined;
  1336. this.state.amountStatus = undefined;
  1337. this.state.processStatus = [];
  1338. this.state.contractNoSearch = "";
  1339. this.state.liquidationStatus = [];
  1340. this.state.processStatusSearch = [];
  1341. this.state.contractNo = "";
  1342. this.loadData();
  1343. },
  1344. //驳回
  1345. boHuiSubmit(e) {
  1346. e.preventDefault();
  1347. if (!this.state.content) {
  1348. message.warning("请填写驳回原因");
  1349. return false;
  1350. }
  1351. this.setState({
  1352. loading: true,
  1353. });
  1354. $.ajax({
  1355. method: "POST",
  1356. dataType: "json",
  1357. crossDomain: false,
  1358. url: globalConfig.context + "/api/admin/financial/reject",
  1359. data: {
  1360. orderNo: this.state.bohuiData.orderNo,
  1361. reason: this.state.content,
  1362. },
  1363. }).done(
  1364. function (data) {
  1365. if (!data.error.length) {
  1366. message.success("驳回成功!");
  1367. this.setState({
  1368. loading: false,
  1369. });
  1370. this.boHuiOk();
  1371. } else {
  1372. message.warning(data.error[0].message);
  1373. }
  1374. }.bind(this)
  1375. );
  1376. },
  1377. searchSwitch() {
  1378. this.setState({
  1379. searchMore: !this.state.searchMore,
  1380. });
  1381. },
  1382. changeList(arr) {
  1383. const newArr = [];
  1384. this.state.columns.forEach((item) => {
  1385. arr.forEach((val) => {
  1386. if (val === item.title) {
  1387. newArr.push(item);
  1388. }
  1389. });
  1390. });
  1391. this.setState({
  1392. changeList: newArr,
  1393. });
  1394. },
  1395. callback(key) {
  1396. // console.log(key);
  1397. },
  1398. onSelectChange(selectedRowKeys) {
  1399. // for(var i=0; i<selectedRowKeys.length; i++){
  1400. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1401. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1402. // selectedRowKeys.splice(j,1);
  1403. // j--;
  1404. // }
  1405. // }
  1406. // }
  1407. this.setState({ selectedRowKeys });
  1408. },
  1409. inRecordCanl() {
  1410. this.setState({
  1411. bvisible: false,
  1412. });
  1413. },
  1414. inRecordData() {
  1415. this.setState({
  1416. loading: true,
  1417. });
  1418. $.ajax({
  1419. method: "get",
  1420. dataType: "json",
  1421. crossDomain: false,
  1422. url:
  1423. globalConfig.context +
  1424. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1425. data: {
  1426. orderNo: this.state.selectedRowKeys[0],
  1427. pageSize: 9999999,
  1428. },
  1429. success: function (data) {
  1430. let theArr = [];
  1431. let sum = 0;
  1432. if (!data.data) {
  1433. if (data.error && data.error.length) {
  1434. message.warning(data.error[0].message);
  1435. }
  1436. } else {
  1437. for (let i = 0; i < data.data.list.length; i++) {
  1438. let thisdata = data.data.list[i];
  1439. sum += parseFloat(thisdata.amount);
  1440. theArr.push({
  1441. id: thisdata.id,
  1442. orderno: thisdata.orderno, //订单编号
  1443. amount: thisdata.amount, //签单金额
  1444. createTime: thisdata.createTime, //流程状态
  1445. status: thisdata.status, //结算状态
  1446. rejectReason: thisdata.rejectReason,
  1447. });
  1448. }
  1449. }
  1450. this.setState({
  1451. recordData: theArr,
  1452. sum: sum.toFixed(6),
  1453. });
  1454. }.bind(this),
  1455. }).done(
  1456. function () {
  1457. this.setState({
  1458. loading: false,
  1459. });
  1460. }.bind(this)
  1461. );
  1462. },
  1463. waterData() {
  1464. this.state.data = [];
  1465. this.setState({
  1466. loading: true,
  1467. });
  1468. $.ajax({
  1469. method: "get",
  1470. dataType: "json",
  1471. crossDomain: false,
  1472. url: globalConfig.context + "/api/admin/financial/myBillList",
  1473. data: {
  1474. orderNo: this.state.selectedRowKeys[0],
  1475. pageSize: 9999999,
  1476. whoType: 1,
  1477. },
  1478. success: function (data) {
  1479. let theArr = [];
  1480. let waterSum = 0;
  1481. if (!data.data || !data.data.list) {
  1482. if (data.error && data.error.length) {
  1483. message.warning(data.error[0].message);
  1484. }
  1485. } else {
  1486. for (let i = 0; i < data.data.list.length; i++) {
  1487. let thisdata = data.data.list[i];
  1488. if (thisdata.deleteSign == 0) {
  1489. waterSum += parseFloat(thisdata.transactionAmount);
  1490. }
  1491. theArr.push({
  1492. key: i,
  1493. orderNo: thisdata.orderNo,
  1494. billNo: thisdata.billNo,
  1495. transactionAmount: thisdata.transactionAmount,
  1496. payeeName: thisdata.payeeName,
  1497. payerName: thisdata.payerName,
  1498. transactionSubject: thisdata.transactionSubject,
  1499. transactionChannel: thisdata.transactionChannel,
  1500. financialPayTimes: thisdata.financialPayTimes,
  1501. financialPayNo: thisdata.financialPayNo,
  1502. createrName: thisdata.createrName,
  1503. saleName: thisdata.saleName,
  1504. createTimes: thisdata.createTimes,
  1505. type:
  1506. thisdata.type == 0
  1507. ? "手工"
  1508. : thisdata.type == 1
  1509. ? "批量"
  1510. : "合同变更退款",
  1511. deleteSign: thisdata.deleteSign,
  1512. deleteTimes: thisdata.deleteTimes,
  1513. refundTimes: thisdata.refundTimes,
  1514. remarks: thisdata.remarks,
  1515. });
  1516. }
  1517. }
  1518. this.setState({
  1519. waterData: theArr,
  1520. waterSum: (Math.round(waterSum * 1000000) / 1000000).toFixed(6),
  1521. });
  1522. }.bind(this),
  1523. }).always(
  1524. function () {
  1525. this.setState({
  1526. loading: false,
  1527. });
  1528. }.bind(this)
  1529. );
  1530. },
  1531. waterCanl() {
  1532. this.setState({
  1533. cvisible: false,
  1534. });
  1535. },
  1536. exportKaip() {
  1537. window.location.href =
  1538. globalConfig.context +
  1539. "/api/admin/receivables/exportInvoice?" +
  1540. `orderNo=${this.state.selectedRowKeys}`;
  1541. },
  1542. exportAll() {
  1543. window.location.href =
  1544. globalConfig.context +
  1545. "/api/admin/receivables/exportReceivables?" +
  1546. `orderNo=${
  1547. this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1548. }&buyerName=${
  1549. this.state.nameSearch ? this.state.nameSearch : ""
  1550. }&departmentId=${
  1551. this.state.departmenttList ? this.state.departmenttList : ""
  1552. }&contractNo=${
  1553. this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1554. }&processStatus=${this.state.processStatusSearch}`;
  1555. },
  1556. exportWater() {
  1557. window.location.href =
  1558. globalConfig.context +
  1559. "/api/admin/receivables/exportMyBill?" +
  1560. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  1561. },
  1562. printAll() {
  1563. this.setState({
  1564. dvisible: true,
  1565. });
  1566. this.loadData(1, 9999999);
  1567. },
  1568. timeData() {
  1569. this.setState({
  1570. loading: true,
  1571. });
  1572. $.ajax({
  1573. method: "get",
  1574. dataType: "json",
  1575. crossDomain: false,
  1576. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  1577. data: {
  1578. orderNo: this.state.selectedRowKeys[0],
  1579. pageSize: 9999999,
  1580. },
  1581. success: function (data) {
  1582. let theArr = [];
  1583. if (!data.data || !data.data.list) {
  1584. if (data.error && data.error.length) {
  1585. message.warning(data.error[0].message);
  1586. }
  1587. } else {
  1588. for (let i = 0; i < data.data.list.length; i++) {
  1589. let thisdata = data.data.list[i];
  1590. theArr.push({
  1591. key: i + 1,
  1592. id: thisdata.id, //ID
  1593. orderNo: thisdata.orderNo, //订单编号
  1594. taskName: thisdata.taskName, //任务名称
  1595. userName: thisdata.userName, //客户名称
  1596. cname: thisdata.cname, //项目品类
  1597. taskStatus: thisdata.taskStatus, //任务状态
  1598. receiverName: thisdata.receiverName, //负责人
  1599. hours: thisdata.hours, //任务工时
  1600. depName: thisdata.depName, //派单公司
  1601. contractNo: thisdata.contractNo,
  1602. signTime: thisdata.signTime,
  1603. creteTime: thisdata.creteTime,
  1604. projectStatus: thisdata.projectStatus,
  1605. commodityPrice: thisdata.commodityPrice, //价格
  1606. commodityQuantity: thisdata.commodityQuantity, //数量
  1607. salesmanName: thisdata.salesmanName, //订单负责人
  1608. taskDistributionTime: thisdata.taskDistributionTime,
  1609. taskEndTime: thisdata.taskEndTime,
  1610. outsource: thisdata.outsource,
  1611. splitStatus: thisdata.splitStatus,
  1612. splitSuper: thisdata.splitSuper,
  1613. splitId: thisdata.splitId,
  1614. });
  1615. }
  1616. }
  1617. this.setState({
  1618. timeDataList: theArr,
  1619. });
  1620. }.bind(this),
  1621. }).always(
  1622. function () {
  1623. this.setState({
  1624. loading: false,
  1625. });
  1626. }.bind(this)
  1627. );
  1628. },
  1629. exportTime() {
  1630. const data = {
  1631. orderNo: this.state.selectedRowKeys[0],
  1632. pageSize: 9999999,
  1633. };
  1634. window.location.href =
  1635. globalConfig.context +
  1636. "/api/admin/orderProject/exportMyTaskList?" +
  1637. $.param(data);
  1638. },
  1639. exportPro() {
  1640. const data = {
  1641. orderNo: this.state.selectedRowKeys[0],
  1642. };
  1643. window.location.href =
  1644. globalConfig.context +
  1645. "/api/admin/newOrder/exportOrderTaskData?" +
  1646. $.param(data);
  1647. },
  1648. exportCui() {
  1649. var data = {
  1650. orderNo: this.state.selectedRowKeys[0]
  1651. ? this.state.selectedRowKeys[0]
  1652. : undefined, //订单编号
  1653. // specially: 1,
  1654. pageSize: 9999999,
  1655. };
  1656. window.location.href =
  1657. globalConfig.context +
  1658. "/api/admin/newOrder/exportOrderDunData?" +
  1659. $.param(data);
  1660. },
  1661. cuiData() {
  1662. this.setState({
  1663. loading: true,
  1664. });
  1665. $.ajax({
  1666. method: "get",
  1667. dataType: "json",
  1668. crossDomain: false,
  1669. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  1670. data: {
  1671. orderNo: this.state.selectedRowKeys[0],
  1672. pageSize: 9999999,
  1673. },
  1674. success: function (data) {
  1675. let theArr = [];
  1676. if (!data.data || !data.data.list) {
  1677. if (data.error && data.error.length) {
  1678. message.warning(data.error[0].message);
  1679. }
  1680. } else {
  1681. for (let i = 0; i < data.data.list.length; i++) {
  1682. let thisdata = data.data.list[i];
  1683. theArr.push({
  1684. key: i + 1,
  1685. orderNo: thisdata.orderNo,
  1686. contractNo: thisdata.contractNo,
  1687. userName: thisdata.userName,
  1688. buyerName: thisdata.buyerName,
  1689. departmentName: thisdata.departmentName,
  1690. salesmanName: thisdata.salesmanName,
  1691. depName: thisdata.depName,
  1692. orderStatus: thisdata.orderStatus,
  1693. projectStatus: thisdata.projectStatus,
  1694. totalAmount: thisdata.totalAmount,
  1695. liquidationStatus: thisdata.liquidationStatus,
  1696. settlementAmount: thisdata.settlementAmount,
  1697. accountsReceivable: thisdata.accountsReceivable,
  1698. dunSubject: thisdata.dunSubject,
  1699. startDate: thisdata.startDate,
  1700. taskStatus: thisdata.taskStatus,
  1701. cname: thisdata.cname,
  1702. id: thisdata.id,
  1703. taskName: thisdata.taskName,
  1704. hours: thisdata.hours,
  1705. taskDistributionTime: thisdata.taskDistributionTime,
  1706. taskEndTime: thisdata.taskEndTime,
  1707. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  1708. });
  1709. }
  1710. }
  1711. this.setState({
  1712. cuiDataList: theArr,
  1713. });
  1714. }.bind(this),
  1715. }).always(
  1716. function () {
  1717. this.setState({
  1718. loading: false,
  1719. });
  1720. }.bind(this)
  1721. );
  1722. },
  1723. cuiTabChange(index) {
  1724. this.setState({
  1725. cuiTabKey: index,
  1726. });
  1727. if (index == 2) {
  1728. this.setState({
  1729. loading: true,
  1730. });
  1731. $.ajax({
  1732. method: "get",
  1733. dataType: "json",
  1734. crossDomain: false,
  1735. url: globalConfig.context + "/api/admin/newOrder/arrearsDunList",
  1736. data: {
  1737. orderNo: this.state.selectedRowKeys[0],
  1738. pageSize: 9999999,
  1739. },
  1740. success: function (data) {
  1741. let theArr = [];
  1742. if (data.error.length || data.data.list == "") {
  1743. if (data.error && data.error.length) {
  1744. message.warning(data.error[0].message);
  1745. }
  1746. } else {
  1747. for (let i = 0; i < data.data.list.length; i++) {
  1748. let thisdata = data.data.list[i];
  1749. let obj = thisdata;
  1750. obj.key = i;
  1751. theArr.push(obj);
  1752. }
  1753. }
  1754. this.setState({
  1755. qianDataList: theArr,
  1756. });
  1757. }.bind(this),
  1758. }).always(
  1759. function () {
  1760. this.setState({
  1761. loading: false,
  1762. });
  1763. }.bind(this)
  1764. );
  1765. }
  1766. },
  1767. proData() {
  1768. this.setState({
  1769. loading: true,
  1770. });
  1771. $.ajax({
  1772. method: "get",
  1773. dataType: "json",
  1774. crossDomain: false,
  1775. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  1776. data: {
  1777. orderNo: this.state.selectedRowKeys[0],
  1778. pageSize: 9999999,
  1779. },
  1780. success: function (data) {
  1781. let theArr = [];
  1782. let totalWaibao = 0;
  1783. if (!data.data) {
  1784. if (data.error && data.error.length) {
  1785. message.warning(data.error[0].message);
  1786. }
  1787. } else {
  1788. for (let i = 0; i < data.data.length; i++) {
  1789. let thisdata = data.data[i];
  1790. totalWaibao += thisdata.outsourcePrice;
  1791. thisdata.key = i + 1;
  1792. theArr.push(thisdata);
  1793. }
  1794. }
  1795. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  1796. this.setState({
  1797. proDataList: theArr,
  1798. totalWaibao,
  1799. });
  1800. }.bind(this),
  1801. }).always(
  1802. function () {
  1803. this.setState({
  1804. loading: false,
  1805. });
  1806. }.bind(this)
  1807. );
  1808. },
  1809. checkRemark(record) {
  1810. this.setState({
  1811. checkVisible: true,
  1812. checkOrderNo: record.orderNo,
  1813. });
  1814. },
  1815. checkOk() {
  1816. if (this.state.checkData == "" || this.state.checkData == undefined) {
  1817. message.warning("请填写审核内容");
  1818. return;
  1819. }
  1820. this.setState({
  1821. loading: true,
  1822. });
  1823. let ajaxObj = $.ajax({
  1824. method: "post",
  1825. dataType: "json",
  1826. crossDomain: false,
  1827. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1828. data: {
  1829. orderNo: this.state.checkOrderNo,
  1830. remarks: this.state.checkData,
  1831. },
  1832. success: function (data) {
  1833. let theArr = [];
  1834. if (!data.data) {
  1835. if (data.error && data.error.length) {
  1836. message.warning(data.error[0].message);
  1837. }
  1838. } else {
  1839. message.success("通过成功!");
  1840. this.loadData();
  1841. this.setState({
  1842. checkVisible: false,
  1843. checkData: "",
  1844. });
  1845. }
  1846. }.bind(this),
  1847. }).always(
  1848. function () {
  1849. this.setState({
  1850. loading: false,
  1851. financeApprovalAjaxObj: null
  1852. });
  1853. }.bind(this)
  1854. );
  1855. this.setState({
  1856. financeApprovalAjaxObj: ajaxObj
  1857. })
  1858. },
  1859. tableRowClickPro(record) {
  1860. this.setState({
  1861. pvisible: true,
  1862. record,
  1863. });
  1864. },
  1865. kaiPiaoData(record) {
  1866. this.setState({
  1867. avisible: true,
  1868. });
  1869. this.invoiceData(record.id)
  1870. },
  1871. invoiceData(id) {
  1872. this.setState({
  1873. loading: true,
  1874. });
  1875. $.ajax({
  1876. method: "get",
  1877. dataType: "json",
  1878. crossDomain: false,
  1879. url:
  1880. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1881. data: {
  1882. id,
  1883. },
  1884. success: function (data) {
  1885. let thisdata = data.data;
  1886. let obj = {
  1887. contractNo: thisdata.contractNo,
  1888. orderNo: thisdata.orderNo,
  1889. approval: thisdata.approval,
  1890. type: thisdata.type,
  1891. status: thisdata.status,
  1892. remarks: thisdata.remarks,
  1893. invoiceType: thisdata.invoiceType,
  1894. unitName: thisdata.unitName,
  1895. taxNumber: thisdata.taxNumber,
  1896. amount: thisdata.amount,
  1897. banks: thisdata.banks,
  1898. content: thisdata.content,
  1899. unitAddress: thisdata.unitAddress,
  1900. invoiceRemarks: thisdata.invoiceRemarks,
  1901. unitMobile: thisdata.unitMobile,
  1902. post: thisdata.post,
  1903. addressee: thisdata.addressee,
  1904. addresseeMobile: thisdata.addresseeMobile,
  1905. addresseeProvince: thisdata.addresseeProvince,
  1906. addresseeCity: thisdata.addresseeCity,
  1907. addresseeArea: thisdata.addresseeArea,
  1908. alreadyAmount: thisdata.alreadyAmount,
  1909. recipientAddress: thisdata.recipientAddress,
  1910. orgCodeUrl: thisdata.voucherUrl
  1911. ? splitUrl(
  1912. thisdata.voucherUrl,
  1913. ",",
  1914. globalConfig.avatarHost + "/upload"
  1915. )
  1916. : [],
  1917. };
  1918. this.setState({
  1919. modalData: obj,
  1920. });
  1921. }.bind(this),
  1922. }).done(
  1923. function () {
  1924. this.setState({
  1925. loading: false,
  1926. });
  1927. }.bind(this)
  1928. );
  1929. },
  1930. visitCancels() {
  1931. this.setState({
  1932. avisible: false
  1933. })
  1934. },
  1935. render() {
  1936. const formItemLayout = {
  1937. labelCol: { span: 8 },
  1938. wrapperCol: { span: 14 },
  1939. };
  1940. const { RangePicker } = DatePicker;
  1941. var departmentArr = this.state.departmentArr || [];
  1942. const { loading, selectedRowKeys, visible } = this.state;
  1943. const rowSelection = {
  1944. selectedRowKeys,
  1945. onChange: this.onSelectChange,
  1946. hideDefaultSelections: true,
  1947. type: "radio",
  1948. };
  1949. return (
  1950. <div className="user-content">
  1951. {this.state.resVisible ? (
  1952. <ResolutionDetail
  1953. cancel={this.resCancel}
  1954. detail={this.state.resRecord}
  1955. visible={this.state.resVisible}
  1956. id={this.state.resRecord.orderNo}
  1957. />
  1958. ) : (
  1959. ""
  1960. )}
  1961. <div className="content-title" style={{ marginBottom: 10 }}>
  1962. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1963. </div>
  1964. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1965. <TabPane tab="更改表格显示数据" key="1">
  1966. <div style={{ marginLeft: 10 }}>
  1967. <ChooseList
  1968. columns={this.state.columns}
  1969. changeFn={this.changeList}
  1970. changeList={this.state.changeList}
  1971. top={55}
  1972. margin={11}
  1973. />
  1974. </div>
  1975. </TabPane>
  1976. <TabPane tab="搜索" key="2">
  1977. <div className="user-search" style={{ marginLeft: 10 }}>
  1978. <Input
  1979. placeholder="订单编号"
  1980. value={this.state.orderNoSearch}
  1981. onChange={(e) => {
  1982. this.setState({ orderNoSearch: e.target.value });
  1983. }}
  1984. />
  1985. <Input
  1986. placeholder="客户名称"
  1987. value={this.state.nameSearch}
  1988. onChange={(e) => {
  1989. this.setState({ nameSearch: e.target.value });
  1990. }}
  1991. />
  1992. <Select
  1993. placeholder="订单部门"
  1994. style={{ width: 120, marginRight: 10 }}
  1995. value={this.state.departmenttList}
  1996. onChange={(e) => {
  1997. this.setState({ departmenttList: e });
  1998. }}
  1999. >
  2000. {departmentArr.map(function (item) {
  2001. return (
  2002. <Select.Option key={item.id}>{item.name}</Select.Option>
  2003. );
  2004. })}
  2005. </Select>
  2006. <Input
  2007. placeholder="合同编号"
  2008. value={this.state.contractNoSearch}
  2009. onChange={(e) => {
  2010. this.setState({
  2011. contractNoSearch: e.target.value,
  2012. });
  2013. }}
  2014. />
  2015. <Select
  2016. placeholder="流程状态"
  2017. onChange={(e) => {
  2018. this.setState({ processStatusSearch: e });
  2019. }}
  2020. style={{ width: 120, marginRight: 5 }}
  2021. value={this.state.processStatusSearch}
  2022. >
  2023. <Option value="3">未分配</Option>
  2024. <Option value="4">已分配</Option>
  2025. <Option value="9">已驳回</Option>
  2026. </Select>
  2027. <Select
  2028. placeholder="结算状态"
  2029. onChange={(e) => {
  2030. this.setState({ liquidationStatus: e });
  2031. }}
  2032. style={{ width: 120, marginRight: 5 }}
  2033. value={this.state.liquidationStatus}
  2034. >
  2035. <Option value="0">首付待付清</Option>
  2036. <Option value="1">尾款待付清</Option>
  2037. <Option value="2">已付清</Option>
  2038. </Select>
  2039. <Select
  2040. style={{ width: 120 }}
  2041. placeholder="签单金额"
  2042. value={this.state.amountStatus}
  2043. onChange={(e) => {
  2044. this.setState({
  2045. amountStatus: e,
  2046. });
  2047. }}
  2048. >
  2049. <Option value="0">10万元以下</Option>
  2050. <Option value="1">10~20万元</Option>
  2051. <Option value="2">20~30万元</Option>
  2052. <Option value="3">30~40万元</Option>
  2053. <Option value="4">40万元以上</Option>
  2054. </Select>
  2055. <span style={{}}>下单日期:</span>
  2056. <RangePicker
  2057. style={{ width: 170 }}
  2058. value={[
  2059. this.state.releaseDate[0]
  2060. ? moment(this.state.releaseDate[0])
  2061. : null,
  2062. this.state.releaseDate[1]
  2063. ? moment(this.state.releaseDate[1])
  2064. : null,
  2065. ]}
  2066. onChange={(data, dataString) => {
  2067. this.setState({ releaseDate: dataString });
  2068. }}
  2069. />
  2070. <span style={{}}>最近收款:</span>
  2071. <RangePicker
  2072. style={{ width: 170 }}
  2073. value={[
  2074. this.state.shouKuanDate[0]
  2075. ? moment(this.state.shouKuanDate[0])
  2076. : null,
  2077. this.state.shouKuanDate[1]
  2078. ? moment(this.state.shouKuanDate[1])
  2079. : null,
  2080. ]}
  2081. onChange={(data, dataString) => {
  2082. this.setState({ shouKuanDate: dataString });
  2083. }}
  2084. />
  2085. <Button
  2086. type="primary"
  2087. onClick={this.search}
  2088. style={{ marginLeft: 10 }}
  2089. disabled={this.state.loadingA ? true : false}
  2090. >
  2091. 搜索
  2092. </Button>
  2093. <Button onClick={this.reset}>重置</Button>
  2094. </div>
  2095. </TabPane>
  2096. <TabPane tab="打印" key="3">
  2097. <Button
  2098. type="primary"
  2099. style={{ margin: "11px 0px 10px 10px" }}
  2100. onClick={this.printAll}
  2101. disabled={!this.state.dataSource.length}
  2102. >
  2103. 打印所有列表信息
  2104. </Button>
  2105. <Button
  2106. type="primary"
  2107. disabled={this.state.selectedRowKeys.length != 1}
  2108. style={{ margin: "11px 0px 10px 10px" }}
  2109. onClick={() => {
  2110. this.inRecordData();
  2111. this.setState({
  2112. bvisible: true,
  2113. });
  2114. }}
  2115. >
  2116. 打印开票详情
  2117. </Button>
  2118. <Button
  2119. type="primary"
  2120. disabled={this.state.selectedRowKeys.length != 1}
  2121. style={{ margin: "11px 0px 10px 10px" }}
  2122. onClick={() => {
  2123. this.waterData();
  2124. this.setState({
  2125. cvisible: true,
  2126. });
  2127. }}
  2128. >
  2129. 打印收款流水
  2130. </Button>
  2131. <Button
  2132. type="primary"
  2133. disabled={this.state.selectedRowKeys.length != 1}
  2134. style={{ margin: "11px 0px 10px 10px" }}
  2135. onClick={() => {
  2136. this.timeData();
  2137. this.setState({
  2138. timeVisible: true,
  2139. });
  2140. }}
  2141. >
  2142. 打印工时信息
  2143. </Button>
  2144. <Button
  2145. type="primary"
  2146. disabled={this.state.selectedRowKeys.length != 1}
  2147. style={{ margin: "11px 0px 10px 10px" }}
  2148. onClick={() => {
  2149. this.cuiData();
  2150. this.setState({
  2151. cuiVisible: true,
  2152. });
  2153. }}
  2154. >
  2155. 打印催款信息
  2156. </Button>
  2157. <Button
  2158. type="primary"
  2159. disabled={this.state.selectedRowKeys.length != 1}
  2160. style={{ margin: "11px 0px 10px 10px" }}
  2161. onClick={() => {
  2162. this.proData();
  2163. this.setState({
  2164. proVisible: true,
  2165. });
  2166. }}
  2167. >
  2168. 打印项目进度
  2169. </Button>
  2170. </TabPane>
  2171. <TabPane tab="导出Excel" key="4">
  2172. <Button
  2173. type="primary"
  2174. style={{ margin: "11px 0px 10px 10px" }}
  2175. onClick={this.exportAll}
  2176. >
  2177. 导出当前列表
  2178. </Button>
  2179. <Button
  2180. type="primary"
  2181. disabled={this.state.selectedRowKeys.length != 1}
  2182. style={{ margin: "11px 0px 10px 10px" }}
  2183. onClick={this.exportKaip}
  2184. >
  2185. 导出所选开票详情
  2186. </Button>
  2187. <Button
  2188. type="primary"
  2189. disabled={this.state.selectedRowKeys.length != 1}
  2190. style={{ margin: "11px 0px 10px 10px" }}
  2191. onClick={this.exportWater}
  2192. >
  2193. 导出所选收款详情流水
  2194. </Button>
  2195. <Button
  2196. type="primary"
  2197. disabled={this.state.selectedRowKeys.length != 1}
  2198. style={{ margin: "11px 0px 10px 10px" }}
  2199. onClick={this.exportTime}
  2200. >
  2201. 导出所选工时信息
  2202. </Button>
  2203. <Button
  2204. type="primary"
  2205. disabled={this.state.selectedRowKeys.length != 1}
  2206. style={{ margin: "11px 0px 10px 10px" }}
  2207. onClick={this.exportCui}
  2208. >
  2209. 导出催款信息
  2210. </Button>
  2211. <Button
  2212. type="primary"
  2213. disabled={this.state.selectedRowKeys.length != 1}
  2214. style={{ margin: "11px 0px 10px 10px" }}
  2215. onClick={this.exportPro}
  2216. >
  2217. 导出项目进度
  2218. </Button>
  2219. </TabPane>
  2220. <TabPane tab="查看" key="5">
  2221. <Button
  2222. type="primary"
  2223. disabled={this.state.selectedRowKeys.length != 1}
  2224. style={{ margin: "11px 0px 10px 10px" }}
  2225. onClick={() => {
  2226. this.inRecordData();
  2227. this.setState({
  2228. bvisible: true,
  2229. });
  2230. }}
  2231. >
  2232. 查看开票详情
  2233. </Button>
  2234. <Button
  2235. type="primary"
  2236. disabled={this.state.selectedRowKeys.length != 1}
  2237. style={{ margin: "11px 0px 10px 10px" }}
  2238. onClick={() => {
  2239. this.waterData();
  2240. this.setState({
  2241. cvisible: true,
  2242. });
  2243. }}
  2244. >
  2245. 详情收款流水
  2246. </Button>
  2247. <Button
  2248. type="primary"
  2249. disabled={this.state.selectedRowKeys.length != 1}
  2250. style={{ margin: "11px 0px 10px 10px" }}
  2251. onClick={() => {
  2252. this.timeData();
  2253. this.setState({
  2254. timeVisible: true,
  2255. });
  2256. }}
  2257. >
  2258. 工时信息
  2259. </Button>
  2260. <Button
  2261. type="primary"
  2262. disabled={this.state.selectedRowKeys.length != 1}
  2263. style={{ margin: "11px 0px 10px 10px" }}
  2264. onClick={() => {
  2265. this.cuiData();
  2266. this.setState({
  2267. cuiVisible: true,
  2268. });
  2269. }}
  2270. >
  2271. 催款信息
  2272. </Button>
  2273. <Button
  2274. type="primary"
  2275. disabled={this.state.selectedRowKeys.length != 1}
  2276. style={{ margin: "11px 0px 10px 10px" }}
  2277. onClick={() => {
  2278. this.proData();
  2279. this.setState({
  2280. proVisible: true,
  2281. });
  2282. }}
  2283. >
  2284. 项目进度
  2285. </Button>
  2286. </TabPane>
  2287. {/* <TabPane tab="批量操作" key="6">
  2288. <Button
  2289. type="primary"
  2290. disabled={this.state.selectedRowKeys.length == 0}
  2291. style={{ margin: "0px 0px 10px 10px" }}
  2292. onClick={e => {
  2293. e.stopPropagation(),
  2294. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  2295. }}
  2296. >
  2297. 转交
  2298. </Button>
  2299. </TabPane> */}
  2300. </Tabs>
  2301. <div className="patent-table">
  2302. <Spin spinning={this.state.loadingA}>
  2303. <Table
  2304. bordered
  2305. columns={
  2306. this.state.changeList == undefined
  2307. ? this.state.columns
  2308. : this.state.changeList
  2309. }
  2310. dataSource={this.state.dataSource}
  2311. rowSelection={rowSelection}
  2312. scroll={{ x: "max-content", y: 0 }}
  2313. pagination={this.state.pagination}
  2314. onRowDoubleClick={this.tableRowClick.bind(this)}
  2315. size="small"
  2316. />
  2317. </Spin>
  2318. <p
  2319. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  2320. >
  2321. {
  2322. <span style={{ marginRight: 10 }}>
  2323. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  2324. </span>
  2325. }
  2326. {
  2327. <span>
  2328. {`合同额总计(万元):${
  2329. this.state.totalHui ? this.state.totalHui : "0"
  2330. }`}
  2331. </span>
  2332. }
  2333. </p>
  2334. </div>
  2335. <Assign
  2336. title="任务"
  2337. selApi={"/api/admin/newOrder/updateFinance"}
  2338. data={this.state.assignDataY}
  2339. showDesc={this.state.assignVisibleY}
  2340. closeDesc={this.closeAssignY.bind(this)}
  2341. // fenpaiData={8}
  2342. specially={0}
  2343. roleName={this.state.nub}
  2344. requestMethod={"get"}
  2345. />
  2346. <OrderDesc
  2347. data={this.state.RowData}
  2348. showDesc={this.state.showDesc}
  2349. closeDesc={this.closeDesc.bind(this)}
  2350. />
  2351. <Receivable
  2352. title="收款记录"
  2353. api="/api/admin/financial/addReceiptsFlow"
  2354. data={this.state.assignDataX}
  2355. showDesc={this.state.assignVisibleX}
  2356. closeDesc={this.closeAssignX.bind(this)}
  2357. />
  2358. <Modal
  2359. visible={this.state.boHuiVisible}
  2360. width="400px"
  2361. title="驳回备注"
  2362. footer=""
  2363. onOk={this.boHuiOk}
  2364. onCancel={this.boHuiCancel}
  2365. >
  2366. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  2367. <Spin spinning={this.state.loading}>
  2368. <FormItem
  2369. labelCol={{ span: 5 }}
  2370. wrapperCol={{ span: 16 }}
  2371. label={
  2372. <span>
  2373. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  2374. </span>
  2375. }
  2376. >
  2377. <Input
  2378. type="textarea"
  2379. rows={4}
  2380. placeholder="请输入驳回原因"
  2381. value={this.state.content}
  2382. onChange={(e) => {
  2383. this.setState({ content: e.target.value });
  2384. }}
  2385. />
  2386. </FormItem>
  2387. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  2388. <Button
  2389. type="primary"
  2390. htmlType="submit"
  2391. style={{ marginRight: 20 }}
  2392. >
  2393. 驳回
  2394. </Button>
  2395. <Button
  2396. type="default"
  2397. onClick={() => {
  2398. this.boHuiCancel();
  2399. }}
  2400. >
  2401. 取消
  2402. </Button>
  2403. </FormItem>
  2404. </Spin>
  2405. </Form>
  2406. </Modal>
  2407. <Modal
  2408. visible={this.state.bvisible}
  2409. footer=""
  2410. title="开票历史记录"
  2411. className="admin-desc-content"
  2412. width="900px"
  2413. onCancel={this.inRecordCanl}
  2414. >
  2415. <Spin spinning={this.state.loading}>
  2416. <div
  2417. className="patent-table"
  2418. ref={(e) => {
  2419. this.refs.kaiPiao = e;
  2420. }}
  2421. >
  2422. <Table
  2423. columns={this.state.columnsDate}
  2424. dataSource={this.state.recordData}
  2425. onRowClick={this.kaiPiaoData}
  2426. pagination={false}
  2427. bordered
  2428. size="small"
  2429. />
  2430. <div className="clearfix" style={{ marginTop: "20px" }}>
  2431. <FormItem
  2432. className="half-item"
  2433. {...formItemLayout}
  2434. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2435. >
  2436. <span>{this.state.sum + "(万元)"}</span>
  2437. </FormItem>
  2438. </div>
  2439. <ReactToPrint
  2440. trigger={() => (
  2441. <Button
  2442. type="primary"
  2443. style={{
  2444. float: "right",
  2445. // marginTop: 10,
  2446. position: "absolute",
  2447. top: -54,
  2448. right: 30,
  2449. }}
  2450. >
  2451. 打印
  2452. </Button>
  2453. )}
  2454. content={() => this.refs.kaiPiao}
  2455. />
  2456. </div>
  2457. </Spin>
  2458. </Modal>
  2459. <Modal
  2460. visible={this.state.cvisible}
  2461. footer=""
  2462. title="详细收款流水"
  2463. className="admin-desc-content"
  2464. width="1300px"
  2465. onCancel={this.waterCanl}
  2466. >
  2467. <Spin spinning={this.state.loading}>
  2468. <div
  2469. className="patent-table"
  2470. ref={(e) => {
  2471. this.refs.shouKuan = e;
  2472. }}
  2473. >
  2474. <Table
  2475. columns={this.state.waterlistDate}
  2476. dataSource={this.state.waterData}
  2477. pagination={false}
  2478. scroll={{ x: "max-content", y: 0 }}
  2479. bordered
  2480. size="small"
  2481. />
  2482. <div className="clearfix" style={{ marginTop: "20px" }}>
  2483. <FormItem
  2484. className="half-item"
  2485. {...formItemLayout}
  2486. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  2487. >
  2488. <span>{this.state.waterSum + "(万元)"}</span>
  2489. </FormItem>
  2490. </div>
  2491. <ReactToPrint
  2492. trigger={() => (
  2493. <Button
  2494. type="primary"
  2495. style={{
  2496. float: "right",
  2497. position: "absolute",
  2498. top: -54,
  2499. right: 30,
  2500. }}
  2501. >
  2502. 打印
  2503. </Button>
  2504. )}
  2505. content={() => this.refs.shouKuan}
  2506. />
  2507. </div>
  2508. </Spin>
  2509. </Modal>
  2510. <Modal
  2511. visible={this.state.dvisible}
  2512. footer=""
  2513. title="所有列表信息"
  2514. className="admin-desc-content"
  2515. width="1300px"
  2516. onCancel={() => {
  2517. this.loadData();
  2518. this.setState({
  2519. dvisible: false,
  2520. });
  2521. }}
  2522. >
  2523. <Spin spinning={this.state.loading}>
  2524. <div
  2525. className="patent-table"
  2526. style={{
  2527. // width: 900,
  2528. // position: "relative",
  2529. // left: "50%",
  2530. // transform: "translate(-50%)",
  2531. padding: "25px 0 30px 30px",
  2532. }}
  2533. ref={(e) => {
  2534. this.refs.all = e;
  2535. }}
  2536. >
  2537. <Table
  2538. columns={this.state.printColumns}
  2539. dataSource={this.state.dataSource}
  2540. pagination={false}
  2541. bordered
  2542. size="small"
  2543. />
  2544. </div>
  2545. </Spin>
  2546. <ReactToPrint
  2547. trigger={() => (
  2548. <Button
  2549. type="primary"
  2550. style={{
  2551. float: "right",
  2552. marginTop: 10,
  2553. position: "absolute",
  2554. top: 0,
  2555. right: 30,
  2556. }}
  2557. >
  2558. 打印
  2559. </Button>
  2560. )}
  2561. content={() => this.refs.all}
  2562. />
  2563. </Modal>
  2564. <Project
  2565. record={this.state.record}
  2566. visible={this.state.pvisible}
  2567. isAuditPayment={true}
  2568. cancel={() => {
  2569. this.setState({ pvisible: false });
  2570. }}
  2571. />
  2572. <Modal
  2573. visible={this.state.timeVisible}
  2574. footer=""
  2575. title="工时详情"
  2576. className="admin-desc-content"
  2577. width="1300px"
  2578. pagination={false}
  2579. onCancel={() => {
  2580. this.loadData();
  2581. this.setState({
  2582. timeVisible: false,
  2583. });
  2584. }}
  2585. >
  2586. <Spin spinning={this.state.loading}>
  2587. <div
  2588. className="patent-table"
  2589. style={
  2590. {
  2591. // width: 900,
  2592. // position: "relative",
  2593. // left: "50%",
  2594. // transform: "translate(-50%)",
  2595. // padding: "25px 0 30px 30px"
  2596. }
  2597. }
  2598. ref={(e) => {
  2599. this.refs.all = e;
  2600. }}
  2601. >
  2602. <Table
  2603. columns={this.state.timeColumns}
  2604. dataSource={this.state.timeDataList}
  2605. onRowClick={this.tableRowClickPro}
  2606. scroll={{ x: "max-content", y: 0 }}
  2607. pagination={false}
  2608. bordered
  2609. size="small"
  2610. />
  2611. </div>
  2612. </Spin>
  2613. <ReactToPrint
  2614. trigger={() => (
  2615. <Button
  2616. type="primary"
  2617. style={{
  2618. float: "right",
  2619. marginTop: 10,
  2620. position: "absolute",
  2621. top: 0,
  2622. right: 30,
  2623. }}
  2624. >
  2625. 打印
  2626. </Button>
  2627. )}
  2628. content={() => this.refs.all}
  2629. />
  2630. </Modal>
  2631. <Modal
  2632. visible={this.state.cuiVisible}
  2633. footer=""
  2634. title="催款详情"
  2635. className="admin-desc-content"
  2636. width="1300px"
  2637. pagination={false}
  2638. onCancel={() => {
  2639. this.loadData();
  2640. this.setState({
  2641. cuiVisible: false,
  2642. cuiTabKey: "1",
  2643. });
  2644. }}
  2645. >
  2646. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  2647. <TabPane tab="催款节点" key="1">
  2648. <Spin spinning={this.state.loading}>
  2649. <div
  2650. className="patent-table"
  2651. ref={(e) => {
  2652. this.refs.all = e;
  2653. }}
  2654. >
  2655. <Table
  2656. columns={this.state.cuiColumns}
  2657. dataSource={this.state.cuiDataList}
  2658. scroll={{ x: "max-content", y: 0 }}
  2659. pagination={false}
  2660. bordered
  2661. size="small"
  2662. />
  2663. </div>
  2664. <ReactToPrint
  2665. trigger={() => (
  2666. <Button
  2667. type="primary"
  2668. style={{
  2669. float: "right",
  2670. marginTop: 10,
  2671. position: "absolute",
  2672. top: "-60px",
  2673. right: 30,
  2674. }}
  2675. >
  2676. 打印
  2677. </Button>
  2678. )}
  2679. content={() => this.refs.all}
  2680. />
  2681. </Spin>
  2682. </TabPane>
  2683. <TabPane tab="欠款催收记录" key="2">
  2684. <Spin spinning={this.state.loading}>
  2685. <div
  2686. className="patent-table"
  2687. ref={(e) => {
  2688. this.refs.all = e;
  2689. }}
  2690. >
  2691. <Table
  2692. columns={this.state.qianColumns}
  2693. dataSource={this.state.qianDataList}
  2694. scroll={{ x: "max-content", y: 0 }}
  2695. pagination={false}
  2696. bordered
  2697. size="small"
  2698. />
  2699. </div>
  2700. <ReactToPrint
  2701. trigger={() => (
  2702. <Button
  2703. type="primary"
  2704. style={{
  2705. float: "right",
  2706. marginTop: 10,
  2707. position: "absolute",
  2708. top: "-60px",
  2709. right: 30,
  2710. }}
  2711. >
  2712. 打印
  2713. </Button>
  2714. )}
  2715. content={() => this.refs.all}
  2716. />
  2717. </Spin>
  2718. </TabPane>
  2719. </Tabs>
  2720. </Modal>
  2721. <Modal
  2722. visible={this.state.proVisible}
  2723. footer=""
  2724. title="项目进度"
  2725. className="admin-desc-content"
  2726. width="1300px"
  2727. pagination={false}
  2728. onCancel={() => {
  2729. this.loadData(this.state.page);
  2730. this.setState({
  2731. proVisible: false,
  2732. });
  2733. }}
  2734. >
  2735. <Spin spinning={this.state.loading}>
  2736. <div
  2737. className="patent-table"
  2738. style={
  2739. {
  2740. // width: 900,
  2741. // position: "relative",
  2742. // left: "50%",
  2743. // transform: "translate(-50%)",
  2744. // padding: "25px 0 30px 30px"
  2745. }
  2746. }
  2747. ref={(e) => {
  2748. this.refs.all = e;
  2749. }}
  2750. >
  2751. <Table
  2752. columns={this.state.proColumns}
  2753. dataSource={this.state.proDataList}
  2754. scroll={{ x: "max-content", y: 0 }}
  2755. onRowClick={this.tableRowClickPro}
  2756. pagination={false}
  2757. bordered
  2758. size="small"
  2759. />
  2760. </div>
  2761. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  2762. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  2763. </span>
  2764. </Spin>
  2765. <ReactToPrint
  2766. trigger={() => (
  2767. <Button
  2768. type="primary"
  2769. style={{
  2770. float: "right",
  2771. marginTop: 10,
  2772. position: "absolute",
  2773. top: 0,
  2774. right: 30,
  2775. }}
  2776. >
  2777. 打印
  2778. </Button>
  2779. )}
  2780. content={() => this.refs.all}
  2781. />
  2782. </Modal>
  2783. <Spin spinning={this.state.loading}>
  2784. {this.state.checkVisible ? <Modal
  2785. title="审核订单"
  2786. visible={this.state.checkVisible}
  2787. onOk={this.checkOk}
  2788. confirmLoading={this.state.loading}
  2789. okText={"通过"}
  2790. onCancel={() => {
  2791. this.state.financeApprovalAjaxObj ? this.state.financeApprovalAjaxObj.abort() : null;
  2792. this.setState({
  2793. financeApprovalAjaxObj: null
  2794. })
  2795. this.loadData();
  2796. this.setState({
  2797. checkVisible: false,
  2798. checkData: "",
  2799. });
  2800. }}
  2801. >
  2802. <TextArea
  2803. value={this.state.checkData}
  2804. onChange={(e, recard) => {
  2805. this.setState({
  2806. checkData: e.target.value,
  2807. });
  2808. }}
  2809. placeholder="请填写审核内容"
  2810. />
  2811. </Modal> : <div/>}
  2812. </Spin>
  2813. <KaiPiaoModal
  2814. visible={this.state.avisible}
  2815. data={this.state.modalData}
  2816. onCancel={this.visitCancels}
  2817. loading={this.state.loading}
  2818. />
  2819. </div>
  2820. );
  2821. },
  2822. });
  2823. export default ShouKuang;