index.php 16 KB

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