addService.jsx 259 KB

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