index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <template>
  2. <div id="">
  3. <search-box-new
  4. ref="searchBox"
  5. :formData="formData"
  6. :formList="formList"
  7. @search="search"
  8. @init="init"
  9. />
  10. <table-list
  11. rowKey="id"
  12. ref="tableList"
  13. :tableSets="tableSet"
  14. :tableData="tableData"
  15. :navText="navText"
  16. :loading="loading"
  17. >
  18. <template slot="customize">
  19. <el-button> 导出excel </el-button>
  20. </template>
  21. <template slot="integral" slot-scope="props">
  22. {{ props.scope.row["g"] }}积分
  23. </template>
  24. </table-list>
  25. <pagination
  26. :total="total"
  27. :pageSize.sync="formData.pageSize"
  28. :currentPage.sync="formData.pageNum"
  29. @search="search"
  30. />
  31. <dislog
  32. :dialogVisible.sync="dialogVisible"
  33. @search="search"
  34. :activeData="activeData"
  35. ></dislog>
  36. </div>
  37. </template>
  38. <script>
  39. import dislog from "./dislog.vue";
  40. import searchBoxNew from "@/components/searchBoxNew";
  41. import tableList from "@/components/tableList";
  42. import pagination from "@/components/pagination";
  43. export default {
  44. name: "",
  45. components: { searchBoxNew, tableList, pagination, dislog },
  46. data() {
  47. return {
  48. loading: false,
  49. navText: {
  50. title: "核销管理",
  51. index: 0,
  52. ch: "条",
  53. num: true,
  54. choice: false,
  55. addHide: true,
  56. custom: false,
  57. tableHide: true,
  58. },
  59. formList: [
  60. {
  61. prop: "tenantid",
  62. placeholder: "请选择机构名称",
  63. },
  64. ],
  65. formData: {},
  66. tableSet: [
  67. {
  68. label: "合作商户",
  69. prop: "a",
  70. hidden: true,
  71. },
  72. {
  73. label: "会员手机号",
  74. prop: "b",
  75. hidden: true,
  76. },
  77. {
  78. label: "会员名称",
  79. prop: "c",
  80. hidden: true,
  81. },
  82. {
  83. label: "核销人",
  84. prop: "d",
  85. hidden: true,
  86. },
  87. {
  88. label: "核销时间",
  89. prop: "e",
  90. hidden: true,
  91. scope: "aTimeList",
  92. },
  93. {
  94. label: "付款方式",
  95. prop: "f",
  96. hidden: true,
  97. scope: "isOptions",
  98. options: [
  99. {
  100. label: "扫码付款",
  101. value: 1,
  102. },
  103. {
  104. label: "现金支付",
  105. value: 2,
  106. },
  107. ],
  108. },
  109. {
  110. label: "消费积分",
  111. prop: "g",
  112. hidden: true,
  113. scope: "solt",
  114. soltName: "integral",
  115. },
  116. ],
  117. tableData: [],
  118. total: 0,
  119. dialogVisible: false,
  120. activeData: {},
  121. };
  122. },
  123. created() {
  124. this.search(2);
  125. },
  126. methods: {
  127. addClick(data) {
  128. this.activeData = data || {};
  129. this.dialogVisible = true;
  130. },
  131. search(v) {
  132. this.tableData = [
  133. {
  134. a: "深圳桥恩心理咨询有限公司",
  135. b: 13800138000,
  136. c: "张三",
  137. d: "李四",
  138. e: 1234567891,
  139. f: 1,
  140. g: 2000,
  141. },
  142. ];
  143. // this.loading = true;
  144. // if (v === 2) {
  145. // this.formData = {
  146. // pageSize: 10,
  147. // pageNum: 1,
  148. // };
  149. // }
  150. // this.$api
  151. // .xxx(this.formData)
  152. // .then((res) => {
  153. // this.tableData = res.rows;
  154. // this.total = res.total;
  155. // this.navText.index = res.total;
  156. // })
  157. // .finally(() => {
  158. // this.loading = false;
  159. // });
  160. },
  161. init() {
  162. this.search(2);
  163. },
  164. del(v) {
  165. this.$alert(
  166. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  167. "提示",
  168. {
  169. dangerouslyUseHTMLString: true,
  170. }
  171. )
  172. .then(() => {})
  173. .catch(() => {
  174. this.$message({
  175. type: "info",
  176. message: "已取消删除",
  177. });
  178. });
  179. },
  180. },
  181. };
  182. </script>
  183. <style lang="scss" scoped></style>