Browse Source

Merge branch 'zq-0828-newMenu' of gitea.intra.yunpaper.com:zhangqi/kuailelunwen_new_houtai into zq-0828-newMenu

zq-0828-newMenu
zq 1 week ago
parent
commit
df53038f31
  1. 22
      src/router/index.js
  2. 0
      src/views/agent/expenseDetails.vue
  3. 11
      src/views/agent/expenseStatistics.vue
  4. 275
      src/views/agent/payoff.vue
  5. 92
      src/views/agent/payoffDetails.vue
  6. 7
      src/views/agent/recharge.vue

22
src/router/index.js

@ -10,7 +10,7 @@ const whiteSecondSider = [
const blackSliderList = [
'/franchise', '/agreement', '/customizeDoc', '/agent/siteAdd', '/agent/siteServiceList', '/agent/siteTemplate','/agent/siteAddFinally','/agent/siteServiceAdd', '/agent/supplyList',
'/agent/domainList','/agent/siteAddChooseService'
, '/agent/noticeList' , '/agent/statisticalDetails', '/agent/siteRank', '/agent/serviceRank'
, '/agent/noticeList' , '/agent/expenseDetails', '/agent/siteRank', '/agent/serviceRank', '/agent/payoffDetails'
];
// 一级路由
let first_child_router = []
@ -330,9 +330,9 @@ const routes = [{
}
},
{
path: '/agent/statisticalDetails',
path: '/agent/expenseDetails',
name: '站点月详情',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/statisticalDetails.vue'),
component: () => import( /* webpackChunkName: "expenseDetails" */ '../views/agent/expenseDetails.vue'),
meta: {
breadcrumbParent: '收支统计' // 手动指定父级
}
@ -340,7 +340,7 @@ const routes = [{
{
path: '/agent/siteRank',
name: '站点排行',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/statisticalDetails.vue'),
component: () => import( /* webpackChunkName: "expenseDetails" */ '../views/agent/expenseDetails.vue'),
props: {
rankFlag: 'site'
},
@ -351,7 +351,7 @@ const routes = [{
{
path: '/agent/serviceRank',
name: '服务排行',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/statisticalDetails.vue'),
component: () => import( /* webpackChunkName: "expenseDetails" */ '../views/agent/expenseDetails.vue'),
props: {
rankFlag: 'chktype'
},
@ -362,7 +362,7 @@ const routes = [{
{
path: '/agent/recharge',
name: '账号充值',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/recharge.vue'),
component: () => import( /* webpackChunkName: "recharge" */ '../views/agent/recharge.vue'),
meta: {
hideBreadcrumb: true // 一级页面不显示面包屑
}
@ -370,11 +370,19 @@ const routes = [{
{
path: '/agent/payoff',
name: '代收款结算',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/payoff.vue'),
component: () => import( /* webpackChunkName: "payoff" */ '../views/agent/payoff.vue'),
meta: {
hideBreadcrumb: true // 一级页面不显示面包屑
}
},
{
path: '/agent/payoffDetails',
name: '核算订单记录',
component: () => import( /* webpackChunkName: "payoff" */ '../views/agent/payoffDetails.vue'),
meta: {
breadcrumbParent: '代收款结算' // 一级页面不显示面包屑
}
},
// -----------------分隔符-----------

0
src/views/agent/statisticalDetails.vue → src/views/agent/expenseDetails.vue

11
src/views/agent/expenseStatistics.vue

@ -227,12 +227,6 @@ export default {
// GuipSelect,
SvgIcon
},
props: {
total_type: {
type: String,
default: '1'
},
},
data() {
return {
totalType:'1',
@ -250,7 +244,6 @@ export default {
mounted() {
const {total_type, date} = this.$route.query
this.$nextTick(()=>{
this.totalType = this.total_type;
if(total_type)this.totalType = total_type;
if(date) this.date = date;
@ -280,8 +273,8 @@ export default {
this.handleClick()
},
handleClickDetail(id){
if(this.totalType == 2) this.$router.push(`/agent/statisticalDetails?uid=${id}&total_type=${this.totalType}&date=${this.date}`)
if(this.totalType == 3) this.$router.push(`/agent/statisticalDetails?chktype=${id}&total_type=${this.totalType}&date=${this.date}`)
if(this.totalType == 2) this.$router.push(`/agent/expenseDetails?uid=${id}&total_type=${this.totalType}&date=${this.date}`)
if(this.totalType == 3) this.$router.push(`/agent/expenseDetails?chktype=${id}&total_type=${this.totalType}&date=${this.date}`)
},
handleClicksiteRank(id){
this.$router.push(`/agent/siteRank?id=${id}&total_type=${this.totalType}&date=`+this.date)

275
src/views/agent/payoff.vue

@ -11,15 +11,39 @@
<div class="flex">
</div>
</div>
<div class="mt24" v-if="totalType == '1'">
<el-form class="el-row demo-ruleForm" ref="formRef">
ddd
</el-form>
<div class="mt24 payoff-set" v-if="totalType == '1'">
<el-form>
<div class="flex gap12 mb24">
<img src="@/assets/pay/pay_3.svg" alt="">
<span>支付宝收款</span>
<GuipSwitch float="right" :active-value="1" :inactive-value="0" activeText="开启" inactiveText="关闭" @change="onSwitchChange"></GuipSwitch>
</div>
<div class="payoff-area flex-between" v-if="payoffInfo">
<div class="payoff-info">
<div class="payoff-acc">收款支付宝账号{{payoffInfo.openid}}</div>
<div class="payoff-name">收款人真实姓名{{payoffInfo.realname}}</div>
</div>
<div class="flex gap12">
<span class="payoff-has">已配置</span>
<GuipButton type="system" @click="handlePayoffInfo()" :btnstyle="{'color':'#006AFF','background':'#FFFFFF','broder-color':'#006AFF'}">修改账号</GuipButton>
</div>
</div>
<div class="payoff-area flex-between" v-else>
<div class="payoff-info">
<div class="payoff-acc">设置收款账号开启平台代收款平台收取5%服务费</div>
</div>
<div class="flex gap12">
<span class="payoff-no">未设置</span>
<GuipButton type="danger" @click="handlePayoffInfo()" :btnstyle="{'color':'#fff','background':'#FF4D4F','broder-color':'#FF4D4F'}">立即设置</GuipButton>
</div>
</div>
</el-form>
</div>
<el-form class="mt24" v-else>
<PromptText v-if="totalType == '2'" text="温馨提示:满200元自动结算,次日凌晨打款;通过微信收到的货款,有7天账期(例如:周一的收入,下周一才能结算提现)。" :type="1" class="mb32"/>
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<template v-if="totalType == '2'">
<div class="mt24" v-if="totalType == '2'">
<el-form>
<PromptText text="温馨提示:满200元自动结算,次日凌晨打款;通过微信收到的货款,有7天账期(例如:周一的收入,下周一才能结算提现)。" :type="1" class="mb32"/>
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<el-table-column fixed="left" prop="tid" label="订单号" min-width="200px">
<template slot-scope="scope">
<span v-if="scope.row.tid">{{scope.row.tid}}</span>
@ -53,8 +77,13 @@
</div>
</template>
</el-table-column>
</template>
<template v-else>
</GuipTable>
</el-form>
</div>
<div class="mt24" v-if="totalType == '3'">
<el-form>
<PromptText text="每天凌晨出具前一天已完成的订单账单" :type="1" class="mb32"/>
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<el-table-column prop="short_name" label="账号"></el-table-column>
<el-table-column prop="bill_date" label="账单日期"></el-table-column>
<el-table-column prop="pay_type" label="支付类型">
@ -72,17 +101,28 @@
</el-table-column>
<el-table-column prop="money" label="操作">
<template slot-scope="scope">
<GuipButton type="text" @click="handleShowInfo(scope.row.tid)">查看核算账单</GuipButton>
<GuipButton type="text" @click="handleShowInfo(scope.row.id,scope.row.uid,scope.row.pay_type)">查看核算账单</GuipButton>
</template>
</el-table-column>
</GuipTable>
</el-form>
</div>
</div>
<GuipDialog :dialogVisible="dialogVisible" title="修改支付宝收款方式" :show-close-button="false" :show-cancel-button="true" @confirm="handleSavePayoffInfo()" @cancel="handleHidePayoffInfo()">
<el-form :model="formData" :rules="formRules" ref="formRef" class="payoff-form">
<PromptText text="须知" :type="1">
<template #desc>
<div class="mt12">使用平台支付宝支付平台收取5%的服务费</div>
<div class="mt12">使用平台支付宝支付真实姓名必须和支付宝账号实名认证姓名统一</div>
</template>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="parseInt(total)">
</el-pagination>
</PromptText>
<GuipInput label="1. 收款人姓名" class="column" ref="GuipInput" prop="realname"
desc="请输入支付宝绑定的银行卡的持卡人姓名" :rules="formRules.realname" v-model="formData.realname"/>
<GuipInput label="2. 收款支付宝账号" class="column" ref="GuipInput" prop="openid"
desc="请输入有效账号" :rules="formRules.openid" v-model="formData.openid"/>
</el-form>
</div>
</GuipDialog>
</div>
</template>
<script>
@ -91,67 +131,88 @@ import GuipButton from "@/components/GuipButton.vue";
import GuipTable from "@/components/GuipTable.vue";
import GuipToolTip from "@/components/GuipToolTip.vue";
import PromptText from "@/components/PromptText.vue";
import GuipSwitch from "@/components/GuipSwitch.vue";
import GuipDialog from "@/components/GuipDialog.vue";
import GuipInput from "@/components/GuipInput.vue";
export default {
components: {
GuipInput,
GuipDialog,
GuipSwitch,
PromptText,
GuipToolTip,
GuipTable,
GuipButton,
},
props: {
total_type: {
type: String,
default: '1'
},
},
data() {
return {
totalType:'1',
tableLoading:false,
walletType: '',
walletList:[],
prompt:'',
prompt_link:'',
bonus:[],
buy_price_type: '',
buy_price_types: {},
buy_price_link: '',
buy_price_links: {},
links_desc: '',
ordernum:'',
payoffInfo:[],
dialogVisible: false,
formData: {
openid: '',
realname: '',
},
formRules: {
openid: [
{ required: true, message: '请输入收款人姓名', trigger: 'blur' }
],
realname: [
{ required: true, message: '请输入收款支付宝账号', trigger: 'blur' }
],
},
tableKey: '',
tableList:[],
currentPage: 1, //
pageSize: 20, //
total: 0, //
total_money: 0, //
tid2refunds: [], //
dialogVisible: false,
refund_detail: [],
confirmBtnStyle: {
'background':'#FF4D4F',
'color':'#FFFFFF',
'border':'1px solid #FF4D4F',
'border-radius':'4px',
'width': '88px',
'height': '33px',
'font-size': '12px',
}
}
},
mounted() {
this.$nextTick(()=>{
this.totalType = this.total_type;
if(this.$route.query.total_type)this.totalType = this.$route.query.total_type;
this.handleClick()
})
},
methods: {
onSwitchChange(){
},
handlePayoffInfo(){
this.dialogVisible = true
this.formData.openid = this.payoffInfo.openid
this.formData.realname = this.payoffInfo.realname
},
handleSavePayoffInfo(){
this.dialogVisible = false
this.$refs.formRef.validate((valid) => {
if(valid){
try {
this.$http('POST', '/agentnew/ajax_set_payoff_info', {
pay_type: this.payoffInfo.pay_type,
zfb_acct: this.formData.openid,
realname: this.formData.realname
}).then(response => {
if (response.status) {
this.$message.success('设置成功');
this.payoffInfo.openid = this.formData.openid
this.payoffInfo.realname = this.formData.realname
return true;
}
this.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
}
});
},
handleHidePayoffInfo(){
this.dialogVisible = false
},
payoffStatusClass(status){
if(status == '异常') return 'status-info warning';
if(status == '成功') return 'status-info success';
@ -163,16 +224,15 @@ export default {
},
handleClick(){
this.tableList = []
this.total_money = 0
if(this.totalType == 1) this.getRechargeData()
if(this.totalType == 1) this.getPayoffData()
if(this.totalType == 2) this.getPayoffList()
if(this.totalType == 3) this.getBillList()
},
getRechargeData() {
getPayoffData() {
try {
this.$http('POST', '/agentnew/ajax_get_recharge_data', {date: this.date}).then(response => {
this.$http('POST', '/agentnew/ajax_get_payoff_info', {date: this.date}).then(response => {
this.$nextTick(() => {
this.walletList = response.data
this.payoffInfo = response.data
})
}).catch(error => {
console.error(error, 'error')
@ -184,11 +244,7 @@ export default {
getPayoffList() {
this.tableLoading = true
try {
this.$http('POST', '/agentnew/ajax_get_payoff_list', {
type: this.walletType,
cur_page: this.currentPage,
page_size: this.pageSize
}).then(response => {
this.$http('POST', '/agentnew/ajax_get_payoff_list', {}).then(response => {
this.tableLoading = false
this.$nextTick(() => {
this.tableList = response.data.list
@ -205,7 +261,7 @@ export default {
getBillList() {
this.tableLoading = true
try {
this.$http('POST', '/agentnew/ajax_get_bill_list', {date: this.date}).then(response => {
this.$http('POST', '/agentnew/ajax_get_bill_list', {}).then(response => {
this.tableLoading = false
this.$nextTick(() => {
this.tableList = response.data.list
@ -219,56 +275,34 @@ export default {
this.tableLoading = false
}
},
doRecharge(){
try {
this.$http('POST', '/agentnew/ajax_do_recharge', {orderId: this.ordernum,type: this.walletType}).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)
}
},
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()
},
handleCurrentChange(val) {
this.currentPage = val
this.getRechargeList()
},
handleShowInfo(){
handleShowInfo(id,uid,pay_type){
this.$router.push(`/agent/payoffDetails?id=${id}&uid=${uid}&pay_type=${pay_type}&total_type=${this.totalType}`)
}
}
}
</script>
<style lang="scss" scoped>
.payoff-form{
::v-deep .prompt-text{
padding: 20px 14px;
}
::v-deep .prompt-desc{
font-weight: bold;
}
.column{
margin-bottom: 0;
margin-top: 24px;
}
}
.payoff-wrap{
::v-deep .el-tabs__header{
margin: 0;
}
::v-deep .el-form-item {
margin-bottom: 0;
}
.pagetitle {
text-align: left;
font-size: 16px;
@ -281,6 +315,37 @@ export default {
.w16{
width: 16px;
}
.payoff-set{
background: #FAFAFA;
padding: 24px 14px;
}
.payoff-area{
padding: 24px 16px;
border-radius: 8px;
background: #FFFFFF;
letter-spacing: 0.08em;
font-size: 14px;
text-align: left;
.payoff-info{
display: flex;
flex-direction: column;
gap: 10px;
.payoff-acc{
color: #1E2226;
}
.payoff-name{
color: #6B7280;
}
}
.payoff-has{
color: #00C261;
}
.payoff-no{
color: #FF4D4F;
}
}
.status-info{
display: inline-block;
padding: 2px 10px;

92
src/views/agent/payoffDetails.vue

@ -0,0 +1,92 @@
<template>
<div class="main-content12 expense-wrap">
<div class="flex-common">
<div class="flex-between mb24">
<div class=" flex gap12">
<b>核算订单记录</b>
</div>
</div>
<div class="flex mb24 gap12" style="gap:30px" v-if="Object.keys(info).length>0">
<div class="flex"><span>检测站点</span>{{info.short_name}}</div>
<div class="flex"><span>支付方式</span><img width="16px" :src="require('@/assets/pay/pay_'+info.pay_type+'.svg')" alt=""></div>
<div class="flex"><span>核算金额</span>{{info.money}}</div>
<div class="flex"><span>账单生成时间</span>{{info.ctime}}</div>
</div>
<el-form>
<GuipTable :tableData="tableList" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<el-table-column prop="id" label="ID" min-width="120px"></el-table-column>
<el-table-column prop="pro_desc" label="检测类型" min-width="180px"></el-table-column>
<el-table-column prop="tid" label="订单编号" min-width="180px"></el-table-column>
<el-table-column prop="sale_date" label="订单生成时间" min-width="180px"></el-table-column>
<el-table-column prop="report_date" label="检测完成时间" min-width="180px"></el-table-column>
<el-table-column prop="wordnum" label="字数" min-width="120px"></el-table-column>
<el-table-column prop="payment" label="实际收入(元)" min-width="180px"></el-table-column>
<el-table-column prop="cost" label="订单成本(元)" min-width="180px"></el-table-column>
<el-table-column prop="status" label="状态"></el-table-column>
</GuipTable>
</el-form>
</div>
</div>
</template>
<script>
import GuipTable from "@/components/GuipTable.vue";
export default {
components: {
GuipTable
},
data() {
return {
id: 0,
uid: 0,
pay_type: 0,
tableLoading:false,
tableList:[],
info:[],
}
},
mounted() {
const {id, uid, pay_type} = this.$route.query
if(!id || !uid || !pay_type) {
this.$message.error('非法请求');
this.$router.push('/agent/payoff')
}
this.id = id
this.uid = uid
this.pay_type = pay_type
this.getBillInfo()
},
methods: {
getBillInfo() {
this.tableLoading = true
try {
this.$http('POST', '/agentnew/ajax_get_bill_info', {
id: this.id,
uid: this.uid,
pay_type: this.pay_type,
}).then(response => {
this.$nextTick(() => {
this.info = response.data.info
this.tableList = response.data.list
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
} finally {
this.tableLoading = false
}
},
}
}
</script>
<style lang="scss" scoped>
.el-form-item{
margin-bottom: 0 !important;
}
</style>

7
src/views/agent/recharge.vue

@ -195,12 +195,6 @@ export default {
GuipRadio
},
props: {
total_type: {
type: String,
default: '1'
},
},
data() {
return {
totalType:'1',
@ -243,7 +237,6 @@ export default {
},
mounted() {
this.$nextTick(()=>{
this.totalType = this.total_type;
this.handleClick()
})
},

Loading…
Cancel
Save