addService.jsx 296 KB

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