shouKuang.jsx 134 KB

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