| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div class="header-box">
- <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>
- <div class="el-card is-never-shadow" style="border: 0px; min-width: 800px; margin-bottom: 10px;">
- <div class="stat_details">
- <div class="order_module" v-for="(item, index) in statistic" :key="item.title">
- <div class="oirder_modul_title">
- <div class="text">{{ item.title }}</div>
- </div>
- <div class="price">
- {{ item.value }}
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="content">
- <el-form ref="form" :inline="true" :model="search" label-width="0px">
- <el-form-item label="">
- <el-input size="small" placeholder="请输入会员id" v-model="search.user_id" clearable></el-input>
- </el-form-item>
- <el-form-item label="">
- <el-input size="small" placeholder="会员昵称/手机号" v-model="search.keyword" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <!--因为提现方式由后台配置。所以这里不能写死,要渲染后台数据-->
- <el-select size="small" v-model="search.withdraw_type" clearable placeholder="提现方式" @change='handleClick' class="select">
- <el-option :key="index" v-for="(item, index) in DefaultWithDrawWayMap" :label="item" :value="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-select size="small" v-model="search.withdraw_from" placeholder="提现类型" @change='handleClick' class="select">
- <el-option
- v-for="item in withdraw_from_list"
- :key="item.key"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-date-picker
- size="small"
- v-model="date"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- @change="selectDateTime"
- end-placeholder="结束日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" size="small" icon="el-icon-search" @click="handleClick" class="search_button">搜索</el-button>
- </el-form-item>
- </el-form>
- <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="60" 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="180">
- <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="130">
- <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 v-if="scope.row.from == 3">
- <div>货款提现</div>
- </template>
- <template v-if="scope.row.from == 4">
- <div>积分提现</div>
- </template>
- <template v-if="scope.row.from == 9" >
- <div>{{scope.row.from_msg}}</div>
- </template>
- <template v-if="scope.row.from == 10" >
- <div>{{scope.row.from_msg}}</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 == 'alitopay' || scope.row.type == 'alipay_tax' || scope.row.type == 'alipay_offline' ">
- <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>
- <div v-if="scope.row.extra.bank_address">开户行地址:{{scope.row.extra.bank_address}}</div>
- <div v-if="scope.row.extra.idcard">身份证:{{scope.row.extra.idcard}}</div>
- </template>
- <template v-if="scope.row.type == 'yunfast_pay'">
- <div>开户人:{{scope.row.extra.name}}</div>
- <div>银行卡号:{{scope.row.extra.bank_account}}</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>
- <div v-if="scope.row.extra.bank_address">开户行地址:{{scope.row.extra.bank_address}}</div>
- </template>
- <template v-if="scope.row.type == 'digital'">
- <div v-if="scope.row.extra.bank_account_type==1">账户类型:银行卡</div>
- <div v-if="scope.row.extra.bank_account_type==2">账户类型:支付宝</div>
- <div v-if="scope.row.extra.bank_account_type==3">账户类型:微信</div>
- <div>姓名:{{scope.row.extra.name}}</div>
- <div v-if="scope.row.extra.bank_account_type!=3">
- 账号:{{scope.row.extra.bank_account}}
- </div>
- </template>
- <template v-if="scope.row.type == 'bank_tax'">
- <div>开户人:{{scope.row.extra.name}}</div>
- <div>银行卡号:{{scope.row.extra.bank_account}}</div>
- </template>
- <template v-if="scope.row.type == 'linggong'">
- <div>姓名:{{scope.row.extra.name}}</div>
- <div>收款人账号:{{scope.row.extra.bank_account}}</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.score_money}}元</div>
- <div>转余额扣除:{{scope.row.cash.exchange_balance_num}}元</div>
- <div>实际打款金额:<span style="color: #ff4544">{{scope.row.cash.fact_price}}</span>元</div>
- </template>
- </el-table-column>
- <el-table-column label="提现方式" min-width="150" align="left">
- <template slot-scope="scope">
- <div>{{DefaultWithDrawWayMap[scope.row.type]}}</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>
- <div v-if="scope.row.status==4">打款失败</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 class="btn" 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 class="btn" 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 == 'alitopay'" class="btn" @click="alitopayApply(scope.row, 2)">
- <el-tooltip class="item" effect="dark" content="支付宝代付" placement="top">
- <img width="32px" style="border-radius: 32px;" src="resources/img/mall/alipay_dai.png" alt="">
- </el-tooltip>
- </el-button>
- <!-- 银典代付 -->
- <el-button size="mini" circle v-if="scope.row.status == 1 && scope.row.type == 'yunfast_pay'" class="btn" @click="yunfastApply(scope.row, 2)">
- <el-tooltip class="item" effect="dark" content="银典代付" placement="top">
- <img width="25px" style="border-radius: 32px;" src="resources/img/mall/yunfast_agent.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'" class="btn" @click="avoidtaxApply(scope.row, 2)">
- <el-tooltip class="item" effect="dark" content="支付宝合规" placement="top">
- <img width="32px" style="border-radius: 32px;" src="resources/img/mall/alipay_shui.png" alt="">
- </el-tooltip>
- </el-button>
- <!-- 银行卡打款 -->
- <el-button size="mini" circle v-if="scope.row.status == 1 && scope.row.type == 'bank_tax'" class="btn" @click="banktaxApply(scope.row, 2)">
- <el-tooltip class="item" effect="dark" content="银企直联" placement="top">
- <img width="32px" style="border-radius: 32px;" src="resources/img/mall/alipay_shui.png" alt="">
- </el-tooltip>
- </el-button>
- <!-- <el-button size="mini" circle v-if="scope.row.status == 1 && scope.row.type == 'linggong'" class="btn" @click="linggongApply(scope.row, 2)">
- <el-tooltip class="item" effect="dark" content="点薪灵工" placement="top">
- <img width="32px" style="border-radius: 32px;" src="resources/img/mall/alipay_shui.png" alt="">
- </el-tooltip>
- </el-button> -->
- <!-- <el-button size="mini" circle v-if="scope.row.status == 1" class="btn" @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 && scope.row.type != 'linggong'" class="btn" @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 class="btn" 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>
- <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" 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>
- </div>
- </el-card>
- <el-dialog :close-on-click-modal="false" 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" v-loading="applyLoading" @click="apply()">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog :close-on-click-modal="false" :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: 'mall/finance/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,
- mall_id:0,
- cash_log :null,
- applyLoading: false,
- DefaultWithDrawWayMap: {},
- statistic: [
- {
- title: '待审核总佣金',
- name: 'audit_commision',
- value: '0.00',
- },
- {
- title: '待打款总佣金',
- name: 'pending_commision',
- value: '0.00',
- },
- {
- title: '已打款总佣金',
- name: 'paid_commision',
- value: '0.00',
- },
- {
- title: '已驳回总佣金',
- name: 'rejected_commision',
- value: '0.00',
- },
- {
- title: '平台总佣金',
- name: 'total_commision',
- value: '0.00',
- },
- ],
- withdraw_from_list: [],
- };
- },
- 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 !== "alitopay") {
- 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: 'mall/finance/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);
- this.$message.success(e.data.data.res);
- done();
- setTimeout(() => {
- this.loadData(this.activeName)
- }, 1500)
- } 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: 'mall/finance/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: 'mall/finance/cash',
- 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.DefaultWithDrawWayMap = e.data.data.DefaultWithDrawWayMap;
- 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;
- this.mall_id = e.data.data.mall_id;
- // 平台数据
- this.statistic.map(item => {
- item.value = e.data.data.statistic[item.name]
- })
- this.withdraw_from_list = e.data.data.withdraw_from_list;
- } 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: 'mall/finance/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,
- mall_id : this.mall_id
- }
- }).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() {
- if (this.applyLoading === true) return;
- this.applyLoading = true;
- request({
- params: {
- r: 'mall/finance/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);
- }
- this.applyLoading = false;
- }).catch(e => {
- this.applyLoading = false;
- });
- },
- /* apply(cash, status) {
- this.$prompt('请输入备注', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- beforeClose: (action, instance, done) => {
- if (action === 'confirm') {
- instance.confirmButtonLoading = true;
- instance.confirmButtonText = '执行中...';
- request({
- params: {
- r: 'mall/finance/cash-apply',
- },
- method: 'post',
- data: {
- id: cash.id,
- status: status,
- content: instance.inputValue,
- }
- }).then(e => {
- instance.confirmButtonLoading = false;
- if (e.data.code === 0) {
- this.loadData(this.activeName, this.page);
- done();
- } else {
- instance.confirmButtonText = '确定';
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- done();
- instance.confirmButtonLoading = false;
- });
- } else {
- done();
- }
- }
- }).then(value => {
- }).catch(e => {
- this.$message({
- type: 'info',
- message: '取消输入'
- });
- });
- }, */
- 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, 'mall/finance/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;
- }
- if (item.type != 'linggong') {
- ids.push(item.id)
- }
- })
- if (ids.length <= 0) {
- this.$message({
- type: 'warning',
- message: '批量打款不支持点薪灵工'
- });
- return;
- }
- if (is_return == true) return;
- this.dialogLoading = true;
- data.ids = ids;
- this.send(data, 'mall/finance/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);
- });
- },
- /**
- * 银典代付
- */
- yunfastApply(cash, status) {
- this.checkedData = [cash];
- this.yunfastBatch()
- },
- /**
- * 银典代付
- */
- yunfastBatch() {
- let self = this;
- var status = 1;
- var arrList = new Array();
- $.each(this.checkedData, function(k, v) {
- if (v.type !== "yunfast_pay") {
- 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: 'mall/finance/yunfast-pay',
- },
- method: 'post',
- data: {
- id: arrList,
- }
- }).then(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- self.listLoading = false;
- if (e.data.code === 0) {
- this.$message.success(e.data.msg)
- setTimeout(() => {
- this.loadData()
- }, 1000)
- done();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- this.$message.error(e.message);
- done();
- });
- } else {
- done();
- }
- }
- })
- },
- /**
- * 银企直联打款
- */
- banktaxApply(cash, status) {
- this.checkedData = [cash];
- this.banktaxBatch()
- },
- /**
- * 银企直联打款
- */
- banktaxBatch() {
- let self = this;
- var status = 1;
- var arrList = new Array();
- $.each(this.checkedData, function(k, v) {
- if (v.type !== "bank_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: 'mall/finance/banktax',
- },
- method: 'post',
- data: {
- id: arrList,
- }
- }).then(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- self.listLoading = false;
- if (e.data.code === 0) {
- this.$message.success(e.data.msg)
- setTimeout(() => {
- this.loadData()
- }, 1000)
- done();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- this.$message.error(e.message);
- done();
- });
- } else {
- done();
- }
- }
- })
- },
- /**
- * 点薪灵工打款
- */
- linggongApply(cash, status) {
- this.checkedData = [cash];
- this.linggongBatch()
- },
- /**
- * 点薪灵工打款
- */
- linggongBatch() {
- let self = this;
- var status = 1;
- var arrList = new Array();
- $.each(this.checkedData, function(k, v) {
- if (v.type !== "linggong") {
- 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: 'mall/finance/linggong',
- },
- method: 'post',
- data: {
- id: arrList,
- }
- }).then(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- self.listLoading = false;
- if (e.data.code === 0) {
- this.$message.success(e.data.msg)
- setTimeout(() => {
- this.loadData()
- }, 1000)
- done();
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- instance.confirmButtonLoading = false;
- instance.confirmButtonText = '确认';
- this.$message.error(e.message);
- done();
- });
- } else {
- done();
- }
- }
- })
- },
- }
- })
- </script>
- <style class="less">
- .content {
- background: #fff;
- padding: 20px;
- }
- .table-body {
- padding: 0;
- }
- .default-avatar {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- .btn {
- margin-top: 10px !important;
- border: 0 !important;
- padding: 0 !important;
- }
- .stat_details{
- /* padding-bottom: 30px; */
- padding-top: 20px;
- display: flex;
- }
- .order_module{
- flex: 1;
- background: #F2F2F2;
- margin: 0 5px;
- padding: 20px 25px;
- }
- .order_module:last-child{
- margin-right: 0;
- }
- .order_module:first-child{
- margin-left: 0;
- }
- .price{
- font-size: 22px;
- font-weight: bold;
- }
- .oirder_modul_title{
- font-size: 12px;
- margin-bottom: 10px;
- display: flex;
- align-items: center;
- }
- .oirder_modul_title .text{
- margin-right: 10px;
- }
- .stat_icon{
- font-size: 19px;
- color: #BFBFBF;
- }
- </style>
|