index.vue 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
  5. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
  6. </el-select>
  7. <el-input v-model="getdataListParm.parammaps.upkeepCode" placeholder="保养单号" clearable style="width: 180px;" class="filter-item" />
  8. <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 180px;" class="filter-item" />
  9. <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 180px;" class="filter-item" />
  10. <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
  11. <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
  12. </el-select>
  13. <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
  14. <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
  15. </el-select>
  16. <el-select v-model="getdataListParm.parammaps.SHStatue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
  17. <el-option v-for="item in SHStatues" :key="item.id" :label="item.name" :value="item.id" />
  18. </el-select>
  19. <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="结束日期" />
  20. <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
  21. <div>
  22. <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
  23. <el-radio-button label="全部" />
  24. <el-badge :value="pending.total" class="item">
  25. <el-radio-button label="待处理" />
  26. </el-badge>
  27. <el-radio-button label="已处理" />
  28. </el-radio-group>
  29. </div>
  30. </div>
  31. <el-table
  32. :key="tableKey"
  33. v-loading="listLoading"
  34. element-loading-text="给我一点时间"
  35. :data="list"
  36. border
  37. fit
  38. highlight-current-row
  39. style="width: 100%;"
  40. :row-style="rowStyle"
  41. :cell-style="tableCellStyle"
  42. class="elTable table-fixed"
  43. >
  44. <el-table-column label="序号" align="center" type="index" width="50px">
  45. <template slot-scope="scope">
  46. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="保养单号" min-width="140px" align="center">
  50. <template slot-scope="scope">
  51. <span>{{ scope.row.upkeepCode }}</span>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="牧场" min-width="140px" align="center">
  55. <template slot-scope="scope">
  56. <span>{{ scope.row.pastureName }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="设备内部编号" min-width="80px" align="center">
  60. <template slot-scope="scope">
  61. <span>{{ scope.row.eqCode }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="设备名称" min-width="100px" align="center">
  65. <template slot-scope="scope">
  66. <span>{{ scope.row.eqName }}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="规格型号" min-width="80px" align="center">
  70. <template slot-scope="scope">
  71. <span>{{ scope.row.specification }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="部门" min-width="80px" align="center">
  75. <template slot-scope="scope">
  76. <span>{{ scope.row.departmentName }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="责任人" min-width="100px" align="center">
  80. <template slot-scope="scope">
  81. <span>{{ scope.row.employeName }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="保养人" min-width="100px" align="center">
  85. <template slot-scope="scope">
  86. <span>{{ scope.row.upkeepPerson }}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
  90. <el-table-column label="处理状态" min-width="100px" align="center" :formatter="statue" />
  91. <el-table-column label="领用单状态" min-width="80px" align="center">
  92. <template slot-scope="scope">
  93. <span>{{ scope.row.LYStatue }}</span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="旧品录入状态" min-width="110px" align="center">
  97. <template slot-scope="scope">
  98. <span>{{ scope.row.LRStatue }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="审核状态" min-width="80px" align="center" :formatter="SHStatue" />
  102. <el-table-column prop="img" label="保养过程" width="180" align="center">
  103. <template slot-scope="scope">
  104. <!-- <el-link @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }} </el-link> -->
  105. <a style="border-bottom: 1px solid #333;" @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }}</a>
  106. <el-link v-if="scope.row.videoTxt == '未录制'">未录制 </el-link>
  107. <el-link v-if="scope.row.videoTxt == '已录制未上传'">已录制未上传 </el-link>
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="操作" align="center" min-width="300" class-name="small-padding fixed-width" fixed="right">
  111. <template slot-scope="{row}">
  112. <el-button v-if="isSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
  113. <!-- 保养及领用-->
  114. <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>
  115. <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
  116. <!-- 完成保养 -->
  117. <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>
  118. <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
  119. <!-- 保养审核 -->
  120. <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>
  121. <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
  122. <!-- 保养审核3 -->
  123. <el-button v-if="(row.SHStatue == 5) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
  124. <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
  125. <!-- 保养审核2 -->
  126. <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>
  127. <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button>
  128. </template>
  129. </el-table-column>
  130. </el-table>
  131. <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="getList" />
  132. <!-- 查看 -->
  133. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" v-if ="dialogFormVisible_See" width="90%">
  134. <div class="app-see">
  135. <div v-if="statue1" class="see">
  136. <el-form
  137. ref="seeTemp"
  138. :rules="rules"
  139. :model="seeTemp"
  140. label-position="right"
  141. label-width="120px"
  142. style="width: 90%;margin:0 auto;"
  143. >
  144. <el-row>
  145. <el-col :span="8">
  146. <el-form-item label="保养单号:" prop="upkeepCode">
  147. <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="8">
  151. <el-form-item label="设备名称:" prop="eqName">
  152. <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="8">
  156. <el-form-item label="设备内部编号:" prop="eqCode">
  157. <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
  158. </el-form-item>
  159. </el-col>
  160. </el-row>
  161. <el-row>
  162. <el-col :span="8">
  163. <el-form-item label="牧场:" prop="pastureName">
  164. <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
  165. </el-form-item>
  166. </el-col>
  167. <el-col :span="8">
  168. <el-form-item label="部门:" prop="departmentName">
  169. <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
  170. </el-form-item>
  171. </el-col>
  172. <el-col :span="8">
  173. <el-form-item label="责任人:" prop="employeName">
  174. <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
  175. </el-form-item>
  176. </el-col>
  177. </el-row>
  178. <el-row>
  179. <el-col :span="8">
  180. <el-form-item label="保养人:" prop="upkeepPerson">
  181. <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
  182. </el-form-item>
  183. </el-col>
  184. <el-col :span="8">
  185. <el-form-item label="保养日期:" prop="plantime">
  186. <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="8">
  190. <el-form-item label="使用人:" prop="useEmpName">
  191. <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
  192. </el-form-item>
  193. </el-col>
  194. </el-row>
  195. <el-row>
  196. <el-col :span="12">
  197. <el-form-item label="保养内容:" prop="upNameLevel">
  198. <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
  199. </el-form-item>
  200. </el-col>
  201. </el-row>
  202. </el-form>
  203. <el-table
  204. :key="tableKey"
  205. v-loading="listLoadingMaintenanceContent"
  206. element-loading-text="给我一点时间"
  207. :data="listMaintenanceContent"
  208. border
  209. fit
  210. highlight-current-row
  211. style="width: 90%;margin:0 auto;"
  212. :row-style="rowStyle"
  213. :cell-style="cellStyle"
  214. class="elTable table-fixed"
  215. >
  216. <el-table-column label="序号" align="center" type="index" width="50px">
  217. <template slot-scope="scope">
  218. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  219. </template>
  220. </el-table-column>
  221. <el-table-column label="部位" min-width="140px" align="center">
  222. <template slot-scope="scope">
  223. <span>{{ scope.row.positionName }}</span>
  224. </template>
  225. </el-table-column>
  226. <el-table-column label="项目" min-width="140px" align="center">
  227. <template slot-scope="scope">
  228. <span>{{ scope.row.program }}</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column label="标准" min-width="80px" align="center">
  232. <template slot-scope="scope">
  233. <span>{{ scope.row.standard }}</span>
  234. </template>
  235. </el-table-column>
  236. <el-table-column label="执行动作" min-width="80px" align="center">
  237. <template slot-scope="scope">
  238. <span>{{ scope.row.active }}</span>
  239. </template>
  240. </el-table-column>
  241. </el-table>
  242. <el-form
  243. ref="seeTemp"
  244. :rules="rules"
  245. :model="seeTemp"
  246. label-position="right"
  247. label-width="120px"
  248. style="width: 90%;margin:0 auto;"
  249. >
  250. <el-row>
  251. <el-col>
  252. <el-form-item label="流程进度" />
  253. <el-steps :active="active" align-center finish-status="success">
  254. <el-step
  255. v-for="(item,index) in activeList"
  256. :key="index"
  257. :title="item.title"
  258. :status="item.status"
  259. >
  260. <template slot="description">
  261. <div class="step-row">
  262. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  263. <div>{{ item.reason }}</div>
  264. <div>{{ item.scores }}</div>
  265. </div>
  266. </template>
  267. </el-step>
  268. </el-steps>
  269. </el-col>
  270. </el-row>
  271. <el-row>
  272. <el-col>
  273. <el-form-item label="操作:">
  274. <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>
  275. <el-button v-else type="success" style="display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
  276. <!-- 完成保养 -->
  277. <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>
  278. <el-button v-else type="success" style="display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
  279. <!-- 保养审核 -->
  280. <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
  281. <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
  282. <!-- 保养审核3 -->
  283. <el-button v-if="(seeTemp.SHStatue == 5) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
  284. <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
  285. <!-- 保养审核2 -->
  286. <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>
  287. <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button>
  288. </el-form-item>
  289. </el-col>
  290. </el-row>
  291. </el-form>
  292. </div>
  293. <div v-if="statue2" class="see">
  294. <el-tabs v-model="activeName">
  295. <el-tab-pane label="保养信息" name="first">
  296. <el-form
  297. ref="seeTemp"
  298. :rules="rules"
  299. :model="seeTemp"
  300. label-position="right"
  301. label-width="120px"
  302. style="width: 90%;margin:0 auto;"
  303. >
  304. <el-row>
  305. <el-col :span="8">
  306. <el-form-item label="保养单号:" prop="upkeepCode">
  307. <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
  308. </el-form-item>
  309. </el-col>
  310. <el-col :span="8">
  311. <el-form-item label="设备名称:" prop="eqName">
  312. <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="8">
  316. <el-form-item label="设备内部编号:" prop="eqCode">
  317. <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
  318. </el-form-item>
  319. </el-col>
  320. </el-row>
  321. <el-row>
  322. <el-col :span="8">
  323. <el-form-item label="牧场:" prop="pastureName">
  324. <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
  325. </el-form-item>
  326. </el-col>
  327. <el-col :span="8">
  328. <el-form-item label="部门:" prop="departmentName">
  329. <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
  330. </el-form-item>
  331. </el-col>
  332. <el-col :span="8">
  333. <el-form-item label="责任人:" prop="employeName">
  334. <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
  335. </el-form-item>
  336. </el-col>
  337. </el-row>
  338. <el-row>
  339. <el-col :span="8">
  340. <el-form-item label="保养人:" prop="upkeepPerson">
  341. <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
  342. </el-form-item>
  343. </el-col>
  344. <el-col :span="8">
  345. <el-form-item label="保养日期:" prop="plantime">
  346. <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="8">
  350. <el-form-item label="使用人:" prop="useEmpName">
  351. <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
  352. </el-form-item>
  353. </el-col>
  354. </el-row>
  355. <el-row>
  356. <el-col :span="12">
  357. <el-form-item label="保养内容:" prop="upNameLevel">
  358. <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
  359. </el-form-item>
  360. </el-col>
  361. </el-row>
  362. </el-form>
  363. <el-table
  364. :key="tableKey"
  365. v-loading="listLoadingMaintenanceContent"
  366. element-loading-text="给我一点时间"
  367. :data="listMaintenanceContent"
  368. border
  369. fit
  370. highlight-current-row
  371. style="width: 90%;margin:0 auto;"
  372. :row-style="rowStyle"
  373. :cell-style="cellStyle"
  374. class="elTable table-fixed"
  375. >
  376. <el-table-column label="序号" align="center" type="index" width="50px">
  377. <template slot-scope="scope">
  378. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  379. </template>
  380. </el-table-column>
  381. <el-table-column label="部位" min-width="140px" align="center">
  382. <template slot-scope="scope">
  383. <span>{{ scope.row.positionName }}</span>
  384. </template>
  385. </el-table-column>
  386. <el-table-column label="项目" min-width="140px" align="center">
  387. <template slot-scope="scope">
  388. <span>{{ scope.row.program }}</span>
  389. </template>
  390. </el-table-column>
  391. <el-table-column label="标准" min-width="80px" align="center">
  392. <template slot-scope="scope">
  393. <span>{{ scope.row.standard }}</span>
  394. </template>
  395. </el-table-column>
  396. <el-table-column label="执行动作" min-width="80px" align="center">
  397. <template slot-scope="scope">
  398. <span>{{ scope.row.active }}</span>
  399. </template>
  400. </el-table-column>
  401. </el-table>
  402. <el-form
  403. ref="seeTemp"
  404. :rules="rules"
  405. :model="seeTemp"
  406. label-position="right"
  407. label-width="120px"
  408. style="width: 90%;margin:0 auto;"
  409. >
  410. <el-row>
  411. <el-col>
  412. <el-form-item label="流程进度" />
  413. <el-steps :active="active" align-center finish-status="success">
  414. <el-step
  415. v-for="(item,index) in activeList"
  416. :key="index"
  417. :title="item.title"
  418. :status="item.status"
  419. >
  420. <template slot="description">
  421. <div class="step-row">
  422. <div>{{ item.name }}&nbsp;&nbsp;{{ item.date }}</div>
  423. <div>{{ item.reason }}</div>
  424. <div>{{ item.scores }}</div>
  425. </div>
  426. </template>
  427. </el-step>
  428. </el-steps>
  429. </el-col>
  430. </el-row>
  431. <el-row>
  432. <el-col>
  433. <el-form-item label="操作:">
  434. <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>
  435. <el-button v-else type="success" style="width:70px;display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
  436. <!-- 完成保养 -->
  437. <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>
  438. <el-button v-else type="success" style="width:70px;display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
  439. <!-- 保养审核 -->
  440. <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
  441. <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
  442. <!-- 保养审核3 -->
  443. <el-button v-if="(seeTemp.SHStatue == 5) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
  444. <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
  445. <!-- 保养审核2 -->
  446. <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
  447. <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button>
  448. </el-form-item>
  449. </el-col>
  450. </el-row>
  451. </el-form>
  452. </el-tab-pane>
  453. <el-tab-pane label="领用记录" name="second">
  454. <el-form ref="collarUseTemp" :rules="rules" :model="collarUseTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
  455. <el-row>
  456. <el-col :span="6">
  457. <el-form-item label="领用单号:" prop="applyCode">
  458. <span>{{ collarUseTemp.applyCode }}</span>
  459. </el-form-item>
  460. </el-col>
  461. <el-col :span="6">
  462. <el-form-item label="领用部门:" prop="departmentName">
  463. <span>{{ collarUseTemp.departmentName }}</span>
  464. </el-form-item>
  465. </el-col>
  466. <el-col :span="6">
  467. <el-form-item label="领用日期:" prop="createDate">
  468. <span>{{ collarUseTemp.createDate }}</span>
  469. </el-form-item>
  470. </el-col>
  471. <el-col :span="6">
  472. <el-form-item label="领用状态:" prop="statueName">
  473. <span>{{ collarUseTemp.statueName }}</span>
  474. </el-form-item>
  475. </el-col>
  476. </el-row>
  477. </el-form>
  478. <el-table
  479. :key="tableKey"
  480. v-loading="listLoadingCollarUse"
  481. element-loading-text="给我一点时间"
  482. :data="listCollarUse"
  483. border
  484. fit
  485. highlight-current-row
  486. style="width: 100%;"
  487. :row-style="rowStyle"
  488. :cell-style="cellStyle"
  489. class="elTable"
  490. @cell-click="openDetails"
  491. @sort-change="tableSort"
  492. >
  493. <el-table-column label="序号" align="center" type="index" width="50px">
  494. <template slot-scope="scope">
  495. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  496. </template>
  497. </el-table-column>
  498. <el-table-column label="备件编号" min-width="110px" align="center">
  499. <template slot-scope="scope">
  500. <span>{{ scope.row.partCode }}</span>
  501. </template>
  502. </el-table-column>
  503. <el-table-column label="备件名称" min-width="110px" align="center">
  504. <template slot-scope="scope">
  505. <span>{{ scope.row.partName }}</span>
  506. </template>
  507. </el-table-column>
  508. <el-table-column label="备件规格" min-width="110px" align="center">
  509. <template slot-scope="scope">
  510. <span>{{ scope.row.specification }}</span>
  511. </template>
  512. </el-table-column>
  513. <el-table-column sortable prop="reportery" label="库存数" min-width="110px" align="center">
  514. <template slot-scope="scope">
  515. <span>{{ scope.row.reportery }}</span>
  516. </template>
  517. </el-table-column>
  518. <el-table-column sortable prop="amount" label="领用数量" min-width="110px" align="center">
  519. <template slot-scope="scope">
  520. <span>{{ scope.row.amount }}</span>
  521. </template>
  522. </el-table-column>
  523. <el-table-column label="用途" min-width="110px" align="center">
  524. <template slot-scope="scope">
  525. <span>{{ scope.row.note }}</span>
  526. </template>
  527. </el-table-column>
  528. </el-table>
  529. </el-tab-pane>
  530. <el-tab-pane label="旧品录入记录" name="third">
  531. <el-table
  532. :key="tableKey"
  533. v-loading="listLoadingOldProducts"
  534. element-loading-text="给我一点时间"
  535. :data="listOldProducts"
  536. border
  537. fit
  538. highlight-current-row
  539. style="width: 100%;"
  540. :row-style="rowStyle"
  541. :cell-style="cellStyle"
  542. class="elTable"
  543. @sort-change="tableSort"
  544. >
  545. <el-table-column label="序号" align="center" type="index" width="50px">
  546. <template slot-scope="scope">
  547. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  548. </template>
  549. </el-table-column>
  550. <el-table-column label="备件编号" min-width="110px" align="center">
  551. <template slot-scope="scope">
  552. <span>{{ scope.row.partCode }}</span>
  553. </template>
  554. </el-table-column>
  555. <el-table-column label="备件名称" prop="id" align="center">
  556. <template slot-scope="scope">
  557. <span>{{ scope.row.partName }}</span>
  558. </template>
  559. </el-table-column>
  560. <el-table-column label="备件规格" min-width="110px" align="center">
  561. <template slot-scope="scope">
  562. <span>{{ scope.row.specification }}</span>
  563. </template>
  564. </el-table-column>
  565. <el-table-column sortable prop="acturalAmount" label="录入数量" min-width="110px" align="center">
  566. <template slot-scope="scope">
  567. <span>{{ scope.row.acturalAmount }}</span>
  568. </template>
  569. </el-table-column>
  570. </el-table>
  571. </el-tab-pane>
  572. </el-tabs>
  573. </div>
  574. </div>
  575. <div slot="footer" class="dialog-footer" style="bottom:5px;">
  576. <el-button @click="close_diago()">关闭</el-button>
  577. </div>
  578. </el-dialog>
  579. <!-- 保养及领用 -->
  580. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ReceivingSpareParts" :close-on-click-modal="false" width="90%">
  581. <el-tabs v-model="activeName2">
  582. <el-tab-pane label="保养" name="first">
  583. <el-form
  584. ref="maintainTemp"
  585. :rules="rules"
  586. :model="maintainTemp"
  587. label-position="right"
  588. label-width="120px"
  589. style="width: 90%;margin:0 auto;"
  590. >
  591. <el-row>
  592. <el-col :span="8">
  593. <el-form-item label="使用人:" prop="employeeId">
  594. <el-select v-model="maintainTemp.employeeId" placeholder="使用人" class="filter-item" style="width: 120px;">
  595. <el-option v-for="item in empdeptList" :key="item.id" :label="item.empname" :value="item.id" />
  596. </el-select>
  597. </el-form-item>
  598. </el-col>
  599. </el-row>
  600. <el-row>
  601. <el-col :span="12">
  602. <el-form-item label="保养内容:" prop="upNameLevel">
  603. <el-input ref="upNameLevel" v-model="maintainTemp.upNameLevel" disabled />
  604. </el-form-item>
  605. </el-col>
  606. </el-row>
  607. </el-form>
  608. <el-table
  609. :key="tableKey"
  610. v-loading="listLoadingMaintenanceContent"
  611. element-loading-text="给我一点时间"
  612. :data="listMaintenanceContent"
  613. border
  614. fit
  615. highlight-current-row
  616. style="width: 90%;margin:0 auto;"
  617. :row-style="rowStyle"
  618. :cell-style="cellStyle"
  619. class="elTable table-fixed"
  620. >
  621. <el-table-column label="序号" align="center" type="index" width="50px">
  622. <template slot-scope="scope">
  623. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  624. </template>
  625. </el-table-column>
  626. <el-table-column label="部位" min-width="140px" align="center">
  627. <template slot-scope="scope">
  628. <span>{{ scope.row.positionName }}</span>
  629. </template>
  630. </el-table-column>
  631. <el-table-column label="项目" min-width="140px" align="center">
  632. <template slot-scope="scope">
  633. <span>{{ scope.row.program }}</span>
  634. </template>
  635. </el-table-column>
  636. <el-table-column label="标准" min-width="80px" align="center">
  637. <template slot-scope="scope">
  638. <span>{{ scope.row.standard }}</span>
  639. </template>
  640. </el-table-column>
  641. <el-table-column label="执行动作" min-width="80px" align="center">
  642. <template slot-scope="scope">
  643. <el-select v-model="scope.row.active" class="filter-item" style="width: 80%;">
  644. <el-option v-for="item in getDictByName" :key="item.id" :label="item. label" :value="item.value" />
  645. </el-select>
  646. </template>
  647. </el-table-column>
  648. </el-table>
  649. </el-tab-pane>
  650. <el-tab-pane label="备件领用" name="second">
  651. <div class="app-receivingSpareParts">
  652. <el-form
  653. ref="receivingTemp"
  654. :rules="rules"
  655. :model="receivingTemp"
  656. label-position="right"
  657. label-width="120px"
  658. style="width: 90%;margin:0 auto;"
  659. >
  660. <el-row>
  661. <el-col :span="8">
  662. <el-form-item label="领用单号:" prop="applyCode">
  663. <span>{{ receivingTemp.applyCode }}</span>
  664. </el-form-item>
  665. </el-col>
  666. <el-col :span="8">
  667. <el-form-item label="领用部门:" prop="departmentName">
  668. <span>{{ receivingTemp.departmentName }}</span>
  669. </el-form-item>
  670. </el-col>
  671. <el-col :span="8">
  672. <el-form-item label="领用日期:" prop="createDate">
  673. <span>{{ receivingTemp.createDate }}</span>
  674. </el-form-item>
  675. </el-col>
  676. </el-row>
  677. <el-row>
  678. <el-form-item label="所需备件:" prop="partCode">
  679. <el-autocomplete
  680. v-model="receivingTemp.partCode"
  681. value-key="name"
  682. class="inline-input"
  683. :fetch-suggestions="sparePartSearch"
  684. placeholder="请输入备件编号或备件名称或备件规格"
  685. style="width:100%"
  686. @select="handleSelectSparePart"
  687. >
  688. <template slot-scope="{ item }">
  689. <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
  690. |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
  691. |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
  692. </template>
  693. </el-autocomplete>
  694. </el-form-item>
  695. </el-row>
  696. </el-form>
  697. <el-table
  698. :key="tableKey"
  699. v-loading="listLoadingCollarUse"
  700. element-loading-text="给我一点时间"
  701. :data="listCollarUse"
  702. border
  703. fit
  704. highlight-current-row
  705. style="width: 100%;"
  706. :row-style="rowStyle"
  707. :cell-style="cellStyle"
  708. class="elTable"
  709. >
  710. <!-- table表格 -->
  711. <el-table-column label="序号" align="center" type="index" width="50px">
  712. <template slot-scope="scope">
  713. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  714. </template>
  715. </el-table-column>
  716. <el-table-column label="备件编号" min-width="110px" align="center">
  717. <template slot-scope="scope">
  718. <span>{{ scope.row.partCode }}</span>
  719. </template>
  720. </el-table-column>
  721. <el-table-column label="备件名称" min-width="110px" align="center">
  722. <template slot-scope="scope">
  723. <span>{{ scope.row.partName }}</span>
  724. </template>
  725. </el-table-column>
  726. <el-table-column label="备件规格" min-width="110px" align="center">
  727. <template slot-scope="scope">
  728. <span>{{ scope.row.specification }}</span>
  729. </template>
  730. </el-table-column>
  731. <el-table-column label="库存数" min-width="110px" align="center">
  732. <template slot-scope="scope">
  733. <span>{{ scope.row.reportery }}</span>
  734. </template>
  735. </el-table-column>
  736. <el-table-column label="领用数量" min-width="110px" align="center">
  737. <template slot-scope="scope">
  738. <el-form :model="scope.row">
  739. <el-form-item prop="amount">
  740. <el-input ref="amount" v-model="scope.row.amount" style="margin-top:15px" />
  741. </el-form-item>
  742. </el-form>
  743. </template>
  744. </el-table-column>
  745. <el-table-column label="用途" prop="note" align="center" min-width="60">
  746. <template slot-scope="scope">
  747. <el-form :model="scope.row">
  748. <el-form-item prop="note">
  749. <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
  750. </el-form-item>
  751. </el-form>
  752. </template>
  753. </el-table-column>
  754. <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
  755. <template slot-scope="{row}">
  756. <a class="del" @click="sparePartsDelete(row)">删除</a>
  757. </template>
  758. </el-table-column>
  759. </el-table>
  760. </div>
  761. </el-tab-pane>
  762. </el-tabs>
  763. <div slot="footer" class="dialog-footer" style="bottom: 5px">
  764. <el-button v-if="activeName2=='first'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData1()">确认</el-button>
  765. <el-button v-if="activeName2=='second'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData2()">确认</el-button>
  766. <el-button @click="dialogFormVisible_ReceivingSpareParts = false;">关闭</el-button>
  767. </div>
  768. </el-dialog>
  769. <!-- 完成保养 -->
  770. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_maintainComplete" :close-on-click-modal="false" width="50%">
  771. <div class="maintainComplete">
  772. <el-form ref="maintainCompleteTemp" :rules="rules" :model="maintainCompleteTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
  773. <el-row>
  774. <el-col :span="20">
  775. <el-form-item label="是否录入旧品:" prop="isOldProducts">
  776. <el-radio-group v-model="maintainCompleteTemp.isOldProducts" @change="changeIsOldProducts">
  777. <el-radio :label="0" checked>否</el-radio>
  778. <el-radio :label="1">是</el-radio>
  779. </el-radio-group>
  780. </el-form-item>
  781. </el-col>
  782. </el-row>
  783. <el-row v-if="No2">
  784. <el-col :span="24">
  785. <el-form-item label="旧品录入:" prop="partCode">
  786. <el-autocomplete
  787. v-model="maintainCompleteTemp.partCode"
  788. value-key="name"
  789. class="inline-input"
  790. :fetch-suggestions="oldProductsSearch"
  791. placeholder="请输入备件编号或备件名称或备件规格 "
  792. style="width:100%"
  793. @select="handleSelectOldProducts"
  794. >
  795. <template slot-scope="{ item }">
  796. <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
  797. |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
  798. |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
  799. </template>
  800. </el-autocomplete>
  801. </el-form-item>
  802. </el-col>
  803. </el-row>
  804. </el-form>
  805. <el-table
  806. v-if="No2"
  807. :key="tableKey"
  808. v-loading="listLoading"
  809. element-loading-text="给我一点时间"
  810. :data="listAdd"
  811. border
  812. fit
  813. highlight-current-row
  814. style="width: 100%;margin-bottom:30px"
  815. :cell-style="cellStyle"
  816. class="elTable"
  817. :row-style="rowStyle"
  818. >
  819. <!-- table表格 -->
  820. <el-table-column type="index" label="序号" align="center" width="50px" />
  821. <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
  822. <template slot-scope="scope">
  823. <span>{{ scope.row.partCode }}</span>
  824. </template>
  825. </el-table-column>
  826. <el-table-column label="备件名称" min-width="60px" align="center">
  827. <template slot-scope="scope">
  828. <span>{{ scope.row.partName }}</span><br>
  829. </template>
  830. </el-table-column>
  831. <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
  832. <template slot-scope="scope">
  833. <span>{{ scope.row.specification }}</span>
  834. </template>
  835. </el-table-column>
  836. <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
  837. <template slot-scope="scope">
  838. <el-form :model="scope.row" :rules="rules">
  839. <el-form-item prop="acturalAmount">
  840. <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
  841. </el-form-item>
  842. </el-form>
  843. </template>
  844. </el-table-column>
  845. <el-table-column label="用途" prop="note" align="center" min-width="60">
  846. <template slot-scope="scope">
  847. <el-form :model="scope.row">
  848. <el-form-item prop="note">
  849. <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
  850. </el-form-item>
  851. </el-form>
  852. </template>
  853. </el-table-column>
  854. <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
  855. <template slot-scope="{row}">
  856. <a class="del" @click="partDelete(row)">删除</a>
  857. </template>
  858. </el-table-column>
  859. </el-table>
  860. </div>
  861. <div slot="footer" class="dialog-footer">
  862. <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintainComplete'?createMaintainCompleteData():createMaintainCompleteData()">确认</el-button>
  863. <el-button @click="dialogFormVisible_maintainComplete = false;">关闭</el-button>
  864. </div>
  865. </el-dialog>
  866. <!-- 保养审核 -->
  867. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_examine" :close-on-click-modal="false" width="30%">
  868. <div class="app-examine">
  869. <h3 style="width: 100%;margin:0 auto;line-height:50px">请确认保养审核结果:</h3>
  870. <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
  871. <el-row style="width:88%;margin:0 auto;">
  872. <el-col :span="20">
  873. <el-form-item>
  874. <el-radio-group v-model="examineTemp.isStatue" @change="changeIsStatue">
  875. <el-radio :label="3">通过</el-radio>
  876. <el-radio :label="4">不通过</el-radio>
  877. </el-radio-group>
  878. </el-form-item>
  879. </el-col>
  880. <el-col v-if="isStatueReason" :span="20">
  881. <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入保养不通过的原因" />
  882. </el-col>
  883. </el-row>
  884. <el-row v-if="examineTemp.SHStatue == 2 && examineTemp.isStatue == 3" style="width:90%;margin:0 auto;">
  885. <el-col :span="24">
  886. <el-form-item label="评分:" prop="scores">
  887. <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
  888. </el-form-item>
  889. </el-col>
  890. </el-row>
  891. </el-form>
  892. </div>
  893. <div slot="footer" class="dialog-footer">
  894. <el-button v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
  895. <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
  896. <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
  897. <el-button @click="dialogFormVisible_examine = false;">关闭</el-button>
  898. </div>
  899. </el-dialog>
  900. <!-- 视频 -->
  901. <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_video" :close-on-click-modal="false" width="60%">
  902. <div class="app-video">
  903. <el-form ref="videoTemp" :rules="rules" :model="videoTemp" label-position="right" style="width: 80%;min-height:150px;margin:0 auto;">
  904. <el-row>
  905. <el-col :span="24">
  906. <el-form-item label="" prop="scores">
  907. <video :src="videoTemp.videoPath" controls="controls" style="width:90%;height:450px;margin:0 auto;" />
  908. </el-form-item>
  909. </el-col>
  910. </el-row>
  911. </el-form>
  912. </div>
  913. </el-dialog>
  914. </div>
  915. </template>
  916. <script>
  917. // 引入
  918. import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
  919. // import { mapGetters } from 'vuex'
  920. import waves from '@/directive/waves' // waves directive
  921. import { parseTime, sortChange } from '@/utils/index.js'
  922. // eslint-disable-next-line no-unused-vars
  923. import Pagination from '@/components/Pagination' // secondary package based on el-pagination
  924. import Cookies from 'js-cookie'
  925. import { MessageBox } from 'element-ui'
  926. export default {
  927. name: 'Maintain',
  928. components: { Pagination },
  929. directives: { waves },
  930. data() {
  931. return {
  932. active: 0,
  933. activeList: [],
  934. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  935. cellStyle: { padding: 0 + 'px' },
  936. isokDisable: false,
  937. rules: {
  938. employeeId: [{ required: true, message: '必填', trigger: 'blur' }]
  939. },
  940. findAllPasture: [],
  941. findAllDepart: [],
  942. findAllEmploye: [],
  943. requestParams: [
  944. { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  945. { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
  946. { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  947. { name: 'getDictByName', offset: 0, pagecount: 0, params: ['保养模板执行动作'] }
  948. ],
  949. getDepartParam: {
  950. name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
  951. },
  952. statues: [{ id: '0', name: '已逾期' }, { id: '1', name: '保养中' }, { id: '2', name: '保养完成' }],
  953. SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
  954. empdeptList: [],
  955. getDictByName: [],
  956. radio2: '全部',
  957. textMap: {
  958. see: '查看详情',
  959. receivingSpareParts: '保养及领用',
  960. maintainComplete: '完成保养',
  961. examine: '保养审核',
  962. examine2: '保养审核2',
  963. examine3: '保养审核3',
  964. video: '视频'
  965. },
  966. dialogStatus: '',
  967. radioAll: '全部',
  968. getdataListParm: {
  969. name: 'getBigupkeepList',
  970. page: 1,
  971. offset: 1,
  972. pagecount: 10,
  973. returntype: 'Map',
  974. parammaps: {
  975. inputDatetime: '',
  976. upkeepCode: '',
  977. eqName: '',
  978. eqCode: '',
  979. departmentId: '',
  980. statue: '',
  981. pastureName: Cookies.get('pasturename'),
  982. loginId: Cookies.get('employeid'),
  983. menu: 'Maintain',
  984. SHStatue: '',
  985. logindeptId: Cookies.get('departmentid'),
  986. loginpastureId: Cookies.get('pastureid')
  987. }
  988. },
  989. total: 0,
  990. tableKey: 0,
  991. listLoading: false,
  992. list: [],
  993. // 查看
  994. dialogFormVisible_See: false,
  995. seeTemp: {},
  996. statue1: false,
  997. statue2: false,
  998. activeName: 'first',
  999. listLoadingMaintenanceContent: false,
  1000. listMaintenanceContent: [],
  1001. getMaintenanceContentParm: {
  1002. name: 'getUpkeepTemplateListbyeqV2',
  1003. returntype: 'Map',
  1004. parammaps: {}
  1005. },
  1006. Reason: false,
  1007. // 查看-领用记录
  1008. getCollarUseParm: {
  1009. name: 'getPartsapplybyMt',
  1010. returntype: 'Map',
  1011. parammaps: {}
  1012. },
  1013. collarUseTemp: {},
  1014. // 查看-领用记录table
  1015. getCollarUseListParm: {
  1016. name: 'getpartapplyListBybig',
  1017. returntype: 'Map',
  1018. parammaps: {}
  1019. },
  1020. listLoadingCollarUse: false,
  1021. listCollarUse: [],
  1022. // 查看-旧品录入记录table
  1023. getOldProductsParm: {
  1024. name: 'getMaintainRefuse',
  1025. returntype: 'Map',
  1026. parammaps: {}
  1027. },
  1028. listLoadingOldProducts: false,
  1029. listOldProducts: [],
  1030. // 保养及领用
  1031. dialogFormVisible_ReceivingSpareParts: false,
  1032. activeName2: 'first',
  1033. maintainTemp: {},
  1034. receivingTemp: {},
  1035. getEmpdeptParm: {
  1036. name: 'getEmpdept',
  1037. returntype: 'Map',
  1038. parammaps: {
  1039. deptId: ''
  1040. }
  1041. },
  1042. getAutoCreatCodeParm: {
  1043. name: 'autoCreatCode',
  1044. returntype: 'Map',
  1045. parammaps: {
  1046. pastureId: Cookies.get('pastureid'),
  1047. codeType: 'LY'
  1048. }
  1049. },
  1050. requestSparePart: {
  1051. name: 'getPartsListLY',
  1052. page: 1,
  1053. offset: 1,
  1054. pagecount: 20,
  1055. returntype: 'Map',
  1056. parammaps: {
  1057. pastureId: Cookies.get('pastureid')
  1058. }
  1059. },
  1060. postDataPramas: {},
  1061. // 完成保养
  1062. dialogFormVisible_maintainComplete: false,
  1063. maintainCompleteTemp: {},
  1064. requestOldProducts: {
  1065. name: 'getAllPartsListWB',
  1066. page: 1,
  1067. offset: 1,
  1068. pagecount: 10,
  1069. returntype: 'Map',
  1070. parammaps: {}
  1071. },
  1072. No2: false,
  1073. listAdd: [],
  1074. // 保养审核
  1075. dialogFormVisible_examine: false,
  1076. requestParam: {},
  1077. examineTemp: {
  1078. isStatue: 3
  1079. },
  1080. isStatueReason: false,
  1081. // 权限按钮
  1082. isSee: [],
  1083. isLingYong: [],
  1084. isComplete: [],
  1085. isCharge: [],
  1086. isLeaderCharge: [],
  1087. isDepartmentCharge: [],
  1088. buttons: [],
  1089. pending: {
  1090. total: 0,
  1091. getdataListParm: {
  1092. name: 'getBigupkeepWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
  1093. parammaps: {}
  1094. }
  1095. },
  1096. dialogFormVisible_video: false,
  1097. videoTemp: {},
  1098. requestParam2: {}
  1099. }
  1100. },
  1101. // computed: {
  1102. // ...mapGetters([
  1103. // 'sidebar',
  1104. // 'avatar',
  1105. // 'employeid',
  1106. // 'pastureid'
  1107. // ])
  1108. // },
  1109. computed: {
  1110. space() {
  1111. const { isSimple, $parent: { space }} = this
  1112. return isSimple ? '' : space
  1113. },
  1114. style: function() {
  1115. const style = {}
  1116. const parent = this.$parent
  1117. const len = parent.steps.length
  1118. const space =
  1119. typeof this.space === 'number'
  1120. ? this.space + 'px'
  1121. : this.space
  1122. ? this.space
  1123. : 100 / (len - (this.isCenter ? 0 : 1)) + '%'
  1124. style.flexBasis = space
  1125. if (this.isVertical) return style
  1126. if (this.isLast) {
  1127. style.maxWidth = 100 / this.stepsCount + '%'
  1128. } else {
  1129. style.marginRight = -this.$parent.stepOffset + 'px'
  1130. }
  1131. return style
  1132. }
  1133. },
  1134. created() {
  1135. const that = this
  1136. GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
  1137. that.buttons = response.data.list
  1138. that.get_auto_buttons()
  1139. })
  1140. if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'MaintenancePlan') {
  1141. this.getdataListParm.parammaps.eqCode = this.$route.query.eqCode
  1142. this.getdataListParm.parammaps.inputDatetime = [this.$route.query.time, this.$route.query.time]
  1143. this.getdataListParm.parammaps.startTime = this.$route.query.time
  1144. this.getdataListParm.parammaps.stopTime = this.$route.query.time
  1145. }
  1146. this.get_select_list()
  1147. this.getList()
  1148. this.getPendingList()
  1149. },
  1150. methods: {
  1151. // handleCheck(row) {
  1152. // this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
  1153. // this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
  1154. // },
  1155. tableSort(column) {
  1156. if (this.activeName == 'second') {
  1157. sortChange(column, this.listCollarUse)
  1158. } else if (this.activeName == 'third') {
  1159. sortChange(column, this.listOldProducts)
  1160. }
  1161. },
  1162. get_auto_buttons() {
  1163. // 查看
  1164. const See = 'maintenance:maintain:see'
  1165. const isSee = checkButtons(JSON.parse(sessionStorage.buttons), See)
  1166. this.isSee = isSee
  1167. // 保养及领用
  1168. const LingYong = 'maintenance:maintain:lingyong'
  1169. const isLingYong = checkButtons(JSON.parse(sessionStorage.buttons), LingYong)
  1170. this.isLingYong = isLingYong
  1171. // 完成保养
  1172. const Complete = 'maintenance:maintain:complete'
  1173. const isComplete = checkButtons(JSON.parse(sessionStorage.buttons), Complete)
  1174. this.isComplete = isComplete
  1175. // 使用人保养审核
  1176. const Charge = 'maintenance:maintain:charge'
  1177. const isCharge = checkButtons(JSON.parse(sessionStorage.buttons), Charge)
  1178. this.isCharge = isCharge
  1179. // 主管审核
  1180. const LeaderCharge = 'maintenance:maintain:leaderCharge'
  1181. const isLeaderCharge = checkButtons(JSON.parse(sessionStorage.buttons), LeaderCharge)
  1182. this.isLeaderCharge = isLeaderCharge
  1183. // 部门审核
  1184. const DeptCharge = 'maintenance:maintain:deptcharge'
  1185. const isDepartmentCharge = checkButtons(JSON.parse(sessionStorage.buttons), DeptCharge)
  1186. this.isDepartmentCharge = isDepartmentCharge
  1187. },
  1188. // next() {
  1189. // if (this.active++ > 2) this.active = 0
  1190. // this.finishStatus = 'error'
  1191. // },
  1192. get_select_list() {
  1193. GetDataByNames(this.requestParams).then(response => {
  1194. this.findAllPasture = response.data.findAllPasture.list
  1195. this.findAllEmploye = response.data.findAllEmploye.list
  1196. this.getDictByName = response.data.getDictByName.list
  1197. this.getDepartDownList()
  1198. })
  1199. },
  1200. getDepartDownList() {
  1201. GetDataByName(this.getDepartParam).then(response => {
  1202. this.findAllDepart = response.data.list
  1203. })
  1204. },
  1205. changePastureName(item) {
  1206. this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
  1207. this.getdataListParm.parammaps.departmentId = ''
  1208. this.getDepartDownList()
  1209. },
  1210. close_diago(){
  1211. console.log(11111111111111)
  1212. this.dialogFormVisible_See = false
  1213. },
  1214. getPendingList() {
  1215. this.pending.getdataListParm.parammaps = {
  1216. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  1217. pastureName: this.getdataListParm.parammaps.pastureName,
  1218. SHStatue: this.getdataListParm.parammaps.SHStatue,
  1219. upkeepCode: this.getdataListParm.parammaps.upkeepCode,
  1220. eqName: this.getdataListParm.parammaps.eqName,
  1221. eqCode: this.getdataListParm.parammaps.eqCode,
  1222. departmentId: this.getdataListParm.parammaps.departmentId,
  1223. statue: this.getdataListParm.parammaps.statue,
  1224. loginId: Cookies.get('employeid'),
  1225. menu: 'Maintain',
  1226. logindeptId: Cookies.get('departmentid'),
  1227. loginpastureId: Cookies.get('pastureid'),
  1228. empId: Cookies.get('employeid'),
  1229. pastureId: Cookies.get('pastureid'),
  1230. deptId: Cookies.get('departmentid')
  1231. }
  1232. GetDataByName(this.pending.getdataListParm).then(response => {
  1233. this.pending.total = response.data.total3
  1234. })
  1235. },
  1236. getList() {
  1237. if (this.getdataListParm.parammaps.inputDatetime !== undefined && this.getdataListParm.parammaps.inputDatetime !== '') {
  1238. this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
  1239. this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
  1240. } else {
  1241. this.getdataListParm.parammaps.startTime = ''
  1242. this.getdataListParm.parammaps.stopTime = ''
  1243. }
  1244. this.listLoading = true
  1245. GetDataByName(this.getdataListParm).then(response => {
  1246. if (response.data.list !== null) {
  1247. console.log('table数据', response.data.list)
  1248. for (let i = 0; i < response.data.list.length; i++) {
  1249. this.$set(response.data.list[i], 'img', '视频')
  1250. }
  1251. this.list = response.data.list
  1252. this.pageNum = response.data.pageNum
  1253. this.pageSize = response.data.pageSize
  1254. } else {
  1255. this.list = []
  1256. }
  1257. this.total = response.data.total
  1258. // Just to simulate the time of the request
  1259. setTimeout(() => {
  1260. this.listLoading = false
  1261. }, 100)
  1262. })
  1263. },
  1264. tableCellStyle({ row, column, rowIndex, columnIndex }) {
  1265. if (row.statue == 0 && columnIndex === 10) {
  1266. return {
  1267. background: 'red',
  1268. color: '#fff'
  1269. }
  1270. }
  1271. return {
  1272. background: ''
  1273. }
  1274. },
  1275. changeAll() {
  1276. console.log(this.radioAll)
  1277. if (this.radioAll === '全部') {
  1278. this.getdataListParm.name = 'getBigupkeepList'
  1279. this.getdataListParm.offset = 1
  1280. this.getdataListParm.parammaps = {
  1281. inputDatetime: '',
  1282. upkeepCode: '',
  1283. eqName: '',
  1284. eqCode: '',
  1285. departmentId: '',
  1286. statue: '',
  1287. pastureName: Cookies.get('pasturename'),
  1288. loginId: Cookies.get('employeid'),
  1289. menu: 'Maintain',
  1290. SHStatue: '',
  1291. logindeptId: Cookies.get('departmentid'),
  1292. loginpastureId: Cookies.get('pastureid')
  1293. }
  1294. this.getList()
  1295. } else if (this.radioAll === '待处理') {
  1296. this.getdataListParm.name = 'getBigupkeepWebListNO'
  1297. this.getdataListParm.offset = 1
  1298. this.getdataListParm.parammaps = {
  1299. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  1300. pastureName: this.getdataListParm.parammaps.pastureName,
  1301. SHStatue: this.getdataListParm.parammaps.SHStatue,
  1302. upkeepCode: this.getdataListParm.parammaps.upkeepCode,
  1303. eqName: this.getdataListParm.parammaps.eqName,
  1304. eqCode: this.getdataListParm.parammaps.eqCode,
  1305. departmentId: this.getdataListParm.parammaps.departmentId,
  1306. statue: this.getdataListParm.parammaps.statue,
  1307. loginId: Cookies.get('employeid'),
  1308. menu: 'Maintain',
  1309. logindeptId: Cookies.get('departmentid'),
  1310. loginpastureId: Cookies.get('pastureid'),
  1311. empId: Cookies.get('employeid'),
  1312. pastureId: Cookies.get('pastureid'),
  1313. deptId: Cookies.get('departmentid')
  1314. }
  1315. this.getList()
  1316. } else if (this.radioAll === '已处理') {
  1317. this.getdataListParm.name = 'getBigupkeepWebList'
  1318. this.getdataListParm.offset = 1
  1319. this.getdataListParm.parammaps = {
  1320. inputDatetime: this.getdataListParm.parammaps.inputDatetime,
  1321. pastureName: this.getdataListParm.parammaps.pastureName,
  1322. SHStatue: this.getdataListParm.parammaps.SHStatue,
  1323. upkeepCode: this.getdataListParm.parammaps.upkeepCode,
  1324. eqName: this.getdataListParm.parammaps.eqName,
  1325. eqCode: this.getdataListParm.parammaps.eqCode,
  1326. departmentId: this.getdataListParm.parammaps.departmentId,
  1327. statue: this.getdataListParm.parammaps.statue,
  1328. loginId: Cookies.get('employeid'),
  1329. menu: 'Maintain',
  1330. logindeptId: Cookies.get('departmentid'),
  1331. loginpastureId: Cookies.get('pastureid'),
  1332. empId: Cookies.get('employeid'),
  1333. pastureId: Cookies.get('pastureid'),
  1334. deptId: Cookies.get('departmentid')
  1335. }
  1336. this.getList()
  1337. }
  1338. },
  1339. statue: function(cellValue) {
  1340. // console.log(cellValue.isZeroStock)
  1341. if (cellValue.statue == 0) {
  1342. return '已逾期'
  1343. } else if (cellValue.statue == 1) {
  1344. return '保养中'
  1345. } else if (cellValue.statue == 2) {
  1346. return '已完成'
  1347. }
  1348. },
  1349. SHStatue: function(cellValue) {
  1350. // console.log(cellValue.isZeroStock)
  1351. if (cellValue.SHStatue == 1) {
  1352. return ''
  1353. } else if (cellValue.SHStatue == 2) {
  1354. return '审核中'
  1355. } else if (cellValue.SHStatue == 3) {
  1356. return '审核中'
  1357. } else if (cellValue.SHStatue == 4) {
  1358. return '未通过'
  1359. } else if (cellValue.SHStatue == 6) {
  1360. return '未通过'
  1361. } else if (cellValue.SHStatue == 8) {
  1362. return '未通过'
  1363. } else if (cellValue.SHStatue == 5) {
  1364. return '审核中'
  1365. } else if (cellValue.SHStatue == 7) {
  1366. return '已通过'
  1367. }
  1368. },
  1369. form_search() {
  1370. console.log('点击了table搜索')
  1371. this.listLoading = true
  1372. if (this.getdataListParm.parammaps.inputDatetime === null) {
  1373. this.getdataListParm.parammaps.inputDatetime = ''
  1374. }
  1375. this.getdataListParm.offset = 1
  1376. this.getList()
  1377. this.getPendingList()
  1378. },
  1379. form_see(row) {
  1380. this.seeTemp = Object.assign({}, row)
  1381. console.log('查看', this.seeTemp)
  1382. // 流程图
  1383. var reason = '未通过原因:' + this.seeTemp.workflowNote
  1384. var scores = '评分:' + this.seeTemp.scores + '分'
  1385. if (this.seeTemp.SHStatue === 1) {
  1386. this.activeList = [{ title: '完成保养' }, { title: '使用人审核' }, { title: '部门主管审核' }, { title: '设备主管审核' }]
  1387. this.active = 0
  1388. } else if (this.seeTemp.SHStatue === 2) {
  1389. this.activeList = [{ title: '完成保养', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '使用人审核' }, { title: '部门主管审核' }, { title: '设备主管审核' }]
  1390. this.active = 1
  1391. } else if (this.seeTemp.SHStatue === 3) {
  1392. this.active = 2
  1393. 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: '部门主管审核' }, { title: '设备主管审核' }]
  1394. } else if (this.seeTemp.SHStatue === 4) {
  1395. this.active = 2
  1396. 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: '部门主管审核' }, { title: '设备主管审核' }]
  1397. } else if (this.seeTemp.SHStatue === 5) {
  1398. 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.deptChargeDate, name: this.seeTemp.deptChargePerson, status: '', reason: '' }, { title: '设备主管审核' }]
  1399. this.active = 3
  1400. } else if (this.seeTemp.SHStatue === 6) {
  1401. 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.deptChargeDate, name: this.seeTemp.deptChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
  1402. this.active = 3
  1403. } else if (this.seeTemp.SHStatue === 7) {
  1404. 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.deptChargeDate, name: this.seeTemp.deptChargePerson }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
  1405. this.active = 4
  1406. } else if (this.seeTemp.SHStatue === 8) {
  1407. 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.deptChargeDate, name: this.seeTemp.deptChargePerson }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
  1408. this.active = 4
  1409. }
  1410. this.dialogStatus = 'see'
  1411. this.dialogFormVisible_See = true
  1412. if (this.seeTemp.SHStatue !== 1) {
  1413. // 查看显示类型2
  1414. this.statue1 = false
  1415. this.statue2 = true
  1416. this.getMaintenanceContentList()
  1417. } else {
  1418. if (this.seeTemp.SHStatue == 1 && this.seeTemp.LYStatue == '未领用' && this.seeTemp.LRStatue == '未录入') {
  1419. // 查看显示类型1
  1420. this.statue1 = true
  1421. this.statue2 = false
  1422. this.getMaintenanceContentList()
  1423. } else {
  1424. // 查看显示类型2
  1425. this.statue1 = false
  1426. this.statue2 = true
  1427. this.getMaintenanceContentList()
  1428. }
  1429. }
  1430. this.collarUseTemp = {}
  1431. this.listCollarUse = []
  1432. this.getCollarUse()
  1433. this.getOldProductsList()
  1434. },
  1435. getMaintenanceContentList() {
  1436. this.getMaintenanceContentParm.parammaps.id = this.seeTemp.id
  1437. this.listLoadingMaintenanceContent = false
  1438. GetDataByName(this.getMaintenanceContentParm).then(response => {
  1439. console.log('保养内容table数据', response.data.list)
  1440. this.listMaintenanceContent = response.data.list
  1441. this.$forceUpdate()
  1442. setTimeout(() => {
  1443. this.listLoadingMaintenanceContent = false
  1444. }, 100)
  1445. })
  1446. },
  1447. openDetails(row, column, cell, event) {
  1448. if (column.label !== '操作') {
  1449. this.$router.push({ path: '/customs/Receive', query: { applyCode: this.collarUseTemp.applyCode }})
  1450. }
  1451. },
  1452. getCollarUse() {
  1453. this.getCollarUseParm.parammaps.RUCode = this.seeTemp.upkeepCode
  1454. GetDataByName(this.getCollarUseParm).then(response => {
  1455. this.collarUseTemp = response.data.list[0]
  1456. if (response.data.list.length > 0) {
  1457. console.log('领用记录数据', response.data.list[0])
  1458. if (response.data.list[0].statue == 0) {
  1459. this.$set(this.collarUseTemp, 'statueName', '未领用')
  1460. } else {
  1461. this.$set(this.collarUseTemp, 'statueName', '已领用')
  1462. }
  1463. }
  1464. this.getCollarUseList()
  1465. })
  1466. },
  1467. getCollarUseList() {
  1468. this.getCollarUseListParm.parammaps.id = this.collarUseTemp.id
  1469. this.listLoadingCollarUse = true
  1470. GetDataByName(this.getCollarUseListParm).then(response => {
  1471. console.log('领用table数据', response.data.list)
  1472. this.listCollarUse = response.data.list
  1473. setTimeout(() => {
  1474. this.listLoadingCollarUse = false
  1475. }, 100)
  1476. })
  1477. },
  1478. getOldProductsList() {
  1479. this.getOldProductsParm.parammaps.repairCode = this.seeTemp.upkeepCode
  1480. this.listLoadingOldProducts = true
  1481. GetDataByName(this.getOldProductsParm).then(response => {
  1482. console.log('旧品录入记录table数据', response.data.list)
  1483. this.listOldProducts = response.data.list
  1484. setTimeout(() => {
  1485. this.listLoadingOldProducts = false
  1486. }, 100)
  1487. })
  1488. },
  1489. // 保养及领用
  1490. handleReceivingSpareParts(row) {
  1491. console.log('点击了保养及领用')
  1492. if (row == undefined) {
  1493. this.receivingTemp = this.seeTemp
  1494. } else {
  1495. this.receivingTemp = Object.assign({}, row)
  1496. }
  1497. this.maintainTemp = this.receivingTemp
  1498. this.maintainTemp.employeeId = String(this.maintainTemp.useEmpId)
  1499. this.seeTemp = this.maintainTemp
  1500. this.listCollarUse = []
  1501. this.getAutoCreatCode()
  1502. this.receivingTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
  1503. this.getEmpdeptList()
  1504. this.getCollarUse()
  1505. this.getMaintenanceContentList()
  1506. this.dialogStatus = 'receivingSpareParts'
  1507. this.dialogFormVisible_ReceivingSpareParts = true
  1508. },
  1509. getEmpdeptList() {
  1510. this.getEmpdeptParm.parammaps.deptId = this.maintainTemp.departmentId
  1511. GetDataByName(this.getEmpdeptParm).then(response => {
  1512. console.log('保养使用人', response.data.list)
  1513. if (response.data.list !== null) {
  1514. this.empdeptList = response.data.list
  1515. } else {
  1516. this.empdeptList = []
  1517. }
  1518. })
  1519. },
  1520. getAutoCreatCode() {
  1521. GetDataByName(this.getAutoCreatCodeParm).then(response => {
  1522. console.log('领用领用单号', response.data.list[0])
  1523. this.receivingTemp.applyCode = response.data.list[0].orderCode
  1524. this.$forceUpdate()
  1525. })
  1526. },
  1527. sparePartSearch(queryString, cb) {
  1528. console.log('备件模糊查询输入值', queryString)
  1529. this.requestSparePart.parammaps['partCode'] = queryString
  1530. GetDataByName(this.requestSparePart).then(response => {
  1531. console.log('备件模糊查询搜索data', response.data.list)
  1532. if (response.data.list == null) {
  1533. cb([])
  1534. } else {
  1535. cb(response.data.list)
  1536. }
  1537. })
  1538. },
  1539. handleSelectSparePart(item) {
  1540. console.log('备件模糊查询选中值', item)
  1541. if (this.listCollarUse.length > 0) {
  1542. // eslint-disable-next-line no-redeclare
  1543. if (this.listCollarUse.find(obj => obj.id === item.id)) {
  1544. this.$message({
  1545. type: 'warning',
  1546. message: '此备件已存在,请重新选择备件'
  1547. })
  1548. } else {
  1549. this.listCollarUse.unshift(item)
  1550. }
  1551. } else {
  1552. this.listCollarUse = []
  1553. this.listCollarUse.unshift(item)
  1554. }
  1555. },
  1556. createReceivingSparePartseData1() {
  1557. this.isokDisable = true
  1558. setTimeout(() => {
  1559. this.isokDisable = false
  1560. }, 1000)
  1561. this.$refs['maintainTemp'].validate(valid => {
  1562. if (valid) {
  1563. this.postDataPramas.common = { 'returnmap': '0' }
  1564. this.postDataPramas.data = []
  1565. this.postDataPramas.data[0] = { 'name': 'updateEquseEmpId', 'type': 'e', 'parammaps': {
  1566. employeeId: this.maintainTemp.employeeId,
  1567. id: this.maintainTemp.id
  1568. }}
  1569. this.postDataPramas.data[1] = { 'name': 'deleteutupbyBigid', 'type': 'e', 'parammaps': {
  1570. id: this.maintainTemp.id
  1571. }}
  1572. this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listMaintenanceContent }}
  1573. this.postDataPramas.data[2].children = []
  1574. this.postDataPramas.data[2].children[0] = { 'name': 'insertutup', 'type': 'e', 'parammaps': {
  1575. id: this.maintainTemp.id,
  1576. positionName: '@insertSpotList.positionName',
  1577. program: '@insertSpotList.program',
  1578. standard: '@insertSpotList.standard',
  1579. active: '@insertSpotList.active'
  1580. }}
  1581. ExecDataByConfig(this.postDataPramas).then(response => {
  1582. console.log('添加领用保存发送参数', this.postDataPramas)
  1583. if (response.msg === 'fail') {
  1584. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1585. } else {
  1586. this.dialogFormVisible_ReceivingSpareParts = false
  1587. this.dialogFormVisible_See = false
  1588. this.getList()
  1589. this.getPendingList()
  1590. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1591. }
  1592. })
  1593. }
  1594. })
  1595. },
  1596. createReceivingSparePartseData2() {
  1597. console.log('点击了保养及领用保存')
  1598. this.isokDisable = true
  1599. setTimeout(() => {
  1600. this.isokDisable = false
  1601. }, 1000)
  1602. this.$refs['receivingTemp'].validate(valid => {
  1603. if (valid) {
  1604. if (this.listCollarUse.length !== 0) {
  1605. for (var i = 0; i < this.listCollarUse.length; i++) {
  1606. console.log(this.listCollarUse[i].amount)
  1607. if (this.listCollarUse[i].amount !== undefined) {
  1608. var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
  1609. if (!rulesAmount.test(this.listCollarUse[i].amount)) {
  1610. this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数', duration: 2000 })
  1611. return false
  1612. } else if (parseFloat(this.listCollarUse[i].amount) > parseFloat(this.listCollarUse[i].reportery)) {
  1613. this.$message({ type: 'error', message: '领用数量不可大于库存数', duration: 2000 })
  1614. return false
  1615. }
  1616. } else {
  1617. this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
  1618. return false
  1619. }
  1620. }
  1621. let mySumPrice = 0
  1622. for (let i = 0; i < this.listCollarUse.length; i++) {
  1623. mySumPrice += parseFloat(this.listCollarUse[i].price) * parseFloat(this.listCollarUse[i].amount)
  1624. }
  1625. if (mySumPrice > 500) {
  1626. this.receivingTemp.SHStatus = 2
  1627. } else {
  1628. this.receivingTemp.SHStatus = 9
  1629. }
  1630. this.postDataPramas.common = { 'returnmap': '0' }
  1631. this.postDataPramas.data = []
  1632. this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
  1633. pastureId: this.$store.state.user.pastureid,
  1634. applyCode: this.receivingTemp.applyCode,
  1635. applyType: 2,
  1636. departmentId: this.receivingTemp.departmentId,
  1637. empId: this.receivingTemp.upkeepPersonId,
  1638. applyDate: this.receivingTemp.createDate,
  1639. RUCode: this.receivingTemp.upkeepCode,
  1640. SHStatus: this.receivingTemp.SHStatus
  1641. }}
  1642. this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listCollarUse }}
  1643. this.postDataPramas.data[1].children = []
  1644. this.postDataPramas.data[1].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
  1645. bigId: '@insertBigpartapply.LastInsertId',
  1646. pastureId: '@insertSpotList.pastureId',
  1647. partId: '@insertSpotList.partId',
  1648. partCode: '@insertSpotList.partCode',
  1649. partName: '@insertSpotList.partName',
  1650. specification: '@insertSpotList.specification',
  1651. brandId: '@insertSpotList.brandId',
  1652. price: '@insertSpotList.price',
  1653. amount: '@insertSpotList.amount',
  1654. eqName: this.receivingTemp.eqName,
  1655. eqCode: this.receivingTemp.eqCode,
  1656. providerId: '@insertSpotList.providerId',
  1657. note: '@insertSpotList.note',
  1658. reportery: '@insertSpotList.reportery',
  1659. contractId: '@insertSpotList.contractId',
  1660. locationId: '@insertSpotList.locationId'
  1661. }}
  1662. ExecDataByConfig(this.postDataPramas).then(response => {
  1663. console.log('添加领用保存发送参数', this.postDataPramas)
  1664. if (response.msg === 'fail') {
  1665. this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
  1666. } else {
  1667. this.dialogFormVisible_ReceivingSpareParts = false
  1668. this.dialogFormVisible_See = false
  1669. this.getList()
  1670. this.getPendingList()
  1671. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1672. }
  1673. })
  1674. // return true
  1675. } else {
  1676. this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
  1677. return false
  1678. }
  1679. }
  1680. })
  1681. },
  1682. // 完成保养
  1683. handleCompleteMaintenance(row) {
  1684. console.log('点击了完成保养', row)
  1685. if (row == undefined) {
  1686. this.$set(this.seeTemp, 'isOldProducts', 0)
  1687. this.maintainCompleteTemp = this.seeTemp
  1688. } else {
  1689. this.maintainCompleteTemp = Object.assign({}, row)
  1690. this.$set(this.maintainCompleteTemp, 'isOldProducts', 0)
  1691. }
  1692. this.dialogStatus = 'maintainComplete'
  1693. this.No2 = false
  1694. this.dialogFormVisible_maintainComplete = true
  1695. this.listAdd = []
  1696. },
  1697. changeIsOldProducts(val) {
  1698. console.log(val)
  1699. if (val == 1) {
  1700. this.No2 = true
  1701. } else {
  1702. this.No2 = false
  1703. }
  1704. },
  1705. oldProductsSearch(queryString, cb) {
  1706. console.log('旧品录入模糊查询输入值', queryString)
  1707. this.requestOldProducts.parammaps.partCode = queryString
  1708. this.requestOldProducts.parammaps.RUCode = this.maintainCompleteTemp.upkeepCode
  1709. GetDataByName(this.requestOldProducts).then(response => {
  1710. console.log('旧品录入模糊查询搜索data', response.data.list)
  1711. cb(response.data.list)
  1712. })
  1713. },
  1714. handleSelectOldProducts(item) {
  1715. this.maintainCompleteTemp.partCode = ''
  1716. console.log('旧品录入模糊查询选中值', item)
  1717. if (this.listAdd.length > 0) {
  1718. // eslint-disable-next-line no-redeclare
  1719. if (this.listAdd.find(obj => obj.id === item.id)) {
  1720. this.$message({
  1721. type: 'warning',
  1722. message: '此旧品已存在,请重新选择旧品'
  1723. })
  1724. } else {
  1725. if (item.checkoutNumber == null) {
  1726. this.$set(item, 'checkoutNumber', item.reportery)
  1727. }
  1728. this.listAdd.unshift(item)
  1729. }
  1730. } else {
  1731. if (item.checkoutNumber == null) {
  1732. this.$set(item, 'checkoutNumber', item.reportery)
  1733. }
  1734. this.listAdd.unshift(item)
  1735. }
  1736. },
  1737. sparePartsDelete(row) {
  1738. MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
  1739. confirmButtonText: '确认',
  1740. cancelButtonText: '取消',
  1741. type: 'warning'
  1742. }).then(() => {
  1743. // console.log(this.list2)
  1744. for (var i = 0; i < this.listCollarUse.length; i++) {
  1745. console.log(this.listCollarUse[i])
  1746. if (this.listCollarUse[i].id === row.id) {
  1747. var listCollarUseIndex = this.listCollarUse.indexOf(this.listCollarUse[i])
  1748. }
  1749. if (listCollarUseIndex > -1) {
  1750. this.listCollarUse.splice(listCollarUseIndex, 1)
  1751. return
  1752. }
  1753. }
  1754. })
  1755. },
  1756. partDelete(row) {
  1757. console.log(this.listAdd)
  1758. MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
  1759. confirmButtonText: '确认',
  1760. cancelButtonText: '取消',
  1761. type: 'warning'
  1762. }).then(() => {
  1763. // console.log(this.list2)
  1764. for (var i = 0; i < this.listAdd.length; i++) {
  1765. console.log(this.listAdd[i])
  1766. if (this.listAdd[i].id === row.id) {
  1767. var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
  1768. }
  1769. if (listAddIndex > -1) {
  1770. this.listAdd.splice(listAddIndex, 1)
  1771. return
  1772. }
  1773. }
  1774. })
  1775. },
  1776. // 完成保养-保存
  1777. createMaintainCompleteData() {
  1778. console.log('点击了完成保养确认', this.maintainCompleteTemp)
  1779. console.log('点击了完成保养确认', this.maintainCompleteTemp.laidcou)
  1780. if (this.maintainCompleteTemp.laidcou == 0) {
  1781. if (this.maintainCompleteTemp.isOldProducts == 0) {
  1782. console.log('否')
  1783. this.requestParam.name = 'completeUpkeep'
  1784. this.requestParam.parammaps = {}
  1785. this.requestParam.parammaps.id = this.maintainCompleteTemp.id
  1786. PostDataByName(this.requestParam).then((response) => {
  1787. if (response.msg !== 'fail') {
  1788. //如果有设备记录仪的权限
  1789. if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
  1790. // 临时注释
  1791. if (this.maintainCompleteTemp.videoTxt == '已录制') {
  1792. this.requestParam2.name = 'upkeepChargDone'
  1793. this.requestParam2.parammaps = {}
  1794. this.requestParam2.parammaps.id = this.maintainCompleteTemp.id
  1795. this.requestParam2.parammaps.statue = 7
  1796. this.requestParam2.parammaps.orderStatue = 2
  1797. this.requestParam2.parammaps.empId = Cookies.get('employeid')
  1798. PostDataByName(this.requestParam2).then(response => {
  1799. if (response.msg !== 'fail') {
  1800. if (this.getdataListParm.parammaps.inputDatetime === null) {
  1801. this.getdataListParm.parammaps.inputDatetime = ''
  1802. }
  1803. this.getList()
  1804. this.dialogFormVisible_maintainComplete = false
  1805. this.dialogFormVisible_See = false
  1806. this.getPendingList()
  1807. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  1808. } else {
  1809. failproccess(response, this.$notify)
  1810. }
  1811. })
  1812. }
  1813. // 临时注释
  1814. }else{
  1815. //正常流程。没有记录仪权限
  1816. if (this.getdataListParm.parammaps.inputDatetime === null) {
  1817. this.getdataListParm.parammaps.inputDatetime = ''
  1818. }
  1819. this.dialogFormVisible_maintainComplete = false
  1820. this.dialogFormVisible_See = false
  1821. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  1822. this.getList()
  1823. this.getPendingList()
  1824. }
  1825. } else {
  1826. failproccess(response, this.$notify)
  1827. }
  1828. })
  1829. } else {
  1830. console.log('是')
  1831. this.isokDisable = true
  1832. setTimeout(() => {
  1833. this.isokDisable = false
  1834. }, 1000)
  1835. this.$refs['maintainCompleteTemp'].validate(valid => {
  1836. if (valid) {
  1837. if (this.listAdd.length !== 0) {
  1838. for (var i = 0; i < this.listAdd.length; i++) {
  1839. if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
  1840. this.$message({
  1841. type: 'warning',
  1842. message: '请录入数量是否未填写',
  1843. duration: 2000
  1844. })
  1845. return false
  1846. } else {
  1847. var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
  1848. if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
  1849. this.$message({
  1850. type: 'error',
  1851. message: '录入数量请输入正数,最多保留两位小数点',
  1852. duration: 2000
  1853. })
  1854. return false
  1855. }
  1856. }
  1857. }
  1858. this.postDataPramas.common = { 'returnmap': '0' }
  1859. this.postDataPramas.data = []
  1860. this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
  1861. this.postDataPramas.data[0].children = []
  1862. this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
  1863. pastureId: Cookies.get('pastureid'),
  1864. deptId: this.maintainCompleteTemp.departmentId,
  1865. partCode: '@insertSpotList.partCode',
  1866. partName: '@insertSpotList.partName',
  1867. partId: '@insertSpotList.id',
  1868. specification: '@insertSpotList.specification',
  1869. unit: '@insertSpotList.unit',
  1870. acturalAmount: '@insertSpotList.acturalAmount',
  1871. eqId: this.maintainCompleteTemp.eqId,
  1872. eqCode: this.maintainCompleteTemp.eqCode,
  1873. eqName: this.maintainCompleteTemp.eqName,
  1874. repairCode: this.maintainCompleteTemp.upkeepCode,
  1875. listType: 1
  1876. }}
  1877. this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
  1878. id: this.maintainCompleteTemp.id
  1879. }}
  1880. ExecDataByConfig(this.postDataPramas).then(response => {
  1881. console.log('完成维修-是-保存发送参数', this.postDataPramas)
  1882. if (response.msg === 'fail') {
  1883. this.$notify({
  1884. title: '保存失败',
  1885. message: response.data,
  1886. type: 'warning',
  1887. duration: 2000
  1888. })
  1889. } else {
  1890. this.dialogFormVisible_maintainComplete = false
  1891. this.dialogFormVisible_See = false
  1892. this.getList()
  1893. this.getPendingList()
  1894. this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
  1895. }
  1896. })
  1897. return true
  1898. } else {
  1899. this.$notify({
  1900. title: '',
  1901. message: '请完善旧品信息',
  1902. type: 'warning',
  1903. duration: 2000
  1904. })
  1905. return false
  1906. }
  1907. }
  1908. })
  1909. }
  1910. } else {
  1911. this.$notify({ message: '备件未领用不可完成保养', type: 'warning', duration: 2000 })
  1912. }
  1913. },
  1914. // 保养审核
  1915. handleExamine(row) {
  1916. console.log('点击了保养审核')
  1917. if (row == undefined) {
  1918. this.examineTemp = this.seeTemp
  1919. this.$set(this.seeTemp, 'isStatue', 3)
  1920. this.$set(this.seeTemp, 'workflowNote', '')
  1921. this.$set(this.examineTemp, 'scores', '')
  1922. } else {
  1923. this.examineTemp = Object.assign({}, row)
  1924. this.$set(this.examineTemp, 'isStatue', 3)
  1925. this.$set(this.examineTemp, 'workflowNote', '')
  1926. this.$set(this.examineTemp, 'scores', '')
  1927. }
  1928. this.dialogStatus = 'examine'
  1929. this.dialogFormVisible_examine = true
  1930. },
  1931. changeIsStatue(val) {
  1932. console.log(val)
  1933. if (val == 4) {
  1934. this.isStatueReason = true
  1935. } else {
  1936. this.isStatueReason = false
  1937. }
  1938. },
  1939. // 保养审核1
  1940. createExamineData() {
  1941. console.log('点击了保养审核确认')
  1942. this.isokDisable = true
  1943. setTimeout(() => {
  1944. this.isokDisable = false
  1945. }, 1000)
  1946. this.$refs['examineTemp'].validate(valid => {
  1947. if (valid) {
  1948. this.requestParam.name = 'upkeepCharge'
  1949. this.requestParam.parammaps = {}
  1950. this.requestParam.parammaps.id = this.examineTemp.id
  1951. this.requestParam.parammaps.statue = this.examineTemp.isStatue
  1952. this.requestParam.parammaps.empId = Cookies.get('employeid')
  1953. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  1954. if (this.requestParam.parammaps.statue == 4) {
  1955. this.requestParam.parammaps.scores = 5
  1956. } else {
  1957. this.requestParam.parammaps.scores = this.examineTemp.scores
  1958. }
  1959. PostDataByName(this.requestParam).then(response => {
  1960. console.log('保养审核确认发送参数', this.requestParam)
  1961. if (response.msg !== 'fail') {
  1962. if (this.getdataListParm.parammaps.inputDatetime === null) {
  1963. this.getdataListParm.parammaps.inputDatetime = ''
  1964. }
  1965. this.getList()
  1966. this.dialogFormVisible_examine = false
  1967. this.dialogFormVisible_See = false
  1968. this.isStatueReason = false
  1969. this.getPendingList()
  1970. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  1971. } else {
  1972. failproccess(response, this.$notify)
  1973. }
  1974. })
  1975. }
  1976. })
  1977. },
  1978. // 保养审核2
  1979. handleExamine2(row) {
  1980. console.log('点击了保养审核------', row)
  1981. if (row == undefined) {
  1982. this.examineTemp = this.seeTemp
  1983. this.$set(this.seeTemp, 'isStatue', 3)
  1984. this.$set(this.seeTemp, 'workflowNote', '')
  1985. } else {
  1986. this.examineTemp = Object.assign({}, row)
  1987. this.$set(this.examineTemp, 'isStatue', 3)
  1988. this.$set(this.examineTemp, 'workflowNote', '')
  1989. }
  1990. this.dialogStatus = 'examine2'
  1991. this.dialogFormVisible_examine = true
  1992. },
  1993. // 保养审核2-保存
  1994. createExamineData2() {
  1995. if (this.examineTemp.isStatue == 3) {
  1996. console.log('点击了保养审核2确认-通过')
  1997. this.isokDisable = true
  1998. setTimeout(() => {
  1999. this.isokDisable = false
  2000. }, 1000)
  2001. this.$refs['examineTemp'].validate(valid => {
  2002. if (valid) {
  2003. this.requestParam.name = 'upkeepChargDone'
  2004. this.requestParam.parammaps = {}
  2005. this.requestParam.parammaps.id = this.examineTemp.id
  2006. this.requestParam.parammaps.statue = 7
  2007. this.requestParam.parammaps.orderStatue = 2
  2008. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2009. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2010. PostDataByName(this.requestParam).then(response => {
  2011. console.log('保养审核确认发送参数', this.requestParam)
  2012. if (response.msg !== 'fail') {
  2013. if (this.getdataListParm.parammaps.inputDatetime === null) {
  2014. this.getdataListParm.parammaps.inputDatetime = ''
  2015. }
  2016. this.getList()
  2017. this.dialogFormVisible_examine = false
  2018. this.dialogFormVisible_See = false
  2019. this.isStatueReason = false
  2020. this.getPendingList()
  2021. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  2022. } else {
  2023. failproccess(response, this.$notify)
  2024. }
  2025. })
  2026. }
  2027. })
  2028. } else {
  2029. console.log('点击了保养审核2确认-不通过')
  2030. this.isokDisable = true
  2031. setTimeout(() => {
  2032. this.isokDisable = false
  2033. }, 1000)
  2034. this.$refs['examineTemp'].validate(valid => {
  2035. if (valid) {
  2036. this.requestParam.name = 'upkeepCharge1'
  2037. this.requestParam.parammaps = {}
  2038. this.requestParam.parammaps.id = this.examineTemp.id
  2039. this.requestParam.parammaps.statue = 8
  2040. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2041. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2042. PostDataByName(this.requestParam).then(response => {
  2043. console.log('保养审核确认发送参数', this.requestParam)
  2044. if (response.msg !== 'fail') {
  2045. if (this.getdataListParm.parammaps.inputDatetime === null) {
  2046. this.getdataListParm.parammaps.inputDatetime = ''
  2047. }
  2048. this.getList()
  2049. this.dialogFormVisible_examine = false
  2050. this.dialogFormVisible_See = false
  2051. this.isStatueReason = false
  2052. this.getPendingList()
  2053. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  2054. } else {
  2055. failproccess(response, this.$notify)
  2056. }
  2057. })
  2058. }
  2059. })
  2060. }
  2061. },
  2062. // 保养审核2
  2063. handleExamine3(row) {
  2064. console.log('点击了保养审核------', row)
  2065. if (row == undefined) {
  2066. this.examineTemp = this.seeTemp
  2067. this.$set(this.seeTemp, 'isStatue', 3)
  2068. this.$set(this.seeTemp, 'workflowNote', '')
  2069. } else {
  2070. this.examineTemp = Object.assign({}, row)
  2071. this.$set(this.examineTemp, 'isStatue', 3)
  2072. this.$set(this.examineTemp, 'workflowNote', '')
  2073. }
  2074. this.dialogStatus = 'examine3'
  2075. this.dialogFormVisible_examine = true
  2076. },
  2077. // 保养审核3-保存
  2078. createExamineData3() {
  2079. if (this.examineTemp.isStatue == 3) {
  2080. console.log('点击了保养审核3确认-通过')
  2081. this.isokDisable = true
  2082. setTimeout(() => {
  2083. this.isokDisable = false
  2084. }, 1000)
  2085. this.$refs['examineTemp'].validate(valid => {
  2086. if (valid) {
  2087. this.requestParam.name = 'upkeepCharge3'
  2088. this.requestParam.parammaps = {}
  2089. this.requestParam.parammaps.id = this.examineTemp.id
  2090. this.requestParam.parammaps.statue = 5
  2091. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2092. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2093. PostDataByName(this.requestParam).then(response => {
  2094. console.log('保养审核确认发送参数', this.requestParam)
  2095. if (response.msg !== 'fail') {
  2096. if (this.getdataListParm.parammaps.inputDatetime === null) {
  2097. this.getdataListParm.parammaps.inputDatetime = ''
  2098. }
  2099. this.getList()
  2100. this.dialogFormVisible_examine = false
  2101. this.dialogFormVisible_See = false
  2102. this.isStatueReason = false
  2103. this.getPendingList()
  2104. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  2105. } else {
  2106. failproccess(response, this.$notify)
  2107. }
  2108. })
  2109. }
  2110. })
  2111. } else {
  2112. console.log('点击了保养审核3确认-不通过')
  2113. this.isokDisable = true
  2114. setTimeout(() => {
  2115. this.isokDisable = false
  2116. }, 1000)
  2117. this.$refs['examineTemp'].validate(valid => {
  2118. if (valid) {
  2119. this.requestParam.name = 'upkeepCharge3'
  2120. this.requestParam.parammaps = {}
  2121. this.requestParam.parammaps.id = this.examineTemp.id
  2122. this.requestParam.parammaps.statue = 6
  2123. this.requestParam.parammaps.empId = Cookies.get('employeid')
  2124. this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
  2125. PostDataByName(this.requestParam).then(response => {
  2126. console.log('保养审核确认发送参数', this.requestParam)
  2127. if (response.msg !== 'fail') {
  2128. if (this.getdataListParm.parammaps.inputDatetime === null) {
  2129. this.getdataListParm.parammaps.inputDatetime = ''
  2130. }
  2131. this.getList()
  2132. this.getPendingList()
  2133. this.dialogFormVisible_examine = false
  2134. this.dialogFormVisible_See = false
  2135. this.isStatueReason = false
  2136. this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
  2137. } else {
  2138. failproccess(response, this.$notify)
  2139. }
  2140. })
  2141. }
  2142. })
  2143. }
  2144. },
  2145. preview(row) {
  2146. console.log(row, '=====666')
  2147. this.dialogStatus = 'video'
  2148. this.dialogFormVisible_video = true
  2149. // row.videoPath = 'https://sys.mcs8.net:7706' + row.videoPath
  2150. this.videoTemp = Object.assign({}, row)
  2151. }
  2152. }
  2153. }
  2154. </script>
  2155. <style lang="scss" scoped>
  2156. /deep/ .el-badge__content.is-fixed{
  2157. z-index: 1;
  2158. }
  2159. </style>
  2160. <style lang="scss">
  2161. .el-step__head.is-success {
  2162. color: #409EFF;
  2163. border-color: #409EFF;
  2164. }
  2165. .el-step__title.is-success{
  2166. color: #409EFF;
  2167. }
  2168. .el-step__head.is-process{
  2169. color: #409EFF;
  2170. border-color: #409EFF;
  2171. .el-step__icon.is-text{
  2172. background: #409EFF;
  2173. color: #fff;
  2174. }
  2175. }
  2176. .step-row{
  2177. color: #000;
  2178. }
  2179. </style>