index.vue 97 KB

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