addService.jsx 368 KB

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