shouKuang.jsx 79 KB

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