addService.jsx 219 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200
  1. import React from "react";
  2. import {
  3. Table,
  4. Modal,
  5. message,
  6. Spin,
  7. Input,
  8. Select,
  9. Button,
  10. Form,
  11. Upload,
  12. Popconfirm,
  13. AutoComplete,
  14. DatePicker,
  15. Col,
  16. Tabs,
  17. Tag
  18. } from "antd";
  19. import $ from "jquery/src/ajax";
  20. import "../userMangagement.less";
  21. import "../billing.less";
  22. import moment from "moment";
  23. import Picture from "@/manageCenter/publicComponent/picture";
  24. import ResolutionDetail from "@/resolutionDetail";
  25. import quxiao from "../../../../../image/quxiao.png";
  26. import tongguo from "../../../../../image/tongguo.png";
  27. import OrderRiZi from "@/orderRiZi.jsx";
  28. import {
  29. orderTypes,
  30. customerType,
  31. jiedian,
  32. tepi,
  33. boutique,
  34. } from "../../../dataDic.js";
  35. import {
  36. splitUrl,
  37. getProcessStatus,
  38. getLiquidationStatus,
  39. getboutique,
  40. getApprovedState,
  41. getjiedian,
  42. getCuikuan,
  43. getProjectStatus,
  44. moneyVerify,
  45. getProcessStatusNew
  46. } from "../../../tools.js";
  47. import { cuiJieDian } from "@/dataDic.js"
  48. import PicturesWall from "./changeComponent/picturesWall.js";
  49. import { changeType, getChangeType } from "./changeComponent/changeDetailYxgly";
  50. // const Options = Select.Option;
  51. const Option = AutoComplete.Option;
  52. const confirm = Modal.confirm;
  53. const NewService = Form.create()(
  54. React.createClass({
  55. //查看项目列表
  56. loadData(record) {
  57. this.state.data = [];
  58. this.setState({
  59. loading: true
  60. });
  61. $.ajax({
  62. method: "get",
  63. dataType: "json",
  64. crossDomain: false,
  65. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  66. data: {
  67. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  68. },
  69. success: function(data) {
  70. let theArr = [];
  71. if (!data.data) {
  72. if (data.error && data.error.length) {
  73. message.warning(data.error[0].message);
  74. }
  75. } else {
  76. for (let i = 0; i < data.data.length; i++) {
  77. let thisdata = data.data[i];
  78. theArr.push({
  79. key: i,
  80. id: thisdata.id,
  81. orderNo: thisdata.orderNo, //订单编号
  82. commodityId: thisdata.commodityId, //项目ID
  83. commodityName: thisdata.commodityName, //项目名称
  84. cname: thisdata.cname, //项目类别
  85. commodityPrice: thisdata.commodityPrice, //项目价格
  86. commodityQuantity: thisdata.commodityQuantity, //项目数量
  87. main: thisdata.main, //是否为主要任务
  88. taskComment: thisdata.taskComment, //任务说明
  89. contacts: thisdata.contacts, //联系人
  90. contactsMobile: thisdata.contactsMobile, //联系人电话
  91. projectStatus: thisdata.projectStatus, //项目状态
  92. sort: thisdata.cSort,
  93. splitStatus: thisdata.splitStatus
  94. });
  95. }
  96. }
  97. this.departmentList();
  98. this.setState({
  99. dataSource: theArr,
  100. pagination: false,
  101. // 禁用变更类型
  102. changeFlag: false
  103. });
  104. }.bind(this)
  105. }).always(
  106. function() {
  107. this.setState({
  108. loading: false
  109. });
  110. }.bind(this)
  111. );
  112. },
  113. //收款节点
  114. loadDatas(record) {
  115. this.state.data = [];
  116. this.setState({
  117. loading: true
  118. });
  119. $.ajax({
  120. method: "get",
  121. dataType: "json",
  122. crossDomain: false,
  123. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  124. data: {
  125. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  126. },
  127. success: function(data) {
  128. let theArr = [];
  129. if (!data.data) {
  130. if (data.error && data.error.length) {
  131. message.warning(data.error[0].message);
  132. }
  133. } else {
  134. for (let i = 0; i < data.data.length; i++) {
  135. let thisdata = data.data[i];
  136. theArr.push({
  137. key: i,
  138. id: thisdata.id
  139. });
  140. }
  141. }
  142. this.setState({
  143. dataSource: theArr,
  144. pagination: false
  145. });
  146. }.bind(this)
  147. }).always(
  148. function() {
  149. this.setState({
  150. loading: false
  151. });
  152. }.bind(this)
  153. );
  154. },
  155. getInitialState() {
  156. return {
  157. isCaoGao: false,
  158. cuiFlag: false,
  159. startRemarks: "",
  160. remarksC: "",
  161. loading: false,
  162. logData: [],
  163. visible: false,
  164. cuiDataSource: [],
  165. status: 4,
  166. orgCodeUrl: [],
  167. voucherUrl: [],
  168. customerArr: [],
  169. // 禁用变更类型转换
  170. changeFlag: false,
  171. // 合同额禁用
  172. hetongFlag: true,
  173. // 项目及催款禁用
  174. listFlag: true,
  175. mark: false,
  176. activeKey: "1",
  177. typeChange: undefined,
  178. bussStats: false,
  179. checkedKeys: [],
  180. lookflowList: [],
  181. contractUrl: [],
  182. applicationUrl: [],
  183. changeAmount: "0",
  184. active: {
  185. applySign: false,
  186. },
  187. lookState: false,
  188. signBillVisible: false,
  189. commod: "",
  190. columns: [
  191. {
  192. title: "业务项目名称",
  193. dataIndex: "commodityName",
  194. key: "commodityName",
  195. },
  196. {
  197. title: "项目类别",
  198. dataIndex: "cname",
  199. key: "cname",
  200. },
  201. {
  202. title: "项目数量",
  203. dataIndex: "commodityQuantity",
  204. key: "commodityQuantity",
  205. render: (text, record) => {
  206. if (record.splitStatus == 1) {
  207. return (
  208. <span>
  209. {text}{" "}
  210. <Tag
  211. color="#108ee9"
  212. onClick={(e) => {
  213. e.stopPropagation();
  214. this.showRes(record);
  215. }}
  216. >
  217. 已拆
  218. </Tag>
  219. </span>
  220. );
  221. } else {
  222. return text;
  223. }
  224. },
  225. },
  226. {
  227. title: "金额(万元)",
  228. dataIndex: "commodityPrice",
  229. key: "commodityPrice",
  230. },
  231. {
  232. title: "负责人",
  233. dataIndex: "contacts",
  234. key: "contacts",
  235. },
  236. {
  237. title: "负责人电话",
  238. dataIndex: "contactsMobile",
  239. key: "contactsMobile",
  240. },
  241. {
  242. title: "项目状态",
  243. dataIndex: "projectStatus",
  244. key: "projectStatus",
  245. render: (text) => {
  246. return getProjectStatus(text);
  247. },
  248. },
  249. {
  250. title: "主要项目",
  251. dataIndex: "main",
  252. key: "main",
  253. render: (text) => {
  254. return text ? "是" : "否";
  255. },
  256. },
  257. {
  258. title: "项目说明",
  259. dataIndex: "taskComment",
  260. key: "taskComment",
  261. render: (text) => {
  262. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  263. },
  264. },
  265. {
  266. title: "操作",
  267. dataIndex: "ABC",
  268. key: "ABC",
  269. render: (text, record) => {
  270. return (
  271. <div>
  272. {this.state.processStatus == 0 ? (
  273. <Button
  274. onClick={(e) => {
  275. e.stopPropagation();
  276. this.showConfirm(this.delectRow, record);
  277. }}
  278. >
  279. 删除
  280. </Button>
  281. ) : (
  282. ""
  283. )}
  284. </div>
  285. );
  286. },
  287. },
  288. ],
  289. proColumns: [
  290. {
  291. title: "变更状态",
  292. dataIndex: "type",
  293. key: "type",
  294. render: (text, record) => {
  295. let str = "";
  296. let color = "";
  297. if (text == 1) {
  298. str = "增";
  299. color = "#87d068";
  300. } else if (text == 2) {
  301. str = "改";
  302. color = "#108ee9";
  303. } else if (text == 3) {
  304. str = "删";
  305. color = "#f50";
  306. }
  307. return (
  308. <span>
  309. <Tag
  310. color={color}
  311. style={{ display: text == 0 ? "none" : "inline-block" }}
  312. >
  313. {str}
  314. </Tag>
  315. {record.splitStatus == 1 ? (
  316. <Tag color="#108ee9">父项目</Tag>
  317. ) : (
  318. ""
  319. )}
  320. {record.splitStatus == 2 ? (
  321. <Tag color="#108ee9">子项目</Tag>
  322. ) : (
  323. ""
  324. )}
  325. </span>
  326. );
  327. },
  328. },
  329. {
  330. title: "业务项目名称",
  331. dataIndex: "commodityName",
  332. key: "commodityName",
  333. render: (text, record) => {
  334. return text + "-" + record.id;
  335. },
  336. },
  337. {
  338. title: "项目类别",
  339. dataIndex: "cname",
  340. key: "cname",
  341. },
  342. {
  343. title: "项目数量",
  344. dataIndex: "commodityQuantity",
  345. key: "commodityQuantity",
  346. },
  347. {
  348. title: "金额(万元)",
  349. dataIndex: "commodityPrice",
  350. key: "commodityPrice",
  351. render: (text, record) => {
  352. if (record.splitStatus == 2) {
  353. return "/";
  354. } else {
  355. return text;
  356. }
  357. },
  358. },
  359. {
  360. title: "主要项目",
  361. dataIndex: "main",
  362. key: "main",
  363. render: (text) => {
  364. return text ? "是" : "否";
  365. },
  366. },
  367. {
  368. title: "项目负责人",
  369. dataIndex: "receiverName",
  370. key: "receiverName",
  371. },
  372. {
  373. title: "项目说明",
  374. dataIndex: "taskComment",
  375. key: "taskComment",
  376. render: (text) => {
  377. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  378. },
  379. },
  380. {
  381. title: "操作",
  382. dataIndex: "ABC",
  383. key: "ABC",
  384. render: (text, record) => {
  385. return (
  386. <div>
  387. <Button
  388. onClick={(e) => {
  389. e.stopPropagation();
  390. this.showConfirm(this.changeDeletePro, record);
  391. }}
  392. disabled={this.state.listFlag}
  393. style={{
  394. display: this.state.displayList ? "none" : "block",
  395. }}
  396. >
  397. 删除
  398. </Button>
  399. </div>
  400. );
  401. },
  402. },
  403. ],
  404. detailColumns: [
  405. {
  406. title: "变更状态",
  407. dataIndex: "type",
  408. key: "type",
  409. render: (text, record) => {
  410. let str = "";
  411. let color = "";
  412. if (text == 1) {
  413. str = "增";
  414. color = "#87d068";
  415. } else if (text == 2) {
  416. str = "改";
  417. color = "#108ee9";
  418. } else if (text == 3) {
  419. str = "删";
  420. color = "#f50";
  421. }
  422. return (
  423. <span>
  424. <Tag
  425. color={color}
  426. style={{ display: text == 0 ? "none" : "inline-block" }}
  427. >
  428. {str}
  429. </Tag>
  430. {record.splitStatus == 1 ? (
  431. <Tag color="#108ee9">父项目</Tag>
  432. ) : (
  433. ""
  434. )}
  435. {record.splitStatus == 2 ? (
  436. <Tag color="#108ee9">子项目</Tag>
  437. ) : (
  438. ""
  439. )}
  440. </span>
  441. );
  442. },
  443. },
  444. {
  445. title: "业务项目名称",
  446. dataIndex: "commodityName",
  447. key: "commodityName",
  448. render: (text, record) => {
  449. return text + "-" + record.id;
  450. },
  451. },
  452. {
  453. title: "项目类别",
  454. dataIndex: "cname",
  455. key: "cname",
  456. },
  457. {
  458. title: "项目数量",
  459. dataIndex: "commodityQuantity",
  460. key: "commodityQuantity",
  461. },
  462. {
  463. title: "金额(万元)",
  464. dataIndex: "commodityPrice",
  465. key: "commodityPrice",
  466. render: (text, record) => {
  467. if (this.props.isZxs) {
  468. return <span>***</span>;
  469. } else if (record.splitStatus == 2) {
  470. return "/";
  471. } else {
  472. return <span>{text}</span>;
  473. }
  474. },
  475. },
  476. {
  477. title: "主要项目",
  478. dataIndex: "main",
  479. key: "main",
  480. render: (text) => {
  481. return text ? "是" : "否";
  482. },
  483. },
  484. {
  485. title: "项目负责人",
  486. dataIndex: "receiverName",
  487. key: "receiverName",
  488. },
  489. {
  490. title: "项目说明",
  491. dataIndex: "taskComment",
  492. key: "taskComment",
  493. render: (text) => {
  494. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  495. },
  496. },
  497. ],
  498. detailContactsLists: [
  499. {
  500. title: "变更状态",
  501. dataIndex: "type",
  502. key: "type",
  503. render: (text) => {
  504. let str = "";
  505. let color = "";
  506. if (text == 1) {
  507. str = "增";
  508. color = "#87d068";
  509. } else if (text == 2) {
  510. str = "改";
  511. color = "#108ee9";
  512. } else if (text == 3) {
  513. str = "删";
  514. color = "#f50";
  515. }
  516. return (
  517. <Tag
  518. color={color}
  519. style={{ display: text == 0 ? "none" : "inline-block" }}
  520. >
  521. {str}
  522. </Tag>
  523. );
  524. },
  525. },
  526. {
  527. title: "项目名称",
  528. dataIndex: "commodityName",
  529. key: "commodityName",
  530. render: (text, record) => {
  531. let dataArr = this.state.proDataSource || [];
  532. if (record.ctid) {
  533. return <span>{text + "-" + record.ctid}</span>;
  534. } else {
  535. let tid = record.tid;
  536. let ctid = "";
  537. dataArr.forEach((item, index) => {
  538. if (item.tid == tid) {
  539. ctid = item.id;
  540. }
  541. });
  542. return <span>{text + "-" + ctid}</span>;
  543. }
  544. },
  545. },
  546. {
  547. title: "项目分类",
  548. dataIndex: "projectType",
  549. key: "projectType",
  550. render: (text) => {
  551. let arr = this.state.proDataSource || [];
  552. let str = "";
  553. for (let i = 0; i < arr.length; i++) {
  554. if (this.state.proDataSource[i].cSort == text) {
  555. str = this.state.proDataSource[i].cname;
  556. return <span>{str}</span>;
  557. }
  558. }
  559. },
  560. },
  561. {
  562. title: "催款科目",
  563. dataIndex: "dunTypeName",
  564. key: "dunTypeName",
  565. render: (text) => {
  566. return <span>{text}</span>;
  567. },
  568. },
  569. {
  570. title: "时间",
  571. dataIndex: "waitDay",
  572. key: "waitDay",
  573. render: (text, record) => {
  574. if (record.dunTypeName) {
  575. return <span>{text}</span>;
  576. }
  577. },
  578. },
  579. {
  580. title: "金额(万元)",
  581. dataIndex: "money",
  582. key: "money",
  583. render: (text, record) => {
  584. if (record.dunTypeName) {
  585. if (record.appropriationRatio && !record.money) {
  586. return <span>{record.appropriationRatio}(拨款比例)</span>;
  587. } else if (record.appropriationRatio && record.money) {
  588. return (
  589. <span>
  590. {text}(比例:{record.appropriationRatio})
  591. </span>
  592. );
  593. } else {
  594. if (this.props.isZxs) {
  595. return <span>***</span>;
  596. }
  597. return <span>{text}</span>;
  598. }
  599. }
  600. },
  601. },
  602. {
  603. title: "服务年限",
  604. dataIndex: "startDate",
  605. key: "startDate",
  606. render: (text, record) => {
  607. if (record.dunTypeName) {
  608. return <span>{text}</span>;
  609. }
  610. },
  611. },
  612. {
  613. title: "催款状态",
  614. dataIndex: "status",
  615. key: "status",
  616. render: (text) => {
  617. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  618. },
  619. },
  620. ],
  621. resVisible: false,
  622. columnsrizhi: [
  623. {
  624. title: "流程",
  625. dataIndex: "processName",
  626. key: "processName",
  627. },
  628. {
  629. title: "操作人",
  630. dataIndex: "adminName",
  631. key: "adminName",
  632. },
  633. {
  634. title: "时间",
  635. dataIndex: "createDate",
  636. key: "createDate",
  637. },
  638. ],
  639. contactList: [],
  640. loading: false,
  641. ContactsLists: [
  642. {
  643. title: "催款科目",
  644. dataIndex: "dunSubject",
  645. key: "dunSubject",
  646. render: (text, record) => {
  647. return (
  648. <Select
  649. placeholder="请选择催款科目"
  650. value={record.dunSubject}
  651. style={{ width: "150px" }}
  652. disabled
  653. onChange={(e) => {
  654. record.dunSubject = e;
  655. this.setState({ contactList: this.state.contactList });
  656. }}
  657. >
  658. {jiedian.map(function (item) {
  659. return (
  660. <Select.Option key={item.value}>{item.key}</Select.Option>
  661. );
  662. })}
  663. </Select>
  664. );
  665. },
  666. },
  667. {
  668. title: "金额(万元)",
  669. dataIndex: "money",
  670. key: "money",
  671. render: (text, record) => {
  672. return (
  673. <Input
  674. value={record.money}
  675. placeholder="请输入金额(必填项)"
  676. disabled
  677. key={record.id}
  678. required="required"
  679. onChange={(e) => {
  680. record.money = e.target.value;
  681. this.setState({ contactList: this.state.contactList });
  682. }}
  683. style={{ width: "120px" }}
  684. />
  685. );
  686. },
  687. },
  688. {
  689. title: "催款状态",
  690. dataIndex: "dunStatus",
  691. key: "dunStatus",
  692. render: (text) => {
  693. return getCuikuan(text);
  694. },
  695. },
  696. {
  697. title: "操作",
  698. dataIndex: "dels",
  699. key: "dels",
  700. render: (text, record) => {
  701. return (
  702. <div>
  703. {
  704. <Popconfirm
  705. title="是否删除?"
  706. onConfirm={() => {
  707. this.confirmDelet(record.key);
  708. }}
  709. okText="删除"
  710. cancelText="不删除"
  711. >
  712. <Button
  713. style={{
  714. marginRight: "10px",
  715. color: "#ffffff",
  716. background: "#f00",
  717. border: "none",
  718. display:
  719. this.state.processStatus == 0 ? "block" : "none",
  720. }}
  721. >
  722. 删除
  723. </Button>
  724. </Popconfirm>
  725. }
  726. {record.id ? (
  727. ""
  728. ) : (
  729. <Button type="primary" onClick={this.contactSave}>
  730. 保存
  731. </Button>
  732. )}
  733. </div>
  734. );
  735. },
  736. },
  737. ],
  738. ContactsListsNew: [
  739. {
  740. title: "项目名称",
  741. dataIndex: "commodityName",
  742. key: "commodityName",
  743. render: (text, record, index) => {
  744. let dataArr = this.state.dataSource || [];
  745. if (text) {
  746. return <span>{text}</span>;
  747. }
  748. return (
  749. <Select
  750. placeholder="请选择名称"
  751. style={{ width: "150px" }}
  752. disabled={
  753. this.state.getLoad && record.sortName ? true : false
  754. }
  755. onChange={(e) => {
  756. record.sortName = e;
  757. dataArr.forEach((item) => {
  758. if (item.commodityName == record.sortName) {
  759. record.cname = item.cname;
  760. record.tid = item.id;
  761. record.isSave = true;
  762. record.sort = item.sort;
  763. cuiJieDian.forEach((item) => {
  764. if (item.value == record.sort) {
  765. record.arr = item.children;
  766. let yearFlag = true;
  767. if (record.sort == 6) {
  768. yearFlag = false;
  769. }
  770. this.setState({
  771. getLoad: true,
  772. yearFlag,
  773. });
  774. }
  775. });
  776. }
  777. });
  778. }}
  779. >
  780. {dataArr.map((item) => {
  781. return (
  782. <Select.Option key={item.id} value={item.commodityName}>
  783. {item.commodityName}
  784. </Select.Option>
  785. );
  786. })}
  787. </Select>
  788. );
  789. },
  790. },
  791. {
  792. title: "项目分类",
  793. dataIndex: "projectType",
  794. key: "projectType",
  795. render: (text, record) => {
  796. if (text) {
  797. let arr = this.state.dataSource || [];
  798. let str = "";
  799. for (let i = 0; i < arr.length; i++) {
  800. if (this.state.dataSource[i].sort == text) {
  801. str = this.state.dataSource[i].cname;
  802. return <span>{str}</span>;
  803. }
  804. }
  805. }
  806. if (this.state.getLoad) {
  807. return (
  808. <Select
  809. style={{ width: "150px" }}
  810. placeholder="请选择分类"
  811. value={record.cname}
  812. >
  813. <Select.Option key={record.sort} value={record.cname}>
  814. {record.cname}
  815. </Select.Option>
  816. </Select>
  817. );
  818. } else {
  819. return (
  820. <Select style={{ width: "150px" }} placeholder="请选择分类">
  821. <Select.Option key={record.sort} value={record.cname}>
  822. {record.cname}
  823. </Select.Option>
  824. </Select>
  825. );
  826. }
  827. },
  828. },
  829. {
  830. title: "催款科目",
  831. dataIndex: "dunTypeName",
  832. key: "dunTypeName",
  833. render: (text, record) => {
  834. if (text) {
  835. return <span>{text}</span>;
  836. }
  837. if (this.state.getLoad) {
  838. let arr = record.arr || [];
  839. return (
  840. <Select
  841. style={{ width: "150px" }}
  842. placeholder="请选择分类"
  843. onChange={(e) => {
  844. record.dunType = e;
  845. if (e != 1) {
  846. this.setState({
  847. timeFlag: true,
  848. });
  849. } else {
  850. this.setState({
  851. timeFlag: false,
  852. });
  853. }
  854. if (e == 1 && record.sort == 6) {
  855. this.setState({
  856. yearFlag: true,
  857. });
  858. } else if (e != 1 && record.sort == 6) {
  859. this.setState({
  860. yearFlag: false,
  861. });
  862. }
  863. if (record.sort == 3 && e == 3) {
  864. this.setState({
  865. boFlag: true,
  866. });
  867. } else {
  868. this.setState({
  869. boFlag: false,
  870. });
  871. }
  872. }}
  873. >
  874. {arr.map((item) => {
  875. record;
  876. return (
  877. <Select.Option key={item.value} value={item.value}>
  878. {item.key}
  879. </Select.Option>
  880. );
  881. })}
  882. </Select>
  883. );
  884. } else {
  885. return (
  886. <Select style={{ width: "150px" }} placeholder="请选择分类">
  887. <Select.Option
  888. key={0}
  889. value={"请选择上一项"}
  890. ></Select.Option>
  891. </Select>
  892. );
  893. }
  894. },
  895. },
  896. {
  897. title: "首付时间(特批需选择时间)",
  898. dataIndex: "waitDay",
  899. key: "waitDay",
  900. render: (text, record) => {
  901. if (record.dunTypeName) {
  902. if (text == 0) {
  903. var str = "当天";
  904. } else if (!text) {
  905. var str = "";
  906. } else {
  907. var str = text + "天";
  908. }
  909. return <span>{str}</span>;
  910. }
  911. return (
  912. <Select
  913. placeholder="请选择时间"
  914. style={{ width: "150px" }}
  915. disabled={
  916. this.state.approval != 0 && !this.state.timeFlag
  917. ? false
  918. : true
  919. }
  920. onChange={(e) => {
  921. record.waitDay = e;
  922. }}
  923. >
  924. <Select.Option key={0}>当天</Select.Option>
  925. <Select.Option key={3}>3天</Select.Option>
  926. <Select.Option key={5}>5天</Select.Option>
  927. <Select.Option key={7}>7天</Select.Option>
  928. <Select.Option key={15}>15天</Select.Option>
  929. </Select>
  930. );
  931. },
  932. },
  933. {
  934. title: "金额(万元)",
  935. dataIndex: "money",
  936. key: "money",
  937. render: (text, record) => {
  938. if (record.dunTypeName) {
  939. if (record.appropriationRatio && !record.money) {
  940. return <span>{record.appropriationRatio}(拨款比例)</span>;
  941. } else if (record.appropriationRatio && record.money) {
  942. return (
  943. <span>
  944. {text}(比例:{record.appropriationRatio})
  945. </span>
  946. );
  947. } else {
  948. return <span>{text}</span>;
  949. }
  950. }
  951. if (this.state.boFlag) {
  952. return (
  953. <div>
  954. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  955. <Select
  956. placeholder="选择"
  957. defaultValue={"金额"}
  958. onChange={(e) => {
  959. record.boStatus = e;
  960. }}
  961. >
  962. <Select.Option key={true}>比例</Select.Option>
  963. <Select.Option key={false}>金额</Select.Option>
  964. </Select>
  965. </div>
  966. <div style={{ float: "right" }}>
  967. <Input
  968. value={record.money}
  969. placeholder="请根据左侧类型填写"
  970. key={record.id}
  971. required="required"
  972. onChange={(e) => {
  973. record.money = e.target.value;
  974. this.setState({
  975. contactList: this.state.contactList,
  976. });
  977. }}
  978. style={{ width: "120px" }}
  979. />
  980. </div>
  981. </div>
  982. );
  983. } else {
  984. return (
  985. <div>
  986. <Input
  987. value={record.money}
  988. placeholder="请输入金额(必填项)"
  989. key={record.id}
  990. required="required"
  991. onChange={(e) => {
  992. record.money = e.target.value;
  993. this.setState({ contactList: this.state.contactList });
  994. }}
  995. style={{ width: "120px" }}
  996. />
  997. </div>
  998. );
  999. }
  1000. },
  1001. },
  1002. {
  1003. title: "服务年限",
  1004. dataIndex: "startDate",
  1005. key: "startDate",
  1006. render: (text, record) => {
  1007. if (record.dunTypeName) {
  1008. return <span>{text}</span>;
  1009. }
  1010. return (
  1011. <Select
  1012. placeholder="请选择年限"
  1013. style={{ width: "150px" }}
  1014. disabled={this.state.yearFlag ? true : false}
  1015. onChange={(e) => {
  1016. record.effectiveCount = e;
  1017. }}
  1018. >
  1019. {/* <Select.Option key={null}>无</Select.Option> */}
  1020. <Select.Option key={1}>一年</Select.Option>
  1021. <Select.Option key={3}>两年</Select.Option>
  1022. <Select.Option key={5}>三年</Select.Option>
  1023. <Select.Option key={7}>四年</Select.Option>
  1024. <Select.Option key={9}>五年</Select.Option>
  1025. </Select>
  1026. );
  1027. },
  1028. },
  1029. {
  1030. title: "催款状态",
  1031. dataIndex: "status",
  1032. key: "status",
  1033. render: (text) => {
  1034. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1035. },
  1036. },
  1037. {
  1038. title: "操作",
  1039. dataIndex: "dels",
  1040. key: "dels",
  1041. render: (text, record, index) => {
  1042. return (
  1043. <div>
  1044. {this.state.processStatus == 0 ? (
  1045. <Popconfirm
  1046. title="是否删除?"
  1047. onConfirm={() => {
  1048. this.confirmDeletNew(record);
  1049. }}
  1050. okText="删除"
  1051. cancelText="不删除"
  1052. >
  1053. <Button
  1054. style={{
  1055. marginRight: "10px",
  1056. color: "#ffffff",
  1057. background: "#f00",
  1058. border: "none",
  1059. }}
  1060. >
  1061. 删除
  1062. </Button>
  1063. </Popconfirm>
  1064. ) : (
  1065. ""
  1066. )}
  1067. {record.isSave ? (
  1068. <Button
  1069. type="primary"
  1070. onClick={(e) => {
  1071. this.contactSaveNew(record);
  1072. }}
  1073. >
  1074. 保存
  1075. </Button>
  1076. ) : (
  1077. ""
  1078. )}
  1079. </div>
  1080. );
  1081. },
  1082. },
  1083. ],
  1084. changeCuiList: [
  1085. {
  1086. title: "变更状态",
  1087. dataIndex: "type",
  1088. key: "type",
  1089. render: (text) => {
  1090. let str = "";
  1091. let color = "";
  1092. if (text == 1) {
  1093. str = "增";
  1094. color = "#87d068";
  1095. } else if (text == 2) {
  1096. str = "改";
  1097. color = "#108ee9";
  1098. } else if (text == 3) {
  1099. str = "删";
  1100. color = "#f50";
  1101. }
  1102. return (
  1103. <Tag
  1104. color={color}
  1105. style={{ display: text == 0 ? "none" : "inline-block" }}
  1106. >
  1107. {str}
  1108. </Tag>
  1109. );
  1110. },
  1111. },
  1112. {
  1113. title: "项目名称",
  1114. dataIndex: "commodityName",
  1115. key: "commodityName",
  1116. render: (text, record, index) => {
  1117. let dataArr = this.state.proDataSource || [];
  1118. if (text) {
  1119. // return <span>{text + "-" + record.ctid}</span>;
  1120. if (record.ctid) {
  1121. return <span>{text + "-" + record.ctid}</span>;
  1122. } else {
  1123. let tid = record.tid;
  1124. let ctid = "";
  1125. dataArr.forEach((item, index) => {
  1126. if (item.tid == tid) {
  1127. ctid = item.id;
  1128. }
  1129. });
  1130. return <span>{text + "-" + ctid}</span>;
  1131. }
  1132. }
  1133. return (
  1134. <Select
  1135. placeholder="请选择名称"
  1136. style={{ width: "150px" }}
  1137. disabled={
  1138. this.state.getLoad && record.sortName ? true : false
  1139. }
  1140. onChange={(e) => {
  1141. let num = e.lastIndexOf("-");
  1142. let ctid = e.substr(num + 1);
  1143. record.sortName = e.substring(0, num);
  1144. dataArr.forEach((item) => {
  1145. if (
  1146. item.commodityName == record.sortName &&
  1147. ctid == item.id
  1148. ) {
  1149. record.cname = item.cname;
  1150. record.ctid = item.id;
  1151. record.isSave = true;
  1152. record.sort = item.cSort;
  1153. cuiJieDian.forEach((item) => {
  1154. if (item.value == record.sort) {
  1155. record.arr = item.children;
  1156. let yearFlag = true;
  1157. if (record.sort == 6) {
  1158. yearFlag = false;
  1159. }
  1160. this.setState({
  1161. getLoad: true,
  1162. yearFlag,
  1163. });
  1164. }
  1165. });
  1166. }
  1167. });
  1168. }}
  1169. >
  1170. {dataArr.map((item, index) => {
  1171. if (item.type == 3) {
  1172. return (
  1173. <Select.Option
  1174. key={item.id}
  1175. value={item.commodityName + "-" + item.id}
  1176. disabled
  1177. >
  1178. {item.commodityName + "-" + item.id}
  1179. </Select.Option>
  1180. );
  1181. } else {
  1182. return (
  1183. <Select.Option
  1184. key={item.id}
  1185. value={item.commodityName + "-" + item.id}
  1186. >
  1187. {item.commodityName + "-" + item.id}
  1188. </Select.Option>
  1189. );
  1190. }
  1191. })}
  1192. </Select>
  1193. );
  1194. },
  1195. },
  1196. {
  1197. title: "项目分类",
  1198. dataIndex: "projectType",
  1199. key: "projectType",
  1200. render: (text, record) => {
  1201. if (text) {
  1202. let arr = this.state.proDataSource || [];
  1203. let str = "";
  1204. for (let i = 0; i < arr.length; i++) {
  1205. if (this.state.proDataSource[i].cSort == text) {
  1206. str = this.state.proDataSource[i].cname;
  1207. return <span>{str}</span>;
  1208. }
  1209. }
  1210. }
  1211. if (this.state.getLoad) {
  1212. return (
  1213. <Select
  1214. style={{ width: "150px" }}
  1215. placeholder="请选择分类"
  1216. value={record.cname}
  1217. >
  1218. <Select.Option key={record.sort} value={record.cname}>
  1219. {record.cname}
  1220. </Select.Option>
  1221. </Select>
  1222. );
  1223. } else {
  1224. return (
  1225. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1226. <Select.Option key={record.sort} value={record.cname}>
  1227. {record.cname}
  1228. </Select.Option>
  1229. </Select>
  1230. );
  1231. }
  1232. },
  1233. },
  1234. {
  1235. title: "催款科目",
  1236. dataIndex: "dunTypeName",
  1237. key: "dunTypeName",
  1238. render: (text, record) => {
  1239. if (text) {
  1240. return <span>{text}</span>;
  1241. }
  1242. if (this.state.getLoad) {
  1243. let arr = record.arr || [];
  1244. return (
  1245. <Select
  1246. style={{ width: "150px" }}
  1247. placeholder="请选择分类"
  1248. onChange={(e) => {
  1249. record.dunType = e;
  1250. if (e != 1) {
  1251. this.setState({
  1252. timeFlag: true,
  1253. });
  1254. } else {
  1255. this.setState({
  1256. timeFlag: false,
  1257. });
  1258. }
  1259. if (e == 1 && record.sort == 6) {
  1260. this.setState({
  1261. yearFlag: true,
  1262. });
  1263. } else if (e != 1 && record.sort == 6) {
  1264. this.setState({
  1265. yearFlag: false,
  1266. });
  1267. }
  1268. if (record.sort == 3 && e == 3) {
  1269. this.setState({
  1270. boFlag: true,
  1271. });
  1272. } else {
  1273. this.setState({
  1274. boFlag: false,
  1275. });
  1276. }
  1277. }}
  1278. >
  1279. {arr.map((item) => {
  1280. record;
  1281. return (
  1282. <Select.Option key={item.value} value={item.value}>
  1283. {item.key}
  1284. </Select.Option>
  1285. );
  1286. })}
  1287. </Select>
  1288. );
  1289. } else {
  1290. return (
  1291. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1292. <Select.Option
  1293. key={0}
  1294. value={"请选择上一项"}
  1295. ></Select.Option>
  1296. </Select>
  1297. );
  1298. }
  1299. },
  1300. },
  1301. {
  1302. title: "首付时间(特批需选择时间)",
  1303. dataIndex: "waitDay",
  1304. key: "waitDay",
  1305. render: (text, record) => {
  1306. if (record.dunTypeName) {
  1307. if (text == 0) {
  1308. var str = "当天";
  1309. } else if (!text) {
  1310. var str = "";
  1311. } else {
  1312. var str = text + "天";
  1313. }
  1314. return <span>{str}</span>;
  1315. }
  1316. return (
  1317. <Select
  1318. placeholder="请选择时间"
  1319. style={{ width: "150px" }}
  1320. disabled={
  1321. this.state.approval != 0 && !this.state.timeFlag
  1322. ? false
  1323. : true
  1324. }
  1325. onChange={(e) => {
  1326. record.waitDay = e;
  1327. }}
  1328. >
  1329. <Select.Option key={0}>当天</Select.Option>
  1330. <Select.Option key={3}>3天</Select.Option>
  1331. <Select.Option key={5}>5天</Select.Option>
  1332. <Select.Option key={7}>7天</Select.Option>
  1333. <Select.Option key={15}>15天</Select.Option>
  1334. </Select>
  1335. );
  1336. },
  1337. },
  1338. {
  1339. title: "金额(万元)",
  1340. dataIndex: "money",
  1341. key: "money",
  1342. render: (text, record) => {
  1343. if (record.dunTypeName) {
  1344. if (record.appropriationRatio && !record.money) {
  1345. return <span>{record.appropriationRatio}(拨款比例)</span>;
  1346. } else if (record.appropriationRatio && record.money) {
  1347. return (
  1348. <span>
  1349. {text}(比例:{record.appropriationRatio})
  1350. </span>
  1351. );
  1352. } else {
  1353. return <span>{text}</span>;
  1354. }
  1355. }
  1356. if (this.state.boFlag) {
  1357. return (
  1358. <div>
  1359. <div style={{ width: 70, float: "left", marginRight: 5 }}>
  1360. <Select
  1361. placeholder="选择"
  1362. defaultValue={"金额"}
  1363. onChange={(e) => {
  1364. record.boStatus = e;
  1365. }}
  1366. >
  1367. <Select.Option key={true}>比例</Select.Option>
  1368. <Select.Option key={false}>金额</Select.Option>
  1369. </Select>
  1370. </div>
  1371. <div style={{ float: "right" }}>
  1372. <Input
  1373. value={record.money}
  1374. placeholder="请根据左侧类型填写"
  1375. key={record.id}
  1376. required="required"
  1377. onChange={(e) => {
  1378. record.money = e.target.value;
  1379. this.setState({
  1380. contactList: this.state.contactList,
  1381. });
  1382. }}
  1383. style={{ width: "120px" }}
  1384. />
  1385. </div>
  1386. </div>
  1387. );
  1388. } else {
  1389. return (
  1390. <div>
  1391. <Input
  1392. value={record.money}
  1393. placeholder="请输入金额(必填项)"
  1394. key={record.id}
  1395. required="required"
  1396. onChange={(e) => {
  1397. record.money = e.target.value;
  1398. this.setState({ contactList: this.state.contactList });
  1399. }}
  1400. style={{ width: "120px" }}
  1401. />
  1402. </div>
  1403. );
  1404. }
  1405. },
  1406. },
  1407. {
  1408. title: "服务年限",
  1409. dataIndex: "startDate",
  1410. key: "startDate",
  1411. render: (text, record) => {
  1412. if (record.dunTypeName) {
  1413. return <span>{text}</span>;
  1414. }
  1415. return (
  1416. <Select
  1417. placeholder="请选择年限"
  1418. style={{ width: "150px" }}
  1419. disabled={this.state.yearFlag ? true : false}
  1420. onChange={(e) => {
  1421. record.effectiveCount = e;
  1422. }}
  1423. >
  1424. {/* <Select.Option key={null}>无</Select.Option> */}
  1425. <Select.Option key={1}>一年</Select.Option>
  1426. <Select.Option key={3}>两年</Select.Option>
  1427. <Select.Option key={5}>三年</Select.Option>
  1428. <Select.Option key={7}>四年</Select.Option>
  1429. <Select.Option key={9}>五年</Select.Option>
  1430. </Select>
  1431. );
  1432. },
  1433. },
  1434. {
  1435. title: "催款状态",
  1436. dataIndex: "status",
  1437. key: "status",
  1438. render: (text) => {
  1439. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1440. },
  1441. },
  1442. {
  1443. title: "操作",
  1444. dataIndex: "dels",
  1445. key: "dels",
  1446. render: (text, record, index) => {
  1447. return (
  1448. <div>
  1449. <Popconfirm
  1450. title="是否删除?"
  1451. onConfirm={() => {
  1452. this.changeDeleteCui(record);
  1453. }}
  1454. okText="删除"
  1455. cancelText="不删除"
  1456. >
  1457. <Button
  1458. disabled={this.state.listCuiFlag}
  1459. style={{
  1460. marginRight: "10px",
  1461. display: this.state.displayList ? "none" : "block",
  1462. }}
  1463. >
  1464. 删除
  1465. </Button>
  1466. </Popconfirm>
  1467. {record.isSave ? (
  1468. <Button
  1469. type="primary"
  1470. style={{ marginTop: 5 }}
  1471. onClick={(e) => {
  1472. this.changeSaveCui(record);
  1473. }}
  1474. >
  1475. 保存
  1476. </Button>
  1477. ) : (
  1478. ""
  1479. )}
  1480. </div>
  1481. );
  1482. },
  1483. },
  1484. ],
  1485. };
  1486. },
  1487. departmentList() {
  1488. this.setState({
  1489. loading: true
  1490. });
  1491. $.ajax({
  1492. method: "get",
  1493. dataType: "json",
  1494. crossDomain: false,
  1495. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  1496. data: {},
  1497. success: function(data) {
  1498. let thedata = data.data;
  1499. let theArr = [];
  1500. if (!thedata) {
  1501. if (data.error && data.error.length) {
  1502. message.warning(data.error[0].message);
  1503. }
  1504. thedata = {};
  1505. } else {
  1506. thedata.map(function(item, index) {
  1507. theArr.push({
  1508. key: index,
  1509. name: item.name,
  1510. id: item.id,
  1511. depNo: item.depNo
  1512. });
  1513. });
  1514. }
  1515. this.setState({
  1516. departmentArr: theArr
  1517. });
  1518. }.bind(this)
  1519. }).always(
  1520. function() {
  1521. this.setState({
  1522. loading: false
  1523. });
  1524. }.bind(this)
  1525. );
  1526. },
  1527. // 拆分详细
  1528. showRes(record) {
  1529. this.setState({
  1530. resVisible: true,
  1531. resRecord: record
  1532. });
  1533. },
  1534. resCancel() {
  1535. this.setState({
  1536. resVisible: false
  1537. });
  1538. },
  1539. //新建订单、编辑订单保存
  1540. handleSubmit(e) {
  1541. e.preventDefault();
  1542. let theorgCodeUrl = [];
  1543. if (this.state.orgCodeUrl.length) {
  1544. let picArr = [];
  1545. this.state.orgCodeUrl.map(function(item) {
  1546. if (
  1547. item.response &&
  1548. item.response.data &&
  1549. item.response.data.length
  1550. ) {
  1551. picArr.push(item.response.data);
  1552. }
  1553. });
  1554. theorgCodeUrl = picArr.join(",");
  1555. }
  1556. if (this.props.userDetaile) {
  1557. if (this.state.totalAmount === "") {
  1558. message.warning("签单金额不能为空");
  1559. this.refs.signFirstPayment.focus();
  1560. return false;
  1561. }
  1562. if (this.state.firstAmount === "") {
  1563. message.warning("首付金额不能为空");
  1564. this.refs.signFirstPayment.focus();
  1565. return false;
  1566. }
  1567. if (moneyVerify(this.state.firstAmount)) {
  1568. return;
  1569. }
  1570. if (moneyVerify(this.state.totalAmount)) {
  1571. return;
  1572. }
  1573. if (!theorgCodeUrl) {
  1574. message.warning("图片过大,上传失败");
  1575. this.refs.signFirstPayment.focus();
  1576. return false;
  1577. }
  1578. if (!this.state.signDate) {
  1579. message.warning("签单日期不能为空");
  1580. this.refs.signFirstPayment.focus();
  1581. return false;
  1582. }
  1583. if (!this.state.orderRemarks) {
  1584. message.warning("订单留言不能为空");
  1585. this.refs.signFirstPayment.focus();
  1586. return false;
  1587. }
  1588. } else {
  1589. }
  1590. const arr = this.state.contactListNew || [];
  1591. for (let i = 0; i < arr.length; i++) {
  1592. if (
  1593. arr[i].dunType == 1 &&
  1594. arr[i].waitDay != null &&
  1595. this.state.approval == 0
  1596. ) {
  1597. message.warning(
  1598. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  1599. );
  1600. return false;
  1601. } else if (
  1602. arr[i].dunType == 1 &&
  1603. arr[i].waitDay == null &&
  1604. this.state.approval == 1
  1605. ) {
  1606. message.warning(
  1607. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  1608. );
  1609. return false;
  1610. }
  1611. if (!this.state.contactListNew[i].id && this.props.userDetaile) {
  1612. message.warning("请保存催款节点");
  1613. return false;
  1614. }
  1615. }
  1616. this.setState({
  1617. loading: true
  1618. });
  1619. let api = this.props.userDetaile
  1620. ? "/api/admin/newOrder/updateServiceOrderNew"
  1621. : "/api/admin/newOrder/createOrder";
  1622. $.ajax({
  1623. method: "POST",
  1624. dataType: "json",
  1625. crossDomain: false,
  1626. url: globalConfig.context + api,
  1627. data: !this.props.userDetaile
  1628. ? {
  1629. uid: this.state.autoId,
  1630. orderType: this.state.orderType
  1631. }
  1632. : {
  1633. orderNo: this.state.orderNo, //订单编号
  1634. totalAmount: this.state.totalAmount, //总金额
  1635. firstAmount: this.state.firstAmount, //首付
  1636. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1637. signDate: this.state.signDate, //签单日期
  1638. contacts: this.state.contacts, //企业负责人
  1639. contactMobile: this.state.contactMobile, //负责人联系方式
  1640. legalPerson: this.state.legalPerson, //企业法人
  1641. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1642. approval: this.state.approval, //特批状态
  1643. orderRemarks: this.state.orderRemarks, //订单备注
  1644. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  1645. orderDep: this.state.organizationSearch
  1646. }
  1647. }).done(
  1648. function(data) {
  1649. this.setState({
  1650. loading: false
  1651. });
  1652. if (!data.error.length) {
  1653. message.success("保存成功!");
  1654. this.handleOk();
  1655. if (this.state.autoId) {
  1656. this.loadData();
  1657. }
  1658. } else {
  1659. message.warning(data.error[0].message);
  1660. }
  1661. }.bind(this)
  1662. );
  1663. },
  1664. //订单详情修改
  1665. xiangqingClick(e) {
  1666. e.preventDefault();
  1667. this.setState({
  1668. loading: true
  1669. });
  1670. if (this.state.approval == 2 || this.state.approval == 3) {
  1671. message.warning("特批状态不正确");
  1672. this.setState({
  1673. loading: false
  1674. });
  1675. return;
  1676. }
  1677. $.ajax({
  1678. url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew",
  1679. method: "post",
  1680. data: {
  1681. orderNo: this.state.orderNo, //订单编号
  1682. totalAmount: this.state.totalAmount, //总金额
  1683. firstAmount: this.state.firstAmount, //首付
  1684. isSubmit: this.state.isSubmit, //保存草稿还是提交
  1685. signDate: this.state.selTime, //签单日期
  1686. contacts: this.state.contacts, //企业负责人
  1687. contactMobile: this.state.contactMobile, //负责人联系方式
  1688. legalPerson: this.state.legalPerson, //企业法人
  1689. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  1690. approval: this.state.approval, //特批状态
  1691. orderRemarks: this.state.orderRemarks //订单备注
  1692. }
  1693. }).done(
  1694. function(data) {
  1695. this.setState({
  1696. loading: false
  1697. });
  1698. if (!data.error.length) {
  1699. message.success("保存成功!");
  1700. this.loaduser();
  1701. } else {
  1702. message.warning(data.error[0].message);
  1703. }
  1704. }.bind(this)
  1705. );
  1706. },
  1707. not() {
  1708. },
  1709. //查看基本详情基本信息
  1710. loaduser(record) {
  1711. this.state.orderList = [];
  1712. $.ajax({
  1713. method: "get",
  1714. dataType: "json",
  1715. crossDomain: false,
  1716. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  1717. data: {
  1718. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  1719. },
  1720. success: function(data) {
  1721. let thisData = data.data;
  1722. if (!thisData) {
  1723. if (data.error && data.error.length) {
  1724. message.warning(data.error[0].message);
  1725. }
  1726. thisData = {};
  1727. }
  1728. if (thisData.approval == 2) {
  1729. thisData.approval = "特批通过";
  1730. } else if (thisData.approval == 3) {
  1731. thisData.approval = "特批驳回";
  1732. }
  1733. this.setState({
  1734. id: thisData.id,
  1735. kehuId: thisData.buyerId,
  1736. orderNo: thisData.orderNo, //订单编号
  1737. orderType: thisData.orderType, //订单类型
  1738. firstAmount: thisData.firstAmount, //首付金额
  1739. totalAmount: thisData.totalAmount, //总金额
  1740. settlementAmount: thisData.settlementAmount, //结算金额
  1741. liquidationStatus: thisData.liquidationStatus, //清算状态
  1742. processStatus: thisData.processStatus, //流程状态
  1743. approval: thisData.approval.toString(), //特批状态
  1744. orderRemarks: thisData.orderRemarks, //订单备注
  1745. contractNo: thisData.contractNo, //合同编号
  1746. contacts: thisData.contacts, //联系人
  1747. contactMobile: thisData.contactMobile, //联系人电话
  1748. legalPerson: thisData.legalPerson, //法人
  1749. legalPersonTel: thisData.legalPersonTel, //法人电话
  1750. contractNo: thisData.contractNo, //合同编号
  1751. orgCodeUrl: thisData.contractPictureUrl
  1752. ? splitUrl(
  1753. thisData.contractPictureUrl,
  1754. ",",
  1755. globalConfig.avatarHost + "/upload"
  1756. )
  1757. : [], //图片地址
  1758. signDate: thisData.signDate, //签单时间
  1759. userName: thisData.userName, //客户名称
  1760. salesmanName: thisData.salesmanName, //营销员名称
  1761. salesmanMobile: thisData.salesmanMobile, //营销员电话
  1762. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  1763. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  1764. financeName: thisData.financeName, //财务名称
  1765. financeMobile: thisData.financeMobile, //财务电话
  1766. nowFinanceMobile: thisData.nowFinanceMobile,
  1767. nowFinance: thisData.nowFinance,
  1768. contractNo: thisData.contractNo, //合同编号
  1769. approval:
  1770. thisData.approval == 0
  1771. ? thisData.approval.toString()
  1772. : thisData.approval,
  1773. organizationSearch: thisData.orderDep,
  1774. depName: thisData.depName,
  1775. status: thisData.status,
  1776. outsource: thisData.outsource
  1777. });
  1778. // console.log("kkkk",this.state.processStatus);
  1779. }.bind(this)
  1780. }).always(
  1781. function() {
  1782. this.setState({
  1783. loading: false
  1784. });
  1785. }.bind(this)
  1786. );
  1787. },
  1788. //节点列表
  1789. jiedian(orderNos) {
  1790. this.setState({
  1791. loadData: true
  1792. })
  1793. $.ajax({
  1794. method: "get",
  1795. dataType: "json",
  1796. crossDomain: false,
  1797. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  1798. data: {
  1799. orderNo: orderNos
  1800. },
  1801. success: function(data) {
  1802. let theArr = [];
  1803. let thisData = [];
  1804. if (data.error.length || data.data.list == "") {
  1805. if (data.error && data.error.length) {
  1806. message.warning(data.error[0].message);
  1807. }
  1808. } else {
  1809. for (let i = 0; i < data.data.length; i++) {
  1810. thisData = data.data[i];
  1811. theArr.push({
  1812. key: i,
  1813. dunSubject: thisData.dunSubject
  1814. ? thisData.dunSubject.toString()
  1815. : "", //催款科目
  1816. id: thisData.id, //节点Id
  1817. money: thisData.money, //催款金额
  1818. dunStatus: thisData.dunStatus, //催款状态
  1819. orderNo: thisData.orderNo
  1820. });
  1821. }
  1822. this.setState({
  1823. contactList: theArr
  1824. });
  1825. }
  1826. }.bind(this)
  1827. }).always(
  1828. function() {
  1829. this.setState({
  1830. loading: false
  1831. });
  1832. }.bind(this)
  1833. );
  1834. },
  1835. //查看催款节点
  1836. jiedianNew(orderNos) {
  1837. this.setState({
  1838. loadData: true,
  1839. });
  1840. $.ajax({
  1841. method: "get",
  1842. dataType: "json",
  1843. crossDomain: false,
  1844. url:
  1845. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  1846. data: {
  1847. orderNo: orderNos
  1848. },
  1849. success: function(data) {
  1850. if (data.error && data.error.length) {
  1851. message.warning(data.error[0].message);
  1852. } else {
  1853. let theArr = [];
  1854. let thisData = [];
  1855. let arr = data.data || [];
  1856. let totalCui = 0;
  1857. for (let i = 0; i < arr.length; i++) {
  1858. thisData = arr[i];
  1859. totalCui += +thisData.money;
  1860. theArr.push({
  1861. key: i,
  1862. dunSubject: thisData.dunSubject
  1863. ? thisData.dunSubject.toString()
  1864. : "", //催款科目
  1865. id: thisData.id, //节点Id
  1866. money: thisData.money, //催款金额
  1867. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  1868. commodityName: thisData.commodityName,
  1869. projectType: thisData.projectType,
  1870. dunTypeName: thisData.dunTypeName,
  1871. status: thisData.status,
  1872. waitDay: thisData.waitDay,
  1873. effectiveCount: thisData.effectiveCount,
  1874. startDate: thisData.startDate,
  1875. dunType: thisData.dunType,
  1876. appropriationRatio: thisData.appropriationRatio
  1877. });
  1878. }
  1879. if (!totalCui) {
  1880. totalCui = 0;
  1881. }
  1882. totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
  1883. this.setState({
  1884. contactListNew: theArr,
  1885. totalCui
  1886. });
  1887. }
  1888. }.bind(this)
  1889. }).always(
  1890. function() {
  1891. this.setState({
  1892. loading: false
  1893. });
  1894. }.bind(this)
  1895. );
  1896. },
  1897. //催款节点保存
  1898. contactSave(record) {
  1899. for (let i = 0; i < this.state.contactList.length; i++) {
  1900. if (moneyVerify(this.state.contactList[i].money)) {
  1901. return;
  1902. }
  1903. }
  1904. this.setState({
  1905. loading: true
  1906. });
  1907. $.ajax({
  1908. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  1909. method: "post",
  1910. data: {
  1911. orderNo: this.state.orderNo,
  1912. orderDun: JSON.stringify(this.state.contactList)
  1913. }
  1914. }).done(
  1915. function(data) {
  1916. this.setState({
  1917. loading: false
  1918. });
  1919. if (!data.error.length) {
  1920. message.success("保存成功!");
  1921. this.jiedian(record.orderNo);
  1922. } else {
  1923. message.warning(data.error[0].message);
  1924. }
  1925. }.bind(this)
  1926. );
  1927. },
  1928. //催款节点保存
  1929. contactSaveNew(record) {
  1930. if (record.boStatus == "false") {
  1931. record.boStatus = false;
  1932. } else if (record.boStatus == "true") {
  1933. record.boStatus = true;
  1934. }
  1935. if (!this.state.yearFlag) {
  1936. if (!record.effectiveCount) {
  1937. message.warning("请选择服务年限");
  1938. return;
  1939. }
  1940. } else {
  1941. record.effectiveCount = "";
  1942. }
  1943. if (record.money == "") {
  1944. message.warning("请填写金额");
  1945. return;
  1946. }
  1947. if (record.boStatus) {
  1948. if (
  1949. typeof +record.money == "number" &&
  1950. +record.money >= 0 &&
  1951. +record.money <= 1
  1952. ) {
  1953. record.appropriationRatio = record.money;
  1954. } else {
  1955. message.warning("金额比例填写错误,比例范围0~1");
  1956. return;
  1957. }
  1958. }
  1959. if (!record.dunType) {
  1960. message.warning("请选择对应科目");
  1961. return;
  1962. }
  1963. if (record.dunType != 1) {
  1964. record.waitDay = "";
  1965. }
  1966. this.setState({
  1967. loading: true
  1968. });
  1969. if (record.boStatus) {
  1970. $.ajax({
  1971. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  1972. method: "post",
  1973. data: {
  1974. orderNo: record.orderNo,
  1975. tid: record.tid,
  1976. projectType: record.sort,
  1977. dunType: record.dunType,
  1978. appropriationRatio: record.appropriationRatio,
  1979. waitDay: record.waitDay,
  1980. effectiveCount: record.effectiveCount
  1981. }
  1982. }).done(
  1983. function(data) {
  1984. this.setState({
  1985. loading: false
  1986. });
  1987. if (!data.error.length) {
  1988. message.success("保存成功!");
  1989. this.setState({
  1990. cuiFlag: false,
  1991. boFlag: false,
  1992. addFlag: false
  1993. });
  1994. this.jiedianNew(record.orderNo);
  1995. } else {
  1996. message.warning(data.error[0].message);
  1997. }
  1998. }.bind(this)
  1999. );
  2000. } else {
  2001. $.ajax({
  2002. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2003. method: "post",
  2004. data: {
  2005. orderNo: record.orderNo,
  2006. tid: record.tid,
  2007. projectType: record.sort,
  2008. dunType: record.dunType,
  2009. money: record.money,
  2010. waitDay: record.waitDay,
  2011. effectiveCount: record.effectiveCount
  2012. }
  2013. }).done(
  2014. function(data) {
  2015. this.setState({
  2016. loading: false
  2017. });
  2018. if (!data.error.length) {
  2019. message.success("保存成功!");
  2020. this.setState({
  2021. cuiFlag: false,
  2022. boFlag: false,
  2023. addFlag: false
  2024. });
  2025. this.jiedianNew(record.orderNo);
  2026. } else {
  2027. message.warning(data.error[0].message);
  2028. }
  2029. }.bind(this)
  2030. );
  2031. }
  2032. },
  2033. //点击新增催款节点
  2034. addcontact() {
  2035. this.state.contactList.push({
  2036. key: this.state.contactList.length,
  2037. money: "",
  2038. dunSubject: undefined,
  2039. orderNo: this.state.orderNo,
  2040. dunTarget: this.state.kehuId
  2041. });
  2042. this.setState({
  2043. contactList: this.state.contactList
  2044. });
  2045. },
  2046. //点击新增催款节点
  2047. addcontactNew() {
  2048. this.state.contactListNew.push({
  2049. key: this.state.contactListNew.length,
  2050. money: "",
  2051. dunSubject: undefined,
  2052. orderNo: this.state.orderNo,
  2053. dunTarget: this.state.kehuId
  2054. });
  2055. this.setState({
  2056. contactListNew: this.state.contactListNew,
  2057. cuiFlag: true
  2058. });
  2059. },
  2060. //删除收款节点
  2061. confirmDelet(index) {
  2062. this.state.contactList.splice(index, 1);
  2063. this.setState({
  2064. contactList: this.state.contactList
  2065. });
  2066. this.contactSave();
  2067. },
  2068. //删除收款节点
  2069. confirmDeletNew(index) {
  2070. if (index.id) {
  2071. this.state.contactListNew.splice(index.id, 1);
  2072. this.setState({
  2073. contactListNew: this.state.contactListNew,
  2074. cuiFlag: false,
  2075. addFlag: false,
  2076. boFlag: false
  2077. });
  2078. $.ajax({
  2079. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2080. method: "post",
  2081. data: {
  2082. id: index.id
  2083. }
  2084. }).done(
  2085. function(data) {
  2086. this.setState({
  2087. loading: false
  2088. });
  2089. if (!data.error.length) {
  2090. message.success("删除成功!");
  2091. this.setState({
  2092. cuiFlag: false
  2093. });
  2094. this.jiedianNew(this.state.orderNo);
  2095. } else {
  2096. message.warning(data.error[0].message);
  2097. }
  2098. }.bind(this)
  2099. );
  2100. } else {
  2101. this.state.contactListNew.splice(index.key, 1);
  2102. this.setState({
  2103. contactListNew: this.state.contactListNew,
  2104. cuiFlag: false,
  2105. addFlag: false,
  2106. boFlag: false
  2107. });
  2108. }
  2109. },
  2110. handleOk() {
  2111. this.setState({
  2112. visible: false,
  2113. mark: false
  2114. });
  2115. this.props.closeDesc(false, true);
  2116. },
  2117. handleCancel() {
  2118. if (this.state.orderType == undefined) {
  2119. return false;
  2120. }
  2121. if (!this.state.autoId) {
  2122. return false;
  2123. }
  2124. this.setState({
  2125. visible: false,
  2126. mark: false
  2127. });
  2128. this.props.closeDesc(false);
  2129. },
  2130. handleCancelclose() {
  2131. this.setState(
  2132. {
  2133. visible: false,
  2134. mark: false,
  2135. cuiFlag: false,
  2136. addFlag: false,
  2137. boFlag: false,
  2138. isJilu: false
  2139. },
  2140. () => {
  2141. this.setState({
  2142. activeKey: "1"
  2143. });
  2144. }
  2145. );
  2146. this.props.closeDesc(false);
  2147. this.reset();
  2148. },
  2149. //点击签单
  2150. handleCancels() {
  2151. this.setState({
  2152. isSubmit: 1
  2153. });
  2154. },
  2155. //点击签单
  2156. handleCancelq() {
  2157. this.setState({
  2158. isSubmit: 0
  2159. });
  2160. },
  2161. //删除
  2162. delectRow(record) {
  2163. this.setState({
  2164. loading: true
  2165. });
  2166. $.ajax({
  2167. method: "post",
  2168. dataType: "json",
  2169. crossDomain: false,
  2170. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2171. data: {
  2172. id: record.id
  2173. }
  2174. }).done(
  2175. function(data) {
  2176. if (!data.error.length) {
  2177. message.success("删除成功!");
  2178. this.setState({
  2179. loading: false
  2180. });
  2181. this.jiedian(this.state.orderNo);
  2182. this.jiedianNew(this.state.orderNo);
  2183. this.loaduser();
  2184. this.loadData();
  2185. } else {
  2186. message.warning(data.error[0].message);
  2187. }
  2188. }.bind(this)
  2189. );
  2190. },
  2191. nextCancel() {
  2192. this.setState({
  2193. addnextVisible: false,
  2194. changeVisible: false
  2195. });
  2196. },
  2197. rizhi() {
  2198. this.setState({
  2199. loading: true
  2200. });
  2201. $.ajax({
  2202. method: "get",
  2203. dataType: "json",
  2204. crossDomain: false,
  2205. url: "/api/admin/newOrder/selectOrderLog",
  2206. data: {
  2207. orderNo: this.props.datauser.orderNo
  2208. },
  2209. success: function(data) {
  2210. let theArr = [];
  2211. let thisData = data.data;
  2212. if (!thisData.length) {
  2213. if (data.error && data.error.length) {
  2214. message.warning(data.error[0].message);
  2215. }
  2216. thisData = {};
  2217. } else {
  2218. for (let i = 0; i < data.data.length; i++) {
  2219. let thisdata = data.data[i];
  2220. theArr.push({
  2221. processName: thisdata.processName,
  2222. adminName: thisdata.adminName,
  2223. createDate: thisdata.createDate,
  2224. remarks: thisdata.remarks
  2225. });
  2226. }
  2227. }
  2228. this.setState({
  2229. dataSourcerizhi: theArr
  2230. });
  2231. }.bind(this)
  2232. }).always(
  2233. function() {
  2234. this.setState({
  2235. loading: false
  2236. });
  2237. }.bind(this)
  2238. );
  2239. },
  2240. //查看订单日志
  2241. getOrderLog() {
  2242. this.setState({
  2243. rizhivisible: true
  2244. });
  2245. this.rizhi();
  2246. },
  2247. closeOrderLog() {
  2248. this.setState({
  2249. rizhivisible: false
  2250. });
  2251. },
  2252. callback(key) {
  2253. this.setState({
  2254. activeKey: key
  2255. });
  2256. if (key === "1") {
  2257. this.jiedian(this.props.datauser.orderNo);
  2258. this.jiedianNew(this.props.datauser.orderNo);
  2259. this.loaduser();
  2260. // this.loaduser();
  2261. }
  2262. if (key === "3") {
  2263. this.getChangeData();
  2264. }
  2265. if (key === "2") {
  2266. let url = window.location.href.substring(7);
  2267. $.ajax({
  2268. method: "get",
  2269. dataType: "json",
  2270. crossDomain: false,
  2271. url:
  2272. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2273. data: {
  2274. orderNo: this.props.datauser.orderNo
  2275. },
  2276. success: function(data) {
  2277. // console.log(data.data);
  2278. if (data.data && data.data.length) {
  2279. let thisdata = data.data[data.data.length - 1];
  2280. if (thisdata.status === 0 || thisdata.processState == 0 && thisdata.status != 5) {
  2281. this.setState({
  2282. changeId: thisdata.id,
  2283. typeChange: thisdata.type,
  2284. totalAmount: thisdata.totalAmount,
  2285. settlementAmount: thisdata.settlementAmount,
  2286. changeAmount: thisdata.changeAmount,
  2287. remarksC: thisdata.remarks,
  2288. startRemarks: thisdata.zxsRemarks,
  2289. isCaoGao: true,
  2290. arrears: thisdata.arrears,
  2291. changeFlag: true,
  2292. createTimes: thisdata.createTimes,
  2293. voucherUrl: thisdata.voucherUrl
  2294. ? splitUrl(
  2295. thisdata.voucherUrl,
  2296. ",",
  2297. globalConfig.avatarHost + "/upload",
  2298. url
  2299. )
  2300. : [],
  2301. processState: thisdata.processState,
  2302. status: thisdata.status,
  2303. });
  2304. this.proList();
  2305. this.cuiList();
  2306. let e = thisdata.type;
  2307. if (e == 1) {
  2308. this.setState({
  2309. hetongFlag: false,
  2310. listFlag: false,
  2311. listCuiFlag: false,
  2312. tuiKuanFlag: false,
  2313. displayList: false
  2314. });
  2315. } else if (e == 2) {
  2316. this.setState({
  2317. hetongFlag: true,
  2318. listFlag: false,
  2319. listCuiFlag: false,
  2320. tuiKuanFlag: true,
  2321. displayList: false
  2322. });
  2323. } else if (e == 3) {
  2324. this.setState({
  2325. listFlag: false,
  2326. hetongFlag: false,
  2327. listCuiFlag: false,
  2328. tuiKuanFlag: false,
  2329. displayList: true
  2330. });
  2331. } else if (e == 4) {
  2332. this.setState({
  2333. listFlag: false,
  2334. listCuiFlag: false,
  2335. hetongFlag: false,
  2336. tuiKuanFlag: true,
  2337. displayList: false
  2338. });
  2339. } else if (e == 5) {
  2340. this.setState({
  2341. listFlag: false,
  2342. listCuiFlag: false,
  2343. hetongFlag: true,
  2344. tuiKuanFlag: true,
  2345. displayList: false
  2346. });
  2347. } else {
  2348. this.setState({
  2349. listFlag: true,
  2350. hetongFlag: true,
  2351. listCuiFlag: true,
  2352. tuiKuanFlag: false,
  2353. displayList: false
  2354. });
  2355. }
  2356. } else {
  2357. this.setState({
  2358. listFlag: false,
  2359. hetongFlag: false,
  2360. listCuiFlag: false,
  2361. tuiKuanFlag: false,
  2362. displayList: false,
  2363. // 置空
  2364. changeId: undefined,
  2365. isCaoGao: false
  2366. });
  2367. }
  2368. } else {
  2369. this.setState({
  2370. isCaoGao: false
  2371. });
  2372. }
  2373. }.bind(this)
  2374. });
  2375. }
  2376. },
  2377. cuiList(id) {
  2378. this.setState({
  2379. loadData: true,
  2380. });
  2381. $.ajax({
  2382. method: "get",
  2383. dataType: "json",
  2384. crossDomain: false,
  2385. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  2386. data: {
  2387. id: id || this.state.changeId
  2388. },
  2389. success: function(data) {
  2390. this.setState({
  2391. cuiDataSource: data.data,
  2392. });
  2393. if (data.data && data.data.length) {
  2394. if (id) {
  2395. this.setState({
  2396. listCuiFlag: true
  2397. });
  2398. }
  2399. this.setState({
  2400. cuiDataSource: data.data
  2401. });
  2402. this.setState({
  2403. loadData: false,
  2404. });
  2405. } else if (data.error && data.error.length) {
  2406. message.warning(data.error[0].message);
  2407. this.setState({
  2408. loadData: false,
  2409. });
  2410. }
  2411. }.bind(this)
  2412. });
  2413. },
  2414. proList(id) {
  2415. this.setState({
  2416. loadData: true,
  2417. });
  2418. $.ajax({
  2419. method: "get",
  2420. dataType: "json",
  2421. crossDomain: false,
  2422. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  2423. data: {
  2424. id: id || this.state.changeId
  2425. },
  2426. success: function(data) {
  2427. if (data.data && data.data.length) {
  2428. if (id) {
  2429. this.setState({
  2430. listFlag: true
  2431. });
  2432. }
  2433. data.data.forEach(item => {
  2434. item.key = item.id;
  2435. });
  2436. this.setState({
  2437. proDataSource: data.data
  2438. });
  2439. this.setState({
  2440. loadData: false,
  2441. });
  2442. } else if (data.error && data.error.length) {
  2443. message.warning(data.error[0].message);
  2444. this.setState({
  2445. loadData: false,
  2446. });
  2447. }
  2448. }.bind(this)
  2449. });
  2450. },
  2451. logList(id) {
  2452. this.setState({
  2453. loading: true
  2454. })
  2455. $.ajax({
  2456. method: "get",
  2457. dataType: "json",
  2458. async: false,
  2459. crossDomain: false,
  2460. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  2461. data: {
  2462. changeId: id
  2463. },
  2464. success: function (data) {
  2465. if (data.error.length || data.data.list == "") {
  2466. if (data.error && data.error.length) {
  2467. message.warning(data.error[0].message);
  2468. this.setState({
  2469. loading: false,
  2470. });
  2471. }
  2472. } else {
  2473. this.setState({
  2474. logData: data.data,
  2475. loading: false
  2476. });
  2477. }
  2478. }.bind(this)
  2479. });
  2480. },
  2481. getOrgCodeUrl(e) {
  2482. this.setState({ orgCodeUrl: e });
  2483. },
  2484. getVoucherUrl(e) {
  2485. this.setState({ voucherUrl: e });
  2486. },
  2487. //加载(自动补全)
  2488. supervisor(e, state) {
  2489. //客户名称与服务名称自动补全
  2490. let api = state
  2491. ? "/api/admin/customer/getCustomerByName"
  2492. : "/api/admin/order/getBusinessProjectByName";
  2493. $.ajax({
  2494. method: "get",
  2495. dataType: "json",
  2496. crossDomain: false,
  2497. url: globalConfig.context + api,
  2498. data: state
  2499. ? {
  2500. name: e,
  2501. type: this.state.customType
  2502. }
  2503. : {
  2504. businessName: e
  2505. },
  2506. success: function(data) {
  2507. let thedata = data.data;
  2508. if (!thedata) {
  2509. if (data.error && data.error.length) {
  2510. message.warning(data.error[0].message);
  2511. }
  2512. thedata = {};
  2513. }
  2514. this.setState({
  2515. states: state,
  2516. customerArr: thedata
  2517. });
  2518. }.bind(this)
  2519. }).always(
  2520. function() {
  2521. this.setState({
  2522. loading: false
  2523. });
  2524. }.bind(this)
  2525. );
  2526. },
  2527. supervisorCui(e) {
  2528. //客户名称与服务名称自动补全
  2529. let api = "/api/admin/order/getBusinessProjectByName";
  2530. $.ajax({
  2531. method: "get",
  2532. dataType: "json",
  2533. crossDomain: false,
  2534. url: globalConfig.context + api,
  2535. data: {
  2536. businessName: e
  2537. },
  2538. success: function(data) {
  2539. let thedata = data.data;
  2540. if (!thedata) {
  2541. if (data.error && data.error.length) {
  2542. message.warning(data.error[0].message);
  2543. }
  2544. thedata = {};
  2545. }
  2546. this.setState({
  2547. customerCuiArr: thedata
  2548. });
  2549. }.bind(this)
  2550. }).always(
  2551. function() {
  2552. this.setState({
  2553. loading: false
  2554. });
  2555. }.bind(this)
  2556. );
  2557. },
  2558. //上级主管输入框失去焦点是判断客户是否存在
  2559. selectAuto(value) {
  2560. let kid = [];
  2561. let fwList = this.state.customerArr;
  2562. fwList.map(function(item) {
  2563. if (value == item.bname) {
  2564. kid = item;
  2565. }
  2566. });
  2567. this.setState({
  2568. commodityName: value,
  2569. gid: kid.id,
  2570. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2571. commodityFirstPayment:
  2572. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  2573. });
  2574. },
  2575. selectAutoCui(value) {
  2576. let kid = [];
  2577. let fwList = this.state.customerCuiArr;
  2578. fwList.map(function(item) {
  2579. if (value == item.bname) {
  2580. kid = item;
  2581. }
  2582. });
  2583. this.setState({
  2584. commodityNameCui: value,
  2585. cid: kid.id,
  2586. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  2587. commodityFirstPayment:
  2588. kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment
  2589. });
  2590. },
  2591. //客户
  2592. selectAutoCUT(value) {
  2593. let autoIds;
  2594. let fwList = this.state.customerArr;
  2595. fwList.map(function(item) {
  2596. if (value == item.name) {
  2597. autoIds = item.id;
  2598. }
  2599. });
  2600. this.setState({
  2601. customerName: value,
  2602. autoId: autoIds
  2603. });
  2604. },
  2605. //服务值改变时请求客户名称
  2606. httpChange(e) {
  2607. this.state.gid = "";
  2608. if (e.length >= 1) {
  2609. this.supervisor(e, false);
  2610. }
  2611. this.setState({
  2612. commodityName: e
  2613. });
  2614. },
  2615. httpChangeCui(e) {
  2616. if (e.length >= 1) {
  2617. this.supervisorCui(e, false);
  2618. }
  2619. this.setState({
  2620. commodityNameCui: e
  2621. });
  2622. },
  2623. //客户名称自动补全
  2624. customerChange(e) {
  2625. if (this.state.customType) {
  2626. this.state.autoId = "";
  2627. if (e.length >= 2) {
  2628. this.supervisor(e, true);
  2629. }
  2630. this.setState({
  2631. customerName: e
  2632. });
  2633. } else {
  2634. this.setState({
  2635. customerName: ""
  2636. });
  2637. message.warning("客户所属类型必须指定");
  2638. }
  2639. },
  2640. //点击添加项目明细
  2641. addDetailed() {
  2642. this.setState({
  2643. gid: "",
  2644. customerArr: [],
  2645. commodityName: "",
  2646. commodityQuantity: "",
  2647. commodityId: "",
  2648. taskComment: "",
  2649. main: undefined,
  2650. commodityPrice: "",
  2651. addState: 1,
  2652. addnextVisible: true
  2653. });
  2654. },
  2655. //新建项目明细保存
  2656. nextSubmit(e) {
  2657. e.preventDefault();
  2658. if (this.state.gid == undefined || !this.state.gid) {
  2659. message.warning("服务名称不匹配!");
  2660. return false;
  2661. }
  2662. if (!this.state.commodityPrice) {
  2663. message.warning("请输入金额!");
  2664. this.refs.commodityPrice.focus();
  2665. return false;
  2666. }
  2667. let reg = /^([0]|[1-9][0-9]*)$/;
  2668. if (
  2669. !this.state.commodityQuantity ||
  2670. !reg.test(this.state.commodityQuantity)
  2671. ) {
  2672. message.warning("请输入正确商品数量!");
  2673. this.refs.commodityQuantity.focus();
  2674. return false;
  2675. }
  2676. if (!this.state.main) {
  2677. message.warning("请选择是否为主要项目!");
  2678. this.refs.commodityQuantity.focus();
  2679. return false;
  2680. }
  2681. this.setState({
  2682. loading: true
  2683. });
  2684. let api = this.state.addState
  2685. ? "/api/admin/newOrder/addOrderTask"
  2686. : "/api/bianji";
  2687. $.ajax({
  2688. method: "POST",
  2689. dataType: "json",
  2690. crossDomain: false,
  2691. url: globalConfig.context + api,
  2692. data: {
  2693. commodityId: this.state.gid, //商品ID
  2694. orderNo: this.props.datauser.orderNo, //订单编号
  2695. commodityName: this.state.commodityName, //商品名称
  2696. commodityQuantity: this.state.commodityQuantity, //商品数量
  2697. commodityPrice: this.state.commodityPrice, //签单总价
  2698. taskComment: this.state.taskComment, //服务说明
  2699. main: this.state.main //是否为主要项目
  2700. }
  2701. }).done(
  2702. function(data) {
  2703. this.setState({
  2704. loading: false
  2705. });
  2706. if (!data.error.length) {
  2707. message.success("保存成功!");
  2708. this.nextCancel();
  2709. //this.loaduser(this.props.datauser);
  2710. this.loadData();
  2711. } else {
  2712. message.warning(data.error[0].message);
  2713. }
  2714. }.bind(this)
  2715. );
  2716. },
  2717. //点击打卡项目详情
  2718. tableRowClick(record) {
  2719. this.setState({
  2720. jid: record.id, //项目ID
  2721. kid: record.commodityId, //商品ID
  2722. commodityName: record.commodityName, //金额
  2723. commodityPrice: record.commodityPrice, //金额
  2724. commodityQuantity: record.commodityQuantity, //数量
  2725. taskComment: record.taskComment, //备注
  2726. main: record.main.toString(), //是否为主要
  2727. addnextVisible: true,
  2728. addState: 0
  2729. });
  2730. },
  2731. //修改项目详情
  2732. tabRowSave(e) {
  2733. e.preventDefault();
  2734. if (!this.state.commodityPrice) {
  2735. message.warning("金额不能为空!");
  2736. return false;
  2737. }
  2738. let reg = /^([0]|[1-9][0-9]*)$/;
  2739. if (
  2740. !this.state.commodityQuantity ||
  2741. !reg.test(this.state.commodityQuantity)
  2742. ) {
  2743. message.warning("请输入正确商品数量!");
  2744. return false;
  2745. }
  2746. if (!this.state.main) {
  2747. message.warning("请选择是否为主要项目!");
  2748. this.refs.commodityQuantity.focus();
  2749. return false;
  2750. }
  2751. $.ajax({
  2752. method: "POST",
  2753. dataType: "json",
  2754. crossDomain: false,
  2755. url: globalConfig.context + "/api/admin/newOrder/updateOrderTask",
  2756. data: {
  2757. id: this.state.jid, //项目ID
  2758. commodityId: this.state.kid, //商品ID
  2759. orderNo: this.props.datauser.orderNo, //订单编号
  2760. main: this.state.main, //是否为主要
  2761. commodityPrice: this.state.commodityPrice, //金额
  2762. commodityQuantity: this.state.commodityQuantity, //数量
  2763. taskComment: this.state.taskComment //备注
  2764. }
  2765. }).done(
  2766. function(data) {
  2767. this.setState({
  2768. loading: false
  2769. });
  2770. if (!data.error.length) {
  2771. message.success("保存成功!");
  2772. this.nextCancel();
  2773. //this.loaduser(this.props.datauser);
  2774. this.loadData();
  2775. } else {
  2776. message.warning(data.error[0].message);
  2777. }
  2778. }.bind(this)
  2779. );
  2780. },
  2781. //签单时间选择
  2782. selTime(e, index) {
  2783. this.setState({
  2784. entryTime: e,
  2785. signDate: e,
  2786. selTime: index
  2787. });
  2788. },
  2789. //退单操作
  2790. //点击退单
  2791. tuikuan() {
  2792. this.setState({
  2793. lookVisible: true,
  2794. contractUrl: [],
  2795. applicationUrl: [],
  2796. reason: ""
  2797. });
  2798. },
  2799. //关闭退单
  2800. noCancel() {
  2801. this.setState({
  2802. lookVisible: false
  2803. });
  2804. },
  2805. //点击确认退单
  2806. tuidanOk() {
  2807. let contractUrls = [];
  2808. let applicationUrls = [];
  2809. if (this.state.contractUrl.length) {
  2810. let picArr = [];
  2811. this.state.contractUrl.map(function(item) {
  2812. if (
  2813. item.response &&
  2814. item.response.data &&
  2815. item.response.data.length
  2816. ) {
  2817. picArr.push(item.response.data);
  2818. }
  2819. });
  2820. contractUrls = picArr.join(",");
  2821. }
  2822. if (this.state.applicationUrl.length) {
  2823. let picArr = [];
  2824. this.state.applicationUrl.map(function(item) {
  2825. if (
  2826. item.response &&
  2827. item.response.data &&
  2828. item.response.data.length
  2829. ) {
  2830. picArr.push(item.response.data);
  2831. }
  2832. });
  2833. applicationUrls = picArr.join(",");
  2834. }
  2835. $.ajax({
  2836. method: "POST",
  2837. dataType: "json",
  2838. crossDomain: false,
  2839. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  2840. data: {
  2841. orderNo: this.state.orderNo, //订单编号
  2842. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  2843. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  2844. reason: this.state.reason //退单原因
  2845. }
  2846. }).done(
  2847. function(data) {
  2848. this.setState({
  2849. loading: false
  2850. });
  2851. if (!data.error.length) {
  2852. message.success("退单成功!");
  2853. this.noCancel();
  2854. this.handleCancelclose();
  2855. } else {
  2856. message.warning(data.error[0].message);
  2857. }
  2858. }.bind(this)
  2859. );
  2860. },
  2861. //开单选择订单类型骚操作
  2862. orderTypeFn(e) {
  2863. if (e == 0) {
  2864. this.setState({
  2865. bussStats: true,
  2866. orderType: e
  2867. });
  2868. this.category();
  2869. } else {
  2870. this.setState({
  2871. contractType: undefined,
  2872. bussStats: false,
  2873. orderType: e
  2874. });
  2875. }
  2876. },
  2877. //品类数据获取
  2878. category() {
  2879. $.ajax({
  2880. method: "get",
  2881. dataType: "json",
  2882. crossDomain: false,
  2883. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  2884. data: {},
  2885. success: function(data) {
  2886. let thedata = data.data;
  2887. let theArr = [];
  2888. if (!thedata) {
  2889. if (data.error && data.error.length) {
  2890. message.warning(data.error[0].message);
  2891. }
  2892. thedata = {};
  2893. } else {
  2894. thedata.map(function(item, index) {
  2895. theArr.push({
  2896. key: index,
  2897. name: item.cname,
  2898. id: item.id
  2899. });
  2900. });
  2901. }
  2902. this.setState({
  2903. contractType: undefined,
  2904. categoryArr: theArr
  2905. });
  2906. }.bind(this)
  2907. });
  2908. },
  2909. //变更申请
  2910. changeApply() {
  2911. if(this.state.typeChange == undefined || this.state.typeChange == "" && this.state.typeChange != 0) {
  2912. message.warning("请选择变更类型")
  2913. return false
  2914. }
  2915. if(this.state.typeChange == 0 || this.state.typeChange == 1 || this.state.typeChange == 3) {
  2916. if(this.state.settlementAmount < this.state.changeAmount) {
  2917. message.warning("退款金额大于已收款金额")
  2918. return
  2919. }
  2920. }
  2921. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  2922. message.warning("当前订单流程不能发起变更!");
  2923. return false;
  2924. }
  2925. if (this.state.changeAmount === "") {
  2926. message.warning("申请退款金额不能为空!");
  2927. // console.log(this.state.changeAmount);
  2928. return false;
  2929. }
  2930. if (this.state.remarksC == "") {
  2931. message.warning("请正确填写变更原因");
  2932. return false;
  2933. }
  2934. if (this.state.startRemarks == "") {
  2935. message.warning("请正确填写备注信息");
  2936. return false;
  2937. }
  2938. let theorgCodeUrl = [];
  2939. if (this.state.voucherUrl.length) {
  2940. let picArr = [];
  2941. this.state.voucherUrl.map(function(item) {
  2942. if (
  2943. item.response &&
  2944. item.response.data &&
  2945. item.response.data.length
  2946. ) {
  2947. picArr.push(item.response.data);
  2948. }
  2949. });
  2950. theorgCodeUrl = picArr.join(",");
  2951. }
  2952. this.setState({
  2953. loading: true
  2954. });
  2955. if (this.state.typeChange == 0) {
  2956. $.ajax({
  2957. method: "post",
  2958. dataType: "json",
  2959. crossDomain: false,
  2960. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2961. data: {
  2962. orderNo: this.state.orderNo, //订单编号
  2963. processState: 1,
  2964. status: 1,
  2965. startRemarks: this.state.startRemarks,
  2966. remarks: this.state.remarksC,
  2967. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2968. totalAmount: this.state.totalAmount,
  2969. settlementAmount: this.state.settlementAmount,
  2970. changeAmount: this.state.changeAmount,
  2971. applicant: this.state.salesmanName,
  2972. depName: this.state.depName,
  2973. type: this.state.typeChange
  2974. }
  2975. }).done(
  2976. function(data) {
  2977. this.setState({
  2978. loading: false
  2979. });
  2980. if (!data.error.length) {
  2981. message.success("发起变更成功");
  2982. this.handleCancelclose();
  2983. } else {
  2984. message.warning(data.error[0].message);
  2985. this.setState({
  2986. loading: false
  2987. });
  2988. }
  2989. }.bind(this)
  2990. );
  2991. } else {
  2992. $.ajax({
  2993. method: "post",
  2994. dataType: "json",
  2995. crossDomain: false,
  2996. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  2997. data: {
  2998. orderNo: this.state.orderNo, //订单编号
  2999. processState: 0,
  3000. status: 0,
  3001. startRemarks: this.state.startRemarks,
  3002. remarks: this.state.remarksC,
  3003. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3004. totalAmount: this.state.totalAmount,
  3005. settlementAmount: this.state.settlementAmount,
  3006. changeAmount: this.state.changeAmount,
  3007. applicant: this.state.salesmanName,
  3008. depName: this.state.depName,
  3009. type: this.state.typeChange
  3010. }
  3011. }).done(
  3012. function(data) {
  3013. this.setState({
  3014. loading: false
  3015. });
  3016. if (!data.error.length) {
  3017. message.success("发起变更草稿");
  3018. this.setState(
  3019. {
  3020. isCaoGao: true,
  3021. loading: false
  3022. },
  3023. () => {
  3024. this.callback("2");
  3025. }
  3026. );
  3027. } else {
  3028. message.warning(data.error[0].message);
  3029. }
  3030. }.bind(this)
  3031. );
  3032. }
  3033. },
  3034. reset() {
  3035. this.setState({
  3036. startRemarks: "",
  3037. remarksC: "",
  3038. voucherUrl: [],
  3039. totalAmount: undefined,
  3040. settlementAmount: undefined,
  3041. changeAmount: "0",
  3042. applicant: undefined,
  3043. depNameChange: undefined,
  3044. typeChange: undefined
  3045. });
  3046. },
  3047. componentWillReceiveProps(nextProps) {
  3048. //props改变时触发
  3049. this.state.visible = nextProps.showDesc;
  3050. this.state.signBillVisible = nextProps.signBillVisible;
  3051. if (this.state.signBillVisible) {
  3052. this.loaduser(nextProps.uid);
  3053. }
  3054. if (nextProps.userDetaile && nextProps.showDesc) {
  3055. this.loaduser(nextProps.datauser);
  3056. this.jiedian(nextProps.datauser.orderNo);
  3057. this.jiedianNew(nextProps.datauser.orderNo);
  3058. this.loadData(nextProps.datauser);
  3059. this.getChangeData(nextProps.datauser);
  3060. } else {
  3061. this.setState({
  3062. orderType: undefined,
  3063. customerName: "",
  3064. autoId: "",
  3065. customerArr: [],
  3066. contractType: undefined,
  3067. bussStats: false,
  3068. customType: undefined
  3069. });
  3070. }
  3071. },
  3072. //查看变更记录
  3073. getChangeData(record) {
  3074. this.setState({
  3075. loading: true
  3076. });
  3077. $.ajax({
  3078. method: "get",
  3079. dataType: "json",
  3080. crossDomain: false,
  3081. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3082. data: {
  3083. orderNo: record ? record.orderNo : this.props.datauser.orderNo
  3084. },
  3085. success: function(data) {
  3086. this.setState({
  3087. loading: false
  3088. });
  3089. let url = window.location.href.substring(7);
  3090. // console.log(data.data);
  3091. if (data.data && data.data.length) {
  3092. let thisdata = data.data[data.data.length - 1];
  3093. let obj = {
  3094. id: thisdata.id,
  3095. typeChange: thisdata.type,
  3096. totalAmount: thisdata.totalAmount,
  3097. settlementAmount: thisdata.settlementAmount,
  3098. changeAmount: thisdata.changeAmount,
  3099. remarksC: thisdata.remarks,
  3100. startRemarks: thisdata.zxsRemarks,
  3101. processState: thisdata.processState,
  3102. status: thisdata.status,
  3103. arrears: thisdata.arrears,
  3104. createTimes: thisdata.createTimes,
  3105. voucherUrl: thisdata.voucherUrl
  3106. ? splitUrl(
  3107. thisdata.voucherUrl,
  3108. ",",
  3109. globalConfig.avatarHost + "/upload",
  3110. url
  3111. )
  3112. : [],
  3113. };
  3114. this.proList(thisdata.id);
  3115. this.cuiList(thisdata.id);
  3116. this.logList(thisdata.id)
  3117. this.setState({
  3118. //判断是否有合同变更记录
  3119. isJilu: true,
  3120. detailChange: obj
  3121. });
  3122. }
  3123. }.bind(this)
  3124. });
  3125. },
  3126. showConfirm(fn, record) {
  3127. confirm({
  3128. title: "确定删除此项目吗?",
  3129. content: (
  3130. <span style={{ color: "red" }}>
  3131. 删除后会将该项目下的所有催款节点自动清除!!!
  3132. </span>
  3133. ),
  3134. onOk() {
  3135. fn(record);
  3136. },
  3137. onCancel() {}
  3138. });
  3139. },
  3140. changeAddPro() {
  3141. this.setState({
  3142. changeVisible: true,
  3143. gid: "",
  3144. customerArr: [],
  3145. commodityName: "",
  3146. commodityQuantity: "",
  3147. commodityId: "",
  3148. taskComment: "",
  3149. main: undefined,
  3150. commodityPrice: ""
  3151. });
  3152. },
  3153. changeProSubmit() {
  3154. if (this.state.gid == undefined || !this.state.gid) {
  3155. message.warning("服务名称不匹配!");
  3156. return false;
  3157. }
  3158. if (!this.state.commodityPrice) {
  3159. message.warning("请输入金额!");
  3160. this.refs.commodityPrice.focus();
  3161. return false;
  3162. }
  3163. let reg = /^([0]|[1-9][0-9]*)$/;
  3164. if (
  3165. !this.state.commodityQuantity ||
  3166. !reg.test(this.state.commodityQuantity)
  3167. ) {
  3168. message.warning("请输入正确商品数量!");
  3169. this.refs.commodityQuantity.focus();
  3170. return false;
  3171. }
  3172. if (!this.state.main) {
  3173. message.warning("请选择是否为主要项目!");
  3174. this.refs.commodityQuantity.focus();
  3175. return false;
  3176. }
  3177. this.setState({
  3178. loading: true
  3179. });
  3180. let type = 0;
  3181. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  3182. type = 1;
  3183. }
  3184. $.ajax({
  3185. method: "post",
  3186. dataType: "json",
  3187. crossDomain: false,
  3188. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  3189. data: {
  3190. commodityId: this.state.gid, //商品ID
  3191. orderNo: this.props.datauser.orderNo, //订单编号
  3192. commodityName: this.state.commodityName, //商品名称
  3193. commodityQuantity: this.state.commodityQuantity, //商品数量
  3194. commodityPrice: this.state.commodityPrice, //签单总价
  3195. taskComment: this.state.taskComment, //服务说明
  3196. main: this.state.main, //是否为主要项目
  3197. cid: this.state.changeId, //变更ID
  3198. type
  3199. },
  3200. success: function(data) {
  3201. let theArr = [];
  3202. if (data.error && data.error.length) {
  3203. message.warning(data.error[0].message);
  3204. } else {
  3205. message.success("保存成功");
  3206. this.nextCancel();
  3207. this.proList();
  3208. }
  3209. }.bind(this)
  3210. }).always(
  3211. function() {
  3212. this.setState({
  3213. loading: false
  3214. });
  3215. }.bind(this)
  3216. );
  3217. },
  3218. changeDeletePro(record) {
  3219. this.setState({
  3220. loading: true
  3221. });
  3222. $.ajax({
  3223. method: "post",
  3224. dataType: "json",
  3225. crossDomain: false,
  3226. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3227. data: {
  3228. id: record.id,
  3229. type: 3,
  3230. tid: record.tid,
  3231. splitStatus: record.splitStatus
  3232. },
  3233. success: function(data) {
  3234. let theArr = [];
  3235. if (data.error && data.error.length) {
  3236. message.warning(data.error[0].message);
  3237. } else {
  3238. message.success("删除成功");
  3239. this.proList();
  3240. this.cuiList();
  3241. }
  3242. }.bind(this)
  3243. }).always(
  3244. function() {
  3245. this.setState({
  3246. loading: false
  3247. });
  3248. }.bind(this)
  3249. );
  3250. },
  3251. //点击新增变更催款节点
  3252. changeAddCui() {
  3253. this.state.cuiDataSource.push({
  3254. key: this.state.cuiDataSource.length,
  3255. money: "",
  3256. dunSubject: undefined,
  3257. orderNo: this.state.orderNo,
  3258. dunTarget: this.state.kehuId
  3259. });
  3260. this.setState({
  3261. cuiDataSource: this.state.cuiDataSource,
  3262. cuiFlag: true
  3263. });
  3264. },
  3265. //删除变更收款节点
  3266. changeDeleteCui(index) {
  3267. if (index.id) {
  3268. this.state.cuiDataSource.splice(index.id, 1);
  3269. this.setState({
  3270. contactListNew: this.state.cuiDataSource,
  3271. cuiFlag: false,
  3272. addFlag: false,
  3273. boFlag: false
  3274. });
  3275. $.ajax({
  3276. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3277. method: "post",
  3278. data: {
  3279. id: index.id,
  3280. type: 3,
  3281. tid: index.tid,
  3282. did: index.did
  3283. }
  3284. }).done(
  3285. function(data) {
  3286. this.setState({
  3287. loading: false
  3288. });
  3289. if (!data.error.length) {
  3290. message.success("删除成功!");
  3291. this.setState({
  3292. cuiFlag: false
  3293. });
  3294. this.cuiList();
  3295. this.proList();
  3296. } else {
  3297. message.warning(data.error[0].message);
  3298. }
  3299. }.bind(this)
  3300. );
  3301. } else {
  3302. this.state.cuiDataSource.splice(index.key, 1);
  3303. this.setState({
  3304. cuiDataSource: this.state.cuiDataSource,
  3305. cuiFlag: false,
  3306. addFlag: false,
  3307. boFlag: false
  3308. });
  3309. }
  3310. },
  3311. changeSaveCui(record) {
  3312. if (record.boStatus == "false") {
  3313. record.boStatus = false;
  3314. } else if (record.boStatus == "true") {
  3315. record.boStatus = true;
  3316. }
  3317. if (!this.state.yearFlag) {
  3318. if (!record.effectiveCount) {
  3319. message.warning("请选择服务年限");
  3320. return;
  3321. }
  3322. } else {
  3323. record.effectiveCount = "";
  3324. }
  3325. if (record.money == "") {
  3326. message.warning("请填写金额");
  3327. return;
  3328. }
  3329. if (record.boStatus) {
  3330. if (
  3331. typeof +record.money == "number" &&
  3332. +record.money >= 0 &&
  3333. +record.money <= 1
  3334. ) {
  3335. record.appropriationRatio = record.money;
  3336. } else {
  3337. message.warning("金额比例填写错误,比例范围0~1");
  3338. return;
  3339. }
  3340. }
  3341. if (!record.dunType) {
  3342. message.warning("请选择对应科目");
  3343. return;
  3344. }
  3345. if (record.dunType != 1) {
  3346. record.waitDay = "";
  3347. }
  3348. this.setState({
  3349. loading: true
  3350. });
  3351. if (record.boStatus) {
  3352. $.ajax({
  3353. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3354. method: "post",
  3355. data: {
  3356. orderNo: record.orderNo,
  3357. ctid: record.ctid,
  3358. projectType: record.sort,
  3359. dunType: record.dunType,
  3360. appropriationRatio: record.appropriationRatio,
  3361. waitDay: record.waitDay,
  3362. effectiveCount: record.effectiveCount,
  3363. cid: this.state.changeId //变更ID
  3364. }
  3365. }).done(
  3366. function(data) {
  3367. this.setState({
  3368. loading: false
  3369. });
  3370. if (!data.error.length) {
  3371. message.success("保存成功!");
  3372. this.setState({
  3373. cuiFlag: false,
  3374. boFlag: false,
  3375. addFlag: false
  3376. });
  3377. this.cuiList();
  3378. } else {
  3379. message.warning(data.error[0].message);
  3380. }
  3381. }.bind(this)
  3382. );
  3383. } else {
  3384. $.ajax({
  3385. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  3386. method: "post",
  3387. data: {
  3388. orderNo: record.orderNo,
  3389. ctid: record.ctid,
  3390. projectType: record.sort,
  3391. dunType: record.dunType,
  3392. money: record.money,
  3393. waitDay: record.waitDay,
  3394. effectiveCount: record.effectiveCount,
  3395. cid: this.state.changeId //变更ID
  3396. }
  3397. }).done(
  3398. function(data) {
  3399. this.setState({
  3400. loading: false
  3401. });
  3402. if (!data.error.length) {
  3403. message.success("保存成功!");
  3404. this.setState({
  3405. cuiFlag: false,
  3406. boFlag: false,
  3407. addFlag: false
  3408. });
  3409. this.cuiList();
  3410. } else {
  3411. message.warning(data.error[0].message);
  3412. }
  3413. }.bind(this)
  3414. );
  3415. }
  3416. },
  3417. submitChange() {
  3418. if (
  3419. this.state.typeChange == undefined ||
  3420. (this.state.typeChange == "" && this.state.typeChange != 0)
  3421. ) {
  3422. message.warning("请选择变更类型");
  3423. return false;
  3424. }
  3425. if (
  3426. this.state.typeChange == 0 ||
  3427. this.state.typeChange == 1 ||
  3428. this.state.typeChange == 3
  3429. ) {
  3430. if (this.state.settlementAmount < this.state.changeAmount) {
  3431. message.warning("退款金额大于已收款金额");
  3432. return;
  3433. }
  3434. }
  3435. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  3436. message.warning("当前订单流程不能发起变更!");
  3437. return false;
  3438. }
  3439. if (this.state.changeAmount === "") {
  3440. message.warning("申请退款金额不能为空!");
  3441. return false;
  3442. }
  3443. if (this.state.remarksC == "") {
  3444. message.warning("请正确填写变更原因");
  3445. return false;
  3446. }
  3447. if (this.state.startRemarks == "") {
  3448. message.warning("请正确填写备注信息");
  3449. return false;
  3450. }
  3451. let theorgCodeUrl = [];
  3452. if (this.state.voucherUrl.length) {
  3453. let picArr = [];
  3454. this.state.voucherUrl.map(function(item) {
  3455. if (
  3456. item.response &&
  3457. item.response.data &&
  3458. item.response.data.length
  3459. ) {
  3460. picArr.push(item.response.data);
  3461. }
  3462. });
  3463. theorgCodeUrl = picArr.join(",");
  3464. }
  3465. this.setState({
  3466. loading: true
  3467. });
  3468. $.ajax({
  3469. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  3470. method: "post",
  3471. data: {
  3472. id: this.state.changeId,
  3473. changeType: 0,
  3474. orderNo: this.state.orderNo, //订单编号
  3475. processState: 0,
  3476. startRemarks: this.state.startRemarks,
  3477. remarks: this.state.remarksC,
  3478. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3479. totalAmount: this.state.totalAmount,
  3480. settlementAmount: this.state.settlementAmount,
  3481. changeAmount: this.state.changeAmount,
  3482. applicant: this.state.salesmanName,
  3483. depName: this.state.depName,
  3484. type: this.state.typeChange
  3485. }
  3486. }).done(
  3487. function(data) {
  3488. if (!data.error.length) {
  3489. this.setState({
  3490. loading: false
  3491. });
  3492. message.success("发起变更成功");
  3493. this.handleCancelclose();
  3494. } else {
  3495. message.warning(data.error[0].message);
  3496. this.setState({
  3497. loading: false
  3498. });
  3499. }
  3500. }.bind(this)
  3501. );
  3502. },
  3503. editCui(record) {
  3504. this.setState({
  3505. editCuiVisible: true,
  3506. editCuiMoney: record.money,
  3507. editCuiTid: record.tid,
  3508. editCuiId: record.id
  3509. });
  3510. },
  3511. editPro(record) {
  3512. this.setState({
  3513. editProVisible: true,
  3514. editSplitStatus: record.splitStatus,
  3515. editProMoney: record.commodityPrice,
  3516. editProCommodityQuantity: record.commodityQuantity,
  3517. editProTid: record.tid,
  3518. editProId: record.id
  3519. });
  3520. },
  3521. submitEditCui() {
  3522. this.setState({
  3523. loading: true
  3524. });
  3525. $.ajax({
  3526. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  3527. method: "post",
  3528. data: {
  3529. id: this.state.editCuiId,
  3530. type: this.state.editCuiTid ? 2 : 1,
  3531. money: this.state.editCuiMoney,
  3532. tid: this.state.editCuiTid
  3533. }
  3534. }).done(
  3535. function(data) {
  3536. this.setState({
  3537. loading: false
  3538. });
  3539. if (!data.error.length) {
  3540. message.success("修改成功!");
  3541. this.cuiList();
  3542. this.proList();
  3543. this.setState({
  3544. editCuiVisible: false
  3545. });
  3546. } else {
  3547. message.warning(data.error[0].message);
  3548. }
  3549. }.bind(this)
  3550. );
  3551. },
  3552. submitEditPro() {
  3553. this.setState({
  3554. loading: true
  3555. });
  3556. $.ajax({
  3557. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  3558. method: "post",
  3559. data: {
  3560. id: this.state.editProId,
  3561. type: this.state.editProTid ? 2 : 1,
  3562. commodityPrice: this.state.editProMoney,
  3563. commodityQuantity: this.state.editProCommodityQuantity,
  3564. tid: this.state.editProTid
  3565. }
  3566. }).done(
  3567. function(data) {
  3568. this.setState({
  3569. loading: false
  3570. });
  3571. if (!data.error.length) {
  3572. message.success("修改成功!");
  3573. this.cuiList();
  3574. this.proList();
  3575. this.setState({
  3576. editProVisible: false
  3577. });
  3578. } else {
  3579. message.warning(data.error[0].message);
  3580. }
  3581. }.bind(this)
  3582. );
  3583. },
  3584. render() {
  3585. const expandedRowRender = e => {
  3586. const data = e.list;
  3587. data.forEach(item => {
  3588. item.key = item.id;
  3589. });
  3590. let columns = [];
  3591. if (e.list instanceof Array && e.list.length) {
  3592. columns = [
  3593. {
  3594. title: "变更状态",
  3595. dataIndex: "type",
  3596. key: "type",
  3597. render: (text, record) => {
  3598. let str = "";
  3599. let color = "";
  3600. if (text == 1) {
  3601. str = "增";
  3602. color = "#87d068";
  3603. } else if (text == 2) {
  3604. str = "改";
  3605. color = "#108ee9";
  3606. } else if (text == 3) {
  3607. str = "删";
  3608. color = "#f50";
  3609. }
  3610. return (
  3611. <span>
  3612. <Tag
  3613. color={color}
  3614. style={{ display: text == 0 ? "none" : "inline-block" }}
  3615. >
  3616. {str}
  3617. </Tag>
  3618. {record.splitStatus == 1 ? (
  3619. <Tag
  3620. color="#108ee9"
  3621. // onClick={e => {
  3622. // e.stopPropagation();
  3623. // this.showRes(record);
  3624. // }}
  3625. >
  3626. 父项目
  3627. </Tag>
  3628. ) : (
  3629. ""
  3630. )}
  3631. {record.splitStatus == 2 ? (
  3632. <Tag
  3633. color="#108ee9"
  3634. // onClick={e => {
  3635. // e.stopPropagation();
  3636. // this.showRes(record);
  3637. // }}
  3638. >
  3639. 子项目
  3640. </Tag>
  3641. ) : (
  3642. ""
  3643. )}
  3644. </span>
  3645. );
  3646. },
  3647. },
  3648. {
  3649. title: "业务项目名称",
  3650. dataIndex: "commodityName",
  3651. key: "commodityName",
  3652. render: (text, record) => {
  3653. return text + "-" + record.id;
  3654. },
  3655. },
  3656. {
  3657. title: "项目类别",
  3658. dataIndex: "cname",
  3659. key: "cname",
  3660. },
  3661. {
  3662. title: "项目数量",
  3663. dataIndex: "commodityQuantity",
  3664. key: "commodityQuantity",
  3665. },
  3666. {
  3667. title: "金额(万元)",
  3668. dataIndex: "commodityPrice",
  3669. key: "commodityPrice",
  3670. render: (text, record) => {
  3671. if (record.splitStatus == 2) {
  3672. return "/";
  3673. } else {
  3674. return text;
  3675. }
  3676. },
  3677. },
  3678. {
  3679. title: "主要项目",
  3680. dataIndex: "main",
  3681. key: "main",
  3682. render: (text) => {
  3683. return text ? "是" : "否";
  3684. },
  3685. },
  3686. {
  3687. title: "项目负责人",
  3688. dataIndex: "receiverName",
  3689. key: "receiverName",
  3690. },
  3691. {
  3692. title: "项目说明",
  3693. dataIndex: "taskComment",
  3694. key: "taskComment",
  3695. render: (text) => {
  3696. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  3697. },
  3698. },
  3699. {
  3700. title: "操作",
  3701. dataIndex: "ABC",
  3702. key: "ABC",
  3703. render: (text, record) => {
  3704. return (
  3705. <div>
  3706. <Button
  3707. onClick={(e) => {
  3708. e.stopPropagation();
  3709. this.showConfirm(this.changeDeletePro, record);
  3710. }}
  3711. disabled={this.state.listFlag}
  3712. style={{
  3713. display: this.state.displayList ? "none" : "block",
  3714. }}
  3715. >
  3716. 删除
  3717. </Button>
  3718. </div>
  3719. );
  3720. },
  3721. },
  3722. ];
  3723. return (
  3724. <Table
  3725. columns={columns}
  3726. scroll={{ x: "max-content", y: 0 }}
  3727. dataSource={data}
  3728. pagination={false}
  3729. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  3730. />
  3731. );
  3732. } else {
  3733. columns = [];
  3734. return (
  3735. <p
  3736. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  3737. >
  3738. 此项目暂未拆分
  3739. </p>
  3740. );
  3741. }
  3742. };
  3743. const expandedRowRenderDetail = e => {
  3744. const data = e.list;
  3745. data.forEach(item => {
  3746. item.key = item.id;
  3747. });
  3748. let columns = [];
  3749. if (e.list instanceof Array && e.list.length) {
  3750. columns = [
  3751. {
  3752. title: "变更状态",
  3753. dataIndex: "type",
  3754. key: "type",
  3755. render: (text, record) => {
  3756. let str = "";
  3757. let color = "";
  3758. if (text == 1) {
  3759. str = "增";
  3760. color = "#87d068";
  3761. } else if (text == 2) {
  3762. str = "改";
  3763. color = "#108ee9";
  3764. } else if (text == 3) {
  3765. str = "删";
  3766. color = "#f50";
  3767. }
  3768. return (
  3769. <span>
  3770. <Tag
  3771. color={color}
  3772. style={{ display: text == 0 ? "none" : "inline-block" }}
  3773. >
  3774. {str}
  3775. </Tag>
  3776. {record.splitStatus == 1 ? (
  3777. <Tag
  3778. color="#108ee9"
  3779. // onClick={e => {
  3780. // e.stopPropagation();
  3781. // this.showRes(record);
  3782. // }}
  3783. >
  3784. 父项目
  3785. </Tag>
  3786. ) : (
  3787. ""
  3788. )}
  3789. {record.splitStatus == 2 ? (
  3790. <Tag
  3791. color="#108ee9"
  3792. // onClick={e => {
  3793. // e.stopPropagation();
  3794. // this.showRes(record);
  3795. // }}
  3796. >
  3797. 子项目
  3798. </Tag>
  3799. ) : (
  3800. ""
  3801. )}
  3802. </span>
  3803. );
  3804. }
  3805. },
  3806. {
  3807. title: "业务项目名称",
  3808. dataIndex: "commodityName",
  3809. key: "commodityName"
  3810. },
  3811. {
  3812. title: "项目类别",
  3813. dataIndex: "cname",
  3814. key: "cname"
  3815. },
  3816. {
  3817. title: "项目数量",
  3818. dataIndex: "commodityQuantity",
  3819. key: "commodityQuantity"
  3820. },
  3821. {
  3822. title: "金额(万元)",
  3823. dataIndex: "commodityPrice",
  3824. key: "commodityPrice",
  3825. render: (text, record) => {
  3826. if (record.splitStatus == 2) {
  3827. return "/";
  3828. } else {
  3829. return text;
  3830. }
  3831. }
  3832. },
  3833. {
  3834. title: "主要项目",
  3835. dataIndex: "main",
  3836. key: "main",
  3837. render: text => {
  3838. return text ? "是" : "否";
  3839. }
  3840. },
  3841. {
  3842. title: "项目负责人",
  3843. dataIndex: "receiverName",
  3844. key: "receiverName"
  3845. },
  3846. {
  3847. title: "项目说明",
  3848. dataIndex: "taskComment",
  3849. key: "taskComment",
  3850. render: text => {
  3851. return text && text.length > 8 ? text.substr(0, 8) + "…" : text;
  3852. }
  3853. },
  3854. ];
  3855. return (
  3856. <Table
  3857. columns={columns}
  3858. scroll={{ x: "max-content", y: 0 }}
  3859. dataSource={data}
  3860. pagination={false}
  3861. />
  3862. );
  3863. } else {
  3864. columns = [];
  3865. return (
  3866. <p
  3867. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  3868. >
  3869. 此项目暂未拆分
  3870. </p>
  3871. );
  3872. }
  3873. };
  3874. const FormItem = Form.Item;
  3875. const { TabPane } = Tabs;
  3876. const { TextArea } = Input;
  3877. const formItemLayout = {
  3878. labelCol: { span: 8 },
  3879. wrapperCol: { span: 14 }
  3880. };
  3881. const contractData = this.state.contractData;
  3882. const formItemList = [
  3883. {
  3884. label: "企业联系人",
  3885. content: <span>{this.state.contacts}</span>
  3886. },
  3887. {
  3888. label: "联系人电话",
  3889. content: <span>{this.state.contactMobile}</span>
  3890. },
  3891. {
  3892. label: "企业法人",
  3893. content: <span>{this.state.legalPerson}</span>
  3894. },
  3895. {
  3896. label: "法人电话",
  3897. content: <span>{this.state.legalPersonTel}</span>
  3898. }
  3899. // {
  3900. // label: "签单金额(万元)",
  3901. // content: <span>{this.state.totalAmount}</span>
  3902. // },
  3903. // {
  3904. // label: "首付金额(万元)",
  3905. // content: <span>{this.state.firstAmount}</span>
  3906. // },
  3907. // {
  3908. // label: "特批立项",
  3909. // content: <span>{getApprovedState(this.state.approval)}</span>
  3910. // },
  3911. // {
  3912. // label: "合同签订时间",
  3913. // content: <span>{this.state.signDate}</span>
  3914. // },
  3915. // {
  3916. // label: "订单部门",
  3917. // content: <span>{this.state.depName}</span>
  3918. // }
  3919. ];
  3920. const dataSources = this.state.customerArr || [];
  3921. const cuiDataList = this.state.contactList || [];
  3922. let departmentArr = this.state.departmentArr || [];
  3923. const options = this.state.states
  3924. ? dataSources.map(group => (
  3925. <Select.Option key={group.id} value={group.name}>
  3926. {group.name}
  3927. </Select.Option>
  3928. ))
  3929. : dataSources.map((group, index) => (
  3930. <Select.Option key={index} value={group.bname}>
  3931. {group.bname}
  3932. </Select.Option>
  3933. ));
  3934. return (
  3935. <div>
  3936. {this.state.resVisible ? (
  3937. <ResolutionDetail
  3938. cancel={this.resCancel}
  3939. detail={this.state.resRecord}
  3940. visible={this.state.resVisible}
  3941. id={this.state.resRecord.orderNo}
  3942. />
  3943. ) : (
  3944. ""
  3945. )}
  3946. <Modal
  3947. maskClosable={false}
  3948. visible={this.state.visible}
  3949. onOk={this.handleOk}
  3950. onCancel={this.handleCancelclose}
  3951. width={!this.props.userDetaile ? "600px" : "900px"}
  3952. title={!this.props.userDetaile ? "创建订单" : ""}
  3953. footer=""
  3954. // width={1300}
  3955. className="admin-desc-content"
  3956. >
  3957. <Form
  3958. layout="horizontal"
  3959. onSubmit={this.handleSubmit}
  3960. // id="demand-form"
  3961. style={{ paddingBottom: "40px" }}
  3962. >
  3963. <Spin spinning={this.state.loading}>
  3964. <div className="clearfix">
  3965. {!this.props.userDetaile ? (
  3966. <div className="clearfix">
  3967. <div className="clearfix">
  3968. <FormItem {...formItemLayout} label="订单类型">
  3969. <Select
  3970. placeholder="请选择订单类型"
  3971. style={{ width: "200px" }}
  3972. value={this.state.orderType}
  3973. onChange={(e) => {
  3974. this.setState({ orderType: e });
  3975. }}
  3976. >
  3977. {orderTypes.map(function (item) {
  3978. return (
  3979. <Select.Option key={item.value}>
  3980. {item.key}
  3981. </Select.Option>
  3982. );
  3983. })}
  3984. </Select>
  3985. <span className="mandatory">*</span>
  3986. </FormItem>
  3987. </div>
  3988. <FormItem {...formItemLayout} label="客户所属类型">
  3989. <Select
  3990. placeholder="请选择客户所属类型"
  3991. style={{ width: "200px" }}
  3992. value={this.state.customType}
  3993. onChange={(e) => {
  3994. this.setState({ customType: e });
  3995. }}
  3996. >
  3997. {customerType.map(function (item) {
  3998. return (
  3999. <Select.Option key={item.value}>
  4000. {item.key}
  4001. </Select.Option>
  4002. );
  4003. })}
  4004. </Select>
  4005. </FormItem>
  4006. <div className="clearfix">
  4007. <FormItem {...formItemLayout} label="客户名称">
  4008. <AutoComplete
  4009. className="certain-category-search"
  4010. dropdownClassName="certain-category-search-dropdown"
  4011. dropdownMatchSelectWidth={false}
  4012. dropdownStyle={{ width: 200 }}
  4013. size="large"
  4014. style={{ width: "200px" }}
  4015. dataSource={options}
  4016. placeholder="输入名称"
  4017. value={this.state.customerName}
  4018. onChange={this.customerChange}
  4019. filterOption={true}
  4020. onSelect={this.selectAutoCUT}
  4021. >
  4022. <Input />
  4023. </AutoComplete>
  4024. <span className="mandatory">*</span>
  4025. </FormItem>
  4026. </div>
  4027. <div className="addSave" style={{ marginTop: "15px" }}>
  4028. <Button
  4029. className="cancel"
  4030. type="primary"
  4031. onClick={this.handleCancel}
  4032. style={{ marginLeft: "150px" }}
  4033. htmlType="submit"
  4034. >
  4035. 开单
  4036. </Button>
  4037. <Button
  4038. className="cancel"
  4039. type="ghost"
  4040. onClick={this.handleCancelclose}
  4041. style={{ marginLeft: "50px" }}
  4042. >
  4043. 取消
  4044. </Button>
  4045. </div>
  4046. </div>
  4047. ) : (
  4048. <Tabs
  4049. onChange={this.callback}
  4050. activeKey={this.state.activeKey}
  4051. >
  4052. <TabPane tab={"最新订单"} key="1">
  4053. <div className="clearfix">
  4054. <div className="clearfix">
  4055. <FormItem
  4056. className="half-item"
  4057. {...formItemLayout}
  4058. label="合同编号"
  4059. >
  4060. {<span>{this.state.contractNo}</span>}
  4061. </FormItem>
  4062. <FormItem
  4063. className="half-item"
  4064. {...formItemLayout}
  4065. label="订单编号"
  4066. >
  4067. <span>{this.state.orderNo}</span>
  4068. </FormItem>
  4069. <FormItem
  4070. className="half-item"
  4071. {...formItemLayout}
  4072. label="流程状态"
  4073. >
  4074. <span>
  4075. {getProcessStatus(this.state.processStatus)}
  4076. </span>
  4077. </FormItem>
  4078. <FormItem
  4079. className="half-item"
  4080. {...formItemLayout}
  4081. label="结算状态"
  4082. >
  4083. <span>
  4084. {getLiquidationStatus(
  4085. this.state.liquidationStatus
  4086. )}
  4087. </span>
  4088. </FormItem>
  4089. {this.state.processStatus === 0 ? (
  4090. <div className="clearfix">
  4091. <FormItem
  4092. className="half-item"
  4093. {...formItemLayout}
  4094. label="特批立项"
  4095. >
  4096. <Select
  4097. placeholder="请选择客户所属类型"
  4098. style={{ width: "240px" }}
  4099. value={getApprovedState(
  4100. this.state.approval
  4101. )}
  4102. onChange={(e) => {
  4103. this.setState({ approval: e });
  4104. }}
  4105. >
  4106. {/* {tepi.map(function(item) {
  4107. // if(item.key == "特批通过" || item.key == "特批驳回")
  4108. return (
  4109. <Select.Option key={item.value}>
  4110. {item.key}
  4111. </Select.Option>
  4112. );
  4113. })} */}
  4114. <Select.Option key={0}>
  4115. 非特批
  4116. </Select.Option>
  4117. <Select.Option key={1}>特批</Select.Option>
  4118. </Select>
  4119. </FormItem>
  4120. <FormItem
  4121. className="half-item"
  4122. {...formItemLayout}
  4123. label="合同签订时间"
  4124. >
  4125. <DatePicker
  4126. style={{
  4127. marginTop: "2px",
  4128. // width: "240px",
  4129. height: "32px",
  4130. }}
  4131. showTime
  4132. format="YYYY-MM-DD"
  4133. onOk={() => {}}
  4134. value={
  4135. this.state.signDate
  4136. ? moment(this.state.signDate)
  4137. : null
  4138. }
  4139. onChange={(data, dataString) => {
  4140. this.setState({ signDate: dataString });
  4141. }}
  4142. />
  4143. <span
  4144. className="mandatory"
  4145. style={{ marginLeft: 20 }}
  4146. >
  4147. *
  4148. </span>
  4149. </FormItem>
  4150. <FormItem
  4151. className="half-item"
  4152. {...formItemLayout}
  4153. label="订单部门"
  4154. >
  4155. <Select
  4156. placeholder="请输入订单部门"
  4157. style={{ width: 240 }}
  4158. value={this.state.organizationSearch}
  4159. onChange={(e) => {
  4160. this.setState({ organizationSearch: e });
  4161. }}
  4162. >
  4163. {departmentArr.map(function (item) {
  4164. return (
  4165. <Select.Option key={item.id}>
  4166. {item.name}
  4167. </Select.Option>
  4168. );
  4169. })}
  4170. </Select>
  4171. </FormItem>
  4172. </div>
  4173. ) : (
  4174. <div className="clearfix">
  4175. <FormItem
  4176. className="half-item"
  4177. {...formItemLayout}
  4178. label="特批立项"
  4179. >
  4180. <span>
  4181. {getApprovedState(this.state.approval)}
  4182. </span>
  4183. </FormItem>
  4184. <FormItem
  4185. className="half-item"
  4186. {...formItemLayout}
  4187. label="合同签订时间"
  4188. >
  4189. <span>{this.state.signDate}</span>
  4190. </FormItem>
  4191. <FormItem
  4192. className="half-item"
  4193. {...formItemLayout}
  4194. label="订单部门"
  4195. >
  4196. <span>{this.state.depName}</span>
  4197. </FormItem>
  4198. <FormItem
  4199. className="half-item"
  4200. {...formItemLayout}
  4201. label="是否外包"
  4202. >
  4203. <span>
  4204. {this.state.outsource == 0 ? "否" : "是"}
  4205. </span>
  4206. </FormItem>
  4207. </div>
  4208. )}
  4209. </div>
  4210. <h3
  4211. style={{
  4212. marginLeft: 10,
  4213. fontWeight: 800,
  4214. marginBottom: 10,
  4215. }}
  4216. >
  4217. 收款项目
  4218. </h3>
  4219. {this.state.processStatus === 0 ? (
  4220. <div className="clearfix">
  4221. <FormItem
  4222. className="half-item"
  4223. {...formItemLayout}
  4224. label="签单金额(万元)"
  4225. >
  4226. <Input
  4227. placeholder="签单金额"
  4228. ref="signTotalAmount"
  4229. value={this.state.totalAmount}
  4230. onChange={(e) => {
  4231. this.setState({
  4232. totalAmount: e.target.value,
  4233. });
  4234. }}
  4235. style={{ width: "240px" }}
  4236. />
  4237. {/* <span className="mandatory">*</span> */}
  4238. </FormItem>
  4239. <FormItem
  4240. className="half-item"
  4241. {...formItemLayout}
  4242. label="首付金额(万元)"
  4243. >
  4244. <Input
  4245. placeholder="请输入实签首款金额"
  4246. ref="signFirstPayment"
  4247. value={this.state.firstAmount}
  4248. onChange={(e) => {
  4249. this.setState({
  4250. firstAmount: e.target.value,
  4251. });
  4252. }}
  4253. style={{ width: "240px" }}
  4254. />
  4255. {/* <span className="mandatory">*</span> */}
  4256. </FormItem>
  4257. <FormItem
  4258. className="half-item"
  4259. {...formItemLayout}
  4260. label="已收款项"
  4261. >
  4262. <span>
  4263. {this.state.settlementAmount + "万元"}
  4264. </span>
  4265. {/* {this.state.settlementAmount ? (
  4266. <Button
  4267. type="primary"
  4268. onClick={this.tuikuan}
  4269. style={{
  4270. float: "right",
  4271. marginRight: "50px",
  4272. marginBottom: "15px"
  4273. }}
  4274. >
  4275. 退单
  4276. </Button>
  4277. ) : (
  4278. ""
  4279. )} */}
  4280. </FormItem>
  4281. </div>
  4282. ) : (
  4283. <div className="clearfix">
  4284. <FormItem
  4285. className="half-item"
  4286. {...formItemLayout}
  4287. label="签单金额(万元)"
  4288. >
  4289. <span>{this.state.totalAmount}</span>
  4290. </FormItem>
  4291. <FormItem
  4292. className="half-item"
  4293. {...formItemLayout}
  4294. label="首付金额(万元)"
  4295. >
  4296. <span>{this.state.firstAmount}</span>
  4297. </FormItem>
  4298. <FormItem
  4299. className="half-item"
  4300. {...formItemLayout}
  4301. label="已收款项"
  4302. >
  4303. <span>
  4304. {this.state.settlementAmount + "万元"}
  4305. </span>
  4306. {/* {this.state.settlementAmount ? (
  4307. <Button
  4308. type="primary"
  4309. onClick={this.tuikuan}
  4310. style={{
  4311. float: "right",
  4312. marginRight: "50px",
  4313. marginBottom: "15px"
  4314. }}
  4315. >
  4316. 退单
  4317. </Button>
  4318. ) : (
  4319. ""
  4320. )} */}
  4321. </FormItem>
  4322. </div>
  4323. )}
  4324. <h3
  4325. style={{
  4326. marginLeft: 10,
  4327. fontWeight: 800,
  4328. marginBottom: 10,
  4329. }}
  4330. >
  4331. 联系信息
  4332. </h3>
  4333. {this.state.processStatus == 0 ? (
  4334. <div className="clearfix">
  4335. <div className="clearfix">
  4336. <FormItem
  4337. className="half-item"
  4338. {...formItemLayout}
  4339. label="客户名称"
  4340. >
  4341. <span>{this.state.userName}</span>
  4342. </FormItem>
  4343. </div>
  4344. <FormItem
  4345. className="half-item"
  4346. {...formItemLayout}
  4347. label="企业联系人"
  4348. >
  4349. <Input
  4350. placeholder="请输入联系人"
  4351. ref="signTotalAmount"
  4352. value={this.state.contacts}
  4353. onChange={(e) => {
  4354. this.setState({ contacts: e.target.value });
  4355. }}
  4356. style={{ width: "240px" }}
  4357. />
  4358. </FormItem>
  4359. <FormItem
  4360. className="half-item"
  4361. {...formItemLayout}
  4362. label="联系人电话"
  4363. >
  4364. <Input
  4365. placeholder="请输入联系人电话"
  4366. ref="signTotalAmount"
  4367. value={this.state.contactMobile}
  4368. onChange={(e) => {
  4369. this.setState({
  4370. contactMobile: e.target.value,
  4371. });
  4372. }}
  4373. style={{ width: "240px" }}
  4374. />
  4375. </FormItem>
  4376. <FormItem
  4377. className="half-item"
  4378. {...formItemLayout}
  4379. label="企业法人"
  4380. >
  4381. <Input
  4382. placeholder="请输入法人"
  4383. ref="signTotalAmount"
  4384. value={this.state.legalPerson}
  4385. onChange={(e) => {
  4386. this.setState({
  4387. legalPerson: e.target.value,
  4388. });
  4389. }}
  4390. style={{ width: "240px" }}
  4391. />
  4392. </FormItem>
  4393. <FormItem
  4394. className="half-item"
  4395. {...formItemLayout}
  4396. label="法人电话"
  4397. >
  4398. <Input
  4399. placeholder="请输入法人电话"
  4400. ref="signTotalAmount"
  4401. value={this.state.legalPersonTel}
  4402. onChange={(e) => {
  4403. this.setState({
  4404. legalPersonTel: e.target.value,
  4405. });
  4406. }}
  4407. style={{ width: "240px" }}
  4408. />
  4409. </FormItem>
  4410. </div>
  4411. ) : (
  4412. <div className="clearfix">
  4413. {formItemList.map((data, index) => {
  4414. return (
  4415. <FormItem
  4416. className="half-item"
  4417. {...formItemLayout}
  4418. key={index}
  4419. label={data.label}
  4420. >
  4421. {data.content}
  4422. </FormItem>
  4423. );
  4424. })}
  4425. </div>
  4426. )}
  4427. <div className="clearfix">
  4428. {this.state.processStatus == 0 ? (
  4429. <FormItem
  4430. labelCol={{ span: 4 }}
  4431. wrapperCol={{ span: 18 }}
  4432. label={
  4433. <span>
  4434. <strong style={{ color: "#f00" }}>*</strong>
  4435. 合同扫描件
  4436. </span>
  4437. }
  4438. >
  4439. <PicturesWall
  4440. fileList={this.getOrgCodeUrl}
  4441. pictureUrl={this.state.orgCodeUrl}
  4442. url="/api/admin/order/uploadOrderImg"
  4443. sign=""
  4444. />
  4445. <p>图片建议:要清晰。</p>
  4446. <Button
  4447. style={{
  4448. float: "right",
  4449. marginRight: "140px",
  4450. marginTop: "20px",
  4451. }}
  4452. onClick={this.getOrderLog}
  4453. >
  4454. 查看订单日志
  4455. </Button>
  4456. </FormItem>
  4457. ) : (
  4458. <FormItem
  4459. labelCol={{ span: 4 }}
  4460. wrapperCol={{ span: 18 }}
  4461. label="合同扫描件"
  4462. >
  4463. <Upload
  4464. className="demandDetailShow-upload"
  4465. listType="picture-card"
  4466. fileList={this.state.orgCodeUrl}
  4467. onPreview={(file) => {
  4468. this.setState({
  4469. previewImage: file.url || file.thumbUrl,
  4470. previewVisible: true,
  4471. });
  4472. }}
  4473. ></Upload>
  4474. <Modal
  4475. maskClosable={false}
  4476. footer={null}
  4477. visible={this.state.previewVisible}
  4478. onCancel={() => {
  4479. this.setState({ previewVisible: false });
  4480. }}
  4481. >
  4482. <img
  4483. alt=""
  4484. style={{ width: "100%" }}
  4485. src={this.state.previewImage || ""}
  4486. />
  4487. </Modal>
  4488. <Button
  4489. style={{
  4490. float: "right",
  4491. marginRight: "140px",
  4492. marginTop: "20px",
  4493. }}
  4494. onClick={this.getOrderLog}
  4495. >
  4496. 查看订单日志
  4497. </Button>
  4498. </FormItem>
  4499. )}
  4500. </div>
  4501. <div className="clearfix">
  4502. {this.state.processStatus == 0 ? (
  4503. <div className="clearfix">
  4504. <FormItem
  4505. labelCol={{ span: 4 }}
  4506. wrapperCol={{ span: 16 }}
  4507. label="订单留言"
  4508. >
  4509. <Input
  4510. type="textarea"
  4511. placeholder="请输入订单留言"
  4512. rows={4}
  4513. value={this.state.orderRemarks}
  4514. onChange={(e) => {
  4515. this.setState({
  4516. orderRemarks: e.target.value,
  4517. });
  4518. }}
  4519. style={{ width: "95%" }}
  4520. />
  4521. <span className="mandatory">*</span>
  4522. </FormItem>
  4523. </div>
  4524. ) : (
  4525. <FormItem
  4526. labelCol={{ span: 4 }}
  4527. wrapperCol={{ span: 16 }}
  4528. label="订单留言"
  4529. >
  4530. <p
  4531. style={{ width: 500, wordWrap: "break-word" }}
  4532. >
  4533. {this.state.orderRemarks}
  4534. </p>
  4535. </FormItem>
  4536. )}
  4537. </div>
  4538. <div className="clearfix">
  4539. <FormItem
  4540. className="half-item"
  4541. {...formItemLayout}
  4542. label="订单负责人"
  4543. >
  4544. <span>{this.state.salesmanName}</span>
  4545. </FormItem>
  4546. <FormItem
  4547. className="half-item"
  4548. {...formItemLayout}
  4549. label="订单负责人电话"
  4550. >
  4551. <span>{this.state.salesmanMobile}</span>
  4552. </FormItem>
  4553. </div>
  4554. <div className="clearfix">
  4555. <FormItem
  4556. className="half-item"
  4557. {...formItemLayout}
  4558. label="当前财务负责人"
  4559. >
  4560. <span>{this.state.nowFinance}</span>
  4561. </FormItem>
  4562. <FormItem
  4563. className="half-item"
  4564. {...formItemLayout}
  4565. label="当前财务负责人电话"
  4566. >
  4567. <span>{this.state.nowFinanceMobile}</span>
  4568. </FormItem>
  4569. </div>
  4570. <div className="clearfix">
  4571. <FormItem
  4572. className="half-item"
  4573. {...formItemLayout}
  4574. style={{ opacity: ".5" }}
  4575. label="原订单负责人"
  4576. >
  4577. <span>{this.state.oldSalesmanName}</span>
  4578. </FormItem>
  4579. <FormItem
  4580. className="half-item"
  4581. {...formItemLayout}
  4582. style={{ opacity: ".5" }}
  4583. label="原订单负责人电话"
  4584. >
  4585. <span>{this.state.oldSalesmanMobile}</span>
  4586. </FormItem>
  4587. </div>
  4588. <div className="clearfix">
  4589. <FormItem
  4590. className="half-item"
  4591. style={{ opacity: ".5" }}
  4592. {...formItemLayout}
  4593. label="实际财务操作人"
  4594. >
  4595. <span>{this.state.financeName}</span>
  4596. </FormItem>
  4597. <FormItem
  4598. className="half-item"
  4599. {...formItemLayout}
  4600. style={{ opacity: ".5" }}
  4601. label="实际财务操作人电话"
  4602. >
  4603. <span>{this.state.financeMobile}</span>
  4604. </FormItem>
  4605. </div>
  4606. <div>
  4607. <span
  4608. style={{ marginLeft: "50px", fontSize: "20px" }}
  4609. >
  4610. 项目业务
  4611. </span>
  4612. {this.state.processStatus == 0 ? (
  4613. <Button
  4614. type="primary"
  4615. onClick={this.addDetailed}
  4616. style={{
  4617. float: "right",
  4618. marginRight: "50px",
  4619. marginBottom: "15px",
  4620. }}
  4621. >
  4622. 添加项目明细
  4623. </Button>
  4624. ) : (
  4625. ""
  4626. )}
  4627. </div>
  4628. <div
  4629. className="patent-table"
  4630. style={{ marginBottom: 10 }}
  4631. >
  4632. <Spin spinning={this.state.loading}>
  4633. <Table
  4634. columns={this.state.columns}
  4635. scroll={{ x: "max-content", y: 0 }}
  4636. dataSource={this.state.dataSource}
  4637. pagination={this.state.pagination}
  4638. onRowClick={this.tableRowClick}
  4639. bordered
  4640. size="small"
  4641. />
  4642. </Spin>
  4643. </div>
  4644. <div
  4645. style={{
  4646. display: cuiDataList.length ? "block" : "none",
  4647. }}
  4648. >
  4649. <span
  4650. style={{ marginLeft: "50px", fontSize: "20px" }}
  4651. >
  4652. 旧催款节点
  4653. </span>
  4654. <Button
  4655. type="primary"
  4656. // onClick={this.addcontact}
  4657. disabled
  4658. onClick={(e) => {
  4659. cuiDataList.length
  4660. ? this.addcontact()
  4661. : this.addcontactNew();
  4662. }}
  4663. style={{
  4664. float: "right",
  4665. marginRight: "50px",
  4666. marginBottom: "15px",
  4667. display:
  4668. this.state.processStatus == 0
  4669. ? "block"
  4670. : "none",
  4671. }}
  4672. >
  4673. 添加催款节点
  4674. </Button>
  4675. </div>
  4676. <div
  4677. className="clearfix"
  4678. style={{
  4679. display: cuiDataList.length ? "block" : "none",
  4680. }}
  4681. >
  4682. <Spin spinning={this.state.loading}>
  4683. <Form layout="horizontal">
  4684. <Table
  4685. pagination={false}
  4686. columns={this.state.ContactsLists}
  4687. dataSource={this.state.contactList}
  4688. scroll={{ x: "max-content", y: 0 }}
  4689. bordered
  4690. size="small"
  4691. />
  4692. <Col
  4693. span={24}
  4694. offset={9}
  4695. style={{ marginTop: "15px" }}
  4696. ></Col>
  4697. </Form>
  4698. </Spin>
  4699. </div>
  4700. <div
  4701. style={{
  4702. display: cuiDataList.length ? "none" : "block",
  4703. }}
  4704. >
  4705. <span
  4706. style={{
  4707. marginLeft: "50px",
  4708. fontSize: "20px",
  4709. }}
  4710. >
  4711. 新催款节点
  4712. </span>
  4713. <span
  4714. style={{
  4715. display: "inline-block",
  4716. marginLeft: 10,
  4717. color: "red",
  4718. }}
  4719. >
  4720. 金额总计(万元): {this.state.totalCui}
  4721. </span>
  4722. <Button
  4723. type="primary"
  4724. disabled={this.state.addFlag ? true : false}
  4725. // onClick={this.addcontact}
  4726. onClick={(e) => {
  4727. this.setState({ addFlag: true });
  4728. this.addcontactNew();
  4729. }}
  4730. style={{
  4731. float: "right",
  4732. marginRight: "50px",
  4733. marginBottom: "15px",
  4734. display:
  4735. this.state.processStatus == 0
  4736. ? "block"
  4737. : "none",
  4738. }}
  4739. >
  4740. 添加催款节点
  4741. </Button>
  4742. </div>
  4743. <div
  4744. className="clearfix"
  4745. style={{
  4746. display: cuiDataList.length ? "none" : "block",
  4747. }}
  4748. >
  4749. <Spin spinning={this.state.loading}>
  4750. <Form layout="horizontal">
  4751. <Table
  4752. pagination={false}
  4753. columns={this.state.ContactsListsNew}
  4754. dataSource={this.state.contactListNew}
  4755. scroll={{ x: "max-content", y: 0 }}
  4756. bordered
  4757. size="small"
  4758. />
  4759. <Col
  4760. span={24}
  4761. offset={9}
  4762. style={{ marginTop: "15px" }}
  4763. ></Col>
  4764. </Form>
  4765. </Spin>
  4766. </div>
  4767. {this.state.processStatus == 0 ? (
  4768. <div
  4769. className="addSave"
  4770. style={{ marginTop: "15px" }}
  4771. >
  4772. <Button
  4773. className="cancel"
  4774. type="primary"
  4775. onClick={this.handleCancels}
  4776. style={{ marginLeft: "200px" }}
  4777. htmlType="submit"
  4778. >
  4779. 签单
  4780. </Button>
  4781. <Button
  4782. className="cancel"
  4783. type="primary"
  4784. onClick={this.handleCancelq}
  4785. style={{ marginLeft: "50px" }}
  4786. htmlType="submit"
  4787. >
  4788. 保存
  4789. </Button>
  4790. <Button
  4791. className="cancel"
  4792. type="ghost"
  4793. onClick={this.handleCancelclose}
  4794. style={{ marginLeft: "50px" }}
  4795. >
  4796. 取消
  4797. </Button>
  4798. </div>
  4799. ) : (
  4800. ""
  4801. )}
  4802. </div>
  4803. </TabPane>
  4804. <TabPane tab="合同变更发起" key="2">
  4805. {
  4806. <div>
  4807. <div className="clearfix">
  4808. <FormItem
  4809. className="half-item"
  4810. {...formItemLayout}
  4811. label="客户名称"
  4812. >
  4813. <span>{this.state.userName}</span>
  4814. </FormItem>
  4815. </div>
  4816. <div className="clearfix">
  4817. <FormItem
  4818. className="half-item"
  4819. {...formItemLayout}
  4820. label="合同编号"
  4821. >
  4822. <span>{this.state.contractNo}</span>
  4823. </FormItem>
  4824. </div>
  4825. <div className="clearfix">
  4826. <FormItem
  4827. className="half-item"
  4828. {...formItemLayout}
  4829. label="申请变更部门"
  4830. >
  4831. {/* {!this.state.mark ? ( */}
  4832. <span>{this.state.depName}</span>
  4833. {/* ) : (
  4834. <span>{contractData.depName}</span>
  4835. )} */}
  4836. </FormItem>
  4837. <FormItem
  4838. className="half-item"
  4839. {...formItemLayout}
  4840. label="申请人"
  4841. >
  4842. <span>{this.state.salesmanName}</span>
  4843. </FormItem>
  4844. </div>
  4845. <div className="clearfix">
  4846. <FormItem
  4847. labelCol={{ span: 4 }}
  4848. wrapperCol={{ span: 18 }}
  4849. label="变更类型"
  4850. >
  4851. {/* {!this.state.mark ? ( */}
  4852. <Select
  4853. placeholder="选择合同变更类型"
  4854. style={{ width: 200 }}
  4855. disabled={this.state.changeFlag}
  4856. value={this.state.typeChange}
  4857. onChange={(e) => {
  4858. this.setState({
  4859. typeChange: e,
  4860. changeFlag: true,
  4861. });
  4862. if (e == 1) {
  4863. this.setState({
  4864. hetongFlag: false,
  4865. listFlag: false,
  4866. listCuiFlag: false,
  4867. tuiKuanFlag: false,
  4868. displayList: false,
  4869. });
  4870. } else if (e == 2) {
  4871. this.setState({
  4872. hetongFlag: true,
  4873. listFlag: false,
  4874. listCuiFlag: false,
  4875. tuiKuanFlag: true,
  4876. displayList: false,
  4877. });
  4878. } else if (e == 3) {
  4879. this.setState({
  4880. listFlag: false,
  4881. hetongFlag: false,
  4882. listCuiFlag: false,
  4883. tuiKuanFlag: false,
  4884. displayList: true,
  4885. });
  4886. } else if (e == 4) {
  4887. this.setState({
  4888. listFlag: false,
  4889. listCuiFlag: false,
  4890. hetongFlag: false,
  4891. tuiKuanFlag: true,
  4892. displayList: false,
  4893. });
  4894. } else if (e == 5) {
  4895. this.setState({
  4896. listFlag: false,
  4897. listCuiFlag: false,
  4898. hetongFlag: true,
  4899. tuiKuanFlag: true,
  4900. displayList: false,
  4901. });
  4902. } else {
  4903. this.setState({
  4904. listFlag: true,
  4905. hetongFlag: true,
  4906. listCuiFlag: true,
  4907. tuiKuanFlag: false,
  4908. displayList: false,
  4909. });
  4910. }
  4911. }}
  4912. value={this.state.typeChange}
  4913. >
  4914. <Option value={0}>退单退款</Option>
  4915. <Option value={1}>项目及金额变更</Option>
  4916. <Option value={2}>仅项目变更</Option>
  4917. <Option value={3}>仅金额变更</Option>
  4918. <Option value={4}>重报</Option>
  4919. <Option value={5}>赠送</Option>
  4920. </Select>
  4921. <Button
  4922. style={{ marginLeft: 10 }}
  4923. onClick={(e) => {
  4924. this.setState({
  4925. listFlag: false,
  4926. hetongFlag: false,
  4927. listCuiFlag: false,
  4928. tuiKuanFlag: false,
  4929. displayList: false,
  4930. startRemarks: "",
  4931. remarksC: "",
  4932. voucherUrl: [],
  4933. changeAmount: "0",
  4934. applicant: undefined,
  4935. depNameChange: undefined,
  4936. typeChange: undefined,
  4937. changeFlag: false,
  4938. });
  4939. }}
  4940. >
  4941. 重置
  4942. </Button>
  4943. {/* <Button type="danger" >取消本次变更</Button> */}
  4944. </FormItem>
  4945. </div>
  4946. <div className="clearfix">
  4947. <FormItem
  4948. labelCol={{ span: 4 }}
  4949. wrapperCol={{ span: 18 }}
  4950. label="合同额(万元)"
  4951. >
  4952. {/* {!this.state.mark ? ( */}
  4953. <Input
  4954. placeholder="请输入合同额"
  4955. disabled={this.state.hetongFlag}
  4956. ref="signTotalAmount"
  4957. value={this.state.totalAmount}
  4958. onChange={(e) => {
  4959. this.setState({
  4960. totalAmount: e.target.value,
  4961. });
  4962. }}
  4963. style={{ width: "240px" }}
  4964. />
  4965. {/* ) : (
  4966. <span>{contractData.totalAmount}</span>
  4967. )} */}
  4968. </FormItem>
  4969. <FormItem
  4970. labelCol={{ span: 4 }}
  4971. wrapperCol={{ span: 18 }}
  4972. label="已收款(万元)"
  4973. >
  4974. <span>
  4975. {this.state.settlementAmount}
  4976. &nbsp;&nbsp;&nbsp;&nbsp;
  4977. <span style={{ color: "red" }}>
  4978. (注:已收款与现实收款不符,请与财务专员联系)
  4979. </span>
  4980. </span>
  4981. </FormItem>
  4982. <FormItem
  4983. labelCol={{ span: 4 }}
  4984. wrapperCol={{ span: 18 }}
  4985. label="申请退款(万元)"
  4986. >
  4987. {/* {!this.state.mark ? ( */}
  4988. <Input
  4989. placeholder="请输入申请退款"
  4990. ref="signTotalAmount"
  4991. disabled={this.state.tuiKuanFlag}
  4992. value={this.state.changeAmount}
  4993. onChange={(e) => {
  4994. this.setState({
  4995. changeAmount: e.target.value,
  4996. });
  4997. }}
  4998. style={{ width: "240px" }}
  4999. />
  5000. {/* ) : (
  5001. <span>{contractData.changeAmount}</span>
  5002. )} */}
  5003. </FormItem>
  5004. </div>
  5005. {/* 动态展示项目以及催款节点 */}
  5006. <div
  5007. style={{
  5008. display: this.state.isCaoGao ? "block" : "none",
  5009. }}
  5010. >
  5011. <div>
  5012. <span
  5013. style={{
  5014. marginLeft: "50px",
  5015. fontSize: "20px",
  5016. }}
  5017. >
  5018. 项目业务
  5019. </span>
  5020. <span style={{ color: "red" }}>
  5021. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!双击可修改对应金额数量!)
  5022. </span>
  5023. <Button
  5024. type="primary"
  5025. onClick={this.changeAddPro}
  5026. disabled={this.state.listFlag}
  5027. style={{
  5028. float: "right",
  5029. marginRight: "50px",
  5030. marginBottom: "15px",
  5031. display: this.state.displayList
  5032. ? "none"
  5033. : "block",
  5034. }}
  5035. >
  5036. 添加项目明细
  5037. </Button>
  5038. </div>
  5039. <div
  5040. className="patent-table"
  5041. style={{ marginBottom: 10 }}
  5042. >
  5043. <Spin spinning={this.state.loading}>
  5044. <Table
  5045. columns={this.state.proColumns}
  5046. dataSource={this.state.proDataSource}
  5047. scroll={{ x: "max-content", y: 0 }}
  5048. expandedRowRender={expandedRowRender}
  5049. pagination={this.state.pagination}
  5050. onRowDoubleClick={
  5051. this.state.listFlag
  5052. ? this.not
  5053. : this.editPro
  5054. }
  5055. bordered
  5056. size="small"
  5057. />
  5058. </Spin>
  5059. </div>
  5060. <div>
  5061. <span
  5062. style={{
  5063. marginLeft: "50px",
  5064. fontSize: "20px",
  5065. }}
  5066. >
  5067. 催款节点
  5068. </span>
  5069. <span style={{ color: "red" }}>
  5070. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  5071. </span>
  5072. {/* <span
  5073. style={{
  5074. display: "inline-block",
  5075. marginLeft: 10,
  5076. color: "red"
  5077. }}
  5078. >
  5079. 金额总计(万元): {this.state.totalCui}
  5080. </span> */}
  5081. <Button
  5082. type="primary"
  5083. onClick={(e) => {
  5084. this.changeAddCui();
  5085. }}
  5086. disabled={this.state.listCuiFlag}
  5087. style={{
  5088. float: "right",
  5089. marginRight: "50px",
  5090. marginBottom: "15px",
  5091. display: this.state.displayList
  5092. ? "none"
  5093. : "block",
  5094. }}
  5095. >
  5096. 添加催款节点
  5097. </Button>
  5098. </div>
  5099. <div className="clearfix">
  5100. <Spin spinning={this.state.loading}>
  5101. <Form layout="horizontal">
  5102. <Table
  5103. pagination={false}
  5104. columns={this.state.changeCuiList}
  5105. dataSource={this.state.cuiDataSource}
  5106. scroll={{ x: "max-content", y: 0 }}
  5107. onRowDoubleClick={
  5108. this.state.listCuiFlag
  5109. ? this.not
  5110. : this.editCui
  5111. }
  5112. bordered
  5113. size="small"
  5114. />
  5115. <Col
  5116. span={24}
  5117. offset={9}
  5118. style={{ marginTop: "15px" }}
  5119. ></Col>
  5120. </Form>
  5121. </Spin>
  5122. </div>
  5123. </div>
  5124. <div className="clearfix">
  5125. <FormItem
  5126. style={{ height: "auto" }}
  5127. labelCol={{ span: 4 }}
  5128. wrapperCol={{ span: 18 }}
  5129. label="变更原因"
  5130. >
  5131. {/* {!this.state.mark ? ( */}
  5132. <TextArea
  5133. rows={4}
  5134. placeholder="请输入变更原因"
  5135. ref="signTotalAmount"
  5136. style={{ width: "95%" }}
  5137. value={this.state.remarksC}
  5138. onChange={(e) => {
  5139. this.setState({
  5140. remarksC: e.target.value,
  5141. });
  5142. }}
  5143. />
  5144. {/* ) : (
  5145. <span>{contractData.remarks}</span>
  5146. )} */}
  5147. </FormItem>
  5148. </div>
  5149. <div className="clearfix">
  5150. <FormItem
  5151. style={{ height: "auto" }}
  5152. labelCol={{ span: 4 }}
  5153. wrapperCol={{ span: 18 }}
  5154. label="备注"
  5155. >
  5156. {/* {!this.state.mark ? ( */}
  5157. <TextArea
  5158. rows={4}
  5159. placeholder="请输入备注"
  5160. ref="signTotalAmount"
  5161. style={{ width: "95%" }}
  5162. value={this.state.startRemarks}
  5163. onChange={(e) => {
  5164. this.setState({
  5165. startRemarks: e.target.value,
  5166. });
  5167. }}
  5168. />
  5169. {/* ) : (
  5170. <span>{contractData.startRemarks}</span>
  5171. )} */}
  5172. </FormItem>
  5173. </div>
  5174. {/* ---- */}
  5175. <div className="clearfix">
  5176. <FormItem
  5177. labelCol={{ span: 4 }}
  5178. wrapperCol={{ span: 18 }}
  5179. label="变更凭证"
  5180. >
  5181. {/* {!this.state.mark ? ( */}
  5182. <PicturesWall
  5183. fileList={this.getVoucherUrl}
  5184. pictureUrl={this.state.voucherUrl}
  5185. url="/api/admin/orderChange/uploadFile"
  5186. sign="order_change_file"
  5187. />
  5188. {/* ) : (
  5189. <div>
  5190. <Upload
  5191. className="demandDetailShow-upload"
  5192. listType="picture-card"
  5193. fileList={this.state.voucherUrl}
  5194. onPreview={file => {
  5195. this.setState({
  5196. previewImage:
  5197. file.url || file.thumbUrl,
  5198. previewVisible: true
  5199. });
  5200. }}
  5201. />
  5202. <Modal
  5203. maskClosable={false}
  5204. footer={null}
  5205. visible={this.state.previewVisible}
  5206. onCancel={() => {
  5207. this.setState({
  5208. previewVisible: false
  5209. });
  5210. }}
  5211. >
  5212. <img
  5213. alt=""
  5214. style={{ width: "100%" }}
  5215. src={this.state.previewImage || ""}
  5216. />
  5217. </Modal>
  5218. </div>
  5219. )} */}
  5220. <p>图片建议:要清晰。</p>
  5221. </FormItem>
  5222. </div>
  5223. {/* {!this.state.mark ? ( */}
  5224. <div className="clearfix">
  5225. <Button
  5226. type="primary"
  5227. style={{ float: "right", marginRight: 40 }}
  5228. // onClick={this.changeApply}
  5229. onClick={(e) => {
  5230. if (this.state.isCaoGao) {
  5231. this.submitChange();
  5232. } else {
  5233. this.changeApply();
  5234. }
  5235. }}
  5236. >
  5237. {this.state.isCaoGao
  5238. ? "发起变更申请"
  5239. : this.state.typeChange == 0
  5240. ? "发起变更申请"
  5241. : "下一步"}
  5242. </Button>
  5243. </div>
  5244. {/* ) : (
  5245. ""
  5246. )} */}
  5247. </div>
  5248. }
  5249. </TabPane>
  5250. {this.state.isJilu ? (
  5251. <TabPane tab={"最近变更记录"} key="3">
  5252. <div>
  5253. <div
  5254. style={{
  5255. borderRadius: "50%",
  5256. width: 300,
  5257. height: 300,
  5258. position: "absolute",
  5259. top: 230,
  5260. left: 525,
  5261. transform: "rotate(-5deg)",
  5262. zIndex: 1,
  5263. display:
  5264. this.state.detailChange.status == 4
  5265. ? "block"
  5266. : "none",
  5267. }}
  5268. >
  5269. <img src={tongguo} style={{ width: "100%" }} />
  5270. </div>
  5271. <div
  5272. style={{
  5273. borderRadius: "50%",
  5274. width: 300,
  5275. height: 300,
  5276. position: "absolute",
  5277. top: 284,
  5278. left: 586,
  5279. transform: "rotate(-5deg)",
  5280. zIndex: 1,
  5281. display:
  5282. this.state.detailChange.status == 5
  5283. ? "block"
  5284. : "none",
  5285. }}
  5286. >
  5287. <img src={quxiao} style={{ width: "63%" }} />
  5288. </div>
  5289. <div className="clearfix">
  5290. <FormItem
  5291. className="half-item"
  5292. {...formItemLayout}
  5293. label="客户名称"
  5294. >
  5295. <span>{this.state.userName}</span>
  5296. </FormItem>
  5297. {/* */}
  5298. <FormItem
  5299. className="half-item"
  5300. {...formItemLayout}
  5301. label="合同编号"
  5302. >
  5303. <span>{this.state.contractNo}</span>
  5304. </FormItem>
  5305. </div>
  5306. <div className="clearfix">
  5307. <FormItem
  5308. className="half-item"
  5309. {...formItemLayout}
  5310. label="时间"
  5311. >
  5312. <span>
  5313. {this.state.detailChange.createTimes}
  5314. </span>
  5315. </FormItem>
  5316. <FormItem
  5317. className="half-item"
  5318. {...formItemLayout}
  5319. label="申请人"
  5320. >
  5321. <span>{this.state.salesmanName}</span>
  5322. </FormItem>
  5323. </div>
  5324. <div className="clearfix">
  5325. <FormItem
  5326. className="half-item"
  5327. {...formItemLayout}
  5328. label="当前进度"
  5329. >
  5330. <span>
  5331. {getProcessStatusNew(
  5332. this.state.detailChange.processState,
  5333. this.state.detailChange.status
  5334. )}
  5335. </span>
  5336. </FormItem>
  5337. {/* <FormItem
  5338. className="half-item"
  5339. {...formItemLayout}
  5340. label="申请变更部门"
  5341. >
  5342. <span>{this.state.depName}</span>
  5343. </FormItem> */}
  5344. <FormItem
  5345. {...formItemLayout}
  5346. className="half-item"
  5347. label="变更类型"
  5348. >
  5349. <span>
  5350. {getChangeType(
  5351. this.state.detailChange.typeChange
  5352. )}
  5353. </span>
  5354. </FormItem>
  5355. </div>
  5356. {/* <div className="clearfix">
  5357. <FormItem
  5358. labelCol={{ span: 4 }}
  5359. wrapperCol={{ span: 18 }}
  5360. label="变更类型"
  5361. >
  5362. <span>
  5363. {getChangeType(
  5364. this.state.detailChange.typeChange
  5365. )}
  5366. </span>
  5367. </FormItem>
  5368. </div> */}
  5369. <div className="clearfix">
  5370. <FormItem
  5371. {...formItemLayout}
  5372. className="half-item"
  5373. label="合同额(万元)"
  5374. >
  5375. <span>
  5376. {this.state.detailChange.totalAmount}
  5377. </span>
  5378. </FormItem>
  5379. <FormItem
  5380. {...formItemLayout}
  5381. className="half-item"
  5382. label="已收款(万元)"
  5383. >
  5384. <span>
  5385. {this.state.detailChange.settlementAmount}
  5386. </span>
  5387. </FormItem>
  5388. </div>
  5389. <div className="clearfix">
  5390. <FormItem
  5391. {...formItemLayout}
  5392. className="half-item"
  5393. label="欠款(万元)"
  5394. >
  5395. <span>{this.state.detailChange.arrears}</span>
  5396. </FormItem>
  5397. <FormItem
  5398. {...formItemLayout}
  5399. className="half-item"
  5400. label="申请退款(万元)"
  5401. >
  5402. <span>
  5403. {this.state.detailChange.changeAmount}
  5404. </span>
  5405. </FormItem>
  5406. </div>
  5407. <div className="clearfix">
  5408. <FormItem
  5409. style={{ height: "auto" }}
  5410. labelCol={{ span: 4 }}
  5411. wrapperCol={{ span: 18 }}
  5412. label="变更原因"
  5413. >
  5414. <span>{this.state.detailChange.remarksC}</span>
  5415. </FormItem>
  5416. </div>
  5417. <div className="clearfix">
  5418. <FormItem
  5419. style={{ height: "auto" }}
  5420. labelCol={{ span: 4 }}
  5421. wrapperCol={{ span: 18 }}
  5422. label="备注"
  5423. >
  5424. <span>
  5425. {this.state.detailChange.startRemarks}
  5426. </span>
  5427. </FormItem>
  5428. </div>
  5429. {/* ---- */}
  5430. <div className="clearfix">
  5431. <FormItem
  5432. labelCol={{ span: 4 }}
  5433. wrapperCol={{ span: 18 }}
  5434. label="变更凭证"
  5435. >
  5436. <div>
  5437. <Upload
  5438. className="demandDetailShow-upload"
  5439. listType="picture-card"
  5440. fileList={
  5441. this.state.detailChange.voucherUrl
  5442. }
  5443. onPreview={(file) => {
  5444. this.setState({
  5445. previewImage: file.url || file.thumbUrl,
  5446. previewVisible: true,
  5447. });
  5448. }}
  5449. />
  5450. <Modal
  5451. maskClosable={false}
  5452. footer={null}
  5453. visible={this.state.previewVisible}
  5454. onCancel={() => {
  5455. this.setState({
  5456. previewVisible: false,
  5457. });
  5458. }}
  5459. >
  5460. <img
  5461. alt=""
  5462. style={{ width: "100%" }}
  5463. src={this.state.previewImage || ""}
  5464. />
  5465. </Modal>
  5466. </div>
  5467. </FormItem>
  5468. </div>
  5469. <ul
  5470. style={{
  5471. width: "868px",
  5472. overflow: "hidden",
  5473. paddingLeft: "90px",
  5474. paddingTop: "10px",
  5475. position: "relative",
  5476. bottom: "20px",
  5477. fontSize: "12px",
  5478. color: "rgba(0, 0, 0, 0.65)",
  5479. }}
  5480. >
  5481. {/* <span>操作人:</span> */}
  5482. {this.state.logData.map((item, index) => {
  5483. if (item.status == 0) {
  5484. item.status = "发起";
  5485. } else if (item.status == 1) {
  5486. item.status = "审核中";
  5487. } else if (item.status == 2) {
  5488. item.status = "通过";
  5489. } else if (item.status == 3) {
  5490. item.status = "驳回";
  5491. } else if (item.status == 4) {
  5492. item.status = "完成";
  5493. }
  5494. return (
  5495. <li
  5496. key={index}
  5497. style={{
  5498. width: "100%",
  5499. height: "auto",
  5500. wordBreak: "break-all",
  5501. marginBottom: "10px",
  5502. }}
  5503. >
  5504. {item.aname +
  5505. ":" +
  5506. "(" +
  5507. item.status +
  5508. ")" +
  5509. item.remarks}
  5510. </li>
  5511. );
  5512. })}
  5513. </ul>
  5514. {/* 动态展示项目以及催款节点 */}
  5515. <div>
  5516. <div>
  5517. <span
  5518. style={{
  5519. marginLeft: "50px",
  5520. fontSize: "20px",
  5521. }}
  5522. >
  5523. 项目业务
  5524. </span>
  5525. </div>
  5526. <div
  5527. className="patent-table"
  5528. style={{ marginBottom: 10 }}
  5529. >
  5530. <Spin spinning={this.state.loading}>
  5531. <Table
  5532. columns={this.state.detailColumns}
  5533. dataSource={this.state.proDataSource}
  5534. expandedRowRender={expandedRowRenderDetail}
  5535. pagination={this.state.pagination}
  5536. // onRowClick={this.tableRowClick}
  5537. bordered
  5538. size="small"
  5539. />
  5540. </Spin>
  5541. </div>
  5542. <div>
  5543. <span
  5544. style={{
  5545. marginLeft: "50px",
  5546. fontSize: "20px",
  5547. }}
  5548. >
  5549. 催款节点
  5550. </span>
  5551. </div>
  5552. <div className="clearfix">
  5553. <Spin spinning={this.state.loading}>
  5554. <Form layout="horizontal">
  5555. <Table
  5556. pagination={false}
  5557. columns={this.state.detailContactsLists}
  5558. dataSource={this.state.cuiDataSource}
  5559. scroll={{ x: "max-content", y: 0 }}
  5560. bordered
  5561. size="small"
  5562. />
  5563. <Col
  5564. span={24}
  5565. offset={9}
  5566. style={{ marginTop: "15px" }}
  5567. ></Col>
  5568. </Form>
  5569. </Spin>
  5570. </div>
  5571. </div>
  5572. </div>
  5573. </TabPane>
  5574. ) : (
  5575. ""
  5576. )}
  5577. </Tabs>
  5578. )}
  5579. </div>
  5580. </Spin>
  5581. </Form>
  5582. </Modal>
  5583. <Modal
  5584. maskClosable={false}
  5585. visible={this.state.addnextVisible}
  5586. onOk={this.nextCancel}
  5587. onCancel={this.nextCancel}
  5588. width="800px"
  5589. title={this.state.addState ? "添加项目任务" : "项目任务详情"}
  5590. footer=""
  5591. className="admin-desc-content"
  5592. >
  5593. <Form
  5594. layout="horizontal"
  5595. onSubmit={this.nextSubmit}
  5596. // id="demand-form"
  5597. >
  5598. <Spin spinning={this.state.loading}>
  5599. {this.state.addState ? (
  5600. <div className="clearfix">
  5601. <FormItem
  5602. className="half-item"
  5603. {...formItemLayout}
  5604. label="服务名称"
  5605. >
  5606. <AutoComplete
  5607. className="certain-category-search"
  5608. dropdownClassName="certain-category-search-dropdown"
  5609. dropdownMatchSelectWidth={false}
  5610. dropdownStyle={{ width: 200 }}
  5611. style={{ width: "200px" }}
  5612. dataSource={options}
  5613. placeholder="输入服务名称"
  5614. value={this.state.commodityName}
  5615. onChange={this.httpChange}
  5616. filterOption={true}
  5617. onSelect={this.selectAuto}
  5618. >
  5619. <Input />
  5620. </AutoComplete>
  5621. <span className="mandatory">*</span>
  5622. </FormItem>
  5623. <FormItem
  5624. className="half-item"
  5625. {...formItemLayout}
  5626. label="服务数量"
  5627. >
  5628. <Input
  5629. placeholder="请输入服务数量"
  5630. value={this.state.commodityQuantity}
  5631. style={{ width: "200px" }}
  5632. onChange={(e) => {
  5633. this.setState({ commodityQuantity: e.target.value });
  5634. }}
  5635. ref="commodityQuantity"
  5636. />
  5637. <span className="mandatory">*</span>
  5638. </FormItem>
  5639. <FormItem
  5640. className="half-item"
  5641. {...formItemLayout}
  5642. label="实签价格(万元)"
  5643. >
  5644. <Input
  5645. placeholder="请输入实签价格"
  5646. value={this.state.commodityPrice}
  5647. style={{ width: "200px" }}
  5648. onChange={(e) => {
  5649. this.setState({ commodityPrice: e.target.value });
  5650. }}
  5651. ref="commodityPrice"
  5652. />
  5653. <span className="mandatory">*</span>
  5654. </FormItem>
  5655. <FormItem
  5656. className="half-item"
  5657. {...formItemLayout}
  5658. label="主要业务"
  5659. >
  5660. <Select
  5661. placeholder="选择是否为主要业务"
  5662. style={{ width: "200px" }}
  5663. value={this.state.main}
  5664. onChange={(e) => {
  5665. this.setState({ main: e });
  5666. }}
  5667. >
  5668. {boutique.map(function (item) {
  5669. return (
  5670. <Select.Option key={item.value}>
  5671. {item.key}
  5672. </Select.Option>
  5673. );
  5674. })}
  5675. </Select>
  5676. <span className="mandatory">*</span>
  5677. </FormItem>
  5678. <div className="clearfix">
  5679. <FormItem
  5680. labelCol={{ span: 4 }}
  5681. wrapperCol={{ span: 16 }}
  5682. label="服务说明"
  5683. >
  5684. <Input
  5685. type="textarea"
  5686. placeholder="请输入服务说明"
  5687. value={this.state.taskComment}
  5688. onChange={(e) => {
  5689. this.setState({ taskComment: e.target.value });
  5690. }}
  5691. />
  5692. </FormItem>
  5693. </div>
  5694. <FormItem
  5695. wrapperCol={{ span: 12, offset: 4 }}
  5696. className="half-middle"
  5697. >
  5698. <Button
  5699. className="submitSave"
  5700. type="primary"
  5701. htmlType="submit"
  5702. >
  5703. 保存
  5704. </Button>
  5705. <Button
  5706. className="submitSave"
  5707. type="ghost"
  5708. onClick={this.nextCancel}
  5709. >
  5710. 取消
  5711. </Button>
  5712. </FormItem>
  5713. </div>
  5714. ) : (
  5715. <div className="clearfix">
  5716. {this.state.processStatus == 0 ? (
  5717. <div className="clearfix">
  5718. <FormItem
  5719. className="half-item"
  5720. {...formItemLayout}
  5721. label="项目名称"
  5722. >
  5723. <span>{this.state.commodityName}</span>
  5724. </FormItem>
  5725. <FormItem
  5726. className="half-item"
  5727. {...formItemLayout}
  5728. label="项目数量"
  5729. >
  5730. <Input
  5731. placeholder="请输入数量"
  5732. value={this.state.commodityQuantity}
  5733. style={{ width: "200px" }}
  5734. onChange={(e) => {
  5735. this.setState({
  5736. commodityQuantity: e.target.value,
  5737. });
  5738. }}
  5739. />
  5740. <span className="mandatory">*</span>
  5741. </FormItem>
  5742. <FormItem
  5743. className="half-item"
  5744. {...formItemLayout}
  5745. label="金额(万元)"
  5746. >
  5747. <Input
  5748. placeholder="请输入签单金额"
  5749. value={this.state.commodityPrice}
  5750. style={{ width: "200px" }}
  5751. onChange={(e) => {
  5752. this.setState({ commodityPrice: e.target.value });
  5753. }}
  5754. />
  5755. <span className="mandatory">*</span>
  5756. </FormItem>
  5757. <FormItem
  5758. className="half-item"
  5759. {...formItemLayout}
  5760. label="主要项目"
  5761. >
  5762. <Select
  5763. placeholder="选择是否为主要业务"
  5764. style={{ width: "200px" }}
  5765. value={this.state.main}
  5766. onChange={(e) => {
  5767. this.setState({ main: e });
  5768. }}
  5769. >
  5770. {boutique.map(function (item) {
  5771. return (
  5772. <Select.Option key={item.value}>
  5773. {item.key}
  5774. </Select.Option>
  5775. );
  5776. })}
  5777. </Select>
  5778. <span className="mandatory">*</span>
  5779. </FormItem>
  5780. <div className="clearfix">
  5781. <FormItem
  5782. labelCol={{ span: 4 }}
  5783. wrapperCol={{ span: 16 }}
  5784. label="服务说明"
  5785. >
  5786. <Input
  5787. type="textarea"
  5788. placeholder="请输入服务说明"
  5789. value={this.state.taskComment}
  5790. onChange={(e) => {
  5791. this.setState({ taskComment: e.target.value });
  5792. }}
  5793. />
  5794. </FormItem>
  5795. </div>
  5796. <FormItem
  5797. wrapperCol={{ span: 12, offset: 4 }}
  5798. className="half-middle"
  5799. >
  5800. <Button
  5801. className="submitSave"
  5802. type="primary"
  5803. onClick={this.tabRowSave}
  5804. >
  5805. 保存
  5806. </Button>
  5807. <Button
  5808. className="submitSave"
  5809. type="ghost"
  5810. onClick={this.nextCancel}
  5811. >
  5812. 取消
  5813. </Button>
  5814. </FormItem>
  5815. </div>
  5816. ) : (
  5817. <div className="clearfix">
  5818. <FormItem
  5819. className="half-item"
  5820. {...formItemLayout}
  5821. label="项目名称"
  5822. >
  5823. <span>{this.state.commodityName}</span>
  5824. </FormItem>
  5825. <FormItem
  5826. className="half-item"
  5827. {...formItemLayout}
  5828. label="项目数量"
  5829. >
  5830. <span>{this.state.commodityQuantity}</span>
  5831. </FormItem>
  5832. <FormItem
  5833. className="half-item"
  5834. {...formItemLayout}
  5835. label="金额(万元)"
  5836. >
  5837. <span>{this.state.commodityPrice}</span>
  5838. </FormItem>
  5839. <FormItem
  5840. className="half-item"
  5841. {...formItemLayout}
  5842. label="主要项目"
  5843. >
  5844. <span>{getboutique(this.state.main)}</span>
  5845. </FormItem>
  5846. <div className="clearfix">
  5847. <FormItem
  5848. labelCol={{ span: 4 }}
  5849. wrapperCol={{ span: 16 }}
  5850. label="服务说明"
  5851. >
  5852. <span>{this.state.taskComment}</span>
  5853. </FormItem>
  5854. </div>
  5855. </div>
  5856. )}
  5857. </div>
  5858. )}
  5859. </Spin>
  5860. </Form>
  5861. </Modal>
  5862. <Modal
  5863. maskClosable={false}
  5864. visible={this.state.changeVisible}
  5865. onOk={this.nextCancel}
  5866. onCancel={this.nextCancel}
  5867. width="800px"
  5868. title={"添加变更项目"}
  5869. footer=""
  5870. className="admin-desc-content"
  5871. >
  5872. <Form
  5873. layout="horizontal"
  5874. // id="demand-form"
  5875. >
  5876. <Spin spinning={this.state.loading}>
  5877. <div className="clearfix">
  5878. <FormItem
  5879. className="half-item"
  5880. {...formItemLayout}
  5881. label="服务名称"
  5882. >
  5883. <AutoComplete
  5884. className="certain-category-search"
  5885. dropdownClassName="certain-category-search-dropdown"
  5886. dropdownMatchSelectWidth={false}
  5887. dropdownStyle={{ width: 200 }}
  5888. style={{ width: "200px" }}
  5889. dataSource={options}
  5890. placeholder="输入服务名称"
  5891. value={this.state.commodityName}
  5892. onChange={this.httpChange}
  5893. filterOption={true}
  5894. onSelect={this.selectAuto}
  5895. >
  5896. <Input />
  5897. </AutoComplete>
  5898. <span className="mandatory">*</span>
  5899. </FormItem>
  5900. <FormItem
  5901. className="half-item"
  5902. {...formItemLayout}
  5903. label="服务数量"
  5904. >
  5905. <Input
  5906. placeholder="请输入服务数量"
  5907. value={this.state.commodityQuantity}
  5908. style={{ width: "200px" }}
  5909. onChange={(e) => {
  5910. this.setState({ commodityQuantity: e.target.value });
  5911. }}
  5912. ref="commodityQuantity"
  5913. />
  5914. <span className="mandatory">*</span>
  5915. </FormItem>
  5916. <FormItem
  5917. className="half-item"
  5918. {...formItemLayout}
  5919. label="实签价格(万元)"
  5920. >
  5921. <Input
  5922. placeholder="请输入实签价格"
  5923. value={this.state.commodityPrice}
  5924. style={{ width: "200px" }}
  5925. onChange={(e) => {
  5926. this.setState({ commodityPrice: e.target.value });
  5927. }}
  5928. ref="commodityPrice"
  5929. />
  5930. <span className="mandatory">*</span>
  5931. </FormItem>
  5932. <FormItem
  5933. className="half-item"
  5934. {...formItemLayout}
  5935. label="主要业务"
  5936. >
  5937. <Select
  5938. placeholder="选择是否为主要业务"
  5939. style={{ width: "200px" }}
  5940. value={this.state.main}
  5941. onChange={(e) => {
  5942. this.setState({ main: e });
  5943. }}
  5944. >
  5945. {boutique.map(function (item) {
  5946. return (
  5947. <Select.Option key={item.value}>
  5948. {item.key}
  5949. </Select.Option>
  5950. );
  5951. })}
  5952. </Select>
  5953. <span className="mandatory">*</span>
  5954. </FormItem>
  5955. <div className="clearfix">
  5956. <FormItem
  5957. labelCol={{ span: 4 }}
  5958. wrapperCol={{ span: 16 }}
  5959. label="服务说明"
  5960. >
  5961. <Input
  5962. type="textarea"
  5963. placeholder="请输入服务说明"
  5964. value={this.state.taskComment}
  5965. onChange={(e) => {
  5966. this.setState({ taskComment: e.target.value });
  5967. }}
  5968. />
  5969. </FormItem>
  5970. </div>
  5971. <FormItem
  5972. wrapperCol={{ span: 12, offset: 4 }}
  5973. className="half-middle"
  5974. >
  5975. <Button
  5976. className="submitSave"
  5977. type="primary"
  5978. onClick={this.changeProSubmit}
  5979. >
  5980. 保存
  5981. </Button>
  5982. <Button
  5983. className="submitSave"
  5984. type="ghost"
  5985. onClick={this.nextCancel}
  5986. >
  5987. 取消
  5988. </Button>
  5989. </FormItem>
  5990. </div>
  5991. </Spin>
  5992. </Form>
  5993. </Modal>
  5994. <Modal
  5995. maskClosable={false}
  5996. visible={this.state.lookVisible}
  5997. onOk={this.noCancel}
  5998. onCancel={this.noCancel}
  5999. width="800px"
  6000. title={"退单申请"}
  6001. footer=""
  6002. className="admin-desc-content"
  6003. >
  6004. <Form layout="horizontal">
  6005. <Spin spinning={this.state.loading}>
  6006. <div className="clearfix">
  6007. <FormItem
  6008. labelCol={{ span: 4 }}
  6009. wrapperCol={{ span: 16 }}
  6010. label="终止合同"
  6011. >
  6012. <Picture
  6013. fileList={(e) => {
  6014. this.setState({ contractUrl: e });
  6015. }}
  6016. pictureUrl={this.state.contractUrl}
  6017. visible={this.props.visible}
  6018. data={{
  6019. sign: "order_refund_file",
  6020. url: "/api/admin/newOrder/uploadRefundOrderFile",
  6021. number: 8,
  6022. }}
  6023. />
  6024. </FormItem>
  6025. </div>
  6026. <div className="clearfix">
  6027. <FormItem
  6028. labelCol={{ span: 4 }}
  6029. wrapperCol={{ span: 16 }}
  6030. label="退单申请表"
  6031. >
  6032. <Picture
  6033. fileList={(e) => {
  6034. this.setState({ applicationUrl: e });
  6035. }}
  6036. pictureUrl={this.state.applicationUrl}
  6037. visible={this.props.visible}
  6038. data={{
  6039. sign: "order_refund_file",
  6040. url: "/api/admin/newOrder/uploadRefundOrderFile",
  6041. number: 8,
  6042. }}
  6043. />
  6044. </FormItem>
  6045. </div>
  6046. <div className="clearfix">
  6047. <FormItem
  6048. labelCol={{ span: 4 }}
  6049. wrapperCol={{ span: 16 }}
  6050. label="退单理由"
  6051. >
  6052. <Input
  6053. type="textarea"
  6054. placeholder="请输入退单理由"
  6055. rows={4}
  6056. value={this.state.reason}
  6057. onChange={(e) => {
  6058. this.setState({ reason: e.target.value });
  6059. }}
  6060. />
  6061. </FormItem>
  6062. </div>
  6063. <div className="clearfix">
  6064. <Button
  6065. className="cancel"
  6066. type="primary"
  6067. onClick={this.tuidanOk}
  6068. style={{ marginLeft: "50px" }}
  6069. htmlType="submit"
  6070. >
  6071. 确定退单
  6072. </Button>
  6073. <Button
  6074. className="cancel"
  6075. type="ghost"
  6076. onClick={this.noCancel}
  6077. style={{ marginLeft: "50px" }}
  6078. >
  6079. 取消
  6080. </Button>
  6081. </div>
  6082. </Spin>
  6083. </Form>
  6084. </Modal>
  6085. <Modal
  6086. title="修改项目金额及数量"
  6087. visible={this.state.editProVisible}
  6088. onOk={this.submitEditPro}
  6089. width={300}
  6090. okText={"保存"}
  6091. onCancel={() => {
  6092. this.setState({
  6093. editProVisible: false,
  6094. });
  6095. }}
  6096. >
  6097. <div className="clearfix">
  6098. <FormItem
  6099. labelCol={{ span: 6 }}
  6100. wrapperCol={{ span: 14 }}
  6101. label="项目金额"
  6102. style={{
  6103. display: this.state.editSplitStatus == 2 ? "none" : "block",
  6104. }}
  6105. >
  6106. <Input
  6107. placeholder="请输入金额"
  6108. rows={4}
  6109. // disabled={this.state.editSplitStatus == 0 ? true : false}
  6110. value={this.state.editProMoney}
  6111. onChange={(e) => {
  6112. this.setState({ editProMoney: e.target.value });
  6113. }}
  6114. />
  6115. </FormItem>
  6116. <FormItem
  6117. labelCol={{ span: 6 }}
  6118. wrapperCol={{ span: 14 }}
  6119. label="项目数量"
  6120. >
  6121. <Input
  6122. placeholder="请输入数量"
  6123. rows={4}
  6124. value={this.state.editProCommodityQuantity}
  6125. onChange={(e) => {
  6126. this.setState({ editProCommodityQuantity: e.target.value });
  6127. }}
  6128. />
  6129. </FormItem>
  6130. </div>
  6131. </Modal>
  6132. <Modal
  6133. title="修改催款节点金额"
  6134. visible={this.state.editCuiVisible}
  6135. onOk={this.submitEditCui}
  6136. okText={"保存"}
  6137. width={300}
  6138. onCancel={(e) => {
  6139. this.setState({
  6140. editCuiVisible: false,
  6141. });
  6142. }}
  6143. >
  6144. <div className="clearfix">
  6145. <FormItem
  6146. labelCol={{ span: 6 }}
  6147. wrapperCol={{ span: 14 }}
  6148. label="催款金额"
  6149. >
  6150. <Input
  6151. placeholder="请输入金额"
  6152. rows={4}
  6153. value={this.state.editCuiMoney}
  6154. onChange={(e) => {
  6155. this.setState({ editCuiMoney: e.target.value });
  6156. }}
  6157. />
  6158. </FormItem>
  6159. </div>
  6160. </Modal>
  6161. <OrderRiZi
  6162. dataSourcerizhi={this.state.dataSourcerizhi}
  6163. closeOrderLog={this.closeOrderLog}
  6164. visible={this.state.rizhivisible}
  6165. loading={this.state.loading}
  6166. />
  6167. </div>
  6168. );
  6169. }
  6170. })
  6171. );
  6172. export default Form.create()(NewService);