Browse Source

采购价列表优化

zq-0828-newMenu
pengda 1 week ago
parent
commit
87b9abd84c
  1. 22
      src/router/index.js
  2. 0
      src/views/agent/expenseDetails.vue
  3. 11
      src/views/agent/expenseStatistics.vue
  4. 267
      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 = [ const blackSliderList = [
'/franchise', '/agreement', '/customizeDoc', '/agent/siteAdd', '/agent/siteServiceList', '/agent/siteTemplate','/agent/siteAddFinally','/agent/siteServiceAdd', '/agent/supplyList', '/franchise', '/agreement', '/customizeDoc', '/agent/siteAdd', '/agent/siteServiceList', '/agent/siteTemplate','/agent/siteAddFinally','/agent/siteServiceAdd', '/agent/supplyList',
'/agent/domainList','/agent/siteAddChooseService' '/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 = [] let first_child_router = []
@ -330,9 +330,9 @@ const routes = [{
} }
}, },
{ {
path: '/agent/statisticalDetails', path: '/agent/expenseDetails',
name: '站点月详情', name: '站点月详情',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/statisticalDetails.vue'), component: () => import( /* webpackChunkName: "expenseDetails" */ '../views/agent/expenseDetails.vue'),
meta: { meta: {
breadcrumbParent: '收支统计' // 手动指定父级 breadcrumbParent: '收支统计' // 手动指定父级
} }
@ -340,7 +340,7 @@ const routes = [{
{ {
path: '/agent/siteRank', path: '/agent/siteRank',
name: '站点排行', name: '站点排行',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/statisticalDetails.vue'), component: () => import( /* webpackChunkName: "expenseDetails" */ '../views/agent/expenseDetails.vue'),
props: { props: {
rankFlag: 'site' rankFlag: 'site'
}, },
@ -351,7 +351,7 @@ const routes = [{
{ {
path: '/agent/serviceRank', path: '/agent/serviceRank',
name: '服务排行', name: '服务排行',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/statisticalDetails.vue'), component: () => import( /* webpackChunkName: "expenseDetails" */ '../views/agent/expenseDetails.vue'),
props: { props: {
rankFlag: 'chktype' rankFlag: 'chktype'
}, },
@ -362,7 +362,7 @@ const routes = [{
{ {
path: '/agent/recharge', path: '/agent/recharge',
name: '账号充值', name: '账号充值',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/recharge.vue'), component: () => import( /* webpackChunkName: "recharge" */ '../views/agent/recharge.vue'),
meta: { meta: {
hideBreadcrumb: true // 一级页面不显示面包屑 hideBreadcrumb: true // 一级页面不显示面包屑
} }
@ -370,11 +370,19 @@ const routes = [{
{ {
path: '/agent/payoff', path: '/agent/payoff',
name: '代收款结算', name: '代收款结算',
component: () => import( /* webpackChunkName: "statisticalDetails" */ '../views/agent/payoff.vue'), component: () => import( /* webpackChunkName: "payoff" */ '../views/agent/payoff.vue'),
meta: { meta: {
hideBreadcrumb: true // 一级页面不显示面包屑 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

@ -225,12 +225,6 @@ export default {
// GuipSelect, // GuipSelect,
SvgIcon SvgIcon
}, },
props: {
total_type: {
type: String,
default: '1'
},
},
data() { data() {
return { return {
totalType:'1', totalType:'1',
@ -248,7 +242,6 @@ export default {
mounted() { mounted() {
const {total_type, date} = this.$route.query const {total_type, date} = this.$route.query
this.$nextTick(()=>{ this.$nextTick(()=>{
this.totalType = this.total_type;
if(total_type)this.totalType = total_type; if(total_type)this.totalType = total_type;
if(date) this.date = date; if(date) this.date = date;
@ -278,8 +271,8 @@ export default {
this.handleClick() this.handleClick()
}, },
handleClickDetail(id){ handleClickDetail(id){
if(this.totalType == 2) this.$router.push(`/agent/statisticalDetails?uid=${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/statisticalDetails?chktype=${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){ handleClicksiteRank(id){
this.$router.push(`/agent/siteRank?id=${id}&total_type=${this.totalType}&date=`+this.date) this.$router.push(`/agent/siteRank?id=${id}&total_type=${this.totalType}&date=`+this.date)

267
src/views/agent/payoff.vue

@ -11,15 +11,39 @@
<div class="flex"> <div class="flex">
</div> </div>
</div> </div>
<div class="mt24" v-if="totalType == '1'"> <div class="mt24 payoff-set" v-if="totalType == '1'">
<el-form class="el-row demo-ruleForm" ref="formRef"> <el-form>
ddd <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> </el-form>
</div> </div>
<el-form class="mt24" v-else> <div class="mt24" v-if="totalType == '2'">
<PromptText v-if="totalType == '2'" text="温馨提示:满200元自动结算,次日凌晨打款;通过微信收到的货款,有7天账期(例如:周一的收入,下周一才能结算提现)。" :type="1" class="mb32"/> <el-form>
<PromptText text="温馨提示:满200元自动结算,次日凌晨打款;通过微信收到的货款,有7天账期(例如:周一的收入,下周一才能结算提现)。" :type="1" class="mb32"/>
<GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1"> <GuipTable :tableData="tableList" :key="tableKey" ref="multipleTable" autoColumn="true" :loading="tableLoading" style="flex:1">
<template v-if="totalType == '2'">
<el-table-column fixed="left" prop="tid" label="订单号" min-width="200px"> <el-table-column fixed="left" prop="tid" label="订单号" min-width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.tid">{{scope.row.tid}}</span> <span v-if="scope.row.tid">{{scope.row.tid}}</span>
@ -53,8 +77,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</template> </GuipTable>
<template v-else> </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="short_name" label="账号"></el-table-column>
<el-table-column prop="bill_date" label="账单日期"></el-table-column> <el-table-column prop="bill_date" label="账单日期"></el-table-column>
<el-table-column prop="pay_type" label="支付类型"> <el-table-column prop="pay_type" label="支付类型">
@ -72,18 +101,29 @@
</el-table-column> </el-table-column>
<el-table-column prop="money" label="操作"> <el-table-column prop="money" label="操作">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
</template>
</GuipTable> </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>
</el-form> </el-form>
</div> </div>
</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>
</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>
</GuipDialog>
</div>
</template> </template>
<script> <script>
@ -91,67 +131,88 @@ import GuipButton from "@/components/GuipButton.vue";
import GuipTable from "@/components/GuipTable.vue"; import GuipTable from "@/components/GuipTable.vue";
import GuipToolTip from "@/components/GuipToolTip.vue"; import GuipToolTip from "@/components/GuipToolTip.vue";
import PromptText from "@/components/PromptText.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 { export default {
components: { components: {
GuipInput,
GuipDialog,
GuipSwitch,
PromptText, PromptText,
GuipToolTip, GuipToolTip,
GuipTable, GuipTable,
GuipButton, GuipButton,
}, },
props: {
total_type: {
type: String,
default: '1'
},
},
data() { data() {
return { return {
totalType:'1', totalType:'1',
tableLoading:false, tableLoading:false,
walletType: '', payoffInfo:[],
walletList:[], dialogVisible: false,
formData: {
prompt:'', openid: '',
prompt_link:'', realname: '',
bonus:[], },
buy_price_type: '', formRules: {
buy_price_types: {}, openid: [
buy_price_link: '', { required: true, message: '请输入收款人姓名', trigger: 'blur' }
buy_price_links: {}, ],
links_desc: '', realname: [
{ required: true, message: '请输入收款支付宝账号', trigger: 'blur' }
ordernum:'', ],
},
tableKey: '', tableKey: '',
tableList:[], 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() { mounted() {
this.$nextTick(()=>{ this.$nextTick(()=>{
this.totalType = this.total_type; if(this.$route.query.total_type)this.totalType = this.$route.query.total_type;
this.handleClick() this.handleClick()
}) })
}, },
methods: { 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){ payoffStatusClass(status){
if(status == '异常') return 'status-info warning'; if(status == '异常') return 'status-info warning';
if(status == '成功') return 'status-info success'; if(status == '成功') return 'status-info success';
@ -163,16 +224,15 @@ export default {
}, },
handleClick(){ handleClick(){
this.tableList = [] this.tableList = []
this.total_money = 0 if(this.totalType == 1) this.getPayoffData()
if(this.totalType == 1) this.getRechargeData()
if(this.totalType == 2) this.getPayoffList() if(this.totalType == 2) this.getPayoffList()
if(this.totalType == 3) this.getBillList() if(this.totalType == 3) this.getBillList()
}, },
getRechargeData() { getPayoffData() {
try { 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.$nextTick(() => {
this.walletList = response.data this.payoffInfo = response.data
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
@ -184,11 +244,7 @@ export default {
getPayoffList() { getPayoffList() {
this.tableLoading = true this.tableLoading = true
try { try {
this.$http('POST', '/agentnew/ajax_get_payoff_list', { this.$http('POST', '/agentnew/ajax_get_payoff_list', {}).then(response => {
type: this.walletType,
cur_page: this.currentPage,
page_size: this.pageSize
}).then(response => {
this.tableLoading = false this.tableLoading = false
this.$nextTick(() => { this.$nextTick(() => {
this.tableList = response.data.list this.tableList = response.data.list
@ -205,7 +261,7 @@ export default {
getBillList() { getBillList() {
this.tableLoading = true this.tableLoading = true
try { 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.tableLoading = false
this.$nextTick(() => { this.$nextTick(() => {
this.tableList = response.data.list this.tableList = response.data.list
@ -219,56 +275,34 @@ export default {
this.tableLoading = false this.tableLoading = false
} }
}, },
doRecharge(){ handleShowInfo(id,uid,pay_type){
try { this.$router.push(`/agent/payoffDetails?id=${id}&uid=${uid}&pay_type=${pay_type}&total_type=${this.totalType}`)
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(){
</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;
} }
} }
</script>
<style lang="scss" scoped>
.payoff-wrap{ .payoff-wrap{
::v-deep .el-tabs__header{ ::v-deep .el-tabs__header{
margin: 0; margin: 0;
} }
::v-deep .el-form-item {
margin-bottom: 0;
}
.pagetitle { .pagetitle {
text-align: left; text-align: left;
font-size: 16px; font-size: 16px;
@ -281,6 +315,37 @@ export default {
.w16{ .w16{
width: 16px; 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{ .status-info{
display: inline-block; display: inline-block;
padding: 2px 10px; 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 GuipRadio
}, },
props: {
total_type: {
type: String,
default: '1'
},
},
data() { data() {
return { return {
totalType:'1', totalType:'1',
@ -243,7 +237,6 @@ export default {
}, },
mounted() { mounted() {
this.$nextTick(()=>{ this.$nextTick(()=>{
this.totalType = this.total_type;
this.handleClick() this.handleClick()
}) })
}, },

Loading…
Cancel
Save