myTask.jsx 197 KB

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