addService.jsx 261 KB

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