| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 0 0;position: relative;">
- <div slot="header">
- <span>提现审核</span>
- <div style="float: right; margin: -10px 10px;">
- <el-button type="primary" size="small" @click="handle('open', 1)">批量审核</el-button>
- <el-button type="primary" size="small" @click="handle('open', 2)">批量打款</el-button>
- </div>
- <div style="float: right; margin: -5px 0">
- <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' :action_url="export_url" :params="search">
- </com-export-dialog>
- </div>
- </div>
- <br />
- <div class="input-item">
- <el-input size="small" placeholder="请输入会员id" v-model="search.user_id" clearable>
- </el-input>
- </div>
- <div class="input-item">
- <el-input size="small" placeholder="会员昵称/手机号" v-model="search.keyword" clearable>
- </el-input>
- </div>
- <el-select size="small" v-model="search.withdraw_type" placeholder="提现方式" @change='handleClick' class="select">
- <el-option key="auto" label="自动打款" value="auto"></el-option>
- <el-option key="wechat" label="微信打款" value="wechat"></el-option>
- <el-option key="alipay" label="支付宝打款" value="alipay"></el-option>
- <el-option key="alipay_tax" label="支付宝合规" value="alipay_tax"></el-option>
- <el-option key="bank" label="银行转账" value="bank"></el-option>
- <el-option key="balance" label="打款到余额" value="balance"></el-option>
- <el-option key="joinpay" label="提现到银行卡-汇聚" value="joinpay"></el-option>
- </el-select>
- <el-select size="small" v-model="search.withdraw_from" placeholder="提现类型" @change='handleClick' class="select">
- <el-option key="0" label="全部" value=""></el-option>
- <el-option key="2" label="余额" value="2"></el-option>
- <el-option key="1" label="佣金" value="1"></el-option>
- </el-select>
- <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="结束日期">
- </el-date-picker>
- <div class="input-item search_float">
- <el-button type="primary" size="small" icon="el-icon-search" @click="handleClick" class="search_button">搜索</el-button>
- </div>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="全部" name="-1"></el-tab-pane>
- <el-tab-pane label="未审核" name="0"></el-tab-pane>
- <el-tab-pane label="待打款" name="1"></el-tab-pane>
- <el-tab-pane label="打款中" name="5"></el-tab-pane>
- <el-tab-pane label="已打款" name="2"></el-tab-pane>
- <el-tab-pane label="驳回" name="3"></el-tab-pane>
- <div class="table-body">
- <div v-if="activeName == 1">
- <el-button type="primary" v-if="alipay.alitopay_switch" size="mini" @click="alitopayBatch">
- 支付宝批量
- </el-button>
- <el-button type="primary" v-if="alipay.avoidtax_switch" size="mini" @click="avoidtaxBatch" style="background-color: #189794">
- 合规批量
- </el-button>
- </div>
- <el-table :data="list" size="small" stripe @selection-change="handleSelectionChange" v-loading="loading" style="margin-bottom: 15px">
- <el-table-column type="selection" align="center" width="60"></el-table-column>
- <el-table-column prop="id" label="ID" min-width="100" align="center"></el-table-column>
- <el-table-column prop="user.id" label="会员ID" min-width="100" align="center"></el-table-column>
- <el-table-column label="基本信息" min-width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
- <div>{{scope.row.user.mobile}}</div>
- <div>{{scope.row.user.avatar_url}}</div>
- </div>
- </div>
- <img src="statics/img/mall/wx.png" v-if="scope.row.user.platform == 'mp-wx'" alt="">
- <img src="statics/img/mall/ali.png" v-else-if="scope.row.user.platform == 'mp-ali'" alt="">
- <img src="statics/img/mall/toutiao.png" v-else-if="scope.row.user.platform == 'mp-tt'" alt="">
- <img src="statics/img/mall/baidu.png" v-else-if="scope.row.user.platform == 'mp-bd'" alt="">
- </template>
- </el-table-column>
- <!-- <el-table-column label="提现类型" min-width="150">
- <template slot-scope="scope">
- <template v-if="scope.row.from == 1">
- <div>佣金收益提现</div>
- </template>
- <template v-if="scope.row.from == 2">
- <div>余额提现</div>
- </template>
- </template>
- </el-table-column> -->
- <el-table-column label="账户信息" min-width="200" align="center">
- <template slot-scope="scope">
- <template v-if="scope.row.type == 'wechat'">
- <div style="text-align: center"> 微信收款码
- <br>
- <el-image @click.stop="handleClickItem" :src="scope.row.extra.wechat_qrcode" :preview-src-list="[scope.row.extra.wechat_qrcode]" style="height: 80px;width: 80px;">
- </el-image>
- </div>
- </template>
- <template v-if="scope.row.type == 'alipay' || scope.row.type == 'alipay_tax'">
- <div>支付宝姓名:{{scope.row.extra.name}}</div>
- <div>支付宝账号:{{scope.row.extra.mobile}}</div>
- </template>
- <template v-if="scope.row.type == 'bank'">
- <div>开户人:{{scope.row.extra.name}}</div>
- <div>银行卡号:{{scope.row.extra.bank_account}}</div>
- <div>开户行:{{scope.row.extra.bank_name}}</div>
- </template>
- <template v-if="scope.row.type == 'joinpay'">
- <div v-if="scope.row.extra.bank_account_type==1">账户类型:对私账户</div>
- <div v-if="scope.row.extra.bank_account_type==2">账户类型:对公账户</div>
- <div>持卡人:{{scope.row.extra.name}}</div>
- <div>银行卡号:{{scope.row.extra.bank_account}}</div>
- </template>
- <template v-if="scope.row.type == 'third_party_address'">
- <div>第三方地址:{{scope.row.extra.third_party_address}}</div>
- </template>
- </template>
- </el-table-column>
- <el-table-column label="提现信息" min-width="200" align="left">
- <template slot-scope="scope">
- <div>用户申请提现数量:{{scope.row.cash.price}}</div>
- <div>手续费:{{scope.row.cash.service_fee_rate}}</div>
- <div>当前价格:{{scope.row.cash.now_price}}元</div>
- <div>实际打款金额:<span style="color: #ff4544">{{scope.row.cash.fact_price}}</span>元</div>
- </template>
- </el-table-column>
- <el-table-column label="状态" prop="status_text" min-width="120" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.status==0">待审核</div>
- <div v-if="scope.row.status==1">待打款</div>
- <div v-if="scope.row.status==2">已打款</div>
- <div v-if="scope.row.status==5">打款中</div>
- <div v-if="scope.row.status==3">已驳回</div>
- </template>
- </el-table-column>
- <el-table-column label="时间" min-width="200" align="center">
- <template slot-scope="scope">
- <div>申请时间:{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- <div v-if="scope.row.status == 1">审核时间:{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- <div v-if="scope.row.status == 2">打款时间:{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- <div v-if="scope.row.status == 3">驳回时间:{{scope.row.updated_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- <el-table-column label="备注" min-width="200" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.status == 1 ">审核备注:{{scope.row.content.validate_content}}<br>打款备注:{{scope.row.content.remit_content}}</div>
- <div v-if="scope.row.status == 2">审核备注:{{scope.row.content.validate_content}}<br>打款备注:{{scope.row.content.remit_content}}</div>
- <div v-if="scope.row.status == 3">驳回备注:{{scope.row.content.reject_content}}</div>
- <div v-if="scope.row.type == 'joinpay'">汇聚备注:{{scope.row.joinpay_msg}}</div>
- </template>
- </el-table-column>
- <el-table-column label="操作" min-width="200" align="center">
- <template slot-scope="scope">
- <!-- <el-button size="mini" circle style="margin-top: 10px" v-if="scope.row.status == 0" @click="apply(scope.row, 1)">
- <el-tooltip class="item" effect="dark" content="同意" placement="top">
- <img src="resources/img/mall/pass.png" alt="">
- </el-tooltip>
- </el-button> -->
- <el-button size="mini" circle style="margin-top: 10px" v-if="scope.row.status == 0" @click="openDialogForm(scope.row,1)">
- <el-tooltip class="item" effect="dark" content="同意" placement="top">
- <img src="resources/img/mall/pass.png" alt="">
- </el-tooltip>
- </el-button>
- <!--支付宝代付打款-->
- <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)">
- <el-tooltip class="item" effect="dark" content="支付宝代付" placement="top">
- <img width="25px" style="border-radius: 25px;" src="resources/img/mall/alipay_dai.png" alt="">
- </el-tooltip>
- </el-button>
- <!--支付宝合规打款-->
- <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)">
- <el-tooltip class="item" effect="dark" content="支付宝合规" placement="top">
- <img width="25px" style="border-radius: 25px;" src="resources/img/mall/alipay_shui.png" alt="">
- </el-tooltip>
- </el-button>
- <!-- <el-button size="mini" circle v-if="scope.row.status == 1" style="margin-top: 10px" @click="apply(scope.row, 2)">
- <el-tooltip class="item" effect="dark" content="打款" placement="top">
- <img src="resources/img/mall/pay.png" alt="">
- </el-tooltip>
- </el-button> -->
- <el-button size="mini" circle v-if="scope.row.status == 1" style="margin-top: 10px" @click="openDialogForm(scope.row,2)">
- <el-tooltip class="item" effect="dark" content="打款" placement="top">
- <img src="resources/img/mall/pay.png" alt="">
- </el-tooltip>
- </el-button>
- <!-- <el-button size="mini" circle style="margin-left: 10px;margin-top: 10px" v-if="scope.row.status < 2" @click="apply(scope.row, 3)">
- <el-tooltip class="item" effect="dark" content="拒绝" placement="top">
- <img src="resources/img/mall/nopass.png" alt="">
- </el-tooltip>
- </el-button> -->
- <el-button size="mini" circle style="margin-left: 10px;margin-top: 10px" v-if="scope.row.status < 2" @click="openDialogForm(scope.row,3)">
- <el-tooltip class="item" effect="dark" content="拒绝" placement="top">
- <img src="resources/img/mall/nopass.png" alt="">
- </el-tooltip>
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <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">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-tabs>
- </el-card>
- <el-dialog title="备注信息" :visible.sync="dialogFormVisible" width="20%" center>
- <el-form :model="check_form">
- <el-form-item label="备注" label-width="100px" required>
- <el-col :span="18">
- <el-input v-model="check_form.remark" type="textarea" autocomplete="off"></el-input>
- </el-col>
- </el-form-item>
- <el-form-item label="验证码" label-width="100px" required v-if="this.new_status == 2 && this.need_risk">
- <el-col :span="10">
- <el-input v-model="check_form.verification_code" autocomplete="off" type="number"></el-input>
- </el-col>
- <el-col :span="2">
- <div style="height:10px"></div>
- </el-col>
- <el-col :span="6">
- <el-button @click="getVerificationCode" :disabled="is_disabled">获取验证码</el-button>
- </el-col>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="closeDialogForm">取 消</el-button>
- <el-button type="primary" @click="apply()">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="30%">
- <el-form :model="batch_cash" label-width="80px">
- <el-form-item label="操作">
- <el-radio v-model="batch_cash.status" v-if="apply_status == 1" :label="1" border>同意</el-radio>
- <el-radio v-model="batch_cash.status" v-if="apply_status == 2" :label="2" border>打款</el-radio>
- <el-radio v-model="batch_cash.status" :label="3" border>拒绝</el-radio>
- </el-form-item>
- <el-form-item label="备注">
- <el-input v-model="batch_cash.content"></el-input>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" v-loading="dialogLoading" @click="handle(apply_status == 1 ? 'batch_apply' : 'batch_remit', batch_cash)">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- dialogFormVisible: false,
- dialogVisible: false,
- dialogTitle: '批量审核',
- export_url: 'hi-go/withdraw/cash',
- search: {
- keyword: '',
- status: -1,
- user_id: '',
- withdraw_type: '',
- withdraw_from: '',
- date: '',
- start_date: '',
- end_date: '',
- },
- multipleSelection: [],
- checkedData: undefined,
- alipay: {
- content: '',
- showAlipay: false,
- alipay_way: "",
- alitopay_switch: false,
- avoidtax_switch: false,
- },
- loading: false,
- activeName: '-1',
- list: [],
- pagination: null,
- export_list: [],
- user_id: '',
- withdraw_type: '',
- withdraw_from: '',
- keyword: '',
- date: '',
- start_date: '',
- end_date: '',
- page: 1,
- batch_cash: {
- status: null,
- content: null,
- },
- dialogLoading: false,
- apply_status: 1,
- check_form: {
- remark: '',
- verification_code: ''
- },
- new_status: 0,
- is_disabled: false,
- mobile: '',
- need_risk: 0,
- cash_log: null
- };
- },
- mounted() {
- this.loadData();
- },
- created() {
- this.checkChannel()
- },
- methods: {
- handleSelectionChange(val) {
- this.multipleSelection = val;
- this.checkedData = val;
- },
- alitopayBatch() {
- let self = this;
- var status = 1;
- var arrList = new Array();
- $.each(this.checkedData, function(k, v) {
- if (v.type !== "alipay") {
- status = 2;
- }
- arrList.push(v.id);
- });
- if (status == 2) {
- this.$message.error("请只选择支付宝提现单");
- return false;
- }
- if (arrList.length <= 0) {
- this.$message.error("请选择记录");
- return false;
- }
- self.$confirm('确定使用支付宝打款', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- beforeClose: (action, instance, done) => {
- if (action === 'confirm') {
- instance.confirmButtonLoading = true;
- instance.confirmButtonText = '执行中...';
- request({
- params: {
- r: 'hi-go/withdraw/alitopay',
- },
- method: 'post',
- data: {
- id: arrList,
- }
- }).then(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- self.listLoading = false;
- if (e.data.code === 0) {
- html = e.data.data.res
- win = window.open(); //打开新的空白窗口
- win.document.write(html);
- this.loadData(this.activeName, this.page);
- done();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- this.$message.error(e.message);
- done();
- });
- } else {
- done();
- }
- }
- })
- },
- avoidtaxBatch() {
- let self = this;
- var status = 1;
- var arrList = new Array();
- $.each(this.checkedData, function(k, v) {
- if (v.type !== "alipay_tax") {
- status = 2;
- }
- arrList.push(v.id);
- });
- if (status == 2) {
- this.$message.error("请只选择支付宝提现单");
- return false;
- }
- if (arrList.length <= 0) {
- this.$message.error("请选择记录");
- return false;
- }
- self.$confirm('确定使用支付宝合规打款', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- beforeClose: (action, instance, done) => {
- if (action === 'confirm') {
- instance.confirmButtonLoading = true;
- instance.confirmButtonText = '执行中...';
- request({
- params: {
- r: 'hi-go/withdraw/avoidtax',
- },
- method: 'post',
- data: {
- id: arrList,
- }
- }).then(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- self.listLoading = false;
- if (e.data.code === 0) {
- this.$message.success('添加成功');
- setTimeout(() => {
- this.loadData()
- }, 1000)
- done();
- } else {
- this.$message.error(e.data.msg);
- done();
- }
- }).catch(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- this.$message.error(e.message);
- done();
- });
- } else {
- done();
- }
- }
- })
- },
- handleClickItem() { //图片预览点击遮罩层关闭
- // 获取遮罩层dom
- setTimeout(() => {
- let domImageMask = document.querySelector(".el-image-viewer__mask");
- if (!domImageMask) {
- return;
- }
- domImageMask.addEventListener("click", () => {
- // 点击遮罩层时调用关闭按钮的 click 事件
- document.querySelector(".el-image-viewer__close").click();
- });
- }, 300)
- },
- confirmSubmit() {
- if (this.date) {
- this.search.start_date = this.date[0];
- this.search.end_date = this.date[1];
- }
- this.search.status = this.activeName
- },
- selectDateTime(e) {
- if (e != null) {
- this.start_date = e[0];
- this.end_date = e[1];
- this.search.start_date = e[0];
- this.search.end_date = e[1];
- } else {
- this.start_date = '';
- this.end_date = '';
- }
- this.page = 1;
- this.loadData();
- },
- loadData(status = -1, page = 1) {
- this.loading = true;
- let params = {
- r: 'hi-go/withdraw/index',
- status: status,
- page: page,
- user_id: this.search.user_id,
- withdraw_type: this.search.withdraw_type,
- withdraw_from: this.search.withdraw_from,
- keyword: this.search.keyword,
- };
- if (this.date) {
- Object.assign(params, {
- start_date: this.date[0],
- end_date: this.date[1],
- });
- }
- request({
- params,
- method: 'get'
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.page = page
- this.list = e.data.data.list;
- this.export_list = e.data.data.export_list;
- this.pagination = e.data.data.pagination;
- this.need_risk = e.data.data.need_risk;
- this.mobile = e.data.data.mobile;
- } else {
- if (e.data.msg == 'User Id必须是整数。') {
- e.data.msg = '会员id必须是整数';
- }
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pageChange(page) {
- this.loadData(this.activeName, page);
- },
- handleClick(tab, event) {
- // console.log(this.user_id);
- // console.log(this.withdraw_type);
- // console.log(this.withdraw_from);
- // console.log(this.keyword);
- this.search.status = this.activeName
- this.loadData(this.activeName)
- },
- checkChannel() {
- request({
- params: {
- r: 'hi-go/withdraw/check-channel',
- },
- method: 'get',
- }).then(e => {
- if (e.data.code === 0) {
- this.alipay.alitopay_switch = e.data.data.alitopay && e.data.data.alitopay.is_install == 1 ? true : false
- this.alipay.avoidtax_switch = e.data.data.avoidtax && e.data.data.avoidtax.is_install == 1 ? true : false
- console.log(e.data)
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- done();
- instance.confirmButtonLoading = false;
- });
- },
- alitopayApply(cash, status) {
- this.checkedData = [cash];
- this.alitopayBatch()
- },
- avoidtaxApply(cash, status) {
- this.checkedData = [cash];
- this.avoidtaxBatch()
- },
- openDialogForm(cash, status) {
- this.dialogFormVisible = true;
- this.new_status = status;
- this.cash_log = cash;
- },
- closeDialogForm() {
- this.dialogFormVisible = false;
- this.new_status = 0;
- this.check_form.remark = ''
- this.check_form.verification_code = '';
- },
- getVerificationCode() {
- this.is_disabled = true;
- request({
- params: {
- r: 'common/sms/send',
- },
- method: 'post',
- data: {
- mobile: this.mobile,
- sms_type: 'cash_risk_cash_check_' + this.cash_log.id,
- valid_time: 60
- }
- }).then(e => {
- this.is_disabled = false;
- if (e.data.code == 0) {
- this.is_disabled = true;
- this.$message.success(e.data.msg + ',验证码已发送到:' + this.mobile);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- apply() {
- request({
- params: {
- r: 'hi-go/withdraw/cash-apply',
- },
- method: 'post',
- data: {
- id: this.cash_log.id,
- status: this.new_status,
- content: this.check_form.remark,
- verification_code: this.check_form.verification_code
- }
- }).then(e => {
- if (e.data.code === 0) {
- this.closeDialogForm();
- this.loadData(this.activeName, this.page);
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- });
- },
- handle(type, data = null) {
- let ids = [];
- switch (type) {
- case 'open':
- if (this.multipleSelection.length == 0) {
- this.$message({
- type: 'warning',
- message: '请选择要审核的数据'
- });
- return;
- }
- this.batch_cash.status = data
- if (data == 1) {
- this.apply_status = 1;
- this.dialogTitle = '批量审核';
- } else {
- this.apply_status = 2;
- this.dialogTitle = '批量打款';
- }
- this.dialogVisible = true;
- break;
- case 'batch_apply': // 批量审核
- var is_return = false;
- this.multipleSelection.forEach(item => {
- if (item.status != 0 && is_return == false) {
- this.$message({
- type: 'warning',
- message: 'ID:' + item.id + ' 的数据非待审核状态'
- });
- is_return = true;
- }
- ids.push(item.id)
- })
- if (is_return == true) return;
- this.dialogLoading = true;
- data.ids = ids;
- this.send(data, 'hi-go/withdraw/batch-cash-apply', (resp) => {
- this.dialogLoading = false;
- this.dialogVisible = false;
- this.loadData();
- });
- break;
- case 'batch_remit': // 批量打款
- var is_return = false;
- this.multipleSelection.forEach(item => {
- if (item.status != 1 && is_return == false) {
- this.$message({
- type: 'warning',
- message: 'ID:' + item.id + ' 的数据非待打款状态'
- });
- is_return = true;
- }
- ids.push(item.id)
- })
- if (is_return == true) return;
- this.dialogLoading = true;
- data.ids = ids;
- this.send(data, 'hi-go/withdraw/batch-cash-apply', (resp) => {
- this.dialogLoading = false;
- this.dialogVisible = false;
- this.loadData();
- });
- break;
- }
- },
- send(params, url, callback = null) {
- let self = this;
- let basic_params = {
- r: url
- };
- request({
- params: basic_params,
- method: 'post',
- data: params
- }).then(e => {
- if (e.data.code == 0) {
- self.$message.success(e.data.msg);
- } else {
- self.$message.error(e.data.msg);
- }
- if (callback) callback(e.data);
- }).catch(e => {
- console.log(e);
- });
- },
- }
- })
- </script>
- <style>
- .el-tabs__header {
- padding: 0 20px;
- height: 56px;
- line-height: 56px;
- background-color: #fff;
- }
- .export-btn {
- position: absolute;
- top: 10px;
- right: 10px;
- z-index: 2;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-table__row .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .input-item {
- display: inline-block;
- width: 250px;
- margin: 0 0 20px 20px;
- }
- .search_float {
- float: right;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .default-avatar {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- .user_img {
- position: relative;
- margin-right: 8px;
- /* height: 50px;
- width: 50px; */
- }
- </style>
|