myTask.jsx 214 KB

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