addService.jsx 274 KB

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