RefundManager.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934
  1. <template>
  2. <div class="manage-root">
  3. <Header />
  4. <div class="manage-root-contain">
  5. <nav-menu
  6. class="manage-root-contain-left"
  7. :activeMenuIndex="activeMenuIndex"
  8. ></nav-menu>
  9. <div class="manage-root-contain-right">
  10. <breadcrumb
  11. :breadcrumbList="breadcrumbList"
  12. class="breadcrumb-box"
  13. ></breadcrumb>
  14. <div class="personal-inner">
  15. <div class="search-box">
  16. <div class="search-item">
  17. <label>搜索</label>
  18. <el-input
  19. placeholder="退款申请人姓名"
  20. v-model="searchInput"
  21. maxlength="200"
  22. >
  23. <i
  24. slot="suffix"
  25. class="el-input__icon el-icon-search"
  26. @click="getList(1)"
  27. style="cursor: pointer"
  28. ></i>
  29. </el-input>
  30. </div>
  31. <div class="search-item">
  32. <label>退款申请状态</label>
  33. <el-select
  34. v-model="searchStatus"
  35. @change="getList(1)"
  36. placeholder="请选择"
  37. >
  38. <el-option
  39. v-for="item in transactionList"
  40. :key="item.status"
  41. :label="item.status_name"
  42. :value="item.status"
  43. >
  44. </el-option>
  45. </el-select>
  46. </div>
  47. </div>
  48. <el-table
  49. class="search-table"
  50. :data="tableData"
  51. style="width: 100%"
  52. @sort-change="handleSort"
  53. :default-sort="dataSort"
  54. :max-height="tableHeight"
  55. v-loading="tableLoading"
  56. >
  57. <el-table-column
  58. type="index"
  59. label="#"
  60. sortable
  61. width="54"
  62. :index="(pageNumber - 1) * pageSize + 1"
  63. >
  64. </el-table-column>
  65. <el-table-column prop="sn" label="申请单号" width="190">
  66. </el-table-column>
  67. <el-table-column prop="order_sn" label="订单号" width="190">
  68. </el-table-column>
  69. <el-table-column prop="order_name" label="购买商品" min-width="220">
  70. </el-table-column>
  71. <el-table-column prop="goods_type" label="商品类型" width="128">
  72. <template slot-scope="scope">
  73. <span
  74. class="items-type"
  75. :style="{
  76. background: goodsTypeListCss[scope.row.goods_type]
  77. ? goodsTypeListCss[scope.row.goods_type].bg
  78. : '',
  79. color: goodsTypeListCss[scope.row.goods_type]
  80. ? goodsTypeListCss[scope.row.goods_type].color
  81. : '',
  82. }"
  83. >{{ scope.row.goods_type_name }}</span
  84. >
  85. </template>
  86. </el-table-column>
  87. <el-table-column prop="is_reservation" label="是否预定" width="80">
  88. <template slot-scope="scope">
  89. {{ scope.row.is_reservation_order === "true" ? "是" : "否" }}
  90. </template>
  91. </el-table-column>
  92. <el-table-column
  93. prop="goods_study_phase_name"
  94. label="学段"
  95. width="64"
  96. >
  97. </el-table-column>
  98. <el-table-column prop="order_amount" label="订单金额" width="140">
  99. <template slot-scope="scope">
  100. <span class="currectPrice"
  101. >¥{{ scope.row.order_amount | cutMoneyFiter }}</span
  102. >
  103. </template>
  104. </el-table-column>
  105. <el-table-column
  106. prop="order_pay_time"
  107. label="订单支付时间"
  108. sortable="custom"
  109. width="180"
  110. >
  111. </el-table-column>
  112. <el-table-column
  113. prop="person_name"
  114. label="购买者"
  115. sortable="custom"
  116. width="109"
  117. >
  118. </el-table-column>
  119. <el-table-column
  120. prop="person_city_name"
  121. label="客户所在省市"
  122. width="164"
  123. >
  124. <template slot-scope="scope">
  125. {{
  126. scope.row.person_province_name +
  127. "/" +
  128. scope.row.person_city_name
  129. }}
  130. </template>
  131. </el-table-column>
  132. <el-table-column
  133. prop="person_org_name"
  134. label="客户所在机构"
  135. sortable="custom"
  136. width="200"
  137. >
  138. </el-table-column>
  139. <el-table-column
  140. prop="submit_time"
  141. label="提交申请时间"
  142. sortable="custom"
  143. width="180"
  144. >
  145. </el-table-column>
  146. <el-table-column prop="status" label="退款申请状态" width="112">
  147. <template slot-scope="scope">
  148. <div class="status-box">
  149. <span
  150. :style="{
  151. background: refundStatusList[scope.row.status].bg,
  152. }"
  153. ></span>
  154. <b
  155. :style="{
  156. color: refundStatusList[scope.row.status].textColor,
  157. }"
  158. >{{ refundStatusList[scope.row.status].text }}</b
  159. >
  160. </div>
  161. </template>
  162. </el-table-column>
  163. <el-table-column prop="auditor_name" label="审核人" width="104">
  164. </el-table-column>
  165. <el-table-column prop="audit_time" label="审核时间" width="180">
  166. </el-table-column>
  167. <el-table-column prop="refund_amount" label="退款金额" width="144">
  168. <template slot-scope="scope" v-if="scope.row.status === 2">
  169. <span class="currectPrice"
  170. >¥{{ scope.row.refund_amount | cutMoneyFiter }}</span
  171. >
  172. </template>
  173. </el-table-column>
  174. <el-table-column
  175. prop="refund_transaction_sn"
  176. label="退款交易流水号"
  177. width="260"
  178. >
  179. </el-table-column>
  180. <el-table-column fixed="right" label="操作" width="100">
  181. <template slot-scope="scope" v-if="scope.row.status === 0">
  182. <el-button
  183. type="text"
  184. size="small"
  185. class="primary-btn"
  186. @click.native.prevent="handleRefund(scope.row, scope.$index)"
  187. >
  188. 退款
  189. </el-button>
  190. <el-button
  191. @click.native.prevent="handleRefuse(scope.row, scope.$index)"
  192. type="text"
  193. size="small"
  194. class="red-btn"
  195. >
  196. 拒绝
  197. </el-button>
  198. </template>
  199. </el-table-column>
  200. </el-table>
  201. <el-pagination
  202. background
  203. @size-change="handleSizeChange"
  204. @current-change="handleCurrentChange"
  205. :current-page="pageNumber"
  206. :page-sizes="[10, 20, 30, 40]"
  207. :page-size="pageSize"
  208. layout="total, prev, pager, next, sizes, jumper"
  209. :total="total_count"
  210. >
  211. </el-pagination>
  212. </div>
  213. </div>
  214. </div>
  215. <el-dialog title="退款信息" :visible.sync="dialogVisible" width="500px">
  216. <template v-if="ktjeInfo">
  217. <span style="margin-right: 5px">可退金额:</span>
  218. <el-input v-model="ktje"></el-input>
  219. <p>可退商品信息</p>
  220. <div class="item-info">
  221. <label>物品类型:</label><span>{{ ktjeInfo.goods_type_name }}</span>
  222. </div>
  223. <div class="item-info">
  224. <label>物品学段:</label
  225. ><span>{{ ktjeInfo.goods_study_phase_name }}</span>
  226. </div>
  227. <div class="item-info">
  228. <label>订单金额:</label
  229. ><span>¥{{ ktjeInfo.order_amount | cutMoneyFiter }}</span>
  230. </div>
  231. <!-- 物品实体 -->
  232. <template v-if="ktjeInfo.order_sale_model === 0">
  233. <div
  234. class="item-info"
  235. v-if="ktjeInfo.is_reservation_order === 'true'"
  236. >
  237. <label>订阅期数:</label
  238. ><span>{{
  239. ktjeInfo.period_count === -1 ? "年刊" : ktjeInfo.period_count
  240. }}</span>
  241. </div>
  242. <div
  243. class="item-info"
  244. v-if="
  245. ktjeInfo.is_reservation_order === 'true' &&
  246. ktjeInfo.period_count !== -1
  247. "
  248. >
  249. <label>订阅列表:</label
  250. ><span>{{ ktjeInfo.issue_no_list_reservation.join("、") }}</span>
  251. </div>
  252. <div
  253. class="item-info"
  254. v-if="
  255. ktjeInfo.is_reservation_order === 'true' &&
  256. ktjeInfo.issue_no_list_my_goods.length > 0
  257. "
  258. >
  259. <label>已上架:</label
  260. ><span>{{ ktjeInfo.issue_no_list_my_goods.join("、") }}</span>
  261. </div>
  262. <div
  263. class="item-info"
  264. v-if="
  265. ktjeInfo.is_reservation_order === 'true' &&
  266. ktjeInfo.period_count === -1
  267. "
  268. >
  269. <label>开始日期:</label
  270. ><span>{{ ktjeInfo.valid_period_begin_date }}</span>
  271. </div>
  272. <div
  273. class="item-info"
  274. v-if="
  275. ktjeInfo.is_reservation_order === 'true' &&
  276. ktjeInfo.period_count === -1
  277. "
  278. >
  279. <label>截止日期:</label
  280. ><span>{{ ktjeInfo.valid_period_end_date }}</span>
  281. </div>
  282. <div
  283. class="item-info"
  284. v-if="
  285. ktjeInfo.is_reservation_order === 'true' &&
  286. ktjeInfo.period_count === -1
  287. "
  288. >
  289. <label>当前日期:</label><span>{{ ktjeInfo.cur_date }}</span>
  290. </div>
  291. </template>
  292. <!-- 使用期限 -->
  293. <template v-if="ktjeInfo.order_sale_model === 1">
  294. <div class="item-info">
  295. <label>订单日期:</label><span>{{ ktjeInfo.order_date }}</span>
  296. </div>
  297. <div class="item-info">
  298. <label>有效期天数:</label
  299. ><span>{{ ktjeInfo.valid_period_day_count }}</span>
  300. </div>
  301. <div class="item-info">
  302. <label>截止日期:</label
  303. ><span>{{ ktjeInfo.valid_period_end_date }}</span>
  304. </div>
  305. <div class="item-info">
  306. <label>当前日期:</label><span>{{ ktjeInfo.cur_date }}</span>
  307. </div>
  308. </template>
  309. </template>
  310. <span slot="footer" class="dialog-footer">
  311. <el-button size="small" @click="dialogVisible = false">取 消</el-button>
  312. <el-button size="small" type="primary" @click="sureRefund"
  313. >确 定</el-button
  314. >
  315. </span>
  316. </el-dialog>
  317. </div>
  318. </template>
  319. <script>
  320. //这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  321. //例如:import 《组件名称》from ‘《组件路径》';
  322. import Header from "../../components/Header.vue";
  323. import NavMenu from "../../components/NavMenu.vue";
  324. import Breadcrumb from "../../components/Breadcrumb.vue";
  325. import { getLogin } from "@/api/ajax";
  326. import { mapState } from "vuex";
  327. import { cutMoneyFiter } from "@/utils/defined";
  328. import { getToken } from "@/utils/auth";
  329. export default {
  330. //import引入的组件需要注入到对象中才能使用
  331. components: { Header, NavMenu, Breadcrumb },
  332. props: {},
  333. filters: {
  334. cutMoneyFiter,
  335. },
  336. data() {
  337. //这里存放数据
  338. return {
  339. activeMenuIndex: "refund_manage",
  340. breadcrumbList: [
  341. {
  342. icon: "money-cny-box-line",
  343. url: "",
  344. text: "",
  345. },
  346. {
  347. icon: "",
  348. url: "",
  349. notLink: true,
  350. text: "财务中心",
  351. },
  352. {
  353. icon: "",
  354. url: "",
  355. text: "退款管理",
  356. },
  357. ],
  358. quickList: [], // 快速查询
  359. searchInput: "",
  360. searchQuick: null,
  361. quickIndex: null, // 快速搜索的索引
  362. proceedsNumber: "", // 收款单数
  363. proceedsPrice: null, // 收款金额
  364. proceedsPriceArr: [],
  365. searchType: -1,
  366. validity: "",
  367. searchStudy: -1,
  368. searchStatus: -1,
  369. searchGoodsType: -1,
  370. searchIsCDKEY: -1,
  371. searchOrgid: "",
  372. searchArea: [],
  373. searchChannel: -1,
  374. channelList: [
  375. {
  376. label: "全部",
  377. value: -1,
  378. },
  379. {
  380. label: "支付宝",
  381. value: 4,
  382. },
  383. {
  384. label: "微信支付",
  385. value: 3,
  386. },
  387. ],
  388. orgList: [
  389. {
  390. name: "全部",
  391. id: "",
  392. },
  393. ],
  394. isCDKEYList: [
  395. {
  396. label: "全部",
  397. value: -1,
  398. },
  399. {
  400. label: "已使用",
  401. value: 1,
  402. },
  403. {
  404. label: "未使用",
  405. value: 0,
  406. },
  407. ], // 是否使用兑换码
  408. transactionList: [
  409. {
  410. status_name: "全部",
  411. status: -1,
  412. },
  413. {
  414. status_name: "待审核",
  415. status: 0,
  416. },
  417. {
  418. status_name: "驳回",
  419. status: 1,
  420. },
  421. {
  422. status_name: "审核通过",
  423. status: 2,
  424. },
  425. ], //交易状态列表
  426. transactionListCss: {
  427. 0: {
  428. bg: "rgb(245, 63, 63)",
  429. text: "未支付",
  430. },
  431. 1: {
  432. bg: "#00B42A",
  433. text: "支付成功",
  434. },
  435. 2: {
  436. bg: "#165DFF",
  437. text: "兑换成功",
  438. },
  439. 3: {
  440. bg: "#F7BA1E",
  441. text: "已退款",
  442. },
  443. 4: {
  444. bg: "#FF7D00",
  445. text: "已撤回",
  446. },
  447. },
  448. goodsTypeList: [
  449. {
  450. goods_name: "全部",
  451. value: -1,
  452. },
  453. {
  454. goods_name: "报纸",
  455. value: 2,
  456. },
  457. {
  458. goods_name: "精读",
  459. value: 3,
  460. },
  461. {
  462. goods_name: "录播课",
  463. value: 0,
  464. },
  465. {
  466. goods_name: "画刊",
  467. value: 4,
  468. },
  469. ], // 商品类型
  470. goodsTypeListCss: {
  471. 2: {
  472. text: "报纸",
  473. color: "#165DFF",
  474. bg: "#E8F7FF",
  475. },
  476. 4: {
  477. text: "画刊",
  478. color: "#F53F3F",
  479. bg: "#FFECE8",
  480. },
  481. 3: {
  482. text: "精读",
  483. color: "#0FC6C2",
  484. bg: "#E8FFFB",
  485. },
  486. 0: {
  487. text: "课程",
  488. color: "#722ED1",
  489. bg: "#F5E8FF",
  490. },
  491. 1: {
  492. text: "课程",
  493. color: "#722ED1",
  494. bg: "#F5E8FF",
  495. },
  496. 10: {
  497. text: "课程",
  498. color: "#722ED1",
  499. bg: "#F5E8FF",
  500. },
  501. // '5':{
  502. // text:'报纸专辑',
  503. // color:'#165DFF',
  504. // bg:'#E8F7FF'
  505. // },
  506. // '6':{
  507. // text:'画刊专辑',
  508. // color:'#F53F3F',
  509. // bg:'#FFECE8'
  510. // }
  511. },
  512. typeList: [
  513. {
  514. account_type: -1,
  515. account_type_name: "全部",
  516. },
  517. ],
  518. statusList: {
  519. 1: {
  520. text: "正常",
  521. bg: "#165DFF",
  522. color: "",
  523. },
  524. 0: {
  525. text: "停用",
  526. bg: "#F53F3F",
  527. color: "#F53F3F",
  528. },
  529. },
  530. refundStatusList: {
  531. 2: {
  532. text: "审核通过",
  533. bg: "#00B42A",
  534. textColor: "#1D2129",
  535. },
  536. 0: {
  537. text: "待审核",
  538. bg: "#165DFF",
  539. textColor: "#1D2129",
  540. },
  541. 1: {
  542. text: "驳回",
  543. bg: "#FF7D00",
  544. textColor: "#1D2129",
  545. },
  546. },
  547. tableData: [],
  548. pageSize: window.localStorage.getItem("pageSize")
  549. ? Number(window.localStorage.getItem("pageSize"))
  550. : 10,
  551. pageNumber: window.localStorage.getItem("pageNumber")
  552. ? Number(window.localStorage.getItem("pageNumber"))
  553. : 1,
  554. tableHeight: "", // 表格高度
  555. total_count: 0,
  556. dataSort: {},
  557. props: { multiple: true },
  558. tableLoading: false,
  559. exportLoading: false,
  560. exportFlag:
  561. getToken() && JSON.parse(getToken())
  562. ? JSON.parse(getToken()).popedom_code_list.indexOf(40002) > -1
  563. : false,
  564. dialogVisible: false,
  565. ktje: 0,
  566. refundId: "",
  567. ktjeInfo: null,
  568. };
  569. },
  570. //计算属性 类似于data概念
  571. computed: {
  572. ...mapState(["$studyTypeAll", "$provinceCityListAll"]),
  573. },
  574. //监控data中数据变化
  575. watch: {},
  576. //方法集合
  577. methods: {
  578. qucikSearch(value, index) {
  579. (this.validity = [value.date_begin, value.date_end]),
  580. (this.quickIndex = index);
  581. this.getList();
  582. },
  583. handleSort(value) {
  584. let dataSort = {
  585. prop: value.prop,
  586. order: value.order,
  587. };
  588. this.dataSort = dataSort;
  589. this.getList();
  590. },
  591. // 查询列表
  592. getList(page) {
  593. this.tableLoading = true;
  594. if (page) {
  595. this.pageNumber = page;
  596. }
  597. let MethodName =
  598. "/ShopServer/Manager/FinanceManager/PageQueryOrderRefundApplyList";
  599. let order_column_list = [];
  600. if (this.dataSort != {}) {
  601. if (this.dataSort.order == "descending") {
  602. order_column_list = [this.dataSort.prop + ":desc"];
  603. } else if (this.dataSort.order == "ascending") {
  604. // 升序不传值
  605. order_column_list = [this.dataSort.prop];
  606. } else {
  607. order_column_list = ["submit_time:desc"];
  608. }
  609. } else {
  610. order_column_list = ["submit_time:desc"];
  611. }
  612. let data = {
  613. person_name: this.searchInput.trim(),
  614. page_capacity: this.pageSize,
  615. cur_page: this.pageNumber,
  616. order_column_list: order_column_list,
  617. status: this.searchStatus,
  618. };
  619. getLogin(MethodName, data)
  620. .then((res) => {
  621. this.tableLoading = false;
  622. if (res.status === 1) {
  623. this.tableData = res.apply_list;
  624. this.total_count = res.total_count;
  625. }
  626. })
  627. .catch(() => {
  628. this.tableLoading = false;
  629. });
  630. },
  631. // 拒绝
  632. handleRefuse(row, index) {
  633. this.$confirm("确定拒绝退款吗?", "提示", {
  634. confirmButtonText: "确定",
  635. cancelButtonText: "取消",
  636. type: "warning",
  637. })
  638. .then(() => {
  639. let Mname =
  640. "/ShopServer/Manager/FinanceManager/AuditOrderRefundApply";
  641. let updataData = JSON.parse(JSON.stringify(row));
  642. let data = {
  643. id: row.id,
  644. is_pass: "false",
  645. };
  646. getLogin(Mname, data).then((res) => {
  647. this.$message.success("操作成功");
  648. this.getList();
  649. });
  650. })
  651. .catch(() => {});
  652. },
  653. // 退款
  654. handleRefund(row, index) {
  655. this.ktjeInfo = null;
  656. let Mnames =
  657. "/ShopServer/Manager/FinanceManager/GetOrderRefundApplyKTJEInfo";
  658. let datas = {
  659. id: row.id,
  660. };
  661. getLogin(Mnames, datas).then((res) => {
  662. if (res.status === 1) {
  663. this.ktje = res.ktje_info.ktje;
  664. this.ktjeInfo = res.ktje_info;
  665. this.refundId = row.id;
  666. this.dialogVisible = true;
  667. }
  668. });
  669. // this.$prompt("请输入金额", "提示", {
  670. // confirmButtonText: "确定",
  671. // cancelButtonText: "取消",
  672. // })
  673. // .then(({ value }) => {
  674. //
  675. // })
  676. // .catch(() => {
  677. // // this.$message({
  678. // // type: "info",
  679. // // message: "取消输入",
  680. // // });
  681. // });
  682. },
  683. // 确定退款
  684. sureRefund() {
  685. this.$confirm("确定要退款吗?", "提示", {
  686. confirmButtonText: "确定",
  687. cancelButtonText: "取消",
  688. type: "warning",
  689. }).then(() => {
  690. let Mname = "/ShopServer/Manager/FinanceManager/AuditOrderRefundApply";
  691. let data = {
  692. id: this.refundId,
  693. is_pass: "true",
  694. refund_amount: this.ktje,
  695. };
  696. getLogin(Mname, data).then((res) => {
  697. this.$message.success("操作成功");
  698. this.getList();
  699. this.dialogVisible = false;
  700. });
  701. });
  702. },
  703. handleSizeChange(val) {
  704. this.pageSize = val;
  705. this.pageNumber = 1;
  706. this.getList();
  707. },
  708. handleCurrentChange(val) {
  709. this.pageNumber = val;
  710. this.getList();
  711. },
  712. //计算table高度(动态设置table高度)
  713. getTableHeight() {
  714. let tableH = 370; //距离页面下方的高度
  715. let tableHeightDetil = window.innerHeight - tableH;
  716. if (tableHeightDetil <= 300) {
  717. this.tableHeight = 300;
  718. } else {
  719. this.tableHeight = window.innerHeight - tableH;
  720. }
  721. },
  722. // 用户类型列表
  723. getOrgList() {
  724. let MethodName = "/OrgServer/Client/OrgManager/GetOrgIndexList";
  725. let data = {
  726. name: "",
  727. status: 1,
  728. sn: "",
  729. };
  730. getLogin(MethodName, data)
  731. .then((res) => {
  732. if (res.status === 1) {
  733. this.orgList = [
  734. {
  735. name: "全部",
  736. id: "",
  737. },
  738. ];
  739. this.orgList = this.orgList.concat(res.org_index_list);
  740. }
  741. })
  742. .catch(() => {
  743. this.loading = false;
  744. });
  745. },
  746. // 快捷时间按钮列表
  747. getQuickList() {
  748. this.quickList = [];
  749. let MethodName =
  750. "/ShopServer/Manager/FinanceManager/GetQueryCritDateSpaceList";
  751. let data = {};
  752. getLogin(MethodName, data).then((res) => {
  753. if (res.status === 1) {
  754. this.quickList = res.date_space_list;
  755. }
  756. });
  757. },
  758. CopyToClipboard(element) {
  759. var doc = document,
  760. text = doc.getElementById(element),
  761. range,
  762. selection;
  763. if (doc.body.createTextRange) {
  764. range = doc.body.createTextRange();
  765. range.moveToElementText(text);
  766. range.select();
  767. } else if (window.getSelection) {
  768. selection = window.getSelection();
  769. range = doc.createRange();
  770. range.selectNodeContents(text);
  771. selection.removeAllRanges();
  772. selection.addRange(range);
  773. }
  774. document.execCommand("copy");
  775. this.$message({
  776. message: "复制成功",
  777. type: "success",
  778. });
  779. window.getSelection().removeAllRanges();
  780. },
  781. },
  782. //生命周期 - 创建完成(可以访问当前this实例)
  783. created() {
  784. this.getTableHeight();
  785. this.getQuickList();
  786. this.getOrgList();
  787. this.getList();
  788. },
  789. //生命周期 - 挂载完成(可以访问DOM元素)
  790. mounted() {
  791. let _this = this;
  792. let input = document.querySelector("input");
  793. input.addEventListener("keyup", function (event) {
  794. // 判断是否按下回车键
  795. if (event.keyCode === 13) {
  796. // 回车键被按下,执行你想要的操作
  797. _this.getList(1);
  798. }
  799. });
  800. },
  801. //生命周期-创建之前
  802. beforeCreated() {},
  803. //生命周期-挂载之前
  804. beforeMount() {},
  805. //生命周期-更新之前
  806. beforUpdate() {},
  807. //生命周期-更新之后
  808. updated() {},
  809. //生命周期-销毁之前
  810. beforeDestory() {},
  811. //生命周期-销毁完成
  812. destoryed() {},
  813. //如果页面有keep-alive缓存功能,这个函数会触发
  814. activated() {},
  815. };
  816. </script>
  817. <style lang="scss" scoped>
  818. /* @import url(); 引入css类 */
  819. </style>
  820. <style lang="scss">
  821. .btn-box {
  822. display: flex;
  823. }
  824. .quick-search {
  825. display: flex;
  826. list-style: none;
  827. padding: 3px;
  828. margin: 0 24px;
  829. align-items: center;
  830. border-radius: 2px;
  831. background: #f2f3f5;
  832. li {
  833. display: flex;
  834. align-items: center;
  835. a {
  836. padding: 2px 12px;
  837. color: #4e5969;
  838. font-size: 14px;
  839. font-weight: 400;
  840. line-height: 22px;
  841. border-radius: 2px;
  842. cursor: pointer;
  843. &.active {
  844. background: #fff;
  845. color: #165dff;
  846. font-weight: 500;
  847. }
  848. }
  849. span {
  850. height: 14px;
  851. width: 1px;
  852. background: #e5e6eb;
  853. &.border-no {
  854. background: #f2f3f5;
  855. }
  856. }
  857. }
  858. }
  859. .proceeds-box {
  860. border-radius: 2px;
  861. background: #f7f8fa;
  862. padding: 16px;
  863. margin-top: 24px;
  864. h6 {
  865. color: #1d2129;
  866. font-size: 16px;
  867. font-weight: 400;
  868. line-height: 22px;
  869. margin: 0 0 8px 0;
  870. span {
  871. color: #86909c;
  872. font-size: 12px;
  873. font-weight: 400;
  874. line-height: 20px;
  875. }
  876. }
  877. label {
  878. color: #1d2129;
  879. font-size: 22px;
  880. font-weight: 700;
  881. line-height: 24px;
  882. b {
  883. font-size: 14px;
  884. font-weight: 700;
  885. line-height: 24px;
  886. }
  887. span {
  888. color: #4e5969;
  889. font-size: 12px;
  890. font-weight: 400;
  891. line-height: 20px;
  892. }
  893. }
  894. }
  895. .el-range-editor--small .el-range-input {
  896. background: #f2f3f5;
  897. }
  898. .search-item {
  899. margin-bottom: 20px;
  900. }
  901. .search-table {
  902. margin-top: 0;
  903. }
  904. .items-type {
  905. padding: 1px 8px;
  906. font-weight: 500;
  907. font-size: 14px;
  908. line-height: 22px;
  909. border-radius: 2px;
  910. }
  911. .code {
  912. color: #175dff;
  913. }
  914. .copy {
  915. color: #c9cdd4;
  916. margin-left: 8px;
  917. cursor: pointer;
  918. }
  919. .item-info {
  920. display: flex;
  921. width: 100%;
  922. margin: 10px 0;
  923. label {
  924. width: 90px;
  925. text-align: right;
  926. flex-shrink: 0;
  927. }
  928. }
  929. </style>