index.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" 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. <div class="input-item">
  11. <el-input @keyup.enter.native="search" size="small" placeholder="批次号" v-model="searchData.batch_sn" clearable @clear="search"></el-input>
  12. </div>
  13. 收款人:
  14. <div class="input-item">
  15. <el-input @keyup.enter.native="search" size="small" placeholder="收款人" v-model="searchData.name" clearable @clear="search"></el-input>
  16. </div>
  17. 收款账户:
  18. <div class="input-item">
  19. <el-input @keyup.enter.native="search" size="small" placeholder="收款账户" v-model="searchData.account" clearable @clear="search"></el-input>
  20. </div>
  21. <br>
  22. 提现订单:
  23. <div class="input-item">
  24. <el-input @keyup.enter.native="search" size="small" placeholder="提现订单" v-model="searchData.source_sn" clearable @clear="search"></el-input>
  25. </div>
  26. 订单类型:
  27. <div class="input-item">
  28. <el-select size="small" v-model="searchData.type" @change='search' class="select">
  29. <el-option :key="1" label="提现打款" value="1" >提现打款</el-option>
  30. <el-option :key="2" label="手动转账" value="2" >手动转账</el-option>
  31. </el-select>
  32. </div>
  33. 状态:
  34. <div class="input-item">
  35. <el-select size="small" v-model="searchData.status" @change='search' class="select">
  36. <el-option :key="1" label="待打款" value="1" >待打款</el-option>
  37. <el-option :key="2" label="打款中" value="2" >打款中</el-option>
  38. <el-option :key="3" label="成功" value="3" >成功</el-option>
  39. <el-option :key="4" label="失败" value="4" >失败</el-option>
  40. <el-option :key="5" label="超时" value="5" >超时</el-option>
  41. </el-select>
  42. </div>
  43. <div class="input-item" style="display: inline-block;margin-left: 10px;">
  44. <el-button type="primary" size="small" @click="search">查询</el-button>
  45. <el-button type="primary" size="small" @click="resetForm" style=" margin-left: 0px;background-color: #ef1818;border-color: #ef1818;">重置</el-button>
  46. </div>
  47. <el-table v-loading="listLoading" :data="list" stripe>
  48. <!-- 空数据 -->
  49. <template slot="empty">
  50. <el-empty description="暂无通知"></el-empty>
  51. </template>
  52. <el-table-column prop="id" width="80px" label="ID" align="center">
  53. </el-table-column>
  54. <el-table-column prop="batch_sn" width="120px" label="批次号/订单号" align="center">
  55. <template slot-scope="scope">
  56. {{scope.row.batch_sn}}<br>
  57. {{scope.row.order_sn}}
  58. </template>
  59. </el-table-column>
  60. <el-table-column prop="response" label="收款人" align="center">
  61. <template slot-scope="scope">
  62. {{scope.row.name}}<br>
  63. {{scope.row.account}}
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="money" width="120px" label="打款金额" align="center">
  67. </el-table-column>
  68. <el-table-column prop="data" label="类型" align="center">
  69. <template slot-scope="scope">
  70. <span v-if="scope.row.type == 1">
  71. 提现打款
  72. <br>
  73. {{scope.row.source_sn}}
  74. </span>
  75. <span v-else>
  76. 手动打款
  77. </span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column width="120px" label="状态" align="center">
  81. <template slot-scope="scope">
  82. <span v-if="scope.row.status == 1">
  83. 待打款
  84. </span>
  85. <span v-if="scope.row.status == 2">
  86. 打款中
  87. </span>
  88. <span v-if="scope.row.status == 3">
  89. 打款成功
  90. </span>
  91. <span v-if="scope.row.status == 4">
  92. 打款失败
  93. </span>
  94. <span v-if="scope.row.status == 5">
  95. 订单超时
  96. </span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column prop="created_at" min-width="120px" label="创建/修改时间" align="center">
  100. <template slot-scope="scope">
  101. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}<br>
  102. {{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}
  103. </template>
  104. </el-table-column>
  105. <el-table-column prop="msg" width="80px" label="失败信息" align="center">
  106. </el-table-column>
  107. <el-table-column align="center" label="操作">
  108. <template slot-scope="scope">
  109. <el-button @click="toPay(scope.row)" v-if="scope.row.status == 1" type="text" size="small">打款</el-button>
  110. <el-button @click="orderQuery(scope.row)" v-if="scope.row.status == 2" type="text" size="small">查询</el-button>
  111. <el-button @click="orderApplyBill(scope.row)" v-if="scope.row.status == 3 &&scope.row.download_url == ''" type="text" size="small">申请电子回单</el-button>
  112. <el-button @click="seeBill(scope.row)" v-if="scope.row.status == 3 &&scope.row.download_url != ''" type="text" size="small">电子回单</el-button>
  113. </template>
  114. </el-table-column>
  115. </el-table>
  116. <div style="text-align: right;margin: 20px 0;" v-if="list">
  117. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount">
  118. </el-pagination>
  119. </div>
  120. </div>
  121. </el-card>
  122. </div>
  123. <script>
  124. const app = new Vue({
  125. el: '#app',
  126. data() {
  127. return {
  128. searchData:{
  129. name:undefined,
  130. batch_sn:undefined,
  131. account:undefined,
  132. source_sn:undefined,
  133. type:undefined,
  134. status:undefined,
  135. r: 'alitopay/order/index',
  136. },
  137. list: [],
  138. type: '',
  139. supply_id: '',
  140. listLoading: false,
  141. page: 1,
  142. pageCount: 0,
  143. };
  144. },
  145. methods: {
  146. search() {
  147. this.page = 1;
  148. this.getList();
  149. },
  150. //重置
  151. resetForm() {
  152. this.searchData.name= undefined
  153. this.searchData.batch_sn= undefined
  154. this.searchData.account= undefined
  155. this.searchData.source_sn= undefined
  156. this.searchData.type= undefined
  157. this.searchData.status= undefined
  158. },
  159. pagination(currentPage) {
  160. let self = this;
  161. self.page = currentPage;
  162. self.getList();
  163. },
  164. orderQuery(order){
  165. this.listLoading = true;
  166. request({
  167. params: {
  168. r:'alitopay/order/query',
  169. id:order.id
  170. },
  171. method: 'get',
  172. }).then(e => {
  173. this.listLoading = false;
  174. if (e.data.code == 0){
  175. this.$message.success(e.data.msg);
  176. this.getList()
  177. }else{
  178. this.$message.error(e.data.msg);
  179. }
  180. }).catch(e => {
  181. });
  182. },
  183. orderApplyBill(order){
  184. this.listLoading = true;
  185. request({
  186. params: {
  187. r:'alitopay/order/apply-bill',
  188. id:order.id
  189. },
  190. method: 'get',
  191. }).then(e => {
  192. this.listLoading = false;
  193. if (e.data.code == 0){
  194. this.$message.success(e.data.msg);
  195. this.getList()
  196. }else{
  197. this.$message.error(e.data.msg);
  198. }
  199. }).catch(e => {
  200. });
  201. },
  202. seeBill(order){
  203. window.open(order.download_url,'top')
  204. },
  205. getList() {
  206. this.listLoading = true;
  207. request({
  208. params:this.searchData,
  209. method: 'get',
  210. }).then(e => {
  211. this.listLoading = false;
  212. this.list = e.data.data.list;
  213. this.pageCount = e.data.data.page_count;
  214. }).catch(e => {
  215. });
  216. },
  217. },
  218. mounted: function() {
  219. this.getList();
  220. }
  221. });
  222. </script>
  223. <style>
  224. .table-body {
  225. padding: 20px;
  226. background-color: #fff;
  227. }
  228. .input-item {
  229. display: inline-block;
  230. width: 250px;
  231. margin: 0 0 20px;
  232. }
  233. .input-item .el-input__inner:hover {
  234. border: 1px solid #dcdfe6;
  235. border-right: 0;
  236. outline: 0;
  237. }
  238. .input-item .el-input__inner:focus {
  239. border: 1px solid #dcdfe6;
  240. border-right: 0;
  241. outline: 0;
  242. }
  243. .input-item .el-input-group__append {
  244. background-color: #fff;
  245. border-left: 0;
  246. width: 10%;
  247. padding: 0;
  248. }
  249. .input-item .el-input-group__append .el-button {
  250. padding: 0;
  251. }
  252. .input-item .el-input-group__append .el-button {
  253. margin: 0;
  254. }
  255. .table-body .el-button {
  256. border: 0;
  257. margin: 0 5px;
  258. }
  259. .el-table th>.cell {
  260. color: #333;
  261. font-weight: bold;
  262. font-size: 14px;
  263. }
  264. .el-table__footer-wrapper,
  265. .el-table__header-wrapper {
  266. border-bottom: 1.4px solid #D6D6D6;
  267. }
  268. </style>