index.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. <?
  2. /*
  3. * @Descripttion:
  4. * @version:
  5. * @Author: ewgof
  6. * @Date: 2022-05-18 10:43:57
  7. * @LastEditors: ewgof
  8. * @LastEditTime: 2022-05-18 15:46:14
  9. */
  10. use common\helpers\ComponentHelper;
  11. ComponentHelper::loadComponentView('com-export-dialog');
  12. ?>
  13. <div id="app" v-cloak>
  14. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  15. <!-- <div slot="header">
  16. <span>门店列表</span>
  17. <el-button type="primary" size="small" style="padding: 9px 15px !important; float: right; position: relative; bottom: 8px;" @click="addStore">添加门店</el-button>
  18. </div> -->
  19. <div class="table-body">
  20. <el-tabs type="card" v-model="activityTab" @tab-click="handleTabClick">
  21. <el-tab-pane label="待打款" name="waiting-payment"></el-tab-pane>
  22. <el-tab-pane label="已打款" name="payment"></el-tab-pane>
  23. <el-tab-pane label="驳回" name="refund"></el-tab-pane>
  24. <div style="padding-bottom: 20px;">
  25. <div class="flex">
  26. <div class="flex" style="margin-right: 20px;">
  27. <div class="input-title" style="flex-shrink: 0;">用户ID</div>
  28. <el-input size="small" style="width: 130px;" placeholder="请输入用户ID" v-model="searchData.user_id"> </el-input>
  29. </div>
  30. <div class="flex" style="margin-right: 20px;">
  31. <div class="input-title" style="flex-shrink: 0;">用户昵称</div>
  32. <el-input size="small" style="width: 130px;" placeholder="请输入用户昵称" v-model="searchData.nickname">
  33. </el-input>
  34. </div>
  35. <div class="flex" style="margin-right: 20px;">
  36. <div class="input-title" style="flex-shrink: 0;">创建时间</div>
  37. <el-date-picker v-model="dates" size="small" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="selectedDates"> </el-date-picker>
  38. </div>
  39. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  40. <el-button type="warning" @click="clereSearch" v-if="searchData.user_id || searchData.nickname || searchData.start_time || searchData.end_time" style="padding: 9px 15px !important;">清除搜索条件</el-button>
  41. </div>
  42. <!-- <com-export-dialog style="float: right;margin-top: -31px;" :field_list='exportList' :action_url="exportUrl" :params="searchData"> </com-export-dialog> -->
  43. </div>
  44. <el-table :data="cashdrawList" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  45. <el-table-column label="ID" prop="id" width="80px"></el-table-column>
  46. <el-table-column label="用户信息" align="center" width="200">
  47. <template slot-scope="scope">
  48. <com-image style="float: left;margin-right: 5px;" mode="aspectFill" :src="scope.row.avatar_url"></com-image>
  49. <div>昵称:{{scope.row.nickname}}</div>
  50. <div>ID:{{scope.row.user_id}}</div>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="手机号" prop="mobile" align="center">
  54. <template slot-scope="scope">
  55. <div> <span>{{scope.row.mobile}}</span> </div>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="账户信息" min-width="200" align="center">
  59. <template slot-scope="scope">
  60. <template v-if="scope.row.type == 'wechat'">
  61. <div style="text-align: center"> 微信收款码
  62. <br>
  63. <el-image @click.stop="handleClickItem" :src="scope.row.account_info.wechat_qrcode" :preview-src-list="[scope.row.account_info.wechat_qrcode]" style="height: 80px;width: 80px;">
  64. </el-image>
  65. </div>
  66. </template>
  67. <template v-if="scope.row.type == 'huifu_balance'">
  68. <div>汇付号:{{scope.row.account_info.huifu_no}}</div>
  69. </template>
  70. <template v-if="scope.row.type == 'alipay_offline' || scope.row.type == 'alitopay' || scope.row.type == 'alipay_tax'">
  71. <div>支付宝姓名:{{scope.row.account_info.name}}</div>
  72. <div>支付宝账号:{{scope.row.account_info.mobile}}</div>
  73. </template>
  74. <template v-if="scope.row.type == 'bank'">
  75. <div>开户人:{{scope.row.account_info.name}}</div>
  76. <div>银行卡号:{{scope.row.account_info.bank_account}}</div>
  77. <div>开户行:{{scope.row.account_info.bank_name}}</div>
  78. </template>
  79. <template v-if="scope.row.type == 'joinpay'">
  80. <div v-if="scope.row.account_info.bank_account_type==1">账户类型:对私账户</div>
  81. <div v-if="scope.row.account_info.bank_account_type==2">账户类型:对公账户</div>
  82. <div>持卡人:{{scope.row.account_info.name}}</div>
  83. <div>银行卡号:{{scope.row.account_info.bank_account}}</div>
  84. </template>
  85. </template>
  86. </el-table-column>
  87. <el-table-column label="提现金额" prop="cashdraw_info" align="center">
  88. <template slot-scope="scope">
  89. <div>
  90. <span>提现金额:{{scope.row.num}}</span>
  91. </div>
  92. <div>
  93. <span>手续费:{{scope.row.poundage_num}}</span>
  94. </div>
  95. <div>
  96. <span>实际打款金额:<b style="color: red;">{{scope.row.actual_num}}</b></span>
  97. </div>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="提现方式" prop="type_name" align="center">
  101. </el-table-column>
  102. <el-table-column label="备注" prop="remark" align="center">
  103. </el-table-column>
  104. <el-table-column label="申请时间" prop="user_count" align="center">
  105. <template slot-scope="scope">
  106. <div>
  107. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  108. </div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="操作" prop="user_count" align="center">
  112. <template slot-scope="scope" v-if="activityTab=='waiting-payment'">
  113. <el-button type="text" size="small" @click="auditAction(scope.row.id, 'pass')">确认打款</el-button>
  114. <el-button type="text" size="small" @click="auditAction(scope.row.id, 'refund')">拒绝</el-button>
  115. </template>
  116. </el-table-column>
  117. </el-table>
  118. <div style="text-align: right;margin: 20px 0;">
  119. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  120. </div>
  121. </el-tabs>
  122. </div>
  123. </el-card>
  124. </div>
  125. <script>
  126. const app = new Vue({
  127. el: '#app',
  128. data: {
  129. searchData: {
  130. user_id: null,
  131. nickname: '',
  132. start_time: '',
  133. end_time: '',
  134. curr_tabname: '',
  135. },
  136. dates: null,
  137. activityTab: 'waiting-payment',
  138. currPage: 1,
  139. pageCount: 0,
  140. loading: false,
  141. // 导出路径
  142. exportUrl: 'happiness/store-cashdraw/index',
  143. exportList: {},
  144. cashdrawList: [],
  145. },
  146. mounted() {
  147. this.searchData.curr_tabname = this.activityTab;
  148. this.loadData();
  149. },
  150. methods: {
  151. searchs() {
  152. this.currPage = 1;
  153. this.loadData();
  154. },
  155. clereSearch() {
  156. this.searchData.user_id = null;
  157. this.searchData.nickname = '';
  158. this.searchData.start_time = '';
  159. this.searchData.end_time = '';
  160. this.dates = null;
  161. this.currPage = 1;
  162. this.loadData();
  163. },
  164. // 选中时间
  165. selectedDates(e) {
  166. if (e) {
  167. this.searchData.start_time = e[0];
  168. this.searchData.end_time = e[1];
  169. } else {
  170. this.searchData.start_time = '';
  171. this.searchData.end_time = '';
  172. this.dates = null;
  173. }
  174. this.currPage = 1;
  175. this.loadData();
  176. },
  177. // 标签页切换
  178. handleTabClick(e) {
  179. this.searchData.curr_tabname = this.activityTab;
  180. this.loadData();
  181. },
  182. loadData() {
  183. this.loading = true;
  184. request({
  185. params: {
  186. r: 'happiness/store-cashdraw/index',
  187. page: this.currPage,
  188. tabname: this.activityTab,
  189. ...this.searchData,
  190. },
  191. method: 'get',
  192. }).then(e => {
  193. this.loading = false;
  194. if (e.data.code == 0) {
  195. this.cashdrawList = e.data.data.list;
  196. this.exportList = e.data.data.export_list;
  197. this.pageCount = e.data.data.page_count;
  198. } else {
  199. this.$message.error(e.data.msg);
  200. }
  201. }).catch(e => {
  202. this.loading = false;
  203. });
  204. },
  205. pagination(currentPage) {
  206. let self = this;
  207. self.currPage = currentPage;
  208. self.loadData();
  209. },
  210. // 审核操作
  211. auditAction(id, action, index) {
  212. let self = this;
  213. let tip = notice = '';
  214. if ('pass' == action) {
  215. tip = '是否确认打款?';
  216. notice = '打款备注';
  217. } else {
  218. tip = '是否驳回提现申请?';
  219. notice = '驳回原因';
  220. }
  221. self.loading = true;
  222. self.$prompt(tip, '审核', {
  223. confirmButtonText: '确定',
  224. cancelButtonText: '取消',
  225. inputPlaceholder: '请填写' + notice,
  226. }).then(({
  227. value
  228. }) => {
  229. if (!value) {
  230. value=''
  231. }
  232. request({
  233. params: {
  234. r: 'happiness/store-cashdraw/audit',
  235. },
  236. method: 'post',
  237. data: {
  238. id: id,
  239. action: action,
  240. remark: value,
  241. },
  242. }).then(e => {
  243. self.loading = false;
  244. if (e.data.code == 0) {
  245. self.cashdrawList.splice(index, 1)
  246. self.$message.success('操作成功');
  247. this.loadData();
  248. return true;
  249. } else {
  250. self.$message.error(e.data.msg);
  251. return false;
  252. }
  253. }).catch(e => {
  254. self.$message.error('网络错误');
  255. console.log(e);
  256. });
  257. }).catch(() => {
  258. console.log('取消驳回审核');
  259. });
  260. },
  261. }
  262. });
  263. </script>
  264. <style>
  265. .el-tabs__header {
  266. font-size: 16px;
  267. }
  268. .table-body {
  269. padding: 20px;
  270. background-color: #fff;
  271. }
  272. .input-item {
  273. width: 250px;
  274. margin-right: 40px;
  275. }
  276. .input-item .el-input__inner {
  277. border-right: 0;
  278. }
  279. .input-item .el-input__inner:hover {
  280. border: 1px solid #dcdfe6;
  281. border-right: 0;
  282. outline: 0;
  283. }
  284. .input-item .el-input__inner:focus {
  285. border: 1px solid #dcdfe6;
  286. border-right: 0;
  287. outline: 0;
  288. }
  289. .input-item .el-input-group__append {
  290. background-color: #fff;
  291. border-left: 0;
  292. width: 10%;
  293. padding: 0;
  294. }
  295. .input-item .el-input-group__append .el-button {
  296. padding: 0;
  297. }
  298. .input-item .el-input-group__append .el-button {
  299. margin: 0;
  300. }
  301. .table-body {
  302. padding: 20px;
  303. background-color: #fff;
  304. }
  305. .table-body .el-button {
  306. /* padding: 0 !important; */
  307. padding: 9px;
  308. border: 0;
  309. margin: 0 5px;
  310. }
  311. .input-item {
  312. width: 250px;
  313. margin: 0 0 20px;
  314. display: inline-block;
  315. }
  316. .input-item .el-input__inner {
  317. border-right: 0;
  318. }
  319. .input-item .el-input__inner:hover {
  320. border: 1px solid #dcdfe6;
  321. border-right: 0;
  322. outline: 0;
  323. }
  324. .input-item .el-input__inner:focus {
  325. border: 1px solid #dcdfe6;
  326. border-right: 0;
  327. outline: 0;
  328. }
  329. .input-item .el-input-group__append {
  330. background-color: #fff;
  331. border-left: 0;
  332. width: 10%;
  333. padding: 0;
  334. }
  335. .input-item .el-input-group__append .el-button {
  336. padding: 0;
  337. }
  338. .input-item .el-input-group__append .el-button {
  339. margin: 0;
  340. }
  341. .batch {
  342. margin: 0 0 20px;
  343. display: inline-block;
  344. }
  345. .batch .el-button {
  346. padding: 9px 15px !important;
  347. }
  348. .el-table th>.cell {
  349. color: #333;
  350. font-weight: bold;
  351. font-size: 14px;
  352. }
  353. .el-table__footer-wrapper,
  354. .el-table__header-wrapper {
  355. border-bottom: 1.4px solid #D6D6D6;
  356. }
  357. .el-table .el-button {
  358. padding: 0 !important;
  359. border: 0;
  360. margin: 0 5px;
  361. }
  362. #app .copy .el-input-group__append {
  363. background-color: #409EFF;
  364. border-color: #409EFF;
  365. padding: 0 10px;
  366. }
  367. #app .table-body .copybtn {
  368. color: #fff;
  369. padding: 0 30px;
  370. }
  371. .el-alert {
  372. padding: 0;
  373. padding-left: 5px;
  374. padding-bottom: 5px;
  375. }
  376. .el-alert--info .el-alert__description {
  377. color: #606266;
  378. }
  379. .el-alert .el-button {
  380. margin-left: 20px;
  381. }
  382. .el-alert__content {
  383. display: flex;
  384. align-items: center;
  385. }
  386. .table-body .el-alert__title {
  387. margin-top: 5px;
  388. font-weight: 400;
  389. }
  390. .el-table th>.cell {
  391. color: #333;
  392. font-weight: bold;
  393. font-size: 14px;
  394. }
  395. .el-table__footer-wrapper,
  396. .el-table__header-wrapper {
  397. border-bottom: 1.4px solid #D6D6D6;
  398. }
  399. .item-box {
  400. margin-right: 20px;
  401. }
  402. .flex {
  403. display: flex;
  404. align-items: center;
  405. }
  406. .input-title {
  407. margin-right: 15px;
  408. }
  409. .item-box .label {
  410. margin-right: 8px;
  411. }
  412. .com-share-pop {
  413. display: inline-block;
  414. }
  415. .stat-item {
  416. margin: 10px 0px;
  417. padding-left: 7px;
  418. color: #A2A2A2;
  419. }
  420. .stat-item>span {
  421. margin: 0px 10px;
  422. }
  423. </style>