This commit is contained in:
wtq
2026-01-19 11:04:20 +08:00
parent 60f1ba8e04
commit 6e0b72a1c8
5 changed files with 194 additions and 81 deletions

View File

@@ -1042,6 +1042,7 @@ async function jxPrinterList(json) {
* @Param end query string true "结束时间1970-01-01 23:59:59"
* @Param size query int true "每页最大数"
* @Param offset query int true "跳过数量"
* @Param ranke query string true "排序"
*/
export const getStoreSettlementInfo = async(params,noLoading = true) => {
try {
@@ -1064,7 +1065,8 @@ export const getStoreSettlementInfo = async(params,noLoading = true) => {
* @Param start query string true "起始时间1970-01-01 00:00:00"
* @Param end query string true "结束时间1970-01-01 23:59:59"
* @Param size query int true "每页最大数"
* @Param offset query int true "跳过数量"
* @Param offset query int true "跳过数量
* @Param ranke query string true "排序"" 例如order_count,desc"
*/
export const getCitySettlementInfo = async (params,noLoading = true) => {
try {
@@ -1078,6 +1080,48 @@ export const getCitySettlementInfo = async (params,noLoading = true) => {
}
}
/**
* @Title 查询远程平台可以金额
* @Description 查询远程平台可以金额
* @Param token header string true "认证token"
* @Param vendorID query int true "门店所属的厂商ID"
*/
export const queryPlatformBalance = async (params,noLoading = true) => {
try {
let res = await api('v2/store/QueryPlatformBalance', {
params,
noLoading
})
return res
} catch (error) {
throw error
}
}
/**
* @Title 远程平台充值
* @Description 远程平台充值
* @Param token header string true "认证token"
* @Param vendorID query int true "门店所属的厂商ID"
* @Param amount query int true "充值金额分"
* @Param category query string true "链接场景[PC,H5]"
* @Param notifyUrl query string false "成功跳转链接(支付宝有,微信没有)"
*/
export const balanceRecharge = async (data,noLoading = true) => {
try {
let res = await api('v2/store/BalanceRecharge', {
method:'POST',
data,
noLoading
})
return res
} catch (error) {
throw error
}
}
export {
setMTStoreAutoText,
getMTStoreAutoText,

View File

@@ -178,7 +178,7 @@ export const newMenu2 = [
color: '',
createdAt: '2021-01-21T17:21:47+08:00',
deletedAt: '1970-01-01T00:00:00+08:00',
id: 7848,
id: 7849,
imgURL: '',
lastOperator: 'suyl',
level: 2,
@@ -187,7 +187,7 @@ export const newMenu2 = [
type: 0,
updatedAt: '2021-01-21T17:21:50+08:00',
url: '/settleStatic',
}
},
// {
// children: [],
// color: '',
@@ -202,7 +202,7 @@ export const newMenu2 = [
// type: 0,
// updatedAt: '2021-01-21T17:21:50+08:00',
// url: '/storeMessage',
// }
// }
]

View File

@@ -11,6 +11,19 @@
{{ formData.vendorID === 101 ? '400-661-5020' : formData.vendorID === 102 ? '400-055-6100' : '400-990-0295转1号键' }}
</el-form-item>
<!-- 专送信息 -->
<!-- 平台余额 -->
<!-- <br>
<el-form-item label="平台余额:" style="" class="platformBalance" v-if="currentDialog.vendorID === 101 || currentDialog.vendorID === 103">
<div style="display: flex;">
{{ '¥' + platformBalance }}
<el-input placeholder="请输入充值金额" v-model.number="amount" style="width: 180px;margin-left: 10px;">
<template slot="append" >
<div @click="sureRecharge">充值</div>
</template>
</el-input>
</div>
</el-form-item> -->
<!-- 平台余额 -->
<!-- 专送门店 -->
<el-form-item label="专送门店ID:" prop="vendorStoreID">
<el-input v-model.trim="formData.vendorStoreID" style="">
@@ -60,7 +73,8 @@
import {
addStoreCourierMap,
updateStoreCourierMap,
getStoreCourierMaps
getStoreCourierMaps,
queryPlatformBalance,
} from "@/apis/store.js";
import { getVendorStore } from "@/apis/controls/shop.js";
export default {
@@ -95,7 +109,9 @@ export default {
]
},
auditStatus: 0,
errMessage:''
errMessage:'',
platformBalance:'0.00',
amount:0, // 充值金额
};
},
computed: {
@@ -118,9 +134,9 @@ export default {
vendorStoreID: this.currentDialog.storeItem.id,
vendorID: this.currentDialog.vendorID,
})
this.tel1 = res.tel1
this.vendorAddress = res.address
if (res) {
this.tel1 = res.tel1
this.vendorAddress = res.address
this.formData.vendorStoreID = this.currentDialog.storeItem.id
this.isClick = false //如果查出来东西就可以点确定按钮
}
@@ -143,7 +159,14 @@ export default {
this.isClick = true
}
},
// // 查询平台余额 达达和蜂鸟
// if(this.currentDialog.vendorID === 101 || this.currentDialog.vendorID === 103){
// console.log(this.currentDialog,'查询平台余额,,,currentDialog')
// let res1 = await queryPlatformBalance({vendorID:this.currentDialog.vendorID})
// console.log(this.currentDialog,'查询平台余额',res1)
// }
},
mounted() { },
methods: {
async searchVendorStore() {
@@ -211,10 +234,33 @@ export default {
// // 刷新美团状态
// refreshMT() {
// }
// 确认充值
async sureRecharge(){
if(!this.amount) return this.$toast('请输入充值金额')
let form = new FormData()
form.append('vendorID',this.currentDialog.vendorID)
form.append('amount',this.currentDialog.amount)
form.append('category','PC') // 链接场景 [PC,H5]
// form.append('notifyUrl','https://www.jxc4.com/#/jxstoremanager') //支付宝有,微信没有
let res = await balanceRecharge(form)
console.log(this.amount,'充值情况','res',res)
}
}
};
</script>
<style lang="scss" scoped>
.editor-courier {}
// .editor-courier {}
/deep/ .platformBalance{
color: #409EFF;
.el-input-group__append{
background-color: #409EFF;
color:#fff;
}
}
</style>

View File

@@ -69,36 +69,35 @@
</el-form-item>
</el-form>
<div >
<el-table :data="dataList" empty="暂无数据~~~" border stripe v-if="searchForm.queryType === '1'" tooltip-effect="dark" style="width: 100%" height="calc(100vh - 340px)" >
<!-- <el-table-column label="门店ID" prop="jx_store_id" align="center" width="80px">
<div slot-scope="scope">
{{ scope.row.jx_store_id }}
</div>
</el-table-column> -->
<el-table-column label="门店名称" prop="name" align="center" min-width="180px" fixed>
<div v-if="searchForm.queryType === '1'">
<el-table
:data="searchForm.queryType === '1' ? dataList : dataListCity"
:default-sort = "{prop: 'order_count', order: 'descending'}"
empty="暂无数据~~~" border stripe tooltip-effect="dark" style="width: 100%" height="calc(100vh - 340px)"
@sort-change="sortChange">
<el-table-column label="门店名称" prop="name" align="center" min-width="180px" fixed>
<div slot-scope="scope">
<div>{{ scope.row.name }}</div>
<div>{{ '(' + scope.row.jx_store_id + ')' }}</div>
</div>
</el-table-column>
<!-- <el-table-column label="品牌ID" prop="brand_id" ></el-table-column> -->
<el-table-column label="品牌名称" prop="brand_name" align="center" width="100px">
<el-table-column label="品牌名称" prop="brand_name" align="center" width="100px" >
<div slot-scope="scope">
{{ scope.row.brand_name }}
</div>
</el-table-column>
<el-table-column label="美团平台ID" prop="mt_store_id" align="center" min-width="100px">
<el-table-column label="美团平台ID" prop="mt_store_id" align="center" min-width="100px" >
<div slot-scope="scope">
{{ scope.row.mt_store_id }}
</div>
</el-table-column>
<el-table-column label="京东平台ID" prop="jd_store_id" align="center" min-width="100px">
<el-table-column label="京东平台ID" prop="jd_store_id" align="center" min-width="100px" >
<div slot-scope="scope">
{{ scope.row.jd_store_id }}
</div>
</el-table-column>
<el-table-column label="闪购平台ID" prop="sg_store_id" align="center" min-width="120px">
<el-table-column label="闪购平台ID" prop="sg_store_id" align="center" min-width="120px" >
<div slot-scope="scope">
{{ scope.row.sg_store_id }}
</div>
@@ -108,75 +107,76 @@
{{ scope.row.city_name }}
</div>
</el-table-column>
<el-table-column label="区" prop="district_name" align="center" width="100">
<el-table-column label="区" prop="district_name" align="center" width="100" >
<div slot-scope="scope">
{{ scope.row.district_name }}
</div>
</el-table-column>
<el-table-column label="品牌费因子" prop="jx_brand_fee_factor" align="center" width="100px">
<el-table-column label="品牌费因子" prop="jx_brand_fee_factor" align="center" width="100px" >
<div slot-scope="scope">
{{ scope.row.jx_brand_fee_factor }}
</div>
</el-table-column>
<el-table-column label="市场费因子" prop="market_add_fee_factor" align="center" width="100px">
<el-table-column label="市场费因子" prop="market_add_fee_factor" align="center" width="100px" >
<div slot-scope="scope">
{{ scope.row.market_add_fee_factor }}
</div>
</el-table-column>
<el-table-column label="扣点模式" prop="pay_percentage" align="center" width="100px">
<el-table-column label="扣点模式" prop="pay_percentage" align="center" width="100px" >
<div slot-scope="scope">
{{ scope.row.pay_percentage > 50 ? '报价' : '扣点' }}
</div>
</el-table-column>
<el-table-column label="有效订单数" prop="order_count" align="center" width="100px">
<el-table-column label="有效订单数" prop="order_count" align="center" width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ scope.row.order_count }}
</div>
</el-table-column>
<el-table-column label="服务费(元)" prop="package_setting" align="center" width="70px">
<el-table-column label="服务费(元)" prop="package_setting" align="center" width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.package_setting/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="包装费(元)" prop="packaging_fee" align="center" width="70px">
<!-- 包装费不能进行远程搜索 -->
<el-table-column label="包装费(元)" prop="packaging_fee" align="center" width="100" >
<div slot-scope="scope">
{{ (scope.row.packaging_fee/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="总运费(元)" prop="total_desired_fee" align="center" width="70px">
<el-table-column label="总运费(元)" prop="total_desired_fee" align="center" width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.total_desired_fee/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="订单售后金额(元)" prop="refund_money" align="center" width="120px">
<el-table-column label="订单售后金额(元)" prop="refund_money" align="center" width="120" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.refund_money/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="平台结算金额(元)" prop="total_shop_money" align="center" width="120px">
<el-table-column label="平台结算金额(元)" prop="total_shop_money" align="center" width="120" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.total_shop_money/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="平台收益(元)" prop="platform_income" align="center" width="100px">
<el-table-column label="平台收益(元)" prop="platform_income" align="center" width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.platform_income/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="门店收(元)" prop="store_income" align="center" width="100px">
<el-table-column label="门店收(元)" prop="store_income" align="center" width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.store_income/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="京西收益(元)" prop="jx_income" align="center" width="100px">
<el-table-column label="京西收益(元)" prop="jx_income" align="center"width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.jx_income/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="市场收益(元)" prop="market_income" align="center" width="100px">
<el-table-column label="市场收益(元)" align="center" width="100" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.market_income/100).toFixed(2) }}
{{ (scope.row.market_income / 100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="平台负责人电话" prop="market_man_phone" align="center" min-width="130px">
@@ -189,7 +189,7 @@
{{ scope.row.market_man_name }}
</div>
</el-table-column>
<el-table-column label="美团负责人" prop="operator1_name" align="center" width="100px">
<el-table-column label="美团负责人" prop="operator1_name" align="center" width="120px">
<div slot-scope="scope">
{{ scope.row.operator1_name }}
</div>
@@ -207,66 +207,65 @@
<!-- <el-table-column label="纯收益" prop="-" ></el-table-column> -->
</el-table>
<el-table :data="dataList" empty="暂无数据~~~" border stripe v-if="searchForm.queryType === '2'" tooltip-effect="dark" style="width: 100%" height="calc(100vh - 340px)" >
<el-table-column label="城市名" prop="city_name" align="center">
</div>
<div v-if="searchForm.queryType === '2'">
<el-table
:default-sort = "{prop: 'order_count', order: 'descending'}"
:data="dataListCity" empty="暂无数据~~~" border stripe tooltip-effect="dark" style="width: 100%" height="calc(100vh - 340px)"
@sort-change="sortChange">
<el-table-column label="城市名" prop="city_name" align="center" >
<div slot-scope="scope">
{{ scope.row.city_name }}
</div>
</el-table-column>
<el-table-column label="门店ID" prop="jx_store_id" align="center">
<div slot-scope="scope">
{{ scope.row.jx_store_id }}
</div>
</el-table-column>
<!-- <el-table-column label="品牌ID" prop="brand_id" ></el-table-column> -->
<el-table-column label="有效订单数" prop="order_count" align="center">
<el-table-column label="有效订单数" prop="order_count" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ scope.row.order_count }}
</div>
</el-table-column>
<el-table-column label="服务费(元)" prop="package_setting" align="center">
<el-table-column label="服务费(元)" prop="package_setting" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.package_setting/100).toFixed(2) }}
</div>
</el-table-column>
<!-- 包装费-每单0.4 -->
<el-table-column label="包装费(元)" prop="packaging_fee" align="center">
<el-table-column label="包装费(元)" prop="packaging_fee" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.packaging_fee/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="总运费(元)" prop="total_desired_fee" align="center">
<el-table-column label="总运费(元)" prop="total_desired_fee" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.total_desired_fee/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="订单售后金额(元)" prop="refund_money" align="center">
<el-table-column label="订单售后金额(元)" prop="refund_money" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.refund_money/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="平台结算金额(元)" prop="total_shop_money" align="center">
<el-table-column label="平台结算金额(元)" prop="total_shop_money" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.total_shop_money/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="平台收益(元)" prop="platform_income" align="center">
<el-table-column label="平台收益(元)" prop="platform_income" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.platform_income/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="门店收(元)" prop="store_income" align="center">
<el-table-column label="门店收(元)" prop="store_income" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.store_income/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="京西收益(元)" prop="jx_income" align="center">
<el-table-column label="京西收益(元)" prop="jx_income" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.jx_income/100).toFixed(2) }}
</div>
</el-table-column>
<el-table-column label="市场收益(元)" prop="market_income" align="center">
<el-table-column label="市场收益(元)" prop="market_income" align="center" :sortable="'custom'">
<div slot-scope="scope">
{{ (scope.row.market_income/100).toFixed(2) }}
</div>
@@ -422,10 +421,12 @@ export default {
vendorIDs:[],
timeRange:[],
cityCode:[],
queryType:'1'
queryType:'1',
sortType:'desc', // desc ,asc
sortCate:'order_count'
},
dataList:[],
// dataListCity:[],
dataListCity:[],
totalCount:0,
size:30,
// size:-1,
@@ -483,7 +484,7 @@ export default {
"订单售后金额(元)",
"服务费(元)",
"包装费-每单0.4元",
"门店收(元)",
"门店收(元)",
"平台收益(元)",
"京西收益(元)",
"市场收益(元)",
@@ -524,7 +525,7 @@ export default {
}else{
excelData.push([
"市",
"jx门店ID",
// "jx门店ID",
"品牌ID",
"名称",
"电话",
@@ -534,7 +535,7 @@ export default {
"总运费(元)",
"京西收益(元)",
"市场收益(元)",
"门店收(元)",
"门店收(元)",
"平台结算金额(元)",
"平台收益(元)",
"订单售后金额(元)",
@@ -543,7 +544,7 @@ export default {
arr.map(item => {
excelData.push([
item.city_name,
item.jx_store_id,
// item.jx_store_id,
item.brand_id,
item.user_name,
item.mobile,
@@ -570,12 +571,21 @@ export default {
sizeChange (size) {
this.$nextTick(() => {
this.size = size
// if(this.currntSortData.length >0) this.dataList= this.currntSortData.slice((this.pageSize - 1) * this.size ,(this.pageSize - 1) * this.size + this.size)
// else this.query()
this.query()
})
},
// 点击页码
handleCurrentChange (val) {
this.offset = (val -1) * this.size
this.pageSize = val
// if(this.currntSortData.length >0){
// this.dataList= this.currntSortData.slice((this.pageSize - 1) * this.size ,(this.pageSize - 1) * this.size + this.size)
// console.log('this.dataList',this.dataList)
// }else{
// this.query()
// }
this.query()
},
confirmStorePick(){
@@ -590,10 +600,11 @@ export default {
// 查询
async query(type){
this.dataList = []
// console.log(this.searchForm,'查询数据',this.searchForm)
// this.currntSortData = []
let obj = {
start:this.searchForm.timeRange[0],
end:this.searchForm.timeRange[1],
ranke:this.searchForm.sortCate + ',' + this.searchForm.sortType,
size:type && type === 'all' ? -1 : this.size,
offset:type && type === 'all' ? 0 : this.offset
}
@@ -609,11 +620,17 @@ export default {
if(this.searchForm.vendorIDs.length >0) obj['vendorIDs'] = JSON.stringify(this.searchForm.vendorIDs)
let res = await getCitySettlementInfo(obj)
if(type && type === 'all') return res.data
this.dataList = res.data
this.dataListCity = res.data
this.totalCount = res.totalCount
}
console.log('this.dataList',this.dataList)
}
},
// table触发排序事件
async sortChange(e){
this.searchForm.sortCate = e.prop
this.searchForm.sortType = e.order === 'descending' ? 'desc' : 'asc'
this.query()
},
}
}
</script>

View File

@@ -43,8 +43,14 @@
</el-form-item>
</el-form>
<div>
<el-table :data="currentData" empty="暂无数据~~~" stripe >
<div style="height: calc(100vh - 300px);overflow-y: auto;">
<el-table
:data="currentData"
empty="暂无数据~~~"
stripe
border
tooltip-effect="dark"
style="width: 100%;">
<el-table-column type="expand">
<template slot-scope="scope">
<!-- <div> -->
@@ -69,18 +75,18 @@
<el-table-column label="门店名" align="center" prop="name"></el-table-column>
<el-table-column label="订单总数" align="center" prop="total_orders"></el-table-column>
</el-table>
<!-- 分页 -->
<div class="page" style="text-align: center;margin-top: 10px;">
<el-pagination
@size-change="sizeChangeRank"
@current-change="handleCurrentChangeRank"
:page-sizes="[15, 30, 50]"
:page-size.sync="pageSize"
layout="total, sizes, prev, pager, next"
:current-page="currentPage"
:total="storeOrderRankStatic.totalCount">
</el-pagination>
</div>
</div>
<!-- 分页 -->
<div class="page" style="text-align: center;margin-top: 10px;">
<el-pagination
@size-change="sizeChangeRank"
@current-change="handleCurrentChangeRank"
:page-sizes="[15, 30, 50]"
:page-size.sync="pageSize"
layout="total, sizes, prev, pager, next"
:current-page="currentPage"
:total="storeOrderRankStatic.totalCount">
</el-pagination>
</div>
</div>
</template>
@@ -140,7 +146,7 @@ export default {
data:{
storeID:'',
timeRange:[],
rank:'ASC', // 排序方式 DESC ASC
rank:'DESC', // 排序方式 DESC ASC
// offset:0,
// pageSize:-1
},