EODSignFor.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  1. <template>
  2. <!-- 电力运方单签收 -->
  3. <div class="EODSignFor">
  4. <div class="box">
  5. <div class="box-top">
  6. <el-form
  7. style="overflow: hidden;"
  8. :style="filterForm.show ? null : { height: '0px' }"
  9. size="mini"
  10. label-width="110px"
  11. >
  12. <el-row>
  13. <el-col :span="12">
  14. <el-form-item label="编制时间">
  15. <el-date-picker
  16. type="datetimerange"
  17. v-model="filterForm.data.creattime"
  18. placeholder=""
  19. style="width: 100%;"
  20. value-format="yyyy-MM-dd HH:mm:ss"
  21. format="yyyy-MM-dd HH:mm:ss"
  22. ></el-date-picker>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="12">
  26. <el-form-item label="运行主管">
  27. <el-input clearable
  28. v-model="filterForm.data.applyman"
  29. placeholder=""
  30. style="width: 100%;"
  31. @keyup.enter.native="getTableData(1)"
  32. ></el-input>
  33. </el-form-item>
  34. </el-col>
  35. </el-row>
  36. <el-row>
  37. <el-col :span="12">
  38. <el-form-item label="签收时间">
  39. <el-date-picker
  40. type="datetimerange"
  41. v-model="filterForm.data.signtime"
  42. placeholder=""
  43. style="width: 100%;"
  44. value-format="yyyy-MM-dd HH:mm:ss"
  45. format="yyyy-MM-dd HH:mm:ss"
  46. ></el-date-picker>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="12">
  50. <el-form-item label="用户名称">
  51. <el-input clearable
  52. v-model="filterForm.data.manname"
  53. placeholder=""
  54. style="width: 100%;"
  55. @keyup.enter.native="getTableData(1)"
  56. ></el-input>
  57. </el-form-item>
  58. </el-col>
  59. </el-row>
  60. <el-row>
  61. <el-col :span="12">
  62. <el-form-item label="实际执行时间">
  63. <el-date-picker
  64. type="datetimerange"
  65. v-model="filterForm.data.executivetime"
  66. placeholder=""
  67. style="width: 100%;"
  68. value-format="yyyy-MM-dd HH:mm:ss"
  69. format="yyyy-MM-dd HH:mm:ss"
  70. ></el-date-picker>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="12">
  74. <el-form-item label="变电所(室)">
  75. <el-input clearable
  76. v-model="filterForm.data.changeelectricroom"
  77. placeholder=""
  78. style="width: 100%;"
  79. @keyup.enter.native="getTableData(1)"
  80. ></el-input>
  81. </el-form-item>
  82. </el-col>
  83. </el-row>
  84. <el-row>
  85. <el-col :span="12">
  86. <el-form-item label="停役持续开始时间">
  87. <el-date-picker
  88. type="datetimerange"
  89. v-model="filterForm.data.starttime"
  90. placeholder=""
  91. style="width: 100%;"
  92. value-format="yyyy-MM-dd HH:mm:ss"
  93. format="yyyy-MM-dd HH:mm:ss"
  94. ></el-date-picker>
  95. </el-form-item>
  96. </el-col>
  97. <el-col :span="12">
  98. <el-form-item label="线路(设备)">
  99. <el-input clearable
  100. v-model="filterForm.data.lineequip"
  101. placeholder=""
  102. style="width: 100%;"
  103. @keyup.enter.native="getTableData(1)"
  104. ></el-input>
  105. </el-form-item>
  106. </el-col>
  107. </el-row>
  108. <el-row>
  109. <el-col :span="12">
  110. <el-form-item label="停电工作开始时间">
  111. <el-date-picker
  112. type="datetimerange"
  113. v-model="filterForm.data.tdstarttime"
  114. placeholder=""
  115. style="width: 100%;"
  116. value-format="yyyy-MM-dd HH:mm:ss"
  117. format="yyyy-MM-dd HH:mm:ss"
  118. ></el-date-picker>
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="6">
  122. <el-form-item label="单据状态">
  123. <el-select
  124. filterable clearable
  125. v-model="filterForm.data.billstatus"
  126. placeholder=""
  127. style="width: 100%;"
  128. disabled
  129. >
  130. <el-option
  131. v-for="item of nameObj.billstatus.arr"
  132. :key="item.id"
  133. :value="item.id"
  134. :label="item.name"
  135. ></el-option>
  136. </el-select>
  137. </el-form-item>
  138. </el-col>
  139. <!-- <el-col :span="6">
  140. <el-form-item label="操作状态">
  141. <el-select
  142. filterable clearable
  143. v-model="filterForm.data.operatestatus"
  144. placeholder=""
  145. style="width: 100%;"
  146. >
  147. <el-option
  148. v-for="item of nameObj.operatestatus.arr"
  149. :key="item.id"
  150. :value="item.id"
  151. :label="item.name"
  152. ></el-option>
  153. </el-select>
  154. </el-form-item>
  155. </el-col> -->
  156. </el-row>
  157. </el-form>
  158. <div class="box-top-gjl">
  159. <div style="float:right; text-align: right;">
  160. <el-button
  161. class="button"
  162. type="primary"
  163. size="mini"
  164. icon="el-icon-search"
  165. v-privilege="activeMenu + 'QUERY'"
  166. @click="getTableData(1)"
  167. >查询</el-button>
  168. <el-button
  169. class="button"
  170. type="primary"
  171. size="mini"
  172. icon="el-icon-refresh"
  173. v-privilege="activeMenu + 'QUERY'"
  174. @click="tableDataCancel();"
  175. >重置</el-button>
  176. <el-button
  177. size="mini"
  178. :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
  179. :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
  180. @click="filterForm.show = !filterForm.show;
  181. $nextTick(() => {
  182. singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
  183. }
  184. );"
  185. >{{ filterForm.show ? '收起' : '展开' }}</el-button>
  186. </div>
  187. </div>
  188. </div>
  189. <div class="box-bottom">
  190. <el-table stripe
  191. id="singleTable"
  192. ref="singleTable"
  193. :data="tableData"
  194. v-loading="tableLoading"
  195. style="width: 100%;"
  196. :height="singleTableHeight"
  197. border
  198. size="mini"
  199. highlight-current-row
  200. >
  201. <el-table-column
  202. sortable
  203. prop="billsno"
  204. label="运方单编号"
  205. min-width="100px"
  206. :show-overflow-tooltip="true"
  207. ></el-table-column>
  208. <el-table-column
  209. sortable
  210. prop="creattime"
  211. label="编制时间"
  212. min-width="100px"
  213. :show-overflow-tooltip="true"
  214. ></el-table-column>
  215. <el-table-column
  216. sortable
  217. prop="applyman"
  218. label="运行主管"
  219. min-width="100px"
  220. :show-overflow-tooltip="true"
  221. ></el-table-column>
  222. <el-table-column
  223. sortable
  224. prop="manname"
  225. label="用户名称"
  226. min-width="100px"
  227. :show-overflow-tooltip="true"
  228. ></el-table-column>
  229. <el-table-column
  230. sortable
  231. prop="lineequip"
  232. label="线路(设备)"
  233. min-width="100px"
  234. :show-overflow-tooltip="true"
  235. ></el-table-column>
  236. <el-table-column
  237. sortable
  238. prop="chargeman"
  239. label="工作负责人"
  240. min-width="100px"
  241. :show-overflow-tooltip="true"
  242. ></el-table-column>
  243. <el-table-column
  244. sortable
  245. prop="signman"
  246. label="签收人"
  247. min-width="100px"
  248. :show-overflow-tooltip="true"
  249. ></el-table-column>
  250. <el-table-column
  251. sortable
  252. prop="signtime"
  253. label="签收时间"
  254. min-width="100px"
  255. :show-overflow-tooltip="true"
  256. ></el-table-column>
  257. <!-- <el-table-column
  258. sortable
  259. prop="operatestatus"
  260. label="操作状态"
  261. min-width="100px"
  262. :show-overflow-tooltip="true"
  263. >
  264. <template slot-scope="scope">
  265. <span>{{ nameObj.operatestatus.obj[scope.row.operatestatus] ? nameObj.operatestatus.obj[scope.row.operatestatus] : scope.row.operatestatus }}</span>
  266. </template>
  267. </el-table-column> -->
  268. <el-table-column
  269. sortable
  270. prop="billstatus"
  271. label="单据状态"
  272. min-width="100px"
  273. :show-overflow-tooltip="true"
  274. >
  275. <template slot-scope="scope">
  276. <span>{{ nameObj.billstatus.obj[scope.row.billstatus] ? nameObj.billstatus.obj[scope.row.billstatus] : scope.row.billstatus }}</span>
  277. </template>
  278. </el-table-column>
  279. <el-table-column
  280. class-name="gn-TableDownloadExcel-none"
  281. label="操作"
  282. align="center"
  283. width="70px"
  284. fixed="right"
  285. >
  286. <template slot-scope="scope">
  287. <div>
  288. <el-button
  289. type="primary"
  290. size="mini"
  291. @click="but_edit(scope.row)"
  292. >签收</el-button>
  293. </div>
  294. </template>
  295. </el-table-column>
  296. </el-table>
  297. <el-pagination
  298. layout="total, sizes, prev, pager, next, jumper"
  299. :total="total"
  300. :page-sizes="[10, 20, 50, 100, 500, 1000]"
  301. :page-size="pageSize"
  302. :current-page.sync="pageNum"
  303. @size-change="tableSizeChange"
  304. @current-change="getTableData()"
  305. style="text-align: right;margin-top: 10px;"
  306. ></el-pagination>
  307. </div>
  308. </div>
  309. <el-dialog
  310. :title="'电力运行方式变更通知单 - 签收'"
  311. :visible.sync="dialog.editorBox.show"
  312. width="940px"
  313. :close-on-click-modal="false"
  314. :show-close="!loading"
  315. >
  316. <div>
  317. <el-form
  318. ref="dialog_form"
  319. :model="dialog.editorBox.form.data"
  320. :rules="dialog.editorBox.form.rules"
  321. size="mini"
  322. label-width="120px"
  323. >
  324. <el-row>
  325. <el-col :span="8">
  326. <el-form-item label="介质系统" prop="mediumsystem">
  327. <el-input clearable
  328. v-model="dialog.editorBox.form.data.mediumsystem"
  329. placeholder=""
  330. style="width: 100%;"
  331. disabled
  332. ></el-input>
  333. </el-form-item>
  334. </el-col>
  335. <el-col :span="8">
  336. <el-form-item label="运方单编号" prop="billsno">
  337. <el-input clearable
  338. v-model="dialog.editorBox.form.data.billsno"
  339. placeholder=""
  340. style="width: 100%;"
  341. disabled
  342. ></el-input>
  343. </el-form-item>
  344. </el-col>
  345. <el-col :span="8">
  346. <el-form-item label="编制时间" prop="creattime">
  347. <el-date-picker
  348. type="datetime"
  349. v-model="dialog.editorBox.form.data.creattime"
  350. placeholder=""
  351. style="width: 100%;"
  352. value-format="yyyy-MM-dd HH:mm:ss"
  353. disabled
  354. ></el-date-picker>
  355. </el-form-item>
  356. </el-col>
  357. </el-row>
  358. <el-row>
  359. <el-col :span="8">
  360. <el-form-item label="运行主管" prop="applyman">
  361. <el-input clearable
  362. v-model="dialog.editorBox.form.data.applyman"
  363. placeholder=""
  364. style="width: 100%;"
  365. disabled
  366. ></el-input>
  367. </el-form-item>
  368. </el-col>
  369. <el-col :span="8">
  370. <el-form-item label="用户名称" prop="manname">
  371. <el-input clearable
  372. v-model="dialog.editorBox.form.data.manname"
  373. placeholder=""
  374. style="width: 100%;"
  375. disabled
  376. ></el-input>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="8">
  380. <el-form-item label="通知日期" prop="noticetime">
  381. <el-date-picker
  382. type="datetime"
  383. v-model="dialog.editorBox.form.data.noticetime"
  384. placeholder=""
  385. style="width: 100%;"
  386. value-format="yyyy-MM-dd HH:mm:ss"
  387. disabled
  388. ></el-date-picker>
  389. </el-form-item>
  390. </el-col>
  391. </el-row>
  392. <el-row>
  393. <el-col :span="8">
  394. <el-form-item label="变电所(室)" prop="changeelectricroom">
  395. <el-input clearable
  396. v-model="dialog.editorBox.form.data.changeelectricroom"
  397. placeholder=""
  398. style="width: 100%;"
  399. disabled
  400. ></el-input>
  401. </el-form-item>
  402. </el-col>
  403. <el-col :span="8">
  404. <el-form-item label="线路(设备)" prop="lineequip">
  405. <el-input clearable
  406. v-model="dialog.editorBox.form.data.lineequip"
  407. placeholder=""
  408. style="width: 100%;"
  409. disabled
  410. ></el-input>
  411. </el-form-item>
  412. </el-col>
  413. <el-col :span="8">
  414. <el-form-item label="工作负责人" prop="chargeman">
  415. <el-input clearable
  416. v-model="dialog.editorBox.form.data.chargeman"
  417. placeholder=""
  418. style="width: 100%;"
  419. disabled
  420. ></el-input>
  421. </el-form-item>
  422. </el-col>
  423. </el-row>
  424. <el-row>
  425. <el-col :span="8">
  426. <el-form-item label="停役持续开始时间" prop="starttime">
  427. <el-date-picker
  428. type="datetime"
  429. v-model="dialog.editorBox.form.data.starttime"
  430. placeholder=""
  431. style="width: 100%;"
  432. value-format="yyyy-MM-dd HH:mm:ss"
  433. disabled
  434. ></el-date-picker>
  435. </el-form-item>
  436. </el-col>
  437. <el-col :span="8">
  438. <el-form-item label="停役持续结束时间" prop="stoptime">
  439. <el-date-picker
  440. type="datetime"
  441. v-model="dialog.editorBox.form.data.stoptime"
  442. placeholder=""
  443. style="width: 100%;"
  444. value-format="yyyy-MM-dd HH:mm:ss"
  445. disabled
  446. ></el-date-picker>
  447. </el-form-item>
  448. </el-col>
  449. <el-col :span="8">
  450. <el-form-item label="联系电话" prop="chargetel">
  451. <el-input clearable
  452. v-model="dialog.editorBox.form.data.chargetel"
  453. placeholder=""
  454. style="width: 100%;"
  455. disabled
  456. ></el-input>
  457. </el-form-item>
  458. </el-col>
  459. </el-row>
  460. <el-row>
  461. <el-col :span="8">
  462. <el-form-item label="停电工作开始时间" prop="tdstarttime">
  463. <el-date-picker
  464. type="datetime"
  465. v-model="dialog.editorBox.form.data.tdstarttime"
  466. placeholder=""
  467. style="width: 100%;"
  468. value-format="yyyy-MM-dd HH:mm:ss"
  469. disabled
  470. ></el-date-picker>
  471. </el-form-item>
  472. </el-col>
  473. <el-col :span="8">
  474. <el-form-item label="停电工作结束时间" prop="tdstoptime">
  475. <el-date-picker
  476. type="datetime"
  477. v-model="dialog.editorBox.form.data.tdstoptime"
  478. placeholder=""
  479. style="width: 100%;"
  480. value-format="yyyy-MM-dd HH:mm:ss"
  481. disabled
  482. ></el-date-picker>
  483. </el-form-item>
  484. </el-col>
  485. </el-row>
  486. <el-container>
  487. <el-main style="padding: 0;">
  488. <el-form-item label="工作内容" prop="workcontent">
  489. <el-input clearable
  490. class="nr-textarea"
  491. type="textarea"
  492. v-model="dialog.editorBox.form.data.workcontent"
  493. placeholder=""
  494. style="width: 100%;"
  495. disabled
  496. ></el-input>
  497. </el-form-item>
  498. </el-main>
  499. <el-aside
  500. width="200px"
  501. style="padding-left: 15px;"
  502. >
  503. <zj-fileUploadBox class="fileUploadBox" :uploadBut="false" :files="dialog.editorBox.files"></zj-fileUploadBox>
  504. </el-aside>
  505. </el-container>
  506. <el-form-item label="运行方式" prop="runway">
  507. <el-input clearable
  508. type="textarea"
  509. v-model="dialog.editorBox.form.data.runway"
  510. placeholder=""
  511. style="width: 100%;"
  512. disabled
  513. ></el-input>
  514. </el-form-item>
  515. <el-form-item label="注意事项" prop="attention">
  516. <el-input clearable
  517. type="textarea"
  518. v-model="dialog.editorBox.form.data.attention"
  519. placeholder=""
  520. style="width: 100%;"
  521. disabled
  522. ></el-input>
  523. </el-form-item>
  524. <el-form-item label="工作内容修改" prop="contentchange">
  525. <el-input clearable
  526. type="textarea"
  527. v-model="dialog.editorBox.form.data.contentchange"
  528. placeholder=""
  529. style="width: 100%;"
  530. disabled
  531. ></el-input>
  532. </el-form-item>
  533. <el-row>
  534. <el-col :span="16">
  535. <el-form-item label="签收人" prop="signman">
  536. <el-input clearable
  537. v-model="dialog.editorBox.form.data.signman"
  538. placeholder=""
  539. style="width: 100%;"
  540. ></el-input>
  541. </el-form-item>
  542. </el-col>
  543. <el-col :span="8">
  544. <el-form-item label="签收时间" prop="signtime">
  545. <el-date-picker
  546. type="datetime"
  547. v-model="dialog.editorBox.form.data.signtime"
  548. placeholder=""
  549. style="width: 100%;"
  550. value-format="yyyy-MM-dd HH:mm:ss"
  551. ></el-date-picker>
  552. </el-form-item>
  553. </el-col>
  554. </el-row>
  555. <el-form-item label="执行情况" prop="executivesituation">
  556. <el-input clearable
  557. type="textarea"
  558. v-model="dialog.editorBox.form.data.executivesituation"
  559. placeholder=""
  560. style="width: 100%;"
  561. disabled
  562. ></el-input>
  563. </el-form-item>
  564. <el-form-item label="备注" prop="note">
  565. <el-input clearable
  566. type="textarea"
  567. v-model="dialog.editorBox.form.data.note"
  568. placeholder=""
  569. style="width: 100%;"
  570. disabled
  571. ></el-input>
  572. </el-form-item>
  573. <el-row>
  574. <el-col :span="16">
  575. <el-form-item label="执行负责人" prop="executivechargeman">
  576. <el-input clearable
  577. v-model="dialog.editorBox.form.data.executivechargeman"
  578. placeholder=""
  579. style="width: 100%;"
  580. disabled
  581. ></el-input>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="8">
  585. <el-form-item label="实际执行时间" prop="executivetime">
  586. <el-date-picker
  587. type="datetime"
  588. v-model="dialog.editorBox.form.data.executivetime"
  589. placeholder=""
  590. style="width: 100%;"
  591. value-format="yyyy-MM-dd HH:mm:ss"
  592. disabled
  593. ></el-date-picker>
  594. </el-form-item>
  595. </el-col>
  596. </el-row>
  597. </el-form>
  598. </div>
  599. <span
  600. slot="footer"
  601. class="dialog-footer"
  602. >
  603. <el-button
  604. type="danger"
  605. @click="dropBut()"
  606. >废 弃</el-button>
  607. <el-button
  608. type="danger"
  609. @click="createBut()"
  610. >返回编制人</el-button>
  611. <el-button @click="dialog.editorBox.show = false" :loading="loading">取 消</el-button>
  612. <el-button
  613. type="primary"
  614. @click="dataSave()"
  615. >暂 存</el-button>
  616. <el-button
  617. type="primary"
  618. @click="submitBut()"
  619. >提 交</el-button>
  620. </span>
  621. </el-dialog>
  622. </div>
  623. </template>
  624. <script>
  625. import fileUploadBox from '~/components/zg/fileUploadBox.vue';
  626. import { formatDate } from '@/utils/util.js';
  627. import store from '@/store/index.js';
  628. export default {
  629. name: 'EODSignFor',
  630. components: {
  631. 'zj-fileUploadBox': fileUploadBox
  632. },
  633. data () {
  634. return {
  635. store,
  636. userInfo: {
  637. data: null
  638. },
  639. activeMenu: '',
  640. filterForm: {
  641. show: true,
  642. data: {
  643. creattime: '',
  644. applyman: '',
  645. signtime: '',
  646. manname: '',
  647. executivetime: '',
  648. changeelectricroom: '',
  649. starttime: '',
  650. lineequip: '',
  651. tdstarttime: '',
  652. billstatus: 'sign'
  653. // operatestatus: ''
  654. },
  655. rules: {
  656. }
  657. },
  658. pageNum: 1,
  659. pageSize: 20,
  660. total: 0,
  661. singleTableHeight: 100,
  662. tableData: [
  663. // {
  664. // billsno: 'TFY_20190826_0001',
  665. // creattime: '2019-08-26 15:03:56',
  666. // applyman: 'admin',
  667. // manname: '111',
  668. // lineequip: 'cs',
  669. // chargeman: '222',
  670. // operatestatus: '暂存',
  671. // billstatus: '编制'
  672. // }
  673. ],
  674. nameObj: {
  675. // operatestatus: {
  676. // obj: {
  677. // 'save': '暂存'
  678. // },
  679. // arr: [
  680. // {
  681. // id: 'save',
  682. // name: '暂存'
  683. // }
  684. // ]
  685. // },
  686. billstatus: {
  687. obj: {
  688. '': '全部',
  689. 'create': '编制',
  690. 'sign': '待签收',
  691. 'execute': '待执行',
  692. 'executed': '结束',
  693. 'drop': '报废'
  694. },
  695. arr: [
  696. {
  697. id: '',
  698. name: '全部'
  699. },
  700. {
  701. id: 'create',
  702. name: '编制'
  703. },
  704. {
  705. id: 'sign',
  706. name: '待签收'
  707. },
  708. {
  709. id: 'execute',
  710. name: '待执行'
  711. },
  712. {
  713. id: 'executed',
  714. name: '结束'
  715. },
  716. {
  717. id: 'drop',
  718. name: '报废'
  719. }
  720. ]
  721. }
  722. },
  723. loading: false,
  724. tableLoading: false,
  725. dialog: {
  726. editorBox: {
  727. show: false,
  728. type: '',
  729. form: {
  730. data: {
  731. mediumsystem: '电力',
  732. billsno: '',
  733. creattime: '',
  734. applyman: '',
  735. manname: '',
  736. noticetime: '',
  737. changeelectricroom: '',
  738. lineequip: '',
  739. chargeman: '',
  740. starttime: '',
  741. stoptime: '',
  742. chargetel: '',
  743. tdstarttime: '',
  744. tdstoptime: '',
  745. workcontent: '',
  746. runway: '',
  747. attention: '',
  748. contentchange: '',
  749. signman: '',
  750. signtime: '',
  751. executivesituation: '',
  752. note: '',
  753. executivechargeman: '',
  754. executivetime: '',
  755. billstatus: '',
  756. content: '' // 上传文件名
  757. },
  758. rules: {
  759. signman: [
  760. { required: true, message: '该项不能为空', trigger: 'change' }
  761. ],
  762. signtime: [
  763. { required: true, message: '该项不能为空', trigger: 'change' }
  764. ]
  765. }
  766. },
  767. // content
  768. files: [
  769. // {
  770. // name: '测试',
  771. // url: '',
  772. // file: null,
  773. // operation: '' // add or del
  774. // }
  775. ]
  776. }
  777. }
  778. };
  779. },
  780. created () {
  781. this.activeMenu = window.localStorage.getItem('activeMenu');
  782. },
  783. mounted () {
  784. let that = this;
  785. window.PEDataObj = {
  786. // 将数据绑定到window上,供main页面使用
  787. vm: that,
  788. // tableArr:用于导出成Excel的表格的信息
  789. tableArr: [
  790. {
  791. name: '',
  792. id: 'singleTable'
  793. }
  794. ]
  795. };
  796. that.$nextTick(() => {
  797. // 立即获取的height有一定偏差,通过setTimeout延迟来解决
  798. setTimeout(() => {
  799. that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
  800. }, 1);
  801. });
  802. that.store.dispatch('getUserInfo').then((res) => {
  803. that.userInfo.data = res.data;
  804. });
  805. that.getTableData();
  806. },
  807. methods: {
  808. // 计算树区域高度
  809. getRoleHeight (dom) {
  810. return window.innerHeight - dom.offsetTop;
  811. },
  812. // 获取表格中的数据
  813. getTableData (pageNum) {
  814. let that = this,
  815. params = {
  816. creattime: that.filterForm.data.creattime[0],
  817. creattimee: that.filterForm.data.creattime[1],
  818. applyman: that.filterForm.data.applyman,
  819. signtime: that.filterForm.data.signtime[0],
  820. sigtimee: that.filterForm.data.signtime[1],
  821. manname: that.filterForm.data.manname,
  822. executivetime: that.filterForm.data.executivetime[0],
  823. executivetimee: that.filterForm.data.executivetime[1],
  824. changeelectricroom: that.filterForm.data.changeelectricroom,
  825. starttime: that.filterForm.data.starttime[0],
  826. starttimee: that.filterForm.data.starttime[1],
  827. lineequip: that.filterForm.data.lineequip,
  828. tdstarttime: that.filterForm.data.tdstarttime[0],
  829. tdstarttimee: that.filterForm.data.tdstarttime[1],
  830. billstatus: that.filterForm.data.billstatus
  831. // operatestatus: that.filterForm.data.operatestatus
  832. };
  833. that.pageNum = pageNum || that.pageNum;
  834. that.tableLoading = true;
  835. let url = 'pass/ems/v1/tcm0365s/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
  836. that.axios.get(url, {
  837. params: params
  838. })
  839. .then(function (res) {
  840. if (res.code === '0') {
  841. let arr = [];
  842. for (let item of res.data.list) {
  843. arr.push({
  844. mediumsystem: item.mediumsystem,
  845. billsno: item.billsno,
  846. creattime: item.creattime,
  847. applyman: item.applyman,
  848. manname: item.manname,
  849. noticetime: item.noticetime,
  850. changeelectricroom: item.changeelectricroom,
  851. lineequip: item.lineequip,
  852. chargeman: item.chargeman,
  853. starttime: item.starttime,
  854. stoptime: item.stoptime,
  855. chargetel: item.chargetel,
  856. tdstarttime: item.tdstarttime,
  857. tdstoptime: item.tdstoptime,
  858. workcontent: item.workcontent,
  859. runway: item.runway,
  860. attention: item.attention,
  861. contentchange: item.contentchange,
  862. signman: item.signman,
  863. signtime: item.signtime,
  864. executivesituation: item.executivesituation,
  865. note: item.note,
  866. executivechargeman: item.executivechargeman,
  867. executivetime: item.executivetime,
  868. // operatestatus: item.operatestatus,
  869. billstatus: item.billstatus,
  870. content: item.content // 上传文件名
  871. })
  872. }
  873. that.tableData = arr;
  874. that.total = res.data.total;
  875. } else {
  876. that.$message.error(res.message);
  877. }
  878. that.tableLoading = false;
  879. }).catch(function () {
  880. that.tableLoading = false;
  881. });
  882. },
  883. // 改变表格显示条数
  884. tableSizeChange (val) {
  885. let that = this;
  886. that.pageSize = val;
  887. that.getTableData(1);
  888. },
  889. // 重置搜索
  890. tableDataCancel () {
  891. let that = this;
  892. for (let key in that.filterForm.data) {
  893. if (that.filterForm.data[key] instanceof Array) {
  894. that.filterForm.data[key] = [];
  895. } else {
  896. that.filterForm.data[key] = '';
  897. }
  898. }
  899. that.filterForm.data.billstatus = 'sign';
  900. that.getTableData(1);
  901. },
  902. but_edit (row) {
  903. let that = this;
  904. that.dialog.editorBox.files = [];
  905. for (let key in that.dialog.editorBox.form.data) {
  906. if (typeof row[key] !== 'undefined') {
  907. that.dialog.editorBox.form.data[key] = row[key];
  908. } else {
  909. console.log(key);
  910. }
  911. }
  912. if (row.content) {
  913. let fn = (row.content + '').trim().split(';')
  914. if (fn && fn.length > 0) {
  915. let billsno = row.billsno;
  916. for (let i = 0; i < fn.length; i++) {
  917. if (fn[i]) {
  918. let fname = {name: fn[i], url: '/icore.icp.web/pass/ems/static/' + billsno + '/' + fn[i], file: null, operation: ''};
  919. that.dialog.editorBox.files.push(fname);
  920. }
  921. }
  922. }
  923. }
  924. that.dialog.editorBox.form.data.signman = that.dialog.editorBox.form.data.signman ? that.dialog.editorBox.form.data.signman : that.userInfo.data.userName;
  925. that.dialog.editorBox.form.data.signtime = that.dialog.editorBox.form.data.signtime ? that.dialog.editorBox.form.data.signtime : formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss');
  926. that.dialog.editorBox.type = 'edit';
  927. that.dialog.editorBox.show = true;
  928. },
  929. createBut () {
  930. let that = this;
  931. that.$confirm('是否返回给编制人?', '提示', {
  932. confirmButtonText: '确定',
  933. cancelButtonText: '取消',
  934. type: 'warning'
  935. }).then(() => {
  936. that.dataSave('create');
  937. }).catch(() => {
  938. });
  939. },
  940. dropBut () {
  941. let that = this;
  942. that.$confirm('是否废弃?', '提示', {
  943. confirmButtonText: '确定',
  944. cancelButtonText: '取消',
  945. type: 'warning'
  946. }).then(() => {
  947. that.dataSave('drop');
  948. }).catch(() => {
  949. });
  950. },
  951. submitBut () {
  952. let that = this;
  953. that.$confirm('是否提交?', '提示', {
  954. confirmButtonText: '确定',
  955. cancelButtonText: '取消',
  956. type: 'warning'
  957. }).then(() => {
  958. that.dataSave('submit');
  959. }).catch(() => {
  960. });
  961. },
  962. dataSave (billstatus) {
  963. let that = this;
  964. let SubmitData = {
  965. mediumsystem: that.dialog.editorBox.form.data.mediumsystem,
  966. billsno: that.dialog.editorBox.form.data.billsno,
  967. creattime: that.dialog.editorBox.form.data.creattime,
  968. applyman: that.dialog.editorBox.form.data.applyman,
  969. manname: that.dialog.editorBox.form.data.manname,
  970. noticetime: that.dialog.editorBox.form.data.noticetime,
  971. changeelectricroom: that.dialog.editorBox.form.data.changeelectricroom,
  972. lineequip: that.dialog.editorBox.form.data.lineequip,
  973. chargeman: that.dialog.editorBox.form.data.chargeman,
  974. starttime: that.dialog.editorBox.form.data.starttime,
  975. stoptime: that.dialog.editorBox.form.data.stoptime,
  976. chargetel: that.dialog.editorBox.form.data.chargetel,
  977. tdstarttime: that.dialog.editorBox.form.data.tdstarttime,
  978. tdstoptime: that.dialog.editorBox.form.data.tdstoptime,
  979. workcontent: that.dialog.editorBox.form.data.workcontent,
  980. runway: that.dialog.editorBox.form.data.runway,
  981. attention: that.dialog.editorBox.form.data.attention,
  982. contentchange: that.dialog.editorBox.form.data.contentchange,
  983. signman: that.dialog.editorBox.form.data.signman,
  984. signtime: that.dialog.editorBox.form.data.signtime,
  985. executivesituation: that.dialog.editorBox.form.data.executivesituation,
  986. note: that.dialog.editorBox.form.data.note,
  987. executivechargeman: that.dialog.editorBox.form.data.executivechargeman,
  988. executivetime: that.dialog.editorBox.form.data.executivetime,
  989. content: that.dialog.editorBox.form.data.content // 上传文件名
  990. };
  991. // content: that.dialog.editorBox.files 上传文件
  992. let message = '保存成功';
  993. if (billstatus) {
  994. SubmitData.billstatus = billstatus;
  995. message = '操作成功';
  996. }
  997. that.$refs['dialog_form'].validate((valid) => {
  998. if (valid) {
  999. that.loading = true;
  1000. let url = 'pass/ems/v1/tcm0365s/';
  1001. if (billstatus === 'submit') {
  1002. SubmitData.billstatus = that.dialog.editorBox.form.data.billstatus;
  1003. message = '提交成功';
  1004. url = 'pass/ems/v1/tcm0365s/submit/';
  1005. }
  1006. let fileData = new FormData();
  1007. for (let key in SubmitData) {
  1008. fileData.append(key, SubmitData[key] ? SubmitData[key] : '');
  1009. }
  1010. that.axios.put(url, fileData, {headers: {'Content-Type': 'multipart/form-data'}})
  1011. .then(function (res) {
  1012. if (res.code === '0') {
  1013. that.$message({
  1014. message: message,
  1015. type: 'success'
  1016. });
  1017. that.getTableData();
  1018. that.dialog.editorBox.show = false;
  1019. } else {
  1020. that.$message.error(res.message);
  1021. }
  1022. that.loading = false;
  1023. }).catch(function () {
  1024. that.loading = false;
  1025. });
  1026. }
  1027. });
  1028. }
  1029. }
  1030. }
  1031. </script>
  1032. <style lang="less">
  1033. .EODSignFor {
  1034. min-width: 700px;
  1035. height: 100%;
  1036. .box {
  1037. height: 100%;
  1038. padding: 15px 15px 0 15px;
  1039. .box-top {
  1040. .el-form-item {
  1041. margin-bottom: 7px;
  1042. }
  1043. .box-top-gjl {
  1044. overflow: hidden;
  1045. padding: 7px 0;
  1046. border-top: 1px solid #ccc;
  1047. }
  1048. }
  1049. }
  1050. .nr-textarea {
  1051. .el-textarea__inner {
  1052. min-height: 130px !important;
  1053. }
  1054. }
  1055. .fileUploadBox {
  1056. height: 130px;
  1057. min-height: 130px !important;
  1058. margin-bottom: 18px;
  1059. }
  1060. }
  1061. </style>