index.vue 199 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827
  1. <template>
  2. <div class="app-container">
  3. <div
  4. v-if="isPercentage"
  5. class="percentage"
  6. style="
  7. width: 210px;
  8. height: 90px;
  9. background: #fff;
  10. position: fixed;
  11. bottom: 0;
  12. left: 0;
  13. z-index: 9999999999999;
  14. "
  15. >
  16. <h4 style="padding-left: 10px; line-height: 0">导出进度:</h4>
  17. <el-progress
  18. style="padding-left: 10px"
  19. :text-inside="true"
  20. :stroke-width="26"
  21. :percentage="percentage"
  22. />
  23. </div>
  24. <el-tabs v-model="tabName" @tab-click="handleTabClick">
  25. <el-tab-pane v-if="isBasic" label="设备基础信息" name="first">
  26. <div class="filter-container">
  27. <el-select
  28. v-model="getdataListParm.parammaps.pastureName"
  29. placeholder="牧场"
  30. class="filter-item"
  31. style="width: 120px"
  32. @change="changePastureName"
  33. >
  34. <el-option
  35. v-for="item in findAllPasture"
  36. :key="item.id"
  37. :label="item.name"
  38. :value="item.name"
  39. />
  40. </el-select>
  41. <tree-select
  42. v-model="getdataListParm.parammaps.eqClassId"
  43. :height="300"
  44. :width="250"
  45. class="typeSelect"
  46. size="small"
  47. :data="parentClass"
  48. :default-props="defaultProps"
  49. :node-key="nodeKey"
  50. clearable
  51. :disabled="disabled"
  52. placeholder="请选择设备类别"
  53. :checked-keys="defaultCheckedKeys"
  54. style="display: inline-block"
  55. @popoverHide="popoverHide"
  56. />
  57. <el-input
  58. v-model="getdataListParm.parammaps.eqName"
  59. placeholder="设备名称"
  60. clearable
  61. style="width: 120px"
  62. class="filter-item"
  63. />
  64. <el-input
  65. v-model="getdataListParm.parammaps.eqCode"
  66. placeholder="设备内部编号"
  67. clearable
  68. style="width: 150px"
  69. class="filter-item"
  70. />
  71. <el-input
  72. v-model="getdataListParm.parammaps.financeCode"
  73. placeholder="财务编号"
  74. clearable
  75. style="width: 120px"
  76. class="filter-item"
  77. />
  78. <el-select
  79. v-model="getdataListParm.parammaps.departmentId"
  80. clearable
  81. placeholder="部门"
  82. class="filter-item"
  83. style="width: 120px"
  84. >
  85. <el-option
  86. v-for="item in findAllDepart"
  87. :key="item.id"
  88. :label="item.name"
  89. :value="item.id"
  90. />
  91. </el-select>
  92. <el-select
  93. v-model="getdataListParm.parammaps.status"
  94. clearable
  95. placeholder="状态"
  96. class="filter-item"
  97. style="width: 120px"
  98. >
  99. <el-option
  100. v-for="item in getDictByName"
  101. :key="item.id"
  102. :label="item.label"
  103. :value="item.id"
  104. />
  105. </el-select>
  106. <el-select
  107. v-model="getdataListParm.parammaps.warning"
  108. clearable
  109. placeholder="折旧预警"
  110. class="filter-item"
  111. style="width: 120px"
  112. >
  113. <el-option
  114. v-for="item in depreciationAlertList"
  115. :key="item.id"
  116. :label="item.name"
  117. :value="item.id"
  118. />
  119. </el-select>
  120. <!-- <el-date-picker ref="inputDatetime1" v-model="getdataListParm.parammaps.inputDatetime1" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="审批日期" end-placeholder="审批日期" /> -->
  121. <el-date-picker
  122. ref="inputDatetime2"
  123. v-model="getdataListParm.parammaps.inputDatetime2"
  124. class="inputDatetime"
  125. type="daterange"
  126. style="width: 250px; top: -3px"
  127. format="yyyy-MM-dd"
  128. value-format="yyyy-MM-dd"
  129. range-separator="至"
  130. start-placeholder="购置日期"
  131. end-placeholder="购置日期"
  132. />
  133. <!-- <el-date-picker ref="inputDatetime3" v-model="getdataListParm.parammaps.inputDatetime3" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="报废日期" end-placeholder="报废日期" /> -->
  134. <el-input
  135. v-model="getdataListParm.parammaps.assetCode"
  136. placeholder="资产编号"
  137. clearable
  138. style="width: 120px"
  139. class="filter-item"
  140. />
  141. <el-input
  142. v-model="getdataListParm.parammaps.brand"
  143. placeholder="品牌"
  144. clearable
  145. style="width: 120px"
  146. class="filter-item"
  147. />
  148. <!-- <el-input v-model="getdataListParm.parammaps.proName" placeholder="供应商" clearable style="width: 120px;" class="filter-item" /> -->
  149. <el-button
  150. v-waves
  151. class="filter-item"
  152. type="primary"
  153. icon="el-icon-search"
  154. @click="form_search"
  155. >搜索</el-button>
  156. <div>
  157. <el-button
  158. v-if="isBasicsAdd"
  159. class="filter-item"
  160. type="primary"
  161. icon="el-icon-edit"
  162. @click="form_add"
  163. >新增</el-button>
  164. <el-upload
  165. style="display: inline-block"
  166. :headers="headers"
  167. :data="uploadData"
  168. :action="uploadExcelUrl"
  169. :show-file-list="false"
  170. :before-upload="beforeImportExcel"
  171. :on-success="handleImportExcelSuccess"
  172. >
  173. <el-button
  174. v-waves
  175. class="filter-item"
  176. type="warning"
  177. icon="el-icon-upload2"
  178. >导入</el-button>
  179. </el-upload>
  180. <el-button
  181. class="filter-item"
  182. type="success"
  183. icon="el-icon-download"
  184. style=""
  185. @click="handleDownload"
  186. >导出</el-button>
  187. <el-button
  188. class="filter-item"
  189. type="primary"
  190. icon="el-icon-edit"
  191. @click="handleBatchChange"
  192. >批量变更</el-button>
  193. </div>
  194. <el-table
  195. :key="tableKey"
  196. v-loading="listLoading"
  197. element-loading-text="给我一点时间"
  198. :data="list"
  199. border
  200. fit
  201. highlight-current-row
  202. style="width: 100%"
  203. :row-style="rowStyle"
  204. :cell-style="cellStyle"
  205. class="elTable"
  206. :max-height="myHeight"
  207. @selection-change="handleSelectionChange"
  208. @sort-change="tableSort2"
  209. >
  210. <el-table-column type="selection" width="55" />
  211. <el-table-column
  212. label="序号"
  213. align="center"
  214. type="index"
  215. width="50px"
  216. >
  217. <template slot-scope="scope">
  218. <span>{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</span>
  219. </template>
  220. </el-table-column>
  221. <el-table-column label="牧场" align="center" prop="pastureName" />
  222. <el-table-column
  223. label="设备类别"
  224. align="center"
  225. prop="eqClassName"
  226. />
  227. <el-table-column align="center" prop="eqName" width="120">
  228. <template slot="header" slot-scope="scope">
  229. <div>
  230. 设备名称
  231. <!-- <el-popover placement="top" width="200" trigger="click">
  232. <p>多行信息多行信息多行信息<br/>第二行信息</p>
  233. <i class="el-icon-question" slot="reference"></i>
  234. </el-popover> -->
  235. <!-- <el-tooltip placement="top" trigger="click">
  236. <div slot="content">多行信息多行信息多行信息<br/>第二 行信息</div>
  237. <i class="el-icon-question"></i>
  238. </el-tooltip> -->
  239. </div>
  240. </template>
  241. <template slot-scope="{ row }">
  242. <div v-if="row.exceed == 1">
  243. <div
  244. style="
  245. background: #ec808d;
  246. display: block;
  247. line-height: 50px;
  248. "
  249. >
  250. {{ row.eqName }}
  251. </div>
  252. </div>
  253. <div v-else>
  254. <div style="display: block; line-height: 50px">
  255. {{ row.eqName }}
  256. </div>
  257. </div>
  258. </template>
  259. </el-table-column>
  260. <el-table-column
  261. label="设备内部编号"
  262. align="center"
  263. prop="eqCode"
  264. />
  265. <el-table-column
  266. label="财务编号"
  267. align="center"
  268. prop="financeCode"
  269. />
  270. <el-table-column label="规格" align="center" prop="specification" />
  271. <el-table-column label="品牌" align="center" prop="brandName" />
  272. <el-table-column label="状态" align="center" prop="status">
  273. <template slot-scope="{ row }">
  274. <div v-if="row.status == '正常'">
  275. <div
  276. v-if="row.warning == 1"
  277. style="
  278. background: #ec808d;
  279. display: block;
  280. line-height: 50px;
  281. "
  282. >
  283. {{ row.status }}
  284. </div>
  285. <div
  286. v-else-if="row.warning == 2"
  287. style="
  288. background: #facd91;
  289. display: block;
  290. line-height: 50px;
  291. "
  292. >
  293. {{ row.status }}
  294. </div>
  295. <div v-else>{{ row.status }}</div>
  296. </div>
  297. <div v-else>
  298. <div
  299. style="
  300. background: #d7d7d7;
  301. display: block;
  302. line-height: 50px;
  303. "
  304. >
  305. {{ row.status }}
  306. </div>
  307. </div>
  308. </template>
  309. </el-table-column>
  310. <el-table-column label="用途" align="center" prop="purpose" />
  311. <el-table-column label="部门" align="center" prop="deptName" />
  312. <el-table-column label="责任人" align="center" prop="employeName" />
  313. <el-table-column
  314. label="审批日期"
  315. sortable
  316. align="center"
  317. prop="spDate"
  318. />
  319. <el-table-column
  320. label="购置日期"
  321. sortable
  322. align="center"
  323. prop="purchaseDate"
  324. />
  325. <el-table-column
  326. label="入场日期"
  327. sortable
  328. align="center"
  329. prop="entranceDate"
  330. />
  331. <el-table-column
  332. label="报废日期"
  333. sortable
  334. align="center"
  335. prop="bfDate"
  336. />
  337. <el-table-column
  338. label="设备图片"
  339. prop="picpath"
  340. align="center"
  341. min-width="110px"
  342. >
  343. <template slot-scope="scope">
  344. <el-popover placement="right" title="" trigger="hover">
  345. <img
  346. v-if="scope.row.picpath !== '' && scope.row.srcpath !== ''"
  347. :src="scope.row.picpath"
  348. >
  349. <img
  350. v-if="scope.row.picpath !== '' && scope.row.srcpath !== ''"
  351. slot="reference"
  352. :src="scope.row.picpath"
  353. :alt="scope.row.srcpath"
  354. style="height: 100px; width: 100px"
  355. >
  356. </el-popover>
  357. </template>
  358. </el-table-column>
  359. <el-table-column
  360. label="折旧年限"
  361. sortable
  362. align="center"
  363. prop="depreciation"
  364. />
  365. <el-table-column
  366. label="使用时长(年)"
  367. sortable
  368. align="center"
  369. prop="serviceDuration"
  370. />
  371. <el-table-column
  372. label="使用率(%)"
  373. sortable
  374. align="center"
  375. prop="utilizationRate"
  376. />
  377. <el-table-column
  378. label="物联网编码"
  379. sortable
  380. align="center"
  381. prop="license"
  382. />
  383. <el-table-column
  384. label="标准工作时长"
  385. sortable
  386. align="center"
  387. prop="duration"
  388. />
  389. <el-table-column
  390. label="工作类别"
  391. sortable
  392. align="center"
  393. prop="work"
  394. />
  395. <el-table-column
  396. label="操作"
  397. align="center"
  398. width="300"
  399. class-name="small-padding fixed-width"
  400. fixed="right"
  401. >
  402. <template slot-scope="{ row }">
  403. <el-button
  404. v-if="isBasicsCard"
  405. type="primary"
  406. size="mini"
  407. @click="form_see(row)"
  408. >查看</el-button>
  409. <el-button
  410. v-if="roleSet1(row)"
  411. type="success"
  412. size="mini"
  413. @click="form_edit(row)"
  414. >编辑</el-button>
  415. <el-button
  416. v-if="roleSet2(row)"
  417. style="display: inline-block"
  418. type="danger"
  419. size="mini"
  420. @click="form_delete(row)"
  421. >删除</el-button>
  422. <!-- <el-button v-if="isBasicsDel2" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button> -->
  423. <el-button
  424. v-else
  425. style="display: none"
  426. type="danger"
  427. size="mini"
  428. @click="form_delete(row)"
  429. >删除</el-button>
  430. </template>
  431. </el-table-column>
  432. </el-table>
  433. <pagination
  434. v-show="total >= 0"
  435. :total="total"
  436. :page.sync="getdataListParm.offset"
  437. :limit.sync="getdataListParm.pagecount"
  438. @pagination="get_table_data"
  439. />
  440. </div>
  441. </el-tab-pane>
  442. <el-tab-pane v-if="isBasicSH" label="审核设备" name="second">
  443. <div class="filter-container">
  444. <el-select
  445. v-model="getdataListParmSH.parammaps.pastureName"
  446. placeholder="牧场"
  447. class="filter-item"
  448. style="width: 120px"
  449. >
  450. <el-option
  451. v-for="item in findAllPasture"
  452. :key="item.id"
  453. :label="item.name"
  454. :value="item.name"
  455. />
  456. </el-select>
  457. <el-input
  458. v-model="getdataListParmSH.parammaps.assetCode"
  459. placeholder="资产编号"
  460. clearable
  461. style="width: 180px"
  462. class="filter-item"
  463. />
  464. <el-input
  465. v-model="getdataListParmSH.parammaps.eqName"
  466. placeholder="设备名称"
  467. clearable
  468. style="width: 120px"
  469. class="filter-item"
  470. />
  471. <el-input
  472. v-model="getdataListParmSH.parammaps.eqCode"
  473. placeholder="设备内部编号"
  474. clearable
  475. style="width: 150px"
  476. class="filter-item"
  477. />
  478. <el-input
  479. v-model="getdataListParmSH.parammaps.financeCode"
  480. placeholder="财务编码"
  481. clearable
  482. style="width: 120px"
  483. class="filter-item"
  484. />
  485. <el-select
  486. v-model="getdataListParmSH.parammaps.departmentId"
  487. clearable
  488. placeholder="部门"
  489. class="filter-item"
  490. style="width: 120px"
  491. >
  492. <el-option
  493. v-for="item in findAllDepart"
  494. :key="item.id"
  495. :label="item.name"
  496. :value="item.id"
  497. />
  498. </el-select>
  499. <el-select
  500. v-model="getdataListParmSH.parammaps.status"
  501. clearable
  502. placeholder="状态"
  503. class="filter-item"
  504. style="width: 120px"
  505. >
  506. <el-option
  507. v-for="item in getDictByName"
  508. :key="item.id"
  509. :label="item.label"
  510. :value="item.id"
  511. />
  512. </el-select>
  513. <el-select
  514. v-model="getdataListParmSH.parammaps.SHStatus"
  515. clearable
  516. placeholder="审核状态"
  517. class="filter-item"
  518. style="width: 120px"
  519. >
  520. <el-option
  521. v-for="item in statues"
  522. :key="item.id"
  523. :label="item.name"
  524. :value="item.id"
  525. />
  526. </el-select>
  527. <el-date-picker
  528. ref="inputDatetime1"
  529. v-model="getdataListParmSH.parammaps.inputDatetime1"
  530. class="inputDatetime"
  531. type="datetimerange"
  532. style="width: 250px; top: -3px"
  533. format="yyyy-MM-dd"
  534. value-format="yyyy-MM-dd"
  535. range-separator="至"
  536. start-placeholder="开始日期"
  537. end-placeholder="结束日期"
  538. />
  539. <el-button
  540. v-waves
  541. class="filter-item"
  542. type="primary"
  543. icon="el-icon-search"
  544. @click="form_searchSH"
  545. >搜索</el-button>
  546. <div>
  547. <el-button
  548. class="filter-item"
  549. type="success"
  550. icon="el-icon-download"
  551. style=""
  552. @click="handleDownloadSH"
  553. >导出</el-button>
  554. </div>
  555. <el-table
  556. :key="tableKey"
  557. v-loading="listLoadingSH"
  558. element-loading-text="给我一点时间"
  559. :data="listSH"
  560. border
  561. fit
  562. highlight-current-row
  563. style="width: 100%"
  564. :row-style="rowStyle"
  565. :cell-style="cellStyle"
  566. class="elTable"
  567. :max-height="myHeight"
  568. >
  569. <el-table-column
  570. label="序号"
  571. align="center"
  572. type="index"
  573. width="50px"
  574. >
  575. <template slot-scope="scope">
  576. <span>{{
  577. scope.$index + (pageNumSH - 1) * pageSizeSH + 1
  578. }}</span>
  579. </template>
  580. </el-table-column>
  581. <el-table-column label="牧场" align="center" prop="pastureName" />
  582. <el-table-column label="资产编号" align="center" prop="assetCode" />
  583. <el-table-column label="设备名称" align="center" prop="eqName" />
  584. <el-table-column
  585. label="设备内部编号"
  586. align="center"
  587. prop="eqCode"
  588. />
  589. <el-table-column
  590. label="财务编号"
  591. align="center"
  592. prop="financeCode"
  593. />
  594. <el-table-column label="规格" align="center" prop="specification" />
  595. <el-table-column label="品牌" align="center" prop="brandName" />
  596. <el-table-column label="状态" align="center" prop="status" />
  597. <el-table-column label="部门" align="center" prop="deptName" />
  598. <el-table-column label="责任人" align="center" prop="employeName" />
  599. <el-table-column
  600. label="录入日期"
  601. sortable
  602. align="center"
  603. prop="lrTime"
  604. />
  605. <el-table-column
  606. label="审核状态"
  607. min-width="110px"
  608. align="center"
  609. :formatter="SHStatus"
  610. />
  611. <el-table-column
  612. label="设备图片"
  613. prop="specifications"
  614. align="center"
  615. min-width="110px"
  616. >
  617. <template slot-scope="scope">
  618. <el-popover placement="right" title="" trigger="hover">
  619. <img
  620. v-if="scope.row.picpath !== ''"
  621. :src="scope.row.picpath"
  622. >
  623. <img
  624. v-if="scope.row.picpath !== ''"
  625. slot="reference"
  626. :src="scope.row.picpath"
  627. :alt="scope.row.srcpath"
  628. style="height: 100px; width: 100px"
  629. >
  630. </el-popover>
  631. </template>
  632. </el-table-column>
  633. <el-table-column
  634. label="操作"
  635. align="center"
  636. width="300"
  637. class-name="small-padding fixed-width"
  638. fixed="right"
  639. >
  640. <template slot-scope="{ row }">
  641. <el-button
  642. v-if="isBasicsCard"
  643. type="primary"
  644. size="mini"
  645. @click="form_see(row)"
  646. >查看</el-button>
  647. <el-button
  648. v-if="isBasicsUpdate && row.SHStatus == 2"
  649. style="display: inline-block"
  650. type="success"
  651. size="mini"
  652. @click="form_edit(row)"
  653. >编辑</el-button>
  654. <el-button
  655. v-else
  656. style="display: none"
  657. type="success"
  658. size="mini"
  659. @click="form_edit(row)"
  660. >编辑</el-button>
  661. <el-button
  662. v-if="isBasicExamine && row.SHStatus == 0"
  663. style="display: inline-block"
  664. type="success"
  665. size="mini"
  666. @click="handleExamine(row)"
  667. >审核</el-button>
  668. <el-button
  669. v-else
  670. style="display: none"
  671. type="success"
  672. size="mini"
  673. @click="handleExamine(row)"
  674. >审核</el-button>
  675. <el-button
  676. v-if="isBasicsDel && row.SHStatus == 2"
  677. style="display: inline-block"
  678. type="danger"
  679. size="mini"
  680. @click="form_delete(row)"
  681. >删除</el-button>
  682. <el-button
  683. v-else
  684. style="display: none"
  685. type="danger"
  686. size="mini"
  687. @click="form_delete(row)"
  688. >删除</el-button>
  689. </template>
  690. </el-table-column>
  691. </el-table>
  692. <pagination
  693. v-show="totalSH >= 0"
  694. :total="totalSH"
  695. :page.sync="getdataListParmSH.offset"
  696. :limit.sync="getdataListParmSH.pagecount"
  697. @pagination="get_table_dataSH"
  698. />
  699. </div>
  700. </el-tab-pane>
  701. </el-tabs>
  702. <!-- 新增 -->
  703. <el-dialog
  704. v-show="dialogFormVisible"
  705. :title="textMap[dialogStatus]"
  706. :visible.sync="dialogFormVisible"
  707. :close-on-click-modal="false"
  708. width="90%"
  709. >
  710. <div class="app-add">
  711. <el-form
  712. ref="createTemp"
  713. :rules="rulesCreate"
  714. :model="createTemp"
  715. label-position="right"
  716. label-width="115px"
  717. style="width: 90%; margin: 0 auto 30px"
  718. >
  719. <el-row>
  720. <el-col :span="10">
  721. <el-form-item label="设备类别:" prop="eqClassId">
  722. <tree-select
  723. v-model="createTemp.eqClassId"
  724. :height="300"
  725. :width="300"
  726. size="small"
  727. :data="parentClass"
  728. :default-props="defaultProps"
  729. :node-key="nodeKey"
  730. :disabled="disabled"
  731. :placeholder="placeholder"
  732. :checked-keys="defaultCheckedKeys"
  733. @popoverHide="popoverHide"
  734. />
  735. </el-form-item>
  736. </el-col>
  737. </el-row>
  738. <el-row>
  739. <el-col :span="6">
  740. <el-form-item label="资产编号:" prop="assetCode">
  741. <el-input
  742. ref="assetCode"
  743. v-model="createTemp.assetCode"
  744. placeholder="请输入编号"
  745. disabled
  746. />
  747. </el-form-item>
  748. </el-col>
  749. <el-col :span="6">
  750. <el-form-item label="设备名称:" prop="eqName">
  751. <el-input
  752. ref="eqName"
  753. v-model="createTemp.eqName"
  754. placeholder="请输入设备名称"
  755. disabled
  756. />
  757. </el-form-item>
  758. </el-col>
  759. <el-col :span="6">
  760. <el-form-item v-if="isShow" label="设备内部编号:" prop="eqCode">
  761. <el-input
  762. ref="eqCode"
  763. v-model="createTemp.eqCode"
  764. disabled
  765. />
  766. </el-form-item>
  767. <el-form-item v-else label="设备内部编号:" prop="eqCode">
  768. <el-input
  769. ref="eqCode"
  770. v-model="createTemp.eqCode"
  771. placeholder="请输入设备内部编号"
  772. />
  773. </el-form-item>
  774. </el-col>
  775. <el-col :span="6">
  776. <el-form-item label="财务编号:" prop="financeCode">
  777. <el-input
  778. ref="financeCode"
  779. v-model="createTemp.financeCode"
  780. placeholder="请输入财务编号"
  781. />
  782. </el-form-item>
  783. </el-col>
  784. </el-row>
  785. <el-row>
  786. <el-col :span="6">
  787. <el-form-item label="设备规格:" prop="specification">
  788. <el-input
  789. ref="specification"
  790. v-model="createTemp.specification"
  791. placeholder="请输入设备规格"
  792. />
  793. </el-form-item>
  794. </el-col>
  795. <el-col :span="6">
  796. <el-form-item label="品牌:" prop="brandName">
  797. <el-autocomplete
  798. v-model="createTemp.brandName"
  799. value-key="brandName"
  800. class="inline-input"
  801. :fetch-suggestions="brandSearch"
  802. placeholder="请输入品牌"
  803. style="width: 100%"
  804. @select="
  805. (value) => {
  806. handleSelectBrand(value)
  807. }
  808. "
  809. />
  810. </el-form-item>
  811. </el-col>
  812. <!-- <el-col :span="6">
  813. <el-form-item label="供应商:" prop="providerId">
  814. <el-select v-model="createTemp.providerId" filterable placeholder="请选择供应商" style="width:100%">
  815. <el-option v-for="item in findAllProvider" :key="item.id" clearable :label="item.name" :value="item.id" />
  816. </el-select>
  817. </el-form-item>
  818. </el-col> -->
  819. <el-col :span="6">
  820. <el-form-item label="用途:" prop="purpose">
  821. <el-input
  822. ref="purpose"
  823. v-model="createTemp.purpose"
  824. placeholder="请输入用途"
  825. />
  826. </el-form-item>
  827. </el-col>
  828. </el-row>
  829. <el-row>
  830. <el-col :span="6">
  831. <el-form-item label="状态:" prop="status">
  832. <el-select
  833. v-model="createTemp.status"
  834. placeholder="状态"
  835. class="filter-item"
  836. style="width: 100%"
  837. >
  838. <el-option
  839. v-for="item in getDictByName"
  840. :key="item.id"
  841. :label="item.label"
  842. :value="item.id"
  843. />
  844. </el-select>
  845. </el-form-item>
  846. </el-col>
  847. <el-col :span="6">
  848. <el-form-item label="购置日期:" prop="purchaseDate">
  849. <el-date-picker
  850. v-model="createTemp.purchaseDate"
  851. type="date"
  852. placeholder="选择日期"
  853. style="width: 100%"
  854. format="yyyy-MM-dd"
  855. value-format="yyyy-MM-dd"
  856. />
  857. </el-form-item>
  858. </el-col>
  859. <el-col :span="6">
  860. <el-form-item label="入场日期:" prop="entranceDate">
  861. <el-date-picker
  862. v-model="createTemp.entranceDate"
  863. type="date"
  864. placeholder="选择日期"
  865. style="width: 100%"
  866. format="yyyy-MM-dd"
  867. value-format="yyyy-MM-dd"
  868. />
  869. </el-form-item>
  870. </el-col>
  871. <el-col :span="6">
  872. <el-form-item label="折旧年限:" prop="depreciation">
  873. <el-input
  874. ref="depreciation"
  875. v-model="createTemp.depreciation"
  876. placeholder="请输入折旧年限"
  877. />
  878. </el-form-item>
  879. </el-col>
  880. </el-row>
  881. <el-row>
  882. <el-col :span="6">
  883. <el-form-item label="原值:" prop="yuanzhi">
  884. <el-input
  885. ref="yuanzhi"
  886. v-model="createTemp.yuanzhi"
  887. placeholder="请输入原值"
  888. />
  889. </el-form-item>
  890. </el-col>
  891. <el-col :span="6">
  892. <el-form-item label="残值:" prop="salvage">
  893. <el-input
  894. ref="salvage"
  895. v-model="createTemp.salvage"
  896. placeholder="请输入残值"
  897. />
  898. </el-form-item>
  899. </el-col>
  900. <el-col :span="6">
  901. <el-form-item label="月核减值:" prop="subtractvalue">
  902. <el-input
  903. ref="subtractvalue"
  904. v-model="createTemp.subtractvalue"
  905. placeholder="请输入月核减值"
  906. />
  907. </el-form-item>
  908. </el-col>
  909. <el-col :span="6">
  910. <el-form-item label="保养级别:" prop="upkeepgrade">
  911. <el-select
  912. ref="upkeepgrade"
  913. v-model="createTemp.upkeepgrade"
  914. placeholder="保养级别"
  915. style="width: 100%"
  916. class="filter-item"
  917. @visible-change="upkeepgradeChange"
  918. @change="changeUpkeepgrade"
  919. >
  920. <el-option
  921. v-for="item in upkeepgrades"
  922. :key="item.id"
  923. :label="item.label"
  924. :value="item.id"
  925. />
  926. </el-select>
  927. </el-form-item>
  928. </el-col>
  929. </el-row>
  930. <el-row>
  931. <el-col :span="6">
  932. <el-form-item label="保养费用:" prop="yearUpkeepCost">
  933. <el-input
  934. ref="yearUpkeepCost"
  935. v-model="createTemp.yearUpkeepCost"
  936. placeholder="请输入近一年保养费用"
  937. />
  938. </el-form-item>
  939. </el-col>
  940. <el-col :span="6">
  941. <el-form-item label="维修费用:" prop="yearMaintainCost">
  942. <el-input
  943. ref="yearMaintainCost"
  944. v-model="createTemp.yearMaintainCost"
  945. placeholder="请输入近一年维修费用"
  946. />
  947. </el-form-item>
  948. </el-col>
  949. <el-col :span="6">
  950. <el-form-item label="基数(小时):" prop="baseHours">
  951. <el-input
  952. ref="baseHours"
  953. v-model="createTemp.baseHours"
  954. placeholder="请输入基数"
  955. />
  956. </el-form-item>
  957. </el-col>
  958. <el-col :span="6">
  959. <el-form-item label="牧场:" prop="pastureId">
  960. <el-select
  961. v-model="createTemp.pastureId"
  962. placeholder="牧场"
  963. class="filter-item"
  964. @change="changePasture"
  965. >
  966. <el-option
  967. v-for="item in findAllPasture"
  968. :key="item.id"
  969. :label="item.name"
  970. :value="item.id"
  971. />
  972. </el-select>
  973. </el-form-item>
  974. </el-col>
  975. </el-row>
  976. <el-row>
  977. <el-col :span="6">
  978. <el-form-item label="部门:" prop="deptId">
  979. <el-select
  980. v-model="createTemp.deptId"
  981. :disabled="disabled"
  982. placeholder="部门"
  983. class="filter-item"
  984. style="width: 100%"
  985. @change="changeDepart"
  986. >
  987. <el-option
  988. v-for="item in createDepartList"
  989. :key="item.id"
  990. :label="item.name"
  991. :value="item.id"
  992. />
  993. </el-select>
  994. </el-form-item>
  995. </el-col>
  996. <el-col :span="6">
  997. <el-form-item label="责任人:" prop="employeName">
  998. <el-autocomplete
  999. v-model="createTemp.employeName"
  1000. value-key="empname"
  1001. class="inline-input"
  1002. :fetch-suggestions="employeSearch"
  1003. placeholder="请输入责任人"
  1004. style="width: 100%"
  1005. @select="handleSelectEmploye"
  1006. >
  1007. <template slot-scope="{ item }">
  1008. <div class="name" style="display: inline">
  1009. {{ item.name }}
  1010. </div>
  1011. </template>
  1012. </el-autocomplete>
  1013. </el-form-item>
  1014. </el-col>
  1015. <el-col :span="6">
  1016. <el-form-item label="录入人:" prop="inputUser">
  1017. <el-select
  1018. v-model="createTemp.inputUser"
  1019. placeholder="录入人"
  1020. class="filter-item"
  1021. style="width: 100%"
  1022. >
  1023. <el-option
  1024. v-for="item in findAllEmploye"
  1025. :key="item.id"
  1026. :label="item.name"
  1027. :value="item.id"
  1028. />
  1029. </el-select>
  1030. </el-form-item>
  1031. </el-col>
  1032. <el-col :span="6">
  1033. <el-form-item label="录入时间:" prop="inputDatetime">
  1034. <el-date-picker
  1035. v-model="createTemp.inputDatetime"
  1036. :picker-options="pickerOptions1"
  1037. type="date"
  1038. placeholder="录入时间"
  1039. format="yyyy-MM-dd"
  1040. value-format="yyyy-MM-dd"
  1041. style="width: 100%"
  1042. />
  1043. </el-form-item>
  1044. </el-col>
  1045. </el-row>
  1046. <el-row>
  1047. <el-col :span="6">
  1048. <el-form-item label="指定维修人:" prop="maintenance">
  1049. <el-select
  1050. v-model="createTemp.maintenance"
  1051. multiple
  1052. filterable
  1053. placeholder="指定维修人"
  1054. class="filter-item"
  1055. style="width: 100%"
  1056. >
  1057. <el-option
  1058. v-for="item in findAllEmploye"
  1059. :key="item.id"
  1060. :label="item.name"
  1061. :value="item.id"
  1062. />
  1063. </el-select>
  1064. </el-form-item>
  1065. </el-col>
  1066. <!-- <el-col :span="6">
  1067. <el-form-item label="间隔时间:" prop="pushTime">
  1068. <el-select v-model="createTemp.pushTime" placeholder="间隔时间" class="filter-item">
  1069. <el-option v-for="item in pushNameList" :key="item.id" :label="item.name" :value="item.id" />
  1070. </el-select>
  1071. </el-form-item>
  1072. </el-col> -->
  1073. <el-col :span="6">
  1074. <el-form-item label="一级督办:" prop="levelone">
  1075. <el-select
  1076. v-model="createTemp.levelone"
  1077. filterable
  1078. placeholder="设备主管"
  1079. class="filter-item"
  1080. style="width: 100%"
  1081. >
  1082. <el-option
  1083. v-for="item in findAllEmploye"
  1084. :key="item.id"
  1085. :label="item.name"
  1086. :value="item.id"
  1087. />
  1088. </el-select>
  1089. </el-form-item>
  1090. </el-col>
  1091. <el-col :span="6">
  1092. <el-form-item label="一级间隔时间(小时)" prop="leveloneTime">
  1093. <el-select
  1094. v-model="createTemp.leveloneTime"
  1095. placeholder="间隔时间"
  1096. class="filter-item"
  1097. style="width: 100%"
  1098. >
  1099. <el-option
  1100. v-for="item in pushNameList2"
  1101. :key="item.id"
  1102. :label="item.name"
  1103. :value="item.id"
  1104. />
  1105. </el-select>
  1106. </el-form-item>
  1107. </el-col>
  1108. <el-col :span="6">
  1109. <el-form-item label="二级督办:" prop="leveltwo">
  1110. <el-select
  1111. v-model="createTemp.leveltwo"
  1112. filterable
  1113. placeholder="设备助理"
  1114. class="filter-item"
  1115. style="width: 100%"
  1116. >
  1117. <el-option
  1118. v-for="item in findAllEmploye"
  1119. :key="item.id"
  1120. :label="item.name"
  1121. :value="item.id"
  1122. />
  1123. </el-select>
  1124. </el-form-item>
  1125. </el-col>
  1126. </el-row>
  1127. <el-row>
  1128. <el-col :span="6">
  1129. <el-form-item label="二级间隔时间(小时)" prop="leveltwoTime">
  1130. <el-select
  1131. v-model="createTemp.leveltwoTime"
  1132. placeholder="间隔时间"
  1133. class="filter-item"
  1134. style="width: 100%"
  1135. >
  1136. <el-option
  1137. v-for="item in pushNameList2"
  1138. :key="item.id"
  1139. :label="item.name"
  1140. :value="item.id"
  1141. />
  1142. </el-select>
  1143. </el-form-item>
  1144. </el-col>
  1145. <el-col :span="6">
  1146. <el-form-item label="三级督办:" prop="levelthree">
  1147. <el-select
  1148. v-model="createTemp.levelthree"
  1149. filterable
  1150. placeholder="场长"
  1151. class="filter-item"
  1152. style="width: 100%"
  1153. >
  1154. <el-option
  1155. v-for="item in findAllEmploye"
  1156. :key="item.id"
  1157. :label="item.name"
  1158. :value="item.id"
  1159. />
  1160. </el-select>
  1161. </el-form-item>
  1162. </el-col>
  1163. <el-col :span="6">
  1164. <el-form-item label="三级间隔时间(小时)" prop="levelthreeTime">
  1165. <el-select
  1166. v-model="createTemp.levelthreeTime"
  1167. placeholder="间隔时间"
  1168. style="width: 100%"
  1169. >
  1170. <el-option
  1171. v-for="item in pushNameList2"
  1172. :key="item.id"
  1173. :label="item.name"
  1174. :value="item.id"
  1175. />
  1176. </el-select>
  1177. </el-form-item>
  1178. </el-col>
  1179. <el-col :span="6">
  1180. <el-form-item label="物联网编码" prop="license">
  1181. <el-input
  1182. ref="license"
  1183. v-model="createTemp.license"
  1184. placeholder="物联网编码"
  1185. :disabled="dialogStatus == 'update' && isEditWork"
  1186. />
  1187. </el-form-item>
  1188. </el-col>
  1189. </el-row>
  1190. <el-row>
  1191. <el-col :span="6">
  1192. <el-form-item label="标准工作时长" prop="duration">
  1193. <el-input
  1194. ref="duration"
  1195. v-model="createTemp.duration"
  1196. placeholder="标准工作时长"
  1197. :disabled="dialogStatus == 'update' && isEditWork"
  1198. />
  1199. </el-form-item>
  1200. </el-col>
  1201. <el-col :span="6">
  1202. <el-form-item label="工作类别" prop="work">
  1203. <!-- <el-input
  1204. ref="duration"
  1205. v-model="createTemp.work"
  1206. placeholder="工作类别"
  1207. :disabled="dialogStatus == 'update' && isEditWork"
  1208. /> -->
  1209. <el-select
  1210. v-model="createTemp.work"
  1211. clearable
  1212. placeholder="工作类别"
  1213. class="filter-item"
  1214. style="width: 120px"
  1215. :disabled="dialogStatus == 'update' && isEditWork"
  1216. >
  1217. <!-- TODO: -->
  1218. <el-option
  1219. v-for="(item,index) in workList"
  1220. :key="index"
  1221. :label="item"
  1222. :value="item"
  1223. />
  1224. </el-select>
  1225. </el-form-item>
  1226. </el-col>
  1227. </el-row>
  1228. <el-row>
  1229. <el-col :span="6">
  1230. <el-form-item label="设备图片:">
  1231. <el-upload
  1232. id="uploadPic"
  1233. ref="upload"
  1234. :limit="1"
  1235. list-type="picture-card"
  1236. :file-list="createTemp.fileList"
  1237. :headers="headers"
  1238. :action="uploadImageUrl"
  1239. :auto-upload="true"
  1240. :on-preview="handlePicPreview"
  1241. :before-remove="beforeRemove"
  1242. :class="{ hide: showUpload }"
  1243. :on-change="
  1244. (file, fileList) => {
  1245. return handlePicChange(file, fileList)
  1246. }
  1247. "
  1248. :on-success="
  1249. (response, file, fileList) => {
  1250. return handlePicSuccess(response, file, fileList)
  1251. }
  1252. "
  1253. :on-remove="
  1254. (file, fileList) => {
  1255. return handlePicRemove(file, fileList)
  1256. }
  1257. "
  1258. >
  1259. <i class="el-icon-plus" />
  1260. </el-upload>
  1261. <el-dialog
  1262. :visible.sync="dialogVisible"
  1263. append-to-body
  1264. :width="width"
  1265. >
  1266. <img :src="dialogImageUrl" alt="" @load="onLoad">
  1267. </el-dialog>
  1268. </el-form-item>
  1269. </el-col>
  1270. </el-row>
  1271. </el-form>
  1272. <div
  1273. slot="footer"
  1274. class="dialog-footer"
  1275. style="right: 30px; position: absolute; bottom: 5px"
  1276. >
  1277. <el-button
  1278. v-if="dialogStatus === 'create'"
  1279. ref="createb"
  1280. type="success"
  1281. :disabled="isokDisable"
  1282. @click="add_dialog_save_again()"
  1283. >保存并新增</el-button>
  1284. <el-button
  1285. type="primary"
  1286. :disabled="isokDisable"
  1287. @click="
  1288. dialogStatus === 'create' ? add_dialog_save() : edit_dialog_save()
  1289. "
  1290. >保存并关闭</el-button>
  1291. <el-button
  1292. @click="
  1293. dialogFormVisible = false
  1294. getdataListParm.parammaps.inputDatetime = ''
  1295. "
  1296. >取消并关闭</el-button>
  1297. </div>
  1298. </div>
  1299. </el-dialog>
  1300. <!-- 查看 -->
  1301. <el-dialog
  1302. :title="textMap[dialogStatus]"
  1303. :visible.sync="dialogFormVisible_See"
  1304. :close-on-click-modal="false"
  1305. width="90%"
  1306. >
  1307. <div class="app-contentcard">
  1308. <div
  1309. style="
  1310. position: absolute;
  1311. top: 20px;
  1312. left: 150px;
  1313. font: 18px/24px '';
  1314. color: #303133;
  1315. "
  1316. >
  1317. <span style="margin: 0 10px">设备名称:{{ seeTemp.eqName }}</span>
  1318. <span>内部编号:{{ seeTemp.eqCode }}</span>
  1319. </div>
  1320. <div class="card">
  1321. <el-tabs v-model="activeName" @tab-click="form_seeTabClick">
  1322. <el-tab-pane label="基础信息" name="first">
  1323. <el-form
  1324. ref="seeTemp"
  1325. :rules="rules"
  1326. :model="seeTemp"
  1327. label-position="right"
  1328. label-width="115px"
  1329. style="width: 100%; margin-bottom: 30px"
  1330. >
  1331. <el-row>
  1332. <el-form-item label="设备类别:" prop="eqClassName">
  1333. <el-input
  1334. ref="eqClassName"
  1335. v-model="seeTemp.eqClassName"
  1336. placeholder="请输入设备类别"
  1337. disabled
  1338. />
  1339. </el-form-item>
  1340. </el-row>
  1341. <el-row>
  1342. <el-col :span="6">
  1343. <el-form-item label="资产编号:" prop="assetCode">
  1344. <el-input
  1345. ref="assetCode"
  1346. v-model="seeTemp.assetCode"
  1347. placeholder="请输入资产编号"
  1348. disabled
  1349. />
  1350. </el-form-item>
  1351. </el-col>
  1352. <el-col :span="6">
  1353. <el-form-item label="设备名称:" prop="eqName">
  1354. <el-input
  1355. ref="eqName"
  1356. v-model="seeTemp.eqName"
  1357. placeholder="请输入设备名称"
  1358. disabled
  1359. />
  1360. </el-form-item>
  1361. </el-col>
  1362. <el-col :span="6">
  1363. <el-form-item label="设备内部编号:" prop="eqCode">
  1364. <el-input
  1365. ref="eqCode"
  1366. v-model="seeTemp.eqCode"
  1367. placeholder="请输入设备内部编号"
  1368. disabled
  1369. />
  1370. </el-form-item>
  1371. </el-col>
  1372. <el-col :span="6">
  1373. <el-form-item label="财务编号:" prop="financeCode">
  1374. <el-input
  1375. ref="financeCode"
  1376. v-model="seeTemp.financeCode"
  1377. placeholder="请输入财务编号"
  1378. disabled
  1379. />
  1380. </el-form-item>
  1381. </el-col>
  1382. </el-row>
  1383. <el-row>
  1384. <el-col :span="6">
  1385. <el-form-item label="设备规格:" prop="specification">
  1386. <el-input
  1387. ref="specification"
  1388. v-model="seeTemp.specification"
  1389. placeholder="请输入设备规格"
  1390. disabled
  1391. />
  1392. </el-form-item>
  1393. </el-col>
  1394. <el-col :span="6">
  1395. <el-form-item label="品牌:" prop="brandName">
  1396. <el-input
  1397. ref="brandName"
  1398. v-model="seeTemp.brandName"
  1399. placeholder="请输入品牌"
  1400. disabled
  1401. />
  1402. </el-form-item>
  1403. </el-col>
  1404. <!-- <el-col :span="6">
  1405. <el-form-item label="供应商:" prop="providerName">
  1406. <el-input ref="providerName" v-model="seeTemp.providerName" placeholder="请输入供应商" disabled />
  1407. </el-form-item>
  1408. </el-col> -->
  1409. <el-col :span="6">
  1410. <el-form-item label="用途:" prop="purpose">
  1411. <el-input
  1412. ref="purpose"
  1413. v-model="seeTemp.purpose"
  1414. placeholder="请输入用途"
  1415. disabled
  1416. />
  1417. </el-form-item>
  1418. </el-col>
  1419. </el-row>
  1420. <el-row>
  1421. <el-col :span="6">
  1422. <el-form-item label="状态:" prop="status">
  1423. <el-input
  1424. ref="status"
  1425. v-model="seeTemp.status"
  1426. placeholder="请输入状态"
  1427. disabled
  1428. />
  1429. </el-form-item>
  1430. </el-col>
  1431. <el-col :span="6">
  1432. <el-form-item label="购置日期:" prop="purchaseDate">
  1433. <el-input
  1434. ref="purchaseDate"
  1435. v-model="seeTemp.purchaseDate"
  1436. placeholder="请输入购置日期"
  1437. disabled
  1438. />
  1439. </el-form-item>
  1440. </el-col>
  1441. <el-col :span="6">
  1442. <el-form-item label="入场日期:" prop="entranceDate">
  1443. <el-input
  1444. ref="entranceDate"
  1445. v-model="seeTemp.entranceDate"
  1446. placeholder="请输入入场日期"
  1447. disabled
  1448. />
  1449. </el-form-item>
  1450. </el-col>
  1451. <el-col :span="6">
  1452. <el-form-item label="折旧年限:" prop="depreciation">
  1453. <el-input
  1454. ref="depreciation"
  1455. v-model="seeTemp.depreciation"
  1456. placeholder="请输入折旧年限"
  1457. disabled
  1458. />
  1459. </el-form-item>
  1460. </el-col>
  1461. </el-row>
  1462. <el-row>
  1463. <el-col :span="6">
  1464. <el-form-item label="原值:" prop="yuanzhi">
  1465. <el-input
  1466. ref="yuanzhi"
  1467. v-model="seeTemp.yuanzhi"
  1468. placeholder="请输入原值"
  1469. disabled
  1470. />
  1471. </el-form-item>
  1472. </el-col>
  1473. <el-col :span="6">
  1474. <el-form-item label="残值:" prop="salvage">
  1475. <el-input
  1476. ref="salvage"
  1477. v-model="seeTemp.salvage"
  1478. placeholder="请输入残值"
  1479. disabled
  1480. />
  1481. </el-form-item>
  1482. </el-col>
  1483. <el-col :span="6">
  1484. <el-form-item label="月核减值:" prop="subtractvalue">
  1485. <el-input
  1486. ref="subtractvalue"
  1487. v-model="seeTemp.subtractvalue"
  1488. placeholder="请输入月核减值"
  1489. disabled
  1490. />
  1491. </el-form-item>
  1492. </el-col>
  1493. <el-col :span="6">
  1494. <el-form-item label="保养级别:" prop="upkeepgrade">
  1495. <el-input
  1496. ref="upkeepgrade"
  1497. v-model="seeTemp.upkeepgrade"
  1498. placeholder="请输入保养级别"
  1499. disabled
  1500. />
  1501. </el-form-item>
  1502. </el-col>
  1503. </el-row>
  1504. <el-row>
  1505. <el-col :span="6">
  1506. <el-form-item label="保养费用:" prop="yearUpkeepCost">
  1507. <el-input
  1508. ref="yearUpkeepCost"
  1509. v-model="seeTemp.yearUpkeepCost"
  1510. placeholder="请输入近一年保养费用"
  1511. disabled
  1512. />
  1513. </el-form-item>
  1514. </el-col>
  1515. <el-col :span="6">
  1516. <el-form-item label="维修费用:" prop="yearMaintainCost">
  1517. <el-input
  1518. ref="yearMaintainCost"
  1519. v-model="seeTemp.yearMaintainCost"
  1520. placeholder="请输入近一年维修费用"
  1521. disabled
  1522. />
  1523. </el-form-item>
  1524. </el-col>
  1525. <el-col :span="6">
  1526. <el-form-item label="基数(小时):" prop="baseHours">
  1527. <el-input
  1528. ref="baseHours"
  1529. v-model="seeTemp.baseHours"
  1530. placeholder="请输入基数"
  1531. disabled
  1532. />
  1533. </el-form-item>
  1534. </el-col>
  1535. <el-col :span="6">
  1536. <el-form-item label="牧场:" prop="pastureName">
  1537. <el-input
  1538. ref="pastureName"
  1539. v-model="seeTemp.pastureName"
  1540. placeholder="请输入牧场"
  1541. disabled
  1542. />
  1543. </el-form-item>
  1544. </el-col>
  1545. </el-row>
  1546. <el-row>
  1547. <el-col :span="6">
  1548. <el-form-item label="部门:" prop="deptName">
  1549. <el-input
  1550. ref="deptName"
  1551. v-model="seeTemp.deptName"
  1552. placeholder="请输入部门"
  1553. disabled
  1554. />
  1555. </el-form-item>
  1556. </el-col>
  1557. <el-col :span="6">
  1558. <el-form-item label="责任人:" prop="employeName">
  1559. <el-input
  1560. ref="employeName"
  1561. v-model="seeTemp.employeName"
  1562. placeholder="请输入责任人"
  1563. disabled
  1564. />
  1565. </el-form-item>
  1566. </el-col>
  1567. <el-col :span="6">
  1568. <el-form-item label="录入人:" prop="inputUserName">
  1569. <el-input
  1570. ref="inputUserName"
  1571. v-model="seeTemp.inputUserName"
  1572. placeholder="请输入录入人"
  1573. disabled
  1574. />
  1575. </el-form-item>
  1576. </el-col>
  1577. <el-col :span="6">
  1578. <el-form-item label="录入时间:" prop="inputDatetime">
  1579. <el-input
  1580. ref="inputDatetime"
  1581. v-model="seeTemp.inputDatetime"
  1582. placeholder="请输入录入时间"
  1583. disabled
  1584. />
  1585. </el-form-item>
  1586. </el-col>
  1587. </el-row>
  1588. <el-row>
  1589. <el-col :span="6">
  1590. <el-form-item label="指定维修人:" prop="maintenanceName">
  1591. <el-input
  1592. ref="maintenanceName"
  1593. v-model="seeTemp.maintenanceName"
  1594. placeholder=""
  1595. disabled
  1596. />
  1597. </el-form-item>
  1598. </el-col>
  1599. <el-col :span="6">
  1600. <el-form-item label="一级督办:" prop="leveloneName">
  1601. <el-input
  1602. ref="leveloneName"
  1603. v-model="seeTemp.leveloneName"
  1604. placeholder=""
  1605. disabled
  1606. />
  1607. </el-form-item>
  1608. </el-col>
  1609. <el-col :span="6">
  1610. <el-form-item
  1611. label="一级间隔时间(小时):"
  1612. prop="leveloneTime"
  1613. >
  1614. <el-input
  1615. ref="leveloneTime"
  1616. v-model="seeTemp.leveloneTime"
  1617. placeholder=""
  1618. disabled
  1619. />
  1620. </el-form-item>
  1621. </el-col>
  1622. <el-col :span="6">
  1623. <el-form-item label="二级督办:" prop="leveltwoName">
  1624. <el-input
  1625. ref="leveltwoName"
  1626. v-model="seeTemp.leveltwoName"
  1627. placeholder=""
  1628. disabled
  1629. />
  1630. </el-form-item>
  1631. </el-col>
  1632. </el-row>
  1633. <el-row>
  1634. <el-col :span="6">
  1635. <el-form-item
  1636. label="二级间隔时间(小时):"
  1637. prop="leveltwoTime"
  1638. >
  1639. <el-input
  1640. ref="leveltwoTime"
  1641. v-model="seeTemp.leveltwoTime"
  1642. placeholder=""
  1643. disabled
  1644. />
  1645. </el-form-item>
  1646. </el-col>
  1647. <el-col :span="6">
  1648. <el-form-item label="三级督办:" prop="levelthreeName">
  1649. <el-input
  1650. ref="levelthreeName"
  1651. v-model="seeTemp.levelthreeName"
  1652. placeholder=""
  1653. disabled
  1654. />
  1655. </el-form-item>
  1656. </el-col>
  1657. <el-col :span="6">
  1658. <el-form-item
  1659. label="三级间隔时间(小时):"
  1660. prop="levelthreeTime"
  1661. >
  1662. <el-input
  1663. ref="levelthreeTime"
  1664. v-model="seeTemp.levelthreeTime"
  1665. placeholder=""
  1666. disabled
  1667. />
  1668. </el-form-item>
  1669. </el-col>
  1670. <el-col :span="6">
  1671. <el-form-item label="物联网编码" prop="license">
  1672. <el-input
  1673. ref="license"
  1674. v-model="seeTemp.license"
  1675. placeholder="物联网编码"
  1676. disabled
  1677. />
  1678. </el-form-item>
  1679. </el-col>
  1680. </el-row>
  1681. <el-row>
  1682. <el-col :span="6">
  1683. <el-form-item label="标准工作时长" prop="duration">
  1684. <el-input
  1685. ref="duration"
  1686. v-model="seeTemp.duration"
  1687. placeholder="标准工作时长"
  1688. disabled
  1689. />
  1690. </el-form-item>
  1691. </el-col>
  1692. <el-col :span="6">
  1693. <el-form-item label="工作类别" prop="work">
  1694. <el-input
  1695. ref="duration"
  1696. v-model="seeTemp.work"
  1697. placeholder="工作类别"
  1698. disabled
  1699. />
  1700. </el-form-item>
  1701. </el-col>
  1702. </el-row>
  1703. <el-row>
  1704. <el-col>
  1705. <el-form-item label="设备图片:">
  1706. <el-popover placement="right" title="" trigger="hover">
  1707. <img
  1708. v-if="
  1709. seeTemp.picpath !== '' && seeTemp.srcpath !== ''
  1710. "
  1711. :src="seeTemp.picpath"
  1712. >
  1713. <img
  1714. v-if="
  1715. seeTemp.picpath !== '' && seeTemp.srcpath !== ''
  1716. "
  1717. slot="reference"
  1718. :src="seeTemp.picpath"
  1719. :alt="seeTemp.srcpath"
  1720. style="height: 100px; width: 100px"
  1721. >
  1722. </el-popover>
  1723. </el-form-item>
  1724. </el-col>
  1725. </el-row>
  1726. <div v-if="isFlowChart">
  1727. <el-row>
  1728. <el-col>
  1729. <el-form-item label="流程进度" />
  1730. <el-steps
  1731. :active="active"
  1732. align-center
  1733. finish-status="success"
  1734. >
  1735. <el-step
  1736. v-for="(item, index) in activeList"
  1737. :key="index"
  1738. :title="item.title"
  1739. :status="item.status"
  1740. >
  1741. <template slot="description">
  1742. <div class="step-row">
  1743. <div>
  1744. {{ item.name }}&nbsp;&nbsp;{{ item.date }}
  1745. </div>
  1746. <div>{{ item.reason }}</div>
  1747. </div>
  1748. </template>
  1749. </el-step>
  1750. </el-steps>
  1751. </el-col>
  1752. </el-row>
  1753. <el-row>
  1754. <el-col>
  1755. <el-form-item label="操作:">
  1756. <el-button
  1757. v-if="isBasicExamine && seeTemp.SHStatus == 0"
  1758. type="success"
  1759. style="display: inline-block"
  1760. @click="handleExamine()"
  1761. >审核</el-button>
  1762. <el-button
  1763. v-else
  1764. type="success"
  1765. style="display: none"
  1766. @click="handleExamine()"
  1767. >审核</el-button>
  1768. </el-form-item>
  1769. </el-col>
  1770. </el-row>
  1771. </div>
  1772. </el-form>
  1773. </el-tab-pane>
  1774. <el-tab-pane v-if="isDisplayRecord" label="点检记录" name="second">
  1775. <el-date-picker
  1776. ref="inputDatetimeCheck1"
  1777. v-model="
  1778. getAssetBigSpotCheckListParm.parammaps.inputDatetimeSpotCheck1
  1779. "
  1780. class="inputDatetime"
  1781. type="datetimerange"
  1782. style="width: 250px; margin-bottom: 10px"
  1783. format="yyyy-MM-dd"
  1784. value-format="yyyy-MM-dd"
  1785. range-separator="至"
  1786. start-placeholder="开始日期"
  1787. end-placeholder="结束日期"
  1788. />
  1789. <el-button
  1790. v-waves
  1791. class="filter-item"
  1792. type="primary"
  1793. icon="el-icon-search"
  1794. @click="form_searchSportCheck"
  1795. >搜索</el-button>
  1796. <el-table
  1797. :key="tableKey"
  1798. v-loading="listLoadingSpotCheck1"
  1799. element-loading-text="给我一点时间"
  1800. :data="listSpotCheck1"
  1801. border
  1802. fit
  1803. highlight-current-row
  1804. style="width: 100%"
  1805. :row-style="rowStyle"
  1806. :cell-style="cellStyle"
  1807. class="elTable"
  1808. >
  1809. <el-table-column
  1810. label="序号"
  1811. align="center"
  1812. type="index"
  1813. width="50px"
  1814. >
  1815. <template slot-scope="scope">
  1816. <span>{{
  1817. scope.$index +
  1818. (pageNumSpotCheck1 - 1) * pageSizeSpotCheck1 +
  1819. 1
  1820. }}</span>
  1821. </template>
  1822. </el-table-column>
  1823. <el-table-column
  1824. label="点检结果"
  1825. sortable
  1826. prop="inspectionResults"
  1827. min-width="110px"
  1828. align="center"
  1829. />
  1830. <el-table-column
  1831. label="点检日期"
  1832. sortable
  1833. prop="date"
  1834. min-width="110px"
  1835. align="center"
  1836. />
  1837. <el-table-column
  1838. label="点检人"
  1839. sortable
  1840. prop="empname"
  1841. min-width="110px"
  1842. align="center"
  1843. />
  1844. </el-table>
  1845. <pagination
  1846. v-show="total >= 0"
  1847. :total="totalSpotCheck1"
  1848. :page.sync="getAssetBigSpotCheckListParm.offset"
  1849. :limit.sync="getAssetBigSpotCheckListParm.pagecount"
  1850. @pagination="getAssetBigSpotCheckList"
  1851. />
  1852. </el-tab-pane>
  1853. <el-tab-pane v-if="isDisplayRecord" label="保养记录" name="third">
  1854. <el-input
  1855. v-model="getBigupkeepbyeqParm.parammaps.upkeepCode"
  1856. placeholder="保养单号"
  1857. style="width: 140px"
  1858. class="filter-item"
  1859. />
  1860. <el-select
  1861. v-model="getBigupkeepbyeqParm.parammaps.upkeepType"
  1862. clearable
  1863. placeholder="保养类型"
  1864. class="filter-item"
  1865. style="width: 120px"
  1866. >
  1867. <el-option
  1868. v-for="item in maintainTypes"
  1869. :key="item.id"
  1870. :label="item.name"
  1871. :value="item.name"
  1872. />
  1873. </el-select>
  1874. <el-date-picker
  1875. ref="inputDatetimeUpkeepbyeq"
  1876. v-model="getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq"
  1877. class="inputDatetime"
  1878. type="datetimerange"
  1879. style="width: 250px; margin-bottom: 10px"
  1880. format="yyyy-MM-dd"
  1881. value-format="yyyy-MM-dd"
  1882. range-separator="至"
  1883. start-placeholder="开始日期"
  1884. end-placeholder="结束日期"
  1885. />
  1886. <el-button
  1887. v-waves
  1888. class="filter-item"
  1889. type="primary"
  1890. icon="el-icon-search"
  1891. @click="form_searchUpkeepbyeq"
  1892. >搜索</el-button>
  1893. <el-table
  1894. :key="tableKey"
  1895. v-loading="listLoadingUpkeepbyeq"
  1896. element-loading-text="给我一点时间"
  1897. :data="listUpkeepbyeq"
  1898. border
  1899. fit
  1900. highlight-current-row
  1901. style="width: 100%"
  1902. :row-style="rowStyle"
  1903. :cell-style="cellStyle"
  1904. class="elTable"
  1905. @sort-change="tableSort"
  1906. >
  1907. <el-table-column
  1908. label="序号"
  1909. align="center"
  1910. type="index"
  1911. width="50px"
  1912. >
  1913. <template slot-scope="scope">
  1914. <span>{{
  1915. scope.$index +
  1916. (pageNumUpkeepbyeq - 1) * pageSizeUpkeepbyeq +
  1917. 1
  1918. }}</span>
  1919. </template>
  1920. </el-table-column>
  1921. <el-table-column
  1922. label="保养单号"
  1923. prop="upkeepCode"
  1924. min-width="110px"
  1925. align="center"
  1926. />
  1927. <el-table-column
  1928. label="保养日期"
  1929. sortable
  1930. prop="plantime"
  1931. min-width="110px"
  1932. align="center"
  1933. />
  1934. <el-table-column
  1935. label="保养名称"
  1936. prop="upkeepName"
  1937. min-width="110px"
  1938. align="center"
  1939. />
  1940. <el-table-column
  1941. label="保养类型"
  1942. prop="upkeepType"
  1943. min-width="110px"
  1944. align="center"
  1945. />
  1946. <el-table-column
  1947. label="保养级别"
  1948. prop="upkeepLevel"
  1949. min-width="110px"
  1950. align="center"
  1951. />
  1952. <el-table-column
  1953. label="保养人"
  1954. prop="upkeepPerson"
  1955. min-width="110px"
  1956. align="center"
  1957. />
  1958. <el-table-column
  1959. label="保养费用"
  1960. prop="upkeepCost"
  1961. min-width="110px"
  1962. align="center"
  1963. />
  1964. </el-table>
  1965. <pagination
  1966. v-show="total >= 0"
  1967. :total="totalUpkeepbyeq"
  1968. :page.sync="getBigupkeepbyeqParm.offset"
  1969. :limit.sync="getBigupkeepbyeqParm.pagecount"
  1970. @pagination="getBigupkeepbyeqList"
  1971. />
  1972. </el-tab-pane>
  1973. <el-tab-pane v-if="isDisplayRecord" label="维修记录" name="fouth">
  1974. <el-input
  1975. v-model="getAssetMaintainParm.parammaps.repairCode"
  1976. placeholder="维修单号"
  1977. style="width: 140px"
  1978. class="filter-item"
  1979. />
  1980. <el-date-picker
  1981. ref="inputDatetimeAssetMaintain"
  1982. v-model="
  1983. getAssetMaintainParm.parammaps.inputDatetimeAssetMaintain
  1984. "
  1985. class="inputDatetime"
  1986. type="datetimerange"
  1987. style="width: 250px; margin-bottom: 10px"
  1988. format="yyyy-MM-dd"
  1989. value-format="yyyy-MM-dd"
  1990. range-separator="至"
  1991. start-placeholder="开始日期"
  1992. end-placeholder="结束日期"
  1993. />
  1994. <el-button
  1995. v-waves
  1996. class="filter-item"
  1997. type="primary"
  1998. icon="el-icon-search"
  1999. @click="form_searchAssetMaintain"
  2000. >搜索</el-button>
  2001. <el-table
  2002. :key="tableKey"
  2003. v-loading="listLoadingAssetMaintain"
  2004. element-loading-text="给我一点时间"
  2005. :data="listAssetMaintain"
  2006. border
  2007. fit
  2008. highlight-current-row
  2009. style="width: 100%"
  2010. :row-style="rowStyle"
  2011. :cell-style="cellStyle"
  2012. class="elTable"
  2013. @sort-change="tableSort"
  2014. >
  2015. <el-table-column
  2016. label="序号"
  2017. align="center"
  2018. type="index"
  2019. width="50px"
  2020. >
  2021. <template slot-scope="scope">
  2022. <span>{{
  2023. scope.$index +
  2024. (pageNumAssetMaintain - 1) * pageSizeAssetMaintain +
  2025. 1
  2026. }}</span>
  2027. </template>
  2028. </el-table-column>
  2029. <el-table-column
  2030. label="维修单号"
  2031. prop="repairCode"
  2032. min-width="110px"
  2033. align="center"
  2034. />
  2035. <el-table-column
  2036. label="报修人"
  2037. prop="requestName"
  2038. min-width="110px"
  2039. align="center"
  2040. />
  2041. <el-table-column
  2042. label="报修时间"
  2043. sortable
  2044. prop="requestTime"
  2045. min-width="110px"
  2046. align="center"
  2047. />
  2048. <el-table-column
  2049. label="维修人"
  2050. prop="empname"
  2051. min-width="110px"
  2052. align="center"
  2053. />
  2054. <el-table-column
  2055. label="维修时间"
  2056. sortable
  2057. prop="stopTime"
  2058. min-width="110px"
  2059. align="center"
  2060. />
  2061. <el-table-column
  2062. label="诊断故障"
  2063. prop="details"
  2064. min-width="110px"
  2065. align="center"
  2066. />
  2067. <el-table-column
  2068. label="维修费用"
  2069. sortable
  2070. prop="maintenanceCost"
  2071. min-width="110px"
  2072. align="center"
  2073. />
  2074. </el-table>
  2075. <pagination
  2076. v-show="total >= 0"
  2077. :total="totalAssetMaintain"
  2078. :page.sync="getAssetMaintainParm.offset"
  2079. :limit.sync="getAssetMaintainParm.pagecount"
  2080. @pagination="getAssetMaintainList"
  2081. />
  2082. </el-tab-pane>
  2083. <el-tab-pane v-if="isDisplayRecord" label="启停记录" name="fifth">
  2084. <div class="filter-container">
  2085. <el-date-picker
  2086. v-model="getAssetSTTParm.parammaps.startTime"
  2087. type="date"
  2088. placeholder="开启日期"
  2089. style="width: 170px; top: -3px"
  2090. format="yyyy-MM-dd"
  2091. value-format="yyyy-MM-dd"
  2092. />
  2093. <el-date-picker
  2094. v-model="getAssetSTTParm.parammaps.stopTime"
  2095. type="date"
  2096. placeholder="关闭日期"
  2097. style="width: 170px; top: -3px"
  2098. format="yyyy-MM-dd"
  2099. value-format="yyyy-MM-dd"
  2100. />
  2101. <el-button
  2102. v-waves
  2103. class="filter-item"
  2104. type="primary"
  2105. icon="el-icon-search"
  2106. @click="form_searchAssetSTT"
  2107. >搜索</el-button>
  2108. </div>
  2109. <el-table
  2110. :key="tableKey"
  2111. v-loading="listLoadingAssetSTT"
  2112. element-loading-text="给我一点时间"
  2113. :data="listAssetSTT"
  2114. border
  2115. fit
  2116. highlight-current-row
  2117. style="width: 100%"
  2118. :row-style="rowStyle"
  2119. :cell-style="cellStyle"
  2120. class="elTable"
  2121. >
  2122. <el-table-column
  2123. label="序号"
  2124. align="center"
  2125. type="index"
  2126. width="50"
  2127. >
  2128. <template slot-scope="scope">
  2129. <span>{{
  2130. scope.$index +
  2131. (pageNumAssetSTT - 1) * pageSizeAssetSTT +
  2132. 1
  2133. }}</span>
  2134. </template>
  2135. </el-table-column>
  2136. <el-table-column
  2137. label="开启时间"
  2138. sortable
  2139. prop="enabledTime"
  2140. min-width="110px"
  2141. align="center"
  2142. />
  2143. <el-table-column
  2144. label="关闭时间"
  2145. sortable
  2146. prop="blockTime"
  2147. min-width="110px"
  2148. align="center"
  2149. />
  2150. <el-table-column
  2151. label="运行时间(分钟)"
  2152. sortable
  2153. prop="runTime"
  2154. min-width="110px"
  2155. align="center"
  2156. />
  2157. <el-table-column
  2158. label="关闭人"
  2159. prop="blockName"
  2160. min-width="110px"
  2161. align="center"
  2162. />
  2163. </el-table>
  2164. <pagination
  2165. v-show="total >= 0"
  2166. :total="totalAssetSTT"
  2167. :page.sync="getAssetSTTParm.offset"
  2168. :limit.sync="getAssetSTTParm.pagecount"
  2169. @pagination="getAssetSTTList"
  2170. />
  2171. </el-tab-pane>
  2172. <el-tab-pane v-if="isDisplayRecord" label="变更记录" name="sixth">
  2173. <div class="filter-container">
  2174. <el-select
  2175. v-model="getAssetChangeParm.parammaps.changeStatue"
  2176. clearable
  2177. placeholder="变更状态"
  2178. class="filter-item"
  2179. style="width: 120px"
  2180. >
  2181. <el-option
  2182. v-for="item in changeStates"
  2183. :key="item.id"
  2184. :label="item.name"
  2185. :value="item.id"
  2186. />
  2187. </el-select>
  2188. <el-date-picker
  2189. ref="inputDatetimeAssetChange"
  2190. v-model="
  2191. getAssetChangeParm.parammaps.inputDatetimeAssetChange
  2192. "
  2193. class="inputDatetime"
  2194. type="datetimerange"
  2195. style="width: 250px; margin-bottom: 10px"
  2196. format="yyyy-MM-dd"
  2197. value-format="yyyy-MM-dd"
  2198. range-separator="至"
  2199. start-placeholder="开始日期"
  2200. end-placeholder="结束日期"
  2201. />
  2202. <el-button
  2203. v-waves
  2204. class="filter-item"
  2205. type="primary"
  2206. icon="el-icon-search"
  2207. @click="form_searchAssetChange"
  2208. >搜索</el-button>
  2209. </div>
  2210. <el-table
  2211. :key="tableKey"
  2212. v-loading="listLoadingAssetChange"
  2213. element-loading-text="给我一点时间"
  2214. :data="listAssetChange"
  2215. border
  2216. fit
  2217. highlight-current-row
  2218. style="width: 100%"
  2219. :row-style="rowStyle"
  2220. :cell-style="cellStyle"
  2221. class="elTable"
  2222. >
  2223. <el-table-column
  2224. label="序号"
  2225. align="center"
  2226. type="index"
  2227. width="50px"
  2228. >
  2229. <template slot-scope="scope">
  2230. <span>{{
  2231. scope.$index +
  2232. (pageNumAssetChange - 1) * pageSizeAssetChange +
  2233. 1
  2234. }}</span>
  2235. </template>
  2236. </el-table-column>
  2237. <el-table-column
  2238. label="变更时间"
  2239. sortable
  2240. prop="changeTime"
  2241. min-width="110px"
  2242. align="center"
  2243. />
  2244. <el-table-column
  2245. label="变更状态"
  2246. :formatter="changeStatue"
  2247. prop="blockTime"
  2248. min-width="110px"
  2249. align="center"
  2250. />
  2251. <el-table-column
  2252. label="变更人"
  2253. prop="changeName"
  2254. min-width="110px"
  2255. align="center"
  2256. />
  2257. </el-table>
  2258. <pagination
  2259. v-show="total >= 0"
  2260. :total="totalAssetChange"
  2261. :page.sync="getAssetChangeParm.offset"
  2262. :limit.sync="getAssetChangeParm.pagecount"
  2263. @pagination="getAssetChangeList"
  2264. />
  2265. </el-tab-pane>
  2266. <el-tab-pane
  2267. v-if="isDisplayRecord"
  2268. label="备件领用记录"
  2269. name="seventh"
  2270. >
  2271. <el-input
  2272. v-model="getAssetPartApplyParm.parammaps.useCode"
  2273. placeholder="出库单号"
  2274. style="width: 140px"
  2275. class="filter-item"
  2276. />
  2277. <el-input
  2278. v-model="getAssetPartApplyParm.parammaps.partCode"
  2279. placeholder="备件编号"
  2280. style="width: 140px"
  2281. class="filter-item"
  2282. />
  2283. <el-input
  2284. v-model="getAssetPartApplyParm.parammaps.partName"
  2285. placeholder="备件名称"
  2286. style="width: 140px"
  2287. class="filter-item"
  2288. />
  2289. <el-date-picker
  2290. ref="inputDatetimeAssetPartApply"
  2291. v-model="
  2292. getAssetPartApplyParm.parammaps.inputDatetimeAssetPartApply
  2293. "
  2294. class="inputDatetime"
  2295. type="datetimerange"
  2296. style="width: 250px; margin-bottom: 10px"
  2297. format="yyyy-MM-dd"
  2298. value-format="yyyy-MM-dd"
  2299. range-separator="至"
  2300. start-placeholder="开始日期"
  2301. end-placeholder="结束日期"
  2302. />
  2303. <el-button
  2304. v-waves
  2305. class="filter-item"
  2306. type="primary"
  2307. icon="el-icon-search"
  2308. @click="form_searchAssetPartApply"
  2309. >搜索</el-button>
  2310. <el-table
  2311. :key="tableKey"
  2312. v-loading="listLoadingAssetPartApply"
  2313. element-loading-text="给我一点时间"
  2314. :data="listAssetPartApply"
  2315. border
  2316. fit
  2317. highlight-current-row
  2318. style="width: 100%"
  2319. :row-style="rowStyle"
  2320. :cell-style="cellStyle"
  2321. class="elTable"
  2322. @sort-change="tableSort"
  2323. >
  2324. <el-table-column
  2325. label="序号"
  2326. align="center"
  2327. type="index"
  2328. width="50px"
  2329. >
  2330. <template slot-scope="scope">
  2331. <span>{{
  2332. scope.$index +
  2333. (pageNumAssetPartApply - 1) * pageSizeAssetPartApply +
  2334. 1
  2335. }}</span>
  2336. </template>
  2337. </el-table-column>
  2338. <el-table-column
  2339. label="出库单号"
  2340. prop="useForm"
  2341. min-width="110px"
  2342. align="center"
  2343. />
  2344. <el-table-column
  2345. label="备件编号"
  2346. sortable
  2347. prop="partCode"
  2348. min-width="110px"
  2349. align="center"
  2350. />
  2351. <el-table-column
  2352. label="备件名称"
  2353. prop="partName"
  2354. min-width="110px"
  2355. align="center"
  2356. />
  2357. <el-table-column
  2358. label="备件规格"
  2359. prop="specification"
  2360. min-width="110px"
  2361. align="center"
  2362. />
  2363. <el-table-column
  2364. label="备件品牌"
  2365. prop="brandName"
  2366. min-width="110px"
  2367. align="center"
  2368. />
  2369. <el-table-column
  2370. label="计量单位"
  2371. prop="unit"
  2372. min-width="110px"
  2373. align="center"
  2374. />
  2375. <el-table-column
  2376. label="领用数量"
  2377. sortable
  2378. prop="useNumber"
  2379. min-width="110px"
  2380. align="center"
  2381. />
  2382. <el-table-column
  2383. label="实际出库数量"
  2384. sortable
  2385. prop="checkoutNumber"
  2386. min-width="110px"
  2387. align="center"
  2388. />
  2389. <el-table-column
  2390. label="单价"
  2391. sortable
  2392. prop="price"
  2393. min-width="110px"
  2394. align="center"
  2395. />
  2396. <el-table-column
  2397. label="总价"
  2398. sortable
  2399. prop="sumPrice"
  2400. min-width="110px"
  2401. align="center"
  2402. />
  2403. <el-table-column
  2404. label="领用部门"
  2405. prop="departmentName"
  2406. min-width="110px"
  2407. align="center"
  2408. />
  2409. <el-table-column
  2410. label="领用时间"
  2411. sortable
  2412. prop="receiveTime"
  2413. min-width="110px"
  2414. align="center"
  2415. />
  2416. <el-table-column
  2417. label="距离上次时间(天)"
  2418. sortable
  2419. prop="dif"
  2420. min-width="110px"
  2421. align="center"
  2422. />
  2423. </el-table>
  2424. <pagination
  2425. v-show="total >= 0"
  2426. :total="totalAssetPartApply"
  2427. :page.sync="getAssetPartApplyParm.offset"
  2428. :limit.sync="getAssetPartApplyParm.pagecount"
  2429. @pagination="getAssetPartApplyList"
  2430. />
  2431. </el-tab-pane>
  2432. <el-tab-pane v-if="isDisplayRecord" label="费用统计" name="eighth">
  2433. <el-row>
  2434. <el-col :span="12">
  2435. <div
  2436. v-if="activeName === 'eighth'"
  2437. id="barChart1"
  2438. style="width: 100%; height: 400px"
  2439. />
  2440. </el-col>
  2441. <el-col :span="12">
  2442. <div
  2443. v-if="activeName === 'eighth'"
  2444. id="barChart2"
  2445. style="width: 100%; height: 400px"
  2446. />
  2447. </el-col>
  2448. </el-row>
  2449. <el-dialog
  2450. :title="textMap[dialogStatus]"
  2451. append-to-body
  2452. :visible.sync="dialogFormVisible_ChartSee"
  2453. :close-on-click-modal="false"
  2454. width="80%"
  2455. >
  2456. <div class="app-contentSee">
  2457. <div class="filter-container">
  2458. <el-select
  2459. v-model="getChartSeeParm.parammaps.useTypeV"
  2460. placeholder="类型"
  2461. clearable
  2462. class="filter-item"
  2463. style="width: 120px"
  2464. >
  2465. <el-option
  2466. v-for="item in useTypes"
  2467. :key="item.id"
  2468. :label="item.name"
  2469. :value="item.name"
  2470. />
  2471. </el-select>
  2472. <el-date-picker
  2473. ref="inputDatetime2"
  2474. v-model="getChartSeeParm.parammaps.inputDatetime2"
  2475. class="inputDatetime"
  2476. type="datetimerange"
  2477. style="width: 250px; top: -3px"
  2478. format="yyyy-MM-dd"
  2479. value-format="yyyy-MM-dd"
  2480. range-separator="至"
  2481. start-placeholder="开始日期"
  2482. end-placeholder="结束日期"
  2483. />
  2484. <el-button
  2485. v-waves
  2486. class="filter-item"
  2487. type="primary"
  2488. icon="el-icon-search"
  2489. @click="form_searchChartSee"
  2490. >搜索</el-button>
  2491. <el-button
  2492. class="filter-item"
  2493. style="margin-left: 10px"
  2494. type="success"
  2495. icon="el-icon-edit"
  2496. @click="handleDownloadChartSee"
  2497. >导出</el-button>
  2498. </div>
  2499. <el-table
  2500. :key="tableKey"
  2501. v-loading="listLoadingChartSee"
  2502. element-loading-text="给我一点时间"
  2503. :data="listChartSee"
  2504. border
  2505. fit
  2506. highlight-current-row
  2507. style="width: 100%"
  2508. :row-style="rowStyle"
  2509. :cell-style="cellStyle"
  2510. class="elTable"
  2511. >
  2512. <el-table-column
  2513. label="序号"
  2514. align="center"
  2515. type="index"
  2516. width="50px"
  2517. >
  2518. <template slot-scope="scope">
  2519. <span>{{
  2520. scope.$index +
  2521. (pageNumChartSee - 1) * pageSizeChartSee +
  2522. 1
  2523. }}</span>
  2524. </template>
  2525. </el-table-column>
  2526. <el-table-column :key="1" label="类型" align="center">
  2527. <template slot-scope="scope">
  2528. <span>{{ scope.row.useTypeV }}</span>
  2529. </template>
  2530. </el-table-column>
  2531. <el-table-column
  2532. :key="2"
  2533. label="单号"
  2534. width="140px"
  2535. align="center"
  2536. >
  2537. <template slot-scope="scope">
  2538. <span>{{ scope.row.RUcode }}</span>
  2539. </template>
  2540. </el-table-column>
  2541. <el-table-column
  2542. :key="3"
  2543. label="领用日期"
  2544. min-width="80px"
  2545. align="center"
  2546. >
  2547. <template slot-scope="scope">
  2548. <span>{{ scope.row.creatTime }}</span>
  2549. </template>
  2550. </el-table-column>
  2551. <el-table-column
  2552. :key="4"
  2553. label="领用部门"
  2554. min-width="100px"
  2555. align="center"
  2556. >
  2557. <template slot-scope="scope">
  2558. <span>{{ scope.row.departmentName }}</span>
  2559. </template>
  2560. </el-table-column>
  2561. <el-table-column
  2562. :key="5"
  2563. label="备件编号"
  2564. min-width="80px"
  2565. align="center"
  2566. >
  2567. <template slot-scope="scope">
  2568. <span>{{ scope.row.partCode }}</span>
  2569. </template>
  2570. </el-table-column>
  2571. <el-table-column
  2572. :key="6"
  2573. label="备件名称"
  2574. min-width="80px"
  2575. align="center"
  2576. >
  2577. <template slot-scope="scope">
  2578. <span>{{ scope.row.partName }}</span>
  2579. </template>
  2580. </el-table-column>
  2581. <el-table-column
  2582. :key="7"
  2583. label="备件规格"
  2584. min-width="80px"
  2585. align="center"
  2586. >
  2587. <template slot-scope="scope">
  2588. <span>{{ scope.row.specification }}</span>
  2589. </template>
  2590. </el-table-column>
  2591. <el-table-column
  2592. :key="8"
  2593. label="备件品牌"
  2594. min-width="100px"
  2595. align="center"
  2596. >
  2597. <template slot-scope="scope">
  2598. <span>{{ scope.row.brandName }}</span>
  2599. </template>
  2600. </el-table-column>
  2601. <el-table-column
  2602. :key="9"
  2603. label="计量单位"
  2604. min-width="80px"
  2605. align="center"
  2606. >
  2607. <template slot-scope="scope">
  2608. <span>{{ scope.row.unit }}</span>
  2609. </template>
  2610. </el-table-column>
  2611. <el-table-column
  2612. :key="10"
  2613. label="出库数量"
  2614. min-width="110px"
  2615. align="center"
  2616. >
  2617. <template slot-scope="scope">
  2618. <span>{{ scope.row.checkoutNumber }}</span>
  2619. </template>
  2620. </el-table-column>
  2621. <el-table-column
  2622. :key="11"
  2623. label="退库数量"
  2624. min-width="100px"
  2625. align="center"
  2626. >
  2627. <template slot-scope="scope">
  2628. <span>{{ scope.row.quitNumber }}</span>
  2629. </template>
  2630. </el-table-column>
  2631. <el-table-column
  2632. :key="12"
  2633. label="单价"
  2634. min-width="110px"
  2635. align="center"
  2636. >
  2637. <template slot-scope="scope">
  2638. <span>{{ scope.row.price }}</span>
  2639. </template>
  2640. </el-table-column>
  2641. <el-table-column
  2642. :key="13"
  2643. label="总价"
  2644. min-width="110px"
  2645. align="center"
  2646. >
  2647. <template slot-scope="scope">
  2648. <span>{{ scope.row.sumPrice }}</span>
  2649. </template>
  2650. </el-table-column>
  2651. </el-table>
  2652. <pagination
  2653. v-show="totalChartSee >= 0"
  2654. :total="totalChartSee"
  2655. :page.sync="getChartSeeParm.offset"
  2656. :limit.sync="getChartSeeParm.pagecount"
  2657. @pagination="getChartSeeList"
  2658. />
  2659. </div>
  2660. </el-dialog>
  2661. </el-tab-pane>
  2662. </el-tabs>
  2663. </div>
  2664. <div
  2665. slot="footer"
  2666. class="dialog-footer"
  2667. style="right: 30px; position: absolute; bottom: 10px"
  2668. >
  2669. <el-button @click="dialogFormVisible_See = false">关闭</el-button>
  2670. </div>
  2671. </div>
  2672. </el-dialog>
  2673. <!-- 审核 -->
  2674. <el-dialog
  2675. :title="textMap[dialogStatus]"
  2676. :visible.sync="dialogFormVisible_Examine"
  2677. :close-on-click-modal="false"
  2678. width="30%"
  2679. >
  2680. <div class="app-examine">
  2681. <h3 style="width: 100%; margin: 0 0 0 5%; line-height: 50px">
  2682. 请确认审核结果:
  2683. </h3>
  2684. <el-form
  2685. ref="examineTemp"
  2686. :rules="rules"
  2687. :model="examineTemp"
  2688. label-position="right"
  2689. style="width: 50%; margin: 0 auto"
  2690. >
  2691. <el-row style="width: 88%; height: 150px; margin: 0 auto">
  2692. <el-col :span="20">
  2693. <el-form-item>
  2694. <el-radio-group
  2695. v-model="examineTemp.SHstatue"
  2696. @change="changeSHStatue"
  2697. >
  2698. <el-radio :label="1" checked>通过</el-radio>
  2699. <el-radio :label="2">不通过</el-radio>
  2700. </el-radio-group>
  2701. </el-form-item>
  2702. </el-col>
  2703. <el-col v-if="statueReason" :span="22">
  2704. <el-input
  2705. v-model="examineTemp.workflowNote"
  2706. type="textarea"
  2707. :autosize="{ minRows: 2, maxRows: 3 }"
  2708. placeholder="请输入不通过原因"
  2709. />
  2710. </el-col>
  2711. </el-row>
  2712. </el-form>
  2713. </div>
  2714. <div slot="footer" class="dialog-footer">
  2715. <el-button
  2716. type="primary"
  2717. :disabled="isokDisable"
  2718. @click="
  2719. dialogStatus === 'examine'
  2720. ? createExamineData()
  2721. : createExamineData()
  2722. "
  2723. >确认</el-button>
  2724. <el-button @click="dialogFormVisible_Examine = false">关闭</el-button>
  2725. </div>
  2726. </el-dialog>
  2727. <!-- 变更 -->
  2728. <el-dialog
  2729. :title="textMap[dialogStatus]"
  2730. :visible.sync="dialogFormVisible_change"
  2731. :close-on-click-modal="false"
  2732. width="30%"
  2733. >
  2734. <div class="app-change">
  2735. <el-form
  2736. ref="batchChangeTemp"
  2737. :rules="rules"
  2738. :model="batchChange.temp"
  2739. label-position="right"
  2740. label-width="115px"
  2741. style="width: 90%; margin: 0 auto 30px"
  2742. @click.native.prevent
  2743. @submit.native.prevent
  2744. >
  2745. <el-row>
  2746. <el-col :span="24">
  2747. <el-form-item label="变更部门:" prop="departmentId">
  2748. <el-select
  2749. v-model="batchChange.temp.departmentId"
  2750. placeholder="变更部门"
  2751. class="filter-item"
  2752. style="width: 100%"
  2753. @change="changeBatchDept"
  2754. >
  2755. <el-option
  2756. v-for="item in batchChange.deptList"
  2757. :key="item.deptid"
  2758. :label="item.departmentName"
  2759. :value="item.deptid"
  2760. />
  2761. </el-select>
  2762. </el-form-item>
  2763. </el-col>
  2764. </el-row>
  2765. <el-row>
  2766. <el-col :span="24">
  2767. <el-form-item label="变更责任人:" prop="employeeId">
  2768. <el-select
  2769. v-model="batchChange.temp.employeeId"
  2770. placeholder="变更责任人"
  2771. class="filter-item"
  2772. style="width: 100%"
  2773. @change="changeBatchPerson"
  2774. >
  2775. <el-option
  2776. v-for="item in batchChange.personList"
  2777. :key="item.id"
  2778. :label="item.empname"
  2779. :value="item.id"
  2780. />
  2781. </el-select>
  2782. </el-form-item>
  2783. </el-col>
  2784. </el-row>
  2785. </el-form>
  2786. <div
  2787. slot="footer"
  2788. class="dialog-footer"
  2789. style="right: 30px; position: absolute; bottom: 10px"
  2790. >
  2791. <el-button
  2792. type="primary"
  2793. :disabled="isokDisable"
  2794. @click="changeData()"
  2795. >保存并关闭</el-button>
  2796. <el-button
  2797. @click="dialogFormVisible_change = false"
  2798. >取消并关闭</el-button>
  2799. </div>
  2800. </div>
  2801. </el-dialog>
  2802. </div>
  2803. </template>
  2804. <script>
  2805. import echarts from 'echarts'
  2806. require('echarts/theme/macarons')
  2807. // 引入
  2808. import {
  2809. GetDataByName,
  2810. GetDataByNames,
  2811. PostDataByName,
  2812. PostDataByNames,
  2813. getRecuData,
  2814. checkButtons,
  2815. ExecDataByConfig,
  2816. failproccess,
  2817. GetAccount,
  2818. GetReportform,
  2819. getWorkList
  2820. } from '@/api/common'
  2821. import waves from '@/directive/waves'
  2822. import { parseTime, sortChange, json2excel } from '@/utils/index.js'
  2823. import Pagination from '@/components/Pagination'
  2824. import { MessageBox } from 'element-ui'
  2825. import TreeSelect from '@/components/TreeSelect'
  2826. import Cookies from 'js-cookie'
  2827. import { getToken } from '@/utils/auth'
  2828. export default {
  2829. inject: ['reload'],
  2830. name: 'Basics',
  2831. components: { Pagination, TreeSelect },
  2832. directives: { waves },
  2833. data() {
  2834. return {
  2835. isShow: true, // 是否有值
  2836. workList: [], // 工作类别
  2837. isEditWork: true,
  2838. isBasicsAdd: [],
  2839. isBasicsCard: [],
  2840. isBasicsUpdate: [],
  2841. isBasicsDel: [],
  2842. isBasicsDel2: [],
  2843. isBasic: [],
  2844. isBasicSH: [],
  2845. isBasicExamine: [],
  2846. rules: {
  2847. // assetCode: [{ required: true, message: '必填', trigger: 'blur' }],
  2848. // eqName: [{ required: true, message: '必填', trigger: 'blur' }],
  2849. eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
  2850. financeCode: [{ required: true, message: '必填', trigger: 'blur' }],
  2851. departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
  2852. employeeId: [{ required: true, message: '必填', trigger: 'blur' }],
  2853. depreciation: [
  2854. {
  2855. type: 'number',
  2856. required: true,
  2857. validator: (rule, value, callback) => {
  2858. if (!value) {
  2859. callback(new Error('不能为空'))
  2860. }
  2861. setTimeout(() => {
  2862. const re = /^[0-9]*[1-9][0-9]*$/ // /^[0-9]*[1-9][0-9]*$/
  2863. const rsCheck = re.test(value)
  2864. if (!rsCheck) {
  2865. callback(new Error('请输入正整数'))
  2866. } else {
  2867. callback()
  2868. }
  2869. }, 0)
  2870. },
  2871. trigger: 'blur'
  2872. }
  2873. ]
  2874. },
  2875. rulesCreate: {
  2876. // assetCode: [{ required: true, message: '必填', trigger: 'blur' }],
  2877. // eqName: [{ required: true, message: '必填', trigger: 'blur' }],
  2878. eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
  2879. financeCode: [{ required: true, message: '必填', trigger: 'blur' }],
  2880. departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
  2881. employeeId: [{ required: true, message: '必填', trigger: 'blur' }],
  2882. deptId: [{ required: true, message: '必填', trigger: 'blur' }],
  2883. employeName: [{ required: true, message: '必填', trigger: 'blur' }],
  2884. pastureId: [{ required: true, message: '必填', trigger: 'blur' }],
  2885. maintenance: [{ required: true, message: '必填', trigger: 'blur' }],
  2886. leveloneTime: [{ required: true, message: '必填', trigger: 'blur' }],
  2887. leveltwoTime: [{ required: true, message: '必填', trigger: 'blur' }],
  2888. levelthreeTime: [{ required: true, message: '必填', trigger: 'blur' }],
  2889. levelone: [{ required: true, message: '必填', trigger: 'blur' }],
  2890. leveltwo: [{ required: true, message: '必填', trigger: 'blur' }],
  2891. levelthree: [{ required: true, message: '必填', trigger: 'blur' }],
  2892. depreciation: [
  2893. {
  2894. type: 'number',
  2895. required: true,
  2896. validator: (rule, value, callback) => {
  2897. if (!value) {
  2898. callback(new Error('不能为空'))
  2899. }
  2900. setTimeout(() => {
  2901. const re = /^[0-9]*[1-9][0-9]*$/ // /^[0-9]*[1-9][0-9]*$/
  2902. const rsCheck = re.test(value)
  2903. if (!rsCheck) {
  2904. callback(new Error('请输入正整数'))
  2905. } else {
  2906. callback()
  2907. }
  2908. }, 0)
  2909. },
  2910. trigger: 'blur'
  2911. }
  2912. ]
  2913. },
  2914. placeholder: '请选择设备类别',
  2915. findAllBrand: [],
  2916. findAllProvider: [],
  2917. findAllAssetType: [],
  2918. findAllPasture: [],
  2919. findAllDepart: [],
  2920. findAllEmploye: [],
  2921. getDictByName: [],
  2922. upkeepgrades: [],
  2923. createDepartList: [],
  2924. statues: [
  2925. { id: '0', name: '审核中' },
  2926. { id: '1', name: '已通过' },
  2927. { id: '2', name: '未通过' }
  2928. ],
  2929. pushNameList: [
  2930. { id: '60', name: '60' },
  2931. { id: '120', name: '120' },
  2932. { id: '180', name: '180' }
  2933. ],
  2934. pushNameList2: [
  2935. { id: '1', name: '1' },
  2936. { id: '2', name: '2' },
  2937. { id: '3', name: '3' },
  2938. { id: '5', name: '5' },
  2939. { id: '8', name: '8' },
  2940. { id: '12', name: '12' },
  2941. { id: '18', name: '18' }
  2942. ],
  2943. depreciationAlertList: [
  2944. { id: '0', name: '正常' },
  2945. { id: '1', name: '到期预警' },
  2946. { id: '2', name: '超期使用' }
  2947. ],
  2948. requestParams: [
  2949. { name: 'findAllBrand', offset: 0, pagecount: 0, params: [] },
  2950. { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
  2951. { name: 'findAlllAssetProvider', offset: 0, pagecount: 0, params: [] },
  2952. { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
  2953. {
  2954. name: 'findAllPasture',
  2955. offset: 0,
  2956. pagecount: 0,
  2957. returntype: 'Map',
  2958. parammaps: { id: '18' }
  2959. },
  2960. // { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  2961. {
  2962. name: 'findAllEmploye',
  2963. offset: 0,
  2964. pagecount: 0,
  2965. parammaps: { pastureId: Cookies.get('pastureid') }
  2966. },
  2967. {
  2968. name: 'getDictByName',
  2969. offset: 0,
  2970. pagecount: 0,
  2971. params: ['资产状态']
  2972. },
  2973. { name: 'getdictbyname', offset: 0, pagecount: 0, params: ['保养级别'] }
  2974. ],
  2975. getDepartParam: {
  2976. name: 'findAllDepart1',
  2977. offset: 0,
  2978. pagecount: 0,
  2979. parammaps: {
  2980. pastureId: Cookies.get('pastureid'),
  2981. eId: Cookies.get('employeid')
  2982. }
  2983. },
  2984. disabled: false,
  2985. nodeKey: 'id',
  2986. defaultCheckedKeys: [],
  2987. parentClass: [],
  2988. defaultProps: { children: 'children', label: 'typeName' },
  2989. getRecuListParm: { name: 'getAssetTypeList', idname: 'id', params: [-1] },
  2990. tableKey: 0,
  2991. list: [],
  2992. total: 0,
  2993. listLoading: true,
  2994. getdataListParm: {
  2995. name: 'getAssetList',
  2996. page: 1,
  2997. offset: 1,
  2998. pagecount: 10,
  2999. returntype: 'Map',
  3000. parammaps: {
  3001. proId: '',
  3002. brandId: '',
  3003. assetCode: '',
  3004. eqCode: '',
  3005. eqName: '',
  3006. departmentId: '',
  3007. pastureId: Cookies.get('pastureid'),
  3008. pastureName: Cookies.get('pasturename'),
  3009. status: '',
  3010. inputDatetime1: '',
  3011. startTime: '',
  3012. stopTime: '',
  3013. inputDatetime2: '',
  3014. startTime2: '',
  3015. stopTime2: '',
  3016. inputDatetime3: '',
  3017. startTime3: '',
  3018. stopTime3: '',
  3019. warning: '',
  3020. eqClassId: ''
  3021. }
  3022. },
  3023. listSH: [],
  3024. totalSH: 0,
  3025. listLoadingSH: true,
  3026. tabName: '',
  3027. getdataListParmSH: {
  3028. name: 'getAssetListSH',
  3029. page: 1,
  3030. offset: 1,
  3031. pagecount: 10,
  3032. returntype: 'Map',
  3033. parammaps: {
  3034. eqCode: '',
  3035. eqName: '',
  3036. pastureName: Cookies.get('pasturename'),
  3037. status: '',
  3038. inputDatetime1: '',
  3039. startTime: '',
  3040. stopTime: '',
  3041. SHStatus: ''
  3042. }
  3043. },
  3044. textMap: {
  3045. update: '编辑',
  3046. create: '新增',
  3047. card: '查看设备信息',
  3048. examine: '审核',
  3049. change: '批量变更'
  3050. },
  3051. dialogFormVisible: false,
  3052. dialogStatus: '',
  3053. pickerOptions1: {
  3054. disabledDate(time) {
  3055. return time.getTime() > Date.now() // 当天之前的时间可选
  3056. }
  3057. },
  3058. dialogImageUrl: '',
  3059. dialogVisible: false,
  3060. fileList: [],
  3061. showUpload: false,
  3062. headers: { optname: 'insertcustompic', id: 1, token: getToken() },
  3063. uploadImageUrl: process.env.VUE_APP_BASE_API + 'authdata/uploaderimage',
  3064. width: '',
  3065. createTemp: {
  3066. work: '', // 工作类别
  3067. license: '',
  3068. duration: '',
  3069. inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'),
  3070. employeId: this.$store.state.user.employeid,
  3071. inputUser: this.$store.state.user.employeid,
  3072. deptId: this.$store.state.user.departmentid,
  3073. departmentName: Cookies.get('departmentname'),
  3074. pastureId: this.$store.state.user.pastureid,
  3075. assetCode: '',
  3076. eqClassName: '',
  3077. eqClassId: '',
  3078. eqCode: '',
  3079. eqName: '',
  3080. specification: '',
  3081. providerName: '',
  3082. brandName: '',
  3083. financeCode: '',
  3084. status: '正常',
  3085. purpose: '',
  3086. purchaseDate: parseTime(new Date(), '{y}-{m}-{d}'),
  3087. entranceDate: parseTime(new Date(), '{y}-{m}-{d}'),
  3088. yearUpkeepCost: '',
  3089. yearMaintainDost: '',
  3090. yuanzhi: '',
  3091. baseHours: '',
  3092. upkeepgrade: '',
  3093. salvage: '',
  3094. subtractvalue: '',
  3095. yearMaintainCost: '',
  3096. brandId: '',
  3097. providerId: '',
  3098. inputUserName: '',
  3099. employeName: this.$store.state.user.employename,
  3100. depreciation: '5',
  3101. maintenance: '',
  3102. levelone: '',
  3103. leveltwo: '',
  3104. levelthree: '',
  3105. pushTime: '',
  3106. leveloneTime: '',
  3107. leveltwoTime: '',
  3108. levelthreeTime: ''
  3109. },
  3110. requestParam: {
  3111. name: 'insertAsset',
  3112. offset: 0,
  3113. pagecount: 0,
  3114. parammaps: {}
  3115. },
  3116. seeTemp: {},
  3117. dialogFormVisible_Examine: false,
  3118. dialogFormVisible_See: false,
  3119. activeName: 'first',
  3120. maintainTypes: [
  3121. { id: '0', name: '周保养' },
  3122. { id: '1', name: '月保养' },
  3123. { id: '2', name: '间隔保养' }
  3124. ],
  3125. changeStates: [
  3126. { id: '17', name: '正常' },
  3127. { id: '18', name: '闲置' },
  3128. { id: '19', name: '报废' },
  3129. { id: '20', name: '封存' }
  3130. ],
  3131. getdataEQNumber: {
  3132. name: 'cerateEQNumber',
  3133. page: 1,
  3134. offset: 1,
  3135. pagecount: 10,
  3136. returntype: 'Map',
  3137. parammaps: {}
  3138. },
  3139. dialoFormVisible_Examine: false,
  3140. examineTemp: { SHstatue: 1 },
  3141. statueReason: false,
  3142. activeList: [],
  3143. active: 3,
  3144. isFlowChart: false,
  3145. isDisplayRecord: false,
  3146. buttons: [],
  3147. // 查看-点检记录
  3148. getAssetBigSpotCheckListParm: {
  3149. name: 'getAssetBigSpotCheck1',
  3150. page: 1,
  3151. offset: 1,
  3152. pagecount: 10,
  3153. returntype: 'Map',
  3154. parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }
  3155. },
  3156. listLoadingSpotCheck1: false,
  3157. listSpotCheck1: [],
  3158. totalSpotCheck1: 0,
  3159. // 查看-保养记录
  3160. getBigupkeepbyeqParm: {
  3161. name: 'getBigupkeepbyeq',
  3162. page: 1,
  3163. offset: 1,
  3164. pagecount: 10,
  3165. returntype: 'Map',
  3166. parammaps: {
  3167. inputDatetimeUpkeepbyeq: '',
  3168. startTime: '',
  3169. stopTime: '',
  3170. upkeepType: '',
  3171. upkeepCode: ''
  3172. }
  3173. },
  3174. listLoadingUpkeepbyeq: false,
  3175. listUpkeepbyeq: [],
  3176. totalUpkeepbyeq: 0,
  3177. // 查看-维修记录
  3178. getAssetMaintainParm: {
  3179. name: 'getAssetMaintain1',
  3180. page: 1,
  3181. offset: 1,
  3182. pagecount: 10,
  3183. returntype: 'Map',
  3184. parammaps: {
  3185. inputDatetimeAssetMaintain: '',
  3186. startTime: '',
  3187. stopTime: '',
  3188. repairCode: ''
  3189. }
  3190. },
  3191. listLoadingAssetMaintain: false,
  3192. listAssetMaintain: [],
  3193. totalAssetMaintain: 0,
  3194. // 查看-启停记录
  3195. getAssetSTTParm: {
  3196. name: 'getAssetSTT1',
  3197. page: 1,
  3198. offset: 1,
  3199. pagecount: 10,
  3200. returntype: 'Map',
  3201. parammaps: { startTime: '', stopTime: '' }
  3202. },
  3203. listLoadingAssetSTT: false,
  3204. listAssetSTT: [],
  3205. totalAssetSTT: 0,
  3206. // 查看-变更记录
  3207. getAssetChangeParm: {
  3208. name: 'getAssetChange1',
  3209. page: 1,
  3210. offset: 1,
  3211. pagecount: 10,
  3212. returntype: 'Map',
  3213. parammaps: {
  3214. startTime: '',
  3215. stopTime: '',
  3216. changeStatue: '',
  3217. inputDatetimeAssetChange: ''
  3218. }
  3219. },
  3220. listLoadingAssetChange: false,
  3221. listAssetChange: [],
  3222. totalAssetChange: 0,
  3223. // 查看-备件领用记录
  3224. getAssetPartApplyParm: {
  3225. name: 'getAssetPartApply',
  3226. page: 1,
  3227. offset: 1,
  3228. pagecount: 10,
  3229. returntype: 'Map',
  3230. parammaps: {
  3231. startTime: '',
  3232. stopTime: '',
  3233. inputDatetimeAssetPartApply: ''
  3234. }
  3235. },
  3236. listLoadingAssetPartApply: false,
  3237. listAssetPartApply: [],
  3238. totalAssetPartApply: 0,
  3239. downLoadParm: {},
  3240. downLoadList: [],
  3241. requestBrand: {
  3242. name: 'getBrandByPartCode',
  3243. page: 0,
  3244. offset: 0,
  3245. pagecount: 10,
  3246. returntype: 'Map',
  3247. parammaps: {}
  3248. },
  3249. BrandList: [],
  3250. requestEmploye: {
  3251. name: 'findAllEmployeV2',
  3252. page: 0,
  3253. offset: 0,
  3254. pagecount: 10,
  3255. returntype: 'Map',
  3256. parammaps: {
  3257. pastureId: Cookies.get('pastureid')
  3258. }
  3259. },
  3260. employeList: [],
  3261. totaltitle: 0,
  3262. getBarChart1Parm: {
  3263. name: 'getReportEqCostYear',
  3264. parammaps: {}
  3265. },
  3266. barChart1: null,
  3267. chart_data1: {},
  3268. getBarChart2Parm: {
  3269. name: 'getReportEqCostMonth',
  3270. parammaps: {
  3271. receiveTime: new Date().getFullYear()
  3272. }
  3273. },
  3274. barChart2: null,
  3275. chart_data2: {},
  3276. dialogFormVisible_ChartSee: false,
  3277. getChartSeeParm: {
  3278. name: 'getEqPartuseDetailList',
  3279. page: 0,
  3280. offset: 0,
  3281. pagecount: 10,
  3282. returntype: 'Map',
  3283. parammaps: {
  3284. receiveTime: '',
  3285. eqId: '',
  3286. useTypeV: '',
  3287. inputDatetime2: '',
  3288. stopTime: '',
  3289. startTime: ''
  3290. }
  3291. },
  3292. listLoadingChartSee: false,
  3293. totalChartSee: 0,
  3294. listChartSee: [],
  3295. pageNum: 0,
  3296. pageSize: 0,
  3297. pageNumSH: 0,
  3298. pageSizeSH: 0,
  3299. useTypes: [
  3300. { id: 0, name: '维修' },
  3301. { id: 1, name: '保养' }
  3302. ],
  3303. downLoadParm2: {},
  3304. downLoadList2: [],
  3305. isPercentage: false,
  3306. percentage: 1,
  3307. isokDisable: false,
  3308. edit: 0,
  3309. selectionList: [],
  3310. dialogFormVisible_change: false,
  3311. batchChange: {
  3312. temp: { departmentId: '', employeeId: '' },
  3313. getdataListParmDept: {
  3314. name: 'getAssetAndEmpList',
  3315. offset: 0,
  3316. pagecount: 0,
  3317. parammaps: {}
  3318. },
  3319. deptList: [],
  3320. getdataListParmPerson: {
  3321. name: 'getAllEmp',
  3322. offset: 0,
  3323. pagecount: 0,
  3324. parammaps: {}
  3325. },
  3326. personList: []
  3327. },
  3328. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  3329. cellStyle: { padding: 0 + 'px' },
  3330. myHeight: document.documentElement.clientHeight - 85 - 250
  3331. }
  3332. },
  3333. computed: {
  3334. // 设置请求头
  3335. // headers() {
  3336. // return {
  3337. // // 设置token
  3338. // // eslint-disable-next-line no-undef
  3339. // token: getToken()
  3340. // }
  3341. // },
  3342. uploadData() {
  3343. return {
  3344. name: 'importStockUse',
  3345. pastureId: Cookies.get('pastureid'),
  3346. importParams:
  3347. '牧场,设备类别,资产编号,设备名称,设备内部编号,设备规格,品牌,供应商,用途,状态,购置日期,入场日期,折旧年限,财务编号,原值,残值,月核减值,保养级别,保养费用,维修费用,维修费用,基数(小时),部门,责任人,录入人,录入时间,使用时长(年),使用率(%),物联网编码,标准工作时长,工作类别,SignColumn',
  3348. sheetname: 'SheetJS'
  3349. }
  3350. },
  3351. // 设置上传地址
  3352. uploadExcelUrl() {
  3353. // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
  3354. return process.env.VUE_APP_BASE_API + 'authdata/equipment'
  3355. }
  3356. },
  3357. created() {
  3358. const gshebquanx = Cookies.get('gshebquanx')
  3359. const roles = JSON.parse(sessionStorage.getItem('roles'))
  3360. const arrId = roles.map((item) => {
  3361. return item.id
  3362. })
  3363. this.isEditWork = !arrId.includes(44)
  3364. // 不是设备处长,没有所有权限
  3365. if (gshebquanx == '0') {
  3366. this.requestParams[4].parammaps.id = Cookies.get('pastureid')
  3367. } else {
  3368. this.requestParams[4].parammaps.id = '18'
  3369. }
  3370. const that = this
  3371. GetDataByName({
  3372. name: 'getUserPCButtons',
  3373. parammaps: { jwt_username: Cookies.get('name') }
  3374. }).then((response) => {
  3375. that.buttons = response.data.list
  3376. that.get_auto_buttons()
  3377. })
  3378. this.get_table_dataSH()
  3379. this.getDownClassList()
  3380. if (this.$route.query.tabName == undefined) {
  3381. this.tabName = 'first'
  3382. } else {
  3383. this.tabName = this.$route.query.tabName
  3384. }
  3385. if (this.isBasic === false) {
  3386. this.tabName = 'second'
  3387. }
  3388. if (this.tabName == 'first') {
  3389. this.isDisplayRecord = true
  3390. this.isFlowChart = false
  3391. } else {
  3392. this.isDisplayRecord = false
  3393. this.isFlowChart = true
  3394. }
  3395. if (
  3396. this.$route.query.myPath !== undefined &&
  3397. this.$route.query.myPath == 'AssetStandardManagement'
  3398. ) {
  3399. setTimeout(() => {
  3400. if (
  3401. this.$route.query.pastureName !== undefined &&
  3402. this.$route.query.pastureId !== undefined &&
  3403. this.$route.query.departmentId !== undefined
  3404. ) {
  3405. this.getdataListParm.parammaps.pastureName =
  3406. this.$route.query.pastureName
  3407. this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
  3408. // console.log(isNaN(this.$route.query.departmentId), '9999')
  3409. this.getdataListParm.parammaps.eqClassId = this.$route.query.eqClassId
  3410. this.getdataListParm.parammaps.eqClassName =
  3411. this.$route.query.eqClassName
  3412. this.defaultCheckedKeys = [this.getdataListParm.parammaps.eqClassId]
  3413. this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
  3414. if (isNaN(this.$route.query.departmentId)) {
  3415. this.getdataListParm.parammaps.departmentId = ''
  3416. } else {
  3417. this.getdataListParm.parammaps.departmentId = parseInt(
  3418. this.$route.query.departmentId
  3419. )
  3420. }
  3421. this.getDepartDownList()
  3422. this.$forceUpdate()
  3423. } else {
  3424. this.getdataListParm.parammaps.pastureName =
  3425. Cookies.get('pasturename')
  3426. this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
  3427. this.getdataListParm.parammaps.departmentId = ''
  3428. }
  3429. this.get_table_data()
  3430. }, 5000)
  3431. } else {
  3432. if (
  3433. this.$route.query.pastureName !== undefined &&
  3434. this.$route.query.pastureId !== undefined &&
  3435. this.$route.query.departmentId !== undefined
  3436. ) {
  3437. this.getdataListParm.parammaps.pastureName =
  3438. this.$route.query.pastureName
  3439. this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
  3440. this.getdataListParm.parammaps.departmentId = parseInt(
  3441. this.$route.query.departmentId
  3442. )
  3443. } else {
  3444. this.getdataListParm.parammaps.pastureName = Cookies.get('pasturename')
  3445. this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
  3446. this.getdataListParm.parammaps.departmentId = ''
  3447. }
  3448. this.get_table_data()
  3449. }
  3450. if (
  3451. this.$route.query.myPath !== undefined &&
  3452. this.$route.query.myPath == 'equipmentOverview'
  3453. ) {
  3454. this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
  3455. }
  3456. if (
  3457. this.$route.query.myPath !== undefined &&
  3458. this.$route.query.myPath == 'equipmentOverview2'
  3459. ) {
  3460. setTimeout(() => {
  3461. if (
  3462. this.$route.query.pastureName !== undefined &&
  3463. this.$route.query.pastureId !== undefined &&
  3464. this.$route.query.eqClassId !== undefined
  3465. ) {
  3466. this.getdataListParm.parammaps.pastureName =
  3467. this.$route.query.pastureName
  3468. this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
  3469. this.getdataListParm.parammaps.eqClassId = this.$route.query.eqClassId
  3470. this.getdataListParm.parammaps.eqClassName =
  3471. this.$route.query.eqClassName
  3472. this.defaultCheckedKeys = [this.getdataListParm.parammaps.eqClassId]
  3473. this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
  3474. this.getDepartDownList()
  3475. this.$forceUpdate()
  3476. } else {
  3477. this.getdataListParm.parammaps.pastureName =
  3478. Cookies.get('pasturename')
  3479. this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
  3480. this.getdataListParm.parammaps.eqClassId = ''
  3481. }
  3482. this.get_table_data()
  3483. }, 5000)
  3484. } else {
  3485. if (
  3486. this.$route.query.pastureName !== undefined &&
  3487. this.$route.query.pastureId !== undefined &&
  3488. this.$route.query.departmentId !== undefined
  3489. ) {
  3490. this.getdataListParm.parammaps.pastureName =
  3491. this.$route.query.pastureName
  3492. this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
  3493. this.getdataListParm.parammaps.departmentId = parseInt(
  3494. this.$route.query.departmentId
  3495. )
  3496. } else {
  3497. this.getdataListParm.parammaps.pastureName = Cookies.get('pasturename')
  3498. this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
  3499. this.getdataListParm.parammaps.departmentId = ''
  3500. }
  3501. this.get_table_data()
  3502. }
  3503. // 设备购置报废统计
  3504. if (
  3505. this.$route.query.myPath !== undefined &&
  3506. this.$route.query.myPath == 'PurchaseScrap'
  3507. ) {
  3508. if (this.$route.query.project == '新购设备数') {
  3509. this.getdataListParm.parammaps.pastureName =
  3510. this.$route.query.pastureName
  3511. this.getdataListParm.parammaps.inputDatetime2 = [
  3512. parseTime(new Date(), '{y}') + '-01-01',
  3513. parseTime(new Date(), '{y}') + '-12-31'
  3514. ]
  3515. this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
  3516. this.getDepartDownList()
  3517. } else {
  3518. this.getdataListParm.parammaps.pastureName =
  3519. this.$route.query.pastureName
  3520. this.getdataListParm.parammaps.inputDatetime3 = [
  3521. parseTime(new Date(), '{y}') + '-01-01',
  3522. parseTime(new Date(), '{y}') + '-12-31'
  3523. ]
  3524. this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
  3525. this.getDepartDownList()
  3526. }
  3527. }
  3528. this.get_table_data()
  3529. // Window.addEventListener('keyup', )
  3530. this.keyupSubmit()
  3531. },
  3532. mounted() {
  3533. // console.log(this.isSupRole(), 'hss')
  3534. this.getWorks()
  3535. },
  3536. methods: {
  3537. // 获取工作类别的数据
  3538. async getWorks() {
  3539. const data = await getWorkList()
  3540. this.workList = data.data
  3541. console.log(data, '工作列表')
  3542. },
  3543. // 判断当前是否是超级管理员 "id":44,"name":"超级管理员
  3544. isSupRole() {
  3545. const roles = JSON.parse(sessionStorage.getItem('roles'))
  3546. const arrId = roles.map((item) => {
  3547. return item.id
  3548. })
  3549. return arrId.includes(44)
  3550. },
  3551. roleSet1(row) {
  3552. var result = true
  3553. if (
  3554. row.pastureId == '18' ||
  3555. row.pastureId == Cookies.get('pastureid') ||
  3556. row.pastureId == '0' || this.isSupRole()
  3557. ) {
  3558. result = true
  3559. } else {
  3560. result = false
  3561. }
  3562. console.log(result, 'result')
  3563. return result
  3564. },
  3565. roleSet2(row) {
  3566. var result = true
  3567. if (
  3568. (row.pastureId == '18' || row.pastureId == '0') &&
  3569. this.isBasicsDel2
  3570. ) {
  3571. result = true
  3572. } else if (
  3573. (row.pastureId == Cookies.get('pastureid') || row.pastureId == '0') &&
  3574. this.isBasicsDel2
  3575. ) {
  3576. result = true
  3577. } else {
  3578. result = false
  3579. }
  3580. return result
  3581. },
  3582. // 导入
  3583. beforeImportExcel(file) {
  3584. const isLt2M = file.size / 1024 / 1024 < 10
  3585. if (!isLt2M) {
  3586. this.$message.error('上传文件大小不能超过 10MB!')
  3587. }
  3588. return isLt2M
  3589. },
  3590. handleImportExcelSuccess(res, file) {
  3591. if (res.msg === 'ok') {
  3592. this.$message({
  3593. title: '成功',
  3594. message: '导入成功:' + res.data.success + '条!',
  3595. type: 'success',
  3596. duration: 2000
  3597. })
  3598. if (res.data.err_count > 0) {
  3599. this.$notify({
  3600. title: '失败',
  3601. message: '导入失败:' + res.data.err_count + '条!',
  3602. type: 'danger',
  3603. duration: 2000
  3604. })
  3605. }
  3606. } else {
  3607. this.$notify({
  3608. title: '失败',
  3609. message: '上传失败',
  3610. type: 'danger',
  3611. duration: 2000
  3612. })
  3613. }
  3614. },
  3615. formatJsonTemp(filterVal, jsonData) {
  3616. return jsonData.map((v) =>
  3617. filterVal.map((j) => {
  3618. if (j === 'timestamp') {
  3619. return parseTime(v[j])
  3620. } else {
  3621. return v[j]
  3622. }
  3623. })
  3624. )
  3625. },
  3626. tableSort2(column) {
  3627. sortChange(column, this.list)
  3628. },
  3629. tableSort(column) {
  3630. if (this.activeName == 'third') {
  3631. sortChange(column, this.listUpkeepbyeq)
  3632. } else if (this.activeName == 'fouth') {
  3633. sortChange(column, this.listAssetMaintain)
  3634. } else if (this.activeName == 'seventh') {
  3635. sortChange(column, this.listAssetPartApply)
  3636. }
  3637. },
  3638. get_auto_buttons() {
  3639. // 新增
  3640. const BasicsAdd = 'asset:basics:add'
  3641. const isBasicsAdd = checkButtons(
  3642. this.$store.state.user.buttons,
  3643. BasicsAdd
  3644. )
  3645. this.isBasicsAdd = isBasicsAdd
  3646. // 卡片
  3647. const BasicsCard = 'asset:basics:kapian'
  3648. const isBasicsCard = checkButtons(
  3649. this.$store.state.user.buttons,
  3650. BasicsCard
  3651. )
  3652. this.isBasicsCard = isBasicsCard
  3653. // 编辑
  3654. const BasicsUpdate = 'asset:basics:update'
  3655. const isBasicsUpdate = checkButtons(
  3656. this.$store.state.user.buttons,
  3657. BasicsUpdate
  3658. )
  3659. this.isBasicsUpdate = isBasicsUpdate
  3660. // 删除
  3661. const BasicsDel = 'asset:basics:del'
  3662. const isBasicsDel = checkButtons(
  3663. this.$store.state.user.buttons,
  3664. BasicsDel
  3665. )
  3666. this.isBasicsDel = isBasicsDel
  3667. // 设备基础信息-删除
  3668. const BasicsDel2 = 'asset:basics:del2'
  3669. const isBasicsDel2 = checkButtons(
  3670. this.$store.state.user.buttons,
  3671. BasicsDel2
  3672. )
  3673. this.isBasicsDel2 = isBasicsDel2
  3674. // 设备基础信息
  3675. const Basic = 'asset:basic:basic'
  3676. const isBasic = checkButtons(this.$store.state.user.buttons, Basic)
  3677. this.isBasic = isBasic
  3678. // 设备审核
  3679. const BasicSH = 'asset:basic:shjm'
  3680. const isBasicSH = checkButtons(this.$store.state.user.buttons, BasicSH)
  3681. this.isBasicSH = isBasicSH
  3682. // 审核
  3683. const BasicExamine = 'asset:basic:shenhe'
  3684. const isBasicExamine = checkButtons(
  3685. this.$store.state.user.buttons,
  3686. BasicExamine
  3687. )
  3688. this.isBasicExamine = isBasicExamine
  3689. },
  3690. // 2-2:下拉框
  3691. get_select_list() {
  3692. GetDataByNames(this.requestParams).then((response) => {
  3693. if (response.data.list !== null) {
  3694. this.findAllBrand = response.data.findAllBrand.list
  3695. this.findAllProvider = response.data.findAllProvider.list
  3696. this.findAllAssetType = response.data.findAllAssetType.list
  3697. this.findAllPasture = response.data.findAllPasture.list
  3698. this.findAllEmploye = response.data.findAllEmploye.list
  3699. this.getDictByName = response.data.getDictByName.list
  3700. this.upkeepgrades = response.data.getdictbyname.list
  3701. this.getDepartDownList()
  3702. }
  3703. })
  3704. },
  3705. getDepartDownList() {
  3706. GetDataByName(this.getDepartParam).then((response) => {
  3707. this.findAllDepart = response.data.list
  3708. })
  3709. },
  3710. changePastureName(item) {
  3711. this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(
  3712. (obj) => obj.name == item
  3713. ).id
  3714. this.getdataListParm.parammaps.departmentId = ''
  3715. this.getDepartDownList()
  3716. },
  3717. getCreateDepartDownList() {
  3718. GetDataByName(this.getDepartParam).then((response) => {
  3719. this.createDepartList = response.data.list
  3720. if (this.edit == 1) {
  3721. if (
  3722. this.createDepartList.find(
  3723. (obj) => obj.id == Cookies.get('departmentid')
  3724. )
  3725. ) {
  3726. this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
  3727. this.createTemp.departmentName = this.createDepartList.find(
  3728. (obj) => obj.id == Cookies.get('departmentid')
  3729. ).name
  3730. this.createTemp.deptId = parseInt(Cookies.get('departmentid'))
  3731. } else {
  3732. this.createTemp.departmentId = response.data.list[0].id
  3733. this.createTemp.departmentId = response.data.list[0].id
  3734. this.createTemp.deptId = response.data.list[0].name
  3735. }
  3736. }
  3737. })
  3738. },
  3739. changePasture(item) {
  3740. this.getDepartParam.parammaps.pastureId = item
  3741. this.edit = 1
  3742. this.getCreateDepartDownList()
  3743. },
  3744. changeDepart(item) {
  3745. this.createTemp.departmentName = this.createDepartList.find(
  3746. (obj) => obj.id == item
  3747. ).name
  3748. },
  3749. get_table_data() {
  3750. this.listLoading = true
  3751. if (this.getdataListParm.parammaps.inputDatetime1 == null) {
  3752. this.getdataListParm.parammaps.inputDatetime1 = ''
  3753. this.getdataListParm.parammaps.startTime = ''
  3754. this.getdataListParm.parammaps.stopTime = ''
  3755. } else {
  3756. this.getdataListParm.parammaps.startTime =
  3757. this.getdataListParm.parammaps.inputDatetime1[0]
  3758. this.getdataListParm.parammaps.stopTime =
  3759. this.getdataListParm.parammaps.inputDatetime1[1]
  3760. }
  3761. if (
  3762. this.getdataListParm.parammaps.inputDatetime2 == null ||
  3763. this.getdataListParm.parammaps.inputDatetime2 == ''
  3764. ) {
  3765. this.getdataListParm.parammaps.inputDatetime2 = ''
  3766. this.getdataListParm.parammaps.startTime2 = ''
  3767. this.getdataListParm.parammaps.stopTime2 = ''
  3768. } else {
  3769. this.getdataListParm.parammaps.startTime2 =
  3770. this.getdataListParm.parammaps.inputDatetime2[0]
  3771. this.getdataListParm.parammaps.stopTime2 =
  3772. this.getdataListParm.parammaps.inputDatetime2[1]
  3773. }
  3774. if (
  3775. this.getdataListParm.parammaps.inputDatetime3 == null ||
  3776. this.getdataListParm.parammaps.inputDatetime3 == ''
  3777. ) {
  3778. this.getdataListParm.parammaps.inputDatetime3 = ''
  3779. this.getdataListParm.parammaps.startTime3 = ''
  3780. this.getdataListParm.parammaps.stopTime3 = ''
  3781. } else {
  3782. this.getdataListParm.parammaps.startTime3 =
  3783. this.getdataListParm.parammaps.inputDatetime3[0]
  3784. this.getdataListParm.parammaps.stopTime3 =
  3785. this.getdataListParm.parammaps.inputDatetime3[1]
  3786. }
  3787. GetDataByName(this.getdataListParm).then((response) => {
  3788. // console.log('table数据', response.data.list)
  3789. if (response.data.list !== null) {
  3790. this.list = response.data.list
  3791. for (let i = 0; i < response.data.list.length; i++) {
  3792. if (
  3793. response.data.list[i].srcpath !== null &&
  3794. response.data.list[i].picpath !== null &&
  3795. response.data.list[i].srcpath !== undefined &&
  3796. response.data.list[i].picpath !== undefined
  3797. ) {
  3798. this.list[i].srcpath =
  3799. process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  3800. this.list[i].picpath =
  3801. process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  3802. } else {
  3803. this.list[i].srcpath = ''
  3804. this.list[i].picpath = ''
  3805. }
  3806. }
  3807. this.pageNum = response.data.pageNum
  3808. this.pageSize = response.data.pageSize
  3809. } else {
  3810. this.list = []
  3811. }
  3812. this.total = response.data.total
  3813. setTimeout(() => {
  3814. this.listLoading = false
  3815. }, 100)
  3816. this.get_select_list()
  3817. })
  3818. },
  3819. get_table_dataSH() {
  3820. this.listLoadingSH = true
  3821. // console.log(this.$refs)
  3822. // console.log(this.$refs['inputDatetime1'])
  3823. if (this.getdataListParmSH.parammaps.inputDatetime1 == null) {
  3824. this.getdataListParmSH.parammaps.inputDatetime1 = ''
  3825. } else {
  3826. this.getdataListParmSH.parammaps.startTime =
  3827. this.getdataListParmSH.parammaps.inputDatetime1[0]
  3828. this.getdataListParmSH.parammaps.stopTime =
  3829. this.getdataListParmSH.parammaps.inputDatetime1[1]
  3830. }
  3831. GetDataByName(this.getdataListParmSH).then((response) => {
  3832. // console.log('table数据', response.data.list)
  3833. if (response.data.list !== null) {
  3834. this.listSH = response.data.list
  3835. for (let i = 0; i < response.data.list.length; i++) {
  3836. if (
  3837. response.data.list[i].srcpath !== null &&
  3838. response.data.list[i].picpath
  3839. ) {
  3840. this.listSH[i].srcpath =
  3841. process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
  3842. this.listSH[i].picpath =
  3843. process.env.VUE_APP_BASE_API + response.data.list[i].picpath
  3844. } else {
  3845. this.listSH[i].srcpath = ''
  3846. this.listSH[i].picpath = ''
  3847. }
  3848. }
  3849. this.pageNumSH = response.data.pageNum
  3850. this.pageSizeSH = response.data.pageSize
  3851. } else {
  3852. this.listSH = []
  3853. }
  3854. this.totalSH = response.data.total
  3855. setTimeout(() => {
  3856. this.listLoadingSH = false
  3857. }, 100)
  3858. })
  3859. },
  3860. SHStatus: function(cellValue) {
  3861. if (cellValue.SHStatus == 0) {
  3862. return '审核中'
  3863. } else if (cellValue.SHStatus == 1) {
  3864. return '已通过'
  3865. } else if (cellValue.SHStatus == 2) {
  3866. return '未通过'
  3867. } else if (cellValue.SHStatus == 3) {
  3868. return '历史数据'
  3869. }
  3870. },
  3871. form_search() {
  3872. this.listLoading = true
  3873. this.getdataListParm.parammaps.pastureId = ''
  3874. if (this.getdataListParm.parammaps.warning !== '') {
  3875. this.getdataListParm.parammaps.d1 = 1
  3876. } else {
  3877. this.getdataListParm.parammaps.d1 = ''
  3878. }
  3879. if (this.getdataListParm.parammaps.inputDatetime1 == null) {
  3880. this.getdataListParm.parammaps.inputDatetime1 = ''
  3881. this.getdataListParm.parammaps.startTime = ''
  3882. this.getdataListParm.parammaps.stopTime = ''
  3883. } else {
  3884. this.getdataListParm.parammaps.startTime =
  3885. this.getdataListParm.parammaps.inputDatetime1[0]
  3886. this.getdataListParm.parammaps.stopTime =
  3887. this.getdataListParm.parammaps.inputDatetime1[1]
  3888. }
  3889. // console.log(this.getdataListParm.parammaps.inputDatetime2)
  3890. if (this.getdataListParm.parammaps.inputDatetime2 == null) {
  3891. this.getdataListParm.parammaps.inputDatetime2 = ''
  3892. this.getdataListParm.parammaps.startTime2 = ''
  3893. this.getdataListParm.parammaps.stopTime2 = ''
  3894. } else {
  3895. this.getdataListParm.parammaps.startTime2 =
  3896. this.getdataListParm.parammaps.inputDatetime2[0]
  3897. this.getdataListParm.parammaps.stopTime2 =
  3898. this.getdataListParm.parammaps.inputDatetime2[1]
  3899. }
  3900. if (this.getdataListParm.parammaps.inputDatetime3 == null) {
  3901. this.getdataListParm.parammaps.inputDatetime3 = ''
  3902. this.getdataListParm.parammaps.startTime3 = ''
  3903. this.getdataListParm.parammaps.stopTime3 = ''
  3904. } else {
  3905. this.getdataListParm.parammaps.startTime3 =
  3906. this.getdataListParm.parammaps.inputDatetime3[0]
  3907. this.getdataListParm.parammaps.stopTime3 =
  3908. this.getdataListParm.parammaps.inputDatetime3[1]
  3909. }
  3910. this.getdataListParm.offset = 1
  3911. this.get_table_data()
  3912. },
  3913. form_searchSH() {
  3914. this.listLoadingSH = true
  3915. if (this.getdataListParmSH.parammaps.inputDatetime1 == null) {
  3916. this.getdataListParmSH.parammaps.inputDatetime1 = ''
  3917. } else {
  3918. this.getdataListParmSH.parammaps.startTime =
  3919. this.getdataListParmSH.parammaps.inputDatetime1[0]
  3920. this.getdataListParmSH.parammaps.stopTime =
  3921. this.getdataListParmSH.parammaps.inputDatetime1[1]
  3922. }
  3923. this.getdataListParmSH.offset = 1
  3924. this.get_table_dataSH()
  3925. },
  3926. handlePicChange(file, fileList) {
  3927. if (fileList.length > 0) {
  3928. this.$nextTick(() => {
  3929. this.showUpload = true
  3930. })
  3931. } else {
  3932. this.$nextTick(() => {
  3933. this.showUpload = false
  3934. })
  3935. }
  3936. // console.log(this.createTemp)
  3937. },
  3938. handlePicSuccess(response, file, fileList) {
  3939. if (fileList.length > 0) {
  3940. this.$nextTick(() => {
  3941. this.showUpload = true
  3942. })
  3943. } else {
  3944. this.$nextTick(() => {
  3945. this.showUpload = false
  3946. })
  3947. }
  3948. if (
  3949. this.createTemp.picpath === undefined ||
  3950. this.createTemp.picpath === '' ||
  3951. this.createTemp.picpath == -1
  3952. ) {
  3953. this.$set(this.createTemp, 'picpath', response.execresult.LastInsertId)
  3954. }
  3955. },
  3956. handlePicRemove(file, fileList) {
  3957. if (this.dialogStatus === 'create') {
  3958. if (fileList.length < 1) {
  3959. this.showUpload = false
  3960. }
  3961. for (const key in this.createTemp) {
  3962. if (this.createTemp[key] === file.response.execresult.LastInsertId) {
  3963. this.$delete(this.createTemp, key)
  3964. }
  3965. }
  3966. } else {
  3967. if (fileList.length < 1) {
  3968. this.$nextTick(() => {
  3969. this.showUpload = false
  3970. })
  3971. }
  3972. const url = file.url
  3973. // console.log(url, 'url')
  3974. for (const key in this.createTemp) {
  3975. // console.log(this.createTemp[key], 'createTemp[key]')
  3976. if (this.createTemp[key] === url) {
  3977. // console.log(key)
  3978. if (key === 'picpath') {
  3979. this.$delete(this.createTemp, 'picpath')
  3980. this.$delete(this.createTemp, 'picId')
  3981. }
  3982. }
  3983. }
  3984. }
  3985. // console.log(this.createTemp, '文件列表移除文件时的钩子row')
  3986. },
  3987. handlePicPreview(file) {
  3988. this.dialogImageUrl = file.url
  3989. this.dialogVisible = true
  3990. },
  3991. onLoad(e) {
  3992. const img = e.target
  3993. let width = 0
  3994. if (img.fileSize > 0 || (img.width > 1 && img.height > 1)) {
  3995. width = img.width + 40
  3996. }
  3997. this.width = width + 'px'
  3998. },
  3999. add_dialog_saveAdd() {
  4000. console.log('点击了保存', this.createTemp.maintenance)
  4001. if (this.createTemp.status == '') {
  4002. this.$message({
  4003. type: 'warning',
  4004. message: '请选择状态值s',
  4005. duration: 2000
  4006. })
  4007. return false
  4008. }
  4009. this.isokDisable = true
  4010. setTimeout(() => {
  4011. this.isokDisable = false
  4012. }, 1000)
  4013. this.$refs['createTemp'].validate((valid) => {
  4014. if (valid) {
  4015. for (var i = 0; i < this.listAdd.length; i++) {
  4016. if (this.listAdd[i].score == null) {
  4017. this.$message({
  4018. type: 'warning',
  4019. message: '请检查检查结果是否为空',
  4020. duration: 2000
  4021. })
  4022. return false
  4023. }
  4024. if (this.listAdd[i].pic1 == undefined) {
  4025. this.listAdd[i].pic1 = -1
  4026. }
  4027. if (this.listAdd[i].pic2 == undefined) {
  4028. this.listAdd[i].pic2 = -1
  4029. }
  4030. if (this.listAdd[i].pic3 == undefined) {
  4031. this.listAdd[i].pic3 = -1
  4032. }
  4033. }
  4034. this.postDataPramas.common = { returnmap: '0' }
  4035. this.postDataPramas.data = []
  4036. this.postDataPramas.data[0] = {
  4037. name: 'insertBigjudge',
  4038. type: 'e',
  4039. parammaps: {
  4040. pastureId: this.createTemp.pastureId,
  4041. batime: this.createTemp.batime,
  4042. empId: this.createTemp.empId
  4043. }
  4044. }
  4045. this.postDataPramas.data[1] = {
  4046. name: 'insertSpotList',
  4047. resultmaps: { list: this.listAdd }
  4048. }
  4049. this.postDataPramas.data[1].children = []
  4050. this.postDataPramas.data[1].children[0] = {
  4051. name: 'insertjudge',
  4052. type: 'e',
  4053. parammaps: {
  4054. bigId: '@insertBigjudge.LastInsertId',
  4055. statue: '@insertSpotList.statue',
  4056. score: '@insertSpotList.score',
  4057. note: '@insertSpotList.note',
  4058. pic1: '@insertSpotList.pic1',
  4059. pic2: '@insertSpotList.pic2',
  4060. pic3: '@insertSpotList.pic3'
  4061. }
  4062. }
  4063. ExecDataByConfig(this.postDataPramas).then((response) => {
  4064. console.log('新增保存发送参数', this.postDataPramas)
  4065. if (response.msg === 'fail') {
  4066. this.$notify({
  4067. title: '保存失败',
  4068. message: response.data,
  4069. type: 'warning',
  4070. duration: 2000
  4071. })
  4072. } else {
  4073. this.getdataListParm.parammaps.inputDatetime = ''
  4074. this.get_table_data()
  4075. this.dialogFormVisibleAdd = false
  4076. this.createTemp.providerName = ''
  4077. this.$notify({
  4078. title: '',
  4079. message: '保存成功',
  4080. type: 'success',
  4081. duration: 2000
  4082. })
  4083. }
  4084. })
  4085. }
  4086. })
  4087. },
  4088. beforeRemove(file, fileList) {
  4089. // console.log(
  4090. // file.response,
  4091. // '删除文件之前的钩子,参数为上传的文件和文件列表'
  4092. // )
  4093. return this.$confirm('删除当前图片, 是否继续?', '提示', {
  4094. confirmButtonText: '确定',
  4095. cancelButtonText: '取消',
  4096. type: 'warning'
  4097. })
  4098. },
  4099. resetCreateTemp() {
  4100. this.defaultCheckedKeys = []
  4101. this.createTemp.defaultCheckedKeys = []
  4102. this.createTemp.brandId = ''
  4103. this.createTemp.providerId = ''
  4104. this.createTemp.inputDatetime = parseTime(new Date(), '{y}-{m}-{d}')
  4105. this.createTemp.eqClassName = ''
  4106. this.createTemp.eqClassId = ''
  4107. this.createTemp.employeName = Cookies.get('employename')
  4108. this.createTemp.employeId = Cookies.get('employeid')
  4109. this.createTemp.inputUser = Cookies.get('employeid')
  4110. this.createTemp.deptId = parseInt(Cookies.get('departmentid'))
  4111. this.createTemp.departmentName = Cookies.get('departmentname')
  4112. this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
  4113. this.createTemp.eqCode = ''
  4114. this.createTemp.eqName = ''
  4115. this.createTemp.specification = ''
  4116. this.createTemp.providerName = ''
  4117. this.createTemp.financeCode = ''
  4118. this.createTemp.status = '正常'
  4119. this.createTemp.providerName = ''
  4120. this.createTemp.brandName = ''
  4121. this.createTemp.purpose = ''
  4122. this.createTemp.purchaseDate = parseTime(new Date(), '{y}-{m}-{d}')
  4123. this.createTemp.entranceDate = parseTime(new Date(), '{y}-{m}-{d}')
  4124. this.createTemp.assetCode = ''
  4125. this.createTemp.yearUpkeepCost = ''
  4126. this.createTemp.yearMaintainDost = ''
  4127. this.createTemp.yuanzhi = ''
  4128. this.createTemp.baseHours = ''
  4129. this.createTemp.upkeepgrade = 113
  4130. this.createTemp.salvage = ''
  4131. this.createTemp.subtractvalue = ''
  4132. this.createTemp.yearMaintainCost = ''
  4133. this.createTemp.inputUserName = ''
  4134. this.createTemp.picpath = ''
  4135. this.fileList = []
  4136. this.showUpload = false
  4137. this.createTemp.fileList = []
  4138. this.createTemp.depreciation = '5'
  4139. this.createTemp.license = ''
  4140. this.createTemp.duration = ''
  4141. this.createTemp.maintenance = []
  4142. },
  4143. form_add() {
  4144. this.resetCreateTemp()
  4145. this.edit = 1
  4146. this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
  4147. this.getCreateDepartDownList()
  4148. this.dialogStatus = 'create'
  4149. this.dialogFormVisible = true
  4150. this.$nextTick(() => {
  4151. this.$refs['createTemp'].clearValidate()
  4152. })
  4153. },
  4154. changeBrand(item) {
  4155. this.createTemp.brandName = this.findAllBrand.find(
  4156. (obj) => obj.id === item
  4157. ).name
  4158. },
  4159. changeUpkeepgrade(item) {
  4160. console.log(item)
  4161. },
  4162. upkeepgradeChange(e) {
  4163. if (!e) {
  4164. this.$refs['upkeepgrade'].blur()
  4165. }
  4166. },
  4167. popoverHide(checkedIds, checkedData) {
  4168. // console.log(checkedIds, checkedData)
  4169. if (checkedIds !== null) {
  4170. this.getdataEQNumber.parammaps.eqCode = checkedData.typeCode
  4171. // if (checkedData.children === undefined) {
  4172. // this.createTemp.eqClassId = checkedData.eqClassId
  4173. // this.createTemp.eqName = checkedData.NewName
  4174. // this.getdataListParm.parammaps.eqClassId = checkedData.eqClassId
  4175. // this.getEQNumber()
  4176. // } else {
  4177. // this.defaultCheckedKeys = []
  4178. // this.createTemp.eqClassId = ''
  4179. // this.getdataListParm.parammaps.eqClassId = ''
  4180. // this.$message({ type: 'warning', message: '请选择具体设备类型' })
  4181. // }
  4182. this.createTemp.eqClassId = checkedData.eqClassId
  4183. this.createTemp.eqName = checkedData.NewName
  4184. this.getdataListParm.parammaps.eqClassId = checkedData.eqClassId
  4185. this.getEQNumber()
  4186. } else {
  4187. this.defaultCheckedKeys = []
  4188. this.createTemp.eqClassId = ''
  4189. this.getdataListParm.parammaps.eqClassId = ''
  4190. }
  4191. },
  4192. add_dialog_save() {
  4193. this.isokDisable = true
  4194. setTimeout(() => {
  4195. this.isokDisable = false
  4196. }, 1000)
  4197. this.$refs['createTemp'].validate((valid) => {
  4198. if (valid) {
  4199. console.log(this.createTemp)
  4200. this.requestParam.name = 'insertAsset'
  4201. if (this.createTemp.status == '正常') {
  4202. this.createTemp.status = 17
  4203. }
  4204. if (this.createTemp.providerId == '') {
  4205. this.createTemp.providerId = 0
  4206. }
  4207. if (this.createTemp.brandId == '') {
  4208. this.createTemp.brandId = 0
  4209. }
  4210. if (this.createTemp.yuanzhi == '') {
  4211. this.createTemp.yuanzhi = 0
  4212. }
  4213. if (this.createTemp.salvage == '') {
  4214. this.createTemp.salvage = 0
  4215. }
  4216. if (this.createTemp.subtractvalue == '') {
  4217. this.createTemp.subtractvalue = 0
  4218. }
  4219. if (this.createTemp.yearUpkeepCost == '') {
  4220. this.createTemp.yearUpkeepCost = 0
  4221. }
  4222. if (this.createTemp.yearMaintainCost == '') {
  4223. this.createTemp.yearMaintainCost = 0
  4224. }
  4225. if (this.createTemp.baseHours == '') {
  4226. this.createTemp.baseHours = 0
  4227. }
  4228. // 原值yuanzhi残值salvage月核减值subtractvalue保养费用yearUpkeepCost维修费用yearMaintainCost
  4229. var rulesValue = /^\d+(\.\d{1,3})?$/
  4230. this.requestParam.parammaps = this.createTemp
  4231. this.requestParam.parammaps.picpath = this.createTemp.picpath
  4232. if (
  4233. this.createTemp.yuanzhi !== '' ||
  4234. this.createTemp.salvage !== '' ||
  4235. this.createTemp.subtractvalue !== '' ||
  4236. this.createTemp.yearUpkeepCost !== '' ||
  4237. this.createTemp.yearMaintainCost !== ''
  4238. ) {
  4239. this.requestParam.parammaps.yuanzhi = parseFloat(
  4240. this.createTemp.yuanzhi
  4241. )
  4242. if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi))) {
  4243. this.$message({
  4244. type: 'error',
  4245. message: '原值请输入自然数,最多保留三位小数点',
  4246. duration: 2000
  4247. })
  4248. return false
  4249. }
  4250. if (!rulesValue.test(parseFloat(this.createTemp.salvage))) {
  4251. this.$message({
  4252. type: 'error',
  4253. message: '残值请输入自然数,最多保留三位小数点',
  4254. duration: 2000
  4255. })
  4256. return false
  4257. }
  4258. if (!rulesValue.test(parseFloat(this.createTemp.subtractvalue))) {
  4259. this.$message({
  4260. type: 'error',
  4261. message: '月核减值请输入自然数,最多保留三位小数点',
  4262. duration: 2000
  4263. })
  4264. return false
  4265. }
  4266. if (!rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost))) {
  4267. this.$message({
  4268. type: 'error',
  4269. message: '保养费用输入自然数,最多保留三位小数点',
  4270. duration: 2000
  4271. })
  4272. return false
  4273. }
  4274. if (
  4275. !rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))
  4276. ) {
  4277. this.$message({
  4278. type: 'error',
  4279. message: '维修费用请输入自然数,最多保留三位小数点',
  4280. duration: 2000
  4281. })
  4282. return false
  4283. }
  4284. }
  4285. if (
  4286. this.requestParam.parammaps.maintenance.length != 0 &&
  4287. this.requestParam.parammaps.maintenance
  4288. ) {
  4289. if (this.requestParam.parammaps.maintenance.length > 4) {
  4290. this.$notify({
  4291. title: '提示',
  4292. message: '指定维修人最多4个人!',
  4293. type: 'success',
  4294. duration: 2000
  4295. })
  4296. return false
  4297. }
  4298. this.requestParam.parammaps.maintenance =
  4299. this.requestParam.parammaps.maintenance.toString()
  4300. }
  4301. PostDataByName(this.requestParam).then((response) => {
  4302. console.log('新增保存发送参数', this.requestParam)
  4303. if (response.msg !== 'fail') {
  4304. if (this.getdataListParm.parammaps.inputDatetime1 === null) {
  4305. this.getdataListParm.parammaps.inputDatetime1 = ''
  4306. }
  4307. this.dialogFormVisible = false
  4308. this.get_table_data()
  4309. this.$notify({
  4310. title: '成功',
  4311. message: '新增成功',
  4312. type: 'success',
  4313. duration: 2000
  4314. })
  4315. // this.reload()
  4316. } else {
  4317. failproccess(response, this.$notify)
  4318. }
  4319. })
  4320. }
  4321. })
  4322. },
  4323. // 继续新增
  4324. add_dialog_save_again() {
  4325. this.isokDisable = true
  4326. setTimeout(() => {
  4327. this.isokDisable = false
  4328. }, 1000)
  4329. this.$refs['createTemp'].validate((valid) => {
  4330. if (valid) {
  4331. this.requestParam.name = 'insertAsset'
  4332. if (this.createTemp.status == '正常') {
  4333. this.createTemp.status = 17
  4334. }
  4335. if (this.createTemp.providerId == '') {
  4336. this.createTemp.providerId = 0
  4337. }
  4338. if (this.createTemp.brandId == '') {
  4339. this.createTemp.brandId = 0
  4340. }
  4341. if (this.createTemp.yuanzhi == '') {
  4342. this.createTemp.yuanzhi = 0
  4343. }
  4344. if (this.createTemp.salvage == '') {
  4345. this.createTemp.salvage = 0
  4346. }
  4347. if (this.createTemp.subtractvalue == '') {
  4348. this.createTemp.subtractvalue = 0
  4349. }
  4350. if (this.createTemp.yearUpkeepCost == '') {
  4351. this.createTemp.yearUpkeepCost = 0
  4352. }
  4353. if (this.createTemp.yearMaintainCost == '') {
  4354. this.createTemp.yearMaintainCost = 0
  4355. }
  4356. if (this.createTemp.baseHours == '') {
  4357. this.createTemp.baseHours = 0
  4358. }
  4359. // 原值yuanzhi残值salvage月核减值subtractvalue保养费用yearUpkeepCost维修费用yearMaintainCost
  4360. var rulesValue = /^\d+(\.\d{1,3})?$/
  4361. this.requestParam.parammaps = this.createTemp
  4362. this.requestParam.parammaps.picpath = this.createTemp.picpath
  4363. if (
  4364. this.createTemp.yuanzhi !== '' ||
  4365. this.createTemp.salvage !== '' ||
  4366. this.createTemp.subtractvalue !== '' ||
  4367. this.createTemp.yearUpkeepCost !== '' ||
  4368. this.createTemp.yearMaintainCost !== ''
  4369. ) {
  4370. this.requestParam.parammaps.yuanzhi = parseFloat(
  4371. this.createTemp.yuanzhi
  4372. )
  4373. // if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi)) || !rulesValue.test(parseFloat(this.createTemp.salvage)) || !rulesValue.test(parseFloat(this.createTemp.subtractvalue)) || !rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost)) || !rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))) {
  4374. if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi))) {
  4375. this.$message({
  4376. type: 'error',
  4377. message: '原值请输入自然数,最多保留三位小数点',
  4378. duration: 2000
  4379. })
  4380. return false
  4381. }
  4382. if (!rulesValue.test(parseFloat(this.createTemp.salvage))) {
  4383. this.$message({
  4384. type: 'error',
  4385. message: '残值请输入自然数,最多保留三位小数点',
  4386. duration: 2000
  4387. })
  4388. return false
  4389. }
  4390. if (!rulesValue.test(parseFloat(this.createTemp.subtractvalue))) {
  4391. this.$message({
  4392. type: 'error',
  4393. message: '月核减值请输入自然数,最多保留三位小数点',
  4394. duration: 2000
  4395. })
  4396. return false
  4397. }
  4398. if (!rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost))) {
  4399. this.$message({
  4400. type: 'error',
  4401. message: '保养费用输入自然数,最多保留三位小数点',
  4402. duration: 2000
  4403. })
  4404. return false
  4405. }
  4406. if (
  4407. !rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))
  4408. ) {
  4409. this.$message({
  4410. type: 'error',
  4411. message: '维修费用请输入自然数,最多保留三位小数点',
  4412. duration: 2000
  4413. })
  4414. return false
  4415. }
  4416. }
  4417. if (
  4418. this.requestParam.parammaps.maintenance.length != 0 &&
  4419. this.requestParam.parammaps.maintenance
  4420. ) {
  4421. if (this.requestParam.parammaps.maintenance.length > 4) {
  4422. this.$notify({
  4423. title: '提示',
  4424. message: '指定维修人最多4个人!',
  4425. type: 'success',
  4426. duration: 2000
  4427. })
  4428. return false
  4429. }
  4430. this.requestParam.parammaps.maintenance =
  4431. this.requestParam.parammaps.maintenance.toString()
  4432. }
  4433. PostDataByName(this.requestParam).then((response) => {
  4434. console.log('新增保存发送参数', this.requestParam)
  4435. if (response.msg !== 'fail') {
  4436. if (this.getdataListParm.parammaps.inputDatetime === null) {
  4437. this.getdataListParm.parammaps.inputDatetime = ''
  4438. }
  4439. this.resetCreateTemp()
  4440. this.$notify({
  4441. title: '成功',
  4442. message: '新增成功',
  4443. type: 'success',
  4444. duration: 2000
  4445. })
  4446. } else {
  4447. failproccess(response, this.$notify)
  4448. }
  4449. })
  4450. }
  4451. })
  4452. },
  4453. form_edit(row) {
  4454. // row.eqCode = ''// TODO:
  4455. if (row.eqCode != '') {
  4456. this.isShow = true
  4457. } else {
  4458. this.isShow = false
  4459. }
  4460. if (this.dialogFormVisible) {
  4461. return
  4462. }
  4463. this.edit = 0
  4464. this.getDepartParam.parammaps.pastureId = row.pastureId
  4465. this.getCreateDepartDownList()
  4466. this.createTemp = Object.assign({}, row) // copy obj
  4467. if (row.inputUser !== undefined) {
  4468. this.createTemp.inputUser = parseInt(row.inputUser)
  4469. }
  4470. if (row.levelone !== undefined) {
  4471. this.createTemp.levelone = parseInt(row.levelone)
  4472. }
  4473. if (row.leveltwo !== undefined) {
  4474. this.createTemp.leveltwo = parseInt(row.leveltwo)
  4475. }
  4476. if (row.levelthree !== undefined) {
  4477. this.createTemp.levelthree = parseInt(row.levelthree)
  4478. }
  4479. if (row.leveloneTime !== undefined) {
  4480. this.createTemp.leveloneTime = parseInt(row.leveloneTime)
  4481. }
  4482. if (row.leveltwoTime !== undefined) {
  4483. this.createTemp.leveltwoTime = parseInt(row.leveltwoTime)
  4484. }
  4485. if (row.levelthreeTime !== undefined) {
  4486. this.createTemp.levelthreeTime = parseInt(row.levelthreeTime)
  4487. }
  4488. if (row.maintenance && row.maintenance.length > 0) {
  4489. var newArr = row.maintenance.split(',')
  4490. var arr2 = []
  4491. newArr.forEach(function(item) {
  4492. arr2.push(parseInt(item))
  4493. })
  4494. console.log('arr2', arr2)
  4495. this.createTemp.maintenance = arr2
  4496. } else {
  4497. this.$set(this.createTemp, 'maintenance', [])
  4498. }
  4499. if (this.createTemp.eqClassId !== undefined) {
  4500. this.defaultCheckedKeys = [this.createTemp.eqClassId]
  4501. } else {
  4502. this.createTemp.eqClassId = ''
  4503. this.defaultCheckedKeys = []
  4504. }
  4505. this.dialogStatus = 'update'
  4506. this.dialogFormVisible = true
  4507. this.$nextTick(() => {
  4508. this.$refs['createTemp'].clearValidate()
  4509. })
  4510. const urlArray = []
  4511. const fileList = []
  4512. if (row.picpath == undefined) {
  4513. urlArray.push()
  4514. } else if (row.picpath == '') {
  4515. urlArray.push()
  4516. } else {
  4517. urlArray.push(row.picpath)
  4518. }
  4519. for (let i = 0; i < urlArray.length; i++) {
  4520. const urlObj = {}
  4521. this.$set(urlObj, 'url', urlArray[i])
  4522. fileList.push(urlObj)
  4523. }
  4524. this.$set(this.createTemp, 'fileList', fileList)
  4525. console.log(this.createTemp)
  4526. if (this.createTemp.fileList.length >= 1) {
  4527. this.showUpload = true
  4528. } else {
  4529. this.showUpload = false
  4530. }
  4531. },
  4532. edit_dialog_save() {
  4533. console.log(this.createTemp.maintenance)
  4534. this.$refs['createTemp'].validate((valid) => {
  4535. if (valid) {
  4536. console.log('-----------', this.createTemp)
  4537. console.log(this.createTemp.providerId)
  4538. if (
  4539. this.createTemp.eqClassId == '' ||
  4540. this.createTemp.eqClassId == undefined ||
  4541. this.createTemp.eqClassId == null
  4542. ) {
  4543. this.$message({ type: 'warning', message: '请选择设备类别' })
  4544. } else {
  4545. this.requestParam.name = 'updateAsset'
  4546. this.requestParam.parammaps = this.createTemp
  4547. if (this.createTemp.status === '正常') {
  4548. this.createTemp.status = 17
  4549. }
  4550. if (this.createTemp.status === '闲置') {
  4551. this.createTemp.status = 18
  4552. }
  4553. if (this.createTemp.status === '报废') {
  4554. this.createTemp.status = 19
  4555. }
  4556. if (this.createTemp.status === '封存') {
  4557. this.createTemp.status = 20
  4558. }
  4559. if (
  4560. this.createTemp.providerId === '' ||
  4561. this.createTemp.providerId === undefined
  4562. ) {
  4563. this.createTemp.providerId = 0
  4564. }
  4565. if (
  4566. this.createTemp.brandId === '' ||
  4567. this.createTemp.brandId == undefined
  4568. ) {
  4569. this.createTemp.brandId = 0
  4570. }
  4571. if (this.createTemp.yuanzhi === '') {
  4572. this.createTemp.yuanzhi = 0
  4573. }
  4574. if (this.createTemp.salvage === '') {
  4575. this.createTemp.salvage = 0
  4576. }
  4577. if (this.createTemp.subtractvalue === '') {
  4578. this.createTemp.subtractvalue = 0
  4579. }
  4580. if (this.createTemp.yearUpkeepCost === '') {
  4581. this.createTemp.yearUpkeepCost = 0
  4582. }
  4583. if (this.createTemp.yearMaintainCost === '') {
  4584. this.createTemp.yearMaintainCost = 0
  4585. }
  4586. if (this.createTemp.baseHours === '') {
  4587. this.createTemp.baseHours = 0
  4588. }
  4589. if (
  4590. this.createTemp.upkeepgrade === 'A' ||
  4591. this.createTemp.upkeepgrade === 'B' ||
  4592. this.createTemp.upkeepgrade === 'C'
  4593. ) {
  4594. this.createTemp.upkeepgrade = this.createTemp.upkeepgradeId
  4595. this.createTemp.upkeepgradeId = ''
  4596. }
  4597. this.createTemp.deptId = this.createTemp.deptId
  4598. this.createTemp.departmentName = this.createTemp.departmentName
  4599. this.createTemp.employeeId = this.createTemp.employeId
  4600. // var rulesValue = /^\d+(\.\d{1,3})?$/
  4601. this.requestParam.parammaps = this.createTemp
  4602. if (this.tabName === 'first') {
  4603. this.requestParam.parammaps.SHStatus = this.createTemp.SHStatus
  4604. } else if (this.tabName === 'second') {
  4605. this.requestParam.parammaps.SHStatus = 0
  4606. }
  4607. const picpath = parseInt(this.createTemp.picpath)
  4608. if (isNaN(picpath) == false) {
  4609. this.requestParam.parammaps.picpath = this.createTemp.picpath
  4610. } else {
  4611. this.requestParam.parammaps.picpath = this.createTemp.picId
  4612. }
  4613. if (
  4614. this.requestParam.parammaps.maintenance.length != 0 &&
  4615. this.requestParam.parammaps.maintenance
  4616. ) {
  4617. if (this.requestParam.parammaps.maintenance.length > 4) {
  4618. this.$notify({
  4619. title: '提示',
  4620. message: '指定维修人最多4个人!',
  4621. type: 'success',
  4622. duration: 2000
  4623. })
  4624. return false
  4625. }
  4626. this.requestParam.parammaps.maintenance =
  4627. this.requestParam.parammaps.maintenance.toString()
  4628. }
  4629. if (
  4630. this.requestParam.parammaps.duration == undefined ||
  4631. this.requestParam.parammaps.duration == '' ||
  4632. this.requestParam.parammaps.duration == null
  4633. ) {
  4634. this.requestParam.parammaps.duration == 0
  4635. this.$set(this.requestParam.parammaps, 'duration', 0)
  4636. }
  4637. console.log(this.createTemp.maintenance, 'maintenance')
  4638. PostDataByName(this.requestParam).then((response) => {
  4639. console.log(response)
  4640. if (response.msg !== 'fail') {
  4641. if (this.getdataListParm.parammaps.inputDatetime1 === null) {
  4642. this.getdataListParm.parammaps.inputDatetime1 = ''
  4643. }
  4644. this.get_table_data()
  4645. this.get_table_dataSH()
  4646. this.dialogFormVisible = false
  4647. this.$notify({
  4648. title: '成功',
  4649. message: '保存成功-',
  4650. type: 'success',
  4651. duration: 2000
  4652. })
  4653. // this.reload()
  4654. } else {
  4655. const arr = this.requestParam.parammaps.maintenance.split(',')
  4656. const arr1 = []
  4657. for (let i = 0; i < arr.length; i++) {
  4658. arr1.push(parseInt(arr[i]))
  4659. }
  4660. this.$set(this.createTemp, 'maintenance', arr1)
  4661. failproccess(response, this.$notify)
  4662. }
  4663. })
  4664. }
  4665. }
  4666. })
  4667. },
  4668. brandSearch(queryString, cb) {
  4669. console.log('品牌模糊查询输入值', queryString)
  4670. this.requestBrand.parammaps['brandName'] = queryString
  4671. GetDataByName(this.requestBrand).then((response) => {
  4672. console.log('品牌模糊查询搜索data', response.data.list)
  4673. this.BrandList = response.data.list
  4674. cb(this.BrandList)
  4675. })
  4676. },
  4677. handleSelectBrand(item) {
  4678. console.log('品牌模糊查询选中值', item)
  4679. this.$set(this.createTemp, 'brandName', item.brandName)
  4680. this.$set(this.createTemp, 'brandId', item.brandId)
  4681. this.$forceUpdate()
  4682. },
  4683. employeSearch(queryString, cb) {
  4684. console.log('责任人模糊查询输入值', queryString)
  4685. this.requestEmploye.parammaps['empname'] = queryString
  4686. GetDataByName(this.requestEmploye).then((response) => {
  4687. console.log('责任人模糊查询搜索data', response.data.list)
  4688. this.employeList = response.data.list
  4689. cb(this.employeList)
  4690. })
  4691. },
  4692. handleSelectEmploye(item) {
  4693. console.log('责任人模糊查询选中值', item)
  4694. this.$set(this.createTemp, 'employeId', item.id)
  4695. this.$set(this.createTemp, 'employeName', item.name)
  4696. this.$forceUpdate()
  4697. },
  4698. form_see(row) {
  4699. console.log(row, 'hss')
  4700. // this.getWorks()
  4701. this.seeTemp = Object.assign({}, row) // copy obj
  4702. this.activeName = 'first'
  4703. this.dialogStatus = 'card'
  4704. this.dialogFormVisible_See = true
  4705. // 流程图
  4706. var reason = '未通过原因:' + this.seeTemp.workflowNote
  4707. if (this.seeTemp.SHStatus === 0) {
  4708. this.activeList = [
  4709. {
  4710. title: '提交信息',
  4711. date: this.seeTemp.inputDatetime,
  4712. name: this.seeTemp.inputUserName
  4713. },
  4714. { title: '设备中心审核' }
  4715. ]
  4716. this.active = 1
  4717. } else if (this.seeTemp.SHStatus === 1) {
  4718. this.activeList = [
  4719. {
  4720. title: '提交信息',
  4721. date: this.seeTemp.inputDatetime,
  4722. name: this.seeTemp.inputUserName
  4723. },
  4724. {
  4725. title: '设备中心审核',
  4726. date: this.seeTemp.chargeDate,
  4727. name: this.seeTemp.chargePerson
  4728. }
  4729. ]
  4730. this.active = 2
  4731. } else if (this.seeTemp.SHStatus === 2) {
  4732. this.activeList = [
  4733. {
  4734. title: '提交信息',
  4735. date: this.seeTemp.inputDatetime,
  4736. name: this.seeTemp.inputUserName
  4737. },
  4738. {
  4739. title: '设备中心审核',
  4740. date: this.seeTemp.chargeDate,
  4741. name: this.seeTemp.chargePerson,
  4742. status: 'error',
  4743. reason: reason
  4744. }
  4745. ]
  4746. this.active = 2
  4747. }
  4748. // 查看-点检记录
  4749. },
  4750. form_seeTabClick(val) {
  4751. console.log(val)
  4752. if (val.name == 'second') {
  4753. this.getAssetBigSpotCheckList()
  4754. } else if (val.name == 'third') {
  4755. this.getBigupkeepbyeqList()
  4756. } else if (val.name == 'fouth') {
  4757. this.getAssetMaintainList()
  4758. } else if (val.name == 'fifth') {
  4759. this.getAssetSTTList()
  4760. } else if (val.name == 'sixth') {
  4761. this.getAssetChangeList()
  4762. } else if (val.name == 'seventh') {
  4763. this.getAssetPartApplyList()
  4764. } else if (val.name == 'eighth') {
  4765. this.getBarChart1Parm.parammaps.eqId = this.seeTemp.id
  4766. this.getBarChart2Parm.parammaps.eqId = this.seeTemp.id
  4767. this.getChartSeeParm.parammaps.eqId = this.seeTemp.id
  4768. this.getBarChart1()
  4769. this.getBarChart2()
  4770. }
  4771. },
  4772. // 点检记录
  4773. getAssetBigSpotCheckList() {
  4774. this.listLoadingSpotCheck1 = true
  4775. if (
  4776. this.$refs['inputDatetimeCheck1'] !== undefined &&
  4777. this.$refs['inputDatetimeCheck1'].value !== null
  4778. ) {
  4779. this.getAssetBigSpotCheckListParm.parammaps.startTime =
  4780. this.$refs['inputDatetimeCheck1'].value[0]
  4781. this.getAssetBigSpotCheckListParm.parammaps.stopTime =
  4782. this.$refs['inputDatetimeCheck1'].value[1]
  4783. } else {
  4784. this.getAssetBigSpotCheckListParm.parammaps.startTime = ''
  4785. this.getAssetBigSpotCheckListParm.parammaps.stopTime = ''
  4786. }
  4787. this.getAssetBigSpotCheckListParm.parammaps.assetId = this.seeTemp.assetId
  4788. this.getAssetBigSpotCheckListParm.parammaps.pastureId =
  4789. this.seeTemp.pastureId
  4790. GetDataByName(this.getAssetBigSpotCheckListParm).then((response) => {
  4791. console.log('点检记录-table数据', response.data.list)
  4792. if (response.data.list !== null) {
  4793. this.listSpotCheck1 = response.data.list
  4794. this.pageNumSpotCheck1 = response.data.pageNum
  4795. this.pageSizeSpotCheck1 = response.data.pageSize
  4796. } else {
  4797. this.listSpotCheck1 = []
  4798. }
  4799. this.totalSpotCheck1 = response.data.total
  4800. setTimeout(() => {
  4801. this.listLoadingSpotCheck1 = false
  4802. }, 100)
  4803. })
  4804. },
  4805. form_searchSportCheck() {
  4806. if (
  4807. this.getAssetBigSpotCheckListParm.parammaps.inputDatetimeCheck1 == null
  4808. ) {
  4809. this.getAssetBigSpotCheckListParm.parammaps.inputDatetimeCheck1 = ''
  4810. }
  4811. this.getAssetBigSpotCheckListParm.offset = 1
  4812. this.getAssetBigSpotCheckList()
  4813. },
  4814. // 保养记录
  4815. getBigupkeepbyeqList() {
  4816. this.listLoadingSpotCheck1 = true
  4817. if (
  4818. this.$refs['inputDatetimeUpkeepbyeq'] !== undefined &&
  4819. this.$refs['inputDatetimeUpkeepbyeq'].value !== null
  4820. ) {
  4821. this.getBigupkeepbyeqParm.parammaps.startTime =
  4822. this.$refs['inputDatetimeUpkeepbyeq'].value[0]
  4823. this.getBigupkeepbyeqParm.parammaps.stopTime =
  4824. this.$refs['inputDatetimeUpkeepbyeq'].value[1]
  4825. } else {
  4826. this.getBigupkeepbyeqParm.parammaps.startTime = ''
  4827. this.getBigupkeepbyeqParm.parammaps.stopTime = ''
  4828. }
  4829. this.getBigupkeepbyeqParm.parammaps.assetId = this.seeTemp.assetId
  4830. this.getBigupkeepbyeqParm.parammaps.pastureId = this.seeTemp.pastureId
  4831. GetDataByName(this.getBigupkeepbyeqParm).then((response) => {
  4832. console.log('保养记录-table数据', response.data.list)
  4833. if (response.data.list !== null) {
  4834. this.listUpkeepbyeq = response.data.list
  4835. this.pageNumUpkeepbyeq = response.data.pageNum
  4836. this.pageSizeUpkeepbyeq = response.data.pageSize
  4837. } else {
  4838. this.listUpkeepbyeq = []
  4839. }
  4840. this.totalUpkeepbyeq = response.data.total
  4841. setTimeout(() => {
  4842. this.listLoadingSpotCheck1 = false
  4843. }, 100)
  4844. })
  4845. },
  4846. form_searchUpkeepbyeq() {
  4847. if (
  4848. this.getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq === null
  4849. ) {
  4850. this.getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq = ''
  4851. }
  4852. this.getBigupkeepbyeqParm.offset = 1
  4853. this.getBigupkeepbyeqList()
  4854. },
  4855. // 维修记录
  4856. getAssetMaintainList() {
  4857. this.listLoadingAssetMaintain = true
  4858. if (
  4859. this.$refs['inputDatetimeAssetMaintain'] !== undefined &&
  4860. this.$refs['inputDatetimeAssetMaintain'].value !== null
  4861. ) {
  4862. this.getAssetMaintainParm.parammaps.startTime =
  4863. this.$refs['inputDatetimeAssetMaintain'].value[0]
  4864. this.getAssetMaintainParm.parammaps.stopTime =
  4865. this.$refs['inputDatetimeAssetMaintain'].value[1]
  4866. } else {
  4867. this.getAssetMaintainParm.parammaps.startTime = ''
  4868. this.getAssetMaintainParm.parammaps.stopTime = ''
  4869. }
  4870. this.getAssetMaintainParm.parammaps.assetId = this.seeTemp.assetId
  4871. this.getAssetMaintainParm.parammaps.pastureId = this.seeTemp.pastureId
  4872. GetDataByName(this.getAssetMaintainParm).then((response) => {
  4873. console.log('维修记录-tabile数据', response.data.list)
  4874. if (response.data.list !== null) {
  4875. this.listAssetMaintain = response.data.list
  4876. this.pageNumAssetMaintain = response.data.pageNum
  4877. this.pageSizeAssetMaintain = response.data.pageSize
  4878. } else {
  4879. this.listAssetMaintain = []
  4880. }
  4881. this.totalAssetMaintain = response.data.total
  4882. setTimeout(() => {
  4883. this.listLoadingAssetMaintain = false
  4884. }, 100)
  4885. })
  4886. },
  4887. form_searchAssetMaintain() {
  4888. if (
  4889. this.getBigupkeepbyeqParm.parammaps.inputDatetimeAssetMaintan === null
  4890. ) {
  4891. this.getBigupkeepbyeqParm.parammaps.inputDatetimeAssetMaintan = ''
  4892. }
  4893. this.getBigupkeepbyeqParm.offset = 1
  4894. this.getAssetMaintainList()
  4895. },
  4896. // 启停记录
  4897. getAssetSTTList() {
  4898. this.listLoadingAssetSTT = true
  4899. this.getAssetSTTParm.parammaps.assetId = this.seeTemp.assetId
  4900. this.getAssetSTTParm.parammaps.pastureId = this.seeTemp.pastureId
  4901. GetDataByName(this.getAssetSTTParm).then((response) => {
  4902. console.log('启停记录-tabile数据', response.data.list)
  4903. if (response.data.list !== null) {
  4904. this.listAssetSTT = response.data.list
  4905. this.pageNumAssetSTT = response.data.pageNum
  4906. this.pageSizeAssetSTT = response.data.pageSize
  4907. } else {
  4908. this.listAssetSTT = []
  4909. }
  4910. this.totalAssetSTT = response.data.total
  4911. setTimeout(() => {
  4912. this.listLoadingAssetSTT = false
  4913. }, 100)
  4914. })
  4915. },
  4916. form_searchAssetSTT() {
  4917. if (this.getAssetSTTParm.parammaps.startTime == null) {
  4918. this.getAssetSTTParm.parammaps.startTime = ''
  4919. }
  4920. if (this.getAssetSTTParm.parammaps.stopTime == null) {
  4921. this.getAssetSTTParm.parammaps.stopTime = ''
  4922. }
  4923. this.getAssetSTTParm.offset = 1
  4924. this.getAssetSTTList()
  4925. },
  4926. // 变更记录
  4927. getAssetChangeList() {
  4928. this.listLoadingAssetChange = true
  4929. console.log(this.$refs['inputDatetimeAssetChange'])
  4930. if (
  4931. this.$refs['inputDatetimeAssetChange'] !== undefined &&
  4932. this.$refs['inputDatetimeAssetChange'].value !== null
  4933. ) {
  4934. this.getAssetChangeParm.parammaps.startTime =
  4935. this.$refs['inputDatetimeAssetChange'].value[0]
  4936. this.getAssetChangeParm.parammaps.stopTime =
  4937. this.$refs['inputDatetimeAssetChange'].value[1]
  4938. } else {
  4939. this.getAssetChangeParm.parammaps.startTime = ''
  4940. this.getAssetChangeParm.parammaps.stopTime = ''
  4941. }
  4942. this.getAssetChangeParm.parammaps.assetId = this.seeTemp.assetId
  4943. this.getAssetChangeParm.parammaps.pastureId = this.seeTemp.pastureId
  4944. GetDataByName(this.getAssetChangeParm).then((response) => {
  4945. console.log('变更记录-tabile数据', response.data.list)
  4946. if (response.data.list !== null) {
  4947. this.listAssetChange = response.data.list
  4948. this.pageNumAssetChange = response.data.pageNum
  4949. this.pageSizeAssetChange = response.data.pageSize
  4950. } else {
  4951. this.listAssetChange = []
  4952. }
  4953. this.totalAssetChange = response.data.total
  4954. setTimeout(() => {
  4955. this.listLoadingAssetChange = false
  4956. }, 100)
  4957. })
  4958. },
  4959. form_searchAssetChange() {
  4960. if (this.getAssetChangeParm.parammaps.inputDatetimeAssetChange === null) {
  4961. this.getAssetChangeParm.parammaps.inputDatetimeAssetChange = ''
  4962. }
  4963. this.getAssetChangeParm.offset = 1
  4964. this.getAssetChangeList()
  4965. },
  4966. changeStatue: function(cellValue) {
  4967. if (cellValue.changeStatue == 17) {
  4968. return '正常'
  4969. } else if (cellValue.changeStatue == 18) {
  4970. return '闲置'
  4971. } else if (cellValue.changeStatue == 19) {
  4972. return '报废'
  4973. } else if (cellValue.changeStatue == 20) {
  4974. return '封存'
  4975. }
  4976. },
  4977. // 备件领用记录
  4978. getAssetPartApplyList() {
  4979. this.listLoadingAssetChange = true
  4980. console.log(this.$refs['inputDatetimeAssetPartApply'].value)
  4981. if (
  4982. this.$refs['inputDatetimeAssetPartApply'] !== undefined &&
  4983. this.$refs['inputDatetimeAssetPartApply'].value !== null &&
  4984. this.$refs['inputDatetimeAssetPartApply'].value !== ''
  4985. ) {
  4986. this.getAssetPartApplyParm.parammaps.startTime =
  4987. this.$refs['inputDatetimeAssetPartApply'].value[0]
  4988. this.getAssetPartApplyParm.parammaps.stopTime =
  4989. this.$refs['inputDatetimeAssetPartApply'].value[1]
  4990. } else {
  4991. this.getAssetPartApplyParm.parammaps.startTime = ''
  4992. this.getAssetPartApplyParm.parammaps.stopTime = ''
  4993. }
  4994. this.getAssetPartApplyParm.parammaps.assetId = this.seeTemp.assetId
  4995. this.getAssetPartApplyParm.parammaps.pastureId = this.seeTemp.pastureId
  4996. GetDataByName(this.getAssetPartApplyParm).then((response) => {
  4997. console.log('备件领用记录-tabile数据', response.data.list)
  4998. if (response.data.list !== null) {
  4999. this.listAssetPartApply = response.data.list
  5000. this.pageNumAssetPartApply = response.data.pageNum
  5001. this.pageSizeAssetPartApply = response.data.pageSize
  5002. } else {
  5003. this.listAssetPartApply = []
  5004. }
  5005. this.totalAssetPartApply = response.data.total
  5006. setTimeout(() => {
  5007. this.listLoadingAssetPartApply = false
  5008. }, 100)
  5009. })
  5010. },
  5011. form_searchAssetPartApply() {
  5012. this.listLoadingAssetChange = true
  5013. if (
  5014. this.getAssetPartApplyParm.parammaps.inputDatetimeAssetChange == null
  5015. ) {
  5016. this.getAssetPartApplyParm.parammaps.inputDatetimeAssetChange = ''
  5017. }
  5018. this.getAssetPartApplyParm.offset = 1
  5019. this.getAssetPartApplyList()
  5020. },
  5021. getBarChart1() {
  5022. GetReportform(this.getBarChart1Parm).then((response) => {
  5023. console.log('图1', response)
  5024. this.chart_data1 = response.data.chart_data
  5025. var repireCost = response.data.chart_data.repireCost
  5026. var upkeepCost = response.data.chart_data.upkeepCost
  5027. var totaltitle1 = 0
  5028. if (repireCost !== null || repireCost !== undefined) {
  5029. repireCost.forEach(function(item, index) {
  5030. console.log(parseFloat(item))
  5031. totaltitle1 = totaltitle1 + parseFloat(item)
  5032. })
  5033. }
  5034. var totaltitle2 = 0
  5035. if (upkeepCost !== null || upkeepCost !== undefined) {
  5036. upkeepCost.forEach(function(item, index) {
  5037. console.log(parseFloat(item))
  5038. totaltitle2 = totaltitle2 + parseFloat(item)
  5039. })
  5040. }
  5041. this.totaltitle = totaltitle1 + totaltitle2
  5042. this.roadBarChart1(this.chart_data1, this.totaltitle.toFixed(2))
  5043. })
  5044. },
  5045. roadBarChart1(chart_data1, totaltitle) {
  5046. console.log(chart_data1, totaltitle)
  5047. if (this.barChart1 != null) {
  5048. this.barChart1.dispose()
  5049. }
  5050. this.barChart1 = echarts.init(document.getElementById('barChart1'))
  5051. var option = {
  5052. title: {
  5053. text: '年度费用统计(总费用:' + totaltitle + '元)',
  5054. textStyle: { color: '#769cfc' }
  5055. },
  5056. tooltip: {
  5057. trigger: 'axis',
  5058. axisPointer: {
  5059. // 坐标轴指示器,坐标轴触发有效
  5060. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  5061. },
  5062. formatter: function(data) {
  5063. console.log(data.length)
  5064. var value = 0
  5065. let val = ''
  5066. if (data.length == 1) {
  5067. val += data[0].seriesName + ':' + data[0].data + '元<br/>'
  5068. } else {
  5069. value = (
  5070. parseFloat(data[0].value) + parseFloat(data[1].value)
  5071. ).toFixed(2)
  5072. // eslint-disable-next-line no-unused-vars
  5073. val = data[0].name + '年设备总费用:' + value + '元' + '<br/>'
  5074. val += '维修费用:' + data[0].data + '元<br/>'
  5075. val += '保养费用:' + data[1].data + '元<br/>'
  5076. }
  5077. return val
  5078. }
  5079. },
  5080. legend: {
  5081. data: ['维修费用', '保养费用'],
  5082. x: 'right'
  5083. },
  5084. color: ['#769cfc', '#42b983'],
  5085. grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
  5086. xAxis: [{ type: 'category', data: this.chart_data1.year }],
  5087. yAxis: [{ type: 'value', name: '费用(元)' }],
  5088. series: [
  5089. {
  5090. name: '维修费用',
  5091. type: 'bar',
  5092. barWidth: 60,
  5093. stack: '广告',
  5094. data: this.chart_data1.repireCost
  5095. },
  5096. {
  5097. name: '保养费用',
  5098. type: 'bar',
  5099. barWidth: 60,
  5100. stack: '广告',
  5101. data: this.chart_data1.upkeepCost
  5102. }
  5103. ]
  5104. }
  5105. this.barChart1.setOption(option)
  5106. var that = this
  5107. window.onresize = function() {
  5108. that.barChart1.resize()
  5109. }
  5110. this.barChart1.on('click', function(param, i) {
  5111. console.log(param)
  5112. that.getBarChart2Parm.parammaps.receiveTime = param.name
  5113. that.getBarChart2()
  5114. that.getBarChart1()
  5115. })
  5116. },
  5117. getBarChart2() {
  5118. GetReportform(this.getBarChart2Parm).then((response) => {
  5119. console.log('图2', response)
  5120. this.chart_data2 = response.data.chart_data
  5121. this.roadBarChart2(this.chart_data2)
  5122. })
  5123. },
  5124. roadBarChart2(chart_data1) {
  5125. if (this.barChart2 != null) {
  5126. this.barChart2.dispose()
  5127. }
  5128. this.barChart2 = echarts.init(document.getElementById('barChart2'))
  5129. var option = {
  5130. title: {
  5131. text: this.getBarChart2Parm.parammaps.receiveTime + '年月度费用统计',
  5132. textStyle: { color: '#769cfc' }
  5133. },
  5134. tooltip: {
  5135. trigger: 'axis',
  5136. axisPointer: {
  5137. // 坐标轴指示器,坐标轴触发有效
  5138. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  5139. },
  5140. formatter: function(data) {
  5141. console.log(data)
  5142. var value = 0
  5143. var val = ''
  5144. if (data.length == 1) {
  5145. val += data[0].seriesName + ':' + data[0].data + '元<br/>'
  5146. } else {
  5147. value = (
  5148. parseFloat(data[0].value) + parseFloat(data[1].value)
  5149. ).toFixed(2)
  5150. val = data[0].name + '月设备总费用:' + value + '元' + '<br/>'
  5151. val += '维修费用:' + data[0].data + '元<br/>'
  5152. val += '保养费用:' + data[1].data + '元<br/>'
  5153. }
  5154. return val
  5155. }
  5156. },
  5157. legend: {
  5158. data: ['维修费用', '保养费用'],
  5159. x: 'right'
  5160. },
  5161. color: ['#769cfc', '#42b983'],
  5162. grid: {
  5163. left: '3%',
  5164. right: '4%',
  5165. bottom: '3%',
  5166. containLabel: true
  5167. },
  5168. xAxis: [{ type: 'category', data: this.chart_data2.months }],
  5169. yAxis: [{ type: 'value', name: '费用(元)' }],
  5170. series: [
  5171. {
  5172. name: '维修费用',
  5173. type: 'bar',
  5174. stack: '广告',
  5175. data: this.chart_data2.repireCost
  5176. },
  5177. {
  5178. name: '保养费用',
  5179. type: 'bar',
  5180. stack: '广告',
  5181. data: this.chart_data2.upkeepCost
  5182. }
  5183. ]
  5184. }
  5185. this.barChart2.setOption(option)
  5186. var that = this
  5187. window.onresize = function() {
  5188. that.barChart2.resize()
  5189. }
  5190. this.barChart2.on('click', function(param, i) {
  5191. console.log(param)
  5192. that.dialogFormVisible_ChartSee = true
  5193. that.dialogStatus = 'card'
  5194. that.getChartSeeParm.parammaps.receiveTime = param.name
  5195. that.getChartSeeList()
  5196. that.getBarChart1()
  5197. that.getBarChart2()
  5198. })
  5199. },
  5200. getChartSeeList() {
  5201. this.listLoadingChartSee = true
  5202. if (
  5203. this.$refs['inputDatetime2'] !== undefined &&
  5204. this.$refs['inputDatetime2'].value !== null
  5205. ) {
  5206. this.getChartSeeParm.parammaps.startTime =
  5207. this.$refs['inputDatetime2'].value[0]
  5208. this.getChartSeeParm.parammaps.stopTime =
  5209. this.$refs['inputDatetime2'].value[1]
  5210. } else {
  5211. this.getChartSeeParm.parammaps.startTime = ''
  5212. this.getChartSeeParm.parammaps.stopTime = ''
  5213. }
  5214. GetDataByName(this.getChartSeeParm).then((response) => {
  5215. console.log('table数据', response.data.list)
  5216. if (response.data.list !== null) {
  5217. this.listChartSee = response.data.list
  5218. this.pageNumChartSee = response.data.pageNum
  5219. this.pageSizeChartSee = response.data.pageSize
  5220. if (response.data.total) {
  5221. this.totalChartSee = response.data.total
  5222. }
  5223. } else {
  5224. this.listChartSee = []
  5225. }
  5226. setTimeout(() => {
  5227. this.listLoadingChartSee = false
  5228. }, 100)
  5229. })
  5230. },
  5231. form_searchChartSee() {
  5232. this.listLoadingChartSee = true
  5233. if (this.getChartSeeParm.parammaps.inputDatetime2 === null) {
  5234. this.getChartSeeParm.parammaps.inputDatetime2 = ''
  5235. }
  5236. this.getChartSeeParm.offset = 1
  5237. this.getChartSeeList()
  5238. },
  5239. handleDownloadChartSee() {
  5240. this.$alert(
  5241. '正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
  5242. {}
  5243. )
  5244. this.isPercentage = true
  5245. this.percentage = 1
  5246. var timer = setInterval(() => {
  5247. this.percentage += 5
  5248. if (this.percentage > 95) {
  5249. this.percentage = 99
  5250. clearInterval(timer)
  5251. }
  5252. this.percentage = this.percentage
  5253. }, 1000)
  5254. this.downLoadParm2.name = 'getEqPartuseDetailList'
  5255. this.downLoadParm2.returntype = 'Map'
  5256. this.downLoadParm2.parammaps = this.getChartSeeParm.parammaps
  5257. GetAccount(this.downLoadParm2).then((response) => {
  5258. this.$nextTick(() => {
  5259. this.downLoadList2 = response.data.list
  5260. if (response.data.list !== '') {
  5261. this.percentage = 99
  5262. setTimeout(() => {
  5263. this.isPercentage = false
  5264. }, 2000)
  5265. }
  5266. console.log(this.downLoadList2)
  5267. const ExcelDatas = [
  5268. {
  5269. tHeader: [
  5270. '类型',
  5271. '单号',
  5272. '领用日期',
  5273. '领用部门',
  5274. '备件编号',
  5275. '备件名称',
  5276. '备件规格',
  5277. '备件品牌',
  5278. '计量单位',
  5279. '出库数量',
  5280. '退库数量',
  5281. '单价',
  5282. '总价'
  5283. ],
  5284. filterVal: [
  5285. 'useTypeV',
  5286. 'RUcode',
  5287. 'creatTime',
  5288. 'departmentName',
  5289. 'partCode',
  5290. 'partName',
  5291. 'specification',
  5292. 'brandName',
  5293. 'unit',
  5294. 'checkoutNumber',
  5295. 'quitNumber',
  5296. 'price',
  5297. 'sumPrice'
  5298. ],
  5299. tableDatas: this.downLoadList2,
  5300. sheetName: '费用统计'
  5301. }
  5302. ]
  5303. json2excel(ExcelDatas, '费用统计', true, 'xlsx')
  5304. })
  5305. })
  5306. },
  5307. form_delete(row) {
  5308. MessageBox.confirm('确认删除此信息?', {
  5309. confirmButtonText: '确认',
  5310. cancelButtonText: '取消',
  5311. type: 'warning'
  5312. })
  5313. .then(() => {
  5314. this.requestParam.name = 'deleteAsset'
  5315. this.requestParam.parammaps = {}
  5316. this.requestParam.parammaps['id'] = row.id
  5317. PostDataByName(this.requestParam).then(() => {
  5318. if (this.getdataListParm.parammaps.inputDatetime1 === null) {
  5319. this.getdataListParm.parammaps.inputDatetime1 = ''
  5320. }
  5321. this.get_table_data()
  5322. this.get_table_dataSH()
  5323. this.dialogFormVisible = false
  5324. this.$notify({
  5325. title: '成功',
  5326. message: '删除成功',
  5327. type: 'success',
  5328. duration: 2000
  5329. })
  5330. })
  5331. })
  5332. .catch(() => {
  5333. this.$message({ type: 'info', message: '已取消删除' })
  5334. })
  5335. },
  5336. getDownClassList() {
  5337. getRecuData(this.getRecuListParm).then((response) => {
  5338. this.parentClass = response.data
  5339. })
  5340. },
  5341. getEQNumber() {
  5342. this.getdataEQNumber.parammaps.pastureId = Cookies.get('pastureid')
  5343. GetDataByName(this.getdataEQNumber).then((response) => {
  5344. this.createTemp.assetCode = response.data.list[0].createNumber
  5345. console.log(response.data.list[0].createNumber)
  5346. console.log(this.createTemp.assetCode)
  5347. this.$forceUpdate()
  5348. })
  5349. },
  5350. handleTabClick(val) {
  5351. console.log('点击了基础信息/审核设备tab', val)
  5352. if (val.name == 'first') {
  5353. this.isFlowChart = false
  5354. this.isDisplayRecord = true
  5355. } else {
  5356. this.isFlowChart = true
  5357. this.isDisplayRecord = false
  5358. }
  5359. this.get_table_data()
  5360. this.get_table_dataSH()
  5361. },
  5362. handleExamine(row) {
  5363. if (row == undefined) {
  5364. this.examineTemp = this.seeTemp
  5365. this.$set(this.seeTemp, 'SHstatue', 1)
  5366. this.$set(this.seeTemp, 'workflowNote', '')
  5367. } else {
  5368. this.examineTemp = Object.assign({}, row)
  5369. this.$set(this.examineTemp, 'SHstatue', 1)
  5370. this.$set(this.examineTemp, 'workflowNote', '')
  5371. }
  5372. this.dialogStatus = 'examine'
  5373. this.dialogFormVisible_Examine = true
  5374. this.statueReason = false
  5375. this.keyupSubmit()
  5376. },
  5377. changeSHStatue(val) {
  5378. if (val == 2) {
  5379. this.statueReason = true
  5380. } else {
  5381. this.statueReason = false
  5382. }
  5383. },
  5384. keyupSubmit() {
  5385. document.onkeydown = (e) => {
  5386. const _key = window.event.keyCode
  5387. if (_key === 13) {
  5388. this.createExamineData()
  5389. }
  5390. }
  5391. },
  5392. createExamineData() {
  5393. if (this.dialogStatus !== 'update' && this.dialogStatus !== 'create') {
  5394. this.isokDisable = true
  5395. setTimeout(() => {
  5396. this.isokDisable = false
  5397. }, 1000)
  5398. this.$refs['examineTemp'].validate((valid) => {
  5399. if (valid) {
  5400. this.requestParam.name = 'eqCharge'
  5401. this.requestParam.parammaps = {}
  5402. this.requestParam.parammaps.id = this.examineTemp.id
  5403. if (this.examineTemp.SHstatue == 1) {
  5404. this.requestParam.parammaps.statue = 1
  5405. } else {
  5406. this.requestParam.parammaps.statue = 2
  5407. }
  5408. this.requestParam.parammaps.empId = Cookies.get('employeid')
  5409. this.requestParam.parammaps.workflowNote =
  5410. this.examineTemp.workflowNote
  5411. PostDataByName(this.requestParam).then((response) => {
  5412. console.log('审核确认发送参数', this.requestParam)
  5413. if (response.msg !== 'fail') {
  5414. this.dialogFormVisible_Examine = false
  5415. this.dialogFormVisible_See = false
  5416. this.statueReason = false
  5417. this.$notify({
  5418. title: '成功',
  5419. message: '审核成功',
  5420. type: 'success',
  5421. duration: 2000
  5422. })
  5423. this.get_table_dataSH()
  5424. this.get_table_data()
  5425. this.activeName == 'second'
  5426. } else {
  5427. failproccess(response, this.$notify)
  5428. }
  5429. })
  5430. }
  5431. })
  5432. }
  5433. },
  5434. handleDownload() {
  5435. this.$alert(
  5436. '设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
  5437. {}
  5438. )
  5439. this.isPercentage = true
  5440. this.percentage = 1
  5441. var timer = setInterval(() => {
  5442. this.percentage += 5
  5443. if (this.percentage > 95) {
  5444. this.percentage = 99
  5445. clearInterval(timer)
  5446. }
  5447. this.percentage = this.percentage
  5448. }, 1000)
  5449. this.downLoadParm.name = 'getAssetList'
  5450. this.downLoadParm.parammaps = this.getdataListParm.parammaps
  5451. GetAccount(this.downLoadParm).then((response) => {
  5452. this.downLoadList = response.data.list
  5453. if (response.data.list !== '') {
  5454. this.percentage = 99
  5455. setTimeout(() => {
  5456. this.isPercentage = false
  5457. }, 2000)
  5458. }
  5459. console.log(this.downLoadList)
  5460. const elecExcelDatas = [
  5461. {
  5462. tHeader: [
  5463. '牧场',
  5464. '设备类别',
  5465. '资产编号',
  5466. '设备名称',
  5467. '设备内部编号',
  5468. '设备规格',
  5469. '品牌',
  5470. '供应商',
  5471. '用途',
  5472. '状态',
  5473. '购置日期',
  5474. '入场日期',
  5475. '折旧年限',
  5476. '财务编号',
  5477. '原值',
  5478. '残值',
  5479. '月核减值',
  5480. '保养级别',
  5481. '保养费用',
  5482. '维修费用',
  5483. '基数(小时)',
  5484. '部门',
  5485. '责任人',
  5486. '录入人',
  5487. '录入时间',
  5488. '使用时长(年)',
  5489. '使用率(%)',
  5490. '指定维修人',
  5491. '一级督办',
  5492. '一级间隔时间',
  5493. '二级督办',
  5494. '二级间隔时间',
  5495. '三级督办',
  5496. '三级间隔时间',
  5497. '物联网编码',
  5498. '标准工作时长',
  5499. '工作类别'
  5500. ],
  5501. filterVal: [
  5502. 'pastureName',
  5503. 'eqClassName',
  5504. 'assetCode',
  5505. 'eqName',
  5506. 'eqCode',
  5507. 'specification',
  5508. 'brandName',
  5509. 'providerName',
  5510. 'purpose',
  5511. 'status',
  5512. 'purchaseDate',
  5513. 'entranceDate',
  5514. 'depreciation',
  5515. 'financeCode',
  5516. 'yuanzhi',
  5517. 'salvage',
  5518. 'subtractvalue',
  5519. 'upkeepgrade',
  5520. 'yearUpkeepCost',
  5521. 'yearMaintainCost',
  5522. 'baseHours',
  5523. 'deptName',
  5524. 'employeName',
  5525. 'inputUserName',
  5526. 'inputDatetime',
  5527. 'serviceDuration',
  5528. 'utilizationRate',
  5529. 'maintenanceName',
  5530. 'leveloneName',
  5531. 'leveloneTime',
  5532. 'leveltwoName',
  5533. 'leveltwoTime',
  5534. 'levelthreeName',
  5535. 'levelthreeTime',
  5536. 'license',
  5537. 'duration',
  5538. 'work'
  5539. ],
  5540. tableDatas: this.downLoadList,
  5541. sheetName: '设备基础信息'
  5542. }
  5543. ]
  5544. json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
  5545. })
  5546. },
  5547. handleDownloadSH() {
  5548. this.$alert(
  5549. '设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
  5550. {}
  5551. )
  5552. this.isPercentage = true
  5553. this.percentage = 1
  5554. var timer = setInterval(() => {
  5555. this.percentage += 5
  5556. if (this.percentage > 95) {
  5557. this.percentage = 99
  5558. clearInterval(timer)
  5559. }
  5560. this.percentage = this.percentage
  5561. }, 1000)
  5562. this.downLoadParm.name = 'getAssetListSH'
  5563. this.downLoadParm.parammaps = this.getdataListParmSH.parammaps
  5564. GetAccount(this.downLoadParm).then((response) => {
  5565. this.downLoadList = response.data.list
  5566. if (response.data.list !== '') {
  5567. this.percentage = 99
  5568. setTimeout(() => {
  5569. this.isPercentage = false
  5570. }, 2000)
  5571. }
  5572. console.log(this.downLoadList)
  5573. const elecExcelDatas = [
  5574. {
  5575. tHeader: [
  5576. '设备类别',
  5577. '资产编号',
  5578. '设备名称',
  5579. '设备内部编号',
  5580. '设备规格',
  5581. '品牌',
  5582. '供应商',
  5583. '用途',
  5584. '状态',
  5585. '购置日期',
  5586. '入场日期',
  5587. '折旧年限',
  5588. '财务编号',
  5589. '原值',
  5590. '残值',
  5591. '月核减值',
  5592. '保养级别',
  5593. '保养费用',
  5594. '维修费用',
  5595. '基数(小时)',
  5596. '牧场',
  5597. '部门',
  5598. '责任人',
  5599. '录入人',
  5600. '录入时间'
  5601. ],
  5602. filterVal: [
  5603. 'eqClassName',
  5604. 'assetCode',
  5605. 'eqName',
  5606. 'eqCode',
  5607. 'specification',
  5608. 'brandName',
  5609. 'providerName',
  5610. 'purpose',
  5611. 'status',
  5612. 'purchaseDate',
  5613. 'entranceDate',
  5614. 'depreciation',
  5615. 'financeCode',
  5616. 'yuanzhi',
  5617. 'salvage',
  5618. 'subtractvalue',
  5619. 'upkeepgrade',
  5620. 'yearUpkeepCost',
  5621. 'yearMaintainCost',
  5622. 'baseHours',
  5623. 'pastureName',
  5624. 'deptName',
  5625. 'employeName',
  5626. 'inputUserName',
  5627. 'inputDatetime'
  5628. ],
  5629. tableDatas: this.downLoadList,
  5630. sheetName: '设备基础信息'
  5631. }
  5632. ]
  5633. json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
  5634. })
  5635. },
  5636. handleSelectionChange(item) {
  5637. this.selectionList = item
  5638. },
  5639. handleBatchChange() {
  5640. if (this.selectionList.length > 0) {
  5641. for (let i = 0; i < this.selectionList.length; i++) {
  5642. if (
  5643. this.selectionList[i].pastureId !== this.selectionList[0].pastureId
  5644. ) {
  5645. this.$message({
  5646. type: 'error',
  5647. message: '请检测变更牧场是否一致!',
  5648. duration: 2000
  5649. })
  5650. return false
  5651. }
  5652. }
  5653. console.log('批量变更')
  5654. this.batchChange.temp.departmentId = ''
  5655. this.batchChange.temp.employeeId = ''
  5656. this.batchChange.deptList = []
  5657. this.batchChange.personList = []
  5658. this.dialogFormVisible_change = true
  5659. this.dialogStatus = 'change'
  5660. this.batchChange.getdataListParmDept.parammaps.pastureId =
  5661. this.selectionList[0].pastureId
  5662. this.getBatchChangeDeptDownList()
  5663. } else {
  5664. this.$message({
  5665. type: 'error',
  5666. message: '请选择变更牧场',
  5667. duration: 2000
  5668. })
  5669. }
  5670. },
  5671. getBatchChangeDeptDownList() {
  5672. GetDataByName(this.batchChange.getdataListParmDept).then((response) => {
  5673. if (response.data.list !== null) {
  5674. this.batchChange.deptList = response.data.list
  5675. } else {
  5676. this.batchChange.deptList = []
  5677. }
  5678. })
  5679. },
  5680. changeBatchDept(item) {
  5681. console.log(item)
  5682. this.batchChange.getdataListParmPerson.parammaps.deptId = item
  5683. this.batchChange.temp.employeeId = ''
  5684. this.batchChange.getdataListParmPerson.parammaps.pastureId =
  5685. this.batchChange.deptList.find((obj) => obj.deptid == item).pastureId
  5686. this.getBatchChangePersonDownList()
  5687. },
  5688. getBatchChangePersonDownList() {
  5689. GetDataByName(this.batchChange.getdataListParmPerson).then((response) => {
  5690. if (response.data.list !== null) {
  5691. this.batchChange.personList = response.data.list
  5692. } else {
  5693. this.batchChange.personList = []
  5694. }
  5695. })
  5696. },
  5697. changeBatchPerson(item) {
  5698. console.log(item)
  5699. this.batchChange.temp.employeeId = item
  5700. this.batchChange.temp.employeName = this.batchChange.personList.find(
  5701. (obj) => obj.id == item
  5702. ).empname
  5703. this.$forceUpdate()
  5704. },
  5705. changeData() {
  5706. this.isokDisable = true
  5707. setTimeout(() => {
  5708. this.isokDisable = false
  5709. }, 1000)
  5710. this.$refs['batchChangeTemp'].validate((valid) => {
  5711. if (valid) {
  5712. this.requestParam = {}
  5713. var array = []
  5714. for (let i = 0; i < this.selectionList.length; i++) {
  5715. var obj = {}
  5716. var parammaps = {}
  5717. obj.name = 'updateEquipmentALL'
  5718. obj.offset = 0
  5719. obj.pagecount = 0
  5720. parammaps.departmentId = this.batchChange.temp.departmentId
  5721. parammaps.employeeId = this.batchChange.temp.employeeId
  5722. parammaps.employeName = this.batchChange.temp.employeName
  5723. parammaps.id = this.selectionList[i].id
  5724. obj.parammaps = parammaps
  5725. array.push(obj)
  5726. }
  5727. this.requestParam.array = array
  5728. PostDataByNames(this.requestParam).then((response) => {
  5729. if (response.msg !== 'fail') {
  5730. this.dialogFormVisible_change = false
  5731. this.$notify({
  5732. title: '成功',
  5733. message: '保存成功',
  5734. type: 'success',
  5735. duration: 2000
  5736. })
  5737. this.get_table_data()
  5738. } else {
  5739. failproccess(response, this.$notify)
  5740. }
  5741. })
  5742. }
  5743. })
  5744. }
  5745. }
  5746. }
  5747. </script>
  5748. <style lang="scss" scoped>
  5749. .el-autocomplete-suggestion li {
  5750. padding: 0 3px !important;
  5751. }
  5752. .el-table .warning-row {
  5753. background: oldlace;
  5754. }
  5755. .el-table .success-row {
  5756. background: #f0f9eb;
  5757. }
  5758. </style>
  5759. <style lang="scss">
  5760. .upkeepgrade .el-form-item__label {
  5761. line-height: 20px;
  5762. }
  5763. .inputDatetime .el-range-separator {
  5764. padding: 0;
  5765. margin: 0 10px;
  5766. }
  5767. .el-radio__label {
  5768. padding-left: 2px !important;
  5769. }
  5770. </style>
  5771. <style>
  5772. .el-table .goBeyond {
  5773. background: #f47c7c;
  5774. }
  5775. .el-table .warning {
  5776. background: #989df0;
  5777. }
  5778. .el-table .scrap {
  5779. background: #d7d7d7;
  5780. }
  5781. </style>