addService.jsx 278 KB

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