shouKuang.jsx 79 KB

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