Commit 044f50d0 by 前端

通信

1 parent e5e57fc6
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 09:51:43
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-13 20:29:45
* @LastEditTime: 2025-01-14 17:00:03
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Tips.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -292,6 +292,9 @@ export default {
handler(val) {
const { merchantId, sceneType, jobType, configCarType, goodsTypeList, shouldToShopCount } = val
let flag = false
if (goodsTypeList.length == 0) {
flag = true
}
goodsTypeList.forEach(i => {
if (!i.subOrderCount || !i.totalPrice) {
flag = true
......@@ -341,7 +344,7 @@ export default {
this.selectKey = ''
},
getDetail() {
const { phone: staffPhone, merchantId } = uni.$storage.get('userInfo')
const { phone: staffPhone, shopMerchantId: merchantId } = uni.$storage.get('userInfo')
uni.$api.pointApi.getTipsMessage({ staffPhone, merchantId }).then(res => {
this.tipsList = res || []
})
......@@ -447,7 +450,7 @@ export default {
.tips-item {
padding: 30rpx 32rpx;
width: 100%;
height: 384rpx;
min-height: 384rpx;
background: #ffffffb3;
border-radius: 24rpx;
margin-top: 32rpx;
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-07 13:49:15
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-13 16:16:13
* @LastEditTime: 2025-01-14 14:03:08
* @FilePath: \gl-tape\components\HomeFrame\components\Income\History.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -27,7 +27,7 @@
</view>
<view class="income-box">
<view class="income-header">
<text>{{ year - 1 }}年8月收入</text>
<text>{{ year - 1 }}年{{ monthStr }}月收入</text>
</view>
<view class="income-tips">
<view class="sprite-icon icon-tips-b"></view>
......@@ -91,6 +91,7 @@ export default {
],
width: 600,
height: 420,
monthStr: '',
canPersent: [], //百分比数组
listIndex: 0
......@@ -199,6 +200,7 @@ export default {
if (this.canvasList[i].num) {
this.showChart(i) // 重新绘制图表,如果需要更新显示
const month = this.canvasList[i].date.replace(/\D+/, '')
this.monthStr = month
this.monthSalaryDetail(this.year - 1 + '-' + month)
}
......@@ -254,7 +256,7 @@ export default {
continue
}
// 柱状图上的数据
ctx.fillText(this.canvasList[i].num, 33 + gap * i, this.height - this.canPersent[i] - 15)
ctx.fillText(this.canvasList[i].num, 15 + gap * i, this.height - this.canPersent[i] - 15)
// if (this.canPersent[i] == 0) {
// i++
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-10 14:54:29
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-13 16:23:05
* @LastEditTime: 2025-01-14 16:30:24
* @FilePath: \gl-tape\components\HomeFrame\components\Income\MyStore.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -218,7 +218,7 @@ export default {
},
methods: {
getDetail(salaryMonth) {
uni.$api.pointApi.monthSalaryDetail({ salaryMonth }).then(res => {
uni.$api.pointApi.monthSalaryDetail({ salaryMonth: `${this.year}-${(this.month + '').padStart(2, '0')}`, calculationDataFlag: 'Y' }).then(res => {
this.salaryDetail = res || {}
})
console.log(this.salaryDetail, 'salaryDetail')
......@@ -303,99 +303,99 @@ export default {
<style scoped lang="scss">
.store-container {
padding-top: 32rpx;
padding-top: toRpx(32);
.store-header {
padding: 0 36rpx;
padding: 0 toRpx(36);
text {
font-size: 32rpx;
font-size: toRpx(32);
margin-top: -6rpx;
color: #1a1a1a;
}
.tab-box {
margin-left: auto;
width: 212rpx;
height: 60rpx;
width: toRpx(212);
height: toRpx(60);
background: #f0f6ff00;
border: 2rpx solid #e9ecf2;
border-radius: 430rpx;
border: toRpx(2) solid #e9ecf2;
border-radius: toRpx(430);
display: flex;
align-items: center;
justify-content: center;
.tab-item {
font-size: 26rpx;
font-size: toRpx(26);
color: #666666;
text-align: center;
width: 50%;
&.active {
width: 100rpx;
height: 48rpx;
line-height: 48rpx;
width: toRpx(100);
height: toRpx(48);
line-height: toRpx(48);
background: #ffffff;
border-radius: 462rpx;
border-radius: toRpx(462);
color: #2d66f7;
}
}
}
.select-store {
margin-left: 38rpx;
width: 336rpx;
height: 60rpx;
margin-left: toRpx(38);
width: toRpx(336);
height: toRpx(60);
background: #f0f6ff00;
border: 2rpx solid #dde9fb;
border-radius: 12rpx;
padding: 0 20rpx;
border: toRpx(2) solid #dde9fb;
border-radius: toRpx(12);
padding: 0 toRpx(20);
&.ml-auto {
margin-left: auto;
}
.store-name {
width: 260rpx;
width: toRpx(260);
}
.up-icon {
border-right: 10rpx solid transparent;
border-left: 10rpx solid transparent;
border-top: 10rpx solid #000000;
border-right: toRpx(10) solid transparent;
border-left: toRpx(10) solid transparent;
border-top: toRpx(10) solid #000000;
/* 箭头颜色 */
}
}
}
.store-body {
padding: 0 36rpx;
margin-top: 40rpx;
padding: 0 toRpx(36);
margin-top: toRpx(40);
.total-box {
width: 20%;
padding-left: 30rpx;
padding-left: toRpx(30);
.total-title {
font-size: 28rpx;
font-size: toRpx(28);
color: #181a1f;
line-height: 36rpx;
line-height: toRpx(36);
}
.total-num {
font-size: 48rpx;
font-size: toRpx(48);
color: #3773f8;
font-weight: 600;
margin-top: 16rpx;
margin-top: toRpx(16);
text {
font-size: 22rpx;
font-size: toRpx(22);
}
}
.total-time {
margin-top: 64rpx;
font-size: 24rpx;
margin-top: toRpx(64);
font-size: toRpx(24);
color: #808291;
}
}
......@@ -405,18 +405,18 @@ export default {
overflow-x: auto;
.month-box {
margin-left: 40rpx;
margin-left: toRpx(40);
flex: 1;
min-width: calc(50% - 40rpx);
padding: 32rpx;
min-width: calc(50% - #{toRpx(40)});
padding: toRpx(32);
background: #ffffff;
border-radius: 24rpx;
border-radius: toRpx(24);
.month-header {
text {
font-size: 24rpx;
font-size: toRpx(24);
color: #808291;
margin-left: 16rpx;
margin-left: toRpx(16);
}
}
......@@ -425,23 +425,23 @@ export default {
min-width: 50%;
&:last-child {
margin-left: 30rpx;
margin-left: toRpx(30);
}
.value-title {
font-size: 24rpx;
font-size: toRpx(24);
color: #adb0b8;
line-height: 36rpx;
line-height: toRpx(36);
}
.value-price {
font-size: 32rpx;
font-size: toRpx(32);
color: #181a1f;
line-height: 60rpx;
margin-left: 4rpx;
line-height: toRpx(60);
margin-left: toRpx(4);
text {
font-size: 24rpx;
font-size: toRpx(24);
}
}
}
......@@ -449,22 +449,22 @@ export default {
.value-detail {
background: #ffffff;
border-radius: 16rpx;
border-radius: toRpx(16);
display: grid;
grid-template-columns: repeat(3, 1fr);
margin-top: 16rpx;
margin-top: toRpx(16);
.detail-item {
.detail-label {
font-size: 24rpx;
font-size: toRpx(24);
color: #adb0b8;
line-height: 36rpx;
line-height: toRpx(36);
}
.detail-num {
font-size: 32rpx;
font-size: toRpx(32);
color: #292d33;
line-height: 48rpx;
line-height: toRpx(48);
}
}
}
......@@ -473,71 +473,71 @@ export default {
}
.income-body {
margin-top: 48rpx;
margin-top: toRpx(48);
background: #ffffff;
border: 4rpx solid #ffffff;
border: toRpx(4) solid #ffffff;
box-shadow:
0 0 40rpx -8rpx #5182cc33,
inset 0 4rpx 8rpx 0 #ffffff80;
border-radius: 48rpx;
padding: 32rpx 36rpx;
0 0 toRpx(40) -8rpx #5182cc33,
inset 0 toRpx(4) toRpx(8) 0 #ffffff80;
border-radius: toRpx(48);
padding: toRpx(32) toRpx(36);
.income-header {
text {
font-size: 32rpx;
font-size: toRpx(32);
margin-top: -6rpx;
color: #1a1a1a;
}
.history-box {
margin-left: auto;
width: 184rpx;
height: 60rpx;
width: toRpx(184);
height: toRpx(60);
background: #ffffff;
border: 2rpx solid #edeff2;
border-radius: 30rpx;
border: toRpx(2) solid #edeff2;
border-radius: toRpx(30);
text {
font-size: 26rpx;
font-size: toRpx(26);
color: #808291;
margin-left: 8rpx;
margin-left: toRpx(8);
}
}
}
.income-panel {
height: 152rpx;
height: toRpx(152);
width: 100%;
padding: 24rpx 48rpx;
padding: toRpx(24) toRpx(48);
background-image: linear-gradient(180deg, #e6f1ff 0%, #f9fcff 100%);
border: 2rpx solid #ffffff;
box-shadow: inset 0 4rpx 8rpx 0 #ffffff80;
border-radius: 24rpx;
border: toRpx(2) solid #ffffff;
box-shadow: inset 0 toRpx(4) toRpx(8) 0 #ffffff80;
border-radius: toRpx(24);
box-sizing: border-box;
.panel-up {
font-size: 28rpx;
font-size: toRpx(28);
color: #808291;
.time {
margin-left: auto;
font-size: 24rpx;
font-size: toRpx(24);
color: #808291;
}
text {
margin: 0 16rpx;
margin: 0 toRpx(16);
}
}
.panel-bottom {
font-weight: 600;
font-size: 40rpx;
font-size: toRpx(40);
color: #181a1f;
margin-top: 10rpx;
margin-top: toRpx(10);
text {
font-size: 28rpx;
font-size: toRpx(28);
}
}
}
......@@ -545,56 +545,56 @@ export default {
.income-detail {
display: flex;
flex-wrap: wrap;
gap: 40rpx 96rpx;
padding: 30rpx;
gap: toRpx(40) toRpx(96);
padding: toRpx(30);
.income-detail-item {
width: calc(50% - 96rpx);
width: calc(50% - #{toRpx(96)});
.item-label {
font-weight: 300;
font-size: 26rpx;
font-size: toRpx(26);
color: #181a1f;
margin: 0 10rpx 0 16rpx;
margin: 0 toRpx(10) 0 toRpx(16);
}
.item-value {
font-size: 30rpx;
font-size: toRpx(30);
color: #181a1f;
margin-left: auto;
}
.item-next {
margin-left: 24rpx;
margin-left: toRpx(24);
width: 0;
height: 0;
border-left: 10rpx solid #808291;
border-bottom: 10rpx solid transparent;
border-top: 10rpx solid transparent;
border-left: toRpx(10) solid #808291;
border-bottom: toRpx(10) solid transparent;
border-top: toRpx(10) solid transparent;
/* 箭头颜色 */
}
}
}
.income-footer {
font-size: 24rpx;
font-size: toRpx(24);
color: #808291;
padding-left: 40rpx;
padding-bottom: 60rpx;
padding-left: toRpx(40);
padding-bottom: toRpx(60);
}
}
.store-footer {
margin-top: 40rpx;
margin-top: toRpx(40);
.store-btn {
width: 100%;
height: 80rpx;
height: toRpx(80);
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
border-radius: 16rpx;
line-height: 80rpx;
font-size: 28rpx;
box-shadow: inset 0 0 toRpx(32) 0 #ffffff80;
border-radius: toRpx(16);
line-height: toRpx(80);
font-size: toRpx(28);
color: #ffffff;
text-align: center;
}
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-14 11:25:37
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-14 13:48:52
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Question.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<Tips @close="close" v-if="show" width="1288rpx" :title="detail.label">
<view class="dailog-body" slot="content">
......@@ -10,17 +18,17 @@
</view>
</view>
<template v-if="detail.base">
<view class="base-line">
<view class="base-line flex">
<view class="base-label">职级工资</view>
<view class="base-times">(初级销售)</view>
<view class="base-value">3,500</view>
</view>
<view class="base-line">
<view class="base-line flex">
<view class="base-label">应出勤天数</view>
<view class="base-times">(本月31-4)</view>
<view class="base-value">27天</view>
</view>
<view class="base-line">
<view class="base-line flex">
<view class="base-label">实际出勤天数</view>
<view class="base-times">(截至2025-1-6)</view>
<view class="base-value">22天</view>
......@@ -74,6 +82,16 @@ export default {
color: #808291;
}
}
.base-line {
font-size: 32rpx;
color: #1a1a1a;
line-height: 50rpx;
.base-times {
margin-left: auto;
color: #808291;
margin-right: 32rpx;
}
}
.dailog-desc {
font-size: 32rpx;
color: #808291;
......
......@@ -88,7 +88,8 @@ export default {
if (res.configFlag == 0 || (res.configFlag == 2 && phoneList.includes(phone))) {
this.isShow = true
} else {
// return
this.isShow = false
return
}
this.incomeCalculation()
this.start()
......@@ -121,7 +122,7 @@ export default {
* 点击页面时,清除定时器
*/
handleTouch() {
clearInterval(this.interval)
this.times = 0
},
close() {
this.$emit('selectTab', 0)
......
......@@ -6,7 +6,8 @@ export default {
label: '基本工资',
icon: 'jbgz-icon',
content: '基本工资 = 职级工资÷应出勤天数×实际出勤天数',
value: 'basicSalary'
value: 'actualBasicSalary',
base: true
},
{
label: '退单冲减',
......
/*
* @Descripttion:
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2024-06-28 17:12:39
* @LastEditors: limin
* @LastEditTime: 2025-01-06 09:35:55
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-14 16:56:37
* @FilePath: \gl_tape\utils\recordManager\index.js
*/
// import { singleton } from '../utils.js'
import AudioManager from './AudioManager.js'
import DBRecord from './dbRecord.js'
import Record from './Record.js'
// import Record from './Record.js'
import RecordDto from './RecordDto.js'
import TempRecord from './TempRecord.js'
// const SingleDBTempRecord = singleton(TempRecord)
module.exports = { AudioManager, DBRecord, Record, RecordDto, TempRecord }
module.exports = { AudioManager, DBRecord, RecordDto, TempRecord }
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-14 16:49:00
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-01-14 18:14:20
* @FilePath: \gl-tape\ws\workers\AddRecordWorker.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { RecordDto } from '@/utils/recordManager/index'
export default class AddRecordWorker {
constructor() {}
......@@ -15,7 +23,7 @@ export default class AddRecordWorker {
throw new Error(`数据格式错误,表中没有 ${key} 字段`)
}
})
await uni.$dbTempRecord.addRecord(record)
await uni.$dbManager.addRecord(record)
const msg = `写入待上传记录成功 temp record -> ${JSON.stringify(record)}`
uni.$logger.local.info(msg)
ws.send({ code: 200, msg })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!