addService.jsx 273 KB

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