addService.jsx 273 KB

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