shouKuang.jsx 133 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432
  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. AutoComplete,
  8. Button,
  9. Form,
  10. Input,
  11. Spin,
  12. Table,
  13. Select,
  14. message,
  15. DatePicker,
  16. Modal,
  17. Tabs,
  18. Col,
  19. Tag,
  20. Popconfirm,
  21. Tooltip,
  22. } from "antd";
  23. import OrderDesc from "../orderDetail/orderDesc";
  24. import ResolutionDetail from "@/resolutionDetail";
  25. import Receivable from "./receivable";
  26. import Assign from "@/manageCenter/publicComponent/assign";
  27. import KaiPiaoModal from "./kaiPiaoModal";
  28. import ReactToPrint from "react-to-print";
  29. import {
  30. getLiquidationStatus,
  31. getProcessStatus,
  32. getApproval,
  33. getInvoiceStatus,
  34. getTransactionProject,
  35. getTaskStatus,
  36. getNewOrderStatus,
  37. getProjectStatus,
  38. getjiedian,
  39. splitUrl,
  40. } from "@/tools";
  41. import { ChooseList } from "../../order/orderNew/chooseList"
  42. import Project from "../../../../component/project"
  43. import LogPopup from "../../../common/logPopup";
  44. import { throws } from "assert";
  45. import { getProjectName, getClockState } from "@/tools";
  46. import { clockState, salesList } from "@/dataDic";
  47. import OrderItemStatus from "../../../common/orderItemStatus";
  48. import Cascaders from "../../../common/cascaders";
  49. const FormItem = Form.Item;
  50. const { TabPane } = Tabs;
  51. const { TextArea } = Input;
  52. const ShouKuang = React.createClass({
  53. //获取上级组织
  54. selectSuperId() {
  55. $.ajax({
  56. method: "get",
  57. dataType: "json",
  58. crossDomain: false,
  59. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  60. data: {},
  61. success: function (data) {
  62. let theArr = [];
  63. if (data.error && data.error.length === 0) {
  64. for (let i = 0; i < data.data.length; i++) {
  65. let theData = data.data[i];
  66. theArr.push(
  67. <Select.Option value={theData.id} key={theData.id}>
  68. {theData.name}
  69. </Select.Option>
  70. );
  71. }
  72. this.setState({
  73. contactsOption: theArr,
  74. });
  75. } else {
  76. message.warning(data.error[0].message);
  77. }
  78. }.bind(this),
  79. }).always(
  80. function () {
  81. this.setState({
  82. loading: false,
  83. });
  84. }.bind(this)
  85. );
  86. },
  87. departmentList() {
  88. // this.setState({
  89. // loading: true
  90. // });
  91. $.ajax({
  92. method: "get",
  93. dataType: "json",
  94. crossDomain: false,
  95. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  96. data: {},
  97. success: function (data) {
  98. let thedata = data.data;
  99. let theArr = [];
  100. if (!thedata) {
  101. if (data.error && data.error.length) {
  102. message.warning(data.error[0].message);
  103. }
  104. } else {
  105. thedata.map(function (item, index) {
  106. theArr.push({
  107. key: index,
  108. name: item.name,
  109. id: item.id,
  110. });
  111. });
  112. }
  113. this.setState({
  114. departmentArr: theArr,
  115. });
  116. }.bind(this),
  117. }).always(
  118. function () {
  119. // this.setState({
  120. // loading: false
  121. // });
  122. }.bind(this)
  123. );
  124. },
  125. loadData(pageNo, pageSize) {
  126. this.state.data = [];
  127. this.state.pagination.pageSize = 10;
  128. this.setState({
  129. // selectedRowKeys: [],
  130. // selectedRowKey: [],
  131. page: pageNo || this.state.pageNo,
  132. loadingA: true,
  133. pagination: this.state.pagination,
  134. });
  135. $.ajax({
  136. method: "get",
  137. dataType: "json",
  138. crossDomain: false,
  139. url: globalConfig.context + "/api/admin/financial/financeList",
  140. data: {
  141. pageNo: pageNo || 1,
  142. pageSize: pageSize || this.state.pagination.pageSize,
  143. buyerName: this.state.nameSearch, //客户名称
  144. orderNo: this.state.orderNoSearch,
  145. startTime: this.state.releaseDate[0],
  146. endTime: this.state.releaseDate[1],
  147. startFinalReceivablesTime: this.state.shouKuanDate[0],
  148. endFinalReceivablesTime: this.state.shouKuanDate[1],
  149. deps: this.state.departmenttList,
  150. processStatus: this.state.processStatusSearch,
  151. contractNo: this.state.contractNoSearch,
  152. liquidationStatus: this.state.liquidationStatus,
  153. amountStatus: this.state.amountStatus,
  154. approval: this.state.approval,
  155. projectType: this.state.projectType,
  156. },
  157. success: function (data) {
  158. let theArr = [];
  159. if (!data.data || !data.data.pagination.list) {
  160. if (data.error && data.error.length) {
  161. message.warning(data.error[0].message);
  162. }
  163. } else {
  164. for (let i = 0; i < data.data.pagination.list.length; i++) {
  165. let thisdata = data.data.pagination.list[i];
  166. thisdata.key = thisdata.orderNo;
  167. theArr.push(thisdata);
  168. }
  169. }
  170. this.state.pagination.current = data.data.pagination.pageNo;
  171. this.state.pagination.total = data.data.pagination.totalCount;
  172. if (
  173. data.data &&
  174. data.data.pagination.list &&
  175. !data.data.pagination.list.length
  176. ) {
  177. this.state.pagination.current = 0;
  178. this.state.pagination.total = 0;
  179. }
  180. this.setState({
  181. totalPage: data.data.pagination.totalPage,
  182. dataSource: theArr,
  183. pagination: this.state.pagination,
  184. totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
  185. hui: data.data.count ? data.data.count.actuallyTotalAmount : 0,
  186. });
  187. }.bind(this),
  188. }).always(
  189. function () {
  190. // window.setTimeout(() => {
  191. this.setState({
  192. loadingA: false,
  193. });
  194. // },5000)
  195. }.bind(this)
  196. );
  197. },
  198. getInitialState() {
  199. return {
  200. cuiTabKey: "1",
  201. pubVisible: false,
  202. pubDataList: [],
  203. pubpageNo: 1,
  204. pubpagination: {
  205. defaultCurrent: 1,
  206. defaultPageSize: 10,
  207. showQuickJumper: true,
  208. pageSize: 10,
  209. onChange: function (page) {
  210. this.loadData(page);
  211. }.bind(this),
  212. showTotal: function (total) {
  213. return "共" + total + "条数据";
  214. },
  215. },
  216. searchMore: true,
  217. dvisible: false,
  218. pageNo: 1,
  219. assignVisibleX: false,
  220. assignVisibleY: false,
  221. releaseDate: [],
  222. shouKuanDate: [],
  223. assignDataX: [],
  224. assignDataY: [],
  225. totalPage: 0,
  226. processStatusSearch: [],//默认搜索无流程状态
  227. boHuivisible: false,
  228. selectedRowKeys: [],
  229. selectedRows: [],
  230. loading: false,
  231. loadingA: false,
  232. pagination: {
  233. defaultCurrent: 1,
  234. defaultPageSize: 10,
  235. showQuickJumper: true,
  236. pageSize: 10,
  237. onChange: function (page) {
  238. // console.log(page);
  239. this.setState({
  240. pageNo: page,
  241. });
  242. this.loadData(page);
  243. }.bind(this),
  244. showTotal: function (total) {
  245. return "共" + total + "条数据";
  246. },
  247. },
  248. // 子组件改变的表格title数组
  249. changeList: undefined,
  250. pubColumns: [
  251. {
  252. title: "编号",
  253. dataIndex: "key",
  254. key: "key",
  255. width: 45,
  256. },
  257. {
  258. title: "公出类型",
  259. dataIndex: "type",
  260. key: "type",
  261. width: 70,
  262. render: (text) =>
  263. <span
  264. style={{ color: ["#1D4FEA", "#1E90FF", "#FF5500", "red"][text] }}
  265. >
  266. {
  267. text === 0
  268. ? "业务公出" : text === 1
  269. ? "技术公出" : text === 2
  270. ? "行政公出" : text === 3
  271. ? "技术协单" : ""
  272. }
  273. </span>
  274. },
  275. {
  276. title: "客户名称",
  277. dataIndex: "nickname",
  278. key: "nickname",
  279. width: 80,
  280. render: (text) => {
  281. return (
  282. <div
  283. style={{
  284. width: 80,
  285. wordBreak: "break-all",
  286. }}
  287. >
  288. {text}
  289. </div>
  290. );
  291. },
  292. },
  293. {
  294. title: "跟单人",
  295. dataIndex: "sname",
  296. key: "sname",
  297. width: 70,
  298. render: (text) => {
  299. return (
  300. <Tooltip title={text}>
  301. <div
  302. style={{
  303. width: 90,
  304. overflow: "hidden",
  305. textOverflow: "ellipsis",
  306. whiteSpace: "nowrap",
  307. }}
  308. >
  309. {text}
  310. </div>
  311. </Tooltip>
  312. );
  313. },
  314. },
  315. {
  316. title: "公出人",
  317. dataIndex: "aname",
  318. key: "aname",
  319. width: 70,
  320. render: (text) => {
  321. return (
  322. <Tooltip title={text}>
  323. <div
  324. style={{
  325. width: 90,
  326. overflow: "hidden",
  327. textOverflow: "ellipsis",
  328. whiteSpace: "nowrap",
  329. }}
  330. >
  331. {text}
  332. </div>
  333. </Tooltip>
  334. );
  335. },
  336. },
  337. // {
  338. // title: "申请时间",
  339. // dataIndex: "createTimes",
  340. // key: "createTimes",
  341. // width: 130,
  342. // },
  343. {
  344. title: "公出时间",
  345. dataIndex: "releaseStarts",
  346. key: "releaseStarts",
  347. width: 130,
  348. render: (text, record) => (
  349. <div>
  350. <div>{text}</div>
  351. <div style={{ paddingLeft: "44px" }}>至</div>
  352. <div>{record.releaseEnds}</div>
  353. </div>
  354. ),
  355. },
  356. {
  357. title: "公出地点",
  358. dataIndex: "userName",
  359. key: "userName",
  360. width: 120,
  361. render: (text) => {
  362. return (
  363. <div>{text}</div>
  364. );
  365. },
  366. },
  367. {
  368. title: "打卡时间",
  369. dataIndex: "clockInTimes",
  370. key: "clockInTimes",
  371. width: 75,
  372. },
  373. {
  374. title: "时长(时)",
  375. dataIndex: "duration",
  376. key: "duration",
  377. width: 50,
  378. },
  379. {
  380. title: "打卡状态",
  381. dataIndex: "clockIn",
  382. key: "clockIn",
  383. width: 65,
  384. render: (text) => (
  385. <span
  386. style={{ color: ["#F21212", "#34DE38"][text] }}
  387. >
  388. {["未打卡", "已打卡"][text]}
  389. </span>
  390. )
  391. },
  392. {
  393. title: "审核状态",
  394. dataIndex: "status",
  395. key: "status",
  396. width: 110,
  397. render: (text, record) => (
  398. <div style={{ display: "flex", flexDirection: "row", flexWrap: "warp" }}>
  399. <Tag color={getClockState(text).color}>
  400. {getClockState(text).title}
  401. </Tag>
  402. {record.updateStatus == 1 && <Tag color="#1E90FF">改</Tag>}
  403. </div>
  404. ),
  405. },
  406. {
  407. title: "审核/指导",
  408. dataIndex: "auditInfo",
  409. key: "auditInfo",
  410. width: 160,
  411. render: (text) => {
  412. return <div style={{ wordBreak: "break-all" }}>{text}</div>;
  413. },
  414. },
  415. ],
  416. proColumns: [
  417. {
  418. title: "序号",
  419. dataIndex: "key",
  420. key: "key",
  421. },
  422. {
  423. title: "合同编号",
  424. dataIndex: "contractNo",
  425. key: "contractNo",
  426. },
  427. {
  428. title: "订单编号",
  429. dataIndex: "orderNo",
  430. key: "orderNo",
  431. },
  432. // {
  433. // title: "项目编号",
  434. // dataIndex: "id",
  435. // key: "id"
  436. // },
  437. {
  438. title: "客户名称",
  439. dataIndex: "userName",
  440. key: "userName",
  441. render: text => {
  442. return (
  443. <Tooltip title={text}>
  444. <div style={{
  445. maxWidth: '150px',
  446. overflow: 'hidden',
  447. textOverflow: "ellipsis",
  448. whiteSpace: 'nowrap',
  449. }}>{text}</div>
  450. </Tooltip>
  451. )
  452. }
  453. },
  454. {
  455. title: "订单负责人",
  456. dataIndex: "salesmanName",
  457. key: "salesmanName",
  458. },
  459. {
  460. title: "是否主项目",
  461. dataIndex: "main",
  462. key: "main",
  463. render: (text) => {
  464. return text == 0 ? "否" : "是";
  465. },
  466. },
  467. {
  468. title: "项目类别",
  469. dataIndex: "cname",
  470. key: "cname",
  471. },
  472. {
  473. title: "项目名称",
  474. dataIndex: "commodityName",
  475. key: "commodityName",
  476. },
  477. {
  478. title: "项目数量",
  479. dataIndex: "commodityQuantity",
  480. key: "commodityQuantity",
  481. render: (text, record) => {
  482. if (record.splitStatus == 1) {
  483. return (
  484. <span>
  485. {text}{" "}
  486. <Tag
  487. color="#108ee9"
  488. onClick={(e) => {
  489. e.stopPropagation();
  490. this.showRes(record);
  491. }}
  492. >
  493. 已拆
  494. </Tag>
  495. </span>
  496. );
  497. } else {
  498. return text;
  499. }
  500. },
  501. },
  502. {
  503. title: "服务市价",
  504. dataIndex: "commodityPrice",
  505. key: "commodityPrice",
  506. },
  507. {
  508. title: "证书编号",
  509. dataIndex: "certificateNumber",
  510. key: "certificateNumber",
  511. },
  512. {
  513. title: "项目状态",
  514. dataIndex: "projectStatus",
  515. key: "projectStatus",
  516. render: (text) => {
  517. return getProjectName(text);
  518. },
  519. },
  520. {
  521. title: "项目说明",
  522. dataIndex: "taskComment",
  523. key: "taskComment",
  524. },
  525. {
  526. title: "是否外包",
  527. dataIndex: "outsource",
  528. key: "outsource",
  529. render: (text) => {
  530. if (text == 0) {
  531. return "否";
  532. } else if (text == 1) {
  533. return "是";
  534. }
  535. },
  536. },
  537. // {
  538. // title: "外包(内部)公司",
  539. // dataIndex: "outsourceName",
  540. // key: "outsourceName",
  541. // },
  542. // {
  543. // title: "外包(内部)价格",
  544. // dataIndex: "outsourcePrice",
  545. // key: "outsourcePrice",
  546. // },
  547. ],
  548. qianColumns: [
  549. {
  550. title: "序号",
  551. dataIndex: "key",
  552. key: "key",
  553. },
  554. {
  555. title: "合同编号",
  556. dataIndex: "contractNo",
  557. key: "contractNo",
  558. },
  559. {
  560. title: "订单编号",
  561. dataIndex: "orderNo",
  562. key: "orderNo",
  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: "salesmanName",
  584. key: "salesmanName",
  585. },
  586. {
  587. title: "订单部门",
  588. dataIndex: "depName",
  589. key: "depName",
  590. },
  591. {
  592. title: "订单状态",
  593. dataIndex: "orderStatus",
  594. key: "orderStatus",
  595. render: (text) => {
  596. return getNewOrderStatus(text);
  597. },
  598. },
  599. {
  600. title: "项目状态",
  601. dataIndex: "projectStatus",
  602. key: "projectStatus",
  603. render: (text) => {
  604. return getProjectName(text);
  605. },
  606. },
  607. {
  608. title: "签单金额",
  609. dataIndex: "totalAmount",
  610. key: "totalAmount",
  611. },
  612. {
  613. title: "结算状态",
  614. dataIndex: "liquidationStatus",
  615. key: "liquidationStatus",
  616. render: (text) => {
  617. return getLiquidationStatus(text);
  618. },
  619. },
  620. {
  621. title: "已收款",
  622. dataIndex: "settlementAmount",
  623. key: "settlementAmount",
  624. },
  625. {
  626. title: "欠款",
  627. dataIndex: "orderArrears",
  628. key: "orderArrears",
  629. },
  630. {
  631. title: "催收科目",
  632. dataIndex: "type",
  633. key: "type",
  634. render: (text) => {
  635. return "按时触发应收欠款";
  636. },
  637. },
  638. {
  639. title: "催款状态",
  640. dataIndex: "dunStatus",
  641. key: "dunStatus",
  642. render: (text) => {
  643. if (text == 0) {
  644. return "未启动";
  645. } else if (text == 1) {
  646. return "催款中";
  647. } else if (text == 2) {
  648. return "已完成";
  649. } else if (text == 3) {
  650. return "已停止";
  651. }
  652. },
  653. },
  654. {
  655. title: "催收启动时间",
  656. dataIndex: "startDate",
  657. key: "startDate",
  658. },
  659. ],
  660. cuiColumns: [
  661. {
  662. title: "序号",
  663. dataIndex: "key",
  664. key: "key",
  665. },
  666. {
  667. title: "合同编号",
  668. dataIndex: "contractNo",
  669. key: "contractNo",
  670. },
  671. {
  672. title: "订单编号",
  673. dataIndex: "orderNo",
  674. key: "orderNo",
  675. },
  676. {
  677. title: "客户名称",
  678. dataIndex: "userName",
  679. key: "userName",
  680. render: text => {
  681. return (
  682. <Tooltip title={text}>
  683. <div style={{
  684. maxWidth: '150px',
  685. overflow: 'hidden',
  686. textOverflow: "ellipsis",
  687. whiteSpace: 'nowrap',
  688. }}>{text}</div>
  689. </Tooltip>
  690. )
  691. }
  692. },
  693. {
  694. title: "订单负责人",
  695. dataIndex: "salesmanName",
  696. key: "salesmanName",
  697. },
  698. {
  699. title: "订单部门",
  700. dataIndex: "depName",
  701. key: "depName",
  702. },
  703. {
  704. title: "订单状态",
  705. dataIndex: "orderStatus",
  706. key: "orderStatus",
  707. render: (text) => {
  708. return getNewOrderStatus(text);
  709. },
  710. },
  711. {
  712. title: "项目状态",
  713. dataIndex: "projectStatus",
  714. key: "projectStatus",
  715. render: (text) => {
  716. return getProjectName(text);
  717. },
  718. },
  719. {
  720. title: "签单金额",
  721. dataIndex: "totalAmount",
  722. key: "totalAmount",
  723. },
  724. {
  725. title: "结算状态",
  726. dataIndex: "liquidationStatus",
  727. key: "liquidationStatus",
  728. render: (text) => {
  729. return getLiquidationStatus(text);
  730. },
  731. },
  732. {
  733. title: "已收款",
  734. dataIndex: "settlementAmount",
  735. key: "settlementAmount",
  736. },
  737. {
  738. title: "应收款",
  739. dataIndex: "accountsReceivable",
  740. key: "accountsReceivable",
  741. },
  742. {
  743. title: "催收科目",
  744. dataIndex: "dunSubject",
  745. key: "dunSubject",
  746. // render: text => {
  747. // return getjiedian(text);
  748. // }
  749. },
  750. {
  751. title: "催款状态",
  752. dataIndex: "dunStatus",
  753. key: "dunStatus",
  754. },
  755. {
  756. title: "催收启动时间",
  757. dataIndex: "startDate",
  758. key: "startDate",
  759. },
  760. ],
  761. timeColumns: [
  762. {
  763. title: "合同编号",
  764. dataIndex: "contractNo",
  765. key: "contractNo",
  766. },
  767. {
  768. title: "订单编号",
  769. dataIndex: "orderNo",
  770. key: "orderNo",
  771. },
  772. {
  773. title: "项目编号",
  774. dataIndex: "id",
  775. key: "id",
  776. render: (text, record) => {
  777. if (record.splitStatus == 2) {
  778. return <span>{record.splitSuper + "-" + record.splitId}</span>;
  779. } else {
  780. return text;
  781. }
  782. },
  783. },
  784. {
  785. title: "客户名称",
  786. dataIndex: "userName",
  787. key: "userName",
  788. render: text => {
  789. return (
  790. <Tooltip title={text}>
  791. <div style={{
  792. maxWidth: '150px',
  793. overflow: 'hidden',
  794. textOverflow: "ellipsis",
  795. whiteSpace: 'nowrap',
  796. }}>{text}</div>
  797. </Tooltip>
  798. )
  799. }
  800. },
  801. {
  802. title: "订单部门",
  803. dataIndex: "depName",
  804. key: "depName",
  805. },
  806. {
  807. title: "订单负责人",
  808. dataIndex: "salesmanName",
  809. key: "salesmanName",
  810. },
  811. {
  812. title: "项目类别",
  813. dataIndex: "cname",
  814. key: "cname",
  815. },
  816. {
  817. title: "项目名称",
  818. dataIndex: "taskName",
  819. key: "taskName",
  820. },
  821. {
  822. title: "项目负责人",
  823. dataIndex: "receiverName",
  824. key: "receiverName",
  825. },
  826. {
  827. title: "项目价格(万元)",
  828. dataIndex: "commodityPrice",
  829. key: "commodityPrice",
  830. },
  831. {
  832. title: "数量(个)",
  833. dataIndex: "commodityQuantity",
  834. key: "commodityQuantity",
  835. },
  836. {
  837. title: "任务状态",
  838. dataIndex: "taskStatus",
  839. key: "taskStatus",
  840. render: (text) => {
  841. return getTaskStatus(text);
  842. },
  843. },
  844. {
  845. title: "项目状态",
  846. dataIndex: "projectStatus",
  847. key: "projectStatus",
  848. render: (text) => {
  849. return getProjectName(text);
  850. },
  851. },
  852. {
  853. title: "工时",
  854. dataIndex: "hours",
  855. key: "hours",
  856. },
  857. {
  858. title: "是否外包",
  859. dataIndex: "outsource",
  860. key: "outsource",
  861. render: (text) => {
  862. if (text == 0) {
  863. return "否";
  864. } else if (text == 1) {
  865. return "是";
  866. }
  867. },
  868. },
  869. {
  870. title: "签单日期",
  871. dataIndex: "signTime",
  872. key: "signTime",
  873. },
  874. {
  875. title: "派单日期",
  876. dataIndex: "creteTime",
  877. key: "creteTime",
  878. },
  879. {
  880. title: "分配时间",
  881. dataIndex: "taskDistributionTime",
  882. key: "taskDistributionTime",
  883. },
  884. {
  885. title: "完成时间",
  886. dataIndex: "taskEndTime",
  887. key: "taskEndTime",
  888. },
  889. ],
  890. printColumns: [
  891. {
  892. title: "合同编号",
  893. dataIndex: "contractNo",
  894. key: "contractNo",
  895. },
  896. {
  897. title: "订单编号",
  898. dataIndex: "orderNo",
  899. key: "orderNo",
  900. // fixed: "left"
  901. },
  902. {
  903. title: "客户名称",
  904. dataIndex: "buyerName",
  905. key: "buyerName",
  906. render: text => {
  907. return (
  908. <Tooltip title={text}>
  909. <div style={{
  910. maxWidth: '150px',
  911. overflow: 'hidden',
  912. textOverflow: "ellipsis",
  913. whiteSpace: 'nowrap',
  914. }}>{text}</div>
  915. </Tooltip>
  916. )
  917. }
  918. },
  919. {
  920. title: "订单部门",
  921. dataIndex: "departmentName",
  922. key: "departmentName",
  923. },
  924. {
  925. title: "订单负责人",
  926. dataIndex: "sellerName",
  927. key: "sellerName",
  928. },
  929. {
  930. title: "签单日期",
  931. dataIndex: "signTime",
  932. key: "signTime",
  933. },
  934. {
  935. title: "下单日期",
  936. dataIndex: "createTime",
  937. key: "createTime",
  938. },
  939. {
  940. title: "签单金额(万元)",
  941. dataIndex: "signTotalAmount",
  942. key: "signTotalAmount",
  943. render: (text) => {
  944. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  945. },
  946. },
  947. {
  948. title: "开票金额(万元)",
  949. dataIndex: "invoiceAmount",
  950. key: "invoiceAmount",
  951. render: (text) => {
  952. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  953. },
  954. },
  955. {
  956. title: "已收款(万元)",
  957. dataIndex: "actuallyTotalAmount",
  958. key: "actuallyTotalAmount",
  959. render: (text) => {
  960. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  961. },
  962. },
  963. {
  964. title: "总成本(万元)",
  965. dataIndex: "costAmount",
  966. key: "costAmount",
  967. render: (text) => {
  968. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  969. }
  970. },
  971. {
  972. title: "已付成本(万元)",
  973. dataIndex: "paymentAmount",
  974. key: "paymentAmount",
  975. render: (text) => {
  976. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  977. },
  978. },
  979. {
  980. title: "最近收款(万元)",
  981. dataIndex: "finalReceivables",
  982. key: "finalReceivables",
  983. render: (text) => {
  984. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  985. },
  986. },
  987. {
  988. title: "最近收款时间",
  989. dataIndex: "finalReceivablesTime",
  990. key: "finalReceivablesTime",
  991. },
  992. {
  993. title: "结算状态",
  994. dataIndex: "liquidationStatus",
  995. key: "liquidationStatus",
  996. render: (text) => {
  997. return getLiquidationStatus(text);
  998. },
  999. },
  1000. {
  1001. title: "流程状态",
  1002. dataIndex: "processStatus",
  1003. key: "processStatus",
  1004. render: (text, record) => {
  1005. return getProcessStatus(text, record.examineName, record.approval);
  1006. },
  1007. },
  1008. {
  1009. title: "特批状态",
  1010. dataIndex: "approval",
  1011. key: "approval",
  1012. render: (text) => {
  1013. return getApproval(text);
  1014. },
  1015. },
  1016. ],
  1017. columns: [
  1018. {
  1019. title: "销售类型",
  1020. dataIndex: "salesType",
  1021. key: "salesType",
  1022. className: "title-table",
  1023. fixed: "left",
  1024. render: (text, record) => {
  1025. return (
  1026. <Tooltip
  1027. title={salesList[text] + ((text == 3 || text == 4 || text == 5) ? (!record.other ? "" : "," + record.other) : "")}
  1028. >
  1029. <span>
  1030. {salesList[text]}
  1031. </span>
  1032. </Tooltip>
  1033. );
  1034. },
  1035. },
  1036. {
  1037. title: "合同编号",
  1038. dataIndex: "contractNo",
  1039. key: "contractNo",
  1040. className: "title-table",
  1041. fixed: "left",
  1042. render: (text, record) => {
  1043. return (
  1044. <Tooltip
  1045. title={
  1046. <Button
  1047. type="primary"
  1048. onClick={(e) => {
  1049. e.stopPropagation();
  1050. let input = document.getElementById("copyText");
  1051. input.value = text;
  1052. input.select();
  1053. document.execCommand("copy");
  1054. message.success("复制成功");
  1055. }}
  1056. >
  1057. 复制
  1058. </Button>
  1059. }
  1060. >
  1061. <div>
  1062. {text}
  1063. <div style={{ display: "flex" }}>
  1064. <OrderItemStatus deleteSign={record.deleteSign} />
  1065. {
  1066. record.approval == 1
  1067. ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
  1068. ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
  1069. ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
  1070. ? <Tag color="#ff0000">特批通过</Tag> : ""
  1071. }
  1072. </div>
  1073. </div>
  1074. </Tooltip>
  1075. );
  1076. },
  1077. },
  1078. {
  1079. title: "客户名称",
  1080. dataIndex: "buyerName",
  1081. key: "buyerName",
  1082. className: "title-table",
  1083. fixed: "left",
  1084. width: 150,
  1085. render: text => {
  1086. return (
  1087. <Tooltip title={text}>
  1088. <div style={{
  1089. maxWidth: '150px',
  1090. overflow: 'hidden',
  1091. textOverflow: "ellipsis",
  1092. whiteSpace: 'nowrap',
  1093. }}>{text}</div>
  1094. </Tooltip>
  1095. )
  1096. }
  1097. },
  1098. {
  1099. title: "订单编号",
  1100. dataIndex: "orderNo",
  1101. key: "orderNo",
  1102. className: "title-table",
  1103. fixed: "left",
  1104. width: 150,
  1105. render: (text, record) => {
  1106. return (
  1107. <Tooltip
  1108. title={
  1109. <Button
  1110. type="primary"
  1111. onClick={(e) => {
  1112. e.stopPropagation();
  1113. let input = document.getElementById("copyText");
  1114. input.value = text;
  1115. input.select();
  1116. document.execCommand("copy");
  1117. message.success("复制成功");
  1118. }}
  1119. >
  1120. 复制
  1121. </Button>
  1122. }
  1123. >
  1124. <div>
  1125. {text}
  1126. <div>
  1127. {record.signTotalAmount >= 10 && <Tag color="#ef7207">大客户</Tag>}
  1128. {record.projectType == 1 && <Tag color="rgb(22, 155, 213)">会员</Tag>}
  1129. </div>
  1130. </div>
  1131. </Tooltip>
  1132. );
  1133. },
  1134. },
  1135. // {
  1136. // title: "特批状态",
  1137. // dataIndex: "approval",
  1138. // key: "approval",
  1139. // className: "title-table",
  1140. // render: (text) => {
  1141. // if (text == 1 || text == 2) {
  1142. // return <Tag color="#f50">{getApproval(text)}</Tag>;
  1143. // }
  1144. // return getApproval(text);
  1145. // },
  1146. // },
  1147. {
  1148. title: "订单部门",
  1149. dataIndex: "departmentName",
  1150. key: "departmentName",
  1151. className: "title-table",
  1152. },
  1153. {
  1154. title: "订单负责人",
  1155. dataIndex: "sellerName",
  1156. key: "sellerName",
  1157. className: "title-table",
  1158. },
  1159. {
  1160. title: "订单类型",
  1161. dataIndex: "serviceType",
  1162. key: "serviceType",
  1163. className: "title-table",
  1164. width: 150,
  1165. render: (text) => {
  1166. return !!text && text.replace(/[,,]/g, "+");
  1167. }
  1168. },
  1169. {
  1170. title: "订单内容",
  1171. dataIndex: "serviceProject",
  1172. key: "serviceProject",
  1173. className: "title-table",
  1174. render: (text) => {
  1175. return (<div dangerouslySetInnerHTML={{ __html: !!text && text.replace(/[,,]/g, "<br/>") }} />);
  1176. // return (<pre>{!!text && text.replace(/[,,]/g, "\n")}</pre>);
  1177. }
  1178. },
  1179. {
  1180. title: "财务负责人",
  1181. dataIndex: "financeName",
  1182. key: "financeName",
  1183. className: "title-table",
  1184. },
  1185. {
  1186. title: "签单日期",
  1187. dataIndex: "signTime",
  1188. key: "signTime",
  1189. className: "title-table",
  1190. },
  1191. {
  1192. title: "下单日期",
  1193. dataIndex: "createTime",
  1194. key: "createTime",
  1195. className: "title-table",
  1196. },
  1197. {
  1198. title: "签单金额(万元)",
  1199. dataIndex: "signTotalAmount",
  1200. key: "signTotalAmount",
  1201. className: "title-table",
  1202. render: (text) => {
  1203. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1204. }
  1205. },
  1206. {
  1207. title: "开票金额(万元)",
  1208. dataIndex: "invoiceAmount",
  1209. key: "invoiceAmount",
  1210. className: "title-table",
  1211. render: (text) => {
  1212. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1213. }
  1214. },
  1215. {
  1216. title: "已收款(万元)",
  1217. dataIndex: "actuallyTotalAmount",
  1218. key: "actuallyTotalAmount",
  1219. className: "title-table",
  1220. render: (text) => {
  1221. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1222. }
  1223. },
  1224. {
  1225. title: "应收款(万元)",
  1226. dataIndex: "orderReceivables",
  1227. key: "orderReceivables",
  1228. className: "title-table",
  1229. render: (text) => {
  1230. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1231. }
  1232. },
  1233. {
  1234. title: "欠款(万元)",
  1235. dataIndex: "orderArrears",
  1236. key: "orderArrears",
  1237. className: "title-table",
  1238. render: (text) => {
  1239. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1240. }
  1241. },
  1242. {
  1243. title: "总成本/实付",
  1244. dataIndex: "costAmount",
  1245. key: "costAmount",
  1246. className: "title-table",
  1247. render: (text, record) => {
  1248. return (
  1249. <span>
  1250. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1251. {isNaN(parseFloat(record.paymentAmount)) ? text : parseFloat(record.paymentAmount)}
  1252. </span>
  1253. )
  1254. },
  1255. },
  1256. {
  1257. title: "专利/专利已付",
  1258. dataIndex: "patentCost",
  1259. key: "patentCost",
  1260. className: "title-table",
  1261. render: (text, record) => {
  1262. return (
  1263. <span>
  1264. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1265. {isNaN(parseFloat(record.patentCostActual)) ? text : parseFloat(record.patentCostActual)}
  1266. </span>
  1267. )
  1268. },
  1269. },
  1270. {
  1271. title: "软著/软著已付",
  1272. dataIndex: "softCost",
  1273. key: "softCost",
  1274. className: "title-table",
  1275. render: (text, record) => {
  1276. return (
  1277. <span>
  1278. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1279. {isNaN(parseFloat(record.softCostActual)) ? text : parseFloat(record.softCostActual)}
  1280. </span>
  1281. )
  1282. },
  1283. },
  1284. {
  1285. title: "审计/审计已付",
  1286. dataIndex: "auditCost",
  1287. key: "auditCost",
  1288. className: "title-table",
  1289. render: (text, record) => {
  1290. return (
  1291. <span>
  1292. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1293. {isNaN(parseFloat(record.auditCostActual)) ? text : parseFloat(record.auditCostActual)}
  1294. </span>
  1295. )
  1296. },
  1297. },
  1298. {
  1299. title: "其他/其他已付",
  1300. dataIndex: "otherCost",
  1301. key: "otherCost",
  1302. className: "title-table",
  1303. render: (text, record) => {
  1304. return (
  1305. <span>
  1306. {isNaN(parseFloat(text)) ? text : parseFloat(text)}/
  1307. {isNaN(parseFloat(record.otherCostActual)) ? text : parseFloat(record.otherCostActual)}
  1308. </span>
  1309. )
  1310. },
  1311. },
  1312. {
  1313. title: "预估毛利(万元)",
  1314. dataIndex: "expectProfit",
  1315. key: "expectProfit",
  1316. className: "title-table",
  1317. },
  1318. {
  1319. title: "实际毛利(万元)",
  1320. dataIndex: "actualProfit",
  1321. key: "actualProfit",
  1322. className: "title-table",
  1323. },
  1324. {
  1325. title: "最近收款(万元)",
  1326. dataIndex: "finalReceivables",
  1327. key: "finalReceivables",
  1328. className: "title-table",
  1329. render: (text) => {
  1330. return isNaN(parseFloat(text)) ? text : parseFloat(text);
  1331. }
  1332. },
  1333. {
  1334. title: "最近收款时间",
  1335. dataIndex: "finalReceivablesTime",
  1336. key: "finalReceivablesTime",
  1337. className: "title-table",
  1338. },
  1339. {
  1340. title: "结算状态",
  1341. dataIndex: "liquidationStatus",
  1342. key: "liquidationStatus",
  1343. className: "title-table",
  1344. render: (text) => {
  1345. return getLiquidationStatus(text);
  1346. },
  1347. },
  1348. {
  1349. title: "流程状态",
  1350. dataIndex: "processStatus",
  1351. key: "processStatus",
  1352. className: "title-table",
  1353. render: (text, record) => {
  1354. return getProcessStatus(text, record.examineName, record.approval);
  1355. },
  1356. },
  1357. // {
  1358. // title: '订单状态',
  1359. // dataIndex: 'orderStatus',
  1360. // key: 'orderStatus',
  1361. // render: text => { return getNewOrderStatus(text)}
  1362. // },
  1363. {
  1364. title: "操作",
  1365. dataIndex: "caozuo",
  1366. key: "caouzo",
  1367. className: "title-table",
  1368. render: (text, recard) => {
  1369. return (
  1370. <div>
  1371. {/* {recard.liquidationStatus < 2 &&
  1372. (recard.approval === 1 || recard.approval === 2) ? (
  1373. <Button
  1374. style={{ background: "rgb(192,192,192)" }}
  1375. onClick={e => {
  1376. e.stopPropagation(), this.evaluateX(recard);
  1377. }}
  1378. >
  1379. 收款
  1380. </Button>
  1381. ) : (
  1382. <Button
  1383. type="primary"
  1384. onClick={e => {
  1385. e.stopPropagation(), this.evaluateX(recard);
  1386. }}
  1387. >
  1388. 收款
  1389. </Button>
  1390. )} */}
  1391. {recard.backStatus == 3 ? <Tag>已驳回</Tag> : ""}
  1392. {recard.processStatus == 3 ? (
  1393. <Button
  1394. type="primary"
  1395. onClick={(e) => {
  1396. // e.stopPropagation(), this.evaluateZ(recard);
  1397. e.stopPropagation(), this.checkRemark(recard);
  1398. }}
  1399. style={{ marginLeft: "5px" }}
  1400. >
  1401. 通过
  1402. </Button>
  1403. ) : (
  1404. ""
  1405. )}
  1406. {!(
  1407. recard.actuallyTotalAmount &&
  1408. Number(recard.actuallyTotalAmount) > 0
  1409. ) && (
  1410. <Button
  1411. type="danger"
  1412. style={{
  1413. marginLeft: "5px",
  1414. display:
  1415. recard.processStatus == 3 ? "inline-block" : "none",
  1416. }}
  1417. onClick={(e) => {
  1418. e.stopPropagation(), this.reject(recard);
  1419. }}
  1420. >
  1421. 驳回
  1422. </Button>
  1423. )}
  1424. {
  1425. // <Button
  1426. // type="primary"
  1427. // style={{ marginLeft: "5px" }}
  1428. // onClick={e => {
  1429. // e.stopPropagation(), this.evaluateY(recard, "财务专员");
  1430. // console.log(recard);
  1431. // }}
  1432. // >
  1433. // 转交
  1434. // </Button>
  1435. }
  1436. </div>
  1437. );
  1438. },
  1439. },
  1440. ],
  1441. dataSource: [],
  1442. searchTime: [],
  1443. columnsDate: [
  1444. {
  1445. title: "编号",
  1446. dataIndex: "id",
  1447. key: "id",
  1448. },
  1449. {
  1450. title: "订单编号",
  1451. dataIndex: "orderno",
  1452. key: "orderno",
  1453. },
  1454. {
  1455. title: "开票金额(万元)",
  1456. dataIndex: "amount",
  1457. key: "amount",
  1458. },
  1459. {
  1460. title: "申请时间",
  1461. dataIndex: "createTime",
  1462. key: "createTime",
  1463. },
  1464. {
  1465. title: "开票状态",
  1466. dataIndex: "status",
  1467. key: "status",
  1468. render: (text, record) => {
  1469. return <div>{getInvoiceStatus(text, record)} <LogPopup id={record.id} /></div>;
  1470. },
  1471. },
  1472. ],
  1473. waterlistDate: [
  1474. {
  1475. title: "订单编号",
  1476. dataIndex: "orderNo",
  1477. key: "orderNo",
  1478. },
  1479. {
  1480. title: "平台流水号",
  1481. dataIndex: "billNo",
  1482. key: "billNo",
  1483. // fixed: "left"
  1484. },
  1485. {
  1486. title: "收款金额(万元)",
  1487. dataIndex: "transactionAmount",
  1488. key: "transactionAmount",
  1489. },
  1490. {
  1491. title: "收款方",
  1492. dataIndex: "payeeName",
  1493. key: "payeeName",
  1494. },
  1495. {
  1496. title: "付款方",
  1497. dataIndex: "payerName",
  1498. key: "payerName",
  1499. },
  1500. {
  1501. title: "流水科目",
  1502. dataIndex: "transactionSubject",
  1503. key: "transactionSubject",
  1504. render: (text) => {
  1505. return getTransactionProject(text);
  1506. },
  1507. },
  1508. {
  1509. title: "收款类型",
  1510. dataIndex: "type",
  1511. key: "type",
  1512. },
  1513. {
  1514. title: "财务流水时间",
  1515. dataIndex: "financialPayTimes",
  1516. key: "financialPayTimes",
  1517. },
  1518. {
  1519. title: "财务流水号",
  1520. dataIndex: "financialPayNo",
  1521. key: "financialPayNo",
  1522. },
  1523. {
  1524. title: "订单负责人",
  1525. dataIndex: "saleName",
  1526. key: "saleName",
  1527. },
  1528. {
  1529. title: "创建时间",
  1530. dataIndex: "createTimes",
  1531. key: "createTimes",
  1532. },
  1533. {
  1534. title: "退款时间",
  1535. dataIndex: "refundTimes",
  1536. key: "refundTimes",
  1537. },
  1538. {
  1539. title: "删除时间",
  1540. dataIndex: "deleteTimes",
  1541. key: "deleteTimes",
  1542. },
  1543. {
  1544. title: "备注",
  1545. dataIndex: "remarks",
  1546. key: "remarks",
  1547. },
  1548. {
  1549. title: "流水状态",
  1550. dataIndex: "deleteSign",
  1551. key: "deleteSign",
  1552. render: (text, record) => {
  1553. if (!text) {
  1554. return (
  1555. <Popconfirm
  1556. title="是否删除?"
  1557. onConfirm={() => {
  1558. this.changeWater(record.billNo);
  1559. }}
  1560. okText="删除"
  1561. cancelText="不删除"
  1562. >
  1563. <Button>删除</Button>
  1564. </Popconfirm>
  1565. );
  1566. } else {
  1567. return <Tag>已删除</Tag>;
  1568. }
  1569. },
  1570. },
  1571. ],
  1572. waterData: [],
  1573. newVisible: "",
  1574. };
  1575. },
  1576. changeWater(billNo) {
  1577. this.setState({
  1578. loading: true,
  1579. });
  1580. $.ajax({
  1581. method: "get",
  1582. dataType: "json",
  1583. crossDomain: false,
  1584. url: globalConfig.context + "/api/admin/financial/deleteMyBill",
  1585. data: {
  1586. billNo,
  1587. },
  1588. success: function (data) {
  1589. let theArr = [];
  1590. if (data.error && data.error.length) {
  1591. message.warning(data.error[0].message);
  1592. } else {
  1593. message.warning("删除流水成功!");
  1594. this.waterData();
  1595. this.loadData();
  1596. }
  1597. }.bind(this),
  1598. }).always(
  1599. function () {
  1600. this.setState({
  1601. loading: false,
  1602. });
  1603. }.bind(this)
  1604. );
  1605. },
  1606. // 特批通过
  1607. evaluateZ(record) {
  1608. $.ajax({
  1609. method: "POST",
  1610. dataType: "json",
  1611. crossDomain: false,
  1612. url: globalConfig.context + "/api/admin/financial/financeApproval",
  1613. data: {
  1614. orderNo: record.orderNo,
  1615. },
  1616. }).done(
  1617. function (data) {
  1618. if (!data.error.length) {
  1619. message.success("通过成功!");
  1620. this.setState({
  1621. loading: false,
  1622. });
  1623. this.loadData();
  1624. } else {
  1625. message.warning(data.error[0].message);
  1626. }
  1627. }.bind(this)
  1628. );
  1629. },
  1630. /* 收款 */
  1631. evaluateX(recard) {
  1632. this.state.assignDataX = recard;
  1633. this.setState({
  1634. assignVisibleX: true,
  1635. });
  1636. },
  1637. /* 转交 */
  1638. evaluateY(recard, nub) {
  1639. this.state.assignDataY = recard;
  1640. this.setState({
  1641. nub,
  1642. assignVisibleY: true,
  1643. });
  1644. },
  1645. /* 驳回 */
  1646. reject(recard) {
  1647. this.setState({
  1648. bohuiData: recard,
  1649. boHuiVisible: true,
  1650. content: "",
  1651. });
  1652. },
  1653. boHuiOk() {
  1654. this.setState({
  1655. boHuiVisible: false,
  1656. });
  1657. if (
  1658. this.state.pagination.current == this.state.totalPage &&
  1659. this.state.pagination.total % 10 == 1
  1660. ) {
  1661. this.loadData(this.state.page - 1);
  1662. } else {
  1663. this.loadData(this.state.page);
  1664. }
  1665. },
  1666. boHuiCancel() {
  1667. this.setState({
  1668. boHuiVisible: false,
  1669. });
  1670. },
  1671. componentWillMount() {
  1672. this.loadData();
  1673. this.departmentList();
  1674. },
  1675. tableRowClick(record) {
  1676. this.state.RowData = record;
  1677. this.setState({
  1678. showDesc: true,
  1679. });
  1680. },
  1681. closeDesc(e, s) {
  1682. this.state.showDesc = e;
  1683. if (s) {
  1684. this.loadData(this.state.page);
  1685. }
  1686. },
  1687. closeAssignX(e, s) {
  1688. this.state.assignDataX = {};
  1689. this.state.assignVisibleX = e;
  1690. if (s) {
  1691. this.loadData(this.state.page);
  1692. }
  1693. },
  1694. closeAssignY(e, s) {
  1695. this.state.assignDataY = {};
  1696. this.state.assignVisibleY = e;
  1697. if (s) {
  1698. this.loadData(this.state.page);
  1699. }
  1700. },
  1701. search() {
  1702. this.setState({
  1703. selectedRowKeys: []
  1704. })
  1705. this.loadData();
  1706. },
  1707. // 拆分详细
  1708. showRes(record) {
  1709. this.setState({
  1710. resVisible: true,
  1711. resRecord: record,
  1712. });
  1713. },
  1714. resCancel() {
  1715. this.setState({
  1716. resVisible: false,
  1717. });
  1718. },
  1719. reset() {
  1720. this.state.nameSearch = "";
  1721. this.state.releaseDate = [];
  1722. this.state.shouKuanDate = [];
  1723. this.state.orderNoSearch = "";
  1724. this.state.departmenttList = undefined;
  1725. this.state.amountStatus = undefined;
  1726. this.state.approval = undefined;
  1727. this.state.projectType = undefined;
  1728. this.state.processStatus = [];
  1729. this.state.contractNoSearch = "";
  1730. this.state.liquidationStatus = [];
  1731. this.state.processStatusSearch = [];
  1732. this.state.contractNo = "";
  1733. this.Cascaders.empty();
  1734. this.loadData();
  1735. },
  1736. //驳回
  1737. boHuiSubmit(e) {
  1738. e.preventDefault();
  1739. if (!this.state.content) {
  1740. message.warning("请填写驳回原因");
  1741. return false;
  1742. }
  1743. if (!this.state.content.replace(/\s+/g, '')) {
  1744. message.warning("请填写驳回原因");
  1745. return false;
  1746. }
  1747. this.setState({
  1748. loading: true,
  1749. });
  1750. $.ajax({
  1751. method: "POST",
  1752. dataType: "json",
  1753. crossDomain: false,
  1754. url: globalConfig.context + "/api/admin/financial/reject",
  1755. data: {
  1756. orderNo: this.state.bohuiData.orderNo,
  1757. reason: this.state.content,
  1758. },
  1759. }).done(
  1760. function (data) {
  1761. if (!data.error.length) {
  1762. message.success("驳回成功!");
  1763. this.setState({
  1764. loading: false,
  1765. });
  1766. this.boHuiOk();
  1767. } else {
  1768. message.warning(data.error[0].message);
  1769. }
  1770. }.bind(this)
  1771. );
  1772. },
  1773. searchSwitch() {
  1774. this.setState({
  1775. searchMore: !this.state.searchMore,
  1776. });
  1777. },
  1778. changeList(arr) {
  1779. const newArr = [];
  1780. this.state.columns.forEach((item) => {
  1781. arr.forEach((val) => {
  1782. if (val === item.title) {
  1783. newArr.push(item);
  1784. }
  1785. });
  1786. });
  1787. this.setState({
  1788. changeList: newArr,
  1789. });
  1790. },
  1791. callback(key) {
  1792. // console.log(key);
  1793. },
  1794. onSelectChange(selectedRowKeys, selectedRows) {
  1795. // for(var i=0; i<selectedRowKeys.length; i++){
  1796. // for(var j=i+1; j<selectedRowKeys.length; j++){
  1797. // if(selectedRowKeys[i]==selectedRowKeys[j]){
  1798. // selectedRowKeys.splice(j,1);
  1799. // j--;
  1800. // }
  1801. // }
  1802. // }
  1803. this.setState({
  1804. selectedRowKeys,
  1805. selectedRows,
  1806. newData: selectedRows,
  1807. });
  1808. },
  1809. inRecordCanl() {
  1810. this.setState({
  1811. bvisible: false,
  1812. });
  1813. },
  1814. inRecordData() {
  1815. this.setState({
  1816. loading: true,
  1817. });
  1818. $.ajax({
  1819. method: "get",
  1820. dataType: "json",
  1821. crossDomain: false,
  1822. url:
  1823. globalConfig.context +
  1824. "/api/admin/orderInvoice/salesmanOrderInvoiceList",
  1825. data: {
  1826. orderNo: this.state.selectedRowKeys[0],
  1827. pageSize: 9999999,
  1828. },
  1829. success: function (data) {
  1830. let theArr = [];
  1831. let sum = 0;
  1832. if (!data.data) {
  1833. if (data.error && data.error.length) {
  1834. message.warning(data.error[0].message);
  1835. }
  1836. } else {
  1837. for (let i = 0; i < data.data.list.length; i++) {
  1838. let thisdata = data.data.list[i];
  1839. sum += parseFloat(thisdata.amount);
  1840. theArr.push({
  1841. id: thisdata.id,
  1842. orderno: thisdata.orderno, //订单编号
  1843. amount: thisdata.amount, //签单金额
  1844. createTime: thisdata.createTime, //流程状态
  1845. status: thisdata.status, //结算状态
  1846. rejectReason: thisdata.rejectReason,
  1847. approval: thisdata.approval,//0非特批 1待审核 2审核通过
  1848. examineName: thisdata.examineName,
  1849. });
  1850. }
  1851. }
  1852. this.setState({
  1853. recordData: theArr,
  1854. sum: sum.toFixed(6),
  1855. });
  1856. }.bind(this),
  1857. }).done(
  1858. function () {
  1859. this.setState({
  1860. loading: false,
  1861. });
  1862. }.bind(this)
  1863. );
  1864. },
  1865. waterData() {
  1866. this.state.data = [];
  1867. this.setState({
  1868. loading: true,
  1869. });
  1870. $.ajax({
  1871. method: "get",
  1872. dataType: "json",
  1873. crossDomain: false,
  1874. url: globalConfig.context + "/api/admin/financial/myBillList",
  1875. data: {
  1876. orderNo: this.state.selectedRowKeys[0],
  1877. pageSize: 9999999,
  1878. whoType: 1,
  1879. },
  1880. success: function (data) {
  1881. let theArr = [];
  1882. let waterSum = 0;
  1883. if (!data.data || !data.data.list) {
  1884. if (data.error && data.error.length) {
  1885. message.warning(data.error[0].message);
  1886. }
  1887. } else {
  1888. for (let i = 0; i < data.data.list.length; i++) {
  1889. let thisdata = data.data.list[i];
  1890. if (thisdata.deleteSign == 0) {
  1891. waterSum += parseFloat(thisdata.transactionAmount);
  1892. }
  1893. theArr.push({
  1894. key: i,
  1895. orderNo: thisdata.orderNo,
  1896. billNo: thisdata.billNo,
  1897. transactionAmount: thisdata.transactionAmount,
  1898. payeeName: thisdata.payeeName,
  1899. payerName: thisdata.payerName,
  1900. transactionSubject: thisdata.transactionSubject,
  1901. transactionChannel: thisdata.transactionChannel,
  1902. financialPayTimes: thisdata.financialPayTimes,
  1903. financialPayNo: thisdata.financialPayNo,
  1904. createrName: thisdata.createrName,
  1905. saleName: thisdata.saleName,
  1906. createTimes: thisdata.createTimes,
  1907. type:
  1908. thisdata.type == 0
  1909. ? "手工"
  1910. : thisdata.type == 1
  1911. ? "批量"
  1912. : "合同变更退款",
  1913. deleteSign: thisdata.deleteSign,
  1914. deleteTimes: thisdata.deleteTimes,
  1915. refundTimes: thisdata.refundTimes,
  1916. remarks: thisdata.remarks,
  1917. });
  1918. }
  1919. }
  1920. this.setState({
  1921. waterData: theArr,
  1922. waterSum: (Math.round(waterSum * 1000000) / 1000000).toFixed(6),
  1923. });
  1924. }.bind(this),
  1925. }).always(
  1926. function () {
  1927. this.setState({
  1928. loading: false,
  1929. });
  1930. }.bind(this)
  1931. );
  1932. },
  1933. waterCanl() {
  1934. this.setState({
  1935. cvisible: false,
  1936. });
  1937. },
  1938. exportKaip() {
  1939. window.location.href =
  1940. globalConfig.context +
  1941. "/api/admin/receivables/exportInvoice?" +
  1942. `orderNo=${this.state.selectedRowKeys}`;
  1943. },
  1944. exportAll() {
  1945. message.config({
  1946. duration: 20,
  1947. });
  1948. let loading = message.loading("下载中...");
  1949. this.setState({
  1950. exportPendingLoading: true,
  1951. });
  1952. let data = {
  1953. orderNo: this.state.orderNoSearch,
  1954. buyerName: this.state.nameSearch,
  1955. deps: this.state.departmenttList,
  1956. contractNo: this.state.contractNoSearch,
  1957. processStatus: this.state.processStatusSearch,
  1958. startTime: this.state.releaseDate[0],
  1959. endTime: this.state.releaseDate[1],
  1960. startFinalReceivablesTime: this.state.shouKuanDate[0],
  1961. endFinalReceivablesTime: this.state.shouKuanDate[1],
  1962. contractNo: this.state.contractNoSearch,
  1963. liquidationStatus: this.state.liquidationStatus,
  1964. amountStatus: this.state.amountStatus,
  1965. approval: this.state.approval,
  1966. projectType: this.state.projectType,
  1967. };
  1968. $.ajax({
  1969. method: "get",
  1970. dataType: "json",
  1971. crossDomain: false,
  1972. url: "/api/admin/receivables/exportReceivables",
  1973. data,
  1974. success: function (data) {
  1975. if (data.error.length === 0) {
  1976. this.download(data.data);
  1977. } else {
  1978. message.warning(data.error[0].message);
  1979. }
  1980. }.bind(this),
  1981. }).always(
  1982. function () {
  1983. loading();
  1984. this.setState({
  1985. exportPendingLoading: false,
  1986. });
  1987. }.bind(this)
  1988. );
  1989. // window.location.href =
  1990. // globalConfig.context +
  1991. // "/api/admin/receivables/exportReceivables?" +
  1992. // `orderNo=${this.state.orderNoSearch ? this.state.orderNoSearch : ""
  1993. // }&buyerName=${this.state.nameSearch ? this.state.nameSearch : ""
  1994. // }&deps=${this.state.departmenttList ? this.state.departmenttList : ""
  1995. // }&contractNo=${this.state.contractNoSearch ? this.state.contractNoSearch : ""
  1996. // }&processStatus=${this.state.processStatusSearch}`;
  1997. },
  1998. // 下载
  1999. download(fileName) {
  2000. window.location.href =
  2001. globalConfig.context + "/open/download?fileName=" + fileName;
  2002. },
  2003. exportWater() {
  2004. window.location.href =
  2005. globalConfig.context +
  2006. "/api/admin/receivables/exportMyBill?" +
  2007. `orderNo=${this.state.selectedRowKeys}&whoType=1`;
  2008. },
  2009. printAll() {
  2010. this.setState({
  2011. dvisible: true,
  2012. });
  2013. this.loadData(1, 9999999);
  2014. },
  2015. timeData() {
  2016. this.setState({
  2017. loading: true,
  2018. });
  2019. $.ajax({
  2020. method: "get",
  2021. dataType: "json",
  2022. crossDomain: false,
  2023. url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
  2024. data: {
  2025. orderNo: this.state.selectedRowKeys[0],
  2026. pageSize: 9999999,
  2027. },
  2028. success: function (data) {
  2029. let theArr = [];
  2030. if (!data.data || !data.data.list) {
  2031. if (data.error && data.error.length) {
  2032. message.warning(data.error[0].message);
  2033. }
  2034. } else {
  2035. for (let i = 0; i < data.data.list.length; i++) {
  2036. let thisdata = data.data.list[i];
  2037. theArr.push({
  2038. key: i + 1,
  2039. id: thisdata.id, //ID
  2040. orderNo: thisdata.orderNo, //订单编号
  2041. taskName: thisdata.taskName, //任务名称
  2042. userName: thisdata.userName, //客户名称
  2043. cname: thisdata.cname, //项目品类
  2044. taskStatus: thisdata.taskStatus, //任务状态
  2045. receiverName: thisdata.receiverName, //负责人
  2046. hours: thisdata.hours, //任务工时
  2047. depName: thisdata.depName, //派单公司
  2048. contractNo: thisdata.contractNo,
  2049. signTime: thisdata.signTime,
  2050. creteTime: thisdata.creteTime,
  2051. projectStatus: thisdata.projectStatus,
  2052. commodityPrice: thisdata.commodityPrice, //价格
  2053. commodityQuantity: thisdata.commodityQuantity, //数量
  2054. salesmanName: thisdata.salesmanName, //订单负责人
  2055. taskDistributionTime: thisdata.taskDistributionTime,
  2056. taskEndTime: thisdata.taskEndTime,
  2057. outsource: thisdata.outsource,
  2058. splitStatus: thisdata.splitStatus,
  2059. splitSuper: thisdata.splitSuper,
  2060. splitId: thisdata.splitId,
  2061. });
  2062. }
  2063. }
  2064. this.setState({
  2065. timeDataList: theArr,
  2066. });
  2067. }.bind(this),
  2068. }).always(
  2069. function () {
  2070. this.setState({
  2071. loading: false,
  2072. });
  2073. }.bind(this)
  2074. );
  2075. },
  2076. exportTime() {
  2077. const data = {
  2078. orderNo: this.state.selectedRowKeys[0],
  2079. pageSize: 9999999,
  2080. };
  2081. window.location.href =
  2082. globalConfig.context +
  2083. "/api/admin/orderProject/exportMyTaskList?" +
  2084. $.param(data);
  2085. },
  2086. exportPro() {
  2087. const data = {
  2088. orderNo: this.state.selectedRowKeys[0],
  2089. };
  2090. window.location.href =
  2091. globalConfig.context +
  2092. "/api/admin/newOrder/exportOrderTaskData?" +
  2093. $.param(data);
  2094. },
  2095. // exportCui() {
  2096. // const data = {
  2097. // orderNo: this.state.selectedRowKeys[0]
  2098. // ? this.state.selectedRowKeys[0]
  2099. // : undefined, //订单编号
  2100. // // specially: 1,
  2101. // pageSize: 9999999,
  2102. // };
  2103. // window.location.href =
  2104. // globalConfig.context +
  2105. // "/api/admin/newOrder/exportOrderDunData?" +
  2106. // $.param(data);
  2107. // },
  2108. exportCui() {
  2109. this.setState({
  2110. exportPendingLoading: true,
  2111. });
  2112. message.config({
  2113. duration: 20,
  2114. });
  2115. let loading = message.loading("下载中...");
  2116. let data = {
  2117. orderNo: this.state.selectedRowKeys[0]
  2118. ? this.state.selectedRowKeys[0]
  2119. : undefined, //订单编号
  2120. pageSize: 9999999,
  2121. };
  2122. $.ajax({
  2123. method: "get",
  2124. dataType: "json",
  2125. crossDomain: false,
  2126. url:
  2127. globalConfig.context + "/api/admin/newOrder/exportOrderDunData",
  2128. data,
  2129. success: function (data) {
  2130. if (data.error.length === 0) {
  2131. this.download(data.data);
  2132. } else {
  2133. message.warning(data.error[0].message);
  2134. }
  2135. }.bind(this),
  2136. }).always(
  2137. function () {
  2138. loading();
  2139. this.setState({
  2140. exportPendingLoading: false,
  2141. });
  2142. }.bind(this)
  2143. );
  2144. },
  2145. cuiData() {
  2146. this.setState({
  2147. loading: true,
  2148. });
  2149. $.ajax({
  2150. method: "get",
  2151. dataType: "json",
  2152. crossDomain: false,
  2153. url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
  2154. data: {
  2155. orderNo: this.state.selectedRowKeys[0],
  2156. pageSize: 9999999,
  2157. },
  2158. success: function (data) {
  2159. let theArr = [];
  2160. if (!data.data || !data.data.list) {
  2161. if (data.error && data.error.length) {
  2162. message.warning(data.error[0].message);
  2163. }
  2164. } else {
  2165. for (let i = 0; i < data.data.list.length; i++) {
  2166. let thisdata = data.data.list[i];
  2167. theArr.push({
  2168. key: i + 1,
  2169. orderNo: thisdata.orderNo,
  2170. contractNo: thisdata.contractNo,
  2171. userName: thisdata.userName,
  2172. buyerName: thisdata.buyerName,
  2173. departmentName: thisdata.departmentName,
  2174. salesmanName: thisdata.salesmanName,
  2175. depName: thisdata.depName,
  2176. orderStatus: thisdata.orderStatus,
  2177. projectStatus: thisdata.projectStatus,
  2178. totalAmount: thisdata.totalAmount,
  2179. liquidationStatus: thisdata.liquidationStatus,
  2180. settlementAmount: thisdata.settlementAmount,
  2181. accountsReceivable: thisdata.accountsReceivable,
  2182. dunSubject: thisdata.dunSubject,
  2183. startDate: thisdata.startDate,
  2184. taskStatus: thisdata.taskStatus,
  2185. cname: thisdata.cname,
  2186. id: thisdata.id,
  2187. taskName: thisdata.taskName,
  2188. hours: thisdata.hours,
  2189. taskDistributionTime: thisdata.taskDistributionTime,
  2190. taskEndTime: thisdata.taskEndTime,
  2191. dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
  2192. });
  2193. }
  2194. }
  2195. this.setState({
  2196. cuiDataList: theArr,
  2197. });
  2198. }.bind(this),
  2199. }).always(
  2200. function () {
  2201. this.setState({
  2202. loading: false,
  2203. });
  2204. }.bind(this)
  2205. );
  2206. },
  2207. cuiTabChange(index) {
  2208. this.setState({
  2209. cuiTabKey: index,
  2210. });
  2211. if (index == 2) {
  2212. this.setState({
  2213. loading: true,
  2214. });
  2215. $.ajax({
  2216. method: "get",
  2217. dataType: "json",
  2218. crossDomain: false,
  2219. url: globalConfig.context + "/api/admin/newOrder/arrearsDunList",
  2220. data: {
  2221. orderNo: this.state.selectedRowKeys[0],
  2222. pageSize: 9999999,
  2223. },
  2224. success: function (data) {
  2225. let theArr = [];
  2226. if (data.error.length || data.data.list == "") {
  2227. if (data.error && data.error.length) {
  2228. message.warning(data.error[0].message);
  2229. }
  2230. } else {
  2231. for (let i = 0; i < data.data.list.length; i++) {
  2232. let thisdata = data.data.list[i];
  2233. let obj = thisdata;
  2234. obj.key = i;
  2235. theArr.push(obj);
  2236. }
  2237. }
  2238. this.setState({
  2239. qianDataList: theArr,
  2240. });
  2241. }.bind(this),
  2242. }).always(
  2243. function () {
  2244. this.setState({
  2245. loading: false,
  2246. });
  2247. }.bind(this)
  2248. );
  2249. }
  2250. },
  2251. proData() {
  2252. this.setState({
  2253. loading: true,
  2254. });
  2255. $.ajax({
  2256. method: "get",
  2257. dataType: "json",
  2258. crossDomain: false,
  2259. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  2260. data: {
  2261. orderNo: this.state.selectedRowKeys[0],
  2262. pageSize: 9999999,
  2263. },
  2264. success: function (data) {
  2265. let theArr = [];
  2266. let totalWaibao = 0;
  2267. if (!data.data) {
  2268. if (data.error && data.error.length) {
  2269. message.warning(data.error[0].message);
  2270. }
  2271. } else {
  2272. for (let i = 0; i < data.data.length; i++) {
  2273. let thisdata = data.data[i];
  2274. totalWaibao += thisdata.outsourcePrice;
  2275. thisdata.key = i + 1;
  2276. theArr.push(thisdata);
  2277. }
  2278. }
  2279. totalWaibao = (Math.round(totalWaibao * 1000000) / 1000000).toFixed(6);
  2280. this.setState({
  2281. proDataList: theArr,
  2282. totalWaibao,
  2283. });
  2284. }.bind(this),
  2285. }).always(
  2286. function () {
  2287. this.setState({
  2288. loading: false,
  2289. });
  2290. }.bind(this)
  2291. );
  2292. },
  2293. // 查看公出列表
  2294. pubData() {
  2295. this.setState({
  2296. loading: true,
  2297. });
  2298. let rows = this.state.selectedRows[0]
  2299. let searchInfor = {
  2300. releaseStart: this.state.releaseDate[0] || undefined,
  2301. releaseEnd: this.state.releaseDate[1] || undefined,
  2302. aid: this.state.theTypes || undefined,
  2303. sid: this.state.theTypes1 || undefined,
  2304. status: this.state.status,
  2305. clockIn: this.state.clockIn,
  2306. depId: this.state.depId || undefined,
  2307. publicType: this.state.type,
  2308. }
  2309. let datas = Object.assign(searchInfor, {
  2310. pageNo: this.state.pubpageNo || 1,
  2311. pageSize: 9999999,
  2312. uid: rows.buyerId,
  2313. });
  2314. $.ajax({
  2315. method: "get",
  2316. dataType: "json",
  2317. crossDomain: false,
  2318. url: globalConfig.context + "/api/admin/release/publicReleaseDtails",
  2319. data: datas,
  2320. success: function (data) {
  2321. let theArr = [];
  2322. this.setState({
  2323. loading: false,
  2324. });
  2325. if (!data.data) {
  2326. if (data.error && data.error.length) {
  2327. message.warning(data.error[0].message);
  2328. }
  2329. } else {
  2330. for (let i = 0; i < data.data.list.length; i++) {
  2331. let thisdata = data.data.list[i];
  2332. thisdata.key = (data.data.pageNo - 1) * data.data.pageSize + i + 1;
  2333. theArr.push(thisdata);
  2334. }
  2335. this.state.pubpagination.current = data.data.pageNo;
  2336. this.state.pubpagination.total = data.data.totalCount;
  2337. if (data.data && data.data.list && !data.data.list.length) {
  2338. this.state.pubpagination.current = 0;
  2339. this.state.pubpagination.total = 0;
  2340. }
  2341. }
  2342. this.setState({
  2343. pubDataList: theArr,
  2344. pubpagination: this.state.pubpagination,
  2345. pubpageNo: data.data.pageNo,
  2346. });
  2347. }.bind(this),
  2348. }).always(
  2349. function () {
  2350. this.setState({
  2351. loading: false,
  2352. });
  2353. }.bind(this)
  2354. );
  2355. },
  2356. // 重置公出列表查询
  2357. resetAll() {
  2358. this.setState(
  2359. {
  2360. releaseDate: [],
  2361. theCustomerTypes: undefined,
  2362. status: undefined,
  2363. clockIn: undefined,
  2364. depId: undefined,
  2365. auto: "",
  2366. auto1: "",
  2367. customer: "",
  2368. theTypes: undefined,
  2369. theTypes1: undefined,
  2370. type: undefined,
  2371. },
  2372. () => {
  2373. this.pubData();
  2374. }
  2375. );
  2376. },
  2377. //公出导出
  2378. pubexportExec() {
  2379. this.setState({
  2380. exportPendingLoading: true,
  2381. });
  2382. message.config({
  2383. duration: 20,
  2384. });
  2385. let loading = message.loading("下载中...");
  2386. let rows = this.state.selectedRows[0]
  2387. let searchInfor = {
  2388. releaseStart: this.state.releaseDate[0] || undefined,
  2389. releaseEnd: this.state.releaseDate[1] || undefined,
  2390. aid: this.state.theTypes || undefined,
  2391. sid: this.state.theTypes1 || undefined,
  2392. status: this.state.status,
  2393. clockIn: this.state.clockIn,
  2394. depId: this.state.depId || undefined,
  2395. publicType: this.state.type,
  2396. }
  2397. let data = Object.assign(searchInfor, {
  2398. pageNo: this.state.pubpageNo || 1,
  2399. pageSize: 9999999,
  2400. uid: rows.buyerId,
  2401. exportType: 1,
  2402. });
  2403. for (let i of Object.keys(data)) {
  2404. if (i === "status" || i === "clockIn") {
  2405. if (isNaN(parseInt(data[i]))) {
  2406. delete data[i];
  2407. }
  2408. } else if (!data[i]) {
  2409. delete data[i];
  2410. }
  2411. }
  2412. $.ajax({
  2413. method: "get",
  2414. dataType: "json",
  2415. crossDomain: false,
  2416. url: globalConfig.context + "/api/admin/release/publicReleaseDtails/export",
  2417. data,
  2418. success: function (data) {
  2419. if (data.error.length === 0) {
  2420. this.download(data.data);
  2421. } else {
  2422. message.warning(data.error[0].message);
  2423. }
  2424. }.bind(this),
  2425. }).always(
  2426. function () {
  2427. loading();
  2428. this.setState({
  2429. exportPendingLoading: false,
  2430. });
  2431. }.bind(this)
  2432. );
  2433. },
  2434. // 下载
  2435. download(fileName) {
  2436. window.location.href =
  2437. globalConfig.context + "/open/download?fileName=" + fileName;
  2438. },
  2439. checkRemark(record) {
  2440. this.setState({
  2441. checkVisible: true,
  2442. checkOrderNo: record.orderNo,
  2443. });
  2444. },
  2445. checkOk() {
  2446. if (this.state.checkData == "" || this.state.checkData == undefined) {
  2447. message.warning("请填写审核内容");
  2448. return;
  2449. }
  2450. this.setState({
  2451. loading: true,
  2452. });
  2453. let ajaxObj = $.ajax({
  2454. method: "post",
  2455. dataType: "json",
  2456. crossDomain: false,
  2457. url: globalConfig.context + "/api/admin/financial/financeApproval",
  2458. data: {
  2459. orderNo: this.state.checkOrderNo,
  2460. remarks: this.state.checkData,
  2461. },
  2462. success: function (data) {
  2463. let theArr = [];
  2464. if (!data.data) {
  2465. if (data.error && data.error.length) {
  2466. message.warning(data.error[0].message);
  2467. }
  2468. } else {
  2469. message.success("通过成功!");
  2470. this.loadData();
  2471. this.setState({
  2472. checkVisible: false,
  2473. checkData: "",
  2474. });
  2475. }
  2476. }.bind(this),
  2477. }).always(
  2478. function () {
  2479. this.setState({
  2480. loading: false,
  2481. financeApprovalAjaxObj: null
  2482. });
  2483. }.bind(this)
  2484. );
  2485. this.setState({
  2486. financeApprovalAjaxObj: ajaxObj
  2487. })
  2488. },
  2489. tableRowClickPro(record) {
  2490. this.setState({
  2491. pvisible: true,
  2492. record,
  2493. });
  2494. },
  2495. kaiPiaoData(record) {
  2496. this.setState({
  2497. avisible: true,
  2498. });
  2499. this.invoiceData(record.id)
  2500. },
  2501. invoiceData(id) {
  2502. this.setState({
  2503. loading: true,
  2504. });
  2505. $.ajax({
  2506. method: "get",
  2507. dataType: "json",
  2508. crossDomain: false,
  2509. url:
  2510. globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
  2511. data: {
  2512. id,
  2513. },
  2514. success: function (data) {
  2515. let thisdata = data.data;
  2516. let obj = {
  2517. contractNo: thisdata.contractNo,
  2518. orderNo: thisdata.orderNo,
  2519. approval: thisdata.approval,
  2520. type: thisdata.type,
  2521. status: thisdata.status,
  2522. remarks: thisdata.remarks,
  2523. invoiceType: thisdata.invoiceType,
  2524. unitName: thisdata.unitName,
  2525. taxNumber: thisdata.taxNumber,
  2526. amount: thisdata.amount,
  2527. banks: thisdata.banks,
  2528. content: thisdata.content,
  2529. unitAddress: thisdata.unitAddress,
  2530. invoiceRemarks: thisdata.invoiceRemarks,
  2531. unitMobile: thisdata.unitMobile,
  2532. post: thisdata.post,
  2533. addressee: thisdata.addressee,
  2534. addresseeMobile: thisdata.addresseeMobile,
  2535. addresseeProvince: thisdata.addresseeProvince,
  2536. addresseeCity: thisdata.addresseeCity,
  2537. addresseeArea: thisdata.addresseeArea,
  2538. alreadyAmount: thisdata.alreadyAmount,
  2539. recipientAddress: thisdata.recipientAddress,
  2540. orgCodeUrl: thisdata.voucherUrl
  2541. ? splitUrl(
  2542. thisdata.voucherUrl,
  2543. ",",
  2544. globalConfig.avatarHost + "/upload"
  2545. )
  2546. : [],
  2547. };
  2548. this.setState({
  2549. modalData: obj,
  2550. });
  2551. }.bind(this),
  2552. }).done(
  2553. function () {
  2554. this.setState({
  2555. loading: false,
  2556. });
  2557. }.bind(this)
  2558. );
  2559. },
  2560. visitCancels() {
  2561. this.setState({
  2562. avisible: false
  2563. })
  2564. },
  2565. selectAuto(value, options) {
  2566. this.setState({
  2567. auto: value,
  2568. });
  2569. },
  2570. selectAuto1(value, options) {
  2571. this.setState({
  2572. auto1: value,
  2573. });
  2574. },
  2575. blurChange(e) {
  2576. let theType = "";
  2577. let contactLists = this.state.customerArr || [];
  2578. if (e) {
  2579. contactLists.map(function (item) {
  2580. if (item.name == e.toString()) {
  2581. theType = item.id;
  2582. }
  2583. });
  2584. }
  2585. this.setState({
  2586. theTypes: theType,
  2587. });
  2588. },
  2589. blurChange1(e) {
  2590. let theType = "";
  2591. let contactLists = this.state.customerArr1 || [];
  2592. if (e) {
  2593. contactLists.map(function (item) {
  2594. if (item.name == e.toString()) {
  2595. theType = item.id;
  2596. }
  2597. });
  2598. }
  2599. this.setState({
  2600. theTypes1: theType,
  2601. });
  2602. },
  2603. httpChange(e) {
  2604. if (e.length >= 1) {
  2605. this.supervisor(e);
  2606. }
  2607. this.setState({
  2608. auto: e,
  2609. });
  2610. },
  2611. httpChange1(e) {
  2612. if (e.length >= 1) {
  2613. this.supervisor1(e);
  2614. }
  2615. this.setState({
  2616. auto1: e,
  2617. });
  2618. },
  2619. supervisor(e) {
  2620. $.ajax({
  2621. method: "get",
  2622. dataType: "json",
  2623. crossDomain: false,
  2624. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  2625. data: {
  2626. adminName: e,
  2627. },
  2628. success: function (data) {
  2629. if (data.error && data.error.length === 0) {
  2630. this.setState({
  2631. customerArr: data.data,
  2632. });
  2633. } else {
  2634. message.warning(data.error[0].message);
  2635. }
  2636. }.bind(this),
  2637. }).always(function () { }.bind(this));
  2638. },
  2639. supervisor1(e) {
  2640. $.ajax({
  2641. method: "get",
  2642. dataType: "json",
  2643. crossDomain: false,
  2644. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  2645. data: {
  2646. adminName: e,
  2647. },
  2648. success: function (data) {
  2649. if (data.error && data.error.length === 0) {
  2650. this.setState({
  2651. customerArr1: data.data,
  2652. });
  2653. } else {
  2654. message.warning(data.error[0].message);
  2655. }
  2656. }.bind(this),
  2657. }).always(function () { }.bind(this));
  2658. },
  2659. render() {
  2660. const formItemLayout = {
  2661. labelCol: { span: 8 },
  2662. wrapperCol: { span: 14 },
  2663. };
  2664. const { RangePicker } = DatePicker;
  2665. var departmentArr = this.state.departmentArr || [];
  2666. const { loading, selectedRowKeys, visible } = this.state;
  2667. const rowSelection = {
  2668. selectedRowKeys,
  2669. onChange: this.onSelectChange,
  2670. hideDefaultSelections: true,
  2671. type: "radio",
  2672. };
  2673. const dataSources = this.state.customerArr || [];
  2674. const dataSources1 = this.state.customerArr1 || [];
  2675. const options = dataSources.map((group) => (
  2676. <Select.Option key={group.id} value={group.name}>
  2677. {group.name}
  2678. </Select.Option>
  2679. ));
  2680. const options1 = dataSources1.map((group) => (
  2681. <Select.Option key={group.id} value={group.name}>
  2682. {group.name}
  2683. </Select.Option>
  2684. ));
  2685. return (
  2686. <div className="user-content">
  2687. {this.state.resVisible ? (
  2688. <ResolutionDetail
  2689. cancel={this.resCancel}
  2690. detail={this.state.resRecord}
  2691. visible={this.state.resVisible}
  2692. id={this.state.resRecord.orderNo}
  2693. />
  2694. ) : (
  2695. ""
  2696. )}
  2697. <div className="content-title" style={{ marginBottom: 10 }}>
  2698. <span style={{ fontWeight: 900, fontSize: 16 }}>收款结算</span>
  2699. </div>
  2700. <Tabs defaultActiveKey="2" onChange={this.callback} className="test">
  2701. <TabPane tab="更改表格显示数据" key="1">
  2702. <div style={{ marginLeft: 10 }}>
  2703. <ChooseList
  2704. columns={this.state.columns}
  2705. changeFn={this.changeList}
  2706. changeList={this.state.changeList}
  2707. top={55}
  2708. margin={11}
  2709. />
  2710. </div>
  2711. </TabPane>
  2712. <TabPane tab="搜索" key="2">
  2713. <div className="user-search" style={{ padding: "0 20px 0 10px" }}>
  2714. <Input
  2715. style={{ width: 200 }}
  2716. placeholder="订单编号"
  2717. value={this.state.orderNoSearch}
  2718. onChange={(e) => {
  2719. this.setState({ orderNoSearch: e.target.value });
  2720. }}
  2721. />
  2722. <Input
  2723. style={{ width: 200 }}
  2724. placeholder="客户名称"
  2725. value={this.state.nameSearch}
  2726. onChange={(e) => {
  2727. this.setState({ nameSearch: e.target.value });
  2728. }}
  2729. />
  2730. <Cascaders
  2731. ref={node => this.Cascaders = node}
  2732. placeholder="订单部门"
  2733. id="id"
  2734. name="name"
  2735. children="list"
  2736. height={28}
  2737. onSel={(e) => {
  2738. this.setState({
  2739. departmenttList: JSON.stringify(e),
  2740. });
  2741. }}
  2742. />
  2743. {/* <Select
  2744. placeholder="订单部门"
  2745. style={{ width: 190, marginRight: 10 }}
  2746. value={this.state.departmenttList}
  2747. onChange={(e) => {
  2748. this.setState({ departmenttList: e });
  2749. }}
  2750. >
  2751. {departmentArr.map(function (item) {
  2752. return (
  2753. <Select.Option key={item.id}>{item.name}</Select.Option>
  2754. );
  2755. })}
  2756. </Select> */}
  2757. <Input
  2758. style={{ width: 200 }}
  2759. placeholder="合同编号"
  2760. value={this.state.contractNoSearch}
  2761. onChange={(e) => {
  2762. this.setState({
  2763. contractNoSearch: e.target.value,
  2764. });
  2765. }}
  2766. />
  2767. <Select
  2768. placeholder="流程状态"
  2769. onChange={(e) => {
  2770. this.setState({ processStatusSearch: e });
  2771. }}
  2772. style={{ width: 150, marginRight: 10 }}
  2773. value={this.state.processStatusSearch}
  2774. >
  2775. <Option value="3">未分配</Option>
  2776. <Option value="4">已分配</Option>
  2777. <Option value="9">已驳回</Option>
  2778. </Select>
  2779. <Select
  2780. placeholder="结算状态"
  2781. onChange={(e) => {
  2782. this.setState({ liquidationStatus: e });
  2783. }}
  2784. style={{ width: 150, marginRight: 10 }}
  2785. value={this.state.liquidationStatus}
  2786. >
  2787. <Option value="0">首付待付清</Option>
  2788. <Option value="1">尾款待付清</Option>
  2789. <Option value="2">已付清</Option>
  2790. </Select>
  2791. <Select
  2792. style={{ width: 150 }}
  2793. placeholder="签单金额"
  2794. value={this.state.amountStatus}
  2795. onChange={(e) => {
  2796. this.setState({
  2797. amountStatus: e,
  2798. });
  2799. }}
  2800. >
  2801. <Option value="0">10万元以下</Option>
  2802. <Option value="1">10~20万元</Option>
  2803. <Option value="2">20~30万元</Option>
  2804. <Option value="3">30~40万元</Option>
  2805. <Option value="4">40万元以上</Option>
  2806. </Select>
  2807. <Select
  2808. style={{ width: 150 }}
  2809. placeholder="特批状态"
  2810. value={this.state.approval}
  2811. onChange={(e) => {
  2812. this.setState({
  2813. approval: e,
  2814. });
  2815. }}
  2816. >
  2817. <Option value="0">非特批</Option>
  2818. <Option value="1">特批待审</Option>
  2819. <Option value="2">特批通过</Option>
  2820. <Option value="4">全部特批</Option>
  2821. </Select>
  2822. <Select
  2823. style={{ width: 150 }}
  2824. placeholder="会员状态"
  2825. value={this.state.projectType}
  2826. onChange={(e) => {
  2827. this.setState({
  2828. projectType: e,
  2829. });
  2830. }}
  2831. >
  2832. <Option value="1">会员</Option>
  2833. <Option value="0">非会员</Option>
  2834. </Select>
  2835. <span style={{}}>下单日期:</span>
  2836. <RangePicker
  2837. value={[
  2838. this.state.releaseDate[0]
  2839. ? moment(this.state.releaseDate[0])
  2840. : null,
  2841. this.state.releaseDate[1]
  2842. ? moment(this.state.releaseDate[1])
  2843. : null,
  2844. ]}
  2845. onChange={(data, dataString) => {
  2846. this.setState({ releaseDate: dataString });
  2847. }}
  2848. />
  2849. <span style={{ marginLeft: 10 }}>最近收款:</span>
  2850. <RangePicker
  2851. value={[
  2852. this.state.shouKuanDate[0]
  2853. ? moment(this.state.shouKuanDate[0])
  2854. : null,
  2855. this.state.shouKuanDate[1]
  2856. ? moment(this.state.shouKuanDate[1])
  2857. : null,
  2858. ]}
  2859. onChange={(data, dataString) => {
  2860. this.setState({ shouKuanDate: dataString });
  2861. }}
  2862. />
  2863. <Button
  2864. type="primary"
  2865. onClick={this.search}
  2866. style={{ marginLeft: 10 }}
  2867. disabled={this.state.loadingA ? true : false}
  2868. >
  2869. 搜索
  2870. </Button>
  2871. <Button onClick={this.reset}>重置</Button>
  2872. </div>
  2873. </TabPane>
  2874. <TabPane tab="打印" key="3">
  2875. <Button
  2876. type="primary"
  2877. style={{ margin: "11px 0px 10px 10px" }}
  2878. onClick={this.printAll}
  2879. disabled={!this.state.dataSource.length}
  2880. >
  2881. 打印所有列表信息
  2882. </Button>
  2883. <Button
  2884. type="primary"
  2885. disabled={this.state.selectedRowKeys.length != 1}
  2886. style={{ margin: "11px 0px 10px 10px" }}
  2887. onClick={() => {
  2888. this.inRecordData();
  2889. this.setState({
  2890. bvisible: true,
  2891. });
  2892. }}
  2893. >
  2894. 打印开票详情
  2895. </Button>
  2896. <Button
  2897. type="primary"
  2898. disabled={this.state.selectedRowKeys.length != 1}
  2899. style={{ margin: "11px 0px 10px 10px" }}
  2900. onClick={() => {
  2901. this.waterData();
  2902. this.setState({
  2903. cvisible: true,
  2904. });
  2905. }}
  2906. >
  2907. 打印收款流水
  2908. </Button>
  2909. <Button
  2910. type="primary"
  2911. disabled={this.state.selectedRowKeys.length != 1}
  2912. style={{ margin: "11px 0px 10px 10px" }}
  2913. onClick={() => {
  2914. this.timeData();
  2915. this.setState({
  2916. timeVisible: true,
  2917. });
  2918. }}
  2919. >
  2920. 打印工时信息
  2921. </Button>
  2922. <Button
  2923. type="primary"
  2924. disabled={this.state.selectedRowKeys.length != 1}
  2925. style={{ margin: "11px 0px 10px 10px" }}
  2926. onClick={() => {
  2927. this.cuiData();
  2928. this.setState({
  2929. cuiVisible: true,
  2930. });
  2931. }}
  2932. >
  2933. 打印催款信息
  2934. </Button>
  2935. <Button
  2936. type="primary"
  2937. disabled={this.state.selectedRowKeys.length != 1}
  2938. style={{ margin: "11px 0px 10px 10px" }}
  2939. onClick={() => {
  2940. this.proData();
  2941. this.setState({
  2942. proVisible: true,
  2943. });
  2944. }}
  2945. >
  2946. 打印项目进度
  2947. </Button>
  2948. </TabPane>
  2949. <TabPane tab="导出Excel" key="4">
  2950. <Button
  2951. type="primary"
  2952. style={{ margin: "11px 0px 10px 10px" }}
  2953. onClick={this.exportAll}
  2954. >
  2955. 导出当前列表
  2956. </Button>
  2957. <Button
  2958. type="primary"
  2959. disabled={this.state.selectedRowKeys.length != 1}
  2960. style={{ margin: "11px 0px 10px 10px" }}
  2961. onClick={this.exportKaip}
  2962. >
  2963. 导出所选开票详情
  2964. </Button>
  2965. <Button
  2966. type="primary"
  2967. disabled={this.state.selectedRowKeys.length != 1}
  2968. style={{ margin: "11px 0px 10px 10px" }}
  2969. onClick={this.exportWater}
  2970. >
  2971. 导出所选收款详情流水
  2972. </Button>
  2973. <Button
  2974. type="primary"
  2975. disabled={this.state.selectedRowKeys.length != 1}
  2976. style={{ margin: "11px 0px 10px 10px" }}
  2977. onClick={this.exportTime}
  2978. >
  2979. 导出所选工时信息
  2980. </Button>
  2981. <Button
  2982. type="primary"
  2983. disabled={this.state.selectedRowKeys.length != 1}
  2984. style={{ margin: "11px 0px 10px 10px" }}
  2985. onClick={this.exportCui}
  2986. >
  2987. 导出催款信息
  2988. </Button>
  2989. <Button
  2990. type="primary"
  2991. disabled={this.state.selectedRowKeys.length != 1}
  2992. style={{ margin: "11px 0px 10px 10px" }}
  2993. onClick={this.exportPro}
  2994. >
  2995. 导出项目进度
  2996. </Button>
  2997. </TabPane>
  2998. <TabPane tab="查看" key="5">
  2999. <Button
  3000. type="primary"
  3001. disabled={this.state.selectedRowKeys.length != 1}
  3002. style={{ margin: "11px 0px 10px 10px" }}
  3003. onClick={() => {
  3004. this.inRecordData();
  3005. this.setState({
  3006. // bvisible: true,
  3007. newVisible: "开票历史记录",
  3008. });
  3009. }}
  3010. >
  3011. 查看开票详情
  3012. </Button>
  3013. <Button
  3014. type="primary"
  3015. disabled={this.state.selectedRowKeys.length != 1}
  3016. style={{ margin: "11px 0px 10px 10px" }}
  3017. onClick={() => {
  3018. this.waterData();
  3019. this.setState({
  3020. // cvisible: true,
  3021. newVisible: "详细收款流水",
  3022. });
  3023. }}
  3024. >
  3025. 详情收款流水
  3026. </Button>
  3027. <Button
  3028. type="primary"
  3029. disabled={this.state.selectedRowKeys.length != 1}
  3030. style={{ margin: "11px 0px 10px 10px" }}
  3031. onClick={() => {
  3032. this.timeData();
  3033. this.setState({
  3034. // timeVisible: true,
  3035. newVisible: "工时详情",
  3036. });
  3037. }}
  3038. >
  3039. 工时信息
  3040. </Button>
  3041. <Button
  3042. type="primary"
  3043. disabled={this.state.selectedRowKeys.length != 1}
  3044. style={{ margin: "11px 0px 10px 10px" }}
  3045. onClick={() => {
  3046. this.cuiData();
  3047. this.setState({
  3048. // cuiVisible: true,
  3049. newVisible: "催款详情",
  3050. });
  3051. }}
  3052. >
  3053. 催款信息
  3054. </Button>
  3055. <Button
  3056. type="primary"
  3057. disabled={this.state.selectedRowKeys.length != 1}
  3058. style={{ margin: "11px 0px 10px 10px" }}
  3059. onClick={() => {
  3060. this.proData();
  3061. this.setState({
  3062. // proVisible: true,
  3063. newVisible: "项目进度",
  3064. });
  3065. }}
  3066. >
  3067. 项目进度
  3068. </Button>
  3069. <Button
  3070. type="primary"
  3071. disabled={this.state.selectedRowKeys.length != 1}
  3072. style={{ margin: "11px 0px 10px 10px" }}
  3073. onClick={() => {
  3074. this.pubData();
  3075. this.selectSuperId();
  3076. this.setState({
  3077. // pubVisible: true,
  3078. newVisible: "公出详细列表",
  3079. });
  3080. }}
  3081. >
  3082. 查看公出
  3083. </Button>
  3084. </TabPane>
  3085. {/* <TabPane tab="批量操作" key="6">
  3086. <Button
  3087. type="primary"
  3088. disabled={this.state.selectedRowKeys.length == 0}
  3089. style={{ margin: "0px 0px 10px 10px" }}
  3090. onClick={e => {
  3091. e.stopPropagation(),
  3092. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  3093. }}
  3094. >
  3095. 转交
  3096. </Button>
  3097. </TabPane> */}
  3098. </Tabs>
  3099. <div className="patent-table">
  3100. <Spin spinning={this.state.loadingA}>
  3101. <Table
  3102. bordered
  3103. columns={
  3104. this.state.changeList == undefined
  3105. ? this.state.columns
  3106. : this.state.changeList
  3107. }
  3108. dataSource={this.state.dataSource}
  3109. rowSelection={rowSelection}
  3110. scroll={{ x: "max-content", y: 0 }}
  3111. pagination={this.state.pagination}
  3112. onRowDoubleClick={this.tableRowClick.bind(this)}
  3113. size="small"
  3114. />
  3115. </Spin>
  3116. <p
  3117. style={{ display: "inline-block", fontSize: "14px", color: "red" }}
  3118. >
  3119. {
  3120. <span style={{ marginRight: 10 }}>
  3121. {`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
  3122. </span>
  3123. }
  3124. {
  3125. <span>
  3126. {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
  3127. }`}
  3128. </span>
  3129. }
  3130. </p>
  3131. </div>
  3132. <Assign
  3133. title="任务"
  3134. selApi={"/api/admin/newOrder/updateFinance"}
  3135. data={this.state.assignDataY}
  3136. showDesc={this.state.assignVisibleY}
  3137. closeDesc={this.closeAssignY.bind(this)}
  3138. // fenpaiData={8}
  3139. specially={0}
  3140. roleName={this.state.nub}
  3141. requestMethod={"get"}
  3142. />
  3143. <OrderDesc
  3144. data={this.state.RowData}
  3145. showDesc={this.state.showDesc}
  3146. closeDesc={this.closeDesc.bind(this)}
  3147. />
  3148. <Receivable
  3149. title="收款记录"
  3150. api="/api/admin/financial/addReceiptsFlow"
  3151. data={this.state.assignDataX}
  3152. showDesc={this.state.assignVisibleX}
  3153. closeDesc={this.closeAssignX.bind(this)}
  3154. />
  3155. <Modal
  3156. visible={this.state.boHuiVisible}
  3157. width="400px"
  3158. title="驳回备注"
  3159. footer=""
  3160. onOk={this.boHuiOk}
  3161. onCancel={this.boHuiCancel}
  3162. >
  3163. <Form layout="horizontal" onSubmit={this.boHuiSubmit}>
  3164. <Spin spinning={this.state.loading}>
  3165. <FormItem
  3166. labelCol={{ span: 5 }}
  3167. wrapperCol={{ span: 16 }}
  3168. label={
  3169. <span>
  3170. <strong style={{ color: "#f00" }}>*</strong>驳回原因
  3171. </span>
  3172. }
  3173. >
  3174. <Input
  3175. type="textarea"
  3176. rows={4}
  3177. placeholder="请输入驳回原因"
  3178. value={this.state.content}
  3179. onChange={(e) => {
  3180. this.setState({ content: e.target.value });
  3181. }}
  3182. />
  3183. </FormItem>
  3184. <FormItem wrapperCol={{ span: 12, offset: 5 }}>
  3185. <Button
  3186. type="primary"
  3187. htmlType="submit"
  3188. style={{ marginRight: 20 }}
  3189. >
  3190. 驳回
  3191. </Button>
  3192. <Button
  3193. type="default"
  3194. onClick={() => {
  3195. this.boHuiCancel();
  3196. }}
  3197. >
  3198. 取消
  3199. </Button>
  3200. </FormItem>
  3201. </Spin>
  3202. </Form>
  3203. </Modal>
  3204. <Modal
  3205. visible={this.state.bvisible}
  3206. footer=""
  3207. title="开票历史记录"
  3208. className="admin-desc-content"
  3209. width="1200px"
  3210. onCancel={this.inRecordCanl}
  3211. >
  3212. <Spin spinning={this.state.loading}>
  3213. <div
  3214. className="patent-table"
  3215. ref={(e) => {
  3216. this.refs.kaiPiao = e;
  3217. }}
  3218. >
  3219. <Table
  3220. columns={this.state.columnsDate}
  3221. dataSource={this.state.recordData}
  3222. onRowClick={this.kaiPiaoData}
  3223. pagination={false}
  3224. bordered
  3225. size="small"
  3226. />
  3227. <div className="clearfix" style={{ marginTop: "20px" }}>
  3228. <FormItem
  3229. className="half-item"
  3230. {...formItemLayout}
  3231. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  3232. >
  3233. <span>{this.state.sum + "(万元)"}</span>
  3234. </FormItem>
  3235. </div>
  3236. <ReactToPrint
  3237. trigger={() => (
  3238. <Button
  3239. type="primary"
  3240. style={{
  3241. float: "right",
  3242. // marginTop: 10,
  3243. position: "absolute",
  3244. top: -54,
  3245. right: 30,
  3246. }}
  3247. >
  3248. 打印
  3249. </Button>
  3250. )}
  3251. content={() => this.refs.kaiPiao}
  3252. />
  3253. </div>
  3254. </Spin>
  3255. </Modal>
  3256. <Modal
  3257. visible={this.state.cvisible}
  3258. footer=""
  3259. title="详细收款流水"
  3260. className="admin-desc-content"
  3261. width="1300px"
  3262. onCancel={this.waterCanl}
  3263. >
  3264. <Spin spinning={this.state.loading}>
  3265. <div
  3266. className="patent-table"
  3267. ref={(e) => {
  3268. this.refs.shouKuan = e;
  3269. }}
  3270. >
  3271. <Table
  3272. columns={this.state.waterlistDate}
  3273. dataSource={this.state.waterData}
  3274. pagination={false}
  3275. scroll={{ x: "max-content", y: 0 }}
  3276. bordered
  3277. size="small"
  3278. />
  3279. <div className="clearfix" style={{ marginTop: "20px" }}>
  3280. <FormItem
  3281. className="half-item"
  3282. {...formItemLayout}
  3283. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  3284. >
  3285. <span>{this.state.waterSum + "(万元)"}</span>
  3286. </FormItem>
  3287. </div>
  3288. <ReactToPrint
  3289. trigger={() => (
  3290. <Button
  3291. type="primary"
  3292. style={{
  3293. float: "right",
  3294. position: "absolute",
  3295. top: -54,
  3296. right: 30,
  3297. }}
  3298. >
  3299. 打印
  3300. </Button>
  3301. )}
  3302. content={() => this.refs.shouKuan}
  3303. />
  3304. </div>
  3305. </Spin>
  3306. </Modal>
  3307. <Modal
  3308. visible={this.state.dvisible}
  3309. footer=""
  3310. title="所有列表信息"
  3311. className="admin-desc-content"
  3312. width="1300px"
  3313. onCancel={() => {
  3314. this.loadData();
  3315. this.setState({
  3316. dvisible: false,
  3317. });
  3318. }}
  3319. >
  3320. <Spin spinning={this.state.loading}>
  3321. <div
  3322. className="patent-table"
  3323. style={{
  3324. // width: 900,
  3325. // position: "relative",
  3326. // left: "50%",
  3327. // transform: "translate(-50%)",
  3328. padding: "25px 0 30px 30px",
  3329. }}
  3330. ref={(e) => {
  3331. this.refs.all = e;
  3332. }}
  3333. >
  3334. <Table
  3335. columns={this.state.printColumns}
  3336. dataSource={this.state.dataSource}
  3337. pagination={false}
  3338. bordered
  3339. size="small"
  3340. />
  3341. </div>
  3342. </Spin>
  3343. <ReactToPrint
  3344. trigger={() => (
  3345. <Button
  3346. type="primary"
  3347. style={{
  3348. float: "right",
  3349. marginTop: 10,
  3350. position: "absolute",
  3351. top: 0,
  3352. right: 30,
  3353. }}
  3354. >
  3355. 打印
  3356. </Button>
  3357. )}
  3358. content={() => this.refs.all}
  3359. />
  3360. </Modal>
  3361. <Project
  3362. record={this.state.record}
  3363. visible={this.state.pvisible}
  3364. isAuditPayment={true}
  3365. cancel={() => {
  3366. this.setState({ pvisible: false });
  3367. }}
  3368. />
  3369. {/* 工时详情 */}
  3370. <Modal
  3371. visible={this.state.timeVisible}
  3372. footer=""
  3373. title="工时详情"
  3374. className="admin-desc-content"
  3375. width="1300px"
  3376. pagination={false}
  3377. onCancel={() => {
  3378. this.loadData();
  3379. this.setState({
  3380. timeVisible: false,
  3381. });
  3382. }}
  3383. >
  3384. <Spin spinning={this.state.loading}>
  3385. <div
  3386. className="patent-table"
  3387. style={
  3388. {
  3389. // width: 900,
  3390. // position: "relative",
  3391. // left: "50%",
  3392. // transform: "translate(-50%)",
  3393. // padding: "25px 0 30px 30px"
  3394. }
  3395. }
  3396. ref={(e) => {
  3397. this.refs.all = e;
  3398. }}
  3399. >
  3400. <Table
  3401. columns={this.state.timeColumns}
  3402. dataSource={this.state.timeDataList}
  3403. onRowClick={this.tableRowClickPro}
  3404. scroll={{ x: "max-content", y: 0 }}
  3405. pagination={false}
  3406. bordered
  3407. size="small"
  3408. />
  3409. </div>
  3410. </Spin>
  3411. <ReactToPrint
  3412. trigger={() => (
  3413. <Button
  3414. type="primary"
  3415. style={{
  3416. float: "right",
  3417. marginTop: 10,
  3418. position: "absolute",
  3419. top: 0,
  3420. right: 30,
  3421. }}
  3422. >
  3423. 打印
  3424. </Button>
  3425. )}
  3426. content={() => this.refs.all}
  3427. />
  3428. </Modal>
  3429. {/* 催款详情 */}
  3430. <Modal
  3431. visible={this.state.cuiVisible}
  3432. footer=""
  3433. title="催款详情"
  3434. className="admin-desc-content"
  3435. width="1300px"
  3436. pagination={false}
  3437. onCancel={() => {
  3438. this.loadData();
  3439. this.setState({
  3440. cuiVisible: false,
  3441. cuiTabKey: "1",
  3442. });
  3443. }}
  3444. >
  3445. <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  3446. <TabPane tab="催款节点" key="1">
  3447. <Spin spinning={this.state.loading}>
  3448. <div
  3449. className="patent-table"
  3450. ref={(e) => {
  3451. this.refs.all = e;
  3452. }}
  3453. >
  3454. <Table
  3455. columns={this.state.cuiColumns}
  3456. dataSource={this.state.cuiDataList}
  3457. scroll={{ x: "max-content", y: 0 }}
  3458. pagination={false}
  3459. bordered
  3460. size="small"
  3461. />
  3462. </div>
  3463. <ReactToPrint
  3464. trigger={() => (
  3465. <Button
  3466. type="primary"
  3467. style={{
  3468. float: "right",
  3469. marginTop: 10,
  3470. position: "absolute",
  3471. top: "-60px",
  3472. right: 30,
  3473. }}
  3474. >
  3475. 打印
  3476. </Button>
  3477. )}
  3478. content={() => this.refs.all}
  3479. />
  3480. </Spin>
  3481. </TabPane>
  3482. <TabPane tab="欠款催收记录" key="2">
  3483. <Spin spinning={this.state.loading}>
  3484. <div
  3485. className="patent-table"
  3486. ref={(e) => {
  3487. this.refs.all = e;
  3488. }}
  3489. >
  3490. <Table
  3491. columns={this.state.qianColumns}
  3492. dataSource={this.state.qianDataList}
  3493. scroll={{ x: "max-content", y: 0 }}
  3494. pagination={false}
  3495. bordered
  3496. size="small"
  3497. />
  3498. </div>
  3499. <ReactToPrint
  3500. trigger={() => (
  3501. <Button
  3502. type="primary"
  3503. style={{
  3504. float: "right",
  3505. marginTop: 10,
  3506. position: "absolute",
  3507. top: "-60px",
  3508. right: 30,
  3509. }}
  3510. >
  3511. 打印
  3512. </Button>
  3513. )}
  3514. content={() => this.refs.all}
  3515. />
  3516. </Spin>
  3517. </TabPane>
  3518. </Tabs>
  3519. </Modal>
  3520. {/* 项目进度 */}
  3521. <Modal
  3522. visible={this.state.proVisible}
  3523. footer=""
  3524. title="项目进度"
  3525. className="admin-desc-content"
  3526. width="1300px"
  3527. pagination={false}
  3528. onCancel={() => {
  3529. this.loadData(this.state.page);
  3530. this.setState({
  3531. proVisible: false,
  3532. });
  3533. }}
  3534. >
  3535. <Spin spinning={this.state.loading}>
  3536. <div
  3537. className="patent-table"
  3538. ref={(e) => {
  3539. this.refs.all = e;
  3540. }}
  3541. >
  3542. <Table
  3543. columns={this.state.proColumns}
  3544. dataSource={this.state.proDataList}
  3545. scroll={{ x: "max-content", y: 0 }}
  3546. onRowClick={this.tableRowClickPro}
  3547. pagination={false}
  3548. bordered
  3549. size="small"
  3550. />
  3551. </div>
  3552. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  3553. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  3554. </span>
  3555. </Spin>
  3556. <ReactToPrint
  3557. trigger={() => (
  3558. <Button
  3559. type="primary"
  3560. style={{
  3561. float: "right",
  3562. marginTop: 10,
  3563. position: "absolute",
  3564. top: 0,
  3565. right: 30,
  3566. }}
  3567. >
  3568. 打印
  3569. </Button>
  3570. )}
  3571. content={() => this.refs.all}
  3572. />
  3573. </Modal>
  3574. {/* 查看公出 */}
  3575. <Modal
  3576. visible={this.state.pubVisible}
  3577. footer=""
  3578. title={<span>公出详细列表(
  3579. {this.state.selectedRows.length > 0 && this.state.selectedRows[0].buyerName}
  3580. )</span>}
  3581. className="admin-desc-content"
  3582. width="1500px"
  3583. pagination={false}
  3584. onCancel={() => {
  3585. this.pubData();
  3586. this.setState({
  3587. pubVisible: false,
  3588. });
  3589. }}
  3590. >
  3591. <div
  3592. className="user-search"
  3593. style={{
  3594. marginTop: "10px",
  3595. marginLeft: "10px",
  3596. marginRight: "10px",
  3597. }}
  3598. >
  3599. <span style={{ marginRight: "10px" }}>
  3600. <Select
  3601. placeholder="请选择审核状态"
  3602. style={{ width: 120 }}
  3603. value={this.state.status}
  3604. onChange={(e) => {
  3605. this.setState({ status: e });
  3606. }}
  3607. >
  3608. {clockState.map((v, k) => (
  3609. <Select.Option key={k} value={v.id}>
  3610. {v.title}
  3611. </Select.Option>
  3612. ))}
  3613. </Select>
  3614. </span>
  3615. <span style={{ marginRight: "10px" }}>
  3616. <Select
  3617. placeholder="请选择打卡状态"
  3618. style={{ width: 120 }}
  3619. value={this.state.clockIn}
  3620. onChange={(e) => {
  3621. this.setState({ clockIn: e });
  3622. }}
  3623. >
  3624. <Select.Option value={1}>已打卡</Select.Option>
  3625. <Select.Option value={0}>未打卡</Select.Option>
  3626. </Select>
  3627. </span>
  3628. <span style={{ marginRight: "10px" }}>
  3629. <Select
  3630. placeholder="请选择公出类型"
  3631. style={{ width: 120 }}
  3632. value={this.state.type}
  3633. onChange={(e) => {
  3634. this.setState({ type: e });
  3635. }}
  3636. >
  3637. <Select.Option value={0}>业务打卡</Select.Option>
  3638. <Select.Option value={1}>技术打卡</Select.Option>
  3639. <Select.Option value={2}>行政打卡</Select.Option>
  3640. <Select.Option value={3}>技术协单</Select.Option>
  3641. </Select>
  3642. </span>
  3643. <span style={{ marginRight: "10px" }}>
  3644. <AutoComplete
  3645. className="certain-category-search"
  3646. dropdownClassName="certain-category-search-dropdown"
  3647. dropdownMatchSelectWidth={false}
  3648. style={{ width: "120px" }}
  3649. dataSource={options}
  3650. placeholder="输入公出申请人"
  3651. value={this.state.auto}
  3652. onChange={this.httpChange}
  3653. filterOption={true}
  3654. onBlur={this.blurChange}
  3655. onSelect={this.selectAuto}
  3656. >
  3657. <Input />
  3658. </AutoComplete>
  3659. </span>
  3660. <span style={{ marginRight: "10px" }}>
  3661. <AutoComplete
  3662. className="certain-category-search"
  3663. dropdownClassName="certain-category-search-dropdown"
  3664. dropdownMatchSelectWidth={false}
  3665. style={{ width: "120px" }}
  3666. dataSource={options1}
  3667. placeholder="输入跟单人"
  3668. value={this.state.auto1}
  3669. onChange={this.httpChange1}
  3670. filterOption={true}
  3671. onBlur={this.blurChange1}
  3672. onSelect={this.selectAuto1}
  3673. >
  3674. <Input />
  3675. </AutoComplete>
  3676. </span>
  3677. <span style={{ marginRight: "10px" }}>
  3678. <Select
  3679. placeholder="请选择公出部门"
  3680. style={{ width: 200 }}
  3681. value={this.state.depId}
  3682. onChange={(e) => {
  3683. this.setState({ depId: e });
  3684. }}
  3685. notFoundContent="未获取到上级组织列表"
  3686. >
  3687. {this.state.contactsOption}
  3688. </Select>
  3689. </span>
  3690. <span style={{ marginRight: "10px" }}>
  3691. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  3692. 公出时间 :
  3693. </span>
  3694. <RangePicker
  3695. style={{ marginRight: "10px", marginBottom: "10px" }}
  3696. value={[
  3697. this.state.releaseDate[0]
  3698. ? moment(this.state.releaseDate[0])
  3699. : null,
  3700. this.state.releaseDate[1]
  3701. ? moment(this.state.releaseDate[1])
  3702. : null,
  3703. ]}
  3704. onChange={(data, dataString) => {
  3705. this.setState({ releaseDate: dataString });
  3706. }}
  3707. />
  3708. </span>
  3709. <Button
  3710. type="primary"
  3711. onClick={() => {
  3712. this.pubData();
  3713. }}
  3714. style={{ marginRight: "10px", marginBottom: "10px" }}
  3715. >
  3716. 搜索
  3717. </Button>
  3718. <Button
  3719. onClick={this.resetAll}
  3720. style={{ marginRight: "10px", marginBottom: "10px" }}
  3721. >
  3722. 重置
  3723. </Button>
  3724. </div>
  3725. <Spin spinning={this.state.loading}>
  3726. <div
  3727. className="patent-table"
  3728. ref={(e) => {
  3729. this.refs.all = e;
  3730. }}
  3731. >
  3732. <Table
  3733. columns={this.state.pubColumns}
  3734. dataSource={this.state.pubDataList}
  3735. scroll={{ x: "max-content", y: 0 }}
  3736. pagination={false}
  3737. bordered
  3738. size="small"
  3739. />
  3740. </div>
  3741. </Spin>
  3742. <Button
  3743. type="primary"
  3744. style={{
  3745. float: "right",
  3746. marginTop: 10,
  3747. position: "absolute",
  3748. top: 0,
  3749. right: 120,
  3750. }}
  3751. loading={this.state.exportPendingLoading}
  3752. onClick={() => { this.pubexportExec() }}
  3753. >
  3754. 导出
  3755. </Button>
  3756. <ReactToPrint
  3757. trigger={() => (
  3758. <Button
  3759. type="primary"
  3760. style={{
  3761. float: "right",
  3762. marginTop: 10,
  3763. position: "absolute",
  3764. top: 0,
  3765. right: 30,
  3766. }}
  3767. >
  3768. 打印
  3769. </Button>
  3770. )}
  3771. content={() => this.refs.all}
  3772. />
  3773. </Modal>
  3774. <Spin spinning={this.state.loading}>
  3775. {this.state.checkVisible ? <Modal
  3776. title="审核订单"
  3777. visible={this.state.checkVisible}
  3778. onOk={this.checkOk}
  3779. confirmLoading={this.state.loading}
  3780. okText={"通过"}
  3781. onCancel={() => {
  3782. this.state.financeApprovalAjaxObj ? this.state.financeApprovalAjaxObj.abort() : null;
  3783. this.setState({
  3784. financeApprovalAjaxObj: null
  3785. })
  3786. this.loadData();
  3787. this.setState({
  3788. checkVisible: false,
  3789. checkData: "",
  3790. });
  3791. }}
  3792. >
  3793. <TextArea
  3794. value={this.state.checkData}
  3795. onChange={(e, recard) => {
  3796. this.setState({
  3797. checkData: e.target.value,
  3798. });
  3799. }}
  3800. placeholder="请填写审核内容"
  3801. />
  3802. </Modal> : <div />}
  3803. </Spin>
  3804. <KaiPiaoModal
  3805. visible={this.state.avisible}
  3806. data={this.state.modalData}
  3807. onCancel={this.visitCancels}
  3808. loading={this.state.loading}
  3809. />
  3810. {/* 合并查看 */}
  3811. {
  3812. this.state.newVisible != "" &&
  3813. <Modal
  3814. visible={this.state.newVisible != ""}
  3815. footer=""
  3816. title={this.state.newVisible}
  3817. className="admin-desc-content"
  3818. width="1500px"
  3819. pagination={false}
  3820. onCancel={() => {
  3821. this.setState({
  3822. newVisible: "",
  3823. });
  3824. }}
  3825. >
  3826. <Spin spinning={this.state.loading}>
  3827. <div style={{ margin: 20 }}>
  3828. <div style={{ marginBottom: 20 }}>
  3829. <Table
  3830. bordered
  3831. columns={this.state.columns}
  3832. dataSource={this.state.newData}
  3833. scroll={{ x: "max-content", y: 0 }}
  3834. pagination={false}
  3835. onRowDoubleClick={this.tableRowClick.bind(this)}
  3836. size="small"
  3837. />
  3838. </div>
  3839. <div>
  3840. <Button
  3841. type="primary"
  3842. style={{
  3843. margin: "11px 0px 10px 10px",
  3844. background: this.state.newVisible == "开票历史记录" ? "#f04134" : "",
  3845. }}
  3846. onClick={() => {
  3847. this.inRecordData();
  3848. this.setState({
  3849. newVisible: "开票历史记录"
  3850. });
  3851. }}
  3852. >
  3853. 查看开票详情
  3854. </Button>
  3855. <Button
  3856. type="primary"
  3857. style={{
  3858. margin: "11px 0px 10px 10px",
  3859. background: this.state.newVisible == "详细收款流水" ? "#f04134" : "",
  3860. }}
  3861. onClick={() => {
  3862. this.waterData();
  3863. this.setState({
  3864. newVisible: "详细收款流水",
  3865. });
  3866. }}
  3867. >
  3868. 详情收款流水
  3869. </Button>
  3870. <Button
  3871. type="primary"
  3872. style={{
  3873. margin: "11px 0px 10px 10px",
  3874. background: this.state.newVisible == "工时详情" ? "#f04134" : "",
  3875. }}
  3876. onClick={() => {
  3877. this.timeData();
  3878. this.setState({
  3879. newVisible: "工时详情",
  3880. });
  3881. }}
  3882. >
  3883. 工时信息
  3884. </Button>
  3885. <Button
  3886. type="primary"
  3887. style={{
  3888. margin: "11px 0px 10px 10px",
  3889. background: this.state.newVisible == "催款详情" ? "#f04134" : "",
  3890. }}
  3891. onClick={() => {
  3892. this.cuiData();
  3893. this.setState({
  3894. newVisible: "催款详情",
  3895. });
  3896. }}
  3897. >
  3898. 催款信息
  3899. </Button>
  3900. <Button
  3901. type="primary"
  3902. style={{
  3903. margin: "11px 0px 10px 10px",
  3904. background: this.state.newVisible == "项目进度" ? "#f04134" : "",
  3905. }}
  3906. onClick={() => {
  3907. this.proData();
  3908. this.setState({
  3909. newVisible: "项目进度",
  3910. });
  3911. }}
  3912. >
  3913. 项目进度
  3914. </Button>
  3915. <Button
  3916. type="primary"
  3917. style={{
  3918. margin: "11px 0px 10px 10px",
  3919. background: this.state.newVisible == "公出详细列表" ? "#f04134" : "",
  3920. }}
  3921. onClick={() => {
  3922. this.pubData();
  3923. this.selectSuperId();
  3924. this.setState({
  3925. newVisible: "公出详细列表",
  3926. });
  3927. }}
  3928. >
  3929. 查看公出
  3930. </Button>
  3931. </div>
  3932. {
  3933. this.state.newVisible == "公出详细列表" &&
  3934. <div
  3935. className="user-search"
  3936. style={{
  3937. marginTop: "10px",
  3938. marginLeft: "10px",
  3939. marginRight: "10px",
  3940. }}
  3941. >
  3942. <span style={{ marginRight: "10px" }}>
  3943. <Select
  3944. placeholder="请选择审核状态"
  3945. style={{ width: 120 }}
  3946. value={this.state.status}
  3947. onChange={(e) => {
  3948. this.setState({ status: e });
  3949. }}
  3950. >
  3951. {clockState.map((v, k) => (
  3952. <Select.Option key={k} value={v.id}>
  3953. {v.title}
  3954. </Select.Option>
  3955. ))}
  3956. </Select>
  3957. </span>
  3958. <span style={{ marginRight: "10px" }}>
  3959. <Select
  3960. placeholder="请选择打卡状态"
  3961. style={{ width: 120 }}
  3962. value={this.state.clockIn}
  3963. onChange={(e) => {
  3964. this.setState({ clockIn: e });
  3965. }}
  3966. >
  3967. <Select.Option value={1}>已打卡</Select.Option>
  3968. <Select.Option value={0}>未打卡</Select.Option>
  3969. </Select>
  3970. </span>
  3971. <span style={{ marginRight: "10px" }}>
  3972. <Select
  3973. placeholder="请选择公出类型"
  3974. style={{ width: 120 }}
  3975. value={this.state.type}
  3976. onChange={(e) => {
  3977. this.setState({ type: e });
  3978. }}
  3979. >
  3980. <Select.Option value={0}>业务打卡</Select.Option>
  3981. <Select.Option value={1}>技术打卡</Select.Option>
  3982. <Select.Option value={2}>行政打卡</Select.Option>
  3983. <Select.Option value={3}>技术协单</Select.Option>
  3984. </Select>
  3985. </span>
  3986. <span style={{ marginRight: "10px" }}>
  3987. <AutoComplete
  3988. className="certain-category-search"
  3989. dropdownClassName="certain-category-search-dropdown"
  3990. dropdownMatchSelectWidth={false}
  3991. style={{ width: "120px" }}
  3992. dataSource={options}
  3993. placeholder="输入公出申请人"
  3994. value={this.state.auto}
  3995. onChange={this.httpChange}
  3996. filterOption={true}
  3997. onBlur={this.blurChange}
  3998. onSelect={this.selectAuto}
  3999. >
  4000. <Input />
  4001. </AutoComplete>
  4002. </span>
  4003. <span style={{ marginRight: "10px" }}>
  4004. <AutoComplete
  4005. className="certain-category-search"
  4006. dropdownClassName="certain-category-search-dropdown"
  4007. dropdownMatchSelectWidth={false}
  4008. style={{ width: "120px" }}
  4009. dataSource={options1}
  4010. placeholder="输入跟单人"
  4011. value={this.state.auto1}
  4012. onChange={this.httpChange1}
  4013. filterOption={true}
  4014. onBlur={this.blurChange1}
  4015. onSelect={this.selectAuto1}
  4016. >
  4017. <Input />
  4018. </AutoComplete>
  4019. </span>
  4020. <span style={{ marginRight: "10px" }}>
  4021. <Select
  4022. placeholder="请选择公出部门"
  4023. style={{ width: 200 }}
  4024. value={this.state.depId}
  4025. onChange={(e) => {
  4026. this.setState({ depId: e });
  4027. }}
  4028. notFoundContent="未获取到上级组织列表"
  4029. >
  4030. {this.state.contactsOption}
  4031. </Select>
  4032. </span>
  4033. <span style={{ marginRight: "10px" }}>
  4034. <span style={{ marginRight: "5px", marginBottom: "10px" }}>
  4035. 公出时间 :
  4036. </span>
  4037. <RangePicker
  4038. style={{ marginRight: "10px", marginBottom: "10px" }}
  4039. value={[
  4040. this.state.releaseDate[0]
  4041. ? moment(this.state.releaseDate[0])
  4042. : null,
  4043. this.state.releaseDate[1]
  4044. ? moment(this.state.releaseDate[1])
  4045. : null,
  4046. ]}
  4047. onChange={(data, dataString) => {
  4048. this.setState({ releaseDate: dataString });
  4049. }}
  4050. />
  4051. </span>
  4052. <Button
  4053. type="primary"
  4054. onClick={() => {
  4055. this.pubData();
  4056. }}
  4057. style={{ marginRight: "10px", marginBottom: "10px" }}
  4058. >
  4059. 搜索
  4060. </Button>
  4061. <Button
  4062. onClick={this.resetAll}
  4063. style={{ marginRight: "10px", marginBottom: "10px" }}
  4064. >
  4065. 重置
  4066. </Button>
  4067. </div>
  4068. }
  4069. {
  4070. this.state.newVisible == "催款详情"
  4071. ? <Tabs activeKey={this.state.cuiTabKey} onChange={this.cuiTabChange}>
  4072. <TabPane tab="催款节点" key="1">
  4073. <Spin spinning={this.state.loading}>
  4074. <div
  4075. className="patent-table"
  4076. ref={(e) => {
  4077. this.refs.all = e;
  4078. }}
  4079. >
  4080. <Table
  4081. columns={this.state.cuiColumns}
  4082. dataSource={this.state.cuiDataList}
  4083. scroll={{ x: "max-content", y: 0 }}
  4084. pagination={false}
  4085. bordered
  4086. size="small"
  4087. />
  4088. </div>
  4089. <Button
  4090. type="primary"
  4091. style={{
  4092. float: "right",
  4093. marginTop: 10,
  4094. position: "absolute",
  4095. top: "-60px",
  4096. right: "100px",
  4097. }}
  4098. loading={this.state.exportPendingLoading}
  4099. onClick={() => { this.exportCui() }}
  4100. >
  4101. 导出
  4102. </Button>
  4103. <ReactToPrint
  4104. trigger={() => (
  4105. <Button
  4106. type="primary"
  4107. style={{
  4108. float: "right",
  4109. marginTop: 10,
  4110. position: "absolute",
  4111. top: "-60px",
  4112. right: "10px",
  4113. }}
  4114. >
  4115. 打印
  4116. </Button>
  4117. )}
  4118. content={() => this.refs.all}
  4119. />
  4120. </Spin>
  4121. </TabPane>
  4122. <TabPane tab="欠款催收记录" key="2">
  4123. <Spin spinning={this.state.loading}>
  4124. <div
  4125. className="patent-table"
  4126. ref={(e) => {
  4127. this.refs.all = e;
  4128. }}
  4129. >
  4130. <Table
  4131. columns={this.state.qianColumns}
  4132. dataSource={this.state.qianDataList}
  4133. scroll={{ x: "max-content", y: 0 }}
  4134. pagination={false}
  4135. bordered
  4136. size="small"
  4137. />
  4138. </div>
  4139. <ReactToPrint
  4140. trigger={() => (
  4141. <Button
  4142. type="primary"
  4143. style={{
  4144. float: "right",
  4145. marginTop: 10,
  4146. position: "absolute",
  4147. top: "-60px",
  4148. right: "10px",
  4149. }}
  4150. >
  4151. 打印
  4152. </Button>
  4153. )}
  4154. content={() => this.refs.all}
  4155. />
  4156. </Spin>
  4157. </TabPane>
  4158. </Tabs>
  4159. : <div
  4160. className="patent-table"
  4161. style={{ position: "relative" }}
  4162. ref={(e) => {
  4163. this.refs.all = e;
  4164. }}
  4165. >
  4166. <Table
  4167. bordered
  4168. columns={
  4169. this.state.newVisible == "开票历史记录"
  4170. ? this.state.columnsDate : this.state.newVisible == "详细收款流水"
  4171. ? this.state.waterlistDate : this.state.newVisible == "工时详情"
  4172. ? this.state.timeColumns : this.state.newVisible == "催款详情"
  4173. ? this.state.cuiColumns : this.state.newVisible == "项目进度"
  4174. ? this.state.proColumns : this.state.newVisible == "公出详细列表"
  4175. && this.state.pubColumns
  4176. }
  4177. dataSource={
  4178. this.state.newVisible == "开票历史记录"
  4179. ? this.state.recordData : this.state.newVisible == "详细收款流水"
  4180. ? this.state.waterData : this.state.newVisible == "工时详情"
  4181. ? this.state.timeDataList : this.state.newVisible == "催款详情"
  4182. ? this.state.cuiDataList : this.state.newVisible == "项目进度"
  4183. ? this.state.proDataList : this.state.newVisible == "公出详细列表"
  4184. && this.state.pubDataList
  4185. }
  4186. pagination={false}
  4187. scroll={{ x: "max-content", y: 0 }}
  4188. size="small"
  4189. />
  4190. {
  4191. this.state.newVisible == "开票历史记录" &&
  4192. <div className="clearfix" style={{ marginTop: "20px" }}>
  4193. <FormItem
  4194. className="half-item"
  4195. {...formItemLayout}
  4196. label={<span style={{ fontSize: "14px" }}>开票总计</span>}
  4197. >
  4198. <span>{this.state.sum + "(万元)"}</span>
  4199. </FormItem>
  4200. </div>
  4201. }
  4202. {
  4203. this.state.newVisible == "开票历史记录" &&
  4204. <Button
  4205. type="primary"
  4206. style={{
  4207. float: "right",
  4208. position: "absolute",
  4209. top: "-40px",
  4210. right: "100px",
  4211. }}
  4212. loading={this.state.exportPendingLoading}
  4213. onClick={() => { this.exportKaip() }}
  4214. >
  4215. 导出
  4216. </Button>
  4217. }
  4218. {
  4219. this.state.newVisible == "开票历史记录" &&
  4220. <ReactToPrint
  4221. trigger={() => (
  4222. <Button type="primary"
  4223. style={{
  4224. float: "right",
  4225. position: "absolute",
  4226. top: "-40px",
  4227. right: "10px",
  4228. }}
  4229. >打印</Button>
  4230. )}
  4231. content={() => this.refs.kaiPiao}
  4232. />
  4233. }
  4234. {
  4235. this.state.newVisible == "详细收款流水" &&
  4236. <div className="clearfix" style={{ marginTop: "20px" }}>
  4237. <FormItem
  4238. className="half-item"
  4239. {...formItemLayout}
  4240. label={<span style={{ fontSize: "14px" }}>总计金额</span>}
  4241. >
  4242. <span>{this.state.waterSum + "(万元)"}</span>
  4243. </FormItem>
  4244. </div>
  4245. }
  4246. {
  4247. this.state.newVisible == "详细收款流水" &&
  4248. <Button
  4249. type="primary"
  4250. style={{
  4251. float: "right",
  4252. position: "absolute",
  4253. top: "-40px",
  4254. right: "100px",
  4255. }}
  4256. loading={this.state.exportPendingLoading}
  4257. onClick={() => { this.exportWater() }}
  4258. >
  4259. 导出
  4260. </Button>
  4261. }
  4262. {
  4263. this.state.newVisible == "详细收款流水" &&
  4264. <ReactToPrint
  4265. trigger={() => (
  4266. <Button
  4267. type="primary"
  4268. style={{
  4269. float: "right",
  4270. position: "absolute",
  4271. top: "-40px",
  4272. right: "10px",
  4273. }}
  4274. >
  4275. 打印
  4276. </Button>
  4277. )}
  4278. content={() => this.refs.shouKuan}
  4279. />
  4280. }
  4281. {
  4282. this.state.newVisible == "工时详情" &&
  4283. <Button
  4284. type="primary"
  4285. style={{
  4286. float: "right",
  4287. position: "absolute",
  4288. top: "-40px",
  4289. right: "100px",
  4290. }}
  4291. loading={this.state.exportPendingLoading}
  4292. onClick={() => { this.exportTime() }}
  4293. >
  4294. 导出
  4295. </Button>
  4296. }
  4297. {
  4298. this.state.newVisible == "工时详情" &&
  4299. <ReactToPrint
  4300. trigger={() => (
  4301. <Button
  4302. type="primary"
  4303. style={{
  4304. float: "right",
  4305. position: "absolute",
  4306. top: "-40px",
  4307. right: "10px",
  4308. }}
  4309. >
  4310. 打印
  4311. </Button>
  4312. )}
  4313. content={() => this.refs.all}
  4314. />
  4315. }
  4316. {
  4317. this.state.newVisible == "项目进度" &&
  4318. <span style={{ display: "block", marginTop: 10, color: "red" }}>
  4319. 外包(内部)价格总计(万元):{this.state.totalWaibao}
  4320. </span>
  4321. }
  4322. {
  4323. this.state.newVisible == "项目进度" &&
  4324. <Button
  4325. type="primary"
  4326. style={{
  4327. float: "right",
  4328. position: "absolute",
  4329. top: "-40px",
  4330. right: "100px",
  4331. }}
  4332. loading={this.state.exportPendingLoading}
  4333. onClick={() => { this.exportPro() }}
  4334. >
  4335. 导出
  4336. </Button>
  4337. }
  4338. {
  4339. this.state.newVisible == "项目进度" &&
  4340. <ReactToPrint
  4341. trigger={() => (
  4342. <Button
  4343. type="primary"
  4344. style={{
  4345. float: "right",
  4346. position: "absolute",
  4347. top: "-40px",
  4348. right: "10px",
  4349. }}
  4350. >
  4351. 打印
  4352. </Button>
  4353. )}
  4354. content={() => this.refs.all}
  4355. />
  4356. }
  4357. {
  4358. this.state.newVisible == "公出详细列表" &&
  4359. <Button
  4360. type="primary"
  4361. style={{
  4362. float: "right",
  4363. position: "absolute",
  4364. top: "-90px",
  4365. right: "100px",
  4366. }}
  4367. loading={this.state.exportPendingLoading}
  4368. onClick={() => { this.pubexportExec() }}
  4369. >
  4370. 导出
  4371. </Button>
  4372. }
  4373. {
  4374. this.state.newVisible == "公出详细列表" &&
  4375. <ReactToPrint
  4376. trigger={() => (
  4377. <Button
  4378. type="primary"
  4379. style={{
  4380. float: "right",
  4381. position: "absolute",
  4382. top: "-90px",
  4383. right: "10px",
  4384. }}
  4385. >
  4386. 打印
  4387. </Button>
  4388. )}
  4389. content={() => this.refs.all}
  4390. />
  4391. }
  4392. </div>
  4393. }
  4394. </div>
  4395. </Spin>
  4396. </Modal>
  4397. }
  4398. <textarea id="copyText" style={{ opacity: 0 }} />
  4399. </div>
  4400. );
  4401. },
  4402. });
  4403. export default ShouKuang;