addService.jsx 247 KB

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