shouKuang.jsx 78 KB

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