addService.jsx 305 KB

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