addService.jsx 277 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651
  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. >
  5035. <DatePicker
  5036. className="signDateRef"
  5037. style={{
  5038. marginTop: "2px",
  5039. // width: "240px",
  5040. height: "32px",
  5041. }}
  5042. showTime
  5043. format="YYYY-MM-DD"
  5044. onOk={() => { }}
  5045. value={
  5046. this.state.signDate
  5047. ? moment(this.state.signDate)
  5048. : null
  5049. }
  5050. onChange={(data, dataString) => {
  5051. this.setState({ signDate: dataString });
  5052. }}
  5053. />
  5054. <span
  5055. className="mandatory"
  5056. style={{ marginLeft: 20 }}
  5057. >
  5058. *
  5059. </span>
  5060. </FormItem>
  5061. <FormItem
  5062. className="half-item"
  5063. {...formItemLayout}
  5064. label="订单部门"
  5065. >
  5066. <Select
  5067. placeholder="请输入订单部门"
  5068. style={{ width: 240 }}
  5069. value={this.state.organizationSearch}
  5070. onChange={(e) => {
  5071. this.setState({ organizationSearch: e });
  5072. }}
  5073. >
  5074. {departmentArr.map(function (item) {
  5075. return (
  5076. <Select.Option key={item.id}>
  5077. {item.name}
  5078. </Select.Option>
  5079. );
  5080. })}
  5081. </Select>
  5082. </FormItem>
  5083. </div>
  5084. ) : (
  5085. <div className="clearfix">
  5086. <FormItem
  5087. className="half-item"
  5088. {...formItemLayout}
  5089. label="特批立项"
  5090. >
  5091. <span>
  5092. {getApprovedState(this.state.approval)}
  5093. </span>
  5094. </FormItem>
  5095. <FormItem
  5096. className="half-item"
  5097. {...formItemLayout}
  5098. label="合同签订时间"
  5099. >
  5100. <span>{this.state.signDate}</span>
  5101. </FormItem>
  5102. <FormItem
  5103. className="half-item"
  5104. {...formItemLayout}
  5105. label="订单部门"
  5106. >
  5107. <span>{this.state.depName}</span>
  5108. </FormItem>
  5109. <FormItem
  5110. className="half-item"
  5111. {...formItemLayout}
  5112. label="是否外包"
  5113. >
  5114. <span>
  5115. {this.state.outsource == 0 ? "否" : "是"}
  5116. </span>
  5117. </FormItem>
  5118. </div>
  5119. )}
  5120. </div>
  5121. <h3
  5122. style={{
  5123. marginLeft: 10,
  5124. fontWeight: 800,
  5125. marginBottom: 10,
  5126. }}
  5127. >
  5128. 收款项目
  5129. </h3>
  5130. {this.state.processStatus === 0 ? (
  5131. <div className="clearfix">
  5132. <FormItem
  5133. className="half-item"
  5134. {...formItemLayout}
  5135. label="签单金额(万元)"
  5136. >
  5137. <Input
  5138. placeholder="签单金额"
  5139. ref="totalAmountRef"
  5140. value={this.state.totalAmount}
  5141. onChange={(e) => {
  5142. this.setState({
  5143. totalAmount: e.target.value,
  5144. });
  5145. }}
  5146. style={{ width: "240px" }}
  5147. />
  5148. {/* <span className="mandatory">*</span> */}
  5149. </FormItem>
  5150. <FormItem
  5151. className="half-item"
  5152. {...formItemLayout}
  5153. label="首付金额(万元)"
  5154. >
  5155. <Input
  5156. placeholder="请输入实签首款金额"
  5157. ref="firstAmountRef"
  5158. value={this.state.firstAmount}
  5159. onChange={(e) => {
  5160. this.setState({
  5161. firstAmount: e.target.value,
  5162. });
  5163. }}
  5164. style={{ width: "240px" }}
  5165. />
  5166. {/* <span className="mandatory">*</span> */}
  5167. </FormItem>
  5168. <FormItem
  5169. className="half-item"
  5170. {...formItemLayout}
  5171. label="已收款项"
  5172. >
  5173. <span>
  5174. {this.state.settlementAmount + "万元"}
  5175. </span>
  5176. {/* {this.state.settlementAmount ? (
  5177. <Button
  5178. type="primary"
  5179. onClick={this.tuikuan}
  5180. style={{
  5181. float: "right",
  5182. marginRight: "50px",
  5183. marginBottom: "15px"
  5184. }}
  5185. >
  5186. 退单
  5187. </Button>
  5188. ) : (
  5189. ""
  5190. )} */}
  5191. </FormItem>
  5192. </div>
  5193. ) : (
  5194. <div className="clearfix">
  5195. <FormItem
  5196. className="half-item"
  5197. {...formItemLayout}
  5198. label="签单金额(万元)"
  5199. >
  5200. <span>{this.state.totalAmount}</span>
  5201. </FormItem>
  5202. <FormItem
  5203. className="half-item"
  5204. {...formItemLayout}
  5205. label="首付金额(万元)"
  5206. >
  5207. <span>{this.state.firstAmount}</span>
  5208. </FormItem>
  5209. <FormItem
  5210. className="half-item"
  5211. {...formItemLayout}
  5212. label="已收款项"
  5213. >
  5214. <span>
  5215. {this.state.settlementAmount + "万元"}
  5216. </span>
  5217. {/* {this.state.settlementAmount ? (
  5218. <Button
  5219. type="primary"
  5220. onClick={this.tuikuan}
  5221. style={{
  5222. float: "right",
  5223. marginRight: "50px",
  5224. marginBottom: "15px"
  5225. }}
  5226. >
  5227. 退单
  5228. </Button>
  5229. ) : (
  5230. ""
  5231. )} */}
  5232. </FormItem>
  5233. </div>
  5234. )}
  5235. <h3
  5236. style={{
  5237. marginLeft: 10,
  5238. fontWeight: 800,
  5239. marginBottom: 10,
  5240. }}
  5241. >
  5242. 联系信息
  5243. </h3>
  5244. {this.state.processStatus == 0 ? (
  5245. <div className="clearfix">
  5246. <div className="clearfix">
  5247. <FormItem
  5248. className="half-item"
  5249. style={{ width: "80%" }}
  5250. labelCol={{ span: 5 }}
  5251. wrapperCol={{ span: 18 }}
  5252. label="客户名称"
  5253. >
  5254. <span>{this.state.userName}</span>
  5255. <EnterpriseNameChange
  5256. type="journal"
  5257. style={{ marginLeft: 10 }}
  5258. enterpriseId={this.state.orderUid}
  5259. />
  5260. </FormItem>
  5261. </div>
  5262. <FormItem
  5263. className="half-item"
  5264. {...formItemLayout}
  5265. label="企业联系人"
  5266. >
  5267. <Input
  5268. placeholder="请输入联系人"
  5269. ref="signTotalAmount"
  5270. value={this.state.contacts}
  5271. onChange={(e) => {
  5272. this.setState({ contacts: e.target.value });
  5273. }}
  5274. style={{ width: "240px" }}
  5275. />
  5276. </FormItem>
  5277. <FormItem
  5278. className="half-item"
  5279. {...formItemLayout}
  5280. label="联系人电话"
  5281. >
  5282. <Input
  5283. placeholder="请输入联系人电话"
  5284. ref="signTotalAmount"
  5285. value={this.state.contactMobile}
  5286. onChange={(e) => {
  5287. this.setState({
  5288. contactMobile: e.target.value,
  5289. });
  5290. }}
  5291. style={{ width: "240px" }}
  5292. />
  5293. </FormItem>
  5294. <FormItem
  5295. className="half-item"
  5296. {...formItemLayout}
  5297. label="企业法人"
  5298. >
  5299. <Input
  5300. placeholder="请输入法人"
  5301. ref="signTotalAmount"
  5302. value={this.state.legalPerson}
  5303. onChange={(e) => {
  5304. this.setState({
  5305. legalPerson: e.target.value,
  5306. });
  5307. }}
  5308. style={{ width: "240px" }}
  5309. />
  5310. </FormItem>
  5311. <FormItem
  5312. className="half-item"
  5313. {...formItemLayout}
  5314. label="法人电话"
  5315. >
  5316. <Input
  5317. placeholder="请输入法人电话"
  5318. ref="signTotalAmount"
  5319. value={this.state.legalPersonTel}
  5320. onChange={(e) => {
  5321. this.setState({
  5322. legalPersonTel: e.target.value,
  5323. });
  5324. }}
  5325. style={{ width: "240px" }}
  5326. />
  5327. </FormItem>
  5328. </div>
  5329. ) : (
  5330. <div className="clearfix">
  5331. {formItemList.map((data, index) => {
  5332. return (
  5333. <FormItem
  5334. className="half-item"
  5335. {...formItemLayout}
  5336. key={index}
  5337. label={data.label}
  5338. >
  5339. {data.content}
  5340. </FormItem>
  5341. );
  5342. })}
  5343. </div>
  5344. )}
  5345. <div className="clearfix">
  5346. {this.state.processStatus == 0 ? (
  5347. <div>
  5348. <FormItem
  5349. labelCol={{ span: 4 }}
  5350. wrapperCol={{ span: 18 }}
  5351. label={
  5352. <span>
  5353. <strong style={{ color: "#f00" }}>
  5354. *
  5355. </strong>
  5356. 合同扫描件
  5357. </span>
  5358. }
  5359. >
  5360. <PicturesWall
  5361. domId={"addService1"}
  5362. fileList={this.getOrgCodeUrl}
  5363. pictureUrl={this.state.orgCodeUrl}
  5364. url="/api/admin/order/uploadOrderImg"
  5365. sign=""
  5366. />
  5367. <p>图片建议:要清晰。</p>
  5368. <Button
  5369. style={{
  5370. float: "right",
  5371. marginRight: "140px",
  5372. marginTop: "20px",
  5373. }}
  5374. onClick={this.getOrderLog}
  5375. >
  5376. 查看订单日志
  5377. </Button>
  5378. </FormItem>
  5379. <FormItem
  5380. labelCol={{ span: 4 }}
  5381. wrapperCol={{ span: 18 }}
  5382. label={<span>补充协议</span>}
  5383. >
  5384. <PicturesWall
  5385. domId={"addService2"}
  5386. fileList={this.getReplenishUrl}
  5387. pictureUrl={this.state.replenishUrl}
  5388. url="/api/admin/order/uploadOrderImg"
  5389. sign=""
  5390. />
  5391. <p>图片建议:要清晰。</p>
  5392. </FormItem>
  5393. </div>
  5394. ) : (
  5395. <div>
  5396. <FormItem
  5397. labelCol={{ span: 4 }}
  5398. wrapperCol={{ span: 18 }}
  5399. label="合同扫描件"
  5400. >
  5401. {/*<Upload*/}
  5402. {/* className="demandDetailShow-upload"*/}
  5403. {/* listType="picture-card"*/}
  5404. {/* fileList={this.state.orgCodeUrl}*/}
  5405. {/* onPreview={(file) => {*/}
  5406. {/* this.setState({*/}
  5407. {/* previewImage: file.url || file.thumbUrl,*/}
  5408. {/* previewVisible: true,*/}
  5409. {/* });*/}
  5410. {/* }}*/}
  5411. {/*/>*/}
  5412. <div
  5413. style={{
  5414. paddingTop: "10px",
  5415. paddingBottom: "10px",
  5416. }}
  5417. >
  5418. {this.state.orgCodeUrl &&
  5419. this.state.visible &&
  5420. this.state.activeKey === "1" ? (
  5421. <ImgList
  5422. domId={"addService3"}
  5423. fileList={this.state.orgCodeUrl}
  5424. ItemWidth={"96px"}
  5425. />
  5426. ) : (
  5427. <div />
  5428. )}
  5429. </div>
  5430. <Modal
  5431. maskClosable={false}
  5432. footer={null}
  5433. width={"50%"}
  5434. visible={this.state.previewVisible}
  5435. onCancel={() => {
  5436. this.setState({
  5437. previewVisible: false,
  5438. rotateDeg: 0,
  5439. });
  5440. }}
  5441. >
  5442. <img
  5443. alt=""
  5444. style={{
  5445. width: "100%",
  5446. transform: `rotate(${this.state.rotateDeg}deg)`,
  5447. }}
  5448. src={this.state.previewImage || ""}
  5449. />
  5450. <Button
  5451. onClick={this.rotate}
  5452. style={{
  5453. position: "relative",
  5454. left: "50%",
  5455. transform: "translateX(-50%)",
  5456. }}
  5457. >
  5458. 旋转
  5459. </Button>
  5460. <Button
  5461. onClick={this.upImg}
  5462. style={{
  5463. position: "absolute",
  5464. left: -81,
  5465. top: "50%",
  5466. transform: "translateY(-50%)",
  5467. }}
  5468. >
  5469. 上一张
  5470. </Button>
  5471. <Button
  5472. onClick={this.downImg}
  5473. style={{
  5474. position: "absolute",
  5475. right: -81,
  5476. top: "50%",
  5477. transform: "translateY(-50%)",
  5478. }}
  5479. >
  5480. 下一张
  5481. </Button>
  5482. </Modal>
  5483. <Button
  5484. style={{
  5485. float: "right",
  5486. marginRight: "140px",
  5487. marginTop: "20px",
  5488. }}
  5489. onClick={this.getOrderLog}
  5490. >
  5491. 查看订单日志
  5492. </Button>
  5493. </FormItem>
  5494. <FormItem
  5495. labelCol={{ span: 4 }}
  5496. wrapperCol={{ span: 18 }}
  5497. label="补充协议"
  5498. >
  5499. {/*<Upload*/}
  5500. {/* className="demandDetailShow-upload"*/}
  5501. {/* listType="picture-card"*/}
  5502. {/* fileList={this.state.replenishUrl}*/}
  5503. {/* onPreview={(file) => {*/}
  5504. {/* this.setState({*/}
  5505. {/* previewImage: file.url || file.thumbUrl,*/}
  5506. {/* previewVisibles: true,*/}
  5507. {/* });*/}
  5508. {/* }}*/}
  5509. {/*/>*/}
  5510. <div
  5511. style={{
  5512. paddingTop: "10px",
  5513. paddingBottom: "10px",
  5514. }}
  5515. >
  5516. {this.state.visible &&
  5517. this.state.activeKey === "1" &&
  5518. this.state.replenishUrl ? (
  5519. <ImgList
  5520. domId={"addService4"}
  5521. fileList={this.state.replenishUrl}
  5522. ItemWidth={"96px"}
  5523. />
  5524. ) : (
  5525. <div />
  5526. )}
  5527. </div>
  5528. <Modal
  5529. maskClosable={false}
  5530. footer={null}
  5531. width={"50%"}
  5532. visible={this.state.previewVisibles}
  5533. onCancel={() => {
  5534. this.setState({
  5535. previewVisibles: false,
  5536. rotateDeg: 0,
  5537. });
  5538. }}
  5539. >
  5540. <img
  5541. alt=""
  5542. style={{
  5543. width: "100%",
  5544. transform: `rotate(${this.state.rotateDeg}deg)`,
  5545. }}
  5546. src={this.state.previewImage || ""}
  5547. />
  5548. <Button
  5549. onClick={this.rotates}
  5550. style={{
  5551. position: "relative",
  5552. left: "50%",
  5553. transform: "translateX(-50%)",
  5554. }}
  5555. >
  5556. 旋转
  5557. </Button>
  5558. <Button
  5559. onClick={this.upImgs}
  5560. style={{
  5561. position: "absolute",
  5562. left: -81,
  5563. top: "50%",
  5564. transform: "translateY(-50%)",
  5565. }}
  5566. >
  5567. 上一张
  5568. </Button>
  5569. <Button
  5570. onClick={this.downImgs}
  5571. style={{
  5572. position: "absolute",
  5573. right: -81,
  5574. top: "50%",
  5575. transform: "translateY(-50%)",
  5576. }}
  5577. >
  5578. 下一张
  5579. </Button>
  5580. </Modal>
  5581. </FormItem>
  5582. </div>
  5583. )}
  5584. </div>
  5585. {/* 服务内容 */}
  5586. <div class="clearfix" style={{ display: "flex", margin: " 0 0 10px 80px" }}>
  5587. <div style={{ marginRight: "6px" }}>
  5588. <div style={{ display: "flex" }}><span style={{ color: 'red' }}>*</span><span style={{ color: "#333" }}>服务内容:</span></div>
  5589. </div>
  5590. <div>
  5591. {this.state.processStatus == 0 ? <div> <PicturesWall
  5592. domId={"addServiceContent"}
  5593. fileList={this.getContentUrl}
  5594. pictureUrl={this.state.contentUrl}
  5595. url="/api/admin/order/uploadOrderImg"
  5596. sign=""
  5597. />
  5598. <p> <span style={{ color: "red", display: "inline-block" }}>(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)</span>图片建议:要清晰。</p></div> : this.state.contentUrl.length > 0 ? <div><ImgList
  5599. domId={"addService13"}
  5600. fileList={this.state.contentUrl}
  5601. ItemWidth={"96px"}
  5602. />
  5603. <Modal
  5604. maskClosable={false}
  5605. footer={null}
  5606. width={"50%"}
  5607. visible={this.state.previewVisibleCont}
  5608. onCancel={() => {
  5609. this.setState({
  5610. previewVisibleCont: false,
  5611. rotateDeg: 0,
  5612. });
  5613. }}
  5614. >
  5615. <img
  5616. alt=""
  5617. style={{
  5618. width: "100%",
  5619. transform: `rotate(${this.state.rotateDeg}deg)`,
  5620. }}
  5621. src={this.state.previewImage || ""}
  5622. />
  5623. <Button
  5624. onClick={this.rotateCont}
  5625. style={{
  5626. position: "relative",
  5627. left: "50%",
  5628. transform: "translateX(-50%)",
  5629. }}
  5630. >
  5631. 旋转
  5632. </Button>
  5633. <Button
  5634. onClick={this.upImgCont}
  5635. style={{
  5636. position: "absolute",
  5637. left: -81,
  5638. top: "50%",
  5639. transform: "translateY(-50%)",
  5640. }}
  5641. >
  5642. 上一张
  5643. </Button>
  5644. <Button
  5645. onClick={this.downImgCont}
  5646. style={{
  5647. position: "absolute",
  5648. right: -81,
  5649. top: "50%",
  5650. transform: "translateY(-50%)",
  5651. }}
  5652. >
  5653. 下一张
  5654. </Button>
  5655. </Modal>
  5656. </div> : "暂无附件!"}
  5657. </div>
  5658. </div>
  5659. {/* 服务内容结束 */}
  5660. <div className="clearfix">
  5661. {this.state.processStatus == 0 ? (
  5662. <div className="clearfix">
  5663. <FormItem
  5664. labelCol={{ span: 4 }}
  5665. wrapperCol={{ span: 16 }}
  5666. label="订单留言"
  5667. >
  5668. <Input
  5669. ref="orderRemarksRef"
  5670. type="textarea"
  5671. placeholder="请输入订单留言"
  5672. rows={4}
  5673. value={this.state.orderRemarks}
  5674. onChange={(e) => {
  5675. this.setState({
  5676. orderRemarks: e.target.value,
  5677. });
  5678. }}
  5679. style={{ width: "95%" }}
  5680. />
  5681. <span className="mandatory">*</span>
  5682. <div className="mandatory">
  5683. 重要提示:请详细填写合同中包含的服务内容、服务年限、时间节点等
  5684. </div>
  5685. </FormItem>
  5686. </div>
  5687. ) : (
  5688. <FormItem
  5689. labelCol={{ span: 4 }}
  5690. wrapperCol={{ span: 16 }}
  5691. label="订单留言"
  5692. >
  5693. <p
  5694. style={{ width: 500, wordWrap: "break-word" }}
  5695. >
  5696. {this.state.orderRemarks}
  5697. </p>
  5698. </FormItem>
  5699. )}
  5700. </div>
  5701. <div className="clearfix">
  5702. <FormItem
  5703. className="half-item"
  5704. {...formItemLayout}
  5705. label="订单负责人"
  5706. >
  5707. <span>{this.state.salesmanName}</span>
  5708. </FormItem>
  5709. <FormItem
  5710. className="half-item"
  5711. {...formItemLayout}
  5712. label="订单负责人电话"
  5713. >
  5714. <span>{this.state.salesmanMobile}</span>
  5715. </FormItem>
  5716. </div>
  5717. <div className="clearfix">
  5718. <FormItem
  5719. className="half-item"
  5720. {...formItemLayout}
  5721. label="当前财务负责人"
  5722. >
  5723. <span>{this.state.nowFinance}</span>
  5724. </FormItem>
  5725. <FormItem
  5726. className="half-item"
  5727. {...formItemLayout}
  5728. label="当前财务负责人电话"
  5729. >
  5730. <span>{this.state.nowFinanceMobile}</span>
  5731. </FormItem>
  5732. </div>
  5733. <div className="clearfix">
  5734. <FormItem
  5735. className="half-item"
  5736. {...formItemLayout}
  5737. style={{ opacity: ".5" }}
  5738. label="原订单负责人"
  5739. >
  5740. <span>{this.state.oldSalesmanName}</span>
  5741. </FormItem>
  5742. <FormItem
  5743. className="half-item"
  5744. {...formItemLayout}
  5745. style={{ opacity: ".5" }}
  5746. label="原订单负责人电话"
  5747. >
  5748. <span>{this.state.oldSalesmanMobile}</span>
  5749. </FormItem>
  5750. </div>
  5751. <div className="clearfix">
  5752. <FormItem
  5753. className="half-item"
  5754. style={{ opacity: ".5" }}
  5755. {...formItemLayout}
  5756. label="实际财务操作人"
  5757. >
  5758. <span>{this.state.financeName}</span>
  5759. </FormItem>
  5760. <FormItem
  5761. className="half-item"
  5762. {...formItemLayout}
  5763. style={{ opacity: ".5" }}
  5764. label="实际财务操作人电话"
  5765. >
  5766. <span>{this.state.financeMobile}</span>
  5767. </FormItem>
  5768. </div>
  5769. {/* 新增协单人员 */}
  5770. <div>
  5771. <div style={{ marginLeft: "50px", display: 'flex' }}>
  5772. <div
  5773. style={{
  5774. minWidth: '66px',
  5775. maxWidth: '100px',
  5776. fontSize: "12px",
  5777. color: "red",
  5778. }}
  5779. >
  5780. 协单人员 :
  5781. </div>
  5782. <div>
  5783. {this.state.personnel.length > 0
  5784. ? this.state.personnel.map(function (value, key) {
  5785. return (
  5786. <Tag
  5787. style={{ marginBottom: '5px' }}
  5788. key={value.id}
  5789. closable={closable}
  5790. onClose={(e) => {
  5791. e.preventDefault();
  5792. confirm({
  5793. title: "确定删除此人员吗?",
  5794. // content: (
  5795. // <span style={{ color: "red" }}>
  5796. // 删除后会将该项目下的所有催款节点自动清除!!!
  5797. // </span>
  5798. // ),
  5799. onOk() {
  5800. $.ajax({
  5801. method: "post",
  5802. dataType: "json",
  5803. crossDomain: false,
  5804. url:
  5805. globalConfig.context +
  5806. "/api/admin/newOrder/deleteAssist",
  5807. data: {
  5808. id: value.id,
  5809. },
  5810. success: function (data) {
  5811. if (data.error.length) {
  5812. message.warning(
  5813. data.error[0].message
  5814. );
  5815. } else {
  5816. message.success("删除成功");
  5817. assistList();
  5818. }
  5819. }.bind(this),
  5820. }).always(
  5821. function () {
  5822. this.setState({
  5823. loading: false,
  5824. });
  5825. }.bind(this)
  5826. );
  5827. },
  5828. onCancel() { },
  5829. });
  5830. }}
  5831. >
  5832. {value.name}
  5833. </Tag>
  5834. );
  5835. })
  5836. : "无"}
  5837. </div>
  5838. {/* <div style={{opacity:'0'}}>1213131132</div> */}
  5839. </div>
  5840. <div
  5841. style={{
  5842. margin: "10px 0 0 50px",
  5843. display: this.state.disabledView,
  5844. }}
  5845. >
  5846. <Button
  5847. type="primary"
  5848. onClick={() => {
  5849. this.setState({
  5850. coorVisible: "block",
  5851. coor: "",
  5852. });
  5853. }}
  5854. >
  5855. 添加协单人员
  5856. </Button>
  5857. {/* 提示 */}
  5858. <div style={{ color: "red" }}>
  5859. 注:协单人员为技术人员,陪同营销人员进行订单协作等相关工作,填写后将统计至相关的奖金、提成等
  5860. </div>
  5861. </div>
  5862. {/*添加协单人员 */}
  5863. <div
  5864. style={{
  5865. margin: "10px 0 0 50px",
  5866. display: this.state.coorVisible,
  5867. }}
  5868. >
  5869. <Form
  5870. onSubmit={this.handleSubmit}
  5871. ref={this.formRef}
  5872. >
  5873. <Form.Item
  5874. {...formItemLayout}
  5875. label=""
  5876. name="coor"
  5877. hasFeedback
  5878. >
  5879. <AutoComplete
  5880. // autocomplete="off"
  5881. allowClear
  5882. dataSource={dataSourceView}
  5883. style={{ width: 200 }}
  5884. onSelect={this.onSelectView}
  5885. onSearch={this.handleSearch}
  5886. placeholder="请输入名称"
  5887. />
  5888. </Form.Item>
  5889. </Form>
  5890. <div style={{ marginLeft: "10px" }}>
  5891. <Button
  5892. type="primary"
  5893. style={{ marginRight: "54px" }}
  5894. onClick={this.submitOrder}
  5895. loading={this.state.loading}
  5896. >
  5897. 保存
  5898. </Button>
  5899. <Button
  5900. onClick={() => {
  5901. this.setState({
  5902. coorVisible: "none",
  5903. });
  5904. }}
  5905. >
  5906. 取消
  5907. </Button>
  5908. </div>
  5909. </div>
  5910. </div>
  5911. {/* 分界线 */}
  5912. <div
  5913. style={{
  5914. borderTop: "1px solid #333",
  5915. margin: "5px 0",
  5916. }}
  5917. ></div>
  5918. {/* 上门服务次数 */}
  5919. <div>
  5920. <div
  5921. style={{
  5922. display: "flex",
  5923. justifyContent: "space-between",
  5924. }}
  5925. >
  5926. <div
  5927. style={{ marginLeft: "50px", fontSize: "20px" }}
  5928. >
  5929. 上门服务次数
  5930. </div>
  5931. <div>
  5932. <Button
  5933. type="primary"
  5934. style={{ marginRight: "5px" }}
  5935. onClick={() => {
  5936. this.publicByOrder();
  5937. this.setState({
  5938. modalRecord: true,
  5939. });
  5940. }}
  5941. >
  5942. 查看上门记录
  5943. </Button>
  5944. <Button
  5945. style={{ display: this.state.disabledView }}
  5946. type="primary"
  5947. onClick={() => {
  5948. this.setState({
  5949. modalView: true,
  5950. dateView: '',
  5951. contentView: '',
  5952. remarksView: '',
  5953. contentViewLength: 0,
  5954. contentViewLength1: 0,
  5955. });
  5956. }}
  5957. >
  5958. 添加上门次数
  5959. </Button>
  5960. </div>
  5961. </div>
  5962. {/* 上门服务表格 */}
  5963. <div
  5964. className="patent-table"
  5965. style={{ marginBottom: 10 }}
  5966. >
  5967. <Spin spinning={this.state.loading}>
  5968. <Table
  5969. columns={this.state.columnsView}
  5970. scroll={{ x: "max-content", y: 0 }}
  5971. dataSource={this.state.dataView}
  5972. pagination={false}
  5973. // onRowClick={this.tableRowClick}
  5974. bordered
  5975. size="small"
  5976. />
  5977. </Spin>
  5978. </div>
  5979. {/* 查看上门记录 */}
  5980. <Modal
  5981. footer=""
  5982. title="技术人员上门详细记录"
  5983. visible={this.state.modalRecord}
  5984. width="900px"
  5985. onCancel={() => {
  5986. this.setState({
  5987. modalRecord: false,
  5988. });
  5989. }}
  5990. >
  5991. <Spin spinning={this.state.loading}>
  5992. <Table
  5993. columns={this.state.columnsRecord}
  5994. scroll={{ x: "max-content", y: 0 }}
  5995. dataSource={this.state.publicView}
  5996. pagination={false}
  5997. // onRowClick={this.tableRowClick}
  5998. bordered
  5999. size="small"
  6000. />
  6001. </Spin>
  6002. </Modal>
  6003. {/* 添加上门次数模态框 */}
  6004. <Modal
  6005. footer=""
  6006. title="新增上门次数"
  6007. visible={this.state.modalView}
  6008. key={this.state.viewKey}
  6009. onCancel={() => {
  6010. this.setState({
  6011. modalView: false,
  6012. viewKey: this.state.viewKey + 1,
  6013. });
  6014. }}
  6015. >
  6016. <Form
  6017. onSubmit={this.handleSubmit}
  6018. ref={this.formRef}
  6019. style={{ marginRight: "120px" }}
  6020. >
  6021. <Form.Item
  6022. {...formItemLayout}
  6023. label="上门时间"
  6024. name="date"
  6025. hasFeedback
  6026. >
  6027. <DatePicker
  6028. placeholder="预计技术员上门服务时间"
  6029. onChange={(date, dateString) => {
  6030. this.setState({
  6031. dateView: dateString,
  6032. });
  6033. }}
  6034. />
  6035. </Form.Item>
  6036. <Form.Item
  6037. {...formItemLayout}
  6038. label="服务内容"
  6039. name="remarks"
  6040. hasFeedback
  6041. style={{ position: 'relative' }}
  6042. >
  6043. <TextArea
  6044. rows={4}
  6045. placeholder="需要技术员上门服务内容"
  6046. onChange={(e) => {
  6047. this.setState({
  6048. contentView: e.target.value,
  6049. // contentViewLength:this.state.contentView.length+1
  6050. }, () => {
  6051. if (!this.state.contentView) {
  6052. this.setState({
  6053. contentViewLength: 0,
  6054. })
  6055. } else {
  6056. this.setState({
  6057. contentViewLength: this.state.contentView.length
  6058. })
  6059. }
  6060. });
  6061. }}
  6062. maxLength={500}
  6063. >
  6064. {/* <span>{this.state.contentViewLength}</span> */}
  6065. </TextArea>
  6066. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength + '/500'}</div>
  6067. </Form.Item>
  6068. <Form.Item
  6069. {...formItemLayout}
  6070. label="备注"
  6071. name="remarks"
  6072. hasFeedback
  6073. style={{ position: 'relative' }}
  6074. >
  6075. <TextArea
  6076. rows={4}
  6077. maxLength={500}
  6078. placeholder="需要技术员注意事项"
  6079. onChange={(e) => {
  6080. this.setState({
  6081. remarksView: e.target.value,
  6082. }, () => {
  6083. if (!this.state.remarksView) {
  6084. this.setState({
  6085. contentViewLength1: 0,
  6086. })
  6087. } else {
  6088. this.setState({
  6089. contentViewLength1: this.state.remarksView.length
  6090. })
  6091. }
  6092. });
  6093. }}
  6094. />
  6095. <div style={{ position: 'absolute', right: '20px', bottom: '-5px', zIndex: '10' }}>{this.state.contentViewLength1 + '/500'}</div>
  6096. </Form.Item>
  6097. </Form>
  6098. <div
  6099. style={{
  6100. display: "flex",
  6101. justifyContent: "center",
  6102. }}
  6103. >
  6104. <Button
  6105. onClick={this.submitView}
  6106. type="primary"
  6107. loading={this.state.loading}
  6108. >
  6109. 提交
  6110. </Button>
  6111. <Button
  6112. type="dashed"
  6113. style={{ marginLeft: "15px" }}
  6114. onClick={() => {
  6115. this.setState({
  6116. modalView: false,
  6117. viewKey: this.state.viewKey + 1,
  6118. dateView: '',
  6119. contentView: '',
  6120. remarksView: '',
  6121. contentViewLength: 0,
  6122. contentViewLength1: 0,
  6123. });
  6124. }}
  6125. >
  6126. 取消
  6127. </Button>
  6128. </div>
  6129. </Modal>
  6130. </div>
  6131. {/* */}
  6132. <div>
  6133. <span
  6134. style={{ marginLeft: "50px", fontSize: "20px" }}
  6135. >
  6136. 项目业务
  6137. </span>
  6138. {this.state.processStatus == 0 ? (
  6139. <Button
  6140. type="primary"
  6141. onClick={this.addDetailed}
  6142. style={{
  6143. float: "right",
  6144. marginRight: "50px",
  6145. marginBottom: "15px",
  6146. }}
  6147. >
  6148. 添加项目明细
  6149. </Button>
  6150. ) : (
  6151. ""
  6152. )}
  6153. </div>
  6154. <div
  6155. className="patent-table"
  6156. style={{ marginBottom: 10 }}
  6157. >
  6158. <Spin spinning={this.state.loading}>
  6159. <Table
  6160. columns={this.state.columns}
  6161. scroll={{ x: "max-content", y: 0 }}
  6162. dataSource={this.state.dataSource}
  6163. pagination={this.state.pagination}
  6164. onRowClick={this.tableRowClick}
  6165. bordered
  6166. size="small"
  6167. />
  6168. </Spin>
  6169. </div>
  6170. <div
  6171. style={{
  6172. display: cuiDataList.length ? "block" : "none",
  6173. }}
  6174. >
  6175. <span
  6176. style={{ marginLeft: "50px", fontSize: "20px" }}
  6177. >
  6178. 旧催款节点
  6179. </span>
  6180. <Button
  6181. type="primary"
  6182. // onClick={this.addcontact}
  6183. disabled
  6184. onClick={(e) => {
  6185. cuiDataList.length
  6186. ? this.addcontact()
  6187. : this.addcontactNew();
  6188. }}
  6189. style={{
  6190. float: "right",
  6191. marginRight: "50px",
  6192. marginBottom: "15px",
  6193. display:
  6194. this.state.processStatus == 0
  6195. ? "block"
  6196. : "none",
  6197. }}
  6198. >
  6199. 添加催款节点
  6200. </Button>
  6201. </div>
  6202. <div
  6203. className="clearfix"
  6204. style={{
  6205. display: cuiDataList.length ? "block" : "none",
  6206. }}
  6207. >
  6208. <Spin spinning={this.state.loading}>
  6209. <Form layout="horizontal">
  6210. <Table
  6211. pagination={false}
  6212. columns={this.state.ContactsLists}
  6213. dataSource={this.state.contactList}
  6214. scroll={{ x: "max-content", y: 0 }}
  6215. bordered
  6216. size="small"
  6217. />
  6218. <Col
  6219. span={24}
  6220. offset={9}
  6221. style={{ marginTop: "15px" }}
  6222. ></Col>
  6223. </Form>
  6224. </Spin>
  6225. </div>
  6226. <div
  6227. style={{
  6228. display: cuiDataList.length ? "none" : "block",
  6229. }}
  6230. >
  6231. <span
  6232. style={{
  6233. marginLeft: "50px",
  6234. fontSize: "20px",
  6235. }}
  6236. >
  6237. 新催款节点
  6238. </span>
  6239. <span
  6240. style={{
  6241. display: "inline-block",
  6242. marginLeft: 10,
  6243. color: "red",
  6244. }}
  6245. >
  6246. 金额总计(万元): {this.state.totalCui}
  6247. </span>
  6248. <Button
  6249. type="primary"
  6250. disabled={this.state.addFlag ? true : false}
  6251. // onClick={this.addcontact}
  6252. onClick={(e) => {
  6253. this.setState({ addFlag: true });
  6254. this.addcontactNew();
  6255. }}
  6256. style={{
  6257. float: "right",
  6258. marginRight: "50px",
  6259. marginBottom: "15px",
  6260. display:
  6261. this.state.processStatus == 0
  6262. ? "block"
  6263. : "none",
  6264. }}
  6265. >
  6266. 添加催款节点
  6267. </Button>
  6268. </div>
  6269. <div
  6270. className="clearfix"
  6271. style={{
  6272. display: cuiDataList.length ? "none" : "block",
  6273. }}
  6274. >
  6275. <Spin spinning={this.state.loading}>
  6276. <Form layout="horizontal">
  6277. <Table
  6278. pagination={false}
  6279. columns={this.state.ContactsListsNew}
  6280. dataSource={this.state.contactListNew}
  6281. scroll={{ x: "max-content", y: 0 }}
  6282. bordered
  6283. size="small"
  6284. />
  6285. <Col
  6286. span={24}
  6287. offset={9}
  6288. style={{ marginTop: "15px" }}
  6289. ></Col>
  6290. </Form>
  6291. </Spin>
  6292. </div>
  6293. {this.state.processStatus == 0 ? (
  6294. <div
  6295. className="addSave"
  6296. style={{ marginTop: "15px" }}
  6297. >
  6298. <Button
  6299. className="cancel"
  6300. type="primary"
  6301. onClick={this.handleCancels}
  6302. style={{ marginLeft: "200px" }}
  6303. htmlType="submit"
  6304. loading={this.state.loading}
  6305. >
  6306. 签单
  6307. </Button>
  6308. <Button
  6309. className="cancel"
  6310. type="primary"
  6311. onClick={this.handleCancelq}
  6312. style={{ marginLeft: "50px" }}
  6313. htmlType="submit"
  6314. loading={this.state.loading}
  6315. >
  6316. 保存
  6317. </Button>
  6318. <Button
  6319. className="cancel"
  6320. type="ghost"
  6321. onClick={this.handleCancelclose}
  6322. style={{ marginLeft: "50px" }}
  6323. >
  6324. 取消
  6325. </Button>
  6326. </div>
  6327. ) : (
  6328. ""
  6329. )}
  6330. </div>
  6331. </TabPane>
  6332. <TabPane tab="合同变更发起" key="2">
  6333. {
  6334. <div>
  6335. <div className="clearfix">
  6336. <FormItem
  6337. className="half-item"
  6338. {...formItemLayout}
  6339. label="客户名称"
  6340. >
  6341. <span>{this.state.userName}</span>
  6342. <EnterpriseNameChange
  6343. type="journal"
  6344. style={{ marginLeft: 10 }}
  6345. enterpriseId={this.state.orderUid}
  6346. />
  6347. </FormItem>
  6348. </div>
  6349. <div className="clearfix">
  6350. <FormItem
  6351. className="half-item"
  6352. {...formItemLayout}
  6353. label="合同编号"
  6354. >
  6355. <span>{this.state.contractNo}</span>
  6356. </FormItem>
  6357. </div>
  6358. <div className="clearfix">
  6359. <FormItem
  6360. className="half-item"
  6361. {...formItemLayout}
  6362. label="申请变更部门"
  6363. >
  6364. {/* {!this.state.mark ? ( */}
  6365. <span>{this.state.depName}</span>
  6366. {/* ) : (
  6367. <span>{contractData.depName}</span>
  6368. )} */}
  6369. </FormItem>
  6370. <FormItem
  6371. className="half-item"
  6372. {...formItemLayout}
  6373. label="申请人"
  6374. >
  6375. <span>{this.state.salesmanName}</span>
  6376. </FormItem>
  6377. </div>
  6378. <div className="clearfix">
  6379. <FormItem
  6380. labelCol={{ span: 4 }}
  6381. wrapperCol={{ span: 18 }}
  6382. label="变更类型"
  6383. >
  6384. {/* {!this.state.mark ? ( */}
  6385. <Select
  6386. placeholder="选择合同变更类型"
  6387. style={{ width: 200 }}
  6388. disabled={this.state.changeFlag}
  6389. value={this.state.typeChange}
  6390. onChange={(e) => {
  6391. this.setState({
  6392. typeChange: e,
  6393. changeFlag: true,
  6394. });
  6395. if (e == 1) {
  6396. this.setState({
  6397. hetongFlag: false,
  6398. listFlag: false,
  6399. listCuiFlag: false,
  6400. tuiKuanFlag: false,
  6401. displayList: false,
  6402. });
  6403. } else if (e == 2) {
  6404. this.setState({
  6405. hetongFlag: true,
  6406. listFlag: false,
  6407. listCuiFlag: false,
  6408. tuiKuanFlag: true,
  6409. displayList: false,
  6410. });
  6411. } else if (e == 3) {
  6412. this.setState({
  6413. listFlag: false,
  6414. hetongFlag: false,
  6415. listCuiFlag: false,
  6416. tuiKuanFlag: false,
  6417. displayList: true,
  6418. });
  6419. } else if (e == 4) {
  6420. this.setState({
  6421. listFlag: false,
  6422. listCuiFlag: false,
  6423. hetongFlag: false,
  6424. tuiKuanFlag: true,
  6425. displayList: false,
  6426. });
  6427. } else if (e == 5) {
  6428. this.setState({
  6429. listFlag: false,
  6430. listCuiFlag: false,
  6431. hetongFlag: true,
  6432. tuiKuanFlag: true,
  6433. displayList: false,
  6434. });
  6435. } else {
  6436. this.setState({
  6437. listFlag: true,
  6438. hetongFlag: true,
  6439. listCuiFlag: true,
  6440. tuiKuanFlag: false,
  6441. displayList: false,
  6442. });
  6443. }
  6444. }}
  6445. >
  6446. <Option value={0}>退单退款</Option>
  6447. <Option value={1}>项目及金额变更</Option>
  6448. <Option value={2}>仅项目变更</Option>
  6449. <Option value={3}>仅金额变更</Option>
  6450. <Option value={4}>重报</Option>
  6451. <Option value={5}>赠送</Option>
  6452. </Select>
  6453. <Button
  6454. style={{ marginLeft: 10 }}
  6455. onClick={(e) => {
  6456. this.setState({
  6457. listFlag: false,
  6458. hetongFlag: false,
  6459. listCuiFlag: false,
  6460. tuiKuanFlag: false,
  6461. displayList: false,
  6462. startRemarks: "",
  6463. remarksC: "",
  6464. voucherUrl: [],
  6465. changeAmount: "0",
  6466. applicant: undefined,
  6467. depNameChange: undefined,
  6468. typeChange: undefined,
  6469. changeFlag: false,
  6470. });
  6471. }}
  6472. >
  6473. 重置
  6474. </Button>
  6475. {this.state.status === 3 ? (
  6476. <Button
  6477. type="danger"
  6478. style={{
  6479. float: "right",
  6480. backgroundColor: "red",
  6481. color: "white",
  6482. position: "absolute",
  6483. right: 0,
  6484. height: 50,
  6485. borderRadius: 20,
  6486. zIndex: 100,
  6487. top: 0,
  6488. }}
  6489. onClick={(e) => {
  6490. e.stopPropagation();
  6491. this.showConfirmChange(this.deleteChange);
  6492. }}
  6493. >
  6494. 取消本次变更
  6495. </Button>
  6496. ) : (
  6497. ""
  6498. )}
  6499. {/* <Button type="danger" >取消本次变更</Button> */}
  6500. </FormItem>
  6501. </div>
  6502. <div className="clearfix">
  6503. <FormItem
  6504. labelCol={{ span: 4 }}
  6505. wrapperCol={{ span: 18 }}
  6506. label="合同额(万元)"
  6507. >
  6508. {/* {!this.state.mark ? ( */}
  6509. <Input
  6510. placeholder="请输入合同额"
  6511. disabled={this.state.hetongFlag}
  6512. ref="signTotalAmount"
  6513. value={this.state.totalAmount}
  6514. onChange={(e) => {
  6515. this.setState({
  6516. totalAmount: e.target.value,
  6517. });
  6518. }}
  6519. style={{ width: "240px" }}
  6520. />
  6521. {/* ) : (
  6522. <span>{contractData.totalAmount}</span>
  6523. )} */}
  6524. </FormItem>
  6525. <FormItem
  6526. labelCol={{ span: 4 }}
  6527. wrapperCol={{ span: 18 }}
  6528. label="已收款(万元)"
  6529. >
  6530. <span>
  6531. {this.state.settlementAmount}
  6532. &nbsp;&nbsp;&nbsp;&nbsp;
  6533. <span style={{ color: "red" }}>
  6534. (注:已收款与现实收款不符,请与财务专员联系)
  6535. </span>
  6536. </span>
  6537. </FormItem>
  6538. <FormItem
  6539. labelCol={{ span: 4 }}
  6540. wrapperCol={{ span: 18 }}
  6541. label="申请退款(万元)"
  6542. >
  6543. {/* {!this.state.mark ? ( */}
  6544. <Input
  6545. placeholder="请输入申请退款"
  6546. ref="signTotalAmount"
  6547. disabled={this.state.tuiKuanFlag}
  6548. value={this.state.changeAmount}
  6549. onChange={(e) => {
  6550. this.setState({
  6551. changeAmount: e.target.value,
  6552. });
  6553. }}
  6554. style={{ width: "240px" }}
  6555. />
  6556. {/* ) : (
  6557. <span>{contractData.changeAmount}</span>
  6558. )} */}
  6559. </FormItem>
  6560. </div>
  6561. {/* 动态展示项目以及催款节点 */}
  6562. <div
  6563. style={{
  6564. display: this.state.isCaoGao ? "block" : "none",
  6565. }}
  6566. >
  6567. <div>
  6568. <span
  6569. style={{
  6570. marginLeft: "50px",
  6571. fontSize: "20px",
  6572. }}
  6573. >
  6574. 项目业务
  6575. </span>
  6576. <span style={{ color: "red" }}>
  6577. (注:项目删除后,此项目的全部节点、全部工时,全部被删除,请谨慎删除!双击可修改对应金额数量!)
  6578. </span>
  6579. <Button
  6580. type="primary"
  6581. onClick={this.changeAddPro}
  6582. disabled={this.state.listFlag}
  6583. style={{
  6584. float: "right",
  6585. marginRight: "50px",
  6586. marginBottom: "15px",
  6587. display: this.state.displayList
  6588. ? "none"
  6589. : "block",
  6590. }}
  6591. >
  6592. 添加项目明细
  6593. </Button>
  6594. </div>
  6595. <div
  6596. className="patent-table"
  6597. style={{ marginBottom: 10 }}
  6598. >
  6599. <Spin spinning={this.state.loading}>
  6600. <Table
  6601. columns={this.state.proColumns}
  6602. dataSource={this.state.proDataSource}
  6603. scroll={{ x: "max-content", y: 0 }}
  6604. expandedRowRender={expandedRowRender}
  6605. pagination={this.state.pagination}
  6606. onRowDoubleClick={
  6607. this.state.listFlag
  6608. ? this.not
  6609. : this.editPro
  6610. }
  6611. bordered
  6612. size="small"
  6613. />
  6614. </Spin>
  6615. </div>
  6616. <div>
  6617. <span
  6618. style={{
  6619. marginLeft: "50px",
  6620. fontSize: "20px",
  6621. }}
  6622. >
  6623. 催款节点
  6624. </span>
  6625. <span style={{ color: "red" }}>
  6626. (注:节点删除后,无论节点是否触发,均会删除,请谨慎删除!双击可修改对应金额!)
  6627. </span>
  6628. {/* <span
  6629. style={{
  6630. display: "inline-block",
  6631. marginLeft: 10,
  6632. color: "red"
  6633. }}
  6634. >
  6635. 金额总计(万元): {this.state.totalCui}
  6636. </span> */}
  6637. <Button
  6638. type="primary"
  6639. onClick={(e) => {
  6640. this.changeAddCui();
  6641. }}
  6642. disabled={this.state.listCuiFlag}
  6643. style={{
  6644. float: "right",
  6645. marginRight: "50px",
  6646. marginBottom: "15px",
  6647. display: this.state.displayList
  6648. ? "none"
  6649. : "block",
  6650. }}
  6651. >
  6652. 添加催款节点
  6653. </Button>
  6654. </div>
  6655. <div className="clearfix">
  6656. <Spin spinning={this.state.loading}>
  6657. <Form layout="horizontal">
  6658. <Table
  6659. pagination={false}
  6660. columns={this.state.changeCuiList}
  6661. dataSource={this.state.cuiDataSource}
  6662. scroll={{ x: "max-content", y: 0 }}
  6663. onRowDoubleClick={
  6664. this.state.listCuiFlag
  6665. ? this.not
  6666. : this.editCui
  6667. }
  6668. bordered
  6669. size="small"
  6670. />
  6671. <Col
  6672. span={24}
  6673. offset={9}
  6674. style={{ marginTop: "15px" }}
  6675. ></Col>
  6676. </Form>
  6677. </Spin>
  6678. </div>
  6679. </div>
  6680. <div className="clearfix">
  6681. <FormItem
  6682. style={{ height: "auto" }}
  6683. labelCol={{ span: 4 }}
  6684. wrapperCol={{ span: 18 }}
  6685. label="变更原因"
  6686. >
  6687. {/* {!this.state.mark ? ( */}
  6688. <TextArea
  6689. rows={4}
  6690. placeholder="请输入变更原因"
  6691. ref="signTotalAmount"
  6692. style={{ width: "95%" }}
  6693. value={this.state.remarksC}
  6694. onChange={(e) => {
  6695. this.setState({
  6696. remarksC: e.target.value,
  6697. });
  6698. }}
  6699. />
  6700. {/* ) : (
  6701. <span>{contractData.remarks}</span>
  6702. )} */}
  6703. </FormItem>
  6704. </div>
  6705. <div className="clearfix">
  6706. <FormItem
  6707. style={{ height: "auto" }}
  6708. labelCol={{ span: 4 }}
  6709. wrapperCol={{ span: 18 }}
  6710. label="备注"
  6711. >
  6712. {/* {!this.state.mark ? ( */}
  6713. <TextArea
  6714. rows={4}
  6715. placeholder="请输入备注"
  6716. ref="signTotalAmount"
  6717. style={{ width: "95%" }}
  6718. value={this.state.startRemarks}
  6719. onChange={(e) => {
  6720. this.setState({
  6721. startRemarks: e.target.value,
  6722. });
  6723. }}
  6724. />
  6725. {/* ) : (
  6726. <span>{contractData.startRemarks}</span>
  6727. )} */}
  6728. </FormItem>
  6729. </div>
  6730. {/* ---- */}
  6731. <div className="clearfix">
  6732. <FormItem
  6733. labelCol={{ span: 4 }}
  6734. wrapperCol={{ span: 18 }}
  6735. label="变更凭证"
  6736. >
  6737. {/* {!this.state.mark ? ( */}
  6738. <PicturesWall
  6739. domId={"addService5"}
  6740. fileList={this.getVoucherUrl}
  6741. pictureUrl={this.state.voucherUrl}
  6742. url="/api/admin/orderChange/uploadFile"
  6743. sign="order_change_file"
  6744. />
  6745. {/* ) : (
  6746. <div>
  6747. <Upload
  6748. className="demandDetailShow-upload"
  6749. listType="picture-card"
  6750. fileList={this.state.voucherUrl}
  6751. onPreview={file => {
  6752. this.setState({
  6753. previewImage:
  6754. file.url || file.thumbUrl,
  6755. previewVisible: true
  6756. });
  6757. }}
  6758. />
  6759. <Modal
  6760. maskClosable={false}
  6761. footer={null}
  6762. visible={this.state.previewVisible}
  6763. onCancel={() => {
  6764. this.setState({
  6765. previewVisible: false
  6766. });
  6767. }}
  6768. >
  6769. <img
  6770. alt=""
  6771. style={{ width: "100%" }}
  6772. src={this.state.previewImage || ""}
  6773. />
  6774. </Modal>
  6775. </div>
  6776. )} */}
  6777. <p>图片建议:要清晰。</p>
  6778. </FormItem>
  6779. </div>
  6780. {/* {!this.state.mark ? ( */}
  6781. <div className="clearfix">
  6782. <Button
  6783. type="primary"
  6784. style={{ float: "right", marginRight: 40 }}
  6785. // onClick={this.changeApply}
  6786. loading={this.state.loading}
  6787. onClick={(e) => {
  6788. if (this.state.isCaoGao) {
  6789. this.submitChange();
  6790. } else {
  6791. this.changeApply();
  6792. }
  6793. }}
  6794. >
  6795. {this.state.isCaoGao
  6796. ? "发起变更申请"
  6797. : this.state.typeChange == 0
  6798. ? "发起变更申请"
  6799. : "下一步"}
  6800. </Button>
  6801. </div>
  6802. {/* ) : (
  6803. ""
  6804. )} */}
  6805. </div>
  6806. }
  6807. </TabPane>
  6808. {this.state.isJilu ? (
  6809. <TabPane tab={"最近变更记录"} key="3">
  6810. <div>
  6811. <div
  6812. style={{
  6813. borderRadius: "50%",
  6814. width: 300,
  6815. height: 300,
  6816. position: "absolute",
  6817. top: 230,
  6818. left: 525,
  6819. transform: "rotate(-5deg)",
  6820. zIndex: 1,
  6821. display:
  6822. this.state.detailChange.status == 4
  6823. ? "block"
  6824. : "none",
  6825. }}
  6826. >
  6827. <img src={tongguo} style={{ width: "100%" }} />
  6828. </div>
  6829. <div
  6830. style={{
  6831. borderRadius: "50%",
  6832. width: 300,
  6833. height: 300,
  6834. position: "absolute",
  6835. top: 284,
  6836. left: 586,
  6837. transform: "rotate(-5deg)",
  6838. zIndex: 1,
  6839. display:
  6840. this.state.detailChange.status == 5
  6841. ? "block"
  6842. : "none",
  6843. }}
  6844. >
  6845. <img src={quxiao} style={{ width: "63%" }} />
  6846. </div>
  6847. <div className="clearfix">
  6848. <FormItem
  6849. className="half-item"
  6850. {...formItemLayout}
  6851. label="客户名称"
  6852. >
  6853. <span>{this.state.userName}</span>
  6854. <EnterpriseNameChange
  6855. type="journal"
  6856. style={{ marginLeft: 10 }}
  6857. enterpriseId={this.state.orderUid}
  6858. />
  6859. </FormItem>
  6860. {/* */}
  6861. <FormItem
  6862. className="half-item"
  6863. {...formItemLayout}
  6864. label="合同编号"
  6865. >
  6866. <span>{this.state.contractNo}</span>
  6867. </FormItem>
  6868. </div>
  6869. <div className="clearfix">
  6870. <FormItem
  6871. className="half-item"
  6872. {...formItemLayout}
  6873. label="时间"
  6874. >
  6875. <span>
  6876. {this.state.detailChange.createTimes}
  6877. </span>
  6878. </FormItem>
  6879. <FormItem
  6880. className="half-item"
  6881. {...formItemLayout}
  6882. label="申请人"
  6883. >
  6884. <span>{this.state.salesmanName}</span>
  6885. </FormItem>
  6886. </div>
  6887. <div className="clearfix">
  6888. <FormItem
  6889. className="half-item"
  6890. {...formItemLayout}
  6891. label="当前进度"
  6892. >
  6893. <span>
  6894. {/*当前是进度角色是咨询师以及咨询师经理时使用shenhePeo函数,其他流程正常显示*/}
  6895. {this.state.detailChange.processState === 2 ||
  6896. this.state.detailChange.processState === 3
  6897. ? shenghePeo(
  6898. this.state.detailChange.processState ===
  6899. 2
  6900. ? this.state.detailChange
  6901. .consultantExamine
  6902. : this.state.detailChange
  6903. .managerExamine,
  6904. this.state.detailChange.processState
  6905. )
  6906. : getProcessStatusNew(
  6907. this.state.detailChange.processState,
  6908. this.state.detailChange.status
  6909. )}
  6910. </span>
  6911. </FormItem>
  6912. {/* <FormItem
  6913. className="half-item"
  6914. {...formItemLayout}
  6915. label="申请变更部门"
  6916. >
  6917. <span>{this.state.depName}</span>
  6918. </FormItem> */}
  6919. <FormItem
  6920. {...formItemLayout}
  6921. className="half-item"
  6922. label="变更类型"
  6923. >
  6924. <span>
  6925. {getChangeType(
  6926. this.state.detailChange.typeChange
  6927. )}
  6928. </span>
  6929. </FormItem>
  6930. </div>
  6931. {/* <div className="clearfix">
  6932. <FormItem
  6933. labelCol={{ span: 4 }}
  6934. wrapperCol={{ span: 18 }}
  6935. label="变更类型"
  6936. >
  6937. <span>
  6938. {getChangeType(
  6939. this.state.detailChange.typeChange
  6940. )}
  6941. </span>
  6942. </FormItem>
  6943. </div> */}
  6944. <div className="clearfix">
  6945. <FormItem
  6946. {...formItemLayout}
  6947. className="half-item"
  6948. label="合同额(万元)"
  6949. >
  6950. <span>
  6951. {this.state.detailChange.totalAmount}
  6952. </span>
  6953. </FormItem>
  6954. <FormItem
  6955. {...formItemLayout}
  6956. className="half-item"
  6957. label="已收款(万元)"
  6958. >
  6959. <span>
  6960. {this.state.detailChange.settlementAmount}
  6961. </span>
  6962. </FormItem>
  6963. </div>
  6964. <div className="clearfix">
  6965. <FormItem
  6966. {...formItemLayout}
  6967. className="half-item"
  6968. label="欠款(万元)"
  6969. >
  6970. <span>{this.state.detailChange.arrears}</span>
  6971. </FormItem>
  6972. <FormItem
  6973. {...formItemLayout}
  6974. className="half-item"
  6975. label="申请退款(万元)"
  6976. >
  6977. <span>
  6978. {this.state.detailChange.changeAmount}
  6979. </span>
  6980. </FormItem>
  6981. </div>
  6982. <div className="clearfix">
  6983. <FormItem
  6984. style={{ height: "auto" }}
  6985. labelCol={{ span: 4 }}
  6986. wrapperCol={{ span: 18 }}
  6987. label="变更原因"
  6988. >
  6989. <span>{this.state.detailChange.remarksC}</span>
  6990. </FormItem>
  6991. </div>
  6992. <div className="clearfix">
  6993. <FormItem
  6994. style={{ height: "auto" }}
  6995. labelCol={{ span: 4 }}
  6996. wrapperCol={{ span: 18 }}
  6997. label="备注"
  6998. >
  6999. <span>
  7000. {this.state.detailChange.startRemarks}
  7001. </span>
  7002. </FormItem>
  7003. </div>
  7004. {/* ---- */}
  7005. <div className="clearfix">
  7006. <FormItem
  7007. labelCol={{ span: 4 }}
  7008. wrapperCol={{ span: 18 }}
  7009. label="变更凭证"
  7010. >
  7011. <div>
  7012. {/*<Upload*/}
  7013. {/* className="demandDetailShow-upload"*/}
  7014. {/* listType="picture-card"*/}
  7015. {/* fileList={*/}
  7016. {/* this.state.detailChange.voucherUrl*/}
  7017. {/* }*/}
  7018. {/* onPreview={(file) => {*/}
  7019. {/* this.setState({*/}
  7020. {/* previewImage: file.url || file.thumbUrl,*/}
  7021. {/* previewVisible: true,*/}
  7022. {/* });*/}
  7023. {/* }}*/}
  7024. {/*/>*/}
  7025. <div
  7026. style={{
  7027. paddingTop: "10px",
  7028. paddingBottom: "10px",
  7029. }}
  7030. >
  7031. {this.state.detailChange &&
  7032. this.state.detailChange.voucherUrl &&
  7033. this.state.activeKey === "3" &&
  7034. this.state.visible ? (
  7035. <ImgList
  7036. fileList={
  7037. this.state.detailChange.voucherUrl
  7038. }
  7039. ItemWidth={"96px"}
  7040. />
  7041. ) : (
  7042. <div />
  7043. )}
  7044. </div>
  7045. {/*<Modal*/}
  7046. {/* maskClosable={false}*/}
  7047. {/* footer={null}*/}
  7048. {/* visible={this.state.previewVisible}*/}
  7049. {/* onCancel={() => {*/}
  7050. {/* this.setState({*/}
  7051. {/* previewVisible: false,*/}
  7052. {/* });*/}
  7053. {/* }}*/}
  7054. {/*>*/}
  7055. {/* <img*/}
  7056. {/* alt=""*/}
  7057. {/* style={{ width: "100%" }}*/}
  7058. {/* src={this.state.previewImage || ""}*/}
  7059. {/* />*/}
  7060. {/*</Modal>*/}
  7061. {this.state.status === 3 ? (
  7062. <Button
  7063. type="danger"
  7064. style={{
  7065. float: "right",
  7066. backgroundColor: "red",
  7067. color: "white",
  7068. position: "absolute",
  7069. right: 0,
  7070. height: 50,
  7071. borderRadius: 20,
  7072. zIndex: 100,
  7073. top: 0,
  7074. }}
  7075. onClick={(e) => {
  7076. e.stopPropagation();
  7077. this.showConfirmChange(
  7078. this.deleteChange
  7079. );
  7080. }}
  7081. >
  7082. 取消本次变更
  7083. </Button>
  7084. ) : (
  7085. ""
  7086. )}
  7087. </div>
  7088. </FormItem>
  7089. </div>
  7090. <ul
  7091. style={{
  7092. width: "868px",
  7093. overflow: "hidden",
  7094. paddingLeft: "90px",
  7095. paddingTop: "10px",
  7096. position: "relative",
  7097. bottom: "20px",
  7098. fontSize: "12px",
  7099. color: "rgba(0, 0, 0, 0.65)",
  7100. }}
  7101. >
  7102. {/* <span>操作人:</span> */}
  7103. {this.state.logData.map((item, index) => {
  7104. if (item.status == 0) {
  7105. item.status = "发起";
  7106. } else if (item.status == 1) {
  7107. item.status = "审核中";
  7108. } else if (item.status == 2) {
  7109. item.status = "通过";
  7110. } else if (item.status == 3) {
  7111. item.status = "驳回";
  7112. } else if (item.status == 4) {
  7113. item.status = "完成";
  7114. }
  7115. return (
  7116. <li
  7117. key={index}
  7118. style={{
  7119. width: "100%",
  7120. height: "auto",
  7121. wordBreak: "break-all",
  7122. marginBottom: "10px",
  7123. }}
  7124. >
  7125. {item.aname +
  7126. ":" +
  7127. "(" +
  7128. item.status +
  7129. ")" +
  7130. item.remarks}
  7131. </li>
  7132. );
  7133. })}
  7134. </ul>
  7135. {/* 动态展示项目以及催款节点 */}
  7136. <div>
  7137. <div>
  7138. <span
  7139. style={{
  7140. marginLeft: "50px",
  7141. fontSize: "20px",
  7142. }}
  7143. >
  7144. 项目业务
  7145. </span>
  7146. </div>
  7147. <div
  7148. className="patent-table"
  7149. style={{ marginBottom: 10 }}
  7150. >
  7151. <Spin spinning={this.state.loading}>
  7152. <Table
  7153. columns={this.state.detailColumns}
  7154. dataSource={this.state.proDataSource}
  7155. expandedRowRender={expandedRowRenderDetail}
  7156. pagination={this.state.pagination}
  7157. // onRowClick={this.tableRowClick}
  7158. bordered
  7159. size="small"
  7160. />
  7161. </Spin>
  7162. </div>
  7163. <div>
  7164. <span
  7165. style={{
  7166. marginLeft: "50px",
  7167. fontSize: "20px",
  7168. }}
  7169. >
  7170. 催款节点
  7171. </span>
  7172. </div>
  7173. <div className="clearfix">
  7174. <Spin spinning={this.state.loading}>
  7175. <Form layout="horizontal">
  7176. <Table
  7177. pagination={false}
  7178. columns={this.state.detailContactsLists}
  7179. dataSource={this.state.cuiDataSource}
  7180. scroll={{ x: "max-content", y: 0 }}
  7181. bordered
  7182. size="small"
  7183. />
  7184. <Col
  7185. span={24}
  7186. offset={9}
  7187. style={{ marginTop: "15px" }}
  7188. ></Col>
  7189. </Form>
  7190. </Spin>
  7191. </div>
  7192. </div>
  7193. </div>
  7194. </TabPane>
  7195. ) : (
  7196. ""
  7197. )}
  7198. </Tabs>
  7199. )}
  7200. </div>
  7201. </Spin>
  7202. </Form>
  7203. </Modal>
  7204. <Modal
  7205. maskClosable={false}
  7206. visible={this.state.changeVisible}
  7207. onOk={this.nextCancel}
  7208. onCancel={this.nextCancel}
  7209. width="900px"
  7210. title={"添加变更项目"}
  7211. footer=""
  7212. className="admin-desc-content"
  7213. >
  7214. <Form
  7215. layout="horizontal"
  7216. // id="demand-form"
  7217. >
  7218. <Spin spinning={this.state.loading}>
  7219. <div className="clearfix">
  7220. <FormItem
  7221. className="half-item"
  7222. {...formItemLayout}
  7223. label="服务名称"
  7224. >
  7225. <AutoComplete
  7226. className="certain-category-search"
  7227. dropdownClassName="certain-category-search-dropdown"
  7228. dropdownMatchSelectWidth={false}
  7229. dropdownStyle={{ width: 200 }}
  7230. style={{ width: "200px" }}
  7231. dataSource={options}
  7232. placeholder="输入服务名称"
  7233. value={this.state.commodityName}
  7234. onChange={this.httpChange}
  7235. filterOption={true}
  7236. onSelect={this.selectAuto}
  7237. >
  7238. <Input />
  7239. </AutoComplete>
  7240. <span className="mandatory">*</span>
  7241. </FormItem>
  7242. <FormItem
  7243. className="half-item"
  7244. {...formItemLayout}
  7245. label="服务数量"
  7246. >
  7247. <Input
  7248. placeholder="请输入服务数量"
  7249. value={this.state.commodityQuantity}
  7250. style={{ width: "200px" }}
  7251. onChange={(e) => {
  7252. this.setState({ commodityQuantity: e.target.value });
  7253. }}
  7254. ref="commodityQuantity"
  7255. />
  7256. <span className="mandatory">*</span>
  7257. </FormItem>
  7258. <div style={{ marginTop: "33px", color: "red", textAlign: "right", position: "relative", top: "-8", left: "0" }}>如会员项目,服务一年,请填写1,服务二年,请填写2,依次类推</div>
  7259. <FormItem
  7260. className="half-item"
  7261. labelCol={{ span: 4 }}
  7262. wrapperCol={{ span: 14 }}
  7263. label="专利类型:"
  7264. style={{
  7265. display: this.state.displayFees,
  7266. marginLeft: "55px",
  7267. }}
  7268. >
  7269. <Select
  7270. placeholder="请选择专利类型"
  7271. style={{ width: "200px" }}
  7272. value={this.state.patentType}
  7273. onChange={(e) => {
  7274. this.setState({ patentType: e });
  7275. if (e !== 0 && e !== 2) {
  7276. this.setState({
  7277. costReduction: "",
  7278. });
  7279. }
  7280. }}
  7281. >
  7282. {this.state.patentTypeList.map(function (v, k) {
  7283. return (
  7284. <Select.Option key={k} value={v.id}>
  7285. {v.name}
  7286. </Select.Option>
  7287. );
  7288. })}
  7289. </Select>
  7290. <span style={{ color: "red", marginLeft: "8px" }}>*</span>
  7291. </FormItem>
  7292. <FormItem
  7293. className="half-item"
  7294. labelCol={{ span: 3 }}
  7295. wrapperCol={{ span: 14 }}
  7296. label="官费:"
  7297. style={{
  7298. display: this.state.displayFees,
  7299. marginLeft: "55px",
  7300. }}
  7301. >
  7302. <span style={{ color: "red", marginRight: "27px" }}>*</span>
  7303. <Radio.Group
  7304. value={this.state.officialCost}
  7305. onChange={(e) => {
  7306. this.setState({ officialCost: e.target.value });
  7307. if (e.target.value === "0") {
  7308. this.setState({
  7309. costReduction: "",
  7310. });
  7311. }
  7312. }}
  7313. >
  7314. <Radio value="1">含官费</Radio>
  7315. <Radio value="0">不含官费</Radio>
  7316. </Radio.Group>
  7317. </FormItem>
  7318. <FormItem
  7319. className="half-item"
  7320. labelCol={{ span: 3 }}
  7321. wrapperCol={{ span: 14 }}
  7322. label="费减:"
  7323. style={{
  7324. display: this.state.displayFees,
  7325. marginLeft: "55px",
  7326. }}
  7327. >
  7328. <span style={{ color: "red", marginRight: "27px" }}>*</span>
  7329. <Radio.Group
  7330. disabled={
  7331. this.state.officialCost === "0" ||
  7332. this.state.patentType === 1
  7333. }
  7334. value={this.state.costReduction}
  7335. onChange={(e) => {
  7336. this.setState({ costReduction: e.target.value });
  7337. }}
  7338. >
  7339. <Radio value="1">有费减</Radio>
  7340. <Radio value="0">无费减</Radio>
  7341. </Radio.Group>
  7342. </FormItem>
  7343. <FormItem
  7344. className="half-item"
  7345. {...formItemLayout}
  7346. label="实签价格(万元)"
  7347. >
  7348. <Input
  7349. placeholder="请输入实签价格"
  7350. value={this.state.commodityPrice}
  7351. style={{ width: "200px" }}
  7352. onChange={(e) => {
  7353. this.setState({ commodityPrice: e.target.value });
  7354. }}
  7355. ref="commodityPrice"
  7356. />
  7357. <span className="mandatory">*</span>
  7358. </FormItem>
  7359. <FormItem
  7360. className="half-item"
  7361. {...formItemLayout}
  7362. label="主要业务"
  7363. >
  7364. <Select
  7365. placeholder="选择是否为主要业务"
  7366. style={{ width: "200px" }}
  7367. value={this.state.main}
  7368. onChange={(e) => {
  7369. this.setState({ main: e });
  7370. }}
  7371. >
  7372. {boutique.map(function (item) {
  7373. return (
  7374. <Select.Option key={item.value}>
  7375. {item.key}
  7376. </Select.Option>
  7377. );
  7378. })}
  7379. </Select>
  7380. <span className="mandatory">*</span>
  7381. </FormItem>
  7382. <div className="clearfix">
  7383. <FormItem
  7384. labelCol={{ span: 4 }}
  7385. wrapperCol={{ span: 16 }}
  7386. label="项目说明"
  7387. >
  7388. <Input
  7389. type="textarea"
  7390. placeholder="如会员项目请详细描写会员项目的服务年限、详细服务时间段段,如第一年从2021年1月至2021年12月31日止,第二年从。。。"
  7391. value={this.state.taskComment}
  7392. onChange={(e) => {
  7393. this.setState({ taskComment: e.target.value });
  7394. }}
  7395. />
  7396. </FormItem>
  7397. </div>
  7398. <FormItem
  7399. wrapperCol={{ span: 12, offset: 4 }}
  7400. className="half-middle"
  7401. >
  7402. <Button
  7403. className="submitSave"
  7404. type="primary"
  7405. onClick={this.changeProSubmit}
  7406. >
  7407. 保存
  7408. </Button>
  7409. <Button
  7410. className="submitSave"
  7411. type="ghost"
  7412. onClick={this.nextCancel}
  7413. >
  7414. 取消
  7415. </Button>
  7416. </FormItem>
  7417. </div>
  7418. </Spin>
  7419. </Form>
  7420. </Modal>
  7421. {this.state.lookVisible ? (
  7422. <Modal
  7423. maskClosable={false}
  7424. visible={this.state.lookVisible}
  7425. onOk={this.noCancel}
  7426. onCancel={this.noCancel}
  7427. width="800px"
  7428. title={"退单申请"}
  7429. footer=""
  7430. className="admin-desc-content"
  7431. >
  7432. <Form layout="horizontal">
  7433. <Spin spinning={this.state.loading}>
  7434. <div className="clearfix">
  7435. <FormItem
  7436. labelCol={{ span: 4 }}
  7437. wrapperCol={{ span: 16 }}
  7438. label="终止合同"
  7439. >
  7440. <Picture
  7441. domId={"addService6"}
  7442. fileList={(e) => {
  7443. this.setState({ contractUrl: e });
  7444. }}
  7445. pictureUrl={this.state.contractUrl}
  7446. visible={this.props.visible}
  7447. data={{
  7448. sign: "order_refund_file",
  7449. url: "/api/admin/newOrder/uploadRefundOrderFile",
  7450. number: 8,
  7451. }}
  7452. />
  7453. </FormItem>
  7454. </div>
  7455. <div className="clearfix">
  7456. <FormItem
  7457. labelCol={{ span: 4 }}
  7458. wrapperCol={{ span: 16 }}
  7459. label="退单申请表"
  7460. >
  7461. <Picture
  7462. domId={"addService7"}
  7463. fileList={(e) => {
  7464. this.setState({ applicationUrl: e });
  7465. }}
  7466. pictureUrl={this.state.applicationUrl}
  7467. visible={this.props.visible}
  7468. data={{
  7469. sign: "order_refund_file",
  7470. url: "/api/admin/newOrder/uploadRefundOrderFile",
  7471. number: 8,
  7472. }}
  7473. />
  7474. </FormItem>
  7475. </div>
  7476. <div className="clearfix">
  7477. <FormItem
  7478. labelCol={{ span: 4 }}
  7479. wrapperCol={{ span: 16 }}
  7480. label="退单理由"
  7481. >
  7482. <Input
  7483. type="textarea"
  7484. placeholder="请输入退单理由"
  7485. rows={4}
  7486. value={this.state.reason}
  7487. onChange={(e) => {
  7488. this.setState({ reason: e.target.value });
  7489. }}
  7490. />
  7491. </FormItem>
  7492. </div>
  7493. <div className="clearfix">
  7494. <Button
  7495. className="cancel"
  7496. type="primary"
  7497. onClick={this.tuidanOk}
  7498. style={{ marginLeft: "50px" }}
  7499. htmlType="submit"
  7500. >
  7501. 确定退单
  7502. </Button>
  7503. <Button
  7504. className="cancel"
  7505. type="ghost"
  7506. onClick={this.noCancel}
  7507. style={{ marginLeft: "50px" }}
  7508. >
  7509. 取消
  7510. </Button>
  7511. </div>
  7512. </Spin>
  7513. </Form>
  7514. </Modal>
  7515. ) : (
  7516. <div />
  7517. )}
  7518. <Modal
  7519. title="修改项目金额及数量"
  7520. visible={this.state.editProVisible}
  7521. onOk={this.submitEditPro}
  7522. width={300}
  7523. okText={"保存"}
  7524. onCancel={() => {
  7525. this.setState({
  7526. editProVisible: false,
  7527. });
  7528. }}
  7529. >
  7530. <div className="clearfix">
  7531. <FormItem
  7532. labelCol={{ span: 6 }}
  7533. wrapperCol={{ span: 14 }}
  7534. label="项目金额"
  7535. style={{
  7536. display: this.state.editSplitStatus == 2 ? "none" : "block",
  7537. }}
  7538. >
  7539. <Input
  7540. placeholder="请输入金额"
  7541. rows={4}
  7542. // disabled={this.state.editSplitStatus == 0 ? true : false}
  7543. value={this.state.editProMoney}
  7544. onChange={(e) => {
  7545. this.setState({ editProMoney: e.target.value });
  7546. }}
  7547. />
  7548. </FormItem>
  7549. <FormItem
  7550. labelCol={{ span: 6 }}
  7551. wrapperCol={{ span: 14 }}
  7552. label="项目数量"
  7553. >
  7554. <Input
  7555. placeholder="请输入数量"
  7556. rows={4}
  7557. value={this.state.editProCommodityQuantity}
  7558. onChange={(e) => {
  7559. this.setState({ editProCommodityQuantity: e.target.value });
  7560. }}
  7561. />
  7562. </FormItem>
  7563. </div>
  7564. </Modal>
  7565. <Modal
  7566. maskClosable={false}
  7567. title={
  7568. isNaN(parseFloat(this.state.appropriationRatio))
  7569. ? "修改催款节点金额"
  7570. : "修改催款节点比例"
  7571. }
  7572. visible={this.state.editCuiVisible}
  7573. onOk={() => {
  7574. this.submitEditCui(
  7575. isNaN(parseFloat(this.state.appropriationRatio)) ? 0 : 1
  7576. );
  7577. }}
  7578. okText={"保存"}
  7579. width={300}
  7580. onCancel={(e) => {
  7581. this.setState({
  7582. editCuiVisible: false,
  7583. appropriationRatio: "",
  7584. });
  7585. }}
  7586. >
  7587. <div className="clearfix">
  7588. <FormItem
  7589. labelCol={{ span: 6 }}
  7590. wrapperCol={{ span: 14 }}
  7591. label={
  7592. isNaN(parseFloat(this.state.appropriationRatio))
  7593. ? "催款金额"
  7594. : "催款比例"
  7595. }
  7596. >
  7597. <Input
  7598. type="number"
  7599. placeholder={
  7600. isNaN(parseFloat(this.state.appropriationRatio))
  7601. ? "请输入金额"
  7602. : "请输入比例"
  7603. }
  7604. rows={4}
  7605. value={this.state.editCuiMoney}
  7606. onChange={(e) => {
  7607. this.setState({ editCuiMoney: e.target.value });
  7608. }}
  7609. />
  7610. </FormItem>
  7611. </div>
  7612. </Modal>
  7613. <OrderRiZi
  7614. dataSourcerizhi={this.state.dataSourcerizhi}
  7615. closeOrderLog={this.closeOrderLog}
  7616. visible={this.state.rizhivisible}
  7617. loading={this.state.loading}
  7618. />
  7619. {this.state.projectOperationVisible ? (
  7620. <ProjectOperation
  7621. readOnly={
  7622. this.state.dataInfor &&
  7623. Object.keys(this.state.dataInfor).length > 0 &&
  7624. this.state.processStatus !== 0
  7625. }
  7626. orderNo={this.props.datauser.orderNo}
  7627. visible={this.state.projectOperationVisible}
  7628. dataInfor={this.state.dataInfor}
  7629. onCancel={this.nextCancel}
  7630. />
  7631. ) : null}
  7632. </div>
  7633. );
  7634. },
  7635. })
  7636. );
  7637. export default Form.create()(NewService);