addService.jsx 210 KB

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