addService.jsx 261 KB

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