addService.jsx 251 KB

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