myTask.jsx 199 KB

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