myTask.jsx 198 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820
  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(() => console.log('Oops errors!'));
  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. console.log(
  2700. 'thirdUnitPrice:',
  2701. this.state.thirdUnitPrice,
  2702. 'thirdQuantity:',
  2703. this.state.thirdQuantity,
  2704. 'currentTotalPrice:',
  2705. currentTotalPrice
  2706. )
  2707. },
  2708. // 付款节点自动计算总金额
  2709. payNodeCalculatedAmount(num) {
  2710. let currentTotalPrice,quantity,unitPrice
  2711. //获取当前供应商名称对应的单价并更新
  2712. this.state.thirdInfoList.forEach((item) => {
  2713. if (item.companyName === this.state.thirdCompanyName) {
  2714. currentTotalPrice = num ? item.unitPrice * num : item.quantity * item.unitPrice;
  2715. currentTotalPrice = currentTotalPrice.toFixed(6);
  2716. quantity = num ? num : item.quantity;
  2717. unitPrice = item.unitPrice;
  2718. }
  2719. })
  2720. this.setState({
  2721. payNodeQuantity: num ? num : quantity,
  2722. })
  2723. if(this.state.projectType !== 2){
  2724. this.setState({
  2725. currentTotalPrice: currentTotalPrice,
  2726. thirdUnitPrice: unitPrice
  2727. })
  2728. }
  2729. },
  2730. // 保存供应商信息
  2731. handleCancelq() {
  2732. let api
  2733. if (this.state.ThirdId) {
  2734. //修改
  2735. api = '/api/admin/company/updateCompany'
  2736. } else {
  2737. //新增
  2738. api = '/api/admin/company/addCompany'
  2739. }
  2740. let customerId = 0;
  2741. let isHave =this.state.customerArr.some((value)=>{
  2742. if(value.companyName === this.state.thirdCompanyName){
  2743. customerId = value.id
  2744. return true;
  2745. }
  2746. });
  2747. if(!isHave && this.state.projectType !== 0){
  2748. message.warning('请输入正确的供应商名称')
  2749. return;
  2750. }
  2751. this.setState({
  2752. loading: true,
  2753. })
  2754. // material: this.state.thirdMaterial, //材料
  2755. // urgent: this.state.thirdUrgent, //加急
  2756. // unitPrice: this.state.thirdUnitPrice, //单价
  2757. let data = {
  2758. id: this.state.ThirdId, //id
  2759. tid: this.state.tid, //订单编号
  2760. companyName: this.state.thirdCompanyName, //第三方名称
  2761. quantity: this.state.thirdQuantity, //数量
  2762. // totalAmount: this.state.currentTotalPrice, //总价
  2763. remarks: this.state.thirdRemarks, //备注
  2764. }
  2765. if(this.state.projectType === 0){
  2766. data.unitPrice = this.state.thirdUnitPrice;
  2767. }
  2768. if(isHave){
  2769. data.cid = customerId ////公司id
  2770. }
  2771. $.ajax({
  2772. url: globalConfig.context + api,
  2773. method: 'post',
  2774. dataType: 'json',
  2775. crossDomain: false,
  2776. data: data,
  2777. }).done(
  2778. function (data) {
  2779. this.setState({
  2780. loading: false,
  2781. })
  2782. if (!data.error.length) {
  2783. message.success('保存成功!')
  2784. this.setState({
  2785. ThirdId: '',
  2786. ThirdListVisible: false,
  2787. thirdCompanyName: '', //第三方名称
  2788. thirdUnitPrice: '', //单价
  2789. thirdQuantity: '', //数量
  2790. currentTotalPrice: '', //总价
  2791. thirdRemarks: '',
  2792. thirdUrgent: 0,
  2793. })
  2794. // this.visitCancel();
  2795. this.thirdTable(this.state.tid)
  2796. } else {
  2797. message.warning(data.error[0].message)
  2798. }
  2799. }.bind(this)
  2800. )
  2801. },
  2802. //保存付款节点
  2803. savePayNode() {
  2804. let api
  2805. if (this.state.ThirdId) {
  2806. //修改
  2807. api = '/api/admin/company/updatePaymentNode'
  2808. } else {
  2809. //新增
  2810. api = '/api/admin/company/addPaymentNode'
  2811. }
  2812. // totalAmount: this.state.currentTotalPrice, //总价
  2813. // partyAmount: this.state.partyAmount, //付款金额
  2814. //
  2815. let customerId=0;
  2816. this.state.PayNodeCompany.some((value)=>{
  2817. if(value.companyName === this.state.thirdCompanyName){
  2818. customerId = value.id
  2819. return true;
  2820. }
  2821. });
  2822. if(!this.state.thirdCompanyName){
  2823. message.error('请选择供应商名称');
  2824. return;
  2825. }
  2826. if(!this.state.paySubjectName){
  2827. message.error('请选择付款科目');
  2828. return;
  2829. }
  2830. if(!this.state.payNodeQuantity){
  2831. message.error('请输入数量');
  2832. return;
  2833. }
  2834. let data = {
  2835. id: this.state.ThirdId, //id
  2836. tid: this.state.tid, //订单编号
  2837. cid: customerId,//对应的第三方信息
  2838. companyName: this.state.thirdCompanyName.split('-')[0], //第三方名称
  2839. quantity: this.state.payNodeQuantity, //数量
  2840. dunType: this.state.dunType, //催款节点
  2841. projectType: this.state.cSort, //项目分类
  2842. }
  2843. if(this.state.paySubjectName === '0'){
  2844. if(!this.state.partyTimes){
  2845. message.error('请选择付款时间');
  2846. return;
  2847. }
  2848. data.partyTimes = this.state.partyTimes //付款时间
  2849. }
  2850. if(this.state.projectType !== 2){ //其他类型 0正常 1专利 2软著 3审计
  2851. data.totalAmount = this.state.currentTotalPrice //总价
  2852. data.unitPrice = this.state.thirdUnitPrice //单价
  2853. }
  2854. this.setState({
  2855. loading: true,
  2856. })
  2857. $.ajax({
  2858. url: globalConfig.context + api,
  2859. method: 'post',
  2860. dataType: 'json',
  2861. crossDomain: false,
  2862. data: data,
  2863. }).done(
  2864. function (data) {
  2865. this.setState({
  2866. loading: false,
  2867. })
  2868. if (!data.error.length) {
  2869. message.success('保存成功!')
  2870. this.setState({
  2871. ThirdId: '',
  2872. PayNodeVisible: false,
  2873. thirdCompanyName: '', //第三方名称
  2874. paySubjectName: '', //付款科目名称
  2875. thirdUnitPrice: '', //单价
  2876. thirdQuantity: '', //数量
  2877. payNodeQuantity: 1, //付款节点数量
  2878. currentTotalPrice: '', //总价
  2879. partyAmount: '', //付款金额
  2880. partyTimes: '', //付款时间
  2881. dunType: '', //催款节点
  2882. })
  2883. // this.visitCancel();
  2884. this.payNodeTable(this.state.tid)
  2885. } else {
  2886. message.warning(data.error[0].message)
  2887. }
  2888. }.bind(this)
  2889. )
  2890. },
  2891. // 取消
  2892. handleCancelclose() {
  2893. this.setState({
  2894. PayNodeVisible: false,
  2895. ThirdListVisible: false,
  2896. thirdCompanyName: '', //第三方名称
  2897. paySubjectName: '', //付款科目名称
  2898. thirdUnitPrice: '', //单价
  2899. partyTimes: '',
  2900. thirdQuantity: 1, //数量
  2901. payNodeQuantity: 1,
  2902. currentTotalPrice: '', //总价
  2903. thirdRemarks: '',
  2904. ThirdId: '',
  2905. thirdUrgent: 0, //加急状态
  2906. })
  2907. },
  2908. // 删除供应商信息
  2909. confirmDeletNew(index,resolve=()=>{},reject=()=>{}) {
  2910. this.setState({
  2911. loading: true,
  2912. ThirdListVisible: false,
  2913. })
  2914. let id = '';
  2915. if(index === -1){
  2916. this.state.thirdInfoList.map((value,index)=>{
  2917. id+=value.id+',';
  2918. })
  2919. }else{
  2920. id = index.id
  2921. }
  2922. $.ajax({
  2923. url: globalConfig.context + '/api/admin/company/deleteCompany',
  2924. method: 'post',
  2925. data: {
  2926. id: id,
  2927. },
  2928. }).done(
  2929. function (data) {
  2930. this.setState({
  2931. loading: false,
  2932. })
  2933. if (!data.error.length) {
  2934. message.success('删除成功!')
  2935. this.thirdTable(this.state.tid)
  2936. resolve();
  2937. } else {
  2938. message.warning(data.error[0].message)
  2939. reject();
  2940. }
  2941. }.bind(this)
  2942. )
  2943. },
  2944. // 删除付款节点
  2945. payNodeConfirmDeletNew(index,resolve=()=>{},reject=()=>{}) {
  2946. this.setState({
  2947. loading: true,
  2948. PayNodeVisible: false,
  2949. })
  2950. let id = '';
  2951. if(index === -1){
  2952. this.state.payNodeList.map((value,index)=>{
  2953. id+=value.id+',';
  2954. })
  2955. }else{
  2956. id = index.id
  2957. }
  2958. $.ajax({
  2959. url: globalConfig.context + '/api/admin/company/deletePaymentNode',
  2960. method: 'post',
  2961. data: {
  2962. id: id,
  2963. },
  2964. }).done(
  2965. function (data) {
  2966. this.setState({
  2967. loading: false,
  2968. })
  2969. if (!data.error.length) {
  2970. message.success('删除成功!')
  2971. resolve();
  2972. this.payNodeTable(this.state.tid)
  2973. } else {
  2974. message.warning(data.error[0].message)
  2975. reject();
  2976. }
  2977. }.bind(this)
  2978. )
  2979. },
  2980. //点击供应商详情
  2981. tableRowClickOne(record) {
  2982. this.setState({
  2983. ThirdListVisible: true,
  2984. ThirdId: record.id, //供应商id
  2985. thirdCompanyName: record.companyName, //第三方名称
  2986. thirdUnitPrice: record.unitPrice, //单价
  2987. thirdQuantity: record.quantity, //数量
  2988. currentTotalPrice: record.totalAmount, //总价
  2989. thirdMaterial: record.material, //有无材料
  2990. thirdUrgent: record.urgent, //加急情况
  2991. thirdRemarks: record.remarks,
  2992. })
  2993. },
  2994. //点击付款节点详情
  2995. payNodeTableRowClickOne(record) {
  2996. this.setState({
  2997. PayNodeVisible: true,
  2998. ThirdId: record.id, //供应商id
  2999. thirdCompanyName: record.companyName, //第三方名称
  3000. thirdUnitPrice: record.unitPrice, //单价
  3001. thirdQuantity: record.quantity, //供应商数量
  3002. payNodeQuantity: record.quantity, //付款节点数量
  3003. currentTotalPrice: record.totalAmount, //总价
  3004. partyTimes: record.partyTimes,
  3005. paySubjectName: record.dunType,
  3006. })
  3007. },
  3008. render() {
  3009. const formItemLayout = {
  3010. labelCol: { span: 8 },
  3011. wrapperCol: { span: 14 },
  3012. }
  3013. let departmentArr = this.state.departmentArr || []
  3014. return (
  3015. <div className="user-content">
  3016. {this.state.resVisible ? (
  3017. <ResolutionDetail
  3018. cancel={this.resCancel}
  3019. detail={this.state.resRecord}
  3020. visible={this.state.resVisible}
  3021. id={this.state.resRecord.orderNo}
  3022. />
  3023. ) : (
  3024. ''
  3025. )}
  3026. <ShowModalDiv ShowModal={this.state.showModal} />
  3027. <div className="content-title" style={{ marginBottom: 10 }}>
  3028. <span style={{ fontWeight: 900, fontSize: 16 }}>项目任务</span>
  3029. </div>
  3030. <Tabs defaultActiveKey="2" className="test" bordered>
  3031. <TabPane tab="更改表格显示数据" key="1">
  3032. <div style={{ marginLeft: 10 }}>
  3033. <ChooseList
  3034. columns={this.state.columns}
  3035. changeFn={this.changeList}
  3036. changeList={this.state.changeList}
  3037. top={55}
  3038. margin={11}
  3039. />
  3040. </div>
  3041. </TabPane>
  3042. <TabPane tab="搜索" key="2">
  3043. <div className="user-search" style={{ marginLeft: 10 }}>
  3044. <Input
  3045. placeholder="客户名称"
  3046. value={this.state.nameSearch}
  3047. onChange={(e) => {
  3048. this.setState({ nameSearch: e.target.value })
  3049. }}
  3050. />
  3051. <Input
  3052. placeholder="订单编号"
  3053. value={this.state.orderNoSearch}
  3054. onChange={(e) => {
  3055. this.setState({ orderNoSearch: e.target.value })
  3056. }}
  3057. />
  3058. <Input
  3059. placeholder="合同编号"
  3060. value={this.state.contractNoSearch}
  3061. onChange={(e) => {
  3062. this.setState({ contractNoSearch: e.target.value })
  3063. }}
  3064. />
  3065. <Input
  3066. placeholder="项目编号"
  3067. value={this.state.taskNoSearch}
  3068. onChange={(e) => {
  3069. this.setState({ taskNoSearch: e.target.value })
  3070. }}
  3071. />
  3072. <Select
  3073. placeholder="选择部门"
  3074. style={{ width: 150, marginRight: '10px' }}
  3075. value={this.state.departmenttSearch}
  3076. onChange={(e) => {
  3077. this.setState({ departmenttSearch: e })
  3078. }}
  3079. >
  3080. {departmentArr.map(function (item) {
  3081. return (
  3082. <Select.Option key={item.id}>{item.name}</Select.Option>
  3083. )
  3084. })}
  3085. </Select>
  3086. <Select
  3087. placeholder="项目状态"
  3088. style={{ width: 150, marginRight: '10px' }}
  3089. value={this.state.projectStatusSearch}
  3090. onChange={(e) => {
  3091. this.setState({ projectStatusSearch: e })
  3092. console.log(this.state.projectStatusSearch)
  3093. }}
  3094. >
  3095. {projectStatus.map(function (item) {
  3096. return (
  3097. <Select.Option key={item.value}>{item.key}</Select.Option>
  3098. )
  3099. })}
  3100. </Select>
  3101. <Select
  3102. placeholder="特批状态"
  3103. style={{ width: 150, marginRight: '10px' }}
  3104. value={this.state.approvalSearch}
  3105. onChange={(e) => {
  3106. this.setState({ approvalSearch: e })
  3107. console.log(this.state.approvalSearch)
  3108. }}
  3109. >
  3110. <Select.Option key={0}>非特批</Select.Option>
  3111. <Select.Option key={1}>特批</Select.Option>
  3112. </Select>
  3113. <Select
  3114. placeholder="外包状态"
  3115. style={{ width: 150, marginRight: '10px' }}
  3116. value={this.state.outsourceStatusSearch}
  3117. onChange={(e) => {
  3118. this.setState({ outsourceStatusSearch: e })
  3119. console.log(this.state.outsourceStatusSearch)
  3120. }}
  3121. >
  3122. <Select.Option key={0}>外包待审核</Select.Option>
  3123. {/* <Select.Option key={1}>外包审核通过</Select.Option> */}
  3124. <Select.Option key={2}>外包审核驳回</Select.Option>
  3125. <Select.Option key={999}>全部</Select.Option>
  3126. </Select>
  3127. <Button type="primary" onClick={this.search}>
  3128. 搜索
  3129. </Button>
  3130. <Button
  3131. onClick={(e) => {
  3132. this.reset(true)
  3133. }}
  3134. >
  3135. 重置
  3136. </Button>
  3137. {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  3138. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  3139. <span>订单时间 :</span>
  3140. <RangePicker
  3141. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  3142. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  3143. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  3144. </div> */}
  3145. </div>
  3146. </TabPane>
  3147. <TabPane tab="导出Excel" key="3">
  3148. <Button
  3149. type="primary"
  3150. style={{ margin: '11px 0 10px 10px' }}
  3151. onClick={this.exportExec}
  3152. >
  3153. 导出Excel
  3154. </Button>
  3155. </TabPane>
  3156. {/* <TabPane tab="批量操作" key="6">
  3157. <Button
  3158. type="primary"
  3159. disabled={this.state.selectedRowKeys.length == 0}
  3160. style={{ margin: "0px 0px 10px 10px" }}
  3161. onClick={e => {
  3162. e.stopPropagation(),
  3163. this.evaluateY(this.state.selectedRowKeys, "财务专员");
  3164. }}
  3165. >
  3166. 转交
  3167. </Button>
  3168. </TabPane> */}
  3169. </Tabs>
  3170. {/* <div className="user-search">
  3171. <Input
  3172. placeholder="客户名称"
  3173. value={this.state.nameSearch}
  3174. onChange={e => {
  3175. this.setState({ nameSearch: e.target.value });
  3176. }}
  3177. />
  3178. <Input
  3179. placeholder="订单编号"
  3180. value={this.state.orderNoSearch}
  3181. onChange={e => {
  3182. this.setState({ orderNoSearch: e.target.value });
  3183. }}
  3184. />
  3185. <Input
  3186. placeholder="项目编号"
  3187. value={this.state.taskNoSearch}
  3188. onChange={e => {
  3189. this.setState({ taskNoSearch: e.target.value });
  3190. }}
  3191. />
  3192. <Select
  3193. placeholder="选择部门"
  3194. style={{ width: 150, marginRight: "10px" }}
  3195. value={this.state.departmenttSearch}
  3196. onChange={e => {
  3197. this.setState({ departmenttSearch: e });
  3198. }}
  3199. >
  3200. {departmentArr.map(function(item) {
  3201. return <Select.Option key={item.id}>{item.name}</Select.Option>;
  3202. })}
  3203. </Select>
  3204. <Button type="primary" onClick={this.search}>
  3205. 搜索
  3206. </Button>
  3207. <Button onClick={this.reset}>重置</Button>
  3208. <Button
  3209. type="primary"
  3210. style={{ marginLeft: "10px" }}
  3211. onClick={this.exportExec}
  3212. >
  3213. 导出Excel
  3214. </Button>
  3215. <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
  3216. <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
  3217. <span>订单时间 :</span>
  3218. <RangePicker
  3219. value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
  3220. this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
  3221. onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
  3222. </div>
  3223. </div> */}
  3224. <div className="patent-table">
  3225. <Spin spinning={this.state.loading}>
  3226. <Table
  3227. columns={
  3228. this.state.changeList == undefined
  3229. ? this.state.columns
  3230. : this.state.changeList
  3231. }
  3232. dataSource={this.state.dataSource}
  3233. pagination={this.state.pagination}
  3234. scroll={{ x: 'max-content', y: 0 }}
  3235. onRowClick={this.tableRowClick.bind(this)}
  3236. bordered
  3237. size={'small'}
  3238. />
  3239. </Spin>
  3240. </div>
  3241. <Assign
  3242. title="项目"
  3243. selApi={'/api/admin/orderProject/projectDistribution'}
  3244. data={this.state.assignData}
  3245. showDesc={this.state.assignVisible}
  3246. closeDesc={this.closeAssign.bind(this)}
  3247. fenpaiData={8}
  3248. specially={0}
  3249. roleName={this.state.nub}
  3250. requestMethod={'post'}
  3251. flag={this.state.flag}
  3252. all={this.state}
  3253. />
  3254. {this.state.visible ? <Modal
  3255. className="customeDetails"
  3256. footer=""
  3257. title=""
  3258. width="900px"
  3259. visible={this.state.visible}
  3260. onOk={this.visitOk}
  3261. onCancel={this.visitCancel}
  3262. >
  3263. <Tabs
  3264. activeKey={this.state.activeKey}
  3265. onChange={(e) => {
  3266. this.callback(e)
  3267. if (e == 2) {
  3268. this.waiDetail();
  3269. this.thirdTable(this.state.tid);
  3270. this.payNodeTable(this.state.tid)
  3271. }
  3272. }}
  3273. >
  3274. <TabPane tab="项目概况" key="1">
  3275. <Form
  3276. layout="horizontal"
  3277. onSubmit={this.handleSubmit}
  3278. id="demand-form"
  3279. style={{ paddingBottom: '00px' }}
  3280. >
  3281. <Spin spinning={this.state.loading}>
  3282. <div className="clearfix">
  3283. <div className="clearfix">
  3284. <FormItem
  3285. className="half-item"
  3286. {...formItemLayout}
  3287. label="当前项目情况"
  3288. >
  3289. <Radio.Group
  3290. value={this.state.status}
  3291. onChange={(e) => {
  3292. this.setState({ status: e.target.value })
  3293. }}
  3294. >
  3295. <Radio value={0}>开启</Radio>
  3296. <Radio value={1}>暂停</Radio>
  3297. </Radio.Group>
  3298. <Button
  3299. type="primary"
  3300. size="small"
  3301. style={{ marginTop: '5px', position: 'absolute' }}
  3302. onClick={this.caozuorizhi}
  3303. >
  3304. 操作日志
  3305. </Button>
  3306. </FormItem>
  3307. <FormItem
  3308. className="half-item"
  3309. {...formItemLayout}
  3310. label="合同编号"
  3311. >
  3312. <span>{this.state.contractNo}</span>
  3313. </FormItem>
  3314. </div>
  3315. <div className="clearfix">
  3316. <FormItem
  3317. className="half-item"
  3318. {...formItemLayout}
  3319. label="项目状态"
  3320. >
  3321. <Select
  3322. placeholder="选择项目状态"
  3323. style={{ width: '200px' }}
  3324. value={this.state.projectStatus}
  3325. onChange={(e) => {
  3326. this.setState({ projectStatus: e })
  3327. }}
  3328. >
  3329. {projectStatus.map(function (item) {
  3330. return (
  3331. <Select.Option key={item.value}>
  3332. {item.key}
  3333. </Select.Option>
  3334. )
  3335. })}
  3336. </Select>
  3337. </FormItem>
  3338. <FormItem
  3339. className="half-item"
  3340. {...formItemLayout}
  3341. label="是否特批"
  3342. >
  3343. <span>{getApproval(this.state.approval)}</span>
  3344. </FormItem>
  3345. <FormItem
  3346. className="half-item"
  3347. {...formItemLayout}
  3348. label="结算状态"
  3349. >
  3350. <span>
  3351. {getLiquidationStatus(this.state.liquidationStatus)}
  3352. </span>
  3353. </FormItem>
  3354. <FormItem
  3355. className="half-item"
  3356. {...formItemLayout}
  3357. label="流程状态"
  3358. >
  3359. <span>
  3360. {getProcessStatus(this.state.processStatus)}
  3361. </span>
  3362. </FormItem>
  3363. <FormItem
  3364. className="half-item"
  3365. {...formItemLayout}
  3366. label="订单编号"
  3367. >
  3368. <span>{this.state.orderNo}</span>
  3369. </FormItem>
  3370. </div>
  3371. <div className="clearfix">
  3372. <FormItem
  3373. className="half-item"
  3374. {...formItemLayout}
  3375. label="满意度表格"
  3376. >
  3377. <Radio.Group
  3378. value={this.state.formRetrieve}
  3379. onChange={(e) => {
  3380. this.setState({ formRetrieve: e.target.value })
  3381. }}
  3382. >
  3383. <Radio value={0}>未收回</Radio>
  3384. <Radio value={1}>已收回</Radio>
  3385. <Radio value={2}>其他</Radio>
  3386. </Radio.Group>
  3387. </FormItem>
  3388. <FormItem
  3389. className="half-item"
  3390. {...formItemLayout}
  3391. label="退单"
  3392. >
  3393. <Radio.Group
  3394. value={this.state.taskRefund}
  3395. onChange={(e) => {
  3396. this.setState({ taskRefund: e.target.value })
  3397. }}
  3398. >
  3399. <Radio value={0}>已完成</Radio>
  3400. <Radio value={1}>未完成</Radio>
  3401. <Radio value={2}>其他</Radio>
  3402. </Radio.Group>
  3403. </FormItem>
  3404. </div>
  3405. <div className="clearfix">
  3406. {
  3407. <FormItem
  3408. className="half-item"
  3409. {...formItemLayout}
  3410. label="(满意度)备注"
  3411. >
  3412. <Input
  3413. type="textarea"
  3414. placeholder="请输入备注"
  3415. rows={2}
  3416. value={this.state.retrieveContent}
  3417. onChange={(e) => {
  3418. this.setState({
  3419. retrieveContent: e.target.value,
  3420. })
  3421. }}
  3422. />
  3423. </FormItem>
  3424. }
  3425. {
  3426. <FormItem
  3427. className="half-item"
  3428. {...formItemLayout}
  3429. label="(退单)备注"
  3430. >
  3431. <Input
  3432. type="textarea"
  3433. placeholder="请输入备注"
  3434. rows={2}
  3435. value={this.state.refundContent}
  3436. onChange={(e) => {
  3437. this.setState({ refundContent: e.target.value })
  3438. }}
  3439. />
  3440. </FormItem>
  3441. }
  3442. </div>
  3443. <div className="clearfix">
  3444. <h3 className="sub-title">订单负责人信息</h3>
  3445. <FormItem
  3446. className="half-item"
  3447. {...formItemLayout}
  3448. label="负责人"
  3449. >
  3450. <span>
  3451. {this.state.salesmanName +
  3452. '(' +
  3453. this.state.depName +
  3454. ')'}
  3455. </span>
  3456. </FormItem>
  3457. <FormItem
  3458. className="half-item"
  3459. {...formItemLayout}
  3460. label="负责人电话"
  3461. >
  3462. <span>{this.state.salesmanMobile}</span>
  3463. </FormItem>
  3464. <FormItem
  3465. className="half-item"
  3466. {...formItemLayout}
  3467. label="当前财务负责人"
  3468. >
  3469. <span>{this.state.nowFinance}</span>
  3470. </FormItem>
  3471. <FormItem
  3472. className="half-item"
  3473. {...formItemLayout}
  3474. label="当前财务负责人电话"
  3475. >
  3476. <span>{this.state.nowFinanceMobile}</span>
  3477. </FormItem>
  3478. <FormItem
  3479. className="half-item"
  3480. {...formItemLayout}
  3481. style={{ opacity: '.5' }}
  3482. label="原负责人"
  3483. >
  3484. <span>{this.state.oldSalesmanName}</span>
  3485. </FormItem>
  3486. <FormItem
  3487. className="half-item"
  3488. {...formItemLayout}
  3489. style={{ opacity: '.5' }}
  3490. label="原负责人电话"
  3491. >
  3492. <span>{this.state.oldSalesmanMobile}</span>
  3493. </FormItem>
  3494. <FormItem
  3495. className="half-item"
  3496. {...formItemLayout}
  3497. style={{ opacity: '.5' }}
  3498. label="实际财务操作人"
  3499. >
  3500. <span>{this.state.financeName}</span>
  3501. </FormItem>
  3502. <FormItem
  3503. className="half-item"
  3504. {...formItemLayout}
  3505. style={{ opacity: '.5' }}
  3506. label="实际财务操作人电话"
  3507. >
  3508. <span>{this.state.financeMobile}</span>
  3509. </FormItem>
  3510. <FormItem
  3511. className="half-item"
  3512. {...formItemLayout}
  3513. label="订单留言"
  3514. >
  3515. <span>{this.state.orderRemarks}</span>
  3516. </FormItem>
  3517. <FormItem
  3518. className="half-item"
  3519. {...formItemLayout}
  3520. label=""
  3521. >
  3522. <Button onClick={this.getOrderLog}>查看订单日志</Button>
  3523. </FormItem>
  3524. <OrderRiZi
  3525. dataSourcerizhi={this.state.dataSourceY}
  3526. closeOrderLog={this.closeOrderLog}
  3527. visible={this.state.avisible}
  3528. loading={this.state.loading}
  3529. />
  3530. </div>
  3531. <div className="clearfix">
  3532. <h3 className="sub-title">外包信息</h3>
  3533. <FormItem
  3534. className="half-item"
  3535. {...formItemLayout}
  3536. label="外包公司"
  3537. >
  3538. <Input
  3539. value={this.state.outsourceName}
  3540. onChange={(e) => {
  3541. this.setState({
  3542. outsourceName: e.target.value,
  3543. })
  3544. }}
  3545. placeholder="请输入外包公司"
  3546. style={{ width: '200px' }}
  3547. />
  3548. </FormItem>
  3549. <FormItem
  3550. className="half-item"
  3551. {...formItemLayout}
  3552. label="外包成本(万元)"
  3553. >
  3554. <Input
  3555. value={this.state.outsourcePrice}
  3556. onChange={(e) => {
  3557. this.setState({
  3558. outsourcePrice: e.target.value,
  3559. })
  3560. }}
  3561. placeholder="请输入外包成本"
  3562. style={{ width: '200px' }}
  3563. />
  3564. </FormItem>
  3565. </div>
  3566. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  3567. <div className="clearfix">
  3568. <h3 className="sub-title">联系信息</h3>
  3569. <FormItem
  3570. className="half-item"
  3571. {...formItemLayout}
  3572. label="客户名称"
  3573. >
  3574. <span>{this.state.userName}</span>
  3575. </FormItem>
  3576. <FormItem
  3577. className="half-item"
  3578. {...formItemLayout}
  3579. label="企业法人"
  3580. >
  3581. <Input
  3582. placeholder="请输入法人名称"
  3583. value={this.state.legalPerson}
  3584. style={{ width: '200px' }}
  3585. onChange={(e) => {
  3586. this.setState({ legalPerson: e.target.value })
  3587. }}
  3588. ref="commodityQuantity"
  3589. />
  3590. </FormItem>
  3591. <FormItem
  3592. className="half-item"
  3593. {...formItemLayout}
  3594. label="法人电话"
  3595. >
  3596. <Input
  3597. placeholder="请输入法人电话"
  3598. value={this.state.legalPersonTel}
  3599. style={{ width: '200px' }}
  3600. onChange={(e) => {
  3601. this.setState({ legalPersonTel: e.target.value })
  3602. }}
  3603. ref="commodityQuantity"
  3604. />
  3605. </FormItem>
  3606. <FormItem
  3607. className="half-item"
  3608. {...formItemLayout}
  3609. label="客户联系人"
  3610. >
  3611. <Input
  3612. placeholder="请输入联系人名称"
  3613. value={this.state.contacts}
  3614. style={{ width: '200px' }}
  3615. onChange={(e) => {
  3616. this.setState({ contacts: e.target.value })
  3617. }}
  3618. ref="commodityQuantity"
  3619. />
  3620. </FormItem>
  3621. <FormItem
  3622. className="half-item"
  3623. {...formItemLayout}
  3624. label="联系人电话"
  3625. >
  3626. <Input
  3627. placeholder="请输入联系人电话"
  3628. value={this.state.contactMobile}
  3629. style={{ width: '200px' }}
  3630. onChange={(e) => {
  3631. this.setState({ contactMobile: e.target.value })
  3632. }}
  3633. ref="commodityQuantity"
  3634. />
  3635. </FormItem>
  3636. <FormItem
  3637. className="half-item"
  3638. {...formItemLayout}
  3639. label="企业地址"
  3640. >
  3641. <Cascader
  3642. options={areaSelect()}
  3643. value={this.state.ProvinceCity}
  3644. placeholder="选择城市"
  3645. style={{ width: '200px' }}
  3646. onChange={(e) => {
  3647. this.setState({ ProvinceCity: e })
  3648. }}
  3649. />
  3650. </FormItem>
  3651. <FormItem
  3652. className="half-item"
  3653. {...formItemLayout}
  3654. label=""
  3655. ></FormItem>
  3656. <FormItem
  3657. className="half-item"
  3658. {...formItemLayout}
  3659. label=""
  3660. >
  3661. <Input
  3662. placeholder="请输入详细地址"
  3663. value={this.state.postalAddress}
  3664. style={{ width: '200px', marginLeft: '12em' }}
  3665. onChange={(e) => {
  3666. this.setState({ postalAddress: e.target.value })
  3667. }}
  3668. ref="commodityQuantity"
  3669. />
  3670. </FormItem>
  3671. </div>
  3672. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  3673. <div className="clearfix">
  3674. <h3 className="sub-title">项目信息</h3>
  3675. <FormItem
  3676. className="half-item"
  3677. {...formItemLayout}
  3678. label="项目编号"
  3679. >
  3680. <span>
  3681. {this.state.splitStatus == 2
  3682. ? this.state.splitSuper + '-' + this.state.splitId
  3683. : this.state.id}
  3684. </span>
  3685. </FormItem>
  3686. <FormItem
  3687. className="half-item"
  3688. {...formItemLayout}
  3689. label="项目名称"
  3690. >
  3691. <span>{this.state.taskName}</span>
  3692. </FormItem>
  3693. <FormItem
  3694. className="half-item"
  3695. {...formItemLayout}
  3696. label="项目状态"
  3697. >
  3698. <Select
  3699. placeholder="选择项目状态"
  3700. style={{ width: '200px' }}
  3701. value={this.state.taskStatus}
  3702. onChange={(e) => {
  3703. this.setState({ taskStatus: e })
  3704. }}
  3705. >
  3706. {taskStatus.map(function (item) {
  3707. return (
  3708. <Select.Option key={item.value}>
  3709. {item.key}
  3710. </Select.Option>
  3711. )
  3712. })}
  3713. </Select>
  3714. </FormItem>
  3715. <FormItem
  3716. className="half-item"
  3717. {...formItemLayout}
  3718. label="项目类别"
  3719. >
  3720. <span>{this.state.cname}</span>
  3721. </FormItem>
  3722. <FormItem
  3723. className="half-item"
  3724. {...formItemLayout}
  3725. label="证书编号"
  3726. >
  3727. <Input
  3728. placeholder="请输入证书编号"
  3729. value={this.state.certificateNumber}
  3730. style={{ width: '200px' }}
  3731. onChange={(e) => {
  3732. this.setState({
  3733. certificateNumber: e.target.value,
  3734. })
  3735. }}
  3736. ref="commodityQuantity"
  3737. />
  3738. </FormItem>
  3739. </div>
  3740. <div className="clearfix">
  3741. <h3 className="sub-title">申报系统账户信息</h3>
  3742. {/*<span style={{color:'red'}}>注:仅技术部可见</span>*/}
  3743. <FormItem
  3744. className="half-item"
  3745. {...formItemLayout}
  3746. label="用户名"
  3747. >
  3748. <Input
  3749. placeholder="请输入用户名"
  3750. value={this.state.declareUser}
  3751. style={{ width: '200px' }}
  3752. onChange={(e) => {
  3753. this.setState({ declareUser: e.target.value })
  3754. }}
  3755. />
  3756. </FormItem>
  3757. <FormItem
  3758. className="half-item"
  3759. {...formItemLayout}
  3760. label="密码"
  3761. >
  3762. <Input
  3763. placeholder="请输入密码"
  3764. value={this.state.declarePwd}
  3765. style={{ width: '200px' }}
  3766. onChange={(e) => {
  3767. this.setState({ declarePwd: e.target.value })
  3768. }}
  3769. />
  3770. </FormItem>
  3771. </div>
  3772. <div className="clearfix">
  3773. <h3 className="sub-title">项目申报进度</h3>
  3774. <FormItem
  3775. className="half-item"
  3776. {...formItemLayout}
  3777. label="申报批次"
  3778. >
  3779. <Select
  3780. style={{ width: 200 }}
  3781. placeholder="请选择批次"
  3782. value={
  3783. this.state.declarationBatch
  3784. ? this.state.declarationBatch
  3785. : undefined
  3786. }
  3787. onChange={(e) => {
  3788. this.setState({
  3789. declarationBatch: e,
  3790. })
  3791. }}
  3792. >
  3793. <Option value={1}>第一批</Option>
  3794. <Option value={2}>第二批</Option>
  3795. <Option value={3}>第三批</Option>
  3796. <Option value={4}>第四批</Option>
  3797. </Select>
  3798. </FormItem>
  3799. <FormItem
  3800. className="half-item"
  3801. {...formItemLayout}
  3802. label="启动时间"
  3803. >
  3804. <DatePicker
  3805. style={{
  3806. marginTop: '2px',
  3807. width: '200px',
  3808. height: '32px',
  3809. }}
  3810. showTime
  3811. format="YYYY-MM-DD"
  3812. onOk={() => {}}
  3813. value={
  3814. this.state.startDate
  3815. ? moment(this.state.startDate)
  3816. : null
  3817. }
  3818. onChange={(data, dataString) => {
  3819. this.setState({ startDate: dataString })
  3820. }}
  3821. />
  3822. </FormItem>
  3823. <FormItem
  3824. className="half-item"
  3825. {...formItemLayout}
  3826. label="完成时间"
  3827. >
  3828. <DatePicker
  3829. style={{
  3830. marginTop: '2px',
  3831. width: '200px',
  3832. height: '32px',
  3833. }}
  3834. showTime
  3835. format="YYYY-MM-DD"
  3836. onOk={() => {}}
  3837. value={
  3838. this.state.endDate
  3839. ? moment(this.state.endDate)
  3840. : null
  3841. }
  3842. onChange={(data, dataString) => {
  3843. this.setState({ endDate: dataString })
  3844. }}
  3845. />
  3846. </FormItem>
  3847. <FormItem
  3848. className="half-item"
  3849. {...formItemLayout}
  3850. label="受理时间"
  3851. >
  3852. <DatePicker
  3853. style={{
  3854. marginTop: '2px',
  3855. width: '200px',
  3856. height: '32px',
  3857. }}
  3858. showTime
  3859. format="YYYY-MM-DD"
  3860. onOk={() => {}}
  3861. value={
  3862. this.state.acceptDate
  3863. ? moment(this.state.acceptDate)
  3864. : null
  3865. }
  3866. onChange={(data, dataString) => {
  3867. this.setState({ acceptDate: dataString })
  3868. }}
  3869. />
  3870. </FormItem>
  3871. <FormItem
  3872. className="half-item"
  3873. {...formItemLayout}
  3874. label="评审时间"
  3875. >
  3876. <DatePicker
  3877. style={{
  3878. marginTop: '2px',
  3879. width: '200px',
  3880. height: '32px',
  3881. }}
  3882. showTime
  3883. format="YYYY-MM-DD"
  3884. onOk={() => {}}
  3885. value={
  3886. this.state.reviewDate
  3887. ? moment(this.state.reviewDate)
  3888. : null
  3889. }
  3890. onChange={(data, dataString) => {
  3891. this.setState({ reviewDate: dataString })
  3892. }}
  3893. />
  3894. </FormItem>
  3895. <FormItem
  3896. className="half-item"
  3897. {...formItemLayout}
  3898. label="公示时间"
  3899. >
  3900. <DatePicker
  3901. style={{
  3902. marginTop: '2px',
  3903. width: '200px',
  3904. height: '32px',
  3905. }}
  3906. showTime
  3907. format="YYYY-MM-DD"
  3908. onOk={() => {}}
  3909. value={
  3910. this.state.publicityDate
  3911. ? moment(this.state.publicityDate)
  3912. : null
  3913. }
  3914. onChange={(data, dataString) => {
  3915. this.setState({ publicityDate: dataString })
  3916. }}
  3917. />
  3918. </FormItem>
  3919. <FormItem
  3920. className="half-item"
  3921. {...formItemLayout}
  3922. label="发证时间"
  3923. >
  3924. <DatePicker
  3925. style={{
  3926. marginTop: '2px',
  3927. width: '200px',
  3928. height: '32px',
  3929. }}
  3930. showTime
  3931. format="YYYY-MM-DD"
  3932. onOk={() => {}}
  3933. value={
  3934. this.state.licenceDate
  3935. ? moment(this.state.licenceDate)
  3936. : null
  3937. }
  3938. onChange={(data, dataString) => {
  3939. this.setState({ licenceDate: dataString })
  3940. }}
  3941. />
  3942. </FormItem>
  3943. <FormItem
  3944. className="half-item"
  3945. {...formItemLayout}
  3946. label="立项金额(万元)"
  3947. >
  3948. <Input
  3949. placeholder="请输入立项金额"
  3950. value={this.state.setUpAmount}
  3951. style={{ width: '200px' }}
  3952. onChange={(e) => {
  3953. this.setState({ setUpAmount: e.target.value })
  3954. }}
  3955. ref="commodityQuantity"
  3956. />
  3957. </FormItem>
  3958. <FormItem
  3959. className="half-item"
  3960. {...formItemLayout}
  3961. label="是否到款"
  3962. >
  3963. <Radio.Group
  3964. value={this.state.arrivalMoney}
  3965. onChange={(e) => {
  3966. this.setState({ arrivalMoney: e.target.value })
  3967. }}
  3968. >
  3969. <Radio value={0}>未到企业</Radio>
  3970. <Radio value={1}>已到企业</Radio>
  3971. </Radio.Group>
  3972. </FormItem>
  3973. </div>
  3974. <div className="clearfix">
  3975. <FormItem
  3976. labelCol={{ span: 3 }}
  3977. wrapperCol={{ span: 16 }}
  3978. label="附件"
  3979. >
  3980. <Picture
  3981. fileList={(e) => {
  3982. this.setState({ attachmentUrl: e })
  3983. }}
  3984. pictureUrl={this.state.attachmentUrl}
  3985. visible={this.props.visible}
  3986. data={{
  3987. sign: 'order_task_file',
  3988. url: '/api/admin/orderProject/uploadOrderTaskFile',
  3989. number: 8,
  3990. }}
  3991. />
  3992. </FormItem>
  3993. </div>
  3994. <div className="clearfix">
  3995. <FormItem
  3996. labelCol={{ span: 3 }}
  3997. wrapperCol={{ span: 16 }}
  3998. label="备注"
  3999. >
  4000. <Input
  4001. type="textarea"
  4002. placeholder="请输入备注"
  4003. rows={4}
  4004. value={this.state.taskComment}
  4005. onChange={(e) => {
  4006. this.setState({ taskComment: e.target.value })
  4007. }}
  4008. />
  4009. </FormItem>
  4010. </div>
  4011. <div>
  4012. <h3 className="sub-title">项目业务</h3>
  4013. {this.state.processStatus == 0 ? (
  4014. <Button
  4015. type="primary"
  4016. onClick={this.addDetailed}
  4017. style={{
  4018. float: 'right',
  4019. marginRight: '50px',
  4020. marginBottom: '15px',
  4021. }}
  4022. >
  4023. 添加项目明细
  4024. </Button>
  4025. ) : (
  4026. ''
  4027. )}
  4028. </div>
  4029. <div className="patent-table">
  4030. <Spin spinning={this.state.loading}>
  4031. <Table
  4032. columns={this.state.columnsX}
  4033. dataSource={this.state.dataSourceX}
  4034. pagination={this.state.paginations}
  4035. onRowClick={this.tableRowClickX}
  4036. bordered
  4037. size="small"
  4038. />
  4039. </Spin>
  4040. </div>
  4041. <div className="clearfix">
  4042. <Button
  4043. className="cancel"
  4044. type="primary"
  4045. // onClick={this.tijiaoOk}
  4046. onClick={() => {
  4047. let num = this.state.projectStatus
  4048. if (
  4049. num != 0 &&
  4050. num != 10 &&
  4051. num != 11 &&
  4052. num != 12 &&
  4053. num != 2 &&
  4054. num != 5 &&
  4055. num != 6
  4056. ) {
  4057. this.showDeleteConfirm(num, this.tijiaoOk)
  4058. } else {
  4059. this.tijiaoOk()
  4060. }
  4061. }}
  4062. style={{ marginLeft: '200px', marginTop: '10px' }}
  4063. htmlType="submit"
  4064. >
  4065. 保存
  4066. </Button>
  4067. <Button
  4068. className="cancel"
  4069. type="ghost"
  4070. onClick={this.visitCancel}
  4071. style={{ marginLeft: '50px', marginTop: '10px' }}
  4072. >
  4073. 取消
  4074. </Button>
  4075. </div>
  4076. </div>
  4077. </Spin>
  4078. </Form>
  4079. </TabPane>
  4080. <TabPane tab="外包/供应商信息" key="2">
  4081. {this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
  4082. <div style={{ marginTop: 10 }}>
  4083. <div className="clearfix">
  4084. <FormItem
  4085. className="half-item"
  4086. {...formItemLayout}
  4087. label={
  4088. <span>
  4089. <strong style={{ color: '#f00' }}>*</strong>
  4090. 类型
  4091. </span>
  4092. }
  4093. >
  4094. <Radio.Group
  4095. value={this.state.startType}
  4096. onChange={(e) => {
  4097. this.setState({ startType: e.target.value })
  4098. }}
  4099. >
  4100. <Radio value={0}>外包(不走总部)</Radio>
  4101. <Radio value={1}>供应商信息</Radio>
  4102. </Radio.Group>
  4103. </FormItem>
  4104. </div>
  4105. {/* 专利类型 */}
  4106. <div
  4107. className="clearfix"
  4108. style={{
  4109. display: this.state.projectType === 1 ? 'block' : 'none',
  4110. }}
  4111. >
  4112. <FormItem
  4113. className="half-item"
  4114. {...formItemLayout}
  4115. label={
  4116. <span>
  4117. <strong style={{ color: '#f00' }}>*</strong>
  4118. 专利类型
  4119. </span>
  4120. }
  4121. >
  4122. <Radio.Group
  4123. value={this.state.patentType}
  4124. onChange={(e) => {
  4125. let _this = this;
  4126. if(this.state.thirdInfoList.length >0){
  4127. confirm({
  4128. title: '确定要切换吗?',
  4129. content: '切换将删除所有第三信息和付款节点',
  4130. onOk() {
  4131. return new Promise((resolve, reject) => {
  4132. _this.setState({ patentType: e.target.value },()=>{
  4133. _this.projectTypeTabContent(_this.state.projectType);
  4134. })
  4135. _this.confirmDeletNew(-1,resolve,reject)
  4136. if(_this.state.payNodeList.length > 0){
  4137. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4138. }
  4139. }).catch(() => console.log('Oops errors!'));
  4140. },
  4141. onCancel() {},
  4142. });
  4143. }else{
  4144. this.setState({ patentType: e.target.value },()=>{
  4145. this.projectTypeTabContent(this.state.projectType);
  4146. })
  4147. }
  4148. }}
  4149. >
  4150. <Radio value={0}>专利申请/变更/转让</Radio>
  4151. <Radio value={1}>专利买卖</Radio>
  4152. </Radio.Group>
  4153. </FormItem>
  4154. </div>
  4155. <div
  4156. className="clearfix"
  4157. style={{
  4158. display: this.state.projectType === 1? 'block' : 'none',
  4159. }}
  4160. >
  4161. <FormItem
  4162. className="half-item"
  4163. {...formItemLayout}
  4164. label={
  4165. <span>
  4166. <strong style={{ color: '#f00' }}>*</strong>
  4167. 专利名称
  4168. </span>
  4169. }
  4170. >
  4171. <Radio.Group
  4172. value={this.state.patentNameType}
  4173. onChange={(e) => {
  4174. let _this = this;
  4175. if(this.state.thirdInfoList.length >0){
  4176. confirm({
  4177. title: '确定要切换吗?',
  4178. content: '切换将删除所有第三信息和付款节点',
  4179. onOk() {
  4180. return new Promise((resolve, reject) => {
  4181. _this.setState({ patentNameType: e.target.value },()=>{
  4182. _this.projectTypeTabContent(_this.state.projectType);
  4183. })
  4184. _this.confirmDeletNew(-1,resolve,reject)
  4185. if(_this.state.payNodeList.length > 0){
  4186. _this.payNodeConfirmDeletNew(-1,resolve,reject);
  4187. }
  4188. }).catch(() => console.log('Oops errors!'));
  4189. },
  4190. onCancel() {},
  4191. });
  4192. }else{
  4193. this.setState({ patentNameType: e.target.value },()=>{
  4194. this.projectTypeTabContent(this.state.projectType);
  4195. })
  4196. }
  4197. }}
  4198. >
  4199. <Radio value={0}>实用新型专利</Radio>
  4200. <Radio value={1}>发明专利</Radio>
  4201. <Radio value={2}>外观专利</Radio>
  4202. {/*<Radio value={3}>*/}
  4203. {/* 其他*/}
  4204. {/* <Input*/}
  4205. {/* disabled={this.state.patentNameType !== 3}*/}
  4206. {/* value={this.state.patentName}*/}
  4207. {/* style={{ marginLeft: '15px' }}*/}
  4208. {/* onChange={(e) => {*/}
  4209. {/* this.setState({*/}
  4210. {/* patentName: e.target.value,*/}
  4211. {/* })*/}
  4212. {/* }}*/}
  4213. {/* placeholder="请填写专利名称"*/}
  4214. {/* />*/}
  4215. {/*</Radio>*/}
  4216. </Radio.Group>
  4217. </FormItem>
  4218. </div>
  4219. {/* 第三方信息专利 */}
  4220. <div
  4221. style={{
  4222. // display: this.state.type == 1 ? "block" : "none",
  4223. display: this.state.type == 1 ? 'block' : 'block',
  4224. }}
  4225. >
  4226. <span
  4227. style={{
  4228. marginLeft: '50px',
  4229. fontSize: '18px',
  4230. }}
  4231. >
  4232. 第三方信息
  4233. </span>
  4234. <span
  4235. style={{
  4236. display: 'inline-block',
  4237. marginLeft: 10,
  4238. color: 'red',
  4239. }}
  4240. >
  4241. 金额总计(万元): {this.state.allTotalAmount}
  4242. </span>
  4243. <Button
  4244. type="primary"
  4245. onClick={(e) => {
  4246. if(this.state.projectType === 1 && this.state.patentType === -1){
  4247. message.info('请先选择专利类型');
  4248. }else if(this.state.projectType === 1 && this.state.patentNameType === -1){
  4249. message.info('请先选择专利名称');
  4250. }
  4251. else{
  4252. this.addThirdList()
  4253. }
  4254. }}
  4255. style={{
  4256. float: 'right',
  4257. marginRight: '50px',
  4258. marginBottom: '15px',
  4259. }}
  4260. >
  4261. +新增供应商名称
  4262. </Button>
  4263. </div>
  4264. <div
  4265. className="clearfix"
  4266. style={{
  4267. // display: this.state.type == 1 ? "block" : "none",
  4268. display: this.state.type == 1 ? 'block' : 'block',
  4269. }}
  4270. >
  4271. <Spin spinning={this.state.loading}>
  4272. <Form layout="horizontal">
  4273. <Table
  4274. pagination={false}
  4275. columns={this.state.ContactsListsNew}
  4276. dataSource={this.state.thirdInfoList}
  4277. onRowClick={this.tableRowClickOne}
  4278. scroll={{ x: 'max-content', y: 0 }}
  4279. bordered
  4280. size="small"
  4281. />
  4282. <Col
  4283. span={24}
  4284. offset={9}
  4285. style={{ marginTop: '15px' }}
  4286. ></Col>
  4287. </Form>
  4288. </Spin>
  4289. </div>
  4290. <div
  4291. style={{
  4292. // display: this.state.type == 1 ? "block" : "none",
  4293. display: this.state.type == 1 ? 'block' : 'block',
  4294. }}
  4295. >
  4296. <span
  4297. style={{
  4298. marginLeft: '50px',
  4299. fontSize: '18px',
  4300. }}
  4301. >
  4302. 付款节点
  4303. </span>
  4304. <span
  4305. style={{
  4306. display: 'inline-block',
  4307. marginLeft: 10,
  4308. color: 'red',
  4309. }}
  4310. ></span>
  4311. <Button
  4312. type="primary"
  4313. onClick={(e) => {
  4314. this.addPayNode()
  4315. }}
  4316. style={{
  4317. float: 'right',
  4318. marginRight: '50px',
  4319. marginBottom: '15px',
  4320. }}
  4321. >
  4322. +新增付款节点
  4323. </Button>
  4324. </div>
  4325. <div
  4326. className="clearfix"
  4327. style={{
  4328. // display: this.state.type == 1 ? "block" : "none",
  4329. display: this.state.type == 1 ? 'block' : 'block',
  4330. }}
  4331. >
  4332. <Spin spinning={this.state.loading}>
  4333. <Form layout="horizontal">
  4334. <Table
  4335. pagination={false}
  4336. columns={this.state.PayNodeTableColunms}
  4337. dataSource={this.state.payNodeList}
  4338. onRowClick={this.payNodeTableRowClickOne}
  4339. scroll={{ x: 'max-content', y: 0 }}
  4340. bordered
  4341. size="small"
  4342. />
  4343. <Col
  4344. span={24}
  4345. offset={9}
  4346. style={{ marginTop: '15px' }}
  4347. ></Col>
  4348. </Form>
  4349. </Spin>
  4350. </div>
  4351. <div className="clearfix">
  4352. <FormItem
  4353. className="half-item"
  4354. {...formItemLayout}
  4355. label={
  4356. <span>
  4357. <strong style={{ color: '#f00' }}>*</strong>备注
  4358. </span>
  4359. }
  4360. >
  4361. <TextArea
  4362. rows={4}
  4363. value={this.state.outsourceRemarks}
  4364. onChange={(e) => {
  4365. this.setState({
  4366. outsourceRemarks: e.target.value,
  4367. })
  4368. }}
  4369. placeholder="请输入备注"
  4370. />
  4371. </FormItem>
  4372. </div>
  4373. {/*<div className="clearfix">
  4374. <FormItem className="half-item"
  4375. {...formItemLayout}
  4376. label="上传协议文件" style={{height:"auto"}}>
  4377. <Upload header={{authorization: 'authorization-text'}} action={globalConfig.context + "/api/admin/outsourceOrg/uploadOutsourceFile"}
  4378. data={(e)=>{
  4379. return {
  4380. 'sign': e.name.substring(0,e.name.lastIndexOf("."))
  4381. }
  4382. }}
  4383. fileList={this.state.fileUrl}
  4384. onChange={(e)=>{
  4385. this.setState({
  4386. attachmentUrl:e.fileList,
  4387. fileUrl:e.fileList
  4388. })
  4389. }}>
  4390. {fileUrl.length>1?null:<Button>
  4391. <Icon type="upload" /> 点击上传
  4392. </Button>}
  4393. </Upload>
  4394. <span className="tip" style={{display:"inline-block"}}>支持文件格式: doc,excel,ppt</span>
  4395. </FormItem>
  4396. </div>*/}
  4397. <p
  4398. className="tip"
  4399. style={{
  4400. paddingBottom: '12px',
  4401. width: '240px',
  4402. marginLeft: '145px',
  4403. color: 'red',
  4404. }}
  4405. >
  4406. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  4407. </p>
  4408. <div className="clearfix">
  4409. <FormItem
  4410. labelCol={{ span: 4 }}
  4411. wrapperCol={{ span: 18 }}
  4412. label={
  4413. <span>
  4414. 合同/协议扫描件
  4415. </span>
  4416. }
  4417. >
  4418. <PicturesWall
  4419. fileList={this.getOrgCodeUrlWai}
  4420. pictureUrl={this.state.pictureUrl}
  4421. />
  4422. <p style={{ color: 'red' }}>图片建议:要清晰。</p>
  4423. </FormItem>
  4424. </div>
  4425. <div className="clearfix">
  4426. <div
  4427. style={{
  4428. display: 'inline-black',
  4429. textAlign: 'center',
  4430. }}
  4431. >
  4432. <Button
  4433. type="primary"
  4434. loading={this.state.loading}
  4435. onClick={()=>{
  4436. this.sureOut(this.state.startType);
  4437. }}
  4438. >
  4439. {
  4440. this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
  4441. }
  4442. </Button>
  4443. <p className="tip" style={{ color: 'red' }}>
  4444. {
  4445. this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
  4446. }
  4447. </p>
  4448. </div>
  4449. </div>
  4450. </div>
  4451. ) : (
  4452. <div>
  4453. {
  4454. this.state.visible && this.state.activeKey === '2' ?
  4455. <CheckProject
  4456. {...this.props}
  4457. tid={this.state.tid}
  4458. projectType={this.state.projectType} //0正常 1专利 2软著 3审计
  4459. patentNameType={this.state.patentNameType}
  4460. patentName={this.state.patentName}
  4461. patentType={this.state.patentType}
  4462. status={this.state.refundStatus}
  4463. isPreviewPay={true}
  4464. thirdInfoList={this.state.thirdInfoList}
  4465. dataSource={this.state.payNodeList}
  4466. outsourceRemarks={this.state.outsourceRemarks}
  4467. fileList={this.state.pictureUrl}
  4468. startType={this.state.startType}
  4469. projectStatus={this.state.projectStatus}
  4470. onRefresh={()=>{
  4471. this.waiDetail();
  4472. this.thirdTable(this.state.tid);
  4473. this.payNodeTable(this.state.tid)
  4474. this.loadData(this.state.page)
  4475. }}
  4476. /> : <div/>
  4477. }
  4478. </div>
  4479. )}
  4480. {(this.state.refundStatus == 1 ||
  4481. this.state.refundStatus == 0 ||
  4482. this.state.refundStatus == 2) && this.state.startType !== 1 ? (
  4483. <div className="clearfix">
  4484. <hr className="division" />
  4485. <div
  4486. className="clearfix"
  4487. style={{
  4488. display: this.state.refundStatus == 0 ? 'none' : 'block',
  4489. }}
  4490. >
  4491. <FormItem
  4492. className="half-item"
  4493. {...formItemLayout}
  4494. label="审核意见"
  4495. >
  4496. <span>{this.state.remarks}</span>
  4497. </FormItem>
  4498. </div>
  4499. {parseInt(this.state.startType) !== 1 ?<div className="clearfix">
  4500. <FormItem
  4501. className="half-item"
  4502. {...formItemLayout}
  4503. label="审核结果"
  4504. >
  4505. <span>{getRefundStatus(this.state.refundStatus)}</span>
  4506. </FormItem>
  4507. </div> : <div/>}
  4508. <div
  4509. className="clearfix"
  4510. style={{
  4511. display: this.state.refundStatus == 0 ? 'none' : 'block',
  4512. }}
  4513. >
  4514. <FormItem
  4515. className="half-item"
  4516. {...formItemLayout}
  4517. label="审核时间"
  4518. >
  4519. <span>{this.state.auditTimes}</span>
  4520. </FormItem>
  4521. </div>
  4522. </div>
  4523. ) : (
  4524. ''
  4525. )}
  4526. </TabPane>
  4527. {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
  4528. <TabPane tab="订单详情" key="3">
  4529. <Spin spinning={this.state.loading}>
  4530. <OrderDetail
  4531. orderData={this.state.orderData}
  4532. getOrderLog={this.getOrderLog}
  4533. dataSourceX={this.state.dataSourceX}
  4534. contactList={this.state.jiedian}
  4535. orderNo={this.state.orderNo}
  4536. totalCui={this.state.totalCui}
  4537. contactListNew={this.state.jiedianNew}
  4538. pictureUrl={this.state.contractPictureUrl}
  4539. />
  4540. </Spin>
  4541. </TabPane>
  4542. ) : (
  4543. ''
  4544. )}
  4545. </Tabs>
  4546. </Modal> : <div/>}
  4547. <Modal
  4548. maskClosable={false}
  4549. visible={this.state.lookVisible}
  4550. onOk={this.noCancel}
  4551. onCancel={this.noCancel}
  4552. width="500px"
  4553. title={'添加工时'}
  4554. footer=""
  4555. className="admin-desc-content"
  4556. >
  4557. <Form layout="horizontal" id="demand-form">
  4558. <Spin spinning={this.state.loading}>
  4559. <div className="clearfix">
  4560. <FormItem {...formItemLayout} label="工作日期">
  4561. <DatePicker
  4562. style={{ marginTop: '2px', width: '200px', height: '32px' }}
  4563. showTime
  4564. format="YYYY-MM-DD"
  4565. onOk={() => {}}
  4566. value={
  4567. this.state.taskDate ? moment(this.state.taskDate) : null
  4568. }
  4569. onChange={(data, dataString) => {
  4570. this.setState({ taskDate: dataString })
  4571. }}
  4572. />
  4573. </FormItem>
  4574. </div>
  4575. <div className="clearfix">
  4576. <FormItem {...formItemLayout} label="工作时长">
  4577. <Input
  4578. placeholder="请输入工作时长"
  4579. value={this.state.hours}
  4580. style={{ width: '200px' }}
  4581. onChange={(e) => {
  4582. this.setState({ hours: e.target.value })
  4583. }}
  4584. ref="commodityQuantity"
  4585. />
  4586. </FormItem>
  4587. </div>
  4588. <div className="clearfix">
  4589. <FormItem {...formItemLayout} label="工作内容">
  4590. <Input
  4591. type="textarea"
  4592. placeholder="请输入备注"
  4593. rows={4}
  4594. value={this.state.remarks}
  4595. onChange={(e) => {
  4596. this.setState({ remarks: e.target.value })
  4597. }}
  4598. />
  4599. </FormItem>
  4600. </div>
  4601. <div className="clearfix">
  4602. <Button
  4603. className="cancel"
  4604. type="primary"
  4605. onClick={this.tianjiaOk}
  4606. style={{ marginLeft: '100px' }}
  4607. htmlType="submit"
  4608. >
  4609. 确定
  4610. </Button>
  4611. <Button
  4612. className="cancel"
  4613. type="ghost"
  4614. onClick={this.noCancel}
  4615. style={{ marginLeft: '50px' }}
  4616. >
  4617. 取消
  4618. </Button>
  4619. </div>
  4620. </Spin>
  4621. </Form>
  4622. </Modal>
  4623. {this.state.addnextVisible ? <Modal
  4624. maskClosable={false}
  4625. visible={this.state.addnextVisible}
  4626. onOk={this.nextCancel}
  4627. onCancel={this.nextCancel}
  4628. width="800px"
  4629. title="项目详情"
  4630. footer=""
  4631. className="admin-desc-content"
  4632. >
  4633. <Form layout="horizontal" onSubmit={this.nextSubmit} id="demand-form">
  4634. <Spin spinning={this.state.loading}>
  4635. <div className="clearfix">
  4636. <FormItem
  4637. className="half-item"
  4638. {...formItemLayout}
  4639. label="项目名称"
  4640. >
  4641. <span>{this.state.commodityName}</span>
  4642. </FormItem>
  4643. <FormItem
  4644. className="half-item"
  4645. {...formItemLayout}
  4646. label="项目数量"
  4647. >
  4648. <span>{this.state.commodityQuantity}</span>
  4649. </FormItem>
  4650. <FormItem
  4651. className="half-item"
  4652. {...formItemLayout}
  4653. label="官费"
  4654. style={{ display: this.state.displayFees }}
  4655. >
  4656. <span>
  4657. {this.state.officialCost == 0 ? '无官费' : '有官费'}
  4658. </span>
  4659. </FormItem>
  4660. <FormItem
  4661. className="half-item"
  4662. {...formItemLayout}
  4663. label="费减"
  4664. style={{ display: this.state.displayFees }}
  4665. >
  4666. <span>
  4667. {this.state.costReduction == 0 ? '无费减' : '有费减'}
  4668. </span>
  4669. </FormItem>
  4670. <FormItem
  4671. className="half-item"
  4672. {...formItemLayout}
  4673. label="金额(万元)"
  4674. >
  4675. <span>{this.state.commodityPrice ? '***' : 0}</span>
  4676. </FormItem>
  4677. <FormItem
  4678. className="half-item"
  4679. {...formItemLayout}
  4680. label="主要项目"
  4681. >
  4682. <span>{getboutique(this.state.main)}</span>
  4683. </FormItem>
  4684. <div className="clearfix">
  4685. <FormItem
  4686. labelCol={{ span: 3 }}
  4687. wrapperCol={{ span: 18 }}
  4688. label="服务说明"
  4689. >
  4690. <span>{this.state.taskComment}</span>
  4691. </FormItem>
  4692. </div>
  4693. </div>
  4694. </Spin>
  4695. </Form>
  4696. </Modal> : <div/>}
  4697. <Modal
  4698. maskClosable={false}
  4699. visible={this.state.speVisible}
  4700. onOk={this.visitOk}
  4701. onCancel={this.visitCancel}
  4702. width="900px"
  4703. title=""
  4704. footer=""
  4705. className="admin-desc-content"
  4706. >
  4707. <Tabs activeKey={this.state.activeKey} onChange={this.orderChange}>
  4708. <TabPane tab="项目概况" key="1">
  4709. <div className="clearfix">
  4710. <FormItem
  4711. className="half-item"
  4712. {...formItemLayout}
  4713. label="当前项目情况"
  4714. >
  4715. <Radio.Group
  4716. value={this.state.status}
  4717. onChange={(e) => {
  4718. this.setState({ status: e.target.value })
  4719. }}
  4720. >
  4721. <Radio value={0}>开启</Radio>
  4722. <Radio value={1}>暂停</Radio>
  4723. </Radio.Group>
  4724. <Button
  4725. type="primary"
  4726. size="small"
  4727. style={{ marginTop: '5px', position: 'absolute' }}
  4728. onClick={this.caozuorizhi}
  4729. >
  4730. 操作日志
  4731. </Button>
  4732. </FormItem>
  4733. <FormItem
  4734. className="half-item"
  4735. {...formItemLayout}
  4736. label="合同编号"
  4737. >
  4738. <span>{this.state.contractNo}</span>
  4739. </FormItem>
  4740. </div>
  4741. <div className="clearfix">
  4742. <FormItem
  4743. className="half-item"
  4744. {...formItemLayout}
  4745. label="项目状态"
  4746. >
  4747. <Select
  4748. placeholder="选择项目状态"
  4749. style={{ width: '200px' }}
  4750. value={this.state.projectStatus}
  4751. onChange={(e) => {
  4752. this.setState({ projectStatus: e })
  4753. }}
  4754. >
  4755. {projectStatus.map(function (item) {
  4756. return (
  4757. <Select.Option key={item.value}>
  4758. {item.key}
  4759. </Select.Option>
  4760. )
  4761. })}
  4762. </Select>
  4763. </FormItem>
  4764. <FormItem
  4765. className="half-item"
  4766. {...formItemLayout}
  4767. label="是否特批"
  4768. >
  4769. <span>{getApproval(this.state.approval)}</span>
  4770. </FormItem>
  4771. <FormItem
  4772. className="half-item"
  4773. {...formItemLayout}
  4774. label="结算状态"
  4775. >
  4776. <span>
  4777. {getLiquidationStatus(this.state.liquidationStatus)}
  4778. </span>
  4779. </FormItem>
  4780. <FormItem
  4781. className="half-item"
  4782. {...formItemLayout}
  4783. label="流程状态"
  4784. >
  4785. <span>{getProcessStatus(this.state.processStatus)}</span>
  4786. </FormItem>
  4787. <FormItem
  4788. className="half-item"
  4789. {...formItemLayout}
  4790. label="订单编号"
  4791. >
  4792. <span>{this.state.orderNo}</span>
  4793. </FormItem>
  4794. </div>
  4795. <div className="clearfix">
  4796. <FormItem
  4797. className="half-item"
  4798. {...formItemLayout}
  4799. label="满意度表格"
  4800. >
  4801. <Radio.Group
  4802. value={this.state.formRetrieve}
  4803. onChange={(e) => {
  4804. this.setState({ formRetrieve: e.target.value })
  4805. }}
  4806. >
  4807. <Radio value={0}>未收回</Radio>
  4808. <Radio value={1}>已收回</Radio>
  4809. <Radio value={2}>其他</Radio>
  4810. </Radio.Group>
  4811. </FormItem>
  4812. <FormItem
  4813. className="half-item"
  4814. {...formItemLayout}
  4815. label="退单"
  4816. >
  4817. <Radio.Group
  4818. value={this.state.taskRefund}
  4819. onChange={(e) => {
  4820. this.setState({ taskRefund: e.target.value })
  4821. }}
  4822. >
  4823. <Radio value={0}>已完成</Radio>
  4824. <Radio value={1}>未完成</Radio>
  4825. <Radio value={2}>其他</Radio>
  4826. </Radio.Group>
  4827. </FormItem>
  4828. </div>
  4829. <div className="clearfix">
  4830. {
  4831. <FormItem
  4832. className="half-item"
  4833. {...formItemLayout}
  4834. label="(满意度)备注"
  4835. >
  4836. <Input
  4837. type="textarea"
  4838. placeholder="请输入备注"
  4839. rows={2}
  4840. value={this.state.retrieveContent}
  4841. onChange={(e) => {
  4842. this.setState({ retrieveContent: e.target.value })
  4843. }}
  4844. />
  4845. </FormItem>
  4846. }
  4847. {
  4848. <FormItem
  4849. className="half-item"
  4850. {...formItemLayout}
  4851. label="(退单)备注"
  4852. >
  4853. <Input
  4854. type="textarea"
  4855. placeholder="请输入备注"
  4856. rows={2}
  4857. value={this.state.refundContent}
  4858. onChange={(e) => {
  4859. this.setState({ refundContent: e.target.value })
  4860. }}
  4861. />
  4862. </FormItem>
  4863. }
  4864. </div>
  4865. <div className="clearfix">
  4866. <h3 className="sub-title">订单负责人信息</h3>
  4867. <FormItem
  4868. className="half-item"
  4869. {...formItemLayout}
  4870. label="负责人"
  4871. >
  4872. <span>
  4873. {this.state.salesmanName + '(' + this.state.depName + ')'}
  4874. </span>
  4875. </FormItem>
  4876. <FormItem
  4877. className="half-item"
  4878. {...formItemLayout}
  4879. label="负责人电话"
  4880. >
  4881. <span>{this.state.salesmanMobile}</span>
  4882. </FormItem>
  4883. <FormItem
  4884. className="half-item"
  4885. {...formItemLayout}
  4886. label="当前财务负责人"
  4887. >
  4888. <span>{this.state.nowFinance}</span>
  4889. </FormItem>
  4890. <FormItem
  4891. className="half-item"
  4892. {...formItemLayout}
  4893. label="当前财务负责人电话"
  4894. >
  4895. <span>{this.state.nowFinanceMobile}</span>
  4896. </FormItem>
  4897. <FormItem
  4898. className="half-item"
  4899. {...formItemLayout}
  4900. style={{ opacity: '.5' }}
  4901. label="原负责人"
  4902. >
  4903. <span>{this.state.oldSalesmanName}</span>
  4904. </FormItem>
  4905. <FormItem
  4906. className="half-item"
  4907. {...formItemLayout}
  4908. style={{ opacity: '.5' }}
  4909. label="原负责人电话"
  4910. >
  4911. <span>{this.state.oldSalesmanMobile}</span>
  4912. </FormItem>
  4913. <FormItem
  4914. className="half-item"
  4915. {...formItemLayout}
  4916. style={{ opacity: '.5' }}
  4917. label="实际财务操作人"
  4918. >
  4919. <span>{this.state.financeName}</span>
  4920. </FormItem>
  4921. <FormItem
  4922. className="half-item"
  4923. {...formItemLayout}
  4924. style={{ opacity: '.5' }}
  4925. label="实际财务操作人电话"
  4926. >
  4927. <span>{this.state.financeMobile}</span>
  4928. </FormItem>
  4929. <FormItem
  4930. className="half-item"
  4931. {...formItemLayout}
  4932. label="订单留言"
  4933. >
  4934. <span>{this.state.orderRemarks}</span>
  4935. </FormItem>
  4936. <FormItem className="half-item" {...formItemLayout} label="">
  4937. <Button onClick={this.getOrderLog}>查看订单日志</Button>
  4938. </FormItem>
  4939. <OrderRiZi
  4940. dataSourcerizhi={this.state.dataSourceY}
  4941. closeOrderLog={this.closeOrderLog}
  4942. visible={this.state.avisible}
  4943. loading={this.state.loading}
  4944. />
  4945. </div>
  4946. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  4947. <div className="clearfix">
  4948. <h3 className="sub-title">联系信息</h3>
  4949. <FormItem
  4950. className="half-item"
  4951. {...formItemLayout}
  4952. label="客户名称"
  4953. >
  4954. <span>{this.state.userName}</span>
  4955. </FormItem>
  4956. <FormItem
  4957. className="half-item"
  4958. {...formItemLayout}
  4959. label="企业法人"
  4960. >
  4961. <Input
  4962. placeholder="请输入法人名称"
  4963. value={this.state.legalPerson}
  4964. style={{ width: '200px' }}
  4965. onChange={(e) => {
  4966. this.setState({ legalPerson: e.target.value })
  4967. }}
  4968. ref="commodityQuantity"
  4969. />
  4970. </FormItem>
  4971. <FormItem
  4972. className="half-item"
  4973. {...formItemLayout}
  4974. label="法人电话"
  4975. >
  4976. <Input
  4977. placeholder="请输入法人电话"
  4978. value={this.state.legalPersonTel}
  4979. style={{ width: '200px' }}
  4980. onChange={(e) => {
  4981. this.setState({ legalPersonTel: e.target.value })
  4982. }}
  4983. ref="commodityQuantity"
  4984. />
  4985. </FormItem>
  4986. <FormItem
  4987. className="half-item"
  4988. {...formItemLayout}
  4989. label="客户联系人"
  4990. >
  4991. <Input
  4992. placeholder="请输入联系人名称"
  4993. value={this.state.contacts}
  4994. style={{ width: '200px' }}
  4995. onChange={(e) => {
  4996. this.setState({ contacts: e.target.value })
  4997. }}
  4998. ref="commodityQuantity"
  4999. />
  5000. </FormItem>
  5001. <FormItem
  5002. className="half-item"
  5003. {...formItemLayout}
  5004. label="联系人电话"
  5005. >
  5006. <Input
  5007. placeholder="请输入联系人电话"
  5008. value={this.state.contactMobile}
  5009. style={{ width: '200px' }}
  5010. onChange={(e) => {
  5011. this.setState({ contactMobile: e.target.value })
  5012. }}
  5013. ref="commodityQuantity"
  5014. />
  5015. </FormItem>
  5016. <FormItem
  5017. className="half-item"
  5018. {...formItemLayout}
  5019. label="企业地址"
  5020. >
  5021. <Cascader
  5022. options={areaSelect()}
  5023. value={this.state.ProvinceCity}
  5024. placeholder="选择城市"
  5025. style={{ width: '200px' }}
  5026. onChange={(e) => {
  5027. this.setState({ ProvinceCity: e })
  5028. }}
  5029. />
  5030. </FormItem>
  5031. <FormItem
  5032. className="half-item"
  5033. {...formItemLayout}
  5034. label=""
  5035. ></FormItem>
  5036. <FormItem className="half-item" {...formItemLayout} label="">
  5037. <Input
  5038. placeholder="请输入详细地址"
  5039. value={this.state.postalAddress}
  5040. style={{ width: '200px', marginLeft: '12em' }}
  5041. onChange={(e) => {
  5042. this.setState({ postalAddress: e.target.value })
  5043. }}
  5044. ref="commodityQuantity"
  5045. />
  5046. </FormItem>
  5047. </div>
  5048. {/*<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>*/}
  5049. <div className="clearfix">
  5050. <h3 className="sub-title">项目信息</h3>
  5051. <FormItem
  5052. className="half-item"
  5053. {...formItemLayout}
  5054. label="项目编号"
  5055. >
  5056. <span>
  5057. {this.state.splitStatus == 2
  5058. ? this.state.splitSuper + '-' + this.state.splitId
  5059. : this.state.id}
  5060. </span>
  5061. </FormItem>
  5062. <FormItem
  5063. className="half-item"
  5064. {...formItemLayout}
  5065. label="项目名称"
  5066. >
  5067. <span>{this.state.taskName}</span>
  5068. </FormItem>
  5069. <FormItem
  5070. className="half-item"
  5071. {...formItemLayout}
  5072. label="项目状态"
  5073. >
  5074. <Select
  5075. placeholder="选择项目状态"
  5076. style={{ width: '200px' }}
  5077. value={this.state.taskStatus}
  5078. onChange={(e) => {
  5079. this.setState({ taskStatus: e })
  5080. }}
  5081. >
  5082. {taskStatus.map(function (item) {
  5083. return (
  5084. <Select.Option key={item.value}>
  5085. {item.key}
  5086. </Select.Option>
  5087. )
  5088. })}
  5089. </Select>
  5090. </FormItem>
  5091. <FormItem
  5092. className="half-item"
  5093. {...formItemLayout}
  5094. label="项目类别"
  5095. >
  5096. <span>{this.state.cname}</span>
  5097. </FormItem>
  5098. <FormItem
  5099. className="half-item"
  5100. {...formItemLayout}
  5101. label="证书编号"
  5102. >
  5103. <Input
  5104. placeholder="请输入证书编号"
  5105. value={this.state.certificateNumber}
  5106. style={{ width: '200px' }}
  5107. onChange={(e) => {
  5108. this.setState({ certificateNumber: e.target.value })
  5109. }}
  5110. ref="commodityQuantity"
  5111. />
  5112. </FormItem>
  5113. </div>
  5114. <div className="clearfix" style={{ marginTop: '10px' }}>
  5115. <FormItem
  5116. labelCol={{ span: 3 }}
  5117. wrapperCol={{ span: 14 }}
  5118. label="附件"
  5119. >
  5120. <Picture
  5121. fileList={(e) => {
  5122. this.setState({ attachmentUrl: e })
  5123. }}
  5124. pictureUrl={this.state.attachmentUrl}
  5125. visible={this.props.visible}
  5126. data={{
  5127. sign: 'order_task_file',
  5128. url: '/api/admin/orderProject/uploadOrderTaskFile',
  5129. number: 8,
  5130. }}
  5131. />
  5132. </FormItem>
  5133. </div>
  5134. <div className="clearfix">
  5135. <FormItem
  5136. labelCol={{ span: 3 }}
  5137. wrapperCol={{ span: 16 }}
  5138. label="备注"
  5139. >
  5140. <Input
  5141. type="textarea"
  5142. placeholder="请输入备注"
  5143. rows={4}
  5144. value={this.state.taskComment}
  5145. onChange={(e) => {
  5146. this.setState({ taskComment: e.target.value })
  5147. }}
  5148. />
  5149. </FormItem>
  5150. </div>
  5151. <div className="clearfix">
  5152. <h3 className="sub-title">项目申报进度</h3>
  5153. <FormItem
  5154. className="half-item"
  5155. {...formItemLayout}
  5156. label="申报批次"
  5157. >
  5158. <Select
  5159. value={
  5160. this.state.declarationBatch
  5161. ? this.state.declarationBatch
  5162. : undefined
  5163. }
  5164. placeholder="请选择批次"
  5165. style={{ width: 200 }}
  5166. onChange={(e) => {
  5167. this.setState({
  5168. declarationBatch: e,
  5169. })
  5170. }}
  5171. >
  5172. <Option value={1}>第一批</Option>
  5173. <Option value={2}>第二批</Option>
  5174. <Option value={3}>第三批</Option>
  5175. <Option value={4}>第四批</Option>
  5176. </Select>
  5177. </FormItem>
  5178. <FormItem
  5179. className="half-item"
  5180. {...formItemLayout}
  5181. label="软著派单数量"
  5182. >
  5183. <span>{this.state.commodityQuantity}</span>
  5184. <Button
  5185. type="primary"
  5186. size="small"
  5187. style={{ marginLeft: '45px' }}
  5188. onClick={this.addcontact}
  5189. >
  5190. +增加下证信息
  5191. </Button>
  5192. </FormItem>
  5193. <div className="patent-table">
  5194. <Spin spinning={this.state.loading}>
  5195. <Table
  5196. columns={this.state.ContactsLists}
  5197. dataSource={this.state.contactList}
  5198. pagination={false}
  5199. bordered
  5200. size="small"
  5201. />
  5202. </Spin>
  5203. </div>
  5204. </div>
  5205. <div className="clearfix">
  5206. <h3 className="sub-title">项目业务</h3>
  5207. <div className="patent-table">
  5208. <Spin spinning={this.state.loading}>
  5209. <Table
  5210. columns={this.state.columnsX}
  5211. dataSource={this.state.dataSourceX}
  5212. pagination={this.state.paginations}
  5213. onRowClick={this.tableRowClickX}
  5214. bordered
  5215. size="small"
  5216. />
  5217. </Spin>
  5218. </div>
  5219. </div>
  5220. <div className="clearfix">
  5221. <Button
  5222. className="cancel"
  5223. type="primary"
  5224. onClick={this.tijiaoOk}
  5225. style={{ marginLeft: '200px', marginTop: '10px' }}
  5226. htmlType="submit"
  5227. >
  5228. 保存
  5229. </Button>
  5230. <Button
  5231. className="cancel"
  5232. type="ghost"
  5233. onClick={this.visitCancel}
  5234. style={{ marginLeft: '50px', marginTop: '10px' }}
  5235. >
  5236. 取消
  5237. </Button>
  5238. </div>
  5239. </TabPane>
  5240. <TabPane tab="外包(不走本部)" key="2">
  5241. {this.state.refundStatus != 0 && this.state.refundStatus != 1 ? (
  5242. <div style={{ marginTop: 10 }}>
  5243. <div className="clearfix">
  5244. <FormItem
  5245. className="half-item"
  5246. {...formItemLayout}
  5247. label={
  5248. <span>
  5249. <strong style={{ color: '#f00' }}>*</strong>
  5250. 外包公司
  5251. </span>
  5252. }
  5253. >
  5254. <Input
  5255. value={this.state.companyName}
  5256. onChange={(e) => {
  5257. this.setState({
  5258. companyName: e.target.value,
  5259. })
  5260. }}
  5261. placeholder="请填写外包公司名称"
  5262. />
  5263. </FormItem>
  5264. <span className="tip" style={{ color: 'red' }}>
  5265. 如多个公司,请用间隔
  5266. </span>
  5267. </div>
  5268. <div className="clearfix">
  5269. <FormItem
  5270. className="half-item"
  5271. {...formItemLayout}
  5272. label={
  5273. <span>
  5274. <strong style={{ color: '#f00' }}>*</strong>
  5275. 单价(万元)
  5276. </span>
  5277. }
  5278. >
  5279. <Input
  5280. value={this.state.unitPrice}
  5281. onChange={(e) => {
  5282. this.setState({
  5283. unitPrice: e.target.value,
  5284. })
  5285. }}
  5286. placeholder="请填写本次外包公司的价格"
  5287. />
  5288. </FormItem>
  5289. </div>
  5290. <div className="clearfix">
  5291. <FormItem
  5292. className="half-item"
  5293. {...formItemLayout}
  5294. label={
  5295. <span>
  5296. <strong style={{ color: '#f00' }}>*</strong>
  5297. 数量(个)
  5298. </span>
  5299. }
  5300. >
  5301. <Input
  5302. value={this.state.unitNumber}
  5303. onChange={(e) => {
  5304. this.setState({
  5305. unitNumber: e.target.value,
  5306. })
  5307. }}
  5308. placeholder="请填写本次外包公司的价格"
  5309. />
  5310. </FormItem>
  5311. </div>
  5312. <div className="clearfix">
  5313. <FormItem
  5314. className="half-item"
  5315. {...formItemLayout}
  5316. label={
  5317. <span>
  5318. <strong style={{ color: '#f00' }}>*</strong>
  5319. 总金额(万元)
  5320. </span>
  5321. }
  5322. >
  5323. <Input
  5324. value={this.state.amount}
  5325. onChange={(e) => {
  5326. this.setState({
  5327. amount: e.target.value,
  5328. })
  5329. }}
  5330. placeholder="请填写本次外包公司的价格"
  5331. />
  5332. </FormItem>
  5333. </div>
  5334. <div className="clearfix">
  5335. <FormItem
  5336. className="half-item"
  5337. {...formItemLayout}
  5338. label={
  5339. <span>
  5340. <strong style={{ color: '#f00' }}>*</strong>备注
  5341. </span>
  5342. }
  5343. >
  5344. <TextArea
  5345. rows={4}
  5346. value={this.state.outsourceRemarks}
  5347. onChange={(e) => {
  5348. this.setState({
  5349. outsourceRemarks: e.target.value,
  5350. })
  5351. }}
  5352. placeholder="请输入备注"
  5353. />
  5354. </FormItem>
  5355. </div>
  5356. <p
  5357. className="tip"
  5358. style={{
  5359. paddingBottom: '12px',
  5360. width: '240px',
  5361. marginLeft: '145px',
  5362. color: 'red',
  5363. }}
  5364. >
  5365. 首次派单项目,需上传协议,第2次起,同项目,只需写外包公司
  5366. </p>
  5367. <div className="clearfix">
  5368. <FormItem
  5369. labelCol={{ span: 4 }}
  5370. wrapperCol={{ span: 18 }}
  5371. label={
  5372. <span>
  5373. 合同/协议扫描件
  5374. </span>
  5375. }
  5376. >
  5377. <PicturesWall
  5378. fileList={this.getOrgCodeUrlWai}
  5379. pictureUrl={this.state.pictureUrl}
  5380. />
  5381. <p style={{ color: 'red' }}>图片建议:要清晰。</p>
  5382. </FormItem>
  5383. </div>
  5384. <div className="clearfix">
  5385. <div
  5386. style={{
  5387. display: 'inline-black',
  5388. textAlign: 'center',
  5389. }}
  5390. >
  5391. <Button
  5392. type="primary"
  5393. loading={this.state.loading}
  5394. onClick={()=>{
  5395. this.sureOut(this.state.startType);
  5396. }}
  5397. >
  5398. {
  5399. this.state.startType === 0 ? "确认发起外包,不通过总部" : "提交供应商信息"
  5400. }
  5401. </Button>
  5402. <p className="tip" style={{ color: 'red' }}>
  5403. {
  5404. this.state.startType === 0 ? "提示:高于总部价格,费用个人承担" : "确定提交供应商信息,提交后,不可修改"
  5405. }
  5406. </p>
  5407. </div>
  5408. </div>
  5409. </div>
  5410. ) : (
  5411. <div>
  5412. <div className="clearfix">
  5413. <FormItem
  5414. className="half-item"
  5415. {...formItemLayout}
  5416. label="外包公司"
  5417. >
  5418. <span>{this.state.companyName}</span>
  5419. </FormItem>
  5420. </div>
  5421. <div className="clearfix">
  5422. <FormItem
  5423. className="half-item"
  5424. {...formItemLayout}
  5425. label="单价(万元)"
  5426. >
  5427. <span>{this.state.unitPrice}</span>
  5428. </FormItem>
  5429. </div>
  5430. <div className="clearfix">
  5431. <FormItem
  5432. className="half-item"
  5433. {...formItemLayout}
  5434. label="数量(个)"
  5435. >
  5436. <span>{this.state.unitNumber}</span>
  5437. </FormItem>
  5438. </div>
  5439. <div className="clearfix">
  5440. <FormItem
  5441. className="half-item"
  5442. {...formItemLayout}
  5443. label="总金额(万元)"
  5444. >
  5445. <span>{this.state.amount}</span>
  5446. </FormItem>
  5447. </div>
  5448. <div className="clearfix">
  5449. <FormItem
  5450. className="half-item"
  5451. {...formItemLayout}
  5452. label="备注"
  5453. >
  5454. <span>{this.state.outsourceRemarks}</span>
  5455. </FormItem>
  5456. </div>
  5457. <div className="clearfix">
  5458. <FormItem
  5459. labelCol={{ span: 4 }}
  5460. wrapperCol={{ span: 18 }}
  5461. label="合同/协议扫描件"
  5462. >
  5463. {/*<Upload*/}
  5464. {/* className="demandDetailShow-upload"*/}
  5465. {/* listType="picture-card"*/}
  5466. {/* fileList={this.state.pictureUrl}*/}
  5467. {/* onPreview={(file) => {*/}
  5468. {/* this.setState({*/}
  5469. {/* previewImage: file.url || file.thumbUrl,*/}
  5470. {/* previewVisible: true,*/}
  5471. {/* })*/}
  5472. {/* }}*/}
  5473. {/*/>*/}
  5474. <div style={{paddingTop:'10px',paddingBottom:'10px'}}>
  5475. <ImgList fileList={this.state.pictureUrl} ItemWidth={'96px'}/>
  5476. </div>
  5477. <Modal
  5478. maskClosable={false}
  5479. footer={null}
  5480. visible={this.state.previewVisible}
  5481. onCancel={() => {
  5482. this.setState({ previewVisible: false })
  5483. }}
  5484. >
  5485. <img
  5486. alt=""
  5487. style={{ width: '100%' }}
  5488. src={this.state.previewImage || ''}
  5489. />
  5490. </Modal>
  5491. </FormItem>
  5492. </div>
  5493. </div>
  5494. )}
  5495. {this.state.refundStatus == 1 ||
  5496. this.state.refundStatus == 0 ||
  5497. this.state.refundStatus == 2 ? (
  5498. <div className="clearfix">
  5499. <hr className="division" />
  5500. <div
  5501. className="clearfix"
  5502. style={{
  5503. display: this.state.refundStatus == 0 ? 'none' : 'block',
  5504. }}
  5505. >
  5506. <FormItem
  5507. className="half-item"
  5508. {...formItemLayout}
  5509. label="审核意见"
  5510. >
  5511. <span>{this.state.remarks}</span>
  5512. </FormItem>
  5513. </div>
  5514. <div className="clearfix">
  5515. <FormItem
  5516. className="half-item"
  5517. {...formItemLayout}
  5518. label="审核结果"
  5519. >
  5520. <span>{getRefundStatus(this.state.refundStatus)}</span>
  5521. </FormItem>
  5522. </div>
  5523. <div
  5524. className="clearfix"
  5525. style={{
  5526. display: this.state.refundStatus == 0 ? 'none' : 'block',
  5527. }}
  5528. >
  5529. <FormItem
  5530. className="half-item"
  5531. {...formItemLayout}
  5532. label="审核时间"
  5533. >
  5534. <span>{this.state.auditTimes}</span>
  5535. </FormItem>
  5536. </div>
  5537. </div>
  5538. ) : (
  5539. ''
  5540. )}
  5541. </TabPane>
  5542. {!this.props.isZxs || (this.state.isHuiyuan && this.props.isZxs) ? (
  5543. <TabPane tab="订单详情" key="3">
  5544. <Spin spinning={this.state.loading}>
  5545. <OrderDetail
  5546. orderData={this.state.orderData}
  5547. getOrderLog={this.getOrderLog}
  5548. dataSourceX={this.state.dataSourceX}
  5549. contactList={this.state.jiedian}
  5550. orderNo={this.state.orderNo}
  5551. totalCui={this.state.totalCui}
  5552. contactListNew={this.state.jiedianNew}
  5553. pictureUrl={this.state.contractPictureUrl}
  5554. />
  5555. </Spin>
  5556. </TabPane>
  5557. ) : (
  5558. ''
  5559. )}
  5560. </Tabs>
  5561. </Modal>
  5562. <Modal
  5563. width="800px"
  5564. visible={this.state.visibleA}
  5565. onCancel={this.visitCancelA}
  5566. title="操作日志"
  5567. footer=""
  5568. className="admin-desc-content"
  5569. >
  5570. <div className="patent-table patent-table-center">
  5571. <Spin spinning={this.state.loading}>
  5572. <Table
  5573. columns={this.state.columnsA}
  5574. dataSource={this.state.dataSourceA}
  5575. pagination={false}
  5576. bordered
  5577. size="small"
  5578. />
  5579. </Spin>
  5580. </div>
  5581. </Modal>
  5582. <Modal
  5583. title="工时记录"
  5584. visible={this.state.timeVisible}
  5585. onCancel={this.timeClose}
  5586. width={800}
  5587. footer={null}
  5588. >
  5589. <Spin spinning={this.state.loading}>
  5590. <Table
  5591. columns={this.state.columnsTime}
  5592. dataSource={this.state.dataSourceTime}
  5593. pagination={false}
  5594. scroll={{ x: 'max-content', y: 0 }}
  5595. bordered
  5596. size={'small'}
  5597. />
  5598. <p style={{ marginTop: 10, color: 'red' }}>
  5599. 累计工时(小时):{this.state.recordHour}
  5600. </p>
  5601. </Spin>
  5602. </Modal>
  5603. {this.state.ThirdListVisible ? <NewSupplier
  5604. patentNameType={this.state.patentNameType}
  5605. ThirdId={this.state.ThirdId}
  5606. tid={this.state.tid}
  5607. patentType={this.state.patentType}
  5608. projectType={this.state.projectType}
  5609. thirdCompanyName={this.state.thirdCompanyName}
  5610. thirdUnitPrice={this.state.thirdUnitPrice}
  5611. thirdQuantity={this.state.thirdQuantity}
  5612. thirdRemarks={this.state.thirdRemarks}
  5613. spinning={this.state.loading}
  5614. visible={this.state.ThirdListVisible}
  5615. thirdMaterial={this.state.thirdMaterial}
  5616. thirdUrgent={this.state.thirdUrgent}
  5617. onDetermine={this.handleCancelq}
  5618. onCancel={()=>{
  5619. this.thirdTable(this.state.tid);
  5620. this.setState({
  5621. ThirdListVisible: false,
  5622. ThirdId: '', //供应商id
  5623. thirdCompanyName: '', //第三方名称
  5624. thirdUnitPrice: '', //单价
  5625. thirdQuantity: '', //数量
  5626. currentTotalPrice: '', //总价
  5627. thirdMaterial: '', //有无材料
  5628. thirdUrgent: 0, //加急情况
  5629. thirdRemarks: '',
  5630. })
  5631. }}
  5632. otherOperations={(data)=>{
  5633. this.setState({
  5634. thirdMaterial: data.thirdMaterial,
  5635. thirdUrgent: data.thirdUrgent,
  5636. customerArr: data.customerArr,
  5637. thirdCompanyName: data.thirdCompanyName
  5638. })
  5639. }}/> : <div/>}
  5640. {this.state.PayNodeVisible ? <Modal
  5641. visible={this.state.PayNodeVisible}
  5642. onCancel={this.handleCancelclose}
  5643. width={800}
  5644. title={this.state.ThirdId ? "修改付款节点" : "新增付款节点"}
  5645. footer=""
  5646. // width={1300}
  5647. className="admin-desc-content"
  5648. >
  5649. <Form
  5650. layout="horizontal"
  5651. // onSubmit={this.handleSubmit1}
  5652. // id="demand-form"
  5653. style={{ paddingBottom: '40px' }}
  5654. >
  5655. <Spin spinning={this.state.loading}>
  5656. <div className="clearfix">
  5657. <div className="clearfix">
  5658. <FormItem {...formItemLayout} label="供应商名称">
  5659. <Select
  5660. value={this.state.thirdCompanyName}
  5661. onChange={(val) => {
  5662. this.setState(
  5663. {
  5664. thirdCompanyName: val,
  5665. },
  5666. () => this.payNodeCalculatedAmount()
  5667. ) //更新完state调用
  5668. }}
  5669. defaultValue="请选择供应商"
  5670. style={{ width: 220 }}
  5671. >
  5672. {this.state.PayNodeCompany.map((item, index) => (
  5673. <Select.Option value={item.companyName} key={index}>
  5674. {item.companyName}
  5675. </Select.Option>
  5676. ))}
  5677. </Select>
  5678. <span className="mandatory">*</span>
  5679. </FormItem>
  5680. </div>
  5681. <div className="clearfix">
  5682. <FormItem {...formItemLayout} label="付款科目">
  5683. <Select
  5684. value={this.state.paySubjectName}
  5685. onChange={(val) => {
  5686. this.setState({
  5687. paySubjectName: val,
  5688. dunType: val,
  5689. })
  5690. }}
  5691. defaultValue="请选择付款科目"
  5692. style={{ width: 220 }}
  5693. >
  5694. {this.state.paySubject.map((item, index) => (
  5695. <Select.Option value={item.value} key={index}>
  5696. {item.key}
  5697. </Select.Option>
  5698. ))}
  5699. <Select.Option key={0} value={0}>
  5700. 自定义
  5701. </Select.Option>
  5702. </Select>
  5703. <span className="mandatory">*</span>
  5704. </FormItem>
  5705. </div>
  5706. <div className="clearfix">
  5707. {parseInt(this.state.paySubjectName) === 0 ? <FormItem {...formItemLayout} label="付款时间">
  5708. <DatePicker
  5709. value={
  5710. this.state.partyTimes
  5711. ? moment(this.state.partyTimes)
  5712. : null
  5713. }
  5714. onChange={(data, dataString) => {
  5715. this.setState({ partyTimes: dataString })
  5716. }}
  5717. style={{ width: '220px' }}
  5718. />
  5719. <span className="mandatory">*</span>
  5720. </FormItem> : <div/>}
  5721. </div>
  5722. <div className="clearfix">
  5723. <FormItem {...formItemLayout} label="数量">
  5724. <Input
  5725. value={this.state.payNodeQuantity}
  5726. placeholder="请输入数量(必填项)"
  5727. required="required"
  5728. type={'number'}
  5729. onChange={(e) => {
  5730. //TODO 数量为1时不可修改,需要将次块分成组件
  5731. let num = e.target.value ? (e.target.value < 1 ? 1 : e.target.value) : 1
  5732. this.setState(
  5733. {
  5734. payNodeQuantity: num,
  5735. }, () => this.payNodeCalculatedAmount(num))
  5736. }}
  5737. style={{ width: '220px' }}
  5738. />
  5739. <span className="mandatory">*</span>
  5740. </FormItem>
  5741. </div>
  5742. {this.state.projectType !== 2 ? <div className="clearfix">
  5743. <FormItem {...formItemLayout} label="总价(万元)">
  5744. {/* <span>{this.state.currentTotalPrice}</span> */}
  5745. <Input
  5746. value={this.state.currentTotalPrice}
  5747. placeholder=""
  5748. // required="required"
  5749. // onBlur={this.payNodeCalculatedAmount}
  5750. // onChange={(e) =>
  5751. // this.setState({
  5752. // toltalAmount: e.target.value,
  5753. // })
  5754. // }
  5755. style={{ width: '220px' }}
  5756. />
  5757. <span className="mandatory">*</span>
  5758. </FormItem>
  5759. </div> : <div/>}
  5760. <div className="clearfix">
  5761. <div className="addSave" style={{ marginTop: '15px' }}>
  5762. <Button
  5763. className="cancel"
  5764. type="primary"
  5765. onClick={this.savePayNode}
  5766. style={{ marginLeft: '300px' }}
  5767. htmlType="submit"
  5768. >
  5769. 保存
  5770. </Button>
  5771. <Button
  5772. className="cancel"
  5773. type="ghost"
  5774. onClick={this.handleCancelclose}
  5775. style={{ marginLeft: '50px' }}
  5776. >
  5777. 取消
  5778. </Button>
  5779. </div>
  5780. </div>
  5781. </div>
  5782. </Spin>
  5783. </Form>
  5784. </Modal> : <div/>}
  5785. </div>
  5786. )
  5787. },
  5788. })
  5789. export default Task