addService.jsx 279 KB

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