12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235 |
- <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"
- :max-height="myHeight"
- >
- <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-if="roleSet1(row)" style="display:inline-block" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
- <!-- <el-button v-else-if="(row.orderStatue == 1)" style="display:none" 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-if="roleSet2(row)" 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-if="roleSet3(row)" 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.orderStatue == 1 ) && row.SHStatue !== 5) && 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>
- <el-button v-if="isshengweiwaidan && row.outsourcing == 1" style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont(row)">生成委外单</el-button>
- <el-button v-if="roleSet1(row) && row.outsourcing == 0" style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont_sure(row)">委外维修</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页 -->
- <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
- <!-- 新增委外维修单 -->
- <el-dialog title="新增委外维修单" :visible.sync="dialogFormVisibleCont" :close-on-click-modal="false" width="90%">
- <div >
- <el-form ref="createTempCont" :rules="rules" :model="createTempCont" label-position="right" label-width="100px" style="width: 100%;">
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="委外维修单号:" prop="outsourcingCode">
- <el-input ref="outsourcingCode" v-model="createTempCont.outsourcingCode" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="牧场:" prop="pastureId" >
- <el-select v-model="createTempCont.pastureId" placeholder="牧场" class="filter-item" style="width:100%" @change="change_pasture2" >
- <el-option v-for="item in pastureNameList" :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="departmentId">
- <el-select v-model="createTempCont.departmentId" placeholder="责任部门" class="filter-item" style="width:100%" @change="change_depart2">
- <el-option v-for="item in departNameList2" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="8">
- <el-form-item label="合同:" prop="contract">
- <el-radio-group v-model="createTempCont.contract" @change="change_contract" >
- <el-radio :label="0" >无合同</el-radio>
- <el-radio :label="1" checked>有合同</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="申请人:" prop="applicant">
- <el-select v-model="createTempCont.applicant" placeholder="申请人" class="filter-item" style="width:100%" :disabled="dialogStatus==='see'" >
- <el-option v-for="item in employeNameList" :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="date">
- <el-date-picker v-model="createTempCont.date" :picker-options="pickerOptions" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="20">
- <el-col :span="16">
- <el-form-item label="故障描述:" prop="description">
- <el-input v-model="createTempCont.description" type="textarea" autosize :disabled="dialogStatus==='see'" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="报修单号:" prop="RUCode">
- <el-input ref="RUCode" v-model="createTempCont.RUCode" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoading"
- element-loading-text="给我一点时间"
- :data="listAddCont"
- border
- fit
- highlight-current-row
- style="width: 100%;margin-bottom:30px"
- :row-style="rowStyle"
- :cell-style="cellStyle"
- class="elTable"
- >
- <!-- table表格 -->
- <el-table-column :key="0" label="序号" align="center" type="index" width="50px" />
- <el-table-column :key="1" label="供应商" prop="providerName" align="center" min-width="80px">
- <template slot-scope="scope">
- <el-select v-model="scope.row.providerName" placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px" >
- <el-option v-for="item in providerNameList" :key="item.name" :label="item.name" :value="item.name" />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column :key="2" label="金额" v-if="createTempCont.contract == 0" prop="amount" align="center" min-width="80px">
- <template slot-scope="scope">
- <span >
- <el-input v-model="scope.row.amount" style="margin-top:10px" />
- </span>
- </template>
- </el-table-column>
- <el-table-column :key="3" label="设备名称" prop="eqName" align="center" min-width="250">
- <template slot-scope="scope">
- <el-autocomplete style="margin-top:10px"
- v-model="scope.row.eqName"
- class="inline-input"
- :fetch-suggestions="querySearchEqNameCont"
- value-key="eqName"
- placeholder="设备名称"
- @select="(value)=>
- {handleSelectEqNameCont(value, scope.row)}"
- @blur="(value)=>
- {blurSelectEqNameCont(value, scope.row)}"
- >
- <template slot-scope="{ item }">
- <span class="addr">{{ item.eqName }}</span>
- |<span class="addr">{{ item.eqCode }}</span>
- </template>
- </el-autocomplete>
- </template>
- </el-table-column>
- <el-table-column :key="4" label="设备内部编号" prop="eqCode" align="center" min-width="150">
- <template slot-scope="scope">
- <el-autocomplete style="margin-top:10px"
- v-model="scope.row.eqCode"
- class="inline-input"
- :fetch-suggestions="querySearchCodeCont"
- value-key="eqCode"
- placeholder="设备内部编号"
- @select="(value)=>
- {handleSelectEqCodeCont(value, scope.row)}"
- @blur="(value)=>
- {blurSelectEqCodeCont(value, scope.row)}"
- />
- </template>
- </el-table-column>
- <el-table-column :key="5" label="费用类型" prop="typea" align="center" min-width="80px">
- <template slot-scope="scope">
- <el-select v-model="scope.row.typea" placeholder="费用类型" class="filter-item" style="width: 120px; margin-top:10px " >
- <el-option v-for="item in costTypeList" :key="item.id" :label="item.name" :value="item.name" />
- </el-select>
- </template>
- </el-table-column>
- <!-- <el-table-column label="交付日期" prop="date" align="center" min-width="80px">
- <template slot-scope="scope">
- <span v >
- <el-date-picker v-model="scope.row.date" style="margin-top:10px" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
- </span>
- </template>
- </el-table-column> -->
- <el-table-column :key="6" v-if="createTempCont.contract == 1" label="合同编号" prop="contractCode" align="center" min-width="80px">
- <template slot-scope="scope">
- <span >
- <el-input v-model="scope.row.contractCode" style="margin-top:10px" />
- </span>
- </template>
- </el-table-column>
- <el-table-column :key="7" label="备注" prop="remark" align="center" min-width="80px">
- <template slot-scope="scope">
- <span >
- <el-input v-model="scope.row.remark" style="margin-top:10px" />
- </span>
- </template>
- </el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer" style="bottom:10px">
- <el-button type="primary" :disabled="isokDisable" @click="add_dialog_save_cont()">保存并关闭</el-button>
- <el-button @click="dialogFormVisibleCont = false;get_table_data()">取消</el-button>
- </div>
- </div>
- </el-dialog>
- <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" multiple filterable 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="pickId">
- <el-input v-model="pickNameArr" disabled />
- </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="details">
- <el-select v-model="createTemp.details" multiple placeholder="故障情况" filterable class="filter-item" style="width:100%" @change="changeDetails">
- <el-option v-for="item in DetailList" :key="item.describe" :label="item.describe" :value="item.describe" />
- </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;get_table_data()">关闭</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="specification" align="center" min-width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.amount }}</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;get_table_data();">关闭</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="单价" min-width="90px" prop="price" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.price }}</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 {
- myHeight:document.documentElement.clientHeight - 85- 200,
- dialogFormVisibleCont:false,
- createTempCont: {
- RUCode: '',
- pastureId: this.$store.state.user.pastureid,
- departmentId: this.$store.state.user.departmentid,
- employeId: this.$store.state.user.employeid,
- date: parseTime(new Date(), '{y}-{m}-{d}'),
- outsourcingCode: '',
- applicant: '',
- providerId: '',
- departmentName: '',
- description: '',
- contract:1,
- },
- getDepartParam2: {
- name: 'findAllDepart', offset: 0, pagecount: 0,
- parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
- },
- departNameList2: [],
- 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') }},
- { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
- { name: 'findAllProviderByCt', offset: 0, pagecount: 0, parammaps: { 'id': Cookies.get('pastureid') }},
- ],
- orderStatues: [{ id: '0', name: '待接单' }, { id: '1', name: '维修中' }, { id: '2', name: '维修完成' }],
- SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now()// 当天之前的时间可选
- }
- },
- 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' }],
- description: [{ 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')
- }
- },
- isshengweiwaidan:[],
- 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: '',
- eqClassId: '',
- },
- requestEqName: {
- name: 'geteqbyNameCode',
- page: 1,
- offset: 1,
- pagecount: '',
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- }
- },
- getdataListParmDetail: {
- name: 'getFaultdescription',
- parammaps: { eqClassId: '', }
- },
- DetailList: [],
- 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: {}
- },
- getDepartParam1: {
- name: 'findAllDepart', offset: 0, pagecount: 0,
- parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
- },
- pastureNameList: [],
- employeNameList: [],
- departNameList1: [],
- getDepartParam2: {
- name: 'findAllDepart', offset: 0, pagecount: 0,
- parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
- },
- departNameList2: [],
- listAddCont:[
- {providerName:"",providerId: "0",eqId: "0",contractId: "0",}
- ],
- 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'),
- empid: ""
- }
- },
- 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
- },
- depTiDArr:[],
- pickidArr:[],
- pickNameArr:[],
- getParmCreateNumber: {
- name: 'autoCreatCode',
- page: 0,
- offset: 0,
- pagecount: 0,
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid'),
- codeType: 'WW'
- }
- },
- 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: {}
- },
- costTypeList:[
- {id:'保养',name:'保养'},
- {id:'维修',name:'维修'},
- {id:'物耗',name:'物耗'},
- {id:'土建',name:'土建'},
- {id:'安全',name:'安全'},
- ],
- providerNameList:[
- ],
- // 权限按钮
- 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.get_auto_buttons()
- })
- },
- methods: {
- roleSet1(row){
- var result = true
- if(row.orderStatue == 0 && this.isReceipt ){
- if(row.pickId){
- if(row.pickId.split(',').includes(this.getdataListParm.parammaps.loginId)){
- result = true
- } else{
- result = false
- }
- } else{
- result = false
- }
- } else {
- result = false
- }
- return result
- },
- roleSet2(row){
- console.log("isMaintenanceRequisition",this.isMaintenanceRequisition)
- console.log("roleSet2",((row.orderStatue == 1 && row.SHStatue == 1 || row.SHStatue == 4 || row.SHStatue == 6) && this.isMaintenanceRequisition ))
- var result = true
- if((row.orderStatue == 1 && row.SHStatue == 1 || row.SHStatue == 4 || row.SHStatue == 6) && this.isMaintenanceRequisition ){
- console.log("roleSet2")
- if(row.pickId){
- if(row.pickId.split(',').includes(this.getdataListParm.parammaps.loginId)){
- result = true
- } else{
- result = false
- }
- } else{
- result = false
- }
- } else {
- result = false
- }
- return result
- },
- roleSet3(row){
- console.log("roleSet3",((row.orderStatue == 1 && (row.SHStatue == 1 || row.SHStatue == 4 || row.SHStatue == 6)) && this.isRepairComplete ))
- var result = true
- if((row.orderStatue == 1 && (row.SHStatue == 1 || row.SHStatue == 4 || row.SHStatue == 6)) && this.isRepairComplete ){
- console.log("roleSet3")
- if(row.pickId){
- if(row.pickId.split(',').includes(this.getdataListParm.parammaps.loginId)){
- result = true
- } else{
- result = false
- }
- } else{
- result = false
- }
- } else {
- result = false
- }
- return result
- },
- tableSort1(column) {
- sortChange(column, this.listOldProducts)
- },
- tableSort2(column) {
- sortChange(column, this.purchaseapplicationList)
- },
- tableSort3(column) {
- sortChange(column, this.procurementList)
- },
- get_auto_buttons() {
- const shengweiwaidan = 'shengweiwaidan'
- const isshengweiwaidan = checkButtons(this.buttons, shengweiwaidan)
- this.isshengweiwaidan = isshengweiwaidan
- // 报修
- 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.get_select_list()
- this.get_table_data()
- this.getPendingList()
- },
- get_select_list() {
- GetDataByNames(this.requestParams).then(response => {
- this.findAllPasture = response.data.findAllPasture.list
- this.findAllDepart = response.data.findAllDepart1.list
- this.findAllEmploye = response.data.findAllEmploye.list
- this.pastureNameList = response.data.findAllPasture.list
- console.log("牧场下拉框", this.pastureNameList)
- this.employeNameList = response.data.findAllEmploye.list
- console.log("申请人下拉框", this.employeNameList)
- this.providerNameList = response.data.findAllProviderByCt.list
- this.get_depart_list1()
- })
- },
- get_depart_list1() {
- GetDataByName(this.getDepartParam1).then(response => {
- this.departNameList1 = response.data.list
- })
- },
- change_pasture2(item) {
- this.getDepartParam2.parammaps.pastureId = item
- this.get_depart_list2()
- },
- get_depart_list2() {
- GetDataByName(this.getDepartParam2).then(response => {
- this.departNameList2 = response.data.list
- })
- },
- change_depart2(item) {
- this.createTemp.departmentName = this.departNameList2.find(obj => obj.id == item).name
- },
- 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
- })
- },
- get_table_data() {
- 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.get_table_data()
- } 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.get_table_data()
- } 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.get_table_data()
- }
- },
- 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.get_table_data()
- 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 = ''
- this.createTemp.eqClassId = ''
- this.createTemp.pickNameArr = ''
- },
- changePickId(val) {
- if (this.dialogStatus == 'create') {
- var depTiDArr = []
- this.maintainers.forEach(function(item){
- val.forEach(function(items){
- if(item.id == items){
- depTiDArr.push(item.deptid)
- }
- })
- })
- console.log(depTiDArr)
- this.createTemp.repairDept = depTiDArr[0]
- //this.createTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
- console.log(val)
- } else {
- this.distributeLeafletsTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
- }
- },
- add_dialog_save_cont() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['createTempCont'].validate(valid => {
- if (valid) {
- console.log(this.listAddCont)
- if (this.createTempCont.outsourcingCode == '' || this.createTempCont.outsourcingCode == null || this.createTempCont.outsourcingCode == undefined) {
- GetDataByName(this.getParmCreateNumber).then(response => {
- this.$nextTick(() => {
- console.log('新增单号', response.data.list[0].orderCode)
- this.createTempCont.outsourcingCode = response.data.list[0].orderCode
- this.$forceUpdate()
- this.add_dialog_cont_saveSave()
- })
- })
- } else {
- this.add_dialog_cont_saveSave()
- }
- }
- })
- },
- add_dialog_cont_saveSave() {
- // for (var j = 0; j < this.listAddCont.length; j++) {
- // console.log(this.listAddCont[j].amount)
- // if (this.createTempCont.contract == 1){
- // if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
- // this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
- // return false
- // }
- // }
- // }
- // var send_data = {
- // "common": { "returnmap": "0" },
- // "data": [
- // {
- // "name": "addBigoutsourcing", "type": "e",
- // "parammaps": this.createTempCont
- // },
- // {
- // "name": "insertSpotList",
- // "resultmaps": { "list": this.listAddCont },
- // "children": [
- // {
- // "name": "addOutsourcing", "type": "e",
- // "parammaps": {
- // "bigId": "@addBigoutsourcing.LastInsertId",
- // "providerId": "@insertSpotList.providerId",
- // "amount": "@insertSpotList.amount",
- // "eqId": "@insertSpotList.eqId",
- // "eqCode": "@insertSpotList.eqCode",
- // "eqName": "@insertSpotList.eqName",
- // "typea": "@insertSpotList.typea",
- // "date": "@insertSpotList.date",
- // "contractId": "@insertSpotList.contractId",
- // "providerName": "@insertSpotList.providerName",
- // "RUCode": "@insertSpotList.RUCode",
- // "contractCode": "@insertSpotList.contractCode"
- // }
- // }
- // ]
- // },
- // {
- // "name": "takeOutsourcing", "type": "e",
- // "parammaps": {
- // departmentId:this.createTempCont.departmentId,
- // id:this.createTempCont.id,
- // }
- // },
- // ]
- // }
- // ExecDataByConfig(send_data).then(response => {
- // console.log('新增保存发送参数', send_data)
- // if (response.msg === 'fail') {
- // this.$notify({
- // title: '保存失败',
- // message: response.data,
- // type: 'warning',
- // duration: 2000
- // })
- // } else {
- // this.dialogFormVisibleCont = false
- // this.get_table_data()
- // this.$notify({
- // title: '',
- // message: '保存成功',
- // type: 'success',
- // duration: 2000
- // })
- // }
- // })
- // return true
- // ========================
- for (var j = 0; j < this.listAddCont.length; j++) {
- console.log(this.listAddCont[j].amount)
- if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
- // this.$message({ type: 'warning', message: '请检查金额是否未填写', duration: 2000 })
- // return false
- } else {
- // var rulesAmount = /^[1-9]\d*$/
- // if (!rulesAmount.test(this.listAddCont[j].amount)) {
- // this.$message({ type: 'error', message: '申购数量请输入正整数', duration: 2000 })
- // return false
- // }
- }
- if (this.createTempCont.contract == 1){
- if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
- this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
- return false
- }
- }
- }
- var amount = 0
- if(this.createTempCont.contract==0){
- amount = "@insertSpotList.amount"
- }else{
- amount = 0
- }
- if(this.createTempCont.contract == 0){
- // 无合同
- this.$set(this.createTempCont,'status',0)
- }else{
- // 有合同
- this.$set(this.createTempCont,'status',1)
- }
- var send_data = {
- "common": { "returnmap": "0" },
- "data": [
- {
- "name": "addBigoutsourcing", "type": "e",
- "parammaps": this.createTempCont
- },
- {
- "name": "insertSpotList",
- "resultmaps": { "list": this.listAddCont },
- "children": [
- {
- "name": "addOutsourcing", "type": "e",
- "parammaps": {
- "bigId": "@addBigoutsourcing.LastInsertId",
- "providerId": "@insertSpotList.providerId",
- "amount": amount,
- "eqId": "@insertSpotList.eqId",
- "eqCode": "@insertSpotList.eqCode",
- "eqName": "@insertSpotList.eqName",
- "typea": "@insertSpotList.typea",
- "date": "@insertSpotList.date",
- "contractId": "@insertSpotList.contractId",
- "providerName": "@insertSpotList.providerName",
- "contractCode": "@insertSpotList.contractCode",
- "status":this.createTempCont.status
- }
- }
- ]
- },
- {
- "name": "takeOutsourcing", "type": "e",
- "parammaps": {
- departmentId:this.createTempCont.departmentId,
- id:this.createTempCont.id,
- outsourcing:2
- }
- },
- ]
- }
- ExecDataByConfig(send_data).then(response => {
- console.log('新增保存发送参数', send_data)
- if (response.msg === 'fail') {
- this.$notify({
- title: '保存失败',
- message: response.data,
- type: 'warning',
- duration: 2000
- })
- } else {
- if(this.createTempCont.contract==1){
- this.add_dialog_saveSave2()
- }
- this.dialogFormVisibleCont = false
- this.get_table_data()
- this.$notify({
- title: '',
- message: '保存成功',
- type: 'success',
- duration: 2000
- })
- }
- })
- return true
- },
- add_dialog_saveSave2() {
- console.log(this.examineTemp,'=======contract')
- // this.examineTemp.iscontract =
- //牧场
- var mydata = {
- // acceptanceCode:this.createTemp.acceptanceCode,
- pastureId: parseInt(Cookies.get('pastureid')),
- departmentId: parseInt(Cookies.get('departmentid')),
- applicant:Cookies.get('employeid'),
- outsourcingCode:this.createTempCont.outsourcingCode,
- applyType:0,
- date:parseTime(new Date(), '{y}-{m}-{d}'),
- status:1
- }
- if(this.examineTemp.contract == 0){
- mydata.iscontract = 1
- }else{
- mydata.iscontract = 0
- }
- var send_data = {
- "common": { "returnmap": "0" },
- "data": [
- {
- "name": "insertBigacceptance",
- "type": "e",
- "parammaps": mydata
- }
- ]
- }
- ExecDataByConfig(send_data).then(response => {
- console.log('新增保存发送参数', send_data)
- if (response.msg === 'fail') {
- this.$notify({
- title: '保存失败',
- message: response.data,
- type: 'warning',
- duration: 2000
- })
- } else {
- }
- })
- },
- change_contract(val) {
- console.log(val)
- // if(val == 1){
- // this.createTempCont.contract = 1
- // } else {
- // this.createTempCont.contract = 0
- // }
- this.$forceUpdate()
- },
- form_add_cont_sure(row) {
- console.log('点击了是否确认委外维修?',row)
- MessageBox.confirm('是否确认委外维修?', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var send_data = {
- "common": { "returnmap": "0" },
- "data": [
- {
- "name": "editMaintainoutsourcing", "type": "e",
- "parammaps": { "outsourcing": 1, "id":row.id }
- },
- {
- "name": "takeOutsourcing", "type": "e",
- "parammaps": {
- departmentId:this.createTempCont.departmentId,
- id:row.id,
- outsourcing:1
- }
- }
- ]
- }
- ExecDataByConfig(send_data).then(response => {
- this.get_table_data()
- this.$notify({
- title: '成功',
- message: '成功',
- type: 'success',
- duration: 2000
- })
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- })
- })
- },
- form_add_cont(row) {
- this.createTempCont = Object.assign({}, row)
- console.log(this.createTempCont.description)
- if(this.createTempCont.description == undefined || this.createTempCont.description == null){
- this.$set(this.createTempCont,'description','')
- }
- console.log(this.createTempCont.description,'====')
- this.reset_create_cont()
- this.getDepartParam2.parammaps.pastureId = this.createTempCont.pastureId
- this.get_depart_list2()
- this.createTempCont.RUCode = row.repairCode
- this.dialogFormVisibleCont = true
- this.listLoading = false
- this.$nextTick(() => {
- this.$refs['createTempCont'].clearValidate()
- })
- //新增生成单号
- this.get_create_num()
- },
- get_create_num() {
- GetDataByName(this.getParmCreateNumber).then(response => {
- this.$nextTick(() => {
- console.log('新增单号', response.data.list[0].orderCode)
- this.createTempCont.outsourcingCode = response.data.list[0].orderCode
- this.$forceUpdate()
- })
- })
- },
- reset_create_cont() {
- this.createTempCont.pastureId = parseInt(Cookies.get('pastureid'))
- this.createTempCont.departmentId = parseInt(Cookies.get('departmentid'))
- if(parseInt(Cookies.get('pastureid')) == 18){
- this.createTempCont.departmentId = ""
- }
- this.createTempCont.departmentName = Cookies.get('departmentname')
- this.createTempCont.employeId = parseInt(Cookies.get('employeid'))
- this.createTempCont.date = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTempCont.outsourcingCode = ''
- this.createTempCont.applicant = parseInt(Cookies.get('employeid'))
- this.createTempCont.providerId = ''
- this.createTempCont.contract = 1
- this.createTempCont.repairCode = ""
- this.createTempCont.description = ''
- this.listAddCont = [{providerName:"",providerId: "0",eqId: "0",contractId: "0",amount:"",contractCode:"",date:"",eqCode:"",eqName:"",remark:"",typea:"",}]
- },
- change_pasture2(item) {
- this.getDepartParam2.parammaps.pastureId = item
- this.get_depart_list2()
- },
- get_depart_list2() {
- GetDataByName(this.getDepartParam2).then(response => {
- this.departNameList2 = response.data.list
- })
- },
- change_depart2(item) {
- this.createTemp.departmentName = this.departNameList2.find(obj => obj.id == item).name
- },
- 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
- var detailString = this.requestParam.parammaps.details.toString()
- this.requestParam.parammaps.details = detailString
- if(this.requestParam.parammaps.pickId.length != 0 && this.requestParam.parammaps.pickId){
- this.requestParam.parammaps.pickId = this.requestParam.parammaps.pickId.toString()
- }
- PostDataByName(this.requestParam).then(response => {
- console.log('新增保存发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- this.get_table_data()
- 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)
- this.$set(this.createTemp, 'eqClassId', item.eqClassId)
- this.$set(this.createTemp, 'pickId', '')
- 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.getdataListParmDetail.parammaps.eqClassId = item.eqClassId
- this.getDetail()
- this.getRepirsEmpParm.parammaps.empid = item.maintenance
- this.getRepirsEmp()
- 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)
- this.$set(this.createTemp, 'eqClassId', item.eqClassId)
- this.$set(this.createTemp, 'pickId', '')
- 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.getdataListParmDetail.parammaps.eqClassId = item.eqClassId
- this.getDetail()
- this.$forceUpdate()
- this.getRepirsEmpParm.parammaps.empid = item.maintenance
- this.getRepirsEmp()
- },
- getDetail(){
- GetDataByName(this.getdataListParmDetail).then(response => {
- if (response.data.list !== null) {
- console.log('DetailList数据', response.data.list)
- this.DetailList = response.data.list
- } else {
- this.DetailList = []
- }
- })
- },
- changeDetails(e){
- console.log(e)
- },
- 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.getRepirsEmpParm.parammaps.empid = ""
- this.getRepirsEmp()
- },
- changeMaintenanceTeam(val) {
- console.log(val)
- this.getRepirsEmpParm.parammaps.deptid = val
- this.createTemp.pickId = ''
- this.distributeLeafletsTemp.pickId = ''
- this.getRepirsEmpParm.parammaps.empid = ""
- this.getRepirsEmp()
- },
- getRepirsEmp() {
- var _this = this
- GetDataByName(this.getRepirsEmpParm).then(response => {
- console.log('维修人数据', response.data.list)
- _this.maintainers = response.data.list
- var pickNameArr = []
- var pickidArr = []
- var depTiDArr = []
- _this.maintainers.forEach(function(item){
- pickNameArr.push(item.empNameAndmt)
- pickidArr.push(item.id)
- depTiDArr.push(item.deptid)
- })
- _this.pickNameArr = pickNameArr
- _this.pickidArr = pickidArr
- _this.depTiDArr = depTiDArr
- _this.createTemp.pickId = pickidArr
- _this.createTemp.repairDept = depTiDArr[0]
- console.log(pickNameArr,pickidArr,depTiDArr)
- })
- },
- // 派单-保存
- 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.get_table_data()
- 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.get_table_data()
- 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-保养form_add_cont
- 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.get_table_data()
- 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.get_table_data()
- 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
- this.requestParam.parammaps.empid = Cookies.get('employeid')
- PostDataByName(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- this.get_table_data()
- 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()
- var send_data2 = {
- "name": "getpartapplyListBybig",
- "parammaps":{ "RUCode": row.repairCode }
- }
- GetDataByName(send_data2).then(response => {
- console.log('自动带出旧品内容数据', response.data.list)
- if (response.data.list !== null) {
- this.listAdd = response.data.list
- } else {
- this.listAdd = []
- }
- setTimeout(() => {
- this.listLoading = false
- }, 100)
- })
- },
- changeIsOldProducts(val) {
- console.log(val)
- if (val == 1) {
- this.No2 = true
- //旧品录入
- } else {
- this.No2 = false
- }
- },
- querySearchEqNameCont(queryString, cb) {
- console.log('备件名称/设备内部编号模糊查询输入值', queryString)
- this.requestEqName.parammaps['eqName'] = queryString
- GetDataByName(this.requestEqName).then(response => {
- console.log('备件名称模糊查询搜索data', response.data.list)
- this.EqNameList = response.data.list
- cb(this.EqNameList)
- })
- },
- handleSelectEqNameCont(item, row) {
- console.log('备件名称/设备内部编号模糊查询选中值', item.eqName)
- console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
- this.$set(row, 'eqCode', item.eqCode)
- this.$forceUpdate()
- },
- querySearchCodeCont(queryString, cb) {
- console.log('备件名称/设备内部编号模糊查询输入值', queryString)
- this.requestEqName.parammaps['eqCode'] = queryString
- GetDataByName(this.requestEqName).then(response => {
- console.log('备件名称模糊查询搜索data', response.data.list)
- this.EqNameList = response.data.list
- cb(this.EqNameList)
- })
- },
- handleSelectEqCodeCont(item, row) {
- console.log('备件名称/设备内部编号模糊查询选中值', item)
- console.log('备件名称/设备内部编号模糊查询选中值所在行', row)
- this.$set(row, 'eqName', item.eqName)
- this.$forceUpdate()
- },
- blurSelectEqNameCont(item, row) {
- this.$set(row, 'eqName', '')
- this.$set(row, 'eqCode', '')
- },
- blurSelectEqCodeCont(item, row) {
- this.$set(row, 'eqName', '')
- this.$set(row, 'eqCode', '')
- },
- // 完成维修保存
- 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.get_table_data()
- 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 if(this.listAdd[i].acturalAmount > this.listAdd[i].amount){
- 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.get_table_data()
- 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.get_table_data()
- 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.get_table_data()
- 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.get_table_data()
- 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>
|