addService.jsx 280 KB

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