addService.jsx 311 KB

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