addService.jsx 273 KB

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