index.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  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 class="table-body">
  16. <el-tabs type="card" v-model="activityTab" @tab-click="handleTabClick">
  17. <el-tab-pane label="待打款" name="waiting-payment"></el-tab-pane>
  18. <el-tab-pane label="已打款" name="payment"></el-tab-pane>
  19. <el-tab-pane label="驳回" name="refund"></el-tab-pane>
  20. <div style="padding-bottom: 20px;">
  21. <div class="flex">
  22. <div class="flex" style="margin-right: 20px;">
  23. <div class="input-title" style="flex-shrink: 0;">会员ID</div>
  24. <el-input size="small" style="width: 130px;" placeholder="请输入会员ID" v-model="searchData.user_id"> </el-input>
  25. </div>
  26. <div class="flex" style="margin-right: 20px;">
  27. <div class="input-title" style="flex-shrink: 0;">会员昵称</div>
  28. <el-input size="small" style="width: 130px;" placeholder="请输入会员昵称" v-model="searchData.nickname">
  29. </el-input>
  30. </div>
  31. <div class="flex" style="margin-right: 20px;">
  32. <div class="input-title" style="flex-shrink: 0;">创建时间</div>
  33. <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>
  34. </div>
  35. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  36. <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>
  37. </div>
  38. <com-export-dialog style="float: right;margin-top: -31px;" :field_list='exportList' :action_url="exportUrl" :params="searchData"> </com-export-dialog>
  39. </div>
  40. <el-table :data="cashdrawList" v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  41. <el-table-column label="ID" prop="id"></el-table-column>
  42. <el-table-column label="会员信息" width="150">
  43. <template slot-scope="scope">
  44. <div class="table-info-img-text">
  45. <el-image class="table-info-img circle" :src="scope.row.avatar_url">
  46. <div slot="error" class="image-slot">
  47. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  48. </div>
  49. </el-image>
  50. <div class="table-info-text">
  51. <div style="color:#000;">{{scope.row.nickname}}</div>
  52. </div>
  53. </div>
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="手机号" prop="mobile" align="center">
  57. <template slot-scope="scope">
  58. <div> <span>{{scope.row.mobile}}</span> </div>
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="账户信息" min-width="200" align="center">
  62. <template slot-scope="scope">
  63. <template v-if="scope.row.type == 'wechat'">
  64. <div style="text-align: center"> 微信收款码
  65. <br>
  66. <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;">
  67. </el-image>
  68. </div>
  69. </template>
  70. <template v-if="scope.row.type == 'alitopay' || scope.row.type == 'alipay_offline' || 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>
  101. <el-table-column label="提现方式" prop="type_name" align="center">
  102. </el-table-column>
  103. <el-table-column label="备注" prop="remark" align="center"></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 v-if="scope.row.type == 'alitopay'" type="text" size="small" @click="auditAction(scope.row, 'pass')">代付打款</el-button>
  114. <el-button v-else type="text" size="small" @click="auditAction(scope.row, 'pass')">确认打款</el-button>
  115. <el-button type="text" size="small" @click="auditAction(scope.row, 'refund')">拒绝</el-button>
  116. </template>
  117. </el-table-column>
  118. </el-table>
  119. <div style="text-align: right;margin: 20px 0;">
  120. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  121. </div>
  122. </el-tabs>
  123. </div>
  124. </el-card>
  125. </div>
  126. <script>
  127. const app = new Vue({
  128. el: '#app',
  129. data: {
  130. searchData: {
  131. user_id: null,
  132. nickname: '',
  133. start_time: '',
  134. end_time: '',
  135. curr_tabname: '',
  136. },
  137. dates: null,
  138. activityTab: 'waiting-payment',
  139. currPage: 1,
  140. pageCount: 0,
  141. loading: false,
  142. // 导出路径
  143. exportUrl: 'mch/store-cashdraw/index',
  144. exportList: {},
  145. cashdrawList: [],
  146. },
  147. mounted() {
  148. this.searchData.curr_tabname = this.activityTab;
  149. this.loadData();
  150. },
  151. methods: {
  152. searchs() {
  153. this.currPage = 1;
  154. this.loadData();
  155. },
  156. clereSearch() {
  157. this.searchData.user_id = null;
  158. this.searchData.nickname = '';
  159. this.searchData.start_time = '';
  160. this.searchData.end_time = '';
  161. this.dates = null;
  162. this.currPage = 1;
  163. this.loadData();
  164. },
  165. // 选中时间
  166. selectedDates(e) {
  167. if (e) {
  168. this.searchData.start_time = e[0];
  169. this.searchData.end_time = e[1];
  170. } else {
  171. this.searchData.start_time = '';
  172. this.searchData.end_time = '';
  173. this.dates = null;
  174. }
  175. this.currPage = 1;
  176. this.loadData();
  177. },
  178. // 标签页切换
  179. handleTabClick(e) {
  180. this.searchData.curr_tabname = this.activityTab;
  181. this.loadData();
  182. },
  183. loadData() {
  184. this.loading = true;
  185. request({
  186. params: {
  187. r: 'mch/store-cashdraw/index',
  188. page: this.currPage,
  189. tabname: this.activityTab,
  190. ...this.searchData,
  191. },
  192. method: 'get',
  193. }).then(e => {
  194. this.loading = false;
  195. if (e.data.code == 0) {
  196. this.cashdrawList = e.data.data.list;
  197. this.exportList = e.data.data.export_list;
  198. this.pageCount = e.data.data.page_count;
  199. } else {
  200. this.$message.error(e.data.msg);
  201. }
  202. }).catch(e => {
  203. this.loading = false;
  204. });
  205. },
  206. pagination(currentPage) {
  207. let self = this;
  208. self.currPage = currentPage;
  209. self.loadData();
  210. },
  211. // 审核操作
  212. auditAction(row, action, index) {
  213. let self = this;
  214. let tip = notice = '';
  215. if ('pass' == action) {
  216. tip = '是否确认打款?';
  217. notice = '打款备注';
  218. } else {
  219. tip = '是否驳回提现申请?';
  220. notice = '驳回原因';
  221. }
  222. self.loading = true;
  223. self.$prompt(tip, '审核', {
  224. confirmButtonText: '确定',
  225. cancelButtonText: '取消',
  226. inputPlaceholder: '请填写' + notice,
  227. }).then(({
  228. value
  229. }) => {
  230. if (!value) {
  231. self.loading = false;
  232. self.$message.error(notice + '不能为空');
  233. return false;
  234. }
  235. request({
  236. params: {
  237. r: 'mch/store-cashdraw/audit',
  238. },
  239. method: 'post',
  240. data: {
  241. id: row.id,
  242. action: action,
  243. remark: value,
  244. },
  245. }).then(e => {
  246. self.loading = false;
  247. if (e.data.code == 0) {
  248. self.cashdrawList.splice(index, 1)
  249. self.$message.success('操作成功');
  250. this.loadData();
  251. return true;
  252. } else {
  253. self.$message.error(e.data.msg);
  254. return false;
  255. }
  256. }).catch(e => {
  257. self.$message.error('网络错误');
  258. console.log(e);
  259. });
  260. }).catch(() => {
  261. console.log('取消驳回审核');
  262. });
  263. },
  264. }
  265. });
  266. </script>
  267. <style>
  268. .table-body{
  269. padding: 20px;
  270. background-color: #fff;
  271. }
  272. .input-item {
  273. width: 250px;
  274. margin: 0 10px 20px;
  275. display: inline-block;
  276. }
  277. .flexcenter{
  278. display:flex;
  279. justify-content: center;
  280. align-items: center;
  281. }
  282. .el-tabs__header {
  283. font-size: 16px;
  284. }
  285. .table-body {
  286. padding: 20px;
  287. background-color: #fff;
  288. }
  289. .input-item {
  290. width: 250px;
  291. margin-right: 40px;
  292. }
  293. .input-item .el-input__inner {
  294. border-right: 0;
  295. }
  296. .input-item .el-input__inner:hover {
  297. border: 1px solid #dcdfe6;
  298. border-right: 0;
  299. outline: 0;
  300. }
  301. .input-item .el-input__inner:focus {
  302. border: 1px solid #dcdfe6;
  303. border-right: 0;
  304. outline: 0;
  305. }
  306. .input-item .el-input-group__append {
  307. background-color: #fff;
  308. border-left: 0;
  309. width: 10%;
  310. padding: 0;
  311. }
  312. .input-item .el-input-group__append .el-button {
  313. padding: 0;
  314. }
  315. .input-item .el-input-group__append .el-button {
  316. margin: 0;
  317. }
  318. .table-body {
  319. padding: 20px;
  320. background-color: #fff;
  321. }
  322. .table-body .el-button {
  323. /* padding: 0 !important; */
  324. padding: 9px;
  325. border: 0;
  326. margin: 0 5px;
  327. }
  328. .input-item {
  329. width: 250px;
  330. margin: 0 0 20px;
  331. display: inline-block;
  332. }
  333. .input-item .el-input__inner {
  334. border-right: 0;
  335. }
  336. .input-item .el-input__inner:hover {
  337. border: 1px solid #dcdfe6;
  338. border-right: 0;
  339. outline: 0;
  340. }
  341. .input-item .el-input__inner:focus {
  342. border: 1px solid #dcdfe6;
  343. border-right: 0;
  344. outline: 0;
  345. }
  346. .input-item .el-input-group__append {
  347. background-color: #fff;
  348. border-left: 0;
  349. width: 10%;
  350. padding: 0;
  351. }
  352. .input-item .el-input-group__append .el-button {
  353. padding: 0;
  354. }
  355. .input-item .el-input-group__append .el-button {
  356. margin: 0;
  357. }
  358. .batch {
  359. margin: 0 0 20px;
  360. display: inline-block;
  361. }
  362. .batch .el-button {
  363. padding: 9px 15px !important;
  364. }
  365. .el-table th>.cell {
  366. color: #333;
  367. font-weight: bold;
  368. font-size: 14px;
  369. }
  370. .el-table__footer-wrapper,
  371. .el-table__header-wrapper {
  372. border-bottom: 1.4px solid #D6D6D6;
  373. }
  374. .el-table .el-button {
  375. padding: 0 !important;
  376. border: 0;
  377. margin: 0 5px;
  378. }
  379. #app .copy .el-input-group__append {
  380. background-color: #409EFF;
  381. border-color: #409EFF;
  382. padding: 0 10px;
  383. }
  384. #app .table-body .copybtn {
  385. color: #fff;
  386. padding: 0 30px;
  387. }
  388. .el-alert {
  389. padding: 0;
  390. padding-left: 5px;
  391. padding-bottom: 5px;
  392. }
  393. .el-alert--info .el-alert__description {
  394. color: #606266;
  395. }
  396. .el-alert .el-button {
  397. margin-left: 20px;
  398. }
  399. .el-alert__content {
  400. display: flex;
  401. align-items: center;
  402. }
  403. .table-body .el-alert__title {
  404. margin-top: 5px;
  405. font-weight: 400;
  406. }
  407. .el-table th>.cell {
  408. color: #333;
  409. font-weight: bold;
  410. font-size: 14px;
  411. }
  412. .el-table__footer-wrapper,
  413. .el-table__header-wrapper {
  414. border-bottom: 1.4px solid #D6D6D6;
  415. }
  416. .item-box {
  417. margin-right: 20px;
  418. }
  419. .flex {
  420. display: flex;
  421. align-items: center;
  422. }
  423. .input-title {
  424. margin-right: 15px;
  425. }
  426. .item-box .label {
  427. margin-right: 8px;
  428. }
  429. .com-share-pop {
  430. display: inline-block;
  431. }
  432. .stat-item {
  433. margin: 10px 0px;
  434. padding-left: 7px;
  435. color: #A2A2A2;
  436. }
  437. .stat-item>span {
  438. margin: 0px 10px;
  439. }
  440. </style>