detail.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. @extends('layouts.base')
  2. @section('content')
  3. @section('title', trans('提现详情'))
  4. <style>
  5. body {
  6. background-color: #eff3f6;
  7. }
  8. .info {
  9. display: flex;
  10. margin: 20px 0;
  11. }
  12. .user {
  13. width: 500px;
  14. }
  15. .info-title {
  16. font-size: 14px;
  17. color: #29ba9c;
  18. line-height: 40px;
  19. }
  20. .info-box {
  21. display: flex;
  22. flex-wrap: nowrap;
  23. justify-content: space-around;
  24. }
  25. .user-info img {
  26. width: 60px;
  27. height: 60px;
  28. border-radius: 4px;
  29. }
  30. .info-item {
  31. /* padding: 0 100px; */
  32. }
  33. .item {
  34. margin: 10px 0;
  35. }
  36. .box-card {
  37. width: 300px;
  38. }
  39. .el-card__header {
  40. text-align: center;
  41. padding: 10px;
  42. }
  43. .cell {
  44. text-align: center;
  45. }
  46. .vue-page {
  47. border-radius: 5px;
  48. width: calc(100% - 276px);
  49. float: right;
  50. margin-right: 15px;
  51. position: fixed;
  52. bottom: 0;
  53. right: 0;
  54. padding: 15px 5% 15px 0;
  55. background: #fff;
  56. height: 60px;
  57. z-index: 999;
  58. margin-top: 0;
  59. box-shadow: 0 2px 9px rgb(51 51 51 / 10%);
  60. text-align: center;
  61. }
  62. .changeAll .el-radio {
  63. margin-right: 10px;
  64. }
  65. .el-message-box {
  66. width: 500px;
  67. }
  68. [v-cloak] {
  69. display: none;
  70. }
  71. </style>
  72. <div class="all">
  73. <div id="app" v-cloak>
  74. <box-item text="提现者信息" v-loading="loading">
  75. <div class="info-box">
  76. <div class="info-item">
  77. <div class="info-title">会员信息</span></div>
  78. <div class="user-info">
  79. <div class="image" v-if="withdraw.member">
  80. <div style="display: flex;width: 100%;">
  81. <img :src="withdraw.member.avatar_image" alt="" srcset="" />
  82. <div style="line-height: 30px;margin-left: 20px;">
  83. <div>昵称:[[withdraw.member.nickname]]</div>
  84. <div>姓名:[[withdraw.member.realname]]</div>
  85. </div>
  86. </div>
  87. <div class="item">手机号:[[withdraw.member.mobile]]</div>
  88. <div class="item">会员等级:[[withdraw.member.level_name]]</div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="info-item">
  93. <div class="info-title">操作时间</div>
  94. <div class="user-info">
  95. <div>申请时间:[[withdraw.created_at]]</div>
  96. <div class="item" v-if="withdraw.audit_at">审核时间:[[withdraw.audit_at]]</div>
  97. <div class="item" v-if="withdraw.pay_at">打款时间:[[withdraw.pay_at]]</div>
  98. <div class="item" v-if="withdraw.arrival_at">到账时间:[[withdraw.arrival_at]]</div>
  99. </div>
  100. </div>
  101. <div class="info-item">
  102. <div class="info-title">打款信息</div>
  103. <div class="user-info">
  104. <div>提现状态:<span style="color: red;">[[withdraw.status_name]]</span></div>
  105. <template v-if="withdraw.status==0">
  106. <div class="item">审核金额:<span style="color: red;">[[withdraw.amounts||"0.00"]] 元</span></div>
  107. <div class="item">预计手续费:<span style="color: red;">[[withdraw.poundage||"0.00"]] 元</span></div>
  108. <div class="item" >预计劳务税:<span style="color: red;">[[withdraw.servicetax||"0.00"]] 元</span></div>
  109. <div class="item">预计应打款:<span style="color: red;">[[(withdraw.amounts-withdraw.poundage-withdraw.servicetax).toFixed(2)]] 元</span></div>
  110. </template>
  111. <template v-else>
  112. <div class="item">审核金额:<span style="color: red;">[[(Number(withdraw.actual_amounts)+Number(withdraw.actual_servicetax)+Number(withdraw.actual_poundage)).toFixed(2)]] 元</span></div>
  113. <div class="item">手续费:<span style="color: red;">[[withdraw.actual_poundage||"0.00"]] 元</span></div>
  114. <div class="item">劳务税:<span style="color: red;">[[withdraw.actual_servicetax||"0.00"]] 元</span></div>
  115. <div class="item">应打款:<span style="color: red;">[[withdraw.actual_amounts||"0.00"]] 元</span></div>
  116. </template>
  117. </div>
  118. </div>
  119. <div class="info-item">
  120. <div class="info-title">提现方式</div>
  121. <div class="user-info">
  122. <div>提现方式:[[withdraw.pay_way_name]]</div>
  123. <div class="item">收入类型:[[withdraw.type_name]]</div>
  124. <div class="item">提现金额:<span style="color: red;">[[withdraw.amounts||"0.00"]] 元</span></div>
  125. <template class="item" v-if="withdraw.pay_way=='manual'">
  126. <template v-if="withdraw.manual_type==1">
  127. <div class="item">{{\Setting::get('shop.lang.zh_cn.income.manual_withdrawal') ?: '手动打款'}}方式:银行卡</div>
  128. <template v-if="withdraw.bank_card">
  129. <div class="item">开户人姓名:[[withdraw.bank_card.member_name]]</div>
  130. <div class="item">开户行:[[withdraw.bank_card.bank_name]]</div>
  131. <div class="item">开户省:[[withdraw.bank_card.bank_province]]</div>
  132. <div class="item">开户市:[[withdraw.bank_card.bank_city]]</div>
  133. <div class="item">开户支行:[[withdraw.bank_card.bank_branch]]</div>
  134. <div class="item">银行卡号:[[withdraw.bank_card.bank_card]]</div>
  135. </template>
  136. </template>
  137. <template v-if="withdraw.manual_type==2">
  138. <div class="item">手动打款方式:微信</div>
  139. <div class="item" v-if="withdraw.has_one_yz_member">微信号:[[withdraw.has_one_yz_member.wechat]]</div>
  140. </template>
  141. <template v-if="withdraw.manual_type==3">
  142. <div class="item">手动打款方式:支付宝</div>
  143. <div class="item" v-if="withdraw.has_one_yz_member">账号姓名:[[withdraw.has_one_yz_member.alipayname]]</div>
  144. <div class="item" v-if="withdraw.has_one_yz_member">支付宝号:[[withdraw.has_one_yz_member.alipay]]</div>
  145. </template>
  146. </template>
  147. <template class="item" v-if="withdraw.pay_way=='silver_point'">
  148. <template v-if="withdraw.bank_card">
  149. <div class="item">开户人姓名:[[withdraw.bank_card.member_name]]</div>
  150. <div class="item">开户行:[[withdraw.bank_card.bank_name]]</div>
  151. <div class="item">开户省:[[withdraw.bank_card.bank_province]]</div>
  152. <div class="item">开户市:[[withdraw.bank_card.bank_city]]</div>
  153. <div class="item">开户支行:[[withdraw.bank_card.bank_branch]]</div>
  154. <div class="item">银行卡号:[[withdraw.bank_card.bank_card]]</div>
  155. </template>
  156. </template>
  157. </div>
  158. </div>
  159. </div>
  160. </box-item>
  161. <box-item :text="['提现收入列表',(income_total||'0')+'条']">
  162. <el-table :data="income_list" style="width: 100%" v-loading="loading">
  163. <el-table-column prop="id" label="收入ID"></el-table-column>
  164. <el-table-column prop="type_name" label="提现类型"></el-table-column>
  165. <el-table-column prop="amount" label="提现金额"></el-table-column>
  166. <el-table-column prop="pay_status_name" label="打款状态"></el-table-column>
  167. <el-table-column prop="created_at" label="提现时间"></el-table-column>
  168. <el-table-column label="操作">
  169. <template slot-scope="scope">
  170. <i class="el-icon-view" style="font-size: 16px;cursor: pointer;" @click="changeDetail(scope.row)"></i>
  171. </template>
  172. </el-table-column>
  173. <el-table-column label="状态" width="300" v-if="withdraw.status==0||withdraw.status==-1">
  174. <template slot="header" slot-scope="scope">
  175. <div class="changeAll">
  176. <el-radio-group v-model="changeAllData" @change="changeAll" style="color: aqua;">
  177. <el-radio :label="1">全部通过</el-radio>
  178. <el-radio :label="-1">全部无效</el-radio>
  179. <el-radio :label="3">全部驳回</el-radio>
  180. </el-radio-group>
  181. </div>
  182. </template>
  183. <template slot-scope="scope">
  184. <el-radio-group v-model="scope.row.pay_status" @change="change(scope.row)">
  185. <el-radio :label="1">通过</el-radio>
  186. <el-radio :label="-1">无效</el-radio>
  187. <el-radio :label="3">驳回</el-radio>
  188. </el-radio-group>
  189. </template>
  190. </el-table-column>
  191. </el-table>
  192. </box-item>
  193. <div style="height: 60px;"></div>
  194. <div class="vue-page">
  195. <el-button @click="goback">返回列表</el-button>
  196. <el-button type="primary" @click="examine('审核成功')" v-if="withdraw.status==0">提交审核</el-button>
  197. <template v-if="withdraw.status==1">
  198. <el-button v-if="withdraw.pay_way=='silver_point'" type="primary" @click="Repayment('pay_way')">打款到银典支付</el-button>
  199. <el-button v-if="withdraw.pay_way=='balance'" type="primary" @click="Repayment('pay_way')">打款到余额</el-button>
  200. <el-button v-if="withdraw.pay_way=='wechat'" type="primary" @click="Repayment('pay_way')">打款到微信钱包</el-button>
  201. <el-button v-if="withdraw.pay_way=='alipay'" type="primary" @click="Repayment('pay_way')">打款到支付宝</el-button>
  202. <el-button v-if="withdraw.pay_way=='manual'" type="primary" @click="Repayment('pay_way')">{{\Setting::get('shop.lang.zh_cn.income.manual_withdrawal') ?: '手动打款'}}</el-button>
  203. <el-button v-if="withdraw.pay_way=='eup_pay'" type="primary" @click="Repayment('pay_way')">EUP提现</el-button>
  204. <el-button v-if="withdraw.pay_way=='huanxun'" type="primary" @click="Repayment('pay_way')">打款到银行卡</el-button>
  205. <el-button v-if="withdraw.pay_way=='yop_pay'" type="primary" @click="Repayment('pay_way')">易宝提现</el-button>
  206. <el-button v-if="withdraw.pay_way=='converge_pay'" type="primary" @click="Repayment('pay_way')">汇聚提现</el-button>
  207. <el-button v-if="withdraw.pay_way=='high_light_wechat'||withdraw.pay_way=='high_light_alipay'||withdraw.pay_way=='high_light_bank'" type="primary" @click="Repayment('pay_way')">高灯打款</el-button>
  208. <el-button v-if="withdraw.pay_way=='worker_withdraw_wechat'||withdraw.pay_way=='worker_withdraw_alipay'||withdraw.pay_way=='worker_withdraw_bank'" type="primary" @click="Repayment('pay_way')">好灵工打款</el-button>
  209. <el-button v-if="withdraw.pay_way=='eplus_withdraw_bank'" type="primary" @click="Repayment('pay_way')">智E+打款</el-button>
  210. <el-button type="primary" @click="Repayment('线下确认打款')">线下确认打款</el-button>
  211. <el-button type="danger" @click="Repayment('驳回记录')">驳回记录</el-button>
  212. </template>
  213. <template v-else-if="withdraw.status==4">
  214. <el-button type="primary" @click="Repayment('重新打款')">重新打款</el-button>
  215. <el-button type="primary" @click="Repayment('线下确认打款')">线下确认打款</el-button>
  216. <el-button type="danger" @click="Repayment('驳回记录')">驳回记录</el-button>
  217. </template>
  218. <template v-else-if="withdraw.status==-1">
  219. <el-button type="primary" @click="examine('重新审核成功')">重新审核</el-button>
  220. </template>
  221. </div>
  222. <el-dialog title="详情" :visible.sync="dialogVisible" width="30%">
  223. <template v-if="detail">
  224. <box-item v-for="(item,i) in detail" :text="item.title">
  225. <div style="margin-left: 20px;">
  226. <template v-for="(items,ii) in item.data">
  227. <div :class="{item:i>0||ii>0}" v-if="!isarr(items)">[[items.title]] :[[items.value]]</div>
  228. <template v-else>
  229. <div :class="{item:i>0||ii>0}" v-for="name in items">[[name.title]] :[[name.value]]</div>
  230. </template>
  231. </template>
  232. </div>
  233. </box-item>
  234. </template>
  235. <template v-else>
  236. <span>暂无详情</span>
  237. </template>
  238. </el-dialog>
  239. </div>
  240. </div>
  241. @include('public.admin.box-item')
  242. <script>
  243. let id = "{{ request()-> id }}";
  244. let vm = new Vue({
  245. el: "#app",
  246. delimiters: ['[[', ']]'],
  247. data() {
  248. return {
  249. withdraw: {},
  250. income_list: [],
  251. loading: false,
  252. examineData: {},
  253. income_total: "",
  254. dialogVisible: false,
  255. detail: null,
  256. changeAllData: ""
  257. }
  258. },
  259. created() {
  260. this.getdata();
  261. },
  262. methods: {
  263. changeAll(val) {
  264. this.income_list.forEach(item => {
  265. item.pay_status = val || this.changeAllData;
  266. })
  267. },
  268. isarr(data) {
  269. return Array.isArray(data);
  270. },
  271. changeDetail(row) {
  272. if (!row.detail) {
  273. this.detail = ""
  274. } else {
  275. this.detail = JSON.parse(row.detail);
  276. }
  277. this.dialogVisible = true;
  278. },
  279. getdata() {
  280. this.loading = true;
  281. this.$http.post("{!! yzWebUrl('withdraw.detail.index') !!}", {
  282. id
  283. }).then(({
  284. data
  285. }) => {
  286. if (data.result) {
  287. data = data.data;
  288. this.withdraw = data.withdraw;
  289. this.income_list = data.income_list;
  290. this.income_total = data.income_total;
  291. console.log(this.withdraw.pay_way);
  292. if (this.withdraw.status == -1 || this.withdraw.status == 0) {
  293. if (this.withdraw.status == 0) {
  294. this.changeAllData = 1;
  295. this.changeAll(1);
  296. } else {
  297. this.changeAllData = -1;
  298. }
  299. }
  300. } else this.$message.error(data.msg);
  301. this.loading = false;
  302. })
  303. },
  304. examine(msg) {
  305. let audit = {}
  306. let write_reason = false;
  307. this.income_list.forEach(item => {
  308. if (item.pay_status != 1) {
  309. write_reason = true;
  310. }
  311. audit[item.id] = item.pay_status;
  312. })
  313. const loading = this.$loading({
  314. lock: true,
  315. text: '正在运行中...',
  316. spinner: 'el-icon-loading',
  317. background: 'rgba(0, 0, 0, 0.7)'
  318. });
  319. console.log(write_reason);
  320. if (write_reason) {
  321. this.$prompt('提交审核', '审核备注', {
  322. confirmButtonText: '确定',
  323. cancelButtonText: '取消',
  324. inputType: 'textarea',
  325. }).then(({ value }) => {
  326. this.$http.post("{!! yzWebUrl('withdraw.audit.index') !!}", {
  327. id,
  328. audit,
  329. reject_reason:value
  330. }).then(({
  331. data
  332. }) => {
  333. loading.close();
  334. if (data.result) {
  335. this.$message({
  336. message: msg,
  337. type: 'success'
  338. });
  339. this.getdata();
  340. } else this.$message.error(data.msg);
  341. })
  342. }).catch(() => {
  343. this.$message({
  344. type: 'info',
  345. message: '取消输入'
  346. });
  347. });
  348. } else {
  349. this.$http.post("{!! yzWebUrl('withdraw.audit.index') !!}", {
  350. id,
  351. audit
  352. }).then(({
  353. data
  354. }) => {
  355. loading.close();
  356. if (data.result) {
  357. this.$message({
  358. message: msg,
  359. type: 'success'
  360. });
  361. this.getdata();
  362. } else this.$message.error(data.msg);
  363. })
  364. }
  365. },
  366. change(row) {
  367. // this.examineData[row.id] = row.status;
  368. let check = true;
  369. this.income_list.forEach(item => {
  370. if (item.pay_status != row.pay_status) check = false;
  371. })
  372. console.log(check);
  373. if (check) this.changeAllData = row.pay_status;
  374. else this.changeAllData = "";
  375. },
  376. confirm(tips, url) {
  377. this.$confirm(tips, '提示', {
  378. confirmButtonText: '确定',
  379. cancelButtonText: '取消',
  380. type: 'warning'
  381. }).then(() => {
  382. this.endData(url);
  383. }).catch(() => {
  384. return false
  385. });
  386. },
  387. Repayment(name) {
  388. if (name == "pay_way") {
  389. let url = "{!! yzWebUrl('withdraw.pay.index') !!}"
  390. this.endData(url);
  391. } else if (name == "线下确认打款") {
  392. let url = "{!! yzWebUrl('withdraw.confirm-pay.index') !!}";
  393. this.confirm('本打款方式需要线下打款,系统只是完成流程!', url);
  394. } else if (name == "重新打款") {
  395. let url = "{!! yzWebUrl('withdraw.again-pay.index',['again_pay'=> 1]) !!}";
  396. this.endData(url);
  397. } else if (name == "驳回记录") {
  398. this.$confirm("驳回后,需要会员重新申请提现(仅驳回审核通过提现)", '提示', {
  399. confirmButtonText: '确定',
  400. cancelButtonText: '取消',
  401. type: 'warning'
  402. }).then(() => {
  403. this.$prompt('提交审核', '审核备注', {
  404. confirmButtonText: '确定',
  405. cancelButtonText: '取消',
  406. inputType: 'textarea',
  407. }).then(({ value }) => {
  408. let url = "{!! yzWebUrl('withdraw.audited-rebut.index') !!}";
  409. this.endData(url,value);
  410. }).catch(() => {
  411. this.$message({
  412. type: 'info',
  413. message: '取消输入'
  414. });
  415. });
  416. }).catch(() => {
  417. return false
  418. });
  419. };
  420. },
  421. endData(url,reject_reason) {
  422. const loading = this.$loading({
  423. lock: true,
  424. text: '正在运行中...',
  425. spinner: 'el-icon-loading',
  426. background: 'rgba(0, 0, 0, 0.7)'
  427. });
  428. this.$http.post(url, {
  429. id: this.withdraw.id,
  430. reject_reason:reject_reason?reject_reason:'',
  431. }).then(({
  432. data
  433. }) => {
  434. if (data.result) {
  435. this.$message({
  436. message: data.msg,
  437. type: 'success'
  438. });
  439. this.getdata();
  440. } else this.$message.error(data.msg);
  441. })
  442. loading.close();
  443. },
  444. goback() {
  445. window.history.go(-1)
  446. }
  447. }
  448. })
  449. </script>
  450. @endsection