index.php 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-export-dialog');
  4. ?>
  5. <div id="app" v-cloak>
  6. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 0 0;position: relative;">
  7. <div slot="header">
  8. <span>提现审核</span>
  9. <div style="float: right; margin: -10px 10px;">
  10. <el-button type="primary" size="small" @click="handle('open', 1)">批量审核</el-button>
  11. <el-button type="primary" size="small" @click="handle('open', 2)">批量打款</el-button>
  12. </div>
  13. <div style="float: right; margin: -5px 0">
  14. <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' :action_url="export_url" :params="search">
  15. </com-export-dialog>
  16. </div>
  17. </div>
  18. <br />
  19. <div class="input-item">
  20. <el-input size="small" placeholder="请输入会员id" v-model="search.user_id" clearable>
  21. </el-input>
  22. </div>
  23. <div class="input-item">
  24. <el-input size="small" placeholder="会员昵称/手机号" v-model="search.keyword" clearable>
  25. </el-input>
  26. </div>
  27. <el-select size="small" v-model="search.withdraw_type" placeholder="提现方式" @change='handleClick' class="select">
  28. <el-option key="auto" label="自动打款" value="auto"></el-option>
  29. <el-option key="wechat" label="微信打款" value="wechat"></el-option>
  30. <el-option key="alipay" label="支付宝打款" value="alipay"></el-option>
  31. <el-option key="alipay_tax" label="支付宝合规" value="alipay_tax"></el-option>
  32. <el-option key="bank" label="银行转账" value="bank"></el-option>
  33. <el-option key="balance" label="打款到余额" value="balance"></el-option>
  34. <el-option key="joinpay" label="提现到银行卡-汇聚" value="joinpay"></el-option>
  35. </el-select>
  36. <el-select size="small" v-model="search.withdraw_from" placeholder="提现类型" @change='handleClick' class="select">
  37. <el-option key="0" label="全部" value=""></el-option>
  38. <el-option key="2" label="余额" value="2"></el-option>
  39. <el-option key="1" label="佣金" value="1"></el-option>
  40. </el-select>
  41. <el-date-picker size="small" v-model="date" type="datetimerange" style="float: left" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" @change="selectDateTime" end-placeholder="结束日期">
  42. </el-date-picker>
  43. <div class="input-item search_float">
  44. <el-button type="primary" size="small" icon="el-icon-search" @click="handleClick" class="search_button">搜索</el-button>
  45. </div>
  46. <el-tabs v-model="activeName" @tab-click="handleClick">
  47. <el-tab-pane label="全部" name="-1"></el-tab-pane>
  48. <el-tab-pane label="未审核" name="0"></el-tab-pane>
  49. <el-tab-pane label="待打款" name="1"></el-tab-pane>
  50. <el-tab-pane label="打款中" name="5"></el-tab-pane>
  51. <el-tab-pane label="已打款" name="2"></el-tab-pane>
  52. <el-tab-pane label="驳回" name="3"></el-tab-pane>
  53. <div class="table-body">
  54. <div v-if="activeName == 1">
  55. <el-button type="primary" v-if="alipay.alitopay_switch" size="mini" @click="alitopayBatch">
  56. 支付宝批量
  57. </el-button>
  58. <el-button type="primary" v-if="alipay.avoidtax_switch" size="mini" @click="avoidtaxBatch" style="background-color: #189794">
  59. 合规批量
  60. </el-button>
  61. </div>
  62. <el-table :data="list" size="small" stripe @selection-change="handleSelectionChange" v-loading="loading" style="margin-bottom: 15px">
  63. <el-table-column type="selection" align="center" width="60"></el-table-column>
  64. <el-table-column prop="id" label="ID" min-width="100" align="center"></el-table-column>
  65. <el-table-column prop="user.id" label="会员ID" min-width="100" align="center"></el-table-column>
  66. <el-table-column label="基本信息" min-width="200">
  67. <template slot-scope="scope">
  68. <div class="table-info-img-text">
  69. <el-image class="table-info-img circle" :src="scope.row.user.avatar">
  70. <div slot="error" class="image-slot">
  71. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  72. </div>
  73. </el-image>
  74. <div class="table-info-text">
  75. <div v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
  76. <div>{{scope.row.user.mobile}}</div>
  77. <div>{{scope.row.user.avatar_url}}</div>
  78. </div>
  79. </div>
  80. <img src="statics/img/mall/wx.png" v-if="scope.row.user.platform == 'mp-wx'" alt="">
  81. <img src="statics/img/mall/ali.png" v-else-if="scope.row.user.platform == 'mp-ali'" alt="">
  82. <img src="statics/img/mall/toutiao.png" v-else-if="scope.row.user.platform == 'mp-tt'" alt="">
  83. <img src="statics/img/mall/baidu.png" v-else-if="scope.row.user.platform == 'mp-bd'" alt="">
  84. </template>
  85. </el-table-column>
  86. <!-- <el-table-column label="提现类型" min-width="150">
  87. <template slot-scope="scope">
  88. <template v-if="scope.row.from == 1">
  89. <div>佣金收益提现</div>
  90. </template>
  91. <template v-if="scope.row.from == 2">
  92. <div>余额提现</div>
  93. </template>
  94. </template>
  95. </el-table-column> -->
  96. <el-table-column label="账户信息" min-width="200" align="center">
  97. <template slot-scope="scope">
  98. <template v-if="scope.row.type == 'wechat'">
  99. <div style="text-align: center"> 微信收款码
  100. <br>
  101. <el-image @click.stop="handleClickItem" :src="scope.row.extra.wechat_qrcode" :preview-src-list="[scope.row.extra.wechat_qrcode]" style="height: 80px;width: 80px;">
  102. </el-image>
  103. </div>
  104. </template>
  105. <template v-if="scope.row.type == 'alipay' || scope.row.type == 'alipay_tax'">
  106. <div>支付宝姓名:{{scope.row.extra.name}}</div>
  107. <div>支付宝账号:{{scope.row.extra.mobile}}</div>
  108. </template>
  109. <template v-if="scope.row.type == 'bank'">
  110. <div>开户人:{{scope.row.extra.name}}</div>
  111. <div>银行卡号:{{scope.row.extra.bank_account}}</div>
  112. <div>开户行:{{scope.row.extra.bank_name}}</div>
  113. </template>
  114. <template v-if="scope.row.type == 'joinpay'">
  115. <div v-if="scope.row.extra.bank_account_type==1">账户类型:对私账户</div>
  116. <div v-if="scope.row.extra.bank_account_type==2">账户类型:对公账户</div>
  117. <div>持卡人:{{scope.row.extra.name}}</div>
  118. <div>银行卡号:{{scope.row.extra.bank_account}}</div>
  119. </template>
  120. <template v-if="scope.row.type == 'third_party_address'">
  121. <div>第三方地址:{{scope.row.extra.third_party_address}}</div>
  122. </template>
  123. </template>
  124. </el-table-column>
  125. <el-table-column label="提现信息" min-width="200" align="left">
  126. <template slot-scope="scope">
  127. <div>用户申请提现数量:{{scope.row.cash.price}}</div>
  128. <div>手续费:{{scope.row.cash.service_fee_rate}}</div>
  129. <div>当前价格:{{scope.row.cash.now_price}}元</div>
  130. <div>实际打款金额:<span style="color: #ff4544">{{scope.row.cash.fact_price}}</span>元</div>
  131. </template>
  132. </el-table-column>
  133. <el-table-column label="状态" prop="status_text" min-width="120" align="center">
  134. <template slot-scope="scope">
  135. <div v-if="scope.row.status==0">待审核</div>
  136. <div v-if="scope.row.status==1">待打款</div>
  137. <div v-if="scope.row.status==2">已打款</div>
  138. <div v-if="scope.row.status==5">打款中</div>
  139. <div v-if="scope.row.status==3">已驳回</div>
  140. </template>
  141. </el-table-column>
  142. <el-table-column label="时间" min-width="200" align="center">
  143. <template slot-scope="scope">
  144. <div>申请时间:{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  145. <div v-if="scope.row.status == 1">审核时间:{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  146. <div v-if="scope.row.status == 2">打款时间:{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  147. <div v-if="scope.row.status == 3">驳回时间:{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="备注" min-width="200" align="center">
  151. <template slot-scope="scope">
  152. <div v-if="scope.row.status == 1 ">审核备注:{{scope.row.content.validate_content}}<br>打款备注:{{scope.row.content.remit_content}}</div>
  153. <div v-if="scope.row.status == 2">审核备注:{{scope.row.content.validate_content}}<br>打款备注:{{scope.row.content.remit_content}}</div>
  154. <div v-if="scope.row.status == 3">驳回备注:{{scope.row.content.reject_content}}</div>
  155. <div v-if="scope.row.type == 'joinpay'">汇聚备注:{{scope.row.joinpay_msg}}</div>
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="操作" min-width="200" align="center">
  159. <template slot-scope="scope">
  160. <!-- <el-button size="mini" circle style="margin-top: 10px" v-if="scope.row.status == 0" @click="apply(scope.row, 1)">
  161. <el-tooltip class="item" effect="dark" content="同意" placement="top">
  162. <img src="resources/img/mall/pass.png" alt="">
  163. </el-tooltip>
  164. </el-button> -->
  165. <el-button size="mini" circle style="margin-top: 10px" v-if="scope.row.status == 0" @click="openDialogForm(scope.row,1)">
  166. <el-tooltip class="item" effect="dark" content="同意" placement="top">
  167. <img src="resources/img/mall/pass.png" alt="">
  168. </el-tooltip>
  169. </el-button>
  170. <!--支付宝代付打款-->
  171. <el-button size="mini" circle v-if="scope.row.status == 1 && alipay.alitopay_switch && scope.row.type == 'alipay'" style="margin-top: 10px" @click="alitopayApply(scope.row, 2)">
  172. <el-tooltip class="item" effect="dark" content="支付宝代付" placement="top">
  173. <img width="25px" style="border-radius: 25px;" src="resources/img/mall/alipay_dai.png" alt="">
  174. </el-tooltip>
  175. </el-button>
  176. <!--支付宝合规打款-->
  177. <el-button size="mini" circle v-if="scope.row.status == 1 && alipay.avoidtax_switch && scope.row.type == 'alipay_tax'" style="margin-top: 10px" @click="avoidtaxApply(scope.row, 2)">
  178. <el-tooltip class="item" effect="dark" content="支付宝合规" placement="top">
  179. <img width="25px" style="border-radius: 25px;" src="resources/img/mall/alipay_shui.png" alt="">
  180. </el-tooltip>
  181. </el-button>
  182. <!-- <el-button size="mini" circle v-if="scope.row.status == 1" style="margin-top: 10px" @click="apply(scope.row, 2)">
  183. <el-tooltip class="item" effect="dark" content="打款" placement="top">
  184. <img src="resources/img/mall/pay.png" alt="">
  185. </el-tooltip>
  186. </el-button> -->
  187. <el-button size="mini" circle v-if="scope.row.status == 1" style="margin-top: 10px" @click="openDialogForm(scope.row,2)">
  188. <el-tooltip class="item" effect="dark" content="打款" placement="top">
  189. <img src="resources/img/mall/pay.png" alt="">
  190. </el-tooltip>
  191. </el-button>
  192. <!-- <el-button size="mini" circle style="margin-left: 10px;margin-top: 10px" v-if="scope.row.status < 2" @click="apply(scope.row, 3)">
  193. <el-tooltip class="item" effect="dark" content="拒绝" placement="top">
  194. <img src="resources/img/mall/nopass.png" alt="">
  195. </el-tooltip>
  196. </el-button> -->
  197. <el-button size="mini" circle style="margin-left: 10px;margin-top: 10px" v-if="scope.row.status < 2" @click="openDialogForm(scope.row,3)">
  198. <el-tooltip class="item" effect="dark" content="拒绝" placement="top">
  199. <img src="resources/img/mall/nopass.png" alt="">
  200. </el-tooltip>
  201. </el-button>
  202. </template>
  203. </el-table-column>
  204. </el-table>
  205. <div flex="box:last cross:center">
  206. <div></div>
  207. <div>
  208. <el-pagination v-if="list.length > 0" style="display: inline-block;" background :page-size="pagination.defaultPageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :total="pagination.totalCount">
  209. </el-pagination>
  210. </div>
  211. </div>
  212. </div>
  213. </el-tabs>
  214. </el-card>
  215. <el-dialog title="备注信息" :visible.sync="dialogFormVisible" width="20%" center>
  216. <el-form :model="check_form">
  217. <el-form-item label="备注" label-width="100px" required>
  218. <el-col :span="18">
  219. <el-input v-model="check_form.remark" type="textarea" autocomplete="off"></el-input>
  220. </el-col>
  221. </el-form-item>
  222. <el-form-item label="验证码" label-width="100px" required v-if="this.new_status == 2 && this.need_risk">
  223. <el-col :span="10">
  224. <el-input v-model="check_form.verification_code" autocomplete="off" type="number"></el-input>
  225. </el-col>
  226. <el-col :span="2">
  227. <div style="height:10px"></div>
  228. </el-col>
  229. <el-col :span="6">
  230. <el-button @click="getVerificationCode" :disabled="is_disabled">获取验证码</el-button>
  231. </el-col>
  232. </el-form-item>
  233. </el-form>
  234. <div slot="footer" class="dialog-footer">
  235. <el-button @click="closeDialogForm">取 消</el-button>
  236. <el-button type="primary" @click="apply()">确 定</el-button>
  237. </div>
  238. </el-dialog>
  239. <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="30%">
  240. <el-form :model="batch_cash" label-width="80px">
  241. <el-form-item label="操作">
  242. <el-radio v-model="batch_cash.status" v-if="apply_status == 1" :label="1" border>同意</el-radio>
  243. <el-radio v-model="batch_cash.status" v-if="apply_status == 2" :label="2" border>打款</el-radio>
  244. <el-radio v-model="batch_cash.status" :label="3" border>拒绝</el-radio>
  245. </el-form-item>
  246. <el-form-item label="备注">
  247. <el-input v-model="batch_cash.content"></el-input>
  248. </el-form-item>
  249. </el-form>
  250. <span slot="footer" class="dialog-footer">
  251. <el-button @click="dialogVisible = false">取 消</el-button>
  252. <el-button type="primary" v-loading="dialogLoading" @click="handle(apply_status == 1 ? 'batch_apply' : 'batch_remit', batch_cash)">确 定</el-button>
  253. </span>
  254. </el-dialog>
  255. </div>
  256. <script>
  257. const app = new Vue({
  258. el: '#app',
  259. data() {
  260. return {
  261. dialogFormVisible: false,
  262. dialogVisible: false,
  263. dialogTitle: '批量审核',
  264. export_url: 'hi-go/withdraw/cash',
  265. search: {
  266. keyword: '',
  267. status: -1,
  268. user_id: '',
  269. withdraw_type: '',
  270. withdraw_from: '',
  271. date: '',
  272. start_date: '',
  273. end_date: '',
  274. },
  275. multipleSelection: [],
  276. checkedData: undefined,
  277. alipay: {
  278. content: '',
  279. showAlipay: false,
  280. alipay_way: "",
  281. alitopay_switch: false,
  282. avoidtax_switch: false,
  283. },
  284. loading: false,
  285. activeName: '-1',
  286. list: [],
  287. pagination: null,
  288. export_list: [],
  289. user_id: '',
  290. withdraw_type: '',
  291. withdraw_from: '',
  292. keyword: '',
  293. date: '',
  294. start_date: '',
  295. end_date: '',
  296. page: 1,
  297. batch_cash: {
  298. status: null,
  299. content: null,
  300. },
  301. dialogLoading: false,
  302. apply_status: 1,
  303. check_form: {
  304. remark: '',
  305. verification_code: ''
  306. },
  307. new_status: 0,
  308. is_disabled: false,
  309. mobile: '',
  310. need_risk: 0,
  311. cash_log: null
  312. };
  313. },
  314. mounted() {
  315. this.loadData();
  316. },
  317. created() {
  318. this.checkChannel()
  319. },
  320. methods: {
  321. handleSelectionChange(val) {
  322. this.multipleSelection = val;
  323. this.checkedData = val;
  324. },
  325. alitopayBatch() {
  326. let self = this;
  327. var status = 1;
  328. var arrList = new Array();
  329. $.each(this.checkedData, function(k, v) {
  330. if (v.type !== "alipay") {
  331. status = 2;
  332. }
  333. arrList.push(v.id);
  334. });
  335. if (status == 2) {
  336. this.$message.error("请只选择支付宝提现单");
  337. return false;
  338. }
  339. if (arrList.length <= 0) {
  340. this.$message.error("请选择记录");
  341. return false;
  342. }
  343. self.$confirm('确定使用支付宝打款', '提示', {
  344. confirmButtonText: '确定',
  345. cancelButtonText: '取消',
  346. type: 'warning',
  347. beforeClose: (action, instance, done) => {
  348. if (action === 'confirm') {
  349. instance.confirmButtonLoading = true;
  350. instance.confirmButtonText = '执行中...';
  351. request({
  352. params: {
  353. r: 'hi-go/withdraw/alitopay',
  354. },
  355. method: 'post',
  356. data: {
  357. id: arrList,
  358. }
  359. }).then(e => {
  360. instance.confirmButtonLoading = false;
  361. instance.confirmButtonText = '确认';
  362. self.listLoading = false;
  363. if (e.data.code === 0) {
  364. html = e.data.data.res
  365. win = window.open(); //打开新的空白窗口
  366. win.document.write(html);
  367. this.loadData(this.activeName, this.page);
  368. done();
  369. } else {
  370. this.$message.error(e.data.msg);
  371. }
  372. }).catch(e => {
  373. instance.confirmButtonLoading = false;
  374. instance.confirmButtonText = '确认';
  375. this.$message.error(e.message);
  376. done();
  377. });
  378. } else {
  379. done();
  380. }
  381. }
  382. })
  383. },
  384. avoidtaxBatch() {
  385. let self = this;
  386. var status = 1;
  387. var arrList = new Array();
  388. $.each(this.checkedData, function(k, v) {
  389. if (v.type !== "alipay_tax") {
  390. status = 2;
  391. }
  392. arrList.push(v.id);
  393. });
  394. if (status == 2) {
  395. this.$message.error("请只选择支付宝提现单");
  396. return false;
  397. }
  398. if (arrList.length <= 0) {
  399. this.$message.error("请选择记录");
  400. return false;
  401. }
  402. self.$confirm('确定使用支付宝合规打款', '提示', {
  403. confirmButtonText: '确定',
  404. cancelButtonText: '取消',
  405. type: 'warning',
  406. beforeClose: (action, instance, done) => {
  407. if (action === 'confirm') {
  408. instance.confirmButtonLoading = true;
  409. instance.confirmButtonText = '执行中...';
  410. request({
  411. params: {
  412. r: 'hi-go/withdraw/avoidtax',
  413. },
  414. method: 'post',
  415. data: {
  416. id: arrList,
  417. }
  418. }).then(e => {
  419. instance.confirmButtonLoading = false;
  420. instance.confirmButtonText = '确认';
  421. self.listLoading = false;
  422. if (e.data.code === 0) {
  423. this.$message.success('添加成功');
  424. setTimeout(() => {
  425. this.loadData()
  426. }, 1000)
  427. done();
  428. } else {
  429. this.$message.error(e.data.msg);
  430. done();
  431. }
  432. }).catch(e => {
  433. instance.confirmButtonLoading = false;
  434. instance.confirmButtonText = '确认';
  435. this.$message.error(e.message);
  436. done();
  437. });
  438. } else {
  439. done();
  440. }
  441. }
  442. })
  443. },
  444. handleClickItem() { //图片预览点击遮罩层关闭
  445. // 获取遮罩层dom
  446. setTimeout(() => {
  447. let domImageMask = document.querySelector(".el-image-viewer__mask");
  448. if (!domImageMask) {
  449. return;
  450. }
  451. domImageMask.addEventListener("click", () => {
  452. // 点击遮罩层时调用关闭按钮的 click 事件
  453. document.querySelector(".el-image-viewer__close").click();
  454. });
  455. }, 300)
  456. },
  457. confirmSubmit() {
  458. if (this.date) {
  459. this.search.start_date = this.date[0];
  460. this.search.end_date = this.date[1];
  461. }
  462. this.search.status = this.activeName
  463. },
  464. selectDateTime(e) {
  465. if (e != null) {
  466. this.start_date = e[0];
  467. this.end_date = e[1];
  468. this.search.start_date = e[0];
  469. this.search.end_date = e[1];
  470. } else {
  471. this.start_date = '';
  472. this.end_date = '';
  473. }
  474. this.page = 1;
  475. this.loadData();
  476. },
  477. loadData(status = -1, page = 1) {
  478. this.loading = true;
  479. let params = {
  480. r: 'hi-go/withdraw/index',
  481. status: status,
  482. page: page,
  483. user_id: this.search.user_id,
  484. withdraw_type: this.search.withdraw_type,
  485. withdraw_from: this.search.withdraw_from,
  486. keyword: this.search.keyword,
  487. };
  488. if (this.date) {
  489. Object.assign(params, {
  490. start_date: this.date[0],
  491. end_date: this.date[1],
  492. });
  493. }
  494. request({
  495. params,
  496. method: 'get'
  497. }).then(e => {
  498. this.loading = false;
  499. if (e.data.code == 0) {
  500. this.page = page
  501. this.list = e.data.data.list;
  502. this.export_list = e.data.data.export_list;
  503. this.pagination = e.data.data.pagination;
  504. this.need_risk = e.data.data.need_risk;
  505. this.mobile = e.data.data.mobile;
  506. } else {
  507. if (e.data.msg == 'User Id必须是整数。') {
  508. e.data.msg = '会员id必须是整数';
  509. }
  510. this.$message.error(e.data.msg);
  511. }
  512. }).catch(e => {
  513. this.loading = false;
  514. });
  515. },
  516. pageChange(page) {
  517. this.loadData(this.activeName, page);
  518. },
  519. handleClick(tab, event) {
  520. // console.log(this.user_id);
  521. // console.log(this.withdraw_type);
  522. // console.log(this.withdraw_from);
  523. // console.log(this.keyword);
  524. this.search.status = this.activeName
  525. this.loadData(this.activeName)
  526. },
  527. checkChannel() {
  528. request({
  529. params: {
  530. r: 'hi-go/withdraw/check-channel',
  531. },
  532. method: 'get',
  533. }).then(e => {
  534. if (e.data.code === 0) {
  535. this.alipay.alitopay_switch = e.data.data.alitopay && e.data.data.alitopay.is_install == 1 ? true : false
  536. this.alipay.avoidtax_switch = e.data.data.avoidtax && e.data.data.avoidtax.is_install == 1 ? true : false
  537. console.log(e.data)
  538. } else {
  539. this.$message.error(e.data.msg);
  540. }
  541. }).catch(e => {
  542. done();
  543. instance.confirmButtonLoading = false;
  544. });
  545. },
  546. alitopayApply(cash, status) {
  547. this.checkedData = [cash];
  548. this.alitopayBatch()
  549. },
  550. avoidtaxApply(cash, status) {
  551. this.checkedData = [cash];
  552. this.avoidtaxBatch()
  553. },
  554. openDialogForm(cash, status) {
  555. this.dialogFormVisible = true;
  556. this.new_status = status;
  557. this.cash_log = cash;
  558. },
  559. closeDialogForm() {
  560. this.dialogFormVisible = false;
  561. this.new_status = 0;
  562. this.check_form.remark = ''
  563. this.check_form.verification_code = '';
  564. },
  565. getVerificationCode() {
  566. this.is_disabled = true;
  567. request({
  568. params: {
  569. r: 'common/sms/send',
  570. },
  571. method: 'post',
  572. data: {
  573. mobile: this.mobile,
  574. sms_type: 'cash_risk_cash_check_' + this.cash_log.id,
  575. valid_time: 60
  576. }
  577. }).then(e => {
  578. this.is_disabled = false;
  579. if (e.data.code == 0) {
  580. this.is_disabled = true;
  581. this.$message.success(e.data.msg + ',验证码已发送到:' + this.mobile);
  582. } else {
  583. this.$message.error(e.data.msg);
  584. }
  585. }).catch(e => {
  586. });
  587. },
  588. apply() {
  589. request({
  590. params: {
  591. r: 'hi-go/withdraw/cash-apply',
  592. },
  593. method: 'post',
  594. data: {
  595. id: this.cash_log.id,
  596. status: this.new_status,
  597. content: this.check_form.remark,
  598. verification_code: this.check_form.verification_code
  599. }
  600. }).then(e => {
  601. if (e.data.code === 0) {
  602. this.closeDialogForm();
  603. this.loadData(this.activeName, this.page);
  604. } else {
  605. this.$message.error(e.data.msg);
  606. }
  607. }).catch(e => {
  608. });
  609. },
  610. handle(type, data = null) {
  611. let ids = [];
  612. switch (type) {
  613. case 'open':
  614. if (this.multipleSelection.length == 0) {
  615. this.$message({
  616. type: 'warning',
  617. message: '请选择要审核的数据'
  618. });
  619. return;
  620. }
  621. this.batch_cash.status = data
  622. if (data == 1) {
  623. this.apply_status = 1;
  624. this.dialogTitle = '批量审核';
  625. } else {
  626. this.apply_status = 2;
  627. this.dialogTitle = '批量打款';
  628. }
  629. this.dialogVisible = true;
  630. break;
  631. case 'batch_apply': // 批量审核
  632. var is_return = false;
  633. this.multipleSelection.forEach(item => {
  634. if (item.status != 0 && is_return == false) {
  635. this.$message({
  636. type: 'warning',
  637. message: 'ID:' + item.id + ' 的数据非待审核状态'
  638. });
  639. is_return = true;
  640. }
  641. ids.push(item.id)
  642. })
  643. if (is_return == true) return;
  644. this.dialogLoading = true;
  645. data.ids = ids;
  646. this.send(data, 'hi-go/withdraw/batch-cash-apply', (resp) => {
  647. this.dialogLoading = false;
  648. this.dialogVisible = false;
  649. this.loadData();
  650. });
  651. break;
  652. case 'batch_remit': // 批量打款
  653. var is_return = false;
  654. this.multipleSelection.forEach(item => {
  655. if (item.status != 1 && is_return == false) {
  656. this.$message({
  657. type: 'warning',
  658. message: 'ID:' + item.id + ' 的数据非待打款状态'
  659. });
  660. is_return = true;
  661. }
  662. ids.push(item.id)
  663. })
  664. if (is_return == true) return;
  665. this.dialogLoading = true;
  666. data.ids = ids;
  667. this.send(data, 'hi-go/withdraw/batch-cash-apply', (resp) => {
  668. this.dialogLoading = false;
  669. this.dialogVisible = false;
  670. this.loadData();
  671. });
  672. break;
  673. }
  674. },
  675. send(params, url, callback = null) {
  676. let self = this;
  677. let basic_params = {
  678. r: url
  679. };
  680. request({
  681. params: basic_params,
  682. method: 'post',
  683. data: params
  684. }).then(e => {
  685. if (e.data.code == 0) {
  686. self.$message.success(e.data.msg);
  687. } else {
  688. self.$message.error(e.data.msg);
  689. }
  690. if (callback) callback(e.data);
  691. }).catch(e => {
  692. console.log(e);
  693. });
  694. },
  695. }
  696. })
  697. </script>
  698. <style>
  699. .el-tabs__header {
  700. padding: 0 20px;
  701. height: 56px;
  702. line-height: 56px;
  703. background-color: #fff;
  704. }
  705. .export-btn {
  706. position: absolute;
  707. top: 10px;
  708. right: 10px;
  709. z-index: 2;
  710. }
  711. .table-body {
  712. padding: 20px;
  713. background-color: #fff;
  714. }
  715. .table-body .el-table__row .el-button {
  716. padding: 0 !important;
  717. border: 0;
  718. margin: 0 5px;
  719. }
  720. .el-table th>.cell {
  721. color: #333;
  722. font-weight: bold;
  723. font-size: 14px;
  724. }
  725. .el-table__footer-wrapper,
  726. .el-table__header-wrapper {
  727. border-bottom: 1.4px solid #D6D6D6;
  728. }
  729. .input-item {
  730. display: inline-block;
  731. width: 250px;
  732. margin: 0 0 20px 20px;
  733. }
  734. .search_float {
  735. float: right;
  736. }
  737. .input-item .el-input__inner:hover {
  738. border: 1px solid #dcdfe6;
  739. border-right: 0;
  740. outline: 0;
  741. }
  742. .input-item .el-input__inner:focus {
  743. border: 1px solid #dcdfe6;
  744. border-right: 0;
  745. outline: 0;
  746. }
  747. .input-item .el-input-group__append {
  748. background-color: #fff;
  749. border-left: 0;
  750. width: 10%;
  751. padding: 0;
  752. }
  753. .input-item .el-input-group__append .el-button {
  754. padding: 0;
  755. }
  756. .input-item .el-input-group__append .el-button {
  757. margin: 0;
  758. }
  759. .default-avatar {
  760. width: 50px;
  761. height: 50px;
  762. border-radius: 50%;
  763. margin-right: 8px;
  764. }
  765. .uer-nickname {
  766. flex: 1;
  767. }
  768. .user_img {
  769. position: relative;
  770. margin-right: 8px;
  771. /* height: 50px;
  772. width: 50px; */
  773. }
  774. </style>