1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827 |
- <template>
- <div class="app-container">
- <div
- v-if="isPercentage"
- class="percentage"
- style="
- width: 210px;
- height: 90px;
- background: #fff;
- position: fixed;
- bottom: 0;
- left: 0;
- z-index: 9999999999999;
- "
- >
- <h4 style="padding-left: 10px; line-height: 0">导出进度:</h4>
- <el-progress
- style="padding-left: 10px"
- :text-inside="true"
- :stroke-width="26"
- :percentage="percentage"
- />
- </div>
- <el-tabs v-model="tabName" @tab-click="handleTabClick">
- <el-tab-pane v-if="isBasic" label="设备基础信息" name="first">
- <div class="filter-container">
- <el-select
- v-model="getdataListParm.parammaps.pastureName"
- placeholder="牧场"
- class="filter-item"
- style="width: 120px"
- @change="changePastureName"
- >
- <el-option
- v-for="item in findAllPasture"
- :key="item.id"
- :label="item.name"
- :value="item.name"
- />
- </el-select>
- <tree-select
- v-model="getdataListParm.parammaps.eqClassId"
- :height="300"
- :width="250"
- class="typeSelect"
- size="small"
- :data="parentClass"
- :default-props="defaultProps"
- :node-key="nodeKey"
- clearable
- :disabled="disabled"
- placeholder="请选择设备类别"
- :checked-keys="defaultCheckedKeys"
- style="display: inline-block"
- @popoverHide="popoverHide"
- />
- <el-input
- v-model="getdataListParm.parammaps.eqName"
- placeholder="设备名称"
- clearable
- style="width: 120px"
- class="filter-item"
- />
- <el-input
- v-model="getdataListParm.parammaps.eqCode"
- placeholder="设备内部编号"
- clearable
- style="width: 150px"
- class="filter-item"
- />
- <el-input
- v-model="getdataListParm.parammaps.financeCode"
- placeholder="财务编号"
- clearable
- style="width: 120px"
- class="filter-item"
- />
- <el-select
- v-model="getdataListParm.parammaps.departmentId"
- clearable
- placeholder="部门"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in findAllDepart"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- <el-select
- v-model="getdataListParm.parammaps.status"
- clearable
- placeholder="状态"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in getDictByName"
- :key="item.id"
- :label="item.label"
- :value="item.id"
- />
- </el-select>
- <el-select
- v-model="getdataListParm.parammaps.warning"
- clearable
- placeholder="折旧预警"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in depreciationAlertList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- <!-- <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="审批日期" /> -->
- <el-date-picker
- ref="inputDatetime2"
- v-model="getdataListParm.parammaps.inputDatetime2"
- class="inputDatetime"
- type="daterange"
- style="width: 250px; top: -3px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="购置日期"
- end-placeholder="购置日期"
- />
- <!-- <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="报废日期" /> -->
- <el-input
- v-model="getdataListParm.parammaps.assetCode"
- placeholder="资产编号"
- clearable
- style="width: 120px"
- class="filter-item"
- />
- <el-input
- v-model="getdataListParm.parammaps.brand"
- placeholder="品牌"
- clearable
- style="width: 120px"
- class="filter-item"
- />
- <!-- <el-input v-model="getdataListParm.parammaps.proName" placeholder="供应商" clearable style="width: 120px;" class="filter-item" /> -->
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_search"
- >搜索</el-button>
- <div>
- <el-button
- v-if="isBasicsAdd"
- class="filter-item"
- type="primary"
- icon="el-icon-edit"
- @click="form_add"
- >新增</el-button>
- <el-upload
- style="display: inline-block"
- :headers="headers"
- :data="uploadData"
- :action="uploadExcelUrl"
- :show-file-list="false"
- :before-upload="beforeImportExcel"
- :on-success="handleImportExcelSuccess"
- >
- <el-button
- v-waves
- class="filter-item"
- type="warning"
- icon="el-icon-upload2"
- >导入</el-button>
- </el-upload>
- <el-button
- class="filter-item"
- type="success"
- icon="el-icon-download"
- style=""
- @click="handleDownload"
- >导出</el-button>
- <el-button
- class="filter-item"
- type="primary"
- icon="el-icon-edit"
- @click="handleBatchChange"
- >批量变更</el-button>
- </div>
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="list"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- :max-height="myHeight"
- @selection-change="handleSelectionChange"
- @sort-change="tableSort2"
- >
- <el-table-column type="selection" width="55" />
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{ scope.$index + (pageNum - 1) * pageSize + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column label="牧场" align="center" prop="pastureName" />
- <el-table-column
- label="设备类别"
- align="center"
- prop="eqClassName"
- />
- <el-table-column align="center" prop="eqName" width="120">
- <template slot="header" slot-scope="scope">
- <div>
- 设备名称
- <!-- <el-popover placement="top" width="200" trigger="click">
- <p>多行信息多行信息多行信息<br/>第二行信息</p>
- <i class="el-icon-question" slot="reference"></i>
- </el-popover> -->
- <!-- <el-tooltip placement="top" trigger="click">
- <div slot="content">多行信息多行信息多行信息<br/>第二 行信息</div>
- <i class="el-icon-question"></i>
- </el-tooltip> -->
- </div>
- </template>
- <template slot-scope="{ row }">
- <div v-if="row.exceed == 1">
- <div
- style="
- background: #ec808d;
- display: block;
- line-height: 50px;
- "
- >
- {{ row.eqName }}
- </div>
- </div>
- <div v-else>
- <div style="display: block; line-height: 50px">
- {{ row.eqName }}
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- label="设备内部编号"
- align="center"
- prop="eqCode"
- />
- <el-table-column
- label="财务编号"
- align="center"
- prop="financeCode"
- />
- <el-table-column label="规格" align="center" prop="specification" />
- <el-table-column label="品牌" align="center" prop="brandName" />
- <el-table-column label="状态" align="center" prop="status">
- <template slot-scope="{ row }">
- <div v-if="row.status == '正常'">
- <div
- v-if="row.warning == 1"
- style="
- background: #ec808d;
- display: block;
- line-height: 50px;
- "
- >
- {{ row.status }}
- </div>
- <div
- v-else-if="row.warning == 2"
- style="
- background: #facd91;
- display: block;
- line-height: 50px;
- "
- >
- {{ row.status }}
- </div>
- <div v-else>{{ row.status }}</div>
- </div>
- <div v-else>
- <div
- style="
- background: #d7d7d7;
- display: block;
- line-height: 50px;
- "
- >
- {{ row.status }}
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="用途" align="center" prop="purpose" />
- <el-table-column label="部门" align="center" prop="deptName" />
- <el-table-column label="责任人" align="center" prop="employeName" />
- <el-table-column
- label="审批日期"
- sortable
- align="center"
- prop="spDate"
- />
- <el-table-column
- label="购置日期"
- sortable
- align="center"
- prop="purchaseDate"
- />
- <el-table-column
- label="入场日期"
- sortable
- align="center"
- prop="entranceDate"
- />
- <el-table-column
- label="报废日期"
- sortable
- align="center"
- prop="bfDate"
- />
- <el-table-column
- label="设备图片"
- prop="picpath"
- align="center"
- min-width="110px"
- >
- <template slot-scope="scope">
- <el-popover placement="right" title="" trigger="hover">
- <img
- v-if="scope.row.picpath !== '' && scope.row.srcpath !== ''"
- :src="scope.row.picpath"
- >
- <img
- v-if="scope.row.picpath !== '' && scope.row.srcpath !== ''"
- slot="reference"
- :src="scope.row.picpath"
- :alt="scope.row.srcpath"
- style="height: 100px; width: 100px"
- >
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- label="折旧年限"
- sortable
- align="center"
- prop="depreciation"
- />
- <el-table-column
- label="使用时长(年)"
- sortable
- align="center"
- prop="serviceDuration"
- />
- <el-table-column
- label="使用率(%)"
- sortable
- align="center"
- prop="utilizationRate"
- />
- <el-table-column
- label="物联网编码"
- sortable
- align="center"
- prop="license"
- />
- <el-table-column
- label="标准工作时长"
- sortable
- align="center"
- prop="duration"
- />
- <el-table-column
- label="工作类别"
- sortable
- align="center"
- prop="work"
- />
- <el-table-column
- label="操作"
- align="center"
- width="300"
- class-name="small-padding fixed-width"
- fixed="right"
- >
- <template slot-scope="{ row }">
- <el-button
- v-if="isBasicsCard"
- type="primary"
- size="mini"
- @click="form_see(row)"
- >查看</el-button>
- <el-button
- v-if="roleSet1(row)"
- type="success"
- size="mini"
- @click="form_edit(row)"
- >编辑</el-button>
- <el-button
- v-if="roleSet2(row)"
- style="display: inline-block"
- type="danger"
- size="mini"
- @click="form_delete(row)"
- >删除</el-button>
- <!-- <el-button v-if="isBasicsDel2" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button> -->
- <el-button
- v-else
- style="display: none"
- type="danger"
- size="mini"
- @click="form_delete(row)"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="total"
- :page.sync="getdataListParm.offset"
- :limit.sync="getdataListParm.pagecount"
- @pagination="get_table_data"
- />
- </div>
- </el-tab-pane>
- <el-tab-pane v-if="isBasicSH" label="审核设备" name="second">
- <div class="filter-container">
- <el-select
- v-model="getdataListParmSH.parammaps.pastureName"
- placeholder="牧场"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in findAllPasture"
- :key="item.id"
- :label="item.name"
- :value="item.name"
- />
- </el-select>
- <el-input
- v-model="getdataListParmSH.parammaps.assetCode"
- placeholder="资产编号"
- clearable
- style="width: 180px"
- class="filter-item"
- />
- <el-input
- v-model="getdataListParmSH.parammaps.eqName"
- placeholder="设备名称"
- clearable
- style="width: 120px"
- class="filter-item"
- />
- <el-input
- v-model="getdataListParmSH.parammaps.eqCode"
- placeholder="设备内部编号"
- clearable
- style="width: 150px"
- class="filter-item"
- />
- <el-input
- v-model="getdataListParmSH.parammaps.financeCode"
- placeholder="财务编码"
- clearable
- style="width: 120px"
- class="filter-item"
- />
- <el-select
- v-model="getdataListParmSH.parammaps.departmentId"
- clearable
- placeholder="部门"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in findAllDepart"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- <el-select
- v-model="getdataListParmSH.parammaps.status"
- clearable
- placeholder="状态"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in getDictByName"
- :key="item.id"
- :label="item.label"
- :value="item.id"
- />
- </el-select>
- <el-select
- v-model="getdataListParmSH.parammaps.SHStatus"
- clearable
- placeholder="审核状态"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in statues"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- <el-date-picker
- ref="inputDatetime1"
- v-model="getdataListParmSH.parammaps.inputDatetime1"
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; top: -3px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchSH"
- >搜索</el-button>
- <div>
- <el-button
- class="filter-item"
- type="success"
- icon="el-icon-download"
- style=""
- @click="handleDownloadSH"
- >导出</el-button>
- </div>
- <el-table
- :key="tableKey"
- v-loading="listLoadingSH"
- element-loading-text="给我一点时间"
- :data="listSH"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- :max-height="myHeight"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index + (pageNumSH - 1) * pageSizeSH + 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column label="牧场" align="center" prop="pastureName" />
- <el-table-column label="资产编号" align="center" prop="assetCode" />
- <el-table-column label="设备名称" align="center" prop="eqName" />
- <el-table-column
- label="设备内部编号"
- align="center"
- prop="eqCode"
- />
- <el-table-column
- label="财务编号"
- align="center"
- prop="financeCode"
- />
- <el-table-column label="规格" align="center" prop="specification" />
- <el-table-column label="品牌" align="center" prop="brandName" />
- <el-table-column label="状态" align="center" prop="status" />
- <el-table-column label="部门" align="center" prop="deptName" />
- <el-table-column label="责任人" align="center" prop="employeName" />
- <el-table-column
- label="录入日期"
- sortable
- align="center"
- prop="lrTime"
- />
- <el-table-column
- label="审核状态"
- min-width="110px"
- align="center"
- :formatter="SHStatus"
- />
- <el-table-column
- label="设备图片"
- prop="specifications"
- align="center"
- min-width="110px"
- >
- <template slot-scope="scope">
- <el-popover placement="right" title="" trigger="hover">
- <img
- v-if="scope.row.picpath !== ''"
- :src="scope.row.picpath"
- >
- <img
- v-if="scope.row.picpath !== ''"
- slot="reference"
- :src="scope.row.picpath"
- :alt="scope.row.srcpath"
- style="height: 100px; width: 100px"
- >
- </el-popover>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- align="center"
- width="300"
- class-name="small-padding fixed-width"
- fixed="right"
- >
- <template slot-scope="{ row }">
- <el-button
- v-if="isBasicsCard"
- type="primary"
- size="mini"
- @click="form_see(row)"
- >查看</el-button>
- <el-button
- v-if="isBasicsUpdate && row.SHStatus == 2"
- style="display: inline-block"
- type="success"
- size="mini"
- @click="form_edit(row)"
- >编辑</el-button>
- <el-button
- v-else
- style="display: none"
- type="success"
- size="mini"
- @click="form_edit(row)"
- >编辑</el-button>
- <el-button
- v-if="isBasicExamine && row.SHStatus == 0"
- style="display: inline-block"
- type="success"
- size="mini"
- @click="handleExamine(row)"
- >审核</el-button>
- <el-button
- v-else
- style="display: none"
- type="success"
- size="mini"
- @click="handleExamine(row)"
- >审核</el-button>
- <el-button
- v-if="isBasicsDel && row.SHStatus == 2"
- style="display: inline-block"
- type="danger"
- size="mini"
- @click="form_delete(row)"
- >删除</el-button>
- <el-button
- v-else
- style="display: none"
- type="danger"
- size="mini"
- @click="form_delete(row)"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="totalSH >= 0"
- :total="totalSH"
- :page.sync="getdataListParmSH.offset"
- :limit.sync="getdataListParmSH.pagecount"
- @pagination="get_table_dataSH"
- />
- </div>
- </el-tab-pane>
- </el-tabs>
- <!-- 新增 -->
- <el-dialog
- v-show="dialogFormVisible"
- :title="textMap[dialogStatus]"
- :visible.sync="dialogFormVisible"
- :close-on-click-modal="false"
- width="90%"
- >
- <div class="app-add">
- <el-form
- ref="createTemp"
- :rules="rulesCreate"
- :model="createTemp"
- label-position="right"
- label-width="115px"
- style="width: 90%; margin: 0 auto 30px"
- >
- <el-row>
- <el-col :span="10">
- <el-form-item label="设备类别:" prop="eqClassId">
- <tree-select
- v-model="createTemp.eqClassId"
- :height="300"
- :width="300"
- size="small"
- :data="parentClass"
- :default-props="defaultProps"
- :node-key="nodeKey"
- :disabled="disabled"
- :placeholder="placeholder"
- :checked-keys="defaultCheckedKeys"
- @popoverHide="popoverHide"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="资产编号:" prop="assetCode">
- <el-input
- ref="assetCode"
- v-model="createTemp.assetCode"
- placeholder="请输入编号"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="设备名称:" prop="eqName">
- <el-input
- ref="eqName"
- v-model="createTemp.eqName"
- placeholder="请输入设备名称"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item v-if="isShow" label="设备内部编号:" prop="eqCode">
- <el-input
- ref="eqCode"
- v-model="createTemp.eqCode"
- disabled
- />
- </el-form-item>
- <el-form-item v-else label="设备内部编号:" prop="eqCode">
- <el-input
- ref="eqCode"
- v-model="createTemp.eqCode"
- placeholder="请输入设备内部编号"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="财务编号:" prop="financeCode">
- <el-input
- ref="financeCode"
- v-model="createTemp.financeCode"
- placeholder="请输入财务编号"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="设备规格:" prop="specification">
- <el-input
- ref="specification"
- v-model="createTemp.specification"
- placeholder="请输入设备规格"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="品牌:" prop="brandName">
- <el-autocomplete
- v-model="createTemp.brandName"
- value-key="brandName"
- class="inline-input"
- :fetch-suggestions="brandSearch"
- placeholder="请输入品牌"
- style="width: 100%"
- @select="
- (value) => {
- handleSelectBrand(value)
- }
- "
- />
- </el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="供应商:" prop="providerId">
- <el-select v-model="createTemp.providerId" filterable placeholder="请选择供应商" style="width:100%">
- <el-option v-for="item in findAllProvider" :key="item.id" clearable :label="item.name" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col> -->
- <el-col :span="6">
- <el-form-item label="用途:" prop="purpose">
- <el-input
- ref="purpose"
- v-model="createTemp.purpose"
- placeholder="请输入用途"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="状态:" prop="status">
- <el-select
- v-model="createTemp.status"
- placeholder="状态"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in getDictByName"
- :key="item.id"
- :label="item.label"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="购置日期:" prop="purchaseDate">
- <el-date-picker
- v-model="createTemp.purchaseDate"
- type="date"
- placeholder="选择日期"
- style="width: 100%"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="入场日期:" prop="entranceDate">
- <el-date-picker
- v-model="createTemp.entranceDate"
- type="date"
- placeholder="选择日期"
- style="width: 100%"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="折旧年限:" prop="depreciation">
- <el-input
- ref="depreciation"
- v-model="createTemp.depreciation"
- placeholder="请输入折旧年限"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="原值:" prop="yuanzhi">
- <el-input
- ref="yuanzhi"
- v-model="createTemp.yuanzhi"
- placeholder="请输入原值"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="残值:" prop="salvage">
- <el-input
- ref="salvage"
- v-model="createTemp.salvage"
- placeholder="请输入残值"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="月核减值:" prop="subtractvalue">
- <el-input
- ref="subtractvalue"
- v-model="createTemp.subtractvalue"
- placeholder="请输入月核减值"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="保养级别:" prop="upkeepgrade">
- <el-select
- ref="upkeepgrade"
- v-model="createTemp.upkeepgrade"
- placeholder="保养级别"
- style="width: 100%"
- class="filter-item"
- @visible-change="upkeepgradeChange"
- @change="changeUpkeepgrade"
- >
- <el-option
- v-for="item in upkeepgrades"
- :key="item.id"
- :label="item.label"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="保养费用:" prop="yearUpkeepCost">
- <el-input
- ref="yearUpkeepCost"
- v-model="createTemp.yearUpkeepCost"
- placeholder="请输入近一年保养费用"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="维修费用:" prop="yearMaintainCost">
- <el-input
- ref="yearMaintainCost"
- v-model="createTemp.yearMaintainCost"
- placeholder="请输入近一年维修费用"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="基数(小时):" prop="baseHours">
- <el-input
- ref="baseHours"
- v-model="createTemp.baseHours"
- placeholder="请输入基数"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="牧场:" prop="pastureId">
- <el-select
- v-model="createTemp.pastureId"
- placeholder="牧场"
- class="filter-item"
- @change="changePasture"
- >
- <el-option
- v-for="item in findAllPasture"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="部门:" prop="deptId">
- <el-select
- v-model="createTemp.deptId"
- :disabled="disabled"
- placeholder="部门"
- class="filter-item"
- style="width: 100%"
- @change="changeDepart"
- >
- <el-option
- v-for="item in createDepartList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="责任人:" prop="employeName">
- <el-autocomplete
- v-model="createTemp.employeName"
- value-key="empname"
- class="inline-input"
- :fetch-suggestions="employeSearch"
- placeholder="请输入责任人"
- style="width: 100%"
- @select="handleSelectEmploye"
- >
- <template slot-scope="{ item }">
- <div class="name" style="display: inline">
- {{ item.name }}
- </div>
- </template>
- </el-autocomplete>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="录入人:" prop="inputUser">
- <el-select
- v-model="createTemp.inputUser"
- placeholder="录入人"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in findAllEmploye"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="录入时间:" prop="inputDatetime">
- <el-date-picker
- v-model="createTemp.inputDatetime"
- :picker-options="pickerOptions1"
- type="date"
- placeholder="录入时间"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="指定维修人:" prop="maintenance">
- <el-select
- v-model="createTemp.maintenance"
- multiple
- filterable
- placeholder="指定维修人"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in findAllEmploye"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="间隔时间:" prop="pushTime">
- <el-select v-model="createTemp.pushTime" placeholder="间隔时间" class="filter-item">
- <el-option v-for="item in pushNameList" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col> -->
- <el-col :span="6">
- <el-form-item label="一级督办:" prop="levelone">
- <el-select
- v-model="createTemp.levelone"
- filterable
- placeholder="设备主管"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in findAllEmploye"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="一级间隔时间(小时)" prop="leveloneTime">
- <el-select
- v-model="createTemp.leveloneTime"
- placeholder="间隔时间"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in pushNameList2"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="二级督办:" prop="leveltwo">
- <el-select
- v-model="createTemp.leveltwo"
- filterable
- placeholder="设备助理"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in findAllEmploye"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="二级间隔时间(小时)" prop="leveltwoTime">
- <el-select
- v-model="createTemp.leveltwoTime"
- placeholder="间隔时间"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in pushNameList2"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="三级督办:" prop="levelthree">
- <el-select
- v-model="createTemp.levelthree"
- filterable
- placeholder="场长"
- class="filter-item"
- style="width: 100%"
- >
- <el-option
- v-for="item in findAllEmploye"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="三级间隔时间(小时)" prop="levelthreeTime">
- <el-select
- v-model="createTemp.levelthreeTime"
- placeholder="间隔时间"
- style="width: 100%"
- >
- <el-option
- v-for="item in pushNameList2"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="物联网编码" prop="license">
- <el-input
- ref="license"
- v-model="createTemp.license"
- placeholder="物联网编码"
- :disabled="dialogStatus == 'update' && isEditWork"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="标准工作时长" prop="duration">
- <el-input
- ref="duration"
- v-model="createTemp.duration"
- placeholder="标准工作时长"
- :disabled="dialogStatus == 'update' && isEditWork"
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="工作类别" prop="work">
- <!-- <el-input
- ref="duration"
- v-model="createTemp.work"
- placeholder="工作类别"
- :disabled="dialogStatus == 'update' && isEditWork"
- /> -->
- <el-select
- v-model="createTemp.work"
- clearable
- placeholder="工作类别"
- class="filter-item"
- style="width: 120px"
- :disabled="dialogStatus == 'update' && isEditWork"
- >
- <!-- TODO: -->
- <el-option
- v-for="(item,index) in workList"
- :key="index"
- :label="item"
- :value="item"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="设备图片:">
- <el-upload
- id="uploadPic"
- ref="upload"
- :limit="1"
- list-type="picture-card"
- :file-list="createTemp.fileList"
- :headers="headers"
- :action="uploadImageUrl"
- :auto-upload="true"
- :on-preview="handlePicPreview"
- :before-remove="beforeRemove"
- :class="{ hide: showUpload }"
- :on-change="
- (file, fileList) => {
- return handlePicChange(file, fileList)
- }
- "
- :on-success="
- (response, file, fileList) => {
- return handlePicSuccess(response, file, fileList)
- }
- "
- :on-remove="
- (file, fileList) => {
- return handlePicRemove(file, fileList)
- }
- "
- >
- <i class="el-icon-plus" />
- </el-upload>
- <el-dialog
- :visible.sync="dialogVisible"
- append-to-body
- :width="width"
- >
- <img :src="dialogImageUrl" alt="" @load="onLoad">
- </el-dialog>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div
- slot="footer"
- class="dialog-footer"
- style="right: 30px; position: absolute; bottom: 5px"
- >
- <el-button
- v-if="dialogStatus === 'create'"
- ref="createb"
- type="success"
- :disabled="isokDisable"
- @click="add_dialog_save_again()"
- >保存并新增</el-button>
- <el-button
- type="primary"
- :disabled="isokDisable"
- @click="
- dialogStatus === 'create' ? add_dialog_save() : edit_dialog_save()
- "
- >保存并关闭</el-button>
- <el-button
- @click="
- dialogFormVisible = false
- getdataListParm.parammaps.inputDatetime = ''
- "
- >取消并关闭</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 查看 -->
- <el-dialog
- :title="textMap[dialogStatus]"
- :visible.sync="dialogFormVisible_See"
- :close-on-click-modal="false"
- width="90%"
- >
- <div class="app-contentcard">
- <div
- style="
- position: absolute;
- top: 20px;
- left: 150px;
- font: 18px/24px '';
- color: #303133;
- "
- >
- <span style="margin: 0 10px">设备名称:{{ seeTemp.eqName }}</span>
- <span>内部编号:{{ seeTemp.eqCode }}</span>
- </div>
- <div class="card">
- <el-tabs v-model="activeName" @tab-click="form_seeTabClick">
- <el-tab-pane label="基础信息" name="first">
- <el-form
- ref="seeTemp"
- :rules="rules"
- :model="seeTemp"
- label-position="right"
- label-width="115px"
- style="width: 100%; margin-bottom: 30px"
- >
- <el-row>
- <el-form-item label="设备类别:" prop="eqClassName">
- <el-input
- ref="eqClassName"
- v-model="seeTemp.eqClassName"
- placeholder="请输入设备类别"
- disabled
- />
- </el-form-item>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="资产编号:" prop="assetCode">
- <el-input
- ref="assetCode"
- v-model="seeTemp.assetCode"
- placeholder="请输入资产编号"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="设备名称:" prop="eqName">
- <el-input
- ref="eqName"
- v-model="seeTemp.eqName"
- placeholder="请输入设备名称"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="设备内部编号:" prop="eqCode">
- <el-input
- ref="eqCode"
- v-model="seeTemp.eqCode"
- placeholder="请输入设备内部编号"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="财务编号:" prop="financeCode">
- <el-input
- ref="financeCode"
- v-model="seeTemp.financeCode"
- placeholder="请输入财务编号"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="设备规格:" prop="specification">
- <el-input
- ref="specification"
- v-model="seeTemp.specification"
- placeholder="请输入设备规格"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="品牌:" prop="brandName">
- <el-input
- ref="brandName"
- v-model="seeTemp.brandName"
- placeholder="请输入品牌"
- disabled
- />
- </el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="供应商:" prop="providerName">
- <el-input ref="providerName" v-model="seeTemp.providerName" placeholder="请输入供应商" disabled />
- </el-form-item>
- </el-col> -->
- <el-col :span="6">
- <el-form-item label="用途:" prop="purpose">
- <el-input
- ref="purpose"
- v-model="seeTemp.purpose"
- placeholder="请输入用途"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="状态:" prop="status">
- <el-input
- ref="status"
- v-model="seeTemp.status"
- placeholder="请输入状态"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="购置日期:" prop="purchaseDate">
- <el-input
- ref="purchaseDate"
- v-model="seeTemp.purchaseDate"
- placeholder="请输入购置日期"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="入场日期:" prop="entranceDate">
- <el-input
- ref="entranceDate"
- v-model="seeTemp.entranceDate"
- placeholder="请输入入场日期"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="折旧年限:" prop="depreciation">
- <el-input
- ref="depreciation"
- v-model="seeTemp.depreciation"
- placeholder="请输入折旧年限"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="原值:" prop="yuanzhi">
- <el-input
- ref="yuanzhi"
- v-model="seeTemp.yuanzhi"
- placeholder="请输入原值"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="残值:" prop="salvage">
- <el-input
- ref="salvage"
- v-model="seeTemp.salvage"
- placeholder="请输入残值"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="月核减值:" prop="subtractvalue">
- <el-input
- ref="subtractvalue"
- v-model="seeTemp.subtractvalue"
- placeholder="请输入月核减值"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="保养级别:" prop="upkeepgrade">
- <el-input
- ref="upkeepgrade"
- v-model="seeTemp.upkeepgrade"
- placeholder="请输入保养级别"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="保养费用:" prop="yearUpkeepCost">
- <el-input
- ref="yearUpkeepCost"
- v-model="seeTemp.yearUpkeepCost"
- placeholder="请输入近一年保养费用"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="维修费用:" prop="yearMaintainCost">
- <el-input
- ref="yearMaintainCost"
- v-model="seeTemp.yearMaintainCost"
- placeholder="请输入近一年维修费用"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="基数(小时):" prop="baseHours">
- <el-input
- ref="baseHours"
- v-model="seeTemp.baseHours"
- placeholder="请输入基数"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="牧场:" prop="pastureName">
- <el-input
- ref="pastureName"
- v-model="seeTemp.pastureName"
- placeholder="请输入牧场"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="部门:" prop="deptName">
- <el-input
- ref="deptName"
- v-model="seeTemp.deptName"
- placeholder="请输入部门"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="责任人:" prop="employeName">
- <el-input
- ref="employeName"
- v-model="seeTemp.employeName"
- placeholder="请输入责任人"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="录入人:" prop="inputUserName">
- <el-input
- ref="inputUserName"
- v-model="seeTemp.inputUserName"
- placeholder="请输入录入人"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="录入时间:" prop="inputDatetime">
- <el-input
- ref="inputDatetime"
- v-model="seeTemp.inputDatetime"
- placeholder="请输入录入时间"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="指定维修人:" prop="maintenanceName">
- <el-input
- ref="maintenanceName"
- v-model="seeTemp.maintenanceName"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="一级督办:" prop="leveloneName">
- <el-input
- ref="leveloneName"
- v-model="seeTemp.leveloneName"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item
- label="一级间隔时间(小时):"
- prop="leveloneTime"
- >
- <el-input
- ref="leveloneTime"
- v-model="seeTemp.leveloneTime"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="二级督办:" prop="leveltwoName">
- <el-input
- ref="leveltwoName"
- v-model="seeTemp.leveltwoName"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item
- label="二级间隔时间(小时):"
- prop="leveltwoTime"
- >
- <el-input
- ref="leveltwoTime"
- v-model="seeTemp.leveltwoTime"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="三级督办:" prop="levelthreeName">
- <el-input
- ref="levelthreeName"
- v-model="seeTemp.levelthreeName"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item
- label="三级间隔时间(小时):"
- prop="levelthreeTime"
- >
- <el-input
- ref="levelthreeTime"
- v-model="seeTemp.levelthreeTime"
- placeholder=""
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="物联网编码" prop="license">
- <el-input
- ref="license"
- v-model="seeTemp.license"
- placeholder="物联网编码"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="标准工作时长" prop="duration">
- <el-input
- ref="duration"
- v-model="seeTemp.duration"
- placeholder="标准工作时长"
- disabled
- />
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="工作类别" prop="work">
- <el-input
- ref="duration"
- v-model="seeTemp.work"
- placeholder="工作类别"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-form-item label="设备图片:">
- <el-popover placement="right" title="" trigger="hover">
- <img
- v-if="
- seeTemp.picpath !== '' && seeTemp.srcpath !== ''
- "
- :src="seeTemp.picpath"
- >
- <img
- v-if="
- seeTemp.picpath !== '' && seeTemp.srcpath !== ''
- "
- slot="reference"
- :src="seeTemp.picpath"
- :alt="seeTemp.srcpath"
- style="height: 100px; width: 100px"
- >
- </el-popover>
- </el-form-item>
- </el-col>
- </el-row>
- <div v-if="isFlowChart">
- <el-row>
- <el-col>
- <el-form-item label="流程进度" />
- <el-steps
- :active="active"
- align-center
- finish-status="success"
- >
- <el-step
- v-for="(item, index) in activeList"
- :key="index"
- :title="item.title"
- :status="item.status"
- >
- <template slot="description">
- <div class="step-row">
- <div>
- {{ item.name }} {{ item.date }}
- </div>
- <div>{{ item.reason }}</div>
- </div>
- </template>
- </el-step>
- </el-steps>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-form-item label="操作:">
- <el-button
- v-if="isBasicExamine && seeTemp.SHStatus == 0"
- type="success"
- style="display: inline-block"
- @click="handleExamine()"
- >审核</el-button>
- <el-button
- v-else
- type="success"
- style="display: none"
- @click="handleExamine()"
- >审核</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-form>
- </el-tab-pane>
- <el-tab-pane v-if="isDisplayRecord" label="点检记录" name="second">
- <el-date-picker
- ref="inputDatetimeCheck1"
- v-model="
- getAssetBigSpotCheckListParm.parammaps.inputDatetimeSpotCheck1
- "
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; margin-bottom: 10px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchSportCheck"
- >搜索</el-button>
- <el-table
- :key="tableKey"
- v-loading="listLoadingSpotCheck1"
- element-loading-text="给我一点时间"
- :data="listSpotCheck1"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumSpotCheck1 - 1) * pageSizeSpotCheck1 +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="点检结果"
- sortable
- prop="inspectionResults"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="点检日期"
- sortable
- prop="date"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="点检人"
- sortable
- prop="empname"
- min-width="110px"
- align="center"
- />
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="totalSpotCheck1"
- :page.sync="getAssetBigSpotCheckListParm.offset"
- :limit.sync="getAssetBigSpotCheckListParm.pagecount"
- @pagination="getAssetBigSpotCheckList"
- />
- </el-tab-pane>
- <el-tab-pane v-if="isDisplayRecord" label="保养记录" name="third">
- <el-input
- v-model="getBigupkeepbyeqParm.parammaps.upkeepCode"
- placeholder="保养单号"
- style="width: 140px"
- class="filter-item"
- />
- <el-select
- v-model="getBigupkeepbyeqParm.parammaps.upkeepType"
- clearable
- placeholder="保养类型"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in maintainTypes"
- :key="item.id"
- :label="item.name"
- :value="item.name"
- />
- </el-select>
- <el-date-picker
- ref="inputDatetimeUpkeepbyeq"
- v-model="getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq"
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; margin-bottom: 10px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchUpkeepbyeq"
- >搜索</el-button>
- <el-table
- :key="tableKey"
- v-loading="listLoadingUpkeepbyeq"
- element-loading-text="给我一点时间"
- :data="listUpkeepbyeq"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- @sort-change="tableSort"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumUpkeepbyeq - 1) * pageSizeUpkeepbyeq +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="保养单号"
- prop="upkeepCode"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="保养日期"
- sortable
- prop="plantime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="保养名称"
- prop="upkeepName"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="保养类型"
- prop="upkeepType"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="保养级别"
- prop="upkeepLevel"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="保养人"
- prop="upkeepPerson"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="保养费用"
- prop="upkeepCost"
- min-width="110px"
- align="center"
- />
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="totalUpkeepbyeq"
- :page.sync="getBigupkeepbyeqParm.offset"
- :limit.sync="getBigupkeepbyeqParm.pagecount"
- @pagination="getBigupkeepbyeqList"
- />
- </el-tab-pane>
- <el-tab-pane v-if="isDisplayRecord" label="维修记录" name="fouth">
- <el-input
- v-model="getAssetMaintainParm.parammaps.repairCode"
- placeholder="维修单号"
- style="width: 140px"
- class="filter-item"
- />
- <el-date-picker
- ref="inputDatetimeAssetMaintain"
- v-model="
- getAssetMaintainParm.parammaps.inputDatetimeAssetMaintain
- "
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; margin-bottom: 10px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchAssetMaintain"
- >搜索</el-button>
- <el-table
- :key="tableKey"
- v-loading="listLoadingAssetMaintain"
- element-loading-text="给我一点时间"
- :data="listAssetMaintain"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- @sort-change="tableSort"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumAssetMaintain - 1) * pageSizeAssetMaintain +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="维修单号"
- prop="repairCode"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="报修人"
- prop="requestName"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="报修时间"
- sortable
- prop="requestTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="维修人"
- prop="empname"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="维修时间"
- sortable
- prop="stopTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="诊断故障"
- prop="details"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="维修费用"
- sortable
- prop="maintenanceCost"
- min-width="110px"
- align="center"
- />
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="totalAssetMaintain"
- :page.sync="getAssetMaintainParm.offset"
- :limit.sync="getAssetMaintainParm.pagecount"
- @pagination="getAssetMaintainList"
- />
- </el-tab-pane>
- <el-tab-pane v-if="isDisplayRecord" label="启停记录" name="fifth">
- <div class="filter-container">
- <el-date-picker
- v-model="getAssetSTTParm.parammaps.startTime"
- type="date"
- placeholder="开启日期"
- style="width: 170px; top: -3px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- />
- <el-date-picker
- v-model="getAssetSTTParm.parammaps.stopTime"
- type="date"
- placeholder="关闭日期"
- style="width: 170px; top: -3px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchAssetSTT"
- >搜索</el-button>
- </div>
- <el-table
- :key="tableKey"
- v-loading="listLoadingAssetSTT"
- element-loading-text="给我一点时间"
- :data="listAssetSTT"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumAssetSTT - 1) * pageSizeAssetSTT +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="开启时间"
- sortable
- prop="enabledTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="关闭时间"
- sortable
- prop="blockTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="运行时间(分钟)"
- sortable
- prop="runTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="关闭人"
- prop="blockName"
- min-width="110px"
- align="center"
- />
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="totalAssetSTT"
- :page.sync="getAssetSTTParm.offset"
- :limit.sync="getAssetSTTParm.pagecount"
- @pagination="getAssetSTTList"
- />
- </el-tab-pane>
- <el-tab-pane v-if="isDisplayRecord" label="变更记录" name="sixth">
- <div class="filter-container">
- <el-select
- v-model="getAssetChangeParm.parammaps.changeStatue"
- clearable
- placeholder="变更状态"
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in changeStates"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- <el-date-picker
- ref="inputDatetimeAssetChange"
- v-model="
- getAssetChangeParm.parammaps.inputDatetimeAssetChange
- "
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; margin-bottom: 10px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchAssetChange"
- >搜索</el-button>
- </div>
- <el-table
- :key="tableKey"
- v-loading="listLoadingAssetChange"
- element-loading-text="给我一点时间"
- :data="listAssetChange"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumAssetChange - 1) * pageSizeAssetChange +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="变更时间"
- sortable
- prop="changeTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="变更状态"
- :formatter="changeStatue"
- prop="blockTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="变更人"
- prop="changeName"
- min-width="110px"
- align="center"
- />
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="totalAssetChange"
- :page.sync="getAssetChangeParm.offset"
- :limit.sync="getAssetChangeParm.pagecount"
- @pagination="getAssetChangeList"
- />
- </el-tab-pane>
- <el-tab-pane
- v-if="isDisplayRecord"
- label="备件领用记录"
- name="seventh"
- >
- <el-input
- v-model="getAssetPartApplyParm.parammaps.useCode"
- placeholder="出库单号"
- style="width: 140px"
- class="filter-item"
- />
- <el-input
- v-model="getAssetPartApplyParm.parammaps.partCode"
- placeholder="备件编号"
- style="width: 140px"
- class="filter-item"
- />
- <el-input
- v-model="getAssetPartApplyParm.parammaps.partName"
- placeholder="备件名称"
- style="width: 140px"
- class="filter-item"
- />
- <el-date-picker
- ref="inputDatetimeAssetPartApply"
- v-model="
- getAssetPartApplyParm.parammaps.inputDatetimeAssetPartApply
- "
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; margin-bottom: 10px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchAssetPartApply"
- >搜索</el-button>
- <el-table
- :key="tableKey"
- v-loading="listLoadingAssetPartApply"
- element-loading-text="给我一点时间"
- :data="listAssetPartApply"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- @sort-change="tableSort"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumAssetPartApply - 1) * pageSizeAssetPartApply +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="出库单号"
- prop="useForm"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="备件编号"
- sortable
- prop="partCode"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="备件名称"
- prop="partName"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="备件规格"
- prop="specification"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="备件品牌"
- prop="brandName"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="计量单位"
- prop="unit"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="领用数量"
- sortable
- prop="useNumber"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="实际出库数量"
- sortable
- prop="checkoutNumber"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="单价"
- sortable
- prop="price"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="总价"
- sortable
- prop="sumPrice"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="领用部门"
- prop="departmentName"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="领用时间"
- sortable
- prop="receiveTime"
- min-width="110px"
- align="center"
- />
- <el-table-column
- label="距离上次时间(天)"
- sortable
- prop="dif"
- min-width="110px"
- align="center"
- />
- </el-table>
- <pagination
- v-show="total >= 0"
- :total="totalAssetPartApply"
- :page.sync="getAssetPartApplyParm.offset"
- :limit.sync="getAssetPartApplyParm.pagecount"
- @pagination="getAssetPartApplyList"
- />
- </el-tab-pane>
- <el-tab-pane v-if="isDisplayRecord" label="费用统计" name="eighth">
- <el-row>
- <el-col :span="12">
- <div
- v-if="activeName === 'eighth'"
- id="barChart1"
- style="width: 100%; height: 400px"
- />
- </el-col>
- <el-col :span="12">
- <div
- v-if="activeName === 'eighth'"
- id="barChart2"
- style="width: 100%; height: 400px"
- />
- </el-col>
- </el-row>
- <el-dialog
- :title="textMap[dialogStatus]"
- append-to-body
- :visible.sync="dialogFormVisible_ChartSee"
- :close-on-click-modal="false"
- width="80%"
- >
- <div class="app-contentSee">
- <div class="filter-container">
- <el-select
- v-model="getChartSeeParm.parammaps.useTypeV"
- placeholder="类型"
- clearable
- class="filter-item"
- style="width: 120px"
- >
- <el-option
- v-for="item in useTypes"
- :key="item.id"
- :label="item.name"
- :value="item.name"
- />
- </el-select>
- <el-date-picker
- ref="inputDatetime2"
- v-model="getChartSeeParm.parammaps.inputDatetime2"
- class="inputDatetime"
- type="datetimerange"
- style="width: 250px; top: -3px"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- />
- <el-button
- v-waves
- class="filter-item"
- type="primary"
- icon="el-icon-search"
- @click="form_searchChartSee"
- >搜索</el-button>
- <el-button
- class="filter-item"
- style="margin-left: 10px"
- type="success"
- icon="el-icon-edit"
- @click="handleDownloadChartSee"
- >导出</el-button>
- </div>
- <el-table
- :key="tableKey"
- v-loading="listLoadingChartSee"
- element-loading-text="给我一点时间"
- :data="listChartSee"
- border
- fit
- highlight-current-row
- style="width: 100%"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- >
- <el-table-column
- label="序号"
- align="center"
- type="index"
- width="50px"
- >
- <template slot-scope="scope">
- <span>{{
- scope.$index +
- (pageNumChartSee - 1) * pageSizeChartSee +
- 1
- }}</span>
- </template>
- </el-table-column>
- <el-table-column :key="1" label="类型" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.useTypeV }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="2"
- label="单号"
- width="140px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.RUcode }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="3"
- label="领用日期"
- min-width="80px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.creatTime }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="4"
- label="领用部门"
- min-width="100px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.departmentName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="5"
- label="备件编号"
- min-width="80px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.partCode }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="6"
- label="备件名称"
- min-width="80px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.partName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="7"
- label="备件规格"
- min-width="80px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="8"
- label="备件品牌"
- min-width="100px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.brandName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="9"
- label="计量单位"
- min-width="80px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.unit }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="10"
- label="出库数量"
- min-width="110px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.checkoutNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="11"
- label="退库数量"
- min-width="100px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.quitNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="12"
- label="单价"
- min-width="110px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.price }}</span>
- </template>
- </el-table-column>
- <el-table-column
- :key="13"
- label="总价"
- min-width="110px"
- align="center"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.sumPrice }}</span>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="totalChartSee >= 0"
- :total="totalChartSee"
- :page.sync="getChartSeeParm.offset"
- :limit.sync="getChartSeeParm.pagecount"
- @pagination="getChartSeeList"
- />
- </div>
- </el-dialog>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div
- slot="footer"
- class="dialog-footer"
- style="right: 30px; position: absolute; bottom: 10px"
- >
- <el-button @click="dialogFormVisible_See = false">关闭</el-button>
- </div>
- </div>
- </el-dialog>
- <!-- 审核 -->
- <el-dialog
- :title="textMap[dialogStatus]"
- :visible.sync="dialogFormVisible_Examine"
- :close-on-click-modal="false"
- width="30%"
- >
- <div class="app-examine">
- <h3 style="width: 100%; margin: 0 0 0 5%; line-height: 50px">
- 请确认审核结果:
- </h3>
- <el-form
- ref="examineTemp"
- :rules="rules"
- :model="examineTemp"
- label-position="right"
- style="width: 50%; margin: 0 auto"
- >
- <el-row style="width: 88%; height: 150px; margin: 0 auto">
- <el-col :span="20">
- <el-form-item>
- <el-radio-group
- v-model="examineTemp.SHstatue"
- @change="changeSHStatue"
- >
- <el-radio :label="1" checked>通过</el-radio>
- <el-radio :label="2">不通过</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col v-if="statueReason" :span="22">
- <el-input
- v-model="examineTemp.workflowNote"
- type="textarea"
- :autosize="{ minRows: 2, maxRows: 3 }"
- placeholder="请输入不通过原因"
- />
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button
- type="primary"
- :disabled="isokDisable"
- @click="
- dialogStatus === 'examine'
- ? createExamineData()
- : createExamineData()
- "
- >确认</el-button>
- <el-button @click="dialogFormVisible_Examine = false">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 变更 -->
- <el-dialog
- :title="textMap[dialogStatus]"
- :visible.sync="dialogFormVisible_change"
- :close-on-click-modal="false"
- width="30%"
- >
- <div class="app-change">
- <el-form
- ref="batchChangeTemp"
- :rules="rules"
- :model="batchChange.temp"
- label-position="right"
- label-width="115px"
- style="width: 90%; margin: 0 auto 30px"
- @click.native.prevent
- @submit.native.prevent
- >
- <el-row>
- <el-col :span="24">
- <el-form-item label="变更部门:" prop="departmentId">
- <el-select
- v-model="batchChange.temp.departmentId"
- placeholder="变更部门"
- class="filter-item"
- style="width: 100%"
- @change="changeBatchDept"
- >
- <el-option
- v-for="item in batchChange.deptList"
- :key="item.deptid"
- :label="item.departmentName"
- :value="item.deptid"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="变更责任人:" prop="employeeId">
- <el-select
- v-model="batchChange.temp.employeeId"
- placeholder="变更责任人"
- class="filter-item"
- style="width: 100%"
- @change="changeBatchPerson"
- >
- <el-option
- v-for="item in batchChange.personList"
- :key="item.id"
- :label="item.empname"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div
- slot="footer"
- class="dialog-footer"
- style="right: 30px; position: absolute; bottom: 10px"
- >
- <el-button
- type="primary"
- :disabled="isokDisable"
- @click="changeData()"
- >保存并关闭</el-button>
- <el-button
- @click="dialogFormVisible_change = false"
- >取消并关闭</el-button>
- </div>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import echarts from 'echarts'
- require('echarts/theme/macarons')
- // 引入
- import {
- GetDataByName,
- GetDataByNames,
- PostDataByName,
- PostDataByNames,
- getRecuData,
- checkButtons,
- ExecDataByConfig,
- failproccess,
- GetAccount,
- GetReportform,
- getWorkList
- } from '@/api/common'
- import waves from '@/directive/waves'
- import { parseTime, sortChange, json2excel } from '@/utils/index.js'
- import Pagination from '@/components/Pagination'
- import { MessageBox } from 'element-ui'
- import TreeSelect from '@/components/TreeSelect'
- import Cookies from 'js-cookie'
- import { getToken } from '@/utils/auth'
- export default {
- inject: ['reload'],
- name: 'Basics',
- components: { Pagination, TreeSelect },
- directives: { waves },
- data() {
- return {
- isShow: true, // 是否有值
- workList: [], // 工作类别
- isEditWork: true,
- isBasicsAdd: [],
- isBasicsCard: [],
- isBasicsUpdate: [],
- isBasicsDel: [],
- isBasicsDel2: [],
- isBasic: [],
- isBasicSH: [],
- isBasicExamine: [],
- rules: {
- // assetCode: [{ required: true, message: '必填', trigger: 'blur' }],
- // eqName: [{ required: true, message: '必填', trigger: 'blur' }],
- eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
- financeCode: [{ required: true, message: '必填', trigger: 'blur' }],
- departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
- employeeId: [{ required: true, message: '必填', trigger: 'blur' }],
- depreciation: [
- {
- type: 'number',
- required: true,
- validator: (rule, value, callback) => {
- if (!value) {
- callback(new Error('不能为空'))
- }
- setTimeout(() => {
- const re = /^[0-9]*[1-9][0-9]*$/ // /^[0-9]*[1-9][0-9]*$/
- const rsCheck = re.test(value)
- if (!rsCheck) {
- callback(new Error('请输入正整数'))
- } else {
- callback()
- }
- }, 0)
- },
- trigger: 'blur'
- }
- ]
- },
- rulesCreate: {
- // assetCode: [{ required: true, message: '必填', trigger: 'blur' }],
- // eqName: [{ required: true, message: '必填', trigger: 'blur' }],
- eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
- financeCode: [{ required: true, message: '必填', trigger: 'blur' }],
- departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
- employeeId: [{ required: true, message: '必填', trigger: 'blur' }],
- deptId: [{ required: true, message: '必填', trigger: 'blur' }],
- employeName: [{ required: true, message: '必填', trigger: 'blur' }],
- pastureId: [{ required: true, message: '必填', trigger: 'blur' }],
- maintenance: [{ required: true, message: '必填', trigger: 'blur' }],
- leveloneTime: [{ required: true, message: '必填', trigger: 'blur' }],
- leveltwoTime: [{ required: true, message: '必填', trigger: 'blur' }],
- levelthreeTime: [{ required: true, message: '必填', trigger: 'blur' }],
- levelone: [{ required: true, message: '必填', trigger: 'blur' }],
- leveltwo: [{ required: true, message: '必填', trigger: 'blur' }],
- levelthree: [{ required: true, message: '必填', trigger: 'blur' }],
- depreciation: [
- {
- type: 'number',
- required: true,
- validator: (rule, value, callback) => {
- if (!value) {
- callback(new Error('不能为空'))
- }
- setTimeout(() => {
- const re = /^[0-9]*[1-9][0-9]*$/ // /^[0-9]*[1-9][0-9]*$/
- const rsCheck = re.test(value)
- if (!rsCheck) {
- callback(new Error('请输入正整数'))
- } else {
- callback()
- }
- }, 0)
- },
- trigger: 'blur'
- }
- ]
- },
- placeholder: '请选择设备类别',
- findAllBrand: [],
- findAllProvider: [],
- findAllAssetType: [],
- findAllPasture: [],
- findAllDepart: [],
- findAllEmploye: [],
- getDictByName: [],
- upkeepgrades: [],
- createDepartList: [],
- statues: [
- { id: '0', name: '审核中' },
- { id: '1', name: '已通过' },
- { id: '2', name: '未通过' }
- ],
- pushNameList: [
- { id: '60', name: '60' },
- { id: '120', name: '120' },
- { id: '180', name: '180' }
- ],
- pushNameList2: [
- { id: '1', name: '1' },
- { id: '2', name: '2' },
- { id: '3', name: '3' },
- { id: '5', name: '5' },
- { id: '8', name: '8' },
- { id: '12', name: '12' },
- { id: '18', name: '18' }
- ],
- depreciationAlertList: [
- { id: '0', name: '正常' },
- { id: '1', name: '到期预警' },
- { id: '2', name: '超期使用' }
- ],
- requestParams: [
- { name: 'findAllBrand', offset: 0, pagecount: 0, params: [] },
- { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
- { name: 'findAlllAssetProvider', offset: 0, pagecount: 0, params: [] },
- { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
- {
- name: 'findAllPasture',
- offset: 0,
- pagecount: 0,
- returntype: 'Map',
- parammaps: { id: '18' }
- },
- // { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
- {
- name: 'findAllEmploye',
- offset: 0,
- pagecount: 0,
- parammaps: { pastureId: Cookies.get('pastureid') }
- },
- {
- name: 'getDictByName',
- offset: 0,
- pagecount: 0,
- params: ['资产状态']
- },
- { name: 'getdictbyname', offset: 0, pagecount: 0, params: ['保养级别'] }
- ],
- getDepartParam: {
- name: 'findAllDepart1',
- offset: 0,
- pagecount: 0,
- parammaps: {
- pastureId: Cookies.get('pastureid'),
- eId: Cookies.get('employeid')
- }
- },
- disabled: false,
- nodeKey: 'id',
- defaultCheckedKeys: [],
- parentClass: [],
- defaultProps: { children: 'children', label: 'typeName' },
- getRecuListParm: { name: 'getAssetTypeList', idname: 'id', params: [-1] },
- tableKey: 0,
- list: [],
- total: 0,
- listLoading: true,
- getdataListParm: {
- name: 'getAssetList',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- proId: '',
- brandId: '',
- assetCode: '',
- eqCode: '',
- eqName: '',
- departmentId: '',
- pastureId: Cookies.get('pastureid'),
- pastureName: Cookies.get('pasturename'),
- status: '',
- inputDatetime1: '',
- startTime: '',
- stopTime: '',
- inputDatetime2: '',
- startTime2: '',
- stopTime2: '',
- inputDatetime3: '',
- startTime3: '',
- stopTime3: '',
- warning: '',
- eqClassId: ''
- }
- },
- listSH: [],
- totalSH: 0,
- listLoadingSH: true,
- tabName: '',
- getdataListParmSH: {
- name: 'getAssetListSH',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- eqCode: '',
- eqName: '',
- pastureName: Cookies.get('pasturename'),
- status: '',
- inputDatetime1: '',
- startTime: '',
- stopTime: '',
- SHStatus: ''
- }
- },
- textMap: {
- update: '编辑',
- create: '新增',
- card: '查看设备信息',
- examine: '审核',
- change: '批量变更'
- },
- dialogFormVisible: false,
- dialogStatus: '',
- pickerOptions1: {
- disabledDate(time) {
- return time.getTime() > Date.now() // 当天之前的时间可选
- }
- },
- dialogImageUrl: '',
- dialogVisible: false,
- fileList: [],
- showUpload: false,
- headers: { optname: 'insertcustompic', id: 1, token: getToken() },
- uploadImageUrl: process.env.VUE_APP_BASE_API + 'authdata/uploaderimage',
- width: '',
- createTemp: {
- work: '', // 工作类别
- license: '',
- duration: '',
- inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'),
- employeId: this.$store.state.user.employeid,
- inputUser: this.$store.state.user.employeid,
- deptId: this.$store.state.user.departmentid,
- departmentName: Cookies.get('departmentname'),
- pastureId: this.$store.state.user.pastureid,
- assetCode: '',
- eqClassName: '',
- eqClassId: '',
- eqCode: '',
- eqName: '',
- specification: '',
- providerName: '',
- brandName: '',
- financeCode: '',
- status: '正常',
- purpose: '',
- purchaseDate: parseTime(new Date(), '{y}-{m}-{d}'),
- entranceDate: parseTime(new Date(), '{y}-{m}-{d}'),
- yearUpkeepCost: '',
- yearMaintainDost: '',
- yuanzhi: '',
- baseHours: '',
- upkeepgrade: '',
- salvage: '',
- subtractvalue: '',
- yearMaintainCost: '',
- brandId: '',
- providerId: '',
- inputUserName: '',
- employeName: this.$store.state.user.employename,
- depreciation: '5',
- maintenance: '',
- levelone: '',
- leveltwo: '',
- levelthree: '',
- pushTime: '',
- leveloneTime: '',
- leveltwoTime: '',
- levelthreeTime: ''
- },
- requestParam: {
- name: 'insertAsset',
- offset: 0,
- pagecount: 0,
- parammaps: {}
- },
- seeTemp: {},
- dialogFormVisible_Examine: false,
- dialogFormVisible_See: false,
- activeName: 'first',
- maintainTypes: [
- { id: '0', name: '周保养' },
- { id: '1', name: '月保养' },
- { id: '2', name: '间隔保养' }
- ],
- changeStates: [
- { id: '17', name: '正常' },
- { id: '18', name: '闲置' },
- { id: '19', name: '报废' },
- { id: '20', name: '封存' }
- ],
- getdataEQNumber: {
- name: 'cerateEQNumber',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- dialoFormVisible_Examine: false,
- examineTemp: { SHstatue: 1 },
- statueReason: false,
- activeList: [],
- active: 3,
- isFlowChart: false,
- isDisplayRecord: false,
- buttons: [],
- // 查看-点检记录
- getAssetBigSpotCheckListParm: {
- name: 'getAssetBigSpotCheck1',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }
- },
- listLoadingSpotCheck1: false,
- listSpotCheck1: [],
- totalSpotCheck1: 0,
- // 查看-保养记录
- getBigupkeepbyeqParm: {
- name: 'getBigupkeepbyeq',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- inputDatetimeUpkeepbyeq: '',
- startTime: '',
- stopTime: '',
- upkeepType: '',
- upkeepCode: ''
- }
- },
- listLoadingUpkeepbyeq: false,
- listUpkeepbyeq: [],
- totalUpkeepbyeq: 0,
- // 查看-维修记录
- getAssetMaintainParm: {
- name: 'getAssetMaintain1',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- inputDatetimeAssetMaintain: '',
- startTime: '',
- stopTime: '',
- repairCode: ''
- }
- },
- listLoadingAssetMaintain: false,
- listAssetMaintain: [],
- totalAssetMaintain: 0,
- // 查看-启停记录
- getAssetSTTParm: {
- name: 'getAssetSTT1',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: { startTime: '', stopTime: '' }
- },
- listLoadingAssetSTT: false,
- listAssetSTT: [],
- totalAssetSTT: 0,
- // 查看-变更记录
- getAssetChangeParm: {
- name: 'getAssetChange1',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- startTime: '',
- stopTime: '',
- changeStatue: '',
- inputDatetimeAssetChange: ''
- }
- },
- listLoadingAssetChange: false,
- listAssetChange: [],
- totalAssetChange: 0,
- // 查看-备件领用记录
- getAssetPartApplyParm: {
- name: 'getAssetPartApply',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- startTime: '',
- stopTime: '',
- inputDatetimeAssetPartApply: ''
- }
- },
- listLoadingAssetPartApply: false,
- listAssetPartApply: [],
- totalAssetPartApply: 0,
- downLoadParm: {},
- downLoadList: [],
- requestBrand: {
- name: 'getBrandByPartCode',
- page: 0,
- offset: 0,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- BrandList: [],
- requestEmploye: {
- name: 'findAllEmployeV2',
- page: 0,
- offset: 0,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- }
- },
- employeList: [],
- totaltitle: 0,
- getBarChart1Parm: {
- name: 'getReportEqCostYear',
- parammaps: {}
- },
- barChart1: null,
- chart_data1: {},
- getBarChart2Parm: {
- name: 'getReportEqCostMonth',
- parammaps: {
- receiveTime: new Date().getFullYear()
- }
- },
- barChart2: null,
- chart_data2: {},
- dialogFormVisible_ChartSee: false,
- getChartSeeParm: {
- name: 'getEqPartuseDetailList',
- page: 0,
- offset: 0,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- receiveTime: '',
- eqId: '',
- useTypeV: '',
- inputDatetime2: '',
- stopTime: '',
- startTime: ''
- }
- },
- listLoadingChartSee: false,
- totalChartSee: 0,
- listChartSee: [],
- pageNum: 0,
- pageSize: 0,
- pageNumSH: 0,
- pageSizeSH: 0,
- useTypes: [
- { id: 0, name: '维修' },
- { id: 1, name: '保养' }
- ],
- downLoadParm2: {},
- downLoadList2: [],
- isPercentage: false,
- percentage: 1,
- isokDisable: false,
- edit: 0,
- selectionList: [],
- dialogFormVisible_change: false,
- batchChange: {
- temp: { departmentId: '', employeeId: '' },
- getdataListParmDept: {
- name: 'getAssetAndEmpList',
- offset: 0,
- pagecount: 0,
- parammaps: {}
- },
- deptList: [],
- getdataListParmPerson: {
- name: 'getAllEmp',
- offset: 0,
- pagecount: 0,
- parammaps: {}
- },
- personList: []
- },
- rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
- cellStyle: { padding: 0 + 'px' },
- myHeight: document.documentElement.clientHeight - 85 - 250
- }
- },
- computed: {
- // 设置请求头
- // headers() {
- // return {
- // // 设置token
- // // eslint-disable-next-line no-undef
- // token: getToken()
- // }
- // },
- uploadData() {
- return {
- name: 'importStockUse',
- pastureId: Cookies.get('pastureid'),
- importParams:
- '牧场,设备类别,资产编号,设备名称,设备内部编号,设备规格,品牌,供应商,用途,状态,购置日期,入场日期,折旧年限,财务编号,原值,残值,月核减值,保养级别,保养费用,维修费用,维修费用,基数(小时),部门,责任人,录入人,录入时间,使用时长(年),使用率(%),物联网编码,标准工作时长,工作类别,SignColumn',
- sheetname: 'SheetJS'
- }
- },
- // 设置上传地址
- uploadExcelUrl() {
- // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
- return process.env.VUE_APP_BASE_API + 'authdata/equipment'
- }
- },
- created() {
- const gshebquanx = Cookies.get('gshebquanx')
- const roles = JSON.parse(sessionStorage.getItem('roles'))
- const arrId = roles.map((item) => {
- return item.id
- })
- this.isEditWork = !arrId.includes(44)
- // 不是设备处长,没有所有权限
- if (gshebquanx == '0') {
- this.requestParams[4].parammaps.id = Cookies.get('pastureid')
- } else {
- this.requestParams[4].parammaps.id = '18'
- }
- const that = this
- GetDataByName({
- name: 'getUserPCButtons',
- parammaps: { jwt_username: Cookies.get('name') }
- }).then((response) => {
- that.buttons = response.data.list
- that.get_auto_buttons()
- })
- this.get_table_dataSH()
- this.getDownClassList()
- if (this.$route.query.tabName == undefined) {
- this.tabName = 'first'
- } else {
- this.tabName = this.$route.query.tabName
- }
- if (this.isBasic === false) {
- this.tabName = 'second'
- }
- if (this.tabName == 'first') {
- this.isDisplayRecord = true
- this.isFlowChart = false
- } else {
- this.isDisplayRecord = false
- this.isFlowChart = true
- }
- if (
- this.$route.query.myPath !== undefined &&
- this.$route.query.myPath == 'AssetStandardManagement'
- ) {
- setTimeout(() => {
- if (
- this.$route.query.pastureName !== undefined &&
- this.$route.query.pastureId !== undefined &&
- this.$route.query.departmentId !== undefined
- ) {
- this.getdataListParm.parammaps.pastureName =
- this.$route.query.pastureName
- this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
- // console.log(isNaN(this.$route.query.departmentId), '9999')
- this.getdataListParm.parammaps.eqClassId = this.$route.query.eqClassId
- this.getdataListParm.parammaps.eqClassName =
- this.$route.query.eqClassName
- this.defaultCheckedKeys = [this.getdataListParm.parammaps.eqClassId]
- this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
- if (isNaN(this.$route.query.departmentId)) {
- this.getdataListParm.parammaps.departmentId = ''
- } else {
- this.getdataListParm.parammaps.departmentId = parseInt(
- this.$route.query.departmentId
- )
- }
- this.getDepartDownList()
- this.$forceUpdate()
- } else {
- this.getdataListParm.parammaps.pastureName =
- Cookies.get('pasturename')
- this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- this.getdataListParm.parammaps.departmentId = ''
- }
- this.get_table_data()
- }, 5000)
- } else {
- if (
- this.$route.query.pastureName !== undefined &&
- this.$route.query.pastureId !== undefined &&
- this.$route.query.departmentId !== undefined
- ) {
- this.getdataListParm.parammaps.pastureName =
- this.$route.query.pastureName
- this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
- this.getdataListParm.parammaps.departmentId = parseInt(
- this.$route.query.departmentId
- )
- } else {
- this.getdataListParm.parammaps.pastureName = Cookies.get('pasturename')
- this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- this.getdataListParm.parammaps.departmentId = ''
- }
- this.get_table_data()
- }
- if (
- this.$route.query.myPath !== undefined &&
- this.$route.query.myPath == 'equipmentOverview'
- ) {
- this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
- }
- if (
- this.$route.query.myPath !== undefined &&
- this.$route.query.myPath == 'equipmentOverview2'
- ) {
- setTimeout(() => {
- if (
- this.$route.query.pastureName !== undefined &&
- this.$route.query.pastureId !== undefined &&
- this.$route.query.eqClassId !== undefined
- ) {
- this.getdataListParm.parammaps.pastureName =
- this.$route.query.pastureName
- this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
- this.getdataListParm.parammaps.eqClassId = this.$route.query.eqClassId
- this.getdataListParm.parammaps.eqClassName =
- this.$route.query.eqClassName
- this.defaultCheckedKeys = [this.getdataListParm.parammaps.eqClassId]
- this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
- this.getDepartDownList()
- this.$forceUpdate()
- } else {
- this.getdataListParm.parammaps.pastureName =
- Cookies.get('pasturename')
- this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- this.getdataListParm.parammaps.eqClassId = ''
- }
- this.get_table_data()
- }, 5000)
- } else {
- if (
- this.$route.query.pastureName !== undefined &&
- this.$route.query.pastureId !== undefined &&
- this.$route.query.departmentId !== undefined
- ) {
- this.getdataListParm.parammaps.pastureName =
- this.$route.query.pastureName
- this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
- this.getdataListParm.parammaps.departmentId = parseInt(
- this.$route.query.departmentId
- )
- } else {
- this.getdataListParm.parammaps.pastureName = Cookies.get('pasturename')
- this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- this.getdataListParm.parammaps.departmentId = ''
- }
- this.get_table_data()
- }
- // 设备购置报废统计
- if (
- this.$route.query.myPath !== undefined &&
- this.$route.query.myPath == 'PurchaseScrap'
- ) {
- if (this.$route.query.project == '新购设备数') {
- this.getdataListParm.parammaps.pastureName =
- this.$route.query.pastureName
- this.getdataListParm.parammaps.inputDatetime2 = [
- parseTime(new Date(), '{y}') + '-01-01',
- parseTime(new Date(), '{y}') + '-12-31'
- ]
- this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
- this.getDepartDownList()
- } else {
- this.getdataListParm.parammaps.pastureName =
- this.$route.query.pastureName
- this.getdataListParm.parammaps.inputDatetime3 = [
- parseTime(new Date(), '{y}') + '-01-01',
- parseTime(new Date(), '{y}') + '-12-31'
- ]
- this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
- this.getDepartDownList()
- }
- }
- this.get_table_data()
- // Window.addEventListener('keyup', )
- this.keyupSubmit()
- },
- mounted() {
- // console.log(this.isSupRole(), 'hss')
- this.getWorks()
- },
- methods: {
- // 获取工作类别的数据
- async getWorks() {
- const data = await getWorkList()
- this.workList = data.data
- console.log(data, '工作列表')
- },
- // 判断当前是否是超级管理员 "id":44,"name":"超级管理员
- isSupRole() {
- const roles = JSON.parse(sessionStorage.getItem('roles'))
- const arrId = roles.map((item) => {
- return item.id
- })
- return arrId.includes(44)
- },
- roleSet1(row) {
- var result = true
- if (
- row.pastureId == '18' ||
- row.pastureId == Cookies.get('pastureid') ||
- row.pastureId == '0' || this.isSupRole()
- ) {
- result = true
- } else {
- result = false
- }
- console.log(result, 'result')
- return result
- },
- roleSet2(row) {
- var result = true
- if (
- (row.pastureId == '18' || row.pastureId == '0') &&
- this.isBasicsDel2
- ) {
- result = true
- } else if (
- (row.pastureId == Cookies.get('pastureid') || row.pastureId == '0') &&
- this.isBasicsDel2
- ) {
- result = true
- } else {
- result = false
- }
- return result
- },
- // 导入
- beforeImportExcel(file) {
- const isLt2M = file.size / 1024 / 1024 < 10
- if (!isLt2M) {
- this.$message.error('上传文件大小不能超过 10MB!')
- }
- return isLt2M
- },
- handleImportExcelSuccess(res, file) {
- if (res.msg === 'ok') {
- this.$message({
- title: '成功',
- message: '导入成功:' + res.data.success + '条!',
- type: 'success',
- duration: 2000
- })
- if (res.data.err_count > 0) {
- this.$notify({
- title: '失败',
- message: '导入失败:' + res.data.err_count + '条!',
- type: 'danger',
- duration: 2000
- })
- }
- } else {
- this.$notify({
- title: '失败',
- message: '上传失败',
- type: 'danger',
- duration: 2000
- })
- }
- },
- formatJsonTemp(filterVal, jsonData) {
- return jsonData.map((v) =>
- filterVal.map((j) => {
- if (j === 'timestamp') {
- return parseTime(v[j])
- } else {
- return v[j]
- }
- })
- )
- },
- tableSort2(column) {
- sortChange(column, this.list)
- },
- tableSort(column) {
- if (this.activeName == 'third') {
- sortChange(column, this.listUpkeepbyeq)
- } else if (this.activeName == 'fouth') {
- sortChange(column, this.listAssetMaintain)
- } else if (this.activeName == 'seventh') {
- sortChange(column, this.listAssetPartApply)
- }
- },
- get_auto_buttons() {
- // 新增
- const BasicsAdd = 'asset:basics:add'
- const isBasicsAdd = checkButtons(
- this.$store.state.user.buttons,
- BasicsAdd
- )
- this.isBasicsAdd = isBasicsAdd
- // 卡片
- const BasicsCard = 'asset:basics:kapian'
- const isBasicsCard = checkButtons(
- this.$store.state.user.buttons,
- BasicsCard
- )
- this.isBasicsCard = isBasicsCard
- // 编辑
- const BasicsUpdate = 'asset:basics:update'
- const isBasicsUpdate = checkButtons(
- this.$store.state.user.buttons,
- BasicsUpdate
- )
- this.isBasicsUpdate = isBasicsUpdate
- // 删除
- const BasicsDel = 'asset:basics:del'
- const isBasicsDel = checkButtons(
- this.$store.state.user.buttons,
- BasicsDel
- )
- this.isBasicsDel = isBasicsDel
- // 设备基础信息-删除
- const BasicsDel2 = 'asset:basics:del2'
- const isBasicsDel2 = checkButtons(
- this.$store.state.user.buttons,
- BasicsDel2
- )
- this.isBasicsDel2 = isBasicsDel2
- // 设备基础信息
- const Basic = 'asset:basic:basic'
- const isBasic = checkButtons(this.$store.state.user.buttons, Basic)
- this.isBasic = isBasic
- // 设备审核
- const BasicSH = 'asset:basic:shjm'
- const isBasicSH = checkButtons(this.$store.state.user.buttons, BasicSH)
- this.isBasicSH = isBasicSH
- // 审核
- const BasicExamine = 'asset:basic:shenhe'
- const isBasicExamine = checkButtons(
- this.$store.state.user.buttons,
- BasicExamine
- )
- this.isBasicExamine = isBasicExamine
- },
- // 2-2:下拉框
- get_select_list() {
- GetDataByNames(this.requestParams).then((response) => {
- if (response.data.list !== null) {
- this.findAllBrand = response.data.findAllBrand.list
- this.findAllProvider = response.data.findAllProvider.list
- this.findAllAssetType = response.data.findAllAssetType.list
- this.findAllPasture = response.data.findAllPasture.list
- this.findAllEmploye = response.data.findAllEmploye.list
- this.getDictByName = response.data.getDictByName.list
- this.upkeepgrades = response.data.getdictbyname.list
- this.getDepartDownList()
- }
- })
- },
- getDepartDownList() {
- GetDataByName(this.getDepartParam).then((response) => {
- this.findAllDepart = response.data.list
- })
- },
- changePastureName(item) {
- this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(
- (obj) => obj.name == item
- ).id
- this.getdataListParm.parammaps.departmentId = ''
- this.getDepartDownList()
- },
- getCreateDepartDownList() {
- GetDataByName(this.getDepartParam).then((response) => {
- this.createDepartList = response.data.list
- if (this.edit == 1) {
- if (
- this.createDepartList.find(
- (obj) => obj.id == Cookies.get('departmentid')
- )
- ) {
- this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
- this.createTemp.departmentName = this.createDepartList.find(
- (obj) => obj.id == Cookies.get('departmentid')
- ).name
- this.createTemp.deptId = parseInt(Cookies.get('departmentid'))
- } else {
- this.createTemp.departmentId = response.data.list[0].id
- this.createTemp.departmentId = response.data.list[0].id
- this.createTemp.deptId = response.data.list[0].name
- }
- }
- })
- },
- changePasture(item) {
- this.getDepartParam.parammaps.pastureId = item
- this.edit = 1
- this.getCreateDepartDownList()
- },
- changeDepart(item) {
- this.createTemp.departmentName = this.createDepartList.find(
- (obj) => obj.id == item
- ).name
- },
- get_table_data() {
- this.listLoading = true
- if (this.getdataListParm.parammaps.inputDatetime1 == null) {
- this.getdataListParm.parammaps.inputDatetime1 = ''
- this.getdataListParm.parammaps.startTime = ''
- this.getdataListParm.parammaps.stopTime = ''
- } else {
- this.getdataListParm.parammaps.startTime =
- this.getdataListParm.parammaps.inputDatetime1[0]
- this.getdataListParm.parammaps.stopTime =
- this.getdataListParm.parammaps.inputDatetime1[1]
- }
- if (
- this.getdataListParm.parammaps.inputDatetime2 == null ||
- this.getdataListParm.parammaps.inputDatetime2 == ''
- ) {
- this.getdataListParm.parammaps.inputDatetime2 = ''
- this.getdataListParm.parammaps.startTime2 = ''
- this.getdataListParm.parammaps.stopTime2 = ''
- } else {
- this.getdataListParm.parammaps.startTime2 =
- this.getdataListParm.parammaps.inputDatetime2[0]
- this.getdataListParm.parammaps.stopTime2 =
- this.getdataListParm.parammaps.inputDatetime2[1]
- }
- if (
- this.getdataListParm.parammaps.inputDatetime3 == null ||
- this.getdataListParm.parammaps.inputDatetime3 == ''
- ) {
- this.getdataListParm.parammaps.inputDatetime3 = ''
- this.getdataListParm.parammaps.startTime3 = ''
- this.getdataListParm.parammaps.stopTime3 = ''
- } else {
- this.getdataListParm.parammaps.startTime3 =
- this.getdataListParm.parammaps.inputDatetime3[0]
- this.getdataListParm.parammaps.stopTime3 =
- this.getdataListParm.parammaps.inputDatetime3[1]
- }
- GetDataByName(this.getdataListParm).then((response) => {
- // console.log('table数据', response.data.list)
- if (response.data.list !== null) {
- this.list = response.data.list
- for (let i = 0; i < response.data.list.length; i++) {
- if (
- response.data.list[i].srcpath !== null &&
- response.data.list[i].picpath !== null &&
- response.data.list[i].srcpath !== undefined &&
- response.data.list[i].picpath !== undefined
- ) {
- this.list[i].srcpath =
- process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
- this.list[i].picpath =
- process.env.VUE_APP_BASE_API + response.data.list[i].picpath
- } else {
- this.list[i].srcpath = ''
- this.list[i].picpath = ''
- }
- }
- this.pageNum = response.data.pageNum
- this.pageSize = response.data.pageSize
- } else {
- this.list = []
- }
- this.total = response.data.total
- setTimeout(() => {
- this.listLoading = false
- }, 100)
- this.get_select_list()
- })
- },
- get_table_dataSH() {
- this.listLoadingSH = true
- // console.log(this.$refs)
- // console.log(this.$refs['inputDatetime1'])
- if (this.getdataListParmSH.parammaps.inputDatetime1 == null) {
- this.getdataListParmSH.parammaps.inputDatetime1 = ''
- } else {
- this.getdataListParmSH.parammaps.startTime =
- this.getdataListParmSH.parammaps.inputDatetime1[0]
- this.getdataListParmSH.parammaps.stopTime =
- this.getdataListParmSH.parammaps.inputDatetime1[1]
- }
- GetDataByName(this.getdataListParmSH).then((response) => {
- // console.log('table数据', response.data.list)
- if (response.data.list !== null) {
- this.listSH = response.data.list
- for (let i = 0; i < response.data.list.length; i++) {
- if (
- response.data.list[i].srcpath !== null &&
- response.data.list[i].picpath
- ) {
- this.listSH[i].srcpath =
- process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
- this.listSH[i].picpath =
- process.env.VUE_APP_BASE_API + response.data.list[i].picpath
- } else {
- this.listSH[i].srcpath = ''
- this.listSH[i].picpath = ''
- }
- }
- this.pageNumSH = response.data.pageNum
- this.pageSizeSH = response.data.pageSize
- } else {
- this.listSH = []
- }
- this.totalSH = response.data.total
- setTimeout(() => {
- this.listLoadingSH = false
- }, 100)
- })
- },
- SHStatus: function(cellValue) {
- if (cellValue.SHStatus == 0) {
- return '审核中'
- } else if (cellValue.SHStatus == 1) {
- return '已通过'
- } else if (cellValue.SHStatus == 2) {
- return '未通过'
- } else if (cellValue.SHStatus == 3) {
- return '历史数据'
- }
- },
- form_search() {
- this.listLoading = true
- this.getdataListParm.parammaps.pastureId = ''
- if (this.getdataListParm.parammaps.warning !== '') {
- this.getdataListParm.parammaps.d1 = 1
- } else {
- this.getdataListParm.parammaps.d1 = ''
- }
- if (this.getdataListParm.parammaps.inputDatetime1 == null) {
- this.getdataListParm.parammaps.inputDatetime1 = ''
- this.getdataListParm.parammaps.startTime = ''
- this.getdataListParm.parammaps.stopTime = ''
- } else {
- this.getdataListParm.parammaps.startTime =
- this.getdataListParm.parammaps.inputDatetime1[0]
- this.getdataListParm.parammaps.stopTime =
- this.getdataListParm.parammaps.inputDatetime1[1]
- }
- // console.log(this.getdataListParm.parammaps.inputDatetime2)
- if (this.getdataListParm.parammaps.inputDatetime2 == null) {
- this.getdataListParm.parammaps.inputDatetime2 = ''
- this.getdataListParm.parammaps.startTime2 = ''
- this.getdataListParm.parammaps.stopTime2 = ''
- } else {
- this.getdataListParm.parammaps.startTime2 =
- this.getdataListParm.parammaps.inputDatetime2[0]
- this.getdataListParm.parammaps.stopTime2 =
- this.getdataListParm.parammaps.inputDatetime2[1]
- }
- if (this.getdataListParm.parammaps.inputDatetime3 == null) {
- this.getdataListParm.parammaps.inputDatetime3 = ''
- this.getdataListParm.parammaps.startTime3 = ''
- this.getdataListParm.parammaps.stopTime3 = ''
- } else {
- this.getdataListParm.parammaps.startTime3 =
- this.getdataListParm.parammaps.inputDatetime3[0]
- this.getdataListParm.parammaps.stopTime3 =
- this.getdataListParm.parammaps.inputDatetime3[1]
- }
- this.getdataListParm.offset = 1
- this.get_table_data()
- },
- form_searchSH() {
- this.listLoadingSH = true
- if (this.getdataListParmSH.parammaps.inputDatetime1 == null) {
- this.getdataListParmSH.parammaps.inputDatetime1 = ''
- } else {
- this.getdataListParmSH.parammaps.startTime =
- this.getdataListParmSH.parammaps.inputDatetime1[0]
- this.getdataListParmSH.parammaps.stopTime =
- this.getdataListParmSH.parammaps.inputDatetime1[1]
- }
- this.getdataListParmSH.offset = 1
- this.get_table_dataSH()
- },
- handlePicChange(file, fileList) {
- if (fileList.length > 0) {
- this.$nextTick(() => {
- this.showUpload = true
- })
- } else {
- this.$nextTick(() => {
- this.showUpload = false
- })
- }
- // console.log(this.createTemp)
- },
- handlePicSuccess(response, file, fileList) {
- if (fileList.length > 0) {
- this.$nextTick(() => {
- this.showUpload = true
- })
- } else {
- this.$nextTick(() => {
- this.showUpload = false
- })
- }
- if (
- this.createTemp.picpath === undefined ||
- this.createTemp.picpath === '' ||
- this.createTemp.picpath == -1
- ) {
- this.$set(this.createTemp, 'picpath', response.execresult.LastInsertId)
- }
- },
- handlePicRemove(file, fileList) {
- if (this.dialogStatus === 'create') {
- if (fileList.length < 1) {
- this.showUpload = false
- }
- for (const key in this.createTemp) {
- if (this.createTemp[key] === file.response.execresult.LastInsertId) {
- this.$delete(this.createTemp, key)
- }
- }
- } else {
- if (fileList.length < 1) {
- this.$nextTick(() => {
- this.showUpload = false
- })
- }
- const url = file.url
- // console.log(url, 'url')
- for (const key in this.createTemp) {
- // console.log(this.createTemp[key], 'createTemp[key]')
- if (this.createTemp[key] === url) {
- // console.log(key)
- if (key === 'picpath') {
- this.$delete(this.createTemp, 'picpath')
- this.$delete(this.createTemp, 'picId')
- }
- }
- }
- }
- // console.log(this.createTemp, '文件列表移除文件时的钩子row')
- },
- handlePicPreview(file) {
- this.dialogImageUrl = file.url
- this.dialogVisible = true
- },
- onLoad(e) {
- const img = e.target
- let width = 0
- if (img.fileSize > 0 || (img.width > 1 && img.height > 1)) {
- width = img.width + 40
- }
- this.width = width + 'px'
- },
- add_dialog_saveAdd() {
- console.log('点击了保存', this.createTemp.maintenance)
- if (this.createTemp.status == '') {
- this.$message({
- type: 'warning',
- message: '请选择状态值s',
- duration: 2000
- })
- return false
- }
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['createTemp'].validate((valid) => {
- if (valid) {
- for (var i = 0; i < this.listAdd.length; i++) {
- if (this.listAdd[i].score == null) {
- this.$message({
- type: 'warning',
- message: '请检查检查结果是否为空',
- duration: 2000
- })
- return false
- }
- if (this.listAdd[i].pic1 == undefined) {
- this.listAdd[i].pic1 = -1
- }
- if (this.listAdd[i].pic2 == undefined) {
- this.listAdd[i].pic2 = -1
- }
- if (this.listAdd[i].pic3 == undefined) {
- this.listAdd[i].pic3 = -1
- }
- }
- this.postDataPramas.common = { returnmap: '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = {
- name: 'insertBigjudge',
- type: 'e',
- parammaps: {
- pastureId: this.createTemp.pastureId,
- batime: this.createTemp.batime,
- empId: this.createTemp.empId
- }
- }
- this.postDataPramas.data[1] = {
- name: 'insertSpotList',
- resultmaps: { list: this.listAdd }
- }
- this.postDataPramas.data[1].children = []
- this.postDataPramas.data[1].children[0] = {
- name: 'insertjudge',
- type: 'e',
- parammaps: {
- bigId: '@insertBigjudge.LastInsertId',
- statue: '@insertSpotList.statue',
- score: '@insertSpotList.score',
- note: '@insertSpotList.note',
- pic1: '@insertSpotList.pic1',
- pic2: '@insertSpotList.pic2',
- pic3: '@insertSpotList.pic3'
- }
- }
- ExecDataByConfig(this.postDataPramas).then((response) => {
- console.log('新增保存发送参数', this.postDataPramas)
- if (response.msg === 'fail') {
- this.$notify({
- title: '保存失败',
- message: response.data,
- type: 'warning',
- duration: 2000
- })
- } else {
- this.getdataListParm.parammaps.inputDatetime = ''
- this.get_table_data()
- this.dialogFormVisibleAdd = false
- this.createTemp.providerName = ''
- this.$notify({
- title: '',
- message: '保存成功',
- type: 'success',
- duration: 2000
- })
- }
- })
- }
- })
- },
- beforeRemove(file, fileList) {
- // console.log(
- // file.response,
- // '删除文件之前的钩子,参数为上传的文件和文件列表'
- // )
- return this.$confirm('删除当前图片, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- },
- resetCreateTemp() {
- this.defaultCheckedKeys = []
- this.createTemp.defaultCheckedKeys = []
- this.createTemp.brandId = ''
- this.createTemp.providerId = ''
- this.createTemp.inputDatetime = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTemp.eqClassName = ''
- this.createTemp.eqClassId = ''
- this.createTemp.employeName = Cookies.get('employename')
- this.createTemp.employeId = Cookies.get('employeid')
- this.createTemp.inputUser = Cookies.get('employeid')
- this.createTemp.deptId = parseInt(Cookies.get('departmentid'))
- this.createTemp.departmentName = Cookies.get('departmentname')
- this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
- this.createTemp.eqCode = ''
- this.createTemp.eqName = ''
- this.createTemp.specification = ''
- this.createTemp.providerName = ''
- this.createTemp.financeCode = ''
- this.createTemp.status = '正常'
- this.createTemp.providerName = ''
- this.createTemp.brandName = ''
- this.createTemp.purpose = ''
- this.createTemp.purchaseDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTemp.entranceDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTemp.assetCode = ''
- this.createTemp.yearUpkeepCost = ''
- this.createTemp.yearMaintainDost = ''
- this.createTemp.yuanzhi = ''
- this.createTemp.baseHours = ''
- this.createTemp.upkeepgrade = 113
- this.createTemp.salvage = ''
- this.createTemp.subtractvalue = ''
- this.createTemp.yearMaintainCost = ''
- this.createTemp.inputUserName = ''
- this.createTemp.picpath = ''
- this.fileList = []
- this.showUpload = false
- this.createTemp.fileList = []
- this.createTemp.depreciation = '5'
- this.createTemp.license = ''
- this.createTemp.duration = ''
- this.createTemp.maintenance = []
- },
- form_add() {
- this.resetCreateTemp()
- this.edit = 1
- this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
- this.getCreateDepartDownList()
- this.dialogStatus = 'create'
- this.dialogFormVisible = true
- this.$nextTick(() => {
- this.$refs['createTemp'].clearValidate()
- })
- },
- changeBrand(item) {
- this.createTemp.brandName = this.findAllBrand.find(
- (obj) => obj.id === item
- ).name
- },
- changeUpkeepgrade(item) {
- console.log(item)
- },
- upkeepgradeChange(e) {
- if (!e) {
- this.$refs['upkeepgrade'].blur()
- }
- },
- popoverHide(checkedIds, checkedData) {
- // console.log(checkedIds, checkedData)
- if (checkedIds !== null) {
- this.getdataEQNumber.parammaps.eqCode = checkedData.typeCode
- // if (checkedData.children === undefined) {
- // this.createTemp.eqClassId = checkedData.eqClassId
- // this.createTemp.eqName = checkedData.NewName
- // this.getdataListParm.parammaps.eqClassId = checkedData.eqClassId
- // this.getEQNumber()
- // } else {
- // this.defaultCheckedKeys = []
- // this.createTemp.eqClassId = ''
- // this.getdataListParm.parammaps.eqClassId = ''
- // this.$message({ type: 'warning', message: '请选择具体设备类型' })
- // }
- this.createTemp.eqClassId = checkedData.eqClassId
- this.createTemp.eqName = checkedData.NewName
- this.getdataListParm.parammaps.eqClassId = checkedData.eqClassId
- this.getEQNumber()
- } else {
- this.defaultCheckedKeys = []
- this.createTemp.eqClassId = ''
- this.getdataListParm.parammaps.eqClassId = ''
- }
- },
- add_dialog_save() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['createTemp'].validate((valid) => {
- if (valid) {
- console.log(this.createTemp)
- this.requestParam.name = 'insertAsset'
- if (this.createTemp.status == '正常') {
- this.createTemp.status = 17
- }
- if (this.createTemp.providerId == '') {
- this.createTemp.providerId = 0
- }
- if (this.createTemp.brandId == '') {
- this.createTemp.brandId = 0
- }
- if (this.createTemp.yuanzhi == '') {
- this.createTemp.yuanzhi = 0
- }
- if (this.createTemp.salvage == '') {
- this.createTemp.salvage = 0
- }
- if (this.createTemp.subtractvalue == '') {
- this.createTemp.subtractvalue = 0
- }
- if (this.createTemp.yearUpkeepCost == '') {
- this.createTemp.yearUpkeepCost = 0
- }
- if (this.createTemp.yearMaintainCost == '') {
- this.createTemp.yearMaintainCost = 0
- }
- if (this.createTemp.baseHours == '') {
- this.createTemp.baseHours = 0
- }
- // 原值yuanzhi残值salvage月核减值subtractvalue保养费用yearUpkeepCost维修费用yearMaintainCost
- var rulesValue = /^\d+(\.\d{1,3})?$/
- this.requestParam.parammaps = this.createTemp
- this.requestParam.parammaps.picpath = this.createTemp.picpath
- if (
- this.createTemp.yuanzhi !== '' ||
- this.createTemp.salvage !== '' ||
- this.createTemp.subtractvalue !== '' ||
- this.createTemp.yearUpkeepCost !== '' ||
- this.createTemp.yearMaintainCost !== ''
- ) {
- this.requestParam.parammaps.yuanzhi = parseFloat(
- this.createTemp.yuanzhi
- )
- if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi))) {
- this.$message({
- type: 'error',
- message: '原值请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (!rulesValue.test(parseFloat(this.createTemp.salvage))) {
- this.$message({
- type: 'error',
- message: '残值请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (!rulesValue.test(parseFloat(this.createTemp.subtractvalue))) {
- this.$message({
- type: 'error',
- message: '月核减值请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (!rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost))) {
- this.$message({
- type: 'error',
- message: '保养费用输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (
- !rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))
- ) {
- this.$message({
- type: 'error',
- message: '维修费用请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- }
- if (
- this.requestParam.parammaps.maintenance.length != 0 &&
- this.requestParam.parammaps.maintenance
- ) {
- if (this.requestParam.parammaps.maintenance.length > 4) {
- this.$notify({
- title: '提示',
- message: '指定维修人最多4个人!',
- type: 'success',
- duration: 2000
- })
- return false
- }
- this.requestParam.parammaps.maintenance =
- this.requestParam.parammaps.maintenance.toString()
- }
- PostDataByName(this.requestParam).then((response) => {
- console.log('新增保存发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- if (this.getdataListParm.parammaps.inputDatetime1 === null) {
- this.getdataListParm.parammaps.inputDatetime1 = ''
- }
- this.dialogFormVisible = false
- this.get_table_data()
- this.$notify({
- title: '成功',
- message: '新增成功',
- type: 'success',
- duration: 2000
- })
- // this.reload()
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- },
- // 继续新增
- add_dialog_save_again() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['createTemp'].validate((valid) => {
- if (valid) {
- this.requestParam.name = 'insertAsset'
- if (this.createTemp.status == '正常') {
- this.createTemp.status = 17
- }
- if (this.createTemp.providerId == '') {
- this.createTemp.providerId = 0
- }
- if (this.createTemp.brandId == '') {
- this.createTemp.brandId = 0
- }
- if (this.createTemp.yuanzhi == '') {
- this.createTemp.yuanzhi = 0
- }
- if (this.createTemp.salvage == '') {
- this.createTemp.salvage = 0
- }
- if (this.createTemp.subtractvalue == '') {
- this.createTemp.subtractvalue = 0
- }
- if (this.createTemp.yearUpkeepCost == '') {
- this.createTemp.yearUpkeepCost = 0
- }
- if (this.createTemp.yearMaintainCost == '') {
- this.createTemp.yearMaintainCost = 0
- }
- if (this.createTemp.baseHours == '') {
- this.createTemp.baseHours = 0
- }
- // 原值yuanzhi残值salvage月核减值subtractvalue保养费用yearUpkeepCost维修费用yearMaintainCost
- var rulesValue = /^\d+(\.\d{1,3})?$/
- this.requestParam.parammaps = this.createTemp
- this.requestParam.parammaps.picpath = this.createTemp.picpath
- if (
- this.createTemp.yuanzhi !== '' ||
- this.createTemp.salvage !== '' ||
- this.createTemp.subtractvalue !== '' ||
- this.createTemp.yearUpkeepCost !== '' ||
- this.createTemp.yearMaintainCost !== ''
- ) {
- this.requestParam.parammaps.yuanzhi = parseFloat(
- this.createTemp.yuanzhi
- )
- // 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))) {
- if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi))) {
- this.$message({
- type: 'error',
- message: '原值请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (!rulesValue.test(parseFloat(this.createTemp.salvage))) {
- this.$message({
- type: 'error',
- message: '残值请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (!rulesValue.test(parseFloat(this.createTemp.subtractvalue))) {
- this.$message({
- type: 'error',
- message: '月核减值请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (!rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost))) {
- this.$message({
- type: 'error',
- message: '保养费用输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- if (
- !rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))
- ) {
- this.$message({
- type: 'error',
- message: '维修费用请输入自然数,最多保留三位小数点',
- duration: 2000
- })
- return false
- }
- }
- if (
- this.requestParam.parammaps.maintenance.length != 0 &&
- this.requestParam.parammaps.maintenance
- ) {
- if (this.requestParam.parammaps.maintenance.length > 4) {
- this.$notify({
- title: '提示',
- message: '指定维修人最多4个人!',
- type: 'success',
- duration: 2000
- })
- return false
- }
- this.requestParam.parammaps.maintenance =
- this.requestParam.parammaps.maintenance.toString()
- }
- PostDataByName(this.requestParam).then((response) => {
- console.log('新增保存发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.resetCreateTemp()
- this.$notify({
- title: '成功',
- message: '新增成功',
- type: 'success',
- duration: 2000
- })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- },
- form_edit(row) {
- // row.eqCode = ''// TODO:
- if (row.eqCode != '') {
- this.isShow = true
- } else {
- this.isShow = false
- }
- if (this.dialogFormVisible) {
- return
- }
- this.edit = 0
- this.getDepartParam.parammaps.pastureId = row.pastureId
- this.getCreateDepartDownList()
- this.createTemp = Object.assign({}, row) // copy obj
- if (row.inputUser !== undefined) {
- this.createTemp.inputUser = parseInt(row.inputUser)
- }
- if (row.levelone !== undefined) {
- this.createTemp.levelone = parseInt(row.levelone)
- }
- if (row.leveltwo !== undefined) {
- this.createTemp.leveltwo = parseInt(row.leveltwo)
- }
- if (row.levelthree !== undefined) {
- this.createTemp.levelthree = parseInt(row.levelthree)
- }
- if (row.leveloneTime !== undefined) {
- this.createTemp.leveloneTime = parseInt(row.leveloneTime)
- }
- if (row.leveltwoTime !== undefined) {
- this.createTemp.leveltwoTime = parseInt(row.leveltwoTime)
- }
- if (row.levelthreeTime !== undefined) {
- this.createTemp.levelthreeTime = parseInt(row.levelthreeTime)
- }
- if (row.maintenance && row.maintenance.length > 0) {
- var newArr = row.maintenance.split(',')
- var arr2 = []
- newArr.forEach(function(item) {
- arr2.push(parseInt(item))
- })
- console.log('arr2', arr2)
- this.createTemp.maintenance = arr2
- } else {
- this.$set(this.createTemp, 'maintenance', [])
- }
- if (this.createTemp.eqClassId !== undefined) {
- this.defaultCheckedKeys = [this.createTemp.eqClassId]
- } else {
- this.createTemp.eqClassId = ''
- this.defaultCheckedKeys = []
- }
- this.dialogStatus = 'update'
- this.dialogFormVisible = true
- this.$nextTick(() => {
- this.$refs['createTemp'].clearValidate()
- })
- const urlArray = []
- const fileList = []
- if (row.picpath == undefined) {
- urlArray.push()
- } else if (row.picpath == '') {
- urlArray.push()
- } else {
- urlArray.push(row.picpath)
- }
- for (let i = 0; i < urlArray.length; i++) {
- const urlObj = {}
- this.$set(urlObj, 'url', urlArray[i])
- fileList.push(urlObj)
- }
- this.$set(this.createTemp, 'fileList', fileList)
- console.log(this.createTemp)
- if (this.createTemp.fileList.length >= 1) {
- this.showUpload = true
- } else {
- this.showUpload = false
- }
- },
- edit_dialog_save() {
- console.log(this.createTemp.maintenance)
- this.$refs['createTemp'].validate((valid) => {
- if (valid) {
- console.log('-----------', this.createTemp)
- console.log(this.createTemp.providerId)
- if (
- this.createTemp.eqClassId == '' ||
- this.createTemp.eqClassId == undefined ||
- this.createTemp.eqClassId == null
- ) {
- this.$message({ type: 'warning', message: '请选择设备类别' })
- } else {
- this.requestParam.name = 'updateAsset'
- this.requestParam.parammaps = this.createTemp
- if (this.createTemp.status === '正常') {
- this.createTemp.status = 17
- }
- if (this.createTemp.status === '闲置') {
- this.createTemp.status = 18
- }
- if (this.createTemp.status === '报废') {
- this.createTemp.status = 19
- }
- if (this.createTemp.status === '封存') {
- this.createTemp.status = 20
- }
- if (
- this.createTemp.providerId === '' ||
- this.createTemp.providerId === undefined
- ) {
- this.createTemp.providerId = 0
- }
- if (
- this.createTemp.brandId === '' ||
- this.createTemp.brandId == undefined
- ) {
- this.createTemp.brandId = 0
- }
- if (this.createTemp.yuanzhi === '') {
- this.createTemp.yuanzhi = 0
- }
- if (this.createTemp.salvage === '') {
- this.createTemp.salvage = 0
- }
- if (this.createTemp.subtractvalue === '') {
- this.createTemp.subtractvalue = 0
- }
- if (this.createTemp.yearUpkeepCost === '') {
- this.createTemp.yearUpkeepCost = 0
- }
- if (this.createTemp.yearMaintainCost === '') {
- this.createTemp.yearMaintainCost = 0
- }
- if (this.createTemp.baseHours === '') {
- this.createTemp.baseHours = 0
- }
- if (
- this.createTemp.upkeepgrade === 'A' ||
- this.createTemp.upkeepgrade === 'B' ||
- this.createTemp.upkeepgrade === 'C'
- ) {
- this.createTemp.upkeepgrade = this.createTemp.upkeepgradeId
- this.createTemp.upkeepgradeId = ''
- }
- this.createTemp.deptId = this.createTemp.deptId
- this.createTemp.departmentName = this.createTemp.departmentName
- this.createTemp.employeeId = this.createTemp.employeId
- // var rulesValue = /^\d+(\.\d{1,3})?$/
- this.requestParam.parammaps = this.createTemp
- if (this.tabName === 'first') {
- this.requestParam.parammaps.SHStatus = this.createTemp.SHStatus
- } else if (this.tabName === 'second') {
- this.requestParam.parammaps.SHStatus = 0
- }
- const picpath = parseInt(this.createTemp.picpath)
- if (isNaN(picpath) == false) {
- this.requestParam.parammaps.picpath = this.createTemp.picpath
- } else {
- this.requestParam.parammaps.picpath = this.createTemp.picId
- }
- if (
- this.requestParam.parammaps.maintenance.length != 0 &&
- this.requestParam.parammaps.maintenance
- ) {
- if (this.requestParam.parammaps.maintenance.length > 4) {
- this.$notify({
- title: '提示',
- message: '指定维修人最多4个人!',
- type: 'success',
- duration: 2000
- })
- return false
- }
- this.requestParam.parammaps.maintenance =
- this.requestParam.parammaps.maintenance.toString()
- }
- if (
- this.requestParam.parammaps.duration == undefined ||
- this.requestParam.parammaps.duration == '' ||
- this.requestParam.parammaps.duration == null
- ) {
- this.requestParam.parammaps.duration == 0
- this.$set(this.requestParam.parammaps, 'duration', 0)
- }
- console.log(this.createTemp.maintenance, 'maintenance')
- PostDataByName(this.requestParam).then((response) => {
- console.log(response)
- if (response.msg !== 'fail') {
- if (this.getdataListParm.parammaps.inputDatetime1 === null) {
- this.getdataListParm.parammaps.inputDatetime1 = ''
- }
- this.get_table_data()
- this.get_table_dataSH()
- this.dialogFormVisible = false
- this.$notify({
- title: '成功',
- message: '保存成功-',
- type: 'success',
- duration: 2000
- })
- // this.reload()
- } else {
- const arr = this.requestParam.parammaps.maintenance.split(',')
- const arr1 = []
- for (let i = 0; i < arr.length; i++) {
- arr1.push(parseInt(arr[i]))
- }
- this.$set(this.createTemp, 'maintenance', arr1)
- failproccess(response, this.$notify)
- }
- })
- }
- }
- })
- },
- brandSearch(queryString, cb) {
- console.log('品牌模糊查询输入值', queryString)
- this.requestBrand.parammaps['brandName'] = queryString
- GetDataByName(this.requestBrand).then((response) => {
- console.log('品牌模糊查询搜索data', response.data.list)
- this.BrandList = response.data.list
- cb(this.BrandList)
- })
- },
- handleSelectBrand(item) {
- console.log('品牌模糊查询选中值', item)
- this.$set(this.createTemp, 'brandName', item.brandName)
- this.$set(this.createTemp, 'brandId', item.brandId)
- this.$forceUpdate()
- },
- employeSearch(queryString, cb) {
- console.log('责任人模糊查询输入值', queryString)
- this.requestEmploye.parammaps['empname'] = queryString
- GetDataByName(this.requestEmploye).then((response) => {
- console.log('责任人模糊查询搜索data', response.data.list)
- this.employeList = response.data.list
- cb(this.employeList)
- })
- },
- handleSelectEmploye(item) {
- console.log('责任人模糊查询选中值', item)
- this.$set(this.createTemp, 'employeId', item.id)
- this.$set(this.createTemp, 'employeName', item.name)
- this.$forceUpdate()
- },
- form_see(row) {
- console.log(row, 'hss')
- // this.getWorks()
- this.seeTemp = Object.assign({}, row) // copy obj
- this.activeName = 'first'
- this.dialogStatus = 'card'
- this.dialogFormVisible_See = true
- // 流程图
- var reason = '未通过原因:' + this.seeTemp.workflowNote
- if (this.seeTemp.SHStatus === 0) {
- this.activeList = [
- {
- title: '提交信息',
- date: this.seeTemp.inputDatetime,
- name: this.seeTemp.inputUserName
- },
- { title: '设备中心审核' }
- ]
- this.active = 1
- } else if (this.seeTemp.SHStatus === 1) {
- this.activeList = [
- {
- title: '提交信息',
- date: this.seeTemp.inputDatetime,
- name: this.seeTemp.inputUserName
- },
- {
- title: '设备中心审核',
- date: this.seeTemp.chargeDate,
- name: this.seeTemp.chargePerson
- }
- ]
- this.active = 2
- } else if (this.seeTemp.SHStatus === 2) {
- this.activeList = [
- {
- title: '提交信息',
- date: this.seeTemp.inputDatetime,
- name: this.seeTemp.inputUserName
- },
- {
- title: '设备中心审核',
- date: this.seeTemp.chargeDate,
- name: this.seeTemp.chargePerson,
- status: 'error',
- reason: reason
- }
- ]
- this.active = 2
- }
- // 查看-点检记录
- },
- form_seeTabClick(val) {
- console.log(val)
- if (val.name == 'second') {
- this.getAssetBigSpotCheckList()
- } else if (val.name == 'third') {
- this.getBigupkeepbyeqList()
- } else if (val.name == 'fouth') {
- this.getAssetMaintainList()
- } else if (val.name == 'fifth') {
- this.getAssetSTTList()
- } else if (val.name == 'sixth') {
- this.getAssetChangeList()
- } else if (val.name == 'seventh') {
- this.getAssetPartApplyList()
- } else if (val.name == 'eighth') {
- this.getBarChart1Parm.parammaps.eqId = this.seeTemp.id
- this.getBarChart2Parm.parammaps.eqId = this.seeTemp.id
- this.getChartSeeParm.parammaps.eqId = this.seeTemp.id
- this.getBarChart1()
- this.getBarChart2()
- }
- },
- // 点检记录
- getAssetBigSpotCheckList() {
- this.listLoadingSpotCheck1 = true
- if (
- this.$refs['inputDatetimeCheck1'] !== undefined &&
- this.$refs['inputDatetimeCheck1'].value !== null
- ) {
- this.getAssetBigSpotCheckListParm.parammaps.startTime =
- this.$refs['inputDatetimeCheck1'].value[0]
- this.getAssetBigSpotCheckListParm.parammaps.stopTime =
- this.$refs['inputDatetimeCheck1'].value[1]
- } else {
- this.getAssetBigSpotCheckListParm.parammaps.startTime = ''
- this.getAssetBigSpotCheckListParm.parammaps.stopTime = ''
- }
- this.getAssetBigSpotCheckListParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetBigSpotCheckListParm.parammaps.pastureId =
- this.seeTemp.pastureId
- GetDataByName(this.getAssetBigSpotCheckListParm).then((response) => {
- console.log('点检记录-table数据', response.data.list)
- if (response.data.list !== null) {
- this.listSpotCheck1 = response.data.list
- this.pageNumSpotCheck1 = response.data.pageNum
- this.pageSizeSpotCheck1 = response.data.pageSize
- } else {
- this.listSpotCheck1 = []
- }
- this.totalSpotCheck1 = response.data.total
- setTimeout(() => {
- this.listLoadingSpotCheck1 = false
- }, 100)
- })
- },
- form_searchSportCheck() {
- if (
- this.getAssetBigSpotCheckListParm.parammaps.inputDatetimeCheck1 == null
- ) {
- this.getAssetBigSpotCheckListParm.parammaps.inputDatetimeCheck1 = ''
- }
- this.getAssetBigSpotCheckListParm.offset = 1
- this.getAssetBigSpotCheckList()
- },
- // 保养记录
- getBigupkeepbyeqList() {
- this.listLoadingSpotCheck1 = true
- if (
- this.$refs['inputDatetimeUpkeepbyeq'] !== undefined &&
- this.$refs['inputDatetimeUpkeepbyeq'].value !== null
- ) {
- this.getBigupkeepbyeqParm.parammaps.startTime =
- this.$refs['inputDatetimeUpkeepbyeq'].value[0]
- this.getBigupkeepbyeqParm.parammaps.stopTime =
- this.$refs['inputDatetimeUpkeepbyeq'].value[1]
- } else {
- this.getBigupkeepbyeqParm.parammaps.startTime = ''
- this.getBigupkeepbyeqParm.parammaps.stopTime = ''
- }
- this.getBigupkeepbyeqParm.parammaps.assetId = this.seeTemp.assetId
- this.getBigupkeepbyeqParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getBigupkeepbyeqParm).then((response) => {
- console.log('保养记录-table数据', response.data.list)
- if (response.data.list !== null) {
- this.listUpkeepbyeq = response.data.list
- this.pageNumUpkeepbyeq = response.data.pageNum
- this.pageSizeUpkeepbyeq = response.data.pageSize
- } else {
- this.listUpkeepbyeq = []
- }
- this.totalUpkeepbyeq = response.data.total
- setTimeout(() => {
- this.listLoadingSpotCheck1 = false
- }, 100)
- })
- },
- form_searchUpkeepbyeq() {
- if (
- this.getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq === null
- ) {
- this.getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq = ''
- }
- this.getBigupkeepbyeqParm.offset = 1
- this.getBigupkeepbyeqList()
- },
- // 维修记录
- getAssetMaintainList() {
- this.listLoadingAssetMaintain = true
- if (
- this.$refs['inputDatetimeAssetMaintain'] !== undefined &&
- this.$refs['inputDatetimeAssetMaintain'].value !== null
- ) {
- this.getAssetMaintainParm.parammaps.startTime =
- this.$refs['inputDatetimeAssetMaintain'].value[0]
- this.getAssetMaintainParm.parammaps.stopTime =
- this.$refs['inputDatetimeAssetMaintain'].value[1]
- } else {
- this.getAssetMaintainParm.parammaps.startTime = ''
- this.getAssetMaintainParm.parammaps.stopTime = ''
- }
- this.getAssetMaintainParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetMaintainParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetMaintainParm).then((response) => {
- console.log('维修记录-tabile数据', response.data.list)
- if (response.data.list !== null) {
- this.listAssetMaintain = response.data.list
- this.pageNumAssetMaintain = response.data.pageNum
- this.pageSizeAssetMaintain = response.data.pageSize
- } else {
- this.listAssetMaintain = []
- }
- this.totalAssetMaintain = response.data.total
- setTimeout(() => {
- this.listLoadingAssetMaintain = false
- }, 100)
- })
- },
- form_searchAssetMaintain() {
- if (
- this.getBigupkeepbyeqParm.parammaps.inputDatetimeAssetMaintan === null
- ) {
- this.getBigupkeepbyeqParm.parammaps.inputDatetimeAssetMaintan = ''
- }
- this.getBigupkeepbyeqParm.offset = 1
- this.getAssetMaintainList()
- },
- // 启停记录
- getAssetSTTList() {
- this.listLoadingAssetSTT = true
- this.getAssetSTTParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetSTTParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetSTTParm).then((response) => {
- console.log('启停记录-tabile数据', response.data.list)
- if (response.data.list !== null) {
- this.listAssetSTT = response.data.list
- this.pageNumAssetSTT = response.data.pageNum
- this.pageSizeAssetSTT = response.data.pageSize
- } else {
- this.listAssetSTT = []
- }
- this.totalAssetSTT = response.data.total
- setTimeout(() => {
- this.listLoadingAssetSTT = false
- }, 100)
- })
- },
- form_searchAssetSTT() {
- if (this.getAssetSTTParm.parammaps.startTime == null) {
- this.getAssetSTTParm.parammaps.startTime = ''
- }
- if (this.getAssetSTTParm.parammaps.stopTime == null) {
- this.getAssetSTTParm.parammaps.stopTime = ''
- }
- this.getAssetSTTParm.offset = 1
- this.getAssetSTTList()
- },
- // 变更记录
- getAssetChangeList() {
- this.listLoadingAssetChange = true
- console.log(this.$refs['inputDatetimeAssetChange'])
- if (
- this.$refs['inputDatetimeAssetChange'] !== undefined &&
- this.$refs['inputDatetimeAssetChange'].value !== null
- ) {
- this.getAssetChangeParm.parammaps.startTime =
- this.$refs['inputDatetimeAssetChange'].value[0]
- this.getAssetChangeParm.parammaps.stopTime =
- this.$refs['inputDatetimeAssetChange'].value[1]
- } else {
- this.getAssetChangeParm.parammaps.startTime = ''
- this.getAssetChangeParm.parammaps.stopTime = ''
- }
- this.getAssetChangeParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetChangeParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetChangeParm).then((response) => {
- console.log('变更记录-tabile数据', response.data.list)
- if (response.data.list !== null) {
- this.listAssetChange = response.data.list
- this.pageNumAssetChange = response.data.pageNum
- this.pageSizeAssetChange = response.data.pageSize
- } else {
- this.listAssetChange = []
- }
- this.totalAssetChange = response.data.total
- setTimeout(() => {
- this.listLoadingAssetChange = false
- }, 100)
- })
- },
- form_searchAssetChange() {
- if (this.getAssetChangeParm.parammaps.inputDatetimeAssetChange === null) {
- this.getAssetChangeParm.parammaps.inputDatetimeAssetChange = ''
- }
- this.getAssetChangeParm.offset = 1
- this.getAssetChangeList()
- },
- changeStatue: function(cellValue) {
- if (cellValue.changeStatue == 17) {
- return '正常'
- } else if (cellValue.changeStatue == 18) {
- return '闲置'
- } else if (cellValue.changeStatue == 19) {
- return '报废'
- } else if (cellValue.changeStatue == 20) {
- return '封存'
- }
- },
- // 备件领用记录
- getAssetPartApplyList() {
- this.listLoadingAssetChange = true
- console.log(this.$refs['inputDatetimeAssetPartApply'].value)
- if (
- this.$refs['inputDatetimeAssetPartApply'] !== undefined &&
- this.$refs['inputDatetimeAssetPartApply'].value !== null &&
- this.$refs['inputDatetimeAssetPartApply'].value !== ''
- ) {
- this.getAssetPartApplyParm.parammaps.startTime =
- this.$refs['inputDatetimeAssetPartApply'].value[0]
- this.getAssetPartApplyParm.parammaps.stopTime =
- this.$refs['inputDatetimeAssetPartApply'].value[1]
- } else {
- this.getAssetPartApplyParm.parammaps.startTime = ''
- this.getAssetPartApplyParm.parammaps.stopTime = ''
- }
- this.getAssetPartApplyParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetPartApplyParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetPartApplyParm).then((response) => {
- console.log('备件领用记录-tabile数据', response.data.list)
- if (response.data.list !== null) {
- this.listAssetPartApply = response.data.list
- this.pageNumAssetPartApply = response.data.pageNum
- this.pageSizeAssetPartApply = response.data.pageSize
- } else {
- this.listAssetPartApply = []
- }
- this.totalAssetPartApply = response.data.total
- setTimeout(() => {
- this.listLoadingAssetPartApply = false
- }, 100)
- })
- },
- form_searchAssetPartApply() {
- this.listLoadingAssetChange = true
- if (
- this.getAssetPartApplyParm.parammaps.inputDatetimeAssetChange == null
- ) {
- this.getAssetPartApplyParm.parammaps.inputDatetimeAssetChange = ''
- }
- this.getAssetPartApplyParm.offset = 1
- this.getAssetPartApplyList()
- },
- getBarChart1() {
- GetReportform(this.getBarChart1Parm).then((response) => {
- console.log('图1', response)
- this.chart_data1 = response.data.chart_data
- var repireCost = response.data.chart_data.repireCost
- var upkeepCost = response.data.chart_data.upkeepCost
- var totaltitle1 = 0
- if (repireCost !== null || repireCost !== undefined) {
- repireCost.forEach(function(item, index) {
- console.log(parseFloat(item))
- totaltitle1 = totaltitle1 + parseFloat(item)
- })
- }
- var totaltitle2 = 0
- if (upkeepCost !== null || upkeepCost !== undefined) {
- upkeepCost.forEach(function(item, index) {
- console.log(parseFloat(item))
- totaltitle2 = totaltitle2 + parseFloat(item)
- })
- }
- this.totaltitle = totaltitle1 + totaltitle2
- this.roadBarChart1(this.chart_data1, this.totaltitle.toFixed(2))
- })
- },
- roadBarChart1(chart_data1, totaltitle) {
- console.log(chart_data1, totaltitle)
- if (this.barChart1 != null) {
- this.barChart1.dispose()
- }
- this.barChart1 = echarts.init(document.getElementById('barChart1'))
- var option = {
- title: {
- text: '年度费用统计(总费用:' + totaltitle + '元)',
- textStyle: { color: '#769cfc' }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: function(data) {
- console.log(data.length)
- var value = 0
- let val = ''
- if (data.length == 1) {
- val += data[0].seriesName + ':' + data[0].data + '元<br/>'
- } else {
- value = (
- parseFloat(data[0].value) + parseFloat(data[1].value)
- ).toFixed(2)
- // eslint-disable-next-line no-unused-vars
- val = data[0].name + '年设备总费用:' + value + '元' + '<br/>'
- val += '维修费用:' + data[0].data + '元<br/>'
- val += '保养费用:' + data[1].data + '元<br/>'
- }
- return val
- }
- },
- legend: {
- data: ['维修费用', '保养费用'],
- x: 'right'
- },
- color: ['#769cfc', '#42b983'],
- grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
- xAxis: [{ type: 'category', data: this.chart_data1.year }],
- yAxis: [{ type: 'value', name: '费用(元)' }],
- series: [
- {
- name: '维修费用',
- type: 'bar',
- barWidth: 60,
- stack: '广告',
- data: this.chart_data1.repireCost
- },
- {
- name: '保养费用',
- type: 'bar',
- barWidth: 60,
- stack: '广告',
- data: this.chart_data1.upkeepCost
- }
- ]
- }
- this.barChart1.setOption(option)
- var that = this
- window.onresize = function() {
- that.barChart1.resize()
- }
- this.barChart1.on('click', function(param, i) {
- console.log(param)
- that.getBarChart2Parm.parammaps.receiveTime = param.name
- that.getBarChart2()
- that.getBarChart1()
- })
- },
- getBarChart2() {
- GetReportform(this.getBarChart2Parm).then((response) => {
- console.log('图2', response)
- this.chart_data2 = response.data.chart_data
- this.roadBarChart2(this.chart_data2)
- })
- },
- roadBarChart2(chart_data1) {
- if (this.barChart2 != null) {
- this.barChart2.dispose()
- }
- this.barChart2 = echarts.init(document.getElementById('barChart2'))
- var option = {
- title: {
- text: this.getBarChart2Parm.parammaps.receiveTime + '年月度费用统计',
- textStyle: { color: '#769cfc' }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- },
- formatter: function(data) {
- console.log(data)
- var value = 0
- var val = ''
- if (data.length == 1) {
- val += data[0].seriesName + ':' + data[0].data + '元<br/>'
- } else {
- value = (
- parseFloat(data[0].value) + parseFloat(data[1].value)
- ).toFixed(2)
- val = data[0].name + '月设备总费用:' + value + '元' + '<br/>'
- val += '维修费用:' + data[0].data + '元<br/>'
- val += '保养费用:' + data[1].data + '元<br/>'
- }
- return val
- }
- },
- legend: {
- data: ['维修费用', '保养费用'],
- x: 'right'
- },
- color: ['#769cfc', '#42b983'],
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{ type: 'category', data: this.chart_data2.months }],
- yAxis: [{ type: 'value', name: '费用(元)' }],
- series: [
- {
- name: '维修费用',
- type: 'bar',
- stack: '广告',
- data: this.chart_data2.repireCost
- },
- {
- name: '保养费用',
- type: 'bar',
- stack: '广告',
- data: this.chart_data2.upkeepCost
- }
- ]
- }
- this.barChart2.setOption(option)
- var that = this
- window.onresize = function() {
- that.barChart2.resize()
- }
- this.barChart2.on('click', function(param, i) {
- console.log(param)
- that.dialogFormVisible_ChartSee = true
- that.dialogStatus = 'card'
- that.getChartSeeParm.parammaps.receiveTime = param.name
- that.getChartSeeList()
- that.getBarChart1()
- that.getBarChart2()
- })
- },
- getChartSeeList() {
- this.listLoadingChartSee = true
- if (
- this.$refs['inputDatetime2'] !== undefined &&
- this.$refs['inputDatetime2'].value !== null
- ) {
- this.getChartSeeParm.parammaps.startTime =
- this.$refs['inputDatetime2'].value[0]
- this.getChartSeeParm.parammaps.stopTime =
- this.$refs['inputDatetime2'].value[1]
- } else {
- this.getChartSeeParm.parammaps.startTime = ''
- this.getChartSeeParm.parammaps.stopTime = ''
- }
- GetDataByName(this.getChartSeeParm).then((response) => {
- console.log('table数据', response.data.list)
- if (response.data.list !== null) {
- this.listChartSee = response.data.list
- this.pageNumChartSee = response.data.pageNum
- this.pageSizeChartSee = response.data.pageSize
- if (response.data.total) {
- this.totalChartSee = response.data.total
- }
- } else {
- this.listChartSee = []
- }
- setTimeout(() => {
- this.listLoadingChartSee = false
- }, 100)
- })
- },
- form_searchChartSee() {
- this.listLoadingChartSee = true
- if (this.getChartSeeParm.parammaps.inputDatetime2 === null) {
- this.getChartSeeParm.parammaps.inputDatetime2 = ''
- }
- this.getChartSeeParm.offset = 1
- this.getChartSeeList()
- },
- handleDownloadChartSee() {
- this.$alert(
- '正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
- {}
- )
- this.isPercentage = true
- this.percentage = 1
- var timer = setInterval(() => {
- this.percentage += 5
- if (this.percentage > 95) {
- this.percentage = 99
- clearInterval(timer)
- }
- this.percentage = this.percentage
- }, 1000)
- this.downLoadParm2.name = 'getEqPartuseDetailList'
- this.downLoadParm2.returntype = 'Map'
- this.downLoadParm2.parammaps = this.getChartSeeParm.parammaps
- GetAccount(this.downLoadParm2).then((response) => {
- this.$nextTick(() => {
- this.downLoadList2 = response.data.list
- if (response.data.list !== '') {
- this.percentage = 99
- setTimeout(() => {
- this.isPercentage = false
- }, 2000)
- }
- console.log(this.downLoadList2)
- const ExcelDatas = [
- {
- tHeader: [
- '类型',
- '单号',
- '领用日期',
- '领用部门',
- '备件编号',
- '备件名称',
- '备件规格',
- '备件品牌',
- '计量单位',
- '出库数量',
- '退库数量',
- '单价',
- '总价'
- ],
- filterVal: [
- 'useTypeV',
- 'RUcode',
- 'creatTime',
- 'departmentName',
- 'partCode',
- 'partName',
- 'specification',
- 'brandName',
- 'unit',
- 'checkoutNumber',
- 'quitNumber',
- 'price',
- 'sumPrice'
- ],
- tableDatas: this.downLoadList2,
- sheetName: '费用统计'
- }
- ]
- json2excel(ExcelDatas, '费用统计', true, 'xlsx')
- })
- })
- },
- form_delete(row) {
- MessageBox.confirm('确认删除此信息?', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- this.requestParam.name = 'deleteAsset'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps['id'] = row.id
- PostDataByName(this.requestParam).then(() => {
- if (this.getdataListParm.parammaps.inputDatetime1 === null) {
- this.getdataListParm.parammaps.inputDatetime1 = ''
- }
- this.get_table_data()
- this.get_table_dataSH()
- this.dialogFormVisible = false
- this.$notify({
- title: '成功',
- message: '删除成功',
- type: 'success',
- duration: 2000
- })
- })
- })
- .catch(() => {
- this.$message({ type: 'info', message: '已取消删除' })
- })
- },
- getDownClassList() {
- getRecuData(this.getRecuListParm).then((response) => {
- this.parentClass = response.data
- })
- },
- getEQNumber() {
- this.getdataEQNumber.parammaps.pastureId = Cookies.get('pastureid')
- GetDataByName(this.getdataEQNumber).then((response) => {
- this.createTemp.assetCode = response.data.list[0].createNumber
- console.log(response.data.list[0].createNumber)
- console.log(this.createTemp.assetCode)
- this.$forceUpdate()
- })
- },
- handleTabClick(val) {
- console.log('点击了基础信息/审核设备tab', val)
- if (val.name == 'first') {
- this.isFlowChart = false
- this.isDisplayRecord = true
- } else {
- this.isFlowChart = true
- this.isDisplayRecord = false
- }
- this.get_table_data()
- this.get_table_dataSH()
- },
- handleExamine(row) {
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'SHstatue', 1)
- this.$set(this.seeTemp, 'workflowNote', '')
- } else {
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'SHstatue', 1)
- this.$set(this.examineTemp, 'workflowNote', '')
- }
- this.dialogStatus = 'examine'
- this.dialogFormVisible_Examine = true
- this.statueReason = false
- this.keyupSubmit()
- },
- changeSHStatue(val) {
- if (val == 2) {
- this.statueReason = true
- } else {
- this.statueReason = false
- }
- },
- keyupSubmit() {
- document.onkeydown = (e) => {
- const _key = window.event.keyCode
- if (_key === 13) {
- this.createExamineData()
- }
- }
- },
- createExamineData() {
- if (this.dialogStatus !== 'update' && this.dialogStatus !== 'create') {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate((valid) => {
- if (valid) {
- this.requestParam.name = 'eqCharge'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- if (this.examineTemp.SHstatue == 1) {
- this.requestParam.parammaps.statue = 1
- } else {
- this.requestParam.parammaps.statue = 2
- }
- this.requestParam.parammaps.empId = Cookies.get('employeid')
- this.requestParam.parammaps.workflowNote =
- this.examineTemp.workflowNote
- PostDataByName(this.requestParam).then((response) => {
- console.log('审核确认发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- this.dialogFormVisible_Examine = false
- this.dialogFormVisible_See = false
- this.statueReason = false
- this.$notify({
- title: '成功',
- message: '审核成功',
- type: 'success',
- duration: 2000
- })
- this.get_table_dataSH()
- this.get_table_data()
- this.activeName == 'second'
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- }
- },
- handleDownload() {
- this.$alert(
- '设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
- {}
- )
- this.isPercentage = true
- this.percentage = 1
- var timer = setInterval(() => {
- this.percentage += 5
- if (this.percentage > 95) {
- this.percentage = 99
- clearInterval(timer)
- }
- this.percentage = this.percentage
- }, 1000)
- this.downLoadParm.name = 'getAssetList'
- this.downLoadParm.parammaps = this.getdataListParm.parammaps
- GetAccount(this.downLoadParm).then((response) => {
- this.downLoadList = response.data.list
- if (response.data.list !== '') {
- this.percentage = 99
- setTimeout(() => {
- this.isPercentage = false
- }, 2000)
- }
- console.log(this.downLoadList)
- const elecExcelDatas = [
- {
- tHeader: [
- '牧场',
- '设备类别',
- '资产编号',
- '设备名称',
- '设备内部编号',
- '设备规格',
- '品牌',
- '供应商',
- '用途',
- '状态',
- '购置日期',
- '入场日期',
- '折旧年限',
- '财务编号',
- '原值',
- '残值',
- '月核减值',
- '保养级别',
- '保养费用',
- '维修费用',
- '基数(小时)',
- '部门',
- '责任人',
- '录入人',
- '录入时间',
- '使用时长(年)',
- '使用率(%)',
- '指定维修人',
- '一级督办',
- '一级间隔时间',
- '二级督办',
- '二级间隔时间',
- '三级督办',
- '三级间隔时间',
- '物联网编码',
- '标准工作时长',
- '工作类别'
- ],
- filterVal: [
- 'pastureName',
- 'eqClassName',
- 'assetCode',
- 'eqName',
- 'eqCode',
- 'specification',
- 'brandName',
- 'providerName',
- 'purpose',
- 'status',
- 'purchaseDate',
- 'entranceDate',
- 'depreciation',
- 'financeCode',
- 'yuanzhi',
- 'salvage',
- 'subtractvalue',
- 'upkeepgrade',
- 'yearUpkeepCost',
- 'yearMaintainCost',
- 'baseHours',
- 'deptName',
- 'employeName',
- 'inputUserName',
- 'inputDatetime',
- 'serviceDuration',
- 'utilizationRate',
- 'maintenanceName',
- 'leveloneName',
- 'leveloneTime',
- 'leveltwoName',
- 'leveltwoTime',
- 'levelthreeName',
- 'levelthreeTime',
- 'license',
- 'duration',
- 'work'
- ],
- tableDatas: this.downLoadList,
- sheetName: '设备基础信息'
- }
- ]
- json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
- })
- },
- handleDownloadSH() {
- this.$alert(
- '设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出',
- {}
- )
- this.isPercentage = true
- this.percentage = 1
- var timer = setInterval(() => {
- this.percentage += 5
- if (this.percentage > 95) {
- this.percentage = 99
- clearInterval(timer)
- }
- this.percentage = this.percentage
- }, 1000)
- this.downLoadParm.name = 'getAssetListSH'
- this.downLoadParm.parammaps = this.getdataListParmSH.parammaps
- GetAccount(this.downLoadParm).then((response) => {
- this.downLoadList = response.data.list
- if (response.data.list !== '') {
- this.percentage = 99
- setTimeout(() => {
- this.isPercentage = false
- }, 2000)
- }
- console.log(this.downLoadList)
- const elecExcelDatas = [
- {
- tHeader: [
- '设备类别',
- '资产编号',
- '设备名称',
- '设备内部编号',
- '设备规格',
- '品牌',
- '供应商',
- '用途',
- '状态',
- '购置日期',
- '入场日期',
- '折旧年限',
- '财务编号',
- '原值',
- '残值',
- '月核减值',
- '保养级别',
- '保养费用',
- '维修费用',
- '基数(小时)',
- '牧场',
- '部门',
- '责任人',
- '录入人',
- '录入时间'
- ],
- filterVal: [
- 'eqClassName',
- 'assetCode',
- 'eqName',
- 'eqCode',
- 'specification',
- 'brandName',
- 'providerName',
- 'purpose',
- 'status',
- 'purchaseDate',
- 'entranceDate',
- 'depreciation',
- 'financeCode',
- 'yuanzhi',
- 'salvage',
- 'subtractvalue',
- 'upkeepgrade',
- 'yearUpkeepCost',
- 'yearMaintainCost',
- 'baseHours',
- 'pastureName',
- 'deptName',
- 'employeName',
- 'inputUserName',
- 'inputDatetime'
- ],
- tableDatas: this.downLoadList,
- sheetName: '设备基础信息'
- }
- ]
- json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
- })
- },
- handleSelectionChange(item) {
- this.selectionList = item
- },
- handleBatchChange() {
- if (this.selectionList.length > 0) {
- for (let i = 0; i < this.selectionList.length; i++) {
- if (
- this.selectionList[i].pastureId !== this.selectionList[0].pastureId
- ) {
- this.$message({
- type: 'error',
- message: '请检测变更牧场是否一致!',
- duration: 2000
- })
- return false
- }
- }
- console.log('批量变更')
- this.batchChange.temp.departmentId = ''
- this.batchChange.temp.employeeId = ''
- this.batchChange.deptList = []
- this.batchChange.personList = []
- this.dialogFormVisible_change = true
- this.dialogStatus = 'change'
- this.batchChange.getdataListParmDept.parammaps.pastureId =
- this.selectionList[0].pastureId
- this.getBatchChangeDeptDownList()
- } else {
- this.$message({
- type: 'error',
- message: '请选择变更牧场',
- duration: 2000
- })
- }
- },
- getBatchChangeDeptDownList() {
- GetDataByName(this.batchChange.getdataListParmDept).then((response) => {
- if (response.data.list !== null) {
- this.batchChange.deptList = response.data.list
- } else {
- this.batchChange.deptList = []
- }
- })
- },
- changeBatchDept(item) {
- console.log(item)
- this.batchChange.getdataListParmPerson.parammaps.deptId = item
- this.batchChange.temp.employeeId = ''
- this.batchChange.getdataListParmPerson.parammaps.pastureId =
- this.batchChange.deptList.find((obj) => obj.deptid == item).pastureId
- this.getBatchChangePersonDownList()
- },
- getBatchChangePersonDownList() {
- GetDataByName(this.batchChange.getdataListParmPerson).then((response) => {
- if (response.data.list !== null) {
- this.batchChange.personList = response.data.list
- } else {
- this.batchChange.personList = []
- }
- })
- },
- changeBatchPerson(item) {
- console.log(item)
- this.batchChange.temp.employeeId = item
- this.batchChange.temp.employeName = this.batchChange.personList.find(
- (obj) => obj.id == item
- ).empname
- this.$forceUpdate()
- },
- changeData() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['batchChangeTemp'].validate((valid) => {
- if (valid) {
- this.requestParam = {}
- var array = []
- for (let i = 0; i < this.selectionList.length; i++) {
- var obj = {}
- var parammaps = {}
- obj.name = 'updateEquipmentALL'
- obj.offset = 0
- obj.pagecount = 0
- parammaps.departmentId = this.batchChange.temp.departmentId
- parammaps.employeeId = this.batchChange.temp.employeeId
- parammaps.employeName = this.batchChange.temp.employeName
- parammaps.id = this.selectionList[i].id
- obj.parammaps = parammaps
- array.push(obj)
- }
- this.requestParam.array = array
- PostDataByNames(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- this.dialogFormVisible_change = false
- this.$notify({
- title: '成功',
- message: '保存成功',
- type: 'success',
- duration: 2000
- })
- this.get_table_data()
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .el-autocomplete-suggestion li {
- padding: 0 3px !important;
- }
- .el-table .warning-row {
- background: oldlace;
- }
- .el-table .success-row {
- background: #f0f9eb;
- }
- </style>
- <style lang="scss">
- .upkeepgrade .el-form-item__label {
- line-height: 20px;
- }
- .inputDatetime .el-range-separator {
- padding: 0;
- margin: 0 10px;
- }
- .el-radio__label {
- padding-left: 2px !important;
- }
- </style>
- <style>
- .el-table .goBeyond {
- background: #f47c7c;
- }
- .el-table .warning {
- background: #989df0;
- }
- .el-table .scrap {
- background: #d7d7d7;
- }
- </style>
|