addService.jsx 284 KB

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