Commit 6a1e99eb by 前端

bug修复

1 parent 95db8d38
<template>
<view class="calendar-container">
<view class="calendar-container" @click="handleTouch">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
......@@ -32,8 +32,9 @@
<script>
import point from '@/mixin/point'
import firstTime from '@/mixin/firstTime'
export default {
mixins: [point],
mixins: [point, firstTime],
name: 'calendar',
props: {
// 是否显示周标题
......@@ -166,17 +167,20 @@ export default {
width: calc(100% / 7);
height: calc((100vh - 550rpx) / 5);
padding: 32rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
border: 2rpx solid #808291;
border: 2rpx solid #e7e7e7;
+ .calendar-date {
border-left: none;
border-top: none;
}
&:nth-child(7n + 1) {
border-left: 2rpx solid #808291;
border-left: 2rpx solid #e7e7e7;
}
&:nth-child(-n + 7) {
border-top: 2rpx solid #808291;
border-top: 2rpx solid #e7e7e7;
}
.date-desc {
position: relative;
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-16 15:07:46
* @LastEditTime: 2025-01-17 14:36:40
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -57,18 +57,18 @@
<view class="input-box">
<view class="input-item">
<view class="input-label width-320">应触客台数</view>
<input type="number" class="input" placeholder="请输入" v-model="form.shouldToShopCount" />
<input type="number" class="input" maxlength="3" @input="form.shouldToShopCount = form.shouldToShopCount.replace(/\D/g, '')" placeholder="请输入" v-model="form.shouldToShopCount" />
</view>
</view>
<view class="input-box num-second" v-if="form.goodsTypeList.length">
<template v-for="(item, index) in form.goodsTypeList">
<view class="input-item" :key="index">
<view class="input-label width-320">{{ item.showName }}成交订单数</view>
<input type="number" class="input" placeholder="请输入" v-model="item.subOrderCount" />
<view class="input-label width-320">{{ item.showName }}订单数</view>
<input type="number" class="input" maxlength="3" @input="item.subOrderCount = item.subOrderCount.replace(/\D/g, '')" placeholder="请输入" v-model="item.subOrderCount" />
</view>
<view class="input-item">
<view class="input-label width-320">{{ item.showName }}成交产值</view>
<input type="number" class="input" placeholder="请输入" v-model="item.totalPrice" />
<view class="input-label width-320">{{ item.showName }}产值</view>
<input type="number" class="input" maxlength="7" @input="item.totalPrice = item.totalPrice.replace(/\D/g, '')" placeholder="请输入" v-model="item.totalPrice" />
</view>
</template>
</view>
......@@ -79,7 +79,7 @@
</view>
</template>
</Dailog>
<Dailog @close="show = false" v-if="show" width="1380rpx" title="收入测算结果">
<Dailog @close="show = false" v-if="show" width="1500rpx" title="收入测算结果">
<view class="dailog-body flex" slot="content">
<view class="output-box">
<view class="month-box" v-for="(item, index) in form.goodsTypeList" :key="index">
......@@ -262,9 +262,9 @@ export default {
salaryDetail: {},
selectList: [
{ label: '职级', key: 'jobType' },
{ label: '品牌', key: 'configCarType', isHide: true },
{ label: '业务类型', key: 'sceneType' },
{ label: '门店', key: 'merchantId' }
{ label: '门店', key: 'merchantId' },
{ label: '品牌', key: 'configCarType', isHide: true }
],
tipsList: [],
list: [],
......@@ -302,6 +302,7 @@ export default {
flag = true
}
})
console.log(goodsTypeList, 'goodsTypeList')
if (merchantId && sceneType && jobType && ((sceneType == 0 && configCarType) || sceneType == 1) && shouldToShopCount && !flag) {
this.isClick = true
} else {
......@@ -323,7 +324,9 @@ export default {
if (val === '1') {
this.form.goodsTypeList = [
{
showName: ''
showName: '',
subOrderCount: '',
totalPrice: ''
}
]
}
......@@ -387,7 +390,14 @@ export default {
getLatestConfigDetail() {
const { merchantId, sceneType, jobType, configCarType } = this.form
uni.$api.pointApi.getLatestConfigDetail({ merchantId, sceneType, hireType: 2, jobType, configCarType }).then(res => {
this.form.goodsTypeList = res
this.form.goodsTypeList = res.map(i => {
return {
...i,
subOrderCount: '',
totalPrice: ''
}
})
console.log(this.form.goodsTypeList, 'this.form.goodsTypeList')
})
},
/**
......@@ -559,7 +569,7 @@ export default {
grid-template-columns: 31% 38% 31%;
}
&.row_2 {
grid-template-columns: 50% 50%;
// grid-template-columns: 50% 50%;
.input-label {
width: 150rpx;
}
......@@ -624,7 +634,7 @@ export default {
}
.month-box {
width: 472rpx;
width: 540rpx;
height: 260rpx;
background: #ffffff;
margin-bottom: 40rpx;
......@@ -646,7 +656,9 @@ export default {
margin: 0 30rpx;
.value-desc {
flex: 1;
&:first-child {
width: 70%;
}
text-align: center;
padding: 20rpx 0 0;
.value-title {
......@@ -672,7 +684,7 @@ export default {
border-radius: 16rpx;
margin: 10rpx auto;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: 30% 40% 30%;
padding: 16rpx 32rpx;
.detail-item {
......@@ -702,7 +714,7 @@ export default {
}
.month-result {
width: 572rpx;
width: 626rpx;
background: #ffffff;
border: 8rpx solid #dbe8ff;
border: 2rpx solid #5b8dfc;
......@@ -737,6 +749,7 @@ export default {
color: #181a1f;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 600;
padding: 0 10rpx;
.result-price {
......
......@@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="history-container">
<view class="history-container" @click="handleTouch">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
......@@ -75,8 +75,9 @@
import Detail from './Detail'
import point from '@/mixin/point'
import Question from './Question.vue'
import firstTime from '@/mixin/firstTime'
export default {
mixins: [point],
mixins: [point, firstTime],
components: {
Detail,
Question
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-10 14:54:29
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-16 14:32:32
* @FilePath: \gl-tape\components\HomeFrame\components\Income\MyStore.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-10 15:42:12
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="store-container">
<view class="store-header flex">
......@@ -37,7 +21,7 @@
{{ commissionsInfo[0].shouldToShopCount || 0 }}
<text>台</text>
</view>
<view class="total-time">截至{{ date }}</view>
<view class="total-time">截至{{ date | getPrevDay }}</view>
</view>
<view class="total-detail flex">
<view class="month-box" v-for="(item, index) in commissionsInfo" :key="index">
......@@ -50,7 +34,7 @@
<view class="value-title">产值</view>
<view class="value-price">
<text>¥</text>
{{ item.calculateValue || '0' }}
{{ item.orderTotalPrice || '0' }}
</view>
</view>
<view class="value-desc flex">
......@@ -61,13 +45,13 @@
</view>
</view>
</view>
<view :class="{ 'value-detail': true, 'bg-box': !scene0PenetrationRateCommissions.length }">
<view :class="{ 'value-detail': true, 'bg-box': commissionsInfo.length == 1 }">
<view class="detail-item" v-for="(v, k) in outputDetail" :key="k">
<view class="detail-label">
<text>{{ v.label }}</text>
<uni-icons type="help" size="15" color="#A2A2A8" v-if="v.content" @click="clickTips(v)"></uni-icons>
</view>
<view class="detail-num">{{ item[v.value] || '0' }}</view>
<view class="detail-num">{{ item[v.value] || '0' }}{{ v.unit }}</view>
</view>
</view>
</view>
......@@ -86,7 +70,7 @@
<view class="panel-up flex">
<view class="sprite-icon icon-income-card"></view>
<text>本月预估收入</text>
<view class="time">截至{{ date }}</view>
<view class="time">截至{{ date | getPrevDay }}</view>
</view>
<view class="panel-bottom">
<text>¥</text>
......@@ -134,6 +118,16 @@ export default {
default: () => []
}
},
filters: {
getPrevDay(val) {
let date = new Date(val)
const prevDate = new Date(date.setDate(date.getDate() - 1))
const year = prevDate.getFullYear()
const month = prevDate.getMonth() + 1
const day = prevDate.getDate()
return `${year}-${month}-${day}`
}
},
inject: ['showPage'],
data() {
return {
......@@ -145,7 +139,8 @@ export default {
{
label: '渗透率',
content: '渗透率 = 成交订单数 / 应触客台数',
value: 'penetrationRate'
value: 'penetrationRate',
unit: '%'
},
{
label: '提成系数',
......@@ -154,7 +149,8 @@ export default {
},
{
label: '提成比例',
value: 'commissionRatio'
value: 'commissionRatio',
unit: '%'
}
],
outputList: [
......@@ -498,6 +494,7 @@ export default {
inset 0 toRpx(4) toRpx(8) 0 #ffffff80;
border-radius: toRpx(48);
padding: toRpx(32) toRpx(36);
height: calc(100vh - #{toRpx(400)});
.income-header {
text {
......@@ -599,8 +596,7 @@ export default {
.income-footer {
font-size: toRpx(24);
color: #808291;
padding-left: toRpx(40);
padding-bottom: toRpx(60);
padding: toRpx(20) 0 toRpx(60) toRpx(40);
}
}
......
......@@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<view class="job-container">
<view class="job-container" @click="handleTouch">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
......@@ -41,8 +41,9 @@
<script>
import point from '@/mixin/point'
import firstTime from '@/mixin/firstTime'
export default {
mixins: [point],
mixins: [point, firstTime],
props: {
transfer: {
type: Object,
......
......@@ -53,7 +53,7 @@ export default {
data() {
return {
// showPassword: true
showPassword: false,
showPassword: true,
jobTypeList: {
0: '实习生(理论)',
1: '实习生(实践)',
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-15 13:36:10
* @LastEditTime: 2025-01-17 15:53:31
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -18,6 +18,7 @@
<script type="text/ecmascript-6">
import Point from './Point/index.vue'
import Income from './Income/index.vue'
import { mapState } from 'vuex'
export default {
name: '',
components: {
......@@ -36,10 +37,18 @@ export default {
}]
}
},
computed: {
...mapState(['point.tabIndex']),
},
watch: {
'$store.state.point.tabIndex'(val) {
this.activeIndex = val
this.tabName = this.componentList[val]
}
},
methods: {
selectTab(index){
this.activeIndex = index
this.tabName = this.componentList[index]
this.$store.dispatch('setTab', index)
}
},
}
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-08 15:15:41
* @LastEditTime: 2025-01-17 09:25:04
-->
<template>
<view class="point-box">
......@@ -90,7 +90,11 @@ export default {
getList(countDate, i) {
uni.$api.pointApi.pointRecordList({ countDate, pointClassification: this.pointClassification[i] }).then(res => {
const pointClassificationName = this.pointClassName[i]
const score = res.reduce((a, b) => utils.calcAdd(a, b.pointValue), 0)
const score = res.reduce((a, b) => {
console.log(a, b.pointValue, utils.calcAdd(a, b.pointValue))
return utils.calcAdd(a, b.pointValue)
}, 0)
console.log(score)
this.$set(this.pointList, i, { list: res, pointClassificationName, score })
})
},
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-15 17:47:45
* @LastEditTime: 2025-01-17 14:51:31
-->
<template>
<view class="point-box">
......@@ -63,12 +63,10 @@
</tr>
<tr class="tr">
<td v-for="(item, index) in tabelTr" :key="index">
<ul v-if="item.list">
<!-- <ul v-if="item.list">
<li v-for="(l, i) in item.list">{{ l }}</li>
</ul>
<template v-else>
{{ item.content }}
</template>
</ul> -->
<view v-html="item.content || item.otherRewards"></view>
</td>
</tr>
</table>
......@@ -95,7 +93,7 @@ export default {
],
badgeList: [],
tabelTh: [{ title: '积分区间', width: 8 }],
tabelTr: [{ content: '奖惩规则(每月)' }, { list: ['咖啡奶茶券 6 张', '生日当月专享哈根达斯券 1 张', '美团外卖直兑券 6 张', '闭门课分享活动参加资格', '定制公司公仔礼包'] }, { list: ['咖啡奶茶券 4 张', '生日当月专享哈根达斯券 1 张', '美团外卖直兑券 4 张', '定制公司公仔礼包'] }, { list: ['咖啡奶茶券 1 张', '美团外卖直兑券 1 张'] }, { list: ['咖啡奶茶券 1 张', '美团外卖直兑券 1 张'] }, { list: ['专项培训与辅导'] }]
tabelTr: [{ content: '奖惩规则(每月)' }]
}
},
props: {
......@@ -133,6 +131,7 @@ export default {
return { title: item.levelName, width: Math.floor(93 / res.length) }
})
this.tabelTh = [...this.tabelTh, ...th]
this.tabelTr = [...this.tabelTr, ...res]
}
})
},
......
......@@ -59,12 +59,12 @@
<text>积分规则</text>
</view>
</view>
<view class="card-content day-rate" v-if="pointDetail.todo">
<view class="card-content day-rate">
{{ pointDetail.done }}
<text>/{{ pointDetail.done + pointDetail.todo }}</text>
</view>
<view class="process-box">
<view class="process-inter" :style="{ width: (100 * pointDetail.done) / pointDetail.total + '%' }"></view>
<view class="process-inter" :style="{ width: (100 * pointDetail.done) / (pointDetail.done + pointDetail.todo) + '%' }"></view>
</view>
</view>
<view class="point-record">
......@@ -136,7 +136,7 @@ export default {
],
starList:[ { title: '学习之星',medalType: 1, logo: require('@/assets/images/point/study_star.png'), logo_grey: require('@/assets/images/point/study_grey.png'), },
{ title: '全勤之星',medalType: 2, logo: require('@/assets/images/point/time_star.png'), logo_grey: require('@/assets/images/point/time_grey.png'), },
{ title: '接待精英',medalType: 4, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), }],
{ title: '平板接待精英',medalType: 4, logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), }],
myStar: [],
recordList:[{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10}],
}
......@@ -329,7 +329,7 @@ export default {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding-left: 20%;
font-size: toRpx(28);
color: #181a1f;
margin-bottom: 32rpx;
......
export default {
data() {
return {
times: 0,
interval: null
}
},
mounted() {
this.start()
},
beforeDestroy() {
clearInterval(this.interval)
},
methods: {
handleTouch() {
this.times = 0
},
close() {
this.back()
this.$store.dispatch('setTab', 0)
},
start() {
this.interval = setInterval(() => {
this.times++
if (this.times == 60) {
this.close()
clearInterval(this.interval)
}
}, 1000)
}
}
}
......@@ -6,25 +6,27 @@
* @FilePath: \gl_tape\store\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import Vue from "vue";
import Vuex from "vuex";
import getters from "./getters";
import user from "./modules/user";
import audio from "./modules/audio";
import update from "./modules/update";
import sys from "./modules/sys";
Vue.use(Vuex);
import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import user from './modules/user'
import audio from './modules/audio'
import update from './modules/update'
import sys from './modules/sys'
import point from './modules/point'
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
user,
audio,
update,
sys
sys,
point
},
getters,
});
getters
})
// Vue.prototype.$store = store;
export default store;
export default store
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-17 15:40:18
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 15:41:00
* @FilePath: \gl-tape\store\modules\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export default {
state() {
return {
tabIndex: 0
}
},
mutations: {
SET_Tab(state, value) {
state.tabIndex = value
}
},
actions: {
setTab({ commit }, value) {
commit('SET_Tab', value)
}
}
}
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 17:16:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-15 21:03:19
* @LastEditTime: 2025-01-17 09:37:32
* @FilePath: \gl_tape\utils\utils.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -65,7 +65,7 @@ function calcAdd(num1, num2) {
r2 = 0
}
m = Math.pow(10, Math.max(r1, r2))
return (num1 * m + num2 * m) / m
return (Math.round(num1 * m) + Math.round(num2 * m)) / m
}
function debounce(fn, timer) {
var t = null
......
......@@ -3,7 +3,7 @@ export default class TempRecordsWorker {
async work(deviceId, data, ws) {
try {
const records = await uni.$dbTempRecord.getRecords()
const msg = `记录获取待提交记录成功 temp records -> ${records}`
const msg = `记录获取待提交记录成功 temp records -> ${JSON.stringify(records)}`
uni.$logger.local.info(msg)
ws.send({ code: 200, msg })
} catch (error) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!