myTask.jsx 217 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168
  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. labelCol={{ span: 3 }}
  4193. wrapperCol={{ span: 14 }}
  4194. label={
  4195. <span>
  4196. <strong style={{ color: '#f00' }}>*</strong>
  4197. 类型
  4198. </span>
  4199. }
  4200. >
  4201. <Radio.Group
  4202. value={this.state.startType}
  4203. onChange={(e) => {
  4204. let _this = this;
  4205. if(this.state.thirdInfoList.length >0){
  4206. confirm({
  4207. title: '确定要切换吗?',
  4208. content: '切换将删除所有第三信息和付款节点',
  4209. onOk() {
  4210. return new Promise((resolve, reject) => {
  4211. _this.setState({ startType: e.target.value },()=>{
  4212. _this.projectTypeTabContent(_this.state.projectType);
  4213. })
  4214. _this.confirmDeletNew(-1,resolve,reject)
  4215. if(_this.state.payNodeList.length > 0){
  4216. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4217. }
  4218. }).catch(() => console.log('Oops errors!'));
  4219. },
  4220. onCancel() {},
  4221. });
  4222. }else{
  4223. this.setState({ startType: e.target.value },()=>{
  4224. this.projectTypeTabContent(this.state.projectType);
  4225. })
  4226. }
  4227. }}
  4228. >
  4229. <Radio value={0}>外包(不走总部)</Radio>
  4230. <Radio value={1}>供应商信息</Radio>
  4231. </Radio.Group>
  4232. </FormItem>
  4233. </div>
  4234. {/* 专利类型 */}
  4235. <div
  4236. className="clearfix"
  4237. style={{
  4238. display: this.state.projectType === 1 ? 'block' : 'none',
  4239. }}
  4240. >
  4241. <FormItem
  4242. className="half-item"
  4243. labelCol={{ span: 4 }}
  4244. wrapperCol={{ span: 14 }}
  4245. label={
  4246. <span>
  4247. <strong style={{ color: '#f00' }}>*</strong>
  4248. 专利类型
  4249. </span>
  4250. }
  4251. >
  4252. <Radio.Group
  4253. value={this.state.patentType}
  4254. onChange={(e) => {
  4255. let _this = this;
  4256. if(this.state.thirdInfoList.length >0){
  4257. confirm({
  4258. title: '确定要切换吗?',
  4259. content: '切换将删除所有第三信息和付款节点',
  4260. onOk() {
  4261. return new Promise((resolve, reject) => {
  4262. _this.setState({ patentType: e.target.value },()=>{
  4263. _this.projectTypeTabContent(_this.state.projectType);
  4264. })
  4265. _this.confirmDeletNew(-1,resolve,reject)
  4266. if(_this.state.payNodeList.length > 0){
  4267. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4268. }
  4269. }).catch(() => console.log('Oops errors!'));
  4270. },
  4271. onCancel() {},
  4272. });
  4273. }else{
  4274. this.setState({ patentType: e.target.value },()=>{
  4275. this.projectTypeTabContent(this.state.projectType);
  4276. })
  4277. }
  4278. }}
  4279. >
  4280. <Radio value={0}>专利申请/变更/转让</Radio>
  4281. <Radio value={1}>专利买卖</Radio>
  4282. </Radio.Group>
  4283. </FormItem>
  4284. </div>
  4285. <div
  4286. className="clearfix"
  4287. style={{
  4288. display: this.state.projectType === 1? 'block' : 'none',
  4289. }}
  4290. >
  4291. <FormItem
  4292. className="half-item"
  4293. labelCol={{ span: 4 }}
  4294. wrapperCol={{ span: 14 }}
  4295. label={
  4296. <span>
  4297. <strong style={{ color: '#f00' }}>*</strong>
  4298. 专利名称
  4299. </span>
  4300. }
  4301. >
  4302. <Radio.Group
  4303. value={this.state.patentNameType}
  4304. onChange={(e) => {
  4305. let _this = this;
  4306. if(this.state.thirdInfoList.length >0){
  4307. confirm({
  4308. title: '确定要切换吗?',
  4309. content: '切换将删除所有第三信息和付款节点',
  4310. onOk() {
  4311. return new Promise((resolve, reject) => {
  4312. _this.setState({ patentNameType: e.target.value },()=>{
  4313. _this.projectTypeTabContent(_this.state.projectType);
  4314. })
  4315. _this.confirmDeletNew(-1,resolve,reject)
  4316. if(_this.state.payNodeList.length > 0){
  4317. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4318. }
  4319. }).catch(() => console.log('Oops errors!'));
  4320. },
  4321. onCancel() {},
  4322. });
  4323. }else{
  4324. this.setState({ patentNameType: e.target.value },()=>{
  4325. this.projectTypeTabContent(this.state.projectType);
  4326. })
  4327. }
  4328. }}
  4329. >
  4330. <Radio value={0}>实用新型专利</Radio>
  4331. <Radio value={1}>发明专利</Radio>
  4332. <Radio value={2}>外观专利</Radio>
  4333. {/*<Radio value={3}>*/}
  4334. {/* 其他*/}
  4335. {/* <Input*/}
  4336. {/* disabled={this.state.patentNameType !== 3}*/}
  4337. {/* value={this.state.patentName}*/}
  4338. {/* style={{ marginLeft: '15px' }}*/}
  4339. {/* onChange={(e) => {*/}
  4340. {/* this.setState({*/}
  4341. {/* patentName: e.target.value,*/}
  4342. {/* })*/}
  4343. {/* }}*/}
  4344. {/* placeholder="请填写专利名称"*/}
  4345. {/* />*/}
  4346. {/*</Radio>*/}
  4347. </Radio.Group>
  4348. </FormItem>
  4349. </div>
  4350. {/* 第三方信息专利 */}
  4351. <div
  4352. style={{
  4353. // display: this.state.type == 1 ? "block" : "none",
  4354. display: this.state.type == 1 ? 'block' : 'block',
  4355. }}
  4356. >
  4357. <span
  4358. style={{
  4359. fontSize: '18px',
  4360. }}
  4361. >
  4362. 第三方信息
  4363. </span>
  4364. <span
  4365. style={{
  4366. display: 'inline-block',
  4367. marginLeft: 10,
  4368. color: 'red',
  4369. }}
  4370. >
  4371. 金额总计(万元): {this.state.allTotalAmount}
  4372. </span>
  4373. <Button
  4374. type="primary"
  4375. onClick={(e) => {
  4376. //this.state.startType 0外包 1供应商 类型为外包时,当普通单
  4377. if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
  4378. message.info('请先选择专利类型');
  4379. }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
  4380. message.info('请先选择专利名称');
  4381. } else{
  4382. this.addThirdList()
  4383. }
  4384. }}
  4385. style={{
  4386. float: 'right',
  4387. marginRight: '50px',
  4388. marginBottom: '15px',
  4389. }}
  4390. >
  4391. +新增供应商名称
  4392. </Button>
  4393. </div>
  4394. <div
  4395. className="clearfix"
  4396. style={{
  4397. // display: this.state.type == 1 ? "block" : "none",
  4398. display: this.state.type == 1 ? 'block' : 'block',
  4399. }}
  4400. >
  4401. <Spin spinning={this.state.loading}>
  4402. <Form layout="horizontal">
  4403. <Table
  4404. pagination={false}
  4405. columns={this.state.ContactsListsNew}
  4406. dataSource={this.state.thirdInfoList}
  4407. onRowClick={this.tableRowClickOne}
  4408. scroll={{ x: 'max-content', y: 0 }}
  4409. bordered
  4410. size="small"
  4411. />
  4412. <Col
  4413. span={24}
  4414. offset={9}
  4415. style={{ marginTop: '15px' }}
  4416. />
  4417. </Form>
  4418. </Spin>
  4419. </div>
  4420. {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
  4421. {/*this.state.startType 0外包 1供应商*/}
  4422. <div
  4423. style={{
  4424. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  4425. }}
  4426. >
  4427. <span
  4428. style={{
  4429. fontSize: '18px',
  4430. }}
  4431. >
  4432. 付款节点
  4433. </span>
  4434. <span
  4435. style={{
  4436. display: 'inline-block',
  4437. marginLeft: 10,
  4438. color: 'red',
  4439. }}
  4440. />
  4441. <Button
  4442. type="primary"
  4443. onClick={(e) => {
  4444. this.addPayNode()
  4445. }}
  4446. style={{
  4447. float: 'right',
  4448. marginRight: '50px',
  4449. marginBottom: '15px',
  4450. }}
  4451. >
  4452. +新增付款节点
  4453. </Button>
  4454. </div>
  4455. {/*如果是软著类或者专利类的专利申请,隐藏付款节点 但当为外包类型时,无需隐藏*/}
  4456. <div
  4457. className="clearfix"
  4458. style={{
  4459. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  4460. }}
  4461. >
  4462. <Spin spinning={this.state.loading}>
  4463. <Form layout="horizontal">
  4464. <Table
  4465. pagination={false}
  4466. columns={this.state.PayNodeTableColunms}
  4467. dataSource={this.state.payNodeList}
  4468. onRowClick={this.payNodeTableRowClickOne}
  4469. scroll={{ x: 'max-content', y: 0 }}
  4470. bordered
  4471. size="small"
  4472. />
  4473. <Col
  4474. span={24}
  4475. offset={9}
  4476. style={{ marginTop: '15px' }}
  4477. />
  4478. </Form>
  4479. </Spin>
  4480. </div>
  4481. <div className="clearfix">
  4482. <FormItem
  4483. className="half-item"
  4484. {...formItemLayout}
  4485. label={
  4486. <span>
  4487. <strong style={{ color: '#f00' }}>*</strong>备注
  4488. </span>
  4489. }
  4490. >
  4491. <TextArea
  4492. rows={4}
  4493. value={this.state.outsourceRemarks}
  4494. onChange={(e) => {
  4495. this.setState({
  4496. outsourceRemarks: e.target.value,
  4497. })
  4498. }}
  4499. placeholder="请输入备注"
  4500. />
  4501. </FormItem>
  4502. </div>
  4503. {/*<div className="clearfix">
  4504. <FormItem className="half-item"
  4505. {...formItemLayout}
  4506. label="上传协议文件" style={{height:"auto"}}>
  4507. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  4508. data={(e)=>{
  4509. return {
  4510. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  4511. }
  4512. }}
  4513. fileList={this.state.fileUrl}
  4514. onChange={(e)=>{
  4515. this.setState({
  4516. attachmentUrl:e.fileList,
  4517. fileUrl:e.fileList
  4518. })
  4519. }}>
  4520. {fileUrl.length>1?null:<Button>
  4521. <Icon type="upload" /> 点击上传
  4522. </Button>}
  4523. </Upload>
  4524. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  4525. </FormItem>
  4526. </div>*/}
  4527. <p
  4528. className="tip"
  4529. style={{
  4530. paddingBottom: '12px',
  4531. width: '240px',
  4532. marginLeft: '145px',
  4533. color: 'red',
  4534. }}
  4535. >
  4536. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  4537. </p>
  4538. <div className="clearfix">
  4539. <FormItem
  4540. labelCol={{ span: 4 }}
  4541. wrapperCol={{ span: 18 }}
  4542. label={
  4543. <span>
  4544. 合同/协议扫描件
  4545. </span>
  4546. }
  4547. >
  4548. <PicturesWall
  4549. domId={'myTask3'}
  4550. fileList={this.getOrgCodeUrlWai}
  4551. pictureUrl={this.state.pictureUrl}
  4552. />
  4553. <p style={{ color: 'red' }}>图片建议:要清晰。</p>
  4554. </FormItem>
  4555. </div>
  4556. {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
  4557. {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
  4558. <FormItem
  4559. className="half-item"
  4560. {...formItemLayout}
  4561. label={
  4562. <span>
  4563. <strong style={{ color: '#f00' }}>*</strong>发起原因
  4564. </span>
  4565. }
  4566. >
  4567. <TextArea
  4568. rows={4}
  4569. value={this.state.reason}
  4570. onChange={(e) => {
  4571. this.setState({
  4572. reason: e.target.value,
  4573. })
  4574. }}
  4575. placeholder="请输入发起原因"
  4576. />
  4577. </FormItem>
  4578. </div> : <div/>}
  4579. <div className="clearfix">
  4580. <div
  4581. style={{
  4582. display: 'inline-black',
  4583. textAlign: 'center',
  4584. }}
  4585. >
  4586. <Button
  4587. type="primary"
  4588. loading={this.state.loading}
  4589. onClick={()=>{
  4590. this.sureOut(this.state.startType);
  4591. }}
  4592. >
  4593. {
  4594. this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
  4595. }
  4596. </Button>
  4597. <p className="tip" style={{ color: 'red' }}>
  4598. {
  4599. this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
  4600. }
  4601. </p>
  4602. </div>
  4603. </div>
  4604. </div>
  4605. ) : (
  4606. <div>
  4607. {
  4608. this.state.visible && this.state.activeKey === '2' ?
  4609. <CheckProject
  4610. {...this.props}
  4611. tid={this.state.tid}
  4612. oldInfor={this.state.oldInfor}
  4613. projectType={this.state.projectType} //0正常 1专利 2软著 3审计
  4614. patentNameType={this.state.patentNameType}
  4615. patentName={this.state.patentName}
  4616. patentType={this.state.patentType}
  4617. status={this.state.refundStatus}
  4618. isPreviewPay={true}
  4619. thirdInfoList={this.state.thirdInfoList}
  4620. dataSource={this.state.payNodeList}
  4621. outsourceRemarks={this.state.outsourceRemarks}
  4622. fileList={this.state.pictureUrl}
  4623. startType={this.state.startType}
  4624. projectStatus={this.state.projectStatus}
  4625. onRefresh={()=>{
  4626. this.waiDetail();
  4627. this.thirdTable(this.state.tid);
  4628. this.getSelectOutsourceLog(this.state.tid);
  4629. this.payNodeTable(this.state.tid)
  4630. this.loadData(this.state.page)
  4631. }}
  4632. /> : <div/>
  4633. }
  4634. </div>
  4635. )}
  4636. {(this.state.refundStatus == 1 ||
  4637. this.state.refundStatus == 0 ||
  4638. this.state.refundStatus == 2) &&
  4639. this.state.startType !== 1
  4640. ? (
  4641. <div className="clearfix"
  4642. style={{
  4643. display: this.state.refundStatus == 0 ? 'none' : 'block',
  4644. }}
  4645. >
  4646. <hr className="division" />
  4647. {parseInt(this.state.startType) !== 1 ? <div style={{
  4648. color:'#F00',
  4649. fontWeight: 'bolder',
  4650. paddingBottom: '20px',
  4651. }}>
  4652. 审核结果: <span style={{paddingLeft:'20px'}}>{getRefundStatus(this.state.refundStatus)}</span>
  4653. </div> : <div/>}
  4654. <div className="outsourceLogList">
  4655. {
  4656. this.state.outsourceLogs && this.state.outsourceLogs.map((value,index)=>(
  4657. <div key={index} className="outsourceLogItem outsource">
  4658. <div style={{
  4659. display:'flex',
  4660. flexFlow:'row nowrap',
  4661. paddingBottom: '3px',
  4662. paddingTop: '3px',
  4663. }}>
  4664. <div>
  4665. {value.aname}
  4666. </div>
  4667. <div style={{paddingLeft:'5px'}}>
  4668. {
  4669. value.status === 0 ?
  4670. <Tag color="#2db7f5">发起外包审核</Tag> :
  4671. value.status === 1 ? <Tag color="#87d068">通过</Tag> :
  4672. <Tag color="#f50">驳回</Tag>
  4673. }
  4674. </div>
  4675. <div style={{
  4676. wordBreak: 'break-all',
  4677. maxWidth:'67%',
  4678. }}>
  4679. {value.remarks}
  4680. </div>
  4681. <div style={{paddingLeft: '10px'}}>
  4682. {value.createTimes}
  4683. </div>
  4684. </div>
  4685. </div>
  4686. ))
  4687. }
  4688. </div>
  4689. {/* <div*/}
  4690. {/* className="clearfix"*/}
  4691. {/* style={{*/}
  4692. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  4693. {/* }}*/}
  4694. {/* >*/}
  4695. {/* <FormItem*/}
  4696. {/* className="half-item"*/}
  4697. {/* {...formItemLayout}*/}
  4698. {/* label="审核意见"*/}
  4699. {/* >*/}
  4700. {/* <span>{this.state.remarks}</span>*/}
  4701. {/* </FormItem>*/}
  4702. {/* </div>*/}
  4703. {/* {parseInt(this.state.startType) !== 1 ?<div className="clearfix">*/}
  4704. {/* <FormItem*/}
  4705. {/* className="half-item"*/}
  4706. {/* {...formItemLayout}*/}
  4707. {/* label="审核结果"*/}
  4708. {/* >*/}
  4709. {/* <span>{getRefundStatus(this.state.refundStatus)}</span>*/}
  4710. {/* </FormItem>*/}
  4711. {/* </div> : <div/>}*/}
  4712. {/* <div*/}
  4713. {/* className="clearfix"*/}
  4714. {/* style={{*/}
  4715. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  4716. {/* }}*/}
  4717. {/* >*/}
  4718. {/* <FormItem*/}
  4719. {/* className="half-item"*/}
  4720. {/* {...formItemLayout}*/}
  4721. {/* label="审核时间"*/}
  4722. {/* >*/}
  4723. {/* <span>{this.state.auditTimes}</span>*/}
  4724. {/* </FormItem>*/}
  4725. {/* </div>*/}
  4726. </div>
  4727. ) : (
  4728. ''
  4729. )}
  4730. </TabPane>
  4731. {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
  4732. <TabPane tab="订单详情" key="3">
  4733. <Spin spinning={this.state.loading}>
  4734. {this.state.activeKey === "3" ? <OrderDetail
  4735. orderData={this.state.orderData}
  4736. getOrderLog={this.getOrderLog}
  4737. dataSourceX={this.state.dataSourceX}
  4738. contactList={this.state.jiedian}
  4739. orderNo={this.state.orderNo}
  4740. totalCui={this.state.totalCui}
  4741. contactListNew={this.state.jiedianNew}
  4742. pictureUrl={this.state.contractPictureUrl}
  4743. /> : <div/>}
  4744. </Spin>
  4745. </TabPane>
  4746. ) : (
  4747. ''
  4748. )}
  4749. </Tabs>
  4750. </Modal> : <div/>}
  4751. <Modal
  4752. maskClosable={false}
  4753. visible={this.state.lookVisible}
  4754. onOk={this.noCancel}
  4755. onCancel={this.noCancel}
  4756. width="500px"
  4757. title={'添加工时'}
  4758. footer=""
  4759. className="admin-desc-content"
  4760. >
  4761. <Form layout="horizontal" id="demand-form">
  4762. <Spin spinning={this.state.loading}>
  4763. <div className="clearfix">
  4764. <FormItem {...formItemLayout} label="工作日期">
  4765. <DatePicker
  4766. style={{ marginTop: '2px', width: '200px', height: '32px' }}
  4767. showTime
  4768. format="YYYY-MM-DD"
  4769. onOk={() => {}}
  4770. value={
  4771. this.state.taskDate ? moment(this.state.taskDate) : null
  4772. }
  4773. onChange={(data, dataString) => {
  4774. this.setState({ taskDate: dataString })
  4775. }}
  4776. />
  4777. </FormItem>
  4778. </div>
  4779. <div className="clearfix">
  4780. <FormItem {...formItemLayout} label="工作时长">
  4781. <Input
  4782. placeholder="请输入工作时长"
  4783. value={this.state.hours}
  4784. style={{ width: '200px' }}
  4785. onChange={(e) => {
  4786. this.setState({ hours: e.target.value })
  4787. }}
  4788. ref="commodityQuantity"
  4789. />
  4790. </FormItem>
  4791. </div>
  4792. <div className="clearfix">
  4793. <FormItem {...formItemLayout} label="工作内容">
  4794. <Input
  4795. type="textarea"
  4796. placeholder="请输入备注"
  4797. rows={4}
  4798. value={this.state.remarks}
  4799. onChange={(e) => {
  4800. this.setState({ remarks: e.target.value })
  4801. }}
  4802. />
  4803. </FormItem>
  4804. </div>
  4805. <div className="clearfix">
  4806. <Button
  4807. className="cancel"
  4808. type="primary"
  4809. onClick={this.tianjiaOk}
  4810. style={{ marginLeft: '100px' }}
  4811. htmlType="submit"
  4812. >
  4813. 确定
  4814. </Button>
  4815. <Button
  4816. className="cancel"
  4817. type="ghost"
  4818. onClick={this.noCancel}
  4819. style={{ marginLeft: '50px' }}
  4820. >
  4821. 取消
  4822. </Button>
  4823. </div>
  4824. </Spin>
  4825. </Form>
  4826. </Modal>
  4827. {this.state.addnextVisible ? <Modal
  4828. maskClosable={false}
  4829. visible={this.state.addnextVisible}
  4830. onOk={this.nextCancel}
  4831. onCancel={this.nextCancel}
  4832. width="800px"
  4833. title="项目详情"
  4834. footer=""
  4835. className="admin-desc-content"
  4836. >
  4837. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  4838. <Spin spinning={this.state.loading}>
  4839. <div className="clearfix">
  4840. <FormItem
  4841. className="half-item"
  4842. {...formItemLayout}
  4843. label="项目名称"
  4844. >
  4845. <span>{this.state.commodityName}</span>
  4846. </FormItem>
  4847. <FormItem
  4848. className="half-item"
  4849. {...formItemLayout}
  4850. label="项目数量"
  4851. >
  4852. <span>{this.state.commodityQuantity}</span>
  4853. </FormItem>
  4854. <FormItem
  4855. className="half-item"
  4856. {...formItemLayout}
  4857. label="官费"
  4858. style={{ display: this.state.displayFees }}
  4859. >
  4860. <span>
  4861. {this.state.officialCost == 0 ? '无官费' : '有官费'}
  4862. </span>
  4863. </FormItem>
  4864. <FormItem
  4865. className="half-item"
  4866. {...formItemLayout}
  4867. label="费减"
  4868. style={{ display: this.state.displayFees }}
  4869. >
  4870. <span>
  4871. {this.state.costReduction == 0 ? '无费减' : '有费减'}
  4872. </span>
  4873. </FormItem>
  4874. <FormItem
  4875. className="half-item"
  4876. {...formItemLayout}
  4877. label="金额(万元)"
  4878. >
  4879. <span>{this.state.commodityPrice ? '***' : 0}</span>
  4880. </FormItem>
  4881. <FormItem
  4882. className="half-item"
  4883. {...formItemLayout}
  4884. label="主要项目"
  4885. >
  4886. <span>{getboutique(this.state.main)}</span>
  4887. </FormItem>
  4888. <div className="clearfix">
  4889. <FormItem
  4890. labelCol={{ span: 3 }}
  4891. wrapperCol={{ span: 18 }}
  4892. label="服务说明"
  4893. >
  4894. <span>{this.state.taskComment}</span>
  4895. </FormItem>
  4896. </div>
  4897. </div>
  4898. </Spin>
  4899. </Form>
  4900. </Modal> : <div/>}
  4901. <Modal
  4902. maskClosable={false}
  4903. visible={this.state.speVisible}
  4904. onOk={this.visitOk}
  4905. onCancel={this.visitCancel}
  4906. width="900px"
  4907. title=""
  4908. footer=""
  4909. className="admin-desc-content"
  4910. >
  4911. <Tabs
  4912. tabBarExtraContent={
  4913. <div style={{fontWeight:'bold',paddingRight:'15px'}}>
  4914. <span>
  4915. 项目名称:
  4916. <span style={{color:'#F00',paddingRight:'5px'}}>{this.state.taskName}</span>
  4917. </span>
  4918. <span style={{marginLeft:'15px'}}>
  4919. 项目编号:
  4920. <span style={{color:'#F00',paddingRight:'5px'}}>
  4921. {this.state.id}
  4922. {
  4923. this.state.splitStatus === 2 ? '('+this.state.splitSuper+'-'+this.state.splitId+')' : ''
  4924. }
  4925. </span>
  4926. </span>
  4927. </div>
  4928. }
  4929. activeKey={this.state.activeKey}
  4930. onChange={this.orderChange}
  4931. >
  4932. <TabPane tab="项目概况" key="1">
  4933. <div className="clearfix">
  4934. <FormItem
  4935. className="half-item"
  4936. {...formItemLayout}
  4937. label="当前项目情况"
  4938. >
  4939. <Radio.Group
  4940. value={this.state.status}
  4941. onChange={(e) => {
  4942. this.setState({ status: e.target.value })
  4943. }}
  4944. >
  4945. <Radio value={0}>开启</Radio>
  4946. <Radio value={1}>暂停</Radio>
  4947. </Radio.Group>
  4948. <Button
  4949. type="primary"
  4950. size="small"
  4951. style={{ marginTop: '5px', position: 'absolute' }}
  4952. onClick={this.caozuorizhi}
  4953. >
  4954. 操作日志
  4955. </Button>
  4956. </FormItem>
  4957. <FormItem
  4958. className="half-item"
  4959. {...formItemLayout}
  4960. label="合同编号"
  4961. >
  4962. <span>{this.state.contractNo}</span>
  4963. </FormItem>
  4964. </div>
  4965. <div className="clearfix">
  4966. <FormItem
  4967. className="half-item"
  4968. {...formItemLayout}
  4969. label="项目状态"
  4970. >
  4971. <Select
  4972. placeholder="选择项目状态"
  4973. style={{ width: '200px' }}
  4974. value={this.state.projectStatus}
  4975. onChange={(e) => {
  4976. this.setState({ projectStatus: e })
  4977. }}
  4978. >
  4979. {projectStatus.map(function (item) {
  4980. return (
  4981. <Select.Option key={item.value}>
  4982. {item.key}
  4983. </Select.Option>
  4984. )
  4985. })}
  4986. </Select>
  4987. </FormItem>
  4988. <FormItem
  4989. className="half-item"
  4990. {...formItemLayout}
  4991. label="是否特批"
  4992. >
  4993. <span>{getApproval(this.state.approval)}</span>
  4994. </FormItem>
  4995. <FormItem
  4996. className="half-item"
  4997. {...formItemLayout}
  4998. label="结算状态"
  4999. >
  5000. <span>
  5001. {getLiquidationStatus(this.state.liquidationStatus)}
  5002. </span>
  5003. </FormItem>
  5004. <FormItem
  5005. className="half-item"
  5006. {...formItemLayout}
  5007. label="流程状态"
  5008. >
  5009. <span>{getProcessStatus(this.state.processStatus)}</span>
  5010. </FormItem>
  5011. <FormItem
  5012. className="half-item"
  5013. {...formItemLayout}
  5014. label="订单编号"
  5015. >
  5016. <span>{this.state.orderNo}</span>
  5017. </FormItem>
  5018. </div>
  5019. <div className="clearfix">
  5020. <FormItem
  5021. className="half-item"
  5022. {...formItemLayout}
  5023. label="满意度表格"
  5024. >
  5025. <Radio.Group
  5026. value={this.state.formRetrieve}
  5027. onChange={(e) => {
  5028. this.setState({ formRetrieve: e.target.value })
  5029. }}
  5030. >
  5031. <Radio value={0}>未收回</Radio>
  5032. <Radio value={1}>已收回</Radio>
  5033. <Radio value={2}>其他</Radio>
  5034. </Radio.Group>
  5035. </FormItem>
  5036. <FormItem
  5037. className="half-item"
  5038. {...formItemLayout}
  5039. label="退单"
  5040. >
  5041. <Radio.Group
  5042. value={this.state.taskRefund}
  5043. onChange={(e) => {
  5044. this.setState({ taskRefund: e.target.value })
  5045. }}
  5046. >
  5047. <Radio value={0}>已完成</Radio>
  5048. <Radio value={1}>未完成</Radio>
  5049. <Radio value={2}>其他</Radio>
  5050. </Radio.Group>
  5051. </FormItem>
  5052. </div>
  5053. <div className="clearfix">
  5054. {
  5055. <FormItem
  5056. className="half-item"
  5057. {...formItemLayout}
  5058. label="(满意度)备注"
  5059. >
  5060. <Input
  5061. type="textarea"
  5062. placeholder="请输入备注"
  5063. rows={2}
  5064. value={this.state.retrieveContent}
  5065. onChange={(e) => {
  5066. this.setState({ retrieveContent: e.target.value })
  5067. }}
  5068. />
  5069. </FormItem>
  5070. }
  5071. {
  5072. <FormItem
  5073. className="half-item"
  5074. {...formItemLayout}
  5075. label="(退单)备注"
  5076. >
  5077. <Input
  5078. type="textarea"
  5079. placeholder="请输入备注"
  5080. rows={2}
  5081. value={this.state.refundContent}
  5082. onChange={(e) => {
  5083. this.setState({ refundContent: e.target.value })
  5084. }}
  5085. />
  5086. </FormItem>
  5087. }
  5088. </div>
  5089. <div className="clearfix">
  5090. <h3 className="sub-title">订单负责人信息</h3>
  5091. <FormItem
  5092. className="half-item"
  5093. {...formItemLayout}
  5094. label="负责人"
  5095. >
  5096. <span>
  5097. {this.state.salesmanName + '(' + this.state.depName + ')'}
  5098. </span>
  5099. </FormItem>
  5100. <FormItem
  5101. className="half-item"
  5102. {...formItemLayout}
  5103. label="负责人电话"
  5104. >
  5105. <span>{this.state.salesmanMobile}</span>
  5106. </FormItem>
  5107. <FormItem
  5108. className="half-item"
  5109. {...formItemLayout}
  5110. label="当前财务负责人"
  5111. >
  5112. <span>{this.state.nowFinance}</span>
  5113. </FormItem>
  5114. <FormItem
  5115. className="half-item"
  5116. {...formItemLayout}
  5117. label="当前财务负责人电话"
  5118. >
  5119. <span>{this.state.nowFinanceMobile}</span>
  5120. </FormItem>
  5121. <FormItem
  5122. className="half-item"
  5123. {...formItemLayout}
  5124. style={{ opacity: '.5' }}
  5125. label="原负责人"
  5126. >
  5127. <span>{this.state.oldSalesmanName}</span>
  5128. </FormItem>
  5129. <FormItem
  5130. className="half-item"
  5131. {...formItemLayout}
  5132. style={{ opacity: '.5' }}
  5133. label="原负责人电话"
  5134. >
  5135. <span>{this.state.oldSalesmanMobile}</span>
  5136. </FormItem>
  5137. <FormItem
  5138. className="half-item"
  5139. {...formItemLayout}
  5140. style={{ opacity: '.5' }}
  5141. label="实际财务操作人"
  5142. >
  5143. <span>{this.state.financeName}</span>
  5144. </FormItem>
  5145. <FormItem
  5146. className="half-item"
  5147. {...formItemLayout}
  5148. style={{ opacity: '.5' }}
  5149. label="实际财务操作人电话"
  5150. >
  5151. <span>{this.state.financeMobile}</span>
  5152. </FormItem>
  5153. <FormItem
  5154. className="half-item"
  5155. {...formItemLayout}
  5156. label="订单留言"
  5157. >
  5158. <span>{this.state.orderRemarks}</span>
  5159. </FormItem>
  5160. <FormItem className="half-item" {...formItemLayout} label="">
  5161. <Button onClick={this.getOrderLog}>查看订单日志</Button>
  5162. </FormItem>
  5163. <OrderRiZi
  5164. dataSourcerizhi={this.state.dataSourceY}
  5165. closeOrderLog={this.closeOrderLog}
  5166. visible={this.state.avisible}
  5167. loading={this.state.loading}
  5168. />
  5169. </div>
  5170. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  5171. <div className="clearfix">
  5172. <h3 className="sub-title">联系信息</h3>
  5173. <FormItem
  5174. className="half-item"
  5175. {...formItemLayout}
  5176. label="客户名称"
  5177. >
  5178. <span>{this.state.userName}</span>
  5179. </FormItem>
  5180. <FormItem
  5181. className="half-item"
  5182. {...formItemLayout}
  5183. label="企业法人"
  5184. >
  5185. <Input
  5186. placeholder="请输入法人名称"
  5187. value={this.state.legalPerson}
  5188. style={{ width: '200px' }}
  5189. onChange={(e) => {
  5190. this.setState({ legalPerson: e.target.value })
  5191. }}
  5192. ref="commodityQuantity"
  5193. />
  5194. </FormItem>
  5195. <FormItem
  5196. className="half-item"
  5197. {...formItemLayout}
  5198. label="法人电话"
  5199. >
  5200. <Input
  5201. placeholder="请输入法人电话"
  5202. value={this.state.legalPersonTel}
  5203. style={{ width: '200px' }}
  5204. onChange={(e) => {
  5205. this.setState({ legalPersonTel: e.target.value })
  5206. }}
  5207. ref="commodityQuantity"
  5208. />
  5209. </FormItem>
  5210. <FormItem
  5211. className="half-item"
  5212. {...formItemLayout}
  5213. label="客户联系人"
  5214. >
  5215. <Input
  5216. placeholder="请输入联系人名称"
  5217. value={this.state.contacts}
  5218. style={{ width: '200px' }}
  5219. onChange={(e) => {
  5220. this.setState({ contacts: e.target.value })
  5221. }}
  5222. ref="commodityQuantity"
  5223. />
  5224. </FormItem>
  5225. <FormItem
  5226. className="half-item"
  5227. {...formItemLayout}
  5228. label="联系人电话"
  5229. >
  5230. <Input
  5231. placeholder="请输入联系人电话"
  5232. value={this.state.contactMobile}
  5233. style={{ width: '200px' }}
  5234. onChange={(e) => {
  5235. this.setState({ contactMobile: e.target.value })
  5236. }}
  5237. ref="commodityQuantity"
  5238. />
  5239. </FormItem>
  5240. <FormItem
  5241. className="half-item"
  5242. {...formItemLayout}
  5243. label="企业地址"
  5244. >
  5245. <Cascader
  5246. options={areaSelect()}
  5247. value={this.state.ProvinceCity}
  5248. placeholder="选择城市"
  5249. style={{ width: '200px' }}
  5250. onChange={(e) => {
  5251. this.setState({ ProvinceCity: e })
  5252. }}
  5253. />
  5254. </FormItem>
  5255. <FormItem
  5256. className="half-item"
  5257. {...formItemLayout}
  5258. label=""
  5259. ></FormItem>
  5260. <FormItem className="half-item" {...formItemLayout} label="">
  5261. <Input
  5262. placeholder="请输入详细地址"
  5263. value={this.state.postalAddress}
  5264. style={{ width: '200px', marginLeft: '12em' }}
  5265. onChange={(e) => {
  5266. this.setState({ postalAddress: e.target.value })
  5267. }}
  5268. ref="commodityQuantity"
  5269. />
  5270. </FormItem>
  5271. </div>
  5272. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  5273. <div className="clearfix">
  5274. <h3 className="sub-title">项目信息</h3>
  5275. <FormItem
  5276. className="half-item"
  5277. {...formItemLayout}
  5278. label="项目编号"
  5279. >
  5280. <span>
  5281. {this.state.splitStatus == 2
  5282. ? this.state.splitSuper + '-' + this.state.splitId
  5283. : this.state.id}
  5284. </span>
  5285. </FormItem>
  5286. <FormItem
  5287. className="half-item"
  5288. {...formItemLayout}
  5289. label="项目名称"
  5290. >
  5291. <span>{this.state.taskName}</span>
  5292. </FormItem>
  5293. <FormItem
  5294. className="half-item"
  5295. {...formItemLayout}
  5296. label="项目状态"
  5297. >
  5298. <Select
  5299. placeholder="选择项目状态"
  5300. style={{ width: '200px' }}
  5301. value={this.state.taskStatus}
  5302. onChange={(e) => {
  5303. this.setState({ taskStatus: e })
  5304. }}
  5305. >
  5306. {taskStatus.map(function (item) {
  5307. return (
  5308. <Select.Option key={item.value}>
  5309. {item.key}
  5310. </Select.Option>
  5311. )
  5312. })}
  5313. </Select>
  5314. </FormItem>
  5315. <FormItem
  5316. className="half-item"
  5317. {...formItemLayout}
  5318. label="项目类别"
  5319. >
  5320. <span>{this.state.cname}</span>
  5321. </FormItem>
  5322. <FormItem
  5323. className="half-item"
  5324. {...formItemLayout}
  5325. label="证书编号"
  5326. >
  5327. <Input
  5328. placeholder="请输入证书编号"
  5329. value={this.state.certificateNumber}
  5330. style={{ width: '200px' }}
  5331. onChange={(e) => {
  5332. this.setState({ certificateNumber: e.target.value })
  5333. }}
  5334. ref="commodityQuantity"
  5335. />
  5336. </FormItem>
  5337. </div>
  5338. <div className="clearfix" style={{ marginTop: '10px' }}>
  5339. <FormItem
  5340. labelCol={{ span: 3 }}
  5341. wrapperCol={{ span: 14 }}
  5342. label="附件"
  5343. >
  5344. <Picture
  5345. domId={'myTask2'}
  5346. fileList={(e) => {
  5347. this.setState({ attachmentUrl: e })
  5348. }}
  5349. pictureUrl={this.state.attachmentUrl}
  5350. visible={this.props.visible}
  5351. data={{
  5352. sign: 'order_task_file',
  5353. url: '/api/admin/orderProject/uploadOrderTaskFile',
  5354. }}
  5355. />
  5356. </FormItem>
  5357. </div>
  5358. <div className="clearfix">
  5359. <FormItem
  5360. labelCol={{ span: 3 }}
  5361. wrapperCol={{ span: 16 }}
  5362. label="备注"
  5363. >
  5364. <Input
  5365. type="textarea"
  5366. placeholder="请输入备注"
  5367. rows={4}
  5368. value={this.state.taskComment}
  5369. onChange={(e) => {
  5370. this.setState({ taskComment: e.target.value })
  5371. }}
  5372. />
  5373. </FormItem>
  5374. </div>
  5375. <div className="clearfix">
  5376. <h3 className="sub-title">项目申报进度</h3>
  5377. <FormItem
  5378. className="half-item"
  5379. {...formItemLayout}
  5380. label="申报批次"
  5381. >
  5382. <Select
  5383. value={
  5384. this.state.declarationBatch
  5385. ? this.state.declarationBatch
  5386. : undefined
  5387. }
  5388. placeholder="请选择批次"
  5389. style={{ width: 200 }}
  5390. onChange={(e) => {
  5391. this.setState({
  5392. declarationBatch: e,
  5393. })
  5394. }}
  5395. >
  5396. <Option value={1}>第一批</Option>
  5397. <Option value={2}>第二批</Option>
  5398. <Option value={3}>第三批</Option>
  5399. <Option value={4}>第四批</Option>
  5400. </Select>
  5401. </FormItem>
  5402. <FormItem
  5403. className="half-item"
  5404. {...formItemLayout}
  5405. label="软著派单数量"
  5406. >
  5407. <span>{this.state.commodityQuantity}</span>
  5408. <Button
  5409. type="primary"
  5410. size="small"
  5411. style={{ marginLeft: '45px' }}
  5412. onClick={this.addcontact}
  5413. >
  5414. +增加下证信息
  5415. </Button>
  5416. </FormItem>
  5417. <div className="patent-table">
  5418. <Spin spinning={this.state.loading}>
  5419. <Table
  5420. columns={this.state.ContactsLists}
  5421. dataSource={this.state.contactList}
  5422. pagination={false}
  5423. bordered
  5424. size="small"
  5425. />
  5426. </Spin>
  5427. </div>
  5428. </div>
  5429. <div className="clearfix">
  5430. <h3 className="sub-title">项目业务</h3>
  5431. <div className="patent-table">
  5432. <Spin spinning={this.state.loading}>
  5433. <Table
  5434. columns={this.state.columnsX}
  5435. dataSource={this.state.dataSourceX}
  5436. pagination={this.state.paginations}
  5437. onRowClick={this.tableRowClickX}
  5438. bordered
  5439. size="small"
  5440. />
  5441. </Spin>
  5442. </div>
  5443. </div>
  5444. <div className="clearfix">
  5445. <Button
  5446. className="cancel"
  5447. type="primary"
  5448. onClick={this.tijiaoOk}
  5449. style={{ marginLeft: '200px', marginTop: '10px' }}
  5450. htmlType="submit"
  5451. >
  5452. 保存
  5453. </Button>
  5454. <Button
  5455. className="cancel"
  5456. type="ghost"
  5457. onClick={this.visitCancel}
  5458. style={{ marginLeft: '50px', marginTop: '10px' }}
  5459. >
  5460. 取消
  5461. </Button>
  5462. </div>
  5463. </TabPane>
  5464. <TabPane tab="外包/供应商信息" key="2">
  5465. {this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
  5466. <div style={{ marginTop: 10 }}>
  5467. <div className="clearfix">
  5468. <FormItem
  5469. className="half-item"
  5470. {...formItemLayout}
  5471. label={
  5472. <span>
  5473. <strong style={{ color: '#f00' }}>*</strong>
  5474. 类型
  5475. </span>
  5476. }
  5477. >
  5478. <Radio.Group
  5479. value={this.state.startType}
  5480. onChange={(e) => {
  5481. let _this = this;
  5482. if(this.state.thirdInfoList.length >0){
  5483. confirm({
  5484. title: '确定要切换吗?',
  5485. content: '切换将删除所有第三信息和付款节点',
  5486. onOk() {
  5487. return new Promise((resolve, reject) => {
  5488. _this.setState({ startType: e.target.value },()=>{
  5489. _this.projectTypeTabContent(_this.state.projectType);
  5490. })
  5491. _this.confirmDeletNew(-1,resolve,reject)
  5492. if(_this.state.payNodeList.length > 0){
  5493. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  5494. }
  5495. }).catch(() => console.log('Oops errors!'));
  5496. },
  5497. onCancel() {},
  5498. });
  5499. }else{
  5500. this.setState({ startType: e.target.value },()=>{
  5501. this.projectTypeTabContent(this.state.projectType);
  5502. })
  5503. }
  5504. }}
  5505. >
  5506. <Radio value={0}>外包(不走总部)</Radio>
  5507. <Radio value={1}>供应商信息</Radio>
  5508. </Radio.Group>
  5509. </FormItem>
  5510. </div>
  5511. {/* 专利类型 */}
  5512. <div
  5513. className="clearfix"
  5514. style={{
  5515. display: this.state.projectType === 1 ? 'block' : 'none',
  5516. }}
  5517. >
  5518. <FormItem
  5519. className="half-item"
  5520. labelCol={{ span: 4 }}
  5521. wrapperCol={{ span: 14 }}
  5522. label={
  5523. <span>
  5524. <strong style={{ color: '#f00' }}>*</strong>
  5525. 专利类型
  5526. </span>
  5527. }
  5528. >
  5529. <Radio.Group
  5530. value={this.state.patentType}
  5531. onChange={(e) => {
  5532. let _this = this;
  5533. if(this.state.thirdInfoList.length >0){
  5534. confirm({
  5535. title: '确定要切换吗?',
  5536. content: '切换将删除所有第三信息和付款节点',
  5537. onOk() {
  5538. return new Promise((resolve, reject) => {
  5539. _this.setState({ patentType: e.target.value },()=>{
  5540. _this.projectTypeTabContent(_this.state.projectType);
  5541. })
  5542. _this.confirmDeletNew(-1,resolve,reject)
  5543. if(_this.state.payNodeList.length > 0){
  5544. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  5545. }
  5546. }).catch(() => console.log('Oops errors!'));
  5547. },
  5548. onCancel() {},
  5549. });
  5550. }else{
  5551. this.setState({ patentType: e.target.value },()=>{
  5552. this.projectTypeTabContent(this.state.projectType);
  5553. })
  5554. }
  5555. }}
  5556. >
  5557. <Radio value={0}>专利申请/变更/转让</Radio>
  5558. <Radio value={1}>专利买卖</Radio>
  5559. </Radio.Group>
  5560. </FormItem>
  5561. </div>
  5562. <div
  5563. className="clearfix"
  5564. style={{
  5565. display: this.state.projectType === 1? 'block' : 'none',
  5566. }}
  5567. >
  5568. <FormItem
  5569. className="half-item"
  5570. labelCol={{ span: 3 }}
  5571. wrapperCol={{ span: 14 }}
  5572. label={
  5573. <span>
  5574. <strong style={{ color: '#f00' }}>*</strong>
  5575. 专利名称
  5576. </span>
  5577. }
  5578. >
  5579. <Radio.Group
  5580. value={this.state.patentNameType}
  5581. onChange={(e) => {
  5582. let _this = this;
  5583. if(this.state.thirdInfoList.length >0){
  5584. confirm({
  5585. title: '确定要切换吗?',
  5586. content: '切换将删除所有第三信息和付款节点',
  5587. onOk() {
  5588. return new Promise((resolve, reject) => {
  5589. _this.setState({ patentNameType: e.target.value },()=>{
  5590. _this.projectTypeTabContent(_this.state.projectType);
  5591. })
  5592. _this.confirmDeletNew(-1,resolve,reject)
  5593. if(_this.state.payNodeList.length > 0){
  5594. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  5595. }
  5596. }).catch(() => console.log('Oops errors!'));
  5597. },
  5598. onCancel() {},
  5599. });
  5600. }else{
  5601. this.setState({ patentNameType: e.target.value },()=>{
  5602. this.projectTypeTabContent(this.state.projectType);
  5603. })
  5604. }
  5605. }}
  5606. >
  5607. <Radio value={0}>实用新型专利</Radio>
  5608. <Radio value={1}>发明专利</Radio>
  5609. <Radio value={2}>外观专利</Radio>
  5610. {/*<Radio value={3}>*/}
  5611. {/* 其他*/}
  5612. {/* <Input*/}
  5613. {/* disabled={this.state.patentNameType !== 3}*/}
  5614. {/* value={this.state.patentName}*/}
  5615. {/* style={{ marginLeft: '15px' }}*/}
  5616. {/* onChange={(e) => {*/}
  5617. {/* this.setState({*/}
  5618. {/* patentName: e.target.value,*/}
  5619. {/* })*/}
  5620. {/* }}*/}
  5621. {/* placeholder="请填写专利名称"*/}
  5622. {/* />*/}
  5623. {/*</Radio>*/}
  5624. </Radio.Group>
  5625. </FormItem>
  5626. </div>
  5627. {/* 第三方信息专利 */}
  5628. <div
  5629. style={{
  5630. // display: this.state.type == 1 ? "block" : "none",
  5631. display: this.state.type == 1 ? 'block' : 'block',
  5632. }}
  5633. >
  5634. <span
  5635. style={{
  5636. fontSize: '18px',
  5637. }}
  5638. >
  5639. 第三方信息
  5640. </span>
  5641. <span
  5642. style={{
  5643. display: 'inline-block',
  5644. marginLeft: 10,
  5645. color: 'red',
  5646. }}
  5647. >
  5648. 金额总计(万元): {this.state.allTotalAmount}
  5649. </span>
  5650. <Button
  5651. type="primary"
  5652. onClick={(e) => {
  5653. //this.state.startType 类型为外包时,当普通单
  5654. if(this.state.projectType === 1 && this.state.patentType === -1 && this.state.startType === 1){
  5655. message.info('请先选择专利类型');
  5656. }else if(this.state.projectType === 1 && this.state.patentNameType === -1 && this.state.startType === 1){
  5657. message.info('请先选择专利名称');
  5658. } else{
  5659. this.addThirdList()
  5660. }
  5661. }}
  5662. style={{
  5663. float: 'right',
  5664. marginRight: '50px',
  5665. marginBottom: '15px',
  5666. }}
  5667. >
  5668. +新增供应商名称
  5669. </Button>
  5670. </div>
  5671. <div
  5672. className="clearfix"
  5673. style={{
  5674. // display: this.state.type == 1 ? "block" : "none",
  5675. display: this.state.type == 1 ? 'block' : 'block',
  5676. }}
  5677. >
  5678. <Spin spinning={this.state.loading}>
  5679. <Form layout="horizontal">
  5680. <Table
  5681. pagination={false}
  5682. columns={this.state.ContactsListsNew}
  5683. dataSource={this.state.thirdInfoList}
  5684. onRowClick={this.tableRowClickOne}
  5685. scroll={{ x: 'max-content', y: 0 }}
  5686. bordered
  5687. size="small"
  5688. />
  5689. <Col
  5690. span={24}
  5691. offset={9}
  5692. style={{ marginTop: '15px' }}
  5693. />
  5694. </Form>
  5695. </Spin>
  5696. </div>
  5697. {/*如果是软著类或者专利类的专利申请,隐藏付款节点*/}
  5698. <div
  5699. style={{
  5700. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  5701. }}
  5702. >
  5703. <span
  5704. style={{
  5705. fontSize: '18px',
  5706. }}
  5707. >
  5708. 付款节点
  5709. </span>
  5710. <span
  5711. style={{
  5712. display: 'inline-block',
  5713. marginLeft: 10,
  5714. color: 'red',
  5715. }}
  5716. />
  5717. <Button
  5718. type="primary"
  5719. onClick={(e) => {
  5720. this.addPayNode()
  5721. }}
  5722. style={{
  5723. float: 'right',
  5724. marginRight: '50px',
  5725. marginBottom: '15px',
  5726. }}
  5727. >
  5728. +新增付款节点
  5729. </Button>
  5730. </div>
  5731. {/*如果是软著类或者专利类的专利申请,隐藏付款节点但当为外包类型时,无需隐藏*/}
  5732. <div
  5733. className="clearfix"
  5734. style={{
  5735. display: this.state.startType === 0 ? 'block' : ((this.state.projectType === 1 && this.state.patentType === 0) || this.state.projectType === 2? 'none' : 'block'), //0正常 1专利 2软著 3审计
  5736. }}
  5737. >
  5738. <Spin spinning={this.state.loading}>
  5739. <Form layout="horizontal">
  5740. <Table
  5741. pagination={false}
  5742. columns={this.state.PayNodeTableColunms}
  5743. dataSource={this.state.payNodeList}
  5744. onRowClick={this.payNodeTableRowClickOne}
  5745. scroll={{ x: 'max-content', y: 0 }}
  5746. bordered
  5747. size="small"
  5748. />
  5749. <Col
  5750. span={24}
  5751. offset={9}
  5752. style={{ marginTop: '15px' }}
  5753. />
  5754. </Form>
  5755. </Spin>
  5756. </div>
  5757. <div className="clearfix">
  5758. <FormItem
  5759. className="half-item"
  5760. {...formItemLayout}
  5761. label={
  5762. <span>
  5763. <strong style={{ color: '#f00' }}>*</strong>备注
  5764. </span>
  5765. }
  5766. >
  5767. <TextArea
  5768. rows={4}
  5769. value={this.state.outsourceRemarks}
  5770. onChange={(e) => {
  5771. this.setState({
  5772. outsourceRemarks: e.target.value,
  5773. })
  5774. }}
  5775. placeholder="请输入备注"
  5776. />
  5777. </FormItem>
  5778. </div>
  5779. {/*<div className="clearfix">
  5780. <FormItem className="half-item"
  5781. {...formItemLayout}
  5782. label="上传协议文件" style={{height:"auto"}}>
  5783. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  5784. data={(e)=>{
  5785. return {
  5786. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  5787. }
  5788. }}
  5789. fileList={this.state.fileUrl}
  5790. onChange={(e)=>{
  5791. this.setState({
  5792. attachmentUrl:e.fileList,
  5793. fileUrl:e.fileList
  5794. })
  5795. }}>
  5796. {fileUrl.length>1?null:<Button>
  5797. <Icon type="upload" /> 点击上传
  5798. </Button>}
  5799. </Upload>
  5800. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  5801. </FormItem>
  5802. </div>*/}
  5803. <p
  5804. className="tip"
  5805. style={{
  5806. paddingBottom: '12px',
  5807. width: '240px',
  5808. marginLeft: '145px',
  5809. color: 'red',
  5810. }}
  5811. >
  5812. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  5813. </p>
  5814. <div className="clearfix">
  5815. <FormItem
  5816. labelCol={{ span: 4 }}
  5817. wrapperCol={{ span: 18 }}
  5818. label={
  5819. <span>
  5820. 合同/协议扫描件
  5821. </span>
  5822. }
  5823. >
  5824. <PicturesWall
  5825. domId={'myTask4'}
  5826. fileList={this.getOrgCodeUrlWai}
  5827. pictureUrl={this.state.pictureUrl}
  5828. />
  5829. <p style={{ color: 'red' }}>图片建议:要清晰。</p>
  5830. </FormItem>
  5831. </div>
  5832. {/*只有审核拒绝和第一次发起外包的时候才要填写发起原因*/}
  5833. {typeof this.state.refundStatus === 'undefined' || this.state.refundStatus === 2 ? <div className="clearfix">
  5834. <FormItem
  5835. className="half-item"
  5836. {...formItemLayout}
  5837. label={
  5838. <span>
  5839. <strong style={{ color: '#f00' }}>*</strong>发起原因
  5840. </span>
  5841. }
  5842. >
  5843. <TextArea
  5844. rows={4}
  5845. value={this.state.reason}
  5846. onChange={(e) => {
  5847. this.setState({
  5848. reason: e.target.value,
  5849. })
  5850. }}
  5851. placeholder="请输入发起原因"
  5852. />
  5853. </FormItem>
  5854. </div> : <div/>}
  5855. <div className="clearfix">
  5856. <div
  5857. style={{
  5858. display: 'inline-black',
  5859. textAlign: 'center',
  5860. }}
  5861. >
  5862. <Button
  5863. type="primary"
  5864. loading={this.state.loading}
  5865. onClick={()=>{
  5866. this.sureOut(this.state.startType);
  5867. }}
  5868. >
  5869. {
  5870. this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
  5871. }
  5872. </Button>
  5873. <p className="tip" style={{ color: 'red' }}>
  5874. {
  5875. this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
  5876. }
  5877. </p>
  5878. </div>
  5879. </div>
  5880. </div>
  5881. ) : (
  5882. <div>
  5883. {
  5884. this.state.speVisible && this.state.activeKey === '2' ?
  5885. <CheckProject
  5886. {...this.props}
  5887. tid={this.state.tid}
  5888. oldInfor={this.state.oldInfor}
  5889. projectType={this.state.projectType} //0正常 1专利 2软著 3审计
  5890. patentNameType={this.state.patentNameType}
  5891. patentName={this.state.patentName}
  5892. patentType={this.state.patentType}
  5893. status={this.state.refundStatus}
  5894. isPreviewPay={true}
  5895. thirdInfoList={this.state.thirdInfoList}
  5896. dataSource={this.state.payNodeList}
  5897. outsourceRemarks={this.state.outsourceRemarks}
  5898. fileList={this.state.pictureUrl}
  5899. startType={this.state.startType}
  5900. projectStatus={this.state.projectStatus}
  5901. onRefresh={()=>{
  5902. this.waiDetail();
  5903. this.thirdTable(this.state.tid);
  5904. this.getSelectOutsourceLog(this.state.tid);
  5905. this.payNodeTable(this.state.tid)
  5906. this.loadData(this.state.page)
  5907. }}
  5908. /> : <div/>
  5909. }
  5910. </div>
  5911. )}
  5912. {(this.state.refundStatus == 1 ||
  5913. this.state.refundStatus == 0 ||
  5914. this.state.refundStatus == 2) &&
  5915. this.state.startType !== 1
  5916. ? (
  5917. <div className="clearfix"
  5918. style={{
  5919. display: this.state.refundStatus == 0 ? 'none' : 'block',
  5920. }}
  5921. >
  5922. <hr className="division" />
  5923. {parseInt(this.state.startType) !== 1 ? <div style={{
  5924. color:'#F00',
  5925. fontWeight: 'bolder',
  5926. paddingBottom: '20px',
  5927. }}>
  5928. 审核结果: <span style={{paddingLeft:'20px'}}>{getRefundStatus(this.state.refundStatus)}</span>
  5929. </div> : <div/>}
  5930. <div className="outsourceLogList">
  5931. {
  5932. this.state.outsourceLogs && this.state.outsourceLogs.map((value,index)=>(
  5933. <div key={index} className="outsourceLogItem outsource">
  5934. <div style={{
  5935. display:'flex',
  5936. flexFlow:'row nowrap',
  5937. paddingBottom: '3px',
  5938. paddingTop: '3px',
  5939. }}>
  5940. <div>
  5941. {value.aname}
  5942. </div>
  5943. <div style={{paddingLeft:'5px'}}>
  5944. {
  5945. value.status === 0 ?
  5946. <Tag color="#2db7f5">发起外包审核</Tag> :
  5947. value.status === 1 ? <Tag color="#87d068">通过</Tag> :
  5948. <Tag color="#f50">驳回</Tag>
  5949. }
  5950. </div>
  5951. <div style={{
  5952. wordBreak: 'break-all',
  5953. maxWidth:'67%',
  5954. }}>
  5955. {value.remarks}
  5956. </div>
  5957. <div style={{paddingLeft: '10px'}}>
  5958. {value.createTimes}
  5959. </div>
  5960. </div>
  5961. </div>
  5962. ))
  5963. }
  5964. </div>
  5965. {/* <div*/}
  5966. {/* className="clearfix"*/}
  5967. {/* style={{*/}
  5968. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  5969. {/* }}*/}
  5970. {/* >*/}
  5971. {/* <FormItem*/}
  5972. {/* className="half-item"*/}
  5973. {/* {...formItemLayout}*/}
  5974. {/* label="审核意见"*/}
  5975. {/* >*/}
  5976. {/* <span>{this.state.remarks}</span>*/}
  5977. {/* </FormItem>*/}
  5978. {/* </div>*/}
  5979. {/* {parseInt(this.state.startType) !== 1 ?<div className="clearfix">*/}
  5980. {/* <FormItem*/}
  5981. {/* className="half-item"*/}
  5982. {/* {...formItemLayout}*/}
  5983. {/* label="审核结果"*/}
  5984. {/* >*/}
  5985. {/* <span>{getRefundStatus(this.state.refundStatus)}</span>*/}
  5986. {/* </FormItem>*/}
  5987. {/* </div> : <div/>}*/}
  5988. {/* <div*/}
  5989. {/* className="clearfix"*/}
  5990. {/* style={{*/}
  5991. {/* display: this.state.refundStatus == 0 ? 'none' : 'block',*/}
  5992. {/* }}*/}
  5993. {/* >*/}
  5994. {/* <FormItem*/}
  5995. {/* className="half-item"*/}
  5996. {/* {...formItemLayout}*/}
  5997. {/* label="审核时间"*/}
  5998. {/* >*/}
  5999. {/* <span>{this.state.auditTimes}</span>*/}
  6000. {/* </FormItem>*/}
  6001. {/* </div>*/}
  6002. </div>
  6003. ) : (
  6004. ''
  6005. )}
  6006. </TabPane>
  6007. {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
  6008. <TabPane tab="订单详情" key="3">
  6009. <Spin spinning={this.state.loading}>
  6010. <OrderDetail
  6011. orderData={this.state.orderData}
  6012. getOrderLog={this.getOrderLog}
  6013. dataSourceX={this.state.dataSourceX}
  6014. contactList={this.state.jiedian}
  6015. orderNo={this.state.orderNo}
  6016. totalCui={this.state.totalCui}
  6017. contactListNew={this.state.jiedianNew}
  6018. pictureUrl={this.state.contractPictureUrl}
  6019. />
  6020. </Spin>
  6021. </TabPane>
  6022. ) : (
  6023. ''
  6024. )}
  6025. </Tabs>
  6026. </Modal>
  6027. <Modal
  6028. width="800px"
  6029. visible={this.state.visibleA}
  6030. onCancel={this.visitCancelA}
  6031. title="操作日志"
  6032. footer=""
  6033. className="admin-desc-content"
  6034. >
  6035. <div className="patent-table patent-table-center">
  6036. <Spin spinning={this.state.loading}>
  6037. <Table
  6038. columns={this.state.columnsA}
  6039. dataSource={this.state.dataSourceA}
  6040. pagination={false}
  6041. bordered
  6042. size="small"
  6043. />
  6044. </Spin>
  6045. </div>
  6046. </Modal>
  6047. <Modal
  6048. title="工时记录"
  6049. visible={this.state.timeVisible}
  6050. onCancel={this.timeClose}
  6051. width={800}
  6052. footer={null}
  6053. >
  6054. <Spin spinning={this.state.loading}>
  6055. <Table
  6056. columns={this.state.columnsTime}
  6057. dataSource={this.state.dataSourceTime}
  6058. pagination={false}
  6059. scroll={{ x: 'max-content', y: 0 }}
  6060. bordered
  6061. size={'small'}
  6062. />
  6063. <p style={{ marginTop: 10, color: 'red' }}>
  6064. 累计工时(小时):{this.state.recordHour}
  6065. </p>
  6066. </Spin>
  6067. </Modal>
  6068. {this.state.ThirdListVisible ? <NewSupplier
  6069. patentNameType={this.state.patentNameType}
  6070. ThirdId={this.state.ThirdId}
  6071. tid={this.state.tid}
  6072. patentType={this.state.patentType}
  6073. projectType={this.state.startType === 0 ? 0 : this.state.projectType}
  6074. thirdCompanyName={this.state.thirdCompanyName}
  6075. thirdUnitPrice={this.state.thirdUnitPrice}
  6076. thirdQuantity={this.state.thirdQuantity}
  6077. thirdRemarks={this.state.thirdRemarks}
  6078. spinning={this.state.loading}
  6079. visible={this.state.ThirdListVisible}
  6080. thirdMaterial={this.state.thirdMaterial}
  6081. thirdUrgent={this.state.thirdUrgent}
  6082. audit={this.state.audit}
  6083. assets={this.state.assets}
  6084. income={this.state.income}
  6085. onDetermine={this.handleCancelq}
  6086. onCancel={()=>{
  6087. this.thirdTable(this.state.tid);
  6088. this.setState({
  6089. ThirdListVisible: false,
  6090. ThirdId: '', //供应商id
  6091. thirdCompanyName: '', //第三方名称
  6092. thirdUnitPrice: '', //单价
  6093. thirdQuantity: '', //数量
  6094. currentTotalPrice: '', //总价
  6095. thirdMaterial: 0, //有无材料
  6096. thirdUrgent: 0, //加急情况
  6097. thirdRemarks: '',
  6098. audit: 1,
  6099. assets: '',
  6100. income: '',
  6101. })
  6102. }}
  6103. otherOperations={(data)=>{
  6104. this.setState({
  6105. thirdMaterial: data.thirdMaterial,
  6106. thirdUrgent: data.thirdUrgent,
  6107. customerArr: data.customerArr,
  6108. thirdCompanyName: data.thirdCompanyName
  6109. })
  6110. }}/> : <div/>}
  6111. {this.state.PayNodeVisible ? <OperationPayNode
  6112. tid={this.state.tid}
  6113. cSort={this.state.cSort}
  6114. visible={this.state.PayNodeVisible}
  6115. thirdId={this.state.ThirdId}
  6116. thirdInfoList={this.state.thirdInfoList}
  6117. supplierList={this.state.PayNodeCompany}
  6118. payNodeInfor={this.state.payNodeInfor}
  6119. thirdUnitPrice={this.state.thirdUnitPrice}
  6120. onCancel={()=>{
  6121. this.setState({
  6122. PayNodeVisible: false,
  6123. payNodeInfor: {},
  6124. ThirdId: '',
  6125. thirdUnitPrice: '',
  6126. })
  6127. this.payNodeTable(this.state.tid)
  6128. }}
  6129. /> : <div/>}
  6130. </div>
  6131. )
  6132. },
  6133. })
  6134. export default Task