addService.jsx 235 KB

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