addService.jsx 319 KB

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