shouKuang.jsx 79 KB

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