index.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230
  1. <template>
  2. <div class="inform">
  3. <el-card class="box-card" style="width: 1612px; height: 950px">
  4. <div slot="header" class="clearfix">
  5. <div class="inform-title">订单管理</div>
  6. </div>
  7. <div class="inform-body">
  8. <div class="order-top">
  9. <el-input
  10. placeholder="请输入内容"
  11. style="width: 261px"
  12. v-model="value"
  13. >
  14. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  15. </el-input>
  16. <el-button @click="inquire">查询</el-button>
  17. <div class="paydate">
  18. <span class="demonstration">支付时间</span>
  19. <el-date-picker
  20. v-model="payTime"
  21. format="yyyy-MM-dd"
  22. value-format="yyyy-MM-dd"
  23. @change="timePay"
  24. :unlink-panels="true"
  25. type="daterange"
  26. :clearable="false"
  27. range-separator="至"
  28. start-placeholder="开始日期"
  29. end-placeholder="结束日期"
  30. >
  31. </el-date-picker>
  32. </div>
  33. <div class="paydate">
  34. <span class="demonstration">创建时间</span>
  35. <el-date-picker
  36. v-model="creationTime"
  37. format="yyyy-MM-dd"
  38. value-format="yyyy-MM-dd"
  39. @change="timeCreation"
  40. :unlink-panels="true"
  41. :clearable="false"
  42. type="daterange"
  43. range-separator="至"
  44. start-placeholder="开始日期"
  45. end-placeholder="结束日期"
  46. >
  47. </el-date-picker>
  48. </div>
  49. <div class="state">
  50. <span>状态</span>
  51. <el-select v-model="state" placeholder="请选择" @change="stateSel">
  52. <el-option
  53. v-for="item in options"
  54. :key="item.value"
  55. :value="item.value"
  56. :label="item.label"
  57. >
  58. </el-option>
  59. </el-select>
  60. </div>
  61. <div class="export" @click="exportExcel">导出订单</div>
  62. </div>
  63. <div class="inform-table">
  64. <el-table
  65. :data="data"
  66. @selection-change="handleSelectionChange"
  67. max-height="576"
  68. height="576"
  69. style="width: 1550px"
  70. stripe
  71. class="Devicetable"
  72. :cell-style="rowbg"
  73. :header-cell-style="{
  74. color: ' rgba(0, 0, 0, 1)',
  75. background: 'rgba(240, 243, 247, 1)',
  76. }"
  77. >
  78. <el-table-column
  79. type="selection"
  80. width="60"
  81. align="center"
  82. ></el-table-column>
  83. <el-table-column
  84. prop="orderNum"
  85. width="120"
  86. label="订单号"
  87. align="center"
  88. >
  89. </el-table-column>
  90. <el-table-column
  91. prop="state"
  92. width="100"
  93. align="center"
  94. label="状态"
  95. >
  96. </el-table-column>
  97. <el-table-column
  98. prop="room"
  99. width="160"
  100. align="center"
  101. label="房间"
  102. >
  103. </el-table-column>
  104. <el-table-column
  105. prop="electricity"
  106. align="center"
  107. width="130"
  108. label="电费(元)"
  109. >
  110. </el-table-column>
  111. <el-table-column
  112. prop="water"
  113. width="130"
  114. align="center"
  115. label="水费(元)"
  116. >
  117. </el-table-column>
  118. <el-table-column
  119. prop="imprest"
  120. align="center"
  121. width="150"
  122. label="收预付款(元)"
  123. >
  124. </el-table-column>
  125. <el-table-column
  126. prop="refund"
  127. width="150"
  128. align="center"
  129. label="退预付款(元)"
  130. >
  131. </el-table-column>
  132. <el-table-column
  133. prop="create"
  134. width="180"
  135. align="center"
  136. label="创建时间"
  137. >
  138. </el-table-column>
  139. <el-table-column
  140. prop="pay"
  141. width="180"
  142. align="center"
  143. label="支付时间"
  144. >
  145. </el-table-column>
  146. <el-table-column prop="address" align="center" label="操作">
  147. <template slot-scope="scope">
  148. <span
  149. @click="handleEdit(scope.$index, scope.row)"
  150. class="operate"
  151. >
  152. 详情
  153. </span>
  154. <el-dialog
  155. title="订单详情"
  156. :visible.sync="dialogVisible"
  157. width="30%"
  158. :before-close="handleClose"
  159. >
  160. <div class="userinfo">用户信息</div>
  161. <div class="info">
  162. <div class="user">
  163. <div class="name">姓名</div>
  164. <el-input value="刘老师"></el-input>
  165. </div>
  166. <div class="user">
  167. <div class="name">联系方式</div>
  168. <el-input value="13234564"></el-input>
  169. </div>
  170. </div>
  171. <div class="info">
  172. <div class="user">
  173. <div class="name">订单号</div>
  174. <el-input value="261691612"></el-input>
  175. </div>
  176. <div class="user">
  177. <div class="name">预付款金额(元)</div>
  178. <el-input value="20.00"></el-input>
  179. </div>
  180. </div>
  181. <div class="info">
  182. <div class="user">
  183. <div class="name">入住时间</div>
  184. <el-input value="2022-07-26"></el-input>
  185. </div>
  186. <div class="user">
  187. <div class="name">离住时间</div>
  188. <el-input value="2022-07-26"></el-input>
  189. </div>
  190. </div>
  191. <div class="info">
  192. <div class="user">
  193. <div class="name">入住天数</div>
  194. <el-input value="1"></el-input>
  195. </div>
  196. <div class="user">
  197. <div class="name">支付时间</div>
  198. <el-input value="2022-07-27 15:15:15"></el-input>
  199. </div>
  200. </div>
  201. <div class="rate">水费明细</div>
  202. <div class="water">
  203. 表计:101 楼层:12栋1单元2层01 抄表时间:2022-07-27 15:15:15
  204. </div>
  205. <el-table
  206. :data="waterTable"
  207. max-height="93"
  208. style="width: 832px"
  209. stripe
  210. :cell-style="rowbg"
  211. :header-cell-style="{
  212. color: ' rgba(0, 0, 0, 1)',
  213. background: 'rgba(240, 243, 247, 1)',
  214. }"
  215. >
  216. <el-table-column
  217. prop="start"
  218. width="100"
  219. label="始码"
  220. align="center"
  221. >
  222. </el-table-column>
  223. <el-table-column
  224. prop="end"
  225. width="100"
  226. align="center"
  227. label="终码"
  228. >
  229. </el-table-column>
  230. <el-table-column
  231. prop="flow"
  232. align="center"
  233. label="水量(吨)"
  234. >
  235. </el-table-column>
  236. <el-table-column
  237. prop="pirce"
  238. align="center"
  239. label="水价(元)"
  240. >
  241. </el-table-column>
  242. <el-table-column
  243. prop="subsidy"
  244. align="center"
  245. label="补助量(吨)"
  246. >
  247. </el-table-column>
  248. <el-table-column
  249. prop="production"
  250. align="center"
  251. label="产生水费(元)"
  252. >
  253. </el-table-column>
  254. </el-table>
  255. <div class="rate">电费明细</div>
  256. <div class="water">
  257. 表计:101 楼层:12栋1单元2层01 抄表时间:2022-07-27 15:15:15
  258. </div>
  259. <el-table
  260. :data="waterTable"
  261. max-height="93"
  262. style="width: 832px"
  263. stripe
  264. :cell-style="rowbg"
  265. :header-cell-style="{
  266. color: ' rgba(0, 0, 0, 1)',
  267. background: 'rgba(240, 243, 247, 1)',
  268. }"
  269. >
  270. <el-table-column
  271. prop="start"
  272. width="100"
  273. label="始码"
  274. align="center"
  275. >
  276. </el-table-column>
  277. <el-table-column
  278. prop="end"
  279. width="100"
  280. align="center"
  281. label="终码"
  282. >
  283. </el-table-column>
  284. <el-table-column
  285. prop="flow"
  286. align="center"
  287. label="电量(度)"
  288. >
  289. </el-table-column>
  290. <el-table-column
  291. prop="pirce"
  292. align="center"
  293. label="电价(元)"
  294. >
  295. </el-table-column>
  296. <el-table-column
  297. prop="subsidy"
  298. align="center"
  299. label="补助量(度)"
  300. >
  301. </el-table-column>
  302. <el-table-column
  303. prop="production"
  304. align="center"
  305. label="产生水费(元)"
  306. >
  307. </el-table-column>
  308. </el-table>
  309. </el-dialog>
  310. <span
  311. @click="handleDelete(scope.$index, scope.row)"
  312. class="operate"
  313. >
  314. 删除
  315. </span>
  316. </template>
  317. </el-table-column>
  318. </el-table>
  319. <el-table
  320. :data="tableData"
  321. max-height="576"
  322. height="576"
  323. style="width: 1550px"
  324. stripe
  325. class="execlTable"
  326. :cell-style="rowbg"
  327. :header-cell-style="{
  328. color: ' rgba(0, 0, 0, 1)',
  329. background: 'rgba(240, 243, 247, 1)',
  330. }"
  331. >
  332. <el-table-column
  333. prop="orderNum"
  334. width="120"
  335. label="订单号"
  336. align="center"
  337. >
  338. </el-table-column>
  339. <el-table-column
  340. prop="state"
  341. width="100"
  342. align="center"
  343. label="状态"
  344. >
  345. </el-table-column>
  346. <el-table-column
  347. prop="room"
  348. width="160"
  349. align="center"
  350. label="房间"
  351. >
  352. </el-table-column>
  353. <el-table-column
  354. prop="electricity"
  355. align="center"
  356. width="130"
  357. label="电费(元)"
  358. >
  359. </el-table-column>
  360. <el-table-column
  361. prop="water"
  362. width="130"
  363. align="center"
  364. label="水费(元)"
  365. >
  366. </el-table-column>
  367. <el-table-column
  368. prop="imprest"
  369. align="center"
  370. width="150"
  371. label="收预付款(元)"
  372. >
  373. </el-table-column>
  374. <el-table-column
  375. prop="refund"
  376. width="150"
  377. align="center"
  378. label="退预付款(元)"
  379. >
  380. </el-table-column>
  381. <el-table-column
  382. prop="create"
  383. width="180"
  384. align="center"
  385. label="创建时间"
  386. >
  387. </el-table-column>
  388. <el-table-column
  389. prop="pay"
  390. width="180"
  391. align="center"
  392. label="支付时间"
  393. >
  394. </el-table-column>
  395. </el-table>
  396. <el-table
  397. :data="selectionTable"
  398. max-height="576"
  399. height="576"
  400. style="width: 1550px"
  401. stripe
  402. class="selectTable"
  403. :cell-style="rowbg"
  404. :header-cell-style="{
  405. color: ' rgba(0, 0, 0, 1)',
  406. background: 'rgba(240, 243, 247, 1)',
  407. }"
  408. >
  409. <el-table-column
  410. prop="orderNum"
  411. width="120"
  412. label="订单号"
  413. align="center"
  414. >
  415. </el-table-column>
  416. <el-table-column
  417. prop="state"
  418. width="100"
  419. align="center"
  420. label="状态"
  421. >
  422. </el-table-column>
  423. <el-table-column
  424. prop="room"
  425. width="160"
  426. align="center"
  427. label="房间"
  428. >
  429. </el-table-column>
  430. <el-table-column
  431. prop="electricity"
  432. align="center"
  433. width="130"
  434. label="电费(元)"
  435. >
  436. </el-table-column>
  437. <el-table-column
  438. prop="water"
  439. width="130"
  440. align="center"
  441. label="水费(元)"
  442. >
  443. </el-table-column>
  444. <el-table-column
  445. prop="imprest"
  446. align="center"
  447. width="150"
  448. label="收预付款(元)"
  449. >
  450. </el-table-column>
  451. <el-table-column
  452. prop="refund"
  453. width="150"
  454. align="center"
  455. label="退预付款(元)"
  456. >
  457. </el-table-column>
  458. <el-table-column
  459. prop="create"
  460. width="180"
  461. align="center"
  462. label="创建时间"
  463. >
  464. </el-table-column>
  465. <el-table-column
  466. prop="pay"
  467. width="180"
  468. align="center"
  469. label="支付时间"
  470. >
  471. </el-table-column>
  472. </el-table>
  473. </div>
  474. <div class="block">
  475. <el-pagination
  476. background
  477. @current-change="handleCurrentChange"
  478. current-page.sync="1"
  479. :page-size="8"
  480. :current-page="currentPage"
  481. layout="prev, pager, next, jumper"
  482. :total="tableData.length"
  483. >
  484. </el-pagination>
  485. </div>
  486. </div>
  487. </el-card>
  488. </div>
  489. </template>
  490. <script>
  491. import FileSaver from "file-saver";
  492. import * as XLSX from "xlsx";
  493. export default {
  494. name: "Inform",
  495. data() {
  496. return {
  497. // 当前页显示的数据
  498. data: [],
  499. // 总数据
  500. Tdata: [],
  501. // 查询出来的总数据
  502. inquireTable: [],
  503. // 显示的总数据
  504. tableData: [
  505. {
  506. orderNum: "116161656",
  507. state: "已入住",
  508. room: "17栋1单元2层04房",
  509. electricity: "2.09",
  510. water: "0.00",
  511. imprest: "20.00",
  512. refund: "20.00",
  513. create: "2013.07.02 08:50:50",
  514. pay: "2013.07.02 08:50:50",
  515. },
  516. {
  517. orderNum: "116161656",
  518. state: "空房",
  519. room: "17栋1单元2层04房",
  520. electricity: "2.09",
  521. water: "0.00",
  522. imprest: "20.00",
  523. refund: "20.00",
  524. create: "2014.07.02 08:50:50",
  525. pay: "2014.07.02 08:50:50",
  526. },
  527. {
  528. orderNum: "116161656",
  529. state: "空房",
  530. room: "17栋1单元2层04房",
  531. electricity: "2.09",
  532. water: "0.00",
  533. imprest: "20.00",
  534. refund: "20.00",
  535. create: "2015.07.02 08:50:50",
  536. pay: "2015.07.02 08:50:50",
  537. },
  538. {
  539. orderNum: "116161656",
  540. state: "已锁定",
  541. room: "17栋1单元2层04房",
  542. electricity: "2.09",
  543. water: "0.00",
  544. imprest: "20.00",
  545. refund: "20.00",
  546. create: "2016.07.02 08:50:50",
  547. pay: "2016.07.02 08:50:50",
  548. },
  549. {
  550. orderNum: "116161656",
  551. state: "脏房",
  552. room: "17栋1单元2层04房",
  553. electricity: "2.09",
  554. water: "0.00",
  555. imprest: "20.00",
  556. refund: "20.00",
  557. create: "2014.07.02 08:50:50",
  558. pay: "2014.07.02 08:50:50",
  559. },
  560. {
  561. orderNum: "116161656",
  562. state: "脏房",
  563. room: "17栋1单元2层04房",
  564. electricity: "2.09",
  565. water: "0.00",
  566. imprest: "20.00",
  567. refund: "20.00",
  568. create: "2012.07.02 08:50:50",
  569. pay: "2012.07.02 08:50:50",
  570. },
  571. {
  572. orderNum: "216161656",
  573. state: "保留房",
  574. room: "17栋1单元2层04房",
  575. electricity: "2.09",
  576. water: "0.00",
  577. imprest: "20.00",
  578. refund: "20.00",
  579. create: "2021.07.02 08:50:50",
  580. pay: "2021.07.02 08:50:50",
  581. },
  582. {
  583. orderNum: "316161656",
  584. state: "空房",
  585. room: "17栋1单元2层04房",
  586. electricity: "2.09",
  587. water: "0.00",
  588. imprest: "20.00",
  589. refund: "20.00",
  590. create: "2020.07.02 08:50:50",
  591. pay: "2020.07.02 08:50:50",
  592. },
  593. {
  594. orderNum: "416161656",
  595. state: "已住",
  596. room: "17栋1单元2层04房",
  597. electricity: "2.09",
  598. water: "0.00",
  599. imprest: "20.00",
  600. refund: "20.00",
  601. create: "2019.07.02 08:50:50",
  602. pay: "2019.07.02 08:50:50",
  603. },
  604. {
  605. orderNum: "516161656",
  606. state: "已锁定",
  607. room: "17栋1单元2层04房",
  608. electricity: "2.09",
  609. water: "0.00",
  610. imprest: "20.00",
  611. refund: "20.00",
  612. create: "2012.07.02 08:50:50",
  613. pay: "2012.07.02 08:50:50",
  614. },
  615. {
  616. orderNum: "616161656",
  617. state: "已入住",
  618. room: "17栋1单元2层04房",
  619. electricity: "2.09",
  620. water: "0.00",
  621. imprest: "20.00",
  622. refund: "20.00",
  623. create: "2013.07.02 08:50:50",
  624. pay: "2013.07.02 08:50:50",
  625. },
  626. {
  627. orderNum: "716161656",
  628. state: "脏房",
  629. room: "17栋1单元2层04房",
  630. electricity: "2.09",
  631. water: "0.00",
  632. imprest: "20.00",
  633. refund: "20.00",
  634. create: "2022.07.02 08:50:50",
  635. pay: "2022.07.02 08:50:50",
  636. },
  637. {
  638. orderNum: "816161656",
  639. state: "脏房",
  640. room: "17栋1单元2层04房",
  641. electricity: "2.09",
  642. water: "0.00",
  643. imprest: "20.00",
  644. refund: "20.00",
  645. create: "2022.07.02 08:50:50",
  646. pay: "2022.07.02 08:50:50",
  647. },
  648. {
  649. orderNum: "916161656",
  650. state: "空房",
  651. room: "17栋1单元2层04房",
  652. electricity: "2.09",
  653. water: "0.00",
  654. imprest: "20.00",
  655. refund: "20.00",
  656. create: "2022.07.02 08:50:50",
  657. pay: "2022.07.02 08:50:50",
  658. },
  659. {
  660. orderNum: "106161656",
  661. state: "已锁定",
  662. room: "17栋1单元2层04房",
  663. electricity: "2.09",
  664. water: "0.00",
  665. imprest: "20.00",
  666. refund: "20.00",
  667. create: "2022.07.02 08:50:50",
  668. pay: "2022.07.02 08:50:50",
  669. },
  670. ],
  671. // 多选框按钮勾选的数据
  672. selectionTable: [],
  673. options: [
  674. {
  675. value: "已入住",
  676. label: "已入住",
  677. },
  678. {
  679. value: "已锁定",
  680. label: "已锁定",
  681. },
  682. {
  683. value: "空房",
  684. label: "空房",
  685. },
  686. {
  687. value: "脏房",
  688. label: "脏房",
  689. },
  690. {
  691. value: "保留房",
  692. label: "保留房",
  693. },
  694. ],
  695. state: "",
  696. value: "",
  697. payTime: "",
  698. creationTime: "",
  699. dialogVisible: false,
  700. waterTable: [
  701. {
  702. start: 36,
  703. end: 36,
  704. flow: 20,
  705. pirce: 2.0,
  706. subsidy: 5,
  707. production: 2,
  708. },
  709. ],
  710. currentPage: 1,
  711. };
  712. },
  713. mounted() {
  714. document.getElementsByClassName(
  715. "el-pagination__jump"
  716. )[0].childNodes[0].nodeValue = "跳转到";
  717. this.handleCurrentChange(this.currentPage);
  718. this.Tdata = this.tableData;
  719. },
  720. methods: {
  721. // 导出表格
  722. excel(id) {
  723. let xlsxParam = { raw: true };
  724. /* generate workbook object from table */
  725. let wb = XLSX.utils.table_to_book(document.querySelector(id));
  726. /* get binary string as output */
  727. let wbout = XLSX.write(wb, {
  728. bookType: "xlsx",
  729. bookSST: true,
  730. type: "array",
  731. });
  732. try {
  733. FileSaver.saveAs(
  734. new Blob([wbout], { type: "application/octet-stream" }),
  735. "订单管理.xlsx"
  736. );
  737. } catch (e) {
  738. if (typeof console !== "undefined") console.log(e, wbout);
  739. }
  740. return wbout;
  741. },
  742. exportExcel() {
  743. let selectId = ".selectTable";
  744. let execlTable = ".execlTable";
  745. if (this.selectionTable.length > 0) {
  746. this.excel(selectId);
  747. } else {
  748. this.excel(execlTable);
  749. }
  750. },
  751. allRead($event, index) {
  752. this.className = this.className.map((item) => (item = ""));
  753. this.className[index] = "active";
  754. },
  755. rowbg(row) {
  756. if (row.rowIndex % 2 != 0) {
  757. return { background: "rgba(240, 243, 247, 1)", "border-radius": "5px" };
  758. }
  759. },
  760. handleCurrentChange(val) {
  761. this.currentPage = val;
  762. if (this.tableData.length >= 8) {
  763. this.data = this.tableData.slice((val - 1) * 8, val * 8);
  764. } else {
  765. this.data = this.tableData;
  766. }
  767. // console.log(`当前页: ${val}`);
  768. },
  769. // 表格操作
  770. handleEdit(index, row) {
  771. console.log(index, row);
  772. this.dialogVisible = true;
  773. },
  774. handleDelete(index, row) {
  775. // console.log(index, row);
  776. this.$confirm("确认删除?")
  777. .then((res) => {
  778. if (res == "confirm") {
  779. let data = this.tableData.filter((item) => {
  780. return item.orderNum !== row.orderNum;
  781. });
  782. this.tableData = data;
  783. this.Tdata = this.Tdata.filter((item) => {
  784. return item.orderNum !== row.orderNum;
  785. });
  786. }
  787. // console.log(this.currentPage);
  788. if (this.data.length <= 1) {
  789. this.currentPage = this.currentPage - 1;
  790. }
  791. this.handleCurrentChange(this.currentPage);
  792. })
  793. .catch((res) => {
  794. console.log(res);
  795. });
  796. },
  797. //查询
  798. inquire() {
  799. if (this.value == false) {
  800. this.tableData = this.Tdata;
  801. this.state = "";
  802. } else {
  803. this.state = "";
  804. let quireData = this.Tdata.filter((item) => {
  805. if (item.orderNum.includes(this.value)) {
  806. return item.orderNum;
  807. }
  808. });
  809. this.inquireTable = quireData;
  810. this.tableData = quireData;
  811. }
  812. this.currentPage = 1;
  813. this.handleCurrentChange(this.currentPage);
  814. console.log(this.Tdata);
  815. console.log(this.tableData);
  816. },
  817. handleClose(done) {
  818. this.dialogVisible = false;
  819. },
  820. // 支付时间
  821. timePay() {
  822. // console.log(this.payTime);
  823. if (this.value == "") {
  824. this.state = "";
  825. let reg = new RegExp("-", "g");
  826. let startTime = new Date(this.payTime[0].replace(reg, "/"));
  827. let endTime = new Date(this.payTime[1].replace(reg, "/"));
  828. const quireData = this.Tdata.filter((item) => {
  829. let nowTime = new Date(item.pay.substr(0, 10).replace(reg, "/"));
  830. return nowTime >= startTime && nowTime <= endTime;
  831. });
  832. this.inquireTable = quireData;
  833. this.tableData = quireData;
  834. this.currentPage = 1;
  835. this.handleCurrentChange(this.currentPage);
  836. } else {
  837. this.state = "";
  838. let reg = new RegExp("-", "g");
  839. let startTime = new Date(this.payTime[0].replace(reg, "/"));
  840. let endTime = new Date(this.payTime[1].replace(reg, "/"));
  841. const quireData = this.inquireTable.filter((item) => {
  842. let nowTime = new Date(item.pay.substr(0, 10).replace(reg, "/"));
  843. return nowTime >= startTime && nowTime <= endTime;
  844. });
  845. this.inquireTable = quireData;
  846. this.tableData = quireData;
  847. this.currentPage = 1;
  848. this.handleCurrentChange(this.currentPage);
  849. }
  850. },
  851. // 创建时间
  852. timeCreation() {
  853. this.state = "";
  854. // console.log(this.creationTime);
  855. let reg = new RegExp("-", "g");
  856. let startTime = new Date(this.creationTime[0].replace(reg, "/"));
  857. let endTime = new Date(this.creationTime[1].replace(reg, "/"));
  858. const quireData = this.Tdata.filter((item) => {
  859. let nowTime = new Date(item.create.substr(0, 10).replace(reg, "/"));
  860. return nowTime >= startTime && nowTime <= endTime;
  861. });
  862. this.inquireTable = quireData;
  863. this.tableData = quireData;
  864. this.currentPage = 1;
  865. this.handleCurrentChange(this.currentPage);
  866. },
  867. // 挑选状态
  868. stateSel() {
  869. console.log(this.payTime.length > 0, this.creationTime.length > 0);
  870. if (
  871. this.value == false &&
  872. this.payTime.length == 0 &&
  873. this.creationTime.length == 0
  874. ) {
  875. this.tableData = this.Tdata.filter((item) => {
  876. return item.state == this.state;
  877. });
  878. } else if (this.payTime.length > 0 || this.creationTime.length > 0) {
  879. this.tableData = this.inquireTable.filter((item) => {
  880. return item.state == this.state;
  881. });
  882. } else {
  883. console.log(this.inquireTable);
  884. this.tableData = this.inquireTable.filter((item) => {
  885. return item.state == this.state;
  886. });
  887. }
  888. // this.tableData = this.Tdata.filter((item) => {
  889. // return item.state == this.state;
  890. // });
  891. this.currentPage = 1;
  892. this.handleCurrentChange(this.currentPage);
  893. console.log(this.state);
  894. },
  895. // 多选框按钮操作
  896. handleSelectionChange(selection) {
  897. // console.log(selection);
  898. this.selectionTable = selection;
  899. },
  900. },
  901. };
  902. </script>
  903. <style lang="scss" scoped>
  904. .inform /deep/ .el-card {
  905. width: 1612px;
  906. height: 950px;
  907. box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);
  908. border-radius: 8px;
  909. .clearfix {
  910. height: 96px;
  911. width: 100%;
  912. border-bottom: 1px solid rgba(204, 204, 204, 1);
  913. box-sizing: border-box;
  914. display: flex;
  915. justify-content: space-between;
  916. align-items: center;
  917. .inform-title {
  918. width: 96px;
  919. height: 36px;
  920. color: rgba(0, 0, 0, 1);
  921. font-size: 24px;
  922. font-weight: 500;
  923. margin-left: 33px;
  924. }
  925. .inform-header {
  926. display: flex;
  927. margin-right: 29px;
  928. .el-button {
  929. margin-left: 9px;
  930. background-color: rgba(41, 109, 227, 1);
  931. }
  932. }
  933. }
  934. .inform-body {
  935. .order-top {
  936. display: flex;
  937. align-items: center;
  938. padding: 33px 29px 34px 33px;
  939. font-size: 16px;
  940. font-weight: 400;
  941. color: #000;
  942. .el-button {
  943. background-color: rgba(41, 109, 227, 1);
  944. color: #fff;
  945. margin-left: 9px;
  946. }
  947. .paydate {
  948. margin: 0 0 0 44px;
  949. .el-date-editor {
  950. margin-left: 7px;
  951. width: 236px;
  952. .el-range__icon {
  953. display: none;
  954. }
  955. }
  956. }
  957. .state {
  958. margin-left: 30px;
  959. .el-input {
  960. width: 112px;
  961. }
  962. }
  963. .export {
  964. width: 94px;
  965. height: 32px;
  966. opacity: 1;
  967. color: #fff;
  968. text-align: center;
  969. line-height: 32px;
  970. background: rgba(41, 109, 227, 1);
  971. cursor: pointer;
  972. border-radius: 2px;
  973. margin-left: 221px;
  974. }
  975. }
  976. .inform-table {
  977. .execlTable,
  978. .selectTable {
  979. display: none;
  980. }
  981. .el-table {
  982. font-weight: 400;
  983. font-size: 16px;
  984. color: rgba(0, 0, 0, 1);
  985. margin: 0 auto;
  986. .el-table__header-wrapper {
  987. border-radius: 5px;
  988. .el-checkbox.is-checked {
  989. .el-checkbox__inner {
  990. background-color: rgba(41, 109, 227, 1);
  991. }
  992. }
  993. .el-checkbox__input.is-checked,
  994. .el-checkbox__input.is-indeterminate {
  995. .el-checkbox__inner {
  996. background-color: rgba(41, 109, 227, 1);
  997. }
  998. }
  999. }
  1000. tr {
  1001. height: 64px;
  1002. td {
  1003. .cell {
  1004. .el-checkbox.is-checked {
  1005. .el-checkbox__inner {
  1006. background-color: rgba(41, 109, 227, 1);
  1007. }
  1008. }
  1009. .is-indeterminate {
  1010. .el-checkbox__inner {
  1011. background-color: rgba(41, 109, 227, 1);
  1012. }
  1013. }
  1014. .operate {
  1015. color: rgba(41, 109, 227, 1);
  1016. cursor: pointer;
  1017. font-size: 16px;
  1018. font-weight: 400;
  1019. padding: 0 5px;
  1020. }
  1021. .el-dialog__wrapper {
  1022. overflow: hidden;
  1023. .el-dialog {
  1024. width: 968px !important;
  1025. margin-top: 126px !important;
  1026. height: 914px;
  1027. opacity: 1;
  1028. background: rgba(255, 255, 255, 1);
  1029. box-shadow: none;
  1030. .el-dialog__header {
  1031. height: 83px;
  1032. border-bottom: 1px solid rgba(230, 230, 230, 1);
  1033. span {
  1034. float: left;
  1035. font-size: 20px;
  1036. font-weight: 500;
  1037. color: #000;
  1038. }
  1039. .el-dialog__close {
  1040. width: 35px;
  1041. height: 35px;
  1042. &::before {
  1043. font-size: 24px;
  1044. color: #000;
  1045. }
  1046. }
  1047. }
  1048. .el-dialog__body {
  1049. padding: 0 38px;
  1050. .userinfo {
  1051. font-size: 20px;
  1052. font-weight: 500;
  1053. color: rgba(0, 0, 0, 1);
  1054. text-align: left;
  1055. margin-top: 15px;
  1056. }
  1057. .info {
  1058. display: flex;
  1059. .user {
  1060. .name {
  1061. text-align: left;
  1062. padding: 12px 0;
  1063. }
  1064. .el-input {
  1065. width: 283px;
  1066. height: 38px;
  1067. opacity: 1;
  1068. margin-right: 81px;
  1069. .el-input__inner {
  1070. color: #000;
  1071. }
  1072. }
  1073. }
  1074. }
  1075. .rate {
  1076. font-size: 20px;
  1077. font-weight: 500;
  1078. color: rgba(0, 0, 0, 1);
  1079. text-align: left;
  1080. margin: 15px 0;
  1081. }
  1082. .water {
  1083. text-align: left;
  1084. font-size: 16px;
  1085. font-weight: 400;
  1086. color: rgba(0, 0, 0, 1);
  1087. }
  1088. .el-table {
  1089. margin: 10px 0;
  1090. tr {
  1091. height: 48px;
  1092. }
  1093. .el-table__body-wrapper {
  1094. overflow: visible;
  1095. }
  1096. }
  1097. }
  1098. }
  1099. }
  1100. .el-dialog__title {
  1101. color: rgba(41, 109, 227, 1);
  1102. cursor: pointer;
  1103. padding: 10px 18px 0 18px;
  1104. }
  1105. }
  1106. }
  1107. .el-checkbox__inner {
  1108. width: 18px;
  1109. height: 18px;
  1110. &::after {
  1111. transform: rotate(45deg) scaleY(1.5);
  1112. top: 3px;
  1113. left: 5px;
  1114. }
  1115. }
  1116. }
  1117. th {
  1118. font-weight: 400;
  1119. }
  1120. }
  1121. }
  1122. .block {
  1123. height: 36px;
  1124. margin: 66px 29px 0 0;
  1125. float: right;
  1126. .el-pagination {
  1127. padding: 0;
  1128. button {
  1129. width: 36px;
  1130. background: #fff;
  1131. color: rgba(0, 0, 0, 1);
  1132. height: 36px;
  1133. font-size: 14px;
  1134. border: 1px solid rgba(112, 112, 112, 1);
  1135. border-radius: 8px;
  1136. }
  1137. ul {
  1138. .active {
  1139. background: #fff;
  1140. color: rgba(0, 97, 255, 1);
  1141. border: 1px solid rgba(0, 97, 255, 1);
  1142. box-sizing: border-box;
  1143. }
  1144. .el-icon {
  1145. border: none;
  1146. }
  1147. li {
  1148. background: #fff;
  1149. color: rgba(0, 0, 0, 1);
  1150. width: 36px;
  1151. height: 36px;
  1152. font-size: 14px;
  1153. border: 1px solid rgba(112, 112, 112, 1);
  1154. border-radius: 8px;
  1155. line-height: 36px;
  1156. }
  1157. }
  1158. .el-pagination__jump {
  1159. color: rgba(0, 0, 0, 1);
  1160. font-size: 16px;
  1161. margin-left: 10px;
  1162. font-weight: 400;
  1163. height: 36px;
  1164. .el-input {
  1165. width: 65px;
  1166. height: 36px;
  1167. margin: 0 10px;
  1168. input {
  1169. width: 65px;
  1170. height: 36px;
  1171. border: 1px solid rgba(0, 0, 0, 1);
  1172. border-radius: 8px;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. }
  1178. }
  1179. }
  1180. .box-card {
  1181. /deep/ .el-card__header {
  1182. padding: 0;
  1183. }
  1184. /deep/ .el-card__body {
  1185. padding: 0;
  1186. }
  1187. }
  1188. </style>
  1189. <style lang="scss">
  1190. .el-message-box__wrapper {
  1191. .el-button--primary {
  1192. background-color: #296de3;
  1193. }
  1194. }
  1195. </style>