addService.jsx 274 KB

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