addService.jsx 307 KB

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