addService.jsx 235 KB

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