addService.jsx 260 KB

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