Commit 7c025dd4 by 前端

bug

1 parent 6c88280a
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 14:36:40
* @LastEditTime: 2025-01-19 16:59:59
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -54,6 +54,7 @@
</view>
</template>
</view>
<view class="line"></view>
<view class="input-box">
<view class="input-item">
<view class="input-label width-320">应触客台数</view>
......@@ -106,7 +107,7 @@
<view class="value-detail">
<view class="detail-item" v-for="(output, i) in outputDetail">
<view class="detail-label">{{ output.label }}</view>
<view class="detail-num">{{ salaryDetail.commissionRecord ? salaryDetail.commissionRecord[output.value] : salaryDetail.goodsTypeList[index][output.value] || 0 }}{{ output.unit }}</view>
<view class="detail-num">{{ getOutput(output, item) }}{{ output.unit }}</view>
</view>
</view>
</view>
......@@ -118,27 +119,27 @@
<view class="result-main">
<view class="result-item">
<view class="result-label">基本工资</view>
<view class="result-price">{{ salaryDetail.basicSalary }}</view>
<view class="result-price">{{ formatNumber(salaryDetail.basicSalary) }}</view>
</view>
<template v-if="form.sceneType == 1">
<view class="result-item">
<view class="result-label">轻改提成</view>
<view class="result-price">{{ salaryDetail.commissionPrice }}</view>
<view class="result-price">{{ formatNumber(salaryDetail.commissionPrice) }}</view>
</view>
</template>
<template v-else>
<view class="result-item" v-for="(item, index) in form.goodsTypeList">
<view class="result-item" v-for="(item, index) in form.goodsTypeList" :key="index">
<view class="result-label">{{ item.showName }}提成</view>
<view class="result-price">{{ salaryDetail.goodsTypeList[index].commissionPrice }}</view>
<view class="result-price">{{ formatNumber(salaryDetail.goodsTypeList[getIndex(item)] ? salaryDetail.goodsTypeList[getIndex(item)].commissionPrice : 0) }}</view>
</view>
<view class="result-item checked">
<view class="result-label">合计提成</view>
<view class="result-price">{{ salaryDetail.commissionPrice }}</view>
<view class="result-price">{{ formatNumber(salaryDetail.commissionPrice) }}</view>
</view>
</template>
<view class="result-item">
<view class="result-label">本月递延金</view>
<view class="result-price">{{ salaryDetail.deferExpenses }}</view>
<view class="result-price">{{ formatNumber(salaryDetail.deferExpenses) }}</view>
</view>
</view>
<view class="result-footer">
......@@ -228,7 +229,7 @@ export default {
value: '1'
},
{
label: '会员权益',
label: '会员权益/升级',
value: '0'
}
],
......@@ -339,6 +340,13 @@ export default {
}
},
methods: {
getOutput(output, item) {
return this.salaryDetail.commissionRecord ? this.salaryDetail.commissionRecord[output.value] : (this.salaryDetail.goodsTypeList[this.getIndex(item)] && this.salaryDetail.goodsTypeList[this.getIndex(item)][output.value]) || 0
},
getIndex(item) {
const idx = this.salaryDetail.goodsTypeList.findIndex(i => i.showName == item.showName)
return idx
},
IncomeCal() {
this.calDaliog = true
this.form = {
......@@ -490,7 +498,7 @@ export default {
text-align: center;
line-height: 92rpx;
font-weight: 700;
margin: 26rpx 0;
margin: 22rpx 0;
text {
background: linear-gradient(129deg, #0eabf9 13%, #2f80ea 50%, #7d6ee6 91%);
......@@ -546,7 +554,7 @@ export default {
max-height: 50vh;
overflow-y: auto;
.output-box {
height: 648rpx;
height: 652rpx;
background: #e6f1ff;
border: 2rpx solid #ffffff;
border-radius: 48rpx;
......@@ -555,6 +563,11 @@ export default {
overflow-x: hidden;
padding: 44rpx 48rpx;
}
.line {
border-top: 2rpx dashed #e1e9fa;
margin: 47rpx 50rpx;
}
.input-box {
width: 100%;
display: flex;
......@@ -563,7 +576,6 @@ export default {
margin-bottom: 40rpx;
&.select-container {
margin-bottom: 88rpx;
display: grid;
gap: 40rpx;
grid-template-columns: 31% 38% 31%;
......@@ -727,7 +739,10 @@ export default {
line-height: 32rpx;
margin-bottom: 30rpx;
}
.result-main {
max-height: 400rpx;
overflow-y: auto;
}
.result-item {
font-size: 26rpx;
color: #181a1f;
......
......@@ -9,14 +9,15 @@
<tr class="tr" v-for="(item, index) in detail.recordList" :key="index">
<td>{{ index + 1 }}</td>
<td v-for="(colValue, colKey) in tabelTr" :key="colKey">
{{ item[colValue] }}
<text class="car-box" v-if="colValue.style" :style="colValue.style(item[colValue.type])">{{ colValue.text(item[colValue.type]) }}</text>
{{ colValue.format ? colValue.format(item[colValue.key]) : item[colValue.name ? colValue.name : colValue] }}
</td>
</tr>
</table>
</view>
<view class="table-footer flex">
<text>{{ detail.label }}合计:</text>
<text class="price">¥ {{ detail.total }}</text>
<text class="price">{{ detail.showUnit }}¥ {{ detail.total }}</text>
</view>
</view>
</Dailog>
......@@ -109,6 +110,12 @@ export default {
}
td {
.car-box {
padding: 4rpx;
font-size: 24rpx;
border-radius: 4rpx;
margin-right: 6rpx;
}
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
border-top: none;
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-16 14:57:39
* @LastEditTime: 2025-01-19 15:19:45
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -46,7 +46,7 @@
<view class="income-item" :key="index" v-if="isShow(item.value)">
<view class="item-label" @click="handleShow(item)">{{ item.label }}</view>
<uni-icons type="help" size="18" color="#A2A2A8" @click="clickTips(item)"></uni-icons>
<view class="item-price">{{ salaryDetail[item.value] || 0 }}</view>
<view class="item-price">{{ item.showUnit }}{{ formatNumber(salaryDetail[item.value] || '0') }}</view>
<view class="item-expand" @click="showDetail(item)" v-if="salaryDetail[item.value] && item.tabelTh"></view>
</view>
</template>
......@@ -282,7 +282,7 @@ export default {
continue
}
// 柱状图上的数据
ctx.fillText('¥' + this.canvasList[i].num, 30 + gap * i, this.height - this.canPersent[i] - 15)
ctx.fillText('¥' + this.formatNumber(this.canvasList[i].num), 30 + gap * i, this.height - this.canPersent[i] - 15)
// if (this.canPersent[i] == 0) {
// i++
......
......@@ -21,7 +21,7 @@
{{ commissionsInfo[0].shouldToShopCount || 0 }}
<text>台</text>
</view>
<view class="total-time">截至{{ date | getPrevDay }}</view>
<view class="total-time">截至{{ commissionsInfo[0].calculationDay }}</view>
</view>
<view class="total-detail flex">
<view class="month-box" v-for="(item, index) in commissionsInfo" :key="index">
......@@ -34,7 +34,7 @@
<view class="value-title">产值</view>
<view class="value-price">
<text>¥</text>
{{ item.orderTotalPrice || '0' }}
{{ formatNumber(item.orderTotalPrice || '0') }}
</view>
</view>
<view class="value-desc flex">
......@@ -70,11 +70,11 @@
<view class="panel-up flex">
<view class="sprite-icon icon-income-card"></view>
<text>本月预估收入</text>
<view class="time">截至{{ date | getPrevDay }}</view>
<view class="time">截至{{ salaryDetail.calculationDay }}</view>
</view>
<view class="panel-bottom">
<text>¥</text>
{{ salaryDetail.correctSalary || 0 }}
{{ formatNumber(salaryDetail.correctSalary || 0) }}
</view>
</view>
<view class="income-detail">
......@@ -83,7 +83,7 @@
<view :class="`sprite-icon icon-${item.icon}`"></view>
<view class="item-label">{{ item.label }}</view>
<uni-icons type="help" size="15" color="#A2A2A8" @click="clickTips(item)"></uni-icons>
<view class="item-value">{{ salaryDetail[item.value] || '0' }}</view>
<view class="item-value">{{ item.showUnit }}{{ formatNumber(salaryDetail[item.value] || '0') }}</view>
<view class="item-next" @click="showDetail(item)" v-if="item.tabelTh && salaryDetail[item.value]"></view>
</view>
</template>
......
......@@ -91,7 +91,7 @@ export default {
return
}
this.incomeCalculation()
// this.start()
this.start()
},
destroyed() {
this.hideFooter(true)
......@@ -170,6 +170,7 @@ export default {
font-size: toRpx(28);
color: #181a1f;
margin-left: toRpx(38);
margin-top: toRpx(2);
}
}
.time-box {
......@@ -186,10 +187,12 @@ export default {
.level-label {
font-size: toRpx(28);
color: #181a1f;
margin-top: toRpx(2);
}
.time-day {
font-size: toRpx(36);
color: #2d66f7;
font-weight: 600;
margin-left: toRpx(48);
}
.time-go {
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-31 16:53:31
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-17 15:53:31
* @LastEditTime: 2025-01-17 21:26:09
* @FilePath: \gl-tape\components\HomeFrame\components\Point.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -42,10 +42,14 @@ export default {
},
watch: {
'$store.state.point.tabIndex'(val) {
console.log(val)
this.activeIndex = val
this.tabName = this.componentList[val]
}
},
mounted() {
this.$store.dispatch('setTab', 0)
},
methods: {
selectTab(index){
this.$store.dispatch('setTab', index)
......
import dayjs from 'dayjs'
export default {
data() {
return {
......@@ -14,7 +15,7 @@ export default {
icon: 'tdcj-icon',
content: '历史已发放提成订单客户本月退单,当月冲减该月提成',
value: 'refundOffset',
recordKey: 'refundOffsetRecord',
recordKey: 'refundOffsetRecords',
tabelTh: [
{
title: '序号',
......@@ -27,7 +28,17 @@ export default {
title: '提成',
width: 20
}
]
],
tabelTr: [
'remark',
{
key: 'deduction',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '会员权益/升级',
......@@ -60,7 +71,19 @@ export default {
width: 20
}
],
tabelTr: ['merchantName', 'commission']
tabelTr: [
{
name: 'merchantName',
style: val => {
return val == 1 ? 'color: #3773F8;background-color:rgba(55, 115, 248, .2)' : 'color: #7C2CF5;background-color: rgba(124, 44, 245, .2);'
},
type: 'configCarType',
text: val => {
return val == 1 ? '问界' : '其他'
}
},
'commission'
]
},
{
label: '日报扣款',
......@@ -81,7 +104,16 @@ export default {
width: 20
}
],
tabelTr: ['deductDate', 'configDeductMoney']
tabelTr: [
'deductDate',
{
key: 'deductMoney',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '轻改提成',
......@@ -123,7 +155,16 @@ export default {
width: 20
}
],
tabelTr: ['deductDate', 'configDeductMoney']
tabelTr: [
'deductDate',
{
key: 'deductMoney',
format: val => {
return '-' + val
}
}
],
showUnit: '-'
},
{
label: '本月递延金',
......@@ -143,7 +184,7 @@ export default {
label: '其他',
icon: 'qt-icon',
content: '其他扣款、奖励事项',
recordKey: 'otherDeductionRecord',
recordKey: 'otherDeductionRecords',
tabelTh: [
{
title: '序号',
......@@ -160,7 +201,16 @@ export default {
width: 20
}
],
tabelTr: ['createdDate', 'remark', 'deduction'],
tabelTr: [
{
key: 'createdDate',
format: val => {
return dayjs(val).format('YYYY-MM-DD')
}
},
'remark',
'deduction'
],
value: 'otherDeduction'
}
],
......@@ -182,6 +232,17 @@ export default {
this.date = `${this.year}-${this.month}-${day}`
},
methods: {
formatNumber(num, decimalPlaces = 2) {
// 保证小数部分精度
let [integer, decimal] = Number(num).toFixed(decimalPlaces).split('.')
// 格式化整数部分(千分位)
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, ',')
// 如果有小数部分,则保留小数部分
return decimal ? `${integer}.${decimal}` : integer
},
back() {
console.log(88)
this.$emit('backHome')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!