addService.jsx 243 KB

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