shouKuang.jsx 77 KB

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