myTask.jsx 217 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167
  1. import React from 'react'
  2. import $ from 'jquery'
  3. import moment from 'moment'
  4. import Picture from '@/manageCenter/publicComponent/picture'
  5. import '@/manageCenter/financialManage/distribute/public.less'
  6. import '@/manageCenter/financialManage/distribute/shouKuan.less'
  7. import OrderDetail from '../../order/orderNew/changeComponent/orderDetail'
  8. import ResolutionDetail from '@/resolutionDetail'
  9. import {Button,
  10. Form,
  11. Input,
  12. Select,
  13. Spin,
  14. Table,
  15. message,
  16. DatePicker,
  17. Modal,
  18. Radio,
  19. Cascader,
  20. Popconfirm,
  21. Switch,
  22. Tabs,
  23. Col,
  24. Icon,
  25. Upload,
  26. AutoComplete,
  27. Tag, Row,
  28. } from 'antd'
  29. import Assign from '@/manageCenter/publicComponent/assign'
  30. import { areaSelect } from '@/NewDicProvinceList'
  31. import { ChooseList } from '../../order/orderNew/chooseList'
  32. import OrderRiZi from '@/orderRiZi.jsx'
  33. import './table.less'
  34. import {getMaterialStatus,
  35. getUrgentStatus,
  36. getProcessStatus,
  37. getApproval,
  38. getTaskStatus,
  39. getLiquidationStatus,
  40. getProjectStatus,
  41. splitUrl,
  42. getboutique,
  43. ShowModal,
  44. getRefundStatus,} from '@/tools'
  45. import { taskStatus, projectStatus, cuiJieDian } from '@/dataDic.js'
  46. import ShowModalDiv from '@/showModal.jsx'
  47. import CheckProject from '../../components/checkProject';
  48. import NewSupplier from './newSupplier';
  49. import ImgList from "../../../common/imgList";
  50. import OperationPayNode from "./operationPayNode";
  51. import {object} from "prop-types";
  52. const confirm = Modal.confirm
  53. const FormItem = Form.Item
  54. const { TabPane } = Tabs
  55. const { TextArea } = Input
  56. const { Option } = Select
  57. const { MonthPicker, RangePicker } = DatePicker
  58. const PicturesWall = React.createClass({
  59. getInitialState() {
  60. return {
  61. fileList: [],
  62. }
  63. },
  64. handleChange(info) {
  65. let fileList = info.fileList
  66. this.setState({
  67. fileList,
  68. })
  69. this.props.fileList(fileList)
  70. },
  71. componentWillReceiveProps(nextProps) {
  72. this.state.fileList = nextProps.pictureUrl
  73. this.state.pojectApplicationUrl = undefined
  74. },
  75. render() {
  76. const { fileList } = this.state
  77. return (
  78. <div style={{ display: 'inline-block' }}>
  79. <ImgList
  80. domId={this.props.domId}
  81. uploadConfig={{
  82. action:globalConfig.context + '/api/admin/outsourceOrg/uploadOutsourceFile',
  83. multiple:true,
  84. data:{ sign: 'order_outsource' },
  85. listType:"picture-card",
  86. }}
  87. onChange={(infor)=>{
  88. this.handleChange(infor)
  89. }}
  90. fileList={fileList}
  91. />
  92. </div>
  93. )
  94. },
  95. })
  96. const Task = React.createClass({
  97. loadData(pageNo) {
  98. this.state.data = []
  99. this.setState({
  100. page: pageNo,
  101. loading: true,
  102. })
  103. $.ajax({
  104. method: 'get',
  105. dataType: 'json',
  106. crossDomain: false,
  107. url: globalConfig.context + '/api/admin/orderProject/orderTaskList',
  108. data: {
  109. pageNo: pageNo || 1,
  110. pageSize: this.state.pagination.pageSize,
  111. specially: 0, //个人
  112. name: this.state.nameSearch, //客户名称
  113. depId: this.state.departmenttSearch, //订单部门
  114. orderNo: this.state.orderNoSearch, //订单编号
  115. contractNo: this.state.contractNoSearch, //合同编号
  116. taskId: this.state.taskNoSearch, //项目编号
  117. taskStatus: this.state.taskStatuSearch, //项目状态
  118. projectStatus: this.state.projectStatusSearch, //项目状态
  119. adminName: this.state.adminName, //项目受理人
  120. approval: this.state.approvalSearch, //特批状态搜索
  121. outsourceStatus:
  122. this.state.outsourceStatusSearch >= 999
  123. ? undefined
  124. : this.state.outsourceStatusSearch, //外包状态搜索
  125. },
  126. success: function (data) {
  127. ShowModal(this)
  128. let theArr = []
  129. if (!data.data || !data.data.list) {
  130. if (data.error && data.error.length) {
  131. message.warning(data.error[0].message)
  132. }
  133. } else {
  134. for (let i = 0; i < data.data.list.length; i++) {
  135. let thisdata = data.data.list[i];
  136. thisdata.key = i;
  137. thisdata.userName = thisdata.taskName.substring(0, 5) === '软件著作权'
  138. ? thisdata.userName +
  139. '(' +
  140. thisdata.commodityQuantity.toString() +
  141. '/' +
  142. thisdata.alreadyNumber +
  143. ')'
  144. : thisdata.userName;
  145. theArr.push(thisdata)
  146. }
  147. }
  148. this.state.pagination.current = data.data.pageNo
  149. this.state.pagination.total = data.data.totalCount
  150. if (data.data && data.data.list && !data.data.list.length) {
  151. this.state.pagination.current = 0
  152. this.state.pagination.total = 0
  153. }
  154. this.setState({
  155. dataSource: theArr,
  156. pagination: this.state.pagination,
  157. })
  158. }.bind(this),
  159. }).always(
  160. function () {
  161. this.setState({
  162. loading: false,
  163. })
  164. }.bind(this)
  165. )
  166. },
  167. getInitialState() {
  168. return {
  169. audit: 1,
  170. projectType: '', //项目分类
  171. paySubject: [],
  172. paySubjectName: '', //付款科目名称
  173. PayNodeCompany: [],
  174. thirdMaterial: 0, //第三方信息材料 0-无 1-有
  175. thirdUrgent: 0, //第三方信息加急状态
  176. thirdCompanyName: '',
  177. thirdUnitPrice: '',
  178. currentCompanyName: '', //当前选中供应商名称
  179. thirdQuantity: 1,
  180. payNodeQuantity: 1,
  181. thirdRemarks: '',
  182. customerArr: [],
  183. currentTotalPrice: 0, //当前修改页面的总价
  184. saveThirdList: [],
  185. orderData: [],
  186. orderNo: '',
  187. jiedian: [],
  188. jiedianNew: [],
  189. timeVisible: false,
  190. ThirdListVisible: false,
  191. PayNodeVisible: false, //新增付款节点
  192. searchMore: true,
  193. assignVisible: false,
  194. releaseDate: [],
  195. patentType: -1,
  196. patentNameType: -1,
  197. startType: 0, //外包供应商类型
  198. // 判断是否是退回给咨询师经理
  199. flag: false,
  200. roleName: '',
  201. activeKey: '1',
  202. //特批状态搜索
  203. approvalSearch: undefined,
  204. testFlag: true,
  205. boHuivisible: false,
  206. selectedRowKeys: [],
  207. avisible: false,
  208. departmentArr: [],
  209. selectedRows: [],
  210. attachmentUrl: [],
  211. contactList: [],
  212. paginations: false,
  213. loading: false,
  214. pagination: {
  215. defaultCurrent: 1,
  216. defaultPageSize: 10,
  217. showQuickJumper: true,
  218. pageSize: 10,
  219. onChange: function (page) {
  220. this.loadData(page)
  221. }.bind(this),
  222. showTotal: function (total) {
  223. return '共' + total + '条数据'
  224. },
  225. },
  226. // 子组件改变的表格title数组
  227. changeList: undefined,
  228. columnsTime: [
  229. {
  230. title: '工作时长(小时)',
  231. dataIndex: 'hours',
  232. key: 'hours',
  233. },
  234. {
  235. title: '工作时间',
  236. dataIndex: 'taskDays',
  237. key: 'taskDays',
  238. },
  239. // {
  240. // title: "项目负责人",
  241. // dataIndex: "remarks",
  242. // key: "remarks"
  243. // },
  244. {
  245. title: '备注',
  246. dataIndex: 'remarks',
  247. key: 'remarks',
  248. },
  249. ],
  250. columns: [
  251. {
  252. title: '项目编号',
  253. dataIndex: 'id',
  254. key: 'id',
  255. render: (text, record) => {
  256. if (record.splitStatus == 2) {
  257. return <span>{record.splitSuper + '-' + record.splitId}</span>
  258. } else {
  259. return text
  260. }
  261. },
  262. },
  263. {
  264. title: '项目名称',
  265. dataIndex: 'taskName',
  266. key: 'taskName',
  267. render: (text) => {
  268. return text && text.length > 8 ? text.substr(0, 8) + '…' : text
  269. },
  270. },
  271. {
  272. title: '项目数量',
  273. dataIndex: 'commodityQuantity',
  274. key: 'commodityQuantity',
  275. },
  276. {
  277. title: '订单编号',
  278. dataIndex: 'orderNo',
  279. key: 'orderNo',
  280. },
  281. {
  282. title: '合同编号',
  283. dataIndex: 'contractNo',
  284. key: 'contractNo',
  285. },
  286. {
  287. title: '业务类别',
  288. dataIndex: 'cname',
  289. key: 'cname',
  290. },
  291. {
  292. title: '客户名称',
  293. dataIndex: 'userName',
  294. key: 'userName',
  295. className: 'userName',
  296. },
  297. {
  298. title: '分配状态',
  299. dataIndex: 'taskStatus',
  300. key: 'taskStatus',
  301. render: (text) => {
  302. return getTaskStatus(text)
  303. },
  304. },
  305. {
  306. title: '项目状态',
  307. dataIndex: 'projectStatus',
  308. key: 'projectStatus',
  309. render: (text) => {
  310. return getProjectStatus(text)
  311. },
  312. },
  313. {
  314. title: '审核状态',
  315. dataIndex: 'outsourceStatus',
  316. key: 'outsourceStatus',
  317. render: (text,record) => {
  318. if(record.outsourceType === 1){
  319. return '供应商'
  320. }else{
  321. if (text === 0) {
  322. return <Tag color="#f50">外包待审核</Tag>
  323. } else if (text === 1) {
  324. return <Tag color="#87d068">外包已通过</Tag>
  325. } else if (text === 2) {
  326. return <Tag color="#2db7f5">外包被驳回</Tag>
  327. } else {
  328. return <div style={{textAlign:'center'}}>/</div>
  329. }
  330. return text
  331. }
  332. },
  333. },
  334. {
  335. title: '分配时间',
  336. dataIndex: 'taskDate',
  337. key: 'taskDate',
  338. },
  339. {
  340. title: '订单部门',
  341. dataIndex: 'depName',
  342. key: 'depName',
  343. },
  344. {
  345. title: '累计工时(小时)',
  346. dataIndex: 'hours',
  347. key: 'hours',
  348. },
  349. {
  350. title: "项目金额(万元)",
  351. dataIndex: "commodityPrice",
  352. key: "commodityPrice",
  353. },
  354. {
  355. title: "外包成本(万元)",
  356. dataIndex: "costAmount",
  357. key: "costAmount",
  358. render: (text, record) => {
  359. return (<span>
  360. {
  361. isNaN(parseFloat(text)) ? text : parseFloat(text)
  362. }
  363. </span>)
  364. }
  365. },
  366. {
  367. title: "已付(万元)",
  368. dataIndex: "partyAmount",
  369. key: "partyAmount",
  370. render: (text, record) => {
  371. return (<span>
  372. {
  373. isNaN(parseFloat(text)) ? text : parseFloat(text)
  374. }
  375. </span>)
  376. }
  377. },
  378. {
  379. title: '操作',
  380. dataIndex: 'caozuo',
  381. key: 'caozuo',
  382. render: (text, record) => {
  383. return (
  384. <div>
  385. <Button
  386. type="primary"
  387. onClick={(e) => {
  388. e.stopPropagation(), this.evaluate(record, '咨询师')
  389. }}
  390. >
  391. 转交
  392. </Button>
  393. <Button
  394. type="primary"
  395. style={{ marginLeft: 10 }}
  396. onClick={(e) => {
  397. e.stopPropagation(),
  398. this.evaluate(record, '咨询师经理', true)
  399. }}
  400. >
  401. 回退
  402. </Button>
  403. <Button
  404. type="primary"
  405. style={{ margin: '0 10px' }}
  406. onClick={(e) => {
  407. e.stopPropagation(), this.okCancel(record)
  408. }}
  409. >
  410. 添加工时
  411. </Button>
  412. <Button
  413. type="primary"
  414. onClick={(e) => {
  415. e.stopPropagation()
  416. this.setState({
  417. timeVisible: true,
  418. })
  419. this.timeDetail(record)
  420. }}
  421. >
  422. 工时记录
  423. </Button>
  424. </div>
  425. )
  426. },
  427. },
  428. ],
  429. dataSource: [],
  430. searchTime: [],
  431. columnsX: [
  432. {
  433. title: '业务项目名称',
  434. dataIndex: 'commodityName',
  435. key: 'commodityName',
  436. },
  437. {
  438. title: '项目类别',
  439. dataIndex: 'cname',
  440. key: 'cname',
  441. },
  442. {
  443. title: '项目数量',
  444. dataIndex: 'commodityQuantity',
  445. key: 'commodityQuantity',
  446. render: (text, record) => {
  447. if (record.splitStatus == 1) {
  448. return (
  449. <span>
  450. {text}{' '}
  451. <Tag
  452. color="#108ee9"
  453. onClick={(e) => {
  454. e.stopPropagation()
  455. this.showRes(record)
  456. }}
  457. >
  458. 已拆
  459. </Tag>
  460. </span>
  461. )
  462. } else {
  463. return text
  464. }
  465. },
  466. },
  467. {
  468. title: '金额(万元)',
  469. dataIndex: 'commodityPrice',
  470. key: 'commodityPrice',
  471. },
  472. {
  473. title: '负责人',
  474. dataIndex: 'contacts',
  475. key: 'contacts',
  476. },
  477. {
  478. title: '负责人电话',
  479. dataIndex: 'contactsMobile',
  480. key: 'contactsMobile',
  481. },
  482. {
  483. title: '主要项目',
  484. dataIndex: 'main',
  485. key: 'main',
  486. render: (text) => {
  487. return text ? '是' : '否'
  488. },
  489. },
  490. {
  491. title: '项目说明',
  492. dataIndex: 'taskComment',
  493. key: 'taskComment',
  494. render: (text) => {
  495. return text && text.length > 8 ? text.substr(0, 8) + '…' : text
  496. },
  497. },
  498. ],
  499. columnsA: [
  500. {
  501. title: '流程',
  502. dataIndex: 'content',
  503. key: 'content',
  504. align: 'center',
  505. },
  506. {
  507. title: '操作人',
  508. dataIndex: 'aName',
  509. key: 'aName',
  510. align: 'center',
  511. },
  512. {
  513. title: '时间',
  514. dataIndex: 'createTimes',
  515. key: 'createTimes',
  516. align: 'center',
  517. },
  518. ],
  519. dataSourceX: [],
  520. dataSourceA: [],
  521. ContactsLists: [
  522. {
  523. title: '批次',
  524. dataIndex: 'num',
  525. key: 'num',
  526. },
  527. {
  528. title: '下证时间',
  529. dataIndex: 'licenceTimes',
  530. key: 'licenceTimes',
  531. render: (text, record) => {
  532. return (
  533. <div>
  534. <DatePicker
  535. style={{ marginTop: '5px' }}
  536. showTime
  537. format="YYYY-MM-DD"
  538. onOk={() => {}}
  539. value={
  540. record.licenceTimes ? moment(record.licenceTimes) : null
  541. }
  542. onChange={(data, dataString) => {
  543. record.licenceTimes = dataString
  544. this.setState({ contactList: this.state.contactList })
  545. }}
  546. />
  547. </div>
  548. )
  549. },
  550. },
  551. {
  552. title: '下证数量',
  553. dataIndex: 'alreadyNumber',
  554. key: 'alreadyNumber',
  555. render: (text, record) => {
  556. return (
  557. <div>
  558. {
  559. <Input
  560. value={record.alreadyNumber}
  561. placeholder="请输入下证数量"
  562. key={record.id}
  563. required="required"
  564. onChange={(e) => {
  565. record.alreadyNumber = e.target.value
  566. this.setState({ contactList: this.state.contactList })
  567. }}
  568. style={{ width: '120px' }}
  569. />
  570. }
  571. </div>
  572. )
  573. },
  574. },
  575. {
  576. title: '未下证数量',
  577. dataIndex: 'notCount',
  578. key: 'notCount',
  579. },
  580. {
  581. title: '操作',
  582. dataIndex: 'dels',
  583. key: 'dels',
  584. render: (text, record, index) => {
  585. return (
  586. <div>
  587. {
  588. <Popconfirm
  589. title="是否删除?"
  590. onConfirm={() => {
  591. this.confirmDelet(record)
  592. }}
  593. okText="删除"
  594. cancelText="不删除"
  595. >
  596. <Button
  597. style={{
  598. marginRight: '10px',
  599. color: '#ffffff',
  600. background: '#f00',
  601. border: 'none',
  602. }}
  603. >
  604. 删除
  605. </Button>
  606. </Popconfirm>
  607. }
  608. {record.flag ? (
  609. ''
  610. ) : (
  611. <Button
  612. type="primary"
  613. onClick={(e) => {
  614. e.stopPropagation(), this.contactSave(record, index)
  615. }}
  616. >
  617. 保存
  618. </Button>
  619. )}
  620. </div>
  621. )
  622. },
  623. },
  624. ],
  625. // 专利
  626. ContactsListsNew: [],
  627. //付款节点表头
  628. PayNodeTableColunms: [],
  629. }
  630. },
  631. /* 分派 */
  632. evaluate(record, nub, flag) {
  633. this.setState(
  634. {
  635. nub: nub,
  636. assignData: record,
  637. flag,
  638. },
  639. () => {
  640. this.setState({
  641. assignVisible: true,
  642. })
  643. }
  644. )
  645. },
  646. componentWillMount() {
  647. this.departmentList()
  648. this.loadData()
  649. },
  650. componentDidMount() {
  651. this.setColor()
  652. },
  653. //用于判断 第三方信息表格显示
  654. projectTypeTabContent(projectType) {
  655. if(projectType === 0 || !projectType || this.state.startType === 0){ //0正常 1专利 2软著 3审计 this.state.startType 0外包 1供应商 外包时当普通单处理
  656. this.setState({
  657. ContactsListsNew: [
  658. {
  659. title: '供应商名称',
  660. dataIndex: 'companyName',
  661. key: 'companyName',
  662. render: (text, record, index) => {
  663. if (text) {
  664. return <span>{text}</span>
  665. }
  666. },
  667. },
  668. {
  669. title: '单价(万元)',
  670. dataIndex: 'unitPrice',
  671. key: 'unitPrice',
  672. render: (text, record) => {
  673. if (text) {
  674. return <span>
  675. {
  676. isNaN(text) ? text : parseFloat(text)
  677. }
  678. </span>
  679. }
  680. },
  681. },
  682. {
  683. title: '数量',
  684. dataIndex: 'quantity',
  685. key: 'quantity',
  686. render: (text, record) => {
  687. if (text) {
  688. return <span>{text}</span>
  689. }
  690. },
  691. },
  692. {
  693. title: '总价(万元)',
  694. dataIndex: 'totalAmount',
  695. key: 'totalAmount',
  696. render: (text, record) => {
  697. return <span>
  698. {
  699. isNaN(text) ? text : parseFloat(text)
  700. }
  701. </span>
  702. },
  703. },
  704. {
  705. title: '备注',
  706. dataIndex: 'remarks',
  707. key: 'remarks',
  708. },
  709. {
  710. title: '操作',
  711. dataIndex: 'action',
  712. key: 'action',
  713. render: (text, record) => {
  714. return (
  715. <div>
  716. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  717. {/*存在支付节点时不显示第三方的申请付款*/}
  718. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  719. {
  720. <Button disabled={
  721. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  722. } type="primary" onClick={() => {
  723. this.setState({
  724. previewPayVisible: true,
  725. previewPayInfor: record,
  726. })
  727. }}>
  728. 申请付款
  729. </Button>
  730. }
  731. <Popconfirm
  732. title="是否删除?"
  733. onConfirm={() => {
  734. this.confirmDeletNew(record)
  735. }}
  736. okText="删除"
  737. cancelText="不删除"
  738. >
  739. <Button
  740. onClick={(e) => {
  741. e.stopPropagation()
  742. }}
  743. style={{
  744. marginLeft: '10px',
  745. color: '#ffffff',
  746. background: '#f00',
  747. border: 'none',
  748. }}
  749. >
  750. 删除
  751. </Button>
  752. </Popconfirm>
  753. </div>
  754. )
  755. },
  756. },
  757. ],
  758. })
  759. }else if(projectType === 2){ //2软著
  760. this.setState({
  761. ContactsListsNew: [
  762. {
  763. title: '供应商名称',
  764. dataIndex: 'companyName',
  765. key: 'companyName',
  766. render: (text, record, index) => {
  767. if (text) {
  768. return <span>{text}</span>
  769. }
  770. },
  771. },
  772. {
  773. title: '单价(万元)',
  774. dataIndex: 'unitPrice',
  775. key: 'unitPrice',
  776. render: (text, record) => {
  777. if (text) {
  778. return <span>
  779. {
  780. isNaN(text) ? text : parseFloat(text)
  781. }
  782. </span>
  783. }
  784. },
  785. },
  786. {
  787. title: '数量',
  788. dataIndex: 'quantity',
  789. key: 'quantity',
  790. render: (text, record) => {
  791. if (text) {
  792. return <span>{text}</span>
  793. }
  794. },
  795. },
  796. {
  797. title: '总价(万元)',
  798. dataIndex: 'totalAmount',
  799. key: 'totalAmount',
  800. render: (text, record) => {
  801. return <span>
  802. {
  803. isNaN(text) ? text : parseFloat(text)
  804. }
  805. </span>
  806. },
  807. },
  808. {
  809. title: '材料',
  810. dataIndex: 'material',
  811. key: 'material',
  812. render: (text, record) => {
  813. return getMaterialStatus(text)
  814. },
  815. },
  816. {
  817. title: '加急',
  818. dataIndex: 'urgent',
  819. key: 'urgent',
  820. render: (text, record) => {
  821. return getUrgentStatus(text)
  822. },
  823. },
  824. {
  825. title: '操作',
  826. dataIndex: 'action',
  827. key: 'action',
  828. render: (text, record) => {
  829. return (
  830. <div>
  831. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  832. {/*存在支付节点时不显示第三方的申请付款*/}
  833. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  834. {
  835. <Button disabled={
  836. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  837. } type="primary" onClick={() => {
  838. this.setState({
  839. previewPayVisible: true,
  840. previewPayInfor: record,
  841. })
  842. }}>
  843. 申请付款
  844. </Button>
  845. }
  846. <Popconfirm
  847. title="是否删除?"
  848. onConfirm={() => {
  849. this.confirmDeletNew(record)
  850. }}
  851. okText="删除"
  852. cancelText="不删除"
  853. >
  854. <Button
  855. onClick={(e) => {
  856. e.stopPropagation()
  857. }}
  858. style={{
  859. marginLeft: '10px',
  860. color: '#ffffff',
  861. background: '#f00',
  862. border: 'none',
  863. }}
  864. >
  865. 删除
  866. </Button>
  867. </Popconfirm>
  868. </div>
  869. )
  870. },
  871. },
  872. ],
  873. })
  874. }else if(projectType === 1){ //1专利
  875. if(this.state.patentType === 0){ //专利申请
  876. this.setState({
  877. ContactsListsNew: [
  878. {
  879. title: '供应商名称',
  880. dataIndex: 'companyName',
  881. key: 'companyName',
  882. render: (text, record, index) => {
  883. if (text) {
  884. return <span>{text}</span>
  885. }
  886. },
  887. },
  888. {
  889. title: '单价(万元)',
  890. dataIndex: 'unitPrice',
  891. key: 'unitPrice',
  892. render: (text, record) => {
  893. if (text) {
  894. return <span>
  895. {
  896. isNaN(text) ? text : parseFloat(text)
  897. }
  898. </span>
  899. }
  900. },
  901. },
  902. {
  903. title: '数量',
  904. dataIndex: 'quantity',
  905. key: 'quantity',
  906. render: (text, record) => {
  907. if (text) {
  908. return <span>{text}</span>
  909. }
  910. },
  911. },
  912. {
  913. title: "官费",
  914. dataIndex: "officialCost",
  915. key: "officialCost",
  916. render: (text) => {
  917. return text === 1 ? '有官费' : '无官费'
  918. },
  919. },
  920. {
  921. title: "费减",
  922. dataIndex: "costReduction",
  923. key: "costReduction",
  924. render: (text) => {
  925. return text === 1 ? '有费减' : '无费减'
  926. },
  927. },
  928. {
  929. title: '总价(万元)',
  930. dataIndex: 'totalAmount',
  931. key: 'totalAmount',
  932. render: (text, record) => {
  933. return <span>
  934. {
  935. isNaN(text) ? text : parseFloat(text)
  936. }
  937. </span>
  938. },
  939. },
  940. {
  941. title: '备注',
  942. dataIndex: 'remarks',
  943. key: 'remarks',
  944. },
  945. {
  946. title: '操作',
  947. dataIndex: 'action',
  948. key: 'action',
  949. render: (text, record) => {
  950. return (
  951. <div>
  952. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  953. {/*存在支付节点时不显示第三方的申请付款*/}
  954. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  955. {
  956. <Button disabled={
  957. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  958. } type="primary" onClick={() => {
  959. this.setState({
  960. previewPayVisible: true,
  961. previewPayInfor: record,
  962. })
  963. }}>
  964. 申请付款
  965. </Button>
  966. }
  967. {
  968. <Button
  969. type="primary"
  970. style={{
  971. marginLeft: '10px',
  972. }}
  973. disabled={!(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)}
  974. onClick={() => {
  975. this.setState({
  976. previewPayVisible: true,
  977. previewPayInfor: record,
  978. })
  979. }}>
  980. 付官费
  981. </Button>
  982. }
  983. <Popconfirm
  984. title="是否删除?"
  985. onConfirm={() => {
  986. this.confirmDeletNew(record)
  987. }}
  988. okText="删除"
  989. cancelText="不删除"
  990. >
  991. <Button
  992. onClick={(e) => {
  993. e.stopPropagation()
  994. }}
  995. style={{
  996. marginLeft: '10px',
  997. color: '#ffffff',
  998. background: '#f00',
  999. border: 'none',
  1000. }}
  1001. >
  1002. 删除
  1003. </Button>
  1004. </Popconfirm>
  1005. </div>
  1006. )
  1007. },
  1008. },
  1009. ]
  1010. })
  1011. }else{
  1012. this.setState({
  1013. ContactsListsNew: [
  1014. {
  1015. title: '供应商名称',
  1016. dataIndex: 'companyName',
  1017. key: 'companyName',
  1018. render: (text, record, index) => {
  1019. if (text) {
  1020. return <span>{text}</span>
  1021. }
  1022. },
  1023. },
  1024. {
  1025. title: '单价(万元)',
  1026. dataIndex: 'unitPrice',
  1027. key: 'unitPrice',
  1028. render: (text, record) => {
  1029. if (text) {
  1030. return <span>
  1031. {
  1032. isNaN(text) ? text : parseFloat(text)
  1033. }
  1034. </span>
  1035. }
  1036. },
  1037. },
  1038. {
  1039. title: '数量',
  1040. dataIndex: 'quantity',
  1041. key: 'quantity',
  1042. render: (text, record) => {
  1043. if (text) {
  1044. return <span>{text}</span>
  1045. }
  1046. },
  1047. },
  1048. {
  1049. title: '总价(万元)',
  1050. dataIndex: 'totalAmount',
  1051. key: 'totalAmount',
  1052. render: (text, record) => {
  1053. return <span>
  1054. {
  1055. isNaN(text) ? text : parseFloat(text)
  1056. }
  1057. </span>
  1058. },
  1059. },
  1060. {
  1061. title: '备注',
  1062. dataIndex: 'remarks',
  1063. key: 'remarks',
  1064. },
  1065. {
  1066. title: '操作',
  1067. dataIndex: 'action',
  1068. key: 'action',
  1069. render: (text, record) => {
  1070. return (
  1071. <div>
  1072. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  1073. {/*存在支付节点时不显示第三方的申请付款*/}
  1074. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  1075. {
  1076. <Button disabled={
  1077. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  1078. } type="primary" onClick={() => {
  1079. this.setState({
  1080. previewPayVisible: true,
  1081. previewPayInfor: record,
  1082. })
  1083. }}>
  1084. 申请付款
  1085. </Button>
  1086. }
  1087. <Popconfirm
  1088. title="是否删除?"
  1089. onConfirm={() => {
  1090. this.confirmDeletNew(record)
  1091. }}
  1092. okText="删除"
  1093. cancelText="不删除"
  1094. >
  1095. <Button
  1096. onClick={(e) => {
  1097. e.stopPropagation()
  1098. }}
  1099. style={{
  1100. marginLeft: '10px',
  1101. color: '#ffffff',
  1102. background: '#f00',
  1103. border: 'none',
  1104. }}
  1105. >
  1106. 删除
  1107. </Button>
  1108. </Popconfirm>
  1109. </div>
  1110. )
  1111. },
  1112. },
  1113. ]
  1114. })
  1115. }
  1116. }else if(projectType === 3){ //3审计
  1117. this.setState({
  1118. ContactsListsNew: [
  1119. {
  1120. title: '供应商名称',
  1121. dataIndex: 'companyName',
  1122. key: 'companyName',
  1123. render: (text, record, index) => {
  1124. if (text) {
  1125. return <span>{text}</span>
  1126. }
  1127. },
  1128. },
  1129. {
  1130. title: '单价(万元)',
  1131. dataIndex: 'unitPrice',
  1132. key: 'unitPrice',
  1133. render: (text, record) => {
  1134. if (text) {
  1135. return <span>
  1136. {
  1137. isNaN(text) ? text : parseFloat(text)
  1138. }
  1139. </span>
  1140. }
  1141. },
  1142. },
  1143. {
  1144. title: '数量',
  1145. dataIndex: 'quantity',
  1146. key: 'quantity',
  1147. render: (text, record) => {
  1148. if (text) {
  1149. return <span>{text}</span>
  1150. }
  1151. },
  1152. },
  1153. {
  1154. title: '总价(万元)',
  1155. dataIndex: 'totalAmount',
  1156. key: 'totalAmount',
  1157. render: (text, record) => {
  1158. return <span>
  1159. {
  1160. isNaN(text) ? text : parseFloat(text)
  1161. }
  1162. </span>
  1163. },
  1164. },
  1165. {
  1166. title: '审计',
  1167. dataIndex: 'audit',
  1168. key: 'audit',
  1169. render: (text, record) => {
  1170. if (text) {
  1171. return <span>{text===0?'无审计':text===1?'年审':'专审'}</span>
  1172. }
  1173. },
  1174. },
  1175. {
  1176. title: '公司资产(万元)',
  1177. dataIndex: 'assets',
  1178. key: 'assets',
  1179. render: (text, record) => {
  1180. if (text) {
  1181. return <span>{text}</span>
  1182. }
  1183. },
  1184. },
  1185. {
  1186. title: '收入(万元)',
  1187. dataIndex: 'income',
  1188. key: 'income',
  1189. render: (text, record) => {
  1190. return <span>
  1191. {
  1192. isNaN(text) ? text : parseFloat(text)
  1193. }
  1194. </span>
  1195. },
  1196. },
  1197. {
  1198. title: '操作',
  1199. dataIndex: 'action',
  1200. key: 'action',
  1201. render: (text, record) => {
  1202. return (
  1203. <div>
  1204. {/*外包审核通过后,咨询师/咨询经理可申请付款*/}
  1205. {/*存在支付节点时不显示第三方的申请付款*/}
  1206. {/*0-待审核 ,1-审核通过,2-审核拒绝 true [NULL]*/}
  1207. {
  1208. <Button disabled={
  1209. !(this.props.isPreviewPay && (this.props.status === 1 || parseInt(this.props.startType) === 1) && this.props.dataSource.length === 0)
  1210. } type="primary" onClick={() => {
  1211. this.setState({
  1212. previewPayVisible: true,
  1213. previewPayInfor: record,
  1214. })
  1215. }}>
  1216. 申请付款
  1217. </Button>
  1218. }
  1219. <Popconfirm
  1220. title="是否删除?"
  1221. onConfirm={() => {
  1222. this.confirmDeletNew(record)
  1223. }}
  1224. okText="删除"
  1225. cancelText="不删除"
  1226. >
  1227. <Button
  1228. onClick={(e) => {
  1229. e.stopPropagation()
  1230. }}
  1231. style={{
  1232. marginLeft: '10px',
  1233. color: '#ffffff',
  1234. background: '#f00',
  1235. border: 'none',
  1236. }}
  1237. >
  1238. 删除
  1239. </Button>
  1240. </Popconfirm>
  1241. </div>
  1242. )
  1243. },
  1244. },
  1245. ]
  1246. })
  1247. }
  1248. this.setState({
  1249. //付款节点表头
  1250. PayNodeTableColunms: [
  1251. {
  1252. title: '供应商名称',
  1253. dataIndex: 'companyName',
  1254. key: 'companyName',
  1255. render: (text, record, index) => {
  1256. if (text) {
  1257. return <span>{text}</span>
  1258. }
  1259. },
  1260. },
  1261. {
  1262. title: '付款科目',
  1263. dataIndex: 'dunType',
  1264. key: 'dunType',
  1265. render: (text, record) => {
  1266. if (text) {
  1267. return <span>{text}</span>
  1268. }
  1269. },
  1270. },
  1271. {
  1272. title: '付款时间',
  1273. dataIndex: 'partyTimes',
  1274. key: 'partyTimes',
  1275. render: (text, record) => {
  1276. return <span>{text ? text : '/'}</span>
  1277. },
  1278. },
  1279. {
  1280. title: '数量',
  1281. dataIndex: 'quantity',
  1282. key: 'quantity',
  1283. render: (text, record) => {
  1284. if (text) {
  1285. return <span>{text}</span>
  1286. }
  1287. },
  1288. },
  1289. {
  1290. title: '总价(万元)',
  1291. dataIndex: 'totalAmount',
  1292. key: 'totalAmount',
  1293. render: (text, record) => {
  1294. return <span>
  1295. {
  1296. isNaN(text) ? text : parseFloat(text)
  1297. }
  1298. </span>
  1299. },
  1300. },
  1301. {
  1302. title: '已付',
  1303. dataIndex: 'partyAmount',
  1304. key: 'partyAmount',
  1305. render: (text, record) => {
  1306. if (text) {
  1307. return <span>{text}</span>
  1308. }
  1309. },
  1310. },
  1311. {
  1312. title: '操作',
  1313. dataIndex: 'dels',
  1314. key: 'dels',
  1315. render: (text, record, index) => {
  1316. return (
  1317. <div>
  1318. <Popconfirm
  1319. title="是否删除?"
  1320. onConfirm={() => {
  1321. this.payNodeConfirmDeletNew(record)
  1322. }}
  1323. okText="删除"
  1324. cancelText="不删除"
  1325. >
  1326. <Button
  1327. onClick={(e) => {
  1328. e.stopPropagation()
  1329. }}
  1330. style={{
  1331. marginRight: '10px',
  1332. color: '#ffffff',
  1333. background: '#f00',
  1334. border: 'none',
  1335. }}
  1336. >
  1337. 删除
  1338. </Button>
  1339. </Popconfirm>
  1340. </div>
  1341. )
  1342. },
  1343. },
  1344. ],
  1345. })
  1346. },
  1347. setColor() {
  1348. $('.userName span').after(
  1349. "(<span class='ruanzhu'>软著数</span>/<span class='xiazheng'>下证数</span>)"
  1350. )
  1351. },
  1352. // 获取csort下的数据
  1353. getCsortData(cSort) {
  1354. cuiJieDian.map((item) => {
  1355. if (item.value == cSort) {
  1356. console.log(item.children)
  1357. this.setState({
  1358. paySubject: item.children,
  1359. })
  1360. }
  1361. })
  1362. },
  1363. tableRowClick(record) {
  1364. this.state.RowData = record
  1365. let str = record.taskName
  1366. let test = str.indexOf('会员')
  1367. if (test == -1) {
  1368. this.setState({
  1369. isHuiyuan: false,
  1370. })
  1371. } else {
  1372. this.setState({
  1373. isHuiyuan: true,
  1374. })
  1375. }
  1376. if (record.taskName.substring(0, 5) === '软件著作权') {
  1377. this.setState({
  1378. speVisible: true,
  1379. id: record.id,
  1380. splitStatus: record.splitStatus,
  1381. splitSuper: record.splitSuper,
  1382. splitId: record.splitId,
  1383. dataArr: record,
  1384. commodityQuantity: record.commodityQuantity,
  1385. })
  1386. } else {
  1387. this.setState({
  1388. visible: true,
  1389. splitStatus: record.splitStatus,
  1390. splitSuper: record.splitSuper,
  1391. splitId: record.splitId,
  1392. })
  1393. }
  1394. this.setState({
  1395. projectType: record.projectType
  1396. })
  1397. this.xiangqing(record.id, record.taskName)
  1398. this.xiangqings(record.orderNo)
  1399. this.xiangmu(record.orderNo)
  1400. this.loaduserss(record)
  1401. // 获取第三方信息表格
  1402. this.thirdTable(record.id);
  1403. //获取支付节点信息表格
  1404. this.payNodeTable(record.id);
  1405. //查看外包状态日志
  1406. this.getSelectOutsourceLog(record.id);
  1407. // 获取Csort
  1408. this.getCsortData(localStorage.getItem('cSort'))
  1409. this.projectTypeTabContent(record.projectType)
  1410. },
  1411. //点击修改项目详情
  1412. tijiaoOk() {
  1413. let attachmentUrls = []
  1414. if (this.state.attachmentUrl.length) {
  1415. let picArr = []
  1416. this.state.attachmentUrl.map(function (item) {
  1417. if (item.response && item.response.data && item.response.data.length) {
  1418. picArr.push(item.response.data)
  1419. }
  1420. })
  1421. attachmentUrls = picArr.join(',')
  1422. }
  1423. this.setState({
  1424. loading: true,
  1425. })
  1426. $.ajax({
  1427. method: 'POST',
  1428. dataType: 'json',
  1429. crossDomain: false,
  1430. url: globalConfig.context + '/api/admin/orderProject/updateOrderTask',
  1431. data: {
  1432. id: this.state.id, //项目编号
  1433. orderNo: this.state.orderNo, //订单编号
  1434. projectStatus: this.state.projectStatus, //项目状态
  1435. taskStatus: this.state.taskStatus, //项目状态
  1436. taskComment: this.state.taskComment, //说明
  1437. startDate: this.state.startDate, //启动日期
  1438. endDate: this.state.endDate, //结束日期
  1439. acceptDate: this.state.acceptDate, //受理日期
  1440. reviewDate: this.state.reviewDate, //评审日期
  1441. publicityDate: this.state.publicityDate, //公示日期
  1442. licenceDate: this.state.licenceDate, //发证日期
  1443. attachmentUrl: attachmentUrls.length ? attachmentUrls : '', //附件
  1444. contacts: this.state.contacts, //联系人
  1445. contactMobile: this.state.contactMobile, //联系人电话
  1446. legalPerson: this.state.legalPerson, //法人
  1447. legalPersonTel: this.state.legalPersonTel, //法人电话
  1448. certificateNumber: this.state.certificateNumber, //证书编号
  1449. status: this.state.status, //状态
  1450. formRetrieve: this.state.formRetrieve, //满意度表格
  1451. taskRefund: this.state.taskRefund, //退单
  1452. refundContent: this.state.refundContent, //退单信息
  1453. retrieveContent: this.state.retrieveContent, //回收信息
  1454. locationProvince: this.state.ProvinceCity[0],
  1455. locationCity: this.state.ProvinceCity[1],
  1456. locationArea: this.state.ProvinceCity[2],
  1457. postalAddress: this.state.postalAddress, //详细地址
  1458. arrivalMoney: this.state.arrivalMoney, //是否到款
  1459. setUpAmount: this.state.setUpAmount, //立项金额
  1460. declareUser: this.state.declareUser, //账号
  1461. declarePwd: this.state.declarePwd, //密码
  1462. outsourceName: this.state.outsourceName, //外包公司
  1463. outsourcePrice: this.state.outsourcePrice, //外包价格
  1464. declarationBatch: this.state.declarationBatch,
  1465. },
  1466. }).done(
  1467. function (data) {
  1468. this.setState({
  1469. loading: false,
  1470. })
  1471. if (!data.error.length) {
  1472. message.success('保存成功!')
  1473. this.visitCancel()
  1474. } else {
  1475. message.warning(data.error[0].message)
  1476. }
  1477. }.bind(this)
  1478. )
  1479. },
  1480. //点击修改项目详情
  1481. tianjiaOk() {
  1482. if (this.state.attachmentUrl.length) {
  1483. let picArr = []
  1484. this.state.attachmentUrl.map(function (item) {
  1485. if (item.response && item.response.data && item.response.data.length) {
  1486. picArr.push(item.response.data)
  1487. }
  1488. })
  1489. }
  1490. $.ajax({
  1491. method: 'POST',
  1492. dataType: 'json',
  1493. crossDomain: false,
  1494. url: globalConfig.context + '/api/admin/orderProject/addTaskHours',
  1495. data: {
  1496. taskId: this.state.taskId, //项目编号
  1497. hours: this.state.hours, //工时
  1498. remarks: this.state.remarks, //说明
  1499. taskDate: this.state.taskDate, //日期
  1500. taskComment: this.state.taskComment, //说明
  1501. },
  1502. }).done(
  1503. function (data) {
  1504. this.setState({
  1505. loading: false,
  1506. })
  1507. if (!data.error.length) {
  1508. message.success('保存成功!')
  1509. this.noCancel()
  1510. } else {
  1511. message.warning(data.error[0].message)
  1512. }
  1513. }.bind(this)
  1514. )
  1515. },
  1516. //订单详情
  1517. xiangqing(id) {
  1518. $.ajax({
  1519. method: 'get',
  1520. dataType: 'json',
  1521. crossDomain: false,
  1522. url: globalConfig.context + '/api/admin/orderProject/orderTaskDetail',
  1523. data: {
  1524. id: id,
  1525. },
  1526. success: function (data) {
  1527. let thisdata = data.data
  1528. if (data.error.length || data.data.list == '') {
  1529. if (data.error && data.error.length) {
  1530. message.warning(data.error[0].message)
  1531. }
  1532. } else {
  1533. this.setState({
  1534. id: thisdata.id, //ID
  1535. splitId: thisdata.splitId,//拆分序号
  1536. splitStatus: thisdata.splitStatus,//0未拆分 1已拆分
  1537. splitSuper: thisdata.splitSuper,//拆分前项目编号
  1538. orderNo: thisdata.orderNo, //订单编号
  1539. userName: thisdata.userName, //客户名称
  1540. taskName: thisdata.taskName, //项目名称
  1541. cname: thisdata.cname, //项目品类
  1542. contractNo: thisdata.contractNo, //合同编号
  1543. projectStatus: thisdata.projectStatus.toString(), //项目状态
  1544. taskStatus: thisdata.taskStatus.toString(), //项目状态
  1545. taskDate: thisdata.taskDate, //分配时间
  1546. taskComment: thisdata.taskComment, //说明
  1547. attachmentUrl: thisdata.attachmentUrl
  1548. ? splitUrl(
  1549. thisdata.attachmentUrl,
  1550. ',',
  1551. globalConfig.avatarHost + '/upload'
  1552. )
  1553. : [], //图片地址
  1554. salesmanName: thisdata.salesmanName, //订单负责人
  1555. startDate: thisdata.startDate, //启动日期
  1556. endDate: thisdata.endDate, //结束日期
  1557. acceptDate: thisdata.acceptDate, //受理日期
  1558. reviewDate: thisdata.reviewDate, //评审日期
  1559. publicityDate: thisdata.publicityDate, //公示日期
  1560. licenceDate: thisdata.licenceDate, //发证日期
  1561. contacts: thisdata.contacts, //联系人
  1562. contactMobile: thisdata.contactMobile, //联系人电话
  1563. legalPerson: thisdata.legalPerson, //法人
  1564. legalPersonTel: thisdata.legalPersonTel, //法人电话
  1565. certificateNumber: thisdata.certificateNumber, //证书编号
  1566. status: thisdata.status, //状态
  1567. formRetrieve: thisdata.formRetrieve, //满意度表格
  1568. taskRefund: thisdata.taskRefund, //退单
  1569. refundContent: thisdata.refundContent, //退单信息
  1570. retrieveContent: thisdata.retrieveContent, //回收信息
  1571. arrivalMoney: thisdata.arrivalMoney, //是否到款
  1572. setUpAmount: thisdata.setUpAmount, //立项金额
  1573. declareUser: thisdata.declareUser, //账号
  1574. declarePwd: thisdata.declarePwd, //密码
  1575. outsourceName: thisdata.outsourceName, //外包公司
  1576. outsourcePrice: thisdata.outsourcePrice, //外包价格
  1577. declarationBatch: thisdata.declarationBatch,
  1578. })
  1579. }
  1580. }.bind(this),
  1581. }).always(
  1582. function () {
  1583. this.setState({
  1584. loading: false,
  1585. })
  1586. }.bind(this)
  1587. )
  1588. },
  1589. //订单详情
  1590. xiangqings(orderNos) {
  1591. $.ajax({
  1592. method: 'get',
  1593. dataType: 'json',
  1594. crossDomain: false,
  1595. url: globalConfig.context + '/api/admin/newOrder/getOrderNewDetail',
  1596. data: {
  1597. orderNo: orderNos,
  1598. },
  1599. success: function (data) {
  1600. let thisdata = data.data
  1601. let ProvinceCityArr = []
  1602. let ProvinceS = thisdata.locationProvince //省
  1603. let citys = thisdata.locationCity //市
  1604. let Areas = thisdata.locationArea //区
  1605. ProvinceCityArr.push(ProvinceS, citys, Areas)
  1606. if (data.error.length || data.data.list == '') {
  1607. if (data.error && data.error.length) {
  1608. message.warning(data.error[0].message)
  1609. }
  1610. } else {
  1611. this.setState({
  1612. processStatus: thisdata.processStatus, //流程状态
  1613. liquidationStatus: thisdata.liquidationStatus, //结算状态
  1614. approval: thisdata.approval, //特批状态
  1615. orderRemarks: thisdata.orderRemarks, //订单留言
  1616. salesmanName: thisdata.salesmanName, //营销员名称
  1617. salesmanMobile: thisdata.salesmanMobile, //营销员电话
  1618. financeName: thisdata.financeName, //财务名称
  1619. financeMobile: thisdata.financeMobile, //财务电话
  1620. oldSalesmanName: thisdata.oldSalesmanName, //营销员名称
  1621. oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话
  1622. nowFinance: thisdata.nowFinance, //财务名称
  1623. nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话
  1624. depName: thisdata.depName, //订单部门
  1625. ProvinceCity: ProvinceCityArr[0] === null ? [] : ProvinceCityArr,
  1626. postalAddress: thisdata.postalAddress, //详细地址
  1627. })
  1628. }
  1629. }.bind(this),
  1630. }).always(
  1631. function () {
  1632. this.setState({
  1633. loading: false,
  1634. })
  1635. }.bind(this)
  1636. )
  1637. },
  1638. //项目列表
  1639. xiangmu(orderNos) {
  1640. $.ajax({
  1641. method: 'get',
  1642. dataType: 'json',
  1643. crossDomain: false,
  1644. url: globalConfig.context + '/api/admin/newOrder/getOrderTask',
  1645. data: {
  1646. orderNo: orderNos,
  1647. },
  1648. success: function (data) {
  1649. let theArr = []
  1650. if (data.error.length || data.data.list == '') {
  1651. if (data.error && data.error.length) {
  1652. message.warning(data.error[0].message)
  1653. }
  1654. } else {
  1655. for (let i = 0; i < data.data.length; i++) {
  1656. let thisdata = data.data[i]
  1657. localStorage.setItem('cSort', thisdata.cSort)
  1658. theArr.push({
  1659. key: i,
  1660. id: thisdata.id,
  1661. orderNo: thisdata.orderNo, //订单编号
  1662. commodityId: thisdata.commodityId, //项目ID
  1663. commodityName: thisdata.commodityName, //项目名称
  1664. cname: thisdata.cname, //项目类别
  1665. commodityPrice: thisdata.commodityPrice, //项目价格
  1666. commodityQuantity: thisdata.commodityQuantity, //项目数量
  1667. main: thisdata.main, //是否为主要项目
  1668. taskComment: thisdata.taskComment, //项目说明
  1669. contacts: thisdata.contacts, //联系人
  1670. contactsMobile: thisdata.contactsMobile, //联系人电话
  1671. taskStatus: thisdata.taskStatus, //是否分配
  1672. contractNo: thisdata.contractNo, //合同编号
  1673. certificateNumber: thisdata.certificateNumber,
  1674. splitStatus: thisdata.splitStatus,
  1675. officialCost: thisdata.officialCost,
  1676. costReduction: thisdata.costReduction,
  1677. type: thisdata.type,
  1678. cSort: thisdata.cSort,
  1679. })
  1680. }
  1681. }
  1682. this.setState({
  1683. dataSourceX: theArr,
  1684. type: theArr[0].type,
  1685. cSort: theArr[0].cSort,
  1686. })
  1687. }.bind(this),
  1688. }).always(
  1689. function () {
  1690. this.setState({
  1691. loading: false,
  1692. })
  1693. }.bind(this)
  1694. )
  1695. },
  1696. //导出
  1697. exportExec() {
  1698. let departmentName = '',
  1699. depart = this.state.departmentArr || []
  1700. depart.map((item) => {
  1701. if (this.state.departmentId == item.id) {
  1702. departmentName = item.name
  1703. return
  1704. }
  1705. })
  1706. let data = {
  1707. departmentId: this.state.departmentId,
  1708. departmentName: departmentName,
  1709. salesName: this.state.orderRefundSearch, //订单负责人
  1710. startTime: this.state.releaseDate[0],
  1711. endTime: this.state.releaseDate[1],
  1712. grantStatus: this.state.grantStatus,
  1713. }
  1714. window.location.href =
  1715. globalConfig.context +
  1716. '/api/admin/orderProject/exporProjectList?' +
  1717. $.param(data)
  1718. },
  1719. //关闭详情
  1720. visitCancel() {
  1721. this.setState({
  1722. visible: false,
  1723. speVisible: false,
  1724. activeKey: '1',
  1725. })
  1726. this.reset()
  1727. },
  1728. visitOk() {
  1729. this.setState({
  1730. visible: false,
  1731. speVisible: false,
  1732. })
  1733. this.reset()
  1734. },
  1735. closeDesc(e, s) {
  1736. this.state.showDesc = e
  1737. if (s) {
  1738. this.loadData(this.state.page)
  1739. }
  1740. },
  1741. closeAssign(e, s) {
  1742. this.state.roleName = ''
  1743. this.state.assignVisible = e
  1744. if (s) {
  1745. this.loadData(this.state.page)
  1746. }
  1747. },
  1748. //添加工时
  1749. okCancel(record) {
  1750. this.setState({
  1751. lookVisible: true,
  1752. taskId: record.id,
  1753. })
  1754. },
  1755. //测试
  1756. getOrgCodeUrl(e) {
  1757. this.setState({ orgCodeUrl: e })
  1758. },
  1759. //查看下证信息
  1760. loaduserss(record) {
  1761. $.ajax({
  1762. method: 'get',
  1763. dataType: 'json',
  1764. crossDomain: false,
  1765. url: globalConfig.context + '/api/admin/orderProject/selectTaskProgress',
  1766. data: {
  1767. tid: record.id,
  1768. },
  1769. success: function (data) {
  1770. let theArr = []
  1771. let thisData = []
  1772. if (!thisData) {
  1773. if (data.error && data.error.length) {
  1774. message.warning(data.error[0].message)
  1775. }
  1776. thisData = {}
  1777. } else {
  1778. for (let i = 0; i < data.data.length; i++) {
  1779. thisData = data.data[i]
  1780. theArr.push({
  1781. num: i + 1,
  1782. key: i,
  1783. id: thisData.id, //编号
  1784. alreadyNumber: thisData.alreadyNumber, //下证数
  1785. licenceTimes: thisData.licenceTimes, //下证时间
  1786. notCount: thisData.notCount, //未下证数
  1787. flag: true,
  1788. })
  1789. }
  1790. this.setState({
  1791. contactList: theArr,
  1792. tid: record.id,
  1793. })
  1794. }
  1795. }.bind(this),
  1796. }).always(
  1797. function () {
  1798. this.setState({
  1799. loading: false,
  1800. })
  1801. }.bind(this)
  1802. )
  1803. },
  1804. // 拆分详细
  1805. showRes(record) {
  1806. this.setState({
  1807. resVisible: true,
  1808. resRecord: record,
  1809. })
  1810. },
  1811. resCancel() {
  1812. this.setState({
  1813. resVisible: false,
  1814. })
  1815. },
  1816. //下证信息保存
  1817. contactSave(record) {
  1818. if (!record.licenceTimes) {
  1819. message.warning('下证日期不能为空')
  1820. return
  1821. }
  1822. if (!record.alreadyNumber) {
  1823. message.warning('下证数量不能为空')
  1824. return
  1825. }
  1826. this.setState({
  1827. loading: true,
  1828. })
  1829. $.ajax({
  1830. url: globalConfig.context + '/api/admin/orderProject/createTaskProgress',
  1831. method: 'post',
  1832. data: {
  1833. taskId: this.state.id,
  1834. licenceTimes: record.licenceTimes,
  1835. alreadyNumber: record.alreadyNumber,
  1836. },
  1837. }).done(
  1838. function (data) {
  1839. this.setState({
  1840. loading: false,
  1841. })
  1842. if (!data.error.length) {
  1843. message.success('保存成功!')
  1844. record.flag = true
  1845. this.loaduserss(this.state.dataArr)
  1846. } else {
  1847. message.warning(data.error[0].message)
  1848. }
  1849. }.bind(this)
  1850. )
  1851. },
  1852. //下证信息删除
  1853. contactDele(record) {
  1854. this.setState({
  1855. loading: true,
  1856. })
  1857. $.ajax({
  1858. url: globalConfig.context + '/api/admin/orderProject/delectTaskProgress',
  1859. method: 'post',
  1860. data: {
  1861. id: record.id,
  1862. },
  1863. }).done(
  1864. function (data) {
  1865. this.setState({
  1866. loading: false,
  1867. })
  1868. if (!data.error.length) {
  1869. this.loaduserss(this.state.dataArr)
  1870. } else {
  1871. message.warning(data.error[0].message)
  1872. }
  1873. }.bind(this)
  1874. )
  1875. },
  1876. //点击新增下证信息
  1877. addcontact() {
  1878. this.state.contactList.push({
  1879. num: this.state.contactList.length + 1,
  1880. key: this.state.contactList.length,
  1881. licenceTimes: '',
  1882. alreadyNumber: '',
  1883. notCount: '',
  1884. dels: '',
  1885. flag: false,
  1886. aflag: false,
  1887. })
  1888. this.setState({
  1889. contactList: this.state.contactList,
  1890. })
  1891. },
  1892. //删除下证信息
  1893. confirmDelet(record) {
  1894. this.state.contactList.splice(record.key, 1)
  1895. this.setState({
  1896. contactList: this.state.contactList,
  1897. })
  1898. if (record.id) {
  1899. this.contactDele(record)
  1900. }
  1901. },
  1902. caozuorizhi() {
  1903. this.setState({
  1904. visibleA: true,
  1905. })
  1906. $.ajax({
  1907. method: 'get',
  1908. dataType: 'json',
  1909. crossDomain: false,
  1910. url: globalConfig.context + '/api/admin/orderProject/TaskLogList',
  1911. data: {
  1912. id: this.state.id,
  1913. },
  1914. success: function (data) {
  1915. let theArr = []
  1916. if (data.error.length || data.data.list == '') {
  1917. if (data.error && data.error.length) {
  1918. message.warning(data.error[0].message)
  1919. }
  1920. } else {
  1921. for (let i = 0; i < data.data.length; i++) {
  1922. let thisdata = data.data[i]
  1923. theArr.push({
  1924. key: i,
  1925. id: thisdata.id, //日志ID
  1926. content: thisdata.content, //流程
  1927. taskId: thisdata.taskId, //项目ID
  1928. aName: thisdata.aName, //负责人
  1929. createTimes: thisdata.createTimes, //时间
  1930. })
  1931. }
  1932. }
  1933. this.setState({
  1934. dataSourceA: theArr,
  1935. })
  1936. }.bind(this),
  1937. }).always(
  1938. function () {
  1939. this.setState({
  1940. loading: false,
  1941. })
  1942. }.bind(this)
  1943. )
  1944. },
  1945. //关闭操作工时
  1946. visitCancelA() {
  1947. this.setState({
  1948. visibleA: false,
  1949. })
  1950. },
  1951. nextCancel() {
  1952. this.setState({
  1953. addnextVisible: false,
  1954. displayFees: 'none',
  1955. officialCost: '', //是否有官费
  1956. costReduction: '', //是否有费减
  1957. })
  1958. },
  1959. //点击打卡项目详情
  1960. tableRowClickX(record) {
  1961. if (record.type == '1') {
  1962. this.setState({
  1963. displayFees: 'block',
  1964. costReduction: record.costReduction,
  1965. officialCost: record.officialCost,
  1966. })
  1967. }
  1968. this.setState({
  1969. jid: record.id, //项目ID
  1970. kid: record.commodityId, //商品ID
  1971. commodityName: record.commodityName, //金额
  1972. commodityPrice: record.commodityPrice, //金额
  1973. commodityQuantity: record.commodityQuantity, //数量
  1974. taskComment: record.taskComment, //备注
  1975. main: record.main.toString(), //是否为主要
  1976. addnextVisible: true,
  1977. addState: 0,
  1978. })
  1979. },
  1980. //关闭添加工时
  1981. noCancel() {
  1982. this.setState({
  1983. lookVisible: false,
  1984. })
  1985. this.reset()
  1986. },
  1987. search() {
  1988. this.loadData()
  1989. },
  1990. reset(flag) {
  1991. if (flag) {
  1992. this.state.nameSearch = ''
  1993. this.state.orderNoSearch = ''
  1994. this.state.contractNoSearch = undefined
  1995. this.state.taskNoSearch = ''
  1996. this.state.departmenttSearch = undefined
  1997. this.state.projectStatusSearch = undefined //项目状态
  1998. this.state.approvalSearch = undefined
  1999. this.state.outsourceStatusSearch = []
  2000. }
  2001. this.state.id = '' //项目编号
  2002. this.state.orderNo = '' //订单编号
  2003. this.state.projectStatus = undefined //项目状态
  2004. this.state.taskStatuSearch = undefined //项目状态
  2005. this.state.taskComment = '' //说明
  2006. this.state.startDate = '' //启动日期
  2007. this.state.endDate = '' //结束日期
  2008. this.state.acceptDate = '' //受理日期
  2009. this.state.reviewDate = '' //评审日期
  2010. this.state.publicityDate = '' //公示日期
  2011. this.state.licenceDate = '' //发证日期
  2012. this.state.partyTimes = '' //付款时间
  2013. attachmentUrl: [] //附件
  2014. this.state.contacts = '' //联系人
  2015. this.state.contactMobile = '' //联系人电话
  2016. this.state.legalPerson = '' //法人
  2017. this.state.legalPersonTel = '' //法人电话
  2018. this.state.taskId = '' //项目编号
  2019. this.state.hours = '' //工时
  2020. this.state.remarks = '' //说明
  2021. this.state.taskDate = '' //日期
  2022. this.state.taskComment = '' //说明
  2023. this.state.releaseDate = []
  2024. this.state.outsourceName = ''
  2025. this.state.outsourcePrice = undefined
  2026. this.state.distribution = undefined
  2027. this.loadData(this.state.page)
  2028. this.state.companyName = undefined
  2029. this.state.unitPrice = undefined
  2030. this.state.unitNumber = undefined
  2031. this.state.amount = undefined
  2032. this.state.pictureUrl = []
  2033. this.setState({
  2034. oldInfor: {},
  2035. outsourceRemarks: undefined
  2036. })
  2037. },
  2038. searchSwitch() {
  2039. this.setState({
  2040. searchMore: !this.state.searchMore,
  2041. })
  2042. },
  2043. //部门
  2044. departmentList() {
  2045. this.setState({
  2046. loading: true,
  2047. })
  2048. $.ajax({
  2049. method: 'get',
  2050. dataType: 'json',
  2051. crossDomain: false,
  2052. url: globalConfig.context + '/api/admin/organization/selectSuperId',
  2053. data: {},
  2054. success: function (data) {
  2055. let thedata = data.data
  2056. let theArr = []
  2057. if (!thedata) {
  2058. if (data.error && data.error.length) {
  2059. message.warning(data.error[0].message)
  2060. }
  2061. thedata = {}
  2062. } else {
  2063. thedata.map(function (item, index) {
  2064. theArr.push({
  2065. key: index,
  2066. name: item.name,
  2067. id: item.id,
  2068. })
  2069. })
  2070. }
  2071. this.setState({
  2072. departmentArr: theArr,
  2073. })
  2074. }.bind(this),
  2075. }).always(
  2076. function () {
  2077. this.setState({
  2078. loading: false,
  2079. })
  2080. }.bind(this)
  2081. )
  2082. },
  2083. changeList(arr) {
  2084. const newArr = []
  2085. this.state.columns.forEach((item) => {
  2086. arr.forEach((val) => {
  2087. if (val === item.title) {
  2088. newArr.push(item)
  2089. }
  2090. })
  2091. })
  2092. this.setState({
  2093. changeList: newArr,
  2094. })
  2095. },
  2096. timeClose() {
  2097. this.setState({
  2098. timeVisible: false,
  2099. })
  2100. },
  2101. timeDetail(record) {
  2102. console.log(record)
  2103. this.setState({
  2104. loading: true,
  2105. recordHour: record.hours,
  2106. })
  2107. $.ajax({
  2108. method: 'get',
  2109. dataType: 'json',
  2110. crossDomain: false,
  2111. url:
  2112. globalConfig.context + '/api/admin/orderProject/taskHoursDetailsList',
  2113. data: {
  2114. taskId: record.id,
  2115. },
  2116. success: function (data) {
  2117. if (data.error && data.error.length) {
  2118. message.warning(data.error[0].message)
  2119. } else {
  2120. this.setState({
  2121. dataSourceTime: data.data,
  2122. })
  2123. console.log(this.state.dataSourceTime)
  2124. }
  2125. }.bind(this),
  2126. }).always(
  2127. function () {
  2128. this.setState({
  2129. loading: false,
  2130. })
  2131. }.bind(this)
  2132. )
  2133. },
  2134. showDeleteConfirm(num, fn) {
  2135. let text = getProjectStatus(num)
  2136. confirm({
  2137. title: <p style={{ fontSize: 16, fontWeight: 900 }}>注意</p>,
  2138. content: (
  2139. <p style={{ fontWeight: 900, color: 'red' }}>
  2140. 当前的项目状态为{text},保存后将触发对应的催款节点!!!您确定保存?
  2141. </p>
  2142. ),
  2143. okText: '确定',
  2144. okType: 'danger',
  2145. cancelText: '取消',
  2146. onOk() {
  2147. fn()
  2148. },
  2149. onCancel() {},
  2150. })
  2151. },
  2152. // 项目发起外包
  2153. sureOut(startType) {
  2154. if (this.state.startType !== 0 && this.state.startType !== 1) {
  2155. message.warning('请选择类型')
  2156. return
  2157. }
  2158. //0正常 1专利 2软著 3审计
  2159. if (this.state.projectType === 1) {
  2160. //专利
  2161. if (this.state.patentType === -1) {
  2162. message.warning('请选择专利类型')
  2163. return
  2164. }
  2165. if (this.state.patentNameType === -1) {
  2166. message.warning('请选择专利类型名称')
  2167. return
  2168. }
  2169. if (this.state.patentNameType == 3) {
  2170. if (!this.state.patentName) {
  2171. message.warning('请填写专利名称')
  2172. return
  2173. }
  2174. }
  2175. }
  2176. if (!this.state.outsourceRemarks) {
  2177. message.warning('备注不能为空')
  2178. return
  2179. }
  2180. //refundStatus 0-待审核 ,1-审核通过,2-审核拒绝
  2181. if(!this.state.reason && (this.state.refundStatus === 2 || typeof this.state.refundStatus === 'undefined')){
  2182. message.warning('发起原因不能为空')
  2183. return
  2184. }
  2185. // if (!this.state.pictureUrl && !Array.isArray(this.state.pictureUrl)) {
  2186. // message.warning('合同扫描件不能为空')
  2187. // return
  2188. // }
  2189. // if(this.state.pictureUrl.length === 0){
  2190. // message.warning('合同扫描件不能为空')
  2191. // return
  2192. // }
  2193. let _this = this;
  2194. confirm({
  2195. title: startType === 0 ? '确定要发起外包吗?' : '确定要提交供应商信息吗?',
  2196. content: startType === 0 ? '高于总部价格,费用个人承担' : '确定提交供应商信息后,不可修改',
  2197. onOk() {
  2198. return new Promise((resolve, reject) => {
  2199. _this.setState({
  2200. loading: true,
  2201. })
  2202. let data = {
  2203. tid: _this.state.id,
  2204. orderNo: _this.state.orderNo,
  2205. type: 1, //分类 0订单 1项目
  2206. startType: _this.state.startType, //支付类型 0外包 1供应商 false 0
  2207. companyName: _this.state.companyName,
  2208. amount: _this.state.amount,
  2209. outsourceRemarks: _this.state.outsourceRemarks,
  2210. unitNumber: _this.state.unitNumber,
  2211. unitPrice: _this.state.unitPrice,
  2212. id: _this.state.refundStatus === 2 ? _this.state.mid : undefined,//被拒绝外包申请时,需要传id
  2213. }
  2214. //refundStatus 0-待审核 ,1-审核通过,2-审核拒绝 审核被驳回时和第一次发起外包时,要填写发起原因
  2215. if(_this.state.refundStatus === 2 || typeof _this.state.refundStatus === 'undefined'){
  2216. data.reason = _this.state.reason
  2217. }
  2218. if (_this.state.projectType === 1) {
  2219. data.patentType = _this.state.patentType;
  2220. data.patentNameType = _this.state.patentNameType;
  2221. if (_this.state.patentNameType == 3) {
  2222. data.patentName = _this.state.patentName;
  2223. }
  2224. }
  2225. if (_this.state.pictureUrl && Array.isArray(_this.state.pictureUrl) && _this.state.pictureUrl.length !== 0){
  2226. data.pictureUrl = _this.getUrl(_this.state.pictureUrl).length
  2227. ? _this.getUrl(_this.state.pictureUrl)
  2228. : ''
  2229. }
  2230. $.ajax({
  2231. method: 'POST',
  2232. dataType: 'json',
  2233. crossDomain: false,
  2234. url:
  2235. globalConfig.context + '/api/admin/outsourceOrg/outsourceProjectAudit',
  2236. data: data,
  2237. }).done(
  2238. function (data) {
  2239. _this.setState({
  2240. loading: false,
  2241. })
  2242. if (!data.error.length) {
  2243. resolve();
  2244. message.success('提交成功!')
  2245. _this.visitCancel()
  2246. } else {
  2247. reject();
  2248. message.warning(data.error[0].message)
  2249. }
  2250. }.bind(_this)
  2251. )
  2252. }).catch((err) => console.log(err));
  2253. },
  2254. onCancel() {},
  2255. });
  2256. },
  2257. callback(e) {
  2258. this.setState({
  2259. activeKey: e,
  2260. })
  2261. if (e == 3) {
  2262. this.orderDetailData(this.state.orderNo)
  2263. this.xiangmu(this.state.orderNo)
  2264. this.jiedian(this.state.orderNo)
  2265. this.jiedianNew(this.state.orderNo)
  2266. }
  2267. },
  2268. getOrgCodeUrlWai(e) {
  2269. this.setState({ pictureUrl: e })
  2270. },
  2271. getUrl(url) {
  2272. let theorgCodeUrl = []
  2273. if (url.length) {
  2274. let picArr = []
  2275. url.map(function (item) {
  2276. if (item.response && item.response.data && item.response.data.length) {
  2277. picArr.push(item.response.data)
  2278. }
  2279. })
  2280. theorgCodeUrl = picArr.join(',')
  2281. }
  2282. return theorgCodeUrl
  2283. },
  2284. waiDetail() {
  2285. let url = window.location.href.substring(7)
  2286. this.setState({
  2287. loading: true,
  2288. })
  2289. $.ajax({
  2290. method: 'get',
  2291. dataType: 'json',
  2292. crossDomain: false,
  2293. url:
  2294. globalConfig.context + '/api/admin/outsourceOrg/orderOutsourceDtails',
  2295. data: {
  2296. tid: this.state.id,
  2297. orderNo: this.state.orderNo,
  2298. },
  2299. }).done(
  2300. function (data) {
  2301. this.setState({
  2302. loading: false,
  2303. })
  2304. if (!data.error.length && data.data) {
  2305. if(data.data.unitNumber){
  2306. this.setState({
  2307. oldInfor: {
  2308. companyName:data.data.companyName,
  2309. unitPrice:data.data.unitPrice,
  2310. unitNumber:data.data.unitNumber,
  2311. amount:data.data.amount,
  2312. outsourceRemarks:data.data.outsourceRemarks,
  2313. refundStatus: data.data.refundStatus,
  2314. pictureUrl: data.data.pictureUrl
  2315. ? splitUrl(
  2316. data.data.pictureUrl,
  2317. ',',
  2318. globalConfig.avatarHost + '/upload',
  2319. url
  2320. )
  2321. : [], //图片地址
  2322. },
  2323. })
  2324. }else{
  2325. this.setState({
  2326. oldInfor: {},
  2327. })
  2328. }
  2329. this.setState({
  2330. startType: data.data.startType, //类型
  2331. patentType: data.data.patentType, //专利类型
  2332. patentNameType: data.data.patentNameType, //专利名称类型
  2333. patentName: data.data.patentName, //专利名称
  2334. outsourceRemarks: data.data.outsourceRemarks,
  2335. remarks: data.data.remarks,
  2336. companyName: data.data.companyName,
  2337. amount: data.data.amount,
  2338. mid: data.data.id,
  2339. unitPrice: data.data.unitPrice,
  2340. refundStatus: data.data.refundStatus,
  2341. unitNumber: data.data.unitNumber, //如果存在 证明是以前的旧数据
  2342. pictureUrl: data.data.pictureUrl
  2343. ? splitUrl(
  2344. data.data.pictureUrl,
  2345. ',',
  2346. globalConfig.avatarHost + '/upload',
  2347. url
  2348. )
  2349. : [], //图片地址
  2350. createTimes: data.data.createTimes,
  2351. auditTimes: data.data.auditTimes,
  2352. })
  2353. } else if (data.error && data.error.length) {
  2354. message.warning(data.error[0].message)
  2355. } else if (!data.data) {
  2356. this.setState({
  2357. refundStatus: undefined,
  2358. })
  2359. }
  2360. }.bind(this)
  2361. )
  2362. },
  2363. rizhi() {
  2364. this.setState({
  2365. loading: true,
  2366. })
  2367. $.ajax({
  2368. method: 'get',
  2369. dataType: 'json',
  2370. crossDomain: false,
  2371. url: '/api/admin/newOrder/selectOrderLog',
  2372. data: {
  2373. orderNo: this.state.orderNo,
  2374. },
  2375. success: function (data) {
  2376. let theArr = []
  2377. let thisData = data.data
  2378. if (!thisData.length) {
  2379. if (data.error && data.error.length) {
  2380. message.warning(data.error[0].message)
  2381. }
  2382. thisData = {}
  2383. } else {
  2384. for (let i = 0; i < data.data.length; i++) {
  2385. let thisdata = data.data[i]
  2386. theArr.push({
  2387. processName: thisdata.processName,
  2388. adminName: thisdata.adminName,
  2389. createDate: thisdata.createDate,
  2390. remarks: thisdata.remarks,
  2391. })
  2392. }
  2393. }
  2394. this.setState({
  2395. dataSourceY: theArr,
  2396. })
  2397. }.bind(this),
  2398. }).always(
  2399. function () {
  2400. this.setState({
  2401. loading: false,
  2402. })
  2403. }.bind(this)
  2404. )
  2405. },
  2406. closeOrderLog() {
  2407. this.setState({
  2408. avisible: false,
  2409. })
  2410. },
  2411. getOrderLog() {
  2412. this.setState({
  2413. avisible: true,
  2414. })
  2415. this.rizhi()
  2416. },
  2417. orderChange(key) {
  2418. this.setState({
  2419. activeKey: key,
  2420. })
  2421. if (key === '3') {
  2422. this.orderDetailData(this.state.orderNo)
  2423. this.xiangmu(this.state.orderNo)
  2424. this.jiedian(this.state.orderNo)
  2425. this.jiedianNew(this.state.orderNo)
  2426. }else if (key === '2') {
  2427. this.waiDetail()
  2428. }else if(key === "1"){
  2429. this.xiangqing(this.state.tid);
  2430. }
  2431. },
  2432. //节点列表
  2433. jiedian(orderNos) {
  2434. $.ajax({
  2435. method: 'get',
  2436. dataType: 'json',
  2437. crossDomain: false,
  2438. url: globalConfig.context + '/api/admin/newOrder/selectOrderDun',
  2439. data: {
  2440. orderNo: orderNos,
  2441. },
  2442. success: function (data) {
  2443. let theArr = []
  2444. let thisData = []
  2445. if (data.error.length || data.data.list == '') {
  2446. if (data.error && data.error.length) {
  2447. message.warning(data.error[0].message)
  2448. }
  2449. } else {
  2450. for (let i = 0; i < data.data.length; i++) {
  2451. thisData = data.data[i]
  2452. theArr.push({
  2453. key: i,
  2454. dunSubject: thisData.dunSubject
  2455. ? thisData.dunSubject.toString()
  2456. : '', //催款科目
  2457. id: thisData.id, //节点Id
  2458. money: thisData.money, //催款金额
  2459. dunStatus: thisData.dunStatus, //催款状态
  2460. })
  2461. }
  2462. this.setState({
  2463. jiedian: theArr,
  2464. })
  2465. }
  2466. }.bind(this),
  2467. })
  2468. },
  2469. jiedianNew(orderNos) {
  2470. $.ajax({
  2471. method: 'get',
  2472. dataType: 'json',
  2473. crossDomain: false,
  2474. url:
  2475. globalConfig.context + '/api/admin/newOrderDun/selectListNewOrderDun',
  2476. data: {
  2477. orderNo: orderNos,
  2478. },
  2479. success: function (data) {
  2480. if (data.error && data.error.length) {
  2481. message.warning(data.error[0].message)
  2482. } else {
  2483. let theArr = []
  2484. let thisData = []
  2485. let arr = data.data || []
  2486. let totalCui = 0
  2487. for (let i = 0; i < arr.length; i++) {
  2488. thisData = arr[i]
  2489. totalCui += +thisData.money
  2490. theArr.push({
  2491. key: i,
  2492. dunSubject: thisData.dunSubject
  2493. ? thisData.dunSubject.toString()
  2494. : '', //催款科目
  2495. id: thisData.id, //节点Id
  2496. tid: thisData.tid, //节点指定的第三方id
  2497. money: thisData.money, //催款金额
  2498. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2499. commodityName: thisData.commodityName,
  2500. projectType: thisData.projectType,
  2501. dunTypeName: thisData.dunTypeName,
  2502. status: thisData.status,
  2503. waitDay: thisData.waitDay,
  2504. effectiveCount: thisData.effectiveCount,
  2505. startDate: thisData.startDate,
  2506. dunType: thisData.dunType,
  2507. appropriationRatio: thisData.appropriationRatio,
  2508. customizeName: thisData.customizeName,
  2509. customizeTimes: thisData.customizeTimes,
  2510. })
  2511. }
  2512. if (!totalCui) {
  2513. totalCui = 0
  2514. }
  2515. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6)
  2516. this.setState({
  2517. jiedianNew: theArr,
  2518. totalCui,
  2519. })
  2520. }
  2521. }.bind(this),
  2522. }).always(
  2523. function () {
  2524. this.setState({
  2525. loading: false,
  2526. })
  2527. }.bind(this)
  2528. )
  2529. },
  2530. orderDetailData(orderNos) {
  2531. this.setState({
  2532. loading: true,
  2533. })
  2534. $.ajax({
  2535. method: 'get',
  2536. dataType: 'json',
  2537. crossDomain: false,
  2538. url: globalConfig.context + '/api/admin/newOrder/getOrderNewDetail',
  2539. data: {
  2540. orderNo: orderNos,
  2541. },
  2542. success: function (data) {
  2543. if (data.error.length || data.data.list == '') {
  2544. if (data.error && data.error.length) {
  2545. message.warning(data.error[0].message)
  2546. this.setState({
  2547. loading: false,
  2548. })
  2549. }
  2550. } else {
  2551. let thisdata = data.data
  2552. this.setState({
  2553. loading: false,
  2554. userName: thisdata.userName,
  2555. primaryOrderNo: thisdata.primaryOrder,
  2556. additionalOrder: thisdata.additionalOrder,
  2557. contractNo: thisdata.contractNo,
  2558. orderData: thisdata,
  2559. isAddition: thisdata.additionalOrder ? true : false,
  2560. contractPictureUrl: thisdata.contractPictureUrl
  2561. ? splitUrl(
  2562. thisdata.contractPictureUrl,
  2563. ',',
  2564. globalConfig.avatarHost + '/upload'
  2565. )
  2566. : [],
  2567. })
  2568. }
  2569. }.bind(this),
  2570. })
  2571. },
  2572. //点击新增供应商
  2573. addcontactNew() {
  2574. this.state.contactListNew.push({
  2575. key: this.state.contactListNew.length,
  2576. money: '',
  2577. dunSubject: undefined,
  2578. orderNo: this.state.orderNo,
  2579. dunTarget: this.state.kehuId,
  2580. })
  2581. this.setState({
  2582. contactListNew: this.state.contactListNew,
  2583. cuiFlag: true,
  2584. })
  2585. },
  2586. //查看第三方信息表格
  2587. thirdTable(id) {
  2588. this.setState({
  2589. loading: true,
  2590. })
  2591. $.ajax({
  2592. method: 'get',
  2593. dataType: 'json',
  2594. crossDomain: false,
  2595. url: globalConfig.context + '/api/admin/company/selectCompany',
  2596. data: {
  2597. tid: id,
  2598. },
  2599. success: function (data) {
  2600. if (data.error && data.error.length) {
  2601. message.warning(data.error[0].message)
  2602. } else {
  2603. let companyNameArr = []
  2604. let theArr = []
  2605. let thisData = []
  2606. let arr = data.data || []
  2607. let allTotalAmount = 0
  2608. let type = 0;
  2609. let patentNameType = 0;
  2610. for (let i = 0; i < arr.length; i++) {
  2611. thisData = arr[i]
  2612. allTotalAmount =
  2613. (allTotalAmount * 10000 + thisData.totalAmount * 10000) / 10000
  2614. companyNameArr.push(thisData.companyName);
  2615. thisData.key = i;
  2616. thisData.patentType = thisData.type;
  2617. theArr.push(thisData);
  2618. type=thisData.type
  2619. patentNameType= thisData.patentNameType
  2620. }
  2621. if (!allTotalAmount) {
  2622. allTotalAmount = 0
  2623. }
  2624. for(let d=0;d<theArr.length;d++){
  2625. theArr[d].companyName = theArr[d].companyName+ '-' + theArr[d].id;
  2626. companyNameArr[d] = {
  2627. companyName: theArr[d].companyName,
  2628. id: theArr[d].id,
  2629. }
  2630. }
  2631. if(type === 1 || type === 2){
  2632. this.setState({
  2633. patentType: type === 1 ? 0 : type === 2 ? 1 : -1, //0其他 1专利申请 2专利买卖
  2634. patentNameType: patentNameType, //0实用新型 1发明专利 2外观专利 3 其他
  2635. })
  2636. }
  2637. this.setState({
  2638. tid: id,
  2639. PayNodeCompany: companyNameArr,
  2640. thirdInfoList: theArr,
  2641. allTotalAmount: allTotalAmount,
  2642. },()=>{
  2643. this.projectTypeTabContent(this.state.projectType);
  2644. })
  2645. }
  2646. }.bind(this),
  2647. }).always(
  2648. function () {
  2649. this.setState({
  2650. loading: false,
  2651. })
  2652. }.bind(this)
  2653. )
  2654. },
  2655. //外包日志列表
  2656. getSelectOutsourceLog(tid){
  2657. this.setState({
  2658. loading: true,
  2659. })
  2660. $.ajax({
  2661. method: 'get',
  2662. dataType: 'json',
  2663. crossDomain: false,
  2664. url: globalConfig.context + '/api/admin/outsourceOrg/selectOutsourceLog',
  2665. data: {
  2666. tid: tid,
  2667. },
  2668. success: function (data) {
  2669. if (data.error.length) {
  2670. if (data.error && data.error.length) {
  2671. message.warning(data.error[0].message);
  2672. }
  2673. } else {
  2674. this.setState({
  2675. outsourceLogs: data.data
  2676. })
  2677. }
  2678. this.setState({
  2679. loading: false,
  2680. })
  2681. }.bind(this),
  2682. }).always(
  2683. function () {
  2684. this.setState({
  2685. loading: false,
  2686. })
  2687. }.bind(this)
  2688. )
  2689. },
  2690. payNodeTable(id) {
  2691. this.setState({
  2692. loading: true,
  2693. })
  2694. $.ajax({
  2695. method: 'get',
  2696. dataType: 'json',
  2697. crossDomain: false,
  2698. url: globalConfig.context + '/api/admin/company/selectPaymentNode',
  2699. data: {
  2700. tid: id,
  2701. },
  2702. success: function (data) {
  2703. if (data.error && data.error.length) {
  2704. message.warning(data.error[0].message)
  2705. } else {
  2706. let payNodeArr = []
  2707. let thisData = []
  2708. let arr = data.data || []
  2709. // console.log('this.state.paySubject', this.state.paySubject)
  2710. //对#5283自定义的补充展示
  2711. this.state.paySubject.push({ key: '自定义', value: '0' })
  2712. for (let i = 0; i < arr.length; i++) {
  2713. thisData = arr[i]
  2714. //遍历paySubject,获取当前dunType对应的key
  2715. this.state.paySubject.map((item) => {
  2716. if (item.value == thisData.dunType) {
  2717. thisData.dunType = item.key
  2718. }
  2719. })
  2720. payNodeArr.push({
  2721. key: i,
  2722. id: thisData.id, //付款节点Id
  2723. nodeId: thisData.id, //付款节点Id
  2724. tid: thisData.tid,
  2725. companyName: thisData.companyName, //供应商名称
  2726. projectType: thisData.projectType, //项目分类
  2727. dunType: thisData.dunType, //催款分类
  2728. unitPrice: thisData.unitPrice, //单价
  2729. quantity: thisData.quantity, //数量
  2730. totalAmount: thisData.totalAmount, //总价
  2731. partyAmount: thisData.partyAmount, //付款
  2732. partyTimes: thisData.partyTimes, //付款时间
  2733. cid: thisData.cid, //机构id
  2734. status: thisData.status, //催款状态 0-未支付 1-待全款 ,2已全款 status=2的时候已经全款,申请付款按钮可以去掉了
  2735. })
  2736. }
  2737. for(let d=0;d<payNodeArr.length;d++){
  2738. payNodeArr[d].companyName = payNodeArr[d].companyName+ '-' + payNodeArr[d].cid;
  2739. }
  2740. console.log('payNodeArr:', payNodeArr)
  2741. this.setState({
  2742. tid: id,
  2743. payNodeList: payNodeArr,
  2744. })
  2745. }
  2746. }.bind(this),
  2747. }).always(
  2748. function () {
  2749. this.setState({
  2750. loading: false,
  2751. })
  2752. }.bind(this)
  2753. )
  2754. },
  2755. // 新增第三方供应商信息
  2756. addThirdList() {
  2757. this.setState({
  2758. ThirdListVisible: true,
  2759. })
  2760. },
  2761. // 新增支付节点
  2762. addPayNode() {
  2763. this.setState({
  2764. PayNodeVisible: true,
  2765. })
  2766. },
  2767. // 第三方信息自动计算总金额
  2768. calculatedAmount() {
  2769. let currentTotalPrice
  2770. currentTotalPrice = this.state.thirdUnitPrice * this.state.thirdQuantity
  2771. currentTotalPrice = currentTotalPrice.toFixed(6)
  2772. this.setState({
  2773. currentTotalPrice: currentTotalPrice,
  2774. })
  2775. },
  2776. // 付款节点自动计算总金额
  2777. payNodeCalculatedAmount(num) {
  2778. let currentTotalPrice,quantity,unitPrice
  2779. //获取当前供应商名称对应的单价并更新
  2780. this.state.thirdInfoList.forEach((item) => {
  2781. if (item.companyName === this.state.thirdCompanyName) {
  2782. currentTotalPrice = num ? item.unitPrice * num : item.quantity * item.unitPrice;
  2783. currentTotalPrice = currentTotalPrice.toFixed(6);
  2784. quantity = num ? num : item.quantity;
  2785. unitPrice = item.unitPrice;
  2786. }
  2787. })
  2788. this.setState({
  2789. payNodeQuantity: num ? num : quantity,
  2790. })
  2791. if(this.state.projectType !== 2){
  2792. this.setState({
  2793. currentTotalPrice: currentTotalPrice,
  2794. thirdUnitPrice: unitPrice
  2795. })
  2796. }
  2797. },
  2798. // 保存供应商信息
  2799. handleCancelq() {
  2800. let api
  2801. if (this.state.ThirdId) {
  2802. //修改
  2803. api = '/api/admin/company/updateCompany'
  2804. } else {
  2805. //新增
  2806. api = '/api/admin/company/addCompany'
  2807. }
  2808. let customerId = 0;
  2809. let isHave =this.state.customerArr.some((value)=>{
  2810. if(value.companyName === this.state.thirdCompanyName){
  2811. customerId = value.id
  2812. return true;
  2813. }
  2814. });
  2815. if(!isHave && this.state.projectType !== 0){
  2816. message.warning('请输入正确的供应商名称')
  2817. return;
  2818. }
  2819. this.setState({
  2820. loading: true,
  2821. })
  2822. // material: this.state.thirdMaterial, //材料
  2823. // urgent: this.state.thirdUrgent, //加急
  2824. // unitPrice: this.state.thirdUnitPrice, //单价
  2825. let data = {
  2826. id: this.state.ThirdId, //id
  2827. tid: this.state.tid, //订单编号
  2828. companyName: this.state.thirdCompanyName, //第三方名称
  2829. quantity: this.state.thirdQuantity, //数量
  2830. // totalAmount: this.state.currentTotalPrice, //总价
  2831. remarks: this.state.thirdRemarks, //备注
  2832. }
  2833. if(this.state.projectType === 0){
  2834. data.unitPrice = this.state.thirdUnitPrice;
  2835. }
  2836. if(isHave){
  2837. data.cid = customerId ////公司id
  2838. }
  2839. $.ajax({
  2840. url: globalConfig.context + api,
  2841. method: 'post',
  2842. dataType: 'json',
  2843. crossDomain: false,
  2844. data: data,
  2845. }).done(
  2846. function (data) {
  2847. this.setState({
  2848. loading: false,
  2849. })
  2850. if (!data.error.length) {
  2851. message.success('保存成功!')
  2852. this.setState({
  2853. ThirdId: '',
  2854. ThirdListVisible: false,
  2855. thirdCompanyName: '', //第三方名称
  2856. thirdUnitPrice: '', //单价
  2857. thirdQuantity: '', //数量
  2858. currentTotalPrice: '', //总价
  2859. thirdRemarks: '',
  2860. thirdUrgent: 0,
  2861. })
  2862. // this.visitCancel();
  2863. this.thirdTable(this.state.tid)
  2864. } else {
  2865. message.warning(data.error[0].message)
  2866. }
  2867. }.bind(this)
  2868. )
  2869. },
  2870. //保存付款节点
  2871. savePayNode() {
  2872. let api
  2873. if (this.state.ThirdId) {
  2874. //修改
  2875. api = '/api/admin/company/updatePaymentNode'
  2876. } else {
  2877. //新增
  2878. api = '/api/admin/company/addPaymentNode'
  2879. }
  2880. // totalAmount: this.state.currentTotalPrice, //总价
  2881. // partyAmount: this.state.partyAmount, //付款金额
  2882. //
  2883. let customerId=0;
  2884. this.state.PayNodeCompany.some((value)=>{
  2885. if(value.companyName === this.state.thirdCompanyName){
  2886. customerId = value.id
  2887. return true;
  2888. }
  2889. });
  2890. if(!this.state.thirdCompanyName){
  2891. message.error('请选择供应商名称');
  2892. return;
  2893. }
  2894. if(!this.state.paySubjectName){
  2895. message.error('请选择付款科目');
  2896. return;
  2897. }
  2898. if(!this.state.payNodeQuantity){
  2899. message.error('请输入数量');
  2900. return;
  2901. }
  2902. let data = {
  2903. id: this.state.ThirdId, //id
  2904. tid: this.state.tid, //订单编号
  2905. cid: customerId,//对应的第三方信息
  2906. companyName: this.state.thirdCompanyName.split('-')[0], //第三方名称
  2907. quantity: this.state.payNodeQuantity, //数量
  2908. dunType: this.state.dunType, //催款节点
  2909. projectType: this.state.cSort, //项目分类
  2910. }
  2911. if(this.state.paySubjectName === '0'){
  2912. if(!this.state.partyTimes){
  2913. message.error('请选择付款时间');
  2914. return;
  2915. }
  2916. data.partyTimes = this.state.partyTimes //付款时间
  2917. }
  2918. if(this.state.projectType !== 2){ //其他类型 0正常 1专利 2软著 3审计
  2919. data.totalAmount = this.state.currentTotalPrice //总价
  2920. data.unitPrice = this.state.thirdUnitPrice //单价
  2921. }
  2922. this.setState({
  2923. loading: true,
  2924. })
  2925. $.ajax({
  2926. url: globalConfig.context + api,
  2927. method: 'post',
  2928. dataType: 'json',
  2929. crossDomain: false,
  2930. data: data,
  2931. }).done(
  2932. function (data) {
  2933. this.setState({
  2934. loading: false,
  2935. })
  2936. if (!data.error.length) {
  2937. message.success('保存成功!')
  2938. this.setState({
  2939. ThirdId: '',
  2940. PayNodeVisible: false,
  2941. thirdCompanyName: '', //第三方名称
  2942. paySubjectName: '', //付款科目名称
  2943. thirdUnitPrice: '', //单价
  2944. thirdQuantity: '', //数量
  2945. payNodeQuantity: 1, //付款节点数量
  2946. currentTotalPrice: '', //总价
  2947. partyAmount: '', //付款金额
  2948. partyTimes: '', //付款时间
  2949. dunType: '', //催款节点
  2950. })
  2951. // this.visitCancel();
  2952. this.payNodeTable(this.state.tid)
  2953. } else {
  2954. message.warning(data.error[0].message)
  2955. }
  2956. }.bind(this)
  2957. )
  2958. },
  2959. // 取消
  2960. handleCancelclose() {
  2961. this.setState({
  2962. PayNodeVisible: false,
  2963. payNodeInfor: {},
  2964. ThirdId: '',
  2965. ThirdListVisible: false,
  2966. thirdCompanyName: '', //第三方名称
  2967. paySubjectName: '', //付款科目名称
  2968. thirdUnitPrice: '', //单价
  2969. partyTimes: '',
  2970. thirdQuantity: 1, //数量
  2971. payNodeQuantity: 1,
  2972. currentTotalPrice: '', //总价
  2973. thirdRemarks: '',
  2974. thirdUrgent: 0, //加急状态
  2975. })
  2976. },
  2977. // 删除供应商信息
  2978. confirmDeletNew(index,resolve=()=>{},reject=()=>{}) {
  2979. this.setState({
  2980. loading: true,
  2981. ThirdListVisible: false,
  2982. })
  2983. let id = '';
  2984. if(index === -1){
  2985. if(this.state.thirdInfoList.length === 1){
  2986. id = this.state.thirdInfoList[0].id
  2987. }else{
  2988. this.state.thirdInfoList.map((value,index)=>{
  2989. id+=value.id+',';
  2990. })
  2991. }
  2992. }else{
  2993. id = index.id
  2994. }
  2995. $.ajax({
  2996. url: globalConfig.context + '/api/admin/company/deleteCompany',
  2997. method: 'post',
  2998. data: {
  2999. id: id,
  3000. },
  3001. }).done(
  3002. function (data) {
  3003. this.setState({
  3004. loading: false,
  3005. })
  3006. if (!data.error.length) {
  3007. message.success('删除成功!')
  3008. this.thirdTable(this.state.tid)
  3009. resolve();
  3010. } else {
  3011. message.warning(data.error[0].message)
  3012. reject();
  3013. }
  3014. }.bind(this)
  3015. )
  3016. },
  3017. // 删除付款节点
  3018. payNodeConfirmDeletNew(index,resolve=()=>{},reject=()=>{}) {
  3019. this.setState({
  3020. loading: true,
  3021. PayNodeVisible: false,
  3022. })
  3023. let id = '';
  3024. if(index === -1){
  3025. this.state.payNodeList.map((value,index)=>{
  3026. id+=value.id+',';
  3027. })
  3028. }else{
  3029. id = index.id
  3030. }
  3031. $.ajax({
  3032. url: globalConfig.context + '/api/admin/company/deletePaymentNode',
  3033. method: 'post',
  3034. data: {
  3035. id: id,
  3036. },
  3037. }).done(
  3038. function (data) {
  3039. this.setState({
  3040. loading: false,
  3041. })
  3042. if (!data.error.length) {
  3043. message.success('删除成功!')
  3044. resolve();
  3045. this.payNodeTable(this.state.tid)
  3046. } else {
  3047. message.warning(data.error[0].message)
  3048. reject();
  3049. }
  3050. }.bind(this)
  3051. )
  3052. },
  3053. //点击供应商详情
  3054. tableRowClickOne(record) {
  3055. this.setState({
  3056. ThirdListVisible: true,
  3057. ThirdId: record.id, //供应商id
  3058. thirdCompanyName: record.companyName, //第三方名称
  3059. thirdUnitPrice: record.unitPrice, //单价
  3060. thirdQuantity: record.quantity, //数量
  3061. currentTotalPrice: record.totalAmount, //总价
  3062. thirdMaterial: record.material, //有无材料
  3063. thirdUrgent: record.urgent, //加急情况
  3064. thirdRemarks: record.remarks,
  3065. audit: record.audit,//审计
  3066. assets: record.assets,//公司资产
  3067. income: record.income,//收入
  3068. })
  3069. },
  3070. //点击付款节点详情
  3071. payNodeTableRowClickOne(record) {
  3072. this.setState({
  3073. PayNodeVisible: true,
  3074. ThirdId: record.id, //供应商id
  3075. thirdCompanyName: record.companyName, //第三方名称
  3076. thirdUnitPrice: record.unitPrice, //单价
  3077. thirdQuantity: record.quantity, //供应商数量
  3078. payNodeQuantity: record.quantity, //付款节点数量
  3079. currentTotalPrice: record.totalAmount, //总价
  3080. partyTimes: record.partyTimes,
  3081. paySubjectName: record.dunType,
  3082. });
  3083. let obj = JSON.parse(JSON.stringify(record));
  3084. this.state.paySubject.some((value)=>{
  3085. if(value.key === obj.dunType){
  3086. obj.dunType = value.value;
  3087. return true;
  3088. }
  3089. });
  3090. this.setState({
  3091. payNodeInfor: obj, //付款节点详情
  3092. });
  3093. },
  3094. render() {
  3095. const formItemLayout = {
  3096. labelCol: { span: 8 },
  3097. wrapperCol: { span: 14 },
  3098. }
  3099. let departmentArr = this.state.departmentArr || []
  3100. return (
  3101. <div className="user-content">
  3102. {this.state.resVisible ? (
  3103. <ResolutionDetail
  3104. cancel={this.resCancel}
  3105. detail={this.state.resRecord}
  3106. visible={this.state.resVisible}
  3107. id={this.state.resRecord.orderNo}
  3108. />
  3109. ) : (
  3110. ''
  3111. )}
  3112. <ShowModalDiv ShowModal={this.state.showModal} />
  3113. <div className="content-title" style={{ marginBottom: 10 }}>
  3114. <span style={{ fontWeight: 900, fontSize: 16 }}>项目任务</span>
  3115. </div>
  3116. <Tabs defaultActiveKey="2" className="test" bordered>
  3117. <TabPane tab="更改表格显示数据" key="1">
  3118. <div style={{ marginLeft: 10 }}>
  3119. <ChooseList
  3120. columns={this.state.columns}
  3121. changeFn={this.changeList}
  3122. changeList={this.state.changeList}
  3123. top={55}
  3124. margin={11}
  3125. />
  3126. </div>
  3127. </TabPane>
  3128. <TabPane tab="搜索" key="2">
  3129. <div className="user-search" style={{ marginLeft: 10 }}>
  3130. <Input
  3131. placeholder="客户名称"
  3132. value={this.state.nameSearch}
  3133. onChange={(e) => {
  3134. this.setState({ nameSearch: e.target.value })
  3135. }}
  3136. />
  3137. <Input
  3138. placeholder="订单编号"
  3139. value={this.state.orderNoSearch}
  3140. onChange={(e) => {
  3141. this.setState({ orderNoSearch: e.target.value })
  3142. }}
  3143. />
  3144. <Input
  3145. placeholder="合同编号"
  3146. value={this.state.contractNoSearch}
  3147. onChange={(e) => {
  3148. this.setState({ contractNoSearch: e.target.value })
  3149. }}
  3150. />
  3151. <Input
  3152. placeholder="项目编号"
  3153. value={this.state.taskNoSearch}
  3154. onChange={(e) => {
  3155. this.setState({ taskNoSearch: e.target.value })
  3156. }}
  3157. />
  3158. <Select
  3159. placeholder="选择部门"
  3160. style={{ width: 150, marginRight: '10px' }}
  3161. value={this.state.departmenttSearch}
  3162. onChange={(e) => {
  3163. this.setState({ departmenttSearch: e })
  3164. }}
  3165. >
  3166. {departmentArr.map(function (item) {
  3167. return (
  3168. <Select.Option key={item.id}>{item.name}</Select.Option>
  3169. )
  3170. })}
  3171. </Select>
  3172. <Select
  3173. placeholder="项目状态"
  3174. style={{ width: 150, marginRight: '10px' }}
  3175. value={this.state.projectStatusSearch}
  3176. onChange={(e) => {
  3177. this.setState({ projectStatusSearch: e })
  3178. console.log(this.state.projectStatusSearch)
  3179. }}
  3180. >
  3181. {projectStatus.map(function (item) {
  3182. return (
  3183. <Select.Option key={item.value}>{item.key}</Select.Option>
  3184. )
  3185. })}
  3186. </Select>
  3187. <Select
  3188. placeholder="特批状态"
  3189. style={{ width: 150, marginRight: '10px' }}
  3190. value={this.state.approvalSearch}
  3191. onChange={(e) => {
  3192. this.setState({ approvalSearch: e })
  3193. console.log(this.state.approvalSearch)
  3194. }}
  3195. >
  3196. <Select.Option key={0}>非特批</Select.Option>
  3197. <Select.Option key={1}>特批</Select.Option>
  3198. </Select>
  3199. <Select
  3200. placeholder="外包状态"
  3201. style={{ width: 150, marginRight: '10px' }}
  3202. value={this.state.outsourceStatusSearch}
  3203. onChange={(e) => {
  3204. this.setState({ outsourceStatusSearch: e })
  3205. console.log(this.state.outsourceStatusSearch)
  3206. }}
  3207. >
  3208. <Select.Option key={0}>外包待审核</Select.Option>
  3209. {/* <Select.Option key={1}>外包审核通过</Select.Option> */}
  3210. <Select.Option key={2}>外包审核驳回</Select.Option>
  3211. <Select.Option key={999}>全部</Select.Option>
  3212. </Select>
  3213. <Button type="primary" onClick={this.search}>
  3214. 搜索
  3215. </Button>
  3216. <Button
  3217. onClick={(e) => {
  3218. this.reset(true)
  3219. }}
  3220. >
  3221. 重置
  3222. </Button>
  3223. {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  3224. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  3225. <span>订单时间 :</span>
  3226. <RangePicker
  3227. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  3228. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  3229. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  3230. </div> */}
  3231. </div>
  3232. </TabPane>
  3233. <TabPane tab="导出Excel" key="3">
  3234. <Button
  3235. type="primary"
  3236. style={{ margin: '11px 0 10px 10px' }}
  3237. onClick={this.exportExec}
  3238. >
  3239. 导出Excel
  3240. </Button>
  3241. </TabPane>
  3242. {/* <TabPane tab="批量操作" key="6">
  3243. <Button
  3244. type="primary"
  3245. disabled={this.state.selectedRowKeys.length == 0}
  3246. style={{ margin: "0px 0px 10px 10px" }}
  3247. onClick={e => {
  3248. e.stopPropagation(),
  3249. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  3250. }}
  3251. >
  3252. 转交
  3253. </Button>
  3254. </TabPane> */}
  3255. </Tabs>
  3256. {/* <div className="user-search">
  3257. <Input
  3258. placeholder="客户名称"
  3259. value={this.state.nameSearch}
  3260. onChange={e => {
  3261. this.setState({ nameSearch: e.target.value });
  3262. }}
  3263. />
  3264. <Input
  3265. placeholder="订单编号"
  3266. value={this.state.orderNoSearch}
  3267. onChange={e => {
  3268. this.setState({ orderNoSearch: e.target.value });
  3269. }}
  3270. />
  3271. <Input
  3272. placeholder="项目编号"
  3273. value={this.state.taskNoSearch}
  3274. onChange={e => {
  3275. this.setState({ taskNoSearch: e.target.value });
  3276. }}
  3277. />
  3278. <Select
  3279. placeholder="选择部门"
  3280. style={{ width: 150, marginRight: "10px" }}
  3281. value={this.state.departmenttSearch}
  3282. onChange={e => {
  3283. this.setState({ departmenttSearch: e });
  3284. }}
  3285. >
  3286. {departmentArr.map(function(item) {
  3287. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  3288. })}
  3289. </Select>
  3290. <Button type="primary" onClick={this.search}>
  3291. 搜索
  3292. </Button>
  3293. <Button onClick={this.reset}>重置</Button>
  3294. <Button
  3295. type="primary"
  3296. style={{ marginLeft: "10px" }}
  3297. onClick={this.exportExec}
  3298. >
  3299. 导出Excel
  3300. </Button>
  3301. <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  3302. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  3303. <span>订单时间 :</span>
  3304. <RangePicker
  3305. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  3306. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  3307. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  3308. </div>
  3309. </div> */}
  3310. <div className="patent-table">
  3311. <Spin spinning={this.state.loading}>
  3312. <Table
  3313. columns={
  3314. this.state.changeList == undefined
  3315. ? this.state.columns
  3316. : this.state.changeList
  3317. }
  3318. dataSource={this.state.dataSource}
  3319. pagination={this.state.pagination}
  3320. scroll={{ x: 'max-content', y: 0 }}
  3321. onRowClick={this.tableRowClick.bind(this)}
  3322. bordered
  3323. size={'small'}
  3324. />
  3325. </Spin>
  3326. </div>
  3327. <Assign
  3328. title="项目"
  3329. selApi={'/api/admin/orderProject/projectDistribution'}
  3330. data={this.state.assignData}
  3331. showDesc={this.state.assignVisible}
  3332. closeDesc={this.closeAssign.bind(this)}
  3333. fenpaiData={8}
  3334. specially={0}
  3335. roleName={this.state.nub}
  3336. requestMethod={'post'}
  3337. flag={this.state.flag}
  3338. all={this.state}
  3339. />
  3340. {this.state.visible ? <Modal
  3341. className="customeDetails"
  3342. footer=""
  3343. title=""
  3344. width="900px"
  3345. visible={this.state.visible}
  3346. onOk={this.visitOk}
  3347. onCancel={this.visitCancel}
  3348. >
  3349. <Tabs
  3350. tabBarExtraContent={
  3351. <div style={{fontWeight:'bold',paddingRight:'15px'}}>
  3352. <span>
  3353. 项目名称:
  3354. <span style={{color:'#F00',paddingRight:'5px'}}>{this.state.taskName}</span>
  3355. </span>
  3356. <span style={{marginLeft:'15px'}}>
  3357. 项目编号:
  3358. <span style={{color:'#F00',paddingRight:'5px'}}>
  3359. {this.state.id}
  3360. {
  3361. this.state.splitStatus === 2 ? '('+this.state.splitSuper+'-'+this.state.splitId+')' : ''
  3362. }
  3363. </span>
  3364. </span>
  3365. </div>
  3366. }
  3367. activeKey={this.state.activeKey}
  3368. onChange={(e) => {
  3369. this.callback(e)
  3370. if (e === "2") {
  3371. this.waiDetail();
  3372. this.thirdTable(this.state.tid);
  3373. this.payNodeTable(this.state.tid);
  3374. this.getSelectOutsourceLog(this.state.tid);
  3375. }else if(e === "1"){
  3376. this.xiangqing(this.state.tid);
  3377. }
  3378. }}
  3379. >
  3380. <TabPane tab="项目概况" key="1">
  3381. {this.state.activeKey === "1" ? <Form
  3382. layout="horizontal"
  3383. onSubmit={this.handleSubmit}
  3384. id="demand-form"
  3385. style={{ paddingBottom: '00px' }}
  3386. >
  3387. <Spin spinning={this.state.loading}>
  3388. <div className="clearfix">
  3389. <div className="clearfix">
  3390. <FormItem
  3391. className="half-item"
  3392. {...formItemLayout}
  3393. label="当前项目情况"
  3394. >
  3395. <Radio.Group
  3396. value={this.state.status}
  3397. onChange={(e) => {
  3398. this.setState({ status: e.target.value })
  3399. }}
  3400. >
  3401. <Radio value={0}>开启</Radio>
  3402. <Radio value={1}>暂停</Radio>
  3403. </Radio.Group>
  3404. <Button
  3405. type="primary"
  3406. size="small"
  3407. style={{ marginTop: '5px', position: 'absolute' }}
  3408. onClick={this.caozuorizhi}
  3409. >
  3410. 操作日志
  3411. </Button>
  3412. </FormItem>
  3413. <FormItem
  3414. className="half-item"
  3415. {...formItemLayout}
  3416. label="合同编号"
  3417. >
  3418. <span>{this.state.contractNo}</span>
  3419. </FormItem>
  3420. </div>
  3421. <div className="clearfix">
  3422. <FormItem
  3423. className="half-item"
  3424. {...formItemLayout}
  3425. label="项目状态"
  3426. >
  3427. <Select
  3428. placeholder="选择项目状态"
  3429. style={{ width: '200px' }}
  3430. value={this.state.projectStatus}
  3431. onChange={(e) => {
  3432. this.setState({ projectStatus: e })
  3433. }}
  3434. >
  3435. {projectStatus.map(function (item) {
  3436. return (
  3437. <Select.Option key={item.value}>
  3438. {item.key}
  3439. </Select.Option>
  3440. )
  3441. })}
  3442. </Select>
  3443. </FormItem>
  3444. <FormItem
  3445. className="half-item"
  3446. {...formItemLayout}
  3447. label="是否特批"
  3448. >
  3449. <span>{getApproval(this.state.approval)}</span>
  3450. </FormItem>
  3451. <FormItem
  3452. className="half-item"
  3453. {...formItemLayout}
  3454. label="结算状态"
  3455. >
  3456. <span>
  3457. {getLiquidationStatus(this.state.liquidationStatus)}
  3458. </span>
  3459. </FormItem>
  3460. <FormItem
  3461. className="half-item"
  3462. {...formItemLayout}
  3463. label="流程状态"
  3464. >
  3465. <span>
  3466. {getProcessStatus(this.state.processStatus)}
  3467. </span>
  3468. </FormItem>
  3469. <FormItem
  3470. className="half-item"
  3471. {...formItemLayout}
  3472. label="订单编号"
  3473. >
  3474. <span>{this.state.orderNo}</span>
  3475. </FormItem>
  3476. </div>
  3477. <div className="clearfix">
  3478. <FormItem
  3479. className="half-item"
  3480. {...formItemLayout}
  3481. label="满意度表格"
  3482. >
  3483. <Radio.Group
  3484. value={this.state.formRetrieve}
  3485. onChange={(e) => {
  3486. this.setState({ formRetrieve: e.target.value })
  3487. }}
  3488. >
  3489. <Radio value={0}>未收回</Radio>
  3490. <Radio value={1}>已收回</Radio>
  3491. <Radio value={2}>其他</Radio>
  3492. </Radio.Group>
  3493. </FormItem>
  3494. <FormItem
  3495. className="half-item"
  3496. {...formItemLayout}
  3497. label="退单"
  3498. >
  3499. <Radio.Group
  3500. value={this.state.taskRefund}
  3501. onChange={(e) => {
  3502. this.setState({ taskRefund: e.target.value })
  3503. }}
  3504. >
  3505. <Radio value={0}>已完成</Radio>
  3506. <Radio value={1}>未完成</Radio>
  3507. <Radio value={2}>其他</Radio>
  3508. </Radio.Group>
  3509. </FormItem>
  3510. </div>
  3511. <div className="clearfix">
  3512. {
  3513. <FormItem
  3514. className="half-item"
  3515. {...formItemLayout}
  3516. label="(满意度)备注"
  3517. >
  3518. <Input
  3519. type="textarea"
  3520. placeholder="请输入备注"
  3521. rows={2}
  3522. value={this.state.retrieveContent}
  3523. onChange={(e) => {
  3524. this.setState({
  3525. retrieveContent: e.target.value,
  3526. })
  3527. }}
  3528. />
  3529. </FormItem>
  3530. }
  3531. {
  3532. <FormItem
  3533. className="half-item"
  3534. {...formItemLayout}
  3535. label="(退单)备注"
  3536. >
  3537. <Input
  3538. type="textarea"
  3539. placeholder="请输入备注"
  3540. rows={2}
  3541. value={this.state.refundContent}
  3542. onChange={(e) => {
  3543. this.setState({ refundContent: e.target.value })
  3544. }}
  3545. />
  3546. </FormItem>
  3547. }
  3548. </div>
  3549. <div className="clearfix">
  3550. <h3 className="sub-title">订单负责人信息</h3>
  3551. <FormItem
  3552. className="half-item"
  3553. {...formItemLayout}
  3554. label="负责人"
  3555. >
  3556. <span>
  3557. {this.state.salesmanName +
  3558. '(' +
  3559. this.state.depName +
  3560. ')'}
  3561. </span>
  3562. </FormItem>
  3563. <FormItem
  3564. className="half-item"
  3565. {...formItemLayout}
  3566. label="负责人电话"
  3567. >
  3568. <span>{this.state.salesmanMobile}</span>
  3569. </FormItem>
  3570. <FormItem
  3571. className="half-item"
  3572. {...formItemLayout}
  3573. label="当前财务负责人"
  3574. >
  3575. <span>{this.state.nowFinance}</span>
  3576. </FormItem>
  3577. <FormItem
  3578. className="half-item"
  3579. {...formItemLayout}
  3580. label="当前财务负责人电话"
  3581. >
  3582. <span>{this.state.nowFinanceMobile}</span>
  3583. </FormItem>
  3584. <FormItem
  3585. className="half-item"
  3586. {...formItemLayout}
  3587. style={{ opacity: '.5' }}
  3588. label="原负责人"
  3589. >
  3590. <span>{this.state.oldSalesmanName}</span>
  3591. </FormItem>
  3592. <FormItem
  3593. className="half-item"
  3594. {...formItemLayout}
  3595. style={{ opacity: '.5' }}
  3596. label="原负责人电话"
  3597. >
  3598. <span>{this.state.oldSalesmanMobile}</span>
  3599. </FormItem>
  3600. <FormItem
  3601. className="half-item"
  3602. {...formItemLayout}
  3603. style={{ opacity: '.5' }}
  3604. label="实际财务操作人"
  3605. >
  3606. <span>{this.state.financeName}</span>
  3607. </FormItem>
  3608. <FormItem
  3609. className="half-item"
  3610. {...formItemLayout}
  3611. style={{ opacity: '.5' }}
  3612. label="实际财务操作人电话"
  3613. >
  3614. <span>{this.state.financeMobile}</span>
  3615. </FormItem>
  3616. <FormItem
  3617. className="half-item"
  3618. {...formItemLayout}
  3619. label="订单留言"
  3620. >
  3621. <span>{this.state.orderRemarks}</span>
  3622. </FormItem>
  3623. <FormItem
  3624. className="half-item"
  3625. {...formItemLayout}
  3626. label=""
  3627. >
  3628. <Button onClick={this.getOrderLog}>查看订单日志</Button>
  3629. </FormItem>
  3630. <OrderRiZi
  3631. dataSourcerizhi={this.state.dataSourceY}
  3632. closeOrderLog={this.closeOrderLog}
  3633. visible={this.state.avisible}
  3634. loading={this.state.loading}
  3635. />
  3636. </div>
  3637. {/*<div className="clearfix">*/}
  3638. {/* <h3 className="sub-title">外包信息</h3>*/}
  3639. {/* <FormItem*/}
  3640. {/* className="half-item"*/}
  3641. {/* {...formItemLayout}*/}
  3642. {/* label="外包公司"*/}
  3643. {/* >*/}
  3644. {/* <Input*/}
  3645. {/* value={this.state.outsourceName}*/}
  3646. {/* onChange={(e) => {*/}
  3647. {/* this.setState({*/}
  3648. {/* outsourceName: e.target.value,*/}
  3649. {/* })*/}
  3650. {/* }}*/}
  3651. {/* placeholder="请输入外包公司"*/}
  3652. {/* style={{ width: '200px' }}*/}
  3653. {/* />*/}
  3654. {/* </FormItem>*/}
  3655. {/* <FormItem*/}
  3656. {/* className="half-item"*/}
  3657. {/* {...formItemLayout}*/}
  3658. {/* label="外包成本(万元)"*/}
  3659. {/* >*/}
  3660. {/* <Input*/}
  3661. {/* value={this.state.outsourcePrice}*/}
  3662. {/* onChange={(e) => {*/}
  3663. {/* this.setState({*/}
  3664. {/* outsourcePrice: e.target.value,*/}
  3665. {/* })*/}
  3666. {/* }}*/}
  3667. {/* placeholder="请输入外包成本"*/}
  3668. {/* style={{ width: '200px' }}*/}
  3669. {/* />*/}
  3670. {/* </FormItem>*/}
  3671. {/*</div>*/}
  3672. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  3673. <div className="clearfix">
  3674. <h3 className="sub-title">联系信息</h3>
  3675. <FormItem
  3676. className="half-item"
  3677. {...formItemLayout}
  3678. label="客户名称"
  3679. >
  3680. <span>{this.state.userName}</span>
  3681. </FormItem>
  3682. <FormItem
  3683. className="half-item"
  3684. {...formItemLayout}
  3685. label="企业法人"
  3686. >
  3687. <Input
  3688. placeholder="请输入法人名称"
  3689. value={this.state.legalPerson}
  3690. style={{ width: '200px' }}
  3691. onChange={(e) => {
  3692. this.setState({ legalPerson: e.target.value })
  3693. }}
  3694. ref="commodityQuantity"
  3695. />
  3696. </FormItem>
  3697. <FormItem
  3698. className="half-item"
  3699. {...formItemLayout}
  3700. label="法人电话"
  3701. >
  3702. <Input
  3703. placeholder="请输入法人电话"
  3704. value={this.state.legalPersonTel}
  3705. style={{ width: '200px' }}
  3706. onChange={(e) => {
  3707. this.setState({ legalPersonTel: e.target.value })
  3708. }}
  3709. ref="commodityQuantity"
  3710. />
  3711. </FormItem>
  3712. <FormItem
  3713. className="half-item"
  3714. {...formItemLayout}
  3715. label="客户联系人"
  3716. >
  3717. <Input
  3718. placeholder="请输入联系人名称"
  3719. value={this.state.contacts}
  3720. style={{ width: '200px' }}
  3721. onChange={(e) => {
  3722. this.setState({ contacts: e.target.value })
  3723. }}
  3724. ref="commodityQuantity"
  3725. />
  3726. </FormItem>
  3727. <FormItem
  3728. className="half-item"
  3729. {...formItemLayout}
  3730. label="联系人电话"
  3731. >
  3732. <Input
  3733. placeholder="请输入联系人电话"
  3734. value={this.state.contactMobile}
  3735. style={{ width: '200px' }}
  3736. onChange={(e) => {
  3737. this.setState({ contactMobile: e.target.value })
  3738. }}
  3739. ref="commodityQuantity"
  3740. />
  3741. </FormItem>
  3742. <FormItem
  3743. className="half-item"
  3744. {...formItemLayout}
  3745. label="企业地址"
  3746. >
  3747. <Cascader
  3748. options={areaSelect()}
  3749. value={this.state.ProvinceCity}
  3750. placeholder="选择城市"
  3751. style={{ width: '200px' }}
  3752. onChange={(e) => {
  3753. this.setState({ ProvinceCity: e })
  3754. }}
  3755. />
  3756. </FormItem>
  3757. <FormItem
  3758. className="half-item"
  3759. {...formItemLayout}
  3760. label=""
  3761. ></FormItem>
  3762. <FormItem
  3763. className="half-item"
  3764. {...formItemLayout}
  3765. label=""
  3766. >
  3767. <Input
  3768. placeholder="请输入详细地址"
  3769. value={this.state.postalAddress}
  3770. style={{ width: '200px', marginLeft: '12em' }}
  3771. onChange={(e) => {
  3772. this.setState({ postalAddress: e.target.value })
  3773. }}
  3774. ref="commodityQuantity"
  3775. />
  3776. </FormItem>
  3777. </div>
  3778. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  3779. <div className="clearfix">
  3780. <h3 className="sub-title">项目信息</h3>
  3781. <FormItem
  3782. className="half-item"
  3783. {...formItemLayout}
  3784. label="项目编号"
  3785. >
  3786. <span>
  3787. {this.state.splitStatus == 2
  3788. ? this.state.splitSuper + '-' + this.state.splitId
  3789. : this.state.id}
  3790. </span>
  3791. </FormItem>
  3792. <FormItem
  3793. className="half-item"
  3794. {...formItemLayout}
  3795. label="项目名称"
  3796. >
  3797. <span>{this.state.taskName}</span>
  3798. </FormItem>
  3799. <FormItem
  3800. className="half-item"
  3801. {...formItemLayout}
  3802. label="项目状态"
  3803. >
  3804. <Select
  3805. placeholder="选择项目状态"
  3806. style={{ width: '200px' }}
  3807. value={this.state.taskStatus}
  3808. onChange={(e) => {
  3809. this.setState({ taskStatus: e })
  3810. }}
  3811. >
  3812. {taskStatus.map(function (item) {
  3813. return (
  3814. <Select.Option key={item.value}>
  3815. {item.key}
  3816. </Select.Option>
  3817. )
  3818. })}
  3819. </Select>
  3820. </FormItem>
  3821. <FormItem
  3822. className="half-item"
  3823. {...formItemLayout}
  3824. label="项目类别"
  3825. >
  3826. <span>{this.state.cname}</span>
  3827. </FormItem>
  3828. <FormItem
  3829. className="half-item"
  3830. {...formItemLayout}
  3831. label="证书编号"
  3832. >
  3833. <Input
  3834. placeholder="请输入证书编号"
  3835. value={this.state.certificateNumber}
  3836. style={{ width: '200px' }}
  3837. onChange={(e) => {
  3838. this.setState({
  3839. certificateNumber: e.target.value,
  3840. })
  3841. }}
  3842. ref="commodityQuantity"
  3843. />
  3844. </FormItem>
  3845. </div>
  3846. <div className="clearfix">
  3847. <h3 className="sub-title">申报系统账户信息</h3>
  3848. {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}
  3849. <FormItem
  3850. className="half-item"
  3851. {...formItemLayout}
  3852. label="用户名"
  3853. >
  3854. <Input
  3855. placeholder="请输入用户名"
  3856. value={this.state.declareUser}
  3857. style={{ width: '200px' }}
  3858. onChange={(e) => {
  3859. this.setState({ declareUser: e.target.value })
  3860. }}
  3861. />
  3862. </FormItem>
  3863. <FormItem
  3864. className="half-item"
  3865. {...formItemLayout}
  3866. label="密码"
  3867. >
  3868. <Input
  3869. placeholder="请输入密码"
  3870. value={this.state.declarePwd}
  3871. style={{ width: '200px' }}
  3872. onChange={(e) => {
  3873. this.setState({ declarePwd: e.target.value })
  3874. }}
  3875. />
  3876. </FormItem>
  3877. </div>
  3878. <div className="clearfix">
  3879. <h3 className="sub-title">项目申报进度</h3>
  3880. <FormItem
  3881. className="half-item"
  3882. {...formItemLayout}
  3883. label="申报批次"
  3884. >
  3885. <Select
  3886. style={{ width: 200 }}
  3887. placeholder="请选择批次"
  3888. value={
  3889. this.state.declarationBatch
  3890. ? this.state.declarationBatch
  3891. : undefined
  3892. }
  3893. onChange={(e) => {
  3894. this.setState({
  3895. declarationBatch: e,
  3896. })
  3897. }}
  3898. >
  3899. <Option value={1}>第一批</Option>
  3900. <Option value={2}>第二批</Option>
  3901. <Option value={3}>第三批</Option>
  3902. <Option value={4}>第四批</Option>
  3903. </Select>
  3904. </FormItem>
  3905. <FormItem
  3906. className="half-item"
  3907. {...formItemLayout}
  3908. label="启动时间"
  3909. >
  3910. <DatePicker
  3911. style={{
  3912. marginTop: '2px',
  3913. width: '200px',
  3914. height: '32px',
  3915. }}
  3916. showTime
  3917. format="YYYY-MM-DD"
  3918. onOk={() => {}}
  3919. value={
  3920. this.state.startDate
  3921. ? moment(this.state.startDate)
  3922. : null
  3923. }
  3924. onChange={(data, dataString) => {
  3925. this.setState({ startDate: dataString })
  3926. }}
  3927. />
  3928. </FormItem>
  3929. <FormItem
  3930. className="half-item"
  3931. {...formItemLayout}
  3932. label="完成时间"
  3933. >
  3934. <DatePicker
  3935. style={{
  3936. marginTop: '2px',
  3937. width: '200px',
  3938. height: '32px',
  3939. }}
  3940. showTime
  3941. format="YYYY-MM-DD"
  3942. onOk={() => {}}
  3943. value={
  3944. this.state.endDate
  3945. ? moment(this.state.endDate)
  3946. : null
  3947. }
  3948. onChange={(data, dataString) => {
  3949. this.setState({ endDate: dataString })
  3950. }}
  3951. />
  3952. </FormItem>
  3953. <FormItem
  3954. className="half-item"
  3955. {...formItemLayout}
  3956. label="受理时间"
  3957. >
  3958. <DatePicker
  3959. style={{
  3960. marginTop: '2px',
  3961. width: '200px',
  3962. height: '32px',
  3963. }}
  3964. showTime
  3965. format="YYYY-MM-DD"
  3966. onOk={() => {}}
  3967. value={
  3968. this.state.acceptDate
  3969. ? moment(this.state.acceptDate)
  3970. : null
  3971. }
  3972. onChange={(data, dataString) => {
  3973. this.setState({ acceptDate: dataString })
  3974. }}
  3975. />
  3976. </FormItem>
  3977. <FormItem
  3978. className="half-item"
  3979. {...formItemLayout}
  3980. label="评审时间"
  3981. >
  3982. <DatePicker
  3983. style={{
  3984. marginTop: '2px',
  3985. width: '200px',
  3986. height: '32px',
  3987. }}
  3988. showTime
  3989. format="YYYY-MM-DD"
  3990. onOk={() => {}}
  3991. value={
  3992. this.state.reviewDate
  3993. ? moment(this.state.reviewDate)
  3994. : null
  3995. }
  3996. onChange={(data, dataString) => {
  3997. this.setState({ reviewDate: dataString })
  3998. }}
  3999. />
  4000. </FormItem>
  4001. <FormItem
  4002. className="half-item"
  4003. {...formItemLayout}
  4004. label="公示时间"
  4005. >
  4006. <DatePicker
  4007. style={{
  4008. marginTop: '2px',
  4009. width: '200px',
  4010. height: '32px',
  4011. }}
  4012. showTime
  4013. format="YYYY-MM-DD"
  4014. onOk={() => {}}
  4015. value={
  4016. this.state.publicityDate
  4017. ? moment(this.state.publicityDate)
  4018. : null
  4019. }
  4020. onChange={(data, dataString) => {
  4021. this.setState({ publicityDate: dataString })
  4022. }}
  4023. />
  4024. </FormItem>
  4025. <FormItem
  4026. className="half-item"
  4027. {...formItemLayout}
  4028. label="发证时间"
  4029. >
  4030. <DatePicker
  4031. style={{
  4032. marginTop: '2px',
  4033. width: '200px',
  4034. height: '32px',
  4035. }}
  4036. showTime
  4037. format="YYYY-MM-DD"
  4038. onOk={() => {}}
  4039. value={
  4040. this.state.licenceDate
  4041. ? moment(this.state.licenceDate)
  4042. : null
  4043. }
  4044. onChange={(data, dataString) => {
  4045. this.setState({ licenceDate: dataString })
  4046. }}
  4047. />
  4048. </FormItem>
  4049. <FormItem
  4050. className="half-item"
  4051. {...formItemLayout}
  4052. label="立项金额(万元)"
  4053. >
  4054. <Input
  4055. placeholder="请输入立项金额"
  4056. value={this.state.setUpAmount}
  4057. style={{ width: '200px' }}
  4058. onChange={(e) => {
  4059. this.setState({ setUpAmount: e.target.value })
  4060. }}
  4061. ref="commodityQuantity"
  4062. />
  4063. </FormItem>
  4064. <FormItem
  4065. className="half-item"
  4066. {...formItemLayout}
  4067. label="是否到款"
  4068. >
  4069. <Radio.Group
  4070. value={this.state.arrivalMoney}
  4071. onChange={(e) => {
  4072. this.setState({ arrivalMoney: e.target.value })
  4073. }}
  4074. >
  4075. <Radio value={0}>未到企业</Radio>
  4076. <Radio value={1}>已到企业</Radio>
  4077. </Radio.Group>
  4078. </FormItem>
  4079. </div>
  4080. <div className="clearfix">
  4081. <FormItem
  4082. labelCol={{ span: 3 }}
  4083. wrapperCol={{ span: 16 }}
  4084. label="附件"
  4085. >
  4086. <Picture
  4087. domId={'myTask1'}
  4088. fileList={(e) => {
  4089. this.setState({ attachmentUrl: e })
  4090. }}
  4091. pictureUrl={this.state.attachmentUrl}
  4092. visible={this.props.visible}
  4093. data={{
  4094. sign: 'order_task_file',
  4095. url: '/api/admin/orderProject/uploadOrderTaskFile',
  4096. }}
  4097. />
  4098. </FormItem>
  4099. </div>
  4100. <div className="clearfix">
  4101. <FormItem
  4102. labelCol={{ span: 3 }}
  4103. wrapperCol={{ span: 16 }}
  4104. label="备注"
  4105. >
  4106. <Input
  4107. type="textarea"
  4108. placeholder="请输入备注"
  4109. rows={4}
  4110. value={this.state.taskComment}
  4111. onChange={(e) => {
  4112. this.setState({ taskComment: e.target.value })
  4113. }}
  4114. />
  4115. </FormItem>
  4116. </div>
  4117. <div>
  4118. <h3 className="sub-title">项目业务</h3>
  4119. {this.state.processStatus == 0 ? (
  4120. <Button
  4121. type="primary"
  4122. onClick={this.addDetailed}
  4123. style={{
  4124. float: 'right',
  4125. marginRight: '50px',
  4126. marginBottom: '15px',
  4127. }}
  4128. >
  4129. 添加项目明细
  4130. </Button>
  4131. ) : (
  4132. ''
  4133. )}
  4134. </div>
  4135. <div className="patent-table">
  4136. <Spin spinning={this.state.loading}>
  4137. <Table
  4138. columns={this.state.columnsX}
  4139. dataSource={this.state.dataSourceX}
  4140. pagination={this.state.paginations}
  4141. onRowClick={this.tableRowClickX}
  4142. bordered
  4143. size="small"
  4144. />
  4145. </Spin>
  4146. </div>
  4147. <div className="clearfix">
  4148. <Button
  4149. className="cancel"
  4150. type="primary"
  4151. // onClick={this.tijiaoOk}
  4152. onClick={() => {
  4153. let num = this.state.projectStatus
  4154. if (
  4155. num != 0 &&
  4156. num != 10 &&
  4157. num != 11 &&
  4158. num != 12 &&
  4159. num != 2 &&
  4160. num != 5 &&
  4161. num != 6
  4162. ) {
  4163. this.showDeleteConfirm(num, this.tijiaoOk)
  4164. } else {
  4165. this.tijiaoOk()
  4166. }
  4167. }}
  4168. style={{ marginLeft: '200px', marginTop: '10px' }}
  4169. htmlType="submit"
  4170. >
  4171. 保存
  4172. </Button>
  4173. <Button
  4174. className="cancel"
  4175. type="ghost"
  4176. onClick={this.visitCancel}
  4177. style={{ marginLeft: '50px', marginTop: '10px' }}
  4178. >
  4179. 取消
  4180. </Button>
  4181. </div>
  4182. </div>
  4183. </Spin>
  4184. </Form> : <div/>}
  4185. </TabPane>
  4186. <TabPane tab="外包/供应商信息" key="2">
  4187. {this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
  4188. <div style={{ marginTop: 10 }}>
  4189. <div className="clearfix">
  4190. <FormItem
  4191. className="half-item"
  4192. {...formItemLayout}
  4193. label={
  4194. <span>
  4195. <strong style={{ color: '#f00' }}>*</strong>
  4196. 类型
  4197. </span>
  4198. }
  4199. >
  4200. <Radio.Group
  4201. value={this.state.startType}
  4202. onChange={(e) => {
  4203. let _this = this;
  4204. if(this.state.thirdInfoList.length >0){
  4205. confirm({
  4206. title: '确定要切换吗?',
  4207. content: '切换将删除所有第三信息和付款节点',
  4208. onOk() {
  4209. return new Promise((resolve, reject) => {
  4210. _this.setState({ startType: e.target.value },()=>{
  4211. _this.projectTypeTabContent(_this.state.projectType);
  4212. })
  4213. _this.confirmDeletNew(-1,resolve,reject)
  4214. if(_this.state.payNodeList.length > 0){
  4215. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4216. }
  4217. }).catch(() => console.log('Oops errors!'));
  4218. },
  4219. onCancel() {},
  4220. });
  4221. }else{
  4222. this.setState({ startType: e.target.value },()=>{
  4223. this.projectTypeTabContent(this.state.projectType);
  4224. })
  4225. }
  4226. }}
  4227. >
  4228. <Radio value={0}>外包(不走总部)</Radio>
  4229. <Radio value={1}>供应商信息</Radio>
  4230. </Radio.Group>
  4231. </FormItem>
  4232. </div>
  4233. {/* 专利类型 */}
  4234. <div
  4235. className="clearfix"
  4236. style={{
  4237. display: this.state.projectType === 1 ? 'block' : 'none',
  4238. }}
  4239. >
  4240. <FormItem
  4241. className="half-item"
  4242. {...formItemLayout}
  4243. label={
  4244. <span>
  4245. <strong style={{ color: '#f00' }}>*</strong>
  4246. 专利类型
  4247. </span>
  4248. }
  4249. >
  4250. <Radio.Group
  4251. value={this.state.patentType}
  4252. onChange={(e) => {
  4253. let _this = this;
  4254. if(this.state.thirdInfoList.length >0){
  4255. confirm({
  4256. title: '确定要切换吗?',
  4257. content: '切换将删除所有第三信息和付款节点',
  4258. onOk() {
  4259. return new Promise((resolve, reject) => {
  4260. _this.setState({ patentType: e.target.value },()=>{
  4261. _this.projectTypeTabContent(_this.state.projectType);
  4262. })
  4263. _this.confirmDeletNew(-1,resolve,reject)
  4264. if(_this.state.payNodeList.length > 0){
  4265. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4266. }
  4267. }).catch(() => console.log('Oops errors!'));
  4268. },
  4269. onCancel() {},
  4270. });
  4271. }else{
  4272. this.setState({ patentType: e.target.value },()=>{
  4273. this.projectTypeTabContent(this.state.projectType);
  4274. })
  4275. }
  4276. }}
  4277. >
  4278. <Radio value={0}>专利申请/变更/转让</Radio>
  4279. <Radio value={1}>专利买卖</Radio>
  4280. </Radio.Group>
  4281. </FormItem>
  4282. </div>
  4283. <div
  4284. className="clearfix"
  4285. style={{
  4286. display: this.state.projectType === 1? 'block' : 'none',
  4287. }}
  4288. >
  4289. <FormItem
  4290. className="half-item"
  4291. {...formItemLayout}
  4292. label={
  4293. <span>
  4294. <strong style={{ color: '#f00' }}>*</strong>
  4295. 专利名称
  4296. </span>
  4297. }
  4298. >
  4299. <Radio.Group
  4300. value={this.state.patentNameType}
  4301. onChange={(e) => {
  4302. let _this = this;
  4303. if(this.state.thirdInfoList.length >0){
  4304. confirm({
  4305. title: '确定要切换吗?',
  4306. content: '切换将删除所有第三信息和付款节点',
  4307. onOk() {
  4308. return new Promise((resolve, reject) => {
  4309. _this.setState({ patentNameType: e.target.value },()=>{
  4310. _this.projectTypeTabContent(_this.state.projectType);
  4311. })
  4312. _this.confirmDeletNew(-1,resolve,reject)
  4313. if(_this.state.payNodeList.length > 0){
  4314. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4315. }
  4316. }).catch(() => console.log('Oops errors!'));
  4317. },
  4318. onCancel() {},
  4319. });
  4320. }else{
  4321. this.setState({ patentNameType: e.target.value },()=>{
  4322. this.projectTypeTabContent(this.state.projectType);
  4323. })
  4324. }
  4325. }}
  4326. >
  4327. <Radio value={0}>实用新型专利</Radio>
  4328. <Radio value={1}>发明专利</Radio>
  4329. <Radio value={2}>外观专利</Radio>
  4330. {/*<Radio value={3}>*/}
  4331. {/* 其他*/}
  4332. {/* <Input*/}
  4333. {/* disabled={this.state.patentNameType !== 3}*/}
  4334. {/* value={this.state.patentName}*/}
  4335. {/* style={{ marginLeft: '15px' }}*/}
  4336. {/* onChange={(e) => {*/}
  4337. {/* this.setState({*/}
  4338. {/* patentName: e.target.value,*/}
  4339. {/* })*/}
  4340. {/* }}*/}
  4341. {/* placeholder="请填写专利名称"*/}
  4342. {/* />*/}
  4343. {/*</Radio>*/}
  4344. </Radio.Group>
  4345. </FormItem>
  4346. </div>
  4347. {/* 第三方信息专利 */}
  4348. <div
  4349. style={{
  4350. // display: this.state.type == 1 ? "block" : "none",
  4351. display: this.state.type == 1 ? 'block' : 'block',
  4352. }}
  4353. >
  4354. <span
  4355. style={{
  4356. marginLeft: '50px',
  4357. fontSize: '18px',
  4358. }}
  4359. >
  4360. 第三方信息
  4361. </span>
  4362. <span
  4363. style={{
  4364. display: 'inline-block',
  4365. marginLeft: 10,
  4366. color: 'red',
  4367. }}
  4368. >
  4369. 金额总计(万元): {this.state.allTotalAmount}
  4370. </span>
  4371. <Button
  4372. type="primary"
  4373. onClick={(e) => {
  4374. //this.state.startType 0外包 1供应商 类型为外包时,当普通单
  4375. if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
  4376. message.info('请先选择专利类型');
  4377. }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
  4378. message.info('请先选择专利名称');
  4379. } else{
  4380. this.addThirdList()
  4381. }
  4382. }}
  4383. style={{
  4384. float: 'right',
  4385. marginRight: '50px',
  4386. marginBottom: '15px',
  4387. }}
  4388. >
  4389. +新增供应商名称
  4390. </Button>
  4391. </div>
  4392. <div
  4393. className="clearfix"
  4394. style={{
  4395. // display: this.state.type == 1 ? "block" : "none",
  4396. display: this.state.type == 1 ? 'block' : 'block',
  4397. }}
  4398. >
  4399. <Spin spinning={this.state.loading}>
  4400. <Form layout="horizontal">
  4401. <Table
  4402. pagination={false}
  4403. columns={this.state.ContactsListsNew}
  4404. dataSource={this.state.thirdInfoList}
  4405. onRowClick={this.tableRowClickOne}
  4406. scroll={{ x: 'max-content', y: 0 }}
  4407. bordered
  4408. size="small"
  4409. />
  4410. <Col
  4411. span={24}
  4412. offset={9}
  4413. style={{ marginTop: '15px' }}
  4414. />
  4415. </Form>
  4416. </Spin>
  4417. </div>
  4418. {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
  4419. {/*this.state.startType 0外包 1供应商*/}
  4420. <div
  4421. style={{
  4422. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  4423. }}
  4424. >
  4425. <span
  4426. style={{
  4427. marginLeft: '50px',
  4428. fontSize: '18px',
  4429. }}
  4430. >
  4431. 付款节点
  4432. </span>
  4433. <span
  4434. style={{
  4435. display: 'inline-block',
  4436. marginLeft: 10,
  4437. color: 'red',
  4438. }}
  4439. />
  4440. <Button
  4441. type="primary"
  4442. onClick={(e) => {
  4443. this.addPayNode()
  4444. }}
  4445. style={{
  4446. float: 'right',
  4447. marginRight: '50px',
  4448. marginBottom: '15px',
  4449. }}
  4450. >
  4451. +新增付款节点
  4452. </Button>
  4453. </div>
  4454. {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
  4455. <div
  4456. className="clearfix"
  4457. style={{
  4458. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  4459. }}
  4460. >
  4461. <Spin spinning={this.state.loading}>
  4462. <Form layout="horizontal">
  4463. <Table
  4464. pagination={false}
  4465. columns={this.state.PayNodeTableColunms}
  4466. dataSource={this.state.payNodeList}
  4467. onRowClick={this.payNodeTableRowClickOne}
  4468. scroll={{ x: 'max-content', y: 0 }}
  4469. bordered
  4470. size="small"
  4471. />
  4472. <Col
  4473. span={24}
  4474. offset={9}
  4475. style={{ marginTop: '15px' }}
  4476. />
  4477. </Form>
  4478. </Spin>
  4479. </div>
  4480. <div className="clearfix">
  4481. <FormItem
  4482. className="half-item"
  4483. {...formItemLayout}
  4484. label={
  4485. <span>
  4486. <strong style={{ color: '#f00' }}>*</strong>备注
  4487. </span>
  4488. }
  4489. >
  4490. <TextArea
  4491. rows={4}
  4492. value={this.state.outsourceRemarks}
  4493. onChange={(e) => {
  4494. this.setState({
  4495. outsourceRemarks: e.target.value,
  4496. })
  4497. }}
  4498. placeholder="请输入备注"
  4499. />
  4500. </FormItem>
  4501. </div>
  4502. {/*<div className="clearfix">
  4503. <FormItem className="half-item"
  4504. {...formItemLayout}
  4505. label="上传协议文件" style={{height:"auto"}}>
  4506. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  4507. data={(e)=>{
  4508. return {
  4509. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  4510. }
  4511. }}
  4512. fileList={this.state.fileUrl}
  4513. onChange={(e)=>{
  4514. this.setState({
  4515. attachmentUrl:e.fileList,
  4516. fileUrl:e.fileList
  4517. })
  4518. }}>
  4519. {fileUrl.length>1?null:<Button>
  4520. <Icon type="upload" /> 点击上传
  4521. </Button>}
  4522. </Upload>
  4523. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  4524. </FormItem>
  4525. </div>*/}
  4526. <p
  4527. className="tip"
  4528. style={{
  4529. paddingBottom: '12px',
  4530. width: '240px',
  4531. marginLeft: '145px',
  4532. color: 'red',
  4533. }}
  4534. >
  4535. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  4536. </p>
  4537. <div className="clearfix">
  4538. <FormItem
  4539. labelCol={{ span: 4 }}
  4540. wrapperCol={{ span: 18 }}
  4541. label={
  4542. <span>
  4543. 合同/协议扫描件
  4544. </span>
  4545. }
  4546. >
  4547. <PicturesWall
  4548. domId={'myTask3'}
  4549. fileList={this.getOrgCodeUrlWai}
  4550. pictureUrl={this.state.pictureUrl}
  4551. />
  4552. <p style={{ color: 'red' }}>图片建议:要清晰。</p>
  4553. </FormItem>
  4554. </div>
  4555. {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
  4556. {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
  4557. <FormItem
  4558. className="half-item"
  4559. {...formItemLayout}
  4560. label={
  4561. <span>
  4562. <strong style={{ color: '#f00' }}>*</strong>发起原因
  4563. </span>
  4564. }
  4565. >
  4566. <TextArea
  4567. rows={4}
  4568. value={this.state.reason}
  4569. onChange={(e) => {
  4570. this.setState({
  4571. reason: e.target.value,
  4572. })
  4573. }}
  4574. placeholder="请输入发起原因"
  4575. />
  4576. </FormItem>
  4577. </div> : <div/>}
  4578. <div className="clearfix">
  4579. <div
  4580. style={{
  4581. display: 'inline-black',
  4582. textAlign: 'center',
  4583. }}
  4584. >
  4585. <Button
  4586. type="primary"
  4587. loading={this.state.loading}
  4588. onClick={()=>{
  4589. this.sureOut(this.state.startType);
  4590. }}
  4591. >
  4592. {
  4593. this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
  4594. }
  4595. </Button>
  4596. <p className="tip" style={{ color: 'red' }}>
  4597. {
  4598. this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
  4599. }
  4600. </p>
  4601. </div>
  4602. </div>
  4603. </div>
  4604. ) : (
  4605. <div>
  4606. {
  4607. this.state.visible && this.state.activeKey === '2' ?
  4608. <CheckProject
  4609. {...this.props}
  4610. tid={this.state.tid}
  4611. oldInfor={this.state.oldInfor}
  4612. projectType={this.state.projectType} //0正常 1专利 2软著 3审计
  4613. patentNameType={this.state.patentNameType}
  4614. patentName={this.state.patentName}
  4615. patentType={this.state.patentType}
  4616. status={this.state.refundStatus}
  4617. isPreviewPay={true}
  4618. thirdInfoList={this.state.thirdInfoList}
  4619. dataSource={this.state.payNodeList}
  4620. outsourceRemarks={this.state.outsourceRemarks}
  4621. fileList={this.state.pictureUrl}
  4622. startType={this.state.startType}
  4623. projectStatus={this.state.projectStatus}
  4624. onRefresh={()=>{
  4625. this.waiDetail();
  4626. this.thirdTable(this.state.tid);
  4627. this.getSelectOutsourceLog(this.state.tid);
  4628. this.payNodeTable(this.state.tid)
  4629. this.loadData(this.state.page)
  4630. }}
  4631. /> : <div/>
  4632. }
  4633. </div>
  4634. )}
  4635. {(this.state.refundStatus == 1 ||
  4636. this.state.refundStatus == 0 ||
  4637. this.state.refundStatus == 2) &&
  4638. this.state.startType !== 1
  4639. ? (
  4640. <div className="clearfix"
  4641. style={{
  4642. display: this.state.refundStatus == 0 ? 'none' : 'block',
  4643. }}
  4644. >
  4645. <hr className="division" />
  4646. {parseInt(this.state.startType) !== 1 ? <div style={{
  4647. color:'#F00',
  4648. fontWeight: 'bolder',
  4649. paddingBottom: '20px',
  4650. }}>
  4651. 审核结果: <span style={{paddingLeft:'20px'}}>{getRefundStatus(this.state.refundStatus)}</span>
  4652. </div> : <div/>}
  4653. <div className="outsourceLogList">
  4654. {
  4655. this.state.outsourceLogs && this.state.outsourceLogs.map((value,index)=>(
  4656. <div key={index} className="outsourceLogItem outsource">
  4657. <div style={{
  4658. display:'flex',
  4659. flexFlow:'row nowrap',
  4660. paddingBottom: '3px',
  4661. paddingTop: '3px',
  4662. }}>
  4663. <div>
  4664. {value.aname}
  4665. </div>
  4666. <div style={{paddingLeft:'5px'}}>
  4667. {
  4668. value.status === 0 ?
  4669. <Tag color="#2db7f5">发起外包审核</Tag> :
  4670. value.status === 1 ? <Tag color="#87d068">通过</Tag> :
  4671. <Tag color="#f50">驳回</Tag>
  4672. }
  4673. </div>
  4674. <div style={{
  4675. wordBreak: 'break-all',
  4676. maxWidth:'67%',
  4677. }}>
  4678. {value.remarks}
  4679. </div>
  4680. <div style={{paddingLeft: '10px'}}>
  4681. {value.createTimes}
  4682. </div>
  4683. </div>
  4684. </div>
  4685. ))
  4686. }
  4687. </div>
  4688. {/* <div*/}
  4689. {/* className="clearfix"*/}
  4690. {/* style={{*/}
  4691. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  4692. {/* }}*/}
  4693. {/* >*/}
  4694. {/* <FormItem*/}
  4695. {/* className="half-item"*/}
  4696. {/* {...formItemLayout}*/}
  4697. {/* label="审核意见"*/}
  4698. {/* >*/}
  4699. {/* <span>{this.state.remarks}</span>*/}
  4700. {/* </FormItem>*/}
  4701. {/* </div>*/}
  4702. {/* {parseInt(this.state.startType) !== 1 ?<div className="clearfix">*/}
  4703. {/* <FormItem*/}
  4704. {/* className="half-item"*/}
  4705. {/* {...formItemLayout}*/}
  4706. {/* label="审核结果"*/}
  4707. {/* >*/}
  4708. {/* <span>{getRefundStatus(this.state.refundStatus)}</span>*/}
  4709. {/* </FormItem>*/}
  4710. {/* </div> : <div/>}*/}
  4711. {/* <div*/}
  4712. {/* className="clearfix"*/}
  4713. {/* style={{*/}
  4714. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  4715. {/* }}*/}
  4716. {/* >*/}
  4717. {/* <FormItem*/}
  4718. {/* className="half-item"*/}
  4719. {/* {...formItemLayout}*/}
  4720. {/* label="审核时间"*/}
  4721. {/* >*/}
  4722. {/* <span>{this.state.auditTimes}</span>*/}
  4723. {/* </FormItem>*/}
  4724. {/* </div>*/}
  4725. </div>
  4726. ) : (
  4727. ''
  4728. )}
  4729. </TabPane>
  4730. {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
  4731. <TabPane tab="订单详情" key="3">
  4732. <Spin spinning={this.state.loading}>
  4733. {this.state.activeKey === "3" ? <OrderDetail
  4734. orderData={this.state.orderData}
  4735. getOrderLog={this.getOrderLog}
  4736. dataSourceX={this.state.dataSourceX}
  4737. contactList={this.state.jiedian}
  4738. orderNo={this.state.orderNo}
  4739. totalCui={this.state.totalCui}
  4740. contactListNew={this.state.jiedianNew}
  4741. pictureUrl={this.state.contractPictureUrl}
  4742. /> : <div/>}
  4743. </Spin>
  4744. </TabPane>
  4745. ) : (
  4746. ''
  4747. )}
  4748. </Tabs>
  4749. </Modal> : <div/>}
  4750. <Modal
  4751. maskClosable={false}
  4752. visible={this.state.lookVisible}
  4753. onOk={this.noCancel}
  4754. onCancel={this.noCancel}
  4755. width="500px"
  4756. title={'添加工时'}
  4757. footer=""
  4758. className="admin-desc-content"
  4759. >
  4760. <Form layout="horizontal" id="demand-form">
  4761. <Spin spinning={this.state.loading}>
  4762. <div className="clearfix">
  4763. <FormItem {...formItemLayout} label="工作日期">
  4764. <DatePicker
  4765. style={{ marginTop: '2px', width: '200px', height: '32px' }}
  4766. showTime
  4767. format="YYYY-MM-DD"
  4768. onOk={() => {}}
  4769. value={
  4770. this.state.taskDate ? moment(this.state.taskDate) : null
  4771. }
  4772. onChange={(data, dataString) => {
  4773. this.setState({ taskDate: dataString })
  4774. }}
  4775. />
  4776. </FormItem>
  4777. </div>
  4778. <div className="clearfix">
  4779. <FormItem {...formItemLayout} label="工作时长">
  4780. <Input
  4781. placeholder="请输入工作时长"
  4782. value={this.state.hours}
  4783. style={{ width: '200px' }}
  4784. onChange={(e) => {
  4785. this.setState({ hours: e.target.value })
  4786. }}
  4787. ref="commodityQuantity"
  4788. />
  4789. </FormItem>
  4790. </div>
  4791. <div className="clearfix">
  4792. <FormItem {...formItemLayout} label="工作内容">
  4793. <Input
  4794. type="textarea"
  4795. placeholder="请输入备注"
  4796. rows={4}
  4797. value={this.state.remarks}
  4798. onChange={(e) => {
  4799. this.setState({ remarks: e.target.value })
  4800. }}
  4801. />
  4802. </FormItem>
  4803. </div>
  4804. <div className="clearfix">
  4805. <Button
  4806. className="cancel"
  4807. type="primary"
  4808. onClick={this.tianjiaOk}
  4809. style={{ marginLeft: '100px' }}
  4810. htmlType="submit"
  4811. >
  4812. 确定
  4813. </Button>
  4814. <Button
  4815. className="cancel"
  4816. type="ghost"
  4817. onClick={this.noCancel}
  4818. style={{ marginLeft: '50px' }}
  4819. >
  4820. 取消
  4821. </Button>
  4822. </div>
  4823. </Spin>
  4824. </Form>
  4825. </Modal>
  4826. {this.state.addnextVisible ? <Modal
  4827. maskClosable={false}
  4828. visible={this.state.addnextVisible}
  4829. onOk={this.nextCancel}
  4830. onCancel={this.nextCancel}
  4831. width="800px"
  4832. title="项目详情"
  4833. footer=""
  4834. className="admin-desc-content"
  4835. >
  4836. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  4837. <Spin spinning={this.state.loading}>
  4838. <div className="clearfix">
  4839. <FormItem
  4840. className="half-item"
  4841. {...formItemLayout}
  4842. label="项目名称"
  4843. >
  4844. <span>{this.state.commodityName}</span>
  4845. </FormItem>
  4846. <FormItem
  4847. className="half-item"
  4848. {...formItemLayout}
  4849. label="项目数量"
  4850. >
  4851. <span>{this.state.commodityQuantity}</span>
  4852. </FormItem>
  4853. <FormItem
  4854. className="half-item"
  4855. {...formItemLayout}
  4856. label="官费"
  4857. style={{ display: this.state.displayFees }}
  4858. >
  4859. <span>
  4860. {this.state.officialCost == 0 ? '无官费' : '有官费'}
  4861. </span>
  4862. </FormItem>
  4863. <FormItem
  4864. className="half-item"
  4865. {...formItemLayout}
  4866. label="费减"
  4867. style={{ display: this.state.displayFees }}
  4868. >
  4869. <span>
  4870. {this.state.costReduction == 0 ? '无费减' : '有费减'}
  4871. </span>
  4872. </FormItem>
  4873. <FormItem
  4874. className="half-item"
  4875. {...formItemLayout}
  4876. label="金额(万元)"
  4877. >
  4878. <span>{this.state.commodityPrice ? '***' : 0}</span>
  4879. </FormItem>
  4880. <FormItem
  4881. className="half-item"
  4882. {...formItemLayout}
  4883. label="主要项目"
  4884. >
  4885. <span>{getboutique(this.state.main)}</span>
  4886. </FormItem>
  4887. <div className="clearfix">
  4888. <FormItem
  4889. labelCol={{ span: 3 }}
  4890. wrapperCol={{ span: 18 }}
  4891. label="服务说明"
  4892. >
  4893. <span>{this.state.taskComment}</span>
  4894. </FormItem>
  4895. </div>
  4896. </div>
  4897. </Spin>
  4898. </Form>
  4899. </Modal> : <div/>}
  4900. <Modal
  4901. maskClosable={false}
  4902. visible={this.state.speVisible}
  4903. onOk={this.visitOk}
  4904. onCancel={this.visitCancel}
  4905. width="900px"
  4906. title=""
  4907. footer=""
  4908. className="admin-desc-content"
  4909. >
  4910. <Tabs
  4911. tabBarExtraContent={
  4912. <div style={{fontWeight:'bold',paddingRight:'15px'}}>
  4913. <span>
  4914. 项目名称:
  4915. <span style={{color:'#F00',paddingRight:'5px'}}>{this.state.taskName}</span>
  4916. </span>
  4917. <span style={{marginLeft:'15px'}}>
  4918. 项目编号:
  4919. <span style={{color:'#F00',paddingRight:'5px'}}>
  4920. {this.state.id}
  4921. {
  4922. this.state.splitStatus === 2 ? '('+this.state.splitSuper+'-'+this.state.splitId+')' : ''
  4923. }
  4924. </span>
  4925. </span>
  4926. </div>
  4927. }
  4928. activeKey={this.state.activeKey}
  4929. onChange={this.orderChange}
  4930. >
  4931. <TabPane tab="项目概况" key="1">
  4932. <div className="clearfix">
  4933. <FormItem
  4934. className="half-item"
  4935. {...formItemLayout}
  4936. label="当前项目情况"
  4937. >
  4938. <Radio.Group
  4939. value={this.state.status}
  4940. onChange={(e) => {
  4941. this.setState({ status: e.target.value })
  4942. }}
  4943. >
  4944. <Radio value={0}>开启</Radio>
  4945. <Radio value={1}>暂停</Radio>
  4946. </Radio.Group>
  4947. <Button
  4948. type="primary"
  4949. size="small"
  4950. style={{ marginTop: '5px', position: 'absolute' }}
  4951. onClick={this.caozuorizhi}
  4952. >
  4953. 操作日志
  4954. </Button>
  4955. </FormItem>
  4956. <FormItem
  4957. className="half-item"
  4958. {...formItemLayout}
  4959. label="合同编号"
  4960. >
  4961. <span>{this.state.contractNo}</span>
  4962. </FormItem>
  4963. </div>
  4964. <div className="clearfix">
  4965. <FormItem
  4966. className="half-item"
  4967. {...formItemLayout}
  4968. label="项目状态"
  4969. >
  4970. <Select
  4971. placeholder="选择项目状态"
  4972. style={{ width: '200px' }}
  4973. value={this.state.projectStatus}
  4974. onChange={(e) => {
  4975. this.setState({ projectStatus: e })
  4976. }}
  4977. >
  4978. {projectStatus.map(function (item) {
  4979. return (
  4980. <Select.Option key={item.value}>
  4981. {item.key}
  4982. </Select.Option>
  4983. )
  4984. })}
  4985. </Select>
  4986. </FormItem>
  4987. <FormItem
  4988. className="half-item"
  4989. {...formItemLayout}
  4990. label="是否特批"
  4991. >
  4992. <span>{getApproval(this.state.approval)}</span>
  4993. </FormItem>
  4994. <FormItem
  4995. className="half-item"
  4996. {...formItemLayout}
  4997. label="结算状态"
  4998. >
  4999. <span>
  5000. {getLiquidationStatus(this.state.liquidationStatus)}
  5001. </span>
  5002. </FormItem>
  5003. <FormItem
  5004. className="half-item"
  5005. {...formItemLayout}
  5006. label="流程状态"
  5007. >
  5008. <span>{getProcessStatus(this.state.processStatus)}</span>
  5009. </FormItem>
  5010. <FormItem
  5011. className="half-item"
  5012. {...formItemLayout}
  5013. label="订单编号"
  5014. >
  5015. <span>{this.state.orderNo}</span>
  5016. </FormItem>
  5017. </div>
  5018. <div className="clearfix">
  5019. <FormItem
  5020. className="half-item"
  5021. {...formItemLayout}
  5022. label="满意度表格"
  5023. >
  5024. <Radio.Group
  5025. value={this.state.formRetrieve}
  5026. onChange={(e) => {
  5027. this.setState({ formRetrieve: e.target.value })
  5028. }}
  5029. >
  5030. <Radio value={0}>未收回</Radio>
  5031. <Radio value={1}>已收回</Radio>
  5032. <Radio value={2}>其他</Radio>
  5033. </Radio.Group>
  5034. </FormItem>
  5035. <FormItem
  5036. className="half-item"
  5037. {...formItemLayout}
  5038. label="退单"
  5039. >
  5040. <Radio.Group
  5041. value={this.state.taskRefund}
  5042. onChange={(e) => {
  5043. this.setState({ taskRefund: e.target.value })
  5044. }}
  5045. >
  5046. <Radio value={0}>已完成</Radio>
  5047. <Radio value={1}>未完成</Radio>
  5048. <Radio value={2}>其他</Radio>
  5049. </Radio.Group>
  5050. </FormItem>
  5051. </div>
  5052. <div className="clearfix">
  5053. {
  5054. <FormItem
  5055. className="half-item"
  5056. {...formItemLayout}
  5057. label="(满意度)备注"
  5058. >
  5059. <Input
  5060. type="textarea"
  5061. placeholder="请输入备注"
  5062. rows={2}
  5063. value={this.state.retrieveContent}
  5064. onChange={(e) => {
  5065. this.setState({ retrieveContent: e.target.value })
  5066. }}
  5067. />
  5068. </FormItem>
  5069. }
  5070. {
  5071. <FormItem
  5072. className="half-item"
  5073. {...formItemLayout}
  5074. label="(退单)备注"
  5075. >
  5076. <Input
  5077. type="textarea"
  5078. placeholder="请输入备注"
  5079. rows={2}
  5080. value={this.state.refundContent}
  5081. onChange={(e) => {
  5082. this.setState({ refundContent: e.target.value })
  5083. }}
  5084. />
  5085. </FormItem>
  5086. }
  5087. </div>
  5088. <div className="clearfix">
  5089. <h3 className="sub-title">订单负责人信息</h3>
  5090. <FormItem
  5091. className="half-item"
  5092. {...formItemLayout}
  5093. label="负责人"
  5094. >
  5095. <span>
  5096. {this.state.salesmanName + '(' + this.state.depName + ')'}
  5097. </span>
  5098. </FormItem>
  5099. <FormItem
  5100. className="half-item"
  5101. {...formItemLayout}
  5102. label="负责人电话"
  5103. >
  5104. <span>{this.state.salesmanMobile}</span>
  5105. </FormItem>
  5106. <FormItem
  5107. className="half-item"
  5108. {...formItemLayout}
  5109. label="当前财务负责人"
  5110. >
  5111. <span>{this.state.nowFinance}</span>
  5112. </FormItem>
  5113. <FormItem
  5114. className="half-item"
  5115. {...formItemLayout}
  5116. label="当前财务负责人电话"
  5117. >
  5118. <span>{this.state.nowFinanceMobile}</span>
  5119. </FormItem>
  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. <FormItem
  5137. className="half-item"
  5138. {...formItemLayout}
  5139. style={{ opacity: '.5' }}
  5140. label="实际财务操作人"
  5141. >
  5142. <span>{this.state.financeName}</span>
  5143. </FormItem>
  5144. <FormItem
  5145. className="half-item"
  5146. {...formItemLayout}
  5147. style={{ opacity: '.5' }}
  5148. label="实际财务操作人电话"
  5149. >
  5150. <span>{this.state.financeMobile}</span>
  5151. </FormItem>
  5152. <FormItem
  5153. className="half-item"
  5154. {...formItemLayout}
  5155. label="订单留言"
  5156. >
  5157. <span>{this.state.orderRemarks}</span>
  5158. </FormItem>
  5159. <FormItem className="half-item" {...formItemLayout} label="">
  5160. <Button onClick={this.getOrderLog}>查看订单日志</Button>
  5161. </FormItem>
  5162. <OrderRiZi
  5163. dataSourcerizhi={this.state.dataSourceY}
  5164. closeOrderLog={this.closeOrderLog}
  5165. visible={this.state.avisible}
  5166. loading={this.state.loading}
  5167. />
  5168. </div>
  5169. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  5170. <div className="clearfix">
  5171. <h3 className="sub-title">联系信息</h3>
  5172. <FormItem
  5173. className="half-item"
  5174. {...formItemLayout}
  5175. label="客户名称"
  5176. >
  5177. <span>{this.state.userName}</span>
  5178. </FormItem>
  5179. <FormItem
  5180. className="half-item"
  5181. {...formItemLayout}
  5182. label="企业法人"
  5183. >
  5184. <Input
  5185. placeholder="请输入法人名称"
  5186. value={this.state.legalPerson}
  5187. style={{ width: '200px' }}
  5188. onChange={(e) => {
  5189. this.setState({ legalPerson: e.target.value })
  5190. }}
  5191. ref="commodityQuantity"
  5192. />
  5193. </FormItem>
  5194. <FormItem
  5195. className="half-item"
  5196. {...formItemLayout}
  5197. label="法人电话"
  5198. >
  5199. <Input
  5200. placeholder="请输入法人电话"
  5201. value={this.state.legalPersonTel}
  5202. style={{ width: '200px' }}
  5203. onChange={(e) => {
  5204. this.setState({ legalPersonTel: e.target.value })
  5205. }}
  5206. ref="commodityQuantity"
  5207. />
  5208. </FormItem>
  5209. <FormItem
  5210. className="half-item"
  5211. {...formItemLayout}
  5212. label="客户联系人"
  5213. >
  5214. <Input
  5215. placeholder="请输入联系人名称"
  5216. value={this.state.contacts}
  5217. style={{ width: '200px' }}
  5218. onChange={(e) => {
  5219. this.setState({ contacts: e.target.value })
  5220. }}
  5221. ref="commodityQuantity"
  5222. />
  5223. </FormItem>
  5224. <FormItem
  5225. className="half-item"
  5226. {...formItemLayout}
  5227. label="联系人电话"
  5228. >
  5229. <Input
  5230. placeholder="请输入联系人电话"
  5231. value={this.state.contactMobile}
  5232. style={{ width: '200px' }}
  5233. onChange={(e) => {
  5234. this.setState({ contactMobile: e.target.value })
  5235. }}
  5236. ref="commodityQuantity"
  5237. />
  5238. </FormItem>
  5239. <FormItem
  5240. className="half-item"
  5241. {...formItemLayout}
  5242. label="企业地址"
  5243. >
  5244. <Cascader
  5245. options={areaSelect()}
  5246. value={this.state.ProvinceCity}
  5247. placeholder="选择城市"
  5248. style={{ width: '200px' }}
  5249. onChange={(e) => {
  5250. this.setState({ ProvinceCity: e })
  5251. }}
  5252. />
  5253. </FormItem>
  5254. <FormItem
  5255. className="half-item"
  5256. {...formItemLayout}
  5257. label=""
  5258. ></FormItem>
  5259. <FormItem className="half-item" {...formItemLayout} label="">
  5260. <Input
  5261. placeholder="请输入详细地址"
  5262. value={this.state.postalAddress}
  5263. style={{ width: '200px', marginLeft: '12em' }}
  5264. onChange={(e) => {
  5265. this.setState({ postalAddress: e.target.value })
  5266. }}
  5267. ref="commodityQuantity"
  5268. />
  5269. </FormItem>
  5270. </div>
  5271. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  5272. <div className="clearfix">
  5273. <h3 className="sub-title">项目信息</h3>
  5274. <FormItem
  5275. className="half-item"
  5276. {...formItemLayout}
  5277. label="项目编号"
  5278. >
  5279. <span>
  5280. {this.state.splitStatus == 2
  5281. ? this.state.splitSuper + '-' + this.state.splitId
  5282. : this.state.id}
  5283. </span>
  5284. </FormItem>
  5285. <FormItem
  5286. className="half-item"
  5287. {...formItemLayout}
  5288. label="项目名称"
  5289. >
  5290. <span>{this.state.taskName}</span>
  5291. </FormItem>
  5292. <FormItem
  5293. className="half-item"
  5294. {...formItemLayout}
  5295. label="项目状态"
  5296. >
  5297. <Select
  5298. placeholder="选择项目状态"
  5299. style={{ width: '200px' }}
  5300. value={this.state.taskStatus}
  5301. onChange={(e) => {
  5302. this.setState({ taskStatus: e })
  5303. }}
  5304. >
  5305. {taskStatus.map(function (item) {
  5306. return (
  5307. <Select.Option key={item.value}>
  5308. {item.key}
  5309. </Select.Option>
  5310. )
  5311. })}
  5312. </Select>
  5313. </FormItem>
  5314. <FormItem
  5315. className="half-item"
  5316. {...formItemLayout}
  5317. label="项目类别"
  5318. >
  5319. <span>{this.state.cname}</span>
  5320. </FormItem>
  5321. <FormItem
  5322. className="half-item"
  5323. {...formItemLayout}
  5324. label="证书编号"
  5325. >
  5326. <Input
  5327. placeholder="请输入证书编号"
  5328. value={this.state.certificateNumber}
  5329. style={{ width: '200px' }}
  5330. onChange={(e) => {
  5331. this.setState({ certificateNumber: e.target.value })
  5332. }}
  5333. ref="commodityQuantity"
  5334. />
  5335. </FormItem>
  5336. </div>
  5337. <div className="clearfix" style={{ marginTop: '10px' }}>
  5338. <FormItem
  5339. labelCol={{ span: 3 }}
  5340. wrapperCol={{ span: 14 }}
  5341. label="附件"
  5342. >
  5343. <Picture
  5344. domId={'myTask2'}
  5345. fileList={(e) => {
  5346. this.setState({ attachmentUrl: e })
  5347. }}
  5348. pictureUrl={this.state.attachmentUrl}
  5349. visible={this.props.visible}
  5350. data={{
  5351. sign: 'order_task_file',
  5352. url: '/api/admin/orderProject/uploadOrderTaskFile',
  5353. }}
  5354. />
  5355. </FormItem>
  5356. </div>
  5357. <div className="clearfix">
  5358. <FormItem
  5359. labelCol={{ span: 3 }}
  5360. wrapperCol={{ span: 16 }}
  5361. label="备注"
  5362. >
  5363. <Input
  5364. type="textarea"
  5365. placeholder="请输入备注"
  5366. rows={4}
  5367. value={this.state.taskComment}
  5368. onChange={(e) => {
  5369. this.setState({ taskComment: e.target.value })
  5370. }}
  5371. />
  5372. </FormItem>
  5373. </div>
  5374. <div className="clearfix">
  5375. <h3 className="sub-title">项目申报进度</h3>
  5376. <FormItem
  5377. className="half-item"
  5378. {...formItemLayout}
  5379. label="申报批次"
  5380. >
  5381. <Select
  5382. value={
  5383. this.state.declarationBatch
  5384. ? this.state.declarationBatch
  5385. : undefined
  5386. }
  5387. placeholder="请选择批次"
  5388. style={{ width: 200 }}
  5389. onChange={(e) => {
  5390. this.setState({
  5391. declarationBatch: e,
  5392. })
  5393. }}
  5394. >
  5395. <Option value={1}>第一批</Option>
  5396. <Option value={2}>第二批</Option>
  5397. <Option value={3}>第三批</Option>
  5398. <Option value={4}>第四批</Option>
  5399. </Select>
  5400. </FormItem>
  5401. <FormItem
  5402. className="half-item"
  5403. {...formItemLayout}
  5404. label="软著派单数量"
  5405. >
  5406. <span>{this.state.commodityQuantity}</span>
  5407. <Button
  5408. type="primary"
  5409. size="small"
  5410. style={{ marginLeft: '45px' }}
  5411. onClick={this.addcontact}
  5412. >
  5413. +增加下证信息
  5414. </Button>
  5415. </FormItem>
  5416. <div className="patent-table">
  5417. <Spin spinning={this.state.loading}>
  5418. <Table
  5419. columns={this.state.ContactsLists}
  5420. dataSource={this.state.contactList}
  5421. pagination={false}
  5422. bordered
  5423. size="small"
  5424. />
  5425. </Spin>
  5426. </div>
  5427. </div>
  5428. <div className="clearfix">
  5429. <h3 className="sub-title">项目业务</h3>
  5430. <div className="patent-table">
  5431. <Spin spinning={this.state.loading}>
  5432. <Table
  5433. columns={this.state.columnsX}
  5434. dataSource={this.state.dataSourceX}
  5435. pagination={this.state.paginations}
  5436. onRowClick={this.tableRowClickX}
  5437. bordered
  5438. size="small"
  5439. />
  5440. </Spin>
  5441. </div>
  5442. </div>
  5443. <div className="clearfix">
  5444. <Button
  5445. className="cancel"
  5446. type="primary"
  5447. onClick={this.tijiaoOk}
  5448. style={{ marginLeft: '200px', marginTop: '10px' }}
  5449. htmlType="submit"
  5450. >
  5451. 保存
  5452. </Button>
  5453. <Button
  5454. className="cancel"
  5455. type="ghost"
  5456. onClick={this.visitCancel}
  5457. style={{ marginLeft: '50px', marginTop: '10px' }}
  5458. >
  5459. 取消
  5460. </Button>
  5461. </div>
  5462. </TabPane>
  5463. <TabPane tab="外包/供应商信息" key="2">
  5464. {this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
  5465. <div style={{ marginTop: 10 }}>
  5466. <div className="clearfix">
  5467. <FormItem
  5468. className="half-item"
  5469. {...formItemLayout}
  5470. label={
  5471. <span>
  5472. <strong style={{ color: '#f00' }}>*</strong>
  5473. 类型
  5474. </span>
  5475. }
  5476. >
  5477. <Radio.Group
  5478. value={this.state.startType}
  5479. onChange={(e) => {
  5480. let _this = this;
  5481. if(this.state.thirdInfoList.length >0){
  5482. confirm({
  5483. title: '确定要切换吗?',
  5484. content: '切换将删除所有第三信息和付款节点',
  5485. onOk() {
  5486. return new Promise((resolve, reject) => {
  5487. _this.setState({ startType: e.target.value },()=>{
  5488. _this.projectTypeTabContent(_this.state.projectType);
  5489. })
  5490. _this.confirmDeletNew(-1,resolve,reject)
  5491. if(_this.state.payNodeList.length > 0){
  5492. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  5493. }
  5494. }).catch(() => console.log('Oops errors!'));
  5495. },
  5496. onCancel() {},
  5497. });
  5498. }else{
  5499. this.setState({ startType: e.target.value },()=>{
  5500. this.projectTypeTabContent(this.state.projectType);
  5501. })
  5502. }
  5503. }}
  5504. >
  5505. <Radio value={0}>外包(不走总部)</Radio>
  5506. <Radio value={1}>供应商信息</Radio>
  5507. </Radio.Group>
  5508. </FormItem>
  5509. </div>
  5510. {/* 专利类型 */}
  5511. <div
  5512. className="clearfix"
  5513. style={{
  5514. display: this.state.projectType === 1 ? 'block' : 'none',
  5515. }}
  5516. >
  5517. <FormItem
  5518. className="half-item"
  5519. {...formItemLayout}
  5520. label={
  5521. <span>
  5522. <strong style={{ color: '#f00' }}>*</strong>
  5523. 专利类型
  5524. </span>
  5525. }
  5526. >
  5527. <Radio.Group
  5528. value={this.state.patentType}
  5529. onChange={(e) => {
  5530. let _this = this;
  5531. if(this.state.thirdInfoList.length >0){
  5532. confirm({
  5533. title: '确定要切换吗?',
  5534. content: '切换将删除所有第三信息和付款节点',
  5535. onOk() {
  5536. return new Promise((resolve, reject) => {
  5537. _this.setState({ patentType: e.target.value },()=>{
  5538. _this.projectTypeTabContent(_this.state.projectType);
  5539. })
  5540. _this.confirmDeletNew(-1,resolve,reject)
  5541. if(_this.state.payNodeList.length > 0){
  5542. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  5543. }
  5544. }).catch(() => console.log('Oops errors!'));
  5545. },
  5546. onCancel() {},
  5547. });
  5548. }else{
  5549. this.setState({ patentType: e.target.value },()=>{
  5550. this.projectTypeTabContent(this.state.projectType);
  5551. })
  5552. }
  5553. }}
  5554. >
  5555. <Radio value={0}>专利申请/变更/转让</Radio>
  5556. <Radio value={1}>专利买卖</Radio>
  5557. </Radio.Group>
  5558. </FormItem>
  5559. </div>
  5560. <div
  5561. className="clearfix"
  5562. style={{
  5563. display: this.state.projectType === 1? 'block' : 'none',
  5564. }}
  5565. >
  5566. <FormItem
  5567. className="half-item"
  5568. {...formItemLayout}
  5569. label={
  5570. <span>
  5571. <strong style={{ color: '#f00' }}>*</strong>
  5572. 专利名称
  5573. </span>
  5574. }
  5575. >
  5576. <Radio.Group
  5577. value={this.state.patentNameType}
  5578. onChange={(e) => {
  5579. let _this = this;
  5580. if(this.state.thirdInfoList.length >0){
  5581. confirm({
  5582. title: '确定要切换吗?',
  5583. content: '切换将删除所有第三信息和付款节点',
  5584. onOk() {
  5585. return new Promise((resolve, reject) => {
  5586. _this.setState({ patentNameType: e.target.value },()=>{
  5587. _this.projectTypeTabContent(_this.state.projectType);
  5588. })
  5589. _this.confirmDeletNew(-1,resolve,reject)
  5590. if(_this.state.payNodeList.length > 0){
  5591. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  5592. }
  5593. }).catch(() => console.log('Oops errors!'));
  5594. },
  5595. onCancel() {},
  5596. });
  5597. }else{
  5598. this.setState({ patentNameType: e.target.value },()=>{
  5599. this.projectTypeTabContent(this.state.projectType);
  5600. })
  5601. }
  5602. }}
  5603. >
  5604. <Radio value={0}>实用新型专利</Radio>
  5605. <Radio value={1}>发明专利</Radio>
  5606. <Radio value={2}>外观专利</Radio>
  5607. {/*<Radio value={3}>*/}
  5608. {/* 其他*/}
  5609. {/* <Input*/}
  5610. {/* disabled={this.state.patentNameType !== 3}*/}
  5611. {/* value={this.state.patentName}*/}
  5612. {/* style={{ marginLeft: '15px' }}*/}
  5613. {/* onChange={(e) => {*/}
  5614. {/* this.setState({*/}
  5615. {/* patentName: e.target.value,*/}
  5616. {/* })*/}
  5617. {/* }}*/}
  5618. {/* placeholder="请填写专利名称"*/}
  5619. {/* />*/}
  5620. {/*</Radio>*/}
  5621. </Radio.Group>
  5622. </FormItem>
  5623. </div>
  5624. {/* 第三方信息专利 */}
  5625. <div
  5626. style={{
  5627. // display: this.state.type == 1 ? "block" : "none",
  5628. display: this.state.type == 1 ? 'block' : 'block',
  5629. }}
  5630. >
  5631. <span
  5632. style={{
  5633. marginLeft: '50px',
  5634. fontSize: '18px',
  5635. }}
  5636. >
  5637. 第三方信息
  5638. </span>
  5639. <span
  5640. style={{
  5641. display: 'inline-block',
  5642. marginLeft: 10,
  5643. color: 'red',
  5644. }}
  5645. >
  5646. 金额总计(万元): {this.state.allTotalAmount}
  5647. </span>
  5648. <Button
  5649. type="primary"
  5650. onClick={(e) => {
  5651. //this.state.startType 类型为外包时,当普通单
  5652. if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
  5653. message.info('请先选择专利类型');
  5654. }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
  5655. message.info('请先选择专利名称');
  5656. } else{
  5657. this.addThirdList()
  5658. }
  5659. }}
  5660. style={{
  5661. float: 'right',
  5662. marginRight: '50px',
  5663. marginBottom: '15px',
  5664. }}
  5665. >
  5666. +新增供应商名称
  5667. </Button>
  5668. </div>
  5669. <div
  5670. className="clearfix"
  5671. style={{
  5672. // display: this.state.type == 1 ? "block" : "none",
  5673. display: this.state.type == 1 ? 'block' : 'block',
  5674. }}
  5675. >
  5676. <Spin spinning={this.state.loading}>
  5677. <Form layout="horizontal">
  5678. <Table
  5679. pagination={false}
  5680. columns={this.state.ContactsListsNew}
  5681. dataSource={this.state.thirdInfoList}
  5682. onRowClick={this.tableRowClickOne}
  5683. scroll={{ x: 'max-content', y: 0 }}
  5684. bordered
  5685. size="small"
  5686. />
  5687. <Col
  5688. span={24}
  5689. offset={9}
  5690. style={{ marginTop: '15px' }}
  5691. />
  5692. </Form>
  5693. </Spin>
  5694. </div>
  5695. {/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
  5696. <div
  5697. style={{
  5698. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  5699. }}
  5700. >
  5701. <span
  5702. style={{
  5703. marginLeft: '50px',
  5704. fontSize: '18px',
  5705. }}
  5706. >
  5707. 付款节点
  5708. </span>
  5709. <span
  5710. style={{
  5711. display: 'inline-block',
  5712. marginLeft: 10,
  5713. color: 'red',
  5714. }}
  5715. />
  5716. <Button
  5717. type="primary"
  5718. onClick={(e) => {
  5719. this.addPayNode()
  5720. }}
  5721. style={{
  5722. float: 'right',
  5723. marginRight: '50px',
  5724. marginBottom: '15px',
  5725. }}
  5726. >
  5727. +新增付款节点
  5728. </Button>
  5729. </div>
  5730. {/*如果是软著类或者专利类的专利申请,隐藏付款节点但当为外包类型时,无需隐藏*/}
  5731. <div
  5732. className="clearfix"
  5733. style={{
  5734. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  5735. }}
  5736. >
  5737. <Spin spinning={this.state.loading}>
  5738. <Form layout="horizontal">
  5739. <Table
  5740. pagination={false}
  5741. columns={this.state.PayNodeTableColunms}
  5742. dataSource={this.state.payNodeList}
  5743. onRowClick={this.payNodeTableRowClickOne}
  5744. scroll={{ x: 'max-content', y: 0 }}
  5745. bordered
  5746. size="small"
  5747. />
  5748. <Col
  5749. span={24}
  5750. offset={9}
  5751. style={{ marginTop: '15px' }}
  5752. />
  5753. </Form>
  5754. </Spin>
  5755. </div>
  5756. <div className="clearfix">
  5757. <FormItem
  5758. className="half-item"
  5759. {...formItemLayout}
  5760. label={
  5761. <span>
  5762. <strong style={{ color: '#f00' }}>*</strong>备注
  5763. </span>
  5764. }
  5765. >
  5766. <TextArea
  5767. rows={4}
  5768. value={this.state.outsourceRemarks}
  5769. onChange={(e) => {
  5770. this.setState({
  5771. outsourceRemarks: e.target.value,
  5772. })
  5773. }}
  5774. placeholder="请输入备注"
  5775. />
  5776. </FormItem>
  5777. </div>
  5778. {/*<div className="clearfix">
  5779. <FormItem className="half-item"
  5780. {...formItemLayout}
  5781. label="上传协议文件" style={{height:"auto"}}>
  5782. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  5783. data={(e)=>{
  5784. return {
  5785. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  5786. }
  5787. }}
  5788. fileList={this.state.fileUrl}
  5789. onChange={(e)=>{
  5790. this.setState({
  5791. attachmentUrl:e.fileList,
  5792. fileUrl:e.fileList
  5793. })
  5794. }}>
  5795. {fileUrl.length>1?null:<Button>
  5796. <Icon type="upload" /> 点击上传
  5797. </Button>}
  5798. </Upload>
  5799. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  5800. </FormItem>
  5801. </div>*/}
  5802. <p
  5803. className="tip"
  5804. style={{
  5805. paddingBottom: '12px',
  5806. width: '240px',
  5807. marginLeft: '145px',
  5808. color: 'red',
  5809. }}
  5810. >
  5811. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  5812. </p>
  5813. <div className="clearfix">
  5814. <FormItem
  5815. labelCol={{ span: 4 }}
  5816. wrapperCol={{ span: 18 }}
  5817. label={
  5818. <span>
  5819. 合同/协议扫描件
  5820. </span>
  5821. }
  5822. >
  5823. <PicturesWall
  5824. domId={'myTask4'}
  5825. fileList={this.getOrgCodeUrlWai}
  5826. pictureUrl={this.state.pictureUrl}
  5827. />
  5828. <p style={{ color: 'red' }}>图片建议:要清晰。</p>
  5829. </FormItem>
  5830. </div>
  5831. {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
  5832. {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
  5833. <FormItem
  5834. className="half-item"
  5835. {...formItemLayout}
  5836. label={
  5837. <span>
  5838. <strong style={{ color: '#f00' }}>*</strong>发起原因
  5839. </span>
  5840. }
  5841. >
  5842. <TextArea
  5843. rows={4}
  5844. value={this.state.reason}
  5845. onChange={(e) => {
  5846. this.setState({
  5847. reason: e.target.value,
  5848. })
  5849. }}
  5850. placeholder="请输入发起原因"
  5851. />
  5852. </FormItem>
  5853. </div> : <div/>}
  5854. <div className="clearfix">
  5855. <div
  5856. style={{
  5857. display: 'inline-black',
  5858. textAlign: 'center',
  5859. }}
  5860. >
  5861. <Button
  5862. type="primary"
  5863. loading={this.state.loading}
  5864. onClick={()=>{
  5865. this.sureOut(this.state.startType);
  5866. }}
  5867. >
  5868. {
  5869. this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
  5870. }
  5871. </Button>
  5872. <p className="tip" style={{ color: 'red' }}>
  5873. {
  5874. this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
  5875. }
  5876. </p>
  5877. </div>
  5878. </div>
  5879. </div>
  5880. ) : (
  5881. <div>
  5882. {
  5883. this.state.speVisible && this.state.activeKey === '2' ?
  5884. <CheckProject
  5885. {...this.props}
  5886. tid={this.state.tid}
  5887. oldInfor={this.state.oldInfor}
  5888. projectType={this.state.projectType} //0正常 1专利 2软著 3审计
  5889. patentNameType={this.state.patentNameType}
  5890. patentName={this.state.patentName}
  5891. patentType={this.state.patentType}
  5892. status={this.state.refundStatus}
  5893. isPreviewPay={true}
  5894. thirdInfoList={this.state.thirdInfoList}
  5895. dataSource={this.state.payNodeList}
  5896. outsourceRemarks={this.state.outsourceRemarks}
  5897. fileList={this.state.pictureUrl}
  5898. startType={this.state.startType}
  5899. projectStatus={this.state.projectStatus}
  5900. onRefresh={()=>{
  5901. this.waiDetail();
  5902. this.thirdTable(this.state.tid);
  5903. this.getSelectOutsourceLog(this.state.tid);
  5904. this.payNodeTable(this.state.tid)
  5905. this.loadData(this.state.page)
  5906. }}
  5907. /> : <div/>
  5908. }
  5909. </div>
  5910. )}
  5911. {(this.state.refundStatus == 1 ||
  5912. this.state.refundStatus == 0 ||
  5913. this.state.refundStatus == 2) &&
  5914. this.state.startType !== 1
  5915. ? (
  5916. <div className="clearfix"
  5917. style={{
  5918. display: this.state.refundStatus == 0 ? 'none' : 'block',
  5919. }}
  5920. >
  5921. <hr className="division" />
  5922. {parseInt(this.state.startType) !== 1 ? <div style={{
  5923. color:'#F00',
  5924. fontWeight: 'bolder',
  5925. paddingBottom: '20px',
  5926. }}>
  5927. 审核结果: <span style={{paddingLeft:'20px'}}>{getRefundStatus(this.state.refundStatus)}</span>
  5928. </div> : <div/>}
  5929. <div className="outsourceLogList">
  5930. {
  5931. this.state.outsourceLogs && this.state.outsourceLogs.map((value,index)=>(
  5932. <div key={index} className="outsourceLogItem outsource">
  5933. <div style={{
  5934. display:'flex',
  5935. flexFlow:'row nowrap',
  5936. paddingBottom: '3px',
  5937. paddingTop: '3px',
  5938. }}>
  5939. <div>
  5940. {value.aname}
  5941. </div>
  5942. <div style={{paddingLeft:'5px'}}>
  5943. {
  5944. value.status === 0 ?
  5945. <Tag color="#2db7f5">发起外包审核</Tag> :
  5946. value.status === 1 ? <Tag color="#87d068">通过</Tag> :
  5947. <Tag color="#f50">驳回</Tag>
  5948. }
  5949. </div>
  5950. <div style={{
  5951. wordBreak: 'break-all',
  5952. maxWidth:'67%',
  5953. }}>
  5954. {value.remarks}
  5955. </div>
  5956. <div style={{paddingLeft: '10px'}}>
  5957. {value.createTimes}
  5958. </div>
  5959. </div>
  5960. </div>
  5961. ))
  5962. }
  5963. </div>
  5964. {/* <div*/}
  5965. {/* className="clearfix"*/}
  5966. {/* style={{*/}
  5967. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  5968. {/* }}*/}
  5969. {/* >*/}
  5970. {/* <FormItem*/}
  5971. {/* className="half-item"*/}
  5972. {/* {...formItemLayout}*/}
  5973. {/* label="审核意见"*/}
  5974. {/* >*/}
  5975. {/* <span>{this.state.remarks}</span>*/}
  5976. {/* </FormItem>*/}
  5977. {/* </div>*/}
  5978. {/* {parseInt(this.state.startType) !== 1 ?<div className="clearfix">*/}
  5979. {/* <FormItem*/}
  5980. {/* className="half-item"*/}
  5981. {/* {...formItemLayout}*/}
  5982. {/* label="审核结果"*/}
  5983. {/* >*/}
  5984. {/* <span>{getRefundStatus(this.state.refundStatus)}</span>*/}
  5985. {/* </FormItem>*/}
  5986. {/* </div> : <div/>}*/}
  5987. {/* <div*/}
  5988. {/* className="clearfix"*/}
  5989. {/* style={{*/}
  5990. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  5991. {/* }}*/}
  5992. {/* >*/}
  5993. {/* <FormItem*/}
  5994. {/* className="half-item"*/}
  5995. {/* {...formItemLayout}*/}
  5996. {/* label="审核时间"*/}
  5997. {/* >*/}
  5998. {/* <span>{this.state.auditTimes}</span>*/}
  5999. {/* </FormItem>*/}
  6000. {/* </div>*/}
  6001. </div>
  6002. ) : (
  6003. ''
  6004. )}
  6005. </TabPane>
  6006. {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
  6007. <TabPane tab="订单详情" key="3">
  6008. <Spin spinning={this.state.loading}>
  6009. <OrderDetail
  6010. orderData={this.state.orderData}
  6011. getOrderLog={this.getOrderLog}
  6012. dataSourceX={this.state.dataSourceX}
  6013. contactList={this.state.jiedian}
  6014. orderNo={this.state.orderNo}
  6015. totalCui={this.state.totalCui}
  6016. contactListNew={this.state.jiedianNew}
  6017. pictureUrl={this.state.contractPictureUrl}
  6018. />
  6019. </Spin>
  6020. </TabPane>
  6021. ) : (
  6022. ''
  6023. )}
  6024. </Tabs>
  6025. </Modal>
  6026. <Modal
  6027. width="800px"
  6028. visible={this.state.visibleA}
  6029. onCancel={this.visitCancelA}
  6030. title="操作日志"
  6031. footer=""
  6032. className="admin-desc-content"
  6033. >
  6034. <div className="patent-table patent-table-center">
  6035. <Spin spinning={this.state.loading}>
  6036. <Table
  6037. columns={this.state.columnsA}
  6038. dataSource={this.state.dataSourceA}
  6039. pagination={false}
  6040. bordered
  6041. size="small"
  6042. />
  6043. </Spin>
  6044. </div>
  6045. </Modal>
  6046. <Modal
  6047. title="工时记录"
  6048. visible={this.state.timeVisible}
  6049. onCancel={this.timeClose}
  6050. width={800}
  6051. footer={null}
  6052. >
  6053. <Spin spinning={this.state.loading}>
  6054. <Table
  6055. columns={this.state.columnsTime}
  6056. dataSource={this.state.dataSourceTime}
  6057. pagination={false}
  6058. scroll={{ x: 'max-content', y: 0 }}
  6059. bordered
  6060. size={'small'}
  6061. />
  6062. <p style={{ marginTop: 10, color: 'red' }}>
  6063. 累计工时(小时):{this.state.recordHour}
  6064. </p>
  6065. </Spin>
  6066. </Modal>
  6067. {this.state.ThirdListVisible ? <NewSupplier
  6068. patentNameType={this.state.patentNameType}
  6069. ThirdId={this.state.ThirdId}
  6070. tid={this.state.tid}
  6071. patentType={this.state.patentType}
  6072. projectType={this.state.startType === 0 ? 0 : this.state.projectType}
  6073. thirdCompanyName={this.state.thirdCompanyName}
  6074. thirdUnitPrice={this.state.thirdUnitPrice}
  6075. thirdQuantity={this.state.thirdQuantity}
  6076. thirdRemarks={this.state.thirdRemarks}
  6077. spinning={this.state.loading}
  6078. visible={this.state.ThirdListVisible}
  6079. thirdMaterial={this.state.thirdMaterial}
  6080. thirdUrgent={this.state.thirdUrgent}
  6081. audit={this.state.audit}
  6082. assets={this.state.assets}
  6083. income={this.state.income}
  6084. onDetermine={this.handleCancelq}
  6085. onCancel={()=>{
  6086. this.thirdTable(this.state.tid);
  6087. this.setState({
  6088. ThirdListVisible: false,
  6089. ThirdId: '', //供应商id
  6090. thirdCompanyName: '', //第三方名称
  6091. thirdUnitPrice: '', //单价
  6092. thirdQuantity: '', //数量
  6093. currentTotalPrice: '', //总价
  6094. thirdMaterial: 0, //有无材料
  6095. thirdUrgent: 0, //加急情况
  6096. thirdRemarks: '',
  6097. audit: 1,
  6098. assets: '',
  6099. income: '',
  6100. })
  6101. }}
  6102. otherOperations={(data)=>{
  6103. this.setState({
  6104. thirdMaterial: data.thirdMaterial,
  6105. thirdUrgent: data.thirdUrgent,
  6106. customerArr: data.customerArr,
  6107. thirdCompanyName: data.thirdCompanyName
  6108. })
  6109. }}/> : <div/>}
  6110. {this.state.PayNodeVisible ? <OperationPayNode
  6111. tid={this.state.tid}
  6112. cSort={this.state.cSort}
  6113. visible={this.state.PayNodeVisible}
  6114. thirdId={this.state.ThirdId}
  6115. thirdInfoList={this.state.thirdInfoList}
  6116. supplierList={this.state.PayNodeCompany}
  6117. payNodeInfor={this.state.payNodeInfor}
  6118. thirdUnitPrice={this.state.thirdUnitPrice}
  6119. onCancel={()=>{
  6120. this.setState({
  6121. PayNodeVisible: false,
  6122. payNodeInfor: {},
  6123. ThirdId: '',
  6124. thirdUnitPrice: '',
  6125. })
  6126. this.payNodeTable(this.state.tid)
  6127. }}
  6128. /> : <div/>}
  6129. </div>
  6130. )
  6131. },
  6132. })
  6133. export default Task