addService.jsx 301 KB

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