addService.jsx 261 KB

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