fail.php 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <div>
  5. <span>手续费未成功</span>
  6. </div>
  7. </div>
  8. <div class="table-body">
  9. <!-- 查询 -->
  10. <el-form
  11. :inline="true"
  12. :model="searchData"
  13. size="mini"
  14. >
  15. <el-row>
  16. <el-form-item label="会员昵称/手机号">
  17. <el-input v-model="searchData.keyword" placeholder="会员昵称/手机号"></el-input>
  18. </el-form-item>
  19. </el-row>
  20. <el-row>
  21. <el-form-item>
  22. <el-button type="primary" @click="onSubmit">查询</el-button>
  23. <el-button @click="resetForm">重置</el-button>
  24. </el-form-item>
  25. </el-row>
  26. </el-form>
  27. <!-- 订单信息 -->
  28. <template>
  29. <el-table ref="multipleTable" :data="list" @selection-change="handleSelectionChange" v-loading="listLoading">
  30. <!-- 空数据 -->
  31. <template slot="empty">
  32. <el-empty description="暂无记录"></el-empty>
  33. </template>
  34. <el-table-column type="selection"></el-table-column>
  35. <el-table-column prop="id" align="center" label="ID"></el-table-column>
  36. <el-table-column prop="batch_num" align="center" label="batch_num"></el-table-column>
  37. <el-table-column prop="order_sn" align="center" label="order_sn"></el-table-column>
  38. <el-table-column prop="error" align="center" label="error"></el-table-column>
  39. <el-table-column prop="created_at" align="center" label="创建时间">
  40. <template slot-scope="scope">
  41. {{ scope.row.created_at|dateTimeFormat('Y-m-d H:i:s') }}
  42. </template>
  43. </el-table-column>
  44. <el-table-column prop="right_btn" label="操作" align="center">
  45. <template slot-scope="scope">
  46. <el-button
  47. type="text"
  48. @click="reSubmit(scope.row.id)"
  49. >失败</el-button>
  50. </template>
  51. </el-table-column>
  52. </el-table>
  53. </template>
  54. <!-- 分页 -->
  55. <el-row type="flex" class="page" justify="end" style="margin-top: 20px;">
  56. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount" v-if="list"></el-pagination>
  57. </el-row>
  58. </div>
  59. </el-card>
  60. </div>
  61. <script>
  62. const app = new Vue({
  63. el: '#app',
  64. data() {
  65. return {
  66. searchData: {
  67. keyword: undefined,
  68. },
  69. list: [],
  70. pageCount: 0,
  71. page: 1,
  72. currentPage: null,
  73. listLoading: false,
  74. }
  75. },
  76. methods: {
  77. handleSelectionChange(val) {
  78. this.select_order = val
  79. },
  80. // 全选
  81. allSelect() {
  82. if (this.checked) {
  83. this.goods_list.forEach(function(item, index) {
  84. if (!item.storage) {
  85. item.is_select = true
  86. }
  87. })
  88. } else {
  89. this.goods_list.forEach(function(item, index) {
  90. item.is_select = false
  91. })
  92. }
  93. },
  94. //搜索
  95. onSubmit() {
  96. this.page = 1
  97. this.getList()
  98. },
  99. pagination(currentPage) {
  100. this.page = currentPage
  101. this.getList()
  102. },
  103. getList() {
  104. this.listLoading = true;
  105. request({
  106. params: {
  107. r: 'avoid-tax/sokabe/fail',
  108. page: this.page,
  109. limit: 20
  110. },
  111. method: 'post',
  112. data: this.searchData
  113. }).then(e => {
  114. if (e.data.code === 0) {
  115. this.list = e.data.data.list
  116. this.pageCount = e.data.data.page_count
  117. this.currentPage = e.data.data.pagination.current_page
  118. } else {
  119. this.$message.error(e.data.msg)
  120. }
  121. this.listLoading = false
  122. }).catch(e => {
  123. this.listLoading = false
  124. })
  125. },
  126. resetForm() {
  127. this.searchData = {
  128. keyword: undefined
  129. }
  130. },
  131. reSubmit(id) {
  132. this.$confirm('是否确定重新提交?', '提示', {
  133. confirmButtonText: '确定',
  134. cancelButtonText: '取消',
  135. type: 'warning'
  136. }).then(() => {
  137. this.queryBookLoad = true
  138. request({
  139. params: {
  140. r: 'avoid-tax/sokabe/to-fail',
  141. id: id,
  142. }
  143. }).then(e => {
  144. if (e.data.code == 0) {
  145. this.$message.success('操作成功')
  146. this.queryBookLoad = false
  147. } else {
  148. this.$message.error(e.data.msg)
  149. }
  150. }).catch()
  151. }).catch()
  152. },
  153. },
  154. mounted: function() {
  155. this.page = getQuery('page') ? getQuery('page') : 1
  156. this.getList()
  157. }
  158. });
  159. </script>
  160. <style>
  161. .notice {
  162. border: 1px solid rgb(250, 236, 216);
  163. background: rgb(253, 246, 236);
  164. margin-top: 10px;
  165. padding: 10px;
  166. border-radius: 5px;
  167. }
  168. .notice li + li {
  169. margin-top: 5px;
  170. }
  171. </style>