pay-order-list.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. @extends('layouts.base')
  2. @section('title', "支付管理")
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <style>
  6. .p-text {
  7. font-family: SourceHanSansCN-Regular;
  8. font-size: 14px;
  9. font-weight: normal;
  10. font-stretch: normal;
  11. letter-spacing: 0px;
  12. color: #333333;
  13. /* border:1px solid red; */
  14. text-align: center;
  15. }
  16. </style>
  17. <div class="all">
  18. <div id="app" v-cloak>
  19. <div class="vue-head">
  20. <div class="vue-main-title" style="margin-bottom:20px">
  21. <div class="vue-main-title-left"></div>
  22. <div class="vue-main-title-content">筛选条件</div>
  23. <div class="vue-main-title-button">
  24. </div>
  25. </div>
  26. <div class="vue-search">
  27. <div>
  28. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  29. <el-form-item label="">
  30. <el-input v-model="search_form.pay_sn" placeholder="支付单号"></el-input>
  31. </el-form-item>
  32. <el-form-item label="">
  33. <el-select v-model="search_form.status" clearable placeholder="状态" style="width:150px">
  34. <el-option label="未支付" value="0"></el-option>
  35. <el-option label="待分账" value="1"></el-option>
  36. <el-option label="已分账" value="2"></el-option>
  37. </el-select>
  38. </el-form-item>
  39. <el-form-item label="">
  40. <el-button type="primary" icon="el-icon-search" @click="search(1)">搜索
  41. </el-button>
  42. </el-form-item>
  43. </el-form>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="vue-main">
  48. <div class="vue-main-title" style="">
  49. <div class="vue-main-title-left"></div>
  50. <div class="vue-main-title-content">
  51. 支付列表
  52. <span style="text-align:left;font-size:14px;color:#999">
  53. <span style="color: red">提示:微信规定支付时间超过7天以上的才可进行分账</span>&nbsp;&nbsp;&nbsp;
  54. </span>
  55. </div>
  56. <div class="vue-main-title-button">
  57. <a target="_blank" class="btn btn-success" href="{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.fix')!!}" >同步旧数据</a>
  58. </div>
  59. </div>
  60. <div class="vue-main-title" style="margin-bottom:20px">
  61. <el-table v-loading="loading" :data="list" style="width: 100%">
  62. <el-table-column label="支付时间" align="center">
  63. <template slot-scope="scope">
  64. <span>[[scope.row.pay_time_str]]</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="支付单号" align="center">
  68. <template slot-scope="scope">
  69. <span>[[scope.row.trade_no]]</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column label="金额" align="center">
  73. <template slot-scope="scope">
  74. <span v-if="scope.row.notice_params.amount" style="margin-left: 10px">[[scope.row.notice_params.amount]]</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column label="会员ID" align="center">
  78. <template slot-scope="scope">
  79. <span v-if="scope.row.has_one_min_openid !== null" style="margin-left: 10px">[[scope.row.has_one_min_openid.member_id]]</span>
  80. </template>
  81. </el-table-column>
  82. <el-table-column label="关联订单ID" align="center">
  83. <template slot-scope="scope">
  84. <span v-if="scope.row.has_one_order_pay !== null" style="margin-left: 10px">[[scope.row.has_one_order_pay.order_ids]]</span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column width="80px" label="状态" align="center" prop="status_name"></el-table-column>
  88. <el-table-column label="错误信息">
  89. <template slot-scope="scope">
  90. <span style="margin-left: 10px">[[scope.row.error_msg]]</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column prop="" label="操作" align="center" width="170px">
  94. <template slot-scope="scope">
  95. <div>
  96. <el-button v-if="scope.row.status == 1" :disabled="isLock" @click="divideAccount(scope.row.id)" size="mini" type="primary">分账</el-button>
  97. <el-button v-if="!scope.row.openid" @click="bindMemberShow(scope.row.id)" size="mini" type="warning">
  98. 绑定用户
  99. </el-button>
  100. </div>
  101. </template>
  102. </el-table-column>
  103. </el-table>
  104. </div>
  105. </div>
  106. <!-- 分页 -->
  107. <div class="vue-page" v-if="total>0">
  108. <el-row>
  109. <el-col align="right">
  110. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  111. :page-size="per_size" :current-page="current_page" background
  112. ></el-pagination>
  113. </el-col>
  114. </el-row>
  115. </div>
  116. <el-dialog :visible.sync="member_show" width="700px" center title="绑定用户微信标识">
  117. <div style="overflow:auto">
  118. <div style="text-align: center;margin-bottom: 10px">
  119. 警告:只能绑定一次无法重复绑定, 切记切记切记
  120. </div>
  121. <el-form label-width="20%">
  122. <el-form-item label="会员ID">
  123. <el-input style="width:50%;" v-model="bing_member_id" placeholder="输入会员ID"></el-input>
  124. <div style="font-size:16px;color: red">
  125. 由于不可抗因素支付记录可能没有保存到会员的微信openid,<br/>
  126. 所以需要人工手动绑定下该笔支付记录对应的会员,<br/>
  127. 分账需要用户小程序微信openid
  128. </div>
  129. </el-form-item>
  130. </el-form>
  131. </div>
  132. <span slot="footer" class="dialog-footer">
  133. <el-button type="success" @click="bindOpenid()">绑定</el-button>
  134. <el-button @click="single_synchronize_goods = false">关 闭</el-button>
  135. </span>
  136. </el-dialog>
  137. </div>
  138. </div>
  139. <script>
  140. var app = new Vue({
  141. el: "#app",
  142. delimiters: ['[[', ']]'],
  143. name: 'test',
  144. data() {
  145. return {
  146. member_show:false,
  147. bind_order_id:'',
  148. bing_member_id:'',
  149. isLock:false,
  150. search_form:{},
  151. list: [],
  152. //页码数
  153. current_page: 1,
  154. //一页显示数据
  155. per_size: 1,
  156. //总页数
  157. total: 1,
  158. //加载
  159. loading: false,
  160. operationType:'',
  161. operationOrder:{},
  162. dialog_show:0,
  163. }
  164. },
  165. created() {
  166. // let result = this.viewReturn();
  167. // this.__initial(result);
  168. this.search(1);
  169. },
  170. mounted() {
  171. // console.log(this.search_form);
  172. },
  173. methods: {
  174. search(page) {
  175. let that = this;
  176. that.loading = true;
  177. that.$http.post("{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.get-list')!!}", {
  178. page: page,
  179. search: that.search_form,
  180. }).then(response => {
  181. console.log(response);
  182. if (response.data.result == 1) {
  183. that.list = response.data.data.data;
  184. that.total = response.data.data.total;
  185. that.current_page = response.data.data.current_page;
  186. that.per_size = response.data.data.per_page;
  187. } else {
  188. that.$message.error(response.data.msg);
  189. }
  190. that.loading = false;
  191. }), function (res) {
  192. console.log(res);
  193. that.loading = false;
  194. };
  195. },
  196. bindMemberShow(id) {
  197. this.bind_order_id = id;
  198. this.member_show = true;
  199. },
  200. bindOpenid() {
  201. this.$http.post("{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.bind-openid')!!}", {
  202. bind_order_id:this.bind_order_id,
  203. bing_member_id:this.bing_member_id,
  204. }).then(res => {
  205. if (res.data.result === 1) {
  206. this.$message.success(res.data.msg);
  207. this.member_show = false;
  208. this.search(this.currentPage);
  209. } else {
  210. this.$message.error(res.data.msg)
  211. }
  212. }), function (res) {
  213. console.log(res);
  214. };
  215. },
  216. divideAccount(id) {
  217. this.isLock = true;
  218. //点击确定的操作(调用接口)
  219. this.$http.post("{!!yzWebFullUrl('plugin.min-app.Backend.Controllers.pay-manage-order.divide-account')!!}", {id: id}).then(res => {
  220. if (res.data.result === 1) {
  221. this.$message.success(res.data.msg);
  222. this.search(this.currentPage);
  223. } else {
  224. this.$message.error(res.data.msg)
  225. }
  226. this.isLock = false;
  227. }), function (res) {
  228. console.log(res);
  229. this.isLock = false;
  230. };
  231. },
  232. // 字符转义
  233. escapeHTML(a) {
  234. a = "" + a;
  235. return a.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&apos;/g, "'");;
  236. },
  237. getParam(name) {
  238. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  239. var r = window.location.search.substr(1).match(reg);
  240. if (r != null) return unescape(r[2]);
  241. return null;
  242. },
  243. },
  244. })
  245. </script>
  246. @endsection