提交 ad7d3221 authored 作者: 郑伟娜's avatar 郑伟娜

联调保证金

上级 2044e9e8
...@@ -62,4 +62,12 @@ export const payDetails = (params) => { ...@@ -62,4 +62,12 @@ export const payDetails = (params) => {
}) })
} }
// 保证金申请详情
export const applyDetail = (params) => {
return request({
url: '/local/bond/apply/detail',
method: 'get',
params
})
}
...@@ -77,6 +77,11 @@ export const constantRoutes = [ ...@@ -77,6 +77,11 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/error/401'], resolve), component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true hidden: true
}, },
{
path: '/returnurl',
component: () => import('@/views/returnurl'),
hidden: true
},
{ {
path: '/', path: '/',
component: (resolve) => require(['@/views/entry/newyuncang'], resolve), component: (resolve) => require(['@/views/entry/newyuncang'], resolve),
......
<template> <template>
<el-row :gutter="40" class="panel-group"> <div>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-row :gutter="40" class="panel-group">
<div class="card-panel" @click="handleSetLineChartData('newVisitis')"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel-icon-wrapper icon-people"> <div class="card-panel" @click="handleSetLineChartData('newVisitis')">
<svg-icon icon-class="peoples" class-name="card-panel-icon" /> <div class="card-panel-icon-wrapper icon-people">
</div> <svg-icon icon-class="peoples" class-name="card-panel-icon" />
<div class="card-panel-description">
<div class="card-panel-text">
总商品
</div> </div>
<count-to :start-val="0" :end-val="panelData.goods_total" :duration="2600" class="card-panel-num" /> <div class="card-panel-description">
</div> <div class="card-panel-text">
</div> 总商品
</el-col> </div>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <count-to :start-val="0" :end-val="panelData.goods_total" :duration="2600" class="card-panel-num" />
<div class="card-panel" @click="handleSetLineChartData('messages')">
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="message" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
总订单
</div> </div>
<count-to :start-val="0" :end-val="panelData.order_total" :duration="3000" class="card-panel-num" />
</div> </div>
</div> </el-col>
</el-col> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <div class="card-panel" @click="handleSetLineChartData('messages')">
<div class="card-panel" @click="handleSetLineChartData('purchases')"> <div class="card-panel-icon-wrapper icon-message">
<div class="card-panel-icon-wrapper icon-money"> <svg-icon icon-class="message" class-name="card-panel-icon" />
<svg-icon icon-class="money" class-name="card-panel-icon" /> </div>
</div> <div class="card-panel-description">
<div class="card-panel-description"> <div class="card-panel-text">
<div class="card-panel-text"> 总订单
总收入 </div>
<count-to :start-val="0" :end-val="panelData.order_total" :duration="3000" class="card-panel-num" />
</div> </div>
<count-to :start-val="0" :end-val="panelData.total_price" :decimals="2" :duration="3200" class="card-panel-num" />
</div> </div>
</div> </el-col>
</el-col> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <div class="card-panel" @click="handleSetLineChartData('purchases')">
<div class="card-panel" @click="handleSetLineChartData('shoppings')"> <div class="card-panel-icon-wrapper icon-money">
<div class="card-panel-icon-wrapper icon-shopping"> <svg-icon icon-class="money" class-name="card-panel-icon" />
<svg-icon icon-class="shopping" class-name="card-panel-icon" /> </div>
<div class="card-panel-description">
<div class="card-panel-text">
总收入
</div>
<count-to :start-val="0" :end-val="panelData.total_price" :decimals="2" :duration="3200" class="card-panel-num" />
</div>
</div> </div>
<div class="xz-tip">{{(panelData.refund_total < 100)? panelData.refund_total : '99+' }}</div> </el-col>
<div class="card-panel-description"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel-text"> <div class="card-panel" @click="handleSetLineChartData('shoppings')">
售后订单 <div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
</div> </div>
<count-to :start-val="0" :end-val="panelData.refund_total" :duration="3600" class="card-panel-num" /> <div class="xz-tip">{{(panelData.refund_total < 100)? panelData.refund_total : '99+' }}</div>
<div class="card-panel-description">
<div class="card-panel-text">
售后订单
</div>
<count-to :start-val="0" :end-val="panelData.refund_total" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</el-row>
<!-- 保证金充值提醒 -->
<el-dialog
style="margin-top: 200px;"
title="保证金充值提醒"
:visible.sync="dialogVisible"
:destroy-on-close="true"
width="35%"
center
:close-on-click-modal="false"
append-to-body
>
<div>
<div style="background: rgba(58, 160, 255, .05); padding: 20px; line-height: 24px; text-align: center;">
<div>当前保证金余额不足,部分功能受限,请您及时充值保证金</div>
</div> </div>
</div> </div>
</el-col> <span slot="footer" class="dialog-footer">
</el-row> <el-button type="danger" @click="goPay">去充值</el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import CountTo from 'vue-count-to' import CountTo from 'vue-count-to'
import { shopInfo } from '@/api/securityFund';
export default { export default {
data() { data() {
return {} return {
dialogVisible: false
}
}, },
props: { props: {
panelData: { panelData: {
...@@ -73,10 +98,30 @@ export default { ...@@ -73,10 +98,30 @@ export default {
}, },
mounted() { mounted() {
// console.log(75,this.panelData); // console.log(75,this.panelData);
this.getShopInfo()
}, },
methods: { methods: {
// 获取店铺信息
getShopInfo() {
shopInfo().then(res => {
if (res.code == 1) {
// 是否需要缴纳保证金 0否 1是
if (res.data.is_take_bond == 1 || res.data.bond < res.data.cate_bond / 2) {
this.dialogVisible = true
} else {
this.dialogVisible = false
}
}
})
},
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.$emit('handleSetLineChartData', type) this.$emit('handleSetLineChartData', type)
},
goPay() {
this.dialogVisible = false
this.$router.push({
path: '/system/asset/securityFund'
})
} }
} }
} }
......
<template>
</template>
<script>
export default {
name:'returnurl',
created(){
},
mounted() {
window.opener = null
window.open('', self)
window.close()
},
}
</script>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</div> </div>
</div> </div>
<div style="text-align: center; margin-top: 50px; width: 100%;"> <div style="text-align: center; margin-top: 50px; width: 100%;">
<el-button type="primary" size="mini" style="width: 80px;" @click="payDialog = true" :disabled="bond == cate_bond || !isShowPay">充值</el-button> <el-button type="primary" size="mini" style="width: 80px;" @click="payDialog = true" :disabled="isPay || !isShowPay">充值</el-button>
<el-button size="mini" style="width: 80px;" @click="cancellationDialog = true" :disabled="bond == 0">申请退保</el-button> <el-button size="mini" style="width: 80px;" @click="cancellationDialog = true" :disabled="bond == 0">申请退保</el-button>
</div> </div>
</div> </div>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
label="完成时间" label="完成时间"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.updated_time }} {{ formatter(scope.row.updated_time) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -315,8 +315,9 @@ ...@@ -315,8 +315,9 @@
<script> <script>
import { UploadImg } from '@/api/module/goods' import { UploadImg } from '@/api/module/goods'
import { shopInfo, bondDetail, addBond, bondByCate, accountList, bondApply, payDetails } from '@/api/securityFund'; import { shopInfo, bondDetail, addBond, bondByCate, accountList, bondApply, payDetails, applyDetail } from '@/api/securityFund';
import { getTelphoneCode } from '@/api/module/settings' import { getTelphoneCode } from '@/api/module/settings'
import { dateFormat } from '@/utils'
export default { export default {
data() { data() {
...@@ -369,6 +370,9 @@ ...@@ -369,6 +370,9 @@
this.getPayDetails() this.getPayDetails()
}, },
methods: { methods: {
formatter(time) {
return dateFormat(time * 1000, 'Y-m-d H:i:s')
},
// 处理金额 // 处理金额
getFixed(value) { getFixed(value) {
let data = 0 let data = 0
...@@ -437,13 +441,19 @@ ...@@ -437,13 +441,19 @@
this.bond = res.data.bond || 0 this.bond = res.data.bond || 0
this.frozen_bond = res.data.frozen_bond || 0 this.frozen_bond = res.data.frozen_bond || 0
this.cate_bond = res.data.cate_bond || 0 this.cate_bond = res.data.cate_bond || 0
this.isPay = res.data.is_take_bond == 0 ? true : false // 是否需要缴纳保证金 0否 1是
this.seller_id = res.data.seller_id this.seller_id = res.data.seller_id
this.emergency_tel = res.data.emergency_tel this.emergency_tel = res.data.emergency_tel
this.cancellationForm.money = this.getFixed(this.bond) this.cancellationForm.money = this.getFixed(this.bond)
this.payForm.money = this.getFixed(this.cate_bond - this.bond) this.payForm.money = this.getFixed(this.cate_bond - this.bond)
// 是否需要缴纳保证金 0否 1是
if (res.data.is_take_bond == 1 || this.bond < this.cate_bond / 2) {
this.isPay = true
} else {
this.isPay = false
}
this.getAccountList() this.getAccountList()
} }
}) })
...@@ -484,30 +494,27 @@ ...@@ -484,30 +494,27 @@
if (res.code == 1) { if (res.code == 1) {
if (type == 1) { if (type == 1) {
this.$message({ this.$message({
type: 'warning', type: 'success',
message: '提交成功' message: '提交成功'
}) })
} else { } else {
// 支付宝支付 // 支付宝支付
window.open(res.data.pay_url,'_blank') window.open(res.data.pay_url, '_blank')
this.$confirm('请在支付宝充值页面进行充值。充值完成后,请回到此页面,根据您的情况,点击下方的按钮','充值',{ this.$confirm('请在支付宝充值页面进行充值。充值完成后,请回到此页面,根据您的情况,点击下方的按钮','充值',{
confirmButtonText: '充值成功', confirmButtonText: '充值成功',
cancelButtonText: '充值失败', cancelButtonText: '充值失败',
type: 'warning' type: 'warning'
}).then(async()=> { }).then(async () => {
// this.isKnow = false let payResult = await applyDetail({ id: res.data.id })
// this.activeAliPay = true if(payResult.code === 1) {
// let payResult = await AlipayGet({sn: res.data.orderSn}); if (payResult.data.audit_status == 1) {
// if(payResult.code === 1) { this.$message({type: 'success', message: '充值成功!'})
// if (payResult.message == '支付成功') this.$message({type: 'success',message: '充值成功!'}); } else {
// if (payResult.message == '支付失败') this.$message({type: 'error',message: payResult.message}); this.$message({type: 'error', message: '充值失败!'})
// // 如果充值成功,则需要初始化数据 }
// this.rechargeForm.aliPayAmount = 1000 }
// this.getIncome()
// }
}).catch((err)=> {}); }).catch((err)=> {});
} }
this.payDialog = false this.payDialog = false
this.getShopInfo() this.getShopInfo()
} else { } else {
...@@ -595,7 +602,7 @@ ...@@ -595,7 +602,7 @@
} }
let params = { let params = {
money: this.cancellationForm.money, money: this.cancellationForm.money * 100,
bank_id: this.cancellationForm.account, bank_id: this.cancellationForm.account,
code: this.cancellationForm.code code: this.cancellationForm.code
} }
...@@ -680,7 +687,7 @@ ...@@ -680,7 +687,7 @@
let data = {"img_data": this.Base64img} let data = {"img_data": this.Base64img}
UploadImg(data).then(res => { UploadImg(data).then(res => {
if (res && res.code == 1) { if (res && res.code == 1) {
this.ruleFormdialogLogo.push({'url': res.data.image_url}) this.ruleFormdialogLogo.push({url: res.data.image_url})
this.$message({message: '上传成功', type: 'success'}); this.$message({message: '上传成功', type: 'success'});
} else { } else {
this.ruleFormdialogLogo = []; this.ruleFormdialogLogo = [];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论