addService.jsx 321 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710
  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 : this.state.userType == "3"
  5923. ? qsalesType : []).map(function (item) {
  5924. return (
  5925. <Select.Option key={item.value} disabled={item.value == "5"}>
  5926. {item.key}
  5927. </Select.Option>
  5928. );
  5929. })}
  5930. </Select>
  5931. <span className="mandatory">*</span>
  5932. </FormItem>
  5933. {
  5934. (this.state.selectSales == "4" || this.state.selectSales == "5") &&
  5935. <FormItem {...formItemLayout} label="描述">
  5936. <TextArea
  5937. placeholder="请填写描述"
  5938. style={{ width: 300, height: 80 }}
  5939. onChange={(e) => {
  5940. this.setState({
  5941. other: e.target.value
  5942. })
  5943. }}
  5944. />
  5945. </FormItem>
  5946. }
  5947. {
  5948. this.state.selectSales == "3" &&
  5949. <div className="clearfix">
  5950. <FormItem {...formItemLayout} label="渠道名称">
  5951. <AutoComplete
  5952. className="certain-category-search"
  5953. dropdownClassName="certain-category-search-dropdown"
  5954. dropdownMatchSelectWidth={false}
  5955. dropdownStyle={{ width: 200 }}
  5956. size="large"
  5957. style={{ width: "200px" }}
  5958. dataSource={channeloptions}
  5959. placeholder="请输入渠道关键字"
  5960. value={this.state.channelName}
  5961. onChange={this.channelChange}
  5962. filterOption={true}
  5963. onSelect={this.goSelect}
  5964. >
  5965. <Input />
  5966. </AutoComplete>
  5967. <span className="mandatory">*</span>
  5968. </FormItem>
  5969. </div>
  5970. }
  5971. <div className="addSave" style={{ marginTop: "15px" }}>
  5972. <Button
  5973. className="cancel"
  5974. type="primary"
  5975. // onClick={this.handleCancel}
  5976. style={{ marginLeft: "150px" }}
  5977. htmlType="submit"
  5978. >
  5979. 开单
  5980. </Button>
  5981. <Button
  5982. className="cancel"
  5983. type="ghost"
  5984. onClick={this.handleCancelclose}
  5985. style={{ marginLeft: "50px" }}
  5986. >
  5987. 取消
  5988. </Button>
  5989. </div>
  5990. </div>
  5991. }
  5992. {
  5993. addPop == "edit" &&
  5994. <Tabs
  5995. onChange={this.callback}
  5996. activeKey={this.state.activeKey}
  5997. tabBarExtraContent={
  5998. <div
  5999. style={{ fontWeight: "bold", paddingRight: "15px" }}
  6000. >
  6001. <OrderItemStatus deleteSign={this.state.deleteSign} />
  6002. </div>
  6003. }
  6004. >
  6005. <TabPane tab={"最新订单"} key="1">
  6006. {
  6007. this.state.activeKey == "1" &&
  6008. <div className="clearfix">
  6009. <div className="clearfix">
  6010. <FormItem
  6011. className="half-item"
  6012. {...formItemLayout}
  6013. label="合同编号"
  6014. >
  6015. {<span>{this.state.contractNo}</span>}
  6016. </FormItem>
  6017. <FormItem
  6018. className="half-item"
  6019. {...formItemLayout}
  6020. label="订单编号"
  6021. >
  6022. <span>{this.state.orderNo}</span>
  6023. </FormItem>
  6024. <FormItem
  6025. className="half-item"
  6026. {...formItemLayout}
  6027. label="流程状态"
  6028. >
  6029. <span>
  6030. {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)}
  6031. </span>
  6032. <FlowChart
  6033. orderNo={this.state.orderNo}
  6034. />
  6035. </FormItem>
  6036. <FormItem
  6037. className="half-item"
  6038. {...formItemLayout}
  6039. label="销售类型"
  6040. >
  6041. <span>
  6042. {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") +
  6043. (salesList[this.state.updatas.salesType] || "")}
  6044. </span>
  6045. {
  6046. this.state.processStatus === 0 &&
  6047. <UpdateSales
  6048. orderNo={this.state.orderNo}
  6049. updatas={this.state.updatas}
  6050. onRefresh={
  6051. e => {
  6052. let ups = this.state.updatas
  6053. ups.salesType = e.salesType
  6054. if (e.salesType == "3") {
  6055. ups.channelId = e.channelId
  6056. ups.other = e.other
  6057. } else if (e.salesType == "4" || e.salesType == "5") {
  6058. ups.other = e.other
  6059. }
  6060. this.setState({
  6061. updatas: ups,
  6062. userType: ups.userType
  6063. })
  6064. }
  6065. // this.loaduser.bind(this, {orderNo: this.state.orderNo })
  6066. }
  6067. />
  6068. }
  6069. </FormItem>
  6070. <FormItem
  6071. className="half-item"
  6072. {...formItemLayout}
  6073. label="结算状态"
  6074. >
  6075. <span>
  6076. {getLiquidationStatus(
  6077. this.state.liquidationStatus
  6078. )}
  6079. </span>
  6080. </FormItem>
  6081. {this.state.processStatus === 0 ? (
  6082. <div className="clearfix">
  6083. <FormItem
  6084. className="half-item"
  6085. {...formItemLayout}
  6086. label="特批立项"
  6087. >
  6088. <Select
  6089. placeholder="请选择客户所属类型"
  6090. style={{ width: "240px" }}
  6091. value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
  6092. }
  6093. onChange={(e) => {
  6094. this.setState({ approval: e });
  6095. }}
  6096. >
  6097. <Select.Option key={0}>非特批</Select.Option>
  6098. <Select.Option key={1}>特批</Select.Option>
  6099. </Select>
  6100. </FormItem>
  6101. <FormItem
  6102. className="half-item"
  6103. {...formItemLayout}
  6104. label={
  6105. <span>
  6106. <strong style={{ color: "#f00" }}>*</strong>
  6107. 合同签订时间
  6108. </span>
  6109. }
  6110. >
  6111. <DatePicker
  6112. className="signDateRef"
  6113. style={{
  6114. marginTop: "2px",
  6115. // width: "240px",
  6116. height: "27px",
  6117. }}
  6118. showTime
  6119. format="YYYY-MM-DD"
  6120. onOk={() => { }}
  6121. value={
  6122. this.state.signDate
  6123. ? moment(this.state.signDate)
  6124. : null
  6125. }
  6126. onChange={(data, dataString) => {
  6127. this.setState({ signDate: dataString });
  6128. }}
  6129. />
  6130. </FormItem>
  6131. <FormItem
  6132. className="half-item"
  6133. {...formItemLayout}
  6134. label="订单部门"
  6135. >
  6136. <Select
  6137. placeholder="请选择订单部门"
  6138. style={{ width: 240 }}
  6139. value={this.state.organizationSearch}
  6140. onChange={(e) => {
  6141. this.setState({ organizationSearch: e });
  6142. }}
  6143. >
  6144. {departmentArr.map(function (item) {
  6145. return (
  6146. <Select.Option key={item.id}>
  6147. {item.name}
  6148. </Select.Option>
  6149. );
  6150. })}
  6151. </Select>
  6152. </FormItem>
  6153. </div>
  6154. ) : (
  6155. <div className="clearfix">
  6156. <FormItem
  6157. className="half-item"
  6158. {...formItemLayout}
  6159. label="特批立项"
  6160. >
  6161. <span>
  6162. {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
  6163. {getApprovedState(this.state.approval)}
  6164. </span>
  6165. </FormItem>
  6166. <FormItem
  6167. className="half-item"
  6168. {...formItemLayout}
  6169. label="合同签订时间"
  6170. >
  6171. <span>{this.state.signDate}</span>
  6172. </FormItem>
  6173. <FormItem
  6174. className="half-item"
  6175. {...formItemLayout}
  6176. label="订单部门"
  6177. >
  6178. <span>{this.state.depName}</span>
  6179. </FormItem>
  6180. <FormItem
  6181. className="half-item"
  6182. {...formItemLayout}
  6183. label="是否外包"
  6184. >
  6185. <span>
  6186. {this.state.outsource == 0 ? "否" : "是"}
  6187. </span>
  6188. </FormItem>
  6189. </div>
  6190. )}
  6191. </div>
  6192. <h3
  6193. style={{
  6194. marginLeft: 10,
  6195. fontWeight: 800,
  6196. marginBottom: 10,
  6197. }}
  6198. >
  6199. 收款项目
  6200. </h3>
  6201. {this.state.processStatus === 0 ? (
  6202. <div className="clearfix">
  6203. <FormItem
  6204. className="half-item"
  6205. {...formItemLayout}
  6206. label="签单金额(万元)"
  6207. >
  6208. <Input
  6209. placeholder="签单金额"
  6210. ref="totalAmountRef"
  6211. value={this.state.totalAmount}
  6212. onChange={(e) => {
  6213. this.setState({
  6214. totalAmount: e.target.value,
  6215. });
  6216. }}
  6217. style={{ width: "240px" }}
  6218. />
  6219. </FormItem>
  6220. <FormItem
  6221. className="half-item"
  6222. {...formItemLayout}
  6223. label="首付金额(万元)"
  6224. >
  6225. <Input
  6226. placeholder="请输入实签首款金额"
  6227. ref="firstAmountRef"
  6228. value={this.state.firstAmount}
  6229. onChange={(e) => {
  6230. this.setState({
  6231. firstAmount: e.target.value,
  6232. });
  6233. }}
  6234. style={{ width: "240px" }}
  6235. />
  6236. </FormItem>
  6237. <FormItem
  6238. className="half-item"
  6239. {...formItemLayout}
  6240. label="已收款项"
  6241. >
  6242. <span>
  6243. {this.state.settlementAmount + "万元"}
  6244. </span>
  6245. {/* {this.state.settlementAmount ? (
  6246. <Button
  6247. type="primary"
  6248. onClick={this.tuikuan}
  6249. style={{
  6250. float: "right",
  6251. marginRight: "50px",
  6252. marginBottom: "15px"
  6253. }}
  6254. >
  6255. 退单
  6256. </Button>
  6257. ) : (
  6258. ""
  6259. )} */}
  6260. </FormItem>
  6261. </div>
  6262. ) : (
  6263. <div className="clearfix">
  6264. <FormItem
  6265. className="half-item"
  6266. {...formItemLayout}
  6267. label="签单金额(万元)"
  6268. >
  6269. <span>{this.state.totalAmount}</span>
  6270. </FormItem>
  6271. <FormItem
  6272. className="half-item"
  6273. {...formItemLayout}
  6274. label="首付金额(万元)"
  6275. >
  6276. <span>{this.state.firstAmount}</span>
  6277. </FormItem>
  6278. <FormItem
  6279. className="half-item"
  6280. {...formItemLayout}
  6281. label="已收款项"
  6282. >
  6283. <span>
  6284. {this.state.settlementAmount + "万元"}
  6285. </span>
  6286. {/* {this.state.settlementAmount ? (
  6287. <Button
  6288. type="primary"
  6289. onClick={this.tuikuan}
  6290. style={{
  6291. float: "right",
  6292. marginRight: "50px",
  6293. marginBottom: "15px"
  6294. }}
  6295. >
  6296. 退单
  6297. </Button>
  6298. ) : (
  6299. ""
  6300. )} */}
  6301. </FormItem>
  6302. </div>
  6303. )}
  6304. <h3
  6305. style={{
  6306. marginLeft: 10,
  6307. fontWeight: 800,
  6308. marginBottom: 10,
  6309. }}
  6310. >
  6311. 联系信息
  6312. </h3>
  6313. {this.state.processStatus == 0 ? (
  6314. <div className="clearfix">
  6315. <div className="clearfix">
  6316. <FormItem
  6317. className="half-item"
  6318. style={{ width: "100%" }}
  6319. labelCol={{ span: 5 }}
  6320. wrapperCol={{ span: 19 }}
  6321. label="客户名称"
  6322. >
  6323. <span>{this.state.userName}</span>
  6324. <EnterpriseNameChange
  6325. type="journal"
  6326. style={{ marginLeft: 10 }}
  6327. enterpriseId={this.state.orderUid}
  6328. />
  6329. </FormItem>
  6330. </div>
  6331. <FormItem
  6332. className="half-item"
  6333. {...formItemLayout}
  6334. label={
  6335. <span>
  6336. <strong style={{ color: "#f00" }}>*</strong>
  6337. 企业联系人
  6338. </span>
  6339. }
  6340. >
  6341. <Input
  6342. placeholder="请输入联系人"
  6343. ref="signTotalAmount"
  6344. value={this.state.contacts}
  6345. onChange={(e) => {
  6346. this.setState({ contacts: e.target.value });
  6347. }}
  6348. style={{ width: "240px" }}
  6349. />
  6350. </FormItem>
  6351. <FormItem
  6352. className="half-item"
  6353. {...formItemLayout}
  6354. label={
  6355. <span>
  6356. <strong style={{ color: "#f00" }}>*</strong>
  6357. 联系人电话
  6358. </span>
  6359. }
  6360. >
  6361. <Input
  6362. placeholder="请输入联系人电话"
  6363. ref="signTotalAmount"
  6364. value={this.state.contactMobile}
  6365. onChange={(e) => {
  6366. this.setState({
  6367. contactMobile: e.target.value,
  6368. });
  6369. }}
  6370. style={{ width: "240px" }}
  6371. />
  6372. </FormItem>
  6373. <FormItem
  6374. className="half-item"
  6375. {...formItemLayout}
  6376. label="企业法人"
  6377. >
  6378. <Input
  6379. placeholder="请输入法人"
  6380. ref="signTotalAmount"
  6381. value={this.state.legalPerson}
  6382. onChange={(e) => {
  6383. this.setState({
  6384. legalPerson: e.target.value,
  6385. });
  6386. }}
  6387. style={{ width: "240px" }}
  6388. />
  6389. </FormItem>
  6390. <FormItem
  6391. className="half-item"
  6392. {...formItemLayout}
  6393. label="法人电话"
  6394. >
  6395. <Input
  6396. placeholder="请输入法人电话"
  6397. ref="signTotalAmount"
  6398. value={this.state.legalPersonTel}
  6399. onChange={(e) => {
  6400. this.setState({
  6401. legalPersonTel: e.target.value,
  6402. });
  6403. }}
  6404. style={{ width: "240px" }}
  6405. />
  6406. </FormItem>
  6407. </div>
  6408. ) : (
  6409. <div className="clearfix">
  6410. {formItemList.map((data, index) => {
  6411. return (
  6412. <FormItem
  6413. className="half-item"
  6414. {...formItemLayout}
  6415. key={index}
  6416. label={data.label}
  6417. >
  6418. {data.content}
  6419. </FormItem>
  6420. );
  6421. })}
  6422. </div>
  6423. )}
  6424. <div className="clearfix">
  6425. {this.state.processStatus == 0 ? (
  6426. <div>
  6427. <FormItem
  6428. labelCol={{ span: 5 }}
  6429. wrapperCol={{ span: 19 }}
  6430. label={
  6431. <span>
  6432. <strong style={{ color: "#f00" }}>
  6433. *
  6434. </strong>
  6435. 合同扫描件
  6436. </span>
  6437. }
  6438. >
  6439. <PicturesWall
  6440. domId={"addService1"}
  6441. fileList={this.getOrgCodeUrl}
  6442. pictureUrl={this.state.orgCodeUrl}
  6443. url="/api/admin/order/uploadOrderImg"
  6444. orderNo={this.state.orderNo}
  6445. sign="contract"
  6446. deleteApi="/api/admin/order/deleteOrderImg"
  6447. />
  6448. <p>图片建议:要清晰。</p>
  6449. <Button
  6450. style={{
  6451. float: "right",
  6452. marginRight: "140px",
  6453. marginTop: "20px",
  6454. }}
  6455. onClick={this.getOrderLog}
  6456. >
  6457. 查看订单日志
  6458. </Button>
  6459. </FormItem>
  6460. <Gxczx
  6461. isShow={this.state.isShow}
  6462. isCreat={true}
  6463. knowledgeServices={this.state.knowledgeServices}
  6464. auditServices={this.state.auditServices}
  6465. addDeductionServices={this.state.addDeductionServices}
  6466. knowledgeOther={this.state.knowledgeOther}
  6467. auditOther={this.state.auditOther}
  6468. addDeductionOther={this.state.addDeductionOther}
  6469. selknowledge={e => { this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }}
  6470. selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }}
  6471. seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }}
  6472. onSwitch={e => { this.setState({ isShow: e }) }}
  6473. />
  6474. <FormItem
  6475. labelCol={{ span: 5 }}
  6476. wrapperCol={{ span: 19 }}
  6477. label={<span>补充协议</span>}
  6478. >
  6479. <PicturesWall
  6480. domId={"addService2"}
  6481. fileList={this.getReplenishUrl}
  6482. pictureUrl={this.state.replenishUrl}
  6483. url="/api/admin/order/uploadOrderImg"
  6484. orderNo={this.state.orderNo}
  6485. sign="supplement"
  6486. deleteApi="/api/admin/order/deleteOrderImg"
  6487. />
  6488. <p>图片建议:要清晰。</p>
  6489. </FormItem>
  6490. </div>
  6491. ) : (
  6492. <div>
  6493. <FormItem
  6494. labelCol={{ span: 5 }}
  6495. wrapperCol={{ span: 19 }}
  6496. label="合同扫描件"
  6497. >
  6498. <div
  6499. style={{
  6500. paddingTop: "10px",
  6501. paddingBottom: "10px",
  6502. }}
  6503. >
  6504. {this.state.orgCodeUrl &&
  6505. this.state.visible &&
  6506. this.state.activeKey === "1" ? (
  6507. <ImgList
  6508. domId={"addService3"}
  6509. fileList={this.state.orgCodeUrl}
  6510. ItemWidth={"96px"}
  6511. />
  6512. ) : (
  6513. <div />
  6514. )}
  6515. </div>
  6516. <Button
  6517. style={{
  6518. float: "right",
  6519. marginRight: "140px",
  6520. marginTop: "20px",
  6521. }}
  6522. onClick={this.getOrderLog}
  6523. >
  6524. 查看订单日志
  6525. </Button>
  6526. </FormItem>
  6527. {/* 高新纯咨询合同说明详情 */}
  6528. <Gxczx
  6529. knowledgeServices={this.state.knowledgeServices}
  6530. auditServices={this.state.auditServices}
  6531. addDeductionServices={this.state.addDeductionServices}
  6532. knowledgeOther={this.state.knowledgeOther}
  6533. auditOther={this.state.auditOther}
  6534. addDeductionOther={this.state.addDeductionOther}
  6535. />
  6536. <FormItem
  6537. labelCol={{ span: 5 }}
  6538. wrapperCol={{ span: 19 }}
  6539. label="补充协议"
  6540. >
  6541. <div
  6542. style={{
  6543. paddingTop: "10px",
  6544. paddingBottom: "10px",
  6545. }}
  6546. >
  6547. {this.state.visible &&
  6548. this.state.activeKey === "1" &&
  6549. this.state.replenishUrl ? (
  6550. <ImgList
  6551. domId={"addService4"}
  6552. fileList={this.state.replenishUrl}
  6553. ItemWidth={"96px"}
  6554. />
  6555. ) : (
  6556. <div />
  6557. )}
  6558. </div>
  6559. </FormItem>
  6560. </div>
  6561. )}
  6562. </div>
  6563. {/* 服务内容 */}
  6564. <div class="clearfix">
  6565. <FormItem
  6566. labelCol={{ span: 5 }}
  6567. wrapperCol={{ span: 19 }}
  6568. label={
  6569. <span>
  6570. <strong style={{ color: "#f00" }}>*</strong>
  6571. 服务内容
  6572. </span>
  6573. }
  6574. >
  6575. <div>
  6576. {this.state.processStatus == 0 ?
  6577. <div>
  6578. <PicturesWall
  6579. domId={"addServiceContent"}
  6580. fileList={this.getContentUrl}
  6581. pictureUrl={this.state.contentUrl}
  6582. url="/api/admin/order/uploadOrderImg"
  6583. orderNo={this.state.orderNo}
  6584. sign="content"
  6585. deleteApi="/api/admin/order/deleteOrderImg"
  6586. />
  6587. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p>
  6588. </div> :
  6589. this.state.contentUrl.length > 0 ?
  6590. <div>
  6591. <ImgList
  6592. domId={"addService13"}
  6593. fileList={this.state.contentUrl}
  6594. ItemWidth={"96px"}
  6595. />
  6596. </div> : "暂无附件!"}
  6597. </div>
  6598. </FormItem>
  6599. </div>
  6600. {/* 知识产权情况 */}
  6601. {this.state.processStatus == 0 ?
  6602. <Property
  6603. isCreat={true}
  6604. isProperty={this.state.isProperty}
  6605. setProperty={e => { this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }}
  6606. patentStatus={this.state.patentStatus}
  6607. setPatentS={e => { this.setState({ patentStatus: e }) }}
  6608. /> :
  6609. <Property
  6610. patentStatus={this.state.patentStatus}
  6611. />}
  6612. <div className="clearfix">
  6613. {this.state.processStatus == 0 ? (
  6614. <div className="clearfix">
  6615. <FormItem
  6616. labelCol={{ span: 5 }}
  6617. wrapperCol={{ span: 16 }}
  6618. label={
  6619. <span>
  6620. <strong style={{ color: "#f00" }}>*</strong>
  6621. 订单留言
  6622. </span>
  6623. }
  6624. >
  6625. <Input
  6626. ref="orderRemarksRef"
  6627. type="textarea"
  6628. placeholder="请输入订单留言"
  6629. rows={4}
  6630. value={this.state.orderRemarks}
  6631. onChange={(e) => {
  6632. this.setState({
  6633. orderRemarks: e.target.value,
  6634. });
  6635. }}
  6636. style={{ width: "95%" }}
  6637. />
  6638. <div className="mandatory">
  6639. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  6640. </div>
  6641. </FormItem>
  6642. </div>
  6643. ) : (
  6644. <FormItem
  6645. labelCol={{ span: 4 }}
  6646. wrapperCol={{ span: 16 }}
  6647. label="订单留言"
  6648. >
  6649. <p
  6650. style={{ width: 500, wordWrap: "break-word" }}
  6651. >
  6652. {this.state.orderRemarks}
  6653. </p>
  6654. </FormItem>
  6655. )}
  6656. </div>
  6657. <div className="clearfix">
  6658. <FormItem
  6659. className="half-item"
  6660. {...formItemLayout}
  6661. label="订单负责人"
  6662. >
  6663. <span>{this.state.salesmanName}</span>
  6664. </FormItem>
  6665. <FormItem
  6666. className="half-item"
  6667. {...formItemLayout}
  6668. label="订单负责人电话"
  6669. >
  6670. <span>{this.state.salesmanMobile}</span>
  6671. </FormItem>
  6672. </div>
  6673. <div className="clearfix">
  6674. <FormItem
  6675. className="half-item"
  6676. {...formItemLayout}
  6677. label="当前财务负责人"
  6678. >
  6679. <span>{this.state.nowFinance}</span>
  6680. </FormItem>
  6681. <FormItem
  6682. className="half-item"
  6683. {...formItemLayout}
  6684. label="当前财务负责人电话"
  6685. >
  6686. <span>{this.state.nowFinanceMobile}</span>
  6687. </FormItem>
  6688. </div>
  6689. <div className="clearfix">
  6690. <FormItem
  6691. className="half-item"
  6692. {...formItemLayout}
  6693. style={{ opacity: ".5" }}
  6694. label="原订单负责人"
  6695. >
  6696. <span>{this.state.oldSalesmanName}</span>
  6697. </FormItem>
  6698. <FormItem
  6699. className="half-item"
  6700. {...formItemLayout}
  6701. style={{ opacity: ".5" }}
  6702. label="原订单负责人电话"
  6703. >
  6704. <span>{this.state.oldSalesmanMobile}</span>
  6705. </FormItem>
  6706. </div>
  6707. <div className="clearfix">
  6708. <FormItem
  6709. className="half-item"
  6710. style={{ opacity: ".5" }}
  6711. {...formItemLayout}
  6712. label="实际财务操作人"
  6713. >
  6714. <span>{this.state.financeName}</span>
  6715. </FormItem>
  6716. <FormItem
  6717. className="half-item"
  6718. {...formItemLayout}
  6719. style={{ opacity: ".5" }}
  6720. label="实际财务操作人电话"
  6721. >
  6722. <span>{this.state.financeMobile}</span>
  6723. </FormItem>
  6724. </div>
  6725. {/* 新增协单人员 */}
  6726. <div>
  6727. <div style={{ marginLeft: "50px", display: 'flex' }}>
  6728. <div
  6729. style={{
  6730. minWidth: '66px',
  6731. maxWidth: '100px',
  6732. fontSize: "12px",
  6733. color: "red",
  6734. }}
  6735. >
  6736. 协单人员 :
  6737. </div>
  6738. <div>
  6739. {this.state.personnel.length > 0
  6740. ? this.state.personnel.map(function (value, key) {
  6741. return (
  6742. <Tag
  6743. style={{ marginBottom: '5px' }}
  6744. key={value.id}
  6745. closable={closable}
  6746. onClose={(e) => {
  6747. e.preventDefault();
  6748. confirm({
  6749. title: "确定删除此人员吗?",
  6750. // content: (
  6751. // <span style={{ color: "red" }}>
  6752. // 删除后会将该项目下的所有催款节点自动清除!!!
  6753. // </span>
  6754. // ),
  6755. onOk() {
  6756. $.ajax({
  6757. method: "post",
  6758. dataType: "json",
  6759. crossDomain: false,
  6760. url:
  6761. globalConfig.context +
  6762. "/api/admin/newOrder/deleteAssist",
  6763. data: {
  6764. id: value.id,
  6765. },
  6766. success: function (data) {
  6767. if (data.error.length) {
  6768. message.warning(
  6769. data.error[0].message
  6770. );
  6771. } else {
  6772. message.success("删除成功");
  6773. assistList();
  6774. }
  6775. }.bind(this),
  6776. }).always(
  6777. function () {
  6778. this.setState({
  6779. loading: false,
  6780. });
  6781. }.bind(this)
  6782. );
  6783. },
  6784. onCancel() { },
  6785. });
  6786. }}
  6787. >
  6788. {value.name}
  6789. </Tag>
  6790. );
  6791. })
  6792. : "无"}
  6793. </div>
  6794. </div>
  6795. <div
  6796. style={{
  6797. margin: "10px 0 0 50px",
  6798. display: this.state.disabledView,
  6799. }}
  6800. >
  6801. <Button
  6802. type="primary"
  6803. onClick={() => {
  6804. this.setState({
  6805. coorVisible: "block",
  6806. coor: "",
  6807. });
  6808. }}
  6809. >
  6810. 添加协单人员
  6811. </Button>
  6812. {/* 提示 */}
  6813. <div style={{ color: "red" }}>
  6814. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  6815. </div>
  6816. </div>
  6817. {/*添加协单人员 */}
  6818. <div
  6819. style={{
  6820. margin: "10px 0 0 50px",
  6821. display: this.state.coorVisible,
  6822. }}
  6823. >
  6824. <Form
  6825. onSubmit={this.handleSubmit}
  6826. ref={this.formRef}
  6827. >
  6828. <Form.Item
  6829. {...formItemLayout}
  6830. label=""
  6831. name="coor"
  6832. hasFeedback
  6833. >
  6834. <AutoComplete
  6835. // autocomplete="off"
  6836. allowClear
  6837. dataSource={dataSourceView}
  6838. style={{ width: 200 }}
  6839. onSelect={this.onSelectView}
  6840. onSearch={this.handleSearch}
  6841. placeholder="请输入名称"
  6842. />
  6843. </Form.Item>
  6844. </Form>
  6845. <div style={{ marginLeft: "10px" }}>
  6846. <Button
  6847. type="primary"
  6848. style={{ marginRight: "54px" }}
  6849. onClick={this.submitOrder}
  6850. loading={this.state.loading}
  6851. >
  6852. 保存
  6853. </Button>
  6854. <Button
  6855. onClick={() => {
  6856. this.setState({
  6857. coorVisible: "none",
  6858. });
  6859. }}
  6860. >
  6861. 取消
  6862. </Button>
  6863. </div>
  6864. </div>
  6865. </div>
  6866. {/* 分界线 */}
  6867. <div
  6868. style={{
  6869. borderTop: "1px solid #333",
  6870. margin: "5px 0",
  6871. }}
  6872. ></div>
  6873. {/* 上门服务次数 */}
  6874. <div>
  6875. <div
  6876. style={{
  6877. display: "flex",
  6878. justifyContent: "space-between",
  6879. }}
  6880. >
  6881. <div
  6882. style={{ marginLeft: "50px", fontSize: "20px" }}
  6883. >
  6884. 上门服务次数
  6885. </div>
  6886. <div>
  6887. <Button
  6888. type="primary"
  6889. style={{ marginBottom: 15 }}
  6890. onClick={() => {
  6891. this.publicByOrder();
  6892. this.setState({
  6893. modalRecord: true,
  6894. });
  6895. }}
  6896. >
  6897. 查看上门记录
  6898. </Button>
  6899. <Button
  6900. style={{ marginLeft: 5, display: this.state.disabledView }}
  6901. type="primary"
  6902. onClick={() => {
  6903. this.setState({
  6904. modalView: true,
  6905. dateView: '',
  6906. contentView: '',
  6907. remarksView: '',
  6908. contentViewLength: 0,
  6909. contentViewLength1: 0,
  6910. });
  6911. }}
  6912. >
  6913. 添加上门次数
  6914. </Button>
  6915. </div>
  6916. </div>
  6917. {/* 上门服务表格 */}
  6918. <div
  6919. className="patent-table"
  6920. style={{ marginBottom: 10 }}
  6921. >
  6922. <Spin spinning={this.state.loading}>
  6923. <Table
  6924. columns={this.state.columnsView}
  6925. scroll={{ x: "max-content", y: 0 }}
  6926. dataSource={this.state.dataView}
  6927. pagination={false}
  6928. // onRowClick={this.tableRowClick}
  6929. bordered
  6930. size="small"
  6931. />
  6932. </Spin>
  6933. </div>
  6934. {/* 查看上门记录 */}
  6935. <Modal
  6936. footer=""
  6937. title="技术人员上门详细记录"
  6938. visible={this.state.modalRecord}
  6939. width="1200px"
  6940. onCancel={() => {
  6941. this.setState({
  6942. modalRecord: false,
  6943. });
  6944. }}
  6945. >
  6946. <Spin spinning={this.state.loading}>
  6947. <Table
  6948. columns={this.state.columnsRecord}
  6949. scroll={{ x: "max-content", y: 0 }}
  6950. dataSource={this.state.publicView}
  6951. pagination={false}
  6952. // onRowClick={this.tableRowClick}
  6953. bordered
  6954. size="small"
  6955. />
  6956. </Spin>
  6957. </Modal>
  6958. {/* 添加上门次数模态框 */}
  6959. <Modal
  6960. footer=""
  6961. title="新增上门次数"
  6962. visible={this.state.modalView}
  6963. key={this.state.viewKey}
  6964. onCancel={() => {
  6965. this.setState({
  6966. modalView: false,
  6967. viewKey: this.state.viewKey + 1,
  6968. });
  6969. }}
  6970. >
  6971. <Form
  6972. onSubmit={this.handleSubmit}
  6973. ref={this.formRef}
  6974. style={{ marginRight: "120px" }}
  6975. >
  6976. <Form.Item
  6977. {...formItemLayout}
  6978. label="上门时间"
  6979. name="date"
  6980. hasFeedback
  6981. >
  6982. <DatePicker
  6983. placeholder="预计技术员上门服务时间"
  6984. onChange={(date, dateString) => {
  6985. this.setState({
  6986. dateView: dateString,
  6987. });
  6988. }}
  6989. />
  6990. </Form.Item>
  6991. <Form.Item
  6992. {...formItemLayout}
  6993. label="服务内容"
  6994. name="remarks"
  6995. hasFeedback
  6996. style={{ position: 'relative' }}
  6997. >
  6998. <TextArea
  6999. rows={4}
  7000. placeholder="需要技术员上门服务内容"
  7001. onChange={(e) => {
  7002. this.setState({
  7003. contentView: e.target.value,
  7004. }, () => {
  7005. if (!this.state.contentView) {
  7006. this.setState({
  7007. contentViewLength: 0,
  7008. })
  7009. } else {
  7010. this.setState({
  7011. contentViewLength: this.state.contentView.length
  7012. })
  7013. }
  7014. });
  7015. }}
  7016. maxLength={500}
  7017. >
  7018. </TextArea>
  7019. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  7020. </Form.Item>
  7021. <Form.Item
  7022. {...formItemLayout}
  7023. label="备注"
  7024. name="remarks"
  7025. hasFeedback
  7026. style={{ position: 'relative' }}
  7027. >
  7028. <TextArea
  7029. rows={4}
  7030. maxLength={500}
  7031. placeholder="需要技术员注意事项"
  7032. onChange={(e) => {
  7033. this.setState({
  7034. remarksView: e.target.value,
  7035. }, () => {
  7036. if (!this.state.remarksView) {
  7037. this.setState({
  7038. contentViewLength1: 0,
  7039. })
  7040. } else {
  7041. this.setState({
  7042. contentViewLength1: this.state.remarksView.length
  7043. })
  7044. }
  7045. });
  7046. }}
  7047. />
  7048. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  7049. </Form.Item>
  7050. </Form>
  7051. <div
  7052. style={{
  7053. display: "flex",
  7054. justifyContent: "center",
  7055. }}
  7056. >
  7057. <Button
  7058. onClick={this.submitView}
  7059. type="primary"
  7060. loading={this.state.loading}
  7061. >
  7062. 提交
  7063. </Button>
  7064. <Button
  7065. type="dashed"
  7066. style={{ marginLeft: "15px" }}
  7067. onClick={() => {
  7068. this.setState({
  7069. modalView: false,
  7070. viewKey: this.state.viewKey + 1,
  7071. dateView: '',
  7072. contentView: '',
  7073. remarksView: '',
  7074. contentViewLength: 0,
  7075. contentViewLength1: 0,
  7076. });
  7077. }}
  7078. >
  7079. 取消
  7080. </Button>
  7081. </div>
  7082. </Modal>
  7083. </div>
  7084. <div>
  7085. <span
  7086. style={{ marginLeft: "50px", fontSize: "20px" }}
  7087. >
  7088. 项目业务
  7089. </span>
  7090. {
  7091. // 新需求 除湖南和内蒙古外 不让其他省操作
  7092. (adminData.province == "21" || adminData.province == "11") &&
  7093. <div>
  7094. {
  7095. this.state.processStatus == 0 &&
  7096. <Button
  7097. type="primary"
  7098. onClick={this.addDetailed}
  7099. style={{
  7100. float: "right",
  7101. marginRight: "50px",
  7102. marginBottom: "15px",
  7103. }}
  7104. >
  7105. 添加项目明细
  7106. </Button>
  7107. }
  7108. {
  7109. this.props.datauser.projectType == 1 && this.state.processStatus > 1 &&
  7110. <Button
  7111. type="primary"
  7112. onClick={this.addVip}
  7113. style={{
  7114. float: "right",
  7115. marginRight: "50px",
  7116. marginBottom: "15px",
  7117. }}
  7118. >
  7119. 添加会员项目
  7120. </Button>
  7121. }
  7122. {
  7123. (this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7124. <Button
  7125. type="primary"
  7126. style={{
  7127. float: "right",
  7128. marginRight: "50px",
  7129. marginBottom: "15px",
  7130. }}
  7131. onClick={() => {
  7132. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7133. message.warning("项目变更中,无法发起项目重启");
  7134. return
  7135. }
  7136. this.setState({
  7137. selectVisible: true,
  7138. sType: "restart",
  7139. })
  7140. }}
  7141. >
  7142. 项目重启
  7143. </Button>
  7144. }
  7145. {
  7146. (this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7147. <Button
  7148. type="primary"
  7149. style={{
  7150. float: "right",
  7151. marginRight: "50px",
  7152. marginBottom: "15px",
  7153. }}
  7154. onClick={() => {
  7155. if (this.state.deleteSign == 2 || this.state.deleteSign == 3) {
  7156. message.warning("项目变更中,无法发起项目暂停");
  7157. return
  7158. }
  7159. this.setState({
  7160. selectVisible: true,
  7161. sType: "suspend",
  7162. })
  7163. }}
  7164. >
  7165. 项目暂停
  7166. </Button>
  7167. }
  7168. </div>
  7169. }
  7170. </div>
  7171. <div
  7172. className="patent-table"
  7173. style={{ marginBottom: 10 }}
  7174. >
  7175. <Spin spinning={this.state.loading}>
  7176. {
  7177. // 项目暂停&重启勾选
  7178. this.state.selectVisible &&
  7179. <SelectList
  7180. type={this.state.sType}
  7181. contractNo={this.state.contractNo}
  7182. orderNo={this.state.orderNo}
  7183. userName={this.state.userName}
  7184. list={this.state.dataSource}
  7185. visible={this.state.selectVisible}
  7186. subClose={() => {
  7187. this.loadData();
  7188. this.setState({
  7189. selectVisible: false,
  7190. })
  7191. }}
  7192. />
  7193. }
  7194. <Table
  7195. rowKey="id"
  7196. columns={this.state.columns}
  7197. dataSource={this.state.dataSource}
  7198. pagination={this.state.pagination}
  7199. expandedRowRender={expandedRowRenderVip}
  7200. rowClassName={this.addRowColor}
  7201. onRowClick={this.tableRowClick}
  7202. bordered
  7203. size="small"
  7204. />
  7205. </Spin>
  7206. </div>
  7207. <div
  7208. style={{
  7209. display: cuiDataList.length ? "block" : "none",
  7210. }}
  7211. >
  7212. <span
  7213. style={{ marginLeft: "50px", fontSize: "20px" }}
  7214. >
  7215. 旧催款节点
  7216. </span>
  7217. <Button
  7218. type="primary"
  7219. // onClick={this.addcontact}
  7220. disabled
  7221. onClick={(e) => {
  7222. cuiDataList.length
  7223. ? this.addcontact()
  7224. : this.addcontactNew();
  7225. }}
  7226. style={{
  7227. float: "right",
  7228. marginRight: "50px",
  7229. marginBottom: "15px",
  7230. display:
  7231. this.state.processStatus == 0
  7232. ? "block"
  7233. : "none",
  7234. }}
  7235. >
  7236. 添加催款节点
  7237. </Button>
  7238. </div>
  7239. <div
  7240. className="clearfix"
  7241. style={{
  7242. display: cuiDataList.length ? "block" : "none",
  7243. }}
  7244. >
  7245. <Spin spinning={this.state.loading}>
  7246. <Form layout="horizontal">
  7247. <Table
  7248. pagination={false}
  7249. columns={this.state.ContactsLists}
  7250. dataSource={this.state.contactList}
  7251. scroll={{ x: "max-content", y: 0 }}
  7252. bordered
  7253. size="small"
  7254. />
  7255. <Col
  7256. span={24}
  7257. offset={9}
  7258. style={{ marginTop: "15px" }}
  7259. ></Col>
  7260. </Form>
  7261. </Spin>
  7262. </div>
  7263. <div
  7264. style={{
  7265. display: cuiDataList.length ? "none" : "block",
  7266. }}
  7267. >
  7268. <span
  7269. style={{
  7270. marginLeft: "50px",
  7271. fontSize: "20px",
  7272. }}
  7273. >
  7274. 新催款节点
  7275. </span>
  7276. <span
  7277. style={{
  7278. display: "inline-block",
  7279. marginLeft: 10,
  7280. color: "red",
  7281. }}
  7282. >
  7283. 金额总计(万元): {this.state.totalCui}
  7284. </span>
  7285. <Button
  7286. type="primary"
  7287. disabled={this.state.addFlag ? true : false}
  7288. // onClick={this.addcontact}
  7289. onClick={(e) => {
  7290. this.setState({ addFlag: true });
  7291. this.addcontactNew();
  7292. }}
  7293. style={{
  7294. float: "right",
  7295. marginRight: "50px",
  7296. marginBottom: "15px",
  7297. display:
  7298. this.state.processStatus == 0
  7299. ? "block"
  7300. : "none",
  7301. }}
  7302. >
  7303. 添加催款节点
  7304. </Button>
  7305. </div>
  7306. <div
  7307. className="clearfix"
  7308. style={{
  7309. display: cuiDataList.length ? "none" : "block",
  7310. }}
  7311. >
  7312. <Spin spinning={this.state.loading}>
  7313. <Form layout="horizontal">
  7314. <Table
  7315. pagination={false}
  7316. columns={this.state.ContactsListsNew}
  7317. dataSource={this.state.contactListNew}
  7318. scroll={{ x: "max-content", y: 0 }}
  7319. bordered
  7320. size="small"
  7321. />
  7322. <Col
  7323. span={24}
  7324. offset={9}
  7325. style={{ marginTop: "15px" }}
  7326. ></Col>
  7327. </Form>
  7328. </Spin>
  7329. </div>
  7330. {this.state.processStatus == 0 &&
  7331. <div
  7332. className="addSave"
  7333. style={{
  7334. marginTop: "15px",
  7335. display: "flex",
  7336. justifyContent: "center",
  7337. }}
  7338. >
  7339. <Button
  7340. className="cancel"
  7341. type="primary"
  7342. onClick={this.handleCancels}
  7343. style={{ margin: "0 25px" }}
  7344. htmlType="submit"
  7345. loading={this.state.loading}
  7346. >
  7347. 签单
  7348. </Button>
  7349. <Button
  7350. className="cancel"
  7351. type="primary"
  7352. onClick={this.handleCancelq}
  7353. style={{ margin: "0 25px" }}
  7354. htmlType="submit"
  7355. loading={this.state.loading}
  7356. >
  7357. 保存
  7358. </Button>
  7359. <Popconfirm
  7360. title="请确认您是否作废此订单??"
  7361. onConfirm={(e) => {
  7362. this.examOks()
  7363. }}
  7364. okText="确认"
  7365. cancelText="取消"
  7366. >
  7367. <Button
  7368. className="cancel"
  7369. type="danger"
  7370. // onClick={this.examOks}
  7371. style={{ margin: "0 25px" }}
  7372. loading={this.state.loading}
  7373. >
  7374. 订单作废
  7375. </Button>
  7376. </Popconfirm>
  7377. <Button
  7378. className="cancel"
  7379. type="ghost"
  7380. onClick={this.handleCancelclose}
  7381. style={{ margin: "0 25px" }}
  7382. >
  7383. 取消
  7384. </Button>
  7385. </div>
  7386. }
  7387. </div>
  7388. }
  7389. </TabPane>
  7390. {
  7391. // 新需求 除湖南和内蒙古外 不让其他省操作
  7392. (adminData.province == "21" || adminData.province == "11") &&
  7393. <TabPane tab="合同变更发起" key="2">
  7394. {
  7395. this.state.activeKey == "2" &&
  7396. <div className="contractchange">
  7397. {
  7398. !(this.state.processStatus == 6 || this.state.processStatus == 7) &&
  7399. <div className="cmask">当前状态不能发起合同变更</div>
  7400. }
  7401. <div className="clearfix">
  7402. <FormItem
  7403. className="half-item"
  7404. {...formItemLayout}
  7405. label="客户名称"
  7406. >
  7407. <span>{this.state.userName}</span>
  7408. <EnterpriseNameChange
  7409. type="journal"
  7410. style={{ marginLeft: 10 }}
  7411. enterpriseId={this.state.orderUid}
  7412. />
  7413. </FormItem>
  7414. </div>
  7415. <div className="clearfix">
  7416. <FormItem
  7417. className="half-item"
  7418. {...formItemLayout}
  7419. label="合同编号"
  7420. >
  7421. <span>{this.state.contractNo}</span>
  7422. </FormItem>
  7423. </div>
  7424. <div className="clearfix">
  7425. <FormItem
  7426. className="half-item"
  7427. {...formItemLayout}
  7428. label="申请变更部门"
  7429. >
  7430. <span>{this.state.depName}</span>
  7431. </FormItem>
  7432. <FormItem
  7433. className="half-item"
  7434. {...formItemLayout}
  7435. label="申请人"
  7436. >
  7437. <span>{this.state.salesmanName}</span>
  7438. </FormItem>
  7439. </div>
  7440. <div className="clearfix">
  7441. <FormItem
  7442. labelCol={{ span: 5 }}
  7443. wrapperCol={{ span: 19 }}
  7444. label="变更类型"
  7445. >
  7446. <Select
  7447. placeholder="选择合同变更类型"
  7448. style={{ width: 200 }}
  7449. disabled={this.state.changeFlag}
  7450. value={this.state.typeChange}
  7451. onChange={(e) => {
  7452. this.setState({
  7453. typeChange: e,
  7454. changeFlag: true,
  7455. });
  7456. if (e == 1) {
  7457. this.setState({
  7458. hetongFlag: false,
  7459. listFlag: false,
  7460. listCuiFlag: false,
  7461. tuiKuanFlag: false,
  7462. displayList: false,
  7463. });
  7464. } else if (e == 2) {
  7465. this.setState({
  7466. hetongFlag: true,
  7467. listFlag: false,
  7468. listCuiFlag: false,
  7469. tuiKuanFlag: true,
  7470. displayList: false,
  7471. });
  7472. } else if (e == 3) {
  7473. this.setState({
  7474. listFlag: false,
  7475. hetongFlag: false,
  7476. listCuiFlag: false,
  7477. tuiKuanFlag: false,
  7478. displayList: true,
  7479. });
  7480. } else if (e == 4) {
  7481. this.setState({
  7482. listFlag: false,
  7483. listCuiFlag: false,
  7484. hetongFlag: false,
  7485. tuiKuanFlag: true,
  7486. displayList: false,
  7487. });
  7488. } else if (e == 5) {
  7489. this.setState({
  7490. listFlag: false,
  7491. listCuiFlag: false,
  7492. hetongFlag: true,
  7493. tuiKuanFlag: true,
  7494. displayList: false,
  7495. });
  7496. } else if (e == 6) {
  7497. this.setState({
  7498. // listFlag: true,
  7499. // listCuiFlag: true,
  7500. // hetongFlag: true,
  7501. // tuiKuanFlag: true,
  7502. // displayList: false,
  7503. listFlag: false,
  7504. listCuiFlag: false,
  7505. hetongFlag: false,
  7506. tuiKuanFlag: false,
  7507. displayList: false,
  7508. });
  7509. } else if (e == 7) {
  7510. this.setState({
  7511. listFlag: true,
  7512. listCuiFlag: true,
  7513. hetongFlag: true,
  7514. tuiKuanFlag: true,
  7515. displayList: false,
  7516. isNew: true, //上传替换合同
  7517. });
  7518. } else {
  7519. this.setState({
  7520. hetongFlag: false,
  7521. listFlag: false,
  7522. listCuiFlag: false,
  7523. tuiKuanFlag: false,
  7524. displayList: false,
  7525. });
  7526. }
  7527. }}
  7528. >
  7529. <Option value={0}>退单退款</Option>
  7530. <Option value={1}>项目及金额变更</Option>
  7531. <Option value={2}>仅项目变更</Option>
  7532. <Option value={3}>仅金额变更</Option>
  7533. <Option value={4}>重报</Option>
  7534. <Option value={5}>赠送</Option>
  7535. <Option value={6}>退单不退款</Option>
  7536. <Option value={7}>仅变更合同</Option>
  7537. <Option value={8}>框架协议(仅已签框架合同适用)</Option>
  7538. </Select>
  7539. <Button
  7540. style={{ marginLeft: 10 }}
  7541. onClick={(e) => {
  7542. this.setState({
  7543. listFlag: false,
  7544. hetongFlag: false,
  7545. listCuiFlag: false,
  7546. tuiKuanFlag: false,
  7547. displayList: false,
  7548. startRemarks: "",
  7549. remarksC: "",
  7550. voucherUrl: [],
  7551. newContractUrl: [],
  7552. isNew: false,
  7553. changeAmount: "0",
  7554. applicant: undefined,
  7555. depNameChange: undefined,
  7556. typeChange: undefined,
  7557. changeFlag: false,
  7558. });
  7559. }}
  7560. >
  7561. 重置
  7562. </Button>
  7563. {(this.state.status === 3 || this.state.status == 0) ? (
  7564. <Button
  7565. type="danger"
  7566. style={{
  7567. float: "right",
  7568. backgroundColor: "red",
  7569. color: "white",
  7570. position: "absolute",
  7571. right: 0,
  7572. height: 50,
  7573. borderRadius: 20,
  7574. zIndex: 100,
  7575. top: 0,
  7576. }}
  7577. onClick={(e) => {
  7578. e.stopPropagation();
  7579. this.showConfirmChange(this.deleteChange);
  7580. }}
  7581. >
  7582. 取消本次变更
  7583. </Button>
  7584. ) : (
  7585. ""
  7586. )}
  7587. </FormItem>
  7588. </div>
  7589. <div className="clearfix">
  7590. <FormItem
  7591. labelCol={{ span: 5 }}
  7592. wrapperCol={{ span: 19 }}
  7593. label="合同额(万元)"
  7594. >
  7595. <Input
  7596. placeholder="请输入合同额"
  7597. disabled={this.state.hetongFlag}
  7598. ref="signTotalAmount"
  7599. value={this.state.totalAmount}
  7600. onChange={(e) => {
  7601. this.setState({
  7602. totalAmount: e.target.value,
  7603. });
  7604. }}
  7605. style={{ width: "240px" }}
  7606. />
  7607. </FormItem>
  7608. <FormItem
  7609. labelCol={{ span: 5 }}
  7610. wrapperCol={{ span: 19 }}
  7611. label="首付款(万元)"
  7612. >
  7613. <Input
  7614. placeholder="请输入首付款"
  7615. disabled={this.state.hetongFlag}
  7616. ref="signTotalAmount"
  7617. value={this.state.firstAmount}
  7618. onChange={(e) => {
  7619. this.setState({
  7620. firstAmount: e.target.value,
  7621. });
  7622. }}
  7623. style={{ width: "240px" }}
  7624. />
  7625. </FormItem>
  7626. <FormItem
  7627. labelCol={{ span: 5 }}
  7628. wrapperCol={{ span: 19 }}
  7629. label="已收款(万元)"
  7630. >
  7631. <span>
  7632. {this.state.settlementAmount}
  7633. &nbsp;&nbsp;&nbsp;&nbsp;
  7634. <span style={{ color: "red" }}>
  7635. (注:已收款与现实收款不符,请与财务专员联系)
  7636. </span>
  7637. </span>
  7638. </FormItem>
  7639. <FormItem
  7640. labelCol={{ span: 5 }}
  7641. wrapperCol={{ span: 19 }}
  7642. label="申请退款(万元)"
  7643. >
  7644. <Input
  7645. placeholder="请输入申请退款"
  7646. ref="signTotalAmount"
  7647. disabled={this.state.tuiKuanFlag}
  7648. value={this.state.changeAmount}
  7649. onChange={(e) => {
  7650. this.setState({
  7651. changeAmount: e.target.value,
  7652. });
  7653. }}
  7654. style={{ width: "240px" }}
  7655. />
  7656. </FormItem>
  7657. </div>
  7658. {/* 退单退款 */}
  7659. {this.state.isCaoGao && this.state.typeChange == 0 &&
  7660. <div className="clearfix">
  7661. <div className="clearfix">
  7662. <FormItem
  7663. className="half-item"
  7664. {...formItemLayout}
  7665. label="企业总经理姓名"
  7666. >
  7667. <Input
  7668. placeholder="请输入企业总经理姓名"
  7669. value={this.state.managerContacts}
  7670. onChange={(e) => {
  7671. this.setState({
  7672. managerContacts: e.target.value,
  7673. });
  7674. }}
  7675. style={{ width: "240px" }}
  7676. />
  7677. </FormItem>
  7678. <FormItem
  7679. className="half-item"
  7680. {...formItemLayout}
  7681. label="企业总经理联系电话"
  7682. >
  7683. <Input
  7684. placeholder="请输入企业总经理联系电话"
  7685. value={this.state.managerContactMobile}
  7686. onChange={(e) => {
  7687. this.setState({
  7688. managerContactMobile: e.target.value,
  7689. });
  7690. }}
  7691. style={{ width: "240px" }}
  7692. />
  7693. </FormItem>
  7694. </div>
  7695. <div className="clearfix">
  7696. <FormItem
  7697. className="half-item"
  7698. {...formItemLayout}
  7699. label="企业联系人姓名"
  7700. >
  7701. <Input
  7702. placeholder="请输入企业联系人姓名"
  7703. value={this.state.contacts}
  7704. onChange={(e) => {
  7705. this.setState({
  7706. contacts: e.target.value,
  7707. });
  7708. }}
  7709. style={{ width: "240px" }}
  7710. />
  7711. </FormItem>
  7712. <FormItem
  7713. className="half-item"
  7714. {...formItemLayout}
  7715. label="企业联系人联系方式"
  7716. >
  7717. <Input
  7718. placeholder="请输入企业联系人联系方式"
  7719. value={this.state.contactMobile}
  7720. onChange={(e) => {
  7721. this.setState({
  7722. contactMobile: e.target.value,
  7723. });
  7724. }}
  7725. style={{ width: "240px" }}
  7726. />
  7727. </FormItem>
  7728. </div>
  7729. <div className="clearfix">
  7730. <FormItem
  7731. className="half-item"
  7732. {...formItemLayout}
  7733. label={<span style={{ color: "red" }}>注</span>}
  7734. >
  7735. <span style={{ color: "red" }}>
  7736. 请填写以上信息,公司总经理将与企业联系交流
  7737. </span>
  7738. </FormItem>
  7739. </div>
  7740. </div>
  7741. }
  7742. <div
  7743. style={{
  7744. display: this.state.isCaoGao ? "block" : "none",
  7745. }}
  7746. >
  7747. <div>
  7748. <span
  7749. style={{
  7750. marginLeft: "50px",
  7751. fontSize: "20px",
  7752. }}
  7753. >
  7754. 项目业务
  7755. </span>
  7756. <span style={{ color: "red" }}>
  7757. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!)
  7758. </span>
  7759. <Button
  7760. type="primary"
  7761. onClick={this.changeAddPro}
  7762. disabled={this.state.listFlag}
  7763. style={{
  7764. float: "right",
  7765. marginRight: "50px",
  7766. marginBottom: "15px",
  7767. display: this.state.displayList
  7768. ? "none"
  7769. : "block",
  7770. }}
  7771. >
  7772. 添加项目明细
  7773. </Button>
  7774. </div>
  7775. <div
  7776. className="patent-table"
  7777. style={{ marginBottom: 10 }}
  7778. >
  7779. <Spin spinning={this.state.loading}>
  7780. <Table
  7781. columns={this.state.proColumns}
  7782. dataSource={this.state.proDataSource}
  7783. expandedRowRender={expandedRowRender}
  7784. pagination={this.state.pagination}
  7785. rowClassName={this.addRowColor}
  7786. // onRowDoubleClick={
  7787. // this.state.listFlag
  7788. // ? this.not
  7789. // : this.editPro
  7790. // }
  7791. bordered
  7792. size="small"
  7793. />
  7794. </Spin>
  7795. </div>
  7796. <div>
  7797. <span
  7798. style={{
  7799. marginLeft: "50px",
  7800. fontSize: "20px",
  7801. }}
  7802. >
  7803. 催款节点
  7804. </span>
  7805. <span style={{ color: "red" }}>
  7806. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  7807. </span>
  7808. <Button
  7809. type="primary"
  7810. onClick={(e) => {
  7811. this.changeAddCui();
  7812. }}
  7813. disabled={this.state.listCuiFlag}
  7814. style={{
  7815. float: "right",
  7816. marginRight: "50px",
  7817. marginBottom: "15px",
  7818. display: this.state.displayList
  7819. ? "none"
  7820. : "block",
  7821. }}
  7822. >
  7823. 添加催款节点
  7824. </Button>
  7825. </div>
  7826. <div className="clearfix">
  7827. <Spin spinning={this.state.loading}>
  7828. <Form layout="horizontal">
  7829. <Table
  7830. pagination={false}
  7831. columns={this.state.changeCuiList}
  7832. dataSource={this.state.cuiDataSource}
  7833. scroll={{ x: "max-content", y: 0 }}
  7834. onRowDoubleClick={
  7835. this.state.listCuiFlag
  7836. ? this.not
  7837. : this.editCui
  7838. }
  7839. bordered
  7840. size="small"
  7841. />
  7842. <Col
  7843. span={24}
  7844. offset={9}
  7845. style={{ marginTop: "15px" }}
  7846. ></Col>
  7847. </Form>
  7848. </Spin>
  7849. </div>
  7850. </div>
  7851. <div className="clearfix">
  7852. <FormItem
  7853. style={{ height: "auto" }}
  7854. labelCol={{ span: 5 }}
  7855. wrapperCol={{ span: 19 }}
  7856. label="变更原因"
  7857. >
  7858. <TextArea
  7859. rows={4}
  7860. placeholder="请输入变更原因"
  7861. ref="signTotalAmount"
  7862. style={{ width: "95%" }}
  7863. value={this.state.remarksC}
  7864. onChange={(e) => {
  7865. this.setState({
  7866. remarksC: e.target.value,
  7867. });
  7868. }}
  7869. />
  7870. </FormItem>
  7871. </div>
  7872. <div className="clearfix">
  7873. <FormItem
  7874. style={{ height: "auto" }}
  7875. labelCol={{ span: 5 }}
  7876. wrapperCol={{ span: 19 }}
  7877. label="备注"
  7878. >
  7879. <TextArea
  7880. rows={4}
  7881. placeholder="请输入备注"
  7882. ref="signTotalAmount"
  7883. style={{ width: "95%" }}
  7884. value={this.state.startRemarks}
  7885. onChange={(e) => {
  7886. this.setState({
  7887. startRemarks: e.target.value,
  7888. });
  7889. }}
  7890. />
  7891. </FormItem>
  7892. </div>
  7893. <div className="clearfix">
  7894. <FormItem
  7895. labelCol={{ span: 5 }}
  7896. wrapperCol={{ span: 19 }}
  7897. label="变更凭证"
  7898. >
  7899. <PicturesWall
  7900. domId={"addService5"}
  7901. fileList={this.getVoucherUrl}
  7902. pictureUrl={this.state.voucherUrl}
  7903. url="/api/admin/orderChange/uploadFile"
  7904. sign="order_change_file"
  7905. />
  7906. <p>图片建议:要清晰。</p>
  7907. </FormItem>
  7908. </div>
  7909. <div className="clearfix">
  7910. <FormItem
  7911. labelCol={{ span: 5 }}
  7912. wrapperCol={{ span: 19 }}
  7913. label="上传替换合同"
  7914. >
  7915. <Switch disabled={this.state.typeChange == 7} checked={this.state.isNew} onChange={e => { this.setState({ isNew: e }) }} />,
  7916. <p style={{ color: "red" }}>注:原上传合同为空或作废时,需上传替换合同</p>
  7917. </FormItem>
  7918. </div>
  7919. {
  7920. this.state.isNew &&
  7921. <div className="clearfix">
  7922. <FormItem
  7923. labelCol={{ span: 5 }}
  7924. wrapperCol={{ span: 19 }}
  7925. label="合同扫描件"
  7926. >
  7927. <PicturesWall
  7928. domId={"newcontract"}
  7929. fileList={this.getNewContractUrl}
  7930. pictureUrl={this.state.newContractUrl}
  7931. url="/api/admin/orderChange/uploadFile"
  7932. sign=""
  7933. />
  7934. <p>图片建议:要清晰。</p>
  7935. </FormItem>
  7936. </div>
  7937. }
  7938. <div className="clearfix">
  7939. <Button
  7940. type="primary"
  7941. style={{ float: "right", marginRight: 40 }}
  7942. loading={this.state.loading}
  7943. onClick={(e) => {
  7944. if (this.state.isCaoGao) {
  7945. this.submitChange();
  7946. } else {
  7947. this.changeApply();
  7948. }
  7949. }}
  7950. >
  7951. {/* {this.state.isCaoGao
  7952. ? "发起变更申请"
  7953. : this.state.typeChange == 0
  7954. ? "发起变更申请"
  7955. : "下一步"} */}
  7956. {this.state.isCaoGao ? "发起变更申请" : "下一步"}
  7957. </Button>
  7958. </div>
  7959. </div>
  7960. }
  7961. </TabPane>
  7962. }
  7963. {this.state.isJilu &&
  7964. <TabPane tab={"最近变更记录"} key="3">
  7965. {
  7966. this.state.activeKey == "3" &&
  7967. <div>
  7968. <div
  7969. style={{
  7970. borderRadius: "50%",
  7971. width: 300,
  7972. height: 300,
  7973. position: "absolute",
  7974. top: 230,
  7975. left: 525,
  7976. transform: "rotate(-5deg)",
  7977. zIndex: 1,
  7978. display:
  7979. this.state.detailChange.status == 4
  7980. ? "block"
  7981. : "none",
  7982. }}
  7983. >
  7984. <img src={tongguo} style={{ width: "100%" }} />
  7985. </div>
  7986. <div
  7987. style={{
  7988. borderRadius: "50%",
  7989. width: 300,
  7990. height: 300,
  7991. position: "absolute",
  7992. top: 284,
  7993. left: 586,
  7994. transform: "rotate(-5deg)",
  7995. zIndex: 1,
  7996. display:
  7997. this.state.detailChange.status == 5
  7998. ? "block"
  7999. : "none",
  8000. }}
  8001. >
  8002. <img src={quxiao} style={{ width: "63%" }} />
  8003. </div>
  8004. <div className="clearfix">
  8005. <FormItem
  8006. className="half-item"
  8007. {...formItemLayout}
  8008. label="客户名称"
  8009. >
  8010. <span>{this.state.userName}</span>
  8011. <EnterpriseNameChange
  8012. type="journal"
  8013. style={{ marginLeft: 10 }}
  8014. enterpriseId={this.state.orderUid}
  8015. />
  8016. </FormItem>
  8017. {/* */}
  8018. <FormItem
  8019. className="half-item"
  8020. {...formItemLayout}
  8021. label="合同编号"
  8022. >
  8023. <span>{this.state.contractNo}</span>
  8024. </FormItem>
  8025. </div>
  8026. <div className="clearfix">
  8027. <FormItem
  8028. className="half-item"
  8029. {...formItemLayout}
  8030. label="时间"
  8031. >
  8032. <span>
  8033. {this.state.detailChange.createTimes}
  8034. </span>
  8035. </FormItem>
  8036. <FormItem
  8037. className="half-item"
  8038. {...formItemLayout}
  8039. label="申请人"
  8040. >
  8041. <span>{this.state.salesmanName}</span>
  8042. </FormItem>
  8043. </div>
  8044. <div className="clearfix">
  8045. <FormItem
  8046. className="half-item"
  8047. {...formItemLayout}
  8048. label="当前进度"
  8049. >
  8050. <span>
  8051. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  8052. {this.state.detailChange.processState === 3 ||
  8053. this.state.detailChange.processState === 4
  8054. ? shenghePeo(this.state.detailChange.examineName, this.state.detailChange.processState)
  8055. : getProcessStatusNew(
  8056. this.state.detailChange.examineName,
  8057. this.state.detailChange.processState,
  8058. this.state.detailChange.status
  8059. )}
  8060. </span>
  8061. <FlowChart id={this.state.detailChange.id} />
  8062. </FormItem>
  8063. {/* <FormItem
  8064. className="half-item"
  8065. {...formItemLayout}
  8066. label="申请变更部门"
  8067. >
  8068. <span>{this.state.depName}</span>
  8069. </FormItem> */}
  8070. <FormItem
  8071. {...formItemLayout}
  8072. className="half-item"
  8073. label="变更类型"
  8074. >
  8075. <span>
  8076. {getChangeType(
  8077. this.state.detailChange.typeChange
  8078. )}
  8079. </span>
  8080. </FormItem>
  8081. </div>
  8082. {/* <div className="clearfix">
  8083. <FormItem
  8084. labelCol={{ span: 4 }}
  8085. wrapperCol={{ span: 18 }}
  8086. label="变更类型"
  8087. >
  8088. <span>
  8089. {getChangeType(
  8090. this.state.detailChange.typeChange
  8091. )}
  8092. </span>
  8093. </FormItem>
  8094. </div> */}
  8095. {this.state.detailChange.typeChange == 0 &&
  8096. <div className="clearfix">
  8097. <FormItem
  8098. {...formItemLayout}
  8099. className="half-item"
  8100. label="企业总经理姓名"
  8101. >
  8102. <span>
  8103. {this.state.detailChange.managerContacts}
  8104. </span>
  8105. </FormItem>
  8106. <FormItem
  8107. {...formItemLayout}
  8108. className="half-item"
  8109. label="企业总经理联系电话"
  8110. >
  8111. <span>
  8112. {this.state.detailChange.managerContactMobile}
  8113. </span>
  8114. </FormItem>
  8115. </div>
  8116. }
  8117. {this.state.detailChange.typeChange == 0 &&
  8118. <div className="clearfix">
  8119. <FormItem
  8120. {...formItemLayout}
  8121. className="half-item"
  8122. label="企业联系人姓名"
  8123. >
  8124. <span>
  8125. {this.state.detailChange.contacts}
  8126. </span>
  8127. </FormItem>
  8128. <FormItem
  8129. {...formItemLayout}
  8130. className="half-item"
  8131. label="企业联系人联系方式"
  8132. >
  8133. <span>
  8134. {this.state.detailChange.contactMobile}
  8135. </span>
  8136. </FormItem>
  8137. </div>
  8138. }
  8139. <div className="clearfix">
  8140. <FormItem
  8141. {...formItemLayout}
  8142. className="half-item"
  8143. label="合同额(万元)"
  8144. >
  8145. <span>
  8146. {this.state.detailChange.totalAmount}
  8147. </span>
  8148. </FormItem>
  8149. <FormItem
  8150. {...formItemLayout}
  8151. className="half-item"
  8152. label="已收款(万元)"
  8153. >
  8154. <span>
  8155. {this.state.detailChange.settlementAmount}
  8156. </span>
  8157. </FormItem>
  8158. </div>
  8159. <div className="clearfix">
  8160. <FormItem
  8161. {...formItemLayout}
  8162. className="half-item"
  8163. label="欠款(万元)"
  8164. >
  8165. <span>{this.state.detailChange.arrears}</span>
  8166. </FormItem>
  8167. <FormItem
  8168. {...formItemLayout}
  8169. className="half-item"
  8170. label="申请退款(万元)"
  8171. >
  8172. <span>
  8173. {this.state.detailChange.changeAmount}
  8174. </span>
  8175. </FormItem>
  8176. </div>
  8177. <div className="clearfix">
  8178. <FormItem
  8179. style={{ height: "auto" }}
  8180. labelCol={{ span: 5 }}
  8181. wrapperCol={{ span: 19 }}
  8182. label="首付款(万元)"
  8183. >
  8184. <span>{this.state.detailChange.firstAmount}</span>
  8185. </FormItem>
  8186. </div>
  8187. <div className="clearfix">
  8188. <FormItem
  8189. style={{ height: "auto" }}
  8190. labelCol={{ span: 5 }}
  8191. wrapperCol={{ span: 19 }}
  8192. label="变更原因"
  8193. >
  8194. <span>{this.state.detailChange.remarksC}</span>
  8195. </FormItem>
  8196. </div>
  8197. <div className="clearfix">
  8198. <FormItem
  8199. style={{ height: "auto" }}
  8200. labelCol={{ span: 5 }}
  8201. wrapperCol={{ span: 19 }}
  8202. label="备注"
  8203. >
  8204. <span>
  8205. {this.state.detailChange.startRemarks}
  8206. </span>
  8207. </FormItem>
  8208. </div>
  8209. {/* ---- */}
  8210. <div className="clearfix">
  8211. <FormItem
  8212. labelCol={{ span: 5 }}
  8213. wrapperCol={{ span: 19 }}
  8214. label="变更凭证"
  8215. >
  8216. <div>
  8217. <div
  8218. style={{
  8219. paddingTop: "10px",
  8220. }}
  8221. >
  8222. {this.state.detailChange &&
  8223. this.state.detailChange.voucherUrl &&
  8224. this.state.activeKey === "3" &&
  8225. this.state.visible ? (
  8226. <ImgList
  8227. fileList={
  8228. this.state.detailChange.voucherUrl
  8229. }
  8230. ItemWidth={"96px"}
  8231. />
  8232. ) : (
  8233. <div />
  8234. )}
  8235. </div>
  8236. {this.state.status === 3 ? (
  8237. <Button
  8238. type="danger"
  8239. style={{
  8240. float: "right",
  8241. backgroundColor: "red",
  8242. color: "white",
  8243. position: "absolute",
  8244. right: 0,
  8245. height: 50,
  8246. borderRadius: 20,
  8247. zIndex: 100,
  8248. top: 0,
  8249. }}
  8250. onClick={(e) => {
  8251. e.stopPropagation();
  8252. this.showConfirmChange(
  8253. this.deleteChange
  8254. );
  8255. }}
  8256. >
  8257. 取消本次变更
  8258. </Button>
  8259. ) : (
  8260. ""
  8261. )}
  8262. </div>
  8263. </FormItem>
  8264. </div>
  8265. {
  8266. this.state.detailChange.contractPictureUrl.length != 0 &&
  8267. <div className="clearfix">
  8268. <FormItem
  8269. labelCol={{ span: 5 }}
  8270. wrapperCol={{ span: 19 }}
  8271. label="最新合同"
  8272. >
  8273. <div style={{ paddingTop: 10 }}>
  8274. <ImgList
  8275. fileList={
  8276. this.state.detailChange.contractPictureUrl
  8277. }
  8278. ItemWidth={"96px"}
  8279. />
  8280. </div>
  8281. </FormItem>
  8282. </div>
  8283. }
  8284. <ul
  8285. style={{
  8286. width: "868px",
  8287. overflow: "hidden",
  8288. paddingLeft: "90px",
  8289. paddingTop: "10px",
  8290. position: "relative",
  8291. bottom: "20px",
  8292. fontSize: "12px",
  8293. color: "rgba(0, 0, 0, 0.65)",
  8294. }}
  8295. >
  8296. {/* <span>操作人:</span> */}
  8297. {this.state.logData.map((item, index) => {
  8298. if (item.status == 0) {
  8299. item.status = "发起";
  8300. } else if (item.status == 1) {
  8301. item.status = "审核中";
  8302. } else if (item.status == 2) {
  8303. item.status = "通过";
  8304. } else if (item.status == 3) {
  8305. item.status = "驳回";
  8306. } else if (item.status == 4) {
  8307. item.status = "完成";
  8308. } else if (item.status == 5) {
  8309. item.status = "撤销";
  8310. }
  8311. return (
  8312. <li
  8313. key={index}
  8314. style={{
  8315. width: "100%",
  8316. height: "auto",
  8317. wordBreak: "break-all",
  8318. marginBottom: "10px",
  8319. }}
  8320. >
  8321. {item.aname + ":" + "【" + item.status + "】" + item.remarks + "(" + item.createTimes + ")"}
  8322. </li>
  8323. );
  8324. })}
  8325. </ul>
  8326. {/* 动态展示项目以及催款节点 */}
  8327. <div>
  8328. <div>
  8329. <span
  8330. style={{
  8331. marginLeft: "50px",
  8332. fontSize: "20px",
  8333. }}
  8334. >
  8335. 项目业务
  8336. </span>
  8337. </div>
  8338. <div
  8339. className="patent-table"
  8340. style={{ marginBottom: 10 }}
  8341. >
  8342. <Spin spinning={this.state.loading}>
  8343. <Table
  8344. columns={this.state.detailColumns}
  8345. dataSource={this.state.proDataSource}
  8346. expandedRowRender={expandedRowRenderDetail}
  8347. pagination={this.state.pagination}
  8348. // onRowClick={this.tableRowClick}
  8349. onRowClick={(record) => {
  8350. this.setState({
  8351. dataInfor: record,
  8352. infoVisible: true
  8353. })
  8354. }}
  8355. rowClassName={this.addRowColor}
  8356. bordered
  8357. size="small"
  8358. />
  8359. </Spin>
  8360. </div>
  8361. <div>
  8362. <span
  8363. style={{
  8364. marginLeft: "50px",
  8365. fontSize: "20px",
  8366. }}
  8367. >
  8368. 催款节点
  8369. </span>
  8370. </div>
  8371. <div className="clearfix">
  8372. <Spin spinning={this.state.loading}>
  8373. <Form layout="horizontal">
  8374. <Table
  8375. pagination={false}
  8376. columns={this.state.detailContactsLists}
  8377. dataSource={this.state.cuiDataSource}
  8378. scroll={{ x: "max-content", y: 0 }}
  8379. bordered
  8380. size="small"
  8381. />
  8382. <Col
  8383. span={24}
  8384. offset={9}
  8385. style={{ marginTop: "15px" }}
  8386. ></Col>
  8387. </Form>
  8388. </Spin>
  8389. </div>
  8390. </div>
  8391. </div>
  8392. }
  8393. </TabPane>
  8394. }
  8395. </Tabs>
  8396. }
  8397. </div>
  8398. </Spin>
  8399. </Form>
  8400. </Modal>
  8401. {
  8402. // 添加变更项目
  8403. this.state.changeVisible &&
  8404. <NewAddProject
  8405. type="change"
  8406. children="list"
  8407. typeChange={this.state.typeChange}
  8408. cid={this.state.changeId}
  8409. readOnly={false}
  8410. orderNo={this.state.orderNo}
  8411. visible={this.state.changeVisible}
  8412. newData={this.state.newData}
  8413. onCancel={() => [this.nextCancel("change")]}
  8414. />
  8415. }
  8416. {
  8417. // 编辑变更项目
  8418. this.state.editProVisible &&
  8419. <NewEditProject
  8420. type="change"
  8421. children="list"
  8422. typeChange={this.state.typeChange}
  8423. cid={this.state.changeId}
  8424. readOnly={false}
  8425. orderNo={this.props.datauser.orderNo}
  8426. visible={this.state.editProVisible}
  8427. dataInfor={this.state.dataInfor}
  8428. newData={this.state.newData}
  8429. onCancel={() => [this.nextCancel("change")]}
  8430. />
  8431. }
  8432. {
  8433. this.state.lookVisible ? (
  8434. <Modal
  8435. maskClosable={false}
  8436. visible={this.state.lookVisible}
  8437. onOk={this.noCancel}
  8438. onCancel={this.noCancel}
  8439. width="800px"
  8440. title={"退单申请"}
  8441. footer=""
  8442. className="admin-desc-content"
  8443. >
  8444. <Form layout="horizontal">
  8445. <Spin spinning={this.state.loading}>
  8446. <div className="clearfix">
  8447. <FormItem
  8448. labelCol={{ span: 4 }}
  8449. wrapperCol={{ span: 16 }}
  8450. label="终止合同"
  8451. >
  8452. <Picture
  8453. domId={"addService6"}
  8454. fileList={(e) => {
  8455. this.setState({ contractUrl: e });
  8456. }}
  8457. pictureUrl={this.state.contractUrl}
  8458. visible={this.props.visible}
  8459. data={{
  8460. sign: "order_refund_file",
  8461. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8462. number: 8,
  8463. }}
  8464. />
  8465. </FormItem>
  8466. </div>
  8467. <div className="clearfix">
  8468. <FormItem
  8469. labelCol={{ span: 4 }}
  8470. wrapperCol={{ span: 16 }}
  8471. label="退单申请表"
  8472. >
  8473. <Picture
  8474. domId={"addService7"}
  8475. fileList={(e) => {
  8476. this.setState({ applicationUrl: e });
  8477. }}
  8478. pictureUrl={this.state.applicationUrl}
  8479. visible={this.props.visible}
  8480. data={{
  8481. sign: "order_refund_file",
  8482. url: "/api/admin/newOrder/uploadRefundOrderFile",
  8483. number: 8,
  8484. }}
  8485. />
  8486. </FormItem>
  8487. </div>
  8488. <div className="clearfix">
  8489. <FormItem
  8490. labelCol={{ span: 4 }}
  8491. wrapperCol={{ span: 16 }}
  8492. label="退单理由"
  8493. >
  8494. <Input
  8495. type="textarea"
  8496. placeholder="请输入退单理由"
  8497. rows={4}
  8498. value={this.state.reason}
  8499. onChange={(e) => {
  8500. this.setState({ reason: e.target.value });
  8501. }}
  8502. />
  8503. </FormItem>
  8504. </div>
  8505. <div className="clearfix">
  8506. <Button
  8507. className="cancel"
  8508. type="primary"
  8509. onClick={this.tuidanOk}
  8510. style={{ marginLeft: "50px" }}
  8511. htmlType="submit"
  8512. >
  8513. 确定退单
  8514. </Button>
  8515. <Button
  8516. className="cancel"
  8517. type="ghost"
  8518. onClick={this.noCancel}
  8519. style={{ marginLeft: "50px" }}
  8520. >
  8521. 取消
  8522. </Button>
  8523. </div>
  8524. </Spin>
  8525. </Form>
  8526. </Modal>
  8527. ) : (
  8528. <div />
  8529. )
  8530. }
  8531. <Modal
  8532. maskClosable={false}
  8533. title={
  8534. isNaN(parseFloat(this.state.appropriationRatio))
  8535. ? "修改催款节点金额"
  8536. : "修改催款节点比例"
  8537. }
  8538. visible={this.state.editCuiVisible}
  8539. onOk={() => {
  8540. this.submitEditCui(
  8541. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  8542. );
  8543. }}
  8544. okText={"保存"}
  8545. width={300}
  8546. onCancel={(e) => {
  8547. this.setState({
  8548. editCuiVisible: false,
  8549. appropriationRatio: "",
  8550. });
  8551. }}
  8552. >
  8553. <div className="clearfix">
  8554. <FormItem
  8555. labelCol={{ span: 6 }}
  8556. wrapperCol={{ span: 14 }}
  8557. label={
  8558. isNaN(parseFloat(this.state.appropriationRatio))
  8559. ? "催款金额"
  8560. : "催款比例"
  8561. }
  8562. >
  8563. <Input
  8564. type="number"
  8565. placeholder={
  8566. isNaN(parseFloat(this.state.appropriationRatio))
  8567. ? "请输入金额"
  8568. : "请输入比例"
  8569. }
  8570. rows={4}
  8571. value={this.state.editCuiMoney}
  8572. onChange={(e) => {
  8573. this.setState({ editCuiMoney: e.target.value });
  8574. }}
  8575. />
  8576. </FormItem>
  8577. </div>
  8578. </Modal>
  8579. <OrderRiZi
  8580. dataSourcerizhi={this.state.dataSourcerizhi}
  8581. closeOrderLog={this.closeOrderLog}
  8582. visible={this.state.rizhivisible}
  8583. loading={this.state.loading}
  8584. />
  8585. {
  8586. // 添加项目
  8587. this.state.projectOperationVisible &&
  8588. <NewAddProject
  8589. readOnly={
  8590. this.state.dataInfor &&
  8591. Object.keys(this.state.dataInfor).length > 0 &&
  8592. this.state.processStatus !== 0
  8593. }
  8594. orderNo={this.props.datauser.orderNo}
  8595. visible={this.state.projectOperationVisible}
  8596. newData={this.state.newData}
  8597. onCancel={this.nextCancel}
  8598. />
  8599. }
  8600. {
  8601. // 编辑项目
  8602. this.state.editProjectOperationVisible &&
  8603. <NewEditProject
  8604. readOnly={
  8605. this.state.dataInfor &&
  8606. Object.keys(this.state.dataInfor).length > 0 &&
  8607. this.state.processStatus !== 0
  8608. }
  8609. orderNo={this.props.datauser.orderNo}
  8610. visible={this.state.editProjectOperationVisible}
  8611. dataInfor={this.state.dataInfor}
  8612. newData={this.state.newData}
  8613. onCancel={this.nextCancel}
  8614. />
  8615. }
  8616. {
  8617. // 会员项目添加
  8618. this.state.vipVisible &&
  8619. <NewAddProject
  8620. type="vipAdd"
  8621. readOnly={
  8622. this.state.dataInfor &&
  8623. Object.keys(this.state.dataInfor).length > 0 &&
  8624. this.state.processStatus !== 0
  8625. }
  8626. orderNo={this.props.datauser.orderNo}
  8627. visible={this.state.vipVisible}
  8628. newData={this.state.newData}
  8629. onCancel={this.nextCancel}
  8630. />
  8631. // <ProjectOperationVip
  8632. // readOnly={
  8633. // this.state.dataInfor &&
  8634. // Object.keys(this.state.dataInfor).length > 0 &&
  8635. // this.state.processStatus !== 0
  8636. // }
  8637. // orderNo={this.props.datauser.orderNo}
  8638. // visible={this.state.vipVisible}
  8639. // dataInfor={this.state.dataInfor}
  8640. // newData={this.state.newData}
  8641. // onCancel={this.nextCancel}
  8642. // />
  8643. }
  8644. {
  8645. // 变更记录详情
  8646. this.state.infoVisible &&
  8647. <NewEditProject
  8648. children="list"
  8649. type="change"
  8650. readOnly={
  8651. this.state.dataInfor &&
  8652. Object.keys(this.state.dataInfor).length > 0 &&
  8653. this.state.processStatus !== 0
  8654. }
  8655. visible={this.state.infoVisible}
  8656. dataInfor={this.state.dataInfor}
  8657. onCancel={() => { this.setState({ infoVisible: false }) }}
  8658. />
  8659. }
  8660. </div >
  8661. );
  8662. },
  8663. })
  8664. );
  8665. export default Form.create()(NewService);