Commit 4f9e74ef by 杨明

Merge branch 'SAAS+V4.52.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.52.1

2 parents 35a5dfe3 c8cd2496
Showing 44 changed files with 1421 additions and 269 deletions
...@@ -88,5 +88,16 @@ module.exports = { ...@@ -88,5 +88,16 @@ module.exports = {
...data ...data
}) })
} },
/**
* 客户邀约记录-邀约类型数目统计
*/
getInviteRecordCount(data) {
return http.post({
method: "dj.api.smartcarlife.customerInviteRecord.inviteStatus.count",
projectName: "boutique",
...data
})
},
}; };
...@@ -253,5 +253,13 @@ module.exports = { ...@@ -253,5 +253,13 @@ module.exports = {
projectName: 'pad', projectName: 'pad',
...data ...data
}) })
},
// 预警消息
getWarningPage(data) {
return http.post({
method: 'dj.pad.api.message.box.findWarningNotificationPage',
projectName: 'pad',
...data
})
} }
} }
/* /*
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01 * @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-03-07 16:28:37 * @LastEditTime: 2025-04-23 17:19:15
* @FilePath: \gl-tape\api\module\point.js * @FilePath: \gl-tape\api\module\point.js
* @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
*/ */
...@@ -189,5 +189,45 @@ module.exports = { ...@@ -189,5 +189,45 @@ module.exports = {
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
},
/** 我的考勤相关接口 */
/** 员工考勤日历 */
newCalendar(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.calendar.new',
projectName: 'boutique',
...data
})
},
/** 打卡申诉列表 */
getAppealList(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.list',
projectName: 'boutique',
...data
})
},
/** 提交打卡申诉 */
appealCommit(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.commit',
projectName: 'boutique',
...data
})
},
/** 考勤出勤明细 */
attendanceDetail(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.attendance.detail',
projectName: 'boutique',
...data
})
},
appealExist(data) {
return http.post({
method: 'dj.api.car.boutique.clock.in.staff.appeal.exist',
projectName: 'boutique',
...data
})
} }
} }

3.22 KB | W: | H:

2.14 KB | W: | H:

assets/spritesmith/lssl-icon.png
assets/spritesmith/lssl-icon.png
assets/spritesmith/lssl-icon.png
assets/spritesmith/lssl-icon.png
  • 2-up
  • Swipe
  • Onion skin
export const TYPE_LIST = [
{
value: '-1',
name: '异常',
class: 'red'
},
{
value: 1,
name: '正常',
class: ''
},
{
value: 2,
name: '加班',
class: 'blue'
},
{
value: 3,
name: '有请假',
class: 'purple'
},
{
value: 4,
name: '请休假',
class: 'gray'
}
]
export const DAY_STATE = {
'-1': '异常',
'1': '正常',
'2': '加班',
'3': '有请假',
'4': '请休假'
}
export const CLOCK_STATE = {
0: '正常',
1: '迟到',
2: '早退',
3: '缺卡'
}
export const ABNORMAL_LIST = [
{
value: 0,
name: '正常',
class: 'normal'
},
{
value: 1,
name: '迟到',
class: 'late'
},
{
value: 2,
name: '早退',
class: 'late'
},
{
value: 3,
name: '缺卡',
class: 'missing-card'
}
]
\ No newline at end of file \ No newline at end of file
<template>
<view class="attendance-container">
<Calendar></Calendar>
</view>
</template>
<script type="text/ecmascript-6">
import Calendar from './Calendar.vue'
export default {
components: {Calendar}
}
</script>
<style scoped lang="scss">
.attendance-container {
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#fff"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
</view>
<view class="popup-body">
<video
ref="videoPlayer"
:src="detailUrl"
controls
v-if="sourceType == 2"
></video>
<view
class="img-detail"
v-else
>
<image
class="image"
@click="back"
:src="detailUrl"
:style="{ width: width + 'px' }"
/>
</view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
export default {
props: {
isComponents: Boolean,
show: Boolean,
mediaObject: Object
},
data () {
return {
width: 0,
title: '',
sourceType: '',
detailUrl: ''
}
},
watch:{
show:{
immediate: true,
handler (n) {
if (n) {
console.log(this.mediaObject)
this.init(this.mediaObject)
}
}
}
},
computed: {
popupShow () {
let status = true
if (this.isComponents) status = this.show
return status
},
},
onLoad (options) {
this.init(options)
},
methods: {
init (options) {
const { tabName, sourceType, detailUrl } = options
this.title = tabName
this.sourceType = sourceType
this.detailUrl = detailUrl
const _this = this
uni.getImageInfo({
src: detailUrl, // 替换为你的图片路径
success (img) {
uni.createSelectorQuery().select('.img-detail').boundingClientRect(function (rect) {
_this.width = rect.height * img.height / img.width
}).exec();
},
fail: function (error) {
console.error('获取图片信息失败:', error);
}
});
},
back () {
if (this.isComponents) this.$emit('previewBack')
else uni.navigateBack()
},
}
}
</script>
<style scoped lang="scss">
.popup-box {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #000;
padding: toRpx(60) 0;
z-index: 999;
.nav-bar {
width: 100%;
height: toRpx(96);
margin-bottom: toRpx(50);
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
.title {
color: #fff;
flex: 1;
font-size: toRpx(32);
font-weight: 700;
text-align: center;
}
}
.popup-body {
width: 100%;
height: calc(100% - #{toRpx(200)});
video {
width: 100%;
height: 100%;
}
.img-detail {
// height: tpRpx(200);
height: 100%;
text-align: center;
.image {
width: toRpx(984) !important;
// height: toRpx(1312);
height: 100%;
}
}
}
}
</style>
<!-- <!--
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2025-01-08 10:31:49 * @Date: 2025-01-08 10:31:49
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-03-05 15:08:42 * @LastEditTime: 2025-04-17 16:31:35
* @FilePath: \gl-tape\components\HomeFrame\components\Income\Dailog.vue * @FilePath: \gl-tape\components\HomeFrame\components\Income\Dailog.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
--> -->
......
...@@ -88,13 +88,22 @@ ...@@ -88,13 +88,22 @@
<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">{{ item.showUnit }}{{ formatNumber(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="(salaryDetail[item.value] && item.tabelTh) || item.showNext"></view>
</view> </view>
</template> </template>
</view> </view>
<view class="income-footer">个人所得税、社保、迟到、早退等月初统一核算,不包括在收入测算中。实际发放工资以工资核算为准。</view> <view class="income-footer">个人所得税、社保、迟到、早退等月初统一核算,不包括在收入测算中。实际发放工资以工资核算为准。</view>
</view> </view>
<Detail @close="show = false" :show="show" :detail="detail" :tabelTh="detail.tabelTh" :tabelTr="detail.tabelTr"></Detail> <Detail @close="show = false" :show="show" :detail="detail" :tabelTh="detail.tabelTh" :tabelTr="detail.tabelTr"></Detail>
<base-dialog @close="baseShow = false" @showBaseDetail="showBaseDetail" :baseSalaryDetail="baseSalaryDetail" :show="baseShow"></base-dialog>
<base-detail
@close="
baseDetailShow = false
baseShow = true
"
:show="baseDetailShow"
:detail="detail"
></base-detail>
<Question @close="tipsShow = false" :show="tipsShow" :detail="tipsDetail"></Question> <Question @close="tipsShow = false" :show="tipsShow" :detail="tipsDetail"></Question>
<MessageBox ref="drawVisible" position="bottom" :isFooter="false" title="选择门店" :maxHeight="1000"> <MessageBox ref="drawVisible" position="bottom" :isFooter="false" title="选择门店" :maxHeight="1000">
<view class="select-box"> <view class="select-box">
...@@ -108,13 +117,17 @@ ...@@ -108,13 +117,17 @@
<script> <script>
import Detail from './Detail' import Detail from './Detail'
import baseDialog from './baseDialog'
import baseDetail from './baseDetail'
import point from '@/mixin/point' import point from '@/mixin/point'
import Question from './Question.vue' import Question from './Question.vue'
export default { export default {
mixins: [point], mixins: [point],
components: { components: {
Question, Question,
Detail Detail,
baseDialog,
baseDetail
}, },
props: { props: {
merchants: { merchants: {
...@@ -136,7 +149,10 @@ export default { ...@@ -136,7 +149,10 @@ export default {
data() { data() {
return { return {
show: false, show: false,
baseDetailShow: false,
baseShow: false,
tipsDetail: {}, tipsDetail: {},
baseSalaryDetail: {},
tipsShow: false, tipsShow: false,
activeIndex: 1, activeIndex: 1,
outputDetail: [ outputDetail: [
...@@ -217,11 +233,30 @@ export default { ...@@ -217,11 +233,30 @@ export default {
} }
}, },
methods: { methods: {
getLastDayOfMonth(yearMonth) {
// 分割字符串,获取年和月
const [year, month] = yearMonth.split('-').map(Number)
// 创建一个日期对象,月份是从0开始的,所以这里要 month(而不是 month-1)
// 我们将日期设置为下个月的第0天,这会自动回到上个月的最后一天
const date = new Date(year, month, 0)
// 返回最后一天的日期
return yearMonth + '-' + date.getDate()
},
getDetail(salaryMonth) { getDetail(salaryMonth) {
uni.$api.pointApi.monthSalaryDetail({ salaryMonth: `${this.year}-${(this.month + '').padStart(2, '0')}`, calculationDataFlag: 'Y' }).then(res => { uni.$api.pointApi.monthSalaryDetail({ salaryMonth: `${this.year}-${(this.month + '').padStart(2, '0')}`, calculationDataFlag: 'Y' }).then(res => {
this.salaryDetail = res || {} this.salaryDetail = res || {}
}) })
console.log(this.salaryDetail, 'salaryDetail') const { phone: staffPhone } = uni.$storage.get('userInfo')
const params = {
staffPhone,
startTime: salaryMonth + '-01 00:00:00',
endTime: this.getLastDayOfMonth(salaryMonth) + ' 23:59:59'
}
uni.$api.pointApi.attendanceDetail(params).then(res => {
this.baseSalaryDetail = res
})
}, },
/** /**
* @description 选择门店 * @description 选择门店
...@@ -323,8 +358,18 @@ export default { ...@@ -323,8 +358,18 @@ export default {
console.log(this.detail, 11) console.log(this.detail, 11)
this.show = true this.show = true
}, },
showBaseDetail(item) {
console.log(888)
this.baseShow = false
this.baseDetailShow = true
const recordList = [1, 2, 3]
this.detail = { ...item, recordList }
},
showDetail(item) { showDetail(item) {
console.log(this.salaryDetail) if (item.label == '基本工资') {
this.baseShow = true
return
}
const total = this.salaryDetail[item.value] const total = this.salaryDetail[item.value]
const recordList = this.salaryDetail[item.recordKey] const recordList = this.salaryDetail[item.recordKey]
this.detail = { ...item, total, recordList } this.detail = { ...item, total, recordList }
...@@ -554,17 +599,18 @@ export default { ...@@ -554,17 +599,18 @@ export default {
.history-box { .history-box {
margin-left: auto; margin-left: auto;
width: toRpx(184); width: 180rpx;
height: toRpx(60); height: 60rpx;
background: #ffffff; border-radius: 16rpx;
border: toRpx(2) solid #edeff2; opacity: 1;
border-radius: toRpx(30); background: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff80;
text { text {
font-size: toRpx(26); color: #ffffff;
color: #808291; font-size: 26rpx;
margin-left: toRpx(8); margin-left: 8rpx;
margin-top: toRpx(1); margin-top: 1prx;
} }
} }
} }
......
<template>
<Dailog @close="close" v-if="show" width="1440rpx" :title="detail.label" :icon="detail.icon">
<view class="dailog-body" slot="content">
<view class="table-container">
<table class="table-box">
<tr class="th">
<th v-for="(item, index) in detail.th" :key="index" :style="{ width: item.width + '%' }">{{ item.title }}</th>
</tr>
<tr class="tr" v-for="(item, index) in detail.exceptionDetailList" :key="index">
<td v-for="(colValue, colKey) in detail.th" :key="colKey">{{ item[colValue.value] ? item[colValue.value] : colValue.value == 'attendanceType' ? detail.desc : '' }}</td>
</tr>
</table>
</view>
<view class="table-footer flex">
<text>合计:{{ detail.label }}{{ detail.exceptionDetailList && detail.exceptionDetailList.length }}次</text>
<text class="price">{{ detail.total }}</text>
<text class="total-text">{{ getCount(detail.exceptionDetailList) }}天</text>
</view>
<view class="tips-box">{{ detail.tips }}</view>
</view>
</Dailog>
</template>
<script>
import Dailog from './Dailog'
import utils from '@/utils/utils'
export default {
props: {
detail: {
type: Object,
default: () => {}
},
show: {
type: Boolean,
default: false
}
},
components: {
Dailog
},
data() {
return {}
},
methods: {
getCount(val) {
return val.reduce((pre, cur) => {
return utils.calcAdd(pre, isNaN(cur.deductionDays) ? 0 : cur.deductionDays)
}, 0)
},
close() {
this.$emit('close')
}
}
}
</script>
<style scoped lang="scss">
.table-container {
max-height: 50vh;
overflow: auto;
}
.table-box {
width: 100%;
padding: 0 64rpx;
border-collapse: separate;
/* 防止边框合并 */
border-spacing: 0;
border: none;
.th {
position: sticky;
top: 0;
}
/* 单元格之间没有间距 */
tr {
border: none;
text-align: center;
&.line {
td {
border-top: 16rpx solid rgba($color: #fff, $alpha: 0.9);
}
}
th {
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
border-top: none;
/* 除了首行外,所有行的上方无边框 */
background: #edf3ff;
height: 88rpx;
font-size: 26rpx;
box-sizing: border-box;
color: #333333;
&:first-child {
border-left: none;
border-radius: 16rpx 0 0 16rpx;
}
&:last-child {
border-radius: 0 16rpx 16rpx 0;
text-align: right;
padding-right: 48rpx;
}
}
td {
.car-box {
padding: 4rpx;
font-size: 24rpx;
border-radius: 4rpx;
margin-right: 6rpx;
}
border: 4rpx solid #fff;
/* 所有单元格都有边框 */
border-top: none;
/* 除了首行外,所有行的上方无边框 */
background: #f7f8fa;
height: 88rpx;
font-size: 26rpx;
color: #333333;
text-align: center;
box-sizing: border-box;
&:last-child {
text-align: right;
padding-right: 48rpx;
}
text {
color: #c8c8cc;
}
&.line {
border-bottom: 16rpx solid #fff;
}
&:first-child {
border-left: none;
border-radius: 0;
}
&:last-child {
border-right: none;
border-radius: 0;
}
}
}
}
.table-footer {
margin: 0 64rpx;
height: 88rpx;
padding: 0 48rpx;
background: #edf3ff;
border-radius: 0 0 16rpx 16rpx;
font-size: 26rpx;
color: #eb4e4e;
font-weight: 600;
.price {
margin-left: auto;
}
}
.tips-box {
color: #808291;
font-size: 26rpx;
margin: 48rpx 64rpx 0;
}
</style>
<template>
<view class="dailog-panel" v-if="show">
<view class="dailog-box" :style="{ width: width }">
<view class="dailog-header flex">
<view class="sprite-icon icon-info-icon"></view>
<view class="dailog-title">基本工资</view>
<view class="dailog-close" @click="close"><uni-icons type="closeempty" size="20"></uni-icons></view>
</view>
<view class="dailog-body">
<view class="month-box flex">
<view class="month-fact">
<view class="fact-label">本月实际出勤天数:</view>
<view class="fact-num">
<text class="mark" v-if="baseSalaryDetail.actualAttendanceDays == baseSalaryDetail.requiredAttendanceDays && baseSalaryDetail.actualAttendanceDays">满勤</text>
<template v-else>
{{ baseSalaryDetail.actualAttendanceDays }}
<text class="unit">天</text>
</template>
<text class="tips" v-if="holidayCount">(法定节假日加班{{ holidayCount }}天)</text>
</view>
</view>
<view class="month-should">本月应出勤天数:{{ baseSalaryDetail.requiredAttendanceDays }}天</view>
</view>
<view class="base-box flex">
<view class="base-item" v-for="(item, index) in baseList" :key="index">
<view class="item-label" @click="showDetail(item, item.exceptionCount && item.tips)">
{{ item.label }}
<text class="item-next" v-if="item.exceptionCount && item.tips"></text>
</view>
<view class="item-num">
{{ item.exceptionCount || 0 }}
<text>次</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
const WORK_TH = [
{
title: '考勤日期',
value: 'clockInDate'
},
{
title: '类型',
value: 'attendanceType'
},
{
title: '打卡时间',
value: 'clockInTime'
},
{
title: '扣减考勤天数',
value: 'deductionDays'
}
]
const LACK_TH = [
{
title: '考勤日期',
value: 'clockInDate'
},
{
title: '类型',
value: 'attendanceType'
},
{
title: '状态',
value: 'exceptionState'
},
{
title: '扣减考勤天数',
value: 'deductionDays'
}
]
const CLOTHING_TH = [
{
title: '考勤日期',
value: 'clockInDate'
},
{
title: '类型',
value: 'attendanceType'
},
{
title: '扣减考勤天数',
value: 'deductionDays'
}
]
export default {
props: {
width: {
type: String,
default: '1440rpx'
},
baseSalaryDetail: {
type: Object,
default: () => {}
},
show: {
type: Boolean,
default: false
}
},
data() {
return {
holidayCount: 0,
baseList: [
{
label: '迟到',
tips: '迟到30分钟(含30分钟)扣减0.5小时;迟到30分钟以上1小时以内,扣减1小时;按每天8小时工作进行扣减',
th: WORK_TH,
value: 1
},
{
label: '早退',
th: WORK_TH,
tips: '早退每次扣减0.5天',
value: 2
},
{
label: '缺卡',
th: LACK_TH,
tips: '当月前两次补卡不扣减,第三次开始每次扣减0.5天',
value: 3
},
{
label: '调休/请假',
th: CLOTHING_TH,
tips: '按每天8小时工作进行;请假1小时=扣减0.12天',
value: 4
},
{
label: '着装异常',
th: CLOTHING_TH,
desc: '着装异常',
tips: '着装异常每次扣减0.5天',
value: 5
},
{
label: '法定节假日加班',
value: 6
}
]
}
},
watch: {
baseSalaryDetail: {
handler(val) {
const { exceptionInfoList } = val
const key = exceptionInfoList.findIndex(i => i.exceptionType == 6)
this.holidayCount = exceptionInfoList[key]?.exceptionCount
this.baseList.forEach(item => {
const index = exceptionInfoList.findIndex(i => i.exceptionType == item.value)
Object.assign(item, { ...exceptionInfoList[index] })
})
console.log(this.baseList, 99)
},
deep: true
}
},
methods: {
close() {
this.$emit('close')
},
showDetail(item, show) {
if (!show) return
this.$emit('showBaseDetail', item)
}
}
}
</script>
<style scoped lang="scss">
.dailog-panel {
position: fixed;
width: 100vw;
height: 100vh;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
.dailog-box {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: #fff;
background-image: linear-gradient(179deg, #d6e9ff 12%, #ffffff 100%); /* 顶部渐变和底部白色 */
background-size:
100% 110rpx,
100% calc(100% - 110rpx); /* 分别设置渐变和白色的背景大小 */
background-repeat: no-repeat, no-repeat; /* 确保背景不重复 */
background-position: top, bottom; /* 分别设置渐变和白色的位置 */
border-radius: 48rpx;
padding-bottom: 96rpx;
.dailog-header {
padding: 40rpx 48rpx;
.dailog-title {
font-size: 40rpx;
color: #1a1a1a;
font-weight: 600;
margin-top: -10rpx;
margin-left: 16rpx;
}
.enlarge {
transform: scale(1.5);
margin-right: 30rpx;
}
.dailog-close {
margin-left: auto;
text-align: right;
.uni-icons {
color: #808291 !important;
font-size: 40rpx;
}
}
}
.dailog-body {
padding: 0 144rpx;
.month-box {
justify-content: space-between;
align-items: flex-start;
.month-fact {
.fact-label {
color: #181a1f;
font-size: 32rpx;
}
.fact-num {
color: #181a1f;
font-size: 48rpx;
margin-top: 10rpx;
.unit {
font-size: 32rpx;
}
.mark {
color: #2cca74;
font-size: 48rpx;
}
.tips {
color: #3773f8;
font-size: 32rpx;
}
}
}
}
.base-box {
display: grid;
grid-template-columns: repeat(3, 1fr);
margin-top: 54rpx;
gap: 32rpx;
.base-item {
border-radius: 16rpx;
opacity: 1;
background: #f5f7fa;
padding: 30rpx 48rpx;
.item-label {
color: #181a1f;
font-size: 32rpx;
display: flex;
align-items: center;
.item-next {
margin-left: toRpx(14);
width: 0;
height: 0;
display: block;
border-left: toRpx(10) solid #808291;
border-bottom: toRpx(10) solid transparent;
border-top: toRpx(10) solid transparent;
}
}
.item-num {
color: #181a1f;
font-size: 48rpx;
margin-top: 8rpx;
text {
font-size: 32rpx;
}
}
}
}
}
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
}
}
</style>
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
<view class="level-desc">{{ jobTypeList[incomeDetail.jobType] }}</view> <view class="level-desc">{{ jobTypeList[incomeDetail.jobType] }}</view>
<view class="sprite-icon icon-js-icon"></view> <view class="sprite-icon icon-js-icon"></view>
</view> --> </view> -->
<view class="time-box" @click="jump('Calendar')"> <!-- <view class="time-box" @click="jump('Calendar')">
<view class="sprite-icon icon-work-icon"></view> <view class="sprite-icon icon-work-icon"></view>
<view class="level-label">本月出勤</view> <view class="level-label">本月出勤</view>
<view class="time-day">{{ incomeDetail.checkInDays }}/{{ incomeDetail.shouldCheckInDays }}</view> <view class="time-day">{{ incomeDetail.checkInDays }}/{{ incomeDetail.shouldCheckInDays }}</view>
<view class="time-go"></view> <view class="time-go"></view>
</view> </view> -->
</view> </view>
<view class="footer-box flex-center" v-if="!showPassword"> <view class="footer-box flex-center" v-if="!showPassword">
<view class="sprite-icon icon-tips-b"></view> <view class="sprite-icon icon-tips-b"></view>
......
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
const {sceneType} = uni.$storage.get("userInfo") const {sceneType} = uni.$storage.get("userInfo")
const res = await uni.$api.commonApi.getMessageCount({ const res = await uni.$api.commonApi.getMessageCount({
status: 0, // 待查看,未读 status: 0, // 待查看,未读
businessType: sceneType
}) })
console.log(res) console.log(res)
this.messageTotal = res this.messageTotal = res
...@@ -322,8 +323,8 @@ export default { ...@@ -322,8 +323,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: toRpx(20); width: toRpx(16);
height: toRpx(20); height: toRpx(16);
background-color: #F24724; background-color: #F24724;
right: 50%; right: 50%;
top: 0; top: 0;
......
...@@ -18,22 +18,26 @@ ...@@ -18,22 +18,26 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import Point from './Point/index.vue' import Point from './Point/index.vue'
import Income from './Income/index.vue' import Income from './Income/index.vue'
import Attendance from './Attendance/index.vue'
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
name: '', name: '',
components: { components: {
Point, Point,
Income Income,
Attendance
}, },
data () { data () {
return { return {
activeIndex:0, activeIndex: 0,
componentList:['Point','Income'], componentList:['Point','Income', 'Attendance'],
tabName: 'Point', tabName: 'Point',
tabList:[{ tabList:[{
name:'我的积分', name:'我的积分',
},{ },{
name:'我的收入', name:'我的收入',
},{
name:'我的考勤',
}] }]
} }
}, },
......
{ {
"name" : "展业助手", "name": "展业助手",
"appid" : "__UNI__D3BD3DF", "appid": "__UNI__D3BD3DF",
"description" : "", "description": "",
"versionName" : "2.9.0", "versionName": "2.9.0",
"versionCode" : "290", "versionCode": "290",
"transformPx" : false, "transformPx": false,
"sassImplementationName" : "node-sass", "sassImplementationName": "node-sass",
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus": {
"cache" : false, "cache": false,
"bounce" : "none", "bounce": "none",
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"compatible" : { "compatible": {
"ignoreVersion" : true "ignoreVersion": true
}, },
"screenOrientation" : "landscape", "screenOrientation": "landscape",
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* 模块配置 */ /* 模块配置 */
"modules" : { "modules": {
"Camera" : {}, "Camera": {},
"Record" : {}, "Record": {},
"VideoPlayer" : {}, "VideoPlayer": {},
"AudioPlayer" : {}, "AudioPlayer": {},
"SQLite" : {}, "SQLite": {},
"Maps" : {}, "Maps": {},
"Geolocation" : {} "Geolocation": {}
}, },
/* 应用发布信息 */ /* 应用发布信息 */
"distribute" : { "distribute": {
/* android打包配置 */ /* android打包配置 */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
...@@ -54,76 +54,83 @@ ...@@ -54,76 +54,83 @@
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>" "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters": [
"targetSdkVersion" : 30 "armeabi-v7a",
"arm64-v8a",
"x86"
],
"targetSdkVersion": 30
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : { "ios": {
"dSYMs" : false, "dSYMs": false,
"UIBackgroundModes" : "audio" "UIBackgroundModes": "audio"
}, },
/* SDK配置 */ /* SDK配置 */
"sdkConfigs" : { "sdkConfigs": {
"ad" : {}, "ad": {},
"speech" : {}, "speech": {},
"geolocation" : { "geolocation": {
"system" : { "system": {
"__platform__" : [ "ios", "android" ] "__platform__": [
"ios",
"android"
]
} }
} }
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "static/72.png", "hdpi": "static/72.png",
"xhdpi" : "static/96.png", "xhdpi": "static/96.png",
"xxhdpi" : "static/144.png" "xxhdpi": "static/144.png"
} }
} }
}, },
"nativePlugins" : { "nativePlugins": {
"Ba-KeepAliveSuit" : { "Ba-KeepAliveSuit": {
"__plugin_info__" : { "__plugin_info__": {
"name" : "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)", "name": "安卓保活套装(通用、常驻通知、电池优化、自启管理、后台运行等)",
"description" : "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)", "description": "在Ba-KeepAlive的基础上,新增了忽略电池优化、自启管理、常驻通知。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)",
"platforms" : "Android", "platforms": "Android",
"url" : "https://ext.dcloud.net.cn/plugin?id=11765", "url": "https://ext.dcloud.net.cn/plugin?id=11765",
"android_package_name" : "uni.gltap", "android_package_name": "uni.gltap",
"ios_bundle_id" : "", "ios_bundle_id": "",
"isCloud" : true, "isCloud": true,
"bought" : 1, "bought": 1,
"pid" : "11765", "pid": "11765",
"parameters" : {} "parameters": {}
} }
} }
} }
}, },
/* 快应用特有相关 */ /* 快应用特有相关 */
"quickapp" : {}, "quickapp": {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin" : { "mp-weixin": {
"appid" : "wx79d1ff39bee3d047", "appid": "wx79d1ff39bee3d047",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true "usingComponents": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : false "enable": false
}, },
"vueVersion" : "2", "vueVersion": "2",
"h5" : { "h5": {
"devServer" : { "devServer": {
"port" : 8080, "port": 8080,
"https" : false "https": false
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,6 +8,8 @@ export default { ...@@ -8,6 +8,8 @@ export default {
icon: 'jbgz-icon', icon: 'jbgz-icon',
content: '基本工资 = 职级工资÷应出勤天数×实际出勤天数', content: '基本工资 = 职级工资÷应出勤天数×实际出勤天数',
value: 'actualBasicSalary', value: 'actualBasicSalary',
recordKey: 'refundOffsetRecords',
showNext: true,
sort: 1, sort: 1,
base: true base: true
}, },
......
/* /*
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48 * @Date: 2024-04-08 11:28:48
* @LastEditors: limin * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-01-08 16:04:45 * @LastEditTime: 2025-04-29 11:23:03
* @FilePath: \gl_tape\mixin\timeout.js * @FilePath: \gl_tape\mixin\timeout.js
* @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
*/ */
const TIMER_DURATION = 40 * 60 * 1000 //40分钟 const TIMER_DURATION = 40 * 60 * 1000 //40分钟
const TIMER_INTERVAL = 1 * 60 * 1000 //1分钟检一次 const TIMER_INTERVAL = 1 * 60 * 1000 //1分钟检一次
const TIMER_TIMEOUT = TIMER_DURATION / TIMER_INTERVAL const TIMER_TIMEOUT = TIMER_DURATION / TIMER_INTERVAL
export default { export default {
methods: { methods: {
...@@ -16,25 +16,33 @@ export default { ...@@ -16,25 +16,33 @@ export default {
this.setReceptionStatus(0) this.setReceptionStatus(0)
this.record.withError() this.record.withError()
this.stop() this.stop()
uni.$logger.local.info('== 长时间未触碰平板断开录音 ==')
}, },
//监听点击事件 //监听点击事件
initTime() { initTime() {
uni.$logger.local.info('== 触碰平板开始计时 ==')
this.endWatchClick() this.endWatchClick()
this.__timer = setInterval(() => { this.__timer = setInterval(() => {
if (this.__counter >= TIMER_TIMEOUT) { if (this.__counter >= TIMER_TIMEOUT) {
//关闭录音 //关闭录音
uni.$logger.local.info('== 长时间未触碰平板 ==')
this.endWatchClick() this.endWatchClick()
this.stopRecorder() this.stopRecorder()
} }
this.__counter++ this.__counter++
uni.$logger.local.info('== 未触碰平板计时 ==' + this.__counter + '分钟')
}, TIMER_INTERVAL) }, TIMER_INTERVAL)
}, },
endWatchClick() { endWatchClick() {
if (this.__timer) clearInterval(this.__timer) if (this.__timer) clearInterval(this.__timer)
this.__timer = null this.__timer = null
this.__counter = 0 this.__counter = 0
uni.$logger.local.info('== 停止监听未触碰平板事件 ==')
}, },
handleTouchStart() { handleTouchStart() {
if (this.__counter) {
uni.$logger.local.info(`== ${this.__counter}分钟后触碰平板 ==`)
}
this.__counter = 0 this.__counter = 0
} }
} }
......
...@@ -131,6 +131,12 @@ ...@@ -131,6 +131,12 @@
} }
}, },
{ {
"path": "pages/common/earlyWarnDetail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/messageList", "path": "pages/common/messageList",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:is-mask-click="false" :is-mask-click="false"
animation animation
:isFooter="false" :isFooter="false"
:title="customerType == 1 ?'为客户发券' : '客户二维码'" :title="title"
:popupW="1200" :popupW="1200"
:maxHeight="896" :maxHeight="896"
> >
...@@ -132,8 +132,7 @@ ...@@ -132,8 +132,7 @@
class="ok-tips" class="ok-tips"
v-if="customerType == 0" v-if="customerType == 0"
> >
<view>请驻店销售员工打开「生意助手</view> <view>{{tips}}</view>
<view>员工版」小程序扫码核销</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -230,7 +229,9 @@ export default { ...@@ -230,7 +229,9 @@ export default {
type: Object, type: Object,
default: () => ({}) default: () => ({})
}, },
show: Boolean show: Boolean,
title: String,
tips: String
}, },
components: { Employee }, components: { Employee },
watch: { watch: {
...@@ -276,6 +277,10 @@ export default { ...@@ -276,6 +277,10 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
shopMerchantId () {
const { shopMerchantId } = uni.$storage.get('userInfo')
return shopMerchantId
},
}, },
data () { data () {
return { return {
...@@ -295,7 +300,7 @@ export default { ...@@ -295,7 +300,7 @@ export default {
}, },
isCheck: false, isCheck: false,
customerType: 1, customerType: 1,
selectKey:Date.now() selectKey: Date.now()
} }
}, },
mounted () { mounted () {
...@@ -355,12 +360,47 @@ export default { ...@@ -355,12 +360,47 @@ export default {
this.$refs[e].open(); this.$refs[e].open();
this.$emit('hideTool') this.$emit('hideTool')
}, },
open (customerType, customerCouponId) { open (customerType, customerInfo) {
this.pageParams.customerQr = ''
this.$refs.couponPopup.open() this.$refs.couponPopup.open()
this.customerType = customerType this.customerType = customerType
if (customerCouponId) { if (customerInfo.customerCouponId) {
this.pageParams.customerCouponId = customerCouponId try {
this.pageParams.customerQr = qrcode.createQrCodeImg(`couponId=${customerCouponId}`, { size: 200 }) uni.showLoading({
mask: true
})
let scene = ''
if (customerInfo.inviteRecordId) {
scene = `url=/tabDate/pages/detail/detail&id=${customerInfo.inviteRecordId}`
} else {
let params = encodeURIComponent(`couponId=${customerInfo.customerCouponId}`)
scene = `url=/tabWorkOrder/pages/createOrder/createOrder&scene=${params}`
}
scene = `${scene}&sceneType=1&shopMerchantId=${this.shopMerchantId}`
uni.$api.commonApi.createQrcode({
scene,
path: '/pages/loading/loading',
appId: 'wx570d9331f9ace0bd'
}).then(({ data, code, message }) => {
uni.hideLoading()
if (code == 0) {
if (data) {
this.pageParams.customerCouponId = customerInfo.customerCouponId
this.pageParams.customerQr = data
if (customerInfo.inviteRecordId) this.customerInfo = customerInfo
console.log(customerInfo)
} else throw '生成小程序码失败,请重试!'
} else throw message
})
} catch (error) {
uni.hideLoading()
uni.showToast({
title: error,
icon: 'none'
})
}
} }
this.init() this.init()
try { try {
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<view <view
class="coupon-btn flex" class="coupon-btn flex"
v-if="!isPreview" v-if="!isPreview"
@click="couponPopupRef.open(customerType, customerInfo.customerCouponId)" @click="couponPopupRef.open(customerType, customerInfo)"
>{{couponText}}</view> >{{couponText}}</view>
</view> </view>
</view> </view>
...@@ -107,6 +107,8 @@ ...@@ -107,6 +107,8 @@
@reception="reception" @reception="reception"
:show="show" :show="show"
@hideTool="$emit('hideTool')" @hideTool="$emit('hideTool')"
tips="微信扫码进入客户录单页"
:title="customerType == 1 ?'为客户发券' : '客户小程序码'"
/> />
<risk-informed-box <risk-informed-box
ref="riskInformedPop" ref="riskInformedPop"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<template> <template>
<view <view
class="detail-box" class="detail-box"
@dblclick="dbClick"
> >
<view class="nav-bar"> <view class="nav-bar">
<view <view
...@@ -293,9 +292,9 @@ export default { ...@@ -293,9 +292,9 @@ export default {
} }
return flag return flag
}, },
dbClick () { // dbClick () {
if (!this.isPreview) this.drawStatus = !this.drawStatus // if (!this.isPreview) this.drawStatus = !this.drawStatus
}, // },
}, },
}; };
</script> </script>
......
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
class="icon" class="icon"
/> />
{{ i.title }} {{ i.title }}
<template v-if="i.count">
<div class="count">
{{i.count}}
</div>
</template>
</view> </view>
</template> </template>
</view> </view>
...@@ -303,6 +308,7 @@ export default { ...@@ -303,6 +308,7 @@ export default {
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
this.defaultCarId = defaultCarId this.defaultCarId = defaultCarId
this.getInviteRecordCount()
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item this.chooseItem = item
...@@ -456,6 +462,17 @@ export default { ...@@ -456,6 +462,17 @@ export default {
{ carBannerList } = this { carBannerList } = this
if (index != 0 && item.seriesId == carBannerList[index - 1].seriesId) result = false if (index != 0 && item.seriesId == carBannerList[index - 1].seriesId) result = false
return result return result
},
async getInviteRecordCount () {
const { moduleList } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId: merchantId } = userInfo,
{notInvitedCount} = await uni.$api.boutiqueApi.getInviteRecordCount({
merchantIds: [merchantId]
})
moduleList.map(e => {
if (e.id == 3) e.count = notInvitedCount ? notInvitedCount > 99 ? 99 : notInvitedCount : 0
})
} }
} }
} }
...@@ -463,7 +480,7 @@ export default { ...@@ -463,7 +480,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
&::after{ &::after {
background-image: url('@/assets/images/common/home-bg-1.webp'); background-image: url('@/assets/images/common/home-bg-1.webp');
} }
} }
...@@ -479,6 +496,7 @@ export default { ...@@ -479,6 +496,7 @@ export default {
gap: 0 toRpx(32); gap: 0 toRpx(32);
z-index: 2; z-index: 2;
.item { .item {
position: relative;
height: toRpx(56); height: toRpx(56);
background: #ffffff66; background: #ffffff66;
border: toRpx(2) solid #ffffff; border: toRpx(2) solid #ffffff;
...@@ -495,6 +513,20 @@ export default { ...@@ -495,6 +513,20 @@ export default {
width: toRpx(56); width: toRpx(56);
height: toRpx(56); height: toRpx(56);
} }
.count {
width: fit-content;
position: absolute;
top: toMinusRpx(12);
right: 0;
transform: translateX(50%);
height: toRpx(24);
line-height: toRpx(24);
padding: 0 toRpx(6);
border-radius: toRpx(708);
background: #f24724;
color: #ffffff;
font-size: toRpx(20);
}
} }
} }
.banner-tab-scroll { .banner-tab-scroll {
...@@ -513,7 +545,7 @@ export default { ...@@ -513,7 +545,7 @@ export default {
.banner-item { .banner-item {
position: relative; position: relative;
flex-shrink: 0; flex-shrink: 0;
margin-right: toRpx(40); margin-right: toRpx(40);
.banner-title { .banner-title {
color: #333333b3; color: #333333b3;
font-size: toRpx(24); font-size: toRpx(24);
......
...@@ -52,9 +52,18 @@ ...@@ -52,9 +52,18 @@
:key="item.id" :key="item.id"
@click="reception(item)" @click="reception(item)"
> >
<view :class="['status flex', 'status_' + formatInvite(item)]">{{ inviteStatus[formatInvite(item)] }}</view> <view
<view class="name"> class="detail-btn flex"
{{ item.customerName }} @click.stop="openDetail(item)"
>
查看
<div class="sprite-icon icon-detail-btn"></div>
</view>
<view class="top flex">
<view class="name">
{{ item.customerName }}
</view>
<view :class="['status flex', 'status_' + formatInvite(item)]">{{ inviteStatus[formatInvite(item)] }}</view>
</view> </view>
<template v-for="(k, ind) in itemObject"> <template v-for="(k, ind) in itemObject">
<view <view
...@@ -98,12 +107,21 @@ ...@@ -98,12 +107,21 @@
confirmBtnText="确定接待" confirmBtnText="确定接待"
@confirm="jumpPage" @confirm="jumpPage"
></MessageBox> ></MessageBox>
<coupon-pop
ref="couponPopup"
@hideTool="$emit('hideTool')"
title="客户邀约详情"
tips="微信扫码进入客户邀约详情"
/>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import Record from "@/mixin/record"; import Record from "@/mixin/record";
import CouponPop from './components/CouponPop.vue'
export default { export default {
components: { CouponPop },
mixins: [Record], mixins: [Record],
props: { props: {
show: Boolean, show: Boolean,
...@@ -126,6 +144,11 @@ export default { ...@@ -126,6 +144,11 @@ export default {
chooseItem: {} chooseItem: {}
} }
}, },
computed: {
couponPopupRef () {
return this.$refs.couponPopup
},
},
watch: { watch: {
show: { show: {
handler (val) { handler (val) {
...@@ -212,7 +235,14 @@ export default { ...@@ -212,7 +235,14 @@ export default {
clearCanvas () { clearCanvas () {
this.$refs.invitationCanvas.clearBoard() this.$refs.invitationCanvas.clearBoard()
}, },
openDetail (e) {
this.couponPopupRef.open(0, {
...e,
phoneNumber: e.customerPhone,
carModel: e.carSeriesName,
staffName: e.employeeName
})
}
}, },
} }
</script> </script>
...@@ -329,17 +359,28 @@ export default { ...@@ -329,17 +359,28 @@ export default {
position: relative; position: relative;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
.status { .detail-btn {
position: absolute; position: absolute;
top: toRpx(24); top: toRpx(24);
right: toRpx(32); right: toRpx(32);
padding: toRpx(4) toRpx(16); color: #2c66f7;
font-size: toRpx(28);
font-weight: 500;
line-height: toRpx(44);
.sprite-icon {
margin-left: toRpx(8);
}
}
.status {
flex-shrink: 0;
padding: toRpx(6) toRpx(16);
border-radius: toRpx(4); border-radius: toRpx(4);
font-weight: 500; font-weight: 500;
font-size: toRpx(24); font-size: toRpx(24);
justify-content: center; justify-content: center;
background: #fdece9; background: #fdece9;
color: #f24724; color: #f24724;
margin-left: toRpx(16);
&.status_1 { &.status_1 {
background: #fff5e6; background: #fff5e6;
color: #ff9d0a; color: #ff9d0a;
...@@ -362,6 +403,9 @@ export default { ...@@ -362,6 +403,9 @@ export default {
background: #eaf9f1; background: #eaf9f1;
color: #35c376; color: #35c376;
} }
.top {
width: calc(100% - #{toRpx(124)});
}
.name { .name {
font-weight: 500; font-weight: 500;
font-size: toRpx(32); font-size: toRpx(32);
...@@ -369,7 +413,6 @@ export default { ...@@ -369,7 +413,6 @@ export default {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
width: calc(100% - #{toRpx(140)});
} }
.goods-name { .goods-name {
font-weight: 500; font-weight: 500;
......
<template> <template>
<view <view class="popup-box" v-if="popupShow">
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar"> <view class="nav-bar">
<view <view class="back" @click="back">
class="back" <uni-icons type="left" :size="20" color="#fff"></uni-icons>
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#fff"
></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<video <video ref="videoPlayer" :src="detailUrl" controls v-if="sourceType == 2"></video>
ref="videoPlayer" <view class="img-detail" v-else>
:src="detailUrl" <image @click="back" :src="detailUrl" mode="heightFix" />
controls
v-if="sourceType == 2"
></video>
<view
class="img-detail"
v-else
>
<image
@click="back"
:src="detailUrl"
:style="{ width: width + 'px' }"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -46,7 +24,6 @@ export default { ...@@ -46,7 +24,6 @@ export default {
}, },
data () { data () {
return { return {
width: 0,
title: '', title: '',
sourceType: '', sourceType: '',
detailUrl: '' detailUrl: ''
...@@ -80,19 +57,6 @@ export default { ...@@ -80,19 +57,6 @@ export default {
this.title = tabName this.title = tabName
this.sourceType = sourceType this.sourceType = sourceType
this.detailUrl = detailUrl this.detailUrl = detailUrl
const _this = this
uni.getImageInfo({
src: detailUrl, // 替换为你的图片路径
success (img) {
uni.createSelectorQuery().select('.img-detail').boundingClientRect(function (rect) {
_this.width = rect.height * img.height / img.width
}).exec();
},
fail: function (error) {
console.error('获取图片信息失败:', error);
}
});
}, },
back () { back () {
if (this.isComponents) this.$emit('previewBack') if (this.isComponents) this.$emit('previewBack')
...@@ -143,7 +107,7 @@ export default { ...@@ -143,7 +107,7 @@ export default {
height: 100%; height: 100%;
text-align: center; text-align: center;
image { image {
height: 100%; height: calc(100vh - #{toRpx(200)});
width: auto; width: auto;
} }
} }
......
<template>
<view class="detail-box">
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">话术违规预警</view>
</view>
<view class="weekly-tips">
<scroll-view scroll-y class="outstanding-tip-list">
<view class="outstanding-tip-item">
<view class="tip-header">
<view class="tip-time">{{ warningInfo.time }}</view>
<view class="tip-tags">{{ warningInfo.warningTag }}</view>
</view>
<view class="tip-content warning-content">{{ warningInfo.warningContent }}
<view class="tips">你在以上的接待记录中,存在过度承诺现象,这极易引发客户纠纷,损害公司信誉。请严格依据公司政策与产品实际情况介绍,切勿做出无法兑现的承诺。因本次违规已扣除本月行为类-行为异常积分,后续将加强监管,违规者将严肃处理。
当购车者车辆出现问题,依据商家“任何小毛病都免费修”的承诺前往维修,却发现不在质保范围内需自费维修时,会产生经济上的落差与困扰。这不仅增加维修成本,还可能因与商家的售后纠纷,耗费大量时间与精力去沟通协调。</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
name: 'EarlyWarnDetail',
data() {
return {
warningInfo: {}
}
},
onLoad(options) {
const { row } = options
const _row = JSON.parse(row)
this.warningInfo = _row
this.updateStatus()
},
methods: {
// 返回
back() {
uni.$emit('pageList', this.warningInfo.id);
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100
})
},
async updateStatus() {
const idList = [this.warningInfo.id]
const res = await uni.$api.commonApi.updateMessageStatus({
idList
})
}
}
}
</script>
<style scoped lang="scss">
.detail-box {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%;
box-sizing: border-box;
padding-top: toRpx(160);
}
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
z-index: 999;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
}
}
.weekly-tips {
position: relative;
margin: 0 toRpx(64) toRpx(80);
background-color: rgba(255, 255, 255, 0.35);
border: toRpx(4) solid #fff;
border-radius: toRpx(16);
height: calc(100% - #{toRpx(80)});
.outstanding-tip-list {
height: 100%;
background-color: #fff;
border-radius: toRpx(16);
padding: toRpx(24) 0;
}
.outstanding-tip-item {
width: 100%;
padding: 0 toRpx(32);
border-radius: toRpx(16);
background-color: #fff;
height: 100%;
.tip-header {
display: flex;
align-items: center;
.tip-rank {
color: #333;
font-size: toRpx(32);
font-weight: 500;
line-height: toRpx(44);
margin-right: toRpx(24);
}
.tip-time {
color: rgba(102, 102, 102, 0.6);
font-size: toRpx(28);
line-height: toRpx(44);
}
.tip-tags {
border-radius: toRpx(4);
background: rgba(255, 157, 10, 0.1);
padding: toRpx(8) toRpx(24);
color: #ff9d0a;
font-size: toRpx(24);
font-weight: 500;
margin-left: toRpx(24);
}
}
.tip-content {
padding: toRpx(17) 0;
color: #333;
font-size: toRpx(28);
line-height: toRpx(48);
&.warning-content {
white-space: pre-line;
}
.tips {
color: #666;
margin-top: toRpx(16);
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view <view class="popup-box" v-if="popupShow">
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar"> <view class="nav-bar">
<view <view class="back" @click="back">
class="back" <uni-icons type="left" :size="20" color="#fff"></uni-icons>
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#fff"
></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<video <video ref="videoPlayer" :src="detailUrl" controls v-if="sourceType == 2"></video>
ref="videoPlayer" <view class="img-detail" v-else>
:src="detailUrl" <image @click="back" :src="detailUrl" mode="heightFix" />
controls
v-if="sourceType == 2"
></video>
<view
class="img-detail"
v-else
>
<image
@click="back"
:src="detailUrl"
:style="{ width: width + 'px' }"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -81,19 +59,19 @@ export default { ...@@ -81,19 +59,19 @@ export default {
this.title = tabName this.title = tabName
this.sourceType = sourceType this.sourceType = sourceType
this.detailUrl = detailUrl this.detailUrl = detailUrl
const _this = this // const _this = this
uni.getImageInfo({ // uni.getImageInfo({
src: detailUrl, // 替换为你的图片路径 // src: detailUrl, // 替换为你的图片路径
success (img) { // success (img) {
uni.createSelectorQuery().select('.img-detail').boundingClientRect(function (rect) { // uni.createSelectorQuery().select('.img-detail').boundingClientRect(function (rect) {
_this.width = rect.height * img.height / img.width // _this.width = rect.height * img.height / img.width
}).exec(); // }).exec();
}, // },
fail: function (error) { // fail: function (error) {
console.error('获取图片信息失败:', error); // console.error('获取图片信息失败:', error);
} // }
}); // });
}, },
back () { back () {
if (this.isComponents) this.$emit('previewBack') if (this.isComponents) this.$emit('previewBack')
...@@ -144,7 +122,7 @@ export default { ...@@ -144,7 +122,7 @@ export default {
height: 100%; height: 100%;
text-align: center; text-align: center;
image { image {
height: 100%; height: calc(100% - #{toRpx(200)});
width: auto; width: auto;
} }
} }
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<view class="message-time">{{ item.actualSendTimeStr }}</view> <view class="message-time">{{ item.actualSendTimeStr }}</view>
<view class="message-tag">{{ CONTRNT_TYPE[item.contentType] }}</view> <view class="message-tag">{{ CONTRNT_TYPE[item.contentType] }}</view>
</view> </view>
<view class="message-content"> 您有新的消息【{{ item.title }}】{{ item.subtitle ? item.subtitle.length > 40 ? `[${item.subtitle.slice(0, 39)}...]` : `[${item.subtitle}]` : ''}},请点击查看 <view class="message-content"> 您有新的消息【{{ item.title }}】{{ item.subtitle ? item.subtitle.length > 40 ?
`[${item.subtitle.slice(0, 39)}...]` : `[${item.subtitle}]` : '' }},请点击查看
</view> </view>
</template> </template>
<template v-else-if="firstIndex == 1"> <template v-else-if="firstIndex == 1">
...@@ -49,6 +50,17 @@ ...@@ -49,6 +50,17 @@
</view> </view>
<view class="message-content">{{ item.polishContent }}</view> <view class="message-content">{{ item.polishContent }}</view>
</template> </template>
<template v-else-if="firstIndex == 2">
<view class="message-header">
<view :class="['dot', item.status == 1 ? '' : 'red']"></view>
<view class="message-type">话术违规预警</view>
<view class="message-time">{{ item.time }}</view>
<view class="message-tag">{{ item.warningTag }}</view>
</view>
<view class="message-content warning-content"><view>你有以下接待记录判定为话术违规</view>{{ item.warningContent }}
</view>
</template>
</view> </view>
</template> </template>
<template v-else> <template v-else>
...@@ -79,14 +91,16 @@ export default { ...@@ -79,14 +91,16 @@ export default {
return { return {
typeList: [ typeList: [
{ tabName: '系统通知', num: () => '' }, { tabName: '系统通知', num: () => '' },
{ tabName: '优秀话术', num: () => '' } { tabName: '优秀话术', num: () => '' },
{ tabName: '预警通知', num: () => '' }
], ],
CONTRNT_TYPE: CONTRNT_TYPE, CONTRNT_TYPE: CONTRNT_TYPE,
firstIndex: 0, firstIndex: 0,
firstLeft: ['first', 'second'], firstLeft: ['first', 'second', 'three'],
firstClass: ['first-nav', 'second-nav'], firstClass: ['first-nav', 'second-nav', 'second-nav'],
systemList: [], systemList: [],
messageList: [], messageList: [],
earlyWarnList: [],
nothing: false, nothing: false,
total: 0, total: 0,
pageNum: PAGE_NUM, pageNum: PAGE_NUM,
...@@ -98,31 +112,36 @@ export default { ...@@ -98,31 +112,36 @@ export default {
}, },
computed: { computed: {
getList() { getList() {
if (this.firstIndex == 0) { const listMap = {
return this.systemList 0: this.systemList,
} else if (this.firstIndex == 1) { 1: this.messageList,
console.log(this.messageList) 2: this.earlyWarnList
return this.messageList };
if (this.firstIndex in listMap) {
return listMap[this.firstIndex];
} }
return []; // 若 firstIndex 不在 0、1、2 范围内,返回 []
}, },
getScrollHeight() { getScrollHeight() {
if (this.getList == 0) return '' // 调用 getList 函数获取列表
else { const list = this.getList;
if (this.firstIndex == 0) { // 如果获取的列表为空,则返回空字符串
return 'scroll-list' if (!list || list.length === 0) {
} else if (this.firstIndex == 1) { return '';
return 'class-scroll' }
} else return '' // 根据 firstIndex 的值返回不同的类名
switch (this.firstIndex) {
case 0:
return 'scroll-list';
case 1:
return 'class-scroll';
case 2:
return 'scroll-list';
default:
return '';
} }
} }
}, },
// props: {
// transfer: {
// type: Object,
// default: () => { }
// }
// },
// inject: ['showPage'],
created() { created() {
uni.$on('pageList', (data) => { uni.$on('pageList', (data) => {
console.log('接收到上一个页面返回的数据:', data); console.log('接收到上一个页面返回的数据:', data);
...@@ -158,20 +177,38 @@ export default { ...@@ -158,20 +177,38 @@ export default {
} else if (index == 1) { } else if (index == 1) {
this.getMessagePage() this.getMessagePage()
this.getLabelList() this.getLabelList()
} else if (index == 2) {
this.getWarningPage()
} }
}, },
// 跳转详情 // 跳转详情
openDetail(row) { openDetail(row) {
console.log(row) console.log(row);
const { id, contentType } = row const { id } = row;
const { tagIndex } = this const actionMap = {
if (this.firstIndex == 1) { 2: () => {
// this.showPage('MessageDetail', { row, type: 'view', tagIndex }) uni.navigateTo({
uni.navigateTo({ url: `/pages/common/earlyWarnDetail?row=${encodeURIComponent(JSON.stringify(row))}`,
url: `/pages/common/messageDetail?row=${encodeURIComponent(JSON.stringify(row))}&type=view` fail: (err) => {
}) console.error('页面跳转失败:', err);
} else if (this.firstIndex == 0) { }
this.getDetailById(id, row.readFlag) });
},
1: () => {
uni.navigateTo({
url: `/pages/common/messageDetail?row=${encodeURIComponent(JSON.stringify(row))}&type=view`,
fail: (err) => {
console.error('页面跳转失败:', err);
}
});
},
0: () => {
this.getDetailById(id, row.readFlag);
}
};
const action = actionMap[this.firstIndex];
if (action) {
action();
} }
}, },
back() { back() {
...@@ -248,9 +285,6 @@ export default { ...@@ -248,9 +285,6 @@ export default {
const res = await uni.$api.commonApi.getTaskInfo({ const res = await uni.$api.commonApi.getTaskInfo({
pageNum, pageSize pageNum, pageSize
}) })
// res.list?.length && res.list.map(e => {
// e.time = dayjs(new Date(e.actualSendTime)).format("YYYY-MM-DD HH:mm:ss")
// })
if (pageNum == 1) { if (pageNum == 1) {
this.systemList = res.list this.systemList = res.list
} else { } else {
...@@ -266,6 +300,36 @@ export default { ...@@ -266,6 +300,36 @@ export default {
}); });
} }
}, },
async getWarningPage() {
try {
uni.showLoading({
mask: true
})
const { pageNum, pageSize } = this
const params = {
pageNum,
pageSize
}
const res = await uni.$api.commonApi.getWarningPage(params)
res.list?.length && res.list.map(e => {
e.time = dayjs(new Date(e.warningTime)).format("YYYY-MM-DD HH:mm:ss")
})
if (pageNum == 1) {
this.earlyWarnList = res.list
console.log(this.earlyWarnList, '===')
} else {
this.earlyWarnList = this.earlyWarnList.concat(res.list)
}
uni.hideLoading()
this.total = res.total
this.nothing = res.length ? true : false
} catch (error) {
uni.showToast({
title: error,
icon: "none",
});
}
},
async getDetailById(id, readFlag) { async getDetailById(id, readFlag) {
const res = await uni.$api.commonApi.getTaskById({ id }) const res = await uni.$api.commonApi.getTaskById({ id })
// 不刷新列表的更新消息状态 // 不刷新列表的更新消息状态
...@@ -294,16 +358,47 @@ export default { ...@@ -294,16 +358,47 @@ export default {
}) })
} }
}, },
//下拉分页 /**
* 页面触底时的处理函数
* 当页面触底时,判断是否还有更多数据,如果有则加载下一页数据
* 如果没有更多数据,则标记为没有更多数据状态
*/
pageonReachBottom() { pageonReachBottom() {
console.log('到底了'); console.log('到底了');
let { pageNum, total, nothing, pageSize } = this // 解构赋值,设置 nothing 的默认值
if (!nothing) nothing = 'nothing' let { pageNum, total, nothing = 'nothing', pageSize } = this;
if (Math.ceil(total / pageSize) > pageNum) { if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1 this.pageNum += 1;
if (this.firstIndex == 1) this.getMessagePage() // 根据 firstIndex 的值调用不同的方法
else if (this.firstIndex == 0) this.getSystemPage() switch (this.firstIndex) {
} else this.nothing = true case 1:
try {
this.getMessagePage();
} catch (error) {
console.error('调用 getMessagePage 方法时出错:', error);
}
break;
case 0:
try {
this.getSystemPage();
} catch (error) {
console.error('调用 getSystemPage 方法时出错:', error);
}
break;
case 2:
try {
this.getWarningPage();
} catch (error) {
console.error('调用 getWarningPage 方法时出错:', error);
}
break;
default:
break;
}
} else {
this.nothing = true;
}
} }
} }
} }
...@@ -352,14 +447,19 @@ export default { ...@@ -352,14 +447,19 @@ export default {
position: relative; position: relative;
margin: 0 toRpx(64) toRpx(80); margin: 0 toRpx(64) toRpx(80);
background-color: rgba(255, 255, 255, 0.35); background-color: rgba(255, 255, 255, 0.35);
border: toRpx(4) solid #fff; // border: toRpx(4) solid #fff;
border-radius: toRpx(48); border-radius: toRpx(48);
height: calc(100% - #{toRpx(236)}); // height: calc(100% - #{toRpx(236)});
.data-container { .data-container {
background: #ffffff; background: #ffffff;
border-radius: toRpx(48); border-radius: toRpx(48);
height: calc(100vh - #{toRpx(244)}); height: calc(100vh - #{toRpx(244)});
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border: toRpx(2) solid #fff;
box-sizing: border-box;
position: relative;
overflow: hidden;
.type-box { .type-box {
position: relative; position: relative;
...@@ -445,6 +545,7 @@ export default { ...@@ -445,6 +545,7 @@ export default {
position: relative; position: relative;
background-color: #fff; background-color: #fff;
border-radius: 0 0 toRpx(48) toRpx(48); border-radius: 0 0 toRpx(48) toRpx(48);
&.scroll-list { &.scroll-list {
height: calc(100% - #{toRpx(222)}); height: calc(100% - #{toRpx(222)});
} }
...@@ -455,10 +556,12 @@ export default { ...@@ -455,10 +556,12 @@ export default {
.message-item { .message-item {
border-radius: toRpx(16); border-radius: toRpx(16);
box-shadow: 0 toRpx(4) toRpx(20) 0 #0000001a; // box-shadow: 0 toRpx(4) toRpx(20) 0 #0000001a;
box-shadow: 0 4px 12px 0 #2c66f71a;
margin: 0 toRpx(64) toRpx(40); margin: 0 toRpx(64) toRpx(40);
padding: toRpx(24) toRpx(32); padding: toRpx(24) toRpx(32);
box-sizing: border-box; box-sizing: border-box;
&:first-child { &:first-child {
margin-top: toRpx(10); margin-top: toRpx(10);
} }
...@@ -513,6 +616,10 @@ export default { ...@@ -513,6 +616,10 @@ export default {
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
&.warning-content {
white-space: pre-line;
-webkit-line-clamp: 4;
}
} }
} }
} }
...@@ -542,7 +649,7 @@ export default { ...@@ -542,7 +649,7 @@ export default {
.tag-box { .tag-box {
display: flex; display: flex;
margin: 0 toRpx(64); margin: toRpx(2) toRpx(64) 0;
.tag-item { .tag-item {
padding: toRpx(18) toRpx(32); padding: toRpx(18) toRpx(32);
...@@ -558,7 +665,8 @@ export default { ...@@ -558,7 +665,8 @@ export default {
} }
} }
} }
/deep/{
/deep/ {
.uni-scroll-view-content { .uni-scroll-view-content {
height: calc(100% - #{toRpx(10)}); height: calc(100% - #{toRpx(10)});
} }
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<template> <template>
<view <view
class="detail-box" class="detail-box"
@dblclick="dbClick"
> >
<view <view
class="nav-bar" class="nav-bar"
...@@ -237,9 +236,9 @@ export default { ...@@ -237,9 +236,9 @@ export default {
toPay () { toPay () {
this.$refs.pay.show() this.$refs.pay.show()
}, },
dbClick () { // dbClick () {
if (!this.isPreview) this.drawStatus = !this.drawStatus // if (!this.isPreview) this.drawStatus = !this.drawStatus
}, // },
touchStart (e) { touchStart (e) {
if (!this.drawStatus && e.changedTouches?.length) { if (!this.drawStatus && e.changedTouches?.length) {
this.startX = e.changedTouches[0].pageX this.startX = e.changedTouches[0].pageX
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!