addService.jsx 355 KB

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