addService.jsx 280 KB

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