addService.jsx 219 KB

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