Commit 7c025dd4 by 前端

bug

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