addService.jsx 355 KB

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