This commit is contained in:
weicw
2023-08-11 14:30:03 +08:00
parent 7a73b38bd5
commit 81ecfd9df0
9 changed files with 176 additions and 10 deletions

11
api/shop/profitLog.js Normal file
View File

@@ -0,0 +1,11 @@
import http from '@/websoft/api/index.js';
// api地址
const api = {
list: '/shop/profit-log/page',
}
// 商品评价列表
export const list = (params, option) => {
return http.get(api.list, {params}, option)
}

View File

@@ -3,10 +3,10 @@ module.exports = {
name: "云芯威BMS",
// 生产环境
// apiUrl: "https://server.gxwebsoft.com/api",
apiUrl: "https://open.gxwebsoft.com/api",
// apiUrl: "https://open.gxwebsoft.com/api",
// 开发环境
// apiUrl: "http://127.0.0.1:8081/api",
// apiUrl: "http://127.0.0.1:9090/api",
apiUrl: "http://127.0.0.1:9090/api",
// apiUrl: "http://chatgpt.wsdns.cn/api",
uploadUrl: 'https://file.wsdns.cn',
fileUrl: 'https://file.wsdns.cn',

View File

@@ -55,7 +55,7 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "安博驰",
"enablePullDownRefresh": true
"enablePullDownRefresh": false
}
}, {
"path": "pages/user/user",
@@ -476,6 +476,24 @@
}
}
,{
"path" : "pages/saleman/profir-log/profir-log",
"style" :
{
"navigationBarTitleText": "我的收益",
"enablePullDownRefresh": true
}
}
,{
"path" : "pages/saleman/saleman",
"style" :
{
"navigationBarTitleText": "分销中心",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
// #ifdef H5

View File

@@ -103,7 +103,7 @@
</view>
</view>
<view class="submit">
<u-input v-model="dealerId" :disabled="disabled" placeholder="请输入推荐人用户ID" />
<u-input v-model="dealerPhone" :disabled="disabled" placeholder="请输入推荐人手机号" />
</view>
<view class="submit">
<u-button type="primary" :disabled="!agree" @click="onBuy">立即下单</u-button>
@@ -142,7 +142,7 @@
mode: 'range',
month: 6,
agree: false,
dealerId: '',
dealerPhone: '',
price: {
batteryRent: 300,
batteryDeposit: 300,
@@ -235,7 +235,7 @@
},
onBuy(){
const app = this
const { record,dealerId } = this
const { record,dealerPhone } = this
let total = 0.0
// 未登录状态
if(!uni.getStorageSync('userId')) {
@@ -271,7 +271,7 @@
batteryInsurance: record.batteryInsurance,
orderSource: record.equipmentCategory,
orderSourceId: record.goodsId,
dealerId
dealerPhone
}).then(res => {
const { orderId } = res.data
app.$success("下单成功")

View File

@@ -34,6 +34,7 @@
<text class="state-text" v-if="order.payStatus == 10">待支付</text>
<text class="state-text" v-if="order.payStatus == 20 && order.receiptStatus == 10">待绑定</text>
<text class="state-text" v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.receiptStatus == 20">已完成</text>
<text class="state-text" v-if="order.receiptStatus == 21">退租中</text>
<text class="state-text" v-if="order.receiptStatus == 30">已退租</text>
<!-- <text>{{ order.stateText }}</text> -->
</view>
@@ -588,9 +589,11 @@
<block v-if="order.orderStatus == OrderStatusEnum.COMPLETED.value && order.isComment == 0 && order.receiptStatus != 30">
<view class="btn-item" @click="handleTargetEquipment(order.equipmentId)">查看电池</view>
<view class="btn-item" @click="handleHireEquipment(order.orderId)"
v-if="equipmentGoods.equipmentCategory != '10'">我要续费</view>
v-if="equipmentGoods.equipmentCategory != '10' && !orderEnd">我要续费</view>
<view class="btn-item" @click="handleRentingOut(order)"
v-if="equipmentGoods.equipmentCategory != '10'">我要退租</view>
v-if="equipmentGoods.equipmentCategory != '10' && order.receiptStatus != 21">我要退租</view>
<view class="btn-item" @click="handleRentingOut(order)"
v-if="equipmentGoods.equipmentCategory != '10' && order.receiptStatus == 21 && !orderEnd">取消退租</view>
</block>
</view>
</view>
@@ -694,7 +697,8 @@
orderPrice2: 0,
priceTitle3: '电池保险',
orderPrice3: 0,
freeTitle: '续费金额'
freeTitle: '续费金额',
orderEnd: false, // 是否已完成分期
}
},
@@ -740,6 +744,7 @@
if (result.data.equipment) {
app.equipmentId = result.data.equipment.equipmentId
}
// 项目显示
app.priceTitle1 = null
app.priceTitle2 = null
@@ -804,6 +809,9 @@
.then(res => {
console.log(res);
app.renewOrderList = res.data;
if(res.data.length >= app.equipmentGoods.periods){
app.orderEnd = true
}
// 计算逾期
res.data.map((d, index) => {
const setTime = new Date(d.expirationTime);
@@ -977,6 +985,8 @@
batteryInsurance: order.batteryInsurance,
orderSource: order.orderSource,
orderSourceId: order.goodsId,
equipmentId: order.equipmentId,
dealerPhone:order.dealerPhone,
comments: '续租订单' + order.orderNo
}).then(res => {
const {

View File

@@ -16,6 +16,7 @@
<text class="state-text" v-if="item.payStatus == 10">待支付</text>
<text class="state-text" v-if="item.payStatus == 20 && item.receiptStatus == 10">待绑定</text>
<text class="state-text" v-if="item.orderStatus == 30 && item.receiptStatus == 20">已完成</text>
<text class="state-text" v-if="item.receiptStatus == 21">退租中</text>
<text class="state-text" v-if="item.receiptStatus == 30">已退租</text>
</view>
</view>
@@ -350,6 +351,7 @@
}
app.where.userId = uni.getStorageSync('userId');
app.where.isRenew = 0;
app.where.isApp = true;
pageOrder(app.where).then(res => {
app.list = res.data.list
const curPageLen = res.data.list.length

View File

@@ -0,0 +1,76 @@
<template>
<view>
<uni-list>
<uni-list-item :key="index" v-for="(item, index) in dataList" :title="`订单号:${item.orderNo}`"
:note="`${orderType[item.scene]}:+ ${item.money}元`" :rightText="item.createTime"></uni-list-item>
</uni-list>
</view>
</template>
<script>
import * as LogApi from '@/api/shop/profitLog.js'
import {mapGetters} from 'vuex'
export default {
data() {
return {
dataList: [],
hasMore: true,
page: 1,
limit: 10,
where: {
},
orderType:{
1: "投资收益",
3: "推广收益",
4: "门店收益",
5: "门店业绩",
}
};
},
computed: {
...mapGetters(['userId'])
},
onLoad() {
this.queryList()
},
methods: {
queryList() {
LogApi.list({
page: this.page,
limit: this.limit,
userId: this.userId
}).then(res => {
if(res.code == 0){
res.data.list.forEach(item => {
item.createTime = this.$u.timeFormat(item.createTime, 'yyyy-mm-dd');
})
this.dataList.push(...res.data.list)
this.hasMore = this.dataList.length < res.data.count
}
}).finally(()=>{
uni.stopPullDownRefresh()
})
},
scrolltolower(e) {
console.log(e);
}
},
onPullDownRefresh() {
this.page == 1;
this.dataList = [];
this.queryList();
this.hasMore = true
},
onReachBottom() {
if(this.hasMore){
this.page ++
this.queryList();
}
}
}
</script>
<style lang="scss">
</style>

47
pages/saleman/saleman.vue Normal file
View File

@@ -0,0 +1,47 @@
<template>
<view class="page-wrap">
<view class="bg1">
</view>
<view class="page-body">
<view class="card1">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
.page-wrap{
min-height: 100vh;
}
.bg1{
width: 100vw;
height: 200rpx;
background-color: #6892FB;
}
.page-body{
position: relative;
bottom: 40rpx;
}
.card1{
background-color: #FFFFFf;
box-shadow: 0 10rpx 20rpx rgba(0,0,0,.15);
width: 620rpx;
height: 400rpx;
margin: 0 auto;
border-radius: 10rpx;
}
</style>

View File

@@ -180,6 +180,8 @@
const service = [
{id: 'get_order',name: '订单管理',icon: 'qpdingdan',type: 'link',url: 'pages/order/index'},
{id: 'equipment',name: '设备管理',icon: 'shouhuodizhi',type: 'link',url: 'pages/user/equipment/index'},
{id: 'saleman',name: '收益明细',icon: 'shouhuodizhi',type: 'link',url: 'pages/saleman/profir-log/profir-log'},
{id: 'withdraw_kog',name: '提现记录',icon: 'shouhuodizhi',type: 'link',url: 'package/dealer/withdraw/apply'},
{id: 'help',name: '使用帮助',icon: 'bangzhu',type: 'link',url: 'pages/help/index'},
{id: 'administration',name: '关于我们',icon: 'sy-yh',type: 'link',url: 'pages/help/about'},
]