addService.jsx 279 KB

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