shouKuang.jsx 78 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802
  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. $.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. });
  1811. }.bind(this)
  1812. );
  1813. },
  1814. tableRowClickPro(record) {
  1815. this.setState({
  1816. pvisible: true,
  1817. record,
  1818. });
  1819. },
  1820. kaiPiaoData(record) {
  1821. this.setState({
  1822. avisible: true,
  1823. });
  1824. this.invoiceData(record.id)
  1825. },
  1826. invoiceData(id) {
  1827. this.setState({
  1828. loading: true,
  1829. });
  1830. $.ajax({
  1831. method: "get",
  1832. dataType: "json",
  1833. crossDomain: false,
  1834. url:
  1835. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  1836. data: {
  1837. id,
  1838. },
  1839. success: function (data) {
  1840. let thisdata = data.data;
  1841. let obj = {
  1842. contractNo: thisdata.contractNo,
  1843. orderNo: thisdata.orderNo,
  1844. approval: thisdata.approval,
  1845. type: thisdata.type,
  1846. status: thisdata.status,
  1847. remarks: thisdata.remarks,
  1848. invoiceType: thisdata.invoiceType,
  1849. unitName: thisdata.unitName,
  1850. taxNumber: thisdata.taxNumber,
  1851. amount: thisdata.amount,
  1852. banks: thisdata.banks,
  1853. content: thisdata.content,
  1854. unitAddress: thisdata.unitAddress,
  1855. invoiceRemarks: thisdata.invoiceRemarks,
  1856. unitMobile: thisdata.unitMobile,
  1857. post: thisdata.post,
  1858. addressee: thisdata.addressee,
  1859. addresseeMobile: thisdata.addresseeMobile,
  1860. addresseeProvince: thisdata.addresseeProvince,
  1861. addresseeCity: thisdata.addresseeCity,
  1862. addresseeArea: thisdata.addresseeArea,
  1863. alreadyAmount: thisdata.alreadyAmount,
  1864. recipientAddress: thisdata.recipientAddress,
  1865. orgCodeUrl: thisdata.voucherUrl
  1866. ? splitUrl(
  1867. thisdata.voucherUrl,
  1868. ",",
  1869. globalConfig.avatarHost + "/upload"
  1870. )
  1871. : [],
  1872. };
  1873. this.setState({
  1874. modalData: obj,
  1875. });
  1876. }.bind(this),
  1877. }).done(
  1878. function () {
  1879. this.setState({
  1880. loading: false,
  1881. });
  1882. }.bind(this)
  1883. );
  1884. },
  1885. visitCancels() {
  1886. this.setState({
  1887. avisible: false
  1888. })
  1889. },
  1890. render() {
  1891. const formItemLayout = {
  1892. labelCol: { span: 8 },
  1893. wrapperCol: { span: 14 },
  1894. };
  1895. const { RangePicker } = DatePicker;
  1896. var departmentArr = this.state.departmentArr || [];
  1897. const { loading, selectedRowKeys, visible } = this.state;
  1898. const rowSelection = {
  1899. selectedRowKeys,
  1900. onChange: this.onSelectChange,
  1901. hideDefaultSelections: true,
  1902. type: "radio",
  1903. };
  1904. return (
  1905. <div className="user-content">
  1906. {this.state.resVisible ? (
  1907. <ResolutionDetail
  1908. cancel={this.resCancel}
  1909. detail={this.state.resRecord}
  1910. visible={this.state.resVisible}
  1911. id={this.state.resRecord.orderNo}
  1912. />
  1913. ) : (
  1914. ""
  1915. )}
  1916. <div className="content-title" style={{ marginBottom: 10 }}>
  1917. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  1918. </div>
  1919. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  1920. <TabPane tab="更改表格显示数据" key="1">
  1921. <div style={{ marginLeft: 10 }}>
  1922. <ChooseList
  1923. columns={this.state.columns}
  1924. changeFn={this.changeList}
  1925. changeList={this.state.changeList}
  1926. top={55}
  1927. margin={11}
  1928. />
  1929. </div>
  1930. </TabPane>
  1931. <TabPane tab="搜索" key="2">
  1932. <div className="user-search" style={{ marginLeft: 10 }}>
  1933. <Input
  1934. placeholder="订单编号"
  1935. value={this.state.orderNoSearch}
  1936. onChange={(e) => {
  1937. this.setState({ orderNoSearch: e.target.value });
  1938. }}
  1939. />
  1940. <Input
  1941. placeholder="客户名称"
  1942. value={this.state.nameSearch}
  1943. onChange={(e) => {
  1944. this.setState({ nameSearch: e.target.value });
  1945. }}
  1946. />
  1947. <Select
  1948. placeholder="订单部门"
  1949. style={{ width: 120, marginRight: 10 }}
  1950. value={this.state.departmenttList}
  1951. onChange={(e) => {
  1952. this.setState({ departmenttList: e });
  1953. }}
  1954. >
  1955. {departmentArr.map(function (item) {
  1956. return (
  1957. <Select.Option key={item.id}>{item.name}</Select.Option>
  1958. );
  1959. })}
  1960. </Select>
  1961. <Input
  1962. placeholder="合同编号"
  1963. value={this.state.contractNoSearch}
  1964. onChange={(e) => {
  1965. this.setState({
  1966. contractNoSearch: e.target.value,
  1967. });
  1968. }}
  1969. />
  1970. <Select
  1971. placeholder="流程状态"
  1972. onChange={(e) => {
  1973. this.setState({ processStatusSearch: e });
  1974. }}
  1975. style={{ width: 120, marginRight: 5 }}
  1976. value={this.state.processStatusSearch}
  1977. >
  1978. <Option value="3">未分配</Option>
  1979. <Option value="4">已分配</Option>
  1980. <Option value="9">已驳回</Option>
  1981. </Select>
  1982. <Select
  1983. placeholder="结算状态"
  1984. onChange={(e) => {
  1985. this.setState({ liquidationStatus: e });
  1986. }}
  1987. style={{ width: 120, marginRight: 5 }}
  1988. value={this.state.liquidationStatus}
  1989. >
  1990. <Option value="0">首付待付清</Option>
  1991. <Option value="1">尾款待付清</Option>
  1992. <Option value="2">已付清</Option>
  1993. </Select>
  1994. <Select
  1995. style={{ width: 120 }}
  1996. placeholder="签单金额"
  1997. value={this.state.amountStatus}
  1998. onChange={(e) => {
  1999. this.setState({
  2000. amountStatus: e,
  2001. });
  2002. }}
  2003. >
  2004. <Option value="0">10万元以下</Option>
  2005. <Option value="1">10~20万元</Option>
  2006. <Option value="2">20~30万元</Option>
  2007. <Option value="3">30~40万元</Option>
  2008. <Option value="4">40万元以上</Option>
  2009. </Select>
  2010. <span style={{}}>下单日期:</span>
  2011. <RangePicker
  2012. style={{ width: 170 }}
  2013. value={[
  2014. this.state.releaseDate[0]
  2015. ? moment(this.state.releaseDate[0])
  2016. : null,
  2017. this.state.releaseDate[1]
  2018. ? moment(this.state.releaseDate[1])
  2019. : null,
  2020. ]}
  2021. onChange={(data, dataString) => {
  2022. this.setState({ releaseDate: dataString });
  2023. }}
  2024. />
  2025. <span style={{}}>最近收款:</span>
  2026. <RangePicker
  2027. style={{ width: 170 }}
  2028. value={[
  2029. this.state.shouKuanDate[0]
  2030. ? moment(this.state.shouKuanDate[0])
  2031. : null,
  2032. this.state.shouKuanDate[1]
  2033. ? moment(this.state.shouKuanDate[1])
  2034. : null,
  2035. ]}
  2036. onChange={(data, dataString) => {
  2037. this.setState({ shouKuanDate: dataString });
  2038. }}
  2039. />
  2040. <Button
  2041. type="primary"
  2042. onClick={this.search}
  2043. style={{ marginLeft: 10 }}
  2044. disabled={this.state.loadingA ? true : false}
  2045. >
  2046. 搜索
  2047. </Button>
  2048. <Button onClick={this.reset}>重置</Button>
  2049. </div>
  2050. </TabPane>
  2051. <TabPane tab="打印" key="3">
  2052. <Button
  2053. type="primary"
  2054. style={{ margin: "11px 0px 10px 10px" }}
  2055. onClick={this.printAll}
  2056. disabled={!this.state.dataSource.length}
  2057. >
  2058. 打印所有列表信息
  2059. </Button>
  2060. <Button
  2061. type="primary"
  2062. disabled={this.state.selectedRowKeys.length != 1}
  2063. style={{ margin: "11px 0px 10px 10px" }}
  2064. onClick={() => {
  2065. this.inRecordData();
  2066. this.setState({
  2067. bvisible: true,
  2068. });
  2069. }}
  2070. >
  2071. 打印开票详情
  2072. </Button>
  2073. <Button
  2074. type="primary"
  2075. disabled={this.state.selectedRowKeys.length != 1}
  2076. style={{ margin: "11px 0px 10px 10px" }}
  2077. onClick={() => {
  2078. this.waterData();
  2079. this.setState({
  2080. cvisible: true,
  2081. });
  2082. }}
  2083. >
  2084. 打印收款流水
  2085. </Button>
  2086. <Button
  2087. type="primary"
  2088. disabled={this.state.selectedRowKeys.length != 1}
  2089. style={{ margin: "11px 0px 10px 10px" }}
  2090. onClick={() => {
  2091. this.timeData();
  2092. this.setState({
  2093. timeVisible: true,
  2094. });
  2095. }}
  2096. >
  2097. 打印工时信息
  2098. </Button>
  2099. <Button
  2100. type="primary"
  2101. disabled={this.state.selectedRowKeys.length != 1}
  2102. style={{ margin: "11px 0px 10px 10px" }}
  2103. onClick={() => {
  2104. this.cuiData();
  2105. this.setState({
  2106. cuiVisible: true,
  2107. });
  2108. }}
  2109. >
  2110. 打印催款信息
  2111. </Button>
  2112. <Button
  2113. type="primary"
  2114. disabled={this.state.selectedRowKeys.length != 1}
  2115. style={{ margin: "11px 0px 10px 10px" }}
  2116. onClick={() => {
  2117. this.proData();
  2118. this.setState({
  2119. proVisible: true,
  2120. });
  2121. }}
  2122. >
  2123. 打印项目进度
  2124. </Button>
  2125. </TabPane>
  2126. <TabPane tab="导出Excel" key="4">
  2127. <Button
  2128. type="primary"
  2129. style={{ margin: "11px 0px 10px 10px" }}
  2130. onClick={this.exportAll}
  2131. >
  2132. 导出当前列表
  2133. </Button>
  2134. <Button
  2135. type="primary"
  2136. disabled={this.state.selectedRowKeys.length != 1}
  2137. style={{ margin: "11px 0px 10px 10px" }}
  2138. onClick={this.exportKaip}
  2139. >
  2140. 导出所选开票详情
  2141. </Button>
  2142. <Button
  2143. type="primary"
  2144. disabled={this.state.selectedRowKeys.length != 1}
  2145. style={{ margin: "11px 0px 10px 10px" }}
  2146. onClick={this.exportWater}
  2147. >
  2148. 导出所选收款详情流水
  2149. </Button>
  2150. <Button
  2151. type="primary"
  2152. disabled={this.state.selectedRowKeys.length != 1}
  2153. style={{ margin: "11px 0px 10px 10px" }}
  2154. onClick={this.exportTime}
  2155. >
  2156. 导出所选工时信息
  2157. </Button>
  2158. <Button
  2159. type="primary"
  2160. disabled={this.state.selectedRowKeys.length != 1}
  2161. style={{ margin: "11px 0px 10px 10px" }}
  2162. onClick={this.exportCui}
  2163. >
  2164. 导出催款信息
  2165. </Button>
  2166. <Button
  2167. type="primary"
  2168. disabled={this.state.selectedRowKeys.length != 1}
  2169. style={{ margin: "11px 0px 10px 10px" }}
  2170. onClick={this.exportPro}
  2171. >
  2172. 导出项目进度
  2173. </Button>
  2174. </TabPane>
  2175. <TabPane tab="查看" key="5">
  2176. <Button
  2177. type="primary"
  2178. disabled={this.state.selectedRowKeys.length != 1}
  2179. style={{ margin: "11px 0px 10px 10px" }}
  2180. onClick={() => {
  2181. this.inRecordData();
  2182. this.setState({
  2183. bvisible: true,
  2184. });
  2185. }}
  2186. >
  2187. 查看开票详情
  2188. </Button>
  2189. <Button
  2190. type="primary"
  2191. disabled={this.state.selectedRowKeys.length != 1}
  2192. style={{ margin: "11px 0px 10px 10px" }}
  2193. onClick={() => {
  2194. this.waterData();
  2195. this.setState({
  2196. cvisible: true,
  2197. });
  2198. }}
  2199. >
  2200. 详情收款流水
  2201. </Button>
  2202. <Button
  2203. type="primary"
  2204. disabled={this.state.selectedRowKeys.length != 1}
  2205. style={{ margin: "11px 0px 10px 10px" }}
  2206. onClick={() => {
  2207. this.timeData();
  2208. this.setState({
  2209. timeVisible: true,
  2210. });
  2211. }}
  2212. >
  2213. 工时信息
  2214. </Button>
  2215. <Button
  2216. type="primary"
  2217. disabled={this.state.selectedRowKeys.length != 1}
  2218. style={{ margin: "11px 0px 10px 10px" }}
  2219. onClick={() => {
  2220. this.cuiData();
  2221. this.setState({
  2222. cuiVisible: true,
  2223. });
  2224. }}
  2225. >
  2226. 催款信息
  2227. </Button>
  2228. <Button
  2229. type="primary"
  2230. disabled={this.state.selectedRowKeys.length != 1}
  2231. style={{ margin: "11px 0px 10px 10px" }}
  2232. onClick={() => {
  2233. this.proData();
  2234. this.setState({
  2235. proVisible: true,
  2236. });
  2237. }}
  2238. >
  2239. 项目进度
  2240. </Button>
  2241. </TabPane>
  2242. {/* <TabPane tab="批量操作" key="6">
  2243. <Button
  2244. type="primary"
  2245. disabled={this.state.selectedRowKeys.length == 0}
  2246. style={{ margin: "0px 0px 10px 10px" }}
  2247. onClick={e => {
  2248. e.stopPropagation(),
  2249. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  2250. }}
  2251. >
  2252. 转交
  2253. </Button>
  2254. </TabPane> */}
  2255. </Tabs>
  2256. <div className="patent-table">
  2257. <Spin spinning={this.state.loadingA}>
  2258. <Table
  2259. bordered
  2260. columns={
  2261. this.state.changeList == undefined
  2262. ? this.state.columns
  2263. : this.state.changeList
  2264. }
  2265. dataSource={this.state.dataSource}
  2266. rowSelection={rowSelection}
  2267. scroll={{ x: "max-content", y: 0 }}
  2268. pagination={this.state.pagination}
  2269. onRowDoubleClick={this.tableRowClick.bind(this)}
  2270. size="small"
  2271. />
  2272. </Spin>
  2273. <p
  2274. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  2275. >
  2276. {
  2277. <span style={{ marginRight: 10 }}>
  2278. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  2279. </span>
  2280. }
  2281. {
  2282. <span>
  2283. {`合同额总计(万元):${
  2284. this.state.totalHui ? this.state.totalHui : "0"
  2285. }`}
  2286. </span>
  2287. }
  2288. </p>
  2289. </div>
  2290. <Assign
  2291. title="任务"
  2292. selApi={"/api/admin/newOrder/updateFinance"}
  2293. data={this.state.assignDataY}
  2294. showDesc={this.state.assignVisibleY}
  2295. closeDesc={this.closeAssignY.bind(this)}
  2296. // fenpaiData={8}
  2297. specially={0}
  2298. roleName={this.state.nub}
  2299. requestMethod={"get"}
  2300. />
  2301. <OrderDesc
  2302. data={this.state.RowData}
  2303. showDesc={this.state.showDesc}
  2304. closeDesc={this.closeDesc.bind(this)}
  2305. />
  2306. <Receivable
  2307. title="收款记录"
  2308. api="/api/admin/financial/addReceiptsFlow"
  2309. data={this.state.assignDataX}
  2310. showDesc={this.state.assignVisibleX}
  2311. closeDesc={this.closeAssignX.bind(this)}
  2312. />
  2313. <Modal
  2314. visible={this.state.boHuiVisible}
  2315. width="400px"
  2316. title="驳回备注"
  2317. footer=""
  2318. onOk={this.boHuiOk}
  2319. onCancel={this.boHuiCancel}
  2320. >
  2321. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  2322. <Spin spinning={this.state.loading}>
  2323. <FormItem
  2324. labelCol={{ span: 5 }}
  2325. wrapperCol={{ span: 16 }}
  2326. label={
  2327. <span>
  2328. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  2329. </span>
  2330. }
  2331. >
  2332. <Input
  2333. type="textarea"
  2334. rows={4}
  2335. placeholder="请输入驳回原因"
  2336. value={this.state.content}
  2337. onChange={(e) => {
  2338. this.setState({ content: e.target.value });
  2339. }}
  2340. />
  2341. </FormItem>
  2342. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  2343. <Button
  2344. type="primary"
  2345. htmlType="submit"
  2346. style={{ marginRight: 20 }}
  2347. >
  2348. 驳回
  2349. </Button>
  2350. <Button
  2351. type="default"
  2352. onClick={() => {
  2353. this.boHuiCancel();
  2354. }}
  2355. >
  2356. 取消
  2357. </Button>
  2358. </FormItem>
  2359. </Spin>
  2360. </Form>
  2361. </Modal>
  2362. <Modal
  2363. visible={this.state.bvisible}
  2364. footer=""
  2365. title="开票历史记录"
  2366. className="admin-desc-content"
  2367. width="900px"
  2368. onCancel={this.inRecordCanl}
  2369. >
  2370. <Spin spinning={this.state.loading}>
  2371. <div
  2372. className="patent-table"
  2373. ref={(e) => {
  2374. this.refs.kaiPiao = e;
  2375. }}
  2376. >
  2377. <Table
  2378. columns={this.state.columnsDate}
  2379. dataSource={this.state.recordData}
  2380. onRowClick={this.kaiPiaoData}
  2381. pagination={false}
  2382. bordered
  2383. size="small"
  2384. />
  2385. <div className="clearfix" style={{ marginTop: "20px" }}>
  2386. <FormItem
  2387. className="half-item"
  2388. {...formItemLayout}
  2389. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  2390. >
  2391. <span>{this.state.sum + "(万元)"}</span>
  2392. </FormItem>
  2393. </div>
  2394. <ReactToPrint
  2395. trigger={() => (
  2396. <Button
  2397. type="primary"
  2398. style={{
  2399. float: "right",
  2400. // marginTop: 10,
  2401. position: "absolute",
  2402. top: -54,
  2403. right: 30,
  2404. }}
  2405. >
  2406. 打印
  2407. </Button>
  2408. )}
  2409. content={() => this.refs.kaiPiao}
  2410. />
  2411. </div>
  2412. </Spin>
  2413. </Modal>
  2414. <Modal
  2415. visible={this.state.cvisible}
  2416. footer=""
  2417. title="详细收款流水"
  2418. className="admin-desc-content"
  2419. width="1300px"
  2420. onCancel={this.waterCanl}
  2421. >
  2422. <Spin spinning={this.state.loading}>
  2423. <div
  2424. className="patent-table"
  2425. ref={(e) => {
  2426. this.refs.shouKuan = e;
  2427. }}
  2428. >
  2429. <Table
  2430. columns={this.state.waterlistDate}
  2431. dataSource={this.state.waterData}
  2432. pagination={false}
  2433. scroll={{ x: "max-content", y: 0 }}
  2434. bordered
  2435. size="small"
  2436. />
  2437. <div className="clearfix" style={{ marginTop: "20px" }}>
  2438. <FormItem
  2439. className="half-item"
  2440. {...formItemLayout}
  2441. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  2442. >
  2443. <span>{this.state.waterSum + "(万元)"}</span>
  2444. </FormItem>
  2445. </div>
  2446. <ReactToPrint
  2447. trigger={() => (
  2448. <Button
  2449. type="primary"
  2450. style={{
  2451. float: "right",
  2452. position: "absolute",
  2453. top: -54,
  2454. right: 30,
  2455. }}
  2456. >
  2457. 打印
  2458. </Button>
  2459. )}
  2460. content={() => this.refs.shouKuan}
  2461. />
  2462. </div>
  2463. </Spin>
  2464. </Modal>
  2465. <Modal
  2466. visible={this.state.dvisible}
  2467. footer=""
  2468. title="所有列表信息"
  2469. className="admin-desc-content"
  2470. width="1300px"
  2471. onCancel={() => {
  2472. this.loadData();
  2473. this.setState({
  2474. dvisible: false,
  2475. });
  2476. }}
  2477. >
  2478. <Spin spinning={this.state.loading}>
  2479. <div
  2480. className="patent-table"
  2481. style={{
  2482. // width: 900,
  2483. // position: "relative",
  2484. // left: "50%",
  2485. // transform: "translate(-50%)",
  2486. padding: "25px 0 30px 30px",
  2487. }}
  2488. ref={(e) => {
  2489. this.refs.all = e;
  2490. }}
  2491. >
  2492. <Table
  2493. columns={this.state.printColumns}
  2494. dataSource={this.state.dataSource}
  2495. pagination={false}
  2496. bordered
  2497. size="small"
  2498. />
  2499. </div>
  2500. </Spin>
  2501. <ReactToPrint
  2502. trigger={() => (
  2503. <Button
  2504. type="primary"
  2505. style={{
  2506. float: "right",
  2507. marginTop: 10,
  2508. position: "absolute",
  2509. top: 0,
  2510. right: 30,
  2511. }}
  2512. >
  2513. 打印
  2514. </Button>
  2515. )}
  2516. content={() => this.refs.all}
  2517. />
  2518. </Modal>
  2519. <Modal
  2520. visible={this.state.timeVisible}
  2521. footer=""
  2522. title="工时详情"
  2523. className="admin-desc-content"
  2524. width="1300px"
  2525. pagination={false}
  2526. onCancel={() => {
  2527. this.loadData();
  2528. this.setState({
  2529. timeVisible: false,
  2530. });
  2531. }}
  2532. >
  2533. <Spin spinning={this.state.loading}>
  2534. <Project
  2535. record={this.state.record}
  2536. visible={this.state.pvisible}
  2537. cancel={() => {
  2538. this.setState({ pvisible: false });
  2539. }}
  2540. />
  2541. <div
  2542. className="patent-table"
  2543. style={
  2544. {
  2545. // width: 900,
  2546. // position: "relative",
  2547. // left: "50%",
  2548. // transform: "translate(-50%)",
  2549. // padding: "25px 0 30px 30px"
  2550. }
  2551. }
  2552. ref={(e) => {
  2553. this.refs.all = e;
  2554. }}
  2555. >
  2556. <Table
  2557. columns={this.state.timeColumns}
  2558. dataSource={this.state.timeDataList}
  2559. onRowClick={this.tableRowClickPro}
  2560. scroll={{ x: "max-content", y: 0 }}
  2561. pagination={false}
  2562. bordered
  2563. size="small"
  2564. />
  2565. </div>
  2566. </Spin>
  2567. <ReactToPrint
  2568. trigger={() => (
  2569. <Button
  2570. type="primary"
  2571. style={{
  2572. float: "right",
  2573. marginTop: 10,
  2574. position: "absolute",
  2575. top: 0,
  2576. right: 30,
  2577. }}
  2578. >
  2579. 打印
  2580. </Button>
  2581. )}
  2582. content={() => this.refs.all}
  2583. />
  2584. </Modal>
  2585. <Modal
  2586. visible={this.state.cuiVisible}
  2587. footer=""
  2588. title="催款详情"
  2589. className="admin-desc-content"
  2590. width="1300px"
  2591. pagination={false}
  2592. onCancel={() => {
  2593. this.loadData();
  2594. this.setState({
  2595. cuiVisible: false,
  2596. cuiTabKey: "1",
  2597. });
  2598. }}
  2599. >
  2600. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  2601. <TabPane tab="催款节点" key="1">
  2602. <Spin spinning={this.state.loading}>
  2603. <div
  2604. className="patent-table"
  2605. ref={(e) => {
  2606. this.refs.all = e;
  2607. }}
  2608. >
  2609. <Table
  2610. columns={this.state.cuiColumns}
  2611. dataSource={this.state.cuiDataList}
  2612. scroll={{ x: "max-content", y: 0 }}
  2613. pagination={false}
  2614. bordered
  2615. size="small"
  2616. />
  2617. </div>
  2618. <ReactToPrint
  2619. trigger={() => (
  2620. <Button
  2621. type="primary"
  2622. style={{
  2623. float: "right",
  2624. marginTop: 10,
  2625. position: "absolute",
  2626. top: "-60px",
  2627. right: 30,
  2628. }}
  2629. >
  2630. 打印
  2631. </Button>
  2632. )}
  2633. content={() => this.refs.all}
  2634. />
  2635. </Spin>
  2636. </TabPane>
  2637. <TabPane tab="欠款催收记录" key="2">
  2638. <Spin spinning={this.state.loading}>
  2639. <div
  2640. className="patent-table"
  2641. ref={(e) => {
  2642. this.refs.all = e;
  2643. }}
  2644. >
  2645. <Table
  2646. columns={this.state.qianColumns}
  2647. dataSource={this.state.qianDataList}
  2648. scroll={{ x: "max-content", y: 0 }}
  2649. pagination={false}
  2650. bordered
  2651. size="small"
  2652. />
  2653. </div>
  2654. <ReactToPrint
  2655. trigger={() => (
  2656. <Button
  2657. type="primary"
  2658. style={{
  2659. float: "right",
  2660. marginTop: 10,
  2661. position: "absolute",
  2662. top: "-60px",
  2663. right: 30,
  2664. }}
  2665. >
  2666. 打印
  2667. </Button>
  2668. )}
  2669. content={() => this.refs.all}
  2670. />
  2671. </Spin>
  2672. </TabPane>
  2673. </Tabs>
  2674. </Modal>
  2675. <Modal
  2676. visible={this.state.proVisible}
  2677. footer=""
  2678. title="项目进度"
  2679. className="admin-desc-content"
  2680. width="1300px"
  2681. pagination={false}
  2682. onCancel={() => {
  2683. this.loadData();
  2684. this.setState({
  2685. proVisible: false,
  2686. });
  2687. }}
  2688. >
  2689. <Spin spinning={this.state.loading}>
  2690. <Project
  2691. record={this.state.record}
  2692. visible={this.state.pvisible}
  2693. cancel={() => {
  2694. this.setState({ pvisible: false });
  2695. }}
  2696. />
  2697. <div
  2698. className="patent-table"
  2699. style={
  2700. {
  2701. // width: 900,
  2702. // position: "relative",
  2703. // left: "50%",
  2704. // transform: "translate(-50%)",
  2705. // padding: "25px 0 30px 30px"
  2706. }
  2707. }
  2708. ref={(e) => {
  2709. this.refs.all = e;
  2710. }}
  2711. >
  2712. <Table
  2713. columns={this.state.proColumns}
  2714. dataSource={this.state.proDataList}
  2715. scroll={{ x: "max-content", y: 0 }}
  2716. onRowClick={this.tableRowClickPro}
  2717. pagination={false}
  2718. bordered
  2719. size="small"
  2720. />
  2721. </div>
  2722. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  2723. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  2724. </span>
  2725. </Spin>
  2726. <ReactToPrint
  2727. trigger={() => (
  2728. <Button
  2729. type="primary"
  2730. style={{
  2731. float: "right",
  2732. marginTop: 10,
  2733. position: "absolute",
  2734. top: 0,
  2735. right: 30,
  2736. }}
  2737. >
  2738. 打印
  2739. </Button>
  2740. )}
  2741. content={() => this.refs.all}
  2742. />
  2743. </Modal>
  2744. <Spin spinning={this.state.loading}>
  2745. <Modal
  2746. title="审核订单"
  2747. visible={this.state.checkVisible}
  2748. onOk={this.checkOk}
  2749. okText={"通过"}
  2750. onCancel={() => {
  2751. this.loadData();
  2752. this.setState({
  2753. checkVisible: false,
  2754. checkData: "",
  2755. });
  2756. }}
  2757. >
  2758. <TextArea
  2759. value={this.state.checkData}
  2760. onChange={(e, recard) => {
  2761. this.setState({
  2762. checkData: e.target.value,
  2763. });
  2764. }}
  2765. placeholder="请填写审核内容"
  2766. />
  2767. </Modal>
  2768. </Spin>
  2769. <KaiPiaoModal
  2770. visible={this.state.avisible}
  2771. data={this.state.modalData}
  2772. onCancel={this.visitCancels}
  2773. loading={this.state.loading}
  2774. />
  2775. </div>
  2776. );
  2777. },
  2778. });
  2779. export default ShouKuang;