addService.jsx 262 KB

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