myTask.jsx 199 KB

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