Browse Source

余额管理

zq-0828-newMenu
pengda 3 weeks ago
parent
commit
744ea6edc0
  1. BIN
      src/assets/site/refund_reason.png
  2. 117
      src/views/agent/recharge.vue

BIN
src/assets/site/refund_reason.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

117
src/views/agent/recharge.vue

@ -81,76 +81,68 @@
<el-table-column prop="type_desc" label="类型"></el-table-column>
<el-table-column prop="opt" label="操作">
<template slot-scope="scope">
<GuipButton v-if="scope.row.confirm" type="ignore" class="mr-16" :btnstyle="confirmBtnStyle">确认收货</GuipButton>
<GuipButton v-if="scope.row.confirm" type="ignore" class="mr-16" :btnstyle="confirmBtnStyle" @click="confirmRecharge(scope.row.id, scope.row.tid)">确认收货</GuipButton>
<div v-else>----</div>
</template>
</el-table-column>
</template>
<template v-else>
<el-table-column prop="tid" label="订单号"></el-table-column>
<el-table-column prop="money" label="退回成本"></el-table-column>
<el-table-column prop="pay_date" label="时间"></el-table-column>
<el-table-column prop="remain_money" label="充值前账号余额"></el-table-column>
<el-table-column prop="before_status" label="检测类型">
<el-table-column fixed="left" prop="tid" label="订单号" min-width="200"></el-table-column>
<el-table-column prop="money" label="退回成本" min-width="200"></el-table-column>
<el-table-column prop="pay_date" label="时间" min-width="200"></el-table-column>
<el-table-column prop="remain_money" label="充值前账号余额" min-width="200"></el-table-column>
<el-table-column prop="before_status" label="检测类型" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].prod_desc}}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="before_status" label="退款前论文状态">
<el-table-column prop="before_status" label="退款前论文状态" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].before_status}}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="total_money" label="订单金额">
<el-table-column prop="total_money" label="订单金额" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].total_money}}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="tid" label="退款金额">
<el-table-column prop="tid" label="退款金额" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].refund_money}}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="tid" label="退款方式">
<el-table-column prop="tid" label="退款方式" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].pay_type}}</span>
<span v-if="tid2refunds[scope.row.tid]"><img :src="require('@/assets/pay/pay_'+tid2refunds[scope.row.tid].pay_type+'.svg')" alt=""></span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="tid" label="退款时间">
<el-table-column prop="tid" label="退款时间" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].refund_time}}</span>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="tid" label="退款理由">
<el-table-column prop="tid" label="退款理由" min-width="200">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">{{tid2refunds[scope.row.tid].refund_reason}}</span>
<GuipToolTip v-if="tid2refunds[scope.row.tid]" :content="tid2refunds[scope.row.tid].refund_reason">
<img src="@/assets/site/refund_reason.png" alt="">
</GuipToolTip>
<span v-else>---</span>
</template>
</el-table-column>
<el-table-column prop="tid" label="退款详情">
<el-table-column fixed="right" prop="tid" label="退款详情" min-width="100">
<template slot-scope="scope">
<span v-if="tid2refunds[scope.row.tid]">查看</span>
<GuipButton type="text" v-if="tid2refunds[scope.row.tid]" @click="handleShowInfo(tid2refunds[scope.row.tid].id, scope.row.tid)">查看</GuipButton>
<span v-else>---</span>
</template>
</el-table-column>
</template>
<!-- <el-table-column prop="date1" label="站点名称" min-width="130px" v-if="totalType == '2'">-->
<!-- <template slot-scope="scope">-->
<!-- <div class="flex">-->
<!-- {{ nameList[scope.row.id] }}-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-table-column>-->
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
@ -158,6 +150,29 @@
</el-pagination>
</el-form>
</div>
<GuipDialog :dialogVisible="dialogVisible" width="1100px" title="退款详情" :show-close-button="true" :show-cancel-button="false" @confirm="handleHideInfo()" @close="handleHideInfo()">
<div class="table-grid" v-if="refund_detail">
<div class="table-grid-cell">交易单号</div>
<div class="table-grid-cell">{{refund_detail.pay_tid}}</div>
<div class="table-grid-cell">商户单号</div>
<div class="table-grid-cell">{{refund_detail.tid}}</div>
<div class="table-grid-cell">订单金额</div>
<div class="table-grid-cell">{{refund_detail.total_money}}</div>
<div class="table-grid-cell">实收金额</div>
<div class="table-grid-cell">{{refund_detail.money}}</div>
<div class="table-grid-cell">退款金额</div>
<div class="table-grid-cell">{{refund_detail.refund_money}}</div>
<div class="table-grid-cell">退款状态</div>
<div class="table-grid-cell">{{refund_detail.refund_status}}</div>
<div class="table-grid-cell">退款方式</div>
<div class="table-grid-cell">原路返回</div>
<div class="table-grid-cell">收款账户</div>
<div class="table-grid-cell">{{refund_detail.refund_recv_account}}</div>
</div>
</GuipDialog>
</div>
</template>
<script>
@ -167,9 +182,13 @@ import GuipRadio from "@/components/GuipRadio.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipButton from "@/components/GuipButton.vue";
import GuipTable from "@/components/GuipTable.vue";
import GuipToolTip from "@/components/GuipToolTip.vue";
import GuipDialog from "@/components/GuipDialog.vue";
export default {
components: {
GuipDialog,
GuipToolTip,
GuipTable,
GuipButton,
GuipInput,
@ -208,6 +227,8 @@ export default {
total: 0, //
total_money: 0, //
tid2refunds: [], //
dialogVisible: false,
refund_detail: [],
confirmBtnStyle: {
'background':'#FF4D4F',
@ -330,6 +351,21 @@ export default {
console.error('数据加载失败:', error)
}
},
confirmRecharge(id, tid){
try {
this.$http('POST', '/agentnew/ajax_confirm_recharge', {orderId: tid,type: this.walletType,recharge_id: id}).then(response => {
if (response.status) {
this.$message.success('充值成功');
return true;
}
this.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
handleSizeChange(val) {
this.pageSize = val
this.getRechargeList()
@ -338,6 +374,23 @@ export default {
this.currentPage = val
this.getRechargeList()
},
handleShowInfo(id, tid){
this.dialogVisible = true
try {
this.$http('POST', '/agentnew/ajax_get_cancel_check_detail', {id: id, tid: tid}).then(response => {
this.$nextTick(() => {
this.refund_detail = response.data
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
handleHideInfo(){
this.dialogVisible = false
}
}
}
@ -500,4 +553,16 @@ export default {
::v-deep .el-form-item {
margin: 0;
}
.table-grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr; /* 三列 */
border: 1px solid #ccc;
}
.table-grid-cell {
border: 1px solid #ccc;
padding: 8px;
text-align: center;
}
</style>
Loading…
Cancel
Save