123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202 |
- <template>
- <div class="app-container">
- <div class="filter-container">
- <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
- <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
- </el-select>
- <el-input v-model="getdataListParm.parammaps.upkeepCode" placeholder="保养单号" clearable style="width: 180px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 180px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 180px;" class="filter-item" />
- <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
- <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
- </el-select>
- <el-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 v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
- <div>
- <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="tableCellStyle"
- 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="保养单号" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.upkeepCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="牧场" min-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="100px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.useEmpName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="保养人" min-width="100px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.upkeepPerson}}</span>
- </template>
- </el-table-column>
- <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
- <el-table-column label="处理状态" min-width="100px" align="center" :formatter="statue" />
- <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="80px" align="center" :formatter="SHStatue" />
- <el-table-column prop="img" label="保养过程" width="180" align="center">
- <template slot-scope="scope">
- <!-- <el-link @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }} </el-link> -->
- <a style="border-bottom: 1px solid #333;" @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }}</a>
- <el-link v-if="scope.row.videoTxt == '未录制'">未录制 </el-link>
- <el-link v-if="scope.row.videoTxt == '已录制未上传'">已录制未上传 </el-link>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" min-width="300" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <el-button v-if="isSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
- <!-- 保养及领用-->
- <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8 ) && row.LYStatue == '未领用' && row.statue !== 0 && isLingYong && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:80px;display:inline-block" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
- <!-- 完成保养 -->
- <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8) && row.statue !== 0 && isComplete && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleCompleteMaintenance(row)">完成保养</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
- <!-- 保养审核 -->
- <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
- <!-- 保养审核3 -->
- <el-button v-if="(row.SHStatue == 3) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
- <!-- 保养审核2 -->
- <!-- <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</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="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" v-if ="dialogFormVisible_See" width="90%">
- <div class="app-see">
- <div v-if="statue1" class="see">
- <el-form
- ref="seeTemp"
- :rules="rules"
- :model="seeTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="保养单号:" prop="upkeepCode">
- <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" 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="pastureName">
- <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
- </el-form-item>
- </el-col>
- <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="employeName">
- <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <!-- <el-form-item label="保养人:" prop="upkeepPerson">
- <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
- </el-form-item> -->
- <el-form-item label="机修 :" prop="useEmpName">
- <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="保养日期:" prop="plantime">
- <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <!-- <el-form-item label="使用人:" prop="useEmpName">
- <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
- </el-form-item> -->
- <el-form-item label="保养人:" prop="upkeepPerson">
- <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="保养内容:" prop="upNameLevel">
- <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoadingMaintenanceContent"
- element-loading-text="给我一点时间"
- :data="listMaintenanceContent"
- border
- fit
- highlight-current-row
- style="width: 90%;margin:0 auto;"
- :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="部位" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.positionName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="项目" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.program }}</span>
- </template>
- </el-table-column>
- <el-table-column label="标准" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.standard }}</span>
- </template>
- </el-table-column>
- <el-table-column label="执行动作" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.active }}</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>
- <el-form-item label="流程进度" />
- <el-steps :active="active" align-center finish-status="success">
- <el-step
- v-for="(item,index) in activeList"
- :key="index"
- :title="item.title"
- :status="item.status"
- >
- <template slot="description">
- <div class="step-row">
- <div>{{ item.name }} {{ item.date }}</div>
- <div>{{ item.reason }}</div>
- <div>{{ 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 == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <el-button v-else type="success" style="display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <!-- 完成保养 -->
- <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
- <el-button v-else type="success" style="display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
- <!-- 保养审核 -->
- <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
- <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
- <!-- 保养审核3 -->
- <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
- <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
- <!-- 保养审核2 -->
- <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div v-if="statue2" 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="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="保养单号:" prop="upkeepCode">
- <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" 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="pastureName">
- <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
- </el-form-item>
- </el-col>
- <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="employeName">
- <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <!-- <el-form-item label="保养人:" prop="upkeepPerson">
- <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
- </el-form-item> -->
- <el-form-item label="机修:" prop="useEmpName">
- <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="保养日期:" prop="plantime">
- <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <!-- <el-form-item label="使用人:" prop="useEmpName">
- <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
- </el-form-item> -->
- <el-form-item label="保养人:" prop="upkeepPerson">
- <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="保养内容:" prop="upNameLevel">
- <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoadingMaintenanceContent"
- element-loading-text="给我一点时间"
- :data="listMaintenanceContent"
- border
- fit
- highlight-current-row
- style="width: 90%;margin:0 auto;"
- :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="部位" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.positionName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="项目" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.program }}</span>
- </template>
- </el-table-column>
- <el-table-column label="标准" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.standard }}</span>
- </template>
- </el-table-column>
- <el-table-column label="执行动作" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.active }}</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>
- <el-form-item label="流程进度" />
- <el-steps :active="active" align-center finish-status="success">
- <el-step
- v-for="(item,index) in activeList"
- :key="index"
- :title="item.title"
- :status="item.status"
- >
- <template slot="description">
- <div class="step-row">
- <div>{{ item.name }} {{ item.date }}</div>
- <div>{{ item.reason }}</div>
- <div>{{ 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 == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <!-- 完成保养 -->
- <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
- <!-- 保养审核 -->
- <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
- <!-- 保养审核3 -->
- <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
- <!-- 保养审核2 -->
- <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- <el-tab-pane label="领用记录" name="second">
- <el-form ref="collarUseTemp" :rules="rules" :model="collarUseTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
- <el-row>
- <el-col :span="6">
- <el-form-item label="领用单号:" prop="applyCode">
- <span>{{ collarUseTemp.applyCode }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="领用部门:" prop="departmentName">
- <span>{{ collarUseTemp.departmentName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="领用日期:" prop="createDate">
- <span>{{ collarUseTemp.createDate }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="领用状态:" prop="statueName">
- <span>{{ collarUseTemp.statueName }}</span>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <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"
- @sort-change="tableSort"
- >
- <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="备件名称" min-width="110px" 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 sortable prop="reportery" label="库存数" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.reportery }}</span>
- </template>
- </el-table-column>
- <el-table-column sortable prop="amount" label="领用数量" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.amount }}</span>
- </template>
- </el-table-column>
- <el-table-column label="用途" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.note }}</span>
- </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="tableSort"
- >
- <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 sortable prop="acturalAmount" label="录入数量" 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="close_diago()">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 保养及领用 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ReceivingSpareParts" :close-on-click-modal="false" width="90%">
- <el-tabs v-model="activeName2">
- <el-tab-pane label="保养" name="first">
- <el-form
- ref="maintainTemp"
- :rules="rules"
- :model="maintainTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="使用人:" prop="employeeId">
- <el-select v-model="maintainTemp.employeeId" placeholder="使用人" class="filter-item" style="width: 120px;">
- <el-option v-for="item in empdeptList" :key="item.id" :label="item.empname" :value="item.id" />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="保养内容:" prop="upNameLevel">
- <el-input ref="upNameLevel" v-model="maintainTemp.upNameLevel" disabled />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-table
- :key="tableKey"
- v-loading="listLoadingMaintenanceContent"
- element-loading-text="给我一点时间"
- :data="listMaintenanceContent"
- border
- fit
- highlight-current-row
- style="width: 90%;margin:0 auto;"
- :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="部位" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.positionName }}</span>
- </template>
- </el-table-column>
- <el-table-column label="项目" min-width="140px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.program }}</span>
- </template>
- </el-table-column>
- <el-table-column label="标准" min-width="80px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.standard }}</span>
- </template>
- </el-table-column>
- <el-table-column label="执行动作" min-width="80px" align="center">
- <template slot-scope="scope">
- <el-select v-model="scope.row.active" class="filter-item" style="width: 80%;">
- <el-option v-for="item in getDictByName" :key="item.id" :label="item. label" :value="item.value" />
- </el-select>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="备件领用" name="second">
- <div class="app-receivingSpareParts">
- <el-form
- ref="receivingTemp"
- :rules="rules"
- :model="receivingTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="领用单号:" prop="applyCode">
- <span>{{ receivingTemp.applyCode }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="领用部门:" prop="departmentName">
- <span>{{ receivingTemp.departmentName }}</span>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="领用日期:" prop="createDate">
- <span>{{ receivingTemp.createDate }}</span>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-form-item label="所需备件:" prop="partCode">
- <el-autocomplete
- v-model="receivingTemp.partCode"
- value-key="name"
- class="inline-input"
- :fetch-suggestions="sparePartSearch"
- placeholder="请输入备件编号或备件名称或备件规格"
- style="width:100%"
- @select="handleSelectSparePart"
- >
- <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-row>
- </el-form>
- <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"
- >
- <!-- 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.partCode }}</span>
- </template>
- </el-table-column>
- <el-table-column label="备件名称" min-width="110px" 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="库存数" min-width="110px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.reportery }}</span>
- </template>
- </el-table-column>
- <el-table-column label="领用数量" min-width="110px" align="center">
- <template slot-scope="scope">
- <el-form :model="scope.row">
- <el-form-item prop="amount">
- <el-input ref="amount" v-model="scope.row.amount" 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="sparePartsDelete(row)">删除</a>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-tab-pane>
- </el-tabs>
- <div slot="footer" class="dialog-footer" style="bottom: 5px">
- <el-button v-if="activeName2=='first'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData1()">确认</el-button>
- <el-button v-if="activeName2=='second'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData2()">确认</el-button>
- <el-button @click="dialogFormVisible_ReceivingSpareParts = false;">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 完成保养 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_maintainComplete" :close-on-click-modal="false" width="50%">
- <div class="maintainComplete">
- <el-form ref="maintainCompleteTemp" :rules="rules" :model="maintainCompleteTemp" 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="maintainCompleteTemp.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="maintainCompleteTemp.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"
- >
- <!-- 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="60px" align="center">
- <template slot-scope="scope">
- <span>{{ scope.row.partName }}</span><br>
- </template>
- </el-table-column>
- <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
- <template slot-scope="scope">
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
- <template slot-scope="scope">
- <el-form :model="scope.row" :rules="rules">
- <el-form-item prop="acturalAmount">
- <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column label="用途" prop="note" align="center" min-width="60">
- <template slot-scope="scope">
- <el-form :model="scope.row">
- <el-form-item prop="note">
- <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
- <template slot-scope="{row}">
- <a class="del" @click="partDelete(row)">删除</a>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintainComplete'?createMaintainCompleteData():createMaintainCompleteData()">确认</el-button>
- <el-button @click="dialogFormVisible_maintainComplete = false;">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 保养审核 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_examine" :close-on-click-modal="false" width="30%">
- <div class="app-examine">
- <h3 style="width: 100%;margin:0 auto;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:88%;margin:0 auto;">
- <el-col :span="20">
- <el-form-item>
- <el-radio-group v-model="examineTemp.isStatue" @change="changeIsStatue">
- <el-radio :label="3">通过</el-radio>
- <el-radio :label="4">不通过</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col v-if="isStatueReason" :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.isStatue == 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 v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
- <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
- <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
- <el-button @click="dialogFormVisible_examine = false;">关闭</el-button>
- </div>
- </el-dialog>
- <!-- 视频 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_video" :close-on-click-modal="false" width="60%">
- <div class="app-video">
- <el-form ref="videoTemp" :rules="rules" :model="videoTemp" label-position="right" style="width: 80%;min-height:150px;margin:0 auto;">
- <el-row>
- <el-col :span="24">
- <el-form-item label="" prop="scores">
- <video :src="videoTemp.videoPath" controls="controls" style="width:90%;height:450px;margin:0 auto;" />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- // 引入
- import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
- // import { mapGetters } from 'vuex'
- import waves from '@/directive/waves' // waves directive
- import { parseTime, sortChange } from '@/utils/index.js'
- // eslint-disable-next-line no-unused-vars
- import Pagination from '@/components/Pagination' // secondary package based on el-pagination
- import Cookies from 'js-cookie'
- import { MessageBox } from 'element-ui'
- export default {
- name: 'Maintain',
- components: { Pagination },
- directives: { waves },
- data() {
- return {
- myHeight:document.documentElement.clientHeight - 85- 250,
- active: 0,
- activeList: [],
- rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
- cellStyle: { padding: 0 + 'px' },
- isokDisable: false,
- rules: {
- employeeId: [{ required: true, message: '必填', trigger: 'blur' }]
- },
- 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: 'getDictByName', offset: 0, pagecount: 0, params: ['保养模板执行动作'] }
- ],
- getDepartParam: {
- name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
- },
- statues: [{ id: '0', name: '已逾期' }, { id: '1', name: '保养中' }, { id: '2', name: '保养完成' }],
- SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
- empdeptList: [],
- getDictByName: [],
- radio2: '全部',
- textMap: {
- see: '查看详情',
- receivingSpareParts: '保养及领用',
- maintainComplete: '完成保养',
- examine: '保养审核',
- examine2: '保养审核2',
- examine3: '保养审核3',
- video: '视频'
- },
- dialogStatus: '',
- radioAll: '全部',
- getdataListParm: {
- name: 'getBigupkeepList',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {
- inputDatetime: '',
- upkeepCode: '',
- eqName: '',
- eqCode: '',
- departmentId: '',
- statue: '',
- pastureName: Cookies.get('pasturename'),
- loginId: Cookies.get('employeid'),
- menu: 'Maintain',
- SHStatue: '',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid')
- }
- },
- total: 0,
- tableKey: 0,
- listLoading: false,
- list: [],
- // 查看
- dialogFormVisible_See: false,
- seeTemp: {},
- statue1: false,
- statue2: false,
- activeName: 'first',
- listLoadingMaintenanceContent: false,
- listMaintenanceContent: [],
- getMaintenanceContentParm: {
- name: 'getUpkeepTemplateListbyeqV2',
- returntype: 'Map',
- parammaps: {}
- },
- Reason: false,
- // 查看-领用记录
- getCollarUseParm: {
- name: 'getPartsapplybyMt',
- returntype: 'Map',
- parammaps: {}
- },
- collarUseTemp: {},
- // 查看-领用记录table
- getCollarUseListParm: {
- name: 'getpartapplyListBybig',
- returntype: 'Map',
- parammaps: {}
- },
- listLoadingCollarUse: false,
- listCollarUse: [],
- // 查看-旧品录入记录table
- getOldProductsParm: {
- name: 'getMaintainRefuse',
- returntype: 'Map',
- parammaps: {}
- },
- listLoadingOldProducts: false,
- listOldProducts: [],
- // 保养及领用
- dialogFormVisible_ReceivingSpareParts: false,
- activeName2: 'first',
- maintainTemp: {},
- receivingTemp: {},
- getEmpdeptParm: {
- name: 'getEmpdept',
- returntype: 'Map',
- parammaps: {
- deptId: ''
- }
- },
- getAutoCreatCodeParm: {
- name: 'autoCreatCode',
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid'),
- codeType: 'LY'
- }
- },
- requestSparePart: {
- name: 'getPartsListLY',
- page: 1,
- offset: 1,
- pagecount: 20,
- returntype: 'Map',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- }
- },
- postDataPramas: {},
- // 完成保养
- dialogFormVisible_maintainComplete: false,
- maintainCompleteTemp: {},
- requestOldProducts: {
- name: 'getAllPartsListWB',
- page: 1,
- offset: 1,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- },
- No2: false,
- listAdd: [],
- // 保养审核
- dialogFormVisible_examine: false,
- requestParam: {},
- examineTemp: {
- isStatue: 3
- },
- isStatueReason: false,
- // 权限按钮
- isSee: [],
- isLingYong: [],
- isComplete: [],
- isCharge: [],
- isLeaderCharge: [],
- isDepartmentCharge: [],
- buttons: [],
- pending: {
- total: 0,
- getdataListParm: {
- name: 'getBigupkeepWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
- parammaps: {}
- }
- },
- dialogFormVisible_video: false,
- videoTemp: {},
- requestParam2: {}
- }
- },
- // computed: {
- // ...mapGetters([
- // 'sidebar',
- // 'avatar',
- // 'employeid',
- // 'pastureid'
- // ])
- // },
- computed: {
- space() {
- const { isSimple, $parent: { space }} = this
- return isSimple ? '' : space
- },
- style: function() {
- const style = {}
- const parent = this.$parent
- const len = parent.steps.length
- const space =
- typeof this.space === 'number'
- ? this.space + 'px'
- : this.space
- ? this.space
- : 100 / (len - (this.isCenter ? 0 : 1)) + '%'
- style.flexBasis = space
- if (this.isVertical) return style
- if (this.isLast) {
- style.maxWidth = 100 / this.stepsCount + '%'
- } else {
- style.marginRight = -this.$parent.stepOffset + 'px'
- }
- return style
- }
- },
- created() {
- const that = this
- GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
- that.buttons = response.data.list
- that.get_auto_buttons()
- })
- if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'MaintenancePlan') {
- this.getdataListParm.parammaps.eqCode = this.$route.query.eqCode
- this.getdataListParm.parammaps.inputDatetime = [this.$route.query.time, this.$route.query.time]
- this.getdataListParm.parammaps.startTime = this.$route.query.time
- this.getdataListParm.parammaps.stopTime = this.$route.query.time
- }
- this.get_select_list()
- this.get_table_data()
- this.getPendingList()
- },
- methods: {
- // handleCheck(row) {
- // this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
- // this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
- // },
- tableSort(column) {
- if (this.activeName == 'second') {
- sortChange(column, this.listCollarUse)
- } else if (this.activeName == 'third') {
- sortChange(column, this.listOldProducts)
- }
- },
- get_auto_buttons() {
- // 查看
- const See = 'maintenance:maintain:see'
- const isSee = checkButtons(JSON.parse(sessionStorage.buttons), See)
- this.isSee = isSee
- // 保养及领用
- const LingYong = 'maintenance:maintain:lingyong'
- const isLingYong = checkButtons(JSON.parse(sessionStorage.buttons), LingYong)
- this.isLingYong = isLingYong
- // 完成保养
- const Complete = 'maintenance:maintain:complete'
- const isComplete = checkButtons(JSON.parse(sessionStorage.buttons), Complete)
- this.isComplete = isComplete
- // 使用人保养审核
- const Charge = 'maintenance:maintain:charge'
- const isCharge = checkButtons(JSON.parse(sessionStorage.buttons), Charge)
- this.isCharge = isCharge
- // 主管审核
- const LeaderCharge = 'maintenance:maintain:leaderCharge'
- const isLeaderCharge = checkButtons(JSON.parse(sessionStorage.buttons), LeaderCharge)
- this.isLeaderCharge = isLeaderCharge
- // 部门审核
- const DeptCharge = 'maintenance:maintain:deptcharge'
- const isDepartmentCharge = checkButtons(JSON.parse(sessionStorage.buttons), DeptCharge)
- this.isDepartmentCharge = isDepartmentCharge
- },
- // next() {
- // if (this.active++ > 2) this.active = 0
- // this.finishStatus = 'error'
- // },
- get_select_list() {
- GetDataByNames(this.requestParams).then(response => {
- this.findAllPasture = response.data.findAllPasture.list
- this.findAllEmploye = response.data.findAllEmploye.list
- this.getDictByName = response.data.getDictByName.list
- this.getDepartDownList()
- })
- },
- getDepartDownList() {
- GetDataByName(this.getDepartParam).then(response => {
- this.findAllDepart = response.data.list
- })
- },
- changePastureName(item) {
- this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
- this.getdataListParm.parammaps.departmentId = ''
- this.getDepartDownList()
- },
- close_diago(){
- console.log(11111111111111)
- this.dialogFormVisible_See = false
- },
- getPendingList() {
- this.pending.getdataListParm.parammaps = {
- inputDatetime: this.getdataListParm.parammaps.inputDatetime,
- pastureName: this.getdataListParm.parammaps.pastureName,
- SHStatue: this.getdataListParm.parammaps.SHStatue,
- upkeepCode: this.getdataListParm.parammaps.upkeepCode,
- eqName: this.getdataListParm.parammaps.eqName,
- eqCode: this.getdataListParm.parammaps.eqCode,
- departmentId: this.getdataListParm.parammaps.departmentId,
- statue: this.getdataListParm.parammaps.statue,
- loginId: Cookies.get('employeid'),
- menu: 'Maintain',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid'),
- empId: Cookies.get('employeid'),
- pastureId: Cookies.get('pastureid'),
- deptId: Cookies.get('departmentid')
- }
- GetDataByName(this.pending.getdataListParm).then(response => {
- this.pending.total = response.data.total3
- })
- },
- get_table_data() {
- if (this.getdataListParm.parammaps.inputDatetime !== undefined && this.getdataListParm.parammaps.inputDatetime !== '') {
- this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
- this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[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)
- for (let i = 0; i < response.data.list.length; i++) {
- this.$set(response.data.list[i], 'img', '视频')
- }
- this.list = response.data.list
- this.pageNum = response.data.pageNum
- this.pageSize = response.data.pageSize
- } else {
- this.list = []
- }
- this.total = response.data.total
- // Just to simulate the time of the request
- setTimeout(() => {
- this.listLoading = false
- }, 100)
- })
- },
- tableCellStyle({ row, column, rowIndex, columnIndex }) {
- if (row.statue == 0 && columnIndex === 10) {
- return {
- background: 'red',
- color: '#fff'
- }
- }
- return {
- background: ''
- }
- },
- changeAll() {
- console.log(this.radioAll)
- if (this.radioAll === '全部') {
- this.getdataListParm.name = 'getBigupkeepList'
- this.getdataListParm.offset = 1
- this.getdataListParm.parammaps = {
- inputDatetime: '',
- upkeepCode: '',
- eqName: '',
- eqCode: '',
- departmentId: '',
- statue: '',
- pastureName: Cookies.get('pasturename'),
- loginId: Cookies.get('employeid'),
- menu: 'Maintain',
- SHStatue: '',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid')
- }
- this.get_table_data()
- } else if (this.radioAll === '待处理') {
- this.getdataListParm.name = 'getBigupkeepWebListNO'
- this.getdataListParm.offset = 1
- this.getdataListParm.parammaps = {
- inputDatetime: this.getdataListParm.parammaps.inputDatetime,
- pastureName: this.getdataListParm.parammaps.pastureName,
- SHStatue: this.getdataListParm.parammaps.SHStatue,
- upkeepCode: this.getdataListParm.parammaps.upkeepCode,
- eqName: this.getdataListParm.parammaps.eqName,
- eqCode: this.getdataListParm.parammaps.eqCode,
- departmentId: this.getdataListParm.parammaps.departmentId,
- statue: this.getdataListParm.parammaps.statue,
- loginId: Cookies.get('employeid'),
- menu: 'Maintain',
- 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 = 'getBigupkeepWebList'
- this.getdataListParm.offset = 1
- this.getdataListParm.parammaps = {
- inputDatetime: this.getdataListParm.parammaps.inputDatetime,
- pastureName: this.getdataListParm.parammaps.pastureName,
- SHStatue: this.getdataListParm.parammaps.SHStatue,
- upkeepCode: this.getdataListParm.parammaps.upkeepCode,
- eqName: this.getdataListParm.parammaps.eqName,
- eqCode: this.getdataListParm.parammaps.eqCode,
- departmentId: this.getdataListParm.parammaps.departmentId,
- statue: this.getdataListParm.parammaps.statue,
- loginId: Cookies.get('employeid'),
- menu: 'Maintain',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid'),
- empId: Cookies.get('employeid'),
- pastureId: Cookies.get('pastureid'),
- deptId: Cookies.get('departmentid')
- }
- this.get_table_data()
- }
- },
- statue: function(cellValue) {
- // console.log(cellValue.isZeroStock)
- if (cellValue.statue == 0) {
- return '已逾期'
- } else if (cellValue.statue == 1) {
- return '保养中'
- } else if (cellValue.statue == 2) {
- 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 == 8) {
- return '未通过'
- } else if (cellValue.SHStatue == 7) {
- 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()
- },
- form_see(row) {
- this.seeTemp = Object.assign({}, row)
- console.log('查看', this.seeTemp)
- // 流程图
- var reason = '未通过原因:' + this.seeTemp.workflowNote
- var scores = '评分:' + this.seeTemp.scores + '分'
- if (this.seeTemp.SHStatue === 1) {
- this.activeList = [{ title: '保养人审核' }, { title: '机修审核' }, { title: '设备主管审核' }]
- this.active = 0
- } else if (this.seeTemp.SHStatue === 2) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核' }, { title: '设备主管审核' }]
- this.active = 1
- } else if (this.seeTemp.SHStatue === 3) {
- this.active = 2
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 4) {
- this.active = 2
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 7) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
- this.active = 3
- } else if (this.seeTemp.SHStatue === 8) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
- this.active = 3
- }
- this.dialogStatus = 'see'
- this.dialogFormVisible_See = true
- if (this.seeTemp.SHStatue !== 1) {
- // 查看显示类型2
- this.statue1 = false
- this.statue2 = true
- this.getMaintenanceContentList()
- } else {
- if (this.seeTemp.SHStatue == 1 && this.seeTemp.LYStatue == '未领用' && this.seeTemp.LRStatue == '未录入') {
- // 查看显示类型1
- this.statue1 = true
- this.statue2 = false
- this.getMaintenanceContentList()
- } else {
- // 查看显示类型2
- this.statue1 = false
- this.statue2 = true
- this.getMaintenanceContentList()
- }
- }
- this.collarUseTemp = {}
- this.listCollarUse = []
- this.getCollarUse()
- this.getOldProductsList()
- },
- getMaintenanceContentList() {
- this.getMaintenanceContentParm.parammaps.id = this.seeTemp.id
- this.listLoadingMaintenanceContent = false
- GetDataByName(this.getMaintenanceContentParm).then(response => {
- console.log('保养内容table数据', response.data.list)
- this.listMaintenanceContent = response.data.list
- this.$forceUpdate()
- setTimeout(() => {
- this.listLoadingMaintenanceContent = false
- }, 100)
- })
- },
- openDetails(row, column, cell, event) {
- if (column.label !== '操作') {
- this.$router.push({ path: '/customs/Receive', query: { applyCode: this.collarUseTemp.applyCode }})
- }
- },
- getCollarUse() {
- this.getCollarUseParm.parammaps.RUCode = this.seeTemp.upkeepCode
- GetDataByName(this.getCollarUseParm).then(response => {
- this.collarUseTemp = response.data.list[0]
- if (response.data.list.length > 0) {
- console.log('领用记录数据', response.data.list[0])
- if (response.data.list[0].statue == 0) {
- this.$set(this.collarUseTemp, 'statueName', '未领用')
- } else {
- this.$set(this.collarUseTemp, 'statueName', '已领用')
- }
- }
- this.getCollarUseList()
- })
- },
- getCollarUseList() {
- this.getCollarUseListParm.parammaps.id = this.collarUseTemp.id
- this.listLoadingCollarUse = true
- GetDataByName(this.getCollarUseListParm).then(response => {
- console.log('领用table数据', response.data.list)
- this.listCollarUse = response.data.list
- setTimeout(() => {
- this.listLoadingCollarUse = false
- }, 100)
- })
- },
- getOldProductsList() {
- this.getOldProductsParm.parammaps.repairCode = this.seeTemp.upkeepCode
- this.listLoadingOldProducts = true
- GetDataByName(this.getOldProductsParm).then(response => {
- console.log('旧品录入记录table数据', response.data.list)
- this.listOldProducts = response.data.list
- setTimeout(() => {
- this.listLoadingOldProducts = false
- }, 100)
- })
- },
- // 保养及领用
- handleReceivingSpareParts(row) {
- console.log('点击了保养及领用')
- if (row == undefined) {
- this.receivingTemp = this.seeTemp
- } else {
- this.receivingTemp = Object.assign({}, row)
- }
- this.maintainTemp = this.receivingTemp
- this.maintainTemp.employeeId = String(this.maintainTemp.useEmpId)
- this.seeTemp = this.maintainTemp
- this.listCollarUse = []
- this.getAutoCreatCode()
- this.receivingTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.getEmpdeptList()
- this.getCollarUse()
- this.getMaintenanceContentList()
- this.dialogStatus = 'receivingSpareParts'
- this.dialogFormVisible_ReceivingSpareParts = true
- },
- getEmpdeptList() {
- this.getEmpdeptParm.parammaps.deptId = this.maintainTemp.departmentId
- GetDataByName(this.getEmpdeptParm).then(response => {
- console.log('保养使用人', response.data.list)
- if (response.data.list !== null) {
- this.empdeptList = response.data.list
- } else {
- this.empdeptList = []
- }
- })
- },
- getAutoCreatCode() {
- GetDataByName(this.getAutoCreatCodeParm).then(response => {
- console.log('领用领用单号', response.data.list[0])
- this.receivingTemp.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.listCollarUse.length > 0) {
- // eslint-disable-next-line no-redeclare
- if (this.listCollarUse.find(obj => obj.id === item.id)) {
- this.$message({
- type: 'warning',
- message: '此备件已存在,请重新选择备件'
- })
- } else {
- this.listCollarUse.unshift(item)
- }
- } else {
- this.listCollarUse = []
- this.listCollarUse.unshift(item)
- }
- },
- createReceivingSparePartseData1() {
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['maintainTemp'].validate(valid => {
- if (valid) {
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'updateEquseEmpId', 'type': 'e', 'parammaps': {
- employeeId: this.maintainTemp.employeeId,
- id: this.maintainTemp.id
- }}
- this.postDataPramas.data[1] = { 'name': 'deleteutupbyBigid', 'type': 'e', 'parammaps': {
- id: this.maintainTemp.id
- }}
- this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listMaintenanceContent }}
- this.postDataPramas.data[2].children = []
- this.postDataPramas.data[2].children[0] = { 'name': 'insertutup', 'type': 'e', 'parammaps': {
- id: this.maintainTemp.id,
- positionName: '@insertSpotList.positionName',
- program: '@insertSpotList.program',
- standard: '@insertSpotList.standard',
- active: '@insertSpotList.active'
- }}
- 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_ReceivingSpareParts = false
- this.dialogFormVisible_See = false
- this.get_table_data()
- this.getPendingList()
- this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
- }
- })
- }
- })
- },
- createReceivingSparePartseData2() {
- console.log('点击了保养及领用保存')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['receivingTemp'].validate(valid => {
- if (valid) {
- if (this.listCollarUse.length !== 0) {
- for (var i = 0; i < this.listCollarUse.length; i++) {
- console.log(this.listCollarUse[i].amount)
- if (this.listCollarUse[i].amount !== undefined) {
- var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
- if (!rulesAmount.test(this.listCollarUse[i].amount)) {
- this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数', duration: 2000 })
- return false
- } else if (parseFloat(this.listCollarUse[i].amount) > parseFloat(this.listCollarUse[i].reportery)) {
- this.$message({ type: 'error', message: '领用数量不可大于库存数', duration: 2000 })
- return false
- }
- } else {
- this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
- return false
- }
- }
- let mySumPrice = 0
- for (let i = 0; i < this.listCollarUse.length; i++) {
- mySumPrice += parseFloat(this.listCollarUse[i].price) * parseFloat(this.listCollarUse[i].amount)
- }
- if (mySumPrice > 500) {
- this.receivingTemp.SHStatus = 2
- } else {
- this.receivingTemp.SHStatus = 9
- }
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
- pastureId: this.$store.state.user.pastureid,
- applyCode: this.receivingTemp.applyCode,
- applyType: 2,
- departmentId: this.receivingTemp.departmentId,
- empId: this.receivingTemp.upkeepPersonId,
- applyDate: this.receivingTemp.createDate,
- RUCode: this.receivingTemp.upkeepCode,
- SHStatus: this.receivingTemp.SHStatus
- }}
- this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listCollarUse }}
- this.postDataPramas.data[1].children = []
- this.postDataPramas.data[1].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.receivingTemp.eqName,
- eqCode: this.receivingTemp.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_ReceivingSpareParts = 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
- }
- }
- })
- },
- // 完成保养
- handleCompleteMaintenance(row) {
- console.log('点击了完成保养', row)
- if (row == undefined) {
- this.$set(this.seeTemp, 'isOldProducts', 0)
- this.maintainCompleteTemp = this.seeTemp
- } else {
- this.maintainCompleteTemp = Object.assign({}, row)
- this.$set(this.maintainCompleteTemp, 'isOldProducts', 0)
- }
- this.dialogStatus = 'maintainComplete'
- this.No2 = false
- this.dialogFormVisible_maintainComplete = true
- this.listAdd = []
- },
- changeIsOldProducts(val) {
- console.log(val)
- if (val == 1) {
- this.No2 = true
- } else {
- this.No2 = false
- }
- },
- oldProductsSearch(queryString, cb) {
- console.log('旧品录入模糊查询输入值', queryString)
- this.requestOldProducts.parammaps.partCode = queryString
- this.requestOldProducts.parammaps.RUCode = this.maintainCompleteTemp.upkeepCode
- GetDataByName(this.requestOldProducts).then(response => {
- console.log('旧品录入模糊查询搜索data', response.data.list)
- cb(response.data.list)
- })
- },
- handleSelectOldProducts(item) {
- this.maintainCompleteTemp.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)
- }
- },
- sparePartsDelete(row) {
- MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // console.log(this.list2)
- for (var i = 0; i < this.listCollarUse.length; i++) {
- console.log(this.listCollarUse[i])
- if (this.listCollarUse[i].id === row.id) {
- var listCollarUseIndex = this.listCollarUse.indexOf(this.listCollarUse[i])
- }
- if (listCollarUseIndex > -1) {
- this.listCollarUse.splice(listCollarUseIndex, 1)
- return
- }
- }
- })
- },
- 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
- }
- }
- })
- },
- // 完成保养-保存
- createMaintainCompleteData() {
- console.log('点击了完成保养确认', this.maintainCompleteTemp)
- console.log('点击了完成保养确认', this.maintainCompleteTemp.laidcou)
- if (this.maintainCompleteTemp.laidcou == 0) {
- if (this.maintainCompleteTemp.isOldProducts == 0) {
- console.log('否')
- this.requestParam.name = 'completeUpkeep'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.maintainCompleteTemp.id
- PostDataByName(this.requestParam).then((response) => {
- if (response.msg !== 'fail') {
- //如果有设备记录仪的权限
- if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
- // 临时注释
- if (this.maintainCompleteTemp.videoTxt == '已录制') {
- this.requestParam2.name = 'upkeepChargDone'
- this.requestParam2.parammaps = {}
- this.requestParam2.parammaps.id = this.maintainCompleteTemp.id
- this.requestParam2.parammaps.statue = 7
- this.requestParam2.parammaps.orderStatue = 2
- this.requestParam2.parammaps.empId = Cookies.get('employeid')
- PostDataByName(this.requestParam2).then(response => {
- if (response.msg !== 'fail') {
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.get_table_data()
- this.dialogFormVisible_maintainComplete = false
- this.dialogFormVisible_See = false
- this.getPendingList()
- this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- // 临时注释
- }else{
- //正常流程。没有记录仪权限
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- this.getdataListParm.parammaps.inputDatetime = ''
- }
- this.dialogFormVisible_maintainComplete = false
- this.dialogFormVisible_See = false
- this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
- this.get_table_data()
- this.getPendingList()
- }
- } else {
- failproccess(response, this.$notify)
- }
- })
- } else {
- console.log('是')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['maintainCompleteTemp'].validate(valid => {
- if (valid) {
- if (this.listAdd.length !== 0) {
- for (var i = 0; i < this.listAdd.length; i++) {
- if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
- this.$message({
- type: 'warning',
- message: '请录入数量是否未填写',
- duration: 2000
- })
- return false
- } else {
- var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
- if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
- this.$message({
- type: 'error',
- message: '录入数量请输入正数,最多保留两位小数点',
- duration: 2000
- })
- return false
- }
- }
- }
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
- this.postDataPramas.data[0].children = []
- this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
- pastureId: Cookies.get('pastureid'),
- deptId: this.maintainCompleteTemp.departmentId,
- partCode: '@insertSpotList.partCode',
- partName: '@insertSpotList.partName',
- partId: '@insertSpotList.id',
- specification: '@insertSpotList.specification',
- unit: '@insertSpotList.unit',
- acturalAmount: '@insertSpotList.acturalAmount',
- eqId: this.maintainCompleteTemp.eqId,
- eqCode: this.maintainCompleteTemp.eqCode,
- eqName: this.maintainCompleteTemp.eqName,
- repairCode: this.maintainCompleteTemp.upkeepCode,
- listType: 1
- }}
- this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
- id: this.maintainCompleteTemp.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.dialogFormVisible_maintainComplete = 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 })
- }
- },
- // 保养审核
- handleExamine(row) {
- console.log('点击了保养审核')
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'isStatue', 3)
- this.$set(this.seeTemp, 'workflowNote', '')
- this.$set(this.examineTemp, 'scores', '')
- } else {
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'isStatue', 3)
- this.$set(this.examineTemp, 'workflowNote', '')
- this.$set(this.examineTemp, 'scores', '')
- }
- this.dialogStatus = 'examine'
- this.dialogFormVisible_examine = true
- },
- changeIsStatue(val) {
- console.log(val)
- if (val == 4) {
- this.isStatueReason = true
- } else {
- this.isStatueReason = false
- }
- },
- // 保养审核1
- createExamineData() {
- console.log('点击了保养审核确认')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'upkeepCharge'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = this.examineTemp.isStatue
- 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.dialogFormVisible_examine = false
- this.dialogFormVisible_See = false
- this.isStatueReason = false
- this.getPendingList()
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- },
- // 保养审核2
- handleExamine2(row) {
- console.log('点击了保养审核------', row)
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'isStatue', 3)
- this.$set(this.seeTemp, 'workflowNote', '')
- } else {
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'isStatue', 3)
- this.$set(this.examineTemp, 'workflowNote', '')
- }
- this.dialogStatus = 'examine2'
- this.dialogFormVisible_examine = true
- },
- // 保养审核2-保存
- createExamineData2() {
- if (this.examineTemp.isStatue == 3) {
- console.log('点击了保养审核2确认-通过')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'upkeepChargDone'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = 7
- 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.dialogFormVisible_examine = false
- this.dialogFormVisible_See = false
- this.isStatueReason = false
- this.getPendingList()
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- } else {
- console.log('点击了保养审核2确认-不通过')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'upkeepCharge1'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = 8
- 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.dialogFormVisible_examine = false
- this.dialogFormVisible_See = false
- this.isStatueReason = false
- this.getPendingList()
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- }
- },
- // 保养审核2
- handleExamine3(row) {
- console.log('点击了保养审核------', row)
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'isStatue', 3)
- this.$set(this.seeTemp, 'workflowNote', '')
- } else {
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'isStatue', 3)
- this.$set(this.examineTemp, 'workflowNote', '')
- }
- this.dialogStatus = 'examine3'
- this.dialogFormVisible_examine = true
- },
- // 保养审核3-保存
- createExamineData3() {
- if (this.examineTemp.isStatue == 3) {
- console.log('点击了保养审核3确认-通过')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'upkeepCharge3'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps.id = this.examineTemp.id
- this.requestParam.parammaps.statue = 5
- 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.dialogFormVisible_examine = false
- this.dialogFormVisible_See = false
- this.isStatueReason = false
- this.getPendingList()
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- } else {
- console.log('点击了保养审核3确认-不通过')
- this.isokDisable = true
- setTimeout(() => {
- this.isokDisable = false
- }, 1000)
- this.$refs['examineTemp'].validate(valid => {
- if (valid) {
- this.requestParam.name = 'upkeepCharge3'
- 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_examine = false
- this.dialogFormVisible_See = false
- this.isStatueReason = false
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- } else {
- failproccess(response, this.$notify)
- }
- })
- }
- })
- }
- },
- preview(row) {
- console.log(row, '=====666')
- this.dialogStatus = 'video'
- this.dialogFormVisible_video = true
- // row.videoPath = 'https://sys.mcs8.net:7706' + row.videoPath
- this.videoTemp = Object.assign({}, row)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- /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>
|