myTask.jsx 217 KB

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