addService.jsx 301 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393
  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. processStatus: thisData.processStatus, //流程状态
  2347. approval: thisData.approval, //特批状态
  2348. orderRemarks: thisData.orderRemarks, //订单备注
  2349. contractNo: thisData.contractNo, //合同编号
  2350. contacts: thisData.contacts, //联系人
  2351. contactMobile: thisData.contactMobile, //联系人电话
  2352. legalPerson: thisData.legalPerson, //法人
  2353. legalPersonTel: thisData.legalPersonTel, //法人电话
  2354. orgCodeUrl: thisData.contractPictureUrl
  2355. ? splitUrl(
  2356. thisData.contractPictureUrl,
  2357. ",",
  2358. globalConfig.avatarHost + "/upload"
  2359. )
  2360. : [], //图片地址
  2361. replenishUrl: thisData.agreementUrl
  2362. ? splitUrl(
  2363. thisData.agreementUrl,
  2364. ",",
  2365. globalConfig.avatarHost + "/upload"
  2366. )
  2367. : [], //图片地址
  2368. contentUrl: thisData.serviceContent
  2369. ? splitUrl(
  2370. thisData.serviceContent,
  2371. ",",
  2372. globalConfig.avatarHost + "/upload"
  2373. )
  2374. : [], //图片地址
  2375. signDate: thisData.signDate, //签单时间
  2376. userName: thisData.userName, //客户名称
  2377. salesmanName: thisData.salesmanName, //营销员名称
  2378. salesmanMobile: thisData.salesmanMobile, //营销员电话
  2379. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  2380. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  2381. financeName: thisData.financeName, //财务名称
  2382. financeMobile: thisData.financeMobile, //财务电话
  2383. nowFinanceMobile: thisData.nowFinanceMobile,
  2384. nowFinance: thisData.nowFinance,
  2385. // approval:
  2386. // thisData.approval == 0
  2387. // ? thisData.approval.toString()
  2388. // : thisData.approval,
  2389. organizationSearch: thisData.orderDep,
  2390. depName: thisData.depName,
  2391. status: thisData.status,
  2392. outsource: thisData.outsource,
  2393. deleteSign: thisData.deleteSign,
  2394. orderUid: thisData.uid,
  2395. userType: thisData.userType,
  2396. updatas: {
  2397. salesType: thisData.salesType,//销售类型
  2398. userType: thisData.userType,//客户所属类型
  2399. other: thisData.other,//3渠道名 4,5描述
  2400. },
  2401. channelName: thisData.salesType == "3" ? thisData.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  2402. });
  2403. // 判断状态
  2404. if (this.state.processStatus === 0) {
  2405. this.setState({
  2406. closable: true,
  2407. disabledView: "inline-block",
  2408. });
  2409. }
  2410. }.bind(this),
  2411. }).always(
  2412. function () {
  2413. this.setState({
  2414. loading: false,
  2415. });
  2416. }.bind(this)
  2417. );
  2418. },
  2419. //节点列表
  2420. jiedian(orderNos) {
  2421. this.setState({
  2422. loadData: true,
  2423. });
  2424. $.ajax({
  2425. method: "get",
  2426. dataType: "json",
  2427. crossDomain: false,
  2428. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  2429. data: {
  2430. orderNo: orderNos,
  2431. },
  2432. success: function (data) {
  2433. let theArr = [];
  2434. let thisData = [];
  2435. if (data.error.length || data.data.list == "") {
  2436. if (data.error && data.error.length) {
  2437. message.warning(data.error[0].message);
  2438. }
  2439. } else {
  2440. for (let i = 0; i < data.data.length; i++) {
  2441. thisData = data.data[i];
  2442. theArr.push({
  2443. key: i,
  2444. dunSubject: thisData.dunSubject
  2445. ? thisData.dunSubject.toString()
  2446. : "", //催款科目
  2447. id: thisData.id, //节点Id
  2448. money: thisData.money, //催款金额
  2449. dunStatus: thisData.dunStatus, //催款状态
  2450. orderNo: thisData.orderNo,
  2451. });
  2452. }
  2453. this.setState({
  2454. contactList: theArr,
  2455. });
  2456. }
  2457. }.bind(this),
  2458. }).always(
  2459. function () {
  2460. this.setState({
  2461. loading: false,
  2462. });
  2463. }.bind(this)
  2464. );
  2465. },
  2466. //查看催款节点
  2467. jiedianNew(orderNos) {
  2468. this.setState({
  2469. loadData: true,
  2470. });
  2471. $.ajax({
  2472. method: "get",
  2473. dataType: "json",
  2474. crossDomain: false,
  2475. url:
  2476. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2477. data: {
  2478. orderNo: orderNos,
  2479. },
  2480. success: function (data) {
  2481. if (data.error && data.error.length) {
  2482. message.warning(data.error[0].message);
  2483. } else {
  2484. let theArr = [];
  2485. let thisData = [];
  2486. let arr = data.data || [];
  2487. let totalCui = 0;
  2488. for (let i = 0; i < arr.length; i++) {
  2489. thisData = arr[i];
  2490. totalCui += +thisData.money;
  2491. theArr.push({
  2492. key: i,
  2493. dunSubject: thisData.dunSubject
  2494. ? thisData.dunSubject.toString()
  2495. : "", //催款科目
  2496. id: thisData.id, //节点Id
  2497. money: thisData.money, //催款金额
  2498. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2499. commodityName: thisData.commodityName,
  2500. projectType: thisData.projectType,
  2501. dunTypeName: thisData.dunTypeName,
  2502. status: thisData.status,
  2503. waitDay: thisData.waitDay,
  2504. effectiveCount: thisData.effectiveCount,
  2505. startDate: thisData.startDate,
  2506. dunType: thisData.dunType,
  2507. appropriationRatio: thisData.appropriationRatio,
  2508. customizeName: thisData.customizeName,
  2509. customizeTimes: thisData.customizeTimes,
  2510. tid: thisData.tid,
  2511. });
  2512. }
  2513. if (!totalCui) {
  2514. totalCui = 0;
  2515. }
  2516. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  2517. this.setState({
  2518. contactListNew: theArr,
  2519. totalCui: parseFloat(totalCui),
  2520. });
  2521. }
  2522. }.bind(this),
  2523. }).always(
  2524. function () {
  2525. this.setState({
  2526. loading: false,
  2527. });
  2528. }.bind(this)
  2529. );
  2530. },
  2531. //催款节点保存
  2532. contactSave(record) {
  2533. for (let i = 0; i < this.state.contactList.length; i++) {
  2534. if (moneyVerify(this.state.contactList[i].money)) {
  2535. return;
  2536. }
  2537. }
  2538. this.setState({
  2539. loading: true,
  2540. });
  2541. $.ajax({
  2542. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  2543. method: "post",
  2544. data: {
  2545. orderNo: this.state.orderNo,
  2546. orderDun: JSON.stringify(this.state.contactList),
  2547. },
  2548. }).done(
  2549. function (data) {
  2550. this.setState({
  2551. loading: false,
  2552. });
  2553. if (!data.error.length) {
  2554. message.success("保存成功!");
  2555. this.jiedian(record.orderNo);
  2556. } else {
  2557. message.warning(data.error[0].message);
  2558. }
  2559. }.bind(this)
  2560. );
  2561. },
  2562. //催款节点保存
  2563. contactSaveNew(record) {
  2564. if (record.dunType == 0) {
  2565. if (!record.customizeTimes) {
  2566. message.warning("请输入自定义时间");
  2567. return;
  2568. } else if (!record.customizeName) {
  2569. message.warning("请输入自定义科目");
  2570. return;
  2571. }
  2572. }
  2573. if (record.boStatus == "false") {
  2574. record.boStatus = false;
  2575. } else if (record.boStatus == "true") {
  2576. record.boStatus = true;
  2577. }
  2578. if (!this.state.yearFlag) {
  2579. if (!record.effectiveCount && !record.dunTypeCustom) {
  2580. message.warning("请选择服务年限");
  2581. return;
  2582. }
  2583. } else {
  2584. record.effectiveCount = "";
  2585. }
  2586. if (record.money == "") {
  2587. message.warning("请填写金额");
  2588. return;
  2589. }
  2590. if (record.boStatus) {
  2591. if (
  2592. typeof +record.money == "number" &&
  2593. +record.money >= 0 &&
  2594. +record.money <= 1
  2595. ) {
  2596. record.appropriationRatio = record.money;
  2597. } else {
  2598. message.warning("金额比例填写错误,比例范围0~1");
  2599. return;
  2600. }
  2601. }
  2602. if (!record.dunType && record.dunType != 0) {
  2603. message.warning("请选择对应科目");
  2604. return;
  2605. }
  2606. if (record.dunType != 1) {
  2607. record.waitDay = "";
  2608. }
  2609. this.setState({
  2610. loading: true,
  2611. });
  2612. if (record.boStatus) {
  2613. $.ajax({
  2614. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2615. method: "post",
  2616. data: {
  2617. orderNo: record.orderNo,
  2618. tid: record.tid,
  2619. projectType: record.sort,
  2620. dunType: record.dunType,
  2621. appropriationRatio: record.appropriationRatio,
  2622. waitDay: record.waitDay,
  2623. effectiveCount: record.effectiveCount,
  2624. customizeTimes:
  2625. record.dunType == 0 ? record.customizeTimes : undefined,
  2626. customizeName:
  2627. record.dunType == 0 ? record.customizeName : undefined,
  2628. },
  2629. }).done(
  2630. function (data) {
  2631. this.setState({
  2632. loading: false,
  2633. });
  2634. if (!data.error.length) {
  2635. message.success("保存成功!");
  2636. this.setState({
  2637. cuiFlag: false,
  2638. boFlag: false,
  2639. addFlag: false,
  2640. });
  2641. this.jiedianNew(record.orderNo);
  2642. } else {
  2643. message.warning(data.error[0].message);
  2644. }
  2645. }.bind(this)
  2646. );
  2647. } else {
  2648. $.ajax({
  2649. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2650. method: "post",
  2651. data: {
  2652. orderNo: record.orderNo,
  2653. tid: record.tid,
  2654. projectType: record.sort,
  2655. dunType: record.dunType,
  2656. money: record.money,
  2657. waitDay: record.waitDay,
  2658. effectiveCount: record.effectiveCount,
  2659. customizeTimes:
  2660. record.dunType == 0 ? record.customizeTimes : undefined,
  2661. customizeName:
  2662. record.dunType == 0 ? record.customizeName : undefined,
  2663. },
  2664. }).done(
  2665. function (data) {
  2666. this.setState({
  2667. loading: false,
  2668. });
  2669. if (!data.error.length) {
  2670. message.success("保存成功!");
  2671. this.setState({
  2672. cuiFlag: false,
  2673. boFlag: false,
  2674. addFlag: false,
  2675. });
  2676. this.jiedianNew(record.orderNo);
  2677. } else {
  2678. message.warning(data.error[0].message);
  2679. }
  2680. }.bind(this)
  2681. );
  2682. }
  2683. },
  2684. //点击新增催款节点
  2685. addcontact() {
  2686. this.state.contactList.push({
  2687. key: this.state.contactList.length,
  2688. money: "",
  2689. dunSubject: undefined,
  2690. orderNo: this.state.orderNo,
  2691. dunTarget: this.state.kehuId,
  2692. });
  2693. this.setState({
  2694. contactList: this.state.contactList,
  2695. });
  2696. },
  2697. //点击新增催款节点
  2698. addcontactNew() {
  2699. this.state.contactListNew.push({
  2700. key: this.state.contactListNew.length,
  2701. money: "",
  2702. dunSubject: undefined,
  2703. orderNo: this.state.orderNo,
  2704. dunTarget: this.state.kehuId,
  2705. });
  2706. this.setState({
  2707. contactListNew: this.state.contactListNew,
  2708. cuiFlag: true,
  2709. });
  2710. },
  2711. //删除收款节点
  2712. confirmDelet(index) {
  2713. this.state.contactList.splice(index, 1);
  2714. this.setState({
  2715. contactList: this.state.contactList,
  2716. });
  2717. this.contactSave();
  2718. },
  2719. //删除收款节点
  2720. confirmDeletNew(index) {
  2721. if (index.id) {
  2722. this.state.contactListNew.splice(index.id, 1);
  2723. this.setState({
  2724. contactListNew: this.state.contactListNew,
  2725. cuiFlag: false,
  2726. addFlag: false,
  2727. boFlag: false,
  2728. });
  2729. $.ajax({
  2730. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2731. method: "post",
  2732. data: {
  2733. id: index.id,
  2734. },
  2735. }).done(
  2736. function (data) {
  2737. this.setState({
  2738. loading: false,
  2739. });
  2740. if (!data.error.length) {
  2741. message.success("删除成功!");
  2742. this.setState({
  2743. cuiFlag: false,
  2744. });
  2745. this.jiedianNew(this.state.orderNo);
  2746. } else {
  2747. message.warning(data.error[0].message);
  2748. }
  2749. }.bind(this)
  2750. );
  2751. } else {
  2752. this.state.contactListNew.splice(index.key, 1);
  2753. this.setState({
  2754. contactListNew: this.state.contactListNew,
  2755. cuiFlag: false,
  2756. addFlag: false,
  2757. boFlag: false,
  2758. });
  2759. }
  2760. },
  2761. //
  2762. handleOk() {
  2763. this.setState({
  2764. visible: false,
  2765. mark: false,
  2766. });
  2767. this.props.closeDesc(false, true);
  2768. },
  2769. //
  2770. handleCancel() {
  2771. if (this.state.orderType == undefined) {
  2772. return false;
  2773. }
  2774. if (!this.state.autoId) {
  2775. return false;
  2776. }
  2777. this.setState({
  2778. visible: false,
  2779. mark: false,
  2780. });
  2781. this.props.closeDesc(false);
  2782. },
  2783. //
  2784. handleCancelclose() {
  2785. this.setState(
  2786. {
  2787. visible: false,
  2788. mark: false,
  2789. cuiFlag: false,
  2790. addFlag: false,
  2791. boFlag: false,
  2792. isJilu: false,
  2793. },
  2794. () => {
  2795. this.setState({
  2796. activeKey: "1",
  2797. });
  2798. }
  2799. );
  2800. this.props.closeDesc(false);
  2801. this.reset();
  2802. },
  2803. //点击签单
  2804. handleCancels() {
  2805. this.setState({
  2806. isSubmit: 1,
  2807. });
  2808. },
  2809. //点击保存
  2810. handleCancelq() {
  2811. this.setState({
  2812. isSubmit: 0,
  2813. });
  2814. },
  2815. //删除
  2816. delectRow(record) {
  2817. this.setState({
  2818. loading: true,
  2819. });
  2820. $.ajax({
  2821. method: "post",
  2822. dataType: "json",
  2823. crossDomain: false,
  2824. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  2825. data: {
  2826. id: record.id,
  2827. },
  2828. }).done(
  2829. function (data) {
  2830. if (!data.error.length) {
  2831. message.success("删除成功!");
  2832. this.setState({
  2833. loading: false,
  2834. });
  2835. this.jiedian(this.state.orderNo);
  2836. this.jiedianNew(this.state.orderNo);
  2837. // this.loaduser();
  2838. this.loadData();
  2839. } else {
  2840. message.warning(data.error[0].message);
  2841. }
  2842. }.bind(this)
  2843. );
  2844. },
  2845. //
  2846. nextCancel(type) {
  2847. this.setState(
  2848. {
  2849. editProVisible: false,
  2850. changeVisible: false,
  2851. projectOperationVisible: false,
  2852. editProjectOperationVisible: false,//
  2853. vipVisible: false,
  2854. gid: "",
  2855. dataInfor: {},
  2856. addProjectType: undefined,
  2857. isVip: undefined,
  2858. isIso: undefined,
  2859. commodityQuantity: undefined,
  2860. histYear: [],
  2861. yearSum: undefined,
  2862. serviceLife: [],
  2863. serviceYear: undefined,
  2864. isEdit: false, // 可编辑
  2865. },
  2866. () => {
  2867. this.loadData();
  2868. this.proList();
  2869. }
  2870. );
  2871. },
  2872. //
  2873. rizhi() {
  2874. this.setState({
  2875. loading: true,
  2876. });
  2877. $.ajax({
  2878. method: "get",
  2879. dataType: "json",
  2880. crossDomain: false,
  2881. url: "/api/admin/newOrder/selectOrderLog",
  2882. data: {
  2883. orderNo: this.props.datauser.orderNo,
  2884. },
  2885. success: function (data) {
  2886. let theArr = [];
  2887. let thisData = data.data;
  2888. if (!thisData.length) {
  2889. if (data.error && data.error.length) {
  2890. message.warning(data.error[0].message);
  2891. }
  2892. thisData = {};
  2893. } else {
  2894. for (let i = 0; i < data.data.length; i++) {
  2895. let thisdata = data.data[i];
  2896. theArr.push({
  2897. processName: thisdata.processName,
  2898. adminName: thisdata.adminName,
  2899. createDate: thisdata.createDate,
  2900. remarks: thisdata.remarks,
  2901. });
  2902. }
  2903. }
  2904. this.setState({
  2905. dataSourcerizhi: theArr,
  2906. });
  2907. }.bind(this),
  2908. }).always(
  2909. function () {
  2910. this.setState({
  2911. loading: false,
  2912. });
  2913. }.bind(this)
  2914. );
  2915. },
  2916. //查看订单日志
  2917. getOrderLog() {
  2918. this.setState({
  2919. rizhivisible: true,
  2920. });
  2921. this.rizhi();
  2922. },
  2923. //
  2924. closeOrderLog() {
  2925. this.setState({
  2926. rizhivisible: false,
  2927. });
  2928. },
  2929. //
  2930. callback(key) {
  2931. this.setState({
  2932. activeKey: key,
  2933. });
  2934. if (key === "1") {
  2935. this.jiedian(this.props.datauser.orderNo);
  2936. this.jiedianNew(this.props.datauser.orderNo);
  2937. this.loaduser();
  2938. // this.loaduser();
  2939. }
  2940. if (key === "3") {
  2941. this.getChangeData();
  2942. }
  2943. if (key === "2" || key === "3") {
  2944. let url = window.location.href.substring(7);
  2945. $.ajax({
  2946. method: "get",
  2947. dataType: "json",
  2948. crossDomain: false,
  2949. url:
  2950. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  2951. data: {
  2952. orderNo: this.props.datauser.orderNo,
  2953. },
  2954. success: function (data) {
  2955. if (data.data && data.data.length) {
  2956. let thisdata = data.data[data.data.length - 1];
  2957. if (
  2958. thisdata.status === 0 ||
  2959. (thisdata.processState == 0 && thisdata.status != 5)
  2960. ) {
  2961. this.setState({
  2962. changeId: thisdata.id,
  2963. typeChange: thisdata.type,
  2964. totalAmount: thisdata.totalAmount,
  2965. settlementAmount: thisdata.settlementAmount,
  2966. changeAmount: thisdata.changeAmount,
  2967. remarksC: thisdata.remarks,
  2968. startRemarks: thisdata.zxsRemarks,
  2969. isCaoGao: true,
  2970. arrears: thisdata.arrears,
  2971. changeFlag: true,
  2972. createTimes: thisdata.createTimes,
  2973. voucherUrl: thisdata.voucherUrl
  2974. ? splitUrl(
  2975. thisdata.voucherUrl,
  2976. ",",
  2977. globalConfig.avatarHost + "/upload",
  2978. url
  2979. )
  2980. : [],
  2981. newContractUrl: thisdata.contractPictureUrl
  2982. ? splitUrl(
  2983. thisdata.contractPictureUrl,
  2984. ",",
  2985. globalConfig.avatarHost + "/upload",
  2986. url
  2987. )
  2988. : [],
  2989. isNew: !thisdata.contractPictureUrl ? false : true,
  2990. processState: thisdata.processState,
  2991. status: thisdata.status,
  2992. });
  2993. this.proList();
  2994. this.cuiList();
  2995. let e = thisdata.type;
  2996. if (e == 1) {
  2997. this.setState({
  2998. hetongFlag: false,
  2999. listFlag: false,
  3000. listCuiFlag: false,
  3001. tuiKuanFlag: false,
  3002. displayList: false,
  3003. });
  3004. } else if (e == 2) {
  3005. this.setState({
  3006. hetongFlag: true,
  3007. listFlag: false,
  3008. listCuiFlag: false,
  3009. tuiKuanFlag: true,
  3010. displayList: false,
  3011. });
  3012. } else if (e == 3) {
  3013. this.setState({
  3014. listFlag: false,
  3015. hetongFlag: false,
  3016. listCuiFlag: false,
  3017. tuiKuanFlag: false,
  3018. displayList: true,
  3019. });
  3020. } else if (e == 4) {
  3021. this.setState({
  3022. listFlag: false,
  3023. listCuiFlag: false,
  3024. hetongFlag: false,
  3025. tuiKuanFlag: true,
  3026. displayList: false,
  3027. });
  3028. } else if (e == 5) {
  3029. this.setState({
  3030. listFlag: false,
  3031. listCuiFlag: false,
  3032. hetongFlag: true,
  3033. tuiKuanFlag: true,
  3034. displayList: false,
  3035. });
  3036. } else if (e == 6) {
  3037. this.setState({
  3038. listFlag: true,
  3039. listCuiFlag: true,
  3040. hetongFlag: true,
  3041. tuiKuanFlag: true,
  3042. displayList: false,
  3043. });
  3044. } else if (e == 7) {
  3045. this.setState({
  3046. listFlag: true,
  3047. listCuiFlag: true,
  3048. hetongFlag: true,
  3049. tuiKuanFlag: true,
  3050. displayList: false,
  3051. isNew: true,
  3052. });
  3053. } else {
  3054. this.setState({
  3055. listFlag: true,
  3056. hetongFlag: true,
  3057. listCuiFlag: true,
  3058. tuiKuanFlag: false,
  3059. displayList: false,
  3060. });
  3061. }
  3062. } else {
  3063. this.setState({
  3064. listFlag: false,
  3065. hetongFlag: false,
  3066. listCuiFlag: false,
  3067. tuiKuanFlag: false,
  3068. displayList: false,
  3069. // 置空
  3070. changeId: undefined,
  3071. isCaoGao: false,
  3072. });
  3073. }
  3074. } else {
  3075. this.setState({
  3076. isCaoGao: false,
  3077. });
  3078. }
  3079. }.bind(this),
  3080. });
  3081. }
  3082. },
  3083. //
  3084. cuiList(id) {
  3085. this.setState({
  3086. loadData: true,
  3087. });
  3088. $.ajax({
  3089. method: "get",
  3090. dataType: "json",
  3091. crossDomain: false,
  3092. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  3093. data: {
  3094. id: id || this.state.changeId,
  3095. },
  3096. success: function (data) {
  3097. this.setState({
  3098. cuiDataSource: data.data,
  3099. });
  3100. if (data.data && data.data.length) {
  3101. if (id) {
  3102. this.setState({
  3103. listCuiFlag: true,
  3104. });
  3105. }
  3106. this.setState({
  3107. cuiDataSource: data.data,
  3108. });
  3109. this.setState({
  3110. loadData: false,
  3111. });
  3112. } else if (data.error && data.error.length) {
  3113. message.warning(data.error[0].message);
  3114. this.setState({
  3115. loadData: false,
  3116. });
  3117. }
  3118. }.bind(this),
  3119. });
  3120. },
  3121. //
  3122. proList(id) {
  3123. this.setState({
  3124. loadData: true,
  3125. });
  3126. $.ajax({
  3127. method: "get",
  3128. dataType: "json",
  3129. crossDomain: false,
  3130. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  3131. data: {
  3132. id: id || this.state.changeId,
  3133. },
  3134. success: function (data) {
  3135. if (data.data && data.data.length) {
  3136. if (id) {
  3137. this.setState({
  3138. listFlag: true,
  3139. });
  3140. }
  3141. data.data.forEach((item, index) => {
  3142. item.key = index;
  3143. });
  3144. this.setState({
  3145. proDataSource: data.data,
  3146. });
  3147. this.setState({
  3148. loadData: false,
  3149. });
  3150. } else if (data.error && data.error.length) {
  3151. // message.warning(data.error[0].message);
  3152. this.setState({
  3153. loadData: false,
  3154. });
  3155. }
  3156. }.bind(this),
  3157. });
  3158. },
  3159. //
  3160. logList(id) {
  3161. this.setState({
  3162. loading: true,
  3163. });
  3164. $.ajax({
  3165. method: "get",
  3166. dataType: "json",
  3167. async: false,
  3168. crossDomain: false,
  3169. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  3170. data: {
  3171. changeId: id,
  3172. },
  3173. success: function (data) {
  3174. if (data.error.length || data.data.list == "") {
  3175. if (data.error && data.error.length) {
  3176. message.warning(data.error[0].message);
  3177. this.setState({
  3178. loading: false,
  3179. });
  3180. }
  3181. } else {
  3182. this.setState({
  3183. logData: data.data,
  3184. loading: false,
  3185. });
  3186. }
  3187. }.bind(this),
  3188. });
  3189. },
  3190. getOrgCodeUrl(e) {
  3191. this.setState({ orgCodeUrl: e });
  3192. },
  3193. getReplenishUrl(e) {
  3194. this.setState({ replenishUrl: e });
  3195. },
  3196. getContentUrl(e) {
  3197. this.setState({ contentUrl: e });
  3198. },
  3199. getVoucherUrl(e) {
  3200. this.setState({ voucherUrl: e });
  3201. },
  3202. getNewContractUrl(e) {
  3203. this.setState({ newContractUrl: e });
  3204. },
  3205. //加载(自动补全)
  3206. supervisor(e, state) {
  3207. //客户名称与服务名称自动补全
  3208. let api = state
  3209. ? "/api/admin/customer/getCustomerByName"
  3210. : "/api/admin/order/getBusinessProjectByName";
  3211. $.ajax({
  3212. method: "get",
  3213. dataType: "json",
  3214. crossDomain: false,
  3215. url: globalConfig.context + api,
  3216. data: state
  3217. ? {
  3218. name: e,
  3219. type: this.state.userType,
  3220. }
  3221. : {
  3222. businessName: e,
  3223. },
  3224. success: function (data) {
  3225. let thedata = data.data;
  3226. if (!thedata) {
  3227. if (data.error && data.error.length) {
  3228. message.warning(data.error[0].message);
  3229. }
  3230. thedata = {};
  3231. }
  3232. this.setState({
  3233. states: state,
  3234. customerArr: thedata,
  3235. });
  3236. }.bind(this),
  3237. }).always(
  3238. function () {
  3239. this.setState({
  3240. loading: false,
  3241. });
  3242. }.bind(this)
  3243. );
  3244. },
  3245. // 渠道查询
  3246. selectChannel(e) {
  3247. $.ajax({
  3248. method: "get",
  3249. dataType: "json",
  3250. crossDomain: false,
  3251. url: globalConfig.context + "/api/admin/customer/selectChannelUserList",
  3252. data: {
  3253. name: e,
  3254. },
  3255. success: function (data) {
  3256. let thedata = data.data;
  3257. if (!thedata) {
  3258. if (data.error && data.error.length) {
  3259. message.warning(data.error[0].message);
  3260. }
  3261. thedata = {};
  3262. }
  3263. this.setState({
  3264. channelArr: thedata,
  3265. });
  3266. }.bind(this),
  3267. }).always(
  3268. function () {
  3269. this.setState({
  3270. loading: false,
  3271. });
  3272. }.bind(this)
  3273. );
  3274. },
  3275. supervisorCui(e) {
  3276. //客户名称与服务名称自动补全
  3277. let api = "/api/admin/order/getBusinessProjectByName";
  3278. $.ajax({
  3279. method: "get",
  3280. dataType: "json",
  3281. crossDomain: false,
  3282. url: globalConfig.context + api,
  3283. data: {
  3284. businessName: e,
  3285. },
  3286. success: function (data) {
  3287. let thedata = data.data;
  3288. if (!thedata) {
  3289. if (data.error && data.error.length) {
  3290. message.warning(data.error[0].message);
  3291. }
  3292. thedata = {};
  3293. }
  3294. this.setState({
  3295. customerCuiArr: thedata,
  3296. });
  3297. }.bind(this),
  3298. }).always(
  3299. function () {
  3300. this.setState({
  3301. loading: false,
  3302. });
  3303. }.bind(this)
  3304. );
  3305. },
  3306. //上级主管输入框失去焦点是判断客户是否存在
  3307. selectAuto(value) {
  3308. const newData = this.state.proDataSource
  3309. let kid = [];
  3310. let fwList = this.state.customerArr;
  3311. fwList.map(function (item) {
  3312. if (value == item.bname) {
  3313. kid = item;
  3314. }
  3315. });
  3316. if (kid.type == "1") {
  3317. this.setState({
  3318. displayFees: "block",
  3319. });
  3320. } else {
  3321. this.setState({
  3322. displayFees: "none",
  3323. });
  3324. }
  3325. //0通用 1专利 2软著 3审计 4双软 5高新 6商标
  3326. this.setState({
  3327. commodityName: value,
  3328. gid: kid.id,
  3329. addProjectType: kid.type,
  3330. isIso: value.indexOf("贯标") !== -1, // 是否为贯标项目
  3331. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3332. commodityFirstPayment: kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment,
  3333. isVip: kid.cSort,//暂时判断等于6的时候会员
  3334. commodityQuantity: kid.cSort == 6 ? 1 : undefined,//服务数量
  3335. histYear: [],
  3336. });
  3337. if (newData && newData.length > 0 && kid.cSort == 6) {
  3338. let llist = []
  3339. for (var i = 0; i < newData.length; i++) {
  3340. if (newData[i].commodityId == kid.id) {
  3341. llist.push(newData[i].serviceYear)
  3342. }
  3343. }
  3344. this.setState({
  3345. histYear: llist
  3346. })
  3347. for (var i = newData.length - 1; i >= 0; i--) {
  3348. if (newData[i].commodityId == kid.id) {
  3349. this.setState({
  3350. commodityPrice: newData[i].commodityPrice, // 实签价格
  3351. main: "0", // 是否为主要项目
  3352. yearSum: newData[i].yearSum.toString(), // 会员总服务年限
  3353. serviceLife: !newData[i].serviceLife ? [] : JSON.parse(newData[i].serviceLife), // 会员服务年限
  3354. contractTerm: !newData[i].contractTerm ? [] : JSON.parse(newData[i].contractTerm), // 合同期
  3355. taskComment: newData[i].taskComment, // 项目说明
  3356. // isEdit: true, // 不可编辑
  3357. isEdit: true, // 同一会员项目有且只有一条时可编辑 其他情况不可编辑
  3358. cPeriod: !newData[i].contractTerm ? false : true, //合同期
  3359. })
  3360. return
  3361. } else {
  3362. this.setState({
  3363. commodityPrice: undefined,
  3364. main: undefined,
  3365. yearSum: undefined,
  3366. serviceLife: [],
  3367. contractTerm: [],
  3368. taskComment: undefined,
  3369. isEdit: false, // 可编辑
  3370. cPeriod: false,
  3371. })
  3372. }
  3373. }
  3374. }
  3375. },
  3376. selectAutoCui(value) {
  3377. let kid = [];
  3378. let fwList = this.state.customerCuiArr;
  3379. fwList.map(function (item) {
  3380. if (value == item.bname) {
  3381. kid = item;
  3382. }
  3383. });
  3384. this.setState({
  3385. commodityNameCui: value,
  3386. cid: kid.id,
  3387. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3388. commodityFirstPayment:
  3389. kid.firstPayment == 0
  3390. ? kid.firstPayment.toString()
  3391. : kid.firstPayment,
  3392. });
  3393. },
  3394. //客户
  3395. selectAutoCUT(value) {
  3396. let autoIds;
  3397. let fwList = this.state.customerArr;
  3398. fwList.map(function (item) {
  3399. if (value == item.name) {
  3400. autoIds = item.id;
  3401. }
  3402. });
  3403. this.setState({
  3404. customerName: value,
  3405. autoId: autoIds,
  3406. });
  3407. },
  3408. goSelect(value) {
  3409. let channelid;
  3410. let fwList = this.state.channelArr;
  3411. fwList.map(function (item) {
  3412. if (value == item.name) {
  3413. channelid = item.id;
  3414. }
  3415. });
  3416. this.setState({
  3417. channelname: value,
  3418. channelid: channelid,
  3419. });
  3420. },
  3421. //服务值改变时请求客户名称
  3422. httpChange(e) {
  3423. this.state.gid = "";
  3424. if (e.length >= 1) {
  3425. this.supervisor(e, false);
  3426. }
  3427. this.setState({
  3428. commodityName: e,
  3429. });
  3430. },
  3431. httpChangeCui(e) {
  3432. if (e.length >= 1) {
  3433. this.supervisorCui(e, false);
  3434. }
  3435. this.setState({
  3436. commodityNameCui: e,
  3437. });
  3438. },
  3439. //客户名称自动补全
  3440. customerChange(e) {
  3441. if (this.state.userType) {
  3442. this.state.autoId = "";
  3443. if (e.length >= 2) {
  3444. this.supervisor(e, true);
  3445. }
  3446. this.setState({
  3447. customerName: e,
  3448. });
  3449. } else {
  3450. this.setState({
  3451. customerName: "",
  3452. });
  3453. message.warning("客户所属类型必须指定");
  3454. }
  3455. },
  3456. //渠道名称自动补全
  3457. channelChange(e) {
  3458. this.setState({
  3459. channelName: e
  3460. })
  3461. if (e.length >= 2) {
  3462. this.selectChannel(e);
  3463. }
  3464. },
  3465. //点击添加项目明细
  3466. addDetailed() {
  3467. const { dataSource = [] } = this.state
  3468. this.setState({
  3469. projectOperationVisible: true,
  3470. newData: dataSource,
  3471. });
  3472. },
  3473. //点击添加会员项目明细
  3474. addVip() {
  3475. const { dataSource = [] } = this.state
  3476. this.setState({
  3477. vipVisible: true,
  3478. newData: dataSource,
  3479. });
  3480. },
  3481. // 可展开颜色不同
  3482. addRowColor(record) {
  3483. if (!!record.splitList && record.splitList.length > 0) {
  3484. return 'light'
  3485. } else if (!!record.list && record.list.length > 0) {
  3486. return 'light'
  3487. } else {
  3488. return 'dark'
  3489. }
  3490. },
  3491. //点击项目详情
  3492. tableRowClick(record) {
  3493. const { dataSource = [] } = this.state
  3494. this.setState({
  3495. // projectOperationVisible: true,
  3496. editProjectOperationVisible: true,
  3497. dataInfor: record,
  3498. newData: dataSource,
  3499. });
  3500. },
  3501. //签单时间选择
  3502. selTime(e, index) {
  3503. this.setState({
  3504. entryTime: e,
  3505. signDate: e,
  3506. selTime: index,
  3507. });
  3508. },
  3509. //退单操作
  3510. //点击退单
  3511. tuikuan() {
  3512. this.setState({
  3513. lookVisible: true,
  3514. contractUrl: [],
  3515. applicationUrl: [],
  3516. reason: "",
  3517. });
  3518. },
  3519. //关闭退单
  3520. noCancel() {
  3521. this.setState({
  3522. lookVisible: false,
  3523. });
  3524. },
  3525. //点击确认退单
  3526. tuidanOk() {
  3527. let contractUrls = [];
  3528. let applicationUrls = [];
  3529. if (this.state.contractUrl.length) {
  3530. let picArr = [];
  3531. this.state.contractUrl.map(function (item) {
  3532. if (
  3533. item.response &&
  3534. item.response.data &&
  3535. item.response.data.length
  3536. ) {
  3537. picArr.push(item.response.data);
  3538. }
  3539. });
  3540. contractUrls = picArr.join(",");
  3541. }
  3542. if (this.state.applicationUrl.length) {
  3543. let picArr = [];
  3544. this.state.applicationUrl.map(function (item) {
  3545. if (
  3546. item.response &&
  3547. item.response.data &&
  3548. item.response.data.length
  3549. ) {
  3550. picArr.push(item.response.data);
  3551. }
  3552. });
  3553. applicationUrls = picArr.join(",");
  3554. }
  3555. $.ajax({
  3556. method: "POST",
  3557. dataType: "json",
  3558. crossDomain: false,
  3559. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  3560. data: {
  3561. orderNo: this.state.orderNo, //订单编号
  3562. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  3563. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  3564. reason: this.state.reason, //退单原因
  3565. },
  3566. }).done(
  3567. function (data) {
  3568. this.setState({
  3569. loading: false,
  3570. });
  3571. if (!data.error.length) {
  3572. message.success("退单成功!");
  3573. this.noCancel();
  3574. this.handleCancelclose();
  3575. } else {
  3576. message.warning(data.error[0].message);
  3577. }
  3578. }.bind(this)
  3579. );
  3580. },
  3581. //开单选择订单类型骚操作
  3582. orderTypeFn(e) {
  3583. if (e == 0) {
  3584. this.setState({
  3585. bussStats: true,
  3586. orderType: e,
  3587. });
  3588. this.category();
  3589. } else {
  3590. this.setState({
  3591. contractType: undefined,
  3592. bussStats: false,
  3593. orderType: e,
  3594. });
  3595. }
  3596. },
  3597. //品类数据获取
  3598. category() {
  3599. $.ajax({
  3600. method: "get",
  3601. dataType: "json",
  3602. crossDomain: false,
  3603. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  3604. data: {},
  3605. success: function (data) {
  3606. let thedata = data.data;
  3607. let theArr = [];
  3608. if (!thedata) {
  3609. if (data.error && data.error.length) {
  3610. message.warning(data.error[0].message);
  3611. }
  3612. thedata = {};
  3613. } else {
  3614. thedata.map(function (item, index) {
  3615. theArr.push({
  3616. key: index,
  3617. name: item.cname,
  3618. id: item.id,
  3619. });
  3620. });
  3621. }
  3622. this.setState({
  3623. contractType: undefined,
  3624. categoryArr: theArr,
  3625. });
  3626. }.bind(this),
  3627. });
  3628. },
  3629. //变更申请
  3630. changeApply() {
  3631. if (
  3632. this.state.typeChange == undefined ||
  3633. (this.state.typeChange == "" && this.state.typeChange != 0)
  3634. ) {
  3635. message.warning("请选择变更类型");
  3636. return false;
  3637. }
  3638. if (
  3639. this.state.typeChange == 0 ||
  3640. this.state.typeChange == 1 ||
  3641. this.state.typeChange == 3
  3642. ) {
  3643. if (this.state.settlementAmount < this.state.changeAmount) {
  3644. message.warning("退款金额大于已收款金额");
  3645. return;
  3646. }
  3647. }
  3648. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  3649. message.warning("当前订单流程不能发起变更!");
  3650. return false;
  3651. }
  3652. if (this.state.changeAmount === "") {
  3653. message.warning("申请退款金额不能为空!");
  3654. return false;
  3655. }
  3656. if (this.state.remarksC == "") {
  3657. message.warning("请正确填写变更原因");
  3658. return false;
  3659. }
  3660. if (this.state.startRemarks == "") {
  3661. message.warning("请正确填写备注信息");
  3662. return false;
  3663. }
  3664. let theorgCodeUrl = [];
  3665. if (this.state.voucherUrl.length) {
  3666. let picArr = [];
  3667. this.state.voucherUrl.map(function (item) {
  3668. if (
  3669. item.response &&
  3670. item.response.data &&
  3671. item.response.data.length
  3672. ) {
  3673. picArr.push(item.response.data);
  3674. }
  3675. });
  3676. theorgCodeUrl = picArr.join(",");
  3677. }
  3678. let newContractUrl = [];
  3679. if (this.state.newContractUrl.length) {
  3680. let cArr = [];
  3681. this.state.newContractUrl.map(function (item) {
  3682. if (
  3683. item.response &&
  3684. item.response.data &&
  3685. item.response.data.length
  3686. ) {
  3687. cArr.push(item.response.data);
  3688. }
  3689. });
  3690. newContractUrl = cArr.join(",");
  3691. }
  3692. if (this.state.isNew && newContractUrl.length == 0) {
  3693. message.warning("请上传新合同扫描件!");
  3694. return
  3695. }
  3696. this.setState({
  3697. loading: true,
  3698. });
  3699. if (this.state.typeChange == 0) {
  3700. $.ajax({
  3701. method: "post",
  3702. dataType: "json",
  3703. crossDomain: false,
  3704. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3705. data: {
  3706. orderNo: this.state.orderNo, //订单编号
  3707. processState: 1,
  3708. status: 1,
  3709. startRemarks: this.state.startRemarks,
  3710. remarks: this.state.remarksC,
  3711. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3712. totalAmount: this.state.totalAmount,
  3713. settlementAmount: this.state.settlementAmount,
  3714. changeAmount: this.state.changeAmount,
  3715. applicant: this.state.salesmanName,
  3716. depName: this.state.depName,
  3717. type: this.state.typeChange,
  3718. contractPictureUrl: this.state.isNew
  3719. ? newContractUrl : undefined,//合同替换件
  3720. },
  3721. }).done(
  3722. function (data) {
  3723. this.setState({
  3724. loading: false,
  3725. });
  3726. if (!data.error.length) {
  3727. message.success("发起变更成功");
  3728. this.handleCancelclose();
  3729. } else {
  3730. message.warning(data.error[0].message);
  3731. this.setState({
  3732. loading: false,
  3733. });
  3734. }
  3735. }.bind(this)
  3736. );
  3737. } else {
  3738. $.ajax({
  3739. method: "post",
  3740. dataType: "json",
  3741. crossDomain: false,
  3742. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3743. data: {
  3744. orderNo: this.state.orderNo, //订单编号
  3745. processState: 0,
  3746. status: 0,
  3747. startRemarks: this.state.startRemarks,
  3748. remarks: this.state.remarksC,
  3749. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3750. totalAmount: this.state.totalAmount,
  3751. settlementAmount: this.state.settlementAmount,
  3752. changeAmount: this.state.changeAmount,
  3753. applicant: this.state.salesmanName,
  3754. depName: this.state.depName,
  3755. type: this.state.typeChange,
  3756. contractPictureUrl: this.state.isNew
  3757. ? newContractUrl : undefined,//合同替换件
  3758. },
  3759. }).done(
  3760. function (data) {
  3761. this.setState({
  3762. loading: false,
  3763. });
  3764. if (!data.error.length) {
  3765. message.success("发起变更草稿");
  3766. this.setState(
  3767. {
  3768. isCaoGao: true,
  3769. loading: false,
  3770. },
  3771. () => {
  3772. this.callback("2");
  3773. }
  3774. );
  3775. } else {
  3776. message.warning(data.error[0].message);
  3777. }
  3778. }.bind(this)
  3779. );
  3780. }
  3781. },
  3782. reset() {
  3783. this.setState({
  3784. startRemarks: "",
  3785. remarksC: "",
  3786. voucherUrl: [],
  3787. newContractUrl: [],
  3788. totalAmount: undefined,
  3789. settlementAmount: undefined,
  3790. changeAmount: "0",
  3791. applicant: undefined,
  3792. depNameChange: undefined,
  3793. typeChange: undefined,
  3794. displayFees: "none",
  3795. officialCost: "",
  3796. costReduction: "",
  3797. });
  3798. },
  3799. componentWillReceiveProps(nextProps) {
  3800. //props改变时触发
  3801. this.state.visible = nextProps.showDesc;
  3802. this.state.signBillVisible = nextProps.signBillVisible;
  3803. if (this.state.signBillVisible) {
  3804. this.loaduser(nextProps.uid);
  3805. this.assistList(nextProps.uid);
  3806. this.orderServiceList(nextProps.uid);
  3807. // this.publicByOrder(nextProps.uid);
  3808. }
  3809. if (nextProps.userDetaile && nextProps.showDesc) {
  3810. this.loaduser(nextProps.datauser);
  3811. this.assistList(nextProps.datauser);
  3812. this.orderServiceList(nextProps.datauser);
  3813. // this.publicByOrder(nextProps.datauser);
  3814. this.jiedian(nextProps.datauser.orderNo);
  3815. this.jiedianNew(nextProps.datauser.orderNo);
  3816. this.loadData(nextProps.datauser);
  3817. this.getChangeData(nextProps.datauser);
  3818. } else {
  3819. this.setState({
  3820. orderType: undefined,
  3821. customerName: "",
  3822. autoId: "",
  3823. customerArr: [],
  3824. contractType: undefined,
  3825. bussStats: false,
  3826. userType: undefined,
  3827. channelName: "",
  3828. channelid: "",
  3829. channelArr: [],
  3830. selectSales: undefined,
  3831. });
  3832. }
  3833. },
  3834. //查看变更记录
  3835. getChangeData(record) {
  3836. this.setState({
  3837. loading: true,
  3838. });
  3839. $.ajax({
  3840. method: "get",
  3841. dataType: "json",
  3842. crossDomain: false,
  3843. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3844. data: {
  3845. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  3846. },
  3847. success: function (data) {
  3848. this.setState({
  3849. loading: false,
  3850. });
  3851. let url = window.location.href.substring(7);
  3852. if (data.data && data.data.length) {
  3853. let thisdata = data.data[data.data.length - 1];
  3854. thisdata.typeChange = thisdata.type;
  3855. thisdata.remarksC = thisdata.remarks;
  3856. thisdata.startRemarks = thisdata.zxsRemarks;
  3857. thisdata.voucherUrl = thisdata.voucherUrl
  3858. ? splitUrl(
  3859. thisdata.voucherUrl,
  3860. ",",
  3861. globalConfig.avatarHost + "/upload",
  3862. url
  3863. )
  3864. : [];
  3865. thisdata.contractPictureUrl = thisdata.contractPictureUrl
  3866. ? splitUrl(
  3867. thisdata.contractPictureUrl,
  3868. ",",
  3869. globalConfig.avatarHost + "/upload",
  3870. url
  3871. )
  3872. : [];
  3873. this.proList(thisdata.id);
  3874. this.cuiList(thisdata.id);
  3875. this.logList(thisdata.id);
  3876. this.setState({
  3877. //判断是否有合同变更记录
  3878. isJilu: true,
  3879. detailChange: thisdata,
  3880. });
  3881. }
  3882. }.bind(this),
  3883. });
  3884. },
  3885. showConfirm(fn, record) {
  3886. confirm({
  3887. title: "确定删除此项目吗?",
  3888. content: (
  3889. <span style={{ color: "red" }}>
  3890. 删除后会将该项目下的所有催款节点自动清除!!!
  3891. </span>
  3892. ),
  3893. onOk() {
  3894. fn(record);
  3895. },
  3896. onCancel() { },
  3897. });
  3898. },
  3899. viewConfirm(fn, record) {
  3900. confirm({
  3901. title: "确定删除此服务记录吗?",
  3902. // content: (
  3903. // <span style={{ color: "red" }}>
  3904. // 删除后会将该项目下的所有催款节点自动清除!!!
  3905. // </span>
  3906. // ),
  3907. onOk() {
  3908. fn(record);
  3909. },
  3910. onCancel() { },
  3911. });
  3912. },
  3913. changeAddPro() {
  3914. // this.getpatentTypeList();
  3915. this.setState({
  3916. changeVisible: true,
  3917. newData: this.state.proDataSource,
  3918. // gid: "",
  3919. // customerArr: [],
  3920. // commodityName: "",
  3921. // commodityQuantity: "",
  3922. // commodityId: "",
  3923. // taskComment: "",
  3924. // main: undefined,
  3925. // commodityPrice: "",
  3926. // displayFees: "none",
  3927. // officialCost: "",
  3928. // costReduction: "",
  3929. });
  3930. },
  3931. changeProSubmit() {
  3932. if (this.state.gid == undefined || !this.state.gid) {
  3933. message.warning("服务名称不匹配!");
  3934. return
  3935. }
  3936. let reg = /^([0]|[1-9][0-9]*)$/;
  3937. if (
  3938. !this.state.commodityQuantity ||
  3939. !reg.test(this.state.commodityQuantity)
  3940. ) {
  3941. message.warning("请输入正确商品数量!");
  3942. return
  3943. }
  3944. if (this.state.displayFees === 'block') {
  3945. if (this.state.patentType === "" && !this.state.patentTransfer) {
  3946. message.warning("请选择专利类型!");
  3947. return
  3948. }
  3949. if (this.state.officialCost === '') {
  3950. message.warning("请选择官费!");
  3951. return
  3952. }
  3953. if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
  3954. message.warning("请选择费减!");
  3955. return
  3956. }
  3957. }
  3958. if (isNaN(parseFloat(this.state.commodityPrice))) {
  3959. message.warning("请输入正确的金额!");
  3960. return;
  3961. }
  3962. if (this.state.addProjectType == "3") {// 3审计
  3963. if (this.state.serviceLife.length === 0) {
  3964. message.warning("请选择服务年限!");
  3965. return
  3966. }
  3967. if (this.state.serviceLife.length != this.state.commodityQuantity) {
  3968. message.warning("服务数量与服务年限不符!");
  3969. return
  3970. }
  3971. }
  3972. if (!this.state.main) {
  3973. message.warning("请选择是否为主要项目!");
  3974. return
  3975. }
  3976. if (this.state.addProjectType === 5) {// 5高新
  3977. if (!this.state.declarationBatch) {
  3978. message.warning("请选择企业要求申报批次!");
  3979. return
  3980. }
  3981. if (!this.state.serviceYear) {
  3982. message.warning("请选择申报年份!");
  3983. return
  3984. }
  3985. }
  3986. if (this.state.isVip == 6) {//会员
  3987. if (this.state.yearSum === undefined) {
  3988. message.warning("请选择会员总服务年限!");
  3989. return
  3990. }
  3991. if (this.state.serviceLife.length === 0) {
  3992. message.warning("请添加会员服务年限!");
  3993. return
  3994. }
  3995. if (this.state.serviceLife.length != this.state.yearSum) {
  3996. message.warning("会员服务年限与总年限不符合!");
  3997. return
  3998. }
  3999. if (this.state.serviceYear === undefined) {
  4000. message.warning("请选择本次派单年份!");
  4001. return
  4002. }
  4003. if (this.state.contractTerm.length === 0) {
  4004. message.warning("请填写合同期!");
  4005. return
  4006. }
  4007. }
  4008. this.setState({
  4009. loading: true,
  4010. });
  4011. let type = 0;
  4012. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  4013. type = 1;
  4014. }
  4015. let infor = {
  4016. commodityId: this.state.gid, //商品ID
  4017. orderNo: this.props.datauser.orderNo, //订单编号
  4018. commodityName: this.state.commodityName, //商品名称
  4019. commodityQuantity: this.state.commodityQuantity, //商品数量
  4020. commodityPrice: this.state.commodityPrice, //签单总价
  4021. taskComment: this.state.taskComment, //服务说明
  4022. main: this.state.main, //是否为主要项目
  4023. cid: this.state.changeId, //变更ID
  4024. type,
  4025. }
  4026. if (this.state.displayFees === 'block') {
  4027. infor.officialCost = this.state.officialCost //是否有官费
  4028. infor.costReduction = (this.state.patentType === 0 || this.state.patentType === 2) ? (this.state.officialCost === 1 ? this.state.costReduction : 0) : 0//是否有费减
  4029. infor.patentType = this.state.patentType //专利类型
  4030. }
  4031. if (this.state.isIso) {
  4032. infor.ifCertificationFee = this.state.ifCertificationFee || undefined;//是否包含认证费用
  4033. }
  4034. if (this.state.addProjectType == "3") {//审计
  4035. infor.serviceLife = JSON.stringify(this.state.serviceLife) //服务年限
  4036. }
  4037. if (this.state.addProjectType == "5") {//高新
  4038. infor.declarationBatch = this.state.declarationBatch || 1//申报批次
  4039. infor.serviceYear = this.state.serviceYear //申报年份
  4040. }
  4041. if (this.state.isVip == 6) {//会员
  4042. infor.yearSum = this.state.yearSum //会员总服务年限
  4043. infor.serviceLife = JSON.stringify(this.state.serviceLife) //会员服务年限
  4044. infor.serviceYear = this.state.serviceYear //本次派单年份
  4045. infor.contractTerm = JSON.stringify(this.state.contractTerm)//合同期
  4046. }
  4047. $.ajax({
  4048. method: "post",
  4049. dataType: "json",
  4050. crossDomain: false,
  4051. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  4052. data: infor,
  4053. success: function (data) {
  4054. let theArr = [];
  4055. if (data.error && data.error.length) {
  4056. message.warning(data.error[0].message);
  4057. } else {
  4058. message.success("保存成功");
  4059. this.nextCancel();
  4060. this.proList();
  4061. }
  4062. }.bind(this),
  4063. }).always(
  4064. function () {
  4065. this.setState({
  4066. loading: false,
  4067. });
  4068. }.bind(this)
  4069. );
  4070. },
  4071. changeDeletePro(record) {
  4072. this.setState({
  4073. loading: true,
  4074. });
  4075. $.ajax({
  4076. method: "post",
  4077. dataType: "json",
  4078. crossDomain: false,
  4079. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4080. data: {
  4081. id: record.id,
  4082. type: 3,
  4083. tid: record.tid,
  4084. splitStatus: record.splitStatus,
  4085. },
  4086. success: function (data) {
  4087. let theArr = [];
  4088. if (data.error && data.error.length) {
  4089. message.warning(data.error[0].message);
  4090. } else {
  4091. message.success("删除成功");
  4092. this.proList();
  4093. this.cuiList();
  4094. }
  4095. }.bind(this),
  4096. }).always(
  4097. function () {
  4098. this.setState({
  4099. loading: false,
  4100. });
  4101. }.bind(this)
  4102. );
  4103. },
  4104. //点击新增变更催款节点
  4105. changeAddCui() {
  4106. this.state.cuiDataSource.push({
  4107. key: this.state.cuiDataSource.length,
  4108. money: "",
  4109. dunSubject: undefined,
  4110. orderNo: this.state.orderNo,
  4111. dunTarget: this.state.kehuId,
  4112. });
  4113. this.setState({
  4114. cuiDataSource: this.state.cuiDataSource,
  4115. cuiFlag: true,
  4116. });
  4117. },
  4118. //删除变更收款节点
  4119. changeDeleteCui(index) {
  4120. if (index.id) {
  4121. this.state.cuiDataSource.splice(index.id, 1);
  4122. this.setState({
  4123. contactListNew: this.state.cuiDataSource,
  4124. cuiFlag: false,
  4125. addFlag: false,
  4126. boFlag: false,
  4127. });
  4128. $.ajax({
  4129. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4130. method: "post",
  4131. data: {
  4132. id: index.id,
  4133. type: 3,
  4134. tid: index.tid,
  4135. did: index.did,
  4136. },
  4137. }).done(
  4138. function (data) {
  4139. this.setState({
  4140. loading: false,
  4141. });
  4142. if (!data.error.length) {
  4143. message.success("删除成功!");
  4144. this.setState({
  4145. cuiFlag: false,
  4146. });
  4147. this.cuiList();
  4148. this.proList();
  4149. } else {
  4150. message.warning(data.error[0].message);
  4151. }
  4152. }.bind(this)
  4153. );
  4154. } else {
  4155. this.state.cuiDataSource.splice(index.key, 1);
  4156. this.setState({
  4157. cuiDataSource: this.state.cuiDataSource,
  4158. cuiFlag: false,
  4159. addFlag: false,
  4160. boFlag: false,
  4161. });
  4162. }
  4163. },
  4164. changeSaveCui(record) {
  4165. if (record.dunType == 0) {
  4166. if (!record.customizeTimes) {
  4167. message.warning("请输入自定义时间");
  4168. return;
  4169. } else if (!record.customizeName) {
  4170. message.warning("请输入自定义科目");
  4171. return;
  4172. }
  4173. }
  4174. if (record.boStatus == "false") {
  4175. record.boStatus = false;
  4176. } else if (record.boStatus == "true") {
  4177. record.boStatus = true;
  4178. }
  4179. if (!this.state.yearFlag) {
  4180. if (!record.effectiveCount) {
  4181. message.warning("请选择服务年限");
  4182. return;
  4183. }
  4184. } else {
  4185. record.effectiveCount = "";
  4186. }
  4187. if (isNaN(parseInt(record.money)) && !record.boStatus) {
  4188. message.warning("请填写金额");
  4189. return;
  4190. } else if (isNaN(parseInt(record.money)) && record.boStatus) {
  4191. message.warning("请填写比例");
  4192. return;
  4193. }
  4194. if (record.boStatus) {
  4195. if (
  4196. typeof +record.money == "number" &&
  4197. +record.money >= 0 &&
  4198. +record.money <= 1
  4199. ) {
  4200. record.appropriationRatio = record.money;
  4201. } else {
  4202. message.warning("金额比例填写错误,比例范围0~1");
  4203. return;
  4204. }
  4205. }
  4206. if (!record.dunType && record.dunType != 0) {
  4207. message.warning("请选择对应科目");
  4208. return;
  4209. }
  4210. if (record.dunType != 1) {
  4211. record.waitDay = "";
  4212. }
  4213. this.setState({
  4214. loading: true,
  4215. });
  4216. if (record.boStatus) {
  4217. $.ajax({
  4218. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4219. method: "post",
  4220. data: {
  4221. orderNo: record.orderNo,
  4222. ctid: record.ctid,
  4223. projectType: record.sort,
  4224. dunType: record.dunType,
  4225. appropriationRatio: record.appropriationRatio,
  4226. waitDay: record.waitDay,
  4227. effectiveCount: record.effectiveCount,
  4228. cid: this.state.changeId, //变更ID
  4229. customizeTimes:
  4230. record.dunType == 0 ? record.customizeTimes : undefined,
  4231. customizeName:
  4232. record.dunType == 0 ? record.customizeName : undefined,
  4233. },
  4234. }).done(
  4235. function (data) {
  4236. this.setState({
  4237. loading: false,
  4238. });
  4239. if (!data.error.length) {
  4240. message.success("保存成功!");
  4241. this.setState({
  4242. cuiFlag: false,
  4243. boFlag: false,
  4244. addFlag: false,
  4245. });
  4246. this.cuiList();
  4247. } else {
  4248. message.warning(data.error[0].message);
  4249. }
  4250. }.bind(this)
  4251. );
  4252. } else {
  4253. $.ajax({
  4254. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4255. method: "post",
  4256. data: {
  4257. orderNo: record.orderNo,
  4258. ctid: record.ctid,
  4259. projectType: record.sort,
  4260. dunType: record.dunType,
  4261. money: record.money,
  4262. waitDay: record.waitDay,
  4263. effectiveCount: record.effectiveCount,
  4264. cid: this.state.changeId, //变更ID
  4265. customizeTimes:
  4266. record.dunType == 0 ? record.customizeTimes : undefined,
  4267. customizeName:
  4268. record.dunType == 0 ? record.customizeName : undefined,
  4269. },
  4270. }).done(
  4271. function (data) {
  4272. this.setState({
  4273. loading: false,
  4274. });
  4275. if (!data.error.length) {
  4276. message.success("保存成功!");
  4277. this.setState({
  4278. cuiFlag: false,
  4279. boFlag: false,
  4280. addFlag: false,
  4281. });
  4282. this.cuiList();
  4283. } else {
  4284. message.warning(data.error[0].message);
  4285. }
  4286. }.bind(this)
  4287. );
  4288. }
  4289. },
  4290. submitChange() {
  4291. if (
  4292. this.state.typeChange == undefined ||
  4293. (this.state.typeChange == "" && this.state.typeChange != 0)
  4294. ) {
  4295. message.warning("请选择变更类型");
  4296. return false;
  4297. }
  4298. if (
  4299. this.state.typeChange == 0 ||
  4300. this.state.typeChange == 1 ||
  4301. this.state.typeChange == 3
  4302. ) {
  4303. if (this.state.settlementAmount < this.state.changeAmount) {
  4304. message.warning("退款金额大于已收款金额");
  4305. return;
  4306. }
  4307. }
  4308. if (this.state.processStatus != 5 && this.state.processStatus != 6) {
  4309. message.warning("当前订单流程不能发起变更!");
  4310. return false;
  4311. }
  4312. if (this.state.changeAmount === "") {
  4313. message.warning("申请退款金额不能为空!");
  4314. return false;
  4315. }
  4316. if (this.state.remarksC == "") {
  4317. message.warning("请正确填写变更原因");
  4318. return false;
  4319. }
  4320. if (this.state.startRemarks == "") {
  4321. message.warning("请正确填写备注信息");
  4322. return false;
  4323. }
  4324. let theorgCodeUrl = [];
  4325. if (this.state.voucherUrl.length) {
  4326. let picArr = [];
  4327. this.state.voucherUrl.map(function (item) {
  4328. if (
  4329. item.response &&
  4330. item.response.data &&
  4331. item.response.data.length
  4332. ) {
  4333. picArr.push(item.response.data);
  4334. }
  4335. });
  4336. theorgCodeUrl = picArr.join(",");
  4337. }
  4338. let newContractUrl = [];
  4339. if (this.state.newContractUrl.length) {
  4340. let cArr = [];
  4341. this.state.newContractUrl.map(function (item) {
  4342. if (
  4343. item.response &&
  4344. item.response.data &&
  4345. item.response.data.length
  4346. ) {
  4347. cArr.push(item.response.data);
  4348. }
  4349. });
  4350. newContractUrl = cArr.join(",");
  4351. }
  4352. if (this.state.isNew && newContractUrl.length == 0) {
  4353. message.warning("请上传新合同扫描件!");
  4354. return
  4355. }
  4356. this.setState({
  4357. loading: true,
  4358. });
  4359. $.ajax({
  4360. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  4361. method: "post",
  4362. data: {
  4363. id: this.state.changeId,
  4364. changeType: 0,
  4365. orderNo: this.state.orderNo, //订单编号
  4366. processState: 0,
  4367. startRemarks: this.state.startRemarks,
  4368. remarks: this.state.remarksC,
  4369. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  4370. totalAmount: this.state.totalAmount,
  4371. settlementAmount: this.state.settlementAmount,
  4372. changeAmount: this.state.changeAmount,
  4373. applicant: this.state.salesmanName,
  4374. depName: this.state.depName,
  4375. type: this.state.typeChange,
  4376. contractPictureUrl: this.state.isNew
  4377. ? newContractUrl : undefined,//合同替换件
  4378. },
  4379. }).done(
  4380. function (data) {
  4381. if (!data.error.length) {
  4382. this.setState({
  4383. loading: false,
  4384. });
  4385. message.success("发起变更成功");
  4386. this.handleCancelclose();
  4387. } else {
  4388. message.warning(data.error[0].message);
  4389. this.setState({
  4390. loading: false,
  4391. });
  4392. }
  4393. }.bind(this)
  4394. );
  4395. },
  4396. editCui(record) {
  4397. this.setState({
  4398. editCuiVisible: true,
  4399. editCuiMoney: record.appropriationRatio
  4400. ? record.appropriationRatio
  4401. : record.money,
  4402. appropriationRatio: record.appropriationRatio,
  4403. editCuiTid: record.tid,
  4404. editCuiDid: record.did,
  4405. editCuiId: record.id,
  4406. });
  4407. },
  4408. editPro(record) {
  4409. this.setState({
  4410. editProVisible: true,
  4411. dataInfor: record,
  4412. newData: this.state.proDataSource,
  4413. });
  4414. // this.setState({
  4415. // editProVisible: true,
  4416. // editSplitStatus: record.splitStatus,
  4417. // editProMoney: record.commodityPrice,
  4418. // editProCommodityQuantity: record.commodityQuantity,
  4419. // editProTid: record.tid,
  4420. // editProId: record.id,
  4421. // });
  4422. },
  4423. submitEditCui(type) {
  4424. if (isNaN(parseFloat(this.state.editCuiMoney))) {
  4425. if (type === 1) {
  4426. message.warn("请输入比例");
  4427. } else {
  4428. message.warn("请输入金额");
  4429. }
  4430. return;
  4431. }
  4432. this.setState({
  4433. loading: true,
  4434. });
  4435. let data = {
  4436. id: this.state.editCuiId,
  4437. type: this.state.editCuiTid ? 2 : 1,
  4438. tid: this.state.editCuiTid,
  4439. };
  4440. if (type === 1) {
  4441. data.appropriationRatio = this.state.editCuiMoney;
  4442. } else {
  4443. data.money = this.state.editCuiMoney;
  4444. }
  4445. $.ajax({
  4446. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4447. method: "post",
  4448. data,
  4449. }).done(
  4450. function (data) {
  4451. this.setState({
  4452. loading: false,
  4453. });
  4454. if (!data.error.length) {
  4455. message.success("修改成功!");
  4456. this.cuiList();
  4457. this.proList();
  4458. this.setState({
  4459. editCuiVisible: false,
  4460. });
  4461. } else {
  4462. message.warning(data.error[0].message);
  4463. }
  4464. }.bind(this)
  4465. );
  4466. },
  4467. submitEditPro() {
  4468. this.setState({
  4469. loading: true,
  4470. });
  4471. $.ajax({
  4472. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4473. method: "post",
  4474. data: {
  4475. id: this.state.editProId,
  4476. type: this.state.editProTid ? 2 : 1,
  4477. commodityPrice: this.state.editProMoney,
  4478. commodityQuantity: this.state.editProCommodityQuantity,
  4479. tid: this.state.editProTid,
  4480. },
  4481. }).done(
  4482. function (data) {
  4483. this.setState({
  4484. loading: false,
  4485. });
  4486. if (!data.error.length) {
  4487. message.success("修改成功!");
  4488. this.cuiList();
  4489. this.proList();
  4490. this.setState({
  4491. editProVisible: false,
  4492. });
  4493. } else {
  4494. message.warning(data.error[0].message);
  4495. }
  4496. }.bind(this)
  4497. );
  4498. },
  4499. downImg() {
  4500. let num = 0;
  4501. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4502. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4503. num = i;
  4504. }
  4505. }
  4506. if (num == this.state.orgCodeUrl.length - 1) {
  4507. return message.warning("已经是最后一张了哦");
  4508. }
  4509. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  4510. this.setState({
  4511. previewImage: this.state.previewImage,
  4512. rotateDeg: 0,
  4513. });
  4514. },
  4515. upImg() {
  4516. let num = 0;
  4517. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4518. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4519. num = i;
  4520. }
  4521. }
  4522. if (num == 0) {
  4523. return message.warning("已经是第一张了哦");
  4524. }
  4525. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  4526. this.setState({
  4527. previewImage: this.state.previewImage,
  4528. rotateDeg: 0,
  4529. });
  4530. },
  4531. rotate() {
  4532. let rotateDeg = this.state.rotateDeg + 90;
  4533. this.setState({
  4534. rotateDeg,
  4535. });
  4536. },
  4537. downImgs() {
  4538. let num = 0;
  4539. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4540. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4541. num = i;
  4542. }
  4543. }
  4544. if (num == this.state.replenishUrl.length - 1) {
  4545. return message.warning("已经是最后一张了哦");
  4546. }
  4547. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  4548. this.setState({
  4549. previewImage: this.state.previewImage,
  4550. rotateDeg: 0,
  4551. });
  4552. },
  4553. upImgs() {
  4554. let num = 0;
  4555. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4556. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4557. num = i;
  4558. }
  4559. }
  4560. if (num == 0) {
  4561. return message.warning("已经是第一张了哦");
  4562. }
  4563. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  4564. this.setState({
  4565. previewImage: this.state.previewImage,
  4566. rotateDeg: 0,
  4567. });
  4568. },
  4569. rotates() {
  4570. let rotateDeg = this.state.rotateDeg + 90;
  4571. this.setState({
  4572. rotateDeg,
  4573. });
  4574. },
  4575. downImgCont() {
  4576. let num = 0;
  4577. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4578. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4579. num = i;
  4580. }
  4581. }
  4582. if (num == this.state.replenishUrl.length - 1) {
  4583. return message.warning("已经是最后一张了哦");
  4584. }
  4585. this.state.previewImage = this.state.contentUrl[num + 1].url;
  4586. this.setState({
  4587. previewImage: this.state.previewImage,
  4588. rotateDeg: 0,
  4589. });
  4590. },
  4591. upImgCont() {
  4592. let num = 0;
  4593. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4594. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4595. num = i;
  4596. }
  4597. }
  4598. if (num == 0) {
  4599. return message.warning("已经是第一张了哦");
  4600. }
  4601. this.state.previewImage = this.state.contentUrl[num - 1].url;
  4602. this.setState({
  4603. previewImage: this.state.previewImage,
  4604. rotateDeg: 0,
  4605. });
  4606. },
  4607. rotateCont() {
  4608. let rotateDeg = this.state.rotateDeg + 90;
  4609. this.setState({
  4610. rotateDeg,
  4611. });
  4612. },
  4613. showConfirmChange(fn, record) {
  4614. confirm({
  4615. title: "确定取消本次变更吗?",
  4616. content: (
  4617. <span style={{ color: "red" }}>取消后本次变更将作废!!!</span>
  4618. ),
  4619. onOk() {
  4620. fn();
  4621. },
  4622. onCancel() { },
  4623. });
  4624. },
  4625. deleteChange() {
  4626. this.setState({
  4627. loading: true,
  4628. });
  4629. $.ajax({
  4630. url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
  4631. method: "post",
  4632. data: {
  4633. id: this.state.changeId,
  4634. status: this.state.status,
  4635. processState: this.state.processState,
  4636. orderNo: this.state.orderNo,
  4637. },
  4638. }).done(
  4639. function (data) {
  4640. this.setState({
  4641. loading: false,
  4642. });
  4643. if (!data.error.length) {
  4644. message.success("取消成功!");
  4645. this.handleCancelclose();
  4646. } else {
  4647. message.warning(data.error[0].message);
  4648. }
  4649. }.bind(this)
  4650. );
  4651. },
  4652. // 新增协单人员
  4653. submitOrder() {
  4654. if (!this.state.coor) {
  4655. message.warning("请选择协单人员");
  4656. return;
  4657. }
  4658. this.setState({
  4659. loading: true,
  4660. });
  4661. $.ajax({
  4662. method: "post",
  4663. dataType: "json",
  4664. crossDomain: false,
  4665. url: globalConfig.context + "/api/admin/newOrder/addAssist",
  4666. data: {
  4667. orderNo: this.state.orderNo,
  4668. aid: this.state.coor,
  4669. },
  4670. success: function (data) {
  4671. if (data.error.length) {
  4672. this.setState({
  4673. loading: false,
  4674. });
  4675. message.warning(data.error[0].message);
  4676. } else {
  4677. this.setState({
  4678. loading: false,
  4679. coor: '',
  4680. dataSourceView: [],
  4681. coorVisible: "none",
  4682. });
  4683. this.assistList();
  4684. message.success("添加成功");
  4685. }
  4686. }.bind(this),
  4687. }).always(
  4688. function () {
  4689. this.setState({
  4690. loading: false,
  4691. });
  4692. }.bind(this)
  4693. );
  4694. },
  4695. // // 删除协单人员
  4696. // onClosable(id) {
  4697. // $.ajax({
  4698. // method: "post",
  4699. // dataType: "json",
  4700. // crossDomain: false,
  4701. // url: globalConfig.context + "/api/admin/newOrder/deleteAssist",
  4702. // data: {
  4703. // id: id,
  4704. // },
  4705. // success: function (data) {
  4706. // if (!data.error.length) {
  4707. // message.warning(data.error[0].message);
  4708. // } else {
  4709. // message.success("删除成功");
  4710. // }
  4711. // }.bind(this),
  4712. // }).always(
  4713. // function () {
  4714. // this.setState({
  4715. // loading: false,
  4716. // });
  4717. // }.bind(this)
  4718. // );
  4719. // },
  4720. // 新增上门服务数据
  4721. submitView() {
  4722. if (!this.state.dateView) {
  4723. message.warning("请选择上门日期");
  4724. return;
  4725. } else if (!this.state.contentView) {
  4726. message.warning("请填写服务内容");
  4727. return;
  4728. }
  4729. this.setState({
  4730. loading: true,
  4731. });
  4732. $.ajax({
  4733. method: "post",
  4734. dataType: "json",
  4735. crossDomain: false,
  4736. url: globalConfig.context + "/api/admin/newOrder/addOrderService",
  4737. data: {
  4738. orderNo: this.state.orderNo,
  4739. serviceTimes: this.state.dateView,
  4740. content: this.state.contentView,
  4741. remarks: this.state.remarksView,
  4742. },
  4743. success: function (data) {
  4744. if (data.error.length) {
  4745. this.setState({
  4746. loading: false,
  4747. });
  4748. message.warning(data.error[0].message);
  4749. } else {
  4750. this.setState({
  4751. loading: false,
  4752. modalView: false,
  4753. viewKey: this.state.viewKey + 1,
  4754. dateView: '',
  4755. contentView: '',
  4756. remarksView: '',
  4757. contentViewLength: 0,
  4758. contentViewLength1: 0,
  4759. });
  4760. message.success("添加成功");
  4761. this.orderServiceList();
  4762. }
  4763. }.bind(this),
  4764. }).always(
  4765. function () {
  4766. this.setState({
  4767. loading: false,
  4768. });
  4769. }.bind(this)
  4770. );
  4771. },
  4772. //获取上门人员
  4773. assistList(record) {
  4774. this.state.orderList = [];
  4775. $.ajax({
  4776. method: "get",
  4777. dataType: "json",
  4778. crossDomain: false,
  4779. url: globalConfig.context + "/api/admin/newOrder/assistList",
  4780. data: {
  4781. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4782. },
  4783. success: function (data) {
  4784. if (data.error.length) {
  4785. this.setState({
  4786. loading: false,
  4787. });
  4788. message.warning(data.error[0].message);
  4789. } else {
  4790. this.setState({
  4791. personnel: data.data,
  4792. });
  4793. // message.success("添加成功");
  4794. }
  4795. }.bind(this),
  4796. }).always(
  4797. function () {
  4798. this.setState({
  4799. loading: false,
  4800. });
  4801. }.bind(this)
  4802. );
  4803. },
  4804. // 上门服务列表
  4805. orderServiceList(record) {
  4806. $.ajax({
  4807. method: "get",
  4808. dataType: "json",
  4809. crossDomain: false,
  4810. url: globalConfig.context + "/api/admin/newOrder/orderServiceList",
  4811. data: {
  4812. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4813. },
  4814. success: function (data) {
  4815. if (data.error.length) {
  4816. this.setState({
  4817. loading: false,
  4818. });
  4819. message.warning(data.error[0].message);
  4820. } else {
  4821. this.setState({
  4822. dataView: data.data,
  4823. });
  4824. // message.success("添加成功");
  4825. }
  4826. }.bind(this),
  4827. }).always(
  4828. function () {
  4829. this.setState({
  4830. loading: false,
  4831. });
  4832. }.bind(this)
  4833. );
  4834. },
  4835. // 删除上门服务列表
  4836. delectView(record) {
  4837. $.ajax({
  4838. method: "POST",
  4839. dataType: "json",
  4840. crossDomain: false,
  4841. url: globalConfig.context + "/api/admin/newOrder/deleteOrderService",
  4842. data: {
  4843. id: record.id,
  4844. },
  4845. success: function (data) {
  4846. if (data.error.length) {
  4847. this.setState({
  4848. loading: false,
  4849. });
  4850. message.warning(data.error[0].message);
  4851. } else {
  4852. // this.setState({
  4853. // publicView: data.data,
  4854. // });
  4855. this.orderServiceList();
  4856. message.success("删除成功");
  4857. }
  4858. }.bind(this),
  4859. }).always(
  4860. function () {
  4861. this.setState({
  4862. loading: false,
  4863. });
  4864. }.bind(this)
  4865. );
  4866. },
  4867. // 上门查看
  4868. publicByOrder() {
  4869. $.ajax({
  4870. method: "get",
  4871. dataType: "json",
  4872. crossDomain: false,
  4873. url: globalConfig.context + "/api/admin/release/publicByOrder",
  4874. data: {
  4875. orderNo: this.state.orderNo,
  4876. },
  4877. success: function (data) {
  4878. if (data.error.length) {
  4879. this.setState({
  4880. loading: false,
  4881. });
  4882. message.warning(data.error[0].message);
  4883. } else {
  4884. this.setState({
  4885. publicView: data.data,
  4886. });
  4887. // message.success("添加成功");
  4888. }
  4889. }.bind(this),
  4890. }).always(
  4891. function () {
  4892. this.setState({
  4893. loading: false,
  4894. });
  4895. }.bind(this)
  4896. );
  4897. },
  4898. // 获取动态数据名称
  4899. handleSearch(value) {
  4900. $.ajax({
  4901. method: "get",
  4902. dataType: "json",
  4903. crossDomain: false,
  4904. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  4905. data: {
  4906. adminName: value,
  4907. },
  4908. success: function (data) {
  4909. if (data.error.length) {
  4910. this.setState({
  4911. loading: false,
  4912. });
  4913. message.warning(data.error[0].message);
  4914. } else {
  4915. this.setState({
  4916. dataSourceView: data.data,
  4917. });
  4918. // message.success("添加成功");
  4919. }
  4920. }.bind(this),
  4921. }).always(
  4922. function () {
  4923. this.setState({
  4924. loading: false,
  4925. });
  4926. }.bind(this)
  4927. );
  4928. },
  4929. //
  4930. onSelectView(v, o) {
  4931. this.setState({
  4932. coor: v,
  4933. });
  4934. },
  4935. //
  4936. handleClose(removedTag) {
  4937. let serviceLife = this.state.serviceLife.filter(tag => { return tag !== removedTag });
  4938. this.setState({ serviceLife, serviceYear: undefined });
  4939. },
  4940. render() {
  4941. const expandedRowRender = (e) => {
  4942. const data = e.list;
  4943. if (e.cSort != 6) {
  4944. let columns = [];
  4945. if (data instanceof Array && data.length) {
  4946. columns = [
  4947. {
  4948. title: "变更状态",
  4949. dataIndex: "type",
  4950. key: "type",
  4951. render: (text, record) => {
  4952. let str = "";
  4953. let color = "";
  4954. if (text == 1) {
  4955. str = "增";
  4956. color = "#87d068";
  4957. } else if (text == 2) {
  4958. str = "改";
  4959. color = "#108ee9";
  4960. } else if (text == 3) {
  4961. str = "删";
  4962. color = "#f50";
  4963. }
  4964. return (
  4965. <span>
  4966. <Tag
  4967. color={color}
  4968. style={{ display: text == 0 ? "none" : "inline-block" }}
  4969. >
  4970. {str}
  4971. </Tag>
  4972. {/* {record.splitStatus == 1 ? (
  4973. <Tag
  4974. color="#108ee9"
  4975. // onClick={e => {
  4976. // e.stopPropagation();
  4977. // this.showRes(record);
  4978. // }}
  4979. >
  4980. 父项目
  4981. </Tag>
  4982. ) : (
  4983. ""
  4984. )}
  4985. {record.splitStatus == 2 ? (
  4986. <Tag
  4987. color="#108ee9"
  4988. // onClick={e => {
  4989. // e.stopPropagation();
  4990. // this.showRes(record);
  4991. // }}
  4992. >
  4993. 子项目
  4994. </Tag>
  4995. ) : (
  4996. ""
  4997. )} */}
  4998. </span>
  4999. );
  5000. },
  5001. },
  5002. {
  5003. title: "业务项目名称",
  5004. dataIndex: "commodityName",
  5005. key: "commodityName",
  5006. render: (text, record) => {
  5007. return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
  5008. }
  5009. },
  5010. {
  5011. title: "项目类别",
  5012. dataIndex: "cname",
  5013. key: "cname",
  5014. },
  5015. {
  5016. title: "项目数量",
  5017. dataIndex: "commodityQuantity",
  5018. key: "commodityQuantity",
  5019. width: 50,
  5020. },
  5021. {
  5022. title: "金额(万元)",
  5023. dataIndex: "commodityPrice",
  5024. key: "commodityPrice",
  5025. width: 50,
  5026. render: (text, record) => {
  5027. if (record.splitStatus == 2) {
  5028. return "/";
  5029. } else {
  5030. return text;
  5031. }
  5032. },
  5033. },
  5034. {
  5035. title: "主要项目",
  5036. dataIndex: "main",
  5037. key: "main",
  5038. width: 50,
  5039. render: (text) => {
  5040. return text ? "是" : "否";
  5041. },
  5042. },
  5043. {
  5044. title: "项目负责人",
  5045. dataIndex: "receiverName",
  5046. key: "receiverName",
  5047. },
  5048. {
  5049. title: "项目说明",
  5050. dataIndex: "taskComment",
  5051. key: "taskComment",
  5052. render: (text) => {
  5053. return (
  5054. <Tooltip title={text}>
  5055. <div
  5056. style={{
  5057. width: 100,
  5058. overflow: "hidden",
  5059. whiteSpace: "nowrap",
  5060. textOverflow: "ellipsis",
  5061. }}
  5062. >{text}</div>
  5063. </Tooltip>
  5064. )
  5065. },
  5066. },
  5067. {
  5068. title: "操作",
  5069. dataIndex: "ABC",
  5070. key: "ABC",
  5071. render: (text, record) => {
  5072. return (
  5073. <div>
  5074. <Button
  5075. onClick={(e) => {
  5076. e.stopPropagation();
  5077. this.showConfirm(this.changeDeletePro, record);
  5078. }}
  5079. disabled={this.state.listFlag}
  5080. style={{
  5081. display: this.state.displayList ? "none" : "block",
  5082. }}
  5083. >
  5084. 删除
  5085. </Button>
  5086. </div>
  5087. );
  5088. },
  5089. },
  5090. ];
  5091. return (
  5092. <Table
  5093. columns={columns}
  5094. scroll={{ x: "max-content", y: 0 }}
  5095. dataSource={data}
  5096. pagination={false}
  5097. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  5098. />
  5099. );
  5100. } else {
  5101. columns = [];
  5102. return (
  5103. <p
  5104. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5105. >
  5106. 此项目暂未拆分
  5107. </p>
  5108. );
  5109. }
  5110. } else {
  5111. let columns = [];
  5112. if (data instanceof Array && data.length) {
  5113. columns = [
  5114. {
  5115. title: "变更状态",
  5116. dataIndex: "type",
  5117. key: "type",
  5118. render: (text, record) => {
  5119. let str = "";
  5120. let color = "";
  5121. if (text == 1) {
  5122. str = "增";
  5123. color = "#87d068";
  5124. } else if (text == 2) {
  5125. str = "改";
  5126. color = "#108ee9";
  5127. } else if (text == 3) {
  5128. str = "删";
  5129. color = "#f50";
  5130. }
  5131. return (
  5132. <span>
  5133. <Tag
  5134. color={color}
  5135. style={{ display: text == 0 ? "none" : "inline-block" }}
  5136. >
  5137. {str}
  5138. </Tag>
  5139. {/* {record.splitStatus == 1 ? (
  5140. <Tag
  5141. color="#108ee9"
  5142. >
  5143. 父项目
  5144. </Tag>
  5145. ) : (
  5146. ""
  5147. )}
  5148. {record.splitStatus == 2 ? (
  5149. <Tag
  5150. color="#108ee9"
  5151. >
  5152. 子项目
  5153. </Tag>
  5154. ) : (
  5155. ""
  5156. )} */}
  5157. </span>
  5158. );
  5159. },
  5160. },
  5161. {
  5162. title: "负责人",
  5163. dataIndex: "receiverName",
  5164. key: "receiverName",
  5165. },
  5166. {
  5167. title: "负责人电话",
  5168. dataIndex: "receiverMobile",
  5169. key: "receiverMobile",
  5170. },
  5171. {
  5172. title: "项目状态",
  5173. dataIndex: "projectStatus",
  5174. key: "projectStatus",
  5175. render: (text) => {
  5176. return getProjectName(text);
  5177. },
  5178. },
  5179. {
  5180. title: "本次派单",
  5181. dataIndex: "serviceYear",
  5182. key: "serviceYear",
  5183. },
  5184. {
  5185. title: "项目说明",
  5186. dataIndex: "taskComment",
  5187. key: "taskComment",
  5188. render: (text) => {
  5189. return (
  5190. <Tooltip title={text}>
  5191. <div
  5192. // style={{
  5193. // width: 100,
  5194. // overflow: "hidden",
  5195. // whiteSpace: "nowrap",
  5196. // textOverflow: "ellipsis",
  5197. // }}
  5198. >{text}</div>
  5199. </Tooltip>
  5200. )
  5201. },
  5202. },
  5203. ];
  5204. return (
  5205. <Table
  5206. columns={columns}
  5207. dataSource={data}
  5208. pagination={false}
  5209. />
  5210. );
  5211. } else {
  5212. columns = [];
  5213. return (
  5214. <p
  5215. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5216. >
  5217. 暂无派单
  5218. </p>
  5219. );
  5220. }
  5221. }
  5222. };
  5223. const expandedRowRenderDetail = (e) => {
  5224. const data = e.list;
  5225. let columns = [];
  5226. if (data instanceof Array && data.length) {
  5227. if (e.cSort == 6) {
  5228. columns = [
  5229. {
  5230. title: "变更状态",
  5231. dataIndex: "type",
  5232. key: "type",
  5233. render: (text, record) => {
  5234. let str = "";
  5235. let color = "";
  5236. if (text == 1) {
  5237. str = "增";
  5238. color = "#87d068";
  5239. } else if (text == 2) {
  5240. str = "改";
  5241. color = "#108ee9";
  5242. } else if (text == 3) {
  5243. str = "删";
  5244. color = "#f50";
  5245. }
  5246. return (
  5247. <span>
  5248. <Tag
  5249. color={color}
  5250. style={{ display: text == 0 ? "none" : "inline-block" }}
  5251. >
  5252. {str}
  5253. </Tag>
  5254. {/* {record.splitStatus == 1 ? (
  5255. <Tag
  5256. color="#108ee9"
  5257. // onClick={e => {
  5258. // e.stopPropagation();
  5259. // this.showRes(record);
  5260. // }}
  5261. >
  5262. 父项目
  5263. </Tag>
  5264. ) : (
  5265. ""
  5266. )}
  5267. {record.splitStatus == 2 ? (
  5268. <Tag
  5269. color="#108ee9"
  5270. // onClick={e => {
  5271. // e.stopPropagation();
  5272. // this.showRes(record);
  5273. // }}
  5274. >
  5275. 子项目
  5276. </Tag>
  5277. ) : (
  5278. ""
  5279. )} */}
  5280. </span>
  5281. );
  5282. },
  5283. },
  5284. {
  5285. title: "负责人",
  5286. dataIndex: "receiverName",
  5287. key: "receiverName",
  5288. },
  5289. {
  5290. title: "负责人电话",
  5291. dataIndex: "receiverMobile",
  5292. key: "receiverMobile",
  5293. },
  5294. {
  5295. title: "项目状态",
  5296. dataIndex: "projectStatus",
  5297. key: "projectStatus",
  5298. render: (text) => {
  5299. return getProjectName(text);
  5300. },
  5301. },
  5302. {
  5303. title: "本次派单",
  5304. dataIndex: "serviceYear",
  5305. key: "serviceYear",
  5306. },
  5307. {
  5308. title: "项目说明",
  5309. dataIndex: "taskComment",
  5310. key: "taskComment",
  5311. render: (text) => {
  5312. return (
  5313. <Tooltip title={text}>
  5314. <div
  5315. // style={{
  5316. // width: 100,
  5317. // overflow: "hidden",
  5318. // whiteSpace: "nowrap",
  5319. // textOverflow: "ellipsis",
  5320. // }}
  5321. >{text}</div>
  5322. </Tooltip>
  5323. )
  5324. },
  5325. },
  5326. ];
  5327. } else {
  5328. columns = [
  5329. {
  5330. title: "变更状态",
  5331. dataIndex: "type",
  5332. key: "type",
  5333. render: (text, record) => {
  5334. let str = "";
  5335. let color = "";
  5336. if (text == 1) {
  5337. str = "增";
  5338. color = "#87d068";
  5339. } else if (text == 2) {
  5340. str = "改";
  5341. color = "#108ee9";
  5342. } else if (text == 3) {
  5343. str = "删";
  5344. color = "#f50";
  5345. }
  5346. return (
  5347. <span>
  5348. <Tag
  5349. color={color}
  5350. style={{ display: text == 0 ? "none" : "inline-block" }}
  5351. >
  5352. {str}
  5353. </Tag>
  5354. {/* {record.splitStatus == 1 ? (
  5355. <Tag
  5356. color="#108ee9"
  5357. // onClick={e => {
  5358. // e.stopPropagation();
  5359. // this.showRes(record);
  5360. // }}
  5361. >
  5362. 父项目
  5363. </Tag>
  5364. ) : (
  5365. ""
  5366. )}
  5367. {record.splitStatus == 2 ? (
  5368. <Tag
  5369. color="#108ee9"
  5370. // onClick={e => {
  5371. // e.stopPropagation();
  5372. // this.showRes(record);
  5373. // }}
  5374. >
  5375. 子项目
  5376. </Tag>
  5377. ) : (
  5378. ""
  5379. )} */}
  5380. </span>
  5381. );
  5382. },
  5383. },
  5384. {
  5385. title: "业务项目名称",
  5386. dataIndex: "commodityName",
  5387. key: "commodityName",
  5388. render: (text, record) => {
  5389. return (
  5390. <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
  5391. )
  5392. }
  5393. },
  5394. {
  5395. title: "项目类别",
  5396. dataIndex: "cname",
  5397. key: "cname",
  5398. },
  5399. {
  5400. title: "项目数量",
  5401. dataIndex: "commodityQuantity",
  5402. key: "commodityQuantity",
  5403. width: 50,
  5404. },
  5405. {
  5406. title: "金额(万元)",
  5407. dataIndex: "commodityPrice",
  5408. key: "commodityPrice",
  5409. width: 50,
  5410. render: (text, record) => {
  5411. if (record.splitStatus == 2) {
  5412. return "/";
  5413. } else {
  5414. return text;
  5415. }
  5416. },
  5417. },
  5418. {
  5419. title: "主要项目",
  5420. dataIndex: "main",
  5421. key: "main",
  5422. width: 50,
  5423. render: (text) => {
  5424. return text ? "是" : "否";
  5425. },
  5426. },
  5427. {
  5428. title: "项目负责人",
  5429. dataIndex: "receiverName",
  5430. key: "receiverName",
  5431. },
  5432. {
  5433. title: "项目说明",
  5434. dataIndex: "taskComment",
  5435. key: "taskComment",
  5436. render: (text) => {
  5437. return (
  5438. <Tooltip title={text}>
  5439. <div
  5440. style={{
  5441. width: 100,
  5442. overflow: "hidden",
  5443. whiteSpace: "nowrap",
  5444. textOverflow: "ellipsis",
  5445. }}
  5446. >{text}</div>
  5447. </Tooltip>
  5448. )
  5449. },
  5450. },
  5451. ];
  5452. }
  5453. return (
  5454. <Table
  5455. columns={columns}
  5456. scroll={{ x: "max-content", y: 0 }}
  5457. dataSource={data}
  5458. pagination={false}
  5459. />
  5460. );
  5461. } else {
  5462. columns = [];
  5463. return (
  5464. <p
  5465. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5466. >
  5467. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  5468. </p>
  5469. );
  5470. }
  5471. };
  5472. const expandedRowRenderVip = (e) => {
  5473. const data = e.splitList;
  5474. let columns = [];
  5475. if (data instanceof Array && data.length) {
  5476. if (e.cSort == 6) {
  5477. columns = [
  5478. {
  5479. title: "负责人",
  5480. dataIndex: "receiverName",
  5481. key: "receiverName",
  5482. },
  5483. {
  5484. title: "负责人电话",
  5485. dataIndex: "receiverMobile",
  5486. key: "receiverMobile",
  5487. },
  5488. {
  5489. title: "项目状态",
  5490. dataIndex: "projectStatus",
  5491. key: "projectStatus",
  5492. render: (text) => {
  5493. return getProjectName(text);
  5494. },
  5495. },
  5496. {
  5497. title: "本次派单",
  5498. dataIndex: "serviceYear",
  5499. key: "serviceYear",
  5500. },
  5501. {
  5502. title: "项目说明",
  5503. dataIndex: "taskComment",
  5504. key: "taskComment",
  5505. render: (text) => {
  5506. return (
  5507. <Tooltip title={text}>
  5508. <div
  5509. style={{
  5510. width: 100,
  5511. overflow: "hidden",
  5512. whiteSpace: "nowrap",
  5513. textOverflow: "ellipsis",
  5514. }}
  5515. >{text}</div>
  5516. </Tooltip>
  5517. )
  5518. },
  5519. },
  5520. ];
  5521. } else {
  5522. columns = [
  5523. {
  5524. title: "子项目名称",
  5525. dataIndex: "taskName",
  5526. key: "taskName"
  5527. },
  5528. {
  5529. title: "子项目数量",
  5530. dataIndex: "commodityQuantity",
  5531. key: "commodityQuantity"
  5532. },
  5533. {
  5534. title: "拆分操作人",
  5535. dataIndex: "splitAname",
  5536. key: "splitAname"
  5537. },
  5538. {
  5539. title: "项目负责人",
  5540. dataIndex: "receiverName",
  5541. key: "receiverName"
  5542. },
  5543. {
  5544. title: "拆分时间",
  5545. dataIndex: "splitTimes",
  5546. key: "splitTimes"
  5547. }
  5548. ]
  5549. }
  5550. return (
  5551. <Table
  5552. columns={columns}
  5553. dataSource={data}
  5554. pagination={false}
  5555. />
  5556. );
  5557. } else {
  5558. columns = [];
  5559. return (
  5560. <p
  5561. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5562. >
  5563. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  5564. </p>
  5565. );
  5566. }
  5567. };
  5568. const FormItem = Form.Item;
  5569. const { TabPane } = Tabs;
  5570. const { TextArea } = Input;
  5571. const formItemLayout = {
  5572. labelCol: { span: 8 },
  5573. wrapperCol: { span: 14 },
  5574. };
  5575. const contractData = this.state.contractData;
  5576. const formItemList = [
  5577. {
  5578. label: "企业联系人",
  5579. content: <span>{this.state.contacts}</span>,
  5580. },
  5581. {
  5582. label: "客户名称",
  5583. content: (
  5584. <span>
  5585. {this.state.userName}
  5586. <EnterpriseNameChange
  5587. type="journal"
  5588. style={{ marginLeft: 10 }}
  5589. enterpriseId={this.state.orderUid}
  5590. />
  5591. </span>
  5592. ),
  5593. },
  5594. {
  5595. label: "联系人电话",
  5596. content: <span>{this.state.contactMobile}</span>,
  5597. },
  5598. {
  5599. label: "企业法人",
  5600. content: <span>{this.state.legalPerson}</span>,
  5601. },
  5602. {
  5603. label: "法人电话",
  5604. content: <span>{this.state.legalPersonTel}</span>,
  5605. },
  5606. // {
  5607. // label: "签单金额(万元)",
  5608. // content: <span>{this.state.totalAmount}</span>
  5609. // },
  5610. // {
  5611. // label: "首付金额(万元)",
  5612. // content: <span>{this.state.firstAmount}</span>
  5613. // },
  5614. // {
  5615. // label: "特批立项",
  5616. // content: <span>{getApprovedState(this.state.approval)}</span>
  5617. // },
  5618. // {
  5619. // label: "合同签订时间",
  5620. // content: <span>{this.state.signDate}</span>
  5621. // },
  5622. // {
  5623. // label: "订单部门",
  5624. // content: <span>{this.state.depName}</span>
  5625. // }
  5626. ];
  5627. let dataSources = this.state.customerArr || [];
  5628. let cdataSources = this.state.channelArr || [];
  5629. const cuiDataList = this.state.contactList || [];
  5630. let departmentArr = this.state.departmentArr || [];
  5631. let options = this.state.states
  5632. ? dataSources.map((group) => (
  5633. <Select.Option key={group.id} value={group.name}>
  5634. {group.name}
  5635. </Select.Option>
  5636. ))
  5637. : dataSources.map((group, index) => (
  5638. <Select.Option key={index} value={group.bname}>
  5639. {group.bname}
  5640. </Select.Option>
  5641. ));
  5642. let channeloptions = cdataSources.map((group) => (
  5643. <Select.Option key={group.id} value={group.name}>
  5644. {group.name}
  5645. </Select.Option>
  5646. ));
  5647. let dataSourceView = this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
  5648. <Select.Option key={index} value={group.aid}>
  5649. {group.name}
  5650. </Select.Option>
  5651. )) : '';
  5652. let children = vipYear.map(its => (
  5653. <Option key={its}>{its}</Option>
  5654. ));
  5655. let { closable, isVip, histYear, isEdit } = this.state;
  5656. let assistList = this.assistList;
  5657. const { addPop = "" } = this.props
  5658. return (
  5659. <div>
  5660. {this.state.resVisible ? (
  5661. <ResolutionDetail
  5662. cancel={this.resCancel}
  5663. detail={this.state.resRecord}
  5664. visible={this.state.resVisible}
  5665. id={this.state.resRecord.orderNo}
  5666. />
  5667. ) : (
  5668. ""
  5669. )}
  5670. <Modal
  5671. maskClosable={false}
  5672. visible={this.state.visible}
  5673. onOk={this.handleOk}
  5674. onCancel={this.handleCancelclose}
  5675. width={!this.props.userDetaile ? "600px" : "1200px"}
  5676. title={!this.props.userDetaile ? "创建订单" : ""}
  5677. footer=""
  5678. className="admin-desc-content"
  5679. >
  5680. <Form
  5681. layout="horizontal"
  5682. onSubmit={this.handleSubmit}
  5683. style={{ paddingBottom: "40px" }}
  5684. >
  5685. <Spin spinning={this.state.loading}>
  5686. <div className="clearfix">
  5687. {
  5688. addPop == "add" &&
  5689. <div className="clearfix">
  5690. <div className="clearfix">
  5691. <FormItem {...formItemLayout} label="订单类型">
  5692. <Select
  5693. placeholder="请选择订单类型"
  5694. style={{ width: "200px" }}
  5695. value={this.state.orderType}
  5696. onChange={(e) => {
  5697. this.setState({ orderType: e });
  5698. }}
  5699. >
  5700. {orderTypes.map(function (item) {
  5701. return (
  5702. <Select.Option key={item.value}>
  5703. {item.key}
  5704. </Select.Option>
  5705. );
  5706. })}
  5707. </Select>
  5708. <span className="mandatory">*</span>
  5709. </FormItem>
  5710. </div>
  5711. <FormItem {...formItemLayout} label="客户所属类型">
  5712. <Select
  5713. placeholder="请选择客户所属类型"
  5714. style={{ width: "200px" }}
  5715. value={this.state.userType}
  5716. onChange={(e) => {
  5717. this.setState({
  5718. userType: e,
  5719. customerArr: [],
  5720. autoId: "",
  5721. customerName: "",
  5722. selectSales: undefined
  5723. });
  5724. }}
  5725. >
  5726. {customerType.map(function (item) {
  5727. return (
  5728. <Select.Option key={item.value}>
  5729. {item.key}
  5730. </Select.Option>
  5731. );
  5732. })}
  5733. </Select>
  5734. </FormItem>
  5735. <div className="clearfix">
  5736. <FormItem {...formItemLayout} label="客户名称">
  5737. <AutoComplete
  5738. className="certain-category-search"
  5739. dropdownClassName="certain-category-search-dropdown"
  5740. dropdownMatchSelectWidth={false}
  5741. dropdownStyle={{ width: 200 }}
  5742. size="large"
  5743. style={{ width: "200px" }}
  5744. dataSource={options}
  5745. placeholder="输入名称"
  5746. value={this.state.customerName}
  5747. onChange={this.customerChange}
  5748. filterOption={true}
  5749. onSelect={this.selectAutoCUT}
  5750. >
  5751. <Input />
  5752. </AutoComplete>
  5753. <span className="mandatory">*</span>
  5754. </FormItem>
  5755. </div>
  5756. <FormItem {...formItemLayout} label="销售类型">
  5757. <Select
  5758. placeholder="请选择销售类型"
  5759. style={{ width: "200px" }}
  5760. value={this.state.selectSales}
  5761. onChange={(e) => {
  5762. this.setState({
  5763. selectSales: e,
  5764. });
  5765. }}
  5766. >
  5767. {(this.state.userType == "0"
  5768. ? ssalesType : this.state.userType == "1"
  5769. ? qsalesType : []).map(function (item) {
  5770. return (
  5771. <Select.Option key={item.value} disabled={item.value == "5"}>
  5772. {item.key}
  5773. </Select.Option>
  5774. );
  5775. })}
  5776. </Select>
  5777. </FormItem>
  5778. {
  5779. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  5780. <FormItem {...formItemLayout} label="描述">
  5781. <TextArea
  5782. placeholder="请填写描述"
  5783. style={{ width: 300, height: 80 }}
  5784. onChange={(e) => {
  5785. this.setState({
  5786. other: e.target.value
  5787. })
  5788. }}
  5789. />
  5790. </FormItem>
  5791. }
  5792. {
  5793. this.state.selectSales == "3" &&
  5794. <div className="clearfix">
  5795. <FormItem {...formItemLayout} label="渠道名称">
  5796. <AutoComplete
  5797. className="certain-category-search"
  5798. dropdownClassName="certain-category-search-dropdown"
  5799. dropdownMatchSelectWidth={false}
  5800. dropdownStyle={{ width: 200 }}
  5801. size="large"
  5802. style={{ width: "200px" }}
  5803. dataSource={channeloptions}
  5804. placeholder="请输入渠道关键字"
  5805. value={this.state.channelName}
  5806. onChange={this.channelChange}
  5807. filterOption={true}
  5808. onSelect={this.goSelect}
  5809. >
  5810. <Input />
  5811. </AutoComplete>
  5812. <span className="mandatory">*</span>
  5813. </FormItem>
  5814. </div>
  5815. }
  5816. <div className="addSave" style={{ marginTop: "15px" }}>
  5817. <Button
  5818. className="cancel"
  5819. type="primary"
  5820. // onClick={this.handleCancel}
  5821. style={{ marginLeft: "150px" }}
  5822. htmlType="submit"
  5823. >
  5824. 开单
  5825. </Button>
  5826. <Button
  5827. className="cancel"
  5828. type="ghost"
  5829. onClick={this.handleCancelclose}
  5830. style={{ marginLeft: "50px" }}
  5831. >
  5832. 取消
  5833. </Button>
  5834. </div>
  5835. </div>
  5836. }
  5837. {
  5838. addPop == "edit" &&
  5839. <Tabs
  5840. onChange={this.callback}
  5841. activeKey={this.state.activeKey}
  5842. tabBarExtraContent={
  5843. <div
  5844. style={{ fontWeight: "bold", paddingRight: "15px" }}
  5845. >
  5846. <OrderItemStatus deleteSign={this.state.deleteSign} />
  5847. </div>
  5848. }
  5849. >
  5850. <TabPane tab={"最新订单"} key="1">
  5851. <div className="clearfix">
  5852. <div className="clearfix">
  5853. <FormItem
  5854. className="half-item"
  5855. {...formItemLayout}
  5856. label="合同编号"
  5857. >
  5858. {<span>{this.state.contractNo}</span>}
  5859. </FormItem>
  5860. <FormItem
  5861. className="half-item"
  5862. {...formItemLayout}
  5863. label="订单编号"
  5864. >
  5865. <span>{this.state.orderNo}</span>
  5866. </FormItem>
  5867. <FormItem
  5868. className="half-item"
  5869. {...formItemLayout}
  5870. label="流程状态"
  5871. >
  5872. <span>
  5873. {getProcessStatus(this.state.processStatus)}
  5874. </span>
  5875. </FormItem>
  5876. <FormItem
  5877. className="half-item"
  5878. {...formItemLayout}
  5879. label="销售类型"
  5880. >
  5881. <span>
  5882. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  5883. (salesList[this.state.updatas.salesType] || "")}
  5884. </span>
  5885. {
  5886. this.state.processStatus === 0 &&
  5887. <UpdateSales
  5888. orderNo={this.state.orderNo}
  5889. updatas={this.state.updatas}
  5890. onRefresh={
  5891. e => {
  5892. let ups = this.state.updatas
  5893. ups.salesType = e.salesType
  5894. if (e.salesType == "3") {
  5895. ups.channelId = e.channelId
  5896. ups.other = e.other
  5897. } else if (e.salesType == "4" || e.salesType == "5") {
  5898. ups.other = e.other
  5899. }
  5900. this.setState({
  5901. updatas: ups,
  5902. userType: ups.userType
  5903. })
  5904. }
  5905. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  5906. }
  5907. />
  5908. }
  5909. </FormItem>
  5910. <FormItem
  5911. className="half-item"
  5912. {...formItemLayout}
  5913. label="结算状态"
  5914. >
  5915. <span>
  5916. {getLiquidationStatus(
  5917. this.state.liquidationStatus
  5918. )}
  5919. </span>
  5920. </FormItem>
  5921. {this.state.processStatus === 0 ? (
  5922. <div className="clearfix">
  5923. <FormItem
  5924. className="half-item"
  5925. {...formItemLayout}
  5926. label="特批立项"
  5927. >
  5928. <Select
  5929. placeholder="请选择客户所属类型"
  5930. style={{ width: "240px" }}
  5931. value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
  5932. }
  5933. onChange={(e) => {
  5934. this.setState({ approval: e });
  5935. }}
  5936. >
  5937. <Select.Option key={0}>非特批</Select.Option>
  5938. <Select.Option key={1}>特批</Select.Option>
  5939. </Select>
  5940. </FormItem>
  5941. <FormItem
  5942. className="half-item"
  5943. {...formItemLayout}
  5944. label={
  5945. <span>
  5946. <strong style={{ color: "#f00" }}>*</strong>
  5947. 合同签订时间
  5948. </span>
  5949. }
  5950. >
  5951. <DatePicker
  5952. className="signDateRef"
  5953. style={{
  5954. marginTop: "2px",
  5955. // width: "240px",
  5956. height: "27px",
  5957. }}
  5958. showTime
  5959. format="YYYY-MM-DD"
  5960. onOk={() => { }}
  5961. value={
  5962. this.state.signDate
  5963. ? moment(this.state.signDate)
  5964. : null
  5965. }
  5966. onChange={(data, dataString) => {
  5967. this.setState({ signDate: dataString });
  5968. }}
  5969. />
  5970. </FormItem>
  5971. <FormItem
  5972. className="half-item"
  5973. {...formItemLayout}
  5974. label="订单部门"
  5975. >
  5976. <Select
  5977. placeholder="请选择订单部门"
  5978. style={{ width: 240 }}
  5979. value={this.state.organizationSearch}
  5980. onChange={(e) => {
  5981. this.setState({ organizationSearch: e });
  5982. }}
  5983. >
  5984. {departmentArr.map(function (item) {
  5985. return (
  5986. <Select.Option key={item.id}>
  5987. {item.name}
  5988. </Select.Option>
  5989. );
  5990. })}
  5991. </Select>
  5992. </FormItem>
  5993. </div>
  5994. ) : (
  5995. <div className="clearfix">
  5996. <FormItem
  5997. className="half-item"
  5998. {...formItemLayout}
  5999. label="特批立项"
  6000. >
  6001. <span>
  6002. {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
  6003. {getApprovedState(this.state.approval)}
  6004. </span>
  6005. </FormItem>
  6006. <FormItem
  6007. className="half-item"
  6008. {...formItemLayout}
  6009. label="合同签订时间"
  6010. >
  6011. <span>{this.state.signDate}</span>
  6012. </FormItem>
  6013. <FormItem
  6014. className="half-item"
  6015. {...formItemLayout}
  6016. label="订单部门"
  6017. >
  6018. <span>{this.state.depName}</span>
  6019. </FormItem>
  6020. <FormItem
  6021. className="half-item"
  6022. {...formItemLayout}
  6023. label="是否外包"
  6024. >
  6025. <span>
  6026. {this.state.outsource == 0 ? "否" : "是"}
  6027. </span>
  6028. </FormItem>
  6029. </div>
  6030. )}
  6031. </div>
  6032. <h3
  6033. style={{
  6034. marginLeft: 10,
  6035. fontWeight: 800,
  6036. marginBottom: 10,
  6037. }}
  6038. >
  6039. 收款项目
  6040. </h3>
  6041. {this.state.processStatus === 0 ? (
  6042. <div className="clearfix">
  6043. <FormItem
  6044. className="half-item"
  6045. {...formItemLayout}
  6046. label="签单金额(万元)"
  6047. >
  6048. <Input
  6049. placeholder="签单金额"
  6050. ref="totalAmountRef"
  6051. value={this.state.totalAmount}
  6052. onChange={(e) => {
  6053. this.setState({
  6054. totalAmount: e.target.value,
  6055. });
  6056. }}
  6057. style={{ width: "240px" }}
  6058. />
  6059. </FormItem>
  6060. <FormItem
  6061. className="half-item"
  6062. {...formItemLayout}
  6063. label="首付金额(万元)"
  6064. >
  6065. <Input
  6066. placeholder="请输入实签首款金额"
  6067. ref="firstAmountRef"
  6068. value={this.state.firstAmount}
  6069. onChange={(e) => {
  6070. this.setState({
  6071. firstAmount: e.target.value,
  6072. });
  6073. }}
  6074. style={{ width: "240px" }}
  6075. />
  6076. </FormItem>
  6077. <FormItem
  6078. className="half-item"
  6079. {...formItemLayout}
  6080. label="已收款项"
  6081. >
  6082. <span>
  6083. {this.state.settlementAmount + "万元"}
  6084. </span>
  6085. {/* {this.state.settlementAmount ? (
  6086. <Button
  6087. type="primary"
  6088. onClick={this.tuikuan}
  6089. style={{
  6090. float: "right",
  6091. marginRight: "50px",
  6092. marginBottom: "15px"
  6093. }}
  6094. >
  6095. 退单
  6096. </Button>
  6097. ) : (
  6098. ""
  6099. )} */}
  6100. </FormItem>
  6101. </div>
  6102. ) : (
  6103. <div className="clearfix">
  6104. <FormItem
  6105. className="half-item"
  6106. {...formItemLayout}
  6107. label="签单金额(万元)"
  6108. >
  6109. <span>{this.state.totalAmount}</span>
  6110. </FormItem>
  6111. <FormItem
  6112. className="half-item"
  6113. {...formItemLayout}
  6114. label="首付金额(万元)"
  6115. >
  6116. <span>{this.state.firstAmount}</span>
  6117. </FormItem>
  6118. <FormItem
  6119. className="half-item"
  6120. {...formItemLayout}
  6121. label="已收款项"
  6122. >
  6123. <span>
  6124. {this.state.settlementAmount + "万元"}
  6125. </span>
  6126. {/* {this.state.settlementAmount ? (
  6127. <Button
  6128. type="primary"
  6129. onClick={this.tuikuan}
  6130. style={{
  6131. float: "right",
  6132. marginRight: "50px",
  6133. marginBottom: "15px"
  6134. }}
  6135. >
  6136. 退单
  6137. </Button>
  6138. ) : (
  6139. ""
  6140. )} */}
  6141. </FormItem>
  6142. </div>
  6143. )}
  6144. <h3
  6145. style={{
  6146. marginLeft: 10,
  6147. fontWeight: 800,
  6148. marginBottom: 10,
  6149. }}
  6150. >
  6151. 联系信息
  6152. </h3>
  6153. {this.state.processStatus == 0 ? (
  6154. <div className="clearfix">
  6155. <div className="clearfix">
  6156. <FormItem
  6157. className="half-item"
  6158. style={{ width: "80%" }}
  6159. labelCol={{ span: 5 }}
  6160. wrapperCol={{ span: 18 }}
  6161. label="客户名称"
  6162. >
  6163. <span>{this.state.userName}</span>
  6164. <EnterpriseNameChange
  6165. type="journal"
  6166. style={{ marginLeft: 10 }}
  6167. enterpriseId={this.state.orderUid}
  6168. />
  6169. </FormItem>
  6170. </div>
  6171. <FormItem
  6172. className="half-item"
  6173. {...formItemLayout}
  6174. label="企业联系人"
  6175. >
  6176. <Input
  6177. placeholder="请输入联系人"
  6178. ref="signTotalAmount"
  6179. value={this.state.contacts}
  6180. onChange={(e) => {
  6181. this.setState({ contacts: e.target.value });
  6182. }}
  6183. style={{ width: "240px" }}
  6184. />
  6185. </FormItem>
  6186. <FormItem
  6187. className="half-item"
  6188. {...formItemLayout}
  6189. label="联系人电话"
  6190. >
  6191. <Input
  6192. placeholder="请输入联系人电话"
  6193. ref="signTotalAmount"
  6194. value={this.state.contactMobile}
  6195. onChange={(e) => {
  6196. this.setState({
  6197. contactMobile: e.target.value,
  6198. });
  6199. }}
  6200. style={{ width: "240px" }}
  6201. />
  6202. </FormItem>
  6203. <FormItem
  6204. className="half-item"
  6205. {...formItemLayout}
  6206. label="企业法人"
  6207. >
  6208. <Input
  6209. placeholder="请输入法人"
  6210. ref="signTotalAmount"
  6211. value={this.state.legalPerson}
  6212. onChange={(e) => {
  6213. this.setState({
  6214. legalPerson: e.target.value,
  6215. });
  6216. }}
  6217. style={{ width: "240px" }}
  6218. />
  6219. </FormItem>
  6220. <FormItem
  6221. className="half-item"
  6222. {...formItemLayout}
  6223. label="法人电话"
  6224. >
  6225. <Input
  6226. placeholder="请输入法人电话"
  6227. ref="signTotalAmount"
  6228. value={this.state.legalPersonTel}
  6229. onChange={(e) => {
  6230. this.setState({
  6231. legalPersonTel: e.target.value,
  6232. });
  6233. }}
  6234. style={{ width: "240px" }}
  6235. />
  6236. </FormItem>
  6237. </div>
  6238. ) : (
  6239. <div className="clearfix">
  6240. {formItemList.map((data, index) => {
  6241. return (
  6242. <FormItem
  6243. className="half-item"
  6244. {...formItemLayout}
  6245. key={index}
  6246. label={data.label}
  6247. >
  6248. {data.content}
  6249. </FormItem>
  6250. );
  6251. })}
  6252. </div>
  6253. )}
  6254. <div className="clearfix">
  6255. {this.state.processStatus == 0 ? (
  6256. <div>
  6257. <FormItem
  6258. labelCol={{ span: 4 }}
  6259. wrapperCol={{ span: 18 }}
  6260. label={
  6261. <span>
  6262. <strong style={{ color: "#f00" }}>
  6263. *
  6264. </strong>
  6265. 合同扫描件
  6266. </span>
  6267. }
  6268. >
  6269. <PicturesWall
  6270. domId={"addService1"}
  6271. fileList={this.getOrgCodeUrl}
  6272. pictureUrl={this.state.orgCodeUrl}
  6273. url="/api/admin/order/uploadOrderImg"
  6274. sign=""
  6275. />
  6276. <p>图片建议:要清晰。</p>
  6277. <Button
  6278. style={{
  6279. float: "right",
  6280. marginRight: "140px",
  6281. marginTop: "20px",
  6282. }}
  6283. onClick={this.getOrderLog}
  6284. >
  6285. 查看订单日志
  6286. </Button>
  6287. </FormItem>
  6288. <FormItem
  6289. labelCol={{ span: 4 }}
  6290. wrapperCol={{ span: 18 }}
  6291. label={<span>补充协议</span>}
  6292. >
  6293. <PicturesWall
  6294. domId={"addService2"}
  6295. fileList={this.getReplenishUrl}
  6296. pictureUrl={this.state.replenishUrl}
  6297. url="/api/admin/order/uploadOrderImg"
  6298. sign=""
  6299. />
  6300. <p>图片建议:要清晰。</p>
  6301. </FormItem>
  6302. </div>
  6303. ) : (
  6304. <div>
  6305. <FormItem
  6306. labelCol={{ span: 4 }}
  6307. wrapperCol={{ span: 18 }}
  6308. label="合同扫描件"
  6309. >
  6310. <div
  6311. style={{
  6312. paddingTop: "10px",
  6313. paddingBottom: "10px",
  6314. }}
  6315. >
  6316. {this.state.orgCodeUrl &&
  6317. this.state.visible &&
  6318. this.state.activeKey === "1" ? (
  6319. <ImgList
  6320. domId={"addService3"}
  6321. fileList={this.state.orgCodeUrl}
  6322. ItemWidth={"96px"}
  6323. />
  6324. ) : (
  6325. <div />
  6326. )}
  6327. </div>
  6328. <Modal
  6329. maskClosable={false}
  6330. footer={null}
  6331. width={"50%"}
  6332. visible={this.state.previewVisible}
  6333. onCancel={() => {
  6334. this.setState({
  6335. previewVisible: false,
  6336. rotateDeg: 0,
  6337. });
  6338. }}
  6339. >
  6340. <img
  6341. alt=""
  6342. style={{
  6343. width: "100%",
  6344. transform: `rotate(${this.state.rotateDeg}deg)`,
  6345. }}
  6346. src={this.state.previewImage || ""}
  6347. />
  6348. <Button
  6349. onClick={this.rotate}
  6350. style={{
  6351. position: "relative",
  6352. left: "50%",
  6353. transform: "translateX(-50%)",
  6354. }}
  6355. >
  6356. 旋转
  6357. </Button>
  6358. <Button
  6359. onClick={this.upImg}
  6360. style={{
  6361. position: "absolute",
  6362. left: -81,
  6363. top: "50%",
  6364. transform: "translateY(-50%)",
  6365. }}
  6366. >
  6367. 上一张
  6368. </Button>
  6369. <Button
  6370. onClick={this.downImg}
  6371. style={{
  6372. position: "absolute",
  6373. right: -81,
  6374. top: "50%",
  6375. transform: "translateY(-50%)",
  6376. }}
  6377. >
  6378. 下一张
  6379. </Button>
  6380. </Modal>
  6381. <Button
  6382. style={{
  6383. float: "right",
  6384. marginRight: "140px",
  6385. marginTop: "20px",
  6386. }}
  6387. onClick={this.getOrderLog}
  6388. >
  6389. 查看订单日志
  6390. </Button>
  6391. </FormItem>
  6392. <FormItem
  6393. labelCol={{ span: 4 }}
  6394. wrapperCol={{ span: 18 }}
  6395. label="补充协议"
  6396. >
  6397. <div
  6398. style={{
  6399. paddingTop: "10px",
  6400. paddingBottom: "10px",
  6401. }}
  6402. >
  6403. {this.state.visible &&
  6404. this.state.activeKey === "1" &&
  6405. this.state.replenishUrl ? (
  6406. <ImgList
  6407. domId={"addService4"}
  6408. fileList={this.state.replenishUrl}
  6409. ItemWidth={"96px"}
  6410. />
  6411. ) : (
  6412. <div />
  6413. )}
  6414. </div>
  6415. <Modal
  6416. maskClosable={false}
  6417. footer={null}
  6418. width={"50%"}
  6419. visible={this.state.previewVisibles}
  6420. onCancel={() => {
  6421. this.setState({
  6422. previewVisibles: false,
  6423. rotateDeg: 0,
  6424. });
  6425. }}
  6426. >
  6427. <img
  6428. alt=""
  6429. style={{
  6430. width: "100%",
  6431. transform: `rotate(${this.state.rotateDeg}deg)`,
  6432. }}
  6433. src={this.state.previewImage || ""}
  6434. />
  6435. <Button
  6436. onClick={this.rotates}
  6437. style={{
  6438. position: "relative",
  6439. left: "50%",
  6440. transform: "translateX(-50%)",
  6441. }}
  6442. >
  6443. 旋转
  6444. </Button>
  6445. <Button
  6446. onClick={this.upImgs}
  6447. style={{
  6448. position: "absolute",
  6449. left: -81,
  6450. top: "50%",
  6451. transform: "translateY(-50%)",
  6452. }}
  6453. >
  6454. 上一张
  6455. </Button>
  6456. <Button
  6457. onClick={this.downImgs}
  6458. style={{
  6459. position: "absolute",
  6460. right: -81,
  6461. top: "50%",
  6462. transform: "translateY(-50%)",
  6463. }}
  6464. >
  6465. 下一张
  6466. </Button>
  6467. </Modal>
  6468. </FormItem>
  6469. </div>
  6470. )}
  6471. </div>
  6472. {/* 服务内容 */}
  6473. <div class="clearfix">
  6474. <FormItem
  6475. labelCol={{ span: 4 }}
  6476. wrapperCol={{ span: 18 }}
  6477. label={
  6478. <span>
  6479. <strong style={{ color: "#f00" }}>*</strong>
  6480. 服务内容
  6481. </span>
  6482. }
  6483. >
  6484. <div>
  6485. {this.state.processStatus == 0 ?
  6486. <div>
  6487. <PicturesWall
  6488. domId={"addServiceContent"}
  6489. fileList={this.getContentUrl}
  6490. pictureUrl={this.state.contentUrl}
  6491. url="/api/admin/order/uploadOrderImg"
  6492. sign=""
  6493. />
  6494. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  6495. </div> :
  6496. this.state.contentUrl.length > 0 ?
  6497. <div>
  6498. <ImgList
  6499. domId={"addService13"}
  6500. fileList={this.state.contentUrl}
  6501. ItemWidth={"96px"}
  6502. />
  6503. <Modal
  6504. maskClosable={false}
  6505. footer={null}
  6506. width={"50%"}
  6507. visible={this.state.previewVisibleCont}
  6508. onCancel={() => {
  6509. this.setState({
  6510. previewVisibleCont: false,
  6511. rotateDeg: 0,
  6512. });
  6513. }}
  6514. >
  6515. <img
  6516. alt=""
  6517. style={{
  6518. width: "100%",
  6519. transform: `rotate(${this.state.rotateDeg}deg)`,
  6520. }}
  6521. src={this.state.previewImage || ""}
  6522. />
  6523. <Button
  6524. onClick={this.rotateCont}
  6525. style={{
  6526. position: "relative",
  6527. left: "50%",
  6528. transform: "translateX(-50%)",
  6529. }}
  6530. >
  6531. 旋转
  6532. </Button>
  6533. <Button
  6534. onClick={this.upImgCont}
  6535. style={{
  6536. position: "absolute",
  6537. left: -81,
  6538. top: "50%",
  6539. transform: "translateY(-50%)",
  6540. }}
  6541. >
  6542. 上一张
  6543. </Button>
  6544. <Button
  6545. onClick={this.downImgCont}
  6546. style={{
  6547. position: "absolute",
  6548. right: -81,
  6549. top: "50%",
  6550. transform: "translateY(-50%)",
  6551. }}
  6552. >
  6553. 下一张
  6554. </Button>
  6555. </Modal>
  6556. </div> : "暂无附件!"}
  6557. </div>
  6558. </FormItem>
  6559. </div>
  6560. {/* 服务内容结束 */}
  6561. <div className="clearfix">
  6562. {this.state.processStatus == 0 ? (
  6563. <div className="clearfix">
  6564. <FormItem
  6565. labelCol={{ span: 4 }}
  6566. wrapperCol={{ span: 16 }}
  6567. label={
  6568. <span>
  6569. <strong style={{ color: "#f00" }}>*</strong>
  6570. 订单留言
  6571. </span>
  6572. }
  6573. >
  6574. <Input
  6575. ref="orderRemarksRef"
  6576. type="textarea"
  6577. placeholder="请输入订单留言"
  6578. rows={4}
  6579. value={this.state.orderRemarks}
  6580. onChange={(e) => {
  6581. this.setState({
  6582. orderRemarks: e.target.value,
  6583. });
  6584. }}
  6585. style={{ width: "95%" }}
  6586. />
  6587. <div className="mandatory">
  6588. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  6589. </div>
  6590. </FormItem>
  6591. </div>
  6592. ) : (
  6593. <FormItem
  6594. labelCol={{ span: 4 }}
  6595. wrapperCol={{ span: 16 }}
  6596. label="订单留言"
  6597. >
  6598. <p
  6599. style={{ width: 500, wordWrap: "break-word" }}
  6600. >
  6601. {this.state.orderRemarks}
  6602. </p>
  6603. </FormItem>
  6604. )}
  6605. </div>
  6606. <div className="clearfix">
  6607. <FormItem
  6608. className="half-item"
  6609. {...formItemLayout}
  6610. label="订单负责人"
  6611. >
  6612. <span>{this.state.salesmanName}</span>
  6613. </FormItem>
  6614. <FormItem
  6615. className="half-item"
  6616. {...formItemLayout}
  6617. label="订单负责人电话"
  6618. >
  6619. <span>{this.state.salesmanMobile}</span>
  6620. </FormItem>
  6621. </div>
  6622. <div className="clearfix">
  6623. <FormItem
  6624. className="half-item"
  6625. {...formItemLayout}
  6626. label="当前财务负责人"
  6627. >
  6628. <span>{this.state.nowFinance}</span>
  6629. </FormItem>
  6630. <FormItem
  6631. className="half-item"
  6632. {...formItemLayout}
  6633. label="当前财务负责人电话"
  6634. >
  6635. <span>{this.state.nowFinanceMobile}</span>
  6636. </FormItem>
  6637. </div>
  6638. <div className="clearfix">
  6639. <FormItem
  6640. className="half-item"
  6641. {...formItemLayout}
  6642. style={{ opacity: ".5" }}
  6643. label="原订单负责人"
  6644. >
  6645. <span>{this.state.oldSalesmanName}</span>
  6646. </FormItem>
  6647. <FormItem
  6648. className="half-item"
  6649. {...formItemLayout}
  6650. style={{ opacity: ".5" }}
  6651. label="原订单负责人电话"
  6652. >
  6653. <span>{this.state.oldSalesmanMobile}</span>
  6654. </FormItem>
  6655. </div>
  6656. <div className="clearfix">
  6657. <FormItem
  6658. className="half-item"
  6659. style={{ opacity: ".5" }}
  6660. {...formItemLayout}
  6661. label="实际财务操作人"
  6662. >
  6663. <span>{this.state.financeName}</span>
  6664. </FormItem>
  6665. <FormItem
  6666. className="half-item"
  6667. {...formItemLayout}
  6668. style={{ opacity: ".5" }}
  6669. label="实际财务操作人电话"
  6670. >
  6671. <span>{this.state.financeMobile}</span>
  6672. </FormItem>
  6673. </div>
  6674. {/* 新增协单人员 */}
  6675. <div>
  6676. <div style={{ marginLeft: "50px", display: 'flex' }}>
  6677. <div
  6678. style={{
  6679. minWidth: '66px',
  6680. maxWidth: '100px',
  6681. fontSize: "12px",
  6682. color: "red",
  6683. }}
  6684. >
  6685. 协单人员 :
  6686. </div>
  6687. <div>
  6688. {this.state.personnel.length > 0
  6689. ? this.state.personnel.map(function (value, key) {
  6690. return (
  6691. <Tag
  6692. style={{ marginBottom: '5px' }}
  6693. key={value.id}
  6694. closable={closable}
  6695. onClose={(e) => {
  6696. e.preventDefault();
  6697. confirm({
  6698. title: "确定删除此人员吗?",
  6699. // content: (
  6700. // <span style={{ color: "red" }}>
  6701. // 删除后会将该项目下的所有催款节点自动清除!!!
  6702. // </span>
  6703. // ),
  6704. onOk() {
  6705. $.ajax({
  6706. method: "post",
  6707. dataType: "json",
  6708. crossDomain: false,
  6709. url:
  6710. globalConfig.context +
  6711. "/api/admin/newOrder/deleteAssist",
  6712. data: {
  6713. id: value.id,
  6714. },
  6715. success: function (data) {
  6716. if (data.error.length) {
  6717. message.warning(
  6718. data.error[0].message
  6719. );
  6720. } else {
  6721. message.success("删除成功");
  6722. assistList();
  6723. }
  6724. }.bind(this),
  6725. }).always(
  6726. function () {
  6727. this.setState({
  6728. loading: false,
  6729. });
  6730. }.bind(this)
  6731. );
  6732. },
  6733. onCancel() { },
  6734. });
  6735. }}
  6736. >
  6737. {value.name}
  6738. </Tag>
  6739. );
  6740. })
  6741. : "无"}
  6742. </div>
  6743. </div>
  6744. <div
  6745. style={{
  6746. margin: "10px 0 0 50px",
  6747. display: this.state.disabledView,
  6748. }}
  6749. >
  6750. <Button
  6751. type="primary"
  6752. onClick={() => {
  6753. this.setState({
  6754. coorVisible: "block",
  6755. coor: "",
  6756. });
  6757. }}
  6758. >
  6759. 添加协单人员
  6760. </Button>
  6761. {/* 提示 */}
  6762. <div style={{ color: "red" }}>
  6763. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  6764. </div>
  6765. </div>
  6766. {/*添加协单人员 */}
  6767. <div
  6768. style={{
  6769. margin: "10px 0 0 50px",
  6770. display: this.state.coorVisible,
  6771. }}
  6772. >
  6773. <Form
  6774. onSubmit={this.handleSubmit}
  6775. ref={this.formRef}
  6776. >
  6777. <Form.Item
  6778. {...formItemLayout}
  6779. label=""
  6780. name="coor"
  6781. hasFeedback
  6782. >
  6783. <AutoComplete
  6784. // autocomplete="off"
  6785. allowClear
  6786. dataSource={dataSourceView}
  6787. style={{ width: 200 }}
  6788. onSelect={this.onSelectView}
  6789. onSearch={this.handleSearch}
  6790. placeholder="请输入名称"
  6791. />
  6792. </Form.Item>
  6793. </Form>
  6794. <div style={{ marginLeft: "10px" }}>
  6795. <Button
  6796. type="primary"
  6797. style={{ marginRight: "54px" }}
  6798. onClick={this.submitOrder}
  6799. loading={this.state.loading}
  6800. >
  6801. 保存
  6802. </Button>
  6803. <Button
  6804. onClick={() => {
  6805. this.setState({
  6806. coorVisible: "none",
  6807. });
  6808. }}
  6809. >
  6810. 取消
  6811. </Button>
  6812. </div>
  6813. </div>
  6814. </div>
  6815. {/* 分界线 */}
  6816. <div
  6817. style={{
  6818. borderTop: "1px solid #333",
  6819. margin: "5px 0",
  6820. }}
  6821. ></div>
  6822. {/* 上门服务次数 */}
  6823. <div>
  6824. <div
  6825. style={{
  6826. display: "flex",
  6827. justifyContent: "space-between",
  6828. }}
  6829. >
  6830. <div
  6831. style={{ marginLeft: "50px", fontSize: "20px" }}
  6832. >
  6833. 上门服务次数
  6834. </div>
  6835. <div>
  6836. <Button
  6837. type="primary"
  6838. style={{ marginBottom: 15 }}
  6839. onClick={() => {
  6840. this.publicByOrder();
  6841. this.setState({
  6842. modalRecord: true,
  6843. });
  6844. }}
  6845. >
  6846. 查看上门记录
  6847. </Button>
  6848. <Button
  6849. style={{ marginLeft: 5, display: this.state.disabledView }}
  6850. type="primary"
  6851. onClick={() => {
  6852. this.setState({
  6853. modalView: true,
  6854. dateView: '',
  6855. contentView: '',
  6856. remarksView: '',
  6857. contentViewLength: 0,
  6858. contentViewLength1: 0,
  6859. });
  6860. }}
  6861. >
  6862. 添加上门次数
  6863. </Button>
  6864. </div>
  6865. </div>
  6866. {/* 上门服务表格 */}
  6867. <div
  6868. className="patent-table"
  6869. style={{ marginBottom: 10 }}
  6870. >
  6871. <Spin spinning={this.state.loading}>
  6872. <Table
  6873. columns={this.state.columnsView}
  6874. scroll={{ x: "max-content", y: 0 }}
  6875. dataSource={this.state.dataView}
  6876. pagination={false}
  6877. // onRowClick={this.tableRowClick}
  6878. bordered
  6879. size="small"
  6880. />
  6881. </Spin>
  6882. </div>
  6883. {/* 查看上门记录 */}
  6884. <Modal
  6885. footer=""
  6886. title="技术人员上门详细记录"
  6887. visible={this.state.modalRecord}
  6888. width="1200px"
  6889. onCancel={() => {
  6890. this.setState({
  6891. modalRecord: false,
  6892. });
  6893. }}
  6894. >
  6895. <Spin spinning={this.state.loading}>
  6896. <Table
  6897. columns={this.state.columnsRecord}
  6898. scroll={{ x: "max-content", y: 0 }}
  6899. dataSource={this.state.publicView}
  6900. pagination={false}
  6901. // onRowClick={this.tableRowClick}
  6902. bordered
  6903. size="small"
  6904. />
  6905. </Spin>
  6906. </Modal>
  6907. {/* 添加上门次数模态框 */}
  6908. <Modal
  6909. footer=""
  6910. title="新增上门次数"
  6911. visible={this.state.modalView}
  6912. key={this.state.viewKey}
  6913. onCancel={() => {
  6914. this.setState({
  6915. modalView: false,
  6916. viewKey: this.state.viewKey + 1,
  6917. });
  6918. }}
  6919. >
  6920. <Form
  6921. onSubmit={this.handleSubmit}
  6922. ref={this.formRef}
  6923. style={{ marginRight: "120px" }}
  6924. >
  6925. <Form.Item
  6926. {...formItemLayout}
  6927. label="上门时间"
  6928. name="date"
  6929. hasFeedback
  6930. >
  6931. <DatePicker
  6932. placeholder="预计技术员上门服务时间"
  6933. onChange={(date, dateString) => {
  6934. this.setState({
  6935. dateView: dateString,
  6936. });
  6937. }}
  6938. />
  6939. </Form.Item>
  6940. <Form.Item
  6941. {...formItemLayout}
  6942. label="服务内容"
  6943. name="remarks"
  6944. hasFeedback
  6945. style={{ position: 'relative' }}
  6946. >
  6947. <TextArea
  6948. rows={4}
  6949. placeholder="需要技术员上门服务内容"
  6950. onChange={(e) => {
  6951. this.setState({
  6952. contentView: e.target.value,
  6953. }, () => {
  6954. if (!this.state.contentView) {
  6955. this.setState({
  6956. contentViewLength: 0,
  6957. })
  6958. } else {
  6959. this.setState({
  6960. contentViewLength: this.state.contentView.length
  6961. })
  6962. }
  6963. });
  6964. }}
  6965. maxLength={500}
  6966. >
  6967. </TextArea>
  6968. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  6969. </Form.Item>
  6970. <Form.Item
  6971. {...formItemLayout}
  6972. label="备注"
  6973. name="remarks"
  6974. hasFeedback
  6975. style={{ position: 'relative' }}
  6976. >
  6977. <TextArea
  6978. rows={4}
  6979. maxLength={500}
  6980. placeholder="需要技术员注意事项"
  6981. onChange={(e) => {
  6982. this.setState({
  6983. remarksView: e.target.value,
  6984. }, () => {
  6985. if (!this.state.remarksView) {
  6986. this.setState({
  6987. contentViewLength1: 0,
  6988. })
  6989. } else {
  6990. this.setState({
  6991. contentViewLength1: this.state.remarksView.length
  6992. })
  6993. }
  6994. });
  6995. }}
  6996. />
  6997. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  6998. </Form.Item>
  6999. </Form>
  7000. <div
  7001. style={{
  7002. display: "flex",
  7003. justifyContent: "center",
  7004. }}
  7005. >
  7006. <Button
  7007. onClick={this.submitView}
  7008. type="primary"
  7009. loading={this.state.loading}
  7010. >
  7011. 提交
  7012. </Button>
  7013. <Button
  7014. type="dashed"
  7015. style={{ marginLeft: "15px" }}
  7016. onClick={() => {
  7017. this.setState({
  7018. modalView: false,
  7019. viewKey: this.state.viewKey + 1,
  7020. dateView: '',
  7021. contentView: '',
  7022. remarksView: '',
  7023. contentViewLength: 0,
  7024. contentViewLength1: 0,
  7025. });
  7026. }}
  7027. >
  7028. 取消
  7029. </Button>
  7030. </div>
  7031. </Modal>
  7032. </div>
  7033. <div>
  7034. <span
  7035. style={{ marginLeft: "50px", fontSize: "20px" }}
  7036. >
  7037. 项目业务
  7038. </span>
  7039. {
  7040. this.state.processStatus == 0 &&
  7041. <Button
  7042. type="primary"
  7043. onClick={this.addDetailed}
  7044. style={{
  7045. float: "right",
  7046. marginRight: "50px",
  7047. marginBottom: "15px",
  7048. }}
  7049. >
  7050. 添加项目明细
  7051. </Button>
  7052. }
  7053. {
  7054. this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
  7055. <Button
  7056. type="primary"
  7057. onClick={this.addVip}
  7058. style={{
  7059. float: "right",
  7060. marginRight: "50px",
  7061. marginBottom: "15px",
  7062. }}
  7063. >
  7064. 添加会员项目
  7065. </Button>
  7066. }
  7067. </div>
  7068. <div
  7069. className="patent-table"
  7070. style={{ marginBottom: 10 }}
  7071. >
  7072. <Spin spinning={this.state.loading}>
  7073. <Table
  7074. columns={this.state.columns}
  7075. dataSource={this.state.dataSource}
  7076. pagination={this.state.pagination}
  7077. expandedRowRender={expandedRowRenderVip}
  7078. rowClassName={this.addRowColor}
  7079. onRowClick={this.tableRowClick}
  7080. bordered
  7081. size="small"
  7082. />
  7083. </Spin>
  7084. </div>
  7085. <div
  7086. style={{
  7087. display: cuiDataList.length ? "block" : "none",
  7088. }}
  7089. >
  7090. <span
  7091. style={{ marginLeft: "50px", fontSize: "20px" }}
  7092. >
  7093. 旧催款节点
  7094. </span>
  7095. <Button
  7096. type="primary"
  7097. // onClick={this.addcontact}
  7098. disabled
  7099. onClick={(e) => {
  7100. cuiDataList.length
  7101. ? this.addcontact()
  7102. : this.addcontactNew();
  7103. }}
  7104. style={{
  7105. float: "right",
  7106. marginRight: "50px",
  7107. marginBottom: "15px",
  7108. display:
  7109. this.state.processStatus == 0
  7110. ? "block"
  7111. : "none",
  7112. }}
  7113. >
  7114. 添加催款节点
  7115. </Button>
  7116. </div>
  7117. <div
  7118. className="clearfix"
  7119. style={{
  7120. display: cuiDataList.length ? "block" : "none",
  7121. }}
  7122. >
  7123. <Spin spinning={this.state.loading}>
  7124. <Form layout="horizontal">
  7125. <Table
  7126. pagination={false}
  7127. columns={this.state.ContactsLists}
  7128. dataSource={this.state.contactList}
  7129. scroll={{ x: "max-content", y: 0 }}
  7130. bordered
  7131. size="small"
  7132. />
  7133. <Col
  7134. span={24}
  7135. offset={9}
  7136. style={{ marginTop: "15px" }}
  7137. ></Col>
  7138. </Form>
  7139. </Spin>
  7140. </div>
  7141. <div
  7142. style={{
  7143. display: cuiDataList.length ? "none" : "block",
  7144. }}
  7145. >
  7146. <span
  7147. style={{
  7148. marginLeft: "50px",
  7149. fontSize: "20px",
  7150. }}
  7151. >
  7152. 新催款节点
  7153. </span>
  7154. <span
  7155. style={{
  7156. display: "inline-block",
  7157. marginLeft: 10,
  7158. color: "red",
  7159. }}
  7160. >
  7161. 金额总计(万元): {this.state.totalCui}
  7162. </span>
  7163. <Button
  7164. type="primary"
  7165. disabled={this.state.addFlag ? true : false}
  7166. // onClick={this.addcontact}
  7167. onClick={(e) => {
  7168. this.setState({ addFlag: true });
  7169. this.addcontactNew();
  7170. }}
  7171. style={{
  7172. float: "right",
  7173. marginRight: "50px",
  7174. marginBottom: "15px",
  7175. display:
  7176. this.state.processStatus == 0
  7177. ? "block"
  7178. : "none",
  7179. }}
  7180. >
  7181. 添加催款节点
  7182. </Button>
  7183. </div>
  7184. <div
  7185. className="clearfix"
  7186. style={{
  7187. display: cuiDataList.length ? "none" : "block",
  7188. }}
  7189. >
  7190. <Spin spinning={this.state.loading}>
  7191. <Form layout="horizontal">
  7192. <Table
  7193. pagination={false}
  7194. columns={this.state.ContactsListsNew}
  7195. dataSource={this.state.contactListNew}
  7196. scroll={{ x: "max-content", y: 0 }}
  7197. bordered
  7198. size="small"
  7199. />
  7200. <Col
  7201. span={24}
  7202. offset={9}
  7203. style={{ marginTop: "15px" }}
  7204. ></Col>
  7205. </Form>
  7206. </Spin>
  7207. </div>
  7208. {this.state.processStatus == 0 &&
  7209. <div
  7210. className="addSave"
  7211. style={{ marginTop: "15px" }}
  7212. >
  7213. <Button
  7214. className="cancel"
  7215. type="primary"
  7216. onClick={this.handleCancels}
  7217. style={{ marginLeft: "200px" }}
  7218. htmlType="submit"
  7219. loading={this.state.loading}
  7220. >
  7221. 签单
  7222. </Button>
  7223. <Button
  7224. className="cancel"
  7225. type="primary"
  7226. onClick={this.handleCancelq}
  7227. style={{ marginLeft: "50px" }}
  7228. htmlType="submit"
  7229. loading={this.state.loading}
  7230. >
  7231. 保存
  7232. </Button>
  7233. <Popconfirm
  7234. title="请确认您是否作废此订单??"
  7235. onConfirm={(e) => {
  7236. this.examOks()
  7237. }}
  7238. okText="确认"
  7239. cancelText="取消"
  7240. >
  7241. <Button
  7242. className="cancel"
  7243. type="danger"
  7244. // onClick={this.examOks}
  7245. style={{ marginLeft: "50px" }}
  7246. loading={this.state.loading}
  7247. >
  7248. 订单作废
  7249. </Button>
  7250. </Popconfirm>
  7251. <Button
  7252. className="cancel"
  7253. type="ghost"
  7254. onClick={this.handleCancelclose}
  7255. style={{ marginLeft: "50px" }}
  7256. >
  7257. 取消
  7258. </Button>
  7259. </div>
  7260. }
  7261. </div>
  7262. </TabPane>
  7263. <TabPane tab="合同变更发起" key="2">
  7264. {
  7265. <div>
  7266. <div className="clearfix">
  7267. <FormItem
  7268. className="half-item"
  7269. {...formItemLayout}
  7270. label="客户名称"
  7271. >
  7272. <span>{this.state.userName}</span>
  7273. <EnterpriseNameChange
  7274. type="journal"
  7275. style={{ marginLeft: 10 }}
  7276. enterpriseId={this.state.orderUid}
  7277. />
  7278. </FormItem>
  7279. </div>
  7280. <div className="clearfix">
  7281. <FormItem
  7282. className="half-item"
  7283. {...formItemLayout}
  7284. label="合同编号"
  7285. >
  7286. <span>{this.state.contractNo}</span>
  7287. </FormItem>
  7288. </div>
  7289. <div className="clearfix">
  7290. <FormItem
  7291. className="half-item"
  7292. {...formItemLayout}
  7293. label="申请变更部门"
  7294. >
  7295. <span>{this.state.depName}</span>
  7296. </FormItem>
  7297. <FormItem
  7298. className="half-item"
  7299. {...formItemLayout}
  7300. label="申请人"
  7301. >
  7302. <span>{this.state.salesmanName}</span>
  7303. </FormItem>
  7304. </div>
  7305. <div className="clearfix">
  7306. <FormItem
  7307. labelCol={{ span: 4 }}
  7308. wrapperCol={{ span: 18 }}
  7309. label="变更类型"
  7310. >
  7311. <Select
  7312. placeholder="选择合同变更类型"
  7313. style={{ width: 200 }}
  7314. disabled={this.state.changeFlag}
  7315. value={this.state.typeChange}
  7316. onChange={(e) => {
  7317. this.setState({
  7318. typeChange: e,
  7319. changeFlag: true,
  7320. });
  7321. if (e == 1) {
  7322. this.setState({
  7323. hetongFlag: false,
  7324. listFlag: false,
  7325. listCuiFlag: false,
  7326. tuiKuanFlag: false,
  7327. displayList: false,
  7328. });
  7329. } else if (e == 2) {
  7330. this.setState({
  7331. hetongFlag: true,
  7332. listFlag: false,
  7333. listCuiFlag: false,
  7334. tuiKuanFlag: true,
  7335. displayList: false,
  7336. });
  7337. } else if (e == 3) {
  7338. this.setState({
  7339. listFlag: false,
  7340. hetongFlag: false,
  7341. listCuiFlag: false,
  7342. tuiKuanFlag: false,
  7343. displayList: true,
  7344. });
  7345. } else if (e == 4) {
  7346. this.setState({
  7347. listFlag: false,
  7348. listCuiFlag: false,
  7349. hetongFlag: false,
  7350. tuiKuanFlag: true,
  7351. displayList: false,
  7352. });
  7353. } else if (e == 5) {
  7354. this.setState({
  7355. listFlag: false,
  7356. listCuiFlag: false,
  7357. hetongFlag: true,
  7358. tuiKuanFlag: true,
  7359. displayList: false,
  7360. });
  7361. } else if (e == 6) {
  7362. this.setState({
  7363. listFlag: true,
  7364. listCuiFlag: true,
  7365. hetongFlag: true,
  7366. tuiKuanFlag: true,
  7367. displayList: false,
  7368. });
  7369. } else if (e == 7) {
  7370. this.setState({
  7371. listFlag: true,
  7372. listCuiFlag: true,
  7373. hetongFlag: true,
  7374. tuiKuanFlag: true,
  7375. displayList: false,
  7376. isNew: true, //上传替换合同
  7377. });
  7378. } else {
  7379. this.setState({
  7380. listFlag: true,
  7381. hetongFlag: true,
  7382. listCuiFlag: true,
  7383. tuiKuanFlag: false,
  7384. displayList: false,
  7385. });
  7386. }
  7387. }}
  7388. >
  7389. <Option value={0}>退单退款</Option>
  7390. <Option value={1}>项目及金额变更</Option>
  7391. <Option value={2}>仅项目变更</Option>
  7392. <Option value={3}>仅金额变更</Option>
  7393. <Option value={4}>重报</Option>
  7394. <Option value={5}>赠送</Option>
  7395. <Option value={6}>退单不退款</Option>
  7396. <Option value={7}>仅变更合同</Option>
  7397. </Select>
  7398. <Button
  7399. style={{ marginLeft: 10 }}
  7400. onClick={(e) => {
  7401. this.setState({
  7402. listFlag: false,
  7403. hetongFlag: false,
  7404. listCuiFlag: false,
  7405. tuiKuanFlag: false,
  7406. displayList: false,
  7407. startRemarks: "",
  7408. remarksC: "",
  7409. voucherUrl: [],
  7410. newContractUrl: [],
  7411. isNew: false,
  7412. changeAmount: "0",
  7413. applicant: undefined,
  7414. depNameChange: undefined,
  7415. typeChange: undefined,
  7416. changeFlag: false,
  7417. });
  7418. }}
  7419. >
  7420. 重置
  7421. </Button>
  7422. {(this.state.status === 3 || this.state.status == 0) ? (
  7423. <Button
  7424. type="danger"
  7425. style={{
  7426. float: "right",
  7427. backgroundColor: "red",
  7428. color: "white",
  7429. position: "absolute",
  7430. right: 0,
  7431. height: 50,
  7432. borderRadius: 20,
  7433. zIndex: 100,
  7434. top: 0,
  7435. }}
  7436. onClick={(e) => {
  7437. e.stopPropagation();
  7438. this.showConfirmChange(this.deleteChange);
  7439. }}
  7440. >
  7441. 取消本次变更
  7442. </Button>
  7443. ) : (
  7444. ""
  7445. )}
  7446. </FormItem>
  7447. </div>
  7448. <div className="clearfix">
  7449. <FormItem
  7450. labelCol={{ span: 4 }}
  7451. wrapperCol={{ span: 18 }}
  7452. label="合同额(万元)"
  7453. >
  7454. <Input
  7455. placeholder="请输入合同额"
  7456. disabled={this.state.hetongFlag}
  7457. ref="signTotalAmount"
  7458. value={this.state.totalAmount}
  7459. onChange={(e) => {
  7460. this.setState({
  7461. totalAmount: e.target.value,
  7462. });
  7463. }}
  7464. style={{ width: "240px" }}
  7465. />
  7466. </FormItem>
  7467. <FormItem
  7468. labelCol={{ span: 4 }}
  7469. wrapperCol={{ span: 18 }}
  7470. label="已收款(万元)"
  7471. >
  7472. <span>
  7473. {this.state.settlementAmount}
  7474. &nbsp;&nbsp;&nbsp;&nbsp;
  7475. <span style={{ color: "red" }}>
  7476. (注:已收款与现实收款不符,请与财务专员联系)
  7477. </span>
  7478. </span>
  7479. </FormItem>
  7480. <FormItem
  7481. labelCol={{ span: 4 }}
  7482. wrapperCol={{ span: 18 }}
  7483. label="申请退款(万元)"
  7484. >
  7485. <Input
  7486. placeholder="请输入申请退款"
  7487. ref="signTotalAmount"
  7488. disabled={this.state.tuiKuanFlag}
  7489. value={this.state.changeAmount}
  7490. onChange={(e) => {
  7491. this.setState({
  7492. changeAmount: e.target.value,
  7493. });
  7494. }}
  7495. style={{ width: "240px" }}
  7496. />
  7497. </FormItem>
  7498. </div>
  7499. <div
  7500. style={{
  7501. display: this.state.isCaoGao ? "block" : "none",
  7502. }}
  7503. >
  7504. <div>
  7505. <span
  7506. style={{
  7507. marginLeft: "50px",
  7508. fontSize: "20px",
  7509. }}
  7510. >
  7511. 项目业务
  7512. </span>
  7513. <span style={{ color: "red" }}>
  7514. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!双击可修改对应金额数量!)
  7515. </span>
  7516. <Button
  7517. type="primary"
  7518. onClick={this.changeAddPro}
  7519. disabled={this.state.listFlag}
  7520. style={{
  7521. float: "right",
  7522. marginRight: "50px",
  7523. marginBottom: "15px",
  7524. display: this.state.displayList
  7525. ? "none"
  7526. : "block",
  7527. }}
  7528. >
  7529. 添加项目明细
  7530. </Button>
  7531. </div>
  7532. <div
  7533. className="patent-table"
  7534. style={{ marginBottom: 10 }}
  7535. >
  7536. <Spin spinning={this.state.loading}>
  7537. <Table
  7538. columns={this.state.proColumns}
  7539. dataSource={this.state.proDataSource}
  7540. expandedRowRender={expandedRowRender}
  7541. pagination={this.state.pagination}
  7542. rowClassName={this.addRowColor}
  7543. // onRowDoubleClick={
  7544. // this.state.listFlag
  7545. // ? this.not
  7546. // : this.editPro
  7547. // }
  7548. bordered
  7549. size="small"
  7550. />
  7551. </Spin>
  7552. </div>
  7553. <div>
  7554. <span
  7555. style={{
  7556. marginLeft: "50px",
  7557. fontSize: "20px",
  7558. }}
  7559. >
  7560. 催款节点
  7561. </span>
  7562. <span style={{ color: "red" }}>
  7563. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  7564. </span>
  7565. <Button
  7566. type="primary"
  7567. onClick={(e) => {
  7568. this.changeAddCui();
  7569. }}
  7570. disabled={this.state.listCuiFlag}
  7571. style={{
  7572. float: "right",
  7573. marginRight: "50px",
  7574. marginBottom: "15px",
  7575. display: this.state.displayList
  7576. ? "none"
  7577. : "block",
  7578. }}
  7579. >
  7580. 添加催款节点
  7581. </Button>
  7582. </div>
  7583. <div className="clearfix">
  7584. <Spin spinning={this.state.loading}>
  7585. <Form layout="horizontal">
  7586. <Table
  7587. pagination={false}
  7588. columns={this.state.changeCuiList}
  7589. dataSource={this.state.cuiDataSource}
  7590. scroll={{ x: "max-content", y: 0 }}
  7591. onRowDoubleClick={
  7592. this.state.listCuiFlag
  7593. ? this.not
  7594. : this.editCui
  7595. }
  7596. bordered
  7597. size="small"
  7598. />
  7599. <Col
  7600. span={24}
  7601. offset={9}
  7602. style={{ marginTop: "15px" }}
  7603. ></Col>
  7604. </Form>
  7605. </Spin>
  7606. </div>
  7607. </div>
  7608. <div className="clearfix">
  7609. <FormItem
  7610. style={{ height: "auto" }}
  7611. labelCol={{ span: 4 }}
  7612. wrapperCol={{ span: 18 }}
  7613. label="变更原因"
  7614. >
  7615. <TextArea
  7616. rows={4}
  7617. placeholder="请输入变更原因"
  7618. ref="signTotalAmount"
  7619. style={{ width: "95%" }}
  7620. value={this.state.remarksC}
  7621. onChange={(e) => {
  7622. this.setState({
  7623. remarksC: e.target.value,
  7624. });
  7625. }}
  7626. />
  7627. </FormItem>
  7628. </div>
  7629. <div className="clearfix">
  7630. <FormItem
  7631. style={{ height: "auto" }}
  7632. labelCol={{ span: 4 }}
  7633. wrapperCol={{ span: 18 }}
  7634. label="备注"
  7635. >
  7636. <TextArea
  7637. rows={4}
  7638. placeholder="请输入备注"
  7639. ref="signTotalAmount"
  7640. style={{ width: "95%" }}
  7641. value={this.state.startRemarks}
  7642. onChange={(e) => {
  7643. this.setState({
  7644. startRemarks: e.target.value,
  7645. });
  7646. }}
  7647. />
  7648. </FormItem>
  7649. </div>
  7650. <div className="clearfix">
  7651. <FormItem
  7652. labelCol={{ span: 4 }}
  7653. wrapperCol={{ span: 18 }}
  7654. label="变更凭证"
  7655. >
  7656. <PicturesWall
  7657. domId={"addService5"}
  7658. fileList={this.getVoucherUrl}
  7659. pictureUrl={this.state.voucherUrl}
  7660. url="/api/admin/orderChange/uploadFile"
  7661. sign="order_change_file"
  7662. />
  7663. <p>图片建议:要清晰。</p>
  7664. </FormItem>
  7665. </div>
  7666. <div className="clearfix">
  7667. <FormItem
  7668. labelCol={{ span: 4 }}
  7669. wrapperCol={{ span: 18 }}
  7670. label="上传替换合同"
  7671. >
  7672. <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
  7673. <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
  7674. </FormItem>
  7675. </div>
  7676. {
  7677. this.state.isNew &&
  7678. <div className="clearfix">
  7679. <FormItem
  7680. labelCol={{ span: 4 }}
  7681. wrapperCol={{ span: 18 }}
  7682. label="合同扫描件"
  7683. >
  7684. <PicturesWall
  7685. domId={"newcontract"}
  7686. fileList={this.getNewContractUrl}
  7687. pictureUrl={this.state.newContractUrl}
  7688. url="/api/admin/orderChange/uploadFile"
  7689. sign=""
  7690. />
  7691. <p>图片建议:要清晰。</p>
  7692. </FormItem>
  7693. </div>
  7694. }
  7695. <div className="clearfix">
  7696. <Button
  7697. type="primary"
  7698. style={{ float: "right", marginRight: 40 }}
  7699. // onClick={this.changeApply}
  7700. loading={this.state.loading}
  7701. onClick={(e) => {
  7702. if (this.state.isCaoGao) {
  7703. this.submitChange();
  7704. } else {
  7705. this.changeApply();
  7706. }
  7707. }}
  7708. >
  7709. {this.state.isCaoGao
  7710. ? "发起变更申请"
  7711. : this.state.typeChange == 0
  7712. ? "发起变更申请"
  7713. : "下一步"}
  7714. </Button>
  7715. </div>
  7716. {/* ) : (
  7717. ""
  7718. )} */}
  7719. </div>
  7720. }
  7721. </TabPane>
  7722. {this.state.isJilu ? (
  7723. <TabPane tab={"最近变更记录"} key="3">
  7724. <div>
  7725. <div
  7726. style={{
  7727. borderRadius: "50%",
  7728. width: 300,
  7729. height: 300,
  7730. position: "absolute",
  7731. top: 230,
  7732. left: 525,
  7733. transform: "rotate(-5deg)",
  7734. zIndex: 1,
  7735. display:
  7736. this.state.detailChange.status == 4
  7737. ? "block"
  7738. : "none",
  7739. }}
  7740. >
  7741. <img src={tongguo} style={{ width: "100%" }} />
  7742. </div>
  7743. <div
  7744. style={{
  7745. borderRadius: "50%",
  7746. width: 300,
  7747. height: 300,
  7748. position: "absolute",
  7749. top: 284,
  7750. left: 586,
  7751. transform: "rotate(-5deg)",
  7752. zIndex: 1,
  7753. display:
  7754. this.state.detailChange.status == 5
  7755. ? "block"
  7756. : "none",
  7757. }}
  7758. >
  7759. <img src={quxiao} style={{ width: "63%" }} />
  7760. </div>
  7761. <div className="clearfix">
  7762. <FormItem
  7763. className="half-item"
  7764. {...formItemLayout}
  7765. label="客户名称"
  7766. >
  7767. <span>{this.state.userName}</span>
  7768. <EnterpriseNameChange
  7769. type="journal"
  7770. style={{ marginLeft: 10 }}
  7771. enterpriseId={this.state.orderUid}
  7772. />
  7773. </FormItem>
  7774. {/* */}
  7775. <FormItem
  7776. className="half-item"
  7777. {...formItemLayout}
  7778. label="合同编号"
  7779. >
  7780. <span>{this.state.contractNo}</span>
  7781. </FormItem>
  7782. </div>
  7783. <div className="clearfix">
  7784. <FormItem
  7785. className="half-item"
  7786. {...formItemLayout}
  7787. label="时间"
  7788. >
  7789. <span>
  7790. {this.state.detailChange.createTimes}
  7791. </span>
  7792. </FormItem>
  7793. <FormItem
  7794. className="half-item"
  7795. {...formItemLayout}
  7796. label="申请人"
  7797. >
  7798. <span>{this.state.salesmanName}</span>
  7799. </FormItem>
  7800. </div>
  7801. <div className="clearfix">
  7802. <FormItem
  7803. className="half-item"
  7804. {...formItemLayout}
  7805. label="当前进度"
  7806. >
  7807. <span>
  7808. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  7809. {this.state.detailChange.processState === 2 ||
  7810. this.state.detailChange.processState === 3
  7811. ? shenghePeo(
  7812. this.state.detailChange.processState === 2
  7813. ? this.state.detailChange.consultantExamine
  7814. : this.state.detailChange.managerExamine,
  7815. this.state.detailChange.processState
  7816. )
  7817. : getProcessStatusNew(
  7818. this.state.detailChange.processState,
  7819. this.state.detailChange.status
  7820. )}
  7821. </span>
  7822. </FormItem>
  7823. {/* <FormItem
  7824. className="half-item"
  7825. {...formItemLayout}
  7826. label="申请变更部门"
  7827. >
  7828. <span>{this.state.depName}</span>
  7829. </FormItem> */}
  7830. <FormItem
  7831. {...formItemLayout}
  7832. className="half-item"
  7833. label="变更类型"
  7834. >
  7835. <span>
  7836. {getChangeType(
  7837. this.state.detailChange.typeChange
  7838. )}
  7839. </span>
  7840. </FormItem>
  7841. </div>
  7842. {/* <div className="clearfix">
  7843. <FormItem
  7844. labelCol={{ span: 4 }}
  7845. wrapperCol={{ span: 18 }}
  7846. label="变更类型"
  7847. >
  7848. <span>
  7849. {getChangeType(
  7850. this.state.detailChange.typeChange
  7851. )}
  7852. </span>
  7853. </FormItem>
  7854. </div> */}
  7855. <div className="clearfix">
  7856. <FormItem
  7857. {...formItemLayout}
  7858. className="half-item"
  7859. label="合同额(万元)"
  7860. >
  7861. <span>
  7862. {this.state.detailChange.totalAmount}
  7863. </span>
  7864. </FormItem>
  7865. <FormItem
  7866. {...formItemLayout}
  7867. className="half-item"
  7868. label="已收款(万元)"
  7869. >
  7870. <span>
  7871. {this.state.detailChange.settlementAmount}
  7872. </span>
  7873. </FormItem>
  7874. </div>
  7875. <div className="clearfix">
  7876. <FormItem
  7877. {...formItemLayout}
  7878. className="half-item"
  7879. label="欠款(万元)"
  7880. >
  7881. <span>{this.state.detailChange.arrears}</span>
  7882. </FormItem>
  7883. <FormItem
  7884. {...formItemLayout}
  7885. className="half-item"
  7886. label="申请退款(万元)"
  7887. >
  7888. <span>
  7889. {this.state.detailChange.changeAmount}
  7890. </span>
  7891. </FormItem>
  7892. </div>
  7893. <div className="clearfix">
  7894. <FormItem
  7895. style={{ height: "auto" }}
  7896. labelCol={{ span: 4 }}
  7897. wrapperCol={{ span: 18 }}
  7898. label="变更原因"
  7899. >
  7900. <span>{this.state.detailChange.remarksC}</span>
  7901. </FormItem>
  7902. </div>
  7903. <div className="clearfix">
  7904. <FormItem
  7905. style={{ height: "auto" }}
  7906. labelCol={{ span: 4 }}
  7907. wrapperCol={{ span: 18 }}
  7908. label="备注"
  7909. >
  7910. <span>
  7911. {this.state.detailChange.startRemarks}
  7912. </span>
  7913. </FormItem>
  7914. </div>
  7915. {/* ---- */}
  7916. <div className="clearfix">
  7917. <FormItem
  7918. labelCol={{ span: 4 }}
  7919. wrapperCol={{ span: 18 }}
  7920. label="变更凭证"
  7921. >
  7922. <div>
  7923. <div
  7924. style={{
  7925. paddingTop: "10px",
  7926. }}
  7927. >
  7928. {this.state.detailChange &&
  7929. this.state.detailChange.voucherUrl &&
  7930. this.state.activeKey === "3" &&
  7931. this.state.visible ? (
  7932. <ImgList
  7933. fileList={
  7934. this.state.detailChange.voucherUrl
  7935. }
  7936. ItemWidth={"96px"}
  7937. />
  7938. ) : (
  7939. <div />
  7940. )}
  7941. </div>
  7942. {this.state.status === 3 ? (
  7943. <Button
  7944. type="danger"
  7945. style={{
  7946. float: "right",
  7947. backgroundColor: "red",
  7948. color: "white",
  7949. position: "absolute",
  7950. right: 0,
  7951. height: 50,
  7952. borderRadius: 20,
  7953. zIndex: 100,
  7954. top: 0,
  7955. }}
  7956. onClick={(e) => {
  7957. e.stopPropagation();
  7958. this.showConfirmChange(
  7959. this.deleteChange
  7960. );
  7961. }}
  7962. >
  7963. 取消本次变更
  7964. </Button>
  7965. ) : (
  7966. ""
  7967. )}
  7968. </div>
  7969. </FormItem>
  7970. </div>
  7971. {
  7972. this.state.detailChange.contractPictureUrl.length != 0 &&
  7973. <div className="clearfix">
  7974. <FormItem
  7975. labelCol={{ span: 4 }}
  7976. wrapperCol={{ span: 18 }}
  7977. label="最新合同"
  7978. >
  7979. <div style={{ paddingTop: 10 }}>
  7980. <ImgList
  7981. fileList={
  7982. this.state.detailChange.contractPictureUrl
  7983. }
  7984. ItemWidth={"96px"}
  7985. />
  7986. </div>
  7987. </FormItem>
  7988. </div>
  7989. }
  7990. <ul
  7991. style={{
  7992. width: "868px",
  7993. overflow: "hidden",
  7994. paddingLeft: "90px",
  7995. paddingTop: "10px",
  7996. position: "relative",
  7997. bottom: "20px",
  7998. fontSize: "12px",
  7999. color: "rgba(0, 0, 0, 0.65)",
  8000. }}
  8001. >
  8002. {/* <span>操作人:</span> */}
  8003. {this.state.logData.map((item, index) => {
  8004. if (item.status == 0) {
  8005. item.status = "发起";
  8006. } else if (item.status == 1) {
  8007. item.status = "审核中";
  8008. } else if (item.status == 2) {
  8009. item.status = "通过";
  8010. } else if (item.status == 3) {
  8011. item.status = "驳回";
  8012. } else if (item.status == 4) {
  8013. item.status = "完成";
  8014. }
  8015. return (
  8016. <li
  8017. key={index}
  8018. style={{
  8019. width: "100%",
  8020. height: "auto",
  8021. wordBreak: "break-all",
  8022. marginBottom: "10px",
  8023. }}
  8024. >
  8025. {item.aname +
  8026. ":" +
  8027. "(" +
  8028. item.status +
  8029. ")" +
  8030. item.remarks}
  8031. </li>
  8032. );
  8033. })}
  8034. </ul>
  8035. {/* 动态展示项目以及催款节点 */}
  8036. <div>
  8037. <div>
  8038. <span
  8039. style={{
  8040. marginLeft: "50px",
  8041. fontSize: "20px",
  8042. }}
  8043. >
  8044. 项目业务
  8045. </span>
  8046. </div>
  8047. <div
  8048. className="patent-table"
  8049. style={{ marginBottom: 10 }}
  8050. >
  8051. <Spin spinning={this.state.loading}>
  8052. <Table
  8053. columns={this.state.detailColumns}
  8054. dataSource={this.state.proDataSource}
  8055. expandedRowRender={expandedRowRenderDetail}
  8056. pagination={this.state.pagination}
  8057. // onRowClick={this.tableRowClick}
  8058. onRowClick={(record) => {
  8059. this.setState({
  8060. dataInfor: record,
  8061. infoVisible: true
  8062. })
  8063. }}
  8064. rowClassName={this.addRowColor}
  8065. bordered
  8066. size="small"
  8067. />
  8068. </Spin>
  8069. </div>
  8070. <div>
  8071. <span
  8072. style={{
  8073. marginLeft: "50px",
  8074. fontSize: "20px",
  8075. }}
  8076. >
  8077. 催款节点
  8078. </span>
  8079. </div>
  8080. <div className="clearfix">
  8081. <Spin spinning={this.state.loading}>
  8082. <Form layout="horizontal">
  8083. <Table
  8084. pagination={false}
  8085. columns={this.state.detailContactsLists}
  8086. dataSource={this.state.cuiDataSource}
  8087. scroll={{ x: "max-content", y: 0 }}
  8088. bordered
  8089. size="small"
  8090. />
  8091. <Col
  8092. span={24}
  8093. offset={9}
  8094. style={{ marginTop: "15px" }}
  8095. ></Col>
  8096. </Form>
  8097. </Spin>
  8098. </div>
  8099. </div>
  8100. </div>
  8101. </TabPane>
  8102. ) : (
  8103. ""
  8104. )}
  8105. </Tabs>
  8106. }
  8107. </div>
  8108. </Spin>
  8109. </Form>
  8110. </Modal>
  8111. {
  8112. // 添加变更项目
  8113. this.state.changeVisible &&
  8114. <NewAddProject
  8115. type="change"
  8116. children="list"
  8117. typeChange={this.state.typeChange}
  8118. cid={this.state.changeId}
  8119. readOnly={false}
  8120. orderNo={this.state.orderNo}
  8121. visible={this.state.changeVisible}
  8122. newData={this.state.newData}
  8123. onCancel={() => [this.nextCancel("change")]}
  8124. />
  8125. }
  8126. {
  8127. // 编辑变更项目
  8128. this.state.editProVisible &&
  8129. <NewEditProject
  8130. type="change"
  8131. children="list"
  8132. typeChange={this.state.typeChange}
  8133. cid={this.state.changeId}
  8134. readOnly={false}
  8135. orderNo={this.props.datauser.orderNo}
  8136. visible={this.state.editProVisible}
  8137. dataInfor={this.state.dataInfor}
  8138. newData={this.state.newData}
  8139. onCancel={() => [this.nextCancel("change")]}
  8140. />
  8141. }
  8142. {this.state.lookVisible ? (
  8143. <Modal
  8144. maskClosable={false}
  8145. visible={this.state.lookVisible}
  8146. onOk={this.noCancel}
  8147. onCancel={this.noCancel}
  8148. width="800px"
  8149. title={"退单申请"}
  8150. footer=""
  8151. className="admin-desc-content"
  8152. >
  8153. <Form layout="horizontal">
  8154. <Spin spinning={this.state.loading}>
  8155. <div className="clearfix">
  8156. <FormItem
  8157. labelCol={{ span: 4 }}
  8158. wrapperCol={{ span: 16 }}
  8159. label="终止合同"
  8160. >
  8161. <Picture
  8162. domId={"addService6"}
  8163. fileList={(e) => {
  8164. this.setState({ contractUrl: e });
  8165. }}
  8166. pictureUrl={this.state.contractUrl}
  8167. visible={this.props.visible}
  8168. data={{
  8169. sign: "order_refund_file",
  8170. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8171. number: 8,
  8172. }}
  8173. />
  8174. </FormItem>
  8175. </div>
  8176. <div className="clearfix">
  8177. <FormItem
  8178. labelCol={{ span: 4 }}
  8179. wrapperCol={{ span: 16 }}
  8180. label="退单申请表"
  8181. >
  8182. <Picture
  8183. domId={"addService7"}
  8184. fileList={(e) => {
  8185. this.setState({ applicationUrl: e });
  8186. }}
  8187. pictureUrl={this.state.applicationUrl}
  8188. visible={this.props.visible}
  8189. data={{
  8190. sign: "order_refund_file",
  8191. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8192. number: 8,
  8193. }}
  8194. />
  8195. </FormItem>
  8196. </div>
  8197. <div className="clearfix">
  8198. <FormItem
  8199. labelCol={{ span: 4 }}
  8200. wrapperCol={{ span: 16 }}
  8201. label="退单理由"
  8202. >
  8203. <Input
  8204. type="textarea"
  8205. placeholder="请输入退单理由"
  8206. rows={4}
  8207. value={this.state.reason}
  8208. onChange={(e) => {
  8209. this.setState({ reason: e.target.value });
  8210. }}
  8211. />
  8212. </FormItem>
  8213. </div>
  8214. <div className="clearfix">
  8215. <Button
  8216. className="cancel"
  8217. type="primary"
  8218. onClick={this.tuidanOk}
  8219. style={{ marginLeft: "50px" }}
  8220. htmlType="submit"
  8221. >
  8222. 确定退单
  8223. </Button>
  8224. <Button
  8225. className="cancel"
  8226. type="ghost"
  8227. onClick={this.noCancel}
  8228. style={{ marginLeft: "50px" }}
  8229. >
  8230. 取消
  8231. </Button>
  8232. </div>
  8233. </Spin>
  8234. </Form>
  8235. </Modal>
  8236. ) : (
  8237. <div />
  8238. )}
  8239. <Modal
  8240. maskClosable={false}
  8241. title={
  8242. isNaN(parseFloat(this.state.appropriationRatio))
  8243. ? "修改催款节点金额"
  8244. : "修改催款节点比例"
  8245. }
  8246. visible={this.state.editCuiVisible}
  8247. onOk={() => {
  8248. this.submitEditCui(
  8249. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  8250. );
  8251. }}
  8252. okText={"保存"}
  8253. width={300}
  8254. onCancel={(e) => {
  8255. this.setState({
  8256. editCuiVisible: false,
  8257. appropriationRatio: "",
  8258. });
  8259. }}
  8260. >
  8261. <div className="clearfix">
  8262. <FormItem
  8263. labelCol={{ span: 6 }}
  8264. wrapperCol={{ span: 14 }}
  8265. label={
  8266. isNaN(parseFloat(this.state.appropriationRatio))
  8267. ? "催款金额"
  8268. : "催款比例"
  8269. }
  8270. >
  8271. <Input
  8272. type="number"
  8273. placeholder={
  8274. isNaN(parseFloat(this.state.appropriationRatio))
  8275. ? "请输入金额"
  8276. : "请输入比例"
  8277. }
  8278. rows={4}
  8279. value={this.state.editCuiMoney}
  8280. onChange={(e) => {
  8281. this.setState({ editCuiMoney: e.target.value });
  8282. }}
  8283. />
  8284. </FormItem>
  8285. </div>
  8286. </Modal>
  8287. <OrderRiZi
  8288. dataSourcerizhi={this.state.dataSourcerizhi}
  8289. closeOrderLog={this.closeOrderLog}
  8290. visible={this.state.rizhivisible}
  8291. loading={this.state.loading}
  8292. />
  8293. {
  8294. // 添加项目
  8295. this.state.projectOperationVisible &&
  8296. <NewAddProject
  8297. readOnly={
  8298. this.state.dataInfor &&
  8299. Object.keys(this.state.dataInfor).length > 0 &&
  8300. this.state.processStatus !== 0
  8301. }
  8302. orderNo={this.props.datauser.orderNo}
  8303. visible={this.state.projectOperationVisible}
  8304. newData={this.state.newData}
  8305. onCancel={this.nextCancel}
  8306. />
  8307. }
  8308. {
  8309. // 编辑项目
  8310. this.state.editProjectOperationVisible &&
  8311. <NewEditProject
  8312. readOnly={
  8313. this.state.dataInfor &&
  8314. Object.keys(this.state.dataInfor).length > 0 &&
  8315. this.state.processStatus !== 0
  8316. }
  8317. orderNo={this.props.datauser.orderNo}
  8318. visible={this.state.editProjectOperationVisible}
  8319. dataInfor={this.state.dataInfor}
  8320. newData={this.state.newData}
  8321. onCancel={this.nextCancel}
  8322. />
  8323. }
  8324. {
  8325. // 会员项目添加
  8326. this.state.vipVisible &&
  8327. <NewAddProject
  8328. type="vipAdd"
  8329. readOnly={
  8330. this.state.dataInfor &&
  8331. Object.keys(this.state.dataInfor).length > 0 &&
  8332. this.state.processStatus !== 0
  8333. }
  8334. orderNo={this.props.datauser.orderNo}
  8335. visible={this.state.vipVisible}
  8336. newData={this.state.newData}
  8337. onCancel={this.nextCancel}
  8338. />
  8339. // <ProjectOperationVip
  8340. // readOnly={
  8341. // this.state.dataInfor &&
  8342. // Object.keys(this.state.dataInfor).length > 0 &&
  8343. // this.state.processStatus !== 0
  8344. // }
  8345. // orderNo={this.props.datauser.orderNo}
  8346. // visible={this.state.vipVisible}
  8347. // dataInfor={this.state.dataInfor}
  8348. // newData={this.state.newData}
  8349. // onCancel={this.nextCancel}
  8350. // />
  8351. }
  8352. {
  8353. // 变更记录详情
  8354. this.state.infoVisible &&
  8355. <NewEditProject
  8356. children="list"
  8357. type="change"
  8358. readOnly={
  8359. this.state.dataInfor &&
  8360. Object.keys(this.state.dataInfor).length > 0 &&
  8361. this.state.processStatus !== 0
  8362. }
  8363. visible={this.state.infoVisible}
  8364. dataInfor={this.state.dataInfor}
  8365. onCancel={() => { this.setState({ infoVisible: false }) }}
  8366. />
  8367. }
  8368. </div>
  8369. );
  8370. },
  8371. })
  8372. );
  8373. export default Form.create()(NewService);