1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253 |
- <template>
- <div class="app-container">
- <div class="filter-container">
- <el-select v-model="getdataListParm.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="getdataListParm.parammaps.repairCode" placeholder="报修单号" clearable style="width: 130px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 130px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 130px;" class="filter-item" />
- <el-select v-model="getdataListParm.parammaps.orderStatue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in orderStatues" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-select v-model="getdataListParm.parammaps.SHStatue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in SHStatues" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-date-picker
- ref="inputDatetime"
- v-model="getdataListParm.parammaps.inputDatetime"
- 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 class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
- <div>
- <el-button v-if="isRepair" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">报修</el-button>
- <!-- 临时注释 -->
- <el-button v-if="isRepairExport" class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
- <!-- 临时注释 -->
- <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
- <el-radio-button label="全部" />
- <el-badge :value="pending.total" class="item">
- <el-radio-button label="待处理" />
- </el-badge>
- <el-radio-button label="已处理" />
- </el-radio-group>
- </div>
- </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 table-fixed"
- >
- <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">
- <template slot-scope="scope">
- <span>{{ scope.row.repairCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="牧场" width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.pastureName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="设备内部编号" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.eqCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="设备名称" min-width="100px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.eqName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="规格型号" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column label="部门" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.departmentName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="故障情况" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.details }}</span>
- </template>
- </el-table-column>
- <el-table-column label="报修人" min-width="100px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.requesterName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="报修时间" sortable prop="requestTime" min-width="110px" align="center" />
- <el-table-column label="维修日期" sortable prop="stopTime" min-width="110px" align="center" />
- <el-table-column label="维修部门" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.repairDeptName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="处理状态" min-width="100px" align="center" :formatter="orderStatue" />
- <el-table-column label="领用单状态" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.LYStatue }}</span>
- </template>
- </el-table-column>
- <el-table-column label="旧品录入状态" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.LRStatue }}</span>
- </template>
- </el-table-column>
- <el-table-column label="审核状态" min-width="100px" align="center" :formatter="SHStatue" />
- <el-table-column label="操作" align="center" min-width="400" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <el-button v-if="isMaintenanceSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
- <!-- 维修审核 -->
- <el-button v-if="(row.SHStatue == 2) && isMaintenanceAudit && row.requesterId == getdataListParm.parammaps.loginId" style="display:inline-block" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine(row)">维修审核</el-button>
- <el-button v-else style="display:none" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine(row)">维修审核</el-button>
- <!-- 维修审核2 -->
- <el-button v-if="(row.SHStatue == 3) && isMaintenanceAudit2" style="display:inline-block" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine2(row)">维修审核2</el-button>
- <el-button v-else style="display:none" type="success" size="mini" class="successMaintenanceAudit" @click="handleExamine2(row)">主管审核</el-button>
- <!-- 派单 -->
- <el-button v-if="(row.orderStatue == 0) && isDistributeLeaflets" style="display:inline-block" type="success" size="mini" @click="handleDistributeLeaflets(row)">派单</el-button>
- <el-button v-else-if="(row.orderStatue == 1 ||row.orderStatue == 2 )" style="display:none" type="success" size="mini" @click="handleDistributeLeaflets(row)">派单</el-button>
- <!-- 接单 -->
- <el-button v-if="(row.orderStatue == 0 && isReceipt && (row.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
- <el-button v-else-if="(row.orderStatue == 1 ||row.orderStatue == 2 )" style="display:none" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
- <!-- 维修及领用 -->
- <el-button v-if="(row.orderStatue == 1 && row.SHStatue== 1 || row.SHStatue== 4 || row.SHStatue== 6) && isMaintenanceRequisition && (row.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" size="mini" class="successRequisition" @click="handleMaintenanceRequisition(row)">维修及领用</el-button>
- <el-button v-else style="display:none" type="success" size="mini" class="successRequisition" @click="handleMaintenanceRequisition(row)">维修及领用</el-button>
- <!-- 完成维修 -->
- <el-button v-if="(row.orderStatue == 1 && (row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6)) && isRepairComplete && (row.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" size="mini" class="successMaintenanceAudit" @click="handleRepairComplete(row)">完成维修</el-button>
- <el-button v-else style="display:none" type="success" size="mini" class="successMaintenanceAudit" @click="handleRepairComplete(row)">完成维修</el-button>
- <!-- 删除 -->
- <el-button v-if="((row.orderStatue == 0 && row.SHStatue == 1) && isDelete)" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
- <el-button v-else style="display:none" type="success" size="danger" @click="form_delete(row)">删除</el-button>
- <!-- 驳回报修 -->
- <el-button v-if="(row.orderStatue == 0 && isRejectRepair)" style="display:inline-block;" type="success" class="successMaintenanceAudit" size="mini" @click="handleRejectRepair(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="getList" />
-
-
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_Create" :close-on-click-modal="false" width="90%">
- <div class="app-create">
- <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
- <el-row>
- <el-col :span="8">
- <el-form-item label="报修单号:" prop="repairCode">
- <el-input ref="repairCode" v-model="createTemp.repairCode" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="设备名称:" prop="eqName">
- <el-autocomplete
- v-model="createTemp.eqName"
- class="inline-input"
- :fetch-suggestions="querySearchEqName"
- value-key="eqName"
- placeholder="设备名称"
- style="width:100%"
- @select="handleSelectEqName"
- >
- <template slot-scope="{ item }">
- <b>名称:</b><span>{{ item.eqName }}</span>
- | <b>规格:</b><span>{{ item.specification }}</span>
- </template>
- </el-autocomplete>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="设备内部编号:" prop="eqCode">
- <el-autocomplete
- v-model="createTemp.eqCode"
- class="inline-input"
- :fetch-suggestions="querySearchCode"
- style="width:100%"
- value-key="eqCode"
- placeholder="设备内部编号"
- @select="handleSelectEqCode"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="维修人:" prop="pickId">
- <el-select v-model="createTemp.pickId" placeholder="维修人" filterable class="filter-item" style="width:100%" @change="changePickId">
- <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="故障情况:" prop="details">
- <el-input ref="details" v-model="createTemp.details" />
- </el-form-item>
- <!-- 这里PC和APP都需要等后端接口出来,是选了设备后带出故障内容。T T -->
- <!-- <el-form-item label="故障情况:" prop="pickId">
- <el-select v-model="createTemp.pickId" placeholder="故障情况" filterable class="filter-item" style="width:100%" @change="changePickId">
- <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
- </el-select>
-
- </el-form-item> -->
- </el-col>
- <el-col :span="8">
- <el-form-item label="牧场:" prop="pastureName">
- <el-select v-model="createTemp.pastureId" style="width: 100%;" placeholder="牧场" class="filter-item">
- <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="8">
- <el-form-item label="部门:" prop="deptName">
- <el-input ref="deptName" v-model="createTemp.deptName" disabled />
- </el-form-item>
- <!-- <el-form-item label="部门:" prop="departmentId">
- <el-select v-model="createTemp.departmentId" placeholder="部门" class="filter-item" style="width:100%">
- <el-option
- v-for="item in findAllDepart"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item> -->
- </el-col>
- <el-col :span="8">
- <el-form-item label="报修人:" prop="requesterId">
- <el-select ref="requesterId" v-model="createTemp.requesterId" 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="8">
- <el-form-item label="报修日期:" prop="requestTime">
- <el-date-picker
- v-model="createTemp.requestTime"
- :picker-options="pickerOptions1"
- type="datetime"
- placeholder="报修日期"
- format="yyyy-MM-dd HH:mm"
- value-format="yyyy-MM-dd HH:mm"
- style="width: 100%;"
- disabled
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
- <el-button @click="dialogFormVisible_Create = false;getList()">关闭</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" width="90%">
- <div class="app-see">
- <div v-if="orderStatue1" class="see">
- <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="130px" style="width: 90%;margin:0 auto;">
- <el-row>
- <el-col :span="8">
- <el-form-item label="报修单号:" prop="repairCode">
- <el-input ref="repairCode" v-model="seeTemp.repairCode" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="设备名称:" prop="eqName">
- <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="设备内部编号:" prop="eqCode">
- <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <!-- <el-col :span="8">
- <el-form-item label="维修组:" prop="repairDeptName">
- <el-input ref="repairDeptName" v-model="seeTemp.repairDeptName" disabled />
- </el-form-item>
- </el-col> -->
- <el-col :span="8">
- <el-form-item label="维修人:" prop="pickName">
- <el-input ref="pickName" v-model="seeTemp.pickName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="故障情况:" prop="details">
- <el-input ref="details" v-model="seeTemp.details" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="牧场:" prop="pastureName">
- <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="部门:" prop="departmentName">
- <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="报修人:" prop="requesterName">
- <el-input ref="requesterName" v-model="seeTemp.requesterName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="报修日期:" prop="requestTime">
- <el-input ref="requestTime" v-model="seeTemp.requestTime" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col v-if="seeTemp.orderStatue == 3" :span="8">
- <el-form-item label="驳回日期:" prop="shutdownDate">
- <el-input ref="shutdownDate" v-model="seeTemp.shutdownDate" disabled />
- </el-form-item>
- </el-col>
- <el-col v-if="seeTemp.orderStatue == 3" :span="8">
- <el-form-item label="驳回原因:" prop="shutdownReason">
- <el-input ref="shutdownReason" v-model="seeTemp.shutdownReason" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <h3>流程进度</h3>
- <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>{{ item.scores }}</div>
- </div>
- </template>
- </el-step>
- </el-steps>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-form-item label="操作:">
- <!-- 维修审核 -->
- <el-button v-if="(seeTemp.SHStatue == 2) && isMaintenanceAudit && seeTemp.requesterId == getdataListParm.parammaps.loginId" style="display:inline-block" type="success" @click="handleExamine()">维修审核</el-button>
- <el-button v-else style="display:none" type="success" @click="handleExamine()">维修审核</el-button>
- <!-- 维修审核2 -->
- <el-button v-if="(seeTemp.SHStatue == 3) && isMaintenanceAudit2" style="display:inline-block" type="success" @click="handleExamine2(row)">维修审核2</el-button>
- <el-button v-else style="display:none" type="success" @click="handleExamine2()">主管审核</el-button>
- <!-- 派单 -->
- <el-button v-if="(seeTemp.orderStatue == 0) && isDistributeLeaflets" style="display:inline-block" type="success" @click="handleDistributeLeaflets()">派单</el-button>
- <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleDistributeLeaflets()">派单</el-button>
- <!-- 接单 -->
- <el-button v-if="(seeTemp.orderStatue == 0 && isReceipt && (seeTemp.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" @click="handleReceipt()">接单</el-button>
- <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleReceipt()">接单</el-button>
- <!-- 维修及领用 -->
- <el-button v-if="(seeTemp.orderStatue == 1 && seeTemp.SHStatue== 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6) && isMaintenanceRequisition && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleMaintenanceRequisition()">维修及领用</el-button>
- <el-button v-else style="display:none" @click="handleMaintenanceRequisition()">维修及领用</el-button>
- <!-- 完成维修 -->
- <el-button v-if="(seeTemp.orderStatue == 1 && (seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6)) && isRepairComplete && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleRepairComplete()">完成维修</el-button>
- <el-button v-else style="display:none" @click="handleRepairComplete()">完成维修</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div v-if="orderStatue2" class="see">
- <el-tabs v-model="activeName">
- <el-tab-pane label="基础信息" name="first">
- <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="130px" style="width: 90%;margin:0 auto;">
- <el-row>
- <el-col :span="8">
- <h3>报修信息</h3>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="报修单号:" prop="repairCode">
- <el-input ref="repairCode" v-model="seeTemp.repairCode" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="设备名称:" prop="eqName">
- <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="设备内部编号:" prop="eqCode">
- <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <!-- <el-col :span="8">
- <el-form-item label="维修组:" prop="repairDeptName">
- <el-input ref="repairDeptName" v-model="seeTemp.repairDeptName" disabled />
- </el-form-item>
- </el-col> -->
- <el-col :span="8">
- <el-form-item label="维修人:" prop="pickName">
- <el-input ref="pickName" v-model="seeTemp.pickName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="故障情况:" prop="details">
- <el-input ref="details" v-model="seeTemp.details" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="牧场:" prop="pastureName">
- <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="部门:" prop="departmentName">
- <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="报修人:" prop="requesterName">
- <el-input ref="requesterName" v-model="seeTemp.requesterName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="报修日期:" prop="requestTime">
- <el-input ref="requestTime" v-model="seeTemp.requestTime" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <h3>维修信息</h3>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="维修日期:" prop="stopTime">
- <el-input ref="stopTime" v-model="seeTemp.stopTime" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <h3>故障诊断</h3>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoadingFault"
- element-loading-text="给我一点时间"
- :data="listFault"
- border
- fit
- highlight-current-row
- style="width: 90%;margin:0 auto"
- :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 + (pageNum-1) * pageSize + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column label="故障部位" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.positionName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="故障详情" prop="appearanceName" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.appearanceName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="故障原因" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.failureCause }}</span>
- </template>
- </el-table-column>
- <el-table-column label="处理方式" prop="treatmentMethod" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.treatmentMethod }}</span>
- </template>
- </el-table-column>
- </el-table>
- <el-form
- ref="seeTemp"
- :rules="rules"
- :model="seeTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col>
- <h3>流程进度</h3>
- <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" style="font-size:18px">
- <div class="step-row">
- <div>{{ item.name }}</div>
- <div>{{ item.date }}</div>
- <div>{{ item.reason }}</div>
- <div>{{ item.scores }}</div>
- </div>
- </template>
- </el-step>
- </el-steps>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <h3 style="display:inline">操作</h3>
- <!-- 维修审核 -->
- <el-button v-if="(seeTemp.SHStatue == 2) && isMaintenanceAudit && seeTemp.requesterId == getdataListParm.parammaps.loginId" style="display:inline-block" type="success" @click="handleExamine()">维修审核</el-button>
- <el-button v-else style="display:none" type="success" @click="handleExamine()">维修审核</el-button>
- <!-- 维修审核2 -->
- <el-button v-if="(seeTemp.SHStatue == 3) && isMaintenanceAudit2" style="display:inline-block" type="success" @click="handleExamine2(row)">维修审核2</el-button>
- <el-button v-else style="display:none" type="success" @click="handleExamine2()">主管审核</el-button>
- <!-- 派单 -->
- <el-button v-if="(seeTemp.orderStatue == 0) && isDistributeLeaflets" style="display:inline-block" type="success" @click="handleDistributeLeaflets()">派单</el-button>
- <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleDistributeLeaflets()">派单</el-button>
- <!-- 接单 -->
- <el-button v-if="(seeTemp.orderStatue == 0 && isReceipt && (seeTemp.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" @click="handleReceipt()">接单</el-button>
- <el-button v-else-if="(seeTemp.orderStatue == 1 ||seeTemp.orderStatue == 2 )" style="display:none" type="success" @click="handleReceipt()">接单</el-button>
- <!-- 维修及领用 -->
- <el-button v-if="(seeTemp.orderStatue == 1 && seeTemp.SHStatue== 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6) && isMaintenanceRequisition && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleMaintenanceRequisition()">维修及领用</el-button>
- <el-button v-else style="display:none" type="success" @click="handleMaintenanceRequisition()">维修及领用</el-button>
- <!-- 完成维修 -->
- <el-button v-if="(seeTemp.orderStatue == 1 && (seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6)) && isRepairComplete && (seeTemp.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" @click="handleRepairComplete()">完成维修</el-button>
- <el-button v-else style="display:none" type="success" @click="handleRepairComplete()">完成维修</el-button>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- <el-tab-pane label="领用记录" name="second">
- <el-table
- :key="tableKey"
- v-loading="listLoadingCollarUse"
- element-loading-text="给我一点时间"
- :data="listCollarUse"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- @cell-click="openDetails"
- >
- <!-- table表格 -->
- <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="领用单号" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.applyCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用部门" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.departmentName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用日期" sortable prop="createDate" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.createDate }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用明细" prop="details" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.details }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用状态" min-width="110px" align="center" :formatter="statue" />
- <el-table-column label="操作" min-width="110px" align="center">
- <template slot-scope="{row}">
- <el-button type="primary" size="mini" @click="handleCollarUseSee(row,0)">查看</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="旧品录入记录" name="third">
- <el-table
- :key="tableKey"
- v-loading="listLoadingOldProducts"
- element-loading-text="给我一点时间"
- :data="listOldProducts"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- @sort-change="tableSort1"
- >
- <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="备件编号" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="备件名称" prop="id" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="备件规格" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入数量" sortable prop="acturalAmount" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.acturalAmount }}</span>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
- <div slot="footer" class="dialog-footer" style="bottom:5px;">
- <el-button @click="dialogFormVisible_See = false">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 派单 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_DistributeLeaflets" :close-on-click-modal="false" width="50%">
- <div class="distributeLeaflets">
- <el-form
- ref="distributeLeafletsTemp"
- :rules="rules"
- :model="distributeLeafletsTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="20">
- <el-form-item label="维修人:" prop="pickId">
- <el-select v-model="distributeLeafletsTemp.pickId" filterable placeholder="维修人" class="filter-item" style="width:100%" @change="changePickId">
- <el-option v-for="item in maintainers" :key="item.id" :label="item.empNameAndmt" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="20">
- <el-form-item label="派单人:" prop="chargeId">
- <el-select v-model="distributeLeafletsTemp.chargeId" 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="20">
- <el-form-item label="派单日期:" prop="chargeDate">
- <el-date-picker
- v-model="distributeLeafletsTemp.chargeDate"
- :picker-options="pickerOptions1"
- type="date"
- placeholder="派单日期"
- style="width:100%;"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='distributeLeaflets'?createDistributeLeafletsData():createDistributeLeafletsData()">确认</el-button>
- <el-button @click="dialogFormVisible_DistributeLeaflets = false;">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 审核 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_MaintenanceAudit" :close-on-click-modal="false" width="30%">
- <div class="maintenanceAudit">
- <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: 60%;height:150px;margin:0 auto;">
- <el-row style="width:90%;margin:0 auto;">
- <el-col :span="20">
- <el-form-item>
- <el-radio-group v-model="examineTemp.statue" @change="changeStatue">
- <el-radio :label="3" checked>通过</el-radio>
- <el-radio :label="4">不通过</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col v-if="statueReason" :span="20">
- <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入审核不通过原因" />
- </el-col>
- </el-row>
- <el-row v-if="examineTemp.SHStatue == 2 && examineTemp.statue== 3" style="width:90%;margin:0 auto;">
- <el-col :span="24">
- <el-form-item label="评分:" prop="scores">
- <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintenanceAudit'?createExamineData():createExamineData2()">确认</el-button>
- <el-button @click="dialogFormVisible_MaintenanceAudit = false;">关闭</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_RepairComplete" :close-on-click-modal="false" width="50%">
- <div class="repairComplete">
- <el-form
- ref="repairCompleteTemp"
- :rules="rules"
- :model="repairCompleteTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="20">
- <el-form-item label="是否录入旧品:" prop="isOldProducts">
- <el-radio-group v-model="repairCompleteTemp.isOldProducts" @change="changeIsOldProducts">
- <el-radio :label="0" checked>否</el-radio>
- <el-radio :label="1">是</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-if="No2">
- <el-col :span="24">
- <el-form-item label="旧品录入:" prop="partCode">
- <el-autocomplete
- v-model="repairCompleteTemp.partCode"
- value-key="name"
- class="inline-input"
- :fetch-suggestions="oldProductsSearch"
- placeholder="请输入备件编号或备件名称或备件规格"
- style="width:100%"
- @select="handleSelectOldProducts"
- >
- <template slot-scope="{ item }">
- <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
- |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
- |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
- </template>
- </el-autocomplete>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- v-if="No2"
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="listAdd"
- border
- fit
- highlight-current-row
- style="width: 100%;margin-bottom:30px"
- :cell-style="cellStyle"
- class="elTable"
- :row-style="rowStyle"
- >
- <el-table-column type="index" label="序号" align="center" width="50px" />
- <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="备件名称" min-width="60px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partName }}</span><br>
- </template>
- </el-table-column>
- <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
- <template slot-scope="scope">
- <el-form :model="scope.row" :rules="rules">
- <el-form-item prop="acturalAmount">
- <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column label="用途" prop="note" align="center" min-width="60">
- <template slot-scope="scope">
- <el-form :model="scope.row">
- <el-form-item prop="note">
- <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <a class="del" @click="partDelete(row)">删除</a>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='repairComplete'?createRepairCompleteData():createRepairCompleteData()">确认</el-button>
- <el-button @click="dialogFormVisible_RepairComplete = false;">关闭</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_MaintenanceRequisition" :close-on-click-modal="false" width="90%">
- <div style="position: absolute;top:12px;left:120px;font:18px/40px '' ;color:#303133;">
- <span style="margin:0 10px;">设备名称:{{ maintenanceRequisitionTemp.eqName }}</span>
- <span>内部编号:{{ maintenanceRequisitionTemp.eqCode }}</span>
- </div>
- <div class="maintenanceRequisition" style="width:90%;margin:0 auto;">
- <el-tabs v-model="activeName2" @tab-click="tabMaintenance">
- <el-tab-pane label="维修" name="first">
- <el-form
- ref="maintenanceRequisitionTemp"
- :rules="rules"
- :model="maintenanceRequisitionTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="维修日期" prop="repirsTime">
- <el-date-picker
- v-model="maintenanceRequisitionTemp.repirsTime"
- :picker-options="pickerOptions1"
- type="date"
- placeholder="维修日期"
- style="width:100%;"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- :clearable="false"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div class="newFault">
- <el-form
- ref="newFaultTemp"
- :rules="rules"
- :model="newFaultTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="故障诊断:" prop="positionId">
- <el-select v-model="newFaultTemp.positionId" style="width:100%;" filterable placeholder="故障部位" @change="changePosition">
- <el-option
- v-for="item in positions"
- :key="item.id"
- :label="item.positionName"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item>
- <el-select v-model="newFaultTemp.appearanceName" style="width:100%;" filterable placeholder="故障详情" @change="changeAppearance">
- <el-option
- v-for="item in appearances"
- :key="item.id"
- :label="item.appearanceName"
- :value="item.appearanceName"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="listNewFault"
- border
- fit
- highlight-current-row
- style="width: 100%;margin-bottom:30px"
- :cell-style="cellStyle"
- class="elTable"
- :row-style="rowStyle"
- >
- <el-table-column type="index" label="序号" align="center" width="50px" />
- <el-table-column label="故障部位" min-width="90px" prop="positionName" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.positionName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="故障详情" min-width="60px" align="center" prop="appearanceName">
- <template slot-scope="scope">
- <el-input ref="appearanceName" v-model="scope.row.appearanceName" />
- </template>
- </el-table-column>
- <el-table-column label="故障原因" min-width="60px" align="center" prop="failureCause">
- <template slot-scope="scope">
- <el-input ref="failureCause" v-model="scope.row.failureCause" />
- </template>
- </el-table-column>
- <el-table-column label="处理方式" min-width="60px" align="center" prop="treatmentMethod">
- <template slot-scope="scope">
- <el-input ref="treatmentMethod" v-model="scope.row.treatmentMethod" />
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <a class="del" @click="newFaultDelete(row)">删除</a>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- <el-tab-pane label="备件领用" name="second">
- <el-button class="filter-item" type="primary" size="mini" style="margin-bottom:10px" @click="handleCollectionSparePartsCreate">添加领用单</el-button>
- <h4>有库存领用</h4>
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="listCollectionSpareParts"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <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">
- <template slot-scope="scope">
- <span>{{ scope.row.applyCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用部门" width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.departmentName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用日期" sortable prop="createDate" min-width="80px" align="center" />
- <el-table-column label="领用备件" prop="details" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.details }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用状态" min-width="100px" align="center" :formatter="statue" />
- <el-table-column label="操作" min-width="80px" align="center">
- <template slot-scope="{row}">
- <el-button type="primary" size="mini" @click="handleCollarUseSee(row,0)">查看</el-button>
- </template>
- </el-table-column>
- </el-table>
- <h4>无库存领用</h4>
- <el-table
- :key="tableKey2"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="listCollectionSpareParts2"
- border
- fit
- highlight-current-row
- style="width: 100%;"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <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="领用部门" width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.departmentName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="最新领用日期" sortable prop="createDate" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.createDate }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用备件" prop="details" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.details }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用状态" min-width="100px" align="center" :formatter="statue" />
- <el-table-column label="操作" min-width="80px" align="center">
- <template slot-scope="{row}">
- <el-button type="primary" size="mini" @click="handleCollarUseSee(row,1)">查看</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div slot="footer" class="dialog-footer" style="bottom:5px">
- <el-button v-if="rapairBtn" type="primary" :disabled="isokDisable" @click="dialogStatus==='maintenanceRequisition'?createMaintenanceRequisitionteData():createMaintenanceRequisitionteData()">确认</el-button>
- <el-button @click="dialogFormVisible_MaintenanceRequisition = false;getList();">关闭</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_CollectionSparePartsSee" :close-on-click-modal="false" width="90%">
- <div class="collectionSparePartsSee">
- <el-form
- ref="collectionSparePartsSeeTemp"
- :rules="rules"
- :model="collectionSparePartsSeeTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col v-if="collectionSparePartsSeeTemp.isStock !== 1" :span="8">
- <el-form-item label="领用单号:" prop="applyCode">
- <el-input ref="applyCode" v-model="collectionSparePartsSeeTemp.applyCode" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="领用部门:" prop="departmentName">
- <el-input ref="departmentName" v-model="collectionSparePartsSeeTemp.departmentName" disabled />
- </el-form-item>
- </el-col>
- <el-col v-if="collectionSparePartsSeeTemp.isStock !== 1" :span="8">
- <el-form-item label="领用日期:" prop="createDate">
- <el-input ref="createDate" v-model="collectionSparePartsSeeTemp.createDate" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-if="isPartCode">
- <el-col :span="16">
- <el-form-item label="所需备件:" prop="partCode">
- <el-autocomplete
- v-model="collectionSparePartsSeeTemp.partCode"
- value-key="name"
- class="inline-input"
- :fetch-suggestions="sparePartSearch"
- placeholder="请输入备件编号或备件名称或备件规格"
- style="width:98%"
- @select="handleSelectSparePart"
- >
- <template slot-scope="{ item }">
- <b>备件编号:</b><div class="name" style="display: inline;">{{ item.partCode }}</div>
- | <b>备件名称:</b><span class="addr">{{ item.partName }}</span>
- | <b>备件规格:</b><span class="addr">{{ item.specification }}</span>
- | <b>库存:</b><span class="addr">{{ item.reportery }}</span>
- | <b>是否零库存:</b><span class="addr" v-if="item.isZeroStock==1">是</span>
- <span class="addr" v-else>否</span>
- </template>
- </el-autocomplete>
- </el-form-item>
- </el-col>
- <el-col :span="2">
- <el-button type="primary" @click="handleAddSparePartsToBeCollected">添加待领用备件</el-button>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="listCreateCollectionSpareParts"
- border
- fit
- highlight-current-row
- style="width: 100%;margin-bottom:30px"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- >
- <!-- table表格 -->
- <el-table-column type="index" label="序号" align="center" width="50px" />
- <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="备件名称" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partName }}</span><br>
- </template>
- </el-table-column>
- <el-table-column label="备件规格" prop="specification" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column label="库存数" prop="reportery" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.reportery }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用数量" prop="amount" align="center" min-width="80">
- <template slot-scope="scope">
- <el-form :model="scope.row">
- <el-form-item prop="amount">
- <el-input ref="amount" v-model="scope.row.amount" :disabled="dialogStatus==='collectionSparePartsSee'" style="margin-top:15px" />
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column v-if="collectionSparePartsSeeTemp.isStock==1" label="领用时间" prop="date" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.date }}</span>
- </template>
- </el-table-column>
- <el-table-column label="用途" prop="note" align="center" min-width="60">
- <template slot-scope="scope">
- <el-form :model="scope.row">
- <el-form-item prop="note">
- <el-input ref="note" v-model="scope.row.note" :disabled="dialogStatus==='collectionSparePartsSee'" style="margin-top:15px" />
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column v-if="collectionSparePartsSeeTemp.isStock==1" label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <a class="primary" @click="handleViewProgress(row)">查看进度</a>
- </template>
- </el-table-column>
- <el-table-column v-if="isCreatePartDelete" label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <a class="del" @click="createPartDelete(row)">删除</a>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div slot="footer" class="dialog-footer" style="bottom:5px">
- <el-button v-if="isPartCode" type="primary" :disabled="isokDisable" @click="dialogStatus==='collectionSparePartsCreate'?createCollectionSparePartsData():createCollectionSparePartsData()">确认</el-button>
- <el-button @click="dialogFormVisible_CollectionSparePartsSee = false;">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 查看进度 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ViewProgress" :close-on-click-modal="false" width="90%">
- <div class="viewProgress">
- <el-form
- ref="viewProgressTemp"
- :rules="rules"
- :model="viewProgressTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="本次领用数量:" prop="amountY">
- <span> {{ numbersList.amountY }} </span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="其他领用数量:" prop="amountQT">
- <span> {{ numbersList.amountQT }} </span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="未出库数量:" prop="amountLY">
- <span> {{ numbersList.amountLY }} </span>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <h4>申购情况:</h4>
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="purchaseapplicationList"
- border
- fit
- highlight-current-row
- style="width: 100%;margin-bottom:30px"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- @sort-change="tableSort2"
- >
- <el-table-column type="index" label="序号" align="center" width="50px" />
- <el-table-column label="申购单号" min-width="90px" prop="orderNumber" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.orderNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column sortable prop="amount" label="申购数量" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.amount }}</span><br>
- </template>
- </el-table-column>
- <el-table-column label="申购时间" sortable prop="createTime" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.createTime }}</span>
- </template>
- </el-table-column>
- <el-table-column label="申购部门" prop="deptName" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.deptName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="申购人" prop="amount" align="center" min-width="80">
- <template slot-scope="scope">
- <span>{{ scope.row.empName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="是否配单" prop="buyStatu" align="center" min-width="80">
- <template slot-scope="scope">
- <span>{{ scope.row.buyStatu }}</span>
- </template>
- </el-table-column>
- <el-table-column label="配单号" prop="matchCode" align="center" min-width="80">
- <template slot-scope="scope">
- <span>{{ scope.row.matchCode }}</span>
- </template>
- </el-table-column>
- </el-table>
- <h4>采购情况:</h4>
- <el-table
- :key="tableKey2"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="procurementList"
- border
- fit
- highlight-current-row
- style="width: 100%;margin-bottom:30px"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable table-fixed"
- @sort-change="tableSort3"
- >
- <el-table-column type="index" label="序号" align="center" width="50px" />
- <el-table-column label="采购单号" min-width="90px" prop="buyeCode" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.buyeCode }}</span>
- </template>
- </el-table-column>
- <el-table-column sortable prop="amount" label="采购数量" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.amount }}</span><br>
- </template>
- </el-table-column>
- <el-table-column label="配单号" prop="specification" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.matchCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="提交时间" prop="buyerDate" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.buyerDate }}</span>
- </template>
- </el-table-column>
- <el-table-column sortable prop="receiveAmount" label="入库数量" align="center" min-width="100">
- <template slot-scope="scope">
- <span>{{ scope.row.receiveAmount }}</span>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div slot="footer" class="dialog-footer" style="bottom:5px">
- <el-button @click="dialogFormVisible_ViewProgress = false;">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 报修驳回 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="rejectRepair.dialogFormVisible" :close-on-click-modal="false" width="30%">
- <div class="maintenanceAudit">
- <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请输入报修驳回原因:</h3>
- <el-form ref="rejectRepair" :rules="rules" :model="rejectRepair.temp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
- <el-row>
- <el-col :span="20">
- <el-form-item prop="shutdownReason">
- <el-input v-model="rejectRepair.temp.shutdownReason" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入报修驳回原因" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="rejectRepairData()">确认</el-button>
- <el-button @click="rejectRepair.dialogFormVisible = false;">关闭</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- // 引入
- import { GetDataByName, GetDataByNames,GetAccount, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
- import { mapGetters } from 'vuex'
- import waves from '@/directive/waves' // waves directive
- import { parseTime, sortChange,json2excel } from '@/utils/index.js'
- // eslint-disable-next-line no-unused-vars
- import Pagination from '@/components/Pagination' // secondary package based on el-pagination
- import { MessageBox } from 'element-ui'
- import Cookies from 'js-cookie'
- export default {
- name: 'Repair',
- components: { Pagination },
- directives: { waves },
- data() {
- return {
- isokDisable: false,
- rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
- cellStyle: { padding: 0 + 'px' },
- findAllPasture: [],
- findAllDepart: [],
- findAllEmploye: [],
- requestParams: [
- { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
- { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
- { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }}
- ],
- orderStatues: [{ id: '0', name: '待接单' }, { id: '1', name: '维修中' }, { id: '2', name: '维修完成' }],
- SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
- rules: {
- repairDept: [{ required: true, message: '必填', trigger: 'blur' }],
- pickId: [{ required: true, message: '必填', trigger: 'blur' }],
- chargeDate: [{ required: true, message: '必填', trigger: 'blur' }],
- chargeId: [{ required: true, message: '必填', trigger: 'blur' }],
- repirsTime: [{ required: true, message: '必填', trigger: 'blur' }],
- positionId: [{ required: true, message: '必填', trigger: 'blur' }],
- repairCode: [{ required: true, message: '必填', trigger: 'blur' }],
- eqName: [{ required: true, message: '必填', trigger: 'blur' }],
- eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
- deptName: [{ required: true, message: '必填', trigger: 'blur' }],
- details: [{ required: true, message: '必填', trigger: 'blur' }],
- shutdownReason: [{ required: true, message: '必填', trigger: 'blur' }]
- },
- getdataListParm: {
- name: 'getRepirsList',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- pastureName: Cookies.get('pasturename'),
- repairCode: '',
- eqName: '',
- eqCode: '',
- orderStatue: '',
- SHStatue: '',
- inputDatetime: '',
- loginId: Cookies.get('employeid'),
- menu: 'Repair',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid')
- }
- },
- isCanSubmit:false,
- total: 0,
- tableKey: 0,
- listLoading: false,
- list: [],
- dialogFormVisible_Create: false,
- createTemp: {
- pastureId: '',
- departmentId: '',
- eqId: '',
- eqCode: '',
- eqName: '',
- repairDept: '',
- details: '',
- requesterId: '',
- requestTime: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'),
- pickId: '',
- repairCode: '',
- deptName: ''
- },
- requestEqName: {
- name: 'geteqbyNameCode',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- }
- },
- EqNameList: [],
- EqCodeList: [],
- getRepairNumberParm: {
- name: 'autoCreatCode',
- parammaps: {
- pastureId: Cookies.get('pastureid'),
- codeType: 'BX'
- }
- },
- radioAll: '全部',
- dialogFormVisible_See: false,
- dialogStatus: '',
- textMap: {
- create: '报修',
- see: '查看详情',
- distributeLeaflets: '派单',
- maintenanceAudit: '维修审核',
- maintenanceAudit2: '维修审核',
- repairComplete: '完成维修',
- maintenanceRequisition: '维修及领用',
- collectionSparePartsSee: '查看领用',
- collectionSparePartsCreate: '添加领用',
- ViewProgress: '查看进度', rejectRepair: '报修驳回', update: '修改报修'
- },
- activeList: [],
- active: 3,
- seeTemp: {},
- activeName: 'first',
- orderStatue1: false,
- orderStatue2: false,
- // Reason: false,
- // MaintenanceAudit: false,
- listLoadingFault: false,
- listFault: [],
- getFaultListParm: {
- name: 'getmaintainappearance',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- listLoadingCollarUse: false,
- listCollarUse: [],
- getCollarUseListParm: {
- name: 'getPartsapplybyMt',
- page: 1,
- offset: 1,
- returntype: 'Map',
- parammaps: {}
- },
- getCollarUseListParm2: {
- name: 'getPartsapplybyMt_m',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- listLoadingOldProducts: false,
- listOldProducts: [],
- getOldProductsListParm: {
- name: 'getMaintainRefuse',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- dialogFormVisible_DistributeLeaflets: false,
- distributeLeafletsTemp: {
- repairDept: '',
- pickId: '',
- chargeId: this.$store.state.user.employeid,
- chargeDate: parseTime(new Date(), '{y}-{m}-{d}')
- },
- pickerOptions1: {
- disabledDate(time) {
- return time.getTime() > Date.now()// 当天之前的时间可选
- }
- },
- receiptTemp: {},
- requestParam: {},
- maintainers: [],
- getRepirsEmpParm: {
- name: 'getRepirsEmp',
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- }
- },
- examineTemp: {
- statue: 3
- },
- statueReason: false,
- dialogFormVisible_MaintenanceAudit: false,
- dialogFormVisible_RepairComplete: false,
- repairCompleteTemp: {
- isOldProducts: 0
- },
- requestOldProducts: {
- name: 'getAllPartsListWB',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- No2: false,
- listAdd: [],
- postDataPramas: {},
- maintenanceRequisitionTemp: {
- repirsTime: ''
- },
- dialogFormVisible_MaintenanceRequisition: false,
- activeName2: 'first',
- rowId: 0,
- listNewFault: [],
- newFaultTemp: {},
- appearances: [],
- positions: [],
- getPositionsParm: {
- name: 'geteqPosition',
- parammaps: {}
- },
- getAppearanceParm: {
- name: 'getAppearancebyPid',
- parammaps: {}
- },
- rapairBtn: true,
- listCollectionSpareParts: [],
- tableKey2: 1,
- listCollectionSpareParts2: [],
- collectionSparePartsSeeTemp: {
- isStock: 0
- },
- getParmCreateNumber: {
- name: 'autoCreatCode',
- page: 0,
- offset: 0,
- pagecount: 0,
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid'),
- codeType: 'LY'
- }
- },
- requestSparePart: {
- name: 'getPartsListLY_m',
- page: 1,
- offset: 1,
- pagecount: 20,
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- }
- },
- addSparePartsToBeCollectedParam: {
- name: 'getPartapply_mr',
- page: 1,
- offset: 1,
- pagecount: 20,
- returntype: 'Map',
- parammaps: {}
- },
- dialogFormVisible_CollectionSparePartsSee: false,
- listCreateCollectionSpareParts: [],
- isCreatePartDelete: false,
- isPartCode: true,
- getCollarUseSeeParm: {
- name: 'getpartapplyListBybig',
- parammaps: {}
- },
- getCollarUseSeeParm2: {
- name: 'getpartapplyListBybig_m',
- parammaps: {}
- },
- dialogFormVisible_ViewProgress: false,
- viewProgressTemp: {},
- getNumbersParm: {
- name: 'getpartApply_mstatue',
- page: 1,
- offset: 1,
- pagecount: 20,
- returntype: 'Map',
- parammaps: {}
- },
- numbersList: [],
- getPurchaseapplicationParm: {
- name: 'getpartApply_mstatueSG',
- page: 1,
- offset: 1,
- returntype: 'Map',
- parammaps: {}
- },
- purchaseapplicationList: [], // 采购情况
- getProcurementParm: {
- name: 'getpartApply_mstatueCG',
- page: 1,
- offset: 1,
- returntype: 'Map',
- parammaps: {}
- },
- procurementList: [], // 采购情况
- rejectRepair: {
- dialogFormVisible: false,
- temp: {}
- },
- // 权限按钮
- isRepair: [],
- isMaintenanceSee: [],
- isDistributeLeaflets: [],
- isReceipt: [],
- isMaintenanceRequisition: [],
- isRepairComplete: [],
- isDelete: [],
- isMaintenanceAudit: [],
- isMaintenanceAudit2: [], isRejectRepair: [],
- isRepairExport:[],
- buttons: [],
- pending: {
- total: 0,
- getdataListParm: {
- name: 'getRepirsWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
- parammaps: {}
- }
- },
- isPercentage: false,
- percentage: 1,
- downLoadParm:{},
- downLoadList:[],
- resubmit:{}
- }
- },
- // computed: {
- // ...mapGetters([
- // 'buttons'
- // ])
- // },
- created() {
- const that = this
- GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
- that.buttons = response.data.list
- that.getButtons()
- })
- },
- methods: {
- tableSort1(column) {
- sortChange(column, this.listOldProducts)
- },
- tableSort2(column) {
- sortChange(column, this.purchaseapplicationList)
- },
- tableSort3(column) {
- sortChange(column, this.procurementList)
- },
- getButtons() {
- // 报修
- const Repair = 'maintenance:repair:baoxiu'
- const isRepair = checkButtons(this.buttons, Repair)
- this.isRepair = isRepair
- // 派单
- const DistributeLeaflets = 'maintenance:repair:paidan'
- const isDistributeLeaflets = checkButtons(this.buttons, DistributeLeaflets)
- this.isDistributeLeaflets = isDistributeLeaflets
- // 接单
- const Receipt = 'maintenance:repair:jiedan'
- const isReceipt = checkButtons(this.buttons, Receipt)
- this.isReceipt = isReceipt
- // 维修及领用
- const Repairlingyong = 'maintenance:repair:lingyong'
- const isMaintenanceRequisition = checkButtons(this.buttons, Repairlingyong)
- this.isMaintenanceRequisition = isMaintenanceRequisition
- // 维修完成
- const RepairComplete = 'maintenance:repair:weixiuwancheng'
- const isRepairComplete = checkButtons(this.buttons, RepairComplete)
- this.isRepairComplete = isRepairComplete
- // 删除
- const Delete = 'maintenance:repair:delete'
- const isDelete = checkButtons(this.buttons, Delete)
- this.isDelete = isDelete
- // 维修审核
- const MaintenanceAudit = 'maintenance:repair:seeMaintenanceAudit'
- const isMaintenanceAudit = checkButtons(this.buttons, MaintenanceAudit)
- this.isMaintenanceAudit = isMaintenanceAudit
- // 查看
- const See = 'maintenance:repair:see'
- const isMaintenanceSee = checkButtons(this.buttons, See)
- this.isMaintenanceSee = isMaintenanceSee
- // 主管审核
- const MaintenanceAudit2 = 'maintenance:repair:shenhe2'
- const isMaintenanceAudit2 = checkButtons(this.buttons, MaintenanceAudit2)
- this.isMaintenanceAudit2 = isMaintenanceAudit2
- // 报修驳回
- const RejectRepair = 'maintenance:repair:rejectRepair'
- const isRejectRepair = checkButtons(this.buttons, RejectRepair)
- this.isRejectRepair = isRejectRepair
- // 导出
- const RejectExport = 'maintenance:repair:rejectExport'
- const isRepairExport = checkButtons(this.buttons, RejectExport)
- this.isRepairExport = isRepairExport
- this.getDownList()
- this.getList()
- this.getPendingList()
- },
- getDownList() {
- GetDataByNames(this.requestParams).then(response => {
- this.findAllPasture = response.data.findAllPasture.list
- this.findAllDepart = response.data.findAllDepart1.list
- this.findAllEmploye = response.data.findAllEmploye.list
- })
- },
- getPendingList() {
- this.pending.getdataListParm.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
- this.pending.getdataListParm.parammaps.repairCode = this.getdataListParm.parammaps.repairCode
- this.pending.getdataListParm.parammaps.eqName = this.getdataListParm.parammaps.eqName
- this.pending.getdataListParm.parammaps.eqCode = this.getdataListParm.parammaps.eqCode
- this.pending.getdataListParm.parammaps.SHStatue = this.getdataListParm.parammaps.SHStatue
- this.pending.getdataListParm.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
- this.pending.getdataListParm.parammaps.loginId = this.getdataListParm.parammaps.loginId
- this.pending.getdataListParm.parammaps.menu = this.getdataListParm.parammaps.menu
- this.pending.getdataListParm.parammaps.logindeptId = this.getdataListParm.parammaps.logindeptId
- this.pending.getdataListParm.parammaps.loginpastureId = this.getdataListParm.parammaps.loginpastureId
- this.pending.getdataListParm.parammaps.empId = Cookies.get('employeid')
- this.pending.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- this.pending.getdataListParm.parammaps.deptId = Cookies.get('departmentid')
- GetDataByName(this.pending.getdataListParm).then(response => {
- this.pending.total = response.data.total3
- })
- },
- getList() {
- if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
- this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
- this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
- } else {
- this.getdataListParm.parammaps.startTime = ''
- this.getdataListParm.parammaps.stopTime = ''
- }
- this.listLoading = true
- GetDataByName(this.getdataListParm).then(response => {
- if (response.data.list !== null) {
- console.log('table数据', response.data.list)
- this.list = response.data.list
- this.pageNum = response.data.pageNum
- this.pageSize = response.data.pageSize
- } else {
- this.list = []
- }
- this.total = response.data.total
- setTimeout(() => {
- this.listLoading = false
- }, 100)
- })
- },
- changeAll() {
- console.log(this.radioAll)
- if (this.radioAll === '全部') {
- this.getdataListParm.name = 'getRepirsList'
- this.getdataListParm.offset = 1
- this.getdataListParm.parammaps = {
- pastureName: Cookies.get('pasturename'),
- inputDatetime: '',
- loginId: Cookies.get('employeid'),
- menu: 'Repair',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid')
- }
- this.getList()
- } else if (this.radioAll === '待处理') {
- this.getdataListParm.name = 'getRepirsWebListNO'
- this.getdataListParm.offset = 1
- this.getdataListParm.parammaps = {
- pastureName: this.getdataListParm.parammaps.pastureName,
- repairCode: this.getdataListParm.parammaps.repairCode,
- eqName: this.getdataListParm.parammaps.eqName,
- eqCode: this.getdataListParm.parammaps.eqCode,
- orderStatue: this.getdataListParm.parammaps.orderStatue,
- SHStatue: this.getdataListParm.parammaps.SHStatue,
- inputDatetime: this.getdataListParm.parammaps.inputDatetime,
- loginId: Cookies.get('employeid'),
- menu: 'Repair',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid'),
- empId: Cookies.get('employeid'),
- pastureId: Cookies.get('pastureid'),
- deptId: Cookies.get('departmentid')
- }
- this.getList()
- } else if (this.radioAll === '已处理') {
- this.getdataListParm.name = 'getRepirsWebList'
- this.getdataListParm.offset = 1
- this.getdataListParm.parammaps = {
- pastureName: this.getdataListParm.parammaps.pastureName,
- repairCode: this.getdataListParm.parammaps.repairCode,
- eqName: this.getdataListParm.parammaps.eqName,
- eqCode: this.getdataListParm.parammaps.eqCode,
- orderStatue: this.getdataListParm.parammaps.orderStatue,
- SHStatue: this.getdataListParm.parammaps.SHStatue,
- inputDatetime: this.getdataListParm.parammaps.inputDatetime,
- loginId: Cookies.get('employeid'),
- menu: 'Repair',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid'),
- empId: Cookies.get('employeid'),
- pastureId: Cookies.get('pastureid'),
- deptId: Cookies.get('departmentid')
- }
- this.getList()
- }
- },
- orderStatue: function(cellValue) {
- // console.log(cellValue.isZeroStock)
- if (cellValue.orderStatue == 0) {
- return '待接单'
- } else if (cellValue.orderStatue == 1) {
- return '维修中'
- } else if (cellValue.orderStatue == 2) {
- return '维修完成'
- } else if (cellValue.orderStatue == 3) {
- return '已驳回'
- }
- },
- SHStatue: function(cellValue) {
- // console.log(cellValue.isZeroStock)
- if (cellValue.SHStatue == 1) {
- return ''
- } else if (cellValue.SHStatue == 2) {
- return '审核中'
- } else if (cellValue.SHStatue == 3) {
- return '审核中'
- } else if (cellValue.SHStatue == 4) {
- return '未通过'
- } else if (cellValue.SHStatue == 6) {
- return '未通过'
- } else if (cellValue.SHStatue == 5) {
- return '已通过'
- }
- },
- form_search() {
- console.log('点击了table搜索')
- this.listLoading = true
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.getdataListParm.offset = 1
- this.getList()
- this.getPendingList()
- },
- resetCreateTemp() {
- this.createTemp.pastureId = this.$store.state.user.pastureid
- this.createTemp.departmentId = this.$store.state.user.departmentid
- this.createTemp.eqId = ''
- this.createTemp.eqCode = ''
- this.createTemp.eqName = ''
- this.createTemp.repairDept = ''
- this.createTemp.details = ''
- this.createTemp.requesterId = this.$store.state.user.employeid
- this.createTemp.requestTime = parseTime(new Date(), '{y}-{m}-{d} {h}:{i}')
- this.createTemp.pickId = ''
- this.createTemp.repairCode = ''
- this.createTemp.deptName = ''
- this.createTemp.departmentId = ''
- },
- changePickId(val) {
- if (this.dialogStatus == 'create') {
- this.createTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
- } else {
- this.distributeLeafletsTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
- }
- },
- form_add() {
- this.dialogStatus = 'create'
- this.dialogFormVisible_Create = true
- this.resetCreateTemp()
- this.getRepairNumber()
- this.getRepirsEmp()
- },
- isToDayrResubmit(){
- //一天同一牧场同一设备同一故障是否重复提交
- this.resubmit.name = 'checkMaintain'
- this.resubmit.parammaps = {
- pastureId : this.createTemp.pastureId,
- eqId : this.createTemp.eqId,
- eqName : this.createTemp.eqName,
- eqCode : this.createTemp.eqCode,
- details : this.createTemp.details,
- requestTime : parseTime(new Date(), '{y}-{m}-{d}')
- }
-
- },
- getRepairNumber() {
- GetDataByName(this.getRepairNumberParm).then(response => {
- this.$nextTick(() => {
- console.log('新增报修单号', response.data.list[0].orderCode)
- this.createTemp.repairCode = response.data.list[0].orderCode
- this.$forceUpdate()
- })
- })
- },
- add_dialog_save() {
- this.isToDayrResubmit()
- GetDataByName(this.resubmit).then(response => {
- console.log('今天已提交,请勿重复提交', this.requestParam,this.resubmit,response)
- if (response.msg !== 'fail') {
- if(response.data.total > 0){
- this.$notify({ title: '提交失败', message: '今天已提交,请勿重复提交', type: 'warning', duration: 2000 })
- this.isCanSubmit = false
- return false
- }
- this.isCanSubmit = true
- // 可以提交
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['createTemp'].validate(valid => {
- if (valid) {
- if (this.createTemp.repairCode == '' || this.createTemp.repairCode == null || this.createTemp.repairCode == undefined) {
- GetDataByName(this.getRepairNumberParm).then(response => {
- this.$nextTick(() => {
- console.log('新增报修单号', response.data.list[0].orderCode)
- this.createTemp.repairCode = response.data.list[0].orderCode
- this.$forceUpdate()
- this.add_dialog_saveSave()
- })
- })
- } else {
- this.add_dialog_saveSave()
- }
- }
- })
- }else{
- this.$notify({ title: '请检查接口', message: "name: checkMaintain", type: 'warning', duration: 2000 })
- }
- })
- },
- add_dialog_saveSave() {
- this.requestParam.name = 'insertmaintain'
- this.requestParam.parammaps = this.createTemp
- PostDataByName(this.requestParam).then(response => {
- console.log('新增保存发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- this.getList()
- this.getPendingList()
- this.dialogFormVisible_Create = false
- this.$notify({ title: '成功', message: '新增成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- },
- querySearchEqName(queryString, cb) {
- console.log('备件名称/设备内部编号模糊查询输入值', queryString)
- this.requestEqName.parammaps['eqName'] = queryString
- GetDataByName(this.requestEqName).then(response => {
- if (response.data.list !== null) {
- console.log('备件名称模糊查询搜索data', response.data.list)
- this.EqNameList = response.data.list
- } else {
- this.EqNameList = []
- }
- cb(this.EqNameList)
- })
- },
- handleSelectEqName(item) {
- console.log('备件名称/设备内部编号模糊查询选中值', item)
- this.$set(this.createTemp, 'eqCode', item.eqCode)
- this.$set(this.createTemp, 'eqId', item.eqId)
- if (item.deptName !== undefined && item.departmentId !== undefined) {
- this.$set(this.createTemp, 'deptName', item.deptName)
- this.$set(this.createTemp, 'departmentId', item.departmentId)
- } else {
- this.$set(this.createTemp, 'deptName', '')
- this.$set(this.createTemp, 'departmentId', '')
- }
- this.$forceUpdate()
- },
- querySearchCode(queryString, cb) {
- console.log('备件名称/设备内部编号模糊查询输入值', queryString)
- this.requestEqName.parammaps['eqCode'] = queryString
- GetDataByName(this.requestEqName).then(response => {
- if (response.data.list !== null) {
- console.log('备件名称模糊查询搜索data', response.data.list)
- this.EqNameList = response.data.list
- } else {
- this.EqNameList = []
- }
- cb(this.EqNameList)
- })
- },
- handleSelectEqCode(item, row) {
- console.log('备件名称/设备内部编号模糊查询选中值', item)
- console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
- this.$set(this.createTemp, 'eqName', item.eqName)
- this.$set(this.createTemp, 'eqId', item.eqId)
- if (item.deptName !== undefined && item.departmentId !== undefined) {
- this.$set(this.createTemp, 'deptName', item.deptName)
- this.$set(this.createTemp, 'departmentId', item.departmentId)
- } else {
- this.$set(this.createTemp, 'deptName', '')
- this.$set(this.createTemp, 'departmentId', '')
- }
- this.$forceUpdate()
- },
- form_see(row) {
- console.log(row)
- this.seeTemp = Object.assign({}, row)
- // 流程图
- var reason = '未通过原因:' + this.seeTemp.workflowNote
- var scores = '评分:' + this.seeTemp.scores + '分'
- if (this.seeTemp.orderStatue === 0) {
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单' }, { title: '完成维修' }, { title: '使用人审核' }, { title: '设备主管审核' }]
- this.active = 1
- } else if (this.seeTemp.orderStatue == 3) {
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '报修驳回', date: this.seeTemp.shutdownDate, name: this.seeTemp.shutdownPerson }]
- this.active = 1
- } else if (this.seeTemp.orderStatue === 1 && this.seeTemp.SHStatue === 1) {
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修' }, { title: '使用人审核' }, { title: '设备主管审核' }]
- this.active = 2
- } else if (this.seeTemp.SHStatue === 2) {
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核' }, { title: '设备主管审核' }]
- this.active = 3
- } else if (this.seeTemp.SHStatue === 3) {
- this.active = 4
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, scores: scores }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 4) {
- this.active = 4
- // var reason = '未通过原因:' + this.seeTemp.workflowNote
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 5) {
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
- this.active = 5
- } else if (this.seeTemp.SHStatue === 6) {
- // var reason = '未通过原因:' + this.seeTemp.workflowNote
- this.activeList = [{ title: '报修', date: this.seeTemp.requestTime, name: this.seeTemp.requesterName }, { title: '维修接单', date: this.seeTemp.orderTime, name: this.seeTemp.pickName }, { title: '完成维修', date: this.seeTemp.stopTime, name: this.seeTemp.pickName }, { title: '使用人审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
- this.active = 5
- }
- this.seeTemp.requestTime = parseTime(this.seeTemp.requestTime, '{y}-{m}-{d}')
- this.seeTemp.shutdownDate = parseTime(this.seeTemp.shutdownDate, '{y}-{m}-{d}')
- this.seeTemp.orderTime = parseTime(this.seeTemp.orderTime, '{y}-{m}-{d}')
- this.dialogStatus = 'see'
- this.dialogFormVisible_See = true
- if (row.orderStatue == 0) {
- this.orderStatue1 = true
- this.orderStatue2 = false
- } else if (row.orderStatue == 3) {
- this.orderStatue1 = true
- this.orderStatue2 = false
- } else {
- this.orderStatue1 = false
- this.orderStatue2 = true
- this.getFaultList()
- this.getOldProductsList()
- this.getCollarUseList()
- }
- },
- resetDistributeLeafletsTemp() {
- this.distributeLeafletsTemp.repairDept = ''
- this.distributeLeafletsTemp.pickId = ''
- this.distributeLeafletsTemp.chargeDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.distributeLeafletsTemp.chargeId = this.$store.state.user.employeid
- },
- // 派单
- handleDistributeLeaflets(row) {
- if (row == undefined) {
- this.distributeLeafletsTemp = this.seeTemp
- } else {
- this.distributeLeafletsTemp = Object.assign({}, row)
- }
- console.log('点击了派单')
- this.dialogStatus = 'distributeLeaflets'
- this.dialogFormVisible_DistributeLeaflets = true
- this.resetDistributeLeafletsTemp()
- this.getRepirsEmp()
- },
- changeMaintenanceTeam(val) {
- console.log(val)
- this.getRepirsEmpParm.parammaps.deptid = val
- this.createTemp.pickId = ''
- this.distributeLeafletsTemp.pickId = ''
- this.getRepirsEmp()
- },
- getRepirsEmp() {
- GetDataByName(this.getRepirsEmpParm).then(response => {
- console.log('维修人数据', response.data.list)
- this.maintainers = response.data.list
- })
- },
- // 派单-保存
- createDistributeLeafletsData() {
- console.log('点击了派单确认')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['distributeLeafletsTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'setRepirsEmp'
- this.requestParam.parammaps = this.distributeLeafletsTemp
- this.requestParam.parammaps.id = this.distributeLeafletsTemp.id
- PostDataByName(this.requestParam).then(response => {
- console.log('派单确认发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- this.listLoading = true
- this.getList()
- this.dialogFormVisible_DistributeLeaflets = false
- this.dialogFormVisible_See = false
- this.getPendingList()
- this.$notify({ title: '成功', message: '派单成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- },
- getFaultList() {
- this.listLoadingFault = true
- if (this.dialogStatus == 'repairComplete') {
- this.getFaultListParm.parammaps.maintainId = this.repairCompleteTemp.id
- } else {
- this.getFaultListParm.parammaps.maintainId = this.seeTemp.id
- }
- GetDataByName(this.getFaultListParm).then(response => {
- if (response.data.list !== null) {
- console.log('故障table数据', response.data.list)
- this.listFault = response.data.list
- } else {
- this.listFault = []
- }
- setTimeout(() => {
- this.listLoadingFault = false
- }, 100)
- })
- },
- getCollarUseList() {
- this.listLoadingCollarUse = true
- this.getCollarUseListParm.parammaps.RUCode = this.seeTemp.repairCode
- GetDataByName(this.getCollarUseListParm).then(response => {
- console.log('领用记录table数据', response.data.list)
- this.listCollarUse = response.data.list
- setTimeout(() => {
- this.listLoadingCollarUse = false
- }, 100)
- })
- },
- statue: function(cellValue) {
- // console.log(cellValue.isZeroStock)
- if (cellValue.statue == 0) {
- return '未领用'
- } else if (cellValue.statue == 1) {
- return '已领用'
- }
- },
- getOldProductsList() {
- this.listLoadingOldProducts = true
- this.getOldProductsListParm.parammaps.repairCode = this.seeTemp.repairCode
- GetDataByName(this.getOldProductsListParm).then(response => {
- console.log('旧品录入记录table数据', response.data.list)
- this.listOldProducts = response.data.list
- setTimeout(() => {
- this.listLoadingOldProducts = false
- }, 100)
- })
- },
- // 维修及审核
- handleExamine(row) {
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'statue', 3)
- this.$set(this.seeTemp, 'workflowNote', '')
- this.$set(this.seeTemp, 'scores', '')
- } else {
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'statue', 3)
- this.$set(this.examineTemp, 'workflowNote', '')
- this.$set(this.examineTemp, 'scores', '')
- }
- console.log('点击了维修审核')
- this.dialogStatus = 'maintenanceAudit'
- this.dialogFormVisible_MaintenanceAudit = true
- },
- changeStatue(val) {
- if (val == 4) {
- this.statueReason = true
- } else {
- this.statueReason = false
- }
- },
- // 维修审核-保存
- createExamineData() {
- console.log('点击了维修审核确认')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'maintainCharge'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = this.examineTemp.statue
- this.requestParam.parammaps.empId = Cookies.get('employeid')
- this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
- if (this.requestParam.parammaps.statue == 4) {
- this.requestParam.parammaps.scores = 5
- } else {
- this.requestParam.parammaps.scores = this.examineTemp.scores
- }
- PostDataByName(this.requestParam).then(response => {
- console.log('维修审核确认发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.getList()
- this.getPendingList()
- this.dialogFormVisible_MaintenanceAudit = false
- this.dialogFormVisible_See = false
- this.statueReason = false
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- },
- // 维修审核2
- handleExamine2(row) {
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'statue', 3)
- this.$set(this.seeTemp, 'workflowNote', '')
- } else {
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'statue', 3)
- this.$set(this.examineTemp, 'workflowNote', '')
- }
- console.log('点击了维修审核')
- this.dialogStatus = 'maintenanceAudit2'
- this.dialogFormVisible_MaintenanceAudit = true
- },
- // 维修审核2-保养
- createExamineData2() {
- if (this.examineTemp.statue == 3) {
- console.log('点击了维修审核确认-通过')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'maintainChargDone'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = 5
- this.requestParam.parammaps.orderStatue = 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') {
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.getList()
- this.getPendingList()
- this.dialogFormVisible_MaintenanceAudit = false
- this.dialogFormVisible_See = false
- this.statueReason = false
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- } else {
- console.log('点击了维修审核确认-未通过')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'maintainCharge1'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = 6
- 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') {
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.getList()
- this.getPendingList()
- this.dialogFormVisible_MaintenanceAudit = false
- this.dialogFormVisible_See = false
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- }
- },
- // 接单
- handleReceipt(row) {
- if (row == undefined) {
- this.receiptTemp = this.seeTemp
- } else {
- this.receiptTemp = Object.assign({}, row)
- }
- MessageBox.confirm('是否确认接单', {
- title: '接单',
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.requestParam.name = 'takeRepirsEmp'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.receiptTemp.id
- PostDataByName(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- this.getList()
- this.getPendingList()
- this.dialogFormVisible_See = false
- this.$notify({ title: '成功', message: '接单成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- })
- },
- // 完成维修
- handleRepairComplete(row) {
- console.log('点击了完成维修', row)
- if (row == undefined) {
- this.$set(this.seeTemp, 'isOldProducts', 0)
- this.repairCompleteTemp = this.seeTemp
- } else {
- this.repairCompleteTemp = Object.assign({}, row)
- this.$set(this.repairCompleteTemp, 'isOldProducts', 0)
- }
- this.No2 = false
- this.dialogStatus = 'repairComplete'
- this.dialogFormVisible_RepairComplete = true
- this.getFaultList()
- },
- changeIsOldProducts(val) {
- console.log(val)
- if (val == 1) {
- this.No2 = true
- } else {
- this.No2 = false
- }
- },
- // 完成维修保存
- createRepairCompleteData() {
- console.log('点击了完成维修确认')
- if (this.listFault.length > 0) {
- if (this.repairCompleteTemp.laidcou == 0) {
- if (this.repairCompleteTemp.isOldProducts == 0) {
- console.log('否')
- this.requestParam.name = 'completeRepirs'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.repairCompleteTemp.id
- PostDataByName(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- this.getList()
- this.getPendingList()
- this.dialogFormVisible_RepairComplete = false
- this.dialogFormVisible_See = false
- this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- } else {
- console.log('是')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['repairCompleteTemp'].validate(valid => {
- if (valid) {
- if (this.listAdd.length !== 0) {
- for (var i = 0; i < this.listAdd.length; i++) {
- if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
- this.$message({
- type: 'warning',
- message: '请录入数量是否未填写',
- duration: 2000
- })
- return false
- } else {
- var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
- if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
- this.$message({ type: 'error', message: '录入数量请输入正数,最多保留两位小数点', duration: 2000 })
- return false
- }
- }
- }
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
- this.postDataPramas.data[0].children = []
- this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
- pastureId: this.repairCompleteTemp.pastureId,
- deptId: this.repairCompleteTemp.departmentId,
- partCode: '@insertSpotList.partCode',
- partName: '@insertSpotList.partName',
- partId: '@insertSpotList.id',
- specification: '@insertSpotList.specification',
- unit: '@insertSpotList.unit',
- acturalAmount: '@insertSpotList.acturalAmount',
- eqId: this.repairCompleteTemp.eqId,
- eqCode: this.repairCompleteTemp.eqCode,
- eqName: this.repairCompleteTemp.eqName,
- repairCode: this.repairCompleteTemp.repairCode,
- listType: 0
- }}
- this.postDataPramas.data[1] = { 'name': 'completeRepirs', 'type': 'e', 'parammaps': {
- id: this.repairCompleteTemp.id
- }}
- 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.listAdd = []
- this.dialogFormVisible_RepairComplete = false
- this.dialogFormVisible_See = false
- this.getList()
- this.getPendingList()
- this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
- }
- })
- return true
- } else {
- this.$notify({ title: '', message: '请完善旧品信息', type: 'warning', duration: 2000 })
- return false
- }
- }
- })
- }
- } else {
- this.$notify({ message: '备件未领用不可完成维修', type: 'warning', duration: 2000 })
- }
- } else {
- this.$message({ type: 'warning', message: '请完善故障信息!' })
- }
- },
- oldProductsSearch(queryString, cb) {
- console.log('旧品录入模糊查询输入值', queryString)
- this.requestOldProducts.parammaps['partCode'] = queryString
- this.requestOldProducts.parammaps['RUCode'] = this.repairCompleteTemp.repairCode
- GetDataByName(this.requestOldProducts).then(response => {
- console.log('旧品录入模糊查询搜索data', response.data.list)
- cb(response.data.list)
- })
- },
- handleSelectOldProducts(item) {
- this.repairCompleteTemp.partCode = ''
- console.log('旧品录入模糊查询选中值', item)
- if (this.listAdd.length > 0) {
- // eslint-disable-next-line no-redeclare
- if (this.listAdd.find(obj => obj.id === item.id)) {
- this.$message({ type: 'warning', message: '此旧品已存在,请重新选择旧品' })
- } else {
- if (item.checkoutNumber == null) {
- this.$set(item, 'checkoutNumber', item.reportery)
- }
- this.listAdd.unshift(item)
- }
- } else {
- if (item.checkoutNumber == null) {
- this.$set(item, 'checkoutNumber', item.reportery)
- }
- this.listAdd.unshift(item)
- }
- },
- partDelete(row) {
- console.log(this.listAdd)
- MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
- confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
- }).then(() => {
- // console.log(this.list2)
- for (var i = 0; i < this.listAdd.length; i++) {
- console.log(this.listAdd[i])
- if (this.listAdd[i].id === row.id) {
- var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
- }
- if (listAddIndex > -1) {
- this.listAdd.splice(listAddIndex, 1)
- return
- }
- }
- })
- },
- // 维修及领用
- handleMaintenanceRequisition(row) {
- console.log('点击了维修及领用')
- if (row == undefined) {
- this.maintenanceRequisitionTemp = this.seeTemp
- this.$set(this.maintenanceRequisitionTemp, 'repirsTime', parseTime(new Date(), '{y}-{m}-{d}'))
- } else {
- this.maintenanceRequisitionTemp = Object.assign({}, row)
- this.$set(this.maintenanceRequisitionTemp, 'repirsTime', parseTime(new Date(), '{y}-{m}-{d}'))
- }
- this.dialogStatus = 'maintenanceRequisition'
- this.dialogFormVisible_MaintenanceRequisition = true
- this.getNewFaultList()
- this.getPosition()
- this.getCollectionSpareParts()
- this.getCollectionSpareParts2()
- },
- getNewFaultList() {
- this.listLoadingFault = true
- this.getFaultListParm.parammaps.maintainId = this.maintenanceRequisitionTemp.id
- GetDataByName(this.getFaultListParm).then(response => {
- console.log('故障table数据', response.data.list)
- if (response.data.list !== null) {
- this.listNewFault = response.data.list
- } else {
- this.listNewFault = []
- }
- setTimeout(() => {
- this.listLoadingFault = false
- }, 100)
- })
- },
- getNewCollarUseList() {
- this.listLoadingCollarUse = true
- this.getCollarUseListParm.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
- GetDataByName(this.getCollarUseListParm).then(response => {
- console.log('领用记录table数据', response.data.list)
- this.listCollarUse = response.data.list
- setTimeout(() => {
- this.listLoadingCollarUse = false
- }, 100)
- })
- },
- tabMaintenance(tab, event) {
- console.log(tab.name)
- if (tab.name == 'first') {
- this.rapairBtn = true
- } else {
- this.rapairBtn = false
- }
- },
- getPosition() {
- this.getPositionsParm.parammaps.eqId = this.maintenanceRequisitionTemp.eqId
- GetDataByName(this.getPositionsParm).then(response => {
- console.log('故障部位数据', response.data.list)
- this.positions = response.data.list
- })
- },
- changePosition(val) {
- console.log('故障部位输入值', val)
- console.log(this.positions.find(obj => obj.id == val).positionName)
- this.newFaultTemp.positionName = this.positions.find(obj => obj.id == val).positionName
- this.getAppearanceParm.parammaps.id = val
- this.getAppearance()
- },
- getAppearance() {
- GetDataByName(this.getAppearanceParm).then(response => {
- console.log('故障详情数据', response.data.list)
- this.appearances = response.data.list
- })
- },
- changeAppearance(val) {
- console.log('故障详情输入值', val)
- if (this.newFaultTemp.positionId == '') {
- this.$message({
- type: 'warning',
- message: '请选择故障部位'
- })
- }
- if (this.listNewFault == null) {
- this.listNewFault = []
- this.listNewFault.push({ 'rowId': this.rowId++, positionId: this.newFaultTemp.positionId, positionName: this.newFaultTemp.positionName, appearanceName: val, failureCause: this.newFaultTemp.failureCause, treatmentMethod: this.newFaultTemp.treatmentMethod })
- this.newFaultTemp = {}
- this.appearances = []
- } else {
- this.listNewFault.push({ 'rowId': this.rowId++, positionId: this.newFaultTemp.positionId, positionName: this.newFaultTemp.positionName, appearanceName: val, failureCause: this.newFaultTemp.failureCause, treatmentMethod: this.newFaultTemp.treatmentMethod })
- this.newFaultTemp = {}
- this.appearances = []
- }
- },
- newFaultDelete(row) {
- console.log(row)
- MessageBox.confirm('确认删除?', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- for (var i = 0; i < this.listNewFault.length; i++) {
- console.log(this.listNewFault[i])
- if (this.listNewFault[i].rowId === row.rowId) {
- var listNewFaultIndex = this.listNewFault.indexOf(this.listNewFault[i])
- }
- if (listNewFaultIndex > -1) {
- this.listNewFault.splice(listNewFaultIndex, 1)
- return
- }
- }
- })
- },
- // 维修及领用-维修确认
- createMaintenanceRequisitionteData() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['maintenanceRequisitionTemp'].validate(valid => {
- if (valid) {
- console.log(this.newFaultTemp.positionId)
- if (this.listNewFault.length == 0) {
- this.$notify({ title: '', message: '请输入故障诊断', type: 'warning', duration: 2000 })
- return false
- } else {
- for (let i = 0; i < this.listNewFault.length; i++) {
- if (this.listNewFault[i].failureCause == '' || this.listNewFault[i].failureCause == undefined) {
- this.$notify({ title: '', message: '请输入故障原因', type: 'warning', duration: 2000 })
- return false
- }
- }
- }
- if (this.listNewFault.length !== 0) {
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'deleteMaintainAppearance', 'type': 'e', 'parammaps': {
- maintainId: this.maintenanceRequisitionTemp.id
- }}
- this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listNewFault }}
- this.postDataPramas.data[1].children = []
- this.postDataPramas.data[1].children[0] = { 'name': 'insertMaintainAppearance', 'type': 'e', 'parammaps': {
- appearanceName: '@insertSpotList.appearanceName',
- positionId: '@insertSpotList.positionId',
- positionName: '@insertSpotList.positionName',
- repirsTime: this.maintenanceRequisitionTemp.repirsTime,
- maintainId: this.maintenanceRequisitionTemp.id,
- failureCause: '@insertSpotList.failureCause',
- treatmentMethod: '@insertSpotList.treatmentMethod'
- }}
- 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.getList()
- this.getPendingList()
- this.dialogFormVisible_MaintenanceRequisition = false
- this.dialogFormVisible_See = false
- this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
- }
- })
- } else {
- this.$notify({ title: '', message: '请选择故障', type: 'warning', duration: 2000 })
- return false
- }
- }
- })
- },
- getCollectionSpareParts() {
- this.getCollarUseListParm.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
- GetDataByName(this.getCollarUseListParm).then(response => {
- console.log('备件领用table数据', response.data.list)
- this.listCollectionSpareParts = response.data.list
- })
- },
- getCollectionSpareParts2() {
- this.getCollarUseListParm2.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
- GetDataByName(this.getCollarUseListParm2).then(response => {
- console.log('备件领用无库存table数据', response.data.list)
- this.listCollectionSpareParts2 = response.data.list
- })
- },
- openDetails(row, column, cell, event) {
- if (column.label !== '操作') {
- this.$router.push({ path: '/customs/Receive', query: { applyCode: row.applyCode }})
- }
- },
- handleCollarUseSee(row, isStock) {
- this.collectionSparePartsSeeTemp = Object.assign({}, row)
- this.dialogStatus = 'collectionSparePartsSee'
- this.dialogFormVisible_CollectionSparePartsSee = true
- this.isCreatePartDelete = false
- this.isPartCode = false
- if (isStock == 0) {
- this.collectionSparePartsSeeTemp.isStock = 0
- this.getCollarUseSeeList()
- } else if (isStock == 1) {
- this.collectionSparePartsSeeTemp.isStock = 1
- this.getCollarUseSeeList2()
- }
- },
- getCollarUseSeeList() {
- this.getCollarUseSeeParm.parammaps.id = this.collectionSparePartsSeeTemp.id
- GetDataByName(this.getCollarUseSeeParm).then(response => {
- this.listCreateCollectionSpareParts = response.data.list
- })
- },
- getCollarUseSeeList2() {
- // console.log(this.collectionSparePartsSeeTemp)
- this.getCollarUseSeeParm2.parammaps.bigId = this.maintenanceRequisitionTemp.repairCode
- GetDataByName(this.getCollarUseSeeParm2).then(response => {
- this.listCreateCollectionSpareParts = response.data.list
- })
- },
- handleCollectionSparePartsCreate() {
- this.collectionSparePartsSeeTemp = this.maintenanceRequisitionTemp
- this.collectionSparePartsSeeTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.dialogStatus = 'collectionSparePartsCreate'
- this.dialogFormVisible_CollectionSparePartsSee = true
- this.isCreatePartDelete = true
- this.listCreateCollectionSpareParts = []
- this.isPartCode = true
- this.getCreateNumber()
- },
- getCreateNumber() {
- GetDataByName(this.getParmCreateNumber).then(response => {
- this.$nextTick(() => {
- console.log('新增领用单号', response.data.list[0].orderCode)
- this.collectionSparePartsSeeTemp.applyCode = response.data.list[0].orderCode
- this.$forceUpdate()
- })
- })
- },
- sparePartSearch(queryString, cb) {
- console.log('备件模糊查询输入值', queryString)
- this.requestSparePart.parammaps['partCode'] = queryString
- GetDataByName(this.requestSparePart).then(response => {
- console.log('备件模糊查询搜索data', response.data.list)
- if (response.data.list == null) {
- cb([])
- } else {
- cb(response.data.list)
- }
- })
- },
- handleSelectSparePart(item) {
- console.log('备件模糊查询选中值', item)
- if (this.listCreateCollectionSpareParts.length > 0) {
- // eslint-disable-next-line no-redeclare
- if (this.listCreateCollectionSpareParts.find(obj => obj.partId === item.partId)) {
- this.$message({ type: 'warning', message: '此备件已存在,请重新选择备件' })
- } else {
- this.listCreateCollectionSpareParts.unshift(item)
- }
- } else {
- this.listCreateCollectionSpareParts.unshift(item)
- }
- },
- handleAddSparePartsToBeCollected() {
- console.log('添加待领用备件')
- this.addSparePartsToBeCollectedParam.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
- GetDataByName(this.addSparePartsToBeCollectedParam).then(response => {
- if (response.data.list == null) {
- this.$message({ type: 'warning', message: '无可添加待领用备件' })
- } else {
- if (this.listCreateCollectionSpareParts.length > 0) {
- console.log(this.filtersArr(this.listCreateCollectionSpareParts, response.data.list))
- this.listCreateCollectionSpareParts = this.filtersArr(this.listCreateCollectionSpareParts, response.data.list)
- } else {
- this.listCreateCollectionSpareParts = response.data.list
- }
- }
- })
- },
- filtersArr(list, list2) {
- for (var i = 0; i < list.length; i++) {
- for (var j = 0; j < list2.length; j++) {
- if (list[i].partId == list2[j].partId) {
- list[i] = list2[j]
- list2.splice(j, 1)
- }
- }
- }
- return list.concat(list2)
- },
- createPartDelete(row) {
- console.log(this.listAdd)
- MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // console.log(this.list2)
- for (var i = 0; i < this.listCreateCollectionSpareParts.length; i++) {
- console.log(this.listCreateCollectionSpareParts[i])
- if (this.listCreateCollectionSpareParts[i].id === row.id) {
- var listCreateCollectionSparePartsIndex = this.listCreateCollectionSpareParts.indexOf(this.listCreateCollectionSpareParts[i])
- }
- if (listCreateCollectionSparePartsIndex > -1) {
- this.listCreateCollectionSpareParts.splice(listCreateCollectionSparePartsIndex, 1)
- return
- }
- }
- })
- },
- handleViewProgress(row) {
- console.log('查看进度', row)
- console.log(this.maintenanceRequisitionTemp)
- this.viewProgressTemp = Object.assign({}, row)
- this.dialogStatus = 'ViewProgress'
- this.dialogFormVisible_ViewProgress = true
- this.getNumbers()
- this.getPurchaseapplicationList()
- this.getProcurementList()
- },
- getNumbers() {
- this.getNumbersParm.parammaps.contractId = this.viewProgressTemp.contractId
- this.getNumbersParm.parammaps.RUCode = this.maintenanceRequisitionTemp.repairCode
- GetDataByName(this.getNumbersParm).then(response => {
- this.numbersList = response.data.list[0]
- })
- },
- // 申购情况
- getPurchaseapplicationList() {
- this.getPurchaseapplicationParm.parammaps.createDate = this.viewProgressTemp.date
- this.getPurchaseapplicationParm.parammaps.partCode = this.viewProgressTemp.partCode
- this.getPurchaseapplicationParm.parammaps.pastureId = this.viewProgressTemp.pastureId
- GetDataByName(this.getPurchaseapplicationParm).then(response => {
- if (response.data.list !== null) {
- this.purchaseapplicationList = response.data.list
- } else {
- this.purchaseapplicationList = []
- }
- })
- },
- // 采购情况
- getProcurementList() {
- this.getProcurementParm.parammaps.createDate = this.viewProgressTemp.date
- this.getProcurementParm.parammaps.partCode = this.viewProgressTemp.partCode
- this.getProcurementParm.parammaps.pastureId = this.viewProgressTemp.pastureId
- GetDataByName(this.getProcurementParm).then(response => {
- if (response.data.list !== null) {
- this.procurementList = response.data.list
- } else {
- this.procurementList = []
- }
- })
- },
- // 添加领用保存
- createCollectionSparePartsData() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['collectionSparePartsSeeTemp'].validate(valid => {
- if (valid) {
- if (this.listCreateCollectionSpareParts.length !== 0) {
- for (var i = 0; i < this.listCreateCollectionSpareParts.length; i++) {
- console.log(this.listCreateCollectionSpareParts[i].amount)
- if (this.listCreateCollectionSpareParts[i].amount !== undefined && this.listCreateCollectionSpareParts[i].amount !== '') {
- var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
- if (!rulesAmount.test(this.listCreateCollectionSpareParts[i].amount)) {
- this.$message({
- type: 'error',
- message: '领用数量请输入正数,最多保留两位小数',
- duration: 2000
- })
- return false
- } else {
- var listCreateCollectionSpareParts1 = [] // >库存
- var listCreateCollectionSpareParts2 = [] // <=库存
- var amountList = []
- var amount2List = []
- for (let i = 0; i < this.listCreateCollectionSpareParts.length; i++) {
- var obj = {}
- var obj2 = {}
- obj.amount = this.listCreateCollectionSpareParts[i].amount
- obj.bigId = this.listCreateCollectionSpareParts[i].bigId
- obj.brand = this.listCreateCollectionSpareParts[i].brand
- obj.brandId = this.listCreateCollectionSpareParts[i].brandId
- obj.contractId = this.listCreateCollectionSpareParts[i].contractId
- obj.enable = this.listCreateCollectionSpareParts[i].enable
- obj.id = this.listCreateCollectionSpareParts[i].id
- obj.inventoryType = this.listCreateCollectionSpareParts[i].inventoryType
- obj.isZeroStock = this.listCreateCollectionSpareParts[i].isZeroStock
- obj.partCode = this.listCreateCollectionSpareParts[i].partCode
- obj.partId = this.listCreateCollectionSpareParts[i].partId
- obj.partName = this.listCreateCollectionSpareParts[i].partName
- obj.partRepId = this.listCreateCollectionSpareParts[i].partRepId
- obj.pastureId = this.listCreateCollectionSpareParts[i].pastureId
- obj.pastureName = this.listCreateCollectionSpareParts[i].pastureName
- obj.planAmount = this.listCreateCollectionSpareParts[i].planAmount
- obj.price = this.listCreateCollectionSpareParts[i].price
- obj.providerId = this.listCreateCollectionSpareParts[i].providerId
- obj.providerName = this.listCreateCollectionSpareParts[i].providerName
- obj.remark = this.listCreateCollectionSpareParts[i].remark
- obj.reportery = this.listCreateCollectionSpareParts[i].reportery
- obj.specification = this.listCreateCollectionSpareParts[i].specification
- obj.unit = this.listCreateCollectionSpareParts[i].unit
- obj.prid = this.listCreateCollectionSpareParts[i].prid
- obj.mr = this.listCreateCollectionSpareParts[i].mr
- obj.locationId = this.listCreateCollectionSpareParts[i].locationId
- amountList.push(obj)
- obj2.amount = this.listCreateCollectionSpareParts[i].amount
- obj2.bigId = this.listCreateCollectionSpareParts[i].bigId
- obj2.brand = this.listCreateCollectionSpareParts[i].brand
- obj2.brandId = this.listCreateCollectionSpareParts[i].brandId
- obj2.contractId = this.listCreateCollectionSpareParts[i].contractId
- obj2.enable = this.listCreateCollectionSpareParts[i].enable
- obj2.id = this.listCreateCollectionSpareParts[i].id
- obj2.inventoryType = this.listCreateCollectionSpareParts[i].inventoryType
- obj2.isZeroStock = this.listCreateCollectionSpareParts[i].isZeroStock
- obj2.partCode = this.listCreateCollectionSpareParts[i].partCode
- obj2.partId = this.listCreateCollectionSpareParts[i].partId
- obj2.partName = this.listCreateCollectionSpareParts[i].partName
- obj2.partRepId = this.listCreateCollectionSpareParts[i].partRepId
- obj2.pastureId = this.listCreateCollectionSpareParts[i].pastureId
- obj2.pastureName = this.listCreateCollectionSpareParts[i].pastureName
- obj2.planAmount = this.listCreateCollectionSpareParts[i].planAmount
- obj2.price = this.listCreateCollectionSpareParts[i].price
- obj2.providerId = this.listCreateCollectionSpareParts[i].providerId
- obj2.providerName = this.listCreateCollectionSpareParts[i].providerName
- obj2.remark = this.listCreateCollectionSpareParts[i].remark
- obj2.reportery = this.listCreateCollectionSpareParts[i].reportery
- obj2.specification = this.listCreateCollectionSpareParts[i].specification
- obj2.unit = this.listCreateCollectionSpareParts[i].unit
- obj2.prid = this.listCreateCollectionSpareParts[i].prid
- obj.mr = this.listCreateCollectionSpareParts[i].mr
- obj2.locationId = this.listCreateCollectionSpareParts[i].locationId
- amount2List.push(obj2)
- }
- for (let i = 0; i < amountList.length; i++) {
- if (parseFloat(amountList[i].amount) > parseFloat(amountList[i].reportery)) {
- var amount = String(parseFloat(amountList[i].amount) - parseFloat(amountList[i].reportery))
- amountList[i].amount = amount
- listCreateCollectionSpareParts1.push(amountList[i])
- if (parseFloat(amountList[i].reportery) > 0) {
- amount2List[i].amount = String(amount2List[i].reportery)
- listCreateCollectionSpareParts2.push(amount2List[i])
- }
- } else {
- listCreateCollectionSpareParts2.push(amountList[i])
- }
- }
- console.log(this.listCreateCollectionSpareParts, 'this.listCreateCollectionSpareParts')
- console.log(listCreateCollectionSpareParts1, '>库存listCreateCollectionSpareParts1')
- console.log(listCreateCollectionSpareParts2, '<=库存listCreateCollectionSpareParts2')
- let mySumPrice = 0
- for (let i = 0; i < listCreateCollectionSpareParts2.length; i++) {
- mySumPrice += parseFloat(listCreateCollectionSpareParts2[i].price) * parseFloat(listCreateCollectionSpareParts2[i].amount)
- }
- if (mySumPrice > 500) {
- this.collectionSparePartsSeeTemp.SHStatus = 2
- } else {
- this.collectionSparePartsSeeTemp.SHStatus = 9
- }
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'insertSpotList3', 'resultmaps': { 'list': this.listCreateCollectionSpareParts }}
- this.postDataPramas.data[0].children = []
- this.postDataPramas.data[0].children[0] = { 'name': 'updatePartapplyuseAmount_m', 'type': 'e', 'parammaps': {
- amount: '@insertSpotList3.amount',
- paid: '@insertSpotList3.contractId',
- RUCode: this.collectionSparePartsSeeTemp.repairCode
- }}
- this.postDataPramas.data[1] = { 'name': 'insertBigpartapply_m', 'type': 'e', 'parammaps': {
- pastureId: this.collectionSparePartsSeeTemp.pastureId,
- applyCode: this.collectionSparePartsSeeTemp.applyCode,
- applyType: 1,
- departmentId: this.collectionSparePartsSeeTemp.departmentId,
- empId: this.collectionSparePartsSeeTemp.pickId,
- applyDate: this.collectionSparePartsSeeTemp.createDate,
- RUCode: this.collectionSparePartsSeeTemp.repairCode
- }}
- this.postDataPramas.data[2] = { 'name': 'insertSpotList2', 'resultmaps': { 'list': listCreateCollectionSpareParts1 }}
- this.postDataPramas.data[2].children = []
- this.postDataPramas.data[2].children[0] = { 'name': 'insertpartapply_m', 'type': 'e', 'parammaps': {
- bigId: this.collectionSparePartsSeeTemp.repairCode,
- prid: '@insertSpotList2.prid',
- pastureId: '@insertSpotList2.pastureId',
- partId: '@insertSpotList2.partId',
- partCode: '@insertSpotList2.partCode',
- partName: '@insertSpotList2.partName',
- specification: '@insertSpotList2.specification',
- brandId: '@insertSpotList2.brandId',
- price: '@insertSpotList2.price',
- amount: '@insertSpotList2.amount',
- eqName: this.collectionSparePartsSeeTemp.eqName,
- eqCode: this.collectionSparePartsSeeTemp.eqCode,
- providerId: '@insertSpotList2.providerId',
- note: '@insertSpotList2.note',
- reportery: '@insertSpotList2.reportery',
- contractId: '@insertSpotList2.contractId'
- }}
- if (listCreateCollectionSpareParts2.length > 0) {
- this.postDataPramas.data[3] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
- pastureId: this.collectionSparePartsSeeTemp.pastureId,
- applyCode: this.collectionSparePartsSeeTemp.applyCode,
- applyType: 1,
- departmentId: this.collectionSparePartsSeeTemp.departmentId,
- empId: this.collectionSparePartsSeeTemp.pickId,
- applyDate: this.collectionSparePartsSeeTemp.createDate,
- RUCode: this.collectionSparePartsSeeTemp.repairCode,
- SHStatus: this.collectionSparePartsSeeTemp.SHStatus
- }}
- this.postDataPramas.data[4] = { 'name': 'insertSpotList', 'resultmaps': { 'list': listCreateCollectionSpareParts2 }}
- this.postDataPramas.data[4].children = []
- this.postDataPramas.data[4].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
- bigId: '@insertBigpartapply.LastInsertId',
- pastureId: '@insertSpotList.pastureId',
- partId: '@insertSpotList.partId',
- partCode: '@insertSpotList.partCode',
- partName: '@insertSpotList.partName',
- specification: '@insertSpotList.specification',
- brandId: '@insertSpotList.brandId',
- price: '@insertSpotList.price',
- amount: '@insertSpotList.amount',
- eqName: this.collectionSparePartsSeeTemp.eqName,
- eqCode: this.collectionSparePartsSeeTemp.eqCode,
- providerId: '@insertSpotList.providerId',
- note: '@insertSpotList.note',
- reportery: '@insertSpotList.reportery',
- contractId: '@insertSpotList.contractId',
- locationId: '@insertSpotList.locationId'
- }}
- }
- 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.dialogFormVisible_CollectionSparePartsSee = false
- this.getCollectionSpareParts()
- this.getCollectionSpareParts()
- this.getCollectionSpareParts2()
- this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
- }
- })
- return true
- }
- } else {
- this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
- return false
- }
- }
- } else {
- this.$notify({ title: '', type: 'warning', message: '请选择备件', duration: 2000 })
- return false
- }
- }
- })
- },
- form_delete(row) {
- MessageBox.confirm('确认删除?', {
- confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
- }).then(() => {
- this.requestParam.name = 'deleteMaintain'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = row.id
- PostDataByName(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- this.getList()
- this.getPendingList()
- this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }).catch(() => {
- this.$message({ type: 'info', message: '已取消删除' })
- })
- },
- handleRejectRepair(row) {
- console.log('报修驳回')
- this.rejectRepair.temp = Object.assign({}, row)
- this.dialogStatus = 'rejectRepair'
- this.rejectRepair.dialogFormVisible = true
- },
- rejectRepairData() {
- console.log('报修驳回确认')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['rejectRepair'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'updateMaintain'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.shutdownPerson = Cookies.get('employeid')
- this.requestParam.parammaps.id = this.rejectRepair.temp.id
- this.requestParam.parammaps.shutdownReason = this.rejectRepair.temp.shutdownReason
- PostDataByName(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- this.getList()
- this.getPendingList()
- this.rejectRepair.dialogFormVisible = false
- this.$notify({ title: '成功', message: '驳回成功', type: 'success', duration: 2000 })
- } 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 = {}
- this.downLoadParm.name = 'loadRepirsList'
- this.downLoadParm.offset = 0
- this.downLoadParm.page = 1
- this.downLoadParm.returntype = 'Map'
- if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
- this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
- this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
- } else {
- this.getdataListParm.parammaps.startTime = ''
- this.getdataListParm.parammaps.stopTime = ''
- }
- this.downLoadParm.parammaps = this.getdataListParm.parammaps
- GetAccount(this.downLoadParm).then(response => {
- if(response.data.list !== null && response.data.list !== ''){
- for(let i=0;i<response.data.list.length;i++){
- if(response.data.list[i].orderStatue == 0){
- this.$set(response.data.list[i],'orderStatue','待接单')
- }else if(response.data.list[i].orderStatue == 1){
- this.$set(response.data.list[i],'orderStatue','维修中')
- }else if(response.data.list[i].orderStatue == 2){
- this.$set(response.data.list[i],'orderStatue','维修完成')
- }else if(response.data.list[i].orderStatue == 3){
- this.$set(response.data.list[i],'orderStatue','已驳回')
- }
- if (response.data.list[i].SHStatue == 1) {
- this.$set(response.data.list[i],'SHStatue','')
- } else if (response.data.list[i].SHStatue == 2 || response.data.list[i].SHStatue == 3) {
- this.$set(response.data.list[i],'SHStatue','审核中')
- } else if (response.data.list[i].SHStatue == 4 || response.data.list[i].SHStatue == 6) {
- this.$set(response.data.list[i],'SHStatue','未通过')
- } else if (response.data.list[i].SHStatue == 5) {
- this.$set(response.data.list[i],'SHStatue','已通过')
- }
- }
- }else{
- response.data.list = []
- }
- this.downLoadList = response.data.list
- console.log(this.downLoadList)
- if (response.data.list !== '') {
- this.percentage = 99
- setTimeout(() => {
- this.isPercentage = false
- }, 2000)
- }
- const elecExcelDatas = [
- {
- tHeader: ['报修单号', '牧场', '设备内部编号', '设备名称', '规格型号', '部门', '故障情况','报修人','报修时间','维修日期','维修部门','处理状态','领用单状态','旧品录入状态','审核状态','故障部位','故障详情','故障原因','处理方式'],
- filterVal: ['repairCode', 'pastureName', 'eqCode', 'eqName', 'specification', 'departmentName', 'details','requesterName','requestTime','stopTime','repairDeptName','orderStatue','LYStatue','LRStatue','SHStatue','positionName','appearanceName','failureCause','treatmentMethod'],
- tableDatas: this.downLoadList,
- sheetName: '设备维修'
- }
- ]
- json2excel(elecExcelDatas, '设备维修', true, 'xlsx')
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .successMaintenanceAudit{
- width: 70px;
- color: #fff;
- }
- .successRequisition{
- width: 80px;
- color: #fff;
- }
- /deep/ .el-badge__content.is-fixed{
- z-index: 1;
- }
- </style>
- <style lang="scss">
- .el-step__head.is-success {
- color: #409EFF;
- border-color: #409EFF;
- }
- .el-step__title.is-success{
- color: #409EFF;
- }
- .el-step__head.is-process{
- color: #409EFF;
- border-color: #409EFF;
- .el-step__icon.is-text{
- background: #409EFF;
- color: #fff;
- }
- }
- .step-row{
- color: #000;
- }
- </style>
|