1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550 |
- // 开单=》合同变更发起
- import React from "react";
- import {
- Table,
- Modal,
- message,
- Spin,
- Input,
- Select,
- Button,
- Form,
- Upload,
- Popconfirm,
- AutoComplete,
- DatePicker,
- Col,
- Tabs,
- Tag,
- Radio,
- Icon,
- Tooltip,
- Switch,
- Checkbox,
- } from "antd";
- // import $ from "jquery/src/ajax";
- import "../userMangagement.less";
- import "../billing.less";
- import moment from "moment";
- import { shenghePeo } from "@/tools.js";
- import Picture from "@/manageCenter/publicComponent/picture";
- import ResolutionDetail from "@/resolutionDetail";
- import quxiao from "../../../../../image/quxiao.png";
- import tongguo from "../../../../../image/tongguo.png";
- import $ from "jquery";
- import OrderRiZi from "@/orderRiZi.jsx";
- import {
- orderTypes,
- customerType,
- jiedian,
- boutique,
- ssalesType,
- qsalesType,
- wsalesType,
- cuiJieDian,
- salesList,
- vipYear,
- knowledgeList,
- auditList,
- addDeductionList,
- } from "@/dataDic.js";
- import {
- splitUrl,
- getProcessStatus,
- getLiquidationStatus,
- getboutique,
- getApprovedState,
- getApprovedType,
- compare,
- getjiedian,
- getCuikuan,
- getProjectName,
- moneyVerify,
- getProcessStatusNew,
- stopStatus,
- } from "../../../tools.js";
- import PicturesWall from "./changeComponent/picturesWall.js";
- import { getChangeType } from "./changeComponent/changeDetailYxgly";
- import ImgList from "../../../common/imgList";
- import OrderItemStatus from "../../../common/orderItemStatus";
- import EnterpriseNameChange from "../../../common/enterpriseNameChange";
- import ProjectOperation from "../../../common/projectOperation";
- import ProjectOperationVip from "../../../common/projectOperation/vip";
- import NewAddProject from "../../../common/projectOperation/newAddProject"
- import NewEditProject from "../../../common/projectOperation/newEditProject"
- import { instanceOf } from "prop-types";
- import UpdateSales from './updatesales';
- import SelectList from '../../../common/mysuspend/selectList'; //
- import FlowChart from '../../../common/flowchart'; // 流程图
- import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情
- import Property from '../../../common/orderDetail/property' // 知识产权情况
- const Option = AutoComplete.Option;
- const CheckboxGroup = Checkbox.Group;
- const confirm = Modal.confirm;
- const RadioButton = Radio.Button;
- const RadioGroup = Radio.Group;
- const NewService = Form.create()(
- React.createClass({
- //查看项目列表
- loadData(record) {
- this.state.data = [];
- this.setState({
- loading: true,
- });
- if (!record && !this.props.datauser.orderNo) {
- return
- }
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
- data: {
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- for (let i = 0; i < data.data.length; i++) {
- let thisdata = data.data[i];
- thisdata.key = i;
- thisdata.sort = thisdata.cSort;
- thisdata.declarationBatch =
- thisdata.declarationBatch || undefined; //申报批次
- thisdata.ifCertificationFee = isNaN(
- parseInt(thisdata.ifCertificationFee)
- )
- ? undefined
- : thisdata.ifCertificationFee; //是否包含申报批次
- theArr.push(thisdata);
- }
- }
- this.departmentList();
- this.setState({
- dataSource: theArr,
- pagination: false,
- // 禁用变更类型
- changeFlag: false,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //收款节点
- loadDatas(record) {
- this.state.data = [];
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
- data: {
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- },
- success: function (data) {
- let theArr = [];
- if (!data.data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- for (let i = 0; i < data.data.length; i++) {
- let thisdata = data.data[i];
- theArr.push({
- key: i,
- id: thisdata.id,
- });
- }
- }
- this.setState({
- dataSource: theArr,
- pagination: false,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- getInitialState() {
- return {
- marks: "",
- score: "",
- type: "",
- approvaType: [],
- typeExplain: "",
- isShow: true, // 高新纯咨询合同默认填写
- knowledgeOther: "",
- auditOther: "",
- addDeductionOther: "",
- dataView: null,
- PublicView: null,
- contentView: '',
- remarksView: '',
- contentViewLength: 0,
- contentViewLength1: 0,
- columnsView: [
- {
- title: "服务时间",
- dataIndex: "serviceTimes",
- key: "serviceTimes",
- width: '80px'
- },
- {
- title: "服务内容",
- dataIndex: "content",
- key: "content",
- width: '300'
- },
- {
- title: "备注",
- dataIndex: "remarks",
- key: "remarks",
- width: '300'
- },
- {
- title: "操作",
- dataIndex: "cz",
- key: "cz",
- width: '100px',
- render: (text, record) => {
- return (
- <div>
- {this.state.processStatus == 0 ? (
- <Button
- onClick={(e) => {
- e.stopPropagation();
- this.viewConfirm(this.delectView, record);
- // this.setState({
- // addFlag: false,
- // });
- }}
- >
- 删除
- </Button>
- ) : (
- ""
- )}
- </div>
- );
- },
- },
- ],
- columnsRecord: [
- {
- title: "序号",
- dataIndex: "id",
- key: "id",
- },
- {
- title: "客户名称",
- dataIndex: "nickname",
- key: "nickname",
- },
- {
- title: "公出申请人",
- dataIndex: "aname",
- key: "aname",
- },
- {
- title: "公出时长",
- dataIndex: "duration",
- key: "duration",
- render: (text, record) => {
- return <div>{text + "小时"}</div>;
- },
- },
- {
- title: "公出地点",
- dataIndex: "userName",
- key: "userName",
- },
- {
- title: "公出时间",
- dataIndex: "releaseStarts",
- key: "releaseStarts",
- render: (text, record) => {
- return (
- <div>
- <div>{text}</div>
- <div style={{ paddingLeft: "44px" }}>至</div>
- <div>{record.releaseEnds}</div>
- </div>
- );
- },
- },
- {
- title: "打卡时间",
- dataIndex: "clockInTimes",
- key: "clockInTimes",
- },
- {
- title: "公出目标",
- dataIndex: "remarks",
- key: "remarks",
- width: '300'
- },
- ],
- dataSourceView: [],
- coorVisible: "none",
- personnel: [],
- viewKey: 0,
- modalView: false,
- modalRecord: false,
- closable: false,
- disabledView: "none",
- patentType: "",
- patentTypeList: [],
- rotateDeg: 0,
- isCaoGao: false,
- cuiFlag: false,
- startRemarks: "",
- remarksC: "",
- loading: false,
- logData: [],
- visible: false,
- cuiDataSource: [],
- status: 4,
- orgCodeUrl: [],
- voucherUrl: [],
- replenishUrl: [],
- contentUrl: [],
- newContractUrl: [],
- customerArr: [],
- declarationBatch: 1, //申报批次 默认第一批
- // 禁用变更类型转换
- changeFlag: false,
- // 合同额禁用
- hetongFlag: true,
- // 项目及催款禁用
- listFlag: true,
- mark: false,
- activeKey: "1",
- typeChange: undefined,
- bussStats: false,
- checkedKeys: [],
- lookflowList: [],
- contractUrl: [],
- applicationUrl: [],
- changeAmount: "0",
- active: {
- applySign: false,
- },
- lookState: false,
- signBillVisible: false,
- commod: "",
- columns: [
- {
- title: "业务项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record) => {
- return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
- }
- },
- {
- title: "项目类别",
- dataIndex: "cname",
- key: "cname",
- },
- {
- title: "项目数量",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity",
- render: (text, record) => {
- if (record.splitStatus == 1) {
- return (
- <span>
- {text}{" "}
- </span>
- );
- } else {
- return text;
- }
- },
- },
- {
- title: "金额(万元)",
- dataIndex: "commodityPrice",
- key: "commodityPrice",
- width: 50,
- },
- {
- title: "负责人",
- dataIndex: "contacts",
- key: "contacts",
- },
- {
- title: "负责人电话",
- dataIndex: "contactsMobile",
- key: "contactsMobile",
- },
- {
- title: "项目状态",
- dataIndex: "projectStatus",
- key: "projectStatus",
- width: 70, textAlign: "center",
- render: (text) => {
- return getProjectName(text);
- },
- },
- {
- title: "主要项目",
- dataIndex: "main",
- key: "main",
- width: 50,
- render: (text) => {
- return text ? "是" : "否";
- },
- },
- {
- title: "总年限",
- dataIndex: "yearSum",
- key: "yearSum",
- render: (text, record) => {
- return (
- <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
- );
- }
- },
- {
- title: "年限",
- dataIndex: "serviceLife",
- key: "serviceLife",
- render: (text, record) => {
- return (
- <div>{!!text && JSON.parse(text).toString()}</div>
- );
- }
- },
- {
- title: "本次派单",
- dataIndex: "serviceYear",
- key: "serviceYear",
- render: (text, record) => {
- return (
- <div>{!text ? "" : text}</div>
- );
- }
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- style={{
- width: 100,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis",
- }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "操作",
- dataIndex: "ABC",
- key: "ABC",
- width: 110,
- render: (text, record) => {
- return (
- <div>
- {stopStatus(record.stopType, record.stopStatus)}
- {
- this.state.processStatus == 0 &&
- <div>
- <Button
- onClick={(e) => {
- e.stopPropagation();
- this.showConfirm(this.delectRow, record);
- this.setState({
- addFlag: false,
- });
- }}
- >
- 删除
- </Button>
- </div>
- }
- {
- this.state.processStatus == 0 &&
- <div>
- <Button
- onClick={(e) => {
- e.stopPropagation();
- this.tableRowClick(record)
- }}
- >
- 编辑
- </Button>
- </div>
- }
- {
- record.scoreStatus == 1 &&
- <div>
- <Button
- type="primary"
- onClick={(e) => {
- e.stopPropagation();
- this.setState({
- tid: record.id,
- score: "add",
- cSort: record.sort,
- cname: record.commodityName,
- tname: record.name,
- })
- }}
- >
- 待评分
- </Button>
- </div>
- }
- {
- !!record.scoreNumber &&
- <Button
- type="primary"
- onClick={(e) => {
- e.stopPropagation();
- this.setState({
- cSort: record.sort,
- cname: record.commodityName,
- tname: record.name,
- })
- this.queryByTid(record.id)
- }}
- >
- 已评{record.scoreNumber}分
- </Button>
- }
- </div>
- );
- },
- },
- ],
- proColumns: [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- width: 70, textAlign: "center",
- render: (text, record) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <span>
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- {/* {record.splitStatus == 1 ? (
- <Tag color="#108ee9">父项目</Tag>
- ) : (
- ""
- )}
- {record.splitStatus == 2 ? (
- <Tag color="#108ee9">子项目</Tag>
- ) : (
- ""
- )} */}
- </span>
- );
- },
- },
- {
- title: "业务项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record) => {
- return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
- }
- },
- {
- title: "项目类别",
- dataIndex: "cname",
- key: "cname",
- },
- {
- title: "项目数量",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity",
- width: 50,
- },
- {
- title: "金额(万元)",
- dataIndex: "commodityPrice",
- key: "commodityPrice",
- width: 50,
- render: (text, record) => {
- if (record.splitStatus == 2) {
- return "/";
- } else {
- return text;
- }
- },
- },
- {
- title: "主要项目",
- dataIndex: "main",
- key: "main",
- width: 50,
- render: (text) => {
- return text ? "是" : "否";
- },
- },
- {
- title: "项目负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "总年限",
- dataIndex: "yearSum",
- key: "yearSum",
- render: (text, record) => {
- return (
- <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
- );
- }
- },
- {
- title: "年限",
- dataIndex: "serviceLife",
- key: "serviceLife",
- render: (text, record) => {
- return (
- <div>{!!text && JSON.parse(text).toString()}</div>
- );
- }
- },
- {
- title: "本次派单",
- dataIndex: "serviceYear",
- key: "serviceYear",
- render: (text, record) => {
- return (
- <div>{!text ? "" : text}</div>
- );
- }
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- style={{
- width: 100,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis",
- }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "操作",
- dataIndex: "ABC",
- key: "ABC",
- width: 70, textAlign: "center",
- render: (text, record) => {
- return (
- <div>
- <div>
- <Button
- onClick={(e) => {
- e.stopPropagation();
- this.showConfirm(this.changeDeletePro, record);
- }}
- disabled={this.state.listFlag}
- style={{
- display: this.state.displayList ? "none" : "block",
- }}
- >
- 删除
- </Button>
- </div>
- <div>
- <Button
- onClick={(e) => {
- e.stopPropagation();
- this.editPro(record);
- }}
- disabled={this.state.listFlag}
- style={{
- display: this.state.displayList ? "none" : "block",
- }}
- >
- 编辑
- </Button>
- </div>
- </div>
- );
- },
- },
- ],
- detailColumns: [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <span>
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- {/* {record.splitStatus == 1 ? (
- <Tag color="#108ee9">父项目</Tag>
- ) : (
- ""
- )}
- {record.splitStatus == 2 ? (
- <Tag color="#108ee9">子项目</Tag>
- ) : (
- ""
- )} */}
- </span>
- );
- },
- },
- {
- title: "业务项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record) => {
- return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
- }
- },
- {
- title: "项目类别",
- dataIndex: "cname",
- key: "cname",
- },
- {
- title: "项目数量",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity",
- width: 50,
- },
- {
- title: "金额(万元)",
- dataIndex: "commodityPrice",
- key: "commodityPrice",
- width: 50,
- render: (text, record) => {
- if (this.props.isZxs) {
- return <span>***</span>;
- } else if (record.splitStatus == 2) {
- return "/";
- } else {
- return <span>{text}</span>;
- }
- },
- },
- {
- title: "主要项目",
- dataIndex: "main",
- key: "main",
- width: 50,
- render: (text) => {
- return text ? "是" : "否";
- },
- },
- {
- title: "项目负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "总年限",
- dataIndex: "yearSum",
- key: "yearSum",
- render: (text, record) => {
- return (
- <div>{["", "一年", "二年", "三年", "四年", "五年"][text]}</div>
- );
- }
- },
- {
- title: "年限",
- dataIndex: "serviceLife",
- key: "serviceLife",
- render: (text, record) => {
- return (
- <div>{!!text && JSON.parse(text).toString()}</div>
- );
- }
- },
- {
- title: "本次派单",
- dataIndex: "serviceYear",
- key: "serviceYear",
- render: (text, record) => {
- return (
- <div>{!text ? "" : text}</div>
- );
- }
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- style={{
- width: 100,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis",
- }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- ],
- detailContactsLists: [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- );
- },
- },
- {
- title: "项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record) => {
- let dataArr = this.state.proDataSource || [];
- if (record.ctid) {
- return <span>{text + "-" + record.ctid}</span>;
- } else {
- let tid = record.tid;
- let ctid = "";
- dataArr.forEach((item, index) => {
- if (item.tid == tid) {
- ctid = item.id;
- }
- });
- return <span>{text + "-" + ctid}</span>;
- }
- },
- },
- {
- title: "项目分类",
- dataIndex: "projectType",
- key: "projectType",
- render: (text) => {
- let arr = this.state.proDataSource || [];
- let str = "";
- for (let i = 0; i < arr.length; i++) {
- if (this.state.proDataSource[i].cSort == text) {
- str = this.state.proDataSource[i].cname;
- return <span>{str}</span>;
- }
- }
- },
- },
- {
- title: "催款科目",
- dataIndex: "dunTypeName",
- key: "dunTypeName",
- render: (text, record) => {
- return <span>{text}</span>;
- },
- },
- {
- title: "时间",
- dataIndex: "waitDay",
- key: "waitDay",
- render: (text, record) => {
- if (record.dunTypeName) {
- if (record.customizeTimes) {
- return record.customizeTimes;
- }
- return <span>{text}</span>;
- }
- },
- },
- {
- title: "金额(万元)",
- dataIndex: "money",
- key: "money",
- render: (text, record) => {
- if (record.dunTypeName) {
- if (record.appropriationRatio) {
- let percent = Number(record.appropriationRatio * 100).toFixed(2);
- percent += "%";
- return <span>{percent}(拨款比例)</span>;
- } else {
- if (this.props.isZxs) {
- return <span>***</span>;
- }
- return <span>{text}</span>;
- }
- }
- },
- },
- {
- title: "服务年限",
- dataIndex: "startDate",
- key: "startDate",
- render: (text, record) => {
- if (record.dunTypeName) {
- return <span>{text}</span>;
- }
- },
- },
- {
- title: "催款状态",
- dataIndex: "status",
- key: "status",
- render: (text) => {
- return <span>{text == 1 ? "已启动" : "未启动"}</span>;
- },
- },
- ],
- resVisible: false,
- columnsrizhi: [
- {
- title: "流程",
- dataIndex: "processName",
- key: "processName",
- },
- {
- title: "操作人",
- dataIndex: "adminName",
- key: "adminName",
- },
- {
- title: "时间",
- dataIndex: "createDate",
- key: "createDate",
- },
- ],
- contactList: [],
- ContactsLists: [
- {
- title: "催款科目",
- dataIndex: "dunSubject",
- key: "dunSubject",
- render: (text, record) => {
- return (
- <Select
- placeholder="请选择催款科目"
- value={record.dunSubject}
- style={{ width: "150px" }}
- disabled
- onChange={(e) => {
- record.dunSubject = e;
- this.setState({ contactList: this.state.contactList });
- }}
- >
- {jiedian.map(function (item) {
- return (
- <Select.Option key={item.value}>{item.key}</Select.Option>
- );
- })}
- </Select>
- );
- },
- },
- {
- title: "金额(万元)",
- dataIndex: "money",
- key: "money",
- render: (text, record) => {
- return (
- <Input
- type="number"
- value={record.money}
- placeholder="请输入金额(必填项)"
- disabled
- key={record.id}
- required="required"
- onChange={(e) => {
- record.money = e.target.value;
- this.setState({ contactList: this.state.contactList });
- }}
- style={{ width: "120px" }}
- />
- );
- },
- },
- {
- title: "催款状态",
- dataIndex: "dunStatus",
- key: "dunStatus",
- render: (text) => {
- return getCuikuan(text);
- },
- },
- {
- title: "操作",
- dataIndex: "dels",
- key: "dels",
- render: (text, record) => {
- return (
- <div>
- {
- <Popconfirm
- title="是否删除?"
- onConfirm={() => {
- this.confirmDelet(record.key);
- }}
- okText="删除"
- cancelText="不删除"
- >
- <Button
- style={{
- marginRight: "10px",
- color: "#ffffff",
- background: "#f00",
- border: "none",
- display:
- this.state.processStatus == 0 ? "block" : "none",
- }}
- >
- 删除
- </Button>
- </Popconfirm>
- }
- {record.id ? (
- ""
- ) : (
- <Button type="primary" onClick={this.contactSave}>
- 保存
- </Button>
- )}
- </div>
- );
- },
- },
- ],
- ContactsListsNew: [
- {
- title: "项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record, index) => {
- let dataArr = this.state.dataSource || [];
- if (text) {
- return <span>{text + "-" + record.tid}</span>;
- }
- return (
- <Select
- placeholder="请选择名称"
- style={{ width: "150px" }}
- disabled={
- this.state.getLoad && record.sortName ? true : false
- }
- onChange={(e) => {
- // let num = e.lastIndexOf("-");
- // let ctid = e.substr(num + 1);
- // record.sortName = e.substring(0, num);
- // dataArr.forEach((item) => {
- // if (
- // item.commodityName == record.sortName &&
- // ctid == item.id
- // ) {
- // record.cname = item.cname;
- // record.tid = item.id;
- // record.isSave = true;
- // record.sort = item.sort;
- // cuiJieDian.forEach((item) => {
- // if (item.value == record.sort) {
- // record.arr = item.children;
- // let yearFlag = true;
- // if (record.sort == 6) {
- // yearFlag = false;
- // }
- // this.setState({
- // getLoad: true,
- // yearFlag,
- // });
- // }
- // });
- // }
- // });
- let proData = dataArr[e];
- record.cname = proData.cname;
- record.tid = proData.id;
- record.isSave = true;
- record.sort = proData.sort;
- cuiJieDian.forEach((item) => {
- if (item.value == record.sort) {
- record.arr = item.children;
- let yearFlag = true;
- if (record.sort == 6) {
- yearFlag = false;
- }
- this.setState({
- getLoad: true,
- yearFlag,
- });
- }
- });
- }}
- >
- {dataArr.map((item) => {
- return (
- <Select.Option key={item.id} value={item.key}>
- {item.commodityName + "-" + item.id}
- </Select.Option>
- );
- })}
- </Select>
- );
- },
- },
- {
- title: "项目分类",
- dataIndex: "projectType",
- key: "projectType",
- render: (text, record) => {
- if (text) {
- let arr = this.state.dataSource || [];
- let str = "";
- for (let i = 0; i < arr.length; i++) {
- if (this.state.dataSource[i].sort == text) {
- str = this.state.dataSource[i].cname;
- return <span>{str}</span>;
- }
- }
- if (!str) {
- return <span>未知</span>;
- }
- }
- if (this.state.getLoad) {
- return (
- <Select
- style={{ width: "150px" }}
- placeholder="请选择分类"
- value={record.cname}
- >
- <Select.Option key={record.sort} value={record.cname}>
- {record.cname}
- </Select.Option>
- </Select>
- );
- } else {
- return (
- <Select style={{ width: "150px" }} placeholder="请选择分类">
- <Select.Option key={record.sort} value={record.cname}>
- {record.cname}
- </Select.Option>
- </Select>
- );
- }
- },
- },
- {
- title: "催款科目",
- dataIndex: "dunTypeName",
- key: "dunTypeName",
- render: (text, record) => {
- if (text) {
- if (record.customizeName) {
- return text + record.customizeName;
- }
- return <span>{text}</span>;
- }
- if (this.state.getLoad) {
- let arr = record.arr || [];
- return (
- <div>
- <Select
- style={{ width: "150px", marginRight: 5 }}
- placeholder="请选择分类"
- onChange={(e) => {
- record.dunType = e;
- if (record.dunType == 0) {
- record.customizeTimes = "";
- record.customizeName = "";
- }
- if (e == 0) {
- record.dunTypeCustom = true;
- } else {
- record.dunTypeCustom = false;
- }
- if (e != 1) {
- this.setState({
- timeFlag: true,
- });
- } else {
- this.setState({
- timeFlag: false,
- });
- }
- if (e == 1 && record.sort == 6) {
- this.setState({
- yearFlag: true,
- });
- } else if (e != 1 && record.sort == 6) {
- this.setState({
- yearFlag: false,
- });
- }
- if (record.sort == 3 && e == 3) {
- this.setState({
- boFlag: true,
- });
- } else {
- this.setState({
- boFlag: false,
- });
- }
- }}
- >
- {arr.map((item) => {
- return (
- <Select.Option key={item.value} value={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- <Select.Option key={0} value={0}>
- 自定义
- </Select.Option>
- </Select>
- {record.dunType == 0 ? (
- <Input
- value={record.customizeName}
- placeholder="请输入自定义名称"
- required="required"
- onChange={(e) => {
- record.customizeName = e.target.value;
- this.setState({
- contactList: this.state.contactList,
- });
- }}
- style={{ width: "120px" }}
- />
- ) : (
- ""
- )}
- </div>
- );
- } else {
- return (
- <Select style={{ width: "150px" }} placeholder="请选择分类">
- <Select.Option
- key={0}
- value={"请选择上一项"}
- ></Select.Option>
- </Select>
- );
- }
- },
- },
- {
- title: "收款时间(特批需选择时间)",
- dataIndex: "waitDay",
- key: "waitDay",
- render: (text, record) => {
- if (record.dunTypeName) {
- if (record.customizeTimes) {
- return record.customizeTimes;
- }
- if (text == 0) {
- var str = "当天";
- } else if (!text) {
- var str = "";
- } else {
- var str = text + "天";
- }
- return <span>{str}</span>;
- }
- return (
- <div>
- {record.dunType == 0 ? (
- <DatePicker
- style={{ width: 150 }}
- disabledDate={(e) => {
- let time = moment(e).valueOf();
- let today = Date.parse(new Date());
- if (time <= today) {
- return true;
- }
- }}
- onChange={(e, t) => {
- record.customizeTimes = t;
- }}
- />
- ) : (
- <Select
- placeholder="请选择时间"
- style={{ width: "160px" }}
- disabled={
- this.state.approval != 0 && !this.state.timeFlag
- ? false
- : true
- }
- onChange={(e) => {
- record.waitDay = e;
- }}
- >
- <Select.Option key={0}>当天</Select.Option>
- <Select.Option key={3}>3天</Select.Option>
- <Select.Option key={5}>5天</Select.Option>
- <Select.Option key={7}>7天</Select.Option>
- <Select.Option key={15}>15天</Select.Option>
- </Select>
- )}
- </div>
- );
- },
- },
- {
- title: "金额(万元)",
- dataIndex: "money",
- key: "money",
- render: (text, record) => {
- if (record.dunTypeName) {
- if (record.appropriationRatio) {
- let percent = Number(record.appropriationRatio * 100).toFixed(2);
- percent += "%";
- return <span>{percent}(拨款比例)</span>;
- } else {
- return <span>{text}</span>;
- }
- }
- return (
- <div>
- <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
- <Select
- placeholder="选择"
- defaultValue={"金额"}
- onChange={(e) => {
- record.boStatus = e;
- }}
- >
- <Select.Option key={true}>比例</Select.Option>
- <Select.Option key={false}>金额</Select.Option>
- </Select>
- </div>
- <div style={{ float: "right" }}>
- <Input
- type="number"
- value={record.money}
- key={record.id}
- required="required"
- onChange={(e) => {
- record.money = e.target.value;
- this.setState({
- contactList: this.state.contactList,
- });
- }}
- style={{ width: "120px" }}
- />
- </div>
- </div>
- )
- // if (this.state.boFlag) {
- // return (
- // <div>
- // <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
- // <Select
- // placeholder="选择"
- // defaultValue={"金额"}
- // onChange={(e) => {
- // record.boStatus = e;
- // }}
- // >
- // <Select.Option key={true}>比例</Select.Option>
- // <Select.Option key={false}>金额</Select.Option>
- // </Select>
- // </div>
- // <div style={{ float: "right" }}>
- // <Input
- // type="number"
- // value={record.money}
- // key={record.id}
- // required="required"
- // onChange={(e) => {
- // record.money = e.target.value;
- // this.setState({
- // contactList: this.state.contactList,
- // });
- // }}
- // style={{ width: "120px" }}
- // />
- // </div>
- // </div>
- // );
- // } else {
- // return (
- // <div>
- // <Input
- // type="number"
- // value={record.money}
- // placeholder="请输入金额(必填项)"
- // key={record.id}
- // required="required"
- // onChange={(e) => {
- // record.money = e.target.value;
- // this.setState({ contactList: this.state.contactList });
- // }}
- // style={{ width: "120px" }}
- // />
- // </div>
- // );
- // }
- },
- },
- {
- title: "服务年限",
- dataIndex: "startDate",
- key: "startDate",
- render: (text, record) => {
- if (record.dunTypeName) {
- return <span>{text}</span>;
- }
- return (
- <div>
- {record.dunType != 0 ? (
- <Select
- placeholder="请选择年限"
- style={{ width: "150px" }}
- disabled={this.state.yearFlag ? true : false}
- onChange={(e) => {
- record.effectiveCount = e;
- }}
- >
- {/* <Select.Option key={null}>无</Select.Option> */}
- <Select.Option key={1}>一年</Select.Option>
- <Select.Option key={3}>两年</Select.Option>
- <Select.Option key={5}>三年</Select.Option>
- <Select.Option key={7}>四年</Select.Option>
- <Select.Option key={9}>五年</Select.Option>
- </Select>
- ) : (
- <div />
- )}
- </div>
- );
- },
- },
- {
- title: "催款状态",
- dataIndex: "status",
- key: "status",
- render: (text) => {
- return <span>{text == 1 ? "已启动" : "未启动"}</span>;
- },
- },
- {
- title: "操作",
- dataIndex: "dels",
- key: "dels",
- render: (text, record, index) => {
- return (
- <div>
- {this.state.processStatus == 0 ? (
- <Popconfirm
- title="是否删除?"
- onConfirm={() => {
- this.confirmDeletNew(record);
- }}
- okText="删除"
- cancelText="不删除"
- >
- <Button
- style={{
- marginRight: "10px",
- color: "#ffffff",
- background: "#f00",
- border: "none",
- }}
- >
- 删除
- </Button>
- </Popconfirm>
- ) : (
- ""
- )}
- {record.isSave ? (
- <Button
- type="primary"
- onClick={(e) => {
- this.contactSaveNew(record);
- }}
- >
- 保存
- </Button>
- ) : (
- ""
- )}
- </div>
- );
- },
- },
- ],
- changeCuiList: [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- );
- },
- },
- {
- title: "项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record, index) => {
- let dataArr = this.state.proDataSource || [];
- if (text) {
- // return <span>{text + "-" + record.ctid}</span>;
- if (record.ctid) {
- return <span>{text + "-" + record.ctid}</span>;
- } else {
- let tid = record.tid;
- let ctid = "";
- dataArr.forEach((item, index) => {
- if (item.tid == tid) {
- ctid = item.id;
- }
- });
- return <span>{text + "-" + ctid}</span>;
- }
- }
- return (
- <Select
- placeholder="请选择名称"
- style={{ width: "150px" }}
- disabled={
- this.state.getLoad && record.sortName ? true : false
- }
- onChange={(e) => {
- let proData = dataArr[e];
- record.cname = proData.cname;
- record.ctid = proData.id;
- record.isSave = true;
- record.sort = proData.cSort;
- cuiJieDian.forEach((item) => {
- if (item.value == record.sort) {
- record.arr = item.children;
- let yearFlag = true;
- if (record.sort == 6) {
- yearFlag = false;
- }
- this.setState({
- getLoad: true,
- yearFlag,
- });
- }
- });
- }}
- >
- {dataArr.map((item, index) => {
- if (item.type == 3) {
- return (
- <Select.Option key={item.id} value={item.key} disabled>
- {item.commodityName + "-" + item.id}
- </Select.Option>
- );
- } else {
- return (
- <Select.Option key={item.id} value={item.key}>
- {item.commodityName + "-" + item.id}
- </Select.Option>
- );
- }
- })}
- </Select>
- );
- },
- },
- {
- title: "项目分类",
- dataIndex: "projectType",
- key: "projectType",
- render: (text, record) => {
- if (text) {
- let arr = this.state.proDataSource || [];
- let str = "";
- for (let i = 0; i < arr.length; i++) {
- if (this.state.proDataSource[i].cSort == text) {
- str = this.state.proDataSource[i].cname;
- return <span>{str}</span>;
- }
- }
- }
- if (this.state.getLoad) {
- return (
- <Select
- style={{ width: "150px" }}
- placeholder="请选择分类"
- value={record.cname}
- >
- <Select.Option key={record.sort} value={record.cname}>
- {record.cname}
- </Select.Option>
- </Select>
- );
- } else {
- return (
- <Select style={{ width: "150px" }} placeholder="请选择分类">
- <Select.Option key={record.sort} value={record.cname}>
- {record.cname}
- </Select.Option>
- </Select>
- );
- }
- },
- },
- {
- title: "催款科目",
- dataIndex: "dunTypeName",
- key: "dunTypeName",
- render: (text, record) => {
- if (text) {
- return <span>{text}</span>;
- }
- if (this.state.getLoad) {
- let arr = record.arr || [];
- return (
- <div>
- <Select
- style={{ width: "150px", marginRight: 5 }}
- placeholder="请选择分类"
- onChange={(e) => {
- record.dunType = e;
- if (record.dunType != 0) {
- record.customizeTimes = "";
- record.customizeName = "";
- }
- if (e != 1) {
- this.setState({
- timeFlag: true,
- });
- } else {
- this.setState({
- timeFlag: false,
- });
- }
- if (e == 1 && record.sort == 6) {
- this.setState({
- yearFlag: true,
- });
- } else if (e != 1 && record.sort == 6) {
- this.setState({
- yearFlag: false,
- });
- }
- if (record.sort == 3 && e == 3) {
- this.setState({
- boFlag: true,
- });
- } else {
- this.setState({
- boFlag: false,
- });
- }
- }}
- >
- {arr.map((item) => {
- record;
- return (
- <Select.Option key={item.value} value={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- <Select.Option key={0} value={0}>
- 自定义
- </Select.Option>
- </Select>
- {record.dunType == 0 ? (
- <Input
- value={record.customizeName}
- placeholder="请输入自定义名称"
- required="required"
- onChange={(e) => {
- record.customizeName = e.target.value;
- this.setState({
- contactList: this.state.contactList,
- });
- }}
- style={{ width: "120px" }}
- />
- ) : (
- ""
- )}
- </div>
- );
- } else {
- return (
- <Select style={{ width: "150px" }} placeholder="请选择分类">
- <Select.Option
- key={0}
- value={"请选择上一项"}
- ></Select.Option>
- </Select>
- );
- }
- },
- },
- {
- title: "收款时间(特批需选择时间)",
- dataIndex: "waitDay",
- key: "waitDay",
- render: (text, record) => {
- if (record.dunTypeName) {
- if (record.customizeTimes) {
- return record.customizeTimes;
- }
- if (text == 0) {
- var str = "当天";
- } else if (!text) {
- var str = "";
- } else {
- var str = text + "天";
- }
- return <span>{str}</span>;
- }
- return (
- <div>
- {record.dunType == 0 ? (
- <DatePicker
- style={{ width: 150 }}
- disabledDate={(e) => {
- let time = moment(e).valueOf();
- let today = Date.parse(new Date());
- if (time <= today) {
- return true;
- }
- }}
- onChange={(e, t) => {
- record.customizeTimes = t;
- }}
- />
- ) : (
- <Select
- placeholder="请选择时间"
- style={{ width: "160px" }}
- disabled={
- this.state.approval != 0 && !this.state.timeFlag
- ? false
- : true
- }
- onChange={(e) => {
- record.waitDay = e;
- }}
- >
- <Select.Option key={0}>当天</Select.Option>
- <Select.Option key={3}>3天</Select.Option>
- <Select.Option key={5}>5天</Select.Option>
- <Select.Option key={7}>7天</Select.Option>
- <Select.Option key={15}>15天</Select.Option>
- </Select>
- )}
- </div>
- );
- },
- },
- {
- title: "金额(万元)",
- dataIndex: "money",
- key: "money",
- render: (text, record) => {
- if (record.dunTypeName) {
- if (record.appropriationRatio) {
- let percent = Number(record.appropriationRatio * 100).toFixed(2);
- percent += "%";
- return <span>{percent}(拨款比例)</span>;
- } else {
- return <span>{text}</span>;
- }
- }
- return (
- <div>
- <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
- <Select
- placeholder="选择"
- defaultValue={"金额"}
- onChange={(e) => {
- record.boStatus = e;
- }}
- >
- <Select.Option key={true}>比例</Select.Option>
- <Select.Option key={false}>金额</Select.Option>
- </Select>
- </div>
- <div style={{ float: "right" }}>
- <Input
- type="number"
- value={record.money}
- key={record.id}
- required="required"
- onChange={(e) => {
- record.money = e.target.value;
- this.setState({
- contactList: this.state.contactList,
- });
- }}
- style={{ width: "120px" }}
- />
- </div>
- </div>
- );
- // if (this.state.boFlag) {
- // return (
- // <div>
- // <div style={{ width: 70, textAlign: "center", float: "left", marginRight: 5 }}>
- // <Select
- // placeholder="选择"
- // defaultValue={"金额"}
- // onChange={(e) => {
- // record.boStatus = e;
- // }}
- // >
- // <Select.Option key={true}>比例</Select.Option>
- // <Select.Option key={false}>金额</Select.Option>
- // </Select>
- // </div>
- // <div style={{ float: "right" }}>
- // <Input
- // type="number"
- // value={record.money}
- // key={record.id}
- // required="required"
- // onChange={(e) => {
- // record.money = e.target.value;
- // this.setState({
- // contactList: this.state.contactList,
- // });
- // }}
- // style={{ width: "120px" }}
- // />
- // </div>
- // </div>
- // );
- // } else {
- // return (
- // <div>
- // <Input
- // type="number"
- // value={record.money}
- // placeholder="请输入金额(必填项)"
- // key={record.id}
- // required="required"
- // onChange={(e) => {
- // record.money = e.target.value;
- // this.setState({ contactList: this.state.contactList });
- // }}
- // style={{ width: "120px" }}
- // />
- // </div>
- // );
- // }
- },
- },
- {
- title: "服务年限",
- dataIndex: "startDate",
- key: "startDate",
- render: (text, record) => {
- if (record.dunTypeName) {
- return <span>{text}</span>;
- }
- return (
- <Select
- placeholder="请选择年限"
- style={{ width: "150px" }}
- disabled={this.state.yearFlag ? true : false}
- onChange={(e) => {
- record.effectiveCount = e;
- }}
- >
- {/* <Select.Option key={null}>无</Select.Option> */}
- <Select.Option key={1}>一年</Select.Option>
- <Select.Option key={3}>两年</Select.Option>
- <Select.Option key={5}>三年</Select.Option>
- <Select.Option key={7}>四年</Select.Option>
- <Select.Option key={9}>五年</Select.Option>
- </Select>
- );
- },
- },
- {
- title: "催款状态",
- dataIndex: "status",
- key: "status",
- render: (text) => {
- return <span>{text == 1 ? "已启动" : "未启动"}</span>;
- },
- },
- {
- title: "操作",
- dataIndex: "dels",
- key: "dels",
- render: (text, record, index) => {
- return (
- <div>
- <Popconfirm
- title="是否删除?"
- onConfirm={() => {
- this.changeDeleteCui(record);
- }}
- okText="删除"
- cancelText="不删除"
- >
- <Button
- disabled={this.state.listCuiFlag}
- style={{
- marginRight: "10px",
- display: this.state.displayList ? "none" : "block",
- }}
- >
- 删除
- </Button>
- </Popconfirm>
- {record.isSave ? (
- <Button
- type="primary"
- style={{ marginTop: 5 }}
- onClick={(e) => {
- this.changeSaveCui(record);
- }}
- >
- 保存
- </Button>
- ) : (
- ""
- )}
- </div>
- );
- },
- },
- ],
- updatas: {},//销售类型修改数据
- newData: {},//新建会员记忆数据
- serviceLife: [],
- isVip: undefined,//是否会员
- isIso: undefined,//是否贯标
- histYear: [],
- contractTerm: [],//合同期
- isEdit: false,//是否可编辑
- addyear: undefined,//
- isGive: 0,//是否赠送
- cPeriod: false, // 合同期是否可编辑
- isNew: false,// 是否替换合同
- sType: "",
- selectList: [],// 可操作项目集
- };
- },
- getpatentTypeList() {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderProject/getPatentType",
- success: function (data) {
- if (data.error.length === 0) {
- this.setState({
- patentTypeList: data.data,
- });
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this),
- });
- },
- departmentList() {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectSuperId",
- data: {},
- success: function (data) {
- let thedata = data.data;
- let theArr = [];
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- } else {
- thedata.forEach((item) => {
- theArr.push({
- key: item.id,
- name: item.name,
- id: item.id,
- depNo: item.depNo,
- })
- if (item.list) {
- item.list.forEach((itl) => {
- theArr.push({
- key: itl.id,
- name: itl.name,
- id: itl.id,
- depNo: itl.depNo,
- })
- });
- }
- })
- }
- this.setState({
- departmentArr: theArr,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 拆分详细
- showRes(record) {
- this.setState({
- resVisible: true,
- resRecord: record,
- });
- },
- resCancel() {
- this.setState({
- resVisible: false,
- });
- },
- //新建订单、编辑订单保存
- handleSubmit(e) {
- e.preventDefault();
- let theorgCodeUrl = [];
- if (this.state.orgCodeUrl.length) {
- let picArr = [];
- this.state.orgCodeUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- theorgCodeUrl = picArr.join(",");
- }
- let theReplenishUrl = [];
- if (this.state.replenishUrl.length) {
- let picArr = [];
- this.state.replenishUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- theReplenishUrl = picArr.join(",");
- }
- // 服务内容上传图片
- let contentUrl = [];
- if (this.props.userDetaile) {
- if (this.state.contentUrl.length) {
- let picArr = [];
- this.state.contentUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- contentUrl = picArr.join(",");
- } else {
- message.info("请上传服务内容图片")
- return
- }
- }
- if (this.props.userDetaile) {
- if (!this.state.signDate) {
- message.warning("签单日期不能为空");
- $(".signDateRef input").focus();
- return false;
- }
- if (isNaN(parseInt(this.state.totalAmount))) {
- message.warning("签单金额不能为空");
- this.refs.totalAmountRef.focus();
- return false;
- }
- if (isNaN(parseInt(this.state.firstAmount))) {
- message.warning("首付金额不能为空");
- this.refs.firstAmountRef.focus();
- return false;
- }
- if (moneyVerify(this.state.firstAmount)) {
- return;
- }
- if (moneyVerify(this.state.totalAmount)) {
- return;
- }
- if (!this.state.contacts) {
- message.warning("企业联系人不能为空");
- return
- }
- if (!this.state.contactMobile) {
- message.warning("企业联系人电话不能为空");
- return
- }
- var regeX1 = /^1[3456789]\d{9}$/;
- var regex2 = /^((0\d{2,3})-)?(\d{7,8})$/;
- if (regeX1.test(this.state.contactMobile) == false && regex2.test(this.state.contactMobile) == false) {
- message.warning("请输入正确的企业联系人电话");
- return false;
- }
- if (!theorgCodeUrl) {
- message.warning("图片过大,上传失败");
- this.refs.signFirstPayment.focus();
- return false;
- }
- if (this.state.isShow) {
- if (this.state.knowledgeServices == null ||
- this.state.auditServices == null ||
- this.state.addDeductionServices == null) {
- message.warn("请完善高新纯咨询合同说明!")
- return
- }
- }
- if (!this.state.isProperty) {
- message.warn("请完善知识产权情况!")
- return
- }
- if (this.state.isProperty == 2 && !this.state.patentStatus) {
- message.warn("请完善知识产权情况!")
- return
- }
- if (!this.state.orderRemarks) {
- message.warning("订单留言不能为空");
- this.refs.orderRemarksRef.focus();
- return false;
- }
- if (this.state.approval == 1) {
- if (this.state.approvaType && this.state.approvaType.length == 0) {
- message.warning("请勾选特批状态!");
- return false;
- }
- if (this.state.approvaType.indexOf(0) !== -1 && !this.state.typeExplain) {
- message.warning("请填写特批其他说明!");
- return false;
- }
- }
- }
- const arr = this.state.contactListNew || [];
- for (let i = 0; i < arr.length; i++) {
- if (
- arr[i].dunType == 1 &&
- arr[i].waitDay != null &&
- this.state.approval == 0
- ) {
- message.warning(
- "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
- );
- return false;
- } else if (
- arr[i].dunType == 1 &&
- arr[i].waitDay == null &&
- this.state.approval == 1
- ) {
- message.warning(
- "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
- );
- return false;
- }
- if (!this.state.contactListNew[i].id && this.props.userDetaile) {
- message.warning("请保存催款节点");
- return false;
- }
- }
- this.setState({
- loading: true,
- });
- let api = this.props.userDetaile
- ? this.state.isSubmit == 1 ? "/api/admin/newOrder/submitOrder" : "/api/admin/newOrder/updateServiceOrderNew"
- : "/api/admin/newOrder/createOrder";
- const { selectSales, other, channelid, channelname, userType } = this.state
- // 开单
- let datas = {
- uid: this.state.autoId,//用户id
- orderType: this.state.orderType,//订单类型
- salesType: selectSales,//销售类型
- userType: userType,//客户所属类型
- };
- if (selectSales == "3") { //传渠道编号 other里面传渠道名称
- datas = Object.assign(datas, {
- channelId: channelid,
- other: channelname,
- })
- } else if (selectSales == "4" || selectSales == "5") { //4,5要传描述
- datas = Object.assign(datas, {
- other: other,
- })
- }
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + api,
- data: !this.props.userDetaile
- ? datas
- : {
- // 签单、保存
- orderNo: this.state.orderNo, //订单编号
- totalAmount: this.state.totalAmount, //总金额
- firstAmount: this.state.firstAmount, //首付
- isSubmit: this.state.isSubmit, //保存草稿还是提交
- signDate: this.state.signDate, //签单日期
- contacts: this.state.contacts, //企业负责人
- contactMobile: this.state.contactMobile, //负责人联系方式
- legalPerson: this.state.legalPerson, //企业法人
- legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
- approval: this.state.approval, //特批状态
- orderRemarks: this.state.orderRemarks, //订单备注
- contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
- agreementUrl: theReplenishUrl.length ? theReplenishUrl : "",
- serviceContent: contentUrl.length ? contentUrl : "",
- orderDep: this.state.organizationSearch,
- knowledgeServices: this.state.isShow ? this.state.knowledgeServices : undefined, //知识产权服务
- auditServices: this.state.isShow ? this.state.auditServices : undefined, //审计服务
- addDeductionServices: this.state.isShow ? this.state.addDeductionServices : undefined, //加计扣除服务
- knowledgeOther: this.state.isShow ? this.state.knowledgeOther : undefined, //知识产权服务其他描述
- auditOther: this.state.isShow ? this.state.auditOther : undefined, //审计服务其他描述
- addDeductionOther: this.state.isShow ? this.state.addDeductionOther : undefined, //加计扣除服务其他描述
- patentStatus: this.state.patentStatus, //知识产权情况
- type: this.state.approvaType.sort(compare).toString(), // 特批类型
- typeExplain: this.state.approvaType.indexOf(0) === -1 ? "" : this.state.typeExplain, // 其他备注
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.handleOk();
- if (this.state.autoId) {
- this.loadData();
- }
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- //订单作废
- examOks() {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew",
- data: {
- orderNo: this.state.orderNo, //订单编号
- },
- success: function (data) {
- if (data.error.length || data.data.list == "") {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- message.success("操作成功~");
- this.setState({
- visible: false,
- loading: false,
- });
- this.props.closeDesc(false);
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //订单详情修改
- xiangqingClick(e) {
- e.preventDefault();
- this.setState({
- loading: true,
- });
- if (this.state.approval == 2 || this.state.approval == 3) {
- message.warning("特批状态不正确");
- this.setState({
- loading: false,
- });
- return;
- }
- $.ajax({
- url: globalConfig.context + this.state.isSubmit == 1 ? "/api/admin/newOrder/submitOrder" : "/api/admin/newOrder/updateServiceOrderNew",
- method: "post",
- data: {
- orderNo: this.state.orderNo, //订单编号
- totalAmount: this.state.totalAmount, //总金额
- firstAmount: this.state.firstAmount, //首付
- isSubmit: this.state.isSubmit, //保存草稿还是提交
- signDate: this.state.selTime, //签单日期
- contacts: this.state.contacts, //企业负责人
- contactMobile: this.state.contactMobile, //负责人联系方式
- legalPerson: this.state.legalPerson, //企业法人
- legalPersonTel: this.state.legalPersonTel, //企业法人联系电话
- approval: this.state.approval, //特批状态
- orderRemarks: this.state.orderRemarks, //订单备注
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.loaduser();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- not() { },
- //查看基本详情基本信息
- loaduser(record) {
- this.setState({
- closable: false,
- disabledView: "none",
- });
- this.state.orderList = [];
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail",
- data: {
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- },
- success: function (data) {
- let thisData = data.data;
- if (!thisData) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thisData = {};
- }
- // if (thisData.approval == 2) {
- // thisData.approval = "特批通过";
- // } else if (thisData.approval == 3) {
- // thisData.approval = "特批驳回";
- // }
- this.setState({
- id: thisData.id,
- kehuId: thisData.buyerId,
- orderNo: thisData.orderNo, //订单编号
- orderType: thisData.orderType, //订单类型
- firstAmount: thisData.firstAmount, //首付金额
- totalAmount: thisData.totalAmount, //总金额
- settlementAmount: thisData.settlementAmount, //结算金额
- liquidationStatus: thisData.liquidationStatus, //清算状态
- examineName: thisData.examineName,
- processStatus: thisData.processStatus, //流程状态
- approval: thisData.approval, //特批状态
- orderRemarks: thisData.orderRemarks, //订单备注
- contractNo: thisData.contractNo, //合同编号
- contacts: thisData.contacts, //联系人
- contactMobile: thisData.contactMobile, //联系人电话
- legalPerson: thisData.legalPerson, //法人
- legalPersonTel: thisData.legalPersonTel, //法人电话
- knowledgeServices: thisData.knowledgeServices, //知识产权服务
- auditServices: thisData.auditServices, //审计服务
- addDeductionServices: thisData.addDeductionServices, //加计扣除服务
- knowledgeOther: thisData.knowledgeOther, //知识产权服务其他描述
- auditOther: thisData.auditOther, //审计服务其他描述
- addDeductionOther: thisData.addDeductionOther, //加计扣除服务其他描述
- patentStatus: thisData.patentStatus, // 知识产权情况
- isProperty: thisData.patentStatus == null ? null : thisData.patentStatus == 0 ? 1 : 2,
- approvaType: thisData.type ? thisData.type.split(",").map(Number) : [], // 特批类型
- typeExplain: thisData.typeExplain,
- orgCodeUrl: thisData.contractPictureUrl
- ? splitUrl(
- thisData.contractPictureUrl,
- ",",
- globalConfig.avatarHost + "/upload"
- )
- : [], //图片地址
- replenishUrl: thisData.agreementUrl
- ? splitUrl(
- thisData.agreementUrl,
- ",",
- globalConfig.avatarHost + "/upload"
- )
- : [], //图片地址
- contentUrl: thisData.serviceContent
- ? splitUrl(
- thisData.serviceContent,
- ",",
- globalConfig.avatarHost + "/upload"
- )
- : [], //图片地址
- signDate: thisData.signDate, //签单时间
- userName: thisData.userName, //客户名称
- salesmanName: thisData.salesmanName, //营销员名称
- salesmanMobile: thisData.salesmanMobile, //营销员电话
- oldSalesmanName: thisData.oldSalesmanName, //营销员名称
- oldSalesmanMobile: thisData.oldSalesmanMobile, //营销员电话
- financeName: thisData.financeName, //财务名称
- financeMobile: thisData.financeMobile, //财务电话
- nowFinanceMobile: thisData.nowFinanceMobile,
- nowFinance: thisData.nowFinance,
- // approval:
- // thisData.approval == 0
- // ? thisData.approval.toString()
- // : thisData.approval,
- organizationSearch: thisData.orderDep,
- depName: thisData.depName,
- status: thisData.status,
- outsource: thisData.outsource,
- deleteSign: thisData.deleteSign,
- orderUid: thisData.uid,
- userType: thisData.userType,
- updatas: {
- salesType: thisData.salesType,//销售类型
- userType: thisData.userType,//客户所属类型
- other: thisData.other,//3渠道名 4,5描述
- },
- channelName: thisData.salesType == "3" ? thisData.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值
- });
- // 判断状态
- if (this.state.processStatus === 0) {
- this.setState({
- closable: true,
- disabledView: "inline-block",
- });
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //节点列表
- jiedian(orderNos) {
- this.setState({
- loadData: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
- data: {
- orderNo: orderNos,
- },
- success: function (data) {
- let theArr = [];
- let thisData = [];
- if (data.error.length || data.data.list == "") {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- for (let i = 0; i < data.data.length; i++) {
- thisData = data.data[i];
- theArr.push({
- key: i,
- dunSubject: thisData.dunSubject
- ? thisData.dunSubject.toString()
- : "", //催款科目
- id: thisData.id, //节点Id
- money: thisData.money, //催款金额
- dunStatus: thisData.dunStatus, //催款状态
- orderNo: thisData.orderNo,
- });
- }
- this.setState({
- contactList: theArr,
- });
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //查看催款节点
- jiedianNew(orderNos) {
- this.setState({
- loadData: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url:
- globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
- data: {
- orderNo: orderNos,
- },
- success: function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- } else {
- let theArr = [];
- let thisData = [];
- let arr = data.data || [];
- let totalCui = 0;
- for (let i = 0; i < arr.length; i++) {
- thisData = arr[i];
- totalCui += +thisData.money;
- theArr.push({
- key: i,
- dunSubject: thisData.dunSubject
- ? thisData.dunSubject.toString()
- : "", //催款科目
- id: thisData.id, //节点Id
- money: thisData.money, //催款金额
- // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- commodityName: thisData.commodityName,
- projectType: thisData.projectType,
- dunTypeName: thisData.dunTypeName,
- status: thisData.status,
- waitDay: thisData.waitDay,
- effectiveCount: thisData.effectiveCount,
- startDate: thisData.startDate,
- dunType: thisData.dunType,
- appropriationRatio: thisData.appropriationRatio,
- customizeName: thisData.customizeName,
- customizeTimes: thisData.customizeTimes,
- tid: thisData.tid,
- });
- }
- if (!totalCui) {
- totalCui = 0;
- }
- totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6);
- this.setState({
- contactListNew: theArr,
- totalCui: parseFloat(totalCui),
- });
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //催款节点保存
- contactSave(record) {
- for (let i = 0; i < this.state.contactList.length; i++) {
- if (moneyVerify(this.state.contactList[i].money)) {
- return;
- }
- }
- this.setState({
- loading: true,
- });
- $.ajax({
- url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
- method: "post",
- data: {
- orderNo: this.state.orderNo,
- orderDun: JSON.stringify(this.state.contactList),
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.jiedian(record.orderNo);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- //催款节点保存
- contactSaveNew(record) {
- if (record.dunType == 0) {
- if (!record.customizeTimes) {
- message.warning("请输入自定义时间");
- return;
- } else if (!record.customizeName) {
- message.warning("请输入自定义科目");
- return;
- }
- }
- if (
- this.state.approval == 1 &&
- record.dunType == 1 &&
- !record.waitDay
- ) {
- message.warning("请填写收款时间");
- return
- }
- if (record.boStatus == "false") {
- record.boStatus = false;
- } else if (record.boStatus == "true") {
- record.boStatus = true;
- }
- if (!this.state.yearFlag) {
- if (!record.effectiveCount && !record.dunTypeCustom) {
- message.warning("请选择服务年限");
- return;
- }
- } else {
- record.effectiveCount = "";
- }
- if (record.money == "") {
- message.warning("请填写金额");
- return;
- }
- if (record.boStatus) {
- if (
- typeof +record.money == "number" &&
- +record.money >= 0 &&
- +record.money <= 1
- ) {
- record.appropriationRatio = record.money;
- } else {
- message.warning("金额比例填写错误,比例范围0~1");
- return;
- }
- }
- if (!record.dunType && record.dunType != 0) {
- message.warning("请选择对应科目");
- return;
- }
- if (record.dunType != 1) {
- record.waitDay = "";
- }
- this.setState({
- loading: true,
- });
- if (record.boStatus) {
- $.ajax({
- url: globalConfig.context + "/api/admin/newOrderDun/createDun",
- method: "post",
- data: {
- orderNo: record.orderNo,
- tid: record.tid,
- projectType: record.sort,
- dunType: record.dunType,
- appropriationRatio: record.appropriationRatio,
- waitDay: record.waitDay,
- effectiveCount: record.effectiveCount,
- customizeTimes:
- record.dunType == 0 ? record.customizeTimes : undefined,
- customizeName:
- record.dunType == 0 ? record.customizeName : undefined,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.setState({
- cuiFlag: false,
- boFlag: false,
- addFlag: false,
- });
- this.jiedianNew(record.orderNo);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- } else {
- $.ajax({
- url: globalConfig.context + "/api/admin/newOrderDun/createDun",
- method: "post",
- data: {
- orderNo: record.orderNo,
- tid: record.tid,
- projectType: record.sort,
- dunType: record.dunType,
- money: record.money,
- waitDay: record.waitDay,
- effectiveCount: record.effectiveCount,
- customizeTimes:
- record.dunType == 0 ? record.customizeTimes : undefined,
- customizeName:
- record.dunType == 0 ? record.customizeName : undefined,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.setState({
- cuiFlag: false,
- boFlag: false,
- addFlag: false,
- });
- this.jiedianNew(record.orderNo);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- }
- },
- //点击新增催款节点
- addcontact() {
- this.state.contactList.push({
- key: this.state.contactList.length,
- money: "",
- dunSubject: undefined,
- orderNo: this.state.orderNo,
- dunTarget: this.state.kehuId,
- });
- this.setState({
- contactList: this.state.contactList,
- });
- },
- //点击新增催款节点
- addcontactNew() {
- this.state.contactListNew.push({
- key: this.state.contactListNew.length,
- money: "",
- dunSubject: undefined,
- orderNo: this.state.orderNo,
- dunTarget: this.state.kehuId,
- });
- this.setState({
- contactListNew: this.state.contactListNew,
- cuiFlag: true,
- });
- },
- //删除收款节点
- confirmDelet(index) {
- this.state.contactList.splice(index, 1);
- this.setState({
- contactList: this.state.contactList,
- });
- this.contactSave();
- },
- //删除收款节点
- confirmDeletNew(index) {
- if (index.id) {
- this.state.contactListNew.splice(index.id, 1);
- this.setState({
- contactListNew: this.state.contactListNew,
- cuiFlag: false,
- addFlag: false,
- boFlag: false,
- });
- $.ajax({
- url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
- method: "post",
- data: {
- id: index.id,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("删除成功!");
- this.setState({
- cuiFlag: false,
- });
- this.jiedianNew(this.state.orderNo);
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- } else {
- this.state.contactListNew.splice(index.key, 1);
- this.setState({
- contactListNew: this.state.contactListNew,
- cuiFlag: false,
- addFlag: false,
- boFlag: false,
- });
- }
- },
- //
- handleOk() {
- this.setState({
- visible: false,
- mark: false,
- });
- this.props.closeDesc(false, true);
- },
- //
- handleCancel() {
- if (this.state.orderType == undefined) {
- return false;
- }
- if (!this.state.autoId) {
- return false;
- }
- this.setState({
- visible: false,
- mark: false,
- });
- this.props.closeDesc(false);
- },
- //
- handleCancelclose() {
- this.setState(
- {
- visible: false,
- mark: false,
- cuiFlag: false,
- addFlag: false,
- boFlag: false,
- isJilu: false,
- },
- () => {
- this.setState({
- activeKey: "1",
- });
- }
- );
- this.props.closeDesc(false);
- this.reset();
- },
- //点击签单
- handleCancels() {
- this.setState({
- isSubmit: 1,
- });
- },
- //点击保存
- handleCancelq() {
- this.setState({
- isSubmit: 0,
- });
- },
- //删除
- delectRow(record) {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask",
- data: {
- id: record.id,
- },
- }).done(
- function (data) {
- if (!data.error.length) {
- message.success("删除成功!");
- this.setState({
- loading: false,
- });
- this.jiedian(this.state.orderNo);
- this.jiedianNew(this.state.orderNo);
- // this.loaduser();
- this.loadData();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- //
- nextCancel(type) {
- this.setState(
- {
- editProVisible: false,
- changeVisible: false,
- projectOperationVisible: false,
- editProjectOperationVisible: false,//
- vipVisible: false,
- gid: "",
- dataInfor: {},
- addProjectType: undefined,
- isVip: undefined,
- isIso: undefined,
- commodityQuantity: undefined,
- histYear: [],
- yearSum: undefined,
- serviceLife: [],
- serviceYear: undefined,
- isEdit: false, // 可编辑
- },
- () => {
- this.loadData();
- this.proList();
- }
- );
- },
- //
- rizhi() {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: "/api/admin/newOrder/selectOrderLog",
- data: {
- orderNo: this.props.datauser.orderNo,
- },
- success: function (data) {
- let theArr = [];
- let thisData = data.data;
- if (!thisData.length) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thisData = {};
- } else {
- for (let i = 0; i < data.data.length; i++) {
- let thisdata = data.data[i];
- theArr.push({
- processName: thisdata.processName,
- adminName: thisdata.adminName,
- createDate: thisdata.createDate,
- remarks: thisdata.remarks,
- });
- }
- }
- this.setState({
- dataSourcerizhi: theArr,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //查看订单日志
- getOrderLog() {
- this.setState({
- rizhivisible: true,
- });
- this.rizhi();
- },
- //
- closeOrderLog() {
- this.setState({
- rizhivisible: false,
- });
- },
- //
- callback(key) {
- this.setState({
- activeKey: key,
- });
- if (key === "1") {
- this.jiedian(this.props.datauser.orderNo);
- this.jiedianNew(this.props.datauser.orderNo);
- this.loaduser();
- // this.loaduser();
- }
- if (key === "3") {
- this.getChangeData();
- }
- if (key === "2" || key === "3") {
- let url = window.location.href.substring(7);
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url:
- globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
- data: {
- orderNo: this.props.datauser.orderNo,
- },
- success: function (data) {
- if (data.data && data.data.length) {
- let thisdata = data.data[data.data.length - 1];
- if (
- thisdata.status === 0 ||
- (thisdata.processState == 0 && thisdata.status != 5)
- ) {
- this.setState({
- changeId: thisdata.id,
- typeChange: thisdata.type,
- totalAmount: thisdata.totalAmount,
- firstAmount: thisdata.firstAmount,
- settlementAmount: thisdata.settlementAmount,
- changeAmount: thisdata.changeAmount,
- remarksC: thisdata.remarks,
- startRemarks: thisdata.zxsRemarks,
- isCaoGao: true,
- arrears: thisdata.arrears,
- changeFlag: true,
- createTimes: thisdata.createTimes,
- voucherUrl: thisdata.voucherUrl
- ? splitUrl(
- thisdata.voucherUrl,
- ",",
- globalConfig.avatarHost + "/upload",
- url
- )
- : [],
- newContractUrl: thisdata.contractPictureUrl
- ? splitUrl(
- thisdata.contractPictureUrl,
- ",",
- globalConfig.avatarHost + "/upload",
- url
- )
- : [],
- isNew: !thisdata.contractPictureUrl ? false : true,
- processState: thisdata.processState,
- status: thisdata.status,
- contacts: thisdata.contacts, // 企业联系人
- contactMobile: thisdata.contactMobile, // 企业联系方式
- managerContacts: thisdata.managerContacts, // 企业总经理
- managerContactMobile: thisdata.managerContactMobile, // 企业总经理联系方式
- });
- this.proList();
- this.cuiList();
- let e = thisdata.type;
- if (e == 1) {
- this.setState({
- hetongFlag: false,
- listFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- });
- } else if (e == 2) {
- this.setState({
- hetongFlag: true,
- listFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: true,
- displayList: false,
- });
- } else if (e == 3) {
- this.setState({
- listFlag: false,
- hetongFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: true,
- });
- } else if (e == 4) {
- this.setState({
- listFlag: false,
- listCuiFlag: false,
- hetongFlag: false,
- tuiKuanFlag: true,
- displayList: false,
- });
- } else if (e == 5) {
- this.setState({
- listFlag: false,
- listCuiFlag: false,
- hetongFlag: true,
- tuiKuanFlag: true,
- displayList: false,
- });
- } else if (e == 6) {
- this.setState({
- // listFlag: true,
- // listCuiFlag: true,
- // hetongFlag: true,
- // tuiKuanFlag: true,
- // displayList: false,
- listFlag: false,
- listCuiFlag: false,
- hetongFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- });
- } else if (e == 7) {
- this.setState({
- listFlag: true,
- listCuiFlag: true,
- hetongFlag: true,
- tuiKuanFlag: true,
- displayList: false,
- isNew: true,
- });
- } else {
- this.setState({
- hetongFlag: false,
- listFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- });
- }
- } else {
- this.setState({
- listFlag: false,
- hetongFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- // 置空
- changeId: undefined,
- isCaoGao: false,
- });
- }
- } else {
- this.setState({
- isCaoGao: false,
- });
- }
- }.bind(this),
- });
- }
- },
- //
- cuiList(id) {
- this.setState({
- loadData: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/selectChangeDun",
- data: {
- id: id || this.state.changeId,
- },
- success: function (data) {
- this.setState({
- cuiDataSource: data.data,
- });
- if (data.data && data.data.length) {
- if (id) {
- this.setState({
- listCuiFlag: true,
- });
- }
- this.setState({
- cuiDataSource: data.data,
- });
- this.setState({
- loadData: false,
- });
- } else if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- this.setState({
- loadData: false,
- });
- }
- }.bind(this),
- });
- },
- //
- proList(id) {
- if (!id && !this.state.changeId) {
- return
- }
- this.setState({
- loadData: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/selectChangeTask",
- data: {
- id: id || this.state.changeId,
- },
- success: function (data) {
- if (data.data && data.data.length) {
- if (id) {
- this.setState({
- listFlag: true,
- });
- }
- data.data.forEach((item, index) => {
- item.key = index;
- });
- this.setState({
- proDataSource: data.data,
- });
- this.setState({
- loadData: false,
- });
- } else if (data.error && data.error.length) {
- // message.warning(data.error[0].message);
- this.setState({
- loadData: false,
- });
- }
- }.bind(this),
- });
- },
- //
- logList(id) {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- async: false,
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/orderChangeLogList",
- data: {
- changeId: id,
- },
- success: function (data) {
- if (data.error.length || data.data.list == "") {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- this.setState({
- loading: false,
- });
- }
- } else {
- this.setState({
- logData: data.data,
- loading: false,
- });
- }
- }.bind(this),
- });
- },
- getOrgCodeUrl(e) {
- this.setState({ orgCodeUrl: e });
- },
- getReplenishUrl(e) {
- this.setState({ replenishUrl: e });
- },
- getContentUrl(e) {
- this.setState({ contentUrl: e });
- },
- getVoucherUrl(e) {
- this.setState({ voucherUrl: e });
- },
- getNewContractUrl(e) {
- this.setState({ newContractUrl: e });
- },
- //加载(自动补全)
- supervisor(e, state) {
- //客户名称与服务名称自动补全
- let api = state
- ? "/api/admin/customer/getCustomerByName"
- : "/api/admin/order/getBusinessProjectByName";
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + api,
- data: state
- ? {
- name: e,
- type: this.state.userType,
- }
- : {
- businessName: e,
- },
- success: function (data) {
- let thedata = data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- }
- this.setState({
- states: state,
- customerArr: thedata,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 渠道查询
- selectChannel(e) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/selectChannelUserList",
- data: {
- name: e,
- },
- success: function (data) {
- let thedata = data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- }
- this.setState({
- channelArr: thedata,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- supervisorCui(e) {
- //客户名称与服务名称自动补全
- let api = "/api/admin/order/getBusinessProjectByName";
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + api,
- data: {
- businessName: e,
- },
- success: function (data) {
- let thedata = data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- }
- this.setState({
- customerCuiArr: thedata,
- });
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //上级主管输入框失去焦点是判断客户是否存在
- selectAuto(value) {
- const newData = this.state.proDataSource
- let kid = [];
- let fwList = this.state.customerArr;
- fwList.map(function (item) {
- if (value == item.bname) {
- kid = item;
- }
- });
- if (kid.type == "1") {
- this.setState({
- displayFees: "block",
- });
- } else {
- this.setState({
- displayFees: "none",
- });
- }
- //0通用 1专利 2软著 3审计 4双软 5高新 6商标
- this.setState({
- commodityName: value,
- gid: kid.id,
- addProjectType: kid.type,
- isIso: value.indexOf("贯标") !== -1, // 是否为贯标项目
- //commodityPrice:kid.price==0?kid.price.toString():kid.price,
- commodityFirstPayment: kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment,
- isVip: kid.cSort,//暂时判断等于6的时候会员
- commodityQuantity: kid.cSort == 6 ? 1 : undefined,//服务数量
- histYear: [],
- });
- if (newData && newData.length > 0 && kid.cSort == 6) {
- let llist = []
- for (var i = 0; i < newData.length; i++) {
- if (newData[i].commodityId == kid.id) {
- llist.push(newData[i].serviceYear)
- }
- }
- this.setState({
- histYear: llist
- })
- for (var i = newData.length - 1; i >= 0; i--) {
- if (newData[i].commodityId == kid.id) {
- this.setState({
- commodityPrice: newData[i].commodityPrice, // 实签价格
- main: "0", // 是否为主要项目
- yearSum: newData[i].yearSum.toString(), // 会员总服务年限
- serviceLife: !newData[i].serviceLife ? [] : JSON.parse(newData[i].serviceLife), // 会员服务年限
- contractTerm: !newData[i].contractTerm ? [] : JSON.parse(newData[i].contractTerm), // 合同期
- taskComment: newData[i].taskComment, // 项目说明
- // isEdit: true, // 不可编辑
- isEdit: true, // 同一会员项目有且只有一条时可编辑 其他情况不可编辑
- cPeriod: !newData[i].contractTerm ? false : true, //合同期
- })
- return
- } else {
- this.setState({
- commodityPrice: undefined,
- main: undefined,
- yearSum: undefined,
- serviceLife: [],
- contractTerm: [],
- taskComment: undefined,
- isEdit: false, // 可编辑
- cPeriod: false,
- })
- }
- }
- }
- },
- selectAutoCui(value) {
- let kid = [];
- let fwList = this.state.customerCuiArr;
- fwList.map(function (item) {
- if (value == item.bname) {
- kid = item;
- }
- });
- this.setState({
- commodityNameCui: value,
- cid: kid.id,
- //commodityPrice:kid.price==0?kid.price.toString():kid.price,
- commodityFirstPayment:
- kid.firstPayment == 0
- ? kid.firstPayment.toString()
- : kid.firstPayment,
- });
- },
- //客户
- selectAutoCUT(value) {
- let autoIds;
- let fwList = this.state.customerArr;
- fwList.map(function (item) {
- if (value == item.name) {
- autoIds = item.id;
- }
- });
- this.setState({
- customerName: value,
- autoId: autoIds,
- });
- },
- goSelect(value) {
- let channelid;
- let fwList = this.state.channelArr;
- fwList.map(function (item) {
- if (value == item.name) {
- channelid = item.id;
- }
- });
- this.setState({
- channelname: value,
- channelid: channelid,
- });
- },
- //服务值改变时请求客户名称
- httpChange(e) {
- this.state.gid = "";
- if (e.length >= 1) {
- this.supervisor(e, false);
- }
- this.setState({
- commodityName: e,
- });
- },
- httpChangeCui(e) {
- if (e.length >= 1) {
- this.supervisorCui(e, false);
- }
- this.setState({
- commodityNameCui: e,
- });
- },
- //客户名称自动补全
- customerChange(e) {
- if (this.state.userType) {
- this.state.autoId = "";
- if (e.length >= 2) {
- this.supervisor(e, true);
- }
- this.setState({
- customerName: e,
- });
- } else {
- this.setState({
- customerName: "",
- });
- message.warning("客户所属类型必须指定");
- }
- },
- //渠道名称自动补全
- channelChange(e) {
- this.setState({
- channelName: e
- })
- if (e.length >= 2) {
- this.selectChannel(e);
- }
- },
- //点击添加项目明细
- addDetailed() {
- const { dataSource = [] } = this.state
- this.setState({
- projectOperationVisible: true,
- newData: dataSource,
- });
- },
- //点击添加会员项目明细
- addVip() {
- const { dataSource = [] } = this.state
- this.setState({
- vipVisible: true,
- newData: dataSource,
- });
- },
- // 可展开颜色不同
- addRowColor(record) {
- if (!!record.splitList && record.splitList.length > 0) {
- return 'light'
- } else if (!!record.list && record.list.length > 0) {
- return 'light'
- } else {
- return 'dark'
- }
- },
- //点击项目详情
- tableRowClick(record) {
- const { dataSource = [] } = this.state
- this.setState({
- // projectOperationVisible: true,
- editProjectOperationVisible: true,
- dataInfor: record,
- newData: dataSource,
- });
- },
- //签单时间选择
- selTime(e, index) {
- this.setState({
- entryTime: e,
- signDate: e,
- selTime: index,
- });
- },
- //退单操作
- //点击退单
- tuikuan() {
- this.setState({
- lookVisible: true,
- contractUrl: [],
- applicationUrl: [],
- reason: "",
- });
- },
- //关闭退单
- noCancel() {
- this.setState({
- lookVisible: false,
- });
- },
- //点击确认退单
- tuidanOk() {
- let contractUrls = [];
- let applicationUrls = [];
- if (this.state.contractUrl.length) {
- let picArr = [];
- this.state.contractUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- contractUrls = picArr.join(",");
- }
- if (this.state.applicationUrl.length) {
- let picArr = [];
- this.state.applicationUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- applicationUrls = picArr.join(",");
- }
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/addOrderRefund",
- data: {
- orderNo: this.state.orderNo, //订单编号
- contractUrl: contractUrls.length ? contractUrls : "", //终止合同
- applicationUrl: applicationUrls.length ? applicationUrls : "", //退单申请表
- reason: this.state.reason, //退单原因
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("退单成功!");
- this.noCancel();
- this.handleCancelclose();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- //开单选择订单类型骚操作
- orderTypeFn(e) {
- if (e == 0) {
- this.setState({
- bussStats: true,
- orderType: e,
- });
- this.category();
- } else {
- this.setState({
- contractType: undefined,
- bussStats: false,
- orderType: e,
- });
- }
- },
- //品类数据获取
- category() {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/Varieties/getSuperList",
- data: {},
- success: function (data) {
- let thedata = data.data;
- let theArr = [];
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- thedata = {};
- } else {
- thedata.map(function (item, index) {
- theArr.push({
- key: index,
- name: item.cname,
- id: item.id,
- });
- });
- }
- this.setState({
- contractType: undefined,
- categoryArr: theArr,
- });
- }.bind(this),
- });
- },
- //变更申请
- changeApply() {
- if (
- this.state.typeChange == undefined ||
- (this.state.typeChange == "" && this.state.typeChange != 0)
- ) {
- message.warning("请选择变更类型");
- return false;
- }
- if (this.state.totalAmount === "") {
- message.warning("合同金额不能为空!");
- return false;
- }
- if (this.state.firstAmount === "") {
- message.warning("首付款金额不能为空!");
- return false;
- }
- if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
- message.warning("首付款不能大于合同额!");
- return;
- }
- if (
- this.state.typeChange == 0 ||
- this.state.typeChange == 1 ||
- this.state.typeChange == 3 ||
- this.state.typeChange == 8
- ) {
- if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
- message.warning("退款金额大于已收款金额");
- return;
- }
- }
- if (this.state.processStatus != 7 && this.state.processStatus != 8) {
- message.warning("当前订单流程不能发起变更!");
- return false;
- }
- if (this.state.changeAmount === "") {
- message.warning("申请退款金额不能为空!");
- return false;
- }
- if (this.state.remarksC == "") {
- message.warning("请正确填写变更原因");
- return false;
- }
- if (this.state.startRemarks == "") {
- message.warning("请正确填写备注信息");
- return false;
- }
- let theorgCodeUrl = [];
- if (this.state.voucherUrl.length) {
- let picArr = [];
- this.state.voucherUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- theorgCodeUrl = picArr.join(",");
- }
- let newContractUrl = [];
- if (this.state.newContractUrl.length) {
- let cArr = [];
- this.state.newContractUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- cArr.push(item.response.data);
- }
- });
- newContractUrl = cArr.join(",");
- }
- if (this.state.isNew && newContractUrl.length == 0) {
- message.warning("请上传新合同扫描件!");
- return
- }
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
- data: {
- orderNo: this.state.orderNo, //订单编号
- processState: 0,
- status: 0,
- startRemarks: this.state.startRemarks,
- remarks: this.state.remarksC,
- voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
- totalAmount: this.state.totalAmount,
- firstAmount: this.state.firstAmount,
- settlementAmount: this.state.settlementAmount,
- changeAmount: this.state.changeAmount,
- applicant: this.state.salesmanName,
- depName: this.state.depName,
- type: this.state.typeChange,
- contractPictureUrl: this.state.isNew
- ? newContractUrl : undefined,//合同替换件
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("发起变更草稿");
- this.setState(
- {
- isCaoGao: true,
- loading: false,
- },
- () => {
- this.callback("2");
- }
- );
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- // if (this.state.typeChange == 0) {
- // $.ajax({
- // method: "post",
- // dataType: "json",
- // crossDomain: false,
- // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
- // data: {
- // orderNo: this.state.orderNo, //订单编号
- // processState: 1,
- // status: 1,
- // startRemarks: this.state.startRemarks,
- // remarks: this.state.remarksC,
- // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
- // totalAmount: this.state.totalAmount,
- // firstAmount: this.state.firstAmount,
- // settlementAmount: this.state.settlementAmount,
- // changeAmount: this.state.changeAmount,
- // applicant: this.state.salesmanName,
- // depName: this.state.depName,
- // type: this.state.typeChange,
- // contractPictureUrl: this.state.isNew
- // ? newContractUrl : undefined,//合同替换件
- // },
- // }).done(
- // function (data) {
- // this.setState({
- // loading: false,
- // });
- // if (!data.error.length) {
- // message.success("发起变更成功");
- // this.handleCancelclose();
- // } else {
- // message.warning(data.error[0].message);
- // this.setState({
- // loading: false,
- // });
- // }
- // }.bind(this)
- // );
- // } else {
- // $.ajax({
- // method: "post",
- // dataType: "json",
- // crossDomain: false,
- // url: globalConfig.context + "/api/admin/orderChange/addOrderChange",
- // data: {
- // orderNo: this.state.orderNo, //订单编号
- // processState: 0,
- // status: 0,
- // startRemarks: this.state.startRemarks,
- // remarks: this.state.remarksC,
- // voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
- // totalAmount: this.state.totalAmount,
- // firstAmount: this.state.firstAmount,
- // settlementAmount: this.state.settlementAmount,
- // changeAmount: this.state.changeAmount,
- // applicant: this.state.salesmanName,
- // depName: this.state.depName,
- // type: this.state.typeChange,
- // contractPictureUrl: this.state.isNew
- // ? newContractUrl : undefined,//合同替换件
- // },
- // }).done(
- // function (data) {
- // this.setState({
- // loading: false,
- // });
- // if (!data.error.length) {
- // message.success("发起变更草稿");
- // this.setState(
- // {
- // isCaoGao: true,
- // loading: false,
- // },
- // () => {
- // this.callback("2");
- // }
- // );
- // } else {
- // message.warning(data.error[0].message);
- // }
- // }.bind(this)
- // );
- // }
- },
- reset() {
- this.setState({
- startRemarks: "",
- remarksC: "",
- voucherUrl: [],
- newContractUrl: [],
- totalAmount: undefined,
- settlementAmount: undefined,
- changeAmount: "0",
- applicant: undefined,
- depNameChange: undefined,
- typeChange: undefined,
- displayFees: "none",
- officialCost: "",
- costReduction: "",
- });
- },
- componentWillMount() {
- const nextProps = this.props
- this.state.visible = nextProps.showDesc;
- this.state.signBillVisible = nextProps.signBillVisible;
- if (this.state.signBillVisible) {
- this.loaduser(nextProps.uid);
- this.assistList(nextProps.uid);
- this.orderServiceList(nextProps.uid);
- // this.publicByOrder(nextProps.uid);
- }
- if (nextProps.userDetaile && nextProps.showDesc) {
- this.loaduser(nextProps.datauser);
- this.assistList(nextProps.datauser);
- this.orderServiceList(nextProps.datauser);
- // this.publicByOrder(nextProps.datauser);
- this.jiedian(nextProps.datauser.orderNo);
- this.jiedianNew(nextProps.datauser.orderNo);
- this.loadData(nextProps.datauser);
- this.getChangeData(nextProps.datauser);
- } else {
- this.setState({
- orderType: undefined,
- customerName: "",
- autoId: "",
- customerArr: [],
- contractType: undefined,
- bussStats: false,
- userType: undefined,
- channelName: "",
- channelid: "",
- channelArr: [],
- selectSales: undefined,
- });
- }
- },
- // componentWillReceiveProps(nextProps) {
- // //props改变时触发
- // },
- //查看变更记录
- getChangeData(record) {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/orderChangeDetails",
- data: {
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- },
- success: function (data) {
- this.setState({
- loading: false,
- });
- let url = window.location.href.substring(7);
- if (data.data && data.data.length) {
- let thisdata = data.data[data.data.length - 1];
- thisdata.typeChange = thisdata.type;
- thisdata.remarksC = thisdata.remarks;
- thisdata.startRemarks = thisdata.zxsRemarks;
- thisdata.voucherUrl = thisdata.voucherUrl
- ? splitUrl(
- thisdata.voucherUrl,
- ",",
- globalConfig.avatarHost + "/upload",
- url
- )
- : [];
- thisdata.contractPictureUrl = thisdata.contractPictureUrl
- ? splitUrl(
- thisdata.contractPictureUrl,
- ",",
- globalConfig.avatarHost + "/upload",
- url
- )
- : [];
- this.proList(thisdata.id);
- this.cuiList(thisdata.id);
- this.logList(thisdata.id);
- this.setState({
- //判断是否有合同变更记录
- isJilu: true,
- detailChange: thisdata,
- });
- }
- }.bind(this),
- });
- },
- showConfirm(fn, record) {
- confirm({
- title: "确定删除此项目吗?",
- content: (
- <span style={{ color: "red" }}>
- 删除后会将该项目下的所有催款节点自动清除!!!
- </span>
- ),
- onOk() {
- fn(record);
- },
- onCancel() { },
- });
- },
- viewConfirm(fn, record) {
- confirm({
- title: "确定删除此服务记录吗?",
- // content: (
- // <span style={{ color: "red" }}>
- // 删除后会将该项目下的所有催款节点自动清除!!!
- // </span>
- // ),
- onOk() {
- fn(record);
- },
- onCancel() { },
- });
- },
- changeAddPro() {
- // this.getpatentTypeList();
- this.setState({
- changeVisible: true,
- newData: this.state.proDataSource,
- // gid: "",
- // customerArr: [],
- // commodityName: "",
- // commodityQuantity: "",
- // commodityId: "",
- // taskComment: "",
- // main: undefined,
- // commodityPrice: "",
- // displayFees: "none",
- // officialCost: "",
- // costReduction: "",
- });
- },
- changeProSubmit() {
- if (this.state.gid == undefined || !this.state.gid) {
- message.warning("服务名称不匹配!");
- return
- }
- let reg = /^([0]|[1-9][0-9]*)$/;
- if (
- !this.state.commodityQuantity ||
- !reg.test(this.state.commodityQuantity)
- ) {
- message.warning("请输入正确商品数量!");
- return
- }
- if (this.state.displayFees === 'block') {
- if (this.state.patentType === "" && !this.state.patentTransfer) {
- message.warning("请选择专利类型!");
- return
- }
- if (this.state.officialCost === '') {
- message.warning("请选择官费!");
- return
- }
- if (this.state.costReduction === "" && (this.state.patentType === 0 || this.state.patentType === 2) && this.state.officialCost === 1) {
- message.warning("请选择费减!");
- return
- }
- }
- if (isNaN(parseFloat(this.state.commodityPrice))) {
- message.warning("请输入正确的金额!");
- return;
- }
- if (this.state.addProjectType == "3") {// 3审计
- if (this.state.serviceLife.length === 0) {
- message.warning("请选择服务年限!");
- return
- }
- if (this.state.serviceLife.length != this.state.commodityQuantity) {
- message.warning("服务数量与服务年限不符!");
- return
- }
- }
- if (!this.state.main) {
- message.warning("请选择是否为主要项目!");
- return
- }
- if (this.state.addProjectType === 5) {// 5高新
- if (!this.state.declarationBatch) {
- message.warning("请选择企业要求申报批次!");
- return
- }
- if (!this.state.serviceYear) {
- message.warning("请选择申报年份!");
- return
- }
- }
- if (this.state.isVip == 6) {//会员
- if (this.state.yearSum === undefined) {
- message.warning("请选择会员总服务年限!");
- return
- }
- if (this.state.serviceLife.length === 0) {
- message.warning("请添加会员服务年限!");
- return
- }
- if (this.state.serviceLife.length != this.state.yearSum) {
- message.warning("会员服务年限与总年限不符合!");
- return
- }
- if (this.state.serviceYear === undefined) {
- message.warning("请选择本次派单年份!");
- return
- }
- if (this.state.contractTerm.length === 0) {
- message.warning("请填写合同期!");
- return
- }
- }
- this.setState({
- loading: true,
- });
- let type = 0;
- if (this.state.typeChange == 4 || this.state.typeChange == 5) {
- type = 1;
- }
- let infor = {
- commodityId: this.state.gid, //商品ID
- orderNo: this.props.datauser.orderNo, //订单编号
- commodityName: this.state.commodityName, //商品名称
- commodityQuantity: this.state.commodityQuantity, //商品数量
- commodityPrice: this.state.commodityPrice, //签单总价
- taskComment: this.state.taskComment, //服务说明
- main: this.state.main, //是否为主要项目
- cid: this.state.changeId, //变更ID
- type,
- }
- if (this.state.displayFees === 'block') {
- infor.officialCost = this.state.officialCost //是否有官费
- infor.costReduction = (this.state.patentType === 0 || this.state.patentType === 2) ? (this.state.officialCost === 1 ? this.state.costReduction : 0) : 0//是否有费减
- infor.patentType = this.state.patentType //专利类型
- }
- if (this.state.isIso) {
- infor.ifCertificationFee = this.state.ifCertificationFee || undefined;//是否包含认证费用
- }
- if (this.state.addProjectType == "3") {//审计
- infor.serviceLife = JSON.stringify(this.state.serviceLife) //服务年限
- }
- if (this.state.addProjectType == "5") {//高新
- infor.declarationBatch = this.state.declarationBatch || 1//申报批次
- infor.serviceYear = this.state.serviceYear //申报年份
- }
- if (this.state.isVip == 6) {//会员
- infor.yearSum = this.state.yearSum //会员总服务年限
- infor.serviceLife = JSON.stringify(this.state.serviceLife) //会员服务年限
- infor.serviceYear = this.state.serviceYear //本次派单年份
- infor.contractTerm = JSON.stringify(this.state.contractTerm)//合同期
- }
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/addChangeTask",
- data: infor,
- success: function (data) {
- let theArr = [];
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- } else {
- message.success("保存成功");
- this.nextCancel();
- this.proList();
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- changeDeletePro(record) {
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
- data: {
- id: record.id,
- type: 3,
- tid: record.tid,
- splitStatus: record.splitStatus,
- },
- success: function (data) {
- let theArr = [];
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- } else {
- message.success("删除成功");
- this.proList();
- this.cuiList();
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //点击新增变更催款节点
- changeAddCui() {
- this.state.cuiDataSource.push({
- key: this.state.cuiDataSource.length,
- money: "",
- dunSubject: undefined,
- orderNo: this.state.orderNo,
- dunTarget: this.state.kehuId,
- });
- this.setState({
- cuiDataSource: this.state.cuiDataSource,
- cuiFlag: true,
- });
- },
- //删除变更收款节点
- changeDeleteCui(index) {
- if (index.id) {
- this.state.cuiDataSource.splice(index.id, 1);
- this.setState({
- contactListNew: this.state.cuiDataSource,
- cuiFlag: false,
- addFlag: false,
- boFlag: false,
- });
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
- method: "post",
- data: {
- id: index.id,
- type: 3,
- tid: index.tid,
- did: index.did,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("删除成功!");
- this.setState({
- cuiFlag: false,
- });
- this.cuiList();
- this.proList();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- } else {
- this.state.cuiDataSource.splice(index.key, 1);
- this.setState({
- cuiDataSource: this.state.cuiDataSource,
- cuiFlag: false,
- addFlag: false,
- boFlag: false,
- });
- }
- },
- changeSaveCui(record) {
- if (record.dunType == 0) {
- if (!record.customizeTimes) {
- message.warning("请输入自定义时间");
- return;
- } else if (!record.customizeName) {
- message.warning("请输入自定义科目");
- return;
- }
- }
- if (record.boStatus == "false") {
- record.boStatus = false;
- } else if (record.boStatus == "true") {
- record.boStatus = true;
- }
- if (!this.state.yearFlag) {
- if (!record.effectiveCount) {
- message.warning("请选择服务年限");
- return;
- }
- } else {
- record.effectiveCount = "";
- }
- if (isNaN(parseInt(record.money)) && !record.boStatus) {
- message.warning("请填写金额");
- return;
- } else if (isNaN(parseInt(record.money)) && record.boStatus) {
- message.warning("请填写比例");
- return;
- }
- if (record.boStatus) {
- if (
- typeof +record.money == "number" &&
- +record.money >= 0 &&
- +record.money <= 1
- ) {
- record.appropriationRatio = record.money;
- } else {
- message.warning("金额比例填写错误,比例范围0~1");
- return;
- }
- }
- if (!record.dunType && record.dunType != 0) {
- message.warning("请选择对应科目");
- return;
- }
- if (record.dunType != 1) {
- record.waitDay = "";
- }
- this.setState({
- loading: true,
- });
- if (record.boStatus) {
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
- method: "post",
- data: {
- orderNo: record.orderNo,
- ctid: record.ctid,
- projectType: record.sort,
- dunType: record.dunType,
- appropriationRatio: record.appropriationRatio,
- waitDay: record.waitDay,
- effectiveCount: record.effectiveCount,
- cid: this.state.changeId, //变更ID
- customizeTimes:
- record.dunType == 0 ? record.customizeTimes : undefined,
- customizeName:
- record.dunType == 0 ? record.customizeName : undefined,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.setState({
- cuiFlag: false,
- boFlag: false,
- addFlag: false,
- });
- this.cuiList();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- } else {
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/addChangeDun",
- method: "post",
- data: {
- orderNo: record.orderNo,
- ctid: record.ctid,
- projectType: record.sort,
- dunType: record.dunType,
- money: record.money,
- waitDay: record.waitDay,
- effectiveCount: record.effectiveCount,
- cid: this.state.changeId, //变更ID
- customizeTimes:
- record.dunType == 0 ? record.customizeTimes : undefined,
- customizeName:
- record.dunType == 0 ? record.customizeName : undefined,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("保存成功!");
- this.setState({
- cuiFlag: false,
- boFlag: false,
- addFlag: false,
- });
- this.cuiList();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- }
- },
- submitChange() {
- if (
- this.state.typeChange == undefined ||
- (this.state.typeChange == "" && this.state.typeChange != 0)
- ) {
- message.warning("请选择变更类型");
- return false;
- }
- if (this.state.totalAmount === "") {
- message.warning("合同金额不能为空!");
- return false;
- }
- if (this.state.firstAmount === "") {
- message.warning("首付款金额不能为空!");
- return false;
- }
- if (Number(this.state.totalAmount) < Number(this.state.firstAmount)) {
- message.warning("首付款不能大于合同额!");
- return;
- }
- if (
- this.state.typeChange == 0 ||
- this.state.typeChange == 1 ||
- this.state.typeChange == 3 ||
- this.state.typeChange == 8
- ) {
- if (Number(this.state.settlementAmount) < Number(this.state.changeAmount)) {
- message.warning("退款金额大于已收款金额");
- return;
- }
- }
- if (this.state.processStatus != 7 && this.state.processStatus != 8) {
- message.warning("当前订单流程不能发起变更!");
- return false;
- }
- if (this.state.changeAmount === "") {
- message.warning("申请退款金额不能为空!");
- return false;
- }
- if (this.state.remarksC == "") {
- message.warning("请正确填写变更原因");
- return false;
- }
- if (this.state.startRemarks == "") {
- message.warning("请正确填写备注信息");
- return false;
- }
- if (this.state.typeChange == 0) {
- let reg1 = /^1[3456789]\d{9}$/
- let reg2 = /^0\d{2,3}-?\d{7,8}$/
- let reg3 = /[^\u4E00-\u9FA5]/g
- if (!this.state.managerContacts || reg3.test(this.state.managerContacts)) {
- message.warning("请正确填写企业总经理姓名");
- return false;
- }
- if (!this.state.managerContactMobile) {
- message.warning("请正确填写企业总经理联系电话");
- return false;
- }
- if (!reg1.test(this.state.managerContactMobile) && !reg2.test(this.state.managerContactMobile)) {
- message.warning("请正确填写企业总经理联系电话");
- return false;
- }
- if (!this.state.contacts || reg3.test(this.state.contacts)) {
- message.warning("请正确填写企业联系人姓名");
- return false;
- }
- if (!this.state.contactMobile) {
- message.warning("请正确填写企业联系人联系方式");
- return false;
- }
- if (!reg1.test(this.state.contactMobile) && !reg2.test(this.state.contactMobile)) {
- message.warning("请正确填写企业联系人联系方式");
- return false;
- }
- }
- let theorgCodeUrl = [];
- if (this.state.voucherUrl.length) {
- let picArr = [];
- this.state.voucherUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- picArr.push(item.response.data);
- }
- });
- theorgCodeUrl = picArr.join(",");
- }
- let newContractUrl = [];
- if (this.state.newContractUrl.length) {
- let cArr = [];
- this.state.newContractUrl.map(function (item) {
- if (
- item.response &&
- item.response.data &&
- item.response.data.length
- ) {
- cArr.push(item.response.data);
- }
- });
- newContractUrl = cArr.join(",");
- }
- if (this.state.isNew && newContractUrl.length == 0) {
- message.warning("请上传新合同扫描件!");
- return
- }
- this.setState({
- loading: true,
- });
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/updateOrderChange",
- method: "post",
- data: {
- id: this.state.changeId,
- changeType: 0,
- orderNo: this.state.orderNo, //订单编号
- processState: 0,
- startRemarks: this.state.startRemarks,
- remarks: this.state.remarksC,
- voucherUrl: theorgCodeUrl.length ? theorgCodeUrl : "",
- totalAmount: this.state.totalAmount,//合同额
- firstAmount: this.state.firstAmount,//首付款
- settlementAmount: this.state.settlementAmount,
- changeAmount: this.state.changeAmount,
- applicant: this.state.salesmanName,
- depName: this.state.depName,
- type: this.state.typeChange,
- contractPictureUrl: this.state.isNew
- ? newContractUrl : undefined,//合同替换件
- contacts: this.state.typeChange == 0 ? this.state.contacts : undefined,
- contactMobile: this.state.typeChange == 0 ? this.state.contactMobile : undefined,
- managerContacts: this.state.typeChange == 0 ? this.state.managerContacts : undefined,
- managerContactMobile: this.state.typeChange == 0 ? this.state.managerContactMobile : undefined,
- },
- }).done(
- function (data) {
- if (!data.error.length) {
- this.setState({
- loading: false,
- });
- message.success("发起变更成功");
- this.handleCancelclose();
- } else {
- message.warning(data.error[0].message);
- this.setState({
- loading: false,
- });
- }
- }.bind(this)
- );
- },
- editCui(record) {
- this.setState({
- editCuiVisible: true,
- editCuiMoney: record.appropriationRatio
- ? record.appropriationRatio
- : record.money,
- appropriationRatio: record.appropriationRatio,
- editCuiTid: record.tid,
- editCuiDid: record.did,
- editCuiId: record.id,
- });
- },
- editPro(record) {
- this.setState({
- editProVisible: true,
- dataInfor: record,
- newData: this.state.proDataSource,
- });
- // this.setState({
- // editProVisible: true,
- // editSplitStatus: record.splitStatus,
- // editProMoney: record.commodityPrice,
- // editProCommodityQuantity: record.commodityQuantity,
- // editProTid: record.tid,
- // editProId: record.id,
- // });
- },
- submitEditCui(type) {
- if (isNaN(parseFloat(this.state.editCuiMoney))) {
- if (type === 1) {
- message.warn("请输入比例");
- } else {
- message.warn("请输入金额");
- }
- return;
- }
- this.setState({
- loading: true,
- });
- let data = {
- id: this.state.editCuiId,
- type: this.state.editCuiTid ? 2 : 1,
- tid: this.state.editCuiTid,
- };
- if (type === 1) {
- data.appropriationRatio = this.state.editCuiMoney;
- } else {
- data.money = this.state.editCuiMoney;
- }
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
- method: "post",
- data,
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("修改成功!");
- this.cuiList();
- this.proList();
- this.setState({
- editCuiVisible: false,
- });
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- submitEditPro() {
- this.setState({
- loading: true,
- });
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
- method: "post",
- data: {
- id: this.state.editProId,
- type: this.state.editProTid ? 2 : 1,
- commodityPrice: this.state.editProMoney,
- commodityQuantity: this.state.editProCommodityQuantity,
- tid: this.state.editProTid,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("修改成功!");
- this.cuiList();
- this.proList();
- this.setState({
- editProVisible: false,
- });
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- downImg() {
- let num = 0;
- for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
- if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
- num = i;
- }
- }
- if (num == this.state.orgCodeUrl.length - 1) {
- return message.warning("已经是最后一张了哦");
- }
- this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
- this.setState({
- previewImage: this.state.previewImage,
- rotateDeg: 0,
- });
- },
- upImg() {
- let num = 0;
- for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
- if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
- num = i;
- }
- }
- if (num == 0) {
- return message.warning("已经是第一张了哦");
- }
- this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
- this.setState({
- previewImage: this.state.previewImage,
- rotateDeg: 0,
- });
- },
- rotate() {
- let rotateDeg = this.state.rotateDeg + 90;
- this.setState({
- rotateDeg,
- });
- },
- downImgs() {
- let num = 0;
- for (let i = 0; i < this.state.replenishUrl.length; i++) {
- if (this.state.replenishUrl[i].url == this.state.previewImage) {
- num = i;
- }
- }
- if (num == this.state.replenishUrl.length - 1) {
- return message.warning("已经是最后一张了哦");
- }
- this.state.previewImage = this.state.replenishUrl[num + 1].url;
- this.setState({
- previewImage: this.state.previewImage,
- rotateDeg: 0,
- });
- },
- upImgs() {
- let num = 0;
- for (let i = 0; i < this.state.replenishUrl.length; i++) {
- if (this.state.replenishUrl[i].url == this.state.previewImage) {
- num = i;
- }
- }
- if (num == 0) {
- return message.warning("已经是第一张了哦");
- }
- this.state.previewImage = this.state.replenishUrl[num - 1].url;
- this.setState({
- previewImage: this.state.previewImage,
- rotateDeg: 0,
- });
- },
- rotates() {
- let rotateDeg = this.state.rotateDeg + 90;
- this.setState({
- rotateDeg,
- });
- },
- downImgCont() {
- let num = 0;
- for (let i = 0; i < this.state.contentUrl.length; i++) {
- if (this.state.contentUrl[i].url == this.state.previewImage) {
- num = i;
- }
- }
- if (num == this.state.replenishUrl.length - 1) {
- return message.warning("已经是最后一张了哦");
- }
- this.state.previewImage = this.state.contentUrl[num + 1].url;
- this.setState({
- previewImage: this.state.previewImage,
- rotateDeg: 0,
- });
- },
- upImgCont() {
- let num = 0;
- for (let i = 0; i < this.state.contentUrl.length; i++) {
- if (this.state.contentUrl[i].url == this.state.previewImage) {
- num = i;
- }
- }
- if (num == 0) {
- return message.warning("已经是第一张了哦");
- }
- this.state.previewImage = this.state.contentUrl[num - 1].url;
- this.setState({
- previewImage: this.state.previewImage,
- rotateDeg: 0,
- });
- },
- rotateCont() {
- let rotateDeg = this.state.rotateDeg + 90;
- this.setState({
- rotateDeg,
- });
- },
- showConfirmChange(fn, record) {
- confirm({
- title: "确定取消本次变更吗?",
- content: (
- <span style={{ color: "red" }}>取消后本次变更将作废!!!</span>
- ),
- onOk() {
- fn();
- },
- onCancel() { },
- });
- },
- deleteChange() {
- this.setState({
- loading: true,
- });
- $.ajax({
- url: globalConfig.context + "/api/admin/orderChange/cancelOrderChange",
- method: "post",
- data: {
- id: this.state.changeId,
- status: this.state.status,
- processState: this.state.processState,
- orderNo: this.state.orderNo,
- },
- }).done(
- function (data) {
- this.setState({
- loading: false,
- });
- if (!data.error.length) {
- message.success("取消成功!");
- this.handleCancelclose();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this)
- );
- },
- // 新增协单人员
- submitOrder() {
- if (!this.state.coor) {
- message.warning("请选择协单人员");
- return;
- }
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/addAssist",
- data: {
- orderNo: this.state.orderNo,
- aid: this.state.coor,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- loading: false,
- coor: '',
- dataSourceView: [],
- coorVisible: "none",
- });
- this.assistList();
- message.success("添加成功");
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // // 删除协单人员
- // onClosable(id) {
- // $.ajax({
- // method: "post",
- // dataType: "json",
- // crossDomain: false,
- // url: globalConfig.context + "/api/admin/newOrder/deleteAssist",
- // data: {
- // id: id,
- // },
- // success: function (data) {
- // if (!data.error.length) {
- // message.warning(data.error[0].message);
- // } else {
- // message.success("删除成功");
- // }
- // }.bind(this),
- // }).always(
- // function () {
- // this.setState({
- // loading: false,
- // });
- // }.bind(this)
- // );
- // },
- // 新增上门服务数据
- submitView() {
- if (!this.state.dateView) {
- message.warning("请选择上门日期");
- return;
- } else if (!this.state.contentView) {
- message.warning("请填写服务内容");
- return;
- }
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/addOrderService",
- data: {
- orderNo: this.state.orderNo,
- serviceTimes: this.state.dateView,
- content: this.state.contentView,
- remarks: this.state.remarksView,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- loading: false,
- modalView: false,
- viewKey: this.state.viewKey + 1,
- dateView: '',
- contentView: '',
- remarksView: '',
- contentViewLength: 0,
- contentViewLength1: 0,
- });
- message.success("添加成功");
- this.orderServiceList();
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //获取上门人员
- assistList(record) {
- this.state.orderList = [];
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/assistList",
- data: {
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- personnel: data.data,
- });
- // message.success("添加成功");
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 上门服务列表
- orderServiceList(record) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/orderServiceList",
- data: {
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- dataView: data.data,
- });
- // message.success("添加成功");
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 删除上门服务列表
- delectView(record) {
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/newOrder/deleteOrderService",
- data: {
- id: record.id,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- // this.setState({
- // publicView: data.data,
- // });
- this.orderServiceList();
- message.success("删除成功");
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 上门查看
- publicByOrder() {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/release/publicByOrder",
- data: {
- orderNo: this.state.orderNo,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- publicView: data.data,
- });
- // message.success("添加成功");
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- // 获取动态数据名称
- handleSearch(value) {
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/customer/listAdminByName",
- data: {
- adminName: value,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- dataSourceView: data.data,
- });
- // message.success("添加成功");
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- //
- onSelectView(v, o) {
- this.setState({
- coor: v,
- });
- },
- //
- handleClose(removedTag) {
- let serviceLife = this.state.serviceLife.filter(tag => { return tag !== removedTag });
- this.setState({ serviceLife, serviceYear: undefined });
- },
- onSelectChange(selectedRowKeys, selectedRows) {
- this.setState({
- selectedRowKeys,
- selectedRows,
- });
- },
- getRadioList(val, cSort, name) {
- let array = []
- let list = []
- let vlist1 = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20]
- let vlist2 = [20, 19, 18, 17, 16, 15, 14, 13]
- let vlist3 = [15, 14, 13, 12, 11]
- let vlist4 = [10, 9, 8, 7]
- let mlist1 = [19, 18, 17, 16, 15, 14, 13, 12, 11, 10]
- let mlist2 = [12, 11, 10, 9, 8, 7]
- let mlist3 = [10, 9, 8, 7, 6]
- let mlist4 = [6, 5, 4]
- let clist1 = [9, 8, 7, 6, 5, 4, 3, 2, , 1]
- let clist2 = [6, 5, 4, 3, 2, 1]
- let clist3 = [5, 4, 3, 2, 1]
- let clist4 = [3, 2, 1]
- if (cSort == 6) {
- if (name == "zyd" || name == "gtl" || name == "ydhb") {
- list = [
- { value: 1, list: vlist2 },
- { value: 2, list: mlist2 },
- { value: 3, list: clist2 },
- { value: 4, list: [0] }
- ]
- } else if (name == "xyd" || name == "gcxx" || name == "fwtd" || name == "ndhb") {
- list = [
- { value: 1, list: vlist4 },
- { value: 2, list: mlist4 },
- { value: 3, list: clist4 },
- { value: 4, list: [0] }
- ]
- }
- } else {
- if (name == "zyd" || name == "gtl") {
- list = [
- { value: 1, list: vlist1 },
- { value: 2, list: mlist1 },
- { value: 3, list: clist1 },
- { value: 4, list: [0] }
- ]
- } else if (name == "gcxx" || name == "fwtd") {
- list = [
- { value: 1, list: vlist3 },
- { value: 2, list: mlist3 },
- { value: 3, list: clist3 },
- { value: 4, list: [0] }
- ]
- } else if (name == "xyd") {
- list = [
- { value: 1, list: vlist4 },
- { value: 2, list: mlist4 },
- { value: 3, list: clist4 },
- { value: 4, list: [0] }
- ]
- }
- }
- list.map(function (item) {
- if (item.value == val) {
- array = item.list
- }
- })
- return array
- },
- getPaddingLeft(val) {
- let num = 7
- let arr = [
- { value: 1, key: 7 },
- { value: 2, key: 7 },
- { value: 3, key: 7 },
- { value: 4, key: 7 }
- ]
- arr.map(function (item) {
- if (item.value == val) {
- num = item.key
- }
- })
- return num
- },
- getScore(name, cSort, val) {
- let data = ""
- let list = []
- if (cSort == 6) {
- if (name == "zyd" || name == "gtl" || name == "ydhb") {
- list = [
- { title: name == "zyd" ? "很专业" : "很满意", list: [20, 19, 18, 17, 16, 15, 14, 13] },
- { title: name == "zyd" ? "专业" : "满意", list: [12, 11, 10, 9, 8, 7] },
- { title: "一般", list: [6, 5, 4, 3, 2, 1] },
- { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
- ]
- } else if (name == "xyd" || name == "gcxx" || name == "fwtd" || name == "ndhb") {
- list = [
- { title: name == "xyd" ? "很速度" : "很满意", list: [10, 9, 8, 7] },
- { title: name == "xyd" ? "速度" : "满意", list: [6, 5, 4] },
- { title: "一般", list: [3, 2, 1] },
- { title: name == "xyd" ? "很慢" : "不满意", list: [0] },
- ]
- }
- } else {
- if (name == "zyd" || name == "gtl") {
- list = [
- { title: name == "zyd" ? "很专业" : "很满意", list: [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20] },
- { title: name == "zyd" ? "专业" : "满意", list: [19, 18, 17, 16, 15, 14, 13, 12, 11, 10] },
- { title: "一般", list: [9, 8, 7, 6, 5, 4, 3, 2, 1] },
- { title: name == "zyd" ? "不专业" : "不满意", list: [0] },
- ]
- } else if (name == "gcxx" || name == "fwtd") {
- list = [
- { title: "很满意", list: [15, 14, 13, 12, 11] },
- { title: "满意", list: [10, 9, 8, 7, 6] },
- { title: "一般", list: [5, 4, 3, 2, 1] },
- { title: "不满意", list: [0] },
- ]
- } else if (name == "xyd") {
- list = [
- { title: "很速度", list: [10, 9, 8, 7] },
- { title: "速度", list: [6, 5, 4] },
- { title: "一般", list: [3, 2, 1] },
- { title: "很慢", list: [0] },
- ]
- }
- }
- list.map(function (item) {
- if (item.list.includes(val)) {
- data = item.title + "(" + val + "分)"
- }
- })
- return data
- },
- updateByTid() {
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/taskScore/updateByTid",
- data: {
- tid: this.state.tid,
- professionalism: this.state.professionalism,
- communicationSkills: this.state.communicationSkills,
- responsiveness: this.state.responsiveness,
- publicImage: this.state.publicImage,
- serviceAttitude: this.state.serviceAttitude,
- monthlyReport: this.state.cSort == 6 ? this.state.monthlyReport : undefined,
- yearReport: this.state.cSort == 6 ? this.state.yearReport : undefined,
- remarks: this.state.marks,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.error(data.error[0].message);
- } else {
- this.setState({
- score: "",
- cSort: "",
- cname: "",
- tname: "",
- })
- message.success("操作成功");
- this.loadData();
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- queryByTid(value) {
- this.setState({
- loading: true,
- })
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/taskScore/queryByTid",
- data: {
- tid: value,
- },
- success: function (data) {
- if (data.error.length) {
- this.setState({
- loading: false,
- });
- message.warning(data.error[0].message);
- } else {
- this.setState({
- score: "selcet",
- dataScore: data.data,
- });
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- render() {
- const expandedRowRender = (e) => {
- const data = e.list;
- if (e.cSort != 6) {
- let columns = [];
- if (data instanceof Array && data.length) {
- columns = [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <span>
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- </span>
- );
- },
- },
- {
- title: "业务项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record) => {
- return <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span>{"-" + record.id}</span>
- }
- },
- {
- title: "项目类别",
- dataIndex: "cname",
- key: "cname",
- },
- {
- title: "项目数量",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity",
- width: 50,
- },
- {
- title: "金额(万元)",
- dataIndex: "commodityPrice",
- key: "commodityPrice",
- width: 50,
- render: (text, record) => {
- if (record.splitStatus == 2) {
- return "/";
- } else {
- return text;
- }
- },
- },
- {
- title: "主要项目",
- dataIndex: "main",
- key: "main",
- width: 50,
- render: (text) => {
- return text ? "是" : "否";
- },
- },
- {
- title: "项目负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- style={{
- width: 100,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis",
- }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "操作",
- dataIndex: "ABC",
- key: "ABC",
- render: (text, record) => {
- return (
- <div>
- <Button
- onClick={(e) => {
- e.stopPropagation();
- this.showConfirm(this.changeDeletePro, record);
- }}
- disabled={this.state.listFlag}
- style={{
- display: this.state.displayList ? "none" : "block",
- }}
- >
- 删除
- </Button>
- </div>
- );
- },
- },
- ];
- return (
- <Table
- columns={columns}
- scroll={{ x: "max-content", y: 0 }}
- dataSource={data}
- pagination={false}
- onRowDoubleClick={this.state.listFlag ? this.not : this.editPro}
- />
- );
- } else {
- columns = [];
- return (
- <p
- style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
- >
- 此项目暂未拆分
- </p>
- );
- }
- } else {
- let columns = [];
- if (data instanceof Array && data.length) {
- columns = [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <span>
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- </span>
- );
- },
- },
- {
- title: "负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "负责人电话",
- dataIndex: "receiverMobile",
- key: "receiverMobile",
- },
- {
- title: "项目状态",
- dataIndex: "projectStatus",
- key: "projectStatus",
- render: (text) => {
- return getProjectName(text);
- },
- },
- {
- title: "本次派单",
- dataIndex: "serviceYear",
- key: "serviceYear",
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- // style={{
- // width: 100,
- // overflow: "hidden",
- // whiteSpace: "nowrap",
- // textOverflow: "ellipsis",
- // }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- ];
- return (
- <Table
- columns={columns}
- dataSource={data}
- pagination={false}
- />
- );
- } else {
- columns = [];
- return (
- <p
- style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
- >
- 暂无派单
- </p>
- );
- }
- }
- };
- const expandedRowRenderDetail = (e) => {
- const data = e.list;
- let columns = [];
- if (data instanceof Array && data.length) {
- if (e.cSort == 6) {
- columns = [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <span>
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- {/* {record.splitStatus == 1 ? (
- <Tag
- color="#108ee9"
- // onClick={e => {
- // e.stopPropagation();
- // this.showRes(record);
- // }}
- >
- 父项目
- </Tag>
- ) : (
- ""
- )}
- {record.splitStatus == 2 ? (
- <Tag
- color="#108ee9"
- // onClick={e => {
- // e.stopPropagation();
- // this.showRes(record);
- // }}
- >
- 子项目
- </Tag>
- ) : (
- ""
- )} */}
- </span>
- );
- },
- },
- {
- title: "负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "负责人电话",
- dataIndex: "receiverMobile",
- key: "receiverMobile",
- },
- {
- title: "项目状态",
- dataIndex: "projectStatus",
- key: "projectStatus",
- render: (text) => {
- return getProjectName(text);
- },
- },
- {
- title: "本次派单",
- dataIndex: "serviceYear",
- key: "serviceYear",
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- // style={{
- // width: 100,
- // overflow: "hidden",
- // whiteSpace: "nowrap",
- // textOverflow: "ellipsis",
- // }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- ];
- } else {
- columns = [
- {
- title: "变更状态",
- dataIndex: "type",
- key: "type",
- render: (text, record) => {
- let str = "";
- let color = "";
- if (text == 1) {
- str = "增";
- color = "#87d068";
- } else if (text == 2) {
- str = "改";
- color = "#108ee9";
- } else if (text == 3) {
- str = "删";
- color = "#f50";
- }
- return (
- <span>
- <Tag
- color={color}
- style={{ display: text == 0 ? "none" : "inline-block" }}
- >
- {str}
- </Tag>
- {/* {record.splitStatus == 1 ? (
- <Tag
- color="#108ee9"
- // onClick={e => {
- // e.stopPropagation();
- // this.showRes(record);
- // }}
- >
- 父项目
- </Tag>
- ) : (
- ""
- )}
- {record.splitStatus == 2 ? (
- <Tag
- color="#108ee9"
- // onClick={e => {
- // e.stopPropagation();
- // this.showRes(record);
- // }}
- >
- 子项目
- </Tag>
- ) : (
- ""
- )} */}
- </span>
- );
- },
- },
- {
- title: "业务项目名称",
- dataIndex: "commodityName",
- key: "commodityName",
- render: (text, record) => {
- return (
- <span>{text}<span style={{ color: "red" }}>{record.patentTypeName}</span></span>
- )
- }
- },
- {
- title: "项目类别",
- dataIndex: "cname",
- key: "cname",
- },
- {
- title: "项目数量",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity",
- width: 50,
- },
- {
- title: "金额(万元)",
- dataIndex: "commodityPrice",
- key: "commodityPrice",
- width: 50,
- render: (text, record) => {
- if (record.splitStatus == 2) {
- return "/";
- } else {
- return text;
- }
- },
- },
- {
- title: "主要项目",
- dataIndex: "main",
- key: "main",
- width: 50,
- render: (text) => {
- return text ? "是" : "否";
- },
- },
- {
- title: "项目负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- style={{
- width: 100,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis",
- }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- ];
- }
- return (
- <Table
- columns={columns}
- scroll={{ x: "max-content", y: 0 }}
- dataSource={data}
- pagination={false}
- />
- );
- } else {
- columns = [];
- return (
- <p
- style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
- >
- {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
- </p>
- );
- }
- };
- const expandedRowRenderVip = (e) => {
- const data = e.splitList;
- let columns = [];
- if (data instanceof Array && data.length) {
- if (e.cSort == 6) {
- columns = [
- {
- title: "负责人",
- dataIndex: "receiverName",
- key: "receiverName",
- },
- {
- title: "负责人电话",
- dataIndex: "receiverMobile",
- key: "receiverMobile",
- },
- {
- title: "项目状态",
- dataIndex: "projectStatus",
- key: "projectStatus",
- render: (text) => {
- return getProjectName(text);
- },
- },
- {
- title: "本次派单",
- dataIndex: "serviceYear",
- key: "serviceYear",
- },
- {
- title: "项目说明",
- dataIndex: "taskComment",
- key: "taskComment",
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div
- style={{
- width: 100,
- overflow: "hidden",
- whiteSpace: "nowrap",
- textOverflow: "ellipsis",
- }}
- >{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "操作",
- dataIndex: "op",
- key: "op",
- width: 110,
- render: (text, record) => {
- return (
- <div>
- {
- record.scoreStatus == 1 &&
- <Button
- type="primary"
- onClick={(e) => {
- e.stopPropagation();
- this.setState({
- tid: record.id,
- score: "add",
- cSort: 6,
- cname: record.taskName,
- tname: record.receiverName,
- })
- }}
- >
- 待评分
- </Button>
- }
- {
- !!record.scoreNumber &&
- <Button
- type="primary"
- onClick={(e) => {
- e.stopPropagation();
- this.setState({
- cSort: 6,
- cname: record.taskName,
- tname: record.receiverName,
- })
- this.queryByTid(record.id)
- }}
- >
- 已评{record.scoreNumber}分
- </Button>
- }
- </div >
- )
- },
- }
- ];
- } else {
- columns = [
- {
- title: "子项目名称",
- dataIndex: "taskName",
- key: "taskName"
- },
- {
- title: "子项目数量",
- dataIndex: "commodityQuantity",
- key: "commodityQuantity"
- },
- {
- title: "拆分操作人",
- dataIndex: "splitAname",
- key: "splitAname"
- },
- {
- title: "项目负责人",
- dataIndex: "receiverName",
- key: "receiverName"
- },
- {
- title: "拆分时间",
- dataIndex: "splitTimes",
- key: "splitTimes"
- }
- ]
- }
- return (
- <Table
- columns={columns}
- dataSource={data}
- pagination={false}
- />
- );
- } else {
- columns = [];
- return (
- <p
- style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
- >
- {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
- </p>
- );
- }
- };
- const FormItem = Form.Item;
- const { TabPane } = Tabs;
- const { TextArea } = Input;
- const radioStyle = {
- display: 'block',
- height: '30px',
- lineHeight: '30px',
- };
- const formItemLayout = {
- labelCol: { span: 10 },
- wrapperCol: { span: 14 },
- };
- const contractData = this.state.contractData;
- const formItemList = [
- {
- label: "企业联系人",
- content: <span>{this.state.contacts}</span>,
- },
- {
- label: "客户名称",
- content: (
- <span>
- {this.state.userName}
- <EnterpriseNameChange
- type="journal"
- style={{ marginLeft: 10 }}
- enterpriseId={this.state.orderUid}
- />
- </span>
- ),
- },
- {
- label: "联系人电话",
- content: <span>{this.state.contactMobile}</span>,
- },
- {
- label: "企业法人",
- content: <span>{this.state.legalPerson}</span>,
- },
- {
- label: "法人电话",
- content: <span>{this.state.legalPersonTel}</span>,
- },
- // {
- // label: "签单金额(万元)",
- // content: <span>{this.state.totalAmount}</span>
- // },
- // {
- // label: "首付金额(万元)",
- // content: <span>{this.state.firstAmount}</span>
- // },
- // {
- // label: "特批立项",
- // content: <span>{getApprovedState(this.state.approval)}</span>
- // },
- // {
- // label: "合同签订时间",
- // content: <span>{this.state.signDate}</span>
- // },
- // {
- // label: "订单部门",
- // content: <span>{this.state.depName}</span>
- // }
- ];
- let dataSources = this.state.customerArr || [];
- let cdataSources = this.state.channelArr || [];
- const cuiDataList = this.state.contactList || [];
- let departmentArr = this.state.departmentArr || [];
- let options = this.state.states
- ? dataSources.map((group) => (
- <Select.Option key={group.id} value={group.name}>
- {group.name}
- </Select.Option>
- ))
- : dataSources.map((group, index) => (
- <Select.Option key={index} value={group.bname}>
- {group.bname}
- </Select.Option>
- ));
- let channeloptions = cdataSources.map((group) => (
- <Select.Option key={group.id} value={group.name}>
- {group.name}
- </Select.Option>
- ));
- let dataSourceView = this.state.dataSourceView ? this.state.dataSourceView.map((group, index) => (
- <Select.Option key={index} value={group.aid}>
- {group.name}
- </Select.Option>
- )) : '';
- let children = vipYear.map(its => (
- <Option key={its}>{its}</Option>
- ));
- let approvalOptions = [
- { label: '无前期款', value: 1 },
- { label: '暂无合同款', value: 2 },
- { label: '含高风险条款', value: 3 },
- { label: '新产品首单', value: 4 },
- { label: '通过率低于80%', value: 5 },
- { label: '3万以下会员', value: 6 },
- { label: '认证首期5K以下', value: 7 },
- {
- label: <span>
- <span>其他 </span>
- <Input
- type="text"
- style={{ width: 150, borderStyle: "none none solid none" }}
- value={this.state.typeExplain}
- // disabled={this.state.approvaType.indexOf(0) === -1 ? true : false}
- placeholder=""
- onChange={e => {
- this.setState({
- typeExplain: e.target.value
- })
- }}
- />
- </span>
- , value: 0
- },
- ];
- let { closable } = this.state;
- let assistList = this.assistList;
- const { addPop = "" } = this.props
- return (
- <div>
- {this.state.resVisible ? (
- <ResolutionDetail
- cancel={this.resCancel}
- detail={this.state.resRecord}
- visible={this.state.resVisible}
- id={this.state.resRecord.orderNo}
- />
- ) : (
- ""
- )}
- <Modal
- maskClosable={false}
- visible={this.props.addPop == "add" ? this.props.showDesc : this.state.visible}
- onOk={this.handleOk}
- onCancel={this.handleCancelclose}
- width={!this.props.userDetaile ? "600px" : "1200px"}
- title={!this.props.userDetaile ? "创建订单" : ""}
- footer=""
- className="admin-desc-content"
- >
- <Form
- layout="horizontal"
- onSubmit={this.handleSubmit}
- style={{ paddingBottom: "40px" }}
- >
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- {
- addPop == "add" &&
- <div className="clearfix">
- <div className="clearfix">
- <FormItem {...formItemLayout} label="订单类型">
- <Select
- placeholder="请选择订单类型"
- style={{ width: "200px" }}
- value={this.state.orderType}
- onChange={(e) => {
- this.setState({ orderType: e });
- }}
- >
- {orderTypes.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- <span className="mandatory">*</span>
- </FormItem>
- </div>
- <FormItem {...formItemLayout} label="客户所属类型">
- <Select
- placeholder="请选择客户所属类型"
- style={{ width: "200px" }}
- value={this.state.userType}
- onChange={(e) => {
- this.setState({
- userType: e,
- customerArr: [],
- autoId: "",
- customerName: "",
- selectSales: undefined
- });
- }}
- >
- {customerType.map(function (item) {
- return (
- <Select.Option key={item.value}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- <div className="clearfix">
- <FormItem {...formItemLayout} label="客户名称">
- <AutoComplete
- className="certain-category-search"
- dropdownClassName="certain-category-search-dropdown"
- dropdownMatchSelectWidth={false}
- dropdownStyle={{ width: 200 }}
- size="large"
- style={{ width: "200px" }}
- dataSource={options}
- placeholder="输入名称"
- value={this.state.customerName}
- onChange={this.customerChange}
- filterOption={true}
- onSelect={this.selectAutoCUT}
- >
- <Input />
- </AutoComplete>
- <span className="mandatory">*</span>
- </FormItem>
- </div>
- <FormItem {...formItemLayout} label="销售类型">
- <Select
- placeholder="请选择销售类型"
- style={{ width: "200px" }}
- value={this.state.selectSales}
- onChange={(e) => {
- this.setState({
- selectSales: e,
- });
- }}
- >
- {(this.state.userType == "0"
- ? ssalesType : this.state.userType == "1"
- ? qsalesType : this.state.userType == "2"
- ? wsalesType : this.state.userType == "3"
- ? qsalesType : []).map(function (item) {
- return (
- <Select.Option key={item.value} disabled={item.value == "5"}>
- {item.key}
- </Select.Option>
- );
- })}
- </Select>
- <span className="mandatory">*</span>
- </FormItem>
- {
- (this.state.selectSales == "4" || this.state.selectSales == "5") &&
- <FormItem {...formItemLayout} label="描述">
- <TextArea
- placeholder="请填写描述"
- style={{ width: 300, height: 80 }}
- onChange={(e) => {
- this.setState({
- other: e.target.value
- })
- }}
- />
- </FormItem>
- }
- {
- this.state.selectSales == "3" &&
- <div className="clearfix">
- <FormItem {...formItemLayout} label="渠道名称">
- <AutoComplete
- className="certain-category-search"
- dropdownClassName="certain-category-search-dropdown"
- dropdownMatchSelectWidth={false}
- dropdownStyle={{ width: 200 }}
- size="large"
- style={{ width: "200px" }}
- dataSource={channeloptions}
- placeholder="请输入渠道关键字"
- value={this.state.channelName}
- onChange={this.channelChange}
- filterOption={true}
- onSelect={this.goSelect}
- >
- <Input />
- </AutoComplete>
- <span className="mandatory">*</span>
- </FormItem>
- </div>
- }
- <div className="addSave" style={{ marginTop: "30px" }}>
- <Button
- className="cancel"
- type="primary"
- // onClick={this.handleCancel}
- style={{ marginLeft: "220px" }}
- htmlType="submit"
- >
- 开单
- </Button>
- <Button
- className="cancel"
- type="ghost"
- onClick={this.handleCancelclose}
- style={{ marginLeft: "50px" }}
- >
- 取消
- </Button>
- </div>
- </div>
- }
- {
- addPop == "edit" &&
- <Tabs
- onChange={this.callback}
- activeKey={this.state.activeKey}
- tabBarExtraContent={
- <div
- style={{ fontWeight: "bold", paddingRight: "15px" }}
- >
- <OrderItemStatus deleteSign={this.state.deleteSign} />
- </div>
- }
- >
- <TabPane tab={"最新订单"} key="1">
- {
- this.state.activeKey == "1" &&
- <div className="clearfix">
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="合同编号"
- >
- {<span>{this.state.contractNo}</span>}
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="订单编号"
- >
- <span>{this.state.orderNo}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="流程状态"
- >
- <span>
- {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
- </span>
- <FlowChart
- orderNo={this.state.orderNo}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="销售类型"
- >
- <span>
- {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
- (salesList[this.state.updatas.salesType] || "")}
- </span>
- {
- this.state.processStatus === 0 &&
- <UpdateSales
- orderNo={this.state.orderNo}
- updatas={this.state.updatas}
- onRefresh={
- e => {
- let ups = this.state.updatas
- ups.salesType = e.salesType
- if (e.salesType == "3") {
- ups.channelId = e.channelId
- ups.other = e.other
- } else if (e.salesType == "4" || e.salesType == "5") {
- ups.other = e.other
- }
- this.setState({
- updatas: ups,
- userType: ups.userType
- })
- }
- // this.loaduser.bind(this, {orderNo: this.state.orderNo })
- }
- />
- }
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="结算状态"
- >
- <span>
- {getLiquidationStatus(
- this.state.liquidationStatus
- )}
- </span>
- </FormItem>
- {this.state.processStatus === 0 ? (
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="特批立项"
- >
- <Select
- placeholder="请选择客户所属类型"
- style={{ width: "240px" }}
- value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
- }
- onChange={(e) => {
- this.setState({ approval: e });
- }}
- >
- <Select.Option key={0}>非特批</Select.Option>
- <Select.Option key={1}>特批</Select.Option>
- </Select>
- {
- this.state.approval == 1 &&
- <div>
- <CheckboxGroup
- options={approvalOptions}
- value={this.state.approvaType}
- onChange={e => {
- this.setState({
- approvaType: e
- })
- }}
- />
- </div>
- }
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={
- <span>
- <strong style={{ color: "#f00" }}>*</strong>
- 合同签订时间
- </span>
- }
- >
- <DatePicker
- className="signDateRef"
- style={{
- marginTop: "2px",
- // width: "240px",
- height: "27px",
- }}
- showTime
- format="YYYY-MM-DD"
- onOk={() => { }}
- value={
- this.state.signDate
- ? moment(this.state.signDate)
- : null
- }
- onChange={(data, dataString) => {
- this.setState({ signDate: dataString });
- }}
- />
- </FormItem>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="订单部门"
- >
- <Select
- placeholder="请选择订单部门"
- style={{ width: 240 }}
- value={this.state.organizationSearch}
- onChange={(e) => {
- this.setState({ organizationSearch: e });
- }}
- >
- {departmentArr.map(function (item) {
- return (
- <Select.Option key={item.id}>
- {item.name}
- </Select.Option>
- );
- })}
- </Select>
- </FormItem>
- </div>
- </div>
- ) : (
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="特批立项"
- >
- <span>
- {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
- {getApprovedState(this.state.approval)}
- {getApprovedType(this.state.approvaType, this.state.typeExplain, 1)}
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="合同签订时间"
- >
- <span>{this.state.signDate}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="订单部门"
- >
- <span>{this.state.depName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="是否外包"
- >
- <span>
- {this.state.outsource == 0 ? "否" : "是"}
- </span>
- </FormItem>
- </div>
- )}
- </div>
- <h3
- style={{
- marginLeft: 10,
- fontWeight: 800,
- marginBottom: 10,
- }}
- >
- 收款项目
- </h3>
- {this.state.processStatus === 0 ? (
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="签单金额(万元)"
- >
- <Input
- placeholder="签单金额"
- ref="totalAmountRef"
- value={this.state.totalAmount}
- onChange={(e) => {
- this.setState({
- totalAmount: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="首付金额(万元)"
- >
- <Input
- placeholder="请输入实签首款金额"
- ref="firstAmountRef"
- value={this.state.firstAmount}
- onChange={(e) => {
- this.setState({
- firstAmount: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="已收款项"
- >
- <span>
- {this.state.settlementAmount + "万元"}
- </span>
- {/* {this.state.settlementAmount ? (
- <Button
- type="primary"
- onClick={this.tuikuan}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px"
- }}
- >
- 退单
- </Button>
- ) : (
- ""
- )} */}
- </FormItem>
- </div>
- ) : (
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="签单金额(万元)"
- >
- <span>{this.state.totalAmount}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="首付金额(万元)"
- >
- <span>{this.state.firstAmount}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="已收款项"
- >
- <span>
- {this.state.settlementAmount + "万元"}
- </span>
- {/* {this.state.settlementAmount ? (
- <Button
- type="primary"
- onClick={this.tuikuan}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px"
- }}
- >
- 退单
- </Button>
- ) : (
- ""
- )} */}
- </FormItem>
- </div>
- )}
- <h3
- style={{
- marginLeft: 10,
- fontWeight: 800,
- marginBottom: 10,
- }}
- >
- 联系信息
- </h3>
- {this.state.processStatus == 0 ? (
- <div className="clearfix">
- <div className="clearfix">
- <FormItem
- className="half-item"
- style={{ width: "100%" }}
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="客户名称"
- >
- <span>{this.state.userName}</span>
- <EnterpriseNameChange
- type="journal"
- style={{ marginLeft: 10 }}
- enterpriseId={this.state.orderUid}
- />
- </FormItem>
- </div>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={
- <span>
- <strong style={{ color: "#f00" }}>*</strong>
- 企业联系人
- </span>
- }
- >
- <Input
- placeholder="请输入联系人"
- ref="signTotalAmount"
- value={this.state.contacts}
- onChange={(e) => {
- this.setState({ contacts: e.target.value });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={
- <span>
- <strong style={{ color: "#f00" }}>*</strong>
- 联系人电话
- </span>
- }
- >
- <Input
- placeholder="请输入联系人电话"
- ref="signTotalAmount"
- value={this.state.contactMobile}
- onChange={(e) => {
- this.setState({
- contactMobile: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="企业法人"
- >
- <Input
- placeholder="请输入法人"
- ref="signTotalAmount"
- value={this.state.legalPerson}
- onChange={(e) => {
- this.setState({
- legalPerson: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="法人电话"
- >
- <Input
- placeholder="请输入法人电话"
- ref="signTotalAmount"
- value={this.state.legalPersonTel}
- onChange={(e) => {
- this.setState({
- legalPersonTel: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- </div>
- ) : (
- <div className="clearfix">
- {formItemList.map((data, index) => {
- return (
- <FormItem
- className="half-item"
- {...formItemLayout}
- key={index}
- label={data.label}
- >
- {data.content}
- </FormItem>
- );
- })}
- </div>
- )}
- <div className="clearfix">
- {this.state.processStatus == 0 ? (
- <div>
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label={
- <span>
- <strong style={{ color: "#f00" }}>
- *
- </strong>
- 合同扫描件
- </span>
- }
- >
- <PicturesWall
- domId={"addService1"}
- fileList={this.getOrgCodeUrl}
- pictureUrl={this.state.orgCodeUrl}
- url="/api/admin/order/uploadOrderImg"
- orderNo={this.state.orderNo}
- sign="contract"
- deleteApi="/api/admin/order/deleteOrderImg"
- />
- <p>图片建议:要清晰。</p>
- <Button
- style={{
- float: "right",
- marginRight: "140px",
- marginTop: "20px",
- }}
- onClick={this.getOrderLog}
- >
- 查看订单日志
- </Button>
- </FormItem>
- <Gxczx
- isShow={this.state.isShow}
- isCreat={true}
- knowledgeServices={this.state.knowledgeServices}
- auditServices={this.state.auditServices}
- addDeductionServices={this.state.addDeductionServices}
- knowledgeOther={this.state.knowledgeOther}
- auditOther={this.state.auditOther}
- addDeductionOther={this.state.addDeductionOther}
- selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
- selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
- seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
- onSwitch={e => { this.setState({ isShow: e }) }}
- />
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label={<span>补充协议</span>}
- >
- <PicturesWall
- domId={"addService2"}
- fileList={this.getReplenishUrl}
- pictureUrl={this.state.replenishUrl}
- url="/api/admin/order/uploadOrderImg"
- orderNo={this.state.orderNo}
- sign="supplement"
- deleteApi="/api/admin/order/deleteOrderImg"
- />
- <p>图片建议:要清晰。</p>
- </FormItem>
- </div>
- ) : (
- <div>
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="合同扫描件"
- >
- <div
- style={{
- paddingTop: "10px",
- paddingBottom: "10px",
- }}
- >
- {this.state.orgCodeUrl &&
- this.state.visible &&
- this.state.activeKey === "1" ? (
- <ImgList
- domId={"addService3"}
- fileList={this.state.orgCodeUrl}
- ItemWidth={"96px"}
- />
- ) : (
- <div />
- )}
- </div>
- <Button
- style={{
- float: "right",
- marginRight: "140px",
- marginTop: "20px",
- }}
- onClick={this.getOrderLog}
- >
- 查看订单日志
- </Button>
- </FormItem>
- {/* 高新纯咨询合同说明详情 */}
- <Gxczx
- knowledgeServices={this.state.knowledgeServices}
- auditServices={this.state.auditServices}
- addDeductionServices={this.state.addDeductionServices}
- knowledgeOther={this.state.knowledgeOther}
- auditOther={this.state.auditOther}
- addDeductionOther={this.state.addDeductionOther}
- />
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="补充协议"
- >
- <div
- style={{
- paddingTop: "10px",
- paddingBottom: "10px",
- }}
- >
- {this.state.visible &&
- this.state.activeKey === "1" &&
- this.state.replenishUrl ? (
- <ImgList
- domId={"addService4"}
- fileList={this.state.replenishUrl}
- ItemWidth={"96px"}
- />
- ) : (
- <div />
- )}
- </div>
- </FormItem>
- </div>
- )}
- </div>
- {/* 服务内容 */}
- <div class="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label={
- <span>
- <strong style={{ color: "#f00" }}>*</strong>
- 服务内容
- </span>
- }
- >
- <div>
- {this.state.processStatus == 0 ?
- <div>
- <PicturesWall
- domId={"addServiceContent"}
- fileList={this.getContentUrl}
- pictureUrl={this.state.contentUrl}
- url="/api/admin/order/uploadOrderImg"
- orderNo={this.state.orderNo}
- sign="content"
- deleteApi="/api/admin/order/deleteOrderImg"
- />
- <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
- </div> :
- this.state.contentUrl.length > 0 ?
- <div>
- <ImgList
- domId={"addService13"}
- fileList={this.state.contentUrl}
- ItemWidth={"96px"}
- />
- </div> : "暂无附件!"}
- </div>
- </FormItem>
- </div>
- {/* 知识产权情况 */}
- {this.state.processStatus == 0 ?
- <Property
- isCreat={true}
- isProperty={this.state.isProperty}
- setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
- patentStatus={this.state.patentStatus}
- setPatentS={e => { this.setState({ patentStatus: e }) }}
- /> :
- <Property
- patentStatus={this.state.patentStatus}
- />}
- <div className="clearfix">
- {this.state.processStatus == 0 ? (
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 16 }}
- label={
- <span>
- <strong style={{ color: "#f00" }}>*</strong>
- 订单留言
- </span>
- }
- >
- <Input
- ref="orderRemarksRef"
- type="textarea"
- placeholder="请输入订单留言"
- rows={4}
- value={this.state.orderRemarks}
- onChange={(e) => {
- this.setState({
- orderRemarks: e.target.value,
- });
- }}
- style={{ width: "95%" }}
- />
- <div className="mandatory">
- 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
- </div>
- </FormItem>
- </div>
- ) : (
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 16 }}
- label="订单留言"
- >
- <p
- style={{ width: 500, wordWrap: "break-word" }}
- >
- {this.state.orderRemarks}
- </p>
- </FormItem>
- )}
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="订单负责人"
- >
- <span>{this.state.salesmanName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="订单负责人电话"
- >
- <span>{this.state.salesmanMobile}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="当前财务负责人"
- >
- <span>{this.state.nowFinance}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="当前财务负责人电话"
- >
- <span>{this.state.nowFinanceMobile}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- style={{ opacity: ".5" }}
- label="原订单负责人"
- >
- <span>{this.state.oldSalesmanName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- style={{ opacity: ".5" }}
- label="原订单负责人电话"
- >
- <span>{this.state.oldSalesmanMobile}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- style={{ opacity: ".5" }}
- {...formItemLayout}
- label="实际财务操作人"
- >
- <span>{this.state.financeName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- style={{ opacity: ".5" }}
- label="实际财务操作人电话"
- >
- <span>{this.state.financeMobile}</span>
- </FormItem>
- </div>
- {/* 新增协单人员 */}
- <div>
- <div style={{ marginLeft: "50px", display: 'flex' }}>
- <div
- style={{
- minWidth: '66px',
- maxWidth: '100px',
- fontSize: "12px",
- color: "red",
- }}
- >
- 协单人员 :
- </div>
- <div>
- {this.state.personnel.length > 0
- ? this.state.personnel.map(function (value, key) {
- return (
- <Tag
- style={{ marginBottom: '5px' }}
- key={value.id}
- closable={closable}
- onClose={(e) => {
- e.preventDefault();
- confirm({
- title: "确定删除此人员吗?",
- // content: (
- // <span style={{ color: "red" }}>
- // 删除后会将该项目下的所有催款节点自动清除!!!
- // </span>
- // ),
- onOk() {
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:
- globalConfig.context +
- "/api/admin/newOrder/deleteAssist",
- data: {
- id: value.id,
- },
- success: function (data) {
- if (data.error.length) {
- message.warning(
- data.error[0].message
- );
- } else {
- message.success("删除成功");
- assistList();
- }
- }.bind(this),
- }).always(
- function () {
- this.setState({
- loading: false,
- });
- }.bind(this)
- );
- },
- onCancel() { },
- });
- }}
- >
- {value.name}
- </Tag>
- );
- })
- : "无"}
- </div>
- </div>
- <div
- style={{
- margin: "10px 0 0 50px",
- display: this.state.disabledView,
- }}
- >
- <Button
- type="primary"
- onClick={() => {
- this.setState({
- coorVisible: "block",
- coor: "",
- });
- }}
- >
- 添加协单人员
- </Button>
- {/* 提示 */}
- <div style={{ color: "red" }}>
- 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
- </div>
- </div>
- {/*添加协单人员 */}
- <div
- style={{
- margin: "10px 0 0 50px",
- display: this.state.coorVisible,
- }}
- >
- <Form
- onSubmit={this.handleSubmit}
- ref={this.formRef}
- >
- <Form.Item
- {...formItemLayout}
- label=""
- name="coor"
- hasFeedback
- >
- <AutoComplete
- // autocomplete="off"
- allowClear
- dataSource={dataSourceView}
- style={{ width: 200 }}
- onSelect={this.onSelectView}
- onSearch={this.handleSearch}
- placeholder="请输入名称"
- />
- </Form.Item>
- </Form>
- <div style={{ marginLeft: "10px" }}>
- <Button
- type="primary"
- style={{ marginRight: "54px" }}
- onClick={this.submitOrder}
- loading={this.state.loading}
- >
- 保存
- </Button>
- <Button
- onClick={() => {
- this.setState({
- coorVisible: "none",
- });
- }}
- >
- 取消
- </Button>
- </div>
- </div>
- </div>
- {/* 分界线 */}
- <div
- style={{
- borderTop: "1px solid #333",
- margin: "5px 0",
- }}
- ></div>
- {/* 上门服务次数 */}
- <div>
- <div
- style={{
- display: "flex",
- justifyContent: "space-between",
- }}
- >
- <div
- style={{ marginLeft: "50px", fontSize: "20px" }}
- >
- 上门服务次数
- </div>
- <div>
- <Button
- type="primary"
- style={{ marginBottom: 15 }}
- onClick={() => {
- this.publicByOrder();
- this.setState({
- modalRecord: true,
- });
- }}
- >
- 查看上门记录
- </Button>
- <Button
- style={{ marginLeft: 5, display: this.state.disabledView }}
- type="primary"
- onClick={() => {
- this.setState({
- modalView: true,
- dateView: '',
- contentView: '',
- remarksView: '',
- contentViewLength: 0,
- contentViewLength1: 0,
- });
- }}
- >
- 添加上门次数
- </Button>
- </div>
- </div>
- {/* 上门服务表格 */}
- <div
- className="patent-table"
- style={{ marginBottom: 10 }}
- >
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.columnsView}
- scroll={{ x: "max-content", y: 0 }}
- dataSource={this.state.dataView}
- pagination={false}
- // onRowClick={this.tableRowClick}
- bordered
- size="small"
- />
- </Spin>
- </div>
- {/* 查看上门记录 */}
- <Modal
- footer=""
- title="技术人员上门详细记录"
- visible={this.state.modalRecord}
- width="1200px"
- onCancel={() => {
- this.setState({
- modalRecord: false,
- });
- }}
- >
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.columnsRecord}
- scroll={{ x: "max-content", y: 0 }}
- dataSource={this.state.publicView}
- pagination={false}
- // onRowClick={this.tableRowClick}
- bordered
- size="small"
- />
- </Spin>
- </Modal>
- {/* 添加上门次数模态框 */}
- <Modal
- footer=""
- title="新增上门次数"
- visible={this.state.modalView}
- key={this.state.viewKey}
- onCancel={() => {
- this.setState({
- modalView: false,
- viewKey: this.state.viewKey + 1,
- });
- }}
- >
- <Form
- onSubmit={this.handleSubmit}
- ref={this.formRef}
- style={{ marginRight: "120px" }}
- >
- <Form.Item
- {...formItemLayout}
- label="上门时间"
- name="date"
- hasFeedback
- >
- <DatePicker
- placeholder="预计技术员上门服务时间"
- onChange={(date, dateString) => {
- this.setState({
- dateView: dateString,
- });
- }}
- />
- </Form.Item>
- <Form.Item
- {...formItemLayout}
- label="服务内容"
- name="remarks"
- hasFeedback
- style={{ position: 'relative' }}
- >
- <TextArea
- rows={4}
- placeholder="需要技术员上门服务内容"
- onChange={(e) => {
- this.setState({
- contentView: e.target.value,
- }, () => {
- if (!this.state.contentView) {
- this.setState({
- contentViewLength: 0,
- })
- } else {
- this.setState({
- contentViewLength: this.state.contentView.length
- })
- }
- });
- }}
- maxLength={500}
- >
- </TextArea>
- <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
- </Form.Item>
- <Form.Item
- {...formItemLayout}
- label="备注"
- name="remarks"
- hasFeedback
- style={{ position: 'relative' }}
- >
- <TextArea
- rows={4}
- maxLength={500}
- placeholder="需要技术员注意事项"
- onChange={(e) => {
- this.setState({
- remarksView: e.target.value,
- }, () => {
- if (!this.state.remarksView) {
- this.setState({
- contentViewLength1: 0,
- })
- } else {
- this.setState({
- contentViewLength1: this.state.remarksView.length
- })
- }
- });
- }}
- />
- <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
- </Form.Item>
- </Form>
- <div
- style={{
- display: "flex",
- justifyContent: "center",
- }}
- >
- <Button
- onClick={this.submitView}
- type="primary"
- loading={this.state.loading}
- >
- 提交
- </Button>
- <Button
- type="dashed"
- style={{ marginLeft: "15px" }}
- onClick={() => {
- this.setState({
- modalView: false,
- viewKey: this.state.viewKey + 1,
- dateView: '',
- contentView: '',
- remarksView: '',
- contentViewLength: 0,
- contentViewLength1: 0,
- });
- }}
- >
- 取消
- </Button>
- </div>
- </Modal>
- </div>
- <div>
- <span
- style={{ marginLeft: "50px", fontSize: "20px" }}
- >
- 项目业务
- </span>
- {
- // 新需求 除湖南和内蒙古外 不让其他省操作
- (adminData.province == "21" || adminData.province == "11") &&
- <div>
- {
- this.state.processStatus == 0 &&
- <Button
- type="primary"
- onClick={this.addDetailed}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- }}
- >
- 添加项目明细
- </Button>
- }
- {
- this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
- <Button
- type="primary"
- onClick={this.addVip}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- }}
- >
- 添加会员项目
- </Button>
- }
- {
- (this.state.processStatus == 7 || this.state.processStatus == 8) &&
- <Button
- type="primary"
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- }}
- onClick={() => {
- if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
- message.warning("项目变更中,无法发起项目重启");
- return
- }
- this.setState({
- selectVisible: true,
- sType: "restart",
- })
- }}
- >
- 项目重启
- </Button>
- }
- {
- (this.state.processStatus == 7 || this.state.processStatus == 8) &&
- <Button
- type="primary"
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- }}
- onClick={() => {
- if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
- message.warning("项目变更中,无法发起项目暂停");
- return
- }
- this.setState({
- selectVisible: true,
- sType: "suspend",
- })
- }}
- >
- 项目暂停
- </Button>
- }
- </div>
- }
- </div>
- <div
- className="patent-table"
- style={{ marginBottom: 10 }}
- >
- <Spin spinning={this.state.loading}>
- {
- // 项目暂停&重启勾选
- this.state.selectVisible &&
- <SelectList
- type={this.state.sType}
- contractNo={this.state.contractNo}
- orderNo={this.state.orderNo}
- userName={this.state.userName}
- list={this.state.dataSource}
- visible={this.state.selectVisible}
- subClose={() => {
- this.loadData();
- this.setState({
- selectVisible: false,
- })
- }}
- />
- }
- <Table
- rowKey="id"
- columns={this.state.columns}
- dataSource={this.state.dataSource}
- pagination={this.state.pagination}
- expandedRowRender={expandedRowRenderVip}
- rowClassName={this.addRowColor}
- onRowClick={this.tableRowClick}
- bordered
- size="small"
- />
- </Spin>
- </div>
- <div
- style={{
- display: cuiDataList.length ? "block" : "none",
- }}
- >
- <span
- style={{ marginLeft: "50px", fontSize: "20px" }}
- >
- 旧催款节点
- </span>
- <Button
- type="primary"
- // onClick={this.addcontact}
- disabled
- onClick={(e) => {
- cuiDataList.length
- ? this.addcontact()
- : this.addcontactNew();
- }}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- display:
- this.state.processStatus == 0
- ? "block"
- : "none",
- }}
- >
- 添加催款节点
- </Button>
- </div>
- <div
- className="clearfix"
- style={{
- display: cuiDataList.length ? "block" : "none",
- }}
- >
- <Spin spinning={this.state.loading}>
- <Form layout="horizontal">
- <Table
- pagination={false}
- columns={this.state.ContactsLists}
- dataSource={this.state.contactList}
- scroll={{ x: "max-content", y: 0 }}
- bordered
- size="small"
- />
- <Col
- span={24}
- offset={9}
- style={{ marginTop: "15px" }}
- ></Col>
- </Form>
- </Spin>
- </div>
- <div
- style={{
- display: cuiDataList.length ? "none" : "block",
- }}
- >
- <span
- style={{
- marginLeft: "50px",
- fontSize: "20px",
- }}
- >
- 新催款节点
- </span>
- <span
- style={{
- display: "inline-block",
- marginLeft: 10,
- color: "red",
- }}
- >
- 金额总计(万元): {this.state.totalCui}
- </span>
- <Button
- type="primary"
- disabled={this.state.addFlag ? true : false}
- // onClick={this.addcontact}
- onClick={(e) => {
- this.setState({ addFlag: true });
- this.addcontactNew();
- }}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- display:
- this.state.processStatus == 0
- ? "block"
- : "none",
- }}
- >
- 添加催款节点
- </Button>
- </div>
- <div
- className="clearfix"
- style={{
- display: cuiDataList.length ? "none" : "block",
- }}
- >
- <Spin spinning={this.state.loading}>
- <Form layout="horizontal">
- <Table
- pagination={false}
- columns={this.state.ContactsListsNew}
- dataSource={this.state.contactListNew}
- scroll={{ x: "max-content", y: 0 }}
- bordered
- size="small"
- />
- <Col
- span={24}
- offset={9}
- style={{ marginTop: "15px" }}
- ></Col>
- </Form>
- </Spin>
- </div>
- {this.state.processStatus == 0 &&
- <div
- className="addSave"
- style={{
- marginTop: "15px",
- display: "flex",
- justifyContent: "center",
- }}
- >
- <Button
- className="cancel"
- type="primary"
- onClick={this.handleCancels}
- style={{ margin: "0 25px" }}
- htmlType="submit"
- loading={this.state.loading}
- >
- 签单
- </Button>
- <Button
- className="cancel"
- type="primary"
- onClick={this.handleCancelq}
- style={{ margin: "0 25px" }}
- htmlType="submit"
- loading={this.state.loading}
- >
- 保存
- </Button>
- <Popconfirm
- title="请确认您是否作废此订单??"
- onConfirm={(e) => {
- this.examOks()
- }}
- okText="确认"
- cancelText="取消"
- >
- <Button
- className="cancel"
- type="danger"
- // onClick={this.examOks}
- style={{ margin: "0 25px" }}
- loading={this.state.loading}
- >
- 订单作废
- </Button>
- </Popconfirm>
- <Button
- className="cancel"
- type="ghost"
- onClick={this.handleCancelclose}
- style={{ margin: "0 25px" }}
- >
- 取消
- </Button>
- </div>
- }
- </div>
- }
- </TabPane>
- {
- // 新需求 除湖南和内蒙古外 不让其他省操作
- (adminData.province == "21" || adminData.province == "11") &&
- <TabPane tab="合同变更发起" key="2">
- {
- this.state.activeKey == "2" &&
- <div className="contractchange">
- {
- !(this.state.processStatus == 7 || this.state.processStatus == 8) &&
- <div className="cmask">当前状态不能发起合同变更</div>
- }
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="客户名称"
- >
- <span>{this.state.userName}</span>
- <EnterpriseNameChange
- type="journal"
- style={{ marginLeft: 10 }}
- enterpriseId={this.state.orderUid}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="合同编号"
- >
- <span>{this.state.contractNo}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="申请变更部门"
- >
- <span>{this.state.depName}</span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="申请人"
- >
- <span>{this.state.salesmanName}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="变更类型"
- >
- <Select
- placeholder="选择合同变更类型"
- style={{ width: 200 }}
- disabled={this.state.changeFlag}
- value={this.state.typeChange}
- onChange={(e) => {
- this.setState({
- typeChange: e,
- changeFlag: true,
- });
- if (e == 1) {
- this.setState({
- hetongFlag: false,
- listFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- });
- } else if (e == 2) {
- this.setState({
- hetongFlag: true,
- listFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: true,
- displayList: false,
- });
- } else if (e == 3) {
- this.setState({
- listFlag: false,
- hetongFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: true,
- });
- } else if (e == 4) {
- this.setState({
- listFlag: false,
- listCuiFlag: false,
- hetongFlag: false,
- tuiKuanFlag: true,
- displayList: false,
- });
- } else if (e == 5) {
- this.setState({
- listFlag: false,
- listCuiFlag: false,
- hetongFlag: true,
- tuiKuanFlag: true,
- displayList: false,
- });
- } else if (e == 6) {
- this.setState({
- // listFlag: true,
- // listCuiFlag: true,
- // hetongFlag: true,
- // tuiKuanFlag: true,
- // displayList: false,
- listFlag: false,
- listCuiFlag: false,
- hetongFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- });
- } else if (e == 7) {
- this.setState({
- listFlag: true,
- listCuiFlag: true,
- hetongFlag: true,
- tuiKuanFlag: true,
- displayList: false,
- isNew: true, //上传替换合同
- });
- } else {
- this.setState({
- hetongFlag: false,
- listFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- });
- }
- }}
- >
- <Option value={0}>退单退款</Option>
- <Option value={1}>项目及金额变更</Option>
- <Option value={2}>仅项目变更</Option>
- <Option value={3}>仅金额变更</Option>
- <Option value={4}>重报</Option>
- <Option value={5}>赠送</Option>
- <Option value={6}>退单不退款</Option>
- <Option value={7}>仅变更合同</Option>
- <Option value={8}>框架协议(仅已签框架合同适用)</Option>
- </Select>
- <Button
- style={{ marginLeft: 10 }}
- onClick={(e) => {
- this.setState({
- listFlag: false,
- hetongFlag: false,
- listCuiFlag: false,
- tuiKuanFlag: false,
- displayList: false,
- startRemarks: "",
- remarksC: "",
- voucherUrl: [],
- newContractUrl: [],
- isNew: false,
- changeAmount: "0",
- applicant: undefined,
- depNameChange: undefined,
- typeChange: undefined,
- changeFlag: false,
- });
- }}
- >
- 重置
- </Button>
- {(this.state.status === 3 || this.state.status == 0) ? (
- <Button
- type="danger"
- style={{
- float: "right",
- backgroundColor: "red",
- color: "white",
- position: "absolute",
- right: 0,
- height: 50,
- borderRadius: 20,
- zIndex: 100,
- top: 0,
- }}
- onClick={(e) => {
- e.stopPropagation();
- this.showConfirmChange(this.deleteChange);
- }}
- >
- 取消本次变更
- </Button>
- ) : (
- ""
- )}
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="合同额(万元)"
- >
- <Input
- placeholder="请输入合同额"
- disabled={this.state.hetongFlag}
- ref="signTotalAmount"
- value={this.state.totalAmount}
- onChange={(e) => {
- this.setState({
- totalAmount: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="首付款(万元)"
- >
- <Input
- placeholder="请输入首付款"
- disabled={this.state.hetongFlag}
- ref="signTotalAmount"
- value={this.state.firstAmount}
- onChange={(e) => {
- this.setState({
- firstAmount: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="已收款(万元)"
- >
- <span>
- {this.state.settlementAmount}
-
- <span style={{ color: "red" }}>
- (注:已收款与现实收款不符,请与财务专员联系)
- </span>
- </span>
- </FormItem>
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="申请退款(万元)"
- >
- <Input
- placeholder="请输入申请退款"
- ref="signTotalAmount"
- disabled={this.state.tuiKuanFlag}
- value={this.state.changeAmount}
- onChange={(e) => {
- this.setState({
- changeAmount: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- </div>
- {/* 退单退款 */}
- {this.state.isCaoGao && this.state.typeChange == 0 &&
- <div className="clearfix">
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="企业总经理姓名"
- >
- <Input
- placeholder="请输入企业总经理姓名"
- value={this.state.managerContacts}
- onChange={(e) => {
- this.setState({
- managerContacts: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="企业总经理联系电话"
- >
- <Input
- placeholder="请输入企业总经理联系电话"
- value={this.state.managerContactMobile}
- onChange={(e) => {
- this.setState({
- managerContactMobile: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="企业联系人姓名"
- >
- <Input
- placeholder="请输入企业联系人姓名"
- value={this.state.contacts}
- onChange={(e) => {
- this.setState({
- contacts: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="企业联系人联系方式"
- >
- <Input
- placeholder="请输入企业联系人联系方式"
- value={this.state.contactMobile}
- onChange={(e) => {
- this.setState({
- contactMobile: e.target.value,
- });
- }}
- style={{ width: "240px" }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label={<span style={{ color: "red" }}>注</span>}
- >
- <span style={{ color: "red" }}>
- 请填写以上信息,公司总经理将与企业联系交流
- </span>
- </FormItem>
- </div>
- </div>
- }
- <div
- style={{
- display: this.state.isCaoGao ? "block" : "none",
- }}
- >
- <div>
- <span
- style={{
- marginLeft: "50px",
- fontSize: "20px",
- }}
- >
- 项目业务
- </span>
- <span style={{ color: "red" }}>
- (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
- </span>
- <Button
- type="primary"
- onClick={this.changeAddPro}
- disabled={this.state.listFlag}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- display: this.state.displayList
- ? "none"
- : "block",
- }}
- >
- 添加项目明细
- </Button>
- </div>
- <div
- className="patent-table"
- style={{ marginBottom: 10 }}
- >
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.proColumns}
- dataSource={this.state.proDataSource}
- expandedRowRender={expandedRowRender}
- pagination={this.state.pagination}
- rowClassName={this.addRowColor}
- // onRowDoubleClick={
- // this.state.listFlag
- // ? this.not
- // : this.editPro
- // }
- bordered
- size="small"
- />
- </Spin>
- </div>
- <div>
- <span
- style={{
- marginLeft: "50px",
- fontSize: "20px",
- }}
- >
- 催款节点
- </span>
- <span style={{ color: "red" }}>
- (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
- </span>
- <Button
- type="primary"
- onClick={(e) => {
- this.changeAddCui();
- }}
- disabled={this.state.listCuiFlag}
- style={{
- float: "right",
- marginRight: "50px",
- marginBottom: "15px",
- display: this.state.displayList
- ? "none"
- : "block",
- }}
- >
- 添加催款节点
- </Button>
- </div>
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Form layout="horizontal">
- <Table
- pagination={false}
- columns={this.state.changeCuiList}
- dataSource={this.state.cuiDataSource}
- scroll={{ x: "max-content", y: 0 }}
- onRowDoubleClick={
- this.state.listCuiFlag
- ? this.not
- : this.editCui
- }
- bordered
- size="small"
- />
- <Col
- span={24}
- offset={9}
- style={{ marginTop: "15px" }}
- ></Col>
- </Form>
- </Spin>
- </div>
- </div>
- <div className="clearfix">
- <FormItem
- style={{ height: "auto" }}
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="变更原因"
- >
- <TextArea
- rows={4}
- placeholder="请输入变更原因"
- ref="signTotalAmount"
- style={{ width: "95%" }}
- value={this.state.remarksC}
- onChange={(e) => {
- this.setState({
- remarksC: e.target.value,
- });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- style={{ height: "auto" }}
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="备注"
- >
- <TextArea
- rows={4}
- placeholder="请输入备注"
- ref="signTotalAmount"
- style={{ width: "95%" }}
- value={this.state.startRemarks}
- onChange={(e) => {
- this.setState({
- startRemarks: e.target.value,
- });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="变更凭证"
- >
- <PicturesWall
- domId={"addService5"}
- fileList={this.getVoucherUrl}
- pictureUrl={this.state.voucherUrl}
- url="/api/admin/orderChange/uploadFile"
- sign="order_change_file"
- />
- <p>图片建议:要清晰。</p>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="上传替换合同"
- >
- <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
- <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
- </FormItem>
- </div>
- {
- this.state.isNew &&
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="合同扫描件"
- >
- <PicturesWall
- domId={"newcontract"}
- fileList={this.getNewContractUrl}
- pictureUrl={this.state.newContractUrl}
- url="/api/admin/orderChange/uploadFile"
- sign=""
- />
- <p>图片建议:要清晰。</p>
- </FormItem>
- </div>
- }
- <div className="clearfix">
- <Button
- type="primary"
- style={{ float: "right", marginRight: 40 }}
- loading={this.state.loading}
- onClick={(e) => {
- if (this.state.isCaoGao) {
- this.submitChange();
- } else {
- this.changeApply();
- }
- }}
- >
- {/* {this.state.isCaoGao
- ? "发起变更申请"
- : this.state.typeChange == 0
- ? "发起变更申请"
- : "下一步"} */}
- {this.state.isCaoGao ? "发起变更申请" : "下一步"}
- </Button>
- </div>
- </div>
- }
- </TabPane>
- }
- {this.state.isJilu &&
- <TabPane tab={"最近变更记录"} key="3">
- {
- this.state.activeKey == "3" &&
- <div>
- <div
- style={{
- borderRadius: "50%",
- width: 300,
- height: 300,
- position: "absolute",
- top: 230,
- left: 525,
- transform: "rotate(-5deg)",
- zIndex: 1,
- display:
- this.state.detailChange.status == 4
- ? "block"
- : "none",
- }}
- >
- <img src={tongguo} style={{ width: "100%" }} />
- </div>
- <div
- style={{
- borderRadius: "50%",
- width: 300,
- height: 300,
- position: "absolute",
- top: 284,
- left: 586,
- transform: "rotate(-5deg)",
- zIndex: 1,
- display:
- this.state.detailChange.status == 5
- ? "block"
- : "none",
- }}
- >
- <img src={quxiao} style={{ width: "63%" }} />
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="客户名称"
- >
- <span>{this.state.userName}</span>
- <EnterpriseNameChange
- type="journal"
- style={{ marginLeft: 10 }}
- enterpriseId={this.state.orderUid}
- />
- </FormItem>
- {/* */}
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="合同编号"
- >
- <span>{this.state.contractNo}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="时间"
- >
- <span>
- {this.state.detailChange.createTimes}
- </span>
- </FormItem>
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="申请人"
- >
- <span>{this.state.salesmanName}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- className="half-item"
- {...formItemLayout}
- label="当前进度"
- >
- <span>
- {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
- {this.state.detailChange.processState === 3 ||
- this.state.detailChange.processState === 4
- ? shenghePeo(this.state.detailChange.examineName, this.state.detailChange.processState)
- : getProcessStatusNew(
- this.state.detailChange.examineName,
- this.state.detailChange.processState,
- this.state.detailChange.status
- )}
- </span>
- <FlowChart id={this.state.detailChange.id} />
- </FormItem>
- {/* <FormItem
- className="half-item"
- {...formItemLayout}
- label="申请变更部门"
- >
- <span>{this.state.depName}</span>
- </FormItem> */}
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="变更类型"
- >
- <span>
- {getChangeType(
- this.state.detailChange.typeChange
- )}
- </span>
- </FormItem>
- </div>
- {/* <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 18 }}
- label="变更类型"
- >
- <span>
- {getChangeType(
- this.state.detailChange.typeChange
- )}
- </span>
- </FormItem>
- </div> */}
- {this.state.detailChange.typeChange == 0 &&
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="企业总经理姓名"
- >
- <span>
- {this.state.detailChange.managerContacts}
- </span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="企业总经理联系电话"
- >
- <span>
- {this.state.detailChange.managerContactMobile}
- </span>
- </FormItem>
- </div>
- }
- {this.state.detailChange.typeChange == 0 &&
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="企业联系人姓名"
- >
- <span>
- {this.state.detailChange.contacts}
- </span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="企业联系人联系方式"
- >
- <span>
- {this.state.detailChange.contactMobile}
- </span>
- </FormItem>
- </div>
- }
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="合同额(万元)"
- >
- <span>
- {this.state.detailChange.totalAmount}
- </span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="已收款(万元)"
- >
- <span>
- {this.state.detailChange.settlementAmount}
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="欠款(万元)"
- >
- <span>{this.state.detailChange.arrears}</span>
- </FormItem>
- <FormItem
- {...formItemLayout}
- className="half-item"
- label="申请退款(万元)"
- >
- <span>
- {this.state.detailChange.changeAmount}
- </span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- style={{ height: "auto" }}
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="首付款(万元)"
- >
- <span>{this.state.detailChange.firstAmount}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- style={{ height: "auto" }}
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="变更原因"
- >
- <span>{this.state.detailChange.remarksC}</span>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- style={{ height: "auto" }}
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="备注"
- >
- <span>
- {this.state.detailChange.startRemarks}
- </span>
- </FormItem>
- </div>
- {/* ---- */}
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="变更凭证"
- >
- <div>
- <div
- style={{
- paddingTop: "10px",
- }}
- >
- {this.state.detailChange &&
- this.state.detailChange.voucherUrl &&
- this.state.activeKey === "3" &&
- this.state.visible ? (
- <ImgList
- fileList={
- this.state.detailChange.voucherUrl
- }
- ItemWidth={"96px"}
- />
- ) : (
- <div />
- )}
- </div>
- {this.state.status === 3 ? (
- <Button
- type="danger"
- style={{
- float: "right",
- backgroundColor: "red",
- color: "white",
- position: "absolute",
- right: 0,
- height: 50,
- borderRadius: 20,
- zIndex: 100,
- top: 0,
- }}
- onClick={(e) => {
- e.stopPropagation();
- this.showConfirmChange(
- this.deleteChange
- );
- }}
- >
- 取消本次变更
- </Button>
- ) : (
- ""
- )}
- </div>
- </FormItem>
- </div>
- {
- this.state.detailChange.contractPictureUrl.length != 0 &&
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 5 }}
- wrapperCol={{ span: 19 }}
- label="最新合同"
- >
- <div style={{ paddingTop: 10 }}>
- <ImgList
- fileList={
- this.state.detailChange.contractPictureUrl
- }
- ItemWidth={"96px"}
- />
- </div>
- </FormItem>
- </div>
- }
- <ul
- style={{
- width: "868px",
- overflow: "hidden",
- paddingLeft: "90px",
- paddingTop: "10px",
- position: "relative",
- bottom: "20px",
- fontSize: "12px",
- color: "rgba(0, 0, 0, 0.65)",
- }}
- >
- {/* <span>操作人:</span> */}
- {this.state.logData.map((item, index) => {
- if (item.status == 0) {
- item.status = "发起";
- } else if (item.status == 1) {
- item.status = "审核中";
- } else if (item.status == 2) {
- item.status = "通过";
- } else if (item.status == 3) {
- item.status = "驳回";
- } else if (item.status == 4) {
- item.status = "完成";
- } else if (item.status == 5) {
- item.status = "撤销";
- }
- return (
- <li
- key={index}
- style={{
- width: "100%",
- height: "auto",
- wordBreak: "break-all",
- marginBottom: "10px",
- }}
- >
- {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
- </li>
- );
- })}
- </ul>
- {/* 动态展示项目以及催款节点 */}
- <div>
- <div>
- <span
- style={{
- marginLeft: "50px",
- fontSize: "20px",
- }}
- >
- 项目业务
- </span>
- </div>
- <div
- className="patent-table"
- style={{ marginBottom: 10 }}
- >
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.detailColumns}
- dataSource={this.state.proDataSource}
- expandedRowRender={expandedRowRenderDetail}
- pagination={this.state.pagination}
- // onRowClick={this.tableRowClick}
- onRowClick={(record) => {
- this.setState({
- dataInfor: record,
- infoVisible: true
- })
- }}
- rowClassName={this.addRowColor}
- bordered
- size="small"
- />
- </Spin>
- </div>
- <div>
- <span
- style={{
- marginLeft: "50px",
- fontSize: "20px",
- }}
- >
- 催款节点
- </span>
- </div>
- <div className="clearfix">
- <Spin spinning={this.state.loading}>
- <Form layout="horizontal">
- <Table
- pagination={false}
- columns={this.state.detailContactsLists}
- dataSource={this.state.cuiDataSource}
- scroll={{ x: "max-content", y: 0 }}
- bordered
- size="small"
- />
- <Col
- span={24}
- offset={9}
- style={{ marginTop: "15px" }}
- ></Col>
- </Form>
- </Spin>
- </div>
- </div>
- </div>
- }
- </TabPane>
- }
- </Tabs>
- }
- </div>
- </Spin>
- </Form>
- </Modal>
- {
- // 添加变更项目
- this.state.changeVisible &&
- <NewAddProject
- type="change"
- children="list"
- typeChange={this.state.typeChange}
- cid={this.state.changeId}
- readOnly={false}
- orderNo={this.state.orderNo}
- visible={this.state.changeVisible}
- newData={this.state.newData}
- onCancel={() => [this.nextCancel("change")]}
- />
- }
- {
- // 编辑变更项目
- this.state.editProVisible &&
- <NewEditProject
- type="change"
- children="list"
- typeChange={this.state.typeChange}
- cid={this.state.changeId}
- readOnly={false}
- orderNo={this.props.datauser.orderNo}
- visible={this.state.editProVisible}
- dataInfor={this.state.dataInfor}
- newData={this.state.newData}
- onCancel={() => [this.nextCancel("change")]}
- />
- }
- {
- this.state.lookVisible ? (
- <Modal
- maskClosable={false}
- visible={this.state.lookVisible}
- onOk={this.noCancel}
- onCancel={this.noCancel}
- width="800px"
- title={"退单申请"}
- footer=""
- className="admin-desc-content"
- >
- <Form layout="horizontal">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 16 }}
- label="终止合同"
- >
- <Picture
- domId={"addService6"}
- fileList={(e) => {
- this.setState({ contractUrl: e });
- }}
- pictureUrl={this.state.contractUrl}
- visible={this.props.visible}
- data={{
- sign: "order_refund_file",
- url: "/api/admin/newOrder/uploadRefundOrderFile",
- number: 8,
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 16 }}
- label="退单申请表"
- >
- <Picture
- domId={"addService7"}
- fileList={(e) => {
- this.setState({ applicationUrl: e });
- }}
- pictureUrl={this.state.applicationUrl}
- visible={this.props.visible}
- data={{
- sign: "order_refund_file",
- url: "/api/admin/newOrder/uploadRefundOrderFile",
- number: 8,
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 4 }}
- wrapperCol={{ span: 16 }}
- label="退单理由"
- >
- <Input
- type="textarea"
- placeholder="请输入退单理由"
- rows={4}
- value={this.state.reason}
- onChange={(e) => {
- this.setState({ reason: e.target.value });
- }}
- />
- </FormItem>
- </div>
- <div className="clearfix">
- <Button
- className="cancel"
- type="primary"
- onClick={this.tuidanOk}
- style={{ marginLeft: "50px" }}
- htmlType="submit"
- >
- 确定退单
- </Button>
- <Button
- className="cancel"
- type="ghost"
- onClick={this.noCancel}
- style={{ marginLeft: "50px" }}
- >
- 取消
- </Button>
- </div>
- </Spin>
- </Form>
- </Modal>
- ) : (
- <div />
- )
- }
- <Modal
- maskClosable={false}
- title={
- isNaN(parseFloat(this.state.appropriationRatio))
- ? "修改催款节点金额"
- : "修改催款节点比例"
- }
- visible={this.state.editCuiVisible}
- onOk={() => {
- this.submitEditCui(
- isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
- );
- }}
- okText={"保存"}
- width={300}
- onCancel={(e) => {
- this.setState({
- editCuiVisible: false,
- appropriationRatio: "",
- });
- }}
- >
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 14 }}
- label={
- isNaN(parseFloat(this.state.appropriationRatio))
- ? "催款金额"
- : "催款比例"
- }
- >
- <Input
- type="number"
- placeholder={
- isNaN(parseFloat(this.state.appropriationRatio))
- ? "请输入金额"
- : "请输入比例"
- }
- rows={4}
- value={this.state.editCuiMoney}
- onChange={(e) => {
- this.setState({ editCuiMoney: e.target.value });
- }}
- />
- </FormItem>
- </div>
- </Modal>
- <OrderRiZi
- dataSourcerizhi={this.state.dataSourcerizhi}
- closeOrderLog={this.closeOrderLog}
- visible={this.state.rizhivisible}
- loading={this.state.loading}
- />
- {
- // 添加项目
- this.state.projectOperationVisible &&
- <NewAddProject
- readOnly={
- this.state.dataInfor &&
- Object.keys(this.state.dataInfor).length > 0 &&
- this.state.processStatus !== 0
- }
- orderNo={this.props.datauser.orderNo}
- visible={this.state.projectOperationVisible}
- newData={this.state.newData}
- onCancel={this.nextCancel}
- />
- }
- {
- // 编辑项目
- this.state.editProjectOperationVisible &&
- <NewEditProject
- readOnly={
- this.state.dataInfor &&
- Object.keys(this.state.dataInfor).length > 0 &&
- this.state.processStatus !== 0
- }
- orderNo={this.props.datauser.orderNo}
- visible={this.state.editProjectOperationVisible}
- dataInfor={this.state.dataInfor}
- newData={this.state.newData}
- onCancel={this.nextCancel}
- />
- }
- {
- // 会员项目添加
- this.state.vipVisible &&
- <NewAddProject
- type="vipAdd"
- readOnly={
- this.state.dataInfor &&
- Object.keys(this.state.dataInfor).length > 0 &&
- this.state.processStatus !== 0
- }
- orderNo={this.props.datauser.orderNo}
- visible={this.state.vipVisible}
- newData={this.state.newData}
- onCancel={this.nextCancel}
- />
- // <ProjectOperationVip
- // readOnly={
- // this.state.dataInfor &&
- // Object.keys(this.state.dataInfor).length > 0 &&
- // this.state.processStatus !== 0
- // }
- // orderNo={this.props.datauser.orderNo}
- // visible={this.state.vipVisible}
- // dataInfor={this.state.dataInfor}
- // newData={this.state.newData}
- // onCancel={this.nextCancel}
- // />
- }
- {
- // 变更记录详情
- this.state.infoVisible &&
- <NewEditProject
- children="list"
- type="change"
- readOnly={
- this.state.dataInfor &&
- Object.keys(this.state.dataInfor).length > 0 &&
- this.state.processStatus !== 0
- }
- visible={this.state.infoVisible}
- dataInfor={this.state.dataInfor}
- onCancel={() => { this.setState({ infoVisible: false }) }}
- />
- }
- <Modal
- maskClosable={false}
- visible={this.state.score != ""}
- footer=""
- title="项目评分"
- width={this.state.score == "selcet" ? 400 : 740}
- onCancel={() => {
- this.setState({
- score: "",
- tid: "",
- cSort: "",
- cname: "",
- tname: "",
- })
- }}
- >
- {
- this.state.score == "add" &&
- <div>
- <div style={{ marginBottom: 10 }}>项目名称:{this.state.cname}</div>
- <div style={{ marginBottom: 10 }}>项目咨询:{this.state.tname}</div>
- <div>
- <span style={{ width: 50, display: "inline-block" }}>专 业 度</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- zyd: e.target.value,
- zydList: this.getRadioList(e.target.value, this.state.cSort, "zyd"),
- professionalism: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.zyd}>
- {
- [
- { key: "很专业", value: 1, },
- { key: "专业", value: 2, },
- { key: "一般", value: 3, },
- { key: "不专业", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.zyd),
- margin: "5px 0 10px 55px",
- borderBottom: "1px dotted black"
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- professionalism: e.target.value
- })
- }}
- value={this.state.professionalism}>
- {
- !!this.state.zydList && this.state.zydList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block" }}>沟 通 力</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- gtl: e.target.value,
- gtlList: this.getRadioList(e.target.value, this.state.cSort, "gtl"),
- communicationSkills: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.gtl}>
- {
- [
- { key: "很满意", value: 1, },
- { key: "满意", value: 2, },
- { key: "一般", value: 3, },
- { key: "不满意", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.gtl),
- margin: "5px 0 10px 55px",
- borderBottom: "1px dotted black"
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- communicationSkills: e.target.value
- })
- }}
- value={this.state.communicationSkills}>
- {
- !!this.state.gtlList && this.state.gtlList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block" }}>响 应 度</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- xyd: e.target.value,
- yxdList: this.getRadioList(e.target.value, this.state.cSort, "xyd"),
- responsiveness: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.xyd}>
- {
- [
- { key: "很速度", value: 1, },
- { key: "速度", value: 2, },
- { key: "一般", value: 3, },
- { key: "很慢", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.xyd),
- margin: "5px 0 10px 55px",
- borderBottom: "1px dotted black"
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- responsiveness: e.target.value
- })
- }}
- value={this.state.responsiveness}>
- {
- !!this.state.yxdList && this.state.yxdList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block" }}>公出形象</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- gcxx: e.target.value,
- gcxxList: this.getRadioList(e.target.value, this.state.cSort, "gcxx"),
- publicImage: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.gcxx}>
- {
- [
- { key: "很满意", value: 1, },
- { key: "满意", value: 2, },
- { key: "一般", value: 3, },
- { key: "不满意", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.gcxx),
- margin: "5px 0 10px 55px",
- borderBottom: "1px dotted black"
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- publicImage: e.target.value
- })
- }}
- value={this.state.publicImage}>
- {
- !!this.state.gcxxList && this.state.gcxxList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block" }}>服务态度</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- fwtd: e.target.value,
- fwtdList: this.getRadioList(e.target.value, this.state.cSort, "fwtd"),
- serviceAttitude: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.fwtd}>
- {
- [
- { key: "很满意", value: 1, },
- { key: "满意", value: 2, },
- { key: "一般", value: 3, },
- { key: "不满意", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.fwtd),
- margin: "5px 0 10px 55px",
- borderBottom: this.state.cSort == 6 ? "1px dotted black" : 0
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- serviceAttitude: e.target.value
- })
- }}
- value={this.state.serviceAttitude}>
- {
- !!this.state.fwtdList && this.state.fwtdList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- {
- this.state.cSort == 6 &&
- <div>
- <span style={{ width: 50, display: "inline-block" }}>月度汇报</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- ydhb: e.target.value,
- ydhbList: this.getRadioList(e.target.value, this.state.cSort, "ydhb"),
- monthlyReport: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.ydhb}>
- {
- [
- { key: "很满意", value: 1, },
- { key: "满意", value: 2, },
- { key: "一般", value: 3, },
- { key: "不满意", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- }
- {
- this.state.cSort == 6 &&
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.ydhb),
- margin: "5px 0 10px 55px",
- borderBottom: "1px dotted black"
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- monthlyReport: e.target.value
- })
- }}
- value={this.state.monthlyReport}>
- {
- !!this.state.ydhbList && this.state.ydhbList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- }
- {
- this.state.cSort == 6 &&
- <div>
- <span style={{ width: 50, display: "inline-block" }}>年度汇报</span>:
- <RadioGroup
- onChange={e => {
- this.setState({
- ndhb: e.target.value,
- ndhbList: this.getRadioList(e.target.value, this.state.cSort, "ndhb"),
- yearReport: e.target.value == 4 ? 0 : undefined,
- })
- }}
- value={this.state.ndhb}>
- {
- [
- { key: "很满意", value: 1, },
- { key: "满意", value: 2, },
- { key: "一般", value: 3, },
- { key: "不满意", value: 4, },
- ].map(item =>
- <RadioButton style={{ width: 80, textAlign: "center" }} value={item.value} key={item.value}>{item.key}</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- }
- {
- this.state.cSort == 6 &&
- <div
- style={{
- padding: "5px 0 10px 0",
- paddingLeft: this.getPaddingLeft(this.state.ndhb),
- margin: "5px 0 10px 55px",
- }}
- >
- <RadioGroup
- onChange={e => {
- this.setState({
- yearReport: e.target.value
- })
- }}
- value={this.state.yearReport}>
- {
- !!this.state.ndhbList && this.state.ndhbList.map(item =>
- <RadioButton style={{ textAlign: "center" }} value={item} key={item}>{item}分</RadioButton>
- )
- }
- </RadioGroup>
- </div>
- }
- <div style={{ marginBottom: 5, display: "flex", flexDirection: "row" }}>
- <span style={{ width: 50, display: "inline-block" }}>评分理由</span>:
- <TextArea
- style={{ width: 600 }}
- rows={3}
- value={this.state.marks}
- onChange={(e) => {
- this.setState({
- marks: e.target.value,
- })
- }}
- placeholder="请填写本次评分的判断依据,至少10字以上"
- />
- </div>
- <div style={{ marginTop: 10, textAlign: "center" }}>
- <Button
- type="primary"
- onClick={() => {
- if (!this.state.professionalism && this.state.professionalism != 0) {
- message.warning("专业度未打分")
- return
- }
- if (!this.state.communicationSkills && this.state.communicationSkills != 0) {
- message.warning("沟通力未打分")
- return
- }
- if (!this.state.responsiveness && this.state.responsiveness != 0) {
- message.warning("响应度未打分")
- return
- }
- if (!this.state.publicImage && this.state.publicImage != 0) {
- message.warning("公出形象未打分")
- return
- }
- if (!this.state.serviceAttitude && this.state.serviceAttitude != 0) {
- message.warning("服务态度未打分")
- return
- }
- if (this.state.cSort == 6 && !this.state.monthlyReport && this.state.monthlyReport != 0) {
- message.warning("月度汇报未打分")
- return
- }
- if (this.state.cSort == 6 && !this.state.yearReport && this.state.yearReport != 0) {
- message.warning("年度汇报未打分")
- return
- }
- if (this.state.marks.length < 10) {
- message.warning("请填写10字以上的评分依据")
- return
- }
- const _this = this
- confirm({
- title: '您确定提交本次评分吗?',
- content: '',
- onOk() {
- _this.updateByTid()
- },
- });
- }}
- >
- 确定
- </Button>
- </div>
- <div style={{ textAlign: "center", marginBottom: 10, color: "red" }}>注:请公平公正为本项目咨询老师评分!评分后不可修改</div>
- </div>
- }
- {
- this.state.score == "selcet" &&
- <div style={{ position: "relative" }}>
- <div
- style={{
- position: "absolute",
- right: 100,
- top: 50,
- fontSize: "40px",
- color: "red"
- }}
- >{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>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目名称</span>:{this.state.cname}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>项目咨询</span>:{this.state.tname}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>专 业 度</span>:{this.getScore("zyd", this.state.cSort, this.state.dataScore.professionalism)}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>沟 通 力</span>:{this.getScore("gtl", this.state.cSort, this.state.dataScore.communicationSkills)}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>响 应 度</span>:{this.getScore("xyd", this.state.cSort, this.state.dataScore.responsiveness)}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>公出形象</span>:{this.getScore("gcxx", this.state.cSort, this.state.dataScore.publicImage)}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>服务态度</span>:{this.getScore("fwtd", this.state.cSort, this.state.dataScore.serviceAttitude)}
- </div>
- {this.state.cSort == 6 &&
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>月度汇报</span>:{this.getScore("ydhb", this.state.cSort, this.state.dataScore.monthlyReport)}
- </div>}
- {this.state.cSort == 6 &&
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>年度汇报</span>:{this.getScore("ndhb", this.state.cSort, this.state.dataScore.yearReport)}
- </div>}
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分理由</span>:{this.state.dataScore.remarks}
- </div>
- <div>
- <span style={{ width: 50, display: "inline-block", margin: "5px 0" }}>评分时间</span>:{moment(this.state.dataScore.createTime).format('YYYY-MM-DD HH:mm:ss')}
- </div>
- <div style={{ marginTop: 10, textAlign: "center" }}>
- <Button
- type="primary"
- onClick={() => {
- this.setState({
- score: ""
- })
- }}
- >
- 关闭
- </Button>
- </div>
- </div>
- }
- </Modal>
- </div >);
- },
- })
- );
- export default Form.create()(NewService);
|