addService.jsx 366 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730
  1. // 开单=》合同变更发起
  2. import React from "react";
  3. import {
  4. Table,
  5. Modal,
  6. message,
  7. Spin,
  8. Input,
  9. Select,
  10. Button,
  11. Form,
  12. Upload,
  13. Popconfirm,
  14. AutoComplete,
  15. DatePicker,
  16. Col,
  17. Tabs,
  18. Tag,
  19. Radio,
  20. Icon,
  21. Tooltip,
  22. Switch,
  23. Checkbox,
  24. } from "antd";
  25. // import $ from "jquery/src/ajax";
  26. import "../userMangagement.less";
  27. import "../billing.less";
  28. import moment from "moment";
  29. import { shenghePeo } from "@/tools.js";
  30. import Picture from "@/manageCenter/publicComponent/picture";
  31. import ResolutionDetail from "@/resolutionDetail";
  32. import quxiao from "../../../../../image/quxiao.png";
  33. import tongguo from "../../../../../image/tongguo.png";
  34. import $ from "jquery";
  35. import OrderRiZi from "@/orderRiZi.jsx";
  36. import {
  37. orderTypes,
  38. customerType,
  39. jiedian,
  40. boutique,
  41. ssalesType,
  42. qsalesType,
  43. wsalesType,
  44. cuiJieDian,
  45. salesList,
  46. vipYear,
  47. knowledgeList,
  48. auditList,
  49. addDeductionList,
  50. } from "@/dataDic.js";
  51. import {
  52. splitUrl,
  53. getProcessStatus,
  54. getLiquidationStatus,
  55. getboutique,
  56. getApprovedState,
  57. getApprovedType,
  58. compare,
  59. getjiedian,
  60. getCuikuan,
  61. getProjectName,
  62. moneyVerify,
  63. getProcessStatusNew,
  64. stopStatus,
  65. } from "../../../tools.js";
  66. import PicturesWall from "./changeComponent/picturesWall.js";
  67. import { getChangeType } from "./changeComponent/changeDetailYxgly";
  68. import ImgList from "../../../common/imgList";
  69. import OrderItemStatus from "../../../common/orderItemStatus";
  70. import EnterpriseNameChange from "../../../common/enterpriseNameChange";
  71. import ProjectOperation from "../../../common/projectOperation";
  72. import ProjectOperationVip from "../../../common/projectOperation/vip";
  73. import NewAddProject from "../../../common/projectOperation/newAddProject"
  74. import NewEditProject from "../../../common/projectOperation/newEditProject"
  75. import { instanceOf } from "prop-types";
  76. import UpdateSales from './updatesales';
  77. import SelectList from '../../../common/mysuspend/selectList'; //
  78. import FlowChart from '../../../common/flowchart'; // 流程图
  79. import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
  80. import Property from '../../../common/orderDetail/property' // 知识产权情况
  81. const Option = AutoComplete.Option;
  82. const CheckboxGroup = Checkbox.Group;
  83. const confirm = Modal.confirm;
  84. const RadioButton = Radio.Button;
  85. const RadioGroup = Radio.Group;
  86. const NewService = Form.create()(
  87. React.createClass({
  88. //查看项目列表
  89. loadData(record) {
  90. this.state.data = [];
  91. this.setState({
  92. loading: true,
  93. });
  94. if (!record && !this.props.datauser.orderNo) {
  95. return
  96. }
  97. $.ajax({
  98. method: "get",
  99. dataType: "json",
  100. crossDomain: false,
  101. url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
  102. data: {
  103. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  104. },
  105. success: function (data) {
  106. let theArr = [];
  107. if (!data.data) {
  108. if (data.error && data.error.length) {
  109. message.warning(data.error[0].message);
  110. }
  111. } else {
  112. for (let i = 0; i < data.data.length; i++) {
  113. let thisdata = data.data[i];
  114. thisdata.key = i;
  115. thisdata.sort = thisdata.cSort;
  116. thisdata.declarationBatch =
  117. thisdata.declarationBatch || undefined; //申报批次
  118. thisdata.ifCertificationFee = isNaN(
  119. parseInt(thisdata.ifCertificationFee)
  120. )
  121. ? undefined
  122. : thisdata.ifCertificationFee; //是否包含申报批次
  123. theArr.push(thisdata);
  124. }
  125. }
  126. this.departmentList();
  127. this.setState({
  128. dataSource: theArr,
  129. pagination: false,
  130. // 禁用变更类型
  131. changeFlag: false,
  132. });
  133. }.bind(this),
  134. }).always(
  135. function () {
  136. this.setState({
  137. loading: false,
  138. });
  139. }.bind(this)
  140. );
  141. },
  142. //收款节点
  143. loadDatas(record) {
  144. this.state.data = [];
  145. this.setState({
  146. loading: true,
  147. });
  148. $.ajax({
  149. method: "get",
  150. dataType: "json",
  151. crossDomain: false,
  152. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  153. data: {
  154. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  155. },
  156. success: function (data) {
  157. let theArr = [];
  158. if (!data.data) {
  159. if (data.error && data.error.length) {
  160. message.warning(data.error[0].message);
  161. }
  162. } else {
  163. for (let i = 0; i < data.data.length; i++) {
  164. let thisdata = data.data[i];
  165. theArr.push({
  166. key: i,
  167. id: thisdata.id,
  168. });
  169. }
  170. }
  171. this.setState({
  172. dataSource: theArr,
  173. pagination: false,
  174. });
  175. }.bind(this),
  176. }).always(
  177. function () {
  178. this.setState({
  179. loading: false,
  180. });
  181. }.bind(this)
  182. );
  183. },
  184. getInitialState() {
  185. return {
  186. marks: "",
  187. score: "",
  188. type: "",
  189. approvaType: [],
  190. typeExplain: "",
  191. isShow: true, // 高新纯咨询合同默认填写
  192. knowledgeOther: "",
  193. auditOther: "",
  194. addDeductionOther: "",
  195. dataView: null,
  196. PublicView: null,
  197. contentView: '',
  198. remarksView: '',
  199. contentViewLength: 0,
  200. contentViewLength1: 0,
  201. columnsView: [
  202. {
  203. title: "服务时间",
  204. dataIndex: "serviceTimes",
  205. key: "serviceTimes",
  206. width: '80px'
  207. },
  208. {
  209. title: "服务内容",
  210. dataIndex: "content",
  211. key: "content",
  212. width: '300'
  213. },
  214. {
  215. title: "备注",
  216. dataIndex: "remarks",
  217. key: "remarks",
  218. width: '300'
  219. },
  220. {
  221. title: "操作",
  222. dataIndex: "cz",
  223. key: "cz",
  224. width: '100px',
  225. render: (text, record) => {
  226. return (
  227. <div>
  228. {this.state.processStatus == 0 ? (
  229. <Button
  230. onClick={(e) => {
  231. e.stopPropagation();
  232. this.viewConfirm(this.delectView, record);
  233. // this.setState({
  234. // addFlag: false,
  235. // });
  236. }}
  237. >
  238. 删除
  239. </Button>
  240. ) : (
  241. ""
  242. )}
  243. </div>
  244. );
  245. },
  246. },
  247. ],
  248. columnsRecord: [
  249. {
  250. title: "序号",
  251. dataIndex: "id",
  252. key: "id",
  253. },
  254. {
  255. title: "客户名称",
  256. dataIndex: "nickname",
  257. key: "nickname",
  258. },
  259. {
  260. title: "公出申请人",
  261. dataIndex: "aname",
  262. key: "aname",
  263. },
  264. {
  265. title: "公出时长",
  266. dataIndex: "duration",
  267. key: "duration",
  268. render: (text, record) => {
  269. return <div>{text + "小时"}</div>;
  270. },
  271. },
  272. {
  273. title: "公出地点",
  274. dataIndex: "userName",
  275. key: "userName",
  276. },
  277. {
  278. title: "公出时间",
  279. dataIndex: "releaseStarts",
  280. key: "releaseStarts",
  281. render: (text, record) => {
  282. return (
  283. <div>
  284. <div>{text}</div>
  285. <div style={{ paddingLeft: "44px" }}>至</div>
  286. <div>{record.releaseEnds}</div>
  287. </div>
  288. );
  289. },
  290. },
  291. {
  292. title: "打卡时间",
  293. dataIndex: "clockInTimes",
  294. key: "clockInTimes",
  295. },
  296. {
  297. title: "公出目标",
  298. dataIndex: "remarks",
  299. key: "remarks",
  300. width: '300'
  301. },
  302. ],
  303. dataSourceView: [],
  304. coorVisible: "none",
  305. personnel: [],
  306. viewKey: 0,
  307. modalView: false,
  308. modalRecord: false,
  309. closable: false,
  310. disabledView: "none",
  311. patentType: "",
  312. patentTypeList: [],
  313. rotateDeg: 0,
  314. isCaoGao: false,
  315. cuiFlag: false,
  316. startRemarks: "",
  317. remarksC: "",
  318. loading: false,
  319. logData: [],
  320. visible: false,
  321. cuiDataSource: [],
  322. status: 4,
  323. orgCodeUrl: [],
  324. voucherUrl: [],
  325. replenishUrl: [],
  326. contentUrl: [],
  327. newContractUrl: [],
  328. customerArr: [],
  329. declarationBatch: 1, //申报批次 默认第一批
  330. // 禁用变更类型转换
  331. changeFlag: false,
  332. // 合同额禁用
  333. hetongFlag: true,
  334. // 项目及催款禁用
  335. listFlag: true,
  336. mark: false,
  337. activeKey: "1",
  338. typeChange: undefined,
  339. bussStats: false,
  340. checkedKeys: [],
  341. lookflowList: [],
  342. contractUrl: [],
  343. applicationUrl: [],
  344. changeAmount: "0",
  345. active: {
  346. applySign: false,
  347. },
  348. lookState: false,
  349. signBillVisible: false,
  350. commod: "",
  351. columns: [
  352. {
  353. title: "业务项目名称",
  354. dataIndex: "commodityName",
  355. key: "commodityName",
  356. render: (text, record) => {
  357. return <span>
  358. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  359. <div>
  360. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  361. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  362. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  363. {record.cSort == 3 && <span>{record.technologyProjectType == 0 ? '(简易项目)' : record.technologyProjectType == 1 ? '(市区级)' : record.technologyProjectType == 2 ? '(省级)' : record.technologyProjectType == 3 ? '(国家级)' : ''}</span>}
  364. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  365. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  366. </div>
  367. </span>
  368. }
  369. },
  370. {
  371. title: "项目类别",
  372. dataIndex: "cname",
  373. key: "cname",
  374. },
  375. {
  376. title: "项目数量",
  377. dataIndex: "commodityQuantity",
  378. key: "commodityQuantity",
  379. render: (text, record) => {
  380. if (record.splitStatus == 1) {
  381. return (
  382. <span>
  383. {text}{" "}
  384. </span>
  385. );
  386. } else {
  387. return text;
  388. }
  389. },
  390. },
  391. {
  392. title: "金额(万元)",
  393. dataIndex: "commodityPrice",
  394. key: "commodityPrice",
  395. width: 50,
  396. },
  397. {
  398. title: "负责人",
  399. dataIndex: "contacts",
  400. key: "contacts",
  401. },
  402. {
  403. title: "负责人电话",
  404. dataIndex: "contactsMobile",
  405. key: "contactsMobile",
  406. },
  407. {
  408. title: "项目状态",
  409. dataIndex: "projectStatus",
  410. key: "projectStatus",
  411. width: 70, textAlign: "center",
  412. render: (text) => {
  413. return getProjectName(text);
  414. },
  415. },
  416. {
  417. title: "主要项目",
  418. dataIndex: "main",
  419. key: "main",
  420. width: 50,
  421. render: (text) => {
  422. return text ? "是" : "否";
  423. },
  424. },
  425. {
  426. title: "总年限",
  427. dataIndex: "yearSum",
  428. key: "yearSum",
  429. render: (text, record) => {
  430. return (
  431. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  432. );
  433. }
  434. },
  435. {
  436. title: "年限",
  437. dataIndex: "serviceLife",
  438. key: "serviceLife",
  439. render: (text, record) => {
  440. return (
  441. <div>{!!text && JSON.parse(text).toString()}</div>
  442. );
  443. }
  444. },
  445. {
  446. title: "本次派单",
  447. dataIndex: "serviceYear",
  448. key: "serviceYear",
  449. render: (text, record) => {
  450. return (
  451. <div>{!text ? "" : text}</div>
  452. );
  453. }
  454. },
  455. {
  456. title: "项目说明",
  457. dataIndex: "taskComment",
  458. key: "taskComment",
  459. render: (text, record) => {
  460. let textStr = text;
  461. // let textArr = [];
  462. // if (record.projectType == 1) {
  463. // if (record.htMember === 1) {
  464. // textArr.push("高新会员");
  465. // }
  466. // if (record.additionalDeduction === 1) {
  467. // textArr.push("加计扣除");
  468. // }
  469. // if (record.rdAwardsubsidy === 1) {
  470. // textArr.push("研发补助");
  471. // }
  472. // }
  473. // if (textArr.length) {
  474. // textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  475. // }
  476. return (
  477. <Tooltip title={textStr}>
  478. <div
  479. style={{
  480. width: 100,
  481. overflow: "hidden",
  482. whiteSpace: "nowrap",
  483. textOverflow: "ellipsis",
  484. }}
  485. >{textStr}</div>
  486. </Tooltip>
  487. )
  488. },
  489. },
  490. {
  491. title: "操作",
  492. dataIndex: "ABC",
  493. key: "ABC",
  494. width: 110,
  495. render: (text, record) => {
  496. return (
  497. <div>
  498. {stopStatus(record.stopType, record.stopStatus)}
  499. {
  500. this.state.processStatus == 0 &&
  501. <div>
  502. <Button
  503. onClick={(e) => {
  504. e.stopPropagation();
  505. this.showConfirm(this.delectRow, record);
  506. this.setState({
  507. addFlag: false,
  508. });
  509. }}
  510. >
  511. 删除
  512. </Button>
  513. </div>
  514. }
  515. {
  516. this.state.processStatus == 0 &&
  517. <div>
  518. <Button
  519. onClick={(e) => {
  520. e.stopPropagation();
  521. this.tableRowClick(record)
  522. }}
  523. >
  524. 编辑
  525. </Button>
  526. </div>
  527. }
  528. {
  529. record.scoreStatus == 1 &&
  530. <div>
  531. <Button
  532. type="primary"
  533. onClick={(e) => {
  534. e.stopPropagation();
  535. this.setState({
  536. tid: record.id,
  537. score: "add",
  538. cSort: record.sort,
  539. cname: record.commodityName,
  540. tname: record.name,
  541. })
  542. }}
  543. >
  544. 待评分
  545. </Button>
  546. </div>
  547. }
  548. {
  549. !!record.scoreNumber &&
  550. <Button
  551. type="primary"
  552. onClick={(e) => {
  553. e.stopPropagation();
  554. this.setState({
  555. cSort: record.sort,
  556. cname: record.commodityName,
  557. tname: record.name,
  558. })
  559. this.queryByTid(record.id)
  560. }}
  561. >
  562. 已评{record.scoreNumber}分
  563. </Button>
  564. }
  565. </div>
  566. );
  567. },
  568. },
  569. ],
  570. proColumns: [
  571. {
  572. title: "变更状态",
  573. dataIndex: "type",
  574. key: "type",
  575. width: 70, textAlign: "center",
  576. render: (text, record) => {
  577. let str = "";
  578. let color = "";
  579. if (text == 1) {
  580. str = "增";
  581. color = "#87d068";
  582. } else if (text == 2) {
  583. str = "改";
  584. color = "#108ee9";
  585. } else if (text == 3) {
  586. str = "删";
  587. color = "#f50";
  588. }
  589. return (
  590. <span>
  591. <Tag
  592. color={color}
  593. style={{ display: text == 0 ? "none" : "inline-block" }}
  594. >
  595. {str}
  596. </Tag>
  597. {/* {record.splitStatus == 1 ? (
  598. <Tag color="#108ee9">父项目</Tag>
  599. ) : (
  600. ""
  601. )}
  602. {record.splitStatus == 2 ? (
  603. <Tag color="#108ee9">子项目</Tag>
  604. ) : (
  605. ""
  606. )} */}
  607. </span>
  608. );
  609. },
  610. },
  611. {
  612. title: "业务项目名称",
  613. dataIndex: "commodityName",
  614. key: "commodityName",
  615. render: (text, record) => {
  616. return <span>
  617. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  618. <div>
  619. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  620. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  621. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  622. {record.cSort == 3 && <span>{record.technologyProjectType == 0 ? '(简易项目)' : record.technologyProjectType == 1 ? '(市区级)' : record.technologyProjectType == 2 ? '(省级)' : record.technologyProjectType == 3 ? '(国家级)' : ''}</span>}
  623. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  624. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  625. </div>
  626. </span>
  627. }
  628. },
  629. {
  630. title: "项目类别",
  631. dataIndex: "cname",
  632. key: "cname",
  633. },
  634. {
  635. title: "项目数量",
  636. dataIndex: "commodityQuantity",
  637. key: "commodityQuantity",
  638. width: 50,
  639. },
  640. {
  641. title: "金额(万元)",
  642. dataIndex: "commodityPrice",
  643. key: "commodityPrice",
  644. width: 50,
  645. render: (text, record) => {
  646. if (record.splitStatus == 2) {
  647. return "/";
  648. } else {
  649. return text;
  650. }
  651. },
  652. },
  653. {
  654. title: "主要项目",
  655. dataIndex: "main",
  656. key: "main",
  657. width: 50,
  658. render: (text) => {
  659. return text ? "是" : "否";
  660. },
  661. },
  662. {
  663. title: "项目负责人",
  664. dataIndex: "receiverName",
  665. key: "receiverName",
  666. },
  667. {
  668. title: "总年限",
  669. dataIndex: "yearSum",
  670. key: "yearSum",
  671. render: (text, record) => {
  672. return (
  673. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  674. );
  675. }
  676. },
  677. {
  678. title: "年限",
  679. dataIndex: "serviceLife",
  680. key: "serviceLife",
  681. render: (text, record) => {
  682. return (
  683. <div>{!!text && JSON.parse(text).toString()}</div>
  684. );
  685. }
  686. },
  687. {
  688. title: "本次派单",
  689. dataIndex: "serviceYear",
  690. key: "serviceYear",
  691. render: (text, record) => {
  692. return (
  693. <div>{!text ? "" : text}</div>
  694. );
  695. }
  696. },
  697. {
  698. title: "项目说明",
  699. dataIndex: "taskComment",
  700. key: "taskComment",
  701. render: (text, record) => {
  702. let textStr = text;
  703. let textArr = [];
  704. if (record.projectType == 1) {
  705. if (record.htMember === 1) {
  706. textArr.push("高新会员");
  707. }
  708. if (record.additionalDeduction === 1) {
  709. textArr.push("加计扣除");
  710. }
  711. if (record.rdAwardsubsidy === 1) {
  712. textArr.push("研发补助");
  713. }
  714. }
  715. // if (textArr.length) {
  716. // textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  717. // }
  718. return (
  719. <Tooltip title={textStr}>
  720. <div
  721. style={{
  722. width: 100,
  723. overflow: "hidden",
  724. whiteSpace: "nowrap",
  725. textOverflow: "ellipsis",
  726. }}
  727. >{textStr}</div>
  728. </Tooltip>
  729. )
  730. },
  731. },
  732. {
  733. title: "操作",
  734. dataIndex: "ABC",
  735. key: "ABC",
  736. width: 70, textAlign: "center",
  737. render: (text, record) => {
  738. return (
  739. <div>
  740. <div>
  741. <Button
  742. onClick={(e) => {
  743. e.stopPropagation();
  744. this.showConfirm(this.changeDeletePro, record);
  745. }}
  746. disabled={this.state.listFlag}
  747. style={{
  748. display: this.state.displayList ? "none" : "block",
  749. }}
  750. >
  751. 删除
  752. </Button>
  753. </div>
  754. <div>
  755. <Button
  756. onClick={(e) => {
  757. e.stopPropagation();
  758. this.editPro(record);
  759. }}
  760. disabled={this.state.listFlag}
  761. style={{
  762. display: this.state.displayList ? "none" : "block",
  763. }}
  764. >
  765. 编辑
  766. </Button>
  767. </div>
  768. </div>
  769. );
  770. },
  771. },
  772. ],
  773. detailColumns: [
  774. {
  775. title: "变更状态",
  776. dataIndex: "type",
  777. key: "type",
  778. render: (text, record) => {
  779. let str = "";
  780. let color = "";
  781. if (text == 1) {
  782. str = "增";
  783. color = "#87d068";
  784. } else if (text == 2) {
  785. str = "改";
  786. color = "#108ee9";
  787. } else if (text == 3) {
  788. str = "删";
  789. color = "#f50";
  790. }
  791. return (
  792. <span>
  793. <Tag
  794. color={color}
  795. style={{ display: text == 0 ? "none" : "inline-block" }}
  796. >
  797. {str}
  798. </Tag>
  799. {/* {record.splitStatus == 1 ? (
  800. <Tag color="#108ee9">父项目</Tag>
  801. ) : (
  802. ""
  803. )}
  804. {record.splitStatus == 2 ? (
  805. <Tag color="#108ee9">子项目</Tag>
  806. ) : (
  807. ""
  808. )} */}
  809. </span>
  810. );
  811. },
  812. },
  813. {
  814. title: "业务项目名称",
  815. dataIndex: "commodityName",
  816. key: "commodityName",
  817. render: (text, record) => {
  818. return <span>
  819. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  820. <div>
  821. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  822. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  823. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  824. {record.cSort == 3 && <span>{record.technologyProjectType == 0 ? '(简易项目)' : record.technologyProjectType == 1 ? '(市区级)' : record.technologyProjectType == 2 ? '(省级)' : record.technologyProjectType == 3 ? '(国家级)' : ''}</span>}
  825. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  826. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  827. </div>
  828. </span>
  829. }
  830. },
  831. {
  832. title: "项目类别",
  833. dataIndex: "cname",
  834. key: "cname",
  835. },
  836. {
  837. title: "项目数量",
  838. dataIndex: "commodityQuantity",
  839. key: "commodityQuantity",
  840. width: 50,
  841. },
  842. {
  843. title: "金额(万元)",
  844. dataIndex: "commodityPrice",
  845. key: "commodityPrice",
  846. width: 50,
  847. render: (text, record) => {
  848. if (this.props.isZxs) {
  849. return <span>***</span>;
  850. } else if (record.splitStatus == 2) {
  851. return "/";
  852. } else {
  853. return <span>{text}</span>;
  854. }
  855. },
  856. },
  857. {
  858. title: "主要项目",
  859. dataIndex: "main",
  860. key: "main",
  861. width: 50,
  862. render: (text) => {
  863. return text ? "是" : "否";
  864. },
  865. },
  866. {
  867. title: "项目负责人",
  868. dataIndex: "receiverName",
  869. key: "receiverName",
  870. },
  871. {
  872. title: "总年限",
  873. dataIndex: "yearSum",
  874. key: "yearSum",
  875. render: (text, record) => {
  876. return (
  877. <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
  878. );
  879. }
  880. },
  881. {
  882. title: "年限",
  883. dataIndex: "serviceLife",
  884. key: "serviceLife",
  885. render: (text, record) => {
  886. return (
  887. <div>{!!text && JSON.parse(text).toString()}</div>
  888. );
  889. }
  890. },
  891. {
  892. title: "本次派单",
  893. dataIndex: "serviceYear",
  894. key: "serviceYear",
  895. render: (text, record) => {
  896. return (
  897. <div>{!text ? "" : text}</div>
  898. );
  899. }
  900. },
  901. {
  902. title: "项目说明",
  903. dataIndex: "taskComment",
  904. key: "taskComment",
  905. render: (text, record) => {
  906. let textStr = text;
  907. let textArr = [];
  908. if (record.projectType == 1) {
  909. if (record.htMember === 1) {
  910. textArr.push("高新会员");
  911. }
  912. if (record.additionalDeduction === 1) {
  913. textArr.push("加计扣除");
  914. }
  915. if (record.rdAwardsubsidy === 1) {
  916. textArr.push("研发补助");
  917. }
  918. }
  919. // if (textArr.length) {
  920. // textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  921. // }
  922. return (
  923. <Tooltip title={textStr}>
  924. <div
  925. style={{
  926. width: 100,
  927. overflow: "hidden",
  928. whiteSpace: "nowrap",
  929. textOverflow: "ellipsis",
  930. }}
  931. >{textStr}</div>
  932. </Tooltip>
  933. )
  934. },
  935. },
  936. ],
  937. detailContactsLists: [
  938. {
  939. title: "变更状态",
  940. dataIndex: "type",
  941. key: "type",
  942. render: (text) => {
  943. let str = "";
  944. let color = "";
  945. if (text == 1) {
  946. str = "增";
  947. color = "#87d068";
  948. } else if (text == 2) {
  949. str = "改";
  950. color = "#108ee9";
  951. } else if (text == 3) {
  952. str = "删";
  953. color = "#f50";
  954. }
  955. return (
  956. <Tag
  957. color={color}
  958. style={{ display: text == 0 ? "none" : "inline-block" }}
  959. >
  960. {str}
  961. </Tag>
  962. );
  963. },
  964. },
  965. {
  966. title: "项目名称",
  967. dataIndex: "commodityName",
  968. key: "commodityName",
  969. render: (text, record) => {
  970. let dataArr = this.state.proDataSource || [];
  971. if (record.ctid) {
  972. return <span>{text + "-" + record.ctid}</span>;
  973. } else {
  974. let tid = record.tid;
  975. let ctid = "";
  976. dataArr.forEach((item, index) => {
  977. if (item.tid == tid) {
  978. ctid = item.id;
  979. }
  980. });
  981. return <span>{text + "-" + ctid}</span>;
  982. }
  983. },
  984. },
  985. {
  986. title: "项目分类",
  987. dataIndex: "projectType",
  988. key: "projectType",
  989. render: (text) => {
  990. let arr = this.state.proDataSource || [];
  991. let str = "";
  992. for (let i = 0; i < arr.length; i++) {
  993. if (this.state.proDataSource[i].cSort == text) {
  994. str = this.state.proDataSource[i].cname;
  995. return <span>{str}</span>;
  996. }
  997. }
  998. },
  999. },
  1000. {
  1001. title: "催款科目",
  1002. dataIndex: "dunTypeName",
  1003. key: "dunTypeName",
  1004. render: (text, record) => {
  1005. return <span>{text}</span>;
  1006. },
  1007. },
  1008. {
  1009. title: "时间",
  1010. dataIndex: "waitDay",
  1011. key: "waitDay",
  1012. render: (text, record) => {
  1013. if (record.dunTypeName) {
  1014. if (record.customizeTimes) {
  1015. return record.customizeTimes;
  1016. }
  1017. return <span>{text}</span>;
  1018. }
  1019. },
  1020. },
  1021. {
  1022. title: "金额(万元)",
  1023. dataIndex: "money",
  1024. key: "money",
  1025. render: (text, record) => {
  1026. if (record.dunTypeName) {
  1027. if (record.appropriationRatio) {
  1028. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  1029. percent += "%";
  1030. return <span>{percent}(拨款比例)</span>;
  1031. } else {
  1032. if (this.props.isZxs) {
  1033. return <span>***</span>;
  1034. }
  1035. return <span>{text}</span>;
  1036. }
  1037. }
  1038. },
  1039. },
  1040. {
  1041. title: "服务年限",
  1042. dataIndex: "startDate",
  1043. key: "startDate",
  1044. render: (text, record) => {
  1045. if (record.dunTypeName) {
  1046. return <span>{text}</span>;
  1047. }
  1048. },
  1049. },
  1050. {
  1051. title: "催款状态",
  1052. dataIndex: "status",
  1053. key: "status",
  1054. render: (text) => {
  1055. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1056. },
  1057. },
  1058. ],
  1059. resVisible: false,
  1060. columnsrizhi: [
  1061. {
  1062. title: "流程",
  1063. dataIndex: "processName",
  1064. key: "processName",
  1065. },
  1066. {
  1067. title: "操作人",
  1068. dataIndex: "adminName",
  1069. key: "adminName",
  1070. },
  1071. {
  1072. title: "时间",
  1073. dataIndex: "createDate",
  1074. key: "createDate",
  1075. },
  1076. ],
  1077. contactList: [],
  1078. ContactsLists: [
  1079. {
  1080. title: "催款科目",
  1081. dataIndex: "dunSubject",
  1082. key: "dunSubject",
  1083. render: (text, record) => {
  1084. return (
  1085. <Select
  1086. placeholder="请选择催款科目"
  1087. value={record.dunSubject}
  1088. style={{ width: "150px" }}
  1089. disabled
  1090. onChange={(e) => {
  1091. record.dunSubject = e;
  1092. this.setState({ contactList: this.state.contactList });
  1093. }}
  1094. >
  1095. {jiedian.map(function (item) {
  1096. return (
  1097. <Select.Option key={item.value}>{item.key}</Select.Option>
  1098. );
  1099. })}
  1100. </Select>
  1101. );
  1102. },
  1103. },
  1104. {
  1105. title: "金额(万元)",
  1106. dataIndex: "money",
  1107. key: "money",
  1108. render: (text, record) => {
  1109. return (
  1110. <Input
  1111. type="number"
  1112. value={record.money}
  1113. placeholder="请输入金额(必填项)"
  1114. disabled
  1115. key={record.id}
  1116. required="required"
  1117. onChange={(e) => {
  1118. record.money = e.target.value;
  1119. this.setState({ contactList: this.state.contactList });
  1120. }}
  1121. style={{ width: "120px" }}
  1122. />
  1123. );
  1124. },
  1125. },
  1126. {
  1127. title: "催款状态",
  1128. dataIndex: "dunStatus",
  1129. key: "dunStatus",
  1130. render: (text) => {
  1131. return getCuikuan(text);
  1132. },
  1133. },
  1134. {
  1135. title: "操作",
  1136. dataIndex: "dels",
  1137. key: "dels",
  1138. render: (text, record) => {
  1139. return (
  1140. <div>
  1141. {
  1142. <Popconfirm
  1143. title="是否删除?"
  1144. onConfirm={() => {
  1145. this.confirmDelet(record.key);
  1146. }}
  1147. okText="删除"
  1148. cancelText="不删除"
  1149. >
  1150. <Button
  1151. style={{
  1152. marginRight: "10px",
  1153. color: "#ffffff",
  1154. background: "#f00",
  1155. border: "none",
  1156. display:
  1157. this.state.processStatus == 0 ? "block" : "none",
  1158. }}
  1159. >
  1160. 删除
  1161. </Button>
  1162. </Popconfirm>
  1163. }
  1164. {record.id ? (
  1165. ""
  1166. ) : (
  1167. <Button type="primary" onClick={this.contactSave}>
  1168. 保存
  1169. </Button>
  1170. )}
  1171. </div>
  1172. );
  1173. },
  1174. },
  1175. ],
  1176. ContactsListsNew: [
  1177. {
  1178. title: "项目名称",
  1179. dataIndex: "commodityName",
  1180. key: "commodityName",
  1181. render: (text, record, index) => {
  1182. let dataArr = this.state.dataSource || [];
  1183. if (text) {
  1184. return <span>{text + "-" + record.tid}</span>;
  1185. }
  1186. return (
  1187. <Select
  1188. placeholder="请选择名称"
  1189. style={{ width: "150px" }}
  1190. disabled={
  1191. this.state.getLoad && record.sortName ? true : false
  1192. }
  1193. onChange={(e) => {
  1194. // let num = e.lastIndexOf("-");
  1195. // let ctid = e.substr(num + 1);
  1196. // record.sortName = e.substring(0, num);
  1197. // dataArr.forEach((item) => {
  1198. // if (
  1199. // item.commodityName == record.sortName &&
  1200. // ctid == item.id
  1201. // ) {
  1202. // record.cname = item.cname;
  1203. // record.tid = item.id;
  1204. // record.isSave = true;
  1205. // record.sort = item.sort;
  1206. // cuiJieDian.forEach((item) => {
  1207. // if (item.value == record.sort) {
  1208. // record.arr = item.children;
  1209. // let yearFlag = true;
  1210. // if (record.sort == 6) {
  1211. // yearFlag = false;
  1212. // }
  1213. // this.setState({
  1214. // getLoad: true,
  1215. // yearFlag,
  1216. // });
  1217. // }
  1218. // });
  1219. // }
  1220. // });
  1221. let proData = dataArr[e];
  1222. record.cname = proData.cname;
  1223. record.tid = proData.id;
  1224. record.isSave = true;
  1225. record.sort = proData.sort;
  1226. cuiJieDian.forEach((item) => {
  1227. if (item.value == record.sort) {
  1228. record.arr = item.children;
  1229. let yearFlag = true;
  1230. if (record.sort == 6) {
  1231. yearFlag = false;
  1232. }
  1233. this.setState({
  1234. getLoad: true,
  1235. yearFlag,
  1236. });
  1237. }
  1238. });
  1239. }}
  1240. >
  1241. {dataArr.map((item) => {
  1242. return (
  1243. <Select.Option key={item.id} value={item.key}>
  1244. {item.commodityName + "-" + item.id}
  1245. </Select.Option>
  1246. );
  1247. })}
  1248. </Select>
  1249. );
  1250. },
  1251. },
  1252. {
  1253. title: "项目分类",
  1254. dataIndex: "projectType",
  1255. key: "projectType",
  1256. render: (text, record) => {
  1257. if (text) {
  1258. let arr = this.state.dataSource || [];
  1259. let str = "";
  1260. for (let i = 0; i < arr.length; i++) {
  1261. if (this.state.dataSource[i].sort == text) {
  1262. str = this.state.dataSource[i].cname;
  1263. return <span>{str}</span>;
  1264. }
  1265. }
  1266. if (!str) {
  1267. return <span>未知</span>;
  1268. }
  1269. }
  1270. if (this.state.getLoad) {
  1271. return (
  1272. <Select
  1273. style={{ width: "150px" }}
  1274. placeholder="请选择分类"
  1275. value={record.cname}
  1276. >
  1277. <Select.Option key={record.sort} value={record.cname}>
  1278. {record.cname}
  1279. </Select.Option>
  1280. </Select>
  1281. );
  1282. } else {
  1283. return (
  1284. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1285. <Select.Option key={record.sort} value={record.cname}>
  1286. {record.cname}
  1287. </Select.Option>
  1288. </Select>
  1289. );
  1290. }
  1291. },
  1292. },
  1293. {
  1294. title: "催款科目",
  1295. dataIndex: "dunTypeName",
  1296. key: "dunTypeName",
  1297. render: (text, record) => {
  1298. if (text) {
  1299. if (record.customizeName) {
  1300. return text + record.customizeName;
  1301. }
  1302. return <span>{text}</span>;
  1303. }
  1304. if (this.state.getLoad) {
  1305. let arr = record.arr || [];
  1306. return (
  1307. <div>
  1308. <Select
  1309. style={{ width: "150px", marginRight: 5 }}
  1310. placeholder="请选择分类"
  1311. onChange={(e) => {
  1312. record.dunType = e;
  1313. if (record.dunType == 0) {
  1314. record.customizeTimes = "";
  1315. record.customizeName = "";
  1316. }
  1317. if (e == 0) {
  1318. record.dunTypeCustom = true;
  1319. } else {
  1320. record.dunTypeCustom = false;
  1321. }
  1322. if (e != 1) {
  1323. this.setState({
  1324. timeFlag: true,
  1325. });
  1326. } else {
  1327. this.setState({
  1328. timeFlag: false,
  1329. });
  1330. }
  1331. if (e == 1 && record.sort == 6) {
  1332. this.setState({
  1333. yearFlag: true,
  1334. });
  1335. } else if (e != 1 && record.sort == 6) {
  1336. this.setState({
  1337. yearFlag: false,
  1338. });
  1339. }
  1340. if (record.sort == 3 && e == 3) {
  1341. this.setState({
  1342. boFlag: true,
  1343. });
  1344. } else {
  1345. this.setState({
  1346. boFlag: false,
  1347. });
  1348. }
  1349. }}
  1350. >
  1351. {arr.map((item) => {
  1352. return (
  1353. <Select.Option key={item.value} value={item.value}>
  1354. {item.key}
  1355. </Select.Option>
  1356. );
  1357. })}
  1358. <Select.Option key={0} value={0}>
  1359. 自定义
  1360. </Select.Option>
  1361. </Select>
  1362. {record.dunType == 0 ? (
  1363. <Input
  1364. value={record.customizeName}
  1365. placeholder="请输入自定义名称"
  1366. required="required"
  1367. onChange={(e) => {
  1368. record.customizeName = e.target.value;
  1369. this.setState({
  1370. contactList: this.state.contactList,
  1371. });
  1372. }}
  1373. style={{ width: "120px" }}
  1374. />
  1375. ) : (
  1376. ""
  1377. )}
  1378. </div>
  1379. );
  1380. } else {
  1381. return (
  1382. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1383. <Select.Option
  1384. key={0}
  1385. value={"请选择上一项"}
  1386. ></Select.Option>
  1387. </Select>
  1388. );
  1389. }
  1390. },
  1391. },
  1392. {
  1393. title: "收款时间(特批需选择时间)",
  1394. dataIndex: "waitDay",
  1395. key: "waitDay",
  1396. render: (text, record) => {
  1397. if (record.dunTypeName) {
  1398. if (record.customizeTimes) {
  1399. return record.customizeTimes;
  1400. }
  1401. if (text == 0) {
  1402. var str = "当天";
  1403. } else if (!text) {
  1404. var str = "";
  1405. } else {
  1406. var str = text + "天";
  1407. }
  1408. return <span>{str}</span>;
  1409. }
  1410. return (
  1411. <div>
  1412. {record.dunType == 0 ? (
  1413. <DatePicker
  1414. style={{ width: 150 }}
  1415. disabledDate={(e) => {
  1416. let time = moment(e).valueOf();
  1417. let today = Date.parse(new Date());
  1418. if (time <= today) {
  1419. return true;
  1420. }
  1421. }}
  1422. onChange={(e, t) => {
  1423. record.customizeTimes = t;
  1424. }}
  1425. />
  1426. ) : (
  1427. <Select
  1428. placeholder="请选择时间"
  1429. style={{ width: "160px" }}
  1430. disabled={
  1431. this.state.approval != 0 && !this.state.timeFlag
  1432. ? false
  1433. : true
  1434. }
  1435. onChange={(e) => {
  1436. record.waitDay = e;
  1437. }}
  1438. >
  1439. <Select.Option key={0}>当天</Select.Option>
  1440. <Select.Option key={3}>3天</Select.Option>
  1441. <Select.Option key={5}>5天</Select.Option>
  1442. <Select.Option key={7}>7天</Select.Option>
  1443. <Select.Option key={15}>15天</Select.Option>
  1444. </Select>
  1445. )}
  1446. </div>
  1447. );
  1448. },
  1449. },
  1450. {
  1451. title: "金额(万元)",
  1452. dataIndex: "money",
  1453. key: "money",
  1454. render: (text, record) => {
  1455. if (record.dunTypeName) {
  1456. if (record.appropriationRatio) {
  1457. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  1458. percent += "%";
  1459. return <span>{percent}(拨款比例)</span>;
  1460. } else {
  1461. return <span>{text}</span>;
  1462. }
  1463. }
  1464. return (
  1465. <div>
  1466. <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
  1467. <Select
  1468. placeholder="选择"
  1469. defaultValue={"金额"}
  1470. onChange={(e) => {
  1471. record.boStatus = e;
  1472. }}
  1473. >
  1474. <Select.Option key={true}>比例</Select.Option>
  1475. <Select.Option key={false}>金额</Select.Option>
  1476. </Select>
  1477. </div>
  1478. <div style={{ float: "right" }}>
  1479. <Input
  1480. type="number"
  1481. value={record.money}
  1482. key={record.id}
  1483. required="required"
  1484. onChange={(e) => {
  1485. record.money = e.target.value;
  1486. this.setState({
  1487. contactList: this.state.contactList,
  1488. });
  1489. }}
  1490. style={{ width: "120px" }}
  1491. />
  1492. </div>
  1493. </div>
  1494. )
  1495. // if (this.state.boFlag) {
  1496. // return (
  1497. // <div>
  1498. // <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
  1499. // <Select
  1500. // placeholder="选择"
  1501. // defaultValue={"金额"}
  1502. // onChange={(e) => {
  1503. // record.boStatus = e;
  1504. // }}
  1505. // >
  1506. // <Select.Option key={true}>比例</Select.Option>
  1507. // <Select.Option key={false}>金额</Select.Option>
  1508. // </Select>
  1509. // </div>
  1510. // <div style={{ float: "right" }}>
  1511. // <Input
  1512. // type="number"
  1513. // value={record.money}
  1514. // key={record.id}
  1515. // required="required"
  1516. // onChange={(e) => {
  1517. // record.money = e.target.value;
  1518. // this.setState({
  1519. // contactList: this.state.contactList,
  1520. // });
  1521. // }}
  1522. // style={{ width: "120px" }}
  1523. // />
  1524. // </div>
  1525. // </div>
  1526. // );
  1527. // } else {
  1528. // return (
  1529. // <div>
  1530. // <Input
  1531. // type="number"
  1532. // value={record.money}
  1533. // placeholder="请输入金额(必填项)"
  1534. // key={record.id}
  1535. // required="required"
  1536. // onChange={(e) => {
  1537. // record.money = e.target.value;
  1538. // this.setState({ contactList: this.state.contactList });
  1539. // }}
  1540. // style={{ width: "120px" }}
  1541. // />
  1542. // </div>
  1543. // );
  1544. // }
  1545. },
  1546. },
  1547. {
  1548. title: "服务年限",
  1549. dataIndex: "startDate",
  1550. key: "startDate",
  1551. render: (text, record) => {
  1552. if (record.dunTypeName) {
  1553. return <span>{text}</span>;
  1554. }
  1555. return (
  1556. <div>
  1557. {record.dunType != 0 ? (
  1558. <Select
  1559. placeholder="请选择年限"
  1560. style={{ width: "150px" }}
  1561. disabled={this.state.yearFlag ? true : false}
  1562. onChange={(e) => {
  1563. record.effectiveCount = e;
  1564. }}
  1565. >
  1566. {/* <Select.Option key={null}>无</Select.Option> */}
  1567. <Select.Option key={1}>一年</Select.Option>
  1568. <Select.Option key={3}>两年</Select.Option>
  1569. <Select.Option key={5}>三年</Select.Option>
  1570. <Select.Option key={7}>四年</Select.Option>
  1571. <Select.Option key={9}>五年</Select.Option>
  1572. </Select>
  1573. ) : (
  1574. <div />
  1575. )}
  1576. </div>
  1577. );
  1578. },
  1579. },
  1580. {
  1581. title: "催款状态",
  1582. dataIndex: "status",
  1583. key: "status",
  1584. render: (text) => {
  1585. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  1586. },
  1587. },
  1588. {
  1589. title: "操作",
  1590. dataIndex: "dels",
  1591. key: "dels",
  1592. render: (text, record, index) => {
  1593. return (
  1594. <div>
  1595. {this.state.processStatus == 0 ? (
  1596. <Popconfirm
  1597. title="是否删除?"
  1598. onConfirm={() => {
  1599. this.confirmDeletNew(record);
  1600. }}
  1601. okText="删除"
  1602. cancelText="不删除"
  1603. >
  1604. <Button
  1605. style={{
  1606. marginRight: "10px",
  1607. color: "#ffffff",
  1608. background: "#f00",
  1609. border: "none",
  1610. }}
  1611. >
  1612. 删除
  1613. </Button>
  1614. </Popconfirm>
  1615. ) : (
  1616. ""
  1617. )}
  1618. {record.isSave ? (
  1619. <Button
  1620. type="primary"
  1621. onClick={(e) => {
  1622. this.contactSaveNew(record);
  1623. }}
  1624. >
  1625. 保存
  1626. </Button>
  1627. ) : (
  1628. ""
  1629. )}
  1630. </div>
  1631. );
  1632. },
  1633. },
  1634. ],
  1635. changeCuiList: [
  1636. {
  1637. title: "变更状态",
  1638. dataIndex: "type",
  1639. key: "type",
  1640. render: (text) => {
  1641. let str = "";
  1642. let color = "";
  1643. if (text == 1) {
  1644. str = "增";
  1645. color = "#87d068";
  1646. } else if (text == 2) {
  1647. str = "改";
  1648. color = "#108ee9";
  1649. } else if (text == 3) {
  1650. str = "删";
  1651. color = "#f50";
  1652. }
  1653. return (
  1654. <Tag
  1655. color={color}
  1656. style={{ display: text == 0 ? "none" : "inline-block" }}
  1657. >
  1658. {str}
  1659. </Tag>
  1660. );
  1661. },
  1662. },
  1663. {
  1664. title: "项目名称",
  1665. dataIndex: "commodityName",
  1666. key: "commodityName",
  1667. render: (text, record, index) => {
  1668. let dataArr = this.state.proDataSource || [];
  1669. if (text) {
  1670. // return <span>{text + "-" + record.ctid}</span>;
  1671. if (record.ctid) {
  1672. return <span>{text + "-" + record.ctid}</span>;
  1673. } else {
  1674. let tid = record.tid;
  1675. let ctid = "";
  1676. dataArr.forEach((item, index) => {
  1677. if (item.tid == tid) {
  1678. ctid = item.id;
  1679. }
  1680. });
  1681. return <span>{text + "-" + ctid}</span>;
  1682. }
  1683. }
  1684. return (
  1685. <Select
  1686. placeholder="请选择名称"
  1687. style={{ width: "150px" }}
  1688. disabled={
  1689. this.state.getLoad && record.sortName ? true : false
  1690. }
  1691. onChange={(e) => {
  1692. let proData = dataArr[e];
  1693. record.cname = proData.cname;
  1694. record.ctid = proData.id;
  1695. record.isSave = true;
  1696. record.sort = proData.cSort;
  1697. cuiJieDian.forEach((item) => {
  1698. if (item.value == record.sort) {
  1699. record.arr = item.children;
  1700. let yearFlag = true;
  1701. if (record.sort == 6) {
  1702. yearFlag = false;
  1703. }
  1704. this.setState({
  1705. getLoad: true,
  1706. yearFlag,
  1707. });
  1708. }
  1709. });
  1710. }}
  1711. >
  1712. {dataArr.map((item, index) => {
  1713. if (item.type == 3) {
  1714. return (
  1715. <Select.Option key={item.id} value={item.key} disabled>
  1716. {item.commodityName + "-" + item.id}
  1717. </Select.Option>
  1718. );
  1719. } else {
  1720. return (
  1721. <Select.Option key={item.id} value={item.key}>
  1722. {item.commodityName + "-" + item.id}
  1723. </Select.Option>
  1724. );
  1725. }
  1726. })}
  1727. </Select>
  1728. );
  1729. },
  1730. },
  1731. {
  1732. title: "项目分类",
  1733. dataIndex: "projectType",
  1734. key: "projectType",
  1735. render: (text, record) => {
  1736. if (text) {
  1737. let arr = this.state.proDataSource || [];
  1738. let str = "";
  1739. for (let i = 0; i < arr.length; i++) {
  1740. if (this.state.proDataSource[i].cSort == text) {
  1741. str = this.state.proDataSource[i].cname;
  1742. return <span>{str}</span>;
  1743. }
  1744. }
  1745. }
  1746. if (this.state.getLoad) {
  1747. return (
  1748. <Select
  1749. style={{ width: "150px" }}
  1750. placeholder="请选择分类"
  1751. value={record.cname}
  1752. >
  1753. <Select.Option key={record.sort} value={record.cname}>
  1754. {record.cname}
  1755. </Select.Option>
  1756. </Select>
  1757. );
  1758. } else {
  1759. return (
  1760. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1761. <Select.Option key={record.sort} value={record.cname}>
  1762. {record.cname}
  1763. </Select.Option>
  1764. </Select>
  1765. );
  1766. }
  1767. },
  1768. },
  1769. {
  1770. title: "催款科目",
  1771. dataIndex: "dunTypeName",
  1772. key: "dunTypeName",
  1773. render: (text, record) => {
  1774. if (text) {
  1775. return <span>{text}</span>;
  1776. }
  1777. if (this.state.getLoad) {
  1778. let arr = record.arr || [];
  1779. return (
  1780. <div>
  1781. <Select
  1782. style={{ width: "150px", marginRight: 5 }}
  1783. placeholder="请选择分类"
  1784. onChange={(e) => {
  1785. record.dunType = e;
  1786. if (record.dunType != 0) {
  1787. record.customizeTimes = "";
  1788. record.customizeName = "";
  1789. }
  1790. if (e != 1) {
  1791. this.setState({
  1792. timeFlag: true,
  1793. });
  1794. } else {
  1795. this.setState({
  1796. timeFlag: false,
  1797. });
  1798. }
  1799. if (e == 1 && record.sort == 6) {
  1800. this.setState({
  1801. yearFlag: true,
  1802. });
  1803. } else if (e != 1 && record.sort == 6) {
  1804. this.setState({
  1805. yearFlag: false,
  1806. });
  1807. }
  1808. if (record.sort == 3 && e == 3) {
  1809. this.setState({
  1810. boFlag: true,
  1811. });
  1812. } else {
  1813. this.setState({
  1814. boFlag: false,
  1815. });
  1816. }
  1817. }}
  1818. >
  1819. {arr.map((item) => {
  1820. record;
  1821. return (
  1822. <Select.Option key={item.value} value={item.value}>
  1823. {item.key}
  1824. </Select.Option>
  1825. );
  1826. })}
  1827. <Select.Option key={0} value={0}>
  1828. 自定义
  1829. </Select.Option>
  1830. </Select>
  1831. {record.dunType == 0 ? (
  1832. <Input
  1833. value={record.customizeName}
  1834. placeholder="请输入自定义名称"
  1835. required="required"
  1836. onChange={(e) => {
  1837. record.customizeName = e.target.value;
  1838. this.setState({
  1839. contactList: this.state.contactList,
  1840. });
  1841. }}
  1842. style={{ width: "120px" }}
  1843. />
  1844. ) : (
  1845. ""
  1846. )}
  1847. </div>
  1848. );
  1849. } else {
  1850. return (
  1851. <Select style={{ width: "150px" }} placeholder="请选择分类">
  1852. <Select.Option
  1853. key={0}
  1854. value={"请选择上一项"}
  1855. ></Select.Option>
  1856. </Select>
  1857. );
  1858. }
  1859. },
  1860. },
  1861. {
  1862. title: "收款时间(特批需选择时间)",
  1863. dataIndex: "waitDay",
  1864. key: "waitDay",
  1865. render: (text, record) => {
  1866. if (record.dunTypeName) {
  1867. if (record.customizeTimes) {
  1868. return record.customizeTimes;
  1869. }
  1870. if (text == 0) {
  1871. var str = "当天";
  1872. } else if (!text) {
  1873. var str = "";
  1874. } else {
  1875. var str = text + "天";
  1876. }
  1877. return <span>{str}</span>;
  1878. }
  1879. return (
  1880. <div>
  1881. {record.dunType == 0 ? (
  1882. <DatePicker
  1883. style={{ width: 150 }}
  1884. disabledDate={(e) => {
  1885. let time = moment(e).valueOf();
  1886. let today = Date.parse(new Date());
  1887. if (time <= today) {
  1888. return true;
  1889. }
  1890. }}
  1891. onChange={(e, t) => {
  1892. record.customizeTimes = t;
  1893. }}
  1894. />
  1895. ) : (
  1896. <Select
  1897. placeholder="请选择时间"
  1898. style={{ width: "160px" }}
  1899. disabled={
  1900. this.state.approval != 0 && !this.state.timeFlag
  1901. ? false
  1902. : true
  1903. }
  1904. onChange={(e) => {
  1905. record.waitDay = e;
  1906. }}
  1907. >
  1908. <Select.Option key={0}>当天</Select.Option>
  1909. <Select.Option key={3}>3天</Select.Option>
  1910. <Select.Option key={5}>5天</Select.Option>
  1911. <Select.Option key={7}>7天</Select.Option>
  1912. <Select.Option key={15}>15天</Select.Option>
  1913. </Select>
  1914. )}
  1915. </div>
  1916. );
  1917. },
  1918. },
  1919. {
  1920. title: "金额(万元)",
  1921. dataIndex: "money",
  1922. key: "money",
  1923. render: (text, record) => {
  1924. if (record.dunTypeName) {
  1925. if (record.appropriationRatio) {
  1926. let percent = Number(record.appropriationRatio * 100).toFixed(2);
  1927. percent += "%";
  1928. return <span>{percent}(拨款比例)</span>;
  1929. } else {
  1930. return <span>{text}</span>;
  1931. }
  1932. }
  1933. return (
  1934. <div>
  1935. <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
  1936. <Select
  1937. placeholder="选择"
  1938. defaultValue={"金额"}
  1939. onChange={(e) => {
  1940. record.boStatus = e;
  1941. }}
  1942. >
  1943. <Select.Option key={true}>比例</Select.Option>
  1944. <Select.Option key={false}>金额</Select.Option>
  1945. </Select>
  1946. </div>
  1947. <div style={{ float: "right" }}>
  1948. <Input
  1949. type="number"
  1950. value={record.money}
  1951. key={record.id}
  1952. required="required"
  1953. onChange={(e) => {
  1954. record.money = e.target.value;
  1955. this.setState({
  1956. contactList: this.state.contactList,
  1957. });
  1958. }}
  1959. style={{ width: "120px" }}
  1960. />
  1961. </div>
  1962. </div>
  1963. );
  1964. // if (this.state.boFlag) {
  1965. // return (
  1966. // <div>
  1967. // <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
  1968. // <Select
  1969. // placeholder="选择"
  1970. // defaultValue={"金额"}
  1971. // onChange={(e) => {
  1972. // record.boStatus = e;
  1973. // }}
  1974. // >
  1975. // <Select.Option key={true}>比例</Select.Option>
  1976. // <Select.Option key={false}>金额</Select.Option>
  1977. // </Select>
  1978. // </div>
  1979. // <div style={{ float: "right" }}>
  1980. // <Input
  1981. // type="number"
  1982. // value={record.money}
  1983. // key={record.id}
  1984. // required="required"
  1985. // onChange={(e) => {
  1986. // record.money = e.target.value;
  1987. // this.setState({
  1988. // contactList: this.state.contactList,
  1989. // });
  1990. // }}
  1991. // style={{ width: "120px" }}
  1992. // />
  1993. // </div>
  1994. // </div>
  1995. // );
  1996. // } else {
  1997. // return (
  1998. // <div>
  1999. // <Input
  2000. // type="number"
  2001. // value={record.money}
  2002. // placeholder="请输入金额(必填项)"
  2003. // key={record.id}
  2004. // required="required"
  2005. // onChange={(e) => {
  2006. // record.money = e.target.value;
  2007. // this.setState({ contactList: this.state.contactList });
  2008. // }}
  2009. // style={{ width: "120px" }}
  2010. // />
  2011. // </div>
  2012. // );
  2013. // }
  2014. },
  2015. },
  2016. {
  2017. title: "服务年限",
  2018. dataIndex: "startDate",
  2019. key: "startDate",
  2020. render: (text, record) => {
  2021. if (record.dunTypeName) {
  2022. return <span>{text}</span>;
  2023. }
  2024. return (
  2025. <Select
  2026. placeholder="请选择年限"
  2027. style={{ width: "150px" }}
  2028. disabled={this.state.yearFlag ? true : false}
  2029. onChange={(e) => {
  2030. record.effectiveCount = e;
  2031. }}
  2032. >
  2033. {/* <Select.Option key={null}>无</Select.Option> */}
  2034. <Select.Option key={1}>一年</Select.Option>
  2035. <Select.Option key={3}>两年</Select.Option>
  2036. <Select.Option key={5}>三年</Select.Option>
  2037. <Select.Option key={7}>四年</Select.Option>
  2038. <Select.Option key={9}>五年</Select.Option>
  2039. </Select>
  2040. );
  2041. },
  2042. },
  2043. {
  2044. title: "催款状态",
  2045. dataIndex: "status",
  2046. key: "status",
  2047. render: (text) => {
  2048. return <span>{text == 1 ? "已启动" : "未启动"}</span>;
  2049. },
  2050. },
  2051. {
  2052. title: "操作",
  2053. dataIndex: "dels",
  2054. key: "dels",
  2055. render: (text, record, index) => {
  2056. return (
  2057. <div>
  2058. <Popconfirm
  2059. title="是否删除?"
  2060. onConfirm={() => {
  2061. this.changeDeleteCui(record);
  2062. }}
  2063. okText="删除"
  2064. cancelText="不删除"
  2065. >
  2066. <Button
  2067. disabled={this.state.listCuiFlag}
  2068. style={{
  2069. marginRight: "10px",
  2070. display: this.state.displayList ? "none" : "block",
  2071. }}
  2072. >
  2073. 删除
  2074. </Button>
  2075. </Popconfirm>
  2076. {record.isSave ? (
  2077. <Button
  2078. type="primary"
  2079. style={{ marginTop: 5 }}
  2080. onClick={(e) => {
  2081. this.changeSaveCui(record);
  2082. }}
  2083. >
  2084. 保存
  2085. </Button>
  2086. ) : (
  2087. ""
  2088. )}
  2089. </div>
  2090. );
  2091. },
  2092. },
  2093. ],
  2094. updatas: {},//销售类型修改数据
  2095. newData: {},//新建会员记忆数据
  2096. serviceLife: [],
  2097. isVip: undefined,//是否会员
  2098. isIso: undefined,//是否贯标
  2099. histYear: [],
  2100. contractTerm: [],//合同期
  2101. isEdit: false,//是否可编辑
  2102. addyear: undefined,//
  2103. isGive: 0,//是否赠送
  2104. cPeriod: false, // 合同期是否可编辑
  2105. isNew: false,// 是否替换合同
  2106. sType: "",
  2107. selectList: [],// 可操作项目集
  2108. };
  2109. },
  2110. getpatentTypeList() {
  2111. $.ajax({
  2112. method: "get",
  2113. dataType: "json",
  2114. crossDomain: false,
  2115. url: globalConfig.context + "/api/admin/orderProject/getPatentType",
  2116. success: function (data) {
  2117. if (data.error.length === 0) {
  2118. this.setState({
  2119. patentTypeList: data.data,
  2120. });
  2121. } else {
  2122. message.warning(data.error[0].message);
  2123. }
  2124. }.bind(this),
  2125. });
  2126. },
  2127. departmentList() {
  2128. this.setState({
  2129. loading: true,
  2130. });
  2131. $.ajax({
  2132. method: "get",
  2133. dataType: "json",
  2134. crossDomain: false,
  2135. url: globalConfig.context + "/api/admin/organization/selectSuperId",
  2136. data: {},
  2137. success: function (data) {
  2138. let thedata = data.data;
  2139. let theArr = [];
  2140. if (!thedata) {
  2141. if (data.error && data.error.length) {
  2142. message.warning(data.error[0].message);
  2143. }
  2144. thedata = {};
  2145. } else {
  2146. thedata.forEach((item) => {
  2147. theArr.push({
  2148. key: item.id,
  2149. name: item.name,
  2150. id: item.id,
  2151. depNo: item.depNo,
  2152. })
  2153. if (item.list) {
  2154. item.list.forEach((itl) => {
  2155. theArr.push({
  2156. key: itl.id,
  2157. name: itl.name,
  2158. id: itl.id,
  2159. depNo: itl.depNo,
  2160. })
  2161. });
  2162. }
  2163. })
  2164. }
  2165. this.setState({
  2166. departmentArr: theArr,
  2167. });
  2168. }.bind(this),
  2169. }).always(
  2170. function () {
  2171. this.setState({
  2172. loading: false,
  2173. });
  2174. }.bind(this)
  2175. );
  2176. },
  2177. // 拆分详细
  2178. showRes(record) {
  2179. this.setState({
  2180. resVisible: true,
  2181. resRecord: record,
  2182. });
  2183. },
  2184. resCancel() {
  2185. this.setState({
  2186. resVisible: false,
  2187. });
  2188. },
  2189. //新建订单、编辑订单保存
  2190. handleSubmit(e) {
  2191. e.preventDefault();
  2192. let theorgCodeUrl = [];
  2193. if (this.state.orgCodeUrl.length) {
  2194. let picArr = [];
  2195. this.state.orgCodeUrl.map(function (item) {
  2196. if (
  2197. item.response &&
  2198. item.response.data &&
  2199. item.response.data.length
  2200. ) {
  2201. picArr.push(item.response.data);
  2202. }
  2203. });
  2204. theorgCodeUrl = picArr.join(",");
  2205. }
  2206. let theReplenishUrl = [];
  2207. if (this.state.replenishUrl.length) {
  2208. let picArr = [];
  2209. this.state.replenishUrl.map(function (item) {
  2210. if (
  2211. item.response &&
  2212. item.response.data &&
  2213. item.response.data.length
  2214. ) {
  2215. picArr.push(item.response.data);
  2216. }
  2217. });
  2218. theReplenishUrl = picArr.join(",");
  2219. }
  2220. // 服务内容上传图片
  2221. let contentUrl = [];
  2222. if (this.props.userDetaile) {
  2223. if (this.state.contentUrl.length) {
  2224. let picArr = [];
  2225. this.state.contentUrl.map(function (item) {
  2226. if (
  2227. item.response &&
  2228. item.response.data &&
  2229. item.response.data.length
  2230. ) {
  2231. picArr.push(item.response.data);
  2232. }
  2233. });
  2234. contentUrl = picArr.join(",");
  2235. } else {
  2236. message.info("请上传服务内容图片")
  2237. return
  2238. }
  2239. }
  2240. if (this.props.userDetaile) {
  2241. if (!this.state.signDate) {
  2242. message.warning("签单日期不能为空");
  2243. $(".signDateRef input").focus();
  2244. return false;
  2245. }
  2246. if (isNaN(parseInt(this.state.totalAmount))) {
  2247. message.warning("签单金额不能为空");
  2248. this.refs.totalAmountRef.focus();
  2249. return false;
  2250. }
  2251. if (isNaN(parseInt(this.state.firstAmount))) {
  2252. message.warning("首付金额不能为空");
  2253. this.refs.firstAmountRef.focus();
  2254. return false;
  2255. }
  2256. if (moneyVerify(this.state.firstAmount)) {
  2257. return;
  2258. }
  2259. if (moneyVerify(this.state.totalAmount)) {
  2260. return;
  2261. }
  2262. if (!this.state.contacts) {
  2263. message.warning("企业联系人不能为空");
  2264. return
  2265. }
  2266. if (!this.state.contactMobile) {
  2267. message.warning("企业联系人电话不能为空");
  2268. return
  2269. }
  2270. var regeX1 = /^1[3456789]\d{9}$/;
  2271. var regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
  2272. if (regeX1.test(this.state.contactMobile) == false && regex2.test(this.state.contactMobile) == false) {
  2273. message.warning("请输入正确的企业联系人电话");
  2274. return false;
  2275. }
  2276. if (!theorgCodeUrl) {
  2277. message.warning("图片过大,上传失败");
  2278. this.refs.signFirstPayment.focus();
  2279. return false;
  2280. }
  2281. if (this.state.isShow) {
  2282. if (this.state.knowledgeServices == null ||
  2283. this.state.auditServices == null ||
  2284. this.state.addDeductionServices == null) {
  2285. message.warn("请完善高新纯咨询合同说明!")
  2286. return
  2287. }
  2288. }
  2289. if (!this.state.isProperty) {
  2290. message.warn("请完善知识产权情况!")
  2291. return
  2292. }
  2293. if (this.state.isProperty == 2 && !this.state.patentStatus) {
  2294. message.warn("请完善知识产权情况!")
  2295. return
  2296. }
  2297. if (!this.state.orderRemarks) {
  2298. message.warning("订单留言不能为空");
  2299. this.refs.orderRemarksRef.focus();
  2300. return false;
  2301. }
  2302. if (this.state.approval == 1) {
  2303. if (this.state.approvaType && this.state.approvaType.length == 0) {
  2304. message.warning("请勾选特批状态!");
  2305. return false;
  2306. }
  2307. if (this.state.approvaType.indexOf(0) !== -1 && !this.state.typeExplain) {
  2308. message.warning("请填写特批其他说明!");
  2309. return false;
  2310. }
  2311. }
  2312. }
  2313. const arr = this.state.contactListNew || [];
  2314. for (let i = 0; i < arr.length; i++) {
  2315. if (
  2316. arr[i].dunType == 1 &&
  2317. arr[i].waitDay != null &&
  2318. this.state.approval == 0
  2319. ) {
  2320. message.warning(
  2321. "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
  2322. );
  2323. return false;
  2324. } else if (
  2325. arr[i].dunType == 1 &&
  2326. arr[i].waitDay == null &&
  2327. this.state.approval == 1
  2328. ) {
  2329. message.warning(
  2330. "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
  2331. );
  2332. return false;
  2333. }
  2334. if (!this.state.contactListNew[i].id && this.props.userDetaile) {
  2335. message.warning("请保存催款节点");
  2336. return false;
  2337. }
  2338. }
  2339. this.setState({
  2340. loading: true,
  2341. });
  2342. let api = this.props.userDetaile
  2343. ? this.state.isSubmit == 1 ? "/api/admin/newOrder/submitOrder" : "/api/admin/newOrder/updateServiceOrderNew"
  2344. : "/api/admin/newOrder/createOrder";
  2345. const { selectSales, other, channelid, channelname, userType } = this.state
  2346. // 开单
  2347. let datas = {
  2348. uid: this.state.autoId,//用户id
  2349. orderType: this.state.orderType,//订单类型
  2350. salesType: selectSales,//销售类型
  2351. userType: userType,//客户所属类型
  2352. };
  2353. if (selectSales == "3") { //传渠道编号 other里面传渠道名称
  2354. datas = Object.assign(datas, {
  2355. channelId: channelid,
  2356. other: channelname,
  2357. })
  2358. } else if (selectSales == "4" || selectSales == "5") { //4,5要传描述
  2359. datas = Object.assign(datas, {
  2360. other: other,
  2361. })
  2362. }
  2363. $.ajax({
  2364. method: "POST",
  2365. dataType: "json",
  2366. crossDomain: false,
  2367. url: globalConfig.context + api,
  2368. data: !this.props.userDetaile
  2369. ? datas
  2370. : {
  2371. // 签单、保存
  2372. orderNo: this.state.orderNo, //订单编号
  2373. totalAmount: this.state.totalAmount, //总金额
  2374. firstAmount: this.state.firstAmount, //首付
  2375. isSubmit: this.state.isSubmit, //保存草稿还是提交
  2376. signDate: this.state.signDate, //签单日期
  2377. contacts: this.state.contacts, //企业负责人
  2378. contactMobile: this.state.contactMobile, //负责人联系方式
  2379. legalPerson: this.state.legalPerson, //企业法人
  2380. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  2381. approval: this.state.approval, //特批状态
  2382. orderRemarks: this.state.orderRemarks, //订单备注
  2383. contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  2384. agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
  2385. serviceContent: contentUrl.length ? contentUrl : "",
  2386. orderDep: this.state.organizationSearch,
  2387. knowledgeServices: this.state.isShow ? this.state.knowledgeServices : undefined, //知识产权服务
  2388. auditServices: this.state.isShow ? this.state.auditServices : undefined, //审计服务
  2389. addDeductionServices: this.state.isShow ? this.state.addDeductionServices : undefined, //加计扣除服务
  2390. knowledgeOther: this.state.isShow ? this.state.knowledgeOther : undefined, //知识产权服务其他描述
  2391. auditOther: this.state.isShow ? this.state.auditOther : undefined, //审计服务其他描述
  2392. addDeductionOther: this.state.isShow ? this.state.addDeductionOther : undefined, //加计扣除服务其他描述
  2393. patentStatus: this.state.patentStatus, //知识产权情况
  2394. type: this.state.approvaType.sort(compare).toString(), // 特批类型
  2395. typeExplain: this.state.approvaType.indexOf(0) === -1 ? "" : this.state.typeExplain, // 其他备注
  2396. },
  2397. }).done(
  2398. function (data) {
  2399. this.setState({
  2400. loading: false,
  2401. });
  2402. if (!data.error.length) {
  2403. message.success("保存成功!");
  2404. this.handleOk();
  2405. if (this.state.autoId) {
  2406. this.loadData();
  2407. }
  2408. } else {
  2409. message.warning(data.error[0].message);
  2410. }
  2411. }.bind(this)
  2412. );
  2413. },
  2414. //订单作废
  2415. examOks() {
  2416. this.setState({
  2417. loading: true,
  2418. });
  2419. $.ajax({
  2420. method: "post",
  2421. dataType: "json",
  2422. crossDomain: false,
  2423. url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
  2424. data: {
  2425. orderNo: this.state.orderNo, //订单编号
  2426. },
  2427. success: function (data) {
  2428. if (data.error.length || data.data.list == "") {
  2429. if (data.error && data.error.length) {
  2430. message.warning(data.error[0].message);
  2431. }
  2432. } else {
  2433. message.success("操作成功~");
  2434. this.setState({
  2435. visible: false,
  2436. loading: false,
  2437. });
  2438. this.props.closeDesc(false);
  2439. }
  2440. }.bind(this),
  2441. }).always(
  2442. function () {
  2443. this.setState({
  2444. loading: false,
  2445. });
  2446. }.bind(this)
  2447. );
  2448. },
  2449. //订单详情修改
  2450. xiangqingClick(e) {
  2451. e.preventDefault();
  2452. this.setState({
  2453. loading: true,
  2454. });
  2455. if (this.state.approval == 2 || this.state.approval == 3) {
  2456. message.warning("特批状态不正确");
  2457. this.setState({
  2458. loading: false,
  2459. });
  2460. return;
  2461. }
  2462. $.ajax({
  2463. url: globalConfig.context + this.state.isSubmit == 1 ? "/api/admin/newOrder/submitOrder" : "/api/admin/newOrder/updateServiceOrderNew",
  2464. method: "post",
  2465. data: {
  2466. orderNo: this.state.orderNo, //订单编号
  2467. totalAmount: this.state.totalAmount, //总金额
  2468. firstAmount: this.state.firstAmount, //首付
  2469. isSubmit: this.state.isSubmit, //保存草稿还是提交
  2470. signDate: this.state.selTime, //签单日期
  2471. contacts: this.state.contacts, //企业负责人
  2472. contactMobile: this.state.contactMobile, //负责人联系方式
  2473. legalPerson: this.state.legalPerson, //企业法人
  2474. legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
  2475. approval: this.state.approval, //特批状态
  2476. orderRemarks: this.state.orderRemarks, //订单备注
  2477. },
  2478. }).done(
  2479. function (data) {
  2480. this.setState({
  2481. loading: false,
  2482. });
  2483. if (!data.error.length) {
  2484. message.success("保存成功!");
  2485. this.loaduser();
  2486. } else {
  2487. message.warning(data.error[0].message);
  2488. }
  2489. }.bind(this)
  2490. );
  2491. },
  2492. not() { },
  2493. //查看基本详情基本信息
  2494. loaduser(record) {
  2495. this.setState({
  2496. closable: false,
  2497. disabledView: "none",
  2498. });
  2499. this.state.orderList = [];
  2500. $.ajax({
  2501. method: "get",
  2502. dataType: "json",
  2503. crossDomain: false,
  2504. url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
  2505. data: {
  2506. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2507. },
  2508. success: function (data) {
  2509. let thisData = data.data;
  2510. if (!thisData) {
  2511. if (data.error && data.error.length) {
  2512. message.warning(data.error[0].message);
  2513. }
  2514. thisData = {};
  2515. }
  2516. // if (thisData.approval == 2) {
  2517. // thisData.approval = "特批通过";
  2518. // } else if (thisData.approval == 3) {
  2519. // thisData.approval = "特批驳回";
  2520. // }
  2521. this.setState({
  2522. id: thisData.id,
  2523. kehuId: thisData.buyerId,
  2524. orderNo: thisData.orderNo, //订单编号
  2525. orderType: thisData.orderType, //订单类型
  2526. firstAmount: thisData.firstAmount, //首付金额
  2527. totalAmount: thisData.totalAmount, //总金额
  2528. settlementAmount: thisData.settlementAmount, //结算金额
  2529. liquidationStatus: thisData.liquidationStatus, //清算状态
  2530. examineName: thisData.examineName,
  2531. processStatus: thisData.processStatus, //流程状态
  2532. approval: thisData.approval, //特批状态
  2533. orderRemarks: thisData.orderRemarks, //订单备注
  2534. contractNo: thisData.contractNo, //合同编号
  2535. contacts: thisData.contacts, //联系人
  2536. contactMobile: thisData.contactMobile, //联系人电话
  2537. legalPerson: thisData.legalPerson, //法人
  2538. legalPersonTel: thisData.legalPersonTel, //法人电话
  2539. knowledgeServices: thisData.knowledgeServices, //知识产权服务
  2540. auditServices: thisData.auditServices, //审计服务
  2541. addDeductionServices: thisData.addDeductionServices, //加计扣除服务
  2542. knowledgeOther: thisData.knowledgeOther, //知识产权服务其他描述
  2543. auditOther: thisData.auditOther, //审计服务其他描述
  2544. addDeductionOther: thisData.addDeductionOther, //加计扣除服务其他描述
  2545. patentStatus: thisData.patentStatus, // 知识产权情况
  2546. isProperty: thisData.patentStatus == null ? null : thisData.patentStatus == 0 ? 1 : 2,
  2547. approvaType: thisData.type ? thisData.type.split(",").map(Number) : [], // 特批类型
  2548. typeExplain: thisData.typeExplain,
  2549. orgCodeUrl: thisData.contractPictureUrl
  2550. ? splitUrl(
  2551. thisData.contractPictureUrl,
  2552. ",",
  2553. globalConfig.avatarHost + "/upload"
  2554. )
  2555. : [], //图片地址
  2556. replenishUrl: thisData.agreementUrl
  2557. ? splitUrl(
  2558. thisData.agreementUrl,
  2559. ",",
  2560. globalConfig.avatarHost + "/upload"
  2561. )
  2562. : [], //图片地址
  2563. contentUrl: thisData.serviceContent
  2564. ? splitUrl(
  2565. thisData.serviceContent,
  2566. ",",
  2567. globalConfig.avatarHost + "/upload"
  2568. )
  2569. : [], //图片地址
  2570. signDate: thisData.signDate, //签单时间
  2571. userName: thisData.userName, //客户名称
  2572. salesmanName: thisData.salesmanName, //营销员名称
  2573. salesmanMobile: thisData.salesmanMobile, //营销员电话
  2574. oldSalesmanName: thisData.oldSalesmanName, //营销员名称
  2575. oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
  2576. financeName: thisData.financeName, //财务名称
  2577. financeMobile: thisData.financeMobile, //财务电话
  2578. nowFinanceMobile: thisData.nowFinanceMobile,
  2579. nowFinance: thisData.nowFinance,
  2580. // approval:
  2581. // thisData.approval == 0
  2582. // ? thisData.approval.toString()
  2583. // : thisData.approval,
  2584. organizationSearch: thisData.orderDep,
  2585. depName: thisData.depName,
  2586. status: thisData.status,
  2587. outsource: thisData.outsource,
  2588. deleteSign: thisData.deleteSign,
  2589. orderUid: thisData.uid,
  2590. userType: thisData.userType,
  2591. updatas: {
  2592. salesType: thisData.salesType,//销售类型
  2593. userType: thisData.userType,//客户所属类型
  2594. other: thisData.other,//3渠道名 4,5描述
  2595. },
  2596. channelName: thisData.salesType == "3" ? thisData.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
  2597. });
  2598. // 判断状态
  2599. if (this.state.processStatus === 0) {
  2600. this.setState({
  2601. closable: true,
  2602. disabledView: "inline-block",
  2603. });
  2604. }
  2605. }.bind(this),
  2606. }).always(
  2607. function () {
  2608. this.setState({
  2609. loading: false,
  2610. });
  2611. }.bind(this)
  2612. );
  2613. },
  2614. //节点列表
  2615. jiedian(orderNos) {
  2616. this.setState({
  2617. loadData: true,
  2618. });
  2619. $.ajax({
  2620. method: "get",
  2621. dataType: "json",
  2622. crossDomain: false,
  2623. url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
  2624. data: {
  2625. orderNo: orderNos,
  2626. },
  2627. success: function (data) {
  2628. let theArr = [];
  2629. let thisData = [];
  2630. if (data.error.length || data.data.list == "") {
  2631. if (data.error && data.error.length) {
  2632. message.warning(data.error[0].message);
  2633. }
  2634. } else {
  2635. for (let i = 0; i < data.data.length; i++) {
  2636. thisData = data.data[i];
  2637. theArr.push({
  2638. key: i,
  2639. dunSubject: thisData.dunSubject
  2640. ? thisData.dunSubject.toString()
  2641. : "", //催款科目
  2642. id: thisData.id, //节点Id
  2643. money: thisData.money, //催款金额
  2644. dunStatus: thisData.dunStatus, //催款状态
  2645. orderNo: thisData.orderNo,
  2646. });
  2647. }
  2648. this.setState({
  2649. contactList: theArr,
  2650. });
  2651. }
  2652. }.bind(this),
  2653. }).always(
  2654. function () {
  2655. this.setState({
  2656. loading: false,
  2657. });
  2658. }.bind(this)
  2659. );
  2660. },
  2661. //查看催款节点
  2662. jiedianNew(orderNos) {
  2663. this.setState({
  2664. loadData: true,
  2665. });
  2666. $.ajax({
  2667. method: "get",
  2668. dataType: "json",
  2669. crossDomain: false,
  2670. url:
  2671. globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
  2672. data: {
  2673. orderNo: orderNos,
  2674. },
  2675. success: function (data) {
  2676. if (data.error && data.error.length) {
  2677. message.warning(data.error[0].message);
  2678. } else {
  2679. let theArr = [];
  2680. let thisData = [];
  2681. let arr = data.data || [];
  2682. let totalCui = 0;
  2683. for (let i = 0; i < arr.length; i++) {
  2684. thisData = arr[i];
  2685. totalCui += +thisData.money;
  2686. theArr.push({
  2687. key: i,
  2688. dunSubject: thisData.dunSubject
  2689. ? thisData.dunSubject.toString()
  2690. : "", //催款科目
  2691. id: thisData.id, //节点Id
  2692. money: thisData.money, //催款金额
  2693. // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  2694. commodityName: thisData.commodityName,
  2695. projectType: thisData.projectType,
  2696. dunTypeName: thisData.dunTypeName,
  2697. status: thisData.status,
  2698. waitDay: thisData.waitDay,
  2699. effectiveCount: thisData.effectiveCount,
  2700. startDate: thisData.startDate,
  2701. dunType: thisData.dunType,
  2702. appropriationRatio: thisData.appropriationRatio,
  2703. customizeName: thisData.customizeName,
  2704. customizeTimes: thisData.customizeTimes,
  2705. tid: thisData.tid,
  2706. });
  2707. }
  2708. if (!totalCui) {
  2709. totalCui = 0;
  2710. }
  2711. totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
  2712. this.setState({
  2713. contactListNew: theArr,
  2714. totalCui: parseFloat(totalCui),
  2715. });
  2716. }
  2717. }.bind(this),
  2718. }).always(
  2719. function () {
  2720. this.setState({
  2721. loading: false,
  2722. });
  2723. }.bind(this)
  2724. );
  2725. },
  2726. //催款节点保存
  2727. contactSave(record) {
  2728. for (let i = 0; i < this.state.contactList.length; i++) {
  2729. if (moneyVerify(this.state.contactList[i].money)) {
  2730. return;
  2731. }
  2732. }
  2733. this.setState({
  2734. loading: true,
  2735. });
  2736. $.ajax({
  2737. url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
  2738. method: "post",
  2739. data: {
  2740. orderNo: this.state.orderNo,
  2741. orderDun: JSON.stringify(this.state.contactList),
  2742. },
  2743. }).done(
  2744. function (data) {
  2745. this.setState({
  2746. loading: false,
  2747. });
  2748. if (!data.error.length) {
  2749. message.success("保存成功!");
  2750. this.jiedian(record.orderNo);
  2751. } else {
  2752. message.warning(data.error[0].message);
  2753. }
  2754. }.bind(this)
  2755. );
  2756. },
  2757. //催款节点保存
  2758. contactSaveNew(record) {
  2759. if (record.dunType == 0) {
  2760. if (!record.customizeTimes) {
  2761. message.warning("请输入自定义时间");
  2762. return;
  2763. } else if (!record.customizeName) {
  2764. message.warning("请输入自定义科目");
  2765. return;
  2766. }
  2767. }
  2768. if (
  2769. this.state.approval == 1 &&
  2770. record.dunType == 1 &&
  2771. !record.waitDay
  2772. ) {
  2773. message.warning("请填写收款时间");
  2774. return
  2775. }
  2776. if (record.boStatus == "false") {
  2777. record.boStatus = false;
  2778. } else if (record.boStatus == "true") {
  2779. record.boStatus = true;
  2780. }
  2781. if (!this.state.yearFlag) {
  2782. if (!record.effectiveCount && !record.dunTypeCustom) {
  2783. message.warning("请选择服务年限");
  2784. return;
  2785. }
  2786. } else {
  2787. record.effectiveCount = "";
  2788. }
  2789. if (record.money == "") {
  2790. message.warning("请填写金额");
  2791. return;
  2792. }
  2793. if (record.boStatus) {
  2794. if (
  2795. typeof +record.money == "number" &&
  2796. +record.money >= 0 &&
  2797. +record.money <= 1
  2798. ) {
  2799. record.appropriationRatio = record.money;
  2800. } else {
  2801. message.warning("金额比例填写错误,比例范围0~1");
  2802. return;
  2803. }
  2804. }
  2805. if (!record.dunType && record.dunType != 0) {
  2806. message.warning("请选择对应科目");
  2807. return;
  2808. }
  2809. if (record.dunType != 1) {
  2810. record.waitDay = "";
  2811. }
  2812. this.setState({
  2813. loading: true,
  2814. });
  2815. if (record.boStatus) {
  2816. $.ajax({
  2817. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2818. method: "post",
  2819. data: {
  2820. orderNo: record.orderNo,
  2821. tid: record.tid,
  2822. projectType: record.sort,
  2823. dunType: record.dunType,
  2824. appropriationRatio: record.appropriationRatio,
  2825. waitDay: record.waitDay,
  2826. effectiveCount: record.effectiveCount,
  2827. customizeTimes:
  2828. record.dunType == 0 ? record.customizeTimes : undefined,
  2829. customizeName:
  2830. record.dunType == 0 ? record.customizeName : undefined,
  2831. },
  2832. }).done(
  2833. function (data) {
  2834. this.setState({
  2835. loading: false,
  2836. });
  2837. if (!data.error.length) {
  2838. message.success("保存成功!");
  2839. this.setState({
  2840. cuiFlag: false,
  2841. boFlag: false,
  2842. addFlag: false,
  2843. });
  2844. this.jiedianNew(record.orderNo);
  2845. } else {
  2846. message.warning(data.error[0].message);
  2847. }
  2848. }.bind(this)
  2849. );
  2850. } else {
  2851. $.ajax({
  2852. url: globalConfig.context + "/api/admin/newOrderDun/createDun",
  2853. method: "post",
  2854. data: {
  2855. orderNo: record.orderNo,
  2856. tid: record.tid,
  2857. projectType: record.sort,
  2858. dunType: record.dunType,
  2859. money: record.money,
  2860. waitDay: record.waitDay,
  2861. effectiveCount: record.effectiveCount,
  2862. customizeTimes:
  2863. record.dunType == 0 ? record.customizeTimes : undefined,
  2864. customizeName:
  2865. record.dunType == 0 ? record.customizeName : undefined,
  2866. },
  2867. }).done(
  2868. function (data) {
  2869. this.setState({
  2870. loading: false,
  2871. });
  2872. if (!data.error.length) {
  2873. message.success("保存成功!");
  2874. this.setState({
  2875. cuiFlag: false,
  2876. boFlag: false,
  2877. addFlag: false,
  2878. });
  2879. this.jiedianNew(record.orderNo);
  2880. } else {
  2881. message.warning(data.error[0].message);
  2882. }
  2883. }.bind(this)
  2884. );
  2885. }
  2886. },
  2887. //点击新增催款节点
  2888. addcontact() {
  2889. this.state.contactList.push({
  2890. key: this.state.contactList.length,
  2891. money: "",
  2892. dunSubject: undefined,
  2893. orderNo: this.state.orderNo,
  2894. dunTarget: this.state.kehuId,
  2895. });
  2896. this.setState({
  2897. contactList: this.state.contactList,
  2898. });
  2899. },
  2900. //点击新增催款节点
  2901. addcontactNew() {
  2902. this.state.contactListNew.push({
  2903. key: this.state.contactListNew.length,
  2904. money: "",
  2905. dunSubject: undefined,
  2906. orderNo: this.state.orderNo,
  2907. dunTarget: this.state.kehuId,
  2908. });
  2909. this.setState({
  2910. contactListNew: this.state.contactListNew,
  2911. cuiFlag: true,
  2912. });
  2913. },
  2914. //删除收款节点
  2915. confirmDelet(index) {
  2916. this.state.contactList.splice(index, 1);
  2917. this.setState({
  2918. contactList: this.state.contactList,
  2919. });
  2920. this.contactSave();
  2921. },
  2922. //删除收款节点
  2923. confirmDeletNew(index) {
  2924. if (index.id) {
  2925. this.state.contactListNew.splice(index.id, 1);
  2926. this.setState({
  2927. contactListNew: this.state.contactListNew,
  2928. cuiFlag: false,
  2929. addFlag: false,
  2930. boFlag: false,
  2931. });
  2932. $.ajax({
  2933. url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
  2934. method: "post",
  2935. data: {
  2936. id: index.id,
  2937. },
  2938. }).done(
  2939. function (data) {
  2940. this.setState({
  2941. loading: false,
  2942. });
  2943. if (!data.error.length) {
  2944. message.success("删除成功!");
  2945. this.setState({
  2946. cuiFlag: false,
  2947. });
  2948. this.jiedianNew(this.state.orderNo);
  2949. } else {
  2950. message.warning(data.error[0].message);
  2951. }
  2952. }.bind(this)
  2953. );
  2954. } else {
  2955. this.state.contactListNew.splice(index.key, 1);
  2956. this.setState({
  2957. contactListNew: this.state.contactListNew,
  2958. cuiFlag: false,
  2959. addFlag: false,
  2960. boFlag: false,
  2961. });
  2962. }
  2963. },
  2964. //
  2965. handleOk() {
  2966. this.setState({
  2967. visible: false,
  2968. mark: false,
  2969. });
  2970. this.props.closeDesc(false, true);
  2971. },
  2972. //
  2973. handleCancel() {
  2974. if (this.state.orderType == undefined) {
  2975. return false;
  2976. }
  2977. if (!this.state.autoId) {
  2978. return false;
  2979. }
  2980. this.setState({
  2981. visible: false,
  2982. mark: false,
  2983. });
  2984. this.props.closeDesc(false);
  2985. },
  2986. //
  2987. handleCancelclose() {
  2988. this.setState(
  2989. {
  2990. visible: false,
  2991. mark: false,
  2992. cuiFlag: false,
  2993. addFlag: false,
  2994. boFlag: false,
  2995. isJilu: false,
  2996. },
  2997. () => {
  2998. this.setState({
  2999. activeKey: "1",
  3000. });
  3001. }
  3002. );
  3003. this.props.closeDesc(false);
  3004. this.reset();
  3005. },
  3006. //点击签单
  3007. handleCancels() {
  3008. this.setState({
  3009. isSubmit: 1,
  3010. });
  3011. },
  3012. //点击保存
  3013. handleCancelq() {
  3014. this.setState({
  3015. isSubmit: 0,
  3016. });
  3017. },
  3018. //删除
  3019. delectRow(record) {
  3020. this.setState({
  3021. loading: true,
  3022. });
  3023. $.ajax({
  3024. method: "post",
  3025. dataType: "json",
  3026. crossDomain: false,
  3027. url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
  3028. data: {
  3029. id: record.id,
  3030. },
  3031. }).done(
  3032. function (data) {
  3033. if (!data.error.length) {
  3034. message.success("删除成功!");
  3035. this.setState({
  3036. loading: false,
  3037. });
  3038. this.jiedian(this.state.orderNo);
  3039. this.jiedianNew(this.state.orderNo);
  3040. // this.loaduser();
  3041. this.loadData();
  3042. } else {
  3043. message.warning(data.error[0].message);
  3044. }
  3045. }.bind(this)
  3046. );
  3047. },
  3048. //
  3049. nextCancel(type) {
  3050. this.setState(
  3051. {
  3052. editProVisible: false,
  3053. changeVisible: false,
  3054. projectOperationVisible: false,
  3055. editProjectOperationVisible: false,//
  3056. vipVisible: false,
  3057. gid: "",
  3058. dataInfor: {},
  3059. addProjectType: undefined,
  3060. isVip: undefined,
  3061. isIso: undefined,
  3062. commodityQuantity: undefined,
  3063. histYear: [],
  3064. yearSum: undefined,
  3065. serviceLife: [],
  3066. serviceYear: undefined,
  3067. isEdit: false, // 可编辑
  3068. },
  3069. () => {
  3070. this.loadData();
  3071. this.proList();
  3072. }
  3073. );
  3074. },
  3075. //
  3076. rizhi() {
  3077. this.setState({
  3078. loading: true,
  3079. });
  3080. $.ajax({
  3081. method: "get",
  3082. dataType: "json",
  3083. crossDomain: false,
  3084. url: "/api/admin/newOrder/selectOrderLog",
  3085. data: {
  3086. orderNo: this.props.datauser.orderNo,
  3087. },
  3088. success: function (data) {
  3089. let theArr = [];
  3090. let thisData = data.data;
  3091. if (!thisData.length) {
  3092. if (data.error && data.error.length) {
  3093. message.warning(data.error[0].message);
  3094. }
  3095. thisData = {};
  3096. } else {
  3097. for (let i = 0; i < data.data.length; i++) {
  3098. let thisdata = data.data[i];
  3099. theArr.push({
  3100. processName: thisdata.processName,
  3101. adminName: thisdata.adminName,
  3102. createDate: thisdata.createDate,
  3103. remarks: thisdata.remarks,
  3104. });
  3105. }
  3106. }
  3107. this.setState({
  3108. dataSourcerizhi: theArr,
  3109. });
  3110. }.bind(this),
  3111. }).always(
  3112. function () {
  3113. this.setState({
  3114. loading: false,
  3115. });
  3116. }.bind(this)
  3117. );
  3118. },
  3119. //查看订单日志
  3120. getOrderLog() {
  3121. this.setState({
  3122. rizhivisible: true,
  3123. });
  3124. this.rizhi();
  3125. },
  3126. //
  3127. closeOrderLog() {
  3128. this.setState({
  3129. rizhivisible: false,
  3130. });
  3131. },
  3132. //
  3133. callback(key) {
  3134. this.setState({
  3135. activeKey: key,
  3136. });
  3137. if (key === "1") {
  3138. this.jiedian(this.props.datauser.orderNo);
  3139. this.jiedianNew(this.props.datauser.orderNo);
  3140. this.loaduser();
  3141. // this.loaduser();
  3142. }
  3143. if (key === "3") {
  3144. this.getChangeData();
  3145. }
  3146. if (key === "2" || key === "3") {
  3147. let url = window.location.href.substring(7);
  3148. $.ajax({
  3149. method: "get",
  3150. dataType: "json",
  3151. crossDomain: false,
  3152. url:
  3153. globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  3154. data: {
  3155. orderNo: this.props.datauser.orderNo,
  3156. },
  3157. success: function (data) {
  3158. if (data.data && data.data.length) {
  3159. let thisdata = data.data[data.data.length - 1];
  3160. if (
  3161. thisdata.status === 0 ||
  3162. (thisdata.processState == 0 && thisdata.status != 5)
  3163. ) {
  3164. this.setState({
  3165. changeId: thisdata.id,
  3166. typeChange: thisdata.type,
  3167. totalAmount: thisdata.totalAmount,
  3168. firstAmount: thisdata.firstAmount,
  3169. settlementAmount: thisdata.settlementAmount,
  3170. changeAmount: thisdata.changeAmount,
  3171. remarksC: thisdata.remarks,
  3172. startRemarks: thisdata.zxsRemarks,
  3173. isCaoGao: true,
  3174. arrears: thisdata.arrears,
  3175. changeFlag: true,
  3176. createTimes: thisdata.createTimes,
  3177. voucherUrl: thisdata.voucherUrl
  3178. ? splitUrl(
  3179. thisdata.voucherUrl,
  3180. ",",
  3181. globalConfig.avatarHost + "/upload",
  3182. url
  3183. )
  3184. : [],
  3185. newContractUrl: thisdata.contractPictureUrl
  3186. ? splitUrl(
  3187. thisdata.contractPictureUrl,
  3188. ",",
  3189. globalConfig.avatarHost + "/upload",
  3190. url
  3191. )
  3192. : [],
  3193. isNew: !thisdata.contractPictureUrl ? false : true,
  3194. processState: thisdata.processState,
  3195. status: thisdata.status,
  3196. contacts: thisdata.contacts, // 企业联系人
  3197. contactMobile: thisdata.contactMobile, // 企业联系方式
  3198. managerContacts: thisdata.managerContacts, // 企业总经理
  3199. managerContactMobile: thisdata.managerContactMobile, // 企业总经理联系方式
  3200. });
  3201. this.proList();
  3202. this.cuiList();
  3203. let e = thisdata.type;
  3204. if (e == 1) {
  3205. this.setState({
  3206. hetongFlag: false,
  3207. listFlag: false,
  3208. listCuiFlag: false,
  3209. tuiKuanFlag: false,
  3210. displayList: false,
  3211. });
  3212. } else if (e == 2) {
  3213. this.setState({
  3214. hetongFlag: true,
  3215. listFlag: false,
  3216. listCuiFlag: false,
  3217. tuiKuanFlag: true,
  3218. displayList: false,
  3219. });
  3220. } else if (e == 3) {
  3221. this.setState({
  3222. listFlag: false,
  3223. hetongFlag: false,
  3224. listCuiFlag: false,
  3225. tuiKuanFlag: false,
  3226. displayList: true,
  3227. });
  3228. } else if (e == 4) {
  3229. this.setState({
  3230. listFlag: false,
  3231. listCuiFlag: false,
  3232. hetongFlag: false,
  3233. tuiKuanFlag: true,
  3234. displayList: false,
  3235. });
  3236. } else if (e == 5) {
  3237. this.setState({
  3238. listFlag: false,
  3239. listCuiFlag: false,
  3240. hetongFlag: true,
  3241. tuiKuanFlag: true,
  3242. displayList: false,
  3243. });
  3244. } else if (e == 6) {
  3245. this.setState({
  3246. // listFlag: true,
  3247. // listCuiFlag: true,
  3248. // hetongFlag: true,
  3249. // tuiKuanFlag: true,
  3250. // displayList: false,
  3251. listFlag: false,
  3252. listCuiFlag: false,
  3253. hetongFlag: false,
  3254. tuiKuanFlag: false,
  3255. displayList: false,
  3256. });
  3257. } else if (e == 7) {
  3258. this.setState({
  3259. listFlag: true,
  3260. listCuiFlag: true,
  3261. hetongFlag: true,
  3262. tuiKuanFlag: true,
  3263. displayList: false,
  3264. isNew: true,
  3265. });
  3266. } else {
  3267. this.setState({
  3268. hetongFlag: false,
  3269. listFlag: false,
  3270. listCuiFlag: false,
  3271. tuiKuanFlag: false,
  3272. displayList: false,
  3273. });
  3274. }
  3275. } else {
  3276. this.setState({
  3277. listFlag: false,
  3278. hetongFlag: false,
  3279. listCuiFlag: false,
  3280. tuiKuanFlag: false,
  3281. displayList: false,
  3282. // 置空
  3283. changeId: undefined,
  3284. isCaoGao: false,
  3285. });
  3286. }
  3287. } else {
  3288. this.setState({
  3289. isCaoGao: false,
  3290. });
  3291. }
  3292. }.bind(this),
  3293. });
  3294. }
  3295. },
  3296. //
  3297. cuiList(id) {
  3298. this.setState({
  3299. loadData: true,
  3300. });
  3301. $.ajax({
  3302. method: "get",
  3303. dataType: "json",
  3304. crossDomain: false,
  3305. url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
  3306. data: {
  3307. id: id || this.state.changeId,
  3308. },
  3309. success: function (data) {
  3310. this.setState({
  3311. cuiDataSource: data.data,
  3312. });
  3313. if (data.data && data.data.length) {
  3314. if (id) {
  3315. this.setState({
  3316. listCuiFlag: true,
  3317. });
  3318. }
  3319. this.setState({
  3320. cuiDataSource: data.data,
  3321. });
  3322. this.setState({
  3323. loadData: false,
  3324. });
  3325. } else if (data.error && data.error.length) {
  3326. message.warning(data.error[0].message);
  3327. this.setState({
  3328. loadData: false,
  3329. });
  3330. }
  3331. }.bind(this),
  3332. });
  3333. },
  3334. //
  3335. proList(id) {
  3336. if (!id && !this.state.changeId) {
  3337. return
  3338. }
  3339. this.setState({
  3340. loadData: true,
  3341. });
  3342. $.ajax({
  3343. method: "get",
  3344. dataType: "json",
  3345. crossDomain: false,
  3346. url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
  3347. data: {
  3348. id: id || this.state.changeId,
  3349. },
  3350. success: function (data) {
  3351. if (data.data && data.data.length) {
  3352. if (id) {
  3353. this.setState({
  3354. listFlag: true,
  3355. });
  3356. }
  3357. data.data.forEach((item, index) => {
  3358. item.key = index;
  3359. });
  3360. this.setState({
  3361. proDataSource: data.data,
  3362. });
  3363. this.setState({
  3364. loadData: false,
  3365. });
  3366. } else if (data.error && data.error.length) {
  3367. // message.warning(data.error[0].message);
  3368. this.setState({
  3369. loadData: false,
  3370. });
  3371. }
  3372. }.bind(this),
  3373. });
  3374. },
  3375. //
  3376. logList(id) {
  3377. this.setState({
  3378. loading: true,
  3379. });
  3380. $.ajax({
  3381. method: "get",
  3382. dataType: "json",
  3383. async: false,
  3384. crossDomain: false,
  3385. url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
  3386. data: {
  3387. changeId: id,
  3388. },
  3389. success: function (data) {
  3390. if (data.error.length || data.data.list == "") {
  3391. if (data.error && data.error.length) {
  3392. message.warning(data.error[0].message);
  3393. this.setState({
  3394. loading: false,
  3395. });
  3396. }
  3397. } else {
  3398. this.setState({
  3399. logData: data.data,
  3400. loading: false,
  3401. });
  3402. }
  3403. }.bind(this),
  3404. });
  3405. },
  3406. getOrgCodeUrl(e) {
  3407. this.setState({ orgCodeUrl: e });
  3408. },
  3409. getReplenishUrl(e) {
  3410. this.setState({ replenishUrl: e });
  3411. },
  3412. getContentUrl(e) {
  3413. this.setState({ contentUrl: e });
  3414. },
  3415. getVoucherUrl(e) {
  3416. this.setState({ voucherUrl: e });
  3417. },
  3418. getNewContractUrl(e) {
  3419. this.setState({ newContractUrl: e });
  3420. },
  3421. //加载(自动补全)
  3422. supervisor(e, state) {
  3423. //客户名称与服务名称自动补全
  3424. let api = state
  3425. ? "/api/admin/customer/getCustomerByName"
  3426. : "/api/admin/order/getBusinessProjectByName";
  3427. $.ajax({
  3428. method: "get",
  3429. dataType: "json",
  3430. crossDomain: false,
  3431. url: globalConfig.context + api,
  3432. data: state
  3433. ? {
  3434. name: e,
  3435. type: this.state.userType,
  3436. }
  3437. : {
  3438. businessName: e,
  3439. },
  3440. success: function (data) {
  3441. let thedata = data.data;
  3442. if (!thedata) {
  3443. if (data.error && data.error.length) {
  3444. message.warning(data.error[0].message);
  3445. }
  3446. thedata = {};
  3447. }
  3448. this.setState({
  3449. states: state,
  3450. customerArr: thedata,
  3451. });
  3452. }.bind(this),
  3453. }).always(
  3454. function () {
  3455. this.setState({
  3456. loading: false,
  3457. });
  3458. }.bind(this)
  3459. );
  3460. },
  3461. // 渠道查询
  3462. selectChannel(e) {
  3463. $.ajax({
  3464. method: "get",
  3465. dataType: "json",
  3466. crossDomain: false,
  3467. url: globalConfig.context + "/api/admin/customer/selectChannelUserList",
  3468. data: {
  3469. name: e,
  3470. },
  3471. success: function (data) {
  3472. let thedata = data.data;
  3473. if (!thedata) {
  3474. if (data.error && data.error.length) {
  3475. message.warning(data.error[0].message);
  3476. }
  3477. thedata = {};
  3478. }
  3479. this.setState({
  3480. channelArr: thedata,
  3481. });
  3482. }.bind(this),
  3483. }).always(
  3484. function () {
  3485. this.setState({
  3486. loading: false,
  3487. });
  3488. }.bind(this)
  3489. );
  3490. },
  3491. supervisorCui(e) {
  3492. //客户名称与服务名称自动补全
  3493. let api = "/api/admin/order/getBusinessProjectByName";
  3494. $.ajax({
  3495. method: "get",
  3496. dataType: "json",
  3497. crossDomain: false,
  3498. url: globalConfig.context + api,
  3499. data: {
  3500. businessName: e,
  3501. },
  3502. success: function (data) {
  3503. let thedata = data.data;
  3504. if (!thedata) {
  3505. if (data.error && data.error.length) {
  3506. message.warning(data.error[0].message);
  3507. }
  3508. thedata = {};
  3509. }
  3510. this.setState({
  3511. customerCuiArr: thedata,
  3512. });
  3513. }.bind(this),
  3514. }).always(
  3515. function () {
  3516. this.setState({
  3517. loading: false,
  3518. });
  3519. }.bind(this)
  3520. );
  3521. },
  3522. //上级主管输入框失去焦点是判断客户是否存在
  3523. selectAuto(value) {
  3524. const newData = this.state.proDataSource
  3525. let kid = [];
  3526. let fwList = this.state.customerArr;
  3527. fwList.map(function (item) {
  3528. if (value == item.bname) {
  3529. kid = item;
  3530. }
  3531. });
  3532. if (kid.type == "1") {
  3533. this.setState({
  3534. displayFees: "block",
  3535. });
  3536. } else {
  3537. this.setState({
  3538. displayFees: "none",
  3539. });
  3540. }
  3541. //0通用 1专利 2软著 3审计 4双软 5高新 6商标
  3542. this.setState({
  3543. commodityName: value,
  3544. gid: kid.id,
  3545. addProjectType: kid.type,
  3546. isIso: value.indexOf("贯标") !== -1, // 是否为贯标项目
  3547. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3548. commodityFirstPayment: kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment,
  3549. isVip: kid.cSort,//暂时判断等于6的时候会员
  3550. commodityQuantity: kid.cSort == 6 ? 1 : undefined,//服务数量
  3551. histYear: [],
  3552. });
  3553. if (newData && newData.length > 0 && kid.cSort == 6) {
  3554. let llist = []
  3555. for (var i = 0; i < newData.length; i++) {
  3556. if (newData[i].commodityId == kid.id) {
  3557. llist.push(newData[i].serviceYear)
  3558. }
  3559. }
  3560. this.setState({
  3561. histYear: llist
  3562. })
  3563. for (var i = newData.length - 1; i >= 0; i--) {
  3564. if (newData[i].commodityId == kid.id) {
  3565. this.setState({
  3566. commodityPrice: newData[i].commodityPrice, // 实签价格
  3567. main: "0", // 是否为主要项目
  3568. yearSum: newData[i].yearSum.toString(), // 会员总服务年限
  3569. serviceLife: !newData[i].serviceLife ? [] : JSON.parse(newData[i].serviceLife), // 会员服务年限
  3570. contractTerm: !newData[i].contractTerm ? [] : JSON.parse(newData[i].contractTerm), // 合同期
  3571. taskComment: newData[i].taskComment, // 项目说明
  3572. // isEdit: true, // 不可编辑
  3573. isEdit: true, // 同一会员项目有且只有一条时可编辑 其他情况不可编辑
  3574. cPeriod: !newData[i].contractTerm ? false : true, //合同期
  3575. })
  3576. return
  3577. } else {
  3578. this.setState({
  3579. commodityPrice: undefined,
  3580. main: undefined,
  3581. yearSum: undefined,
  3582. serviceLife: [],
  3583. contractTerm: [],
  3584. taskComment: undefined,
  3585. isEdit: false, // 可编辑
  3586. cPeriod: false,
  3587. })
  3588. }
  3589. }
  3590. }
  3591. },
  3592. selectAutoCui(value) {
  3593. let kid = [];
  3594. let fwList = this.state.customerCuiArr;
  3595. fwList.map(function (item) {
  3596. if (value == item.bname) {
  3597. kid = item;
  3598. }
  3599. });
  3600. this.setState({
  3601. commodityNameCui: value,
  3602. cid: kid.id,
  3603. //commodityPrice:kid.price==0?kid.price.toString():kid.price,
  3604. commodityFirstPayment:
  3605. kid.firstPayment == 0
  3606. ? kid.firstPayment.toString()
  3607. : kid.firstPayment,
  3608. });
  3609. },
  3610. //客户
  3611. selectAutoCUT(value) {
  3612. let autoIds;
  3613. let fwList = this.state.customerArr;
  3614. fwList.map(function (item) {
  3615. if (value == item.name) {
  3616. autoIds = item.id;
  3617. }
  3618. });
  3619. this.setState({
  3620. customerName: value,
  3621. autoId: autoIds,
  3622. });
  3623. },
  3624. goSelect(value) {
  3625. let channelid;
  3626. let fwList = this.state.channelArr;
  3627. fwList.map(function (item) {
  3628. if (value == item.name) {
  3629. channelid = item.id;
  3630. }
  3631. });
  3632. this.setState({
  3633. channelname: value,
  3634. channelid: channelid,
  3635. });
  3636. },
  3637. //服务值改变时请求客户名称
  3638. httpChange(e) {
  3639. this.state.gid = "";
  3640. if (e.length >= 1) {
  3641. this.supervisor(e, false);
  3642. }
  3643. this.setState({
  3644. commodityName: e,
  3645. });
  3646. },
  3647. httpChangeCui(e) {
  3648. if (e.length >= 1) {
  3649. this.supervisorCui(e, false);
  3650. }
  3651. this.setState({
  3652. commodityNameCui: e,
  3653. });
  3654. },
  3655. //客户名称自动补全
  3656. customerChange(e) {
  3657. if (this.state.userType) {
  3658. this.state.autoId = "";
  3659. if (e.length >= 2) {
  3660. this.supervisor(e, true);
  3661. }
  3662. this.setState({
  3663. customerName: e,
  3664. });
  3665. } else {
  3666. this.setState({
  3667. customerName: "",
  3668. });
  3669. message.warning("客户所属类型必须指定");
  3670. }
  3671. },
  3672. //渠道名称自动补全
  3673. channelChange(e) {
  3674. this.setState({
  3675. channelName: e
  3676. })
  3677. if (e.length >= 2) {
  3678. this.selectChannel(e);
  3679. }
  3680. },
  3681. //点击添加项目明细
  3682. addDetailed() {
  3683. const { dataSource = [] } = this.state
  3684. this.setState({
  3685. projectOperationVisible: true,
  3686. newData: dataSource,
  3687. });
  3688. },
  3689. //点击添加会员项目明细
  3690. addVip() {
  3691. const { dataSource = [] } = this.state
  3692. this.setState({
  3693. vipVisible: true,
  3694. newData: dataSource,
  3695. });
  3696. },
  3697. // 可展开颜色不同
  3698. addRowColor(record) {
  3699. if (!!record.splitList && record.splitList.length > 0) {
  3700. return 'light'
  3701. } else if (!!record.list && record.list.length > 0) {
  3702. return 'light'
  3703. } else {
  3704. return 'dark'
  3705. }
  3706. },
  3707. //点击项目详情
  3708. tableRowClick(record) {
  3709. const { dataSource = [] } = this.state
  3710. this.setState({
  3711. // projectOperationVisible: true,
  3712. editProjectOperationVisible: true,
  3713. dataInfor: record,
  3714. newData: dataSource,
  3715. });
  3716. },
  3717. //签单时间选择
  3718. selTime(e, index) {
  3719. this.setState({
  3720. entryTime: e,
  3721. signDate: e,
  3722. selTime: index,
  3723. });
  3724. },
  3725. //退单操作
  3726. //点击退单
  3727. tuikuan() {
  3728. this.setState({
  3729. lookVisible: true,
  3730. contractUrl: [],
  3731. applicationUrl: [],
  3732. reason: "",
  3733. });
  3734. },
  3735. //关闭退单
  3736. noCancel() {
  3737. this.setState({
  3738. lookVisible: false,
  3739. });
  3740. },
  3741. //点击确认退单
  3742. tuidanOk() {
  3743. let contractUrls = [];
  3744. let applicationUrls = [];
  3745. if (this.state.contractUrl.length) {
  3746. let picArr = [];
  3747. this.state.contractUrl.map(function (item) {
  3748. if (
  3749. item.response &&
  3750. item.response.data &&
  3751. item.response.data.length
  3752. ) {
  3753. picArr.push(item.response.data);
  3754. }
  3755. });
  3756. contractUrls = picArr.join(",");
  3757. }
  3758. if (this.state.applicationUrl.length) {
  3759. let picArr = [];
  3760. this.state.applicationUrl.map(function (item) {
  3761. if (
  3762. item.response &&
  3763. item.response.data &&
  3764. item.response.data.length
  3765. ) {
  3766. picArr.push(item.response.data);
  3767. }
  3768. });
  3769. applicationUrls = picArr.join(",");
  3770. }
  3771. $.ajax({
  3772. method: "POST",
  3773. dataType: "json",
  3774. crossDomain: false,
  3775. url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
  3776. data: {
  3777. orderNo: this.state.orderNo, //订单编号
  3778. contractUrl: contractUrls.length ? contractUrls : "", //终止合同
  3779. applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
  3780. reason: this.state.reason, //退单原因
  3781. },
  3782. }).done(
  3783. function (data) {
  3784. this.setState({
  3785. loading: false,
  3786. });
  3787. if (!data.error.length) {
  3788. message.success("退单成功!");
  3789. this.noCancel();
  3790. this.handleCancelclose();
  3791. } else {
  3792. message.warning(data.error[0].message);
  3793. }
  3794. }.bind(this)
  3795. );
  3796. },
  3797. //开单选择订单类型骚操作
  3798. orderTypeFn(e) {
  3799. if (e == 0) {
  3800. this.setState({
  3801. bussStats: true,
  3802. orderType: e,
  3803. });
  3804. this.category();
  3805. } else {
  3806. this.setState({
  3807. contractType: undefined,
  3808. bussStats: false,
  3809. orderType: e,
  3810. });
  3811. }
  3812. },
  3813. //品类数据获取
  3814. category() {
  3815. $.ajax({
  3816. method: "get",
  3817. dataType: "json",
  3818. crossDomain: false,
  3819. url: globalConfig.context + "/api/admin/Varieties/getSuperList",
  3820. data: {},
  3821. success: function (data) {
  3822. let thedata = data.data;
  3823. let theArr = [];
  3824. if (!thedata) {
  3825. if (data.error && data.error.length) {
  3826. message.warning(data.error[0].message);
  3827. }
  3828. thedata = {};
  3829. } else {
  3830. thedata.map(function (item, index) {
  3831. theArr.push({
  3832. key: index,
  3833. name: item.cname,
  3834. id: item.id,
  3835. });
  3836. });
  3837. }
  3838. this.setState({
  3839. contractType: undefined,
  3840. categoryArr: theArr,
  3841. });
  3842. }.bind(this),
  3843. });
  3844. },
  3845. //变更申请
  3846. changeApply() {
  3847. if (
  3848. this.state.typeChange == undefined ||
  3849. (this.state.typeChange == "" && this.state.typeChange != 0)
  3850. ) {
  3851. message.warning("请选择变更类型");
  3852. return false;
  3853. }
  3854. if (this.state.totalAmount === "") {
  3855. message.warning("合同金额不能为空!");
  3856. return false;
  3857. }
  3858. if (this.state.firstAmount === "") {
  3859. message.warning("首付款金额不能为空!");
  3860. return false;
  3861. }
  3862. if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
  3863. message.warning("首付款不能大于合同额!");
  3864. return;
  3865. }
  3866. if (
  3867. this.state.typeChange == 0 ||
  3868. this.state.typeChange == 1 ||
  3869. this.state.typeChange == 3 ||
  3870. this.state.typeChange == 8
  3871. ) {
  3872. if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
  3873. message.warning("退款金额大于已收款金额");
  3874. return;
  3875. }
  3876. }
  3877. if (this.state.processStatus != 7 && this.state.processStatus != 8) {
  3878. message.warning("当前订单流程不能发起变更!");
  3879. return false;
  3880. }
  3881. if (this.state.changeAmount === "") {
  3882. message.warning("申请退款金额不能为空!");
  3883. return false;
  3884. }
  3885. if (this.state.remarksC == "") {
  3886. message.warning("请正确填写变更原因");
  3887. return false;
  3888. }
  3889. if (this.state.startRemarks == "") {
  3890. message.warning("请正确填写备注信息");
  3891. return false;
  3892. }
  3893. let theorgCodeUrl = [];
  3894. if (this.state.voucherUrl.length) {
  3895. let picArr = [];
  3896. this.state.voucherUrl.map(function (item) {
  3897. if (
  3898. item.response &&
  3899. item.response.data &&
  3900. item.response.data.length
  3901. ) {
  3902. picArr.push(item.response.data);
  3903. }
  3904. });
  3905. theorgCodeUrl = picArr.join(",");
  3906. }
  3907. let newContractUrl = [];
  3908. if (this.state.newContractUrl.length) {
  3909. let cArr = [];
  3910. this.state.newContractUrl.map(function (item) {
  3911. if (
  3912. item.response &&
  3913. item.response.data &&
  3914. item.response.data.length
  3915. ) {
  3916. cArr.push(item.response.data);
  3917. }
  3918. });
  3919. newContractUrl = cArr.join(",");
  3920. }
  3921. if (this.state.isNew && newContractUrl.length == 0) {
  3922. message.warning("请上传新合同扫描件!");
  3923. return
  3924. }
  3925. this.setState({
  3926. loading: true,
  3927. });
  3928. $.ajax({
  3929. method: "post",
  3930. dataType: "json",
  3931. crossDomain: false,
  3932. url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3933. data: {
  3934. orderNo: this.state.orderNo, //订单编号
  3935. processState: 0,
  3936. status: 0,
  3937. startRemarks: this.state.startRemarks,
  3938. remarks: this.state.remarksC,
  3939. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3940. totalAmount: this.state.totalAmount,
  3941. firstAmount: this.state.firstAmount,
  3942. settlementAmount: this.state.settlementAmount,
  3943. changeAmount: this.state.changeAmount,
  3944. applicant: this.state.salesmanName,
  3945. depName: this.state.depName,
  3946. type: this.state.typeChange,
  3947. contractPictureUrl: this.state.isNew
  3948. ? newContractUrl : undefined,//合同替换件
  3949. },
  3950. }).done(
  3951. function (data) {
  3952. this.setState({
  3953. loading: false,
  3954. });
  3955. if (!data.error.length) {
  3956. message.success("发起变更草稿");
  3957. this.setState(
  3958. {
  3959. isCaoGao: true,
  3960. loading: false,
  3961. },
  3962. () => {
  3963. this.callback("2");
  3964. }
  3965. );
  3966. } else {
  3967. message.warning(data.error[0].message);
  3968. }
  3969. }.bind(this)
  3970. );
  3971. // if (this.state.typeChange == 0) {
  3972. // $.ajax({
  3973. // method: "post",
  3974. // dataType: "json",
  3975. // crossDomain: false,
  3976. // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  3977. // data: {
  3978. // orderNo: this.state.orderNo, //订单编号
  3979. // processState: 1,
  3980. // status: 1,
  3981. // startRemarks: this.state.startRemarks,
  3982. // remarks: this.state.remarksC,
  3983. // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  3984. // totalAmount: this.state.totalAmount,
  3985. // firstAmount: this.state.firstAmount,
  3986. // settlementAmount: this.state.settlementAmount,
  3987. // changeAmount: this.state.changeAmount,
  3988. // applicant: this.state.salesmanName,
  3989. // depName: this.state.depName,
  3990. // type: this.state.typeChange,
  3991. // contractPictureUrl: this.state.isNew
  3992. // ? newContractUrl : undefined,//合同替换件
  3993. // },
  3994. // }).done(
  3995. // function (data) {
  3996. // this.setState({
  3997. // loading: false,
  3998. // });
  3999. // if (!data.error.length) {
  4000. // message.success("发起变更成功");
  4001. // this.handleCancelclose();
  4002. // } else {
  4003. // message.warning(data.error[0].message);
  4004. // this.setState({
  4005. // loading: false,
  4006. // });
  4007. // }
  4008. // }.bind(this)
  4009. // );
  4010. // } else {
  4011. // $.ajax({
  4012. // method: "post",
  4013. // dataType: "json",
  4014. // crossDomain: false,
  4015. // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
  4016. // data: {
  4017. // orderNo: this.state.orderNo, //订单编号
  4018. // processState: 0,
  4019. // status: 0,
  4020. // startRemarks: this.state.startRemarks,
  4021. // remarks: this.state.remarksC,
  4022. // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  4023. // totalAmount: this.state.totalAmount,
  4024. // firstAmount: this.state.firstAmount,
  4025. // settlementAmount: this.state.settlementAmount,
  4026. // changeAmount: this.state.changeAmount,
  4027. // applicant: this.state.salesmanName,
  4028. // depName: this.state.depName,
  4029. // type: this.state.typeChange,
  4030. // contractPictureUrl: this.state.isNew
  4031. // ? newContractUrl : undefined,//合同替换件
  4032. // },
  4033. // }).done(
  4034. // function (data) {
  4035. // this.setState({
  4036. // loading: false,
  4037. // });
  4038. // if (!data.error.length) {
  4039. // message.success("发起变更草稿");
  4040. // this.setState(
  4041. // {
  4042. // isCaoGao: true,
  4043. // loading: false,
  4044. // },
  4045. // () => {
  4046. // this.callback("2");
  4047. // }
  4048. // );
  4049. // } else {
  4050. // message.warning(data.error[0].message);
  4051. // }
  4052. // }.bind(this)
  4053. // );
  4054. // }
  4055. },
  4056. reset() {
  4057. this.setState({
  4058. startRemarks: "",
  4059. remarksC: "",
  4060. voucherUrl: [],
  4061. newContractUrl: [],
  4062. totalAmount: undefined,
  4063. settlementAmount: undefined,
  4064. changeAmount: "0",
  4065. applicant: undefined,
  4066. depNameChange: undefined,
  4067. typeChange: undefined,
  4068. displayFees: "none",
  4069. officialCost: "",
  4070. costReduction: "",
  4071. });
  4072. },
  4073. componentWillMount() {
  4074. const nextProps = this.props
  4075. this.state.visible = nextProps.showDesc;
  4076. this.state.signBillVisible = nextProps.signBillVisible;
  4077. if (this.state.signBillVisible) {
  4078. this.loaduser(nextProps.uid);
  4079. this.assistList(nextProps.uid);
  4080. this.orderServiceList(nextProps.uid);
  4081. // this.publicByOrder(nextProps.uid);
  4082. }
  4083. if (nextProps.userDetaile && nextProps.showDesc) {
  4084. this.loaduser(nextProps.datauser);
  4085. this.assistList(nextProps.datauser);
  4086. this.orderServiceList(nextProps.datauser);
  4087. // this.publicByOrder(nextProps.datauser);
  4088. this.jiedian(nextProps.datauser.orderNo);
  4089. this.jiedianNew(nextProps.datauser.orderNo);
  4090. this.loadData(nextProps.datauser);
  4091. this.getChangeData(nextProps.datauser);
  4092. } else {
  4093. this.setState({
  4094. orderType: undefined,
  4095. customerName: "",
  4096. autoId: "",
  4097. customerArr: [],
  4098. contractType: undefined,
  4099. bussStats: false,
  4100. userType: undefined,
  4101. channelName: "",
  4102. channelid: "",
  4103. channelArr: [],
  4104. selectSales: undefined,
  4105. });
  4106. }
  4107. },
  4108. // componentWillReceiveProps(nextProps) {
  4109. // //props改变时触发
  4110. // },
  4111. //查看变更记录
  4112. getChangeData(record) {
  4113. this.setState({
  4114. loading: true,
  4115. });
  4116. $.ajax({
  4117. method: "get",
  4118. dataType: "json",
  4119. crossDomain: false,
  4120. url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
  4121. data: {
  4122. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  4123. },
  4124. success: function (data) {
  4125. this.setState({
  4126. loading: false,
  4127. });
  4128. let url = window.location.href.substring(7);
  4129. if (data.data && data.data.length) {
  4130. let thisdata = data.data[data.data.length - 1];
  4131. thisdata.typeChange = thisdata.type;
  4132. thisdata.remarksC = thisdata.remarks;
  4133. thisdata.startRemarks = thisdata.zxsRemarks;
  4134. thisdata.voucherUrl = thisdata.voucherUrl
  4135. ? splitUrl(
  4136. thisdata.voucherUrl,
  4137. ",",
  4138. globalConfig.avatarHost + "/upload",
  4139. url
  4140. )
  4141. : [];
  4142. thisdata.contractPictureUrl = thisdata.contractPictureUrl
  4143. ? splitUrl(
  4144. thisdata.contractPictureUrl,
  4145. ",",
  4146. globalConfig.avatarHost + "/upload",
  4147. url
  4148. )
  4149. : [];
  4150. this.proList(thisdata.id);
  4151. this.cuiList(thisdata.id);
  4152. this.logList(thisdata.id);
  4153. this.setState({
  4154. //判断是否有合同变更记录
  4155. isJilu: true,
  4156. detailChange: thisdata,
  4157. });
  4158. }
  4159. }.bind(this),
  4160. });
  4161. },
  4162. showConfirm(fn, record) {
  4163. confirm({
  4164. title: "确定删除此项目吗?",
  4165. content: (
  4166. <span style={{ color: "red" }}>
  4167. 删除后会将该项目下的所有催款节点自动清除!!!
  4168. </span>
  4169. ),
  4170. onOk() {
  4171. fn(record);
  4172. },
  4173. onCancel() { },
  4174. });
  4175. },
  4176. viewConfirm(fn, record) {
  4177. confirm({
  4178. title: "确定删除此服务记录吗?",
  4179. // content: (
  4180. // <span style={{ color: "red" }}>
  4181. // 删除后会将该项目下的所有催款节点自动清除!!!
  4182. // </span>
  4183. // ),
  4184. onOk() {
  4185. fn(record);
  4186. },
  4187. onCancel() { },
  4188. });
  4189. },
  4190. changeAddPro() {
  4191. // this.getpatentTypeList();
  4192. this.setState({
  4193. changeVisible: true,
  4194. newData: this.state.proDataSource,
  4195. // gid: "",
  4196. // customerArr: [],
  4197. // commodityName: "",
  4198. // commodityQuantity: "",
  4199. // commodityId: "",
  4200. // taskComment: "",
  4201. // main: undefined,
  4202. // commodityPrice: "",
  4203. // displayFees: "none",
  4204. // officialCost: "",
  4205. // costReduction: "",
  4206. });
  4207. },
  4208. changeProSubmit() {
  4209. if (this.state.gid == undefined || !this.state.gid) {
  4210. message.warning("服务名称不匹配!");
  4211. return
  4212. }
  4213. let reg = /^([0]|[1-9][0-9]*)$/;
  4214. if (
  4215. !this.state.commodityQuantity ||
  4216. !reg.test(this.state.commodityQuantity)
  4217. ) {
  4218. message.warning("请输入正确商品数量!");
  4219. return
  4220. }
  4221. if (this.state.displayFees === 'block') {
  4222. if (this.state.patentType === "" && !this.state.patentTransfer) {
  4223. message.warning("请选择专利类型!");
  4224. return
  4225. }
  4226. if (this.state.officialCost === '') {
  4227. message.warning("请选择官费!");
  4228. return
  4229. }
  4230. if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
  4231. message.warning("请选择费减!");
  4232. return
  4233. }
  4234. }
  4235. if (isNaN(parseFloat(this.state.commodityPrice))) {
  4236. message.warning("请输入正确的金额!");
  4237. return;
  4238. }
  4239. if (this.state.addProjectType == "3") {// 3审计
  4240. if (this.state.serviceLife.length === 0) {
  4241. message.warning("请选择服务年限!");
  4242. return
  4243. }
  4244. if (this.state.serviceLife.length != this.state.commodityQuantity) {
  4245. message.warning("服务数量与服务年限不符!");
  4246. return
  4247. }
  4248. }
  4249. if (!this.state.main) {
  4250. message.warning("请选择是否为主要项目!");
  4251. return
  4252. }
  4253. if (this.state.addProjectType === 5) {// 5高新
  4254. if (!this.state.declarationBatch) {
  4255. message.warning("请选择企业要求申报批次!");
  4256. return
  4257. }
  4258. if (!this.state.serviceYear) {
  4259. message.warning("请选择申报年份!");
  4260. return
  4261. }
  4262. }
  4263. if (this.state.isVip == 6) {//会员
  4264. if (this.state.yearSum === undefined) {
  4265. message.warning("请选择会员总服务年限!");
  4266. return
  4267. }
  4268. if (this.state.serviceLife.length === 0) {
  4269. message.warning("请添加会员服务年限!");
  4270. return
  4271. }
  4272. if (this.state.serviceLife.length != this.state.yearSum) {
  4273. message.warning("会员服务年限与总年限不符合!");
  4274. return
  4275. }
  4276. if (this.state.serviceYear === undefined) {
  4277. message.warning("请选择本次派单年份!");
  4278. return
  4279. }
  4280. if (this.state.contractTerm.length === 0) {
  4281. message.warning("请填写合同期!");
  4282. return
  4283. }
  4284. }
  4285. this.setState({
  4286. loading: true,
  4287. });
  4288. let type = 0;
  4289. if (this.state.typeChange == 4 || this.state.typeChange == 5) {
  4290. type = 1;
  4291. }
  4292. let infor = {
  4293. commodityId: this.state.gid, //商品ID
  4294. orderNo: this.props.datauser.orderNo, //订单编号
  4295. commodityName: this.state.commodityName, //商品名称
  4296. commodityQuantity: this.state.commodityQuantity, //商品数量
  4297. commodityPrice: this.state.commodityPrice, //签单总价
  4298. taskComment: this.state.taskComment, //服务说明
  4299. main: this.state.main, //是否为主要项目
  4300. cid: this.state.changeId, //变更ID
  4301. type,
  4302. }
  4303. if (this.state.displayFees === 'block') {
  4304. infor.officialCost = this.state.officialCost //是否有官费
  4305. infor.costReduction = (this.state.patentType === 0 || this.state.patentType === 2) ? (this.state.officialCost === 1 ? this.state.costReduction : 0) : 0//是否有费减
  4306. infor.patentType = this.state.patentType //专利类型
  4307. }
  4308. if (this.state.isIso) {
  4309. infor.ifCertificationFee = this.state.ifCertificationFee || undefined;//是否包含认证费用
  4310. }
  4311. if (this.state.addProjectType == "3") {//审计
  4312. infor.serviceLife = JSON.stringify(this.state.serviceLife) //服务年限
  4313. }
  4314. if (this.state.addProjectType == "5") {//高新
  4315. infor.declarationBatch = this.state.declarationBatch || 1//申报批次
  4316. infor.serviceYear = this.state.serviceYear //申报年份
  4317. }
  4318. if (this.state.isVip == 6) {//会员
  4319. infor.yearSum = this.state.yearSum //会员总服务年限
  4320. infor.serviceLife = JSON.stringify(this.state.serviceLife) //会员服务年限
  4321. infor.serviceYear = this.state.serviceYear //本次派单年份
  4322. infor.contractTerm = JSON.stringify(this.state.contractTerm)//合同期
  4323. }
  4324. $.ajax({
  4325. method: "post",
  4326. dataType: "json",
  4327. crossDomain: false,
  4328. url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
  4329. data: infor,
  4330. success: function (data) {
  4331. let theArr = [];
  4332. if (data.error && data.error.length) {
  4333. message.warning(data.error[0].message);
  4334. } else {
  4335. message.success("保存成功");
  4336. this.nextCancel();
  4337. this.proList();
  4338. }
  4339. }.bind(this),
  4340. }).always(
  4341. function () {
  4342. this.setState({
  4343. loading: false,
  4344. });
  4345. }.bind(this)
  4346. );
  4347. },
  4348. changeDeletePro(record) {
  4349. this.setState({
  4350. loading: true,
  4351. });
  4352. $.ajax({
  4353. method: "post",
  4354. dataType: "json",
  4355. crossDomain: false,
  4356. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4357. data: {
  4358. id: record.id,
  4359. type: 3,
  4360. tid: record.tid,
  4361. splitStatus: record.splitStatus,
  4362. },
  4363. success: function (data) {
  4364. let theArr = [];
  4365. if (data.error && data.error.length) {
  4366. message.warning(data.error[0].message);
  4367. } else {
  4368. message.success("删除成功");
  4369. this.proList();
  4370. this.cuiList();
  4371. this.loadData();
  4372. }
  4373. }.bind(this),
  4374. }).always(
  4375. function () {
  4376. this.setState({
  4377. loading: false,
  4378. });
  4379. }.bind(this)
  4380. );
  4381. },
  4382. //点击新增变更催款节点
  4383. changeAddCui() {
  4384. this.state.cuiDataSource.push({
  4385. key: this.state.cuiDataSource.length,
  4386. money: "",
  4387. dunSubject: undefined,
  4388. orderNo: this.state.orderNo,
  4389. dunTarget: this.state.kehuId,
  4390. });
  4391. this.setState({
  4392. cuiDataSource: this.state.cuiDataSource,
  4393. cuiFlag: true,
  4394. });
  4395. },
  4396. //删除变更收款节点
  4397. changeDeleteCui(index) {
  4398. if (index.id) {
  4399. this.state.cuiDataSource.splice(index.id, 1);
  4400. this.setState({
  4401. contactListNew: this.state.cuiDataSource,
  4402. cuiFlag: false,
  4403. addFlag: false,
  4404. boFlag: false,
  4405. });
  4406. $.ajax({
  4407. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4408. method: "post",
  4409. data: {
  4410. id: index.id,
  4411. type: 3,
  4412. tid: index.tid,
  4413. did: index.did,
  4414. },
  4415. }).done(
  4416. function (data) {
  4417. this.setState({
  4418. loading: false,
  4419. });
  4420. if (!data.error.length) {
  4421. message.success("删除成功!");
  4422. this.setState({
  4423. cuiFlag: false,
  4424. });
  4425. this.cuiList();
  4426. this.proList();
  4427. } else {
  4428. message.warning(data.error[0].message);
  4429. }
  4430. }.bind(this)
  4431. );
  4432. } else {
  4433. this.state.cuiDataSource.splice(index.key, 1);
  4434. this.setState({
  4435. cuiDataSource: this.state.cuiDataSource,
  4436. cuiFlag: false,
  4437. addFlag: false,
  4438. boFlag: false,
  4439. });
  4440. }
  4441. },
  4442. changeSaveCui(record) {
  4443. if (record.dunType == 0) {
  4444. if (!record.customizeTimes) {
  4445. message.warning("请输入自定义时间");
  4446. return;
  4447. } else if (!record.customizeName) {
  4448. message.warning("请输入自定义科目");
  4449. return;
  4450. }
  4451. }
  4452. if (record.boStatus == "false") {
  4453. record.boStatus = false;
  4454. } else if (record.boStatus == "true") {
  4455. record.boStatus = true;
  4456. }
  4457. if (!this.state.yearFlag) {
  4458. if (!record.effectiveCount) {
  4459. message.warning("请选择服务年限");
  4460. return;
  4461. }
  4462. } else {
  4463. record.effectiveCount = "";
  4464. }
  4465. if (isNaN(parseInt(record.money)) && !record.boStatus) {
  4466. message.warning("请填写金额");
  4467. return;
  4468. } else if (isNaN(parseInt(record.money)) && record.boStatus) {
  4469. message.warning("请填写比例");
  4470. return;
  4471. }
  4472. if (record.boStatus) {
  4473. if (
  4474. typeof +record.money == "number" &&
  4475. +record.money >= 0 &&
  4476. +record.money <= 1
  4477. ) {
  4478. record.appropriationRatio = record.money;
  4479. } else {
  4480. message.warning("金额比例填写错误,比例范围0~1");
  4481. return;
  4482. }
  4483. }
  4484. if (!record.dunType && record.dunType != 0) {
  4485. message.warning("请选择对应科目");
  4486. return;
  4487. }
  4488. if (record.dunType != 1) {
  4489. record.waitDay = "";
  4490. }
  4491. this.setState({
  4492. loading: true,
  4493. });
  4494. if (record.boStatus) {
  4495. $.ajax({
  4496. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4497. method: "post",
  4498. data: {
  4499. orderNo: record.orderNo,
  4500. ctid: record.ctid,
  4501. projectType: record.sort,
  4502. dunType: record.dunType,
  4503. appropriationRatio: record.appropriationRatio,
  4504. waitDay: record.waitDay,
  4505. effectiveCount: record.effectiveCount,
  4506. cid: this.state.changeId, //变更ID
  4507. customizeTimes:
  4508. record.dunType == 0 ? record.customizeTimes : undefined,
  4509. customizeName:
  4510. record.dunType == 0 ? record.customizeName : undefined,
  4511. },
  4512. }).done(
  4513. function (data) {
  4514. this.setState({
  4515. loading: false,
  4516. });
  4517. if (!data.error.length) {
  4518. message.success("保存成功!");
  4519. this.setState({
  4520. cuiFlag: false,
  4521. boFlag: false,
  4522. addFlag: false,
  4523. });
  4524. this.cuiList();
  4525. } else {
  4526. message.warning(data.error[0].message);
  4527. }
  4528. }.bind(this)
  4529. );
  4530. } else {
  4531. $.ajax({
  4532. url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
  4533. method: "post",
  4534. data: {
  4535. orderNo: record.orderNo,
  4536. ctid: record.ctid,
  4537. projectType: record.sort,
  4538. dunType: record.dunType,
  4539. money: record.money,
  4540. waitDay: record.waitDay,
  4541. effectiveCount: record.effectiveCount,
  4542. cid: this.state.changeId, //变更ID
  4543. customizeTimes:
  4544. record.dunType == 0 ? record.customizeTimes : undefined,
  4545. customizeName:
  4546. record.dunType == 0 ? record.customizeName : undefined,
  4547. },
  4548. }).done(
  4549. function (data) {
  4550. this.setState({
  4551. loading: false,
  4552. });
  4553. if (!data.error.length) {
  4554. message.success("保存成功!");
  4555. this.setState({
  4556. cuiFlag: false,
  4557. boFlag: false,
  4558. addFlag: false,
  4559. });
  4560. this.cuiList();
  4561. } else {
  4562. message.warning(data.error[0].message);
  4563. }
  4564. }.bind(this)
  4565. );
  4566. }
  4567. },
  4568. submitChange() {
  4569. if (
  4570. this.state.typeChange == undefined ||
  4571. (this.state.typeChange == "" && this.state.typeChange != 0)
  4572. ) {
  4573. message.warning("请选择变更类型");
  4574. return false;
  4575. }
  4576. if (this.state.totalAmount === "") {
  4577. message.warning("合同金额不能为空!");
  4578. return false;
  4579. }
  4580. if (this.state.firstAmount === "") {
  4581. message.warning("首付款金额不能为空!");
  4582. return false;
  4583. }
  4584. if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
  4585. message.warning("首付款不能大于合同额!");
  4586. return;
  4587. }
  4588. if (
  4589. this.state.typeChange == 0 ||
  4590. this.state.typeChange == 1 ||
  4591. this.state.typeChange == 3 ||
  4592. this.state.typeChange == 8
  4593. ) {
  4594. if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
  4595. message.warning("退款金额大于已收款金额");
  4596. return;
  4597. }
  4598. }
  4599. if (this.state.processStatus != 7 && this.state.processStatus != 8) {
  4600. message.warning("当前订单流程不能发起变更!");
  4601. return false;
  4602. }
  4603. if (this.state.changeAmount === "") {
  4604. message.warning("申请退款金额不能为空!");
  4605. return false;
  4606. }
  4607. if (this.state.remarksC == "") {
  4608. message.warning("请正确填写变更原因");
  4609. return false;
  4610. }
  4611. if (this.state.startRemarks == "") {
  4612. message.warning("请正确填写备注信息");
  4613. return false;
  4614. }
  4615. if (this.state.typeChange == 0) {
  4616. let reg1 = /^1[3456789]\d{9}$/
  4617. let reg2 = /^0\d{2,3}-?\d{7,8}$/
  4618. let reg3 = /[^\u4E00-\u9FA5]/g
  4619. if (!this.state.managerContacts || reg3.test(this.state.managerContacts)) {
  4620. message.warning("请正确填写企业总经理姓名");
  4621. return false;
  4622. }
  4623. if (!this.state.managerContactMobile) {
  4624. message.warning("请正确填写企业总经理联系电话");
  4625. return false;
  4626. }
  4627. if (!reg1.test(this.state.managerContactMobile) && !reg2.test(this.state.managerContactMobile)) {
  4628. message.warning("请正确填写企业总经理联系电话");
  4629. return false;
  4630. }
  4631. if (!this.state.contacts || reg3.test(this.state.contacts)) {
  4632. message.warning("请正确填写企业联系人姓名");
  4633. return false;
  4634. }
  4635. if (!this.state.contactMobile) {
  4636. message.warning("请正确填写企业联系人联系方式");
  4637. return false;
  4638. }
  4639. if (!reg1.test(this.state.contactMobile) && !reg2.test(this.state.contactMobile)) {
  4640. message.warning("请正确填写企业联系人联系方式");
  4641. return false;
  4642. }
  4643. }
  4644. let theorgCodeUrl = [];
  4645. if (this.state.voucherUrl.length) {
  4646. let picArr = [];
  4647. this.state.voucherUrl.map(function (item) {
  4648. if (
  4649. item.response &&
  4650. item.response.data &&
  4651. item.response.data.length
  4652. ) {
  4653. picArr.push(item.response.data);
  4654. }
  4655. });
  4656. theorgCodeUrl = picArr.join(",");
  4657. }
  4658. let newContractUrl = [];
  4659. if (this.state.newContractUrl.length) {
  4660. let cArr = [];
  4661. this.state.newContractUrl.map(function (item) {
  4662. if (
  4663. item.response &&
  4664. item.response.data &&
  4665. item.response.data.length
  4666. ) {
  4667. cArr.push(item.response.data);
  4668. }
  4669. });
  4670. newContractUrl = cArr.join(",");
  4671. }
  4672. if (this.state.isNew && newContractUrl.length == 0) {
  4673. message.warning("请上传新合同扫描件!");
  4674. return
  4675. }
  4676. this.setState({
  4677. loading: true,
  4678. });
  4679. $.ajax({
  4680. url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
  4681. method: "post",
  4682. data: {
  4683. id: this.state.changeId,
  4684. changeType: 0,
  4685. orderNo: this.state.orderNo, //订单编号
  4686. processState: 0,
  4687. startRemarks: this.state.startRemarks,
  4688. remarks: this.state.remarksC,
  4689. voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
  4690. totalAmount: this.state.totalAmount,//合同额
  4691. firstAmount: this.state.firstAmount,//首付款
  4692. settlementAmount: this.state.settlementAmount,
  4693. changeAmount: this.state.changeAmount,
  4694. applicant: this.state.salesmanName,
  4695. depName: this.state.depName,
  4696. type: this.state.typeChange,
  4697. contractPictureUrl: this.state.isNew
  4698. ? newContractUrl : undefined,//合同替换件
  4699. contacts: this.state.typeChange == 0 ? this.state.contacts : undefined,
  4700. contactMobile: this.state.typeChange == 0 ? this.state.contactMobile : undefined,
  4701. managerContacts: this.state.typeChange == 0 ? this.state.managerContacts : undefined,
  4702. managerContactMobile: this.state.typeChange == 0 ? this.state.managerContactMobile : undefined,
  4703. },
  4704. }).done(
  4705. function (data) {
  4706. if (!data.error.length) {
  4707. this.setState({
  4708. loading: false,
  4709. });
  4710. message.success("发起变更成功");
  4711. this.handleCancelclose();
  4712. } else {
  4713. message.warning(data.error[0].message);
  4714. this.setState({
  4715. loading: false,
  4716. });
  4717. }
  4718. }.bind(this)
  4719. );
  4720. },
  4721. editCui(record) {
  4722. this.setState({
  4723. editCuiVisible: true,
  4724. editCuiMoney: record.appropriationRatio
  4725. ? record.appropriationRatio
  4726. : record.money,
  4727. appropriationRatio: record.appropriationRatio,
  4728. editCuiTid: record.tid,
  4729. editCuiDid: record.did,
  4730. editCuiId: record.id,
  4731. });
  4732. },
  4733. editPro(record) {
  4734. this.setState({
  4735. editProVisible: true,
  4736. dataInfor: record,
  4737. newData: this.state.proDataSource,
  4738. });
  4739. // this.setState({
  4740. // editProVisible: true,
  4741. // editSplitStatus: record.splitStatus,
  4742. // editProMoney: record.commodityPrice,
  4743. // editProCommodityQuantity: record.commodityQuantity,
  4744. // editProTid: record.tid,
  4745. // editProId: record.id,
  4746. // });
  4747. },
  4748. submitEditCui(type) {
  4749. if (isNaN(parseFloat(this.state.editCuiMoney))) {
  4750. if (type === 1) {
  4751. message.warn("请输入比例");
  4752. } else {
  4753. message.warn("请输入金额");
  4754. }
  4755. return;
  4756. }
  4757. this.setState({
  4758. loading: true,
  4759. });
  4760. let data = {
  4761. id: this.state.editCuiId,
  4762. type: this.state.editCuiTid ? 2 : 1,
  4763. tid: this.state.editCuiTid,
  4764. };
  4765. if (type === 1) {
  4766. data.appropriationRatio = this.state.editCuiMoney;
  4767. } else {
  4768. data.money = this.state.editCuiMoney;
  4769. }
  4770. $.ajax({
  4771. url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
  4772. method: "post",
  4773. data,
  4774. }).done(
  4775. function (data) {
  4776. this.setState({
  4777. loading: false,
  4778. });
  4779. if (!data.error.length) {
  4780. message.success("修改成功!");
  4781. this.cuiList();
  4782. this.proList();
  4783. this.setState({
  4784. editCuiVisible: false,
  4785. });
  4786. } else {
  4787. message.warning(data.error[0].message);
  4788. }
  4789. }.bind(this)
  4790. );
  4791. },
  4792. submitEditPro() {
  4793. this.setState({
  4794. loading: true,
  4795. });
  4796. $.ajax({
  4797. url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
  4798. method: "post",
  4799. data: {
  4800. id: this.state.editProId,
  4801. type: this.state.editProTid ? 2 : 1,
  4802. commodityPrice: this.state.editProMoney,
  4803. commodityQuantity: this.state.editProCommodityQuantity,
  4804. tid: this.state.editProTid,
  4805. },
  4806. }).done(
  4807. function (data) {
  4808. this.setState({
  4809. loading: false,
  4810. });
  4811. if (!data.error.length) {
  4812. message.success("修改成功!");
  4813. this.cuiList();
  4814. this.proList();
  4815. this.setState({
  4816. editProVisible: false,
  4817. });
  4818. } else {
  4819. message.warning(data.error[0].message);
  4820. }
  4821. }.bind(this)
  4822. );
  4823. },
  4824. downImg() {
  4825. let num = 0;
  4826. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4827. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4828. num = i;
  4829. }
  4830. }
  4831. if (num == this.state.orgCodeUrl.length - 1) {
  4832. return message.warning("已经是最后一张了哦");
  4833. }
  4834. this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
  4835. this.setState({
  4836. previewImage: this.state.previewImage,
  4837. rotateDeg: 0,
  4838. });
  4839. },
  4840. upImg() {
  4841. let num = 0;
  4842. for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
  4843. if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
  4844. num = i;
  4845. }
  4846. }
  4847. if (num == 0) {
  4848. return message.warning("已经是第一张了哦");
  4849. }
  4850. this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
  4851. this.setState({
  4852. previewImage: this.state.previewImage,
  4853. rotateDeg: 0,
  4854. });
  4855. },
  4856. rotate() {
  4857. let rotateDeg = this.state.rotateDeg + 90;
  4858. this.setState({
  4859. rotateDeg,
  4860. });
  4861. },
  4862. downImgs() {
  4863. let num = 0;
  4864. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4865. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4866. num = i;
  4867. }
  4868. }
  4869. if (num == this.state.replenishUrl.length - 1) {
  4870. return message.warning("已经是最后一张了哦");
  4871. }
  4872. this.state.previewImage = this.state.replenishUrl[num + 1].url;
  4873. this.setState({
  4874. previewImage: this.state.previewImage,
  4875. rotateDeg: 0,
  4876. });
  4877. },
  4878. upImgs() {
  4879. let num = 0;
  4880. for (let i = 0; i < this.state.replenishUrl.length; i++) {
  4881. if (this.state.replenishUrl[i].url == this.state.previewImage) {
  4882. num = i;
  4883. }
  4884. }
  4885. if (num == 0) {
  4886. return message.warning("已经是第一张了哦");
  4887. }
  4888. this.state.previewImage = this.state.replenishUrl[num - 1].url;
  4889. this.setState({
  4890. previewImage: this.state.previewImage,
  4891. rotateDeg: 0,
  4892. });
  4893. },
  4894. rotates() {
  4895. let rotateDeg = this.state.rotateDeg + 90;
  4896. this.setState({
  4897. rotateDeg,
  4898. });
  4899. },
  4900. downImgCont() {
  4901. let num = 0;
  4902. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4903. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4904. num = i;
  4905. }
  4906. }
  4907. if (num == this.state.replenishUrl.length - 1) {
  4908. return message.warning("已经是最后一张了哦");
  4909. }
  4910. this.state.previewImage = this.state.contentUrl[num + 1].url;
  4911. this.setState({
  4912. previewImage: this.state.previewImage,
  4913. rotateDeg: 0,
  4914. });
  4915. },
  4916. upImgCont() {
  4917. let num = 0;
  4918. for (let i = 0; i < this.state.contentUrl.length; i++) {
  4919. if (this.state.contentUrl[i].url == this.state.previewImage) {
  4920. num = i;
  4921. }
  4922. }
  4923. if (num == 0) {
  4924. return message.warning("已经是第一张了哦");
  4925. }
  4926. this.state.previewImage = this.state.contentUrl[num - 1].url;
  4927. this.setState({
  4928. previewImage: this.state.previewImage,
  4929. rotateDeg: 0,
  4930. });
  4931. },
  4932. rotateCont() {
  4933. let rotateDeg = this.state.rotateDeg + 90;
  4934. this.setState({
  4935. rotateDeg,
  4936. });
  4937. },
  4938. showConfirmChange(fn, record) {
  4939. confirm({
  4940. title: "确定取消本次变更吗?",
  4941. content: (
  4942. <span style={{ color: "red" }}>取消后本次变更将作废!!!</span>
  4943. ),
  4944. onOk() {
  4945. fn();
  4946. },
  4947. onCancel() { },
  4948. });
  4949. },
  4950. deleteChange() {
  4951. this.setState({
  4952. loading: true,
  4953. });
  4954. $.ajax({
  4955. url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
  4956. method: "post",
  4957. data: {
  4958. id: this.state.changeId,
  4959. status: this.state.status,
  4960. processState: this.state.processState,
  4961. orderNo: this.state.orderNo,
  4962. },
  4963. }).done(
  4964. function (data) {
  4965. this.setState({
  4966. loading: false,
  4967. });
  4968. if (!data.error.length) {
  4969. message.success("取消成功!");
  4970. this.handleCancelclose();
  4971. } else {
  4972. message.warning(data.error[0].message);
  4973. }
  4974. }.bind(this)
  4975. );
  4976. },
  4977. // 新增协单人员
  4978. submitOrder() {
  4979. if (!this.state.coor) {
  4980. message.warning("请选择协单人员");
  4981. return;
  4982. }
  4983. this.setState({
  4984. loading: true,
  4985. });
  4986. $.ajax({
  4987. method: "post",
  4988. dataType: "json",
  4989. crossDomain: false,
  4990. url: globalConfig.context + "/api/admin/newOrder/addAssist",
  4991. data: {
  4992. orderNo: this.state.orderNo,
  4993. aid: this.state.coor,
  4994. },
  4995. success: function (data) {
  4996. if (data.error.length) {
  4997. this.setState({
  4998. loading: false,
  4999. });
  5000. message.warning(data.error[0].message);
  5001. } else {
  5002. this.setState({
  5003. loading: false,
  5004. coor: '',
  5005. dataSourceView: [],
  5006. coorVisible: "none",
  5007. });
  5008. this.assistList();
  5009. message.success("添加成功");
  5010. }
  5011. }.bind(this),
  5012. }).always(
  5013. function () {
  5014. this.setState({
  5015. loading: false,
  5016. });
  5017. }.bind(this)
  5018. );
  5019. },
  5020. // // 删除协单人员
  5021. // onClosable(id) {
  5022. // $.ajax({
  5023. // method: "post",
  5024. // dataType: "json",
  5025. // crossDomain: false,
  5026. // url: globalConfig.context + "/api/admin/newOrder/deleteAssist",
  5027. // data: {
  5028. // id: id,
  5029. // },
  5030. // success: function (data) {
  5031. // if (!data.error.length) {
  5032. // message.warning(data.error[0].message);
  5033. // } else {
  5034. // message.success("删除成功");
  5035. // }
  5036. // }.bind(this),
  5037. // }).always(
  5038. // function () {
  5039. // this.setState({
  5040. // loading: false,
  5041. // });
  5042. // }.bind(this)
  5043. // );
  5044. // },
  5045. // 新增上门服务数据
  5046. submitView() {
  5047. if (!this.state.dateView) {
  5048. message.warning("请选择上门日期");
  5049. return;
  5050. } else if (!this.state.contentView) {
  5051. message.warning("请填写服务内容");
  5052. return;
  5053. }
  5054. this.setState({
  5055. loading: true,
  5056. });
  5057. $.ajax({
  5058. method: "post",
  5059. dataType: "json",
  5060. crossDomain: false,
  5061. url: globalConfig.context + "/api/admin/newOrder/addOrderService",
  5062. data: {
  5063. orderNo: this.state.orderNo,
  5064. serviceTimes: this.state.dateView,
  5065. content: this.state.contentView,
  5066. remarks: this.state.remarksView,
  5067. },
  5068. success: function (data) {
  5069. if (data.error.length) {
  5070. this.setState({
  5071. loading: false,
  5072. });
  5073. message.warning(data.error[0].message);
  5074. } else {
  5075. this.setState({
  5076. loading: false,
  5077. modalView: false,
  5078. viewKey: this.state.viewKey + 1,
  5079. dateView: '',
  5080. contentView: '',
  5081. remarksView: '',
  5082. contentViewLength: 0,
  5083. contentViewLength1: 0,
  5084. });
  5085. message.success("添加成功");
  5086. this.orderServiceList();
  5087. }
  5088. }.bind(this),
  5089. }).always(
  5090. function () {
  5091. this.setState({
  5092. loading: false,
  5093. });
  5094. }.bind(this)
  5095. );
  5096. },
  5097. //获取上门人员
  5098. assistList(record) {
  5099. this.state.orderList = [];
  5100. $.ajax({
  5101. method: "get",
  5102. dataType: "json",
  5103. crossDomain: false,
  5104. url: globalConfig.context + "/api/admin/newOrder/assistList",
  5105. data: {
  5106. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  5107. },
  5108. success: function (data) {
  5109. if (data.error.length) {
  5110. this.setState({
  5111. loading: false,
  5112. });
  5113. message.warning(data.error[0].message);
  5114. } else {
  5115. this.setState({
  5116. personnel: data.data,
  5117. });
  5118. // message.success("添加成功");
  5119. }
  5120. }.bind(this),
  5121. }).always(
  5122. function () {
  5123. this.setState({
  5124. loading: false,
  5125. });
  5126. }.bind(this)
  5127. );
  5128. },
  5129. // 上门服务列表
  5130. orderServiceList(record) {
  5131. $.ajax({
  5132. method: "get",
  5133. dataType: "json",
  5134. crossDomain: false,
  5135. url: globalConfig.context + "/api/admin/newOrder/orderServiceList",
  5136. data: {
  5137. orderNo: record ? record.orderNo : this.props.datauser.orderNo,
  5138. },
  5139. success: function (data) {
  5140. if (data.error.length) {
  5141. this.setState({
  5142. loading: false,
  5143. });
  5144. message.warning(data.error[0].message);
  5145. } else {
  5146. this.setState({
  5147. dataView: data.data,
  5148. });
  5149. // message.success("添加成功");
  5150. }
  5151. }.bind(this),
  5152. }).always(
  5153. function () {
  5154. this.setState({
  5155. loading: false,
  5156. });
  5157. }.bind(this)
  5158. );
  5159. },
  5160. // 删除上门服务列表
  5161. delectView(record) {
  5162. $.ajax({
  5163. method: "POST",
  5164. dataType: "json",
  5165. crossDomain: false,
  5166. url: globalConfig.context + "/api/admin/newOrder/deleteOrderService",
  5167. data: {
  5168. id: record.id,
  5169. },
  5170. success: function (data) {
  5171. if (data.error.length) {
  5172. this.setState({
  5173. loading: false,
  5174. });
  5175. message.warning(data.error[0].message);
  5176. } else {
  5177. // this.setState({
  5178. // publicView: data.data,
  5179. // });
  5180. this.orderServiceList();
  5181. message.success("删除成功");
  5182. }
  5183. }.bind(this),
  5184. }).always(
  5185. function () {
  5186. this.setState({
  5187. loading: false,
  5188. });
  5189. }.bind(this)
  5190. );
  5191. },
  5192. // 上门查看
  5193. publicByOrder() {
  5194. $.ajax({
  5195. method: "get",
  5196. dataType: "json",
  5197. crossDomain: false,
  5198. url: globalConfig.context + "/api/admin/release/publicByOrder",
  5199. data: {
  5200. orderNo: this.state.orderNo,
  5201. },
  5202. success: function (data) {
  5203. if (data.error.length) {
  5204. this.setState({
  5205. loading: false,
  5206. });
  5207. message.warning(data.error[0].message);
  5208. } else {
  5209. this.setState({
  5210. publicView: data.data,
  5211. });
  5212. // message.success("添加成功");
  5213. }
  5214. }.bind(this),
  5215. }).always(
  5216. function () {
  5217. this.setState({
  5218. loading: false,
  5219. });
  5220. }.bind(this)
  5221. );
  5222. },
  5223. // 获取动态数据名称
  5224. handleSearch(value) {
  5225. $.ajax({
  5226. method: "get",
  5227. dataType: "json",
  5228. crossDomain: false,
  5229. url: globalConfig.context + "/api/admin/customer/listAdminByName",
  5230. data: {
  5231. adminName: value,
  5232. },
  5233. success: function (data) {
  5234. if (data.error.length) {
  5235. this.setState({
  5236. loading: false,
  5237. });
  5238. message.warning(data.error[0].message);
  5239. } else {
  5240. this.setState({
  5241. dataSourceView: data.data,
  5242. });
  5243. // message.success("添加成功");
  5244. }
  5245. }.bind(this),
  5246. }).always(
  5247. function () {
  5248. this.setState({
  5249. loading: false,
  5250. });
  5251. }.bind(this)
  5252. );
  5253. },
  5254. //
  5255. onSelectView(v, o) {
  5256. this.setState({
  5257. coor: v,
  5258. });
  5259. },
  5260. //
  5261. handleClose(removedTag) {
  5262. let serviceLife = this.state.serviceLife.filter(tag => { return tag !== removedTag });
  5263. this.setState({ serviceLife, serviceYear: undefined });
  5264. },
  5265. onSelectChange(selectedRowKeys, selectedRows) {
  5266. this.setState({
  5267. selectedRowKeys,
  5268. selectedRows,
  5269. });
  5270. },
  5271. getRadioList(val, cSort, name) {
  5272. let array = []
  5273. let list = []
  5274. let vlist1 = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20]
  5275. let vlist2 = [20, 19, 18, 17, 16, 15, 14, 13]
  5276. let vlist3 = [15, 14, 13, 12, 11]
  5277. let vlist4 = [10, 9, 8, 7]
  5278. let mlist1 = [19, 18, 17, 16, 15, 14, 13, 12, 11, 10]
  5279. let mlist2 = [12, 11, 10, 9, 8, 7]
  5280. let mlist3 = [10, 9, 8, 7, 6]
  5281. let mlist4 = [6, 5, 4]
  5282. let clist1 = [9, 8, 7, 6, 5, 4, 3, 2, , 1]
  5283. let clist2 = [6, 5, 4, 3, 2, 1]
  5284. let clist3 = [5, 4, 3, 2, 1]
  5285. let clist4 = [3, 2, 1]
  5286. if (cSort == 6) {
  5287. if (name == "zyd" || name == "gtl" || name == "ydhb") {
  5288. list = [
  5289. { value: 1, list: vlist2 },
  5290. { value: 2, list: mlist2 },
  5291. { value: 3, list: clist2 },
  5292. { value: 4, list: [0] }
  5293. ]
  5294. } else if (name == "xyd" || name == "gcxx" || name == "fwtd" || name == "ndhb") {
  5295. list = [
  5296. { value: 1, list: vlist4 },
  5297. { value: 2, list: mlist4 },
  5298. { value: 3, list: clist4 },
  5299. { value: 4, list: [0] }
  5300. ]
  5301. }
  5302. } else {
  5303. if (name == "zyd" || name == "gtl") {
  5304. list = [
  5305. { value: 1, list: vlist1 },
  5306. { value: 2, list: mlist1 },
  5307. { value: 3, list: clist1 },
  5308. { value: 4, list: [0] }
  5309. ]
  5310. } else if (name == "gcxx" || name == "fwtd") {
  5311. list = [
  5312. { value: 1, list: vlist3 },
  5313. { value: 2, list: mlist3 },
  5314. { value: 3, list: clist3 },
  5315. { value: 4, list: [0] }
  5316. ]
  5317. } else if (name == "xyd") {
  5318. list = [
  5319. { value: 1, list: vlist4 },
  5320. { value: 2, list: mlist4 },
  5321. { value: 3, list: clist4 },
  5322. { value: 4, list: [0] }
  5323. ]
  5324. }
  5325. }
  5326. list.map(function (item) {
  5327. if (item.value == val) {
  5328. array = item.list
  5329. }
  5330. })
  5331. return array
  5332. },
  5333. getPaddingLeft(val) {
  5334. let num = 7
  5335. let arr = [
  5336. { value: 1, key: 7 },
  5337. { value: 2, key: 7 },
  5338. { value: 3, key: 7 },
  5339. { value: 4, key: 7 }
  5340. ]
  5341. arr.map(function (item) {
  5342. if (item.value == val) {
  5343. num = item.key
  5344. }
  5345. })
  5346. return num
  5347. },
  5348. getScore(name, cSort, val) {
  5349. let data = ""
  5350. let list = []
  5351. if (cSort == 6) {
  5352. if (name == "zyd" || name == "gtl" || name == "ydhb") {
  5353. list = [
  5354. { title: name == "zyd" ? "很专业" : "很满意", list: [20, 19, 18, 17, 16, 15, 14, 13] },
  5355. { title: name == "zyd" ? "专业" : "满意", list: [12, 11, 10, 9, 8, 7] },
  5356. { title: "一般", list: [6, 5, 4, 3, 2, 1] },
  5357. { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
  5358. ]
  5359. } else if (name == "xyd" || name == "gcxx" || name == "fwtd" || name == "ndhb") {
  5360. list = [
  5361. { title: name == "xyd" ? "很速度" : "很满意", list: [10, 9, 8, 7] },
  5362. { title: name == "xyd" ? "速度" : "满意", list: [6, 5, 4] },
  5363. { title: "一般", list: [3, 2, 1] },
  5364. { title: name == "xyd" ? "很慢" : "不满意", list: [0] },
  5365. ]
  5366. }
  5367. } else {
  5368. if (name == "zyd" || name == "gtl") {
  5369. list = [
  5370. { title: name == "zyd" ? "很专业" : "很满意", list: [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20] },
  5371. { title: name == "zyd" ? "专业" : "满意", list: [19, 18, 17, 16, 15, 14, 13, 12, 11, 10] },
  5372. { title: "一般", list: [9, 8, 7, 6, 5, 4, 3, 2, 1] },
  5373. { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
  5374. ]
  5375. } else if (name == "gcxx" || name == "fwtd") {
  5376. list = [
  5377. { title: "很满意", list: [15, 14, 13, 12, 11] },
  5378. { title: "满意", list: [10, 9, 8, 7, 6] },
  5379. { title: "一般", list: [5, 4, 3, 2, 1] },
  5380. { title: "不满意", list: [0] },
  5381. ]
  5382. } else if (name == "xyd") {
  5383. list = [
  5384. { title: "很速度", list: [10, 9, 8, 7] },
  5385. { title: "速度", list: [6, 5, 4] },
  5386. { title: "一般", list: [3, 2, 1] },
  5387. { title: "很慢", list: [0] },
  5388. ]
  5389. }
  5390. }
  5391. list.map(function (item) {
  5392. if (item.list.includes(val)) {
  5393. data = item.title + "(" + val + "分)"
  5394. }
  5395. })
  5396. return data
  5397. },
  5398. updateByTid() {
  5399. $.ajax({
  5400. method: "POST",
  5401. dataType: "json",
  5402. crossDomain: false,
  5403. url: globalConfig.context + "/api/admin/taskScore/updateByTid",
  5404. data: {
  5405. tid: this.state.tid,
  5406. professionalism: this.state.professionalism,
  5407. communicationSkills: this.state.communicationSkills,
  5408. responsiveness: this.state.responsiveness,
  5409. publicImage: this.state.publicImage,
  5410. serviceAttitude: this.state.serviceAttitude,
  5411. monthlyReport: this.state.cSort == 6 ? this.state.monthlyReport : undefined,
  5412. yearReport: this.state.cSort == 6 ? this.state.yearReport : undefined,
  5413. remarks: this.state.marks,
  5414. },
  5415. success: function (data) {
  5416. if (data.error.length) {
  5417. this.setState({
  5418. loading: false,
  5419. });
  5420. message.error(data.error[0].message);
  5421. } else {
  5422. message.success("操作成功");
  5423. this.onCloses()
  5424. this.loadData();
  5425. }
  5426. }.bind(this),
  5427. }).always(
  5428. function () {
  5429. this.setState({
  5430. loading: false,
  5431. });
  5432. }.bind(this)
  5433. );
  5434. },
  5435. onCloses() {
  5436. this.setState({
  5437. score: "",
  5438. tid: "",
  5439. cSort: "",
  5440. cname: "",
  5441. tname: "",
  5442. zyd: undefined,
  5443. zydList: [],
  5444. professionalism: undefined,
  5445. gtl: undefined,
  5446. gtlList: [],
  5447. communicationSkills: undefined,
  5448. xyd: undefined,
  5449. yxdList: [],
  5450. responsiveness: undefined,
  5451. gcxx: undefined,
  5452. gcxxList: [],
  5453. publicImage: undefined,
  5454. fwtd: undefined,
  5455. fwtdList: [],
  5456. serviceAttitude: undefined,
  5457. ydhb: undefined,
  5458. ydhbList: [],
  5459. monthlyReport: undefined,
  5460. ndhb: undefined,
  5461. ndhbList: [],
  5462. yearReport: undefined,
  5463. remarks: undefined,
  5464. })
  5465. },
  5466. queryByTid(value) {
  5467. this.setState({
  5468. loading: true,
  5469. })
  5470. $.ajax({
  5471. method: "get",
  5472. dataType: "json",
  5473. crossDomain: false,
  5474. url: globalConfig.context + "/api/admin/taskScore/queryByTid",
  5475. data: {
  5476. tid: value,
  5477. },
  5478. success: function (data) {
  5479. if (data.error.length) {
  5480. this.setState({
  5481. loading: false,
  5482. });
  5483. message.warning(data.error[0].message);
  5484. } else {
  5485. this.setState({
  5486. score: "selcet",
  5487. dataScore: data.data,
  5488. });
  5489. }
  5490. }.bind(this),
  5491. }).always(
  5492. function () {
  5493. this.setState({
  5494. loading: false,
  5495. });
  5496. }.bind(this)
  5497. );
  5498. },
  5499. render() {
  5500. const expandedRowRender = (e) => {
  5501. const data = e.list;
  5502. if (e.cSort != 6) {
  5503. let columns = [];
  5504. if (data instanceof Array && data.length) {
  5505. columns = [
  5506. {
  5507. title: "变更状态",
  5508. dataIndex: "type",
  5509. key: "type",
  5510. render: (text, record) => {
  5511. let str = "";
  5512. let color = "";
  5513. if (text == 1) {
  5514. str = "增";
  5515. color = "#87d068";
  5516. } else if (text == 2) {
  5517. str = "改";
  5518. color = "#108ee9";
  5519. } else if (text == 3) {
  5520. str = "删";
  5521. color = "#f50";
  5522. }
  5523. return (
  5524. <span>
  5525. <Tag
  5526. color={color}
  5527. style={{ display: text == 0 ? "none" : "inline-block" }}
  5528. >
  5529. {str}
  5530. </Tag>
  5531. </span>
  5532. );
  5533. },
  5534. },
  5535. {
  5536. title: "业务项目名称",
  5537. dataIndex: "commodityName",
  5538. key: "commodityName",
  5539. render: (text, record) => {
  5540. return <span>
  5541. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  5542. <div>
  5543. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  5544. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  5545. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  5546. {record.cSort == 3 && <span>{record.technologyProjectType == 0 ? '(简易项目)' : record.technologyProjectType == 1 ? '(市区级)' : record.technologyProjectType == 2 ? '(省级)' : record.technologyProjectType == 3 ? '(国家级)' : ''}</span>}
  5547. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  5548. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  5549. </div>
  5550. </span>
  5551. }
  5552. },
  5553. {
  5554. title: "项目类别",
  5555. dataIndex: "cname",
  5556. key: "cname",
  5557. },
  5558. {
  5559. title: "项目数量",
  5560. dataIndex: "commodityQuantity",
  5561. key: "commodityQuantity",
  5562. width: 50,
  5563. },
  5564. {
  5565. title: "金额(万元)",
  5566. dataIndex: "commodityPrice",
  5567. key: "commodityPrice",
  5568. width: 50,
  5569. render: (text, record) => {
  5570. if (record.splitStatus == 2) {
  5571. return "/";
  5572. } else {
  5573. return text;
  5574. }
  5575. },
  5576. },
  5577. {
  5578. title: "主要项目",
  5579. dataIndex: "main",
  5580. key: "main",
  5581. width: 50,
  5582. render: (text) => {
  5583. return text ? "是" : "否";
  5584. },
  5585. },
  5586. {
  5587. title: "项目负责人",
  5588. dataIndex: "receiverName",
  5589. key: "receiverName",
  5590. },
  5591. {
  5592. title: "项目说明",
  5593. dataIndex: "taskComment",
  5594. key: "taskComment",
  5595. render: (text, record) => {
  5596. let textStr = text;
  5597. return (
  5598. <Tooltip title={textStr}>
  5599. <div
  5600. style={{
  5601. width: 100,
  5602. overflow: "hidden",
  5603. whiteSpace: "nowrap",
  5604. textOverflow: "ellipsis",
  5605. }}
  5606. >{textStr}</div>
  5607. </Tooltip>
  5608. )
  5609. },
  5610. },
  5611. {
  5612. title: "操作",
  5613. dataIndex: "ABC",
  5614. key: "ABC",
  5615. render: (text, record) => {
  5616. return (
  5617. <div>
  5618. <Button
  5619. onClick={(e) => {
  5620. e.stopPropagation();
  5621. this.showConfirm(this.changeDeletePro, record);
  5622. }}
  5623. disabled={this.state.listFlag}
  5624. style={{
  5625. display: this.state.displayList ? "none" : "block",
  5626. }}
  5627. >
  5628. 删除
  5629. </Button>
  5630. </div>
  5631. );
  5632. },
  5633. },
  5634. ];
  5635. return (
  5636. <Table
  5637. columns={columns}
  5638. scroll={{ x: "max-content", y: 0 }}
  5639. dataSource={data}
  5640. pagination={false}
  5641. onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
  5642. />
  5643. );
  5644. } else {
  5645. columns = [];
  5646. return (
  5647. <p
  5648. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5649. >
  5650. 此项目暂未拆分
  5651. </p>
  5652. );
  5653. }
  5654. } else {
  5655. let columns = [];
  5656. if (data instanceof Array && data.length) {
  5657. columns = [
  5658. {
  5659. title: "变更状态",
  5660. dataIndex: "type",
  5661. key: "type",
  5662. render: (text, record) => {
  5663. let str = "";
  5664. let color = "";
  5665. if (text == 1) {
  5666. str = "增";
  5667. color = "#87d068";
  5668. } else if (text == 2) {
  5669. str = "改";
  5670. color = "#108ee9";
  5671. } else if (text == 3) {
  5672. str = "删";
  5673. color = "#f50";
  5674. }
  5675. return (
  5676. <span>
  5677. <Tag
  5678. color={color}
  5679. style={{ display: text == 0 ? "none" : "inline-block" }}
  5680. >
  5681. {str}
  5682. </Tag>
  5683. </span>
  5684. );
  5685. },
  5686. },
  5687. {
  5688. title: "负责人",
  5689. dataIndex: "receiverName",
  5690. key: "receiverName",
  5691. },
  5692. {
  5693. title: "负责人电话",
  5694. dataIndex: "receiverMobile",
  5695. key: "receiverMobile",
  5696. },
  5697. {
  5698. title: "项目状态",
  5699. dataIndex: "projectStatus",
  5700. key: "projectStatus",
  5701. render: (text) => {
  5702. return getProjectName(text);
  5703. },
  5704. },
  5705. {
  5706. title: "本次派单",
  5707. dataIndex: "serviceYear",
  5708. key: "serviceYear",
  5709. },
  5710. {
  5711. title: "项目说明",
  5712. dataIndex: "taskComment",
  5713. key: "taskComment",
  5714. render: (text, record) => {
  5715. let textStr = text;
  5716. let textArr = [];
  5717. if (record.htMember === 1) {
  5718. textArr.push("高新会员");
  5719. }
  5720. if (record.additionalDeduction === 1) {
  5721. textArr.push("加计扣除");
  5722. }
  5723. if (record.rdAwardsubsidy === 1) {
  5724. textArr.push("研发补助");
  5725. }
  5726. if (textArr.length) {
  5727. textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  5728. }
  5729. return (
  5730. <Tooltip title={textStr}>
  5731. <div
  5732. // style={{
  5733. // width: 100,
  5734. // overflow: "hidden",
  5735. // whiteSpace: "nowrap",
  5736. // textOverflow: "ellipsis",
  5737. // }}
  5738. >{textStr}</div>
  5739. </Tooltip>
  5740. )
  5741. },
  5742. },
  5743. ];
  5744. return (
  5745. <Table
  5746. columns={columns}
  5747. dataSource={data}
  5748. pagination={false}
  5749. />
  5750. );
  5751. } else {
  5752. columns = [];
  5753. return (
  5754. <p
  5755. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  5756. >
  5757. 暂无派单
  5758. </p>
  5759. );
  5760. }
  5761. }
  5762. };
  5763. const expandedRowRenderDetail = (e) => {
  5764. const data = e.list;
  5765. let columns = [];
  5766. if (data instanceof Array && data.length) {
  5767. if (e.cSort == 6) {
  5768. columns = [
  5769. {
  5770. title: "变更状态",
  5771. dataIndex: "type",
  5772. key: "type",
  5773. render: (text, record) => {
  5774. let str = "";
  5775. let color = "";
  5776. if (text == 1) {
  5777. str = "增";
  5778. color = "#87d068";
  5779. } else if (text == 2) {
  5780. str = "改";
  5781. color = "#108ee9";
  5782. } else if (text == 3) {
  5783. str = "删";
  5784. color = "#f50";
  5785. }
  5786. return (
  5787. <span>
  5788. <Tag
  5789. color={color}
  5790. style={{ display: text == 0 ? "none" : "inline-block" }}
  5791. >
  5792. {str}
  5793. </Tag>
  5794. {/* {record.splitStatus == 1 ? (
  5795. <Tag
  5796. color="#108ee9"
  5797. // onClick={e => {
  5798. // e.stopPropagation();
  5799. // this.showRes(record);
  5800. // }}
  5801. >
  5802. 父项目
  5803. </Tag>
  5804. ) : (
  5805. ""
  5806. )}
  5807. {record.splitStatus == 2 ? (
  5808. <Tag
  5809. color="#108ee9"
  5810. // onClick={e => {
  5811. // e.stopPropagation();
  5812. // this.showRes(record);
  5813. // }}
  5814. >
  5815. 子项目
  5816. </Tag>
  5817. ) : (
  5818. ""
  5819. )} */}
  5820. </span>
  5821. );
  5822. },
  5823. },
  5824. {
  5825. title: "负责人",
  5826. dataIndex: "receiverName",
  5827. key: "receiverName",
  5828. },
  5829. {
  5830. title: "负责人电话",
  5831. dataIndex: "receiverMobile",
  5832. key: "receiverMobile",
  5833. },
  5834. {
  5835. title: "会员负责人",
  5836. dataIndex: "projectMemberName",
  5837. key: "projectMemberName",
  5838. },
  5839. {
  5840. title: "项目状态",
  5841. dataIndex: "projectStatus",
  5842. key: "projectStatus",
  5843. render: (text) => {
  5844. return getProjectName(text);
  5845. },
  5846. },
  5847. {
  5848. title: "本次派单",
  5849. dataIndex: "serviceYear",
  5850. key: "serviceYear",
  5851. },
  5852. {
  5853. title: "项目说明",
  5854. dataIndex: "taskComment",
  5855. key: "taskComment",
  5856. render: (text, record) => {
  5857. let textStr = text;
  5858. let textArr = [];
  5859. if (record.htMember === 1) {
  5860. textArr.push("高新会员");
  5861. }
  5862. if (record.additionalDeduction === 1) {
  5863. textArr.push("加计扣除");
  5864. }
  5865. if (record.rdAwardsubsidy === 1) {
  5866. textArr.push("研发补助");
  5867. }
  5868. if (textArr.length) {
  5869. textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  5870. }
  5871. return (
  5872. <Tooltip title={textStr}>
  5873. <div
  5874. // style={{
  5875. // width: 100,
  5876. // overflow: "hidden",
  5877. // whiteSpace: "nowrap",
  5878. // textOverflow: "ellipsis",
  5879. // }}
  5880. >{textStr}</div>
  5881. </Tooltip>
  5882. )
  5883. },
  5884. },
  5885. ];
  5886. } else {
  5887. columns = [
  5888. {
  5889. title: "变更状态",
  5890. dataIndex: "type",
  5891. key: "type",
  5892. render: (text, record) => {
  5893. let str = "";
  5894. let color = "";
  5895. if (text == 1) {
  5896. str = "增";
  5897. color = "#87d068";
  5898. } else if (text == 2) {
  5899. str = "改";
  5900. color = "#108ee9";
  5901. } else if (text == 3) {
  5902. str = "删";
  5903. color = "#f50";
  5904. }
  5905. return (
  5906. <span>
  5907. <Tag
  5908. color={color}
  5909. style={{ display: text == 0 ? "none" : "inline-block" }}
  5910. >
  5911. {str}
  5912. </Tag>
  5913. {/* {record.splitStatus == 1 ? (
  5914. <Tag
  5915. color="#108ee9"
  5916. // onClick={e => {
  5917. // e.stopPropagation();
  5918. // this.showRes(record);
  5919. // }}
  5920. >
  5921. 父项目
  5922. </Tag>
  5923. ) : (
  5924. ""
  5925. )}
  5926. {record.splitStatus == 2 ? (
  5927. <Tag
  5928. color="#108ee9"
  5929. // onClick={e => {
  5930. // e.stopPropagation();
  5931. // this.showRes(record);
  5932. // }}
  5933. >
  5934. 子项目
  5935. </Tag>
  5936. ) : (
  5937. ""
  5938. )} */}
  5939. </span>
  5940. );
  5941. },
  5942. },
  5943. {
  5944. title: "业务项目名称",
  5945. dataIndex: "commodityName",
  5946. key: "commodityName",
  5947. render: (text, record) => {
  5948. return <span>
  5949. {text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}
  5950. <div>
  5951. {record.cSort == 6 && record.projectType == 1 && <span>(含{record.htMember == 1 ? '高新会员&' : ''}{record.additionalDeduction == 1 ? '加计扣除&' : ''}{record.rdAwardsubsidy == 1 ? '研发奖补' : ''})</span>}
  5952. {record.cSort == 6 && ([0, 3].indexOf(record.projectType) > -1) && <span>(仅提供单边会员服务)</span>}
  5953. {record.cSort == 6 && record.projectType == 2 && <span>(仅填报表,仅咨询,不出备查资料)</span>}
  5954. {record.cSort == 3 && <span>{record.technologyProjectType == 0 ? '(简易项目)' : record.technologyProjectType == 1 ? '(市区级)' : record.technologyProjectType == 2 ? '(省级)' : record.technologyProjectType == 3 ? '(国家级)' : ''}</span>}
  5955. {record.cSort == 8 ? (record.type != 2 && record.patentType == 1) ? <span>(变更)</span> : <span>{record.ordinaryRisk == 0 ? '(普通申请)' : record.ordinaryRisk == 1 ? '(风险代理)' : ''}</span> : ""}
  5956. {record.type == 2 && <span>({record.days == 0 ? '普通' : record.days == 1 ? '加急' : ''}{record.scheme == 0 ? '&无方案' : record.scheme == 1 ? '&有方案' : ''})</span>}
  5957. </div>
  5958. </span>
  5959. }
  5960. },
  5961. {
  5962. title: "项目类别",
  5963. dataIndex: "cname",
  5964. key: "cname",
  5965. },
  5966. {
  5967. title: "项目数量",
  5968. dataIndex: "commodityQuantity",
  5969. key: "commodityQuantity",
  5970. width: 50,
  5971. },
  5972. {
  5973. title: "金额(万元)",
  5974. dataIndex: "commodityPrice",
  5975. key: "commodityPrice",
  5976. width: 50,
  5977. render: (text, record) => {
  5978. if (record.splitStatus == 2) {
  5979. return "/";
  5980. } else {
  5981. return text;
  5982. }
  5983. },
  5984. },
  5985. {
  5986. title: "主要项目",
  5987. dataIndex: "main",
  5988. key: "main",
  5989. width: 50,
  5990. render: (text) => {
  5991. return text ? "是" : "否";
  5992. },
  5993. },
  5994. {
  5995. title: "项目负责人",
  5996. dataIndex: "receiverName",
  5997. key: "receiverName",
  5998. },
  5999. {
  6000. title: "项目说明",
  6001. dataIndex: "taskComment",
  6002. key: "taskComment",
  6003. render: (text) => {
  6004. return (
  6005. <Tooltip title={text}>
  6006. <div
  6007. style={{
  6008. width: 100,
  6009. overflow: "hidden",
  6010. whiteSpace: "nowrap",
  6011. textOverflow: "ellipsis",
  6012. }}
  6013. >{textStr}</div>
  6014. </Tooltip>
  6015. )
  6016. },
  6017. },
  6018. ];
  6019. }
  6020. return (
  6021. <Table
  6022. columns={columns}
  6023. scroll={{ x: "max-content", y: 0 }}
  6024. dataSource={data}
  6025. pagination={false}
  6026. />
  6027. );
  6028. } else {
  6029. columns = [];
  6030. return (
  6031. <p
  6032. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  6033. >
  6034. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  6035. </p>
  6036. );
  6037. }
  6038. };
  6039. const expandedRowRenderVip = (e) => {
  6040. const data = e.splitList;
  6041. let columns = [];
  6042. if (data instanceof Array && data.length) {
  6043. if (e.cSort == 6) {
  6044. columns = [
  6045. {
  6046. title: "负责人",
  6047. dataIndex: "receiverName",
  6048. key: "receiverName",
  6049. },
  6050. {
  6051. title: "负责人电话",
  6052. dataIndex: "receiverMobile",
  6053. key: "receiverMobile",
  6054. },
  6055. {
  6056. title: "会员负责人",
  6057. dataIndex: "projectMemberName",
  6058. key: "projectMemberName",
  6059. },
  6060. {
  6061. title: "项目状态",
  6062. dataIndex: "projectStatus",
  6063. key: "projectStatus",
  6064. render: (text) => {
  6065. return getProjectName(text);
  6066. },
  6067. },
  6068. {
  6069. title: "本次派单",
  6070. dataIndex: "serviceYear",
  6071. key: "serviceYear",
  6072. },
  6073. {
  6074. title: "项目说明",
  6075. dataIndex: "taskComment",
  6076. key: "taskComment",
  6077. render: (text, record) => {
  6078. let textStr = text;
  6079. let textArr = [];
  6080. if (record.htMember === 1) {
  6081. textArr.push("高新会员");
  6082. }
  6083. if (record.additionalDeduction === 1) {
  6084. textArr.push("加计扣除");
  6085. }
  6086. if (record.rdAwardsubsidy === 1) {
  6087. textArr.push("研发补助");
  6088. }
  6089. if (textArr.length) {
  6090. textStr = `${textArr.join("&")} ${!!text ? `(${text})` : ''}`
  6091. }
  6092. return (
  6093. <Tooltip title={textStr}>
  6094. <div
  6095. style={{
  6096. width: 100,
  6097. overflow: "hidden",
  6098. whiteSpace: "nowrap",
  6099. textOverflow: "ellipsis",
  6100. }}
  6101. >{textStr}</div>
  6102. </Tooltip>
  6103. )
  6104. },
  6105. },
  6106. {
  6107. title: "操作",
  6108. dataIndex: "op",
  6109. key: "op",
  6110. width: 110,
  6111. render: (text, record) => {
  6112. return (
  6113. <div>
  6114. {
  6115. record.scoreStatus == 1 &&
  6116. <Button
  6117. type="primary"
  6118. onClick={(e) => {
  6119. e.stopPropagation();
  6120. this.setState({
  6121. tid: record.id,
  6122. score: "add",
  6123. cSort: 6,
  6124. cname: record.taskName,
  6125. tname: record.receiverName,
  6126. })
  6127. }}
  6128. >
  6129. 待评分
  6130. </Button>
  6131. }
  6132. {
  6133. !!record.scoreNumber &&
  6134. <Button
  6135. type="primary"
  6136. onClick={(e) => {
  6137. e.stopPropagation();
  6138. this.setState({
  6139. cSort: 6,
  6140. cname: record.taskName,
  6141. tname: record.receiverName,
  6142. })
  6143. this.queryByTid(record.id)
  6144. }}
  6145. >
  6146. 已评{record.scoreNumber}分
  6147. </Button>
  6148. }
  6149. </div >
  6150. )
  6151. },
  6152. }
  6153. ];
  6154. } else {
  6155. columns = [
  6156. {
  6157. title: "子项目名称",
  6158. dataIndex: "taskName",
  6159. key: "taskName"
  6160. },
  6161. {
  6162. title: "子项目数量",
  6163. dataIndex: "commodityQuantity",
  6164. key: "commodityQuantity"
  6165. },
  6166. {
  6167. title: "拆分操作人",
  6168. dataIndex: "splitAname",
  6169. key: "splitAname"
  6170. },
  6171. {
  6172. title: "项目负责人",
  6173. dataIndex: "receiverName",
  6174. key: "receiverName"
  6175. },
  6176. {
  6177. title: "拆分时间",
  6178. dataIndex: "splitTimes",
  6179. key: "splitTimes"
  6180. }
  6181. ]
  6182. }
  6183. return (
  6184. <Table
  6185. columns={columns}
  6186. dataSource={data}
  6187. pagination={false}
  6188. />
  6189. );
  6190. } else {
  6191. columns = [];
  6192. return (
  6193. <p
  6194. style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
  6195. >
  6196. {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
  6197. </p>
  6198. );
  6199. }
  6200. };
  6201. const FormItem = Form.Item;
  6202. const { TabPane } = Tabs;
  6203. const { TextArea } = Input;
  6204. const radioStyle = {
  6205. display: 'block',
  6206. height: '30px',
  6207. lineHeight: '30px',
  6208. };
  6209. const formItemLayout = {
  6210. labelCol: { span: 10 },
  6211. wrapperCol: { span: 14 },
  6212. };
  6213. const contractData = this.state.contractData;
  6214. const formItemList = [
  6215. {
  6216. label: "企业联系人",
  6217. content: <span>{this.state.contacts}</span>,
  6218. },
  6219. {
  6220. label: "客户名称",
  6221. content: (
  6222. <span>
  6223. {this.state.userName}
  6224. <EnterpriseNameChange
  6225. type="journal"
  6226. style={{ marginLeft: 10 }}
  6227. enterpriseId={this.state.orderUid}
  6228. />
  6229. </span>
  6230. ),
  6231. },
  6232. {
  6233. label: "联系人电话",
  6234. content: <span>{this.state.contactMobile}</span>,
  6235. },
  6236. {
  6237. label: "企业法人",
  6238. content: <span>{this.state.legalPerson}</span>,
  6239. },
  6240. {
  6241. label: "法人电话",
  6242. content: <span>{this.state.legalPersonTel}</span>,
  6243. },
  6244. // {
  6245. // label: "签单金额(万元)",
  6246. // content: <span>{this.state.totalAmount}</span>
  6247. // },
  6248. // {
  6249. // label: "首付金额(万元)",
  6250. // content: <span>{this.state.firstAmount}</span>
  6251. // },
  6252. // {
  6253. // label: "特批立项",
  6254. // content: <span>{getApprovedState(this.state.approval)}</span>
  6255. // },
  6256. // {
  6257. // label: "合同签订时间",
  6258. // content: <span>{this.state.signDate}</span>
  6259. // },
  6260. // {
  6261. // label: "订单部门",
  6262. // content: <span>{this.state.depName}</span>
  6263. // }
  6264. ];
  6265. let dataSources = this.state.customerArr || [];
  6266. let cdataSources = this.state.channelArr || [];
  6267. const cuiDataList = this.state.contactList || [];
  6268. let departmentArr = this.state.departmentArr || [];
  6269. let options = this.state.states
  6270. ? dataSources.map((group) => (
  6271. <Select.Option key={group.id} value={group.name}>
  6272. {group.name}
  6273. </Select.Option>
  6274. ))
  6275. : dataSources.map((group, index) => (
  6276. <Select.Option key={index} value={group.bname}>
  6277. {group.bname}
  6278. </Select.Option>
  6279. ));
  6280. let channeloptions = cdataSources.map((group) => (
  6281. <Select.Option key={group.id} value={group.name}>
  6282. {group.name}
  6283. </Select.Option>
  6284. ));
  6285. let dataSourceView = this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
  6286. <Select.Option key={index} value={group.aid}>
  6287. {group.name}
  6288. </Select.Option>
  6289. )) : '';
  6290. let children = vipYear.map(its => (
  6291. <Option key={its}>{its}</Option>
  6292. ));
  6293. let approvalOptions = [
  6294. { label: '无前期款', value: 1 },
  6295. { label: '暂无合同款', value: 2 },
  6296. { label: '含高风险条款', value: 3 },
  6297. { label: '新产品首单', value: 4 },
  6298. { label: '通过率低于80%', value: 5 },
  6299. { label: '3万以下会员', value: 6 },
  6300. { label: '认证首期5K以下', value: 7 },
  6301. {
  6302. label: <span>
  6303. <span>其他&nbsp;&nbsp;</span>
  6304. <Input
  6305. type="text"
  6306. style={{ width: 150, borderStyle: "none none solid none" }}
  6307. value={this.state.typeExplain}
  6308. // disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
  6309. placeholder=""
  6310. onChange={e => {
  6311. this.setState({
  6312. typeExplain: e.target.value
  6313. })
  6314. }}
  6315. />
  6316. </span>
  6317. , value: 0
  6318. },
  6319. ];
  6320. let { closable } = this.state;
  6321. let assistList = this.assistList;
  6322. const { addPop = "" } = this.props
  6323. return (
  6324. <div>
  6325. {this.state.resVisible ? (
  6326. <ResolutionDetail
  6327. cancel={this.resCancel}
  6328. detail={this.state.resRecord}
  6329. visible={this.state.resVisible}
  6330. id={this.state.resRecord.orderNo}
  6331. />
  6332. ) : (
  6333. ""
  6334. )}
  6335. <Modal
  6336. maskClosable={false}
  6337. visible={this.props.addPop == "add" ? this.props.showDesc : this.state.visible}
  6338. onOk={this.handleOk}
  6339. onCancel={this.handleCancelclose}
  6340. width={!this.props.userDetaile ? "600px" : "1200px"}
  6341. title={!this.props.userDetaile ? "创建订单" : ""}
  6342. footer=""
  6343. className="admin-desc-content"
  6344. >
  6345. <Form
  6346. layout="horizontal"
  6347. onSubmit={this.handleSubmit}
  6348. style={{ paddingBottom: "40px" }}
  6349. >
  6350. <Spin spinning={this.state.loading}>
  6351. <div className="clearfix">
  6352. {
  6353. addPop == "add" &&
  6354. <div className="clearfix">
  6355. <div className="clearfix">
  6356. <FormItem {...formItemLayout} label="订单类型">
  6357. <Select
  6358. placeholder="请选择订单类型"
  6359. style={{ width: "200px" }}
  6360. value={this.state.orderType}
  6361. onChange={(e) => {
  6362. this.setState({ orderType: e });
  6363. }}
  6364. >
  6365. {orderTypes.map(function (item) {
  6366. return (
  6367. <Select.Option key={item.value}>
  6368. {item.key}
  6369. </Select.Option>
  6370. );
  6371. })}
  6372. </Select>
  6373. <span className="mandatory">*</span>
  6374. </FormItem>
  6375. </div>
  6376. <FormItem {...formItemLayout} label="客户所属类型">
  6377. <Select
  6378. placeholder="请选择客户所属类型"
  6379. style={{ width: "200px" }}
  6380. value={this.state.userType}
  6381. onChange={(e) => {
  6382. this.setState({
  6383. userType: e,
  6384. customerArr: [],
  6385. autoId: "",
  6386. customerName: "",
  6387. selectSales: undefined
  6388. });
  6389. }}
  6390. >
  6391. {customerType.map(function (item) {
  6392. return (
  6393. <Select.Option key={item.value}>
  6394. {item.key}
  6395. </Select.Option>
  6396. );
  6397. })}
  6398. </Select>
  6399. </FormItem>
  6400. <div className="clearfix">
  6401. <FormItem {...formItemLayout} label="客户名称">
  6402. <AutoComplete
  6403. className="certain-category-search"
  6404. dropdownClassName="certain-category-search-dropdown"
  6405. dropdownMatchSelectWidth={false}
  6406. dropdownStyle={{ width: 200 }}
  6407. size="large"
  6408. style={{ width: "200px" }}
  6409. dataSource={options}
  6410. placeholder="输入名称"
  6411. value={this.state.customerName}
  6412. onChange={this.customerChange}
  6413. filterOption={true}
  6414. onSelect={this.selectAutoCUT}
  6415. >
  6416. <Input />
  6417. </AutoComplete>
  6418. <span className="mandatory">*</span>
  6419. </FormItem>
  6420. </div>
  6421. <FormItem {...formItemLayout} label="销售类型">
  6422. <Select
  6423. placeholder="请选择销售类型"
  6424. style={{ width: "200px" }}
  6425. value={this.state.selectSales}
  6426. onChange={(e) => {
  6427. this.setState({
  6428. selectSales: e,
  6429. });
  6430. }}
  6431. >
  6432. {(this.state.userType == "0"
  6433. ? ssalesType : this.state.userType == "1"
  6434. ? qsalesType : this.state.userType == "2"
  6435. ? wsalesType : this.state.userType == "3"
  6436. ? qsalesType : []).map(function (item) {
  6437. return (
  6438. <Select.Option key={item.value} disabled={item.value == "5"}>
  6439. {item.key}
  6440. </Select.Option>
  6441. );
  6442. })}
  6443. </Select>
  6444. <span className="mandatory">*</span>
  6445. </FormItem>
  6446. {
  6447. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  6448. <FormItem {...formItemLayout} label="描述">
  6449. <TextArea
  6450. placeholder="请填写描述"
  6451. style={{ width: 300, height: 80 }}
  6452. onChange={(e) => {
  6453. this.setState({
  6454. other: e.target.value
  6455. })
  6456. }}
  6457. />
  6458. </FormItem>
  6459. }
  6460. {
  6461. this.state.selectSales == "3" &&
  6462. <div className="clearfix">
  6463. <FormItem {...formItemLayout} label="渠道名称">
  6464. <AutoComplete
  6465. className="certain-category-search"
  6466. dropdownClassName="certain-category-search-dropdown"
  6467. dropdownMatchSelectWidth={false}
  6468. dropdownStyle={{ width: 200 }}
  6469. size="large"
  6470. style={{ width: "200px" }}
  6471. dataSource={channeloptions}
  6472. placeholder="请输入渠道关键字"
  6473. value={this.state.channelName}
  6474. onChange={this.channelChange}
  6475. filterOption={true}
  6476. onSelect={this.goSelect}
  6477. >
  6478. <Input />
  6479. </AutoComplete>
  6480. <span className="mandatory">*</span>
  6481. </FormItem>
  6482. </div>
  6483. }
  6484. <div className="addSave" style={{ marginTop: "30px" }}>
  6485. <Button
  6486. className="cancel"
  6487. type="primary"
  6488. // onClick={this.handleCancel}
  6489. style={{ marginLeft: "220px" }}
  6490. htmlType="submit"
  6491. >
  6492. 开单
  6493. </Button>
  6494. <Button
  6495. className="cancel"
  6496. type="ghost"
  6497. onClick={this.handleCancelclose}
  6498. style={{ marginLeft: "50px" }}
  6499. >
  6500. 取消
  6501. </Button>
  6502. </div>
  6503. </div>
  6504. }
  6505. {
  6506. addPop == "edit" &&
  6507. <Tabs
  6508. onChange={this.callback}
  6509. activeKey={this.state.activeKey}
  6510. tabBarExtraContent={
  6511. <div
  6512. style={{ fontWeight: "bold", paddingRight: "15px" }}
  6513. >
  6514. <OrderItemStatus deleteSign={this.state.deleteSign} />
  6515. </div>
  6516. }
  6517. >
  6518. <TabPane tab={"最新订单"} key="1">
  6519. {
  6520. this.state.activeKey == "1" &&
  6521. <div className="clearfix">
  6522. <div className="clearfix">
  6523. <FormItem
  6524. className="half-item"
  6525. {...formItemLayout}
  6526. label="合同编号"
  6527. >
  6528. {<span>{this.state.contractNo}</span>}
  6529. </FormItem>
  6530. <FormItem
  6531. className="half-item"
  6532. {...formItemLayout}
  6533. label="订单编号"
  6534. >
  6535. <span>{this.state.orderNo}</span>
  6536. </FormItem>
  6537. <FormItem
  6538. className="half-item"
  6539. {...formItemLayout}
  6540. label="流程状态"
  6541. >
  6542. <span>
  6543. {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
  6544. </span>
  6545. <FlowChart
  6546. orderNo={this.state.orderNo}
  6547. />
  6548. </FormItem>
  6549. <FormItem
  6550. className="half-item"
  6551. {...formItemLayout}
  6552. label="销售类型"
  6553. >
  6554. <span>
  6555. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  6556. (salesList[this.state.updatas.salesType] || "")}
  6557. </span>
  6558. {
  6559. this.state.processStatus === 0 &&
  6560. <UpdateSales
  6561. orderNo={this.state.orderNo}
  6562. updatas={this.state.updatas}
  6563. onRefresh={
  6564. e => {
  6565. let ups = this.state.updatas
  6566. ups.salesType = e.salesType
  6567. if (e.salesType == "3") {
  6568. ups.channelId = e.channelId
  6569. ups.other = e.other
  6570. } else if (e.salesType == "4" || e.salesType == "5") {
  6571. ups.other = e.other
  6572. }
  6573. this.setState({
  6574. updatas: ups,
  6575. userType: ups.userType
  6576. })
  6577. }
  6578. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  6579. }
  6580. />
  6581. }
  6582. </FormItem>
  6583. <FormItem
  6584. className="half-item"
  6585. {...formItemLayout}
  6586. label="结算状态"
  6587. >
  6588. <span>
  6589. {getLiquidationStatus(
  6590. this.state.liquidationStatus
  6591. )}
  6592. </span>
  6593. </FormItem>
  6594. {this.state.processStatus === 0 ? (
  6595. <div className="clearfix">
  6596. <FormItem
  6597. className="half-item"
  6598. {...formItemLayout}
  6599. label="特批立项"
  6600. >
  6601. <Select
  6602. placeholder="请选择客户所属类型"
  6603. style={{ width: "240px" }}
  6604. value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
  6605. }
  6606. onChange={(e) => {
  6607. this.setState({ approval: e });
  6608. }}
  6609. >
  6610. <Select.Option key={0}>非特批</Select.Option>
  6611. <Select.Option key={1}>特批</Select.Option>
  6612. </Select>
  6613. {
  6614. this.state.approval == 1 &&
  6615. <div>
  6616. <CheckboxGroup
  6617. options={approvalOptions}
  6618. value={this.state.approvaType}
  6619. onChange={e => {
  6620. this.setState({
  6621. approvaType: e
  6622. })
  6623. }}
  6624. />
  6625. </div>
  6626. }
  6627. </FormItem>
  6628. <FormItem
  6629. className="half-item"
  6630. {...formItemLayout}
  6631. label={
  6632. <span>
  6633. <strong style={{ color: "#f00" }}>*</strong>
  6634. 合同签订时间
  6635. </span>
  6636. }
  6637. >
  6638. <DatePicker
  6639. className="signDateRef"
  6640. style={{
  6641. marginTop: "2px",
  6642. // width: "240px",
  6643. height: "27px",
  6644. }}
  6645. showTime
  6646. format="YYYY-MM-DD"
  6647. onOk={() => { }}
  6648. value={
  6649. this.state.signDate
  6650. ? moment(this.state.signDate)
  6651. : null
  6652. }
  6653. onChange={(data, dataString) => {
  6654. this.setState({ signDate: dataString });
  6655. }}
  6656. />
  6657. </FormItem>
  6658. <div className="clearfix">
  6659. <FormItem
  6660. className="half-item"
  6661. {...formItemLayout}
  6662. label="订单部门"
  6663. >
  6664. <Select
  6665. placeholder="请选择订单部门"
  6666. style={{ width: 240 }}
  6667. value={this.state.organizationSearch}
  6668. onChange={(e) => {
  6669. this.setState({ organizationSearch: e });
  6670. }}
  6671. >
  6672. {departmentArr.map(function (item) {
  6673. return (
  6674. <Select.Option key={item.id}>
  6675. {item.name}
  6676. </Select.Option>
  6677. );
  6678. })}
  6679. </Select>
  6680. </FormItem>
  6681. </div>
  6682. </div>
  6683. ) : (
  6684. <div className="clearfix">
  6685. <FormItem
  6686. className="half-item"
  6687. {...formItemLayout}
  6688. label="特批立项"
  6689. >
  6690. <span>
  6691. {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
  6692. {getApprovedState(this.state.approval)}
  6693. {getApprovedType(this.state.approvaType, this.state.typeExplain, 1)}
  6694. </span>
  6695. </FormItem>
  6696. <FormItem
  6697. className="half-item"
  6698. {...formItemLayout}
  6699. label="合同签订时间"
  6700. >
  6701. <span>{this.state.signDate}</span>
  6702. </FormItem>
  6703. <FormItem
  6704. className="half-item"
  6705. {...formItemLayout}
  6706. label="订单部门"
  6707. >
  6708. <span>{this.state.depName}</span>
  6709. </FormItem>
  6710. <FormItem
  6711. className="half-item"
  6712. {...formItemLayout}
  6713. label="是否外包"
  6714. >
  6715. <span>
  6716. {this.state.outsource == 0 ? "否" : "是"}
  6717. </span>
  6718. </FormItem>
  6719. </div>
  6720. )}
  6721. </div>
  6722. <h3
  6723. style={{
  6724. marginLeft: 10,
  6725. fontWeight: 800,
  6726. marginBottom: 10,
  6727. }}
  6728. >
  6729. 收款项目
  6730. </h3>
  6731. {this.state.processStatus === 0 ? (
  6732. <div className="clearfix">
  6733. <FormItem
  6734. className="half-item"
  6735. {...formItemLayout}
  6736. label="签单金额(万元)"
  6737. >
  6738. <Input
  6739. placeholder="签单金额"
  6740. ref="totalAmountRef"
  6741. value={this.state.totalAmount}
  6742. onChange={(e) => {
  6743. this.setState({
  6744. totalAmount: e.target.value,
  6745. });
  6746. }}
  6747. style={{ width: "240px" }}
  6748. />
  6749. </FormItem>
  6750. <FormItem
  6751. className="half-item"
  6752. {...formItemLayout}
  6753. label="首付金额(万元)"
  6754. >
  6755. <Input
  6756. placeholder="请输入实签首款金额"
  6757. ref="firstAmountRef"
  6758. value={this.state.firstAmount}
  6759. onChange={(e) => {
  6760. this.setState({
  6761. firstAmount: e.target.value,
  6762. });
  6763. }}
  6764. style={{ width: "240px" }}
  6765. />
  6766. </FormItem>
  6767. <FormItem
  6768. className="half-item"
  6769. {...formItemLayout}
  6770. label="已收款项"
  6771. >
  6772. <span>
  6773. {this.state.settlementAmount + "万元"}
  6774. </span>
  6775. {/* {this.state.settlementAmount ? (
  6776. <Button
  6777. type="primary"
  6778. onClick={this.tuikuan}
  6779. style={{
  6780. float: "right",
  6781. marginRight: "50px",
  6782. marginBottom: "15px"
  6783. }}
  6784. >
  6785. 退单
  6786. </Button>
  6787. ) : (
  6788. ""
  6789. )} */}
  6790. </FormItem>
  6791. </div>
  6792. ) : (
  6793. <div className="clearfix">
  6794. <FormItem
  6795. className="half-item"
  6796. {...formItemLayout}
  6797. label="签单金额(万元)"
  6798. >
  6799. <span>{this.state.totalAmount}</span>
  6800. </FormItem>
  6801. <FormItem
  6802. className="half-item"
  6803. {...formItemLayout}
  6804. label="首付金额(万元)"
  6805. >
  6806. <span>{this.state.firstAmount}</span>
  6807. </FormItem>
  6808. <FormItem
  6809. className="half-item"
  6810. {...formItemLayout}
  6811. label="已收款项"
  6812. >
  6813. <span>
  6814. {this.state.settlementAmount + "万元"}
  6815. </span>
  6816. {/* {this.state.settlementAmount ? (
  6817. <Button
  6818. type="primary"
  6819. onClick={this.tuikuan}
  6820. style={{
  6821. float: "right",
  6822. marginRight: "50px",
  6823. marginBottom: "15px"
  6824. }}
  6825. >
  6826. 退单
  6827. </Button>
  6828. ) : (
  6829. ""
  6830. )} */}
  6831. </FormItem>
  6832. </div>
  6833. )}
  6834. <h3
  6835. style={{
  6836. marginLeft: 10,
  6837. fontWeight: 800,
  6838. marginBottom: 10,
  6839. }}
  6840. >
  6841. 联系信息
  6842. </h3>
  6843. {this.state.processStatus == 0 ? (
  6844. <div className="clearfix">
  6845. <div className="clearfix">
  6846. <FormItem
  6847. className="half-item"
  6848. style={{ width: "100%" }}
  6849. labelCol={{ span: 5 }}
  6850. wrapperCol={{ span: 19 }}
  6851. label="客户名称"
  6852. >
  6853. <span>{this.state.userName}</span>
  6854. <EnterpriseNameChange
  6855. type="journal"
  6856. style={{ marginLeft: 10 }}
  6857. enterpriseId={this.state.orderUid}
  6858. />
  6859. </FormItem>
  6860. </div>
  6861. <FormItem
  6862. className="half-item"
  6863. {...formItemLayout}
  6864. label={
  6865. <span>
  6866. <strong style={{ color: "#f00" }}>*</strong>
  6867. 企业联系人
  6868. </span>
  6869. }
  6870. >
  6871. <Input
  6872. placeholder="请输入联系人"
  6873. ref="signTotalAmount"
  6874. value={this.state.contacts}
  6875. onChange={(e) => {
  6876. this.setState({ contacts: e.target.value });
  6877. }}
  6878. style={{ width: "240px" }}
  6879. />
  6880. </FormItem>
  6881. <FormItem
  6882. className="half-item"
  6883. {...formItemLayout}
  6884. label={
  6885. <span>
  6886. <strong style={{ color: "#f00" }}>*</strong>
  6887. 联系人电话
  6888. </span>
  6889. }
  6890. >
  6891. <Input
  6892. placeholder="请输入联系人电话"
  6893. ref="signTotalAmount"
  6894. value={this.state.contactMobile}
  6895. onChange={(e) => {
  6896. this.setState({
  6897. contactMobile: e.target.value,
  6898. });
  6899. }}
  6900. style={{ width: "240px" }}
  6901. />
  6902. </FormItem>
  6903. <FormItem
  6904. className="half-item"
  6905. {...formItemLayout}
  6906. label="企业法人"
  6907. >
  6908. <Input
  6909. placeholder="请输入法人"
  6910. ref="signTotalAmount"
  6911. value={this.state.legalPerson}
  6912. onChange={(e) => {
  6913. this.setState({
  6914. legalPerson: e.target.value,
  6915. });
  6916. }}
  6917. style={{ width: "240px" }}
  6918. />
  6919. </FormItem>
  6920. <FormItem
  6921. className="half-item"
  6922. {...formItemLayout}
  6923. label="法人电话"
  6924. >
  6925. <Input
  6926. placeholder="请输入法人电话"
  6927. ref="signTotalAmount"
  6928. value={this.state.legalPersonTel}
  6929. onChange={(e) => {
  6930. this.setState({
  6931. legalPersonTel: e.target.value,
  6932. });
  6933. }}
  6934. style={{ width: "240px" }}
  6935. />
  6936. </FormItem>
  6937. </div>
  6938. ) : (
  6939. <div className="clearfix">
  6940. {formItemList.map((data, index) => {
  6941. return (
  6942. <FormItem
  6943. className="half-item"
  6944. {...formItemLayout}
  6945. key={index}
  6946. label={data.label}
  6947. >
  6948. {data.content}
  6949. </FormItem>
  6950. );
  6951. })}
  6952. </div>
  6953. )}
  6954. <div className="clearfix">
  6955. {this.state.processStatus == 0 ? (
  6956. <div>
  6957. <FormItem
  6958. labelCol={{ span: 5 }}
  6959. wrapperCol={{ span: 19 }}
  6960. label={
  6961. <span>
  6962. <strong style={{ color: "#f00" }}>
  6963. *
  6964. </strong>
  6965. 合同扫描件
  6966. </span>
  6967. }
  6968. >
  6969. <PicturesWall
  6970. domId={"addService1"}
  6971. fileList={this.getOrgCodeUrl}
  6972. pictureUrl={this.state.orgCodeUrl}
  6973. url="/api/admin/order/uploadOrderImg"
  6974. orderNo={this.state.orderNo}
  6975. sign="contract"
  6976. deleteApi="/api/admin/order/deleteOrderImg"
  6977. />
  6978. <p>图片建议:要清晰。</p>
  6979. <Button
  6980. style={{
  6981. float: "right",
  6982. marginRight: "140px",
  6983. marginTop: "20px",
  6984. }}
  6985. onClick={this.getOrderLog}
  6986. >
  6987. 查看订单日志
  6988. </Button>
  6989. </FormItem>
  6990. <Gxczx
  6991. isShow={this.state.isShow}
  6992. isCreat={true}
  6993. knowledgeServices={this.state.knowledgeServices}
  6994. auditServices={this.state.auditServices}
  6995. addDeductionServices={this.state.addDeductionServices}
  6996. knowledgeOther={this.state.knowledgeOther}
  6997. auditOther={this.state.auditOther}
  6998. addDeductionOther={this.state.addDeductionOther}
  6999. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  7000. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  7001. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  7002. onSwitch={e => { this.setState({ isShow: e }) }}
  7003. />
  7004. <FormItem
  7005. labelCol={{ span: 5 }}
  7006. wrapperCol={{ span: 19 }}
  7007. label={<span>补充协议</span>}
  7008. >
  7009. <PicturesWall
  7010. domId={"addService2"}
  7011. fileList={this.getReplenishUrl}
  7012. pictureUrl={this.state.replenishUrl}
  7013. url="/api/admin/order/uploadOrderImg"
  7014. orderNo={this.state.orderNo}
  7015. sign="supplement"
  7016. deleteApi="/api/admin/order/deleteOrderImg"
  7017. />
  7018. <p>图片建议:要清晰。</p>
  7019. </FormItem>
  7020. </div>
  7021. ) : (
  7022. <div>
  7023. <FormItem
  7024. labelCol={{ span: 5 }}
  7025. wrapperCol={{ span: 19 }}
  7026. label="合同扫描件"
  7027. >
  7028. <div
  7029. style={{
  7030. paddingTop: "10px",
  7031. paddingBottom: "10px",
  7032. }}
  7033. >
  7034. {this.state.orgCodeUrl &&
  7035. this.state.visible &&
  7036. this.state.activeKey === "1" ? (
  7037. <ImgList
  7038. domId={"addService3"}
  7039. fileList={this.state.orgCodeUrl}
  7040. ItemWidth={"96px"}
  7041. />
  7042. ) : (
  7043. <div />
  7044. )}
  7045. </div>
  7046. <Button
  7047. style={{
  7048. float: "right",
  7049. marginRight: "140px",
  7050. marginTop: "20px",
  7051. }}
  7052. onClick={this.getOrderLog}
  7053. >
  7054. 查看订单日志
  7055. </Button>
  7056. </FormItem>
  7057. {/* 高新纯咨询合同说明详情 */}
  7058. <Gxczx
  7059. knowledgeServices={this.state.knowledgeServices}
  7060. auditServices={this.state.auditServices}
  7061. addDeductionServices={this.state.addDeductionServices}
  7062. knowledgeOther={this.state.knowledgeOther}
  7063. auditOther={this.state.auditOther}
  7064. addDeductionOther={this.state.addDeductionOther}
  7065. />
  7066. <FormItem
  7067. labelCol={{ span: 5 }}
  7068. wrapperCol={{ span: 19 }}
  7069. label="补充协议"
  7070. >
  7071. <div
  7072. style={{
  7073. paddingTop: "10px",
  7074. paddingBottom: "10px",
  7075. }}
  7076. >
  7077. {this.state.visible &&
  7078. this.state.activeKey === "1" &&
  7079. this.state.replenishUrl ? (
  7080. <ImgList
  7081. domId={"addService4"}
  7082. fileList={this.state.replenishUrl}
  7083. ItemWidth={"96px"}
  7084. />
  7085. ) : (
  7086. <div />
  7087. )}
  7088. </div>
  7089. </FormItem>
  7090. </div>
  7091. )}
  7092. </div>
  7093. {/* 服务内容 */}
  7094. <div class="clearfix">
  7095. <FormItem
  7096. labelCol={{ span: 5 }}
  7097. wrapperCol={{ span: 19 }}
  7098. label={
  7099. <span>
  7100. <strong style={{ color: "#f00" }}>*</strong>
  7101. 服务内容
  7102. </span>
  7103. }
  7104. >
  7105. <div>
  7106. {this.state.processStatus == 0 ?
  7107. <div>
  7108. <PicturesWall
  7109. domId={"addServiceContent"}
  7110. fileList={this.getContentUrl}
  7111. pictureUrl={this.state.contentUrl}
  7112. url="/api/admin/order/uploadOrderImg"
  7113. orderNo={this.state.orderNo}
  7114. sign="content"
  7115. deleteApi="/api/admin/order/deleteOrderImg"
  7116. />
  7117. </div> :
  7118. this.state.contentUrl.length > 0 ?
  7119. <div>
  7120. <ImgList
  7121. domId={"addService13"}
  7122. fileList={this.state.contentUrl}
  7123. ItemWidth={"96px"}
  7124. />
  7125. </div> : "暂无附件!"}
  7126. <p> <span style={{ color: "red", display: "inline-block" }}>(注:必需上传服务内容、服务年限、时间节点、乙方权利与责任、违约条款、保密条款!)</span>图片建议:要清晰。</p>
  7127. </div>
  7128. </FormItem>
  7129. </div>
  7130. {/* 知识产权情况 */}
  7131. {this.state.processStatus == 0 ?
  7132. <Property
  7133. isCreat={true}
  7134. isProperty={this.state.isProperty}
  7135. setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
  7136. patentStatus={this.state.patentStatus}
  7137. setPatentS={e => { this.setState({ patentStatus: e }) }}
  7138. /> :
  7139. <Property
  7140. patentStatus={this.state.patentStatus}
  7141. />}
  7142. <div className="clearfix">
  7143. {this.state.processStatus == 0 ? (
  7144. <div className="clearfix">
  7145. <FormItem
  7146. labelCol={{ span: 5 }}
  7147. wrapperCol={{ span: 16 }}
  7148. label={
  7149. <span>
  7150. <strong style={{ color: "#f00" }}>*</strong>
  7151. 订单留言
  7152. </span>
  7153. }
  7154. >
  7155. <Input
  7156. ref="orderRemarksRef"
  7157. type="textarea"
  7158. placeholder="请输入订单留言"
  7159. rows={4}
  7160. value={this.state.orderRemarks}
  7161. onChange={(e) => {
  7162. this.setState({
  7163. orderRemarks: e.target.value,
  7164. });
  7165. }}
  7166. style={{ width: "95%" }}
  7167. />
  7168. <div className="mandatory">
  7169. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  7170. </div>
  7171. </FormItem>
  7172. </div>
  7173. ) : (
  7174. <FormItem
  7175. labelCol={{ span: 4 }}
  7176. wrapperCol={{ span: 16 }}
  7177. label="订单留言"
  7178. >
  7179. <p
  7180. style={{ width: 500, wordWrap: "break-word" }}
  7181. >
  7182. {this.state.orderRemarks}
  7183. </p>
  7184. </FormItem>
  7185. )}
  7186. </div>
  7187. <div className="clearfix">
  7188. <FormItem
  7189. className="half-item"
  7190. {...formItemLayout}
  7191. label="订单负责人"
  7192. >
  7193. <span>{this.state.salesmanName}</span>
  7194. </FormItem>
  7195. <FormItem
  7196. className="half-item"
  7197. {...formItemLayout}
  7198. label="订单负责人电话"
  7199. >
  7200. <span>{this.state.salesmanMobile}</span>
  7201. </FormItem>
  7202. </div>
  7203. <div className="clearfix">
  7204. <FormItem
  7205. className="half-item"
  7206. {...formItemLayout}
  7207. label="当前财务负责人"
  7208. >
  7209. <span>{this.state.nowFinance}</span>
  7210. </FormItem>
  7211. <FormItem
  7212. className="half-item"
  7213. {...formItemLayout}
  7214. label="当前财务负责人电话"
  7215. >
  7216. <span>{this.state.nowFinanceMobile}</span>
  7217. </FormItem>
  7218. </div>
  7219. <div className="clearfix">
  7220. <FormItem
  7221. className="half-item"
  7222. {...formItemLayout}
  7223. style={{ opacity: ".5" }}
  7224. label="原订单负责人"
  7225. >
  7226. <span>{this.state.oldSalesmanName}</span>
  7227. </FormItem>
  7228. <FormItem
  7229. className="half-item"
  7230. {...formItemLayout}
  7231. style={{ opacity: ".5" }}
  7232. label="原订单负责人电话"
  7233. >
  7234. <span>{this.state.oldSalesmanMobile}</span>
  7235. </FormItem>
  7236. </div>
  7237. <div className="clearfix">
  7238. <FormItem
  7239. className="half-item"
  7240. style={{ opacity: ".5" }}
  7241. {...formItemLayout}
  7242. label="实际财务操作人"
  7243. >
  7244. <span>{this.state.financeName}</span>
  7245. </FormItem>
  7246. <FormItem
  7247. className="half-item"
  7248. {...formItemLayout}
  7249. style={{ opacity: ".5" }}
  7250. label="实际财务操作人电话"
  7251. >
  7252. <span>{this.state.financeMobile}</span>
  7253. </FormItem>
  7254. </div>
  7255. {/* 新增协单人员 */}
  7256. <div>
  7257. <div style={{ marginLeft: "50px", display: 'flex' }}>
  7258. <div
  7259. style={{
  7260. minWidth: '66px',
  7261. maxWidth: '100px',
  7262. fontSize: "12px",
  7263. color: "red",
  7264. }}
  7265. >
  7266. 协单人员 :
  7267. </div>
  7268. <div>
  7269. {this.state.personnel.length > 0
  7270. ? this.state.personnel.map(function (value, key) {
  7271. return (
  7272. <Tag
  7273. style={{ marginBottom: '5px' }}
  7274. key={value.id}
  7275. closable={closable}
  7276. onClose={(e) => {
  7277. e.preventDefault();
  7278. confirm({
  7279. title: "确定删除此人员吗?",
  7280. // content: (
  7281. // <span style={{ color: "red" }}>
  7282. // 删除后会将该项目下的所有催款节点自动清除!!!
  7283. // </span>
  7284. // ),
  7285. onOk() {
  7286. $.ajax({
  7287. method: "post",
  7288. dataType: "json",
  7289. crossDomain: false,
  7290. url:
  7291. globalConfig.context +
  7292. "/api/admin/newOrder/deleteAssist",
  7293. data: {
  7294. id: value.id,
  7295. },
  7296. success: function (data) {
  7297. if (data.error.length) {
  7298. message.warning(
  7299. data.error[0].message
  7300. );
  7301. } else {
  7302. message.success("删除成功");
  7303. assistList();
  7304. }
  7305. }.bind(this),
  7306. }).always(
  7307. function () {
  7308. this.setState({
  7309. loading: false,
  7310. });
  7311. }.bind(this)
  7312. );
  7313. },
  7314. onCancel() { },
  7315. });
  7316. }}
  7317. >
  7318. {value.name}
  7319. </Tag>
  7320. );
  7321. })
  7322. : "无"}
  7323. </div>
  7324. </div>
  7325. <div
  7326. style={{
  7327. margin: "10px 0 0 50px",
  7328. display: this.state.disabledView,
  7329. }}
  7330. >
  7331. <Button
  7332. type="primary"
  7333. onClick={() => {
  7334. this.setState({
  7335. coorVisible: "block",
  7336. coor: "",
  7337. });
  7338. }}
  7339. >
  7340. 添加协单人员
  7341. </Button>
  7342. {/* 提示 */}
  7343. <div style={{ color: "red" }}>
  7344. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  7345. </div>
  7346. </div>
  7347. {/*添加协单人员 */}
  7348. <div
  7349. style={{
  7350. margin: "10px 0 0 50px",
  7351. display: this.state.coorVisible,
  7352. }}
  7353. >
  7354. <Form
  7355. onSubmit={this.handleSubmit}
  7356. ref={this.formRef}
  7357. >
  7358. <Form.Item
  7359. {...formItemLayout}
  7360. label=""
  7361. name="coor"
  7362. hasFeedback
  7363. >
  7364. <AutoComplete
  7365. // autocomplete="off"
  7366. allowClear
  7367. dataSource={dataSourceView}
  7368. style={{ width: 200 }}
  7369. onSelect={this.onSelectView}
  7370. onSearch={this.handleSearch}
  7371. placeholder="请输入名称"
  7372. />
  7373. </Form.Item>
  7374. </Form>
  7375. <div style={{ marginLeft: "10px" }}>
  7376. <Button
  7377. type="primary"
  7378. style={{ marginRight: "54px" }}
  7379. onClick={this.submitOrder}
  7380. loading={this.state.loading}
  7381. >
  7382. 保存
  7383. </Button>
  7384. <Button
  7385. onClick={() => {
  7386. this.setState({
  7387. coorVisible: "none",
  7388. });
  7389. }}
  7390. >
  7391. 取消
  7392. </Button>
  7393. </div>
  7394. </div>
  7395. </div>
  7396. {/* 分界线 */}
  7397. <div
  7398. style={{
  7399. borderTop: "1px solid #333",
  7400. margin: "5px 0",
  7401. }}
  7402. ></div>
  7403. {/* 上门服务次数 */}
  7404. <div>
  7405. <div
  7406. style={{
  7407. display: "flex",
  7408. justifyContent: "space-between",
  7409. }}
  7410. >
  7411. <div
  7412. style={{ marginLeft: "50px", fontSize: "20px" }}
  7413. >
  7414. 上门服务次数
  7415. </div>
  7416. <div>
  7417. <Button
  7418. type="primary"
  7419. style={{ marginBottom: 15 }}
  7420. onClick={() => {
  7421. this.publicByOrder();
  7422. this.setState({
  7423. modalRecord: true,
  7424. });
  7425. }}
  7426. >
  7427. 查看上门记录
  7428. </Button>
  7429. <Button
  7430. style={{ marginLeft: 5, display: this.state.disabledView }}
  7431. type="primary"
  7432. onClick={() => {
  7433. this.setState({
  7434. modalView: true,
  7435. dateView: '',
  7436. contentView: '',
  7437. remarksView: '',
  7438. contentViewLength: 0,
  7439. contentViewLength1: 0,
  7440. });
  7441. }}
  7442. >
  7443. 添加上门次数
  7444. </Button>
  7445. </div>
  7446. </div>
  7447. {/* 上门服务表格 */}
  7448. <div
  7449. className="patent-table"
  7450. style={{ marginBottom: 10 }}
  7451. >
  7452. <Spin spinning={this.state.loading}>
  7453. <Table
  7454. columns={this.state.columnsView}
  7455. scroll={{ x: "max-content", y: 0 }}
  7456. dataSource={this.state.dataView}
  7457. pagination={false}
  7458. // onRowClick={this.tableRowClick}
  7459. bordered
  7460. size="small"
  7461. />
  7462. </Spin>
  7463. </div>
  7464. {/* 查看上门记录 */}
  7465. <Modal
  7466. footer=""
  7467. title="技术人员上门详细记录"
  7468. visible={this.state.modalRecord}
  7469. width="1200px"
  7470. onCancel={() => {
  7471. this.setState({
  7472. modalRecord: false,
  7473. });
  7474. }}
  7475. >
  7476. <Spin spinning={this.state.loading}>
  7477. <Table
  7478. columns={this.state.columnsRecord}
  7479. scroll={{ x: "max-content", y: 0 }}
  7480. dataSource={this.state.publicView}
  7481. pagination={false}
  7482. // onRowClick={this.tableRowClick}
  7483. bordered
  7484. size="small"
  7485. />
  7486. </Spin>
  7487. </Modal>
  7488. {/* 添加上门次数模态框 */}
  7489. <Modal
  7490. footer=""
  7491. title="新增上门次数"
  7492. visible={this.state.modalView}
  7493. key={this.state.viewKey}
  7494. onCancel={() => {
  7495. this.setState({
  7496. modalView: false,
  7497. viewKey: this.state.viewKey + 1,
  7498. });
  7499. }}
  7500. >
  7501. <Form
  7502. onSubmit={this.handleSubmit}
  7503. ref={this.formRef}
  7504. style={{ marginRight: "120px" }}
  7505. >
  7506. <Form.Item
  7507. {...formItemLayout}
  7508. label="上门时间"
  7509. name="date"
  7510. hasFeedback
  7511. >
  7512. <DatePicker
  7513. placeholder="预计技术员上门服务时间"
  7514. onChange={(date, dateString) => {
  7515. this.setState({
  7516. dateView: dateString,
  7517. });
  7518. }}
  7519. />
  7520. </Form.Item>
  7521. <Form.Item
  7522. {...formItemLayout}
  7523. label="服务内容"
  7524. name="remarks"
  7525. hasFeedback
  7526. style={{ position: 'relative' }}
  7527. >
  7528. <TextArea
  7529. rows={4}
  7530. placeholder="需要技术员上门服务内容"
  7531. onChange={(e) => {
  7532. this.setState({
  7533. contentView: e.target.value,
  7534. }, () => {
  7535. if (!this.state.contentView) {
  7536. this.setState({
  7537. contentViewLength: 0,
  7538. })
  7539. } else {
  7540. this.setState({
  7541. contentViewLength: this.state.contentView.length
  7542. })
  7543. }
  7544. });
  7545. }}
  7546. maxLength={500}
  7547. >
  7548. </TextArea>
  7549. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  7550. </Form.Item>
  7551. <Form.Item
  7552. {...formItemLayout}
  7553. label="备注"
  7554. name="remarks"
  7555. hasFeedback
  7556. style={{ position: 'relative' }}
  7557. >
  7558. <TextArea
  7559. rows={4}
  7560. maxLength={500}
  7561. placeholder="需要技术员注意事项"
  7562. onChange={(e) => {
  7563. this.setState({
  7564. remarksView: e.target.value,
  7565. }, () => {
  7566. if (!this.state.remarksView) {
  7567. this.setState({
  7568. contentViewLength1: 0,
  7569. })
  7570. } else {
  7571. this.setState({
  7572. contentViewLength1: this.state.remarksView.length
  7573. })
  7574. }
  7575. });
  7576. }}
  7577. />
  7578. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  7579. </Form.Item>
  7580. </Form>
  7581. <div
  7582. style={{
  7583. display: "flex",
  7584. justifyContent: "center",
  7585. }}
  7586. >
  7587. <Button
  7588. onClick={this.submitView}
  7589. type="primary"
  7590. loading={this.state.loading}
  7591. >
  7592. 提交
  7593. </Button>
  7594. <Button
  7595. type="dashed"
  7596. style={{ marginLeft: "15px" }}
  7597. onClick={() => {
  7598. this.setState({
  7599. modalView: false,
  7600. viewKey: this.state.viewKey + 1,
  7601. dateView: '',
  7602. contentView: '',
  7603. remarksView: '',
  7604. contentViewLength: 0,
  7605. contentViewLength1: 0,
  7606. });
  7607. }}
  7608. >
  7609. 取消
  7610. </Button>
  7611. </div>
  7612. </Modal>
  7613. </div>
  7614. <div>
  7615. <span
  7616. style={{ marginLeft: "50px", fontSize: "20px" }}
  7617. >
  7618. 项目业务
  7619. </span>
  7620. {
  7621. // 新需求 除湖南和内蒙古外 不让其他省操作
  7622. (adminData.province == "21" || adminData.province == "11") &&
  7623. <div>
  7624. {
  7625. this.state.processStatus == 0 &&
  7626. <Button
  7627. type="primary"
  7628. onClick={this.addDetailed}
  7629. style={{
  7630. float: "right",
  7631. marginRight: "50px",
  7632. marginBottom: "15px",
  7633. }}
  7634. >
  7635. 添加项目明细
  7636. </Button>
  7637. }
  7638. {
  7639. this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
  7640. <Button
  7641. type="primary"
  7642. onClick={this.addVip}
  7643. style={{
  7644. float: "right",
  7645. marginRight: "50px",
  7646. marginBottom: "15px",
  7647. }}
  7648. >
  7649. 添加会员项目
  7650. </Button>
  7651. }
  7652. {
  7653. (this.state.processStatus == 7 || this.state.processStatus == 8) &&
  7654. <Button
  7655. type="primary"
  7656. style={{
  7657. float: "right",
  7658. marginRight: "50px",
  7659. marginBottom: "15px",
  7660. }}
  7661. onClick={() => {
  7662. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7663. message.warning("项目变更中,无法发起项目重启");
  7664. return
  7665. }
  7666. this.setState({
  7667. selectVisible: true,
  7668. sType: "restart",
  7669. })
  7670. }}
  7671. >
  7672. 项目重启
  7673. </Button>
  7674. }
  7675. {
  7676. (this.state.processStatus == 7 || this.state.processStatus == 8) &&
  7677. <Button
  7678. type="primary"
  7679. style={{
  7680. float: "right",
  7681. marginRight: "50px",
  7682. marginBottom: "15px",
  7683. }}
  7684. onClick={() => {
  7685. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7686. message.warning("项目变更中,无法发起项目暂停");
  7687. return
  7688. }
  7689. this.setState({
  7690. selectVisible: true,
  7691. sType: "suspend",
  7692. })
  7693. }}
  7694. >
  7695. 项目暂停
  7696. </Button>
  7697. }
  7698. </div>
  7699. }
  7700. </div>
  7701. <div
  7702. className="patent-table"
  7703. style={{ marginBottom: 10 }}
  7704. >
  7705. <Spin spinning={this.state.loading}>
  7706. {
  7707. // 项目暂停&重启勾选
  7708. this.state.selectVisible &&
  7709. <SelectList
  7710. type={this.state.sType}
  7711. contractNo={this.state.contractNo}
  7712. orderNo={this.state.orderNo}
  7713. userName={this.state.userName}
  7714. list={this.state.dataSource}
  7715. visible={this.state.selectVisible}
  7716. subClose={() => {
  7717. this.loadData();
  7718. this.setState({
  7719. selectVisible: false,
  7720. })
  7721. }}
  7722. />
  7723. }
  7724. <Table
  7725. rowKey="id"
  7726. columns={this.state.columns}
  7727. dataSource={this.state.dataSource}
  7728. pagination={this.state.pagination}
  7729. expandedRowRender={expandedRowRenderVip}
  7730. rowClassName={this.addRowColor}
  7731. onRowClick={this.tableRowClick}
  7732. bordered
  7733. size="small"
  7734. />
  7735. </Spin>
  7736. </div>
  7737. <div
  7738. style={{
  7739. display: cuiDataList.length ? "block" : "none",
  7740. }}
  7741. >
  7742. <span
  7743. style={{ marginLeft: "50px", fontSize: "20px" }}
  7744. >
  7745. 旧催款节点
  7746. </span>
  7747. <Button
  7748. type="primary"
  7749. // onClick={this.addcontact}
  7750. disabled
  7751. onClick={(e) => {
  7752. cuiDataList.length
  7753. ? this.addcontact()
  7754. : this.addcontactNew();
  7755. }}
  7756. style={{
  7757. float: "right",
  7758. marginRight: "50px",
  7759. marginBottom: "15px",
  7760. display:
  7761. this.state.processStatus == 0
  7762. ? "block"
  7763. : "none",
  7764. }}
  7765. >
  7766. 添加催款节点
  7767. </Button>
  7768. </div>
  7769. <div
  7770. className="clearfix"
  7771. style={{
  7772. display: cuiDataList.length ? "block" : "none",
  7773. }}
  7774. >
  7775. <Spin spinning={this.state.loading}>
  7776. <Form layout="horizontal">
  7777. <Table
  7778. pagination={false}
  7779. columns={this.state.ContactsLists}
  7780. dataSource={this.state.contactList}
  7781. scroll={{ x: "max-content", y: 0 }}
  7782. bordered
  7783. size="small"
  7784. />
  7785. <Col
  7786. span={24}
  7787. offset={9}
  7788. style={{ marginTop: "15px" }}
  7789. ></Col>
  7790. </Form>
  7791. </Spin>
  7792. </div>
  7793. <div
  7794. style={{
  7795. display: cuiDataList.length ? "none" : "block",
  7796. }}
  7797. >
  7798. <span
  7799. style={{
  7800. marginLeft: "50px",
  7801. fontSize: "20px",
  7802. }}
  7803. >
  7804. 新催款节点
  7805. </span>
  7806. <span
  7807. style={{
  7808. display: "inline-block",
  7809. marginLeft: 10,
  7810. color: "red",
  7811. }}
  7812. >
  7813. 金额总计(万元): {this.state.totalCui}
  7814. </span>
  7815. <Button
  7816. type="primary"
  7817. disabled={this.state.addFlag ? true : false}
  7818. // onClick={this.addcontact}
  7819. onClick={(e) => {
  7820. this.setState({ addFlag: true });
  7821. this.addcontactNew();
  7822. }}
  7823. style={{
  7824. float: "right",
  7825. marginRight: "50px",
  7826. marginBottom: "15px",
  7827. display:
  7828. this.state.processStatus == 0
  7829. ? "block"
  7830. : "none",
  7831. }}
  7832. >
  7833. 添加催款节点
  7834. </Button>
  7835. </div>
  7836. <div
  7837. className="clearfix"
  7838. style={{
  7839. display: cuiDataList.length ? "none" : "block",
  7840. }}
  7841. >
  7842. <Spin spinning={this.state.loading}>
  7843. <Form layout="horizontal">
  7844. <Table
  7845. pagination={false}
  7846. columns={this.state.ContactsListsNew}
  7847. dataSource={this.state.contactListNew}
  7848. scroll={{ x: "max-content", y: 0 }}
  7849. bordered
  7850. size="small"
  7851. />
  7852. <Col
  7853. span={24}
  7854. offset={9}
  7855. style={{ marginTop: "15px" }}
  7856. ></Col>
  7857. </Form>
  7858. </Spin>
  7859. </div>
  7860. {this.state.processStatus == 0 &&
  7861. <div
  7862. className="addSave"
  7863. style={{
  7864. marginTop: "15px",
  7865. display: "flex",
  7866. justifyContent: "center",
  7867. }}
  7868. >
  7869. <Button
  7870. className="cancel"
  7871. type="primary"
  7872. onClick={this.handleCancels}
  7873. style={{ margin: "0 25px" }}
  7874. htmlType="submit"
  7875. loading={this.state.loading}
  7876. >
  7877. 签单
  7878. </Button>
  7879. <Button
  7880. className="cancel"
  7881. type="primary"
  7882. onClick={this.handleCancelq}
  7883. style={{ margin: "0 25px" }}
  7884. htmlType="submit"
  7885. loading={this.state.loading}
  7886. >
  7887. 保存
  7888. </Button>
  7889. <Popconfirm
  7890. title="请确认您是否作废此订单??"
  7891. onConfirm={(e) => {
  7892. this.examOks()
  7893. }}
  7894. okText="确认"
  7895. cancelText="取消"
  7896. >
  7897. <Button
  7898. className="cancel"
  7899. type="danger"
  7900. // onClick={this.examOks}
  7901. style={{ margin: "0 25px" }}
  7902. loading={this.state.loading}
  7903. >
  7904. 订单作废
  7905. </Button>
  7906. </Popconfirm>
  7907. <Button
  7908. className="cancel"
  7909. type="ghost"
  7910. onClick={this.handleCancelclose}
  7911. style={{ margin: "0 25px" }}
  7912. >
  7913. 取消
  7914. </Button>
  7915. </div>
  7916. }
  7917. </div>
  7918. }
  7919. </TabPane>
  7920. {
  7921. // 新需求 除湖南和内蒙古外 不让其他省操作
  7922. (adminData.province == "21" || adminData.province == "11") &&
  7923. <TabPane tab="合同变更发起" key="2">
  7924. {
  7925. this.state.activeKey == "2" &&
  7926. <div className="contractchange">
  7927. {
  7928. !(this.state.processStatus == 7 || this.state.processStatus == 8) &&
  7929. <div className="cmask">当前状态不能发起合同变更</div>
  7930. }
  7931. <div className="clearfix">
  7932. <FormItem
  7933. className="half-item"
  7934. {...formItemLayout}
  7935. label="客户名称"
  7936. >
  7937. <span>{this.state.userName}</span>
  7938. <EnterpriseNameChange
  7939. type="journal"
  7940. style={{ marginLeft: 10 }}
  7941. enterpriseId={this.state.orderUid}
  7942. />
  7943. </FormItem>
  7944. </div>
  7945. <div className="clearfix">
  7946. <FormItem
  7947. className="half-item"
  7948. {...formItemLayout}
  7949. label="合同编号"
  7950. >
  7951. <span>{this.state.contractNo}</span>
  7952. </FormItem>
  7953. </div>
  7954. <div className="clearfix">
  7955. <FormItem
  7956. className="half-item"
  7957. {...formItemLayout}
  7958. label="申请变更部门"
  7959. >
  7960. <span>{this.state.depName}</span>
  7961. </FormItem>
  7962. <FormItem
  7963. className="half-item"
  7964. {...formItemLayout}
  7965. label="申请人"
  7966. >
  7967. <span>{this.state.salesmanName}</span>
  7968. </FormItem>
  7969. </div>
  7970. <div className="clearfix">
  7971. <FormItem
  7972. labelCol={{ span: 5 }}
  7973. wrapperCol={{ span: 19 }}
  7974. label="变更类型"
  7975. >
  7976. <Select
  7977. placeholder="选择合同变更类型"
  7978. style={{ width: 200 }}
  7979. disabled={this.state.changeFlag}
  7980. value={this.state.typeChange}
  7981. onChange={(e) => {
  7982. this.setState({
  7983. typeChange: e,
  7984. changeFlag: true,
  7985. });
  7986. if (e == 1) {
  7987. this.setState({
  7988. hetongFlag: false,
  7989. listFlag: false,
  7990. listCuiFlag: false,
  7991. tuiKuanFlag: false,
  7992. displayList: false,
  7993. });
  7994. } else if (e == 2) {
  7995. this.setState({
  7996. hetongFlag: true,
  7997. listFlag: false,
  7998. listCuiFlag: false,
  7999. tuiKuanFlag: true,
  8000. displayList: false,
  8001. });
  8002. } else if (e == 3) {
  8003. this.setState({
  8004. listFlag: false,
  8005. hetongFlag: false,
  8006. listCuiFlag: false,
  8007. tuiKuanFlag: false,
  8008. displayList: true,
  8009. });
  8010. } else if (e == 4) {
  8011. this.setState({
  8012. listFlag: false,
  8013. listCuiFlag: false,
  8014. hetongFlag: false,
  8015. tuiKuanFlag: true,
  8016. displayList: false,
  8017. });
  8018. } else if (e == 5) {
  8019. this.setState({
  8020. listFlag: false,
  8021. listCuiFlag: false,
  8022. hetongFlag: true,
  8023. tuiKuanFlag: true,
  8024. displayList: false,
  8025. });
  8026. } else if (e == 6) {
  8027. this.setState({
  8028. // listFlag: true,
  8029. // listCuiFlag: true,
  8030. // hetongFlag: true,
  8031. // tuiKuanFlag: true,
  8032. // displayList: false,
  8033. listFlag: false,
  8034. listCuiFlag: false,
  8035. hetongFlag: false,
  8036. tuiKuanFlag: false,
  8037. displayList: false,
  8038. });
  8039. } else if (e == 7) {
  8040. this.setState({
  8041. listFlag: true,
  8042. listCuiFlag: true,
  8043. hetongFlag: true,
  8044. tuiKuanFlag: true,
  8045. displayList: false,
  8046. isNew: true, //上传替换合同
  8047. });
  8048. } else {
  8049. this.setState({
  8050. hetongFlag: false,
  8051. listFlag: false,
  8052. listCuiFlag: false,
  8053. tuiKuanFlag: false,
  8054. displayList: false,
  8055. });
  8056. }
  8057. }}
  8058. >
  8059. <Option value={0}>退单退款</Option>
  8060. <Option value={1}>项目及金额变更</Option>
  8061. <Option value={2}>仅项目变更</Option>
  8062. <Option value={3}>仅金额变更</Option>
  8063. <Option value={4}>重报</Option>
  8064. <Option value={5}>赠送</Option>
  8065. <Option value={6}>退单不退款</Option>
  8066. <Option value={7}>仅变更合同</Option>
  8067. <Option value={8}>框架协议(仅已签框架合同适用)</Option>
  8068. </Select>
  8069. <Button
  8070. style={{ marginLeft: 10 }}
  8071. onClick={(e) => {
  8072. this.setState({
  8073. listFlag: false,
  8074. hetongFlag: false,
  8075. listCuiFlag: false,
  8076. tuiKuanFlag: false,
  8077. displayList: false,
  8078. startRemarks: "",
  8079. remarksC: "",
  8080. voucherUrl: [],
  8081. newContractUrl: [],
  8082. isNew: false,
  8083. changeAmount: "0",
  8084. applicant: undefined,
  8085. depNameChange: undefined,
  8086. typeChange: undefined,
  8087. changeFlag: false,
  8088. });
  8089. }}
  8090. >
  8091. 重置
  8092. </Button>
  8093. {(this.state.status === 3 || this.state.status == 0) ? (
  8094. <Button
  8095. type="danger"
  8096. style={{
  8097. float: "right",
  8098. backgroundColor: "red",
  8099. color: "white",
  8100. position: "absolute",
  8101. right: 0,
  8102. height: 50,
  8103. borderRadius: 20,
  8104. zIndex: 100,
  8105. top: 0,
  8106. }}
  8107. onClick={(e) => {
  8108. e.stopPropagation();
  8109. this.showConfirmChange(this.deleteChange);
  8110. }}
  8111. >
  8112. 取消本次变更
  8113. </Button>
  8114. ) : (
  8115. ""
  8116. )}
  8117. </FormItem>
  8118. </div>
  8119. <div className="clearfix">
  8120. <FormItem
  8121. labelCol={{ span: 5 }}
  8122. wrapperCol={{ span: 19 }}
  8123. label="合同额(万元)"
  8124. >
  8125. <Input
  8126. placeholder="请输入合同额"
  8127. disabled={this.state.hetongFlag}
  8128. ref="signTotalAmount"
  8129. value={this.state.totalAmount}
  8130. onChange={(e) => {
  8131. this.setState({
  8132. totalAmount: e.target.value,
  8133. });
  8134. }}
  8135. style={{ width: "240px" }}
  8136. />
  8137. </FormItem>
  8138. <FormItem
  8139. labelCol={{ span: 5 }}
  8140. wrapperCol={{ span: 19 }}
  8141. label="首付款(万元)"
  8142. >
  8143. <Input
  8144. placeholder="请输入首付款"
  8145. disabled={this.state.hetongFlag}
  8146. ref="signTotalAmount"
  8147. value={this.state.firstAmount}
  8148. onChange={(e) => {
  8149. this.setState({
  8150. firstAmount: e.target.value,
  8151. });
  8152. }}
  8153. style={{ width: "240px" }}
  8154. />
  8155. </FormItem>
  8156. <FormItem
  8157. labelCol={{ span: 5 }}
  8158. wrapperCol={{ span: 19 }}
  8159. label="已收款(万元)"
  8160. >
  8161. <span>
  8162. {this.state.settlementAmount}
  8163. &nbsp;&nbsp;&nbsp;&nbsp;
  8164. <span style={{ color: "red" }}>
  8165. (注:已收款与现实收款不符,请与财务专员联系)
  8166. </span>
  8167. </span>
  8168. </FormItem>
  8169. <FormItem
  8170. labelCol={{ span: 5 }}
  8171. wrapperCol={{ span: 19 }}
  8172. label="申请退款(万元)"
  8173. >
  8174. <Input
  8175. placeholder="请输入申请退款"
  8176. ref="signTotalAmount"
  8177. disabled={this.state.tuiKuanFlag}
  8178. value={this.state.changeAmount}
  8179. onChange={(e) => {
  8180. this.setState({
  8181. changeAmount: e.target.value,
  8182. });
  8183. }}
  8184. style={{ width: "240px" }}
  8185. />
  8186. </FormItem>
  8187. </div>
  8188. {/* 退单退款 */}
  8189. {this.state.isCaoGao && this.state.typeChange == 0 &&
  8190. <div className="clearfix">
  8191. <div className="clearfix">
  8192. <FormItem
  8193. className="half-item"
  8194. {...formItemLayout}
  8195. label="企业总经理姓名"
  8196. >
  8197. <Input
  8198. placeholder="请输入企业总经理姓名"
  8199. value={this.state.managerContacts}
  8200. onChange={(e) => {
  8201. this.setState({
  8202. managerContacts: e.target.value,
  8203. });
  8204. }}
  8205. style={{ width: "240px" }}
  8206. />
  8207. </FormItem>
  8208. <FormItem
  8209. className="half-item"
  8210. {...formItemLayout}
  8211. label="企业总经理联系电话"
  8212. >
  8213. <Input
  8214. placeholder="请输入企业总经理联系电话"
  8215. value={this.state.managerContactMobile}
  8216. onChange={(e) => {
  8217. this.setState({
  8218. managerContactMobile: e.target.value,
  8219. });
  8220. }}
  8221. style={{ width: "240px" }}
  8222. />
  8223. </FormItem>
  8224. </div>
  8225. <div className="clearfix">
  8226. <FormItem
  8227. className="half-item"
  8228. {...formItemLayout}
  8229. label="企业联系人姓名"
  8230. >
  8231. <Input
  8232. placeholder="请输入企业联系人姓名"
  8233. value={this.state.contacts}
  8234. onChange={(e) => {
  8235. this.setState({
  8236. contacts: e.target.value,
  8237. });
  8238. }}
  8239. style={{ width: "240px" }}
  8240. />
  8241. </FormItem>
  8242. <FormItem
  8243. className="half-item"
  8244. {...formItemLayout}
  8245. label="企业联系人联系方式"
  8246. >
  8247. <Input
  8248. placeholder="请输入企业联系人联系方式"
  8249. value={this.state.contactMobile}
  8250. onChange={(e) => {
  8251. this.setState({
  8252. contactMobile: e.target.value,
  8253. });
  8254. }}
  8255. style={{ width: "240px" }}
  8256. />
  8257. </FormItem>
  8258. </div>
  8259. <div className="clearfix">
  8260. <FormItem
  8261. className="half-item"
  8262. {...formItemLayout}
  8263. label={<span style={{ color: "red" }}>注</span>}
  8264. >
  8265. <span style={{ color: "red" }}>
  8266. 请填写以上信息,公司总经理将与企业联系交流
  8267. </span>
  8268. </FormItem>
  8269. </div>
  8270. </div>
  8271. }
  8272. <div
  8273. style={{
  8274. display: this.state.isCaoGao ? "block" : "none",
  8275. }}
  8276. >
  8277. <div>
  8278. <span
  8279. style={{
  8280. marginLeft: "50px",
  8281. fontSize: "20px",
  8282. }}
  8283. >
  8284. 项目业务
  8285. </span>
  8286. <span style={{ color: "red" }}>
  8287. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  8288. </span>
  8289. <Button
  8290. type="primary"
  8291. onClick={this.changeAddPro}
  8292. disabled={this.state.listFlag}
  8293. style={{
  8294. float: "right",
  8295. marginRight: "50px",
  8296. marginBottom: "15px",
  8297. display: this.state.displayList
  8298. ? "none"
  8299. : "block",
  8300. }}
  8301. >
  8302. 添加项目明细
  8303. </Button>
  8304. </div>
  8305. <div
  8306. className="patent-table"
  8307. style={{ marginBottom: 10 }}
  8308. >
  8309. <Spin spinning={this.state.loading}>
  8310. <Table
  8311. columns={this.state.proColumns}
  8312. dataSource={this.state.proDataSource}
  8313. expandedRowRender={expandedRowRender}
  8314. pagination={this.state.pagination}
  8315. rowClassName={this.addRowColor}
  8316. // onRowDoubleClick={
  8317. // this.state.listFlag
  8318. // ? this.not
  8319. // : this.editPro
  8320. // }
  8321. bordered
  8322. size="small"
  8323. />
  8324. </Spin>
  8325. </div>
  8326. <div>
  8327. <span
  8328. style={{
  8329. marginLeft: "50px",
  8330. fontSize: "20px",
  8331. }}
  8332. >
  8333. 催款节点
  8334. </span>
  8335. <span style={{ color: "red" }}>
  8336. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  8337. </span>
  8338. <Button
  8339. type="primary"
  8340. onClick={(e) => {
  8341. this.changeAddCui();
  8342. }}
  8343. disabled={this.state.listCuiFlag}
  8344. style={{
  8345. float: "right",
  8346. marginRight: "50px",
  8347. marginBottom: "15px",
  8348. display: this.state.displayList
  8349. ? "none"
  8350. : "block",
  8351. }}
  8352. >
  8353. 添加催款节点
  8354. </Button>
  8355. </div>
  8356. <div className="clearfix">
  8357. <Spin spinning={this.state.loading}>
  8358. <Form layout="horizontal">
  8359. <Table
  8360. pagination={false}
  8361. columns={this.state.changeCuiList}
  8362. dataSource={this.state.cuiDataSource}
  8363. scroll={{ x: "max-content", y: 0 }}
  8364. onRowDoubleClick={
  8365. this.state.listCuiFlag
  8366. ? this.not
  8367. : this.editCui
  8368. }
  8369. bordered
  8370. size="small"
  8371. />
  8372. <Col
  8373. span={24}
  8374. offset={9}
  8375. style={{ marginTop: "15px" }}
  8376. ></Col>
  8377. </Form>
  8378. </Spin>
  8379. </div>
  8380. </div>
  8381. <div className="clearfix">
  8382. <FormItem
  8383. style={{ height: "auto" }}
  8384. labelCol={{ span: 5 }}
  8385. wrapperCol={{ span: 19 }}
  8386. label="变更原因"
  8387. >
  8388. <TextArea
  8389. rows={4}
  8390. placeholder="请输入变更原因"
  8391. ref="signTotalAmount"
  8392. style={{ width: "95%" }}
  8393. value={this.state.remarksC}
  8394. onChange={(e) => {
  8395. this.setState({
  8396. remarksC: e.target.value,
  8397. });
  8398. }}
  8399. />
  8400. </FormItem>
  8401. </div>
  8402. <div className="clearfix">
  8403. <FormItem
  8404. style={{ height: "auto" }}
  8405. labelCol={{ span: 5 }}
  8406. wrapperCol={{ span: 19 }}
  8407. label="备注"
  8408. >
  8409. <TextArea
  8410. rows={4}
  8411. placeholder="请输入备注"
  8412. ref="signTotalAmount"
  8413. style={{ width: "95%" }}
  8414. value={this.state.startRemarks}
  8415. onChange={(e) => {
  8416. this.setState({
  8417. startRemarks: e.target.value,
  8418. });
  8419. }}
  8420. />
  8421. </FormItem>
  8422. </div>
  8423. <div className="clearfix">
  8424. <FormItem
  8425. labelCol={{ span: 5 }}
  8426. wrapperCol={{ span: 19 }}
  8427. label="变更凭证"
  8428. >
  8429. <PicturesWall
  8430. domId={"addService5"}
  8431. fileList={this.getVoucherUrl}
  8432. pictureUrl={this.state.voucherUrl}
  8433. url="/api/admin/orderChange/uploadFile"
  8434. sign="order_change_file"
  8435. />
  8436. <p>图片建议:要清晰。</p>
  8437. </FormItem>
  8438. </div>
  8439. <div className="clearfix">
  8440. <FormItem
  8441. labelCol={{ span: 5 }}
  8442. wrapperCol={{ span: 19 }}
  8443. label="上传替换合同"
  8444. >
  8445. <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
  8446. <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
  8447. </FormItem>
  8448. </div>
  8449. {
  8450. this.state.isNew &&
  8451. <div className="clearfix">
  8452. <FormItem
  8453. labelCol={{ span: 5 }}
  8454. wrapperCol={{ span: 19 }}
  8455. label="合同扫描件"
  8456. >
  8457. <PicturesWall
  8458. domId={"newcontract"}
  8459. fileList={this.getNewContractUrl}
  8460. pictureUrl={this.state.newContractUrl}
  8461. url="/api/admin/orderChange/uploadFile"
  8462. sign=""
  8463. />
  8464. <p>图片建议:要清晰。</p>
  8465. </FormItem>
  8466. </div>
  8467. }
  8468. <div className="clearfix">
  8469. <Button
  8470. type="primary"
  8471. style={{ float: "right", marginRight: 40 }}
  8472. loading={this.state.loading}
  8473. onClick={(e) => {
  8474. if (this.state.isCaoGao) {
  8475. this.submitChange();
  8476. } else {
  8477. this.changeApply();
  8478. }
  8479. }}
  8480. >
  8481. {/* {this.state.isCaoGao
  8482. ? "发起变更申请"
  8483. : this.state.typeChange == 0
  8484. ? "发起变更申请"
  8485. : "下一步"} */}
  8486. {this.state.isCaoGao ? "发起变更申请" : "下一步"}
  8487. </Button>
  8488. </div>
  8489. </div>
  8490. }
  8491. </TabPane>
  8492. }
  8493. {this.state.isJilu &&
  8494. <TabPane tab={"最近变更记录"} key="3">
  8495. {
  8496. this.state.activeKey == "3" &&
  8497. <div>
  8498. <div
  8499. style={{
  8500. borderRadius: "50%",
  8501. width: 300,
  8502. height: 300,
  8503. position: "absolute",
  8504. top: 230,
  8505. left: 525,
  8506. transform: "rotate(-5deg)",
  8507. zIndex: 1,
  8508. display:
  8509. this.state.detailChange.status == 4
  8510. ? "block"
  8511. : "none",
  8512. }}
  8513. >
  8514. <img src={tongguo} style={{ width: "100%" }} />
  8515. </div>
  8516. <div
  8517. style={{
  8518. borderRadius: "50%",
  8519. width: 300,
  8520. height: 300,
  8521. position: "absolute",
  8522. top: 284,
  8523. left: 586,
  8524. transform: "rotate(-5deg)",
  8525. zIndex: 1,
  8526. display:
  8527. this.state.detailChange.status == 5
  8528. ? "block"
  8529. : "none",
  8530. }}
  8531. >
  8532. <img src={quxiao} style={{ width: "63%" }} />
  8533. </div>
  8534. <div className="clearfix">
  8535. <FormItem
  8536. className="half-item"
  8537. {...formItemLayout}
  8538. label="客户名称"
  8539. >
  8540. <span>{this.state.userName}</span>
  8541. <EnterpriseNameChange
  8542. type="journal"
  8543. style={{ marginLeft: 10 }}
  8544. enterpriseId={this.state.orderUid}
  8545. />
  8546. </FormItem>
  8547. {/* */}
  8548. <FormItem
  8549. className="half-item"
  8550. {...formItemLayout}
  8551. label="合同编号"
  8552. >
  8553. <span>{this.state.contractNo}</span>
  8554. </FormItem>
  8555. </div>
  8556. <div className="clearfix">
  8557. <FormItem
  8558. className="half-item"
  8559. {...formItemLayout}
  8560. label="时间"
  8561. >
  8562. <span>
  8563. {this.state.detailChange.createTimes}
  8564. </span>
  8565. </FormItem>
  8566. <FormItem
  8567. className="half-item"
  8568. {...formItemLayout}
  8569. label="申请人"
  8570. >
  8571. <span>{this.state.salesmanName}</span>
  8572. </FormItem>
  8573. </div>
  8574. <div className="clearfix">
  8575. <FormItem
  8576. className="half-item"
  8577. {...formItemLayout}
  8578. label="当前进度"
  8579. >
  8580. <span>
  8581. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  8582. {this.state.detailChange.processState === 3 ||
  8583. this.state.detailChange.processState === 4
  8584. ? shenghePeo(this.state.detailChange.examineName, this.state.detailChange.processState)
  8585. : getProcessStatusNew(
  8586. this.state.detailChange.examineName,
  8587. this.state.detailChange.processState,
  8588. this.state.detailChange.status
  8589. )}
  8590. </span>
  8591. <FlowChart id={this.state.detailChange.id} />
  8592. </FormItem>
  8593. {/* <FormItem
  8594. className="half-item"
  8595. {...formItemLayout}
  8596. label="申请变更部门"
  8597. >
  8598. <span>{this.state.depName}</span>
  8599. </FormItem> */}
  8600. <FormItem
  8601. {...formItemLayout}
  8602. className="half-item"
  8603. label="变更类型"
  8604. >
  8605. <span>
  8606. {getChangeType(
  8607. this.state.detailChange.typeChange
  8608. )}
  8609. </span>
  8610. </FormItem>
  8611. </div>
  8612. {/* <div className="clearfix">
  8613. <FormItem
  8614. labelCol={{ span: 4 }}
  8615. wrapperCol={{ span: 18 }}
  8616. label="变更类型"
  8617. >
  8618. <span>
  8619. {getChangeType(
  8620. this.state.detailChange.typeChange
  8621. )}
  8622. </span>
  8623. </FormItem>
  8624. </div> */}
  8625. {this.state.detailChange.typeChange == 0 &&
  8626. <div className="clearfix">
  8627. <FormItem
  8628. {...formItemLayout}
  8629. className="half-item"
  8630. label="企业总经理姓名"
  8631. >
  8632. <span>
  8633. {this.state.detailChange.managerContacts}
  8634. </span>
  8635. </FormItem>
  8636. <FormItem
  8637. {...formItemLayout}
  8638. className="half-item"
  8639. label="企业总经理联系电话"
  8640. >
  8641. <span>
  8642. {this.state.detailChange.managerContactMobile}
  8643. </span>
  8644. </FormItem>
  8645. </div>
  8646. }
  8647. {this.state.detailChange.typeChange == 0 &&
  8648. <div className="clearfix">
  8649. <FormItem
  8650. {...formItemLayout}
  8651. className="half-item"
  8652. label="企业联系人姓名"
  8653. >
  8654. <span>
  8655. {this.state.detailChange.contacts}
  8656. </span>
  8657. </FormItem>
  8658. <FormItem
  8659. {...formItemLayout}
  8660. className="half-item"
  8661. label="企业联系人联系方式"
  8662. >
  8663. <span>
  8664. {this.state.detailChange.contactMobile}
  8665. </span>
  8666. </FormItem>
  8667. </div>
  8668. }
  8669. <div className="clearfix">
  8670. <FormItem
  8671. {...formItemLayout}
  8672. className="half-item"
  8673. label="合同额(万元)"
  8674. >
  8675. <span>
  8676. {this.state.detailChange.totalAmount}
  8677. </span>
  8678. </FormItem>
  8679. <FormItem
  8680. {...formItemLayout}
  8681. className="half-item"
  8682. label="已收款(万元)"
  8683. >
  8684. <span>
  8685. {this.state.detailChange.settlementAmount}
  8686. </span>
  8687. </FormItem>
  8688. </div>
  8689. <div className="clearfix">
  8690. <FormItem
  8691. {...formItemLayout}
  8692. className="half-item"
  8693. label="欠款(万元)"
  8694. >
  8695. <span>{this.state.detailChange.arrears}</span>
  8696. </FormItem>
  8697. <FormItem
  8698. {...formItemLayout}
  8699. className="half-item"
  8700. label="申请退款(万元)"
  8701. >
  8702. <span>
  8703. {this.state.detailChange.changeAmount}
  8704. </span>
  8705. </FormItem>
  8706. </div>
  8707. <div className="clearfix">
  8708. <FormItem
  8709. style={{ height: "auto" }}
  8710. labelCol={{ span: 5 }}
  8711. wrapperCol={{ span: 19 }}
  8712. label="首付款(万元)"
  8713. >
  8714. <span>{this.state.detailChange.firstAmount}</span>
  8715. </FormItem>
  8716. </div>
  8717. <div className="clearfix">
  8718. <FormItem
  8719. style={{ height: "auto" }}
  8720. labelCol={{ span: 5 }}
  8721. wrapperCol={{ span: 19 }}
  8722. label="变更原因"
  8723. >
  8724. <span>{this.state.detailChange.remarksC}</span>
  8725. </FormItem>
  8726. </div>
  8727. <div className="clearfix">
  8728. <FormItem
  8729. style={{ height: "auto" }}
  8730. labelCol={{ span: 5 }}
  8731. wrapperCol={{ span: 19 }}
  8732. label="备注"
  8733. >
  8734. <span>
  8735. {this.state.detailChange.startRemarks}
  8736. </span>
  8737. </FormItem>
  8738. </div>
  8739. {/* ---- */}
  8740. <div className="clearfix">
  8741. <FormItem
  8742. labelCol={{ span: 5 }}
  8743. wrapperCol={{ span: 19 }}
  8744. label="变更凭证"
  8745. >
  8746. <div>
  8747. <div
  8748. style={{
  8749. paddingTop: "10px",
  8750. }}
  8751. >
  8752. {this.state.detailChange &&
  8753. this.state.detailChange.voucherUrl &&
  8754. this.state.activeKey === "3" &&
  8755. this.state.visible ? (
  8756. <ImgList
  8757. fileList={
  8758. this.state.detailChange.voucherUrl
  8759. }
  8760. ItemWidth={"96px"}
  8761. />
  8762. ) : (
  8763. <div />
  8764. )}
  8765. </div>
  8766. {this.state.status === 3 ? (
  8767. <Button
  8768. type="danger"
  8769. style={{
  8770. float: "right",
  8771. backgroundColor: "red",
  8772. color: "white",
  8773. position: "absolute",
  8774. right: 0,
  8775. height: 50,
  8776. borderRadius: 20,
  8777. zIndex: 100,
  8778. top: 0,
  8779. }}
  8780. onClick={(e) => {
  8781. e.stopPropagation();
  8782. this.showConfirmChange(
  8783. this.deleteChange
  8784. );
  8785. }}
  8786. >
  8787. 取消本次变更
  8788. </Button>
  8789. ) : (
  8790. ""
  8791. )}
  8792. </div>
  8793. </FormItem>
  8794. </div>
  8795. {
  8796. this.state.detailChange.contractPictureUrl.length != 0 &&
  8797. <div className="clearfix">
  8798. <FormItem
  8799. labelCol={{ span: 5 }}
  8800. wrapperCol={{ span: 19 }}
  8801. label="最新合同"
  8802. >
  8803. <div style={{ paddingTop: 10 }}>
  8804. <ImgList
  8805. fileList={
  8806. this.state.detailChange.contractPictureUrl
  8807. }
  8808. ItemWidth={"96px"}
  8809. />
  8810. </div>
  8811. </FormItem>
  8812. </div>
  8813. }
  8814. <ul
  8815. style={{
  8816. width: "868px",
  8817. overflow: "hidden",
  8818. paddingLeft: "90px",
  8819. paddingTop: "10px",
  8820. position: "relative",
  8821. bottom: "20px",
  8822. fontSize: "12px",
  8823. color: "rgba(0, 0, 0, 0.65)",
  8824. }}
  8825. >
  8826. {/* <span>操作人:</span> */}
  8827. {this.state.logData.map((item, index) => {
  8828. if (item.status == 0) {
  8829. item.status = "发起";
  8830. } else if (item.status == 1) {
  8831. item.status = "审核中";
  8832. } else if (item.status == 2) {
  8833. item.status = "通过";
  8834. } else if (item.status == 3) {
  8835. item.status = "驳回";
  8836. } else if (item.status == 4) {
  8837. item.status = "完成";
  8838. } else if (item.status == 5) {
  8839. item.status = "撤销";
  8840. }
  8841. return (
  8842. <li
  8843. key={index}
  8844. style={{
  8845. width: "100%",
  8846. height: "auto",
  8847. wordBreak: "break-all",
  8848. marginBottom: "10px",
  8849. }}
  8850. >
  8851. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  8852. </li>
  8853. );
  8854. })}
  8855. </ul>
  8856. {/* 动态展示项目以及催款节点 */}
  8857. <div>
  8858. <div>
  8859. <span
  8860. style={{
  8861. marginLeft: "50px",
  8862. fontSize: "20px",
  8863. }}
  8864. >
  8865. 项目业务
  8866. </span>
  8867. </div>
  8868. <div
  8869. className="patent-table"
  8870. style={{ marginBottom: 10 }}
  8871. >
  8872. <Spin spinning={this.state.loading}>
  8873. <Table
  8874. columns={this.state.detailColumns}
  8875. dataSource={this.state.proDataSource}
  8876. expandedRowRender={expandedRowRenderDetail}
  8877. pagination={this.state.pagination}
  8878. // onRowClick={this.tableRowClick}
  8879. onRowClick={(record) => {
  8880. this.setState({
  8881. dataInfor: record,
  8882. infoVisible: true
  8883. })
  8884. }}
  8885. rowClassName={this.addRowColor}
  8886. bordered
  8887. size="small"
  8888. />
  8889. </Spin>
  8890. </div>
  8891. <div>
  8892. <span
  8893. style={{
  8894. marginLeft: "50px",
  8895. fontSize: "20px",
  8896. }}
  8897. >
  8898. 催款节点
  8899. </span>
  8900. </div>
  8901. <div className="clearfix">
  8902. <Spin spinning={this.state.loading}>
  8903. <Form layout="horizontal">
  8904. <Table
  8905. pagination={false}
  8906. columns={this.state.detailContactsLists}
  8907. dataSource={this.state.cuiDataSource}
  8908. scroll={{ x: "max-content", y: 0 }}
  8909. bordered
  8910. size="small"
  8911. />
  8912. <Col
  8913. span={24}
  8914. offset={9}
  8915. style={{ marginTop: "15px" }}
  8916. ></Col>
  8917. </Form>
  8918. </Spin>
  8919. </div>
  8920. </div>
  8921. </div>
  8922. }
  8923. </TabPane>
  8924. }
  8925. </Tabs>
  8926. }
  8927. </div>
  8928. </Spin>
  8929. </Form>
  8930. </Modal>
  8931. {
  8932. // 添加变更项目
  8933. this.state.changeVisible &&
  8934. <NewAddProject
  8935. type="change"
  8936. children="list"
  8937. typeChange={this.state.typeChange}
  8938. cid={this.state.changeId}
  8939. readOnly={false}
  8940. orderNo={this.state.orderNo}
  8941. visible={this.state.changeVisible}
  8942. newData={this.state.newData}
  8943. onCancel={() => [this.nextCancel("change")]}
  8944. />
  8945. }
  8946. {
  8947. // 编辑变更项目
  8948. this.state.editProVisible &&
  8949. <NewEditProject
  8950. type="change"
  8951. children="list"
  8952. typeChange={this.state.typeChange}
  8953. cid={this.state.changeId}
  8954. readOnly={false}
  8955. orderNo={this.props.datauser.orderNo}
  8956. visible={this.state.editProVisible}
  8957. dataInfor={this.state.dataInfor}
  8958. newData={this.state.newData}
  8959. onCancel={() => [this.nextCancel("change")]}
  8960. />
  8961. }
  8962. {
  8963. this.state.lookVisible ? (
  8964. <Modal
  8965. maskClosable={false}
  8966. visible={this.state.lookVisible}
  8967. onOk={this.noCancel}
  8968. onCancel={this.noCancel}
  8969. width="800px"
  8970. title={"退单申请"}
  8971. footer=""
  8972. className="admin-desc-content"
  8973. >
  8974. <Form layout="horizontal">
  8975. <Spin spinning={this.state.loading}>
  8976. <div className="clearfix">
  8977. <FormItem
  8978. labelCol={{ span: 4 }}
  8979. wrapperCol={{ span: 16 }}
  8980. label="终止合同"
  8981. >
  8982. <Picture
  8983. domId={"addService6"}
  8984. fileList={(e) => {
  8985. this.setState({ contractUrl: e });
  8986. }}
  8987. pictureUrl={this.state.contractUrl}
  8988. visible={this.props.visible}
  8989. data={{
  8990. sign: "order_refund_file",
  8991. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8992. number: 8,
  8993. }}
  8994. />
  8995. </FormItem>
  8996. </div>
  8997. <div className="clearfix">
  8998. <FormItem
  8999. labelCol={{ span: 4 }}
  9000. wrapperCol={{ span: 16 }}
  9001. label="退单申请表"
  9002. >
  9003. <Picture
  9004. domId={"addService7"}
  9005. fileList={(e) => {
  9006. this.setState({ applicationUrl: e });
  9007. }}
  9008. pictureUrl={this.state.applicationUrl}
  9009. visible={this.props.visible}
  9010. data={{
  9011. sign: "order_refund_file",
  9012. url: "/api/admin/newOrder/uploadRefundOrderFile",
  9013. number: 8,
  9014. }}
  9015. />
  9016. </FormItem>
  9017. </div>
  9018. <div className="clearfix">
  9019. <FormItem
  9020. labelCol={{ span: 4 }}
  9021. wrapperCol={{ span: 16 }}
  9022. label="退单理由"
  9023. >
  9024. <Input
  9025. type="textarea"
  9026. placeholder="请输入退单理由"
  9027. rows={4}
  9028. value={this.state.reason}
  9029. onChange={(e) => {
  9030. this.setState({ reason: e.target.value });
  9031. }}
  9032. />
  9033. </FormItem>
  9034. </div>
  9035. <div className="clearfix">
  9036. <Button
  9037. className="cancel"
  9038. type="primary"
  9039. onClick={this.tuidanOk}
  9040. style={{ marginLeft: "50px" }}
  9041. htmlType="submit"
  9042. >
  9043. 确定退单
  9044. </Button>
  9045. <Button
  9046. className="cancel"
  9047. type="ghost"
  9048. onClick={this.noCancel}
  9049. style={{ marginLeft: "50px" }}
  9050. >
  9051. 取消
  9052. </Button>
  9053. </div>
  9054. </Spin>
  9055. </Form>
  9056. </Modal>
  9057. ) : (
  9058. <div />
  9059. )
  9060. }
  9061. <Modal
  9062. maskClosable={false}
  9063. title={
  9064. isNaN(parseFloat(this.state.appropriationRatio))
  9065. ? "修改催款节点金额"
  9066. : "修改催款节点比例"
  9067. }
  9068. visible={this.state.editCuiVisible}
  9069. onOk={() => {
  9070. this.submitEditCui(
  9071. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  9072. );
  9073. }}
  9074. okText={"保存"}
  9075. width={300}
  9076. onCancel={(e) => {
  9077. this.setState({
  9078. editCuiVisible: false,
  9079. appropriationRatio: "",
  9080. });
  9081. }}
  9082. >
  9083. <div className="clearfix">
  9084. <FormItem
  9085. labelCol={{ span: 6 }}
  9086. wrapperCol={{ span: 14 }}
  9087. label={
  9088. isNaN(parseFloat(this.state.appropriationRatio))
  9089. ? "催款金额"
  9090. : "催款比例"
  9091. }
  9092. >
  9093. <Input
  9094. type="number"
  9095. placeholder={
  9096. isNaN(parseFloat(this.state.appropriationRatio))
  9097. ? "请输入金额"
  9098. : "请输入比例"
  9099. }
  9100. rows={4}
  9101. value={this.state.editCuiMoney}
  9102. onChange={(e) => {
  9103. this.setState({ editCuiMoney: e.target.value });
  9104. }}
  9105. />
  9106. </FormItem>
  9107. </div>
  9108. </Modal>
  9109. <OrderRiZi
  9110. dataSourcerizhi={this.state.dataSourcerizhi}
  9111. closeOrderLog={this.closeOrderLog}
  9112. visible={this.state.rizhivisible}
  9113. loading={this.state.loading}
  9114. />
  9115. {
  9116. // 添加项目
  9117. this.state.projectOperationVisible &&
  9118. <NewAddProject
  9119. readOnly={
  9120. this.state.dataInfor &&
  9121. Object.keys(this.state.dataInfor).length > 0 &&
  9122. this.state.processStatus !== 0
  9123. }
  9124. orderNo={this.props.datauser.orderNo}
  9125. visible={this.state.projectOperationVisible}
  9126. newData={this.state.newData}
  9127. onCancel={this.nextCancel}
  9128. />
  9129. }
  9130. {
  9131. // 编辑项目
  9132. this.state.editProjectOperationVisible &&
  9133. <NewEditProject
  9134. readOnly={
  9135. this.state.dataInfor &&
  9136. Object.keys(this.state.dataInfor).length > 0 &&
  9137. this.state.processStatus !== 0
  9138. }
  9139. orderNo={this.props.datauser.orderNo}
  9140. visible={this.state.editProjectOperationVisible}
  9141. dataInfor={this.state.dataInfor}
  9142. newData={this.state.newData}
  9143. onCancel={this.nextCancel}
  9144. />
  9145. }
  9146. {
  9147. // 会员项目添加
  9148. this.state.vipVisible &&
  9149. <NewAddProject
  9150. type="vipAdd"
  9151. readOnly={
  9152. this.state.dataInfor &&
  9153. Object.keys(this.state.dataInfor).length > 0 &&
  9154. this.state.processStatus !== 0
  9155. }
  9156. orderNo={this.props.datauser.orderNo}
  9157. visible={this.state.vipVisible}
  9158. newData={this.state.newData}
  9159. onCancel={this.nextCancel}
  9160. />
  9161. // <ProjectOperationVip
  9162. // readOnly={
  9163. // this.state.dataInfor &&
  9164. // Object.keys(this.state.dataInfor).length > 0 &&
  9165. // this.state.processStatus !== 0
  9166. // }
  9167. // orderNo={this.props.datauser.orderNo}
  9168. // visible={this.state.vipVisible}
  9169. // dataInfor={this.state.dataInfor}
  9170. // newData={this.state.newData}
  9171. // onCancel={this.nextCancel}
  9172. // />
  9173. }
  9174. {
  9175. // 变更记录详情
  9176. this.state.infoVisible &&
  9177. <NewEditProject
  9178. children="list"
  9179. type="change"
  9180. readOnly={
  9181. this.state.dataInfor &&
  9182. Object.keys(this.state.dataInfor).length > 0 &&
  9183. this.state.processStatus !== 0
  9184. }
  9185. visible={this.state.infoVisible}
  9186. dataInfor={this.state.dataInfor}
  9187. onCancel={() => { this.setState({ infoVisible: false }) }}
  9188. />
  9189. }
  9190. <Modal
  9191. maskClosable={false}
  9192. visible={this.state.score != ""}
  9193. footer=""
  9194. title="项目评分"
  9195. width={this.state.score == "selcet" ? 400 : 740}
  9196. onCancel={() => {
  9197. this.onCloses()
  9198. }}
  9199. >
  9200. {
  9201. this.state.score == "add" &&
  9202. <div>
  9203. <div style={{ marginBottom: 10 }}>项目名称:{this.state.cname}</div>
  9204. <div style={{ marginBottom: 10 }}>项目咨询:{this.state.tname}</div>
  9205. <div>
  9206. <span style={{ width: 50, display: "inline-block" }}>专&nbsp;业&nbsp;度</span>:
  9207. <RadioGroup
  9208. onChange={e => {
  9209. this.setState({
  9210. zyd: e.target.value,
  9211. zydList: this.getRadioList(e.target.value, this.state.cSort, "zyd"),
  9212. professionalism: e.target.value == 4 ? 0 : undefined,
  9213. })
  9214. }}
  9215. value={this.state.zyd}>
  9216. {
  9217. [
  9218. { key: "很专业", value: 1, },
  9219. { key: "专业", value: 2, },
  9220. { key: "一般", value: 3, },
  9221. { key: "不专业", value: 4, },
  9222. ].map(item =>
  9223. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9224. )
  9225. }
  9226. </RadioGroup>
  9227. </div>
  9228. <div
  9229. style={{
  9230. padding: "5px 0 10px 0",
  9231. paddingLeft: this.getPaddingLeft(this.state.zyd),
  9232. margin: "5px 0 10px 55px",
  9233. borderBottom: "1px dotted black"
  9234. }}
  9235. >
  9236. <RadioGroup
  9237. onChange={e => {
  9238. this.setState({
  9239. professionalism: e.target.value
  9240. })
  9241. }}
  9242. value={this.state.professionalism}>
  9243. {
  9244. !!this.state.zydList && this.state.zydList.map(item =>
  9245. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9246. )
  9247. }
  9248. </RadioGroup>
  9249. </div>
  9250. <div>
  9251. <span style={{ width: 50, display: "inline-block" }}>沟&nbsp;通&nbsp;力</span>:
  9252. <RadioGroup
  9253. onChange={e => {
  9254. this.setState({
  9255. gtl: e.target.value,
  9256. gtlList: this.getRadioList(e.target.value, this.state.cSort, "gtl"),
  9257. communicationSkills: e.target.value == 4 ? 0 : undefined,
  9258. })
  9259. }}
  9260. value={this.state.gtl}>
  9261. {
  9262. [
  9263. { key: "很满意", value: 1, },
  9264. { key: "满意", value: 2, },
  9265. { key: "一般", value: 3, },
  9266. { key: "不满意", value: 4, },
  9267. ].map(item =>
  9268. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9269. )
  9270. }
  9271. </RadioGroup>
  9272. </div>
  9273. <div
  9274. style={{
  9275. padding: "5px 0 10px 0",
  9276. paddingLeft: this.getPaddingLeft(this.state.gtl),
  9277. margin: "5px 0 10px 55px",
  9278. borderBottom: "1px dotted black"
  9279. }}
  9280. >
  9281. <RadioGroup
  9282. onChange={e => {
  9283. this.setState({
  9284. communicationSkills: e.target.value
  9285. })
  9286. }}
  9287. value={this.state.communicationSkills}>
  9288. {
  9289. !!this.state.gtlList && this.state.gtlList.map(item =>
  9290. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9291. )
  9292. }
  9293. </RadioGroup>
  9294. </div>
  9295. <div>
  9296. <span style={{ width: 50, display: "inline-block" }}>响&nbsp;应&nbsp;度</span>:
  9297. <RadioGroup
  9298. onChange={e => {
  9299. this.setState({
  9300. xyd: e.target.value,
  9301. yxdList: this.getRadioList(e.target.value, this.state.cSort, "xyd"),
  9302. responsiveness: e.target.value == 4 ? 0 : undefined,
  9303. })
  9304. }}
  9305. value={this.state.xyd}>
  9306. {
  9307. [
  9308. { key: "很速度", value: 1, },
  9309. { key: "速度", value: 2, },
  9310. { key: "一般", value: 3, },
  9311. { key: "很慢", value: 4, },
  9312. ].map(item =>
  9313. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9314. )
  9315. }
  9316. </RadioGroup>
  9317. </div>
  9318. <div
  9319. style={{
  9320. padding: "5px 0 10px 0",
  9321. paddingLeft: this.getPaddingLeft(this.state.xyd),
  9322. margin: "5px 0 10px 55px",
  9323. borderBottom: "1px dotted black"
  9324. }}
  9325. >
  9326. <RadioGroup
  9327. onChange={e => {
  9328. this.setState({
  9329. responsiveness: e.target.value
  9330. })
  9331. }}
  9332. value={this.state.responsiveness}>
  9333. {
  9334. !!this.state.yxdList && this.state.yxdList.map(item =>
  9335. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9336. )
  9337. }
  9338. </RadioGroup>
  9339. </div>
  9340. <div>
  9341. <span style={{ width: 50, display: "inline-block" }}>公出形象</span>:
  9342. <RadioGroup
  9343. onChange={e => {
  9344. this.setState({
  9345. gcxx: e.target.value,
  9346. gcxxList: this.getRadioList(e.target.value, this.state.cSort, "gcxx"),
  9347. publicImage: e.target.value == 4 ? 0 : undefined,
  9348. })
  9349. }}
  9350. value={this.state.gcxx}>
  9351. {
  9352. [
  9353. { key: "很满意", value: 1, },
  9354. { key: "满意", value: 2, },
  9355. { key: "一般", value: 3, },
  9356. { key: "不满意", value: 4, },
  9357. ].map(item =>
  9358. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9359. )
  9360. }
  9361. </RadioGroup>
  9362. </div>
  9363. <div
  9364. style={{
  9365. padding: "5px 0 10px 0",
  9366. paddingLeft: this.getPaddingLeft(this.state.gcxx),
  9367. margin: "5px 0 10px 55px",
  9368. borderBottom: "1px dotted black"
  9369. }}
  9370. >
  9371. <RadioGroup
  9372. onChange={e => {
  9373. this.setState({
  9374. publicImage: e.target.value
  9375. })
  9376. }}
  9377. value={this.state.publicImage}>
  9378. {
  9379. !!this.state.gcxxList && this.state.gcxxList.map(item =>
  9380. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9381. )
  9382. }
  9383. </RadioGroup>
  9384. </div>
  9385. <div>
  9386. <span style={{ width: 50, display: "inline-block" }}>服务态度</span>:
  9387. <RadioGroup
  9388. onChange={e => {
  9389. this.setState({
  9390. fwtd: e.target.value,
  9391. fwtdList: this.getRadioList(e.target.value, this.state.cSort, "fwtd"),
  9392. serviceAttitude: e.target.value == 4 ? 0 : undefined,
  9393. })
  9394. }}
  9395. value={this.state.fwtd}>
  9396. {
  9397. [
  9398. { key: "很满意", value: 1, },
  9399. { key: "满意", value: 2, },
  9400. { key: "一般", value: 3, },
  9401. { key: "不满意", value: 4, },
  9402. ].map(item =>
  9403. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9404. )
  9405. }
  9406. </RadioGroup>
  9407. </div>
  9408. <div
  9409. style={{
  9410. padding: "5px 0 10px 0",
  9411. paddingLeft: this.getPaddingLeft(this.state.fwtd),
  9412. margin: "5px 0 10px 55px",
  9413. borderBottom: this.state.cSort == 6 ? "1px dotted black" : 0
  9414. }}
  9415. >
  9416. <RadioGroup
  9417. onChange={e => {
  9418. this.setState({
  9419. serviceAttitude: e.target.value
  9420. })
  9421. }}
  9422. value={this.state.serviceAttitude}>
  9423. {
  9424. !!this.state.fwtdList && this.state.fwtdList.map(item =>
  9425. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9426. )
  9427. }
  9428. </RadioGroup>
  9429. </div>
  9430. {
  9431. this.state.cSort == 6 &&
  9432. <div>
  9433. <span style={{ width: 50, display: "inline-block" }}>月度汇报</span>:
  9434. <RadioGroup
  9435. onChange={e => {
  9436. this.setState({
  9437. ydhb: e.target.value,
  9438. ydhbList: this.getRadioList(e.target.value, this.state.cSort, "ydhb"),
  9439. monthlyReport: e.target.value == 4 ? 0 : undefined,
  9440. })
  9441. }}
  9442. value={this.state.ydhb}>
  9443. {
  9444. [
  9445. { key: "很满意", value: 1, },
  9446. { key: "满意", value: 2, },
  9447. { key: "一般", value: 3, },
  9448. { key: "不满意", value: 4, },
  9449. ].map(item =>
  9450. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9451. )
  9452. }
  9453. </RadioGroup>
  9454. </div>
  9455. }
  9456. {
  9457. this.state.cSort == 6 &&
  9458. <div
  9459. style={{
  9460. padding: "5px 0 10px 0",
  9461. paddingLeft: this.getPaddingLeft(this.state.ydhb),
  9462. margin: "5px 0 10px 55px",
  9463. borderBottom: "1px dotted black"
  9464. }}
  9465. >
  9466. <RadioGroup
  9467. onChange={e => {
  9468. this.setState({
  9469. monthlyReport: e.target.value
  9470. })
  9471. }}
  9472. value={this.state.monthlyReport}>
  9473. {
  9474. !!this.state.ydhbList && this.state.ydhbList.map(item =>
  9475. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9476. )
  9477. }
  9478. </RadioGroup>
  9479. </div>
  9480. }
  9481. {
  9482. this.state.cSort == 6 &&
  9483. <div>
  9484. <span style={{ width: 50, display: "inline-block" }}>年度汇报</span>:
  9485. <RadioGroup
  9486. onChange={e => {
  9487. this.setState({
  9488. ndhb: e.target.value,
  9489. ndhbList: this.getRadioList(e.target.value, this.state.cSort, "ndhb"),
  9490. yearReport: e.target.value == 4 ? 0 : undefined,
  9491. })
  9492. }}
  9493. value={this.state.ndhb}>
  9494. {
  9495. [
  9496. { key: "很满意", value: 1, },
  9497. { key: "满意", value: 2, },
  9498. { key: "一般", value: 3, },
  9499. { key: "不满意", value: 4, },
  9500. ].map(item =>
  9501. <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
  9502. )
  9503. }
  9504. </RadioGroup>
  9505. </div>
  9506. }
  9507. {
  9508. this.state.cSort == 6 &&
  9509. <div
  9510. style={{
  9511. padding: "5px 0 10px 0",
  9512. paddingLeft: this.getPaddingLeft(this.state.ndhb),
  9513. margin: "5px 0 10px 55px",
  9514. }}
  9515. >
  9516. <RadioGroup
  9517. onChange={e => {
  9518. this.setState({
  9519. yearReport: e.target.value
  9520. })
  9521. }}
  9522. value={this.state.yearReport}>
  9523. {
  9524. !!this.state.ndhbList && this.state.ndhbList.map(item =>
  9525. <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
  9526. )
  9527. }
  9528. </RadioGroup>
  9529. </div>
  9530. }
  9531. <div style={{ marginBottom: 5, display: "flex", flexDirection: "row" }}>
  9532. <span style={{ width: 50, display: "inline-block" }}>评分理由</span>:
  9533. <TextArea
  9534. style={{ width: 600 }}
  9535. rows={3}
  9536. value={this.state.marks}
  9537. onChange={(e) => {
  9538. this.setState({
  9539. marks: e.target.value,
  9540. })
  9541. }}
  9542. placeholder="请填写本次评分的判断依据,至少10字以上"
  9543. />
  9544. </div>
  9545. <div style={{ marginTop: 10, textAlign: "center" }}>
  9546. <Button
  9547. type="primary"
  9548. onClick={() => {
  9549. if (!this.state.professionalism && this.state.professionalism != 0) {
  9550. message.warning("专业度未打分")
  9551. return
  9552. }
  9553. if (!this.state.communicationSkills && this.state.communicationSkills != 0) {
  9554. message.warning("沟通力未打分")
  9555. return
  9556. }
  9557. if (!this.state.responsiveness && this.state.responsiveness != 0) {
  9558. message.warning("响应度未打分")
  9559. return
  9560. }
  9561. if (!this.state.publicImage && this.state.publicImage != 0) {
  9562. message.warning("公出形象未打分")
  9563. return
  9564. }
  9565. if (!this.state.serviceAttitude && this.state.serviceAttitude != 0) {
  9566. message.warning("服务态度未打分")
  9567. return
  9568. }
  9569. if (this.state.cSort == 6 && !this.state.monthlyReport && this.state.monthlyReport != 0) {
  9570. message.warning("月度汇报未打分")
  9571. return
  9572. }
  9573. if (this.state.cSort == 6 && !this.state.yearReport && this.state.yearReport != 0) {
  9574. message.warning("年度汇报未打分")
  9575. return
  9576. }
  9577. if (this.state.marks.length < 10) {
  9578. message.warning("请填写10字以上的评分依据")
  9579. return
  9580. }
  9581. const _this = this
  9582. confirm({
  9583. title: '您确定提交本次评分吗?',
  9584. content: '',
  9585. onOk() {
  9586. _this.updateByTid()
  9587. },
  9588. });
  9589. }}
  9590. >
  9591. 确定
  9592. </Button>
  9593. </div>
  9594. <div style={{ textAlign: "center", marginBottom: 10, color: "red" }}>注:请公平公正为本项目咨询老师评分!评分后不可修改</div>
  9595. </div>
  9596. }
  9597. {
  9598. this.state.score == "selcet" &&
  9599. <div style={{ position: "relative" }}>
  9600. <div
  9601. style={{
  9602. position: "absolute",
  9603. right: 100,
  9604. top: 50,
  9605. fontSize: "40px",
  9606. color: "red"
  9607. }}
  9608. >{this.state.dataScore.professionalism + this.state.dataScore.communicationSkills + this.state.dataScore.responsiveness + this.state.dataScore.publicImage + this.state.dataScore.serviceAttitude + this.state.dataScore.monthlyReport + this.state.dataScore.yearReport}分</div>
  9609. <div>
  9610. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目名称</span>:{this.state.cname}
  9611. </div>
  9612. <div>
  9613. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目咨询</span>:{this.state.tname}
  9614. </div>
  9615. <div>
  9616. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>专&nbsp;业&nbsp;度</span>:{this.getScore("zyd", this.state.cSort, this.state.dataScore.professionalism)}
  9617. </div>
  9618. <div>
  9619. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>沟&nbsp;通&nbsp;力</span>:{this.getScore("gtl", this.state.cSort, this.state.dataScore.communicationSkills)}
  9620. </div>
  9621. <div>
  9622. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>响&nbsp;应&nbsp;度</span>:{this.getScore("xyd", this.state.cSort, this.state.dataScore.responsiveness)}
  9623. </div>
  9624. <div>
  9625. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>公出形象</span>:{this.getScore("gcxx", this.state.cSort, this.state.dataScore.publicImage)}
  9626. </div>
  9627. <div>
  9628. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>服务态度</span>:{this.getScore("fwtd", this.state.cSort, this.state.dataScore.serviceAttitude)}
  9629. </div>
  9630. {this.state.cSort == 6 &&
  9631. <div>
  9632. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>月度汇报</span>:{this.getScore("ydhb", this.state.cSort, this.state.dataScore.monthlyReport)}
  9633. </div>}
  9634. {this.state.cSort == 6 &&
  9635. <div>
  9636. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>年度汇报</span>:{this.getScore("ndhb", this.state.cSort, this.state.dataScore.yearReport)}
  9637. </div>}
  9638. <div>
  9639. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分理由</span>:{this.state.dataScore.remarks}
  9640. </div>
  9641. <div>
  9642. <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分时间</span>:{moment(this.state.dataScore.createTime).format('YYYY-MM-DD HH:mm:ss')}
  9643. </div>
  9644. <div style={{ marginTop: 10, textAlign: "center" }}>
  9645. <Button
  9646. type="primary"
  9647. onClick={() => {
  9648. this.setState({
  9649. score: ""
  9650. })
  9651. }}
  9652. >
  9653. 关闭
  9654. </Button>
  9655. </div>
  9656. </div>
  9657. }
  9658. </Modal>
  9659. </div >);
  9660. },
  9661. })
  9662. );
  9663. export default Form.create()(NewService);