Commit 9cda31cb by 胡悦

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

2 parents 90a35014 0863f895
...@@ -88,5 +88,13 @@ module.exports = { ...@@ -88,5 +88,13 @@ module.exports = {
...data ...data
}) })
} },
getInviteRecordCount(data) {
return http.post({
method: "dj.api.smartcarlife.inviteRecord.count.new",
projectName: "boutique",
...data
})
},
}; };
...@@ -189,30 +189,5 @@ module.exports = { ...@@ -189,30 +189,5 @@ 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
})
} }
} }
...@@ -253,3 +253,5 @@ ...@@ -253,3 +253,5 @@
background-position: calc(100vmin * (1173 / 768) * -0.17220801364023872) calc(100vmin * (1173 / 768) * -0.47911338448422847);} background-position: calc(100vmin * (1173 / 768) * -0.17220801364023872) calc(100vmin * (1173 / 768) * -0.47911338448422847);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.12404092071611253) calc(100vmin * (1173 / 768) * -0.5008525149190111);} background-position: calc(100vmin * (1173 / 768) * -0.12404092071611253) calc(100vmin * (1173 / 768) * -0.5008525149190111);}
.icon-detail-btn { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.16879795396419436) calc(100vmin * (1173 / 768) * -0.5230179028132992);}
\ No newline at end of file \ No newline at end of file

2.33 MB | W: | H:

2.34 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -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: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-04-17 17:06:46 * @LastEditTime: 2025-04-23 14:05:42
* @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
--> -->
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
<view class="footer-up flex"> <view class="footer-up flex">
<view class="sprite-icon icon-income-card"></view> <view class="sprite-icon icon-income-card"></view>
<view class="footer-label">当月收入</view> <view class="footer-label">当月收入</view>
<view class="income-mark">系统测算</view> <view class="income-mark" v-if="salaryDetail.confirmSalary">系统测算</view>
<!-- <view class="income-mark primary">应发工资</view> --> <view class="income-mark primary" v-else>应发工资</view>
</view> </view>
<view class="footer-price"> <view class="footer-price">
<text>¥</text> <text>¥</text>
...@@ -49,14 +49,14 @@ ...@@ -49,14 +49,14 @@
<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">{{ item.showUnit }}{{ formatNumber(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)"></view>
</view> </view>
</template> </template>
</view> </view>
<view class="footer-bottom"> <view class="footer-bottom">
<view class="income-time flex"> <view class="income-time flex">
<view class="sprite-icon icon-time-icon"></view> <view class="sprite-icon icon-time-icon"></view>
生成时间 生成时间:{{ salaryDetail.createdDate }}
</view> </view>
<!-- <view class="income-tips"> <!-- <view class="income-tips">
<view class="sprite-icon icon-tips-b"></view> <view class="sprite-icon icon-tips-b"></view>
...@@ -66,11 +66,11 @@ ...@@ -66,11 +66,11 @@
<view class="sprite-icon icon-warning-icon"></view> <view class="sprite-icon icon-warning-icon"></view>
<text>以上测算未包括 个人所得税、社保等事项</text> <text>以上测算未包括 个人所得税、社保等事项</text>
</view> </view>
<view class="finish-box flex-center"> <!-- <view class="finish-box flex-center">
<view class="sprite-icon icon-finish-icon"></view> <view class="sprite-icon icon-finish-icon"></view>
已提交申诉 已提交申诉
</view> </view> -->
<!-- <view class="verify-btn" @click="handleVerify">我要校核</view> --> <view class="verify-btn" @click="handleVerify">我要校核</view>
</view> </view>
</template> </template>
<view class="empty-body" v-else> <view class="empty-body" v-else>
...@@ -84,17 +84,26 @@ ...@@ -84,17 +84,26 @@
<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>
<Question @close="tipsShow = false" :show="tipsShow" :detail="tipsDetail"></Question> <Question @close="tipsShow = false" :show="tipsShow" :detail="tipsDetail"></Question>
<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>
<Dailog @close="showVerify = false" v-if="showVerify" width="1640rpx" title="工资测算校核" icon="income-count"> <Dailog @close="showVerify = false" v-if="showVerify" width="1640rpx" title="工资测算校核" icon="income-count">
<template slot="content"> <template slot="content">
<view class="dailog-body"> <view class="dailog-body">
<view class="form-item"> <view class="form-item">
<view class="form-label">校核月份:</view> <view class="form-label">校核月份:{{ salaryMonth }}</view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-label">校核说明:</view> <view class="form-label">校核说明:</view>
<textarea class="textarea-box" placeholder="请填写校核说明" /> <textarea class="textarea-box" placeholder="请填写校核说明" v-model="appealDesc" />
</view> </view>
<view class="form-btn">提交校核</view> <view class="form-btn" @click="appealCommit">提交校核</view>
</view> </view>
</template> </template>
</Dailog> </Dailog>
...@@ -107,21 +116,30 @@ import point from '@/mixin/point' ...@@ -107,21 +116,30 @@ import point from '@/mixin/point'
import Dailog from './Dailog.vue' import Dailog from './Dailog.vue'
import Question from './Question.vue' import Question from './Question.vue'
import firstTime from '@/mixin/firstTime' import firstTime from '@/mixin/firstTime'
import baseDialog from './baseDialog'
import baseDetail from './baseDetail'
export default { export default {
mixins: [point, firstTime], mixins: [point, firstTime],
components: { components: {
Detail, Detail,
Dailog, Dailog,
Question Question,
baseDialog,
baseDetail
}, },
data() { data() {
return { return {
title: '学习数据', title: '学习数据',
show: false, show: false,
tipsShow: false, tipsShow: false,
baseShow: false,
baseDetailShow: false,
showVerify: false, showVerify: false,
salaryMonth: '',
appealDesc: '',
tipsDetail: {}, tipsDetail: {},
salaryDetail: {}, salaryDetail: {},
baseSalaryDetail: {},
detail: {}, detail: {},
canvasList: [ canvasList: [
{ date: '1月', num: 0 }, { date: '1月', num: 0 },
...@@ -171,6 +189,24 @@ export default { ...@@ -171,6 +189,24 @@ export default {
handleVerify() { handleVerify() {
this.showVerify = true this.showVerify = true
}, },
appealCommit() {
if (!this.appealDesc) {
uni.showToast({
title: '请填写校核说明',
icon: 'none'
})
}
const { phone: staffPhone } = uni.$storage.get('userInfo')
const params = {
staffPhone,
appealType: 2, // 工资
appealDate: this.salaryMonth,
appealDesc: this.appealDesc
}
uni.$api.pointApi.appealCommit(params).then(res => {
this.showVerify = false
})
},
getDetail(date) { getDetail(date) {
uni.$api.pointApi.pageStat({ salaryMonthBegin: `${this.year}-01`, salaryMonthEnd: `${this.year}-12` }).then(res => { uni.$api.pointApi.pageStat({ salaryMonthBegin: `${this.year}-01`, salaryMonthEnd: `${this.year}-12` }).then(res => {
const list = res.list || [] const list = res.list || []
...@@ -193,16 +229,36 @@ export default { ...@@ -193,16 +229,36 @@ export default {
}) })
this.monthSalaryDetail(this.year + '-' + String(this.month - 1).padStart(2, 0)) this.monthSalaryDetail(this.year + '-' + String(this.month - 1).padStart(2, 0))
}, },
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()
},
/** /**
* 个人月薪资明细 * 个人月薪资明细
* @param {String} salaryMonth - 月份,格式为:YYYY-MM * @param {String} salaryMonth - 月份,格式为:YYYY-MM
* @return {Promise} * @return {Promise}
*/ */
monthSalaryDetail(salaryMonth) { monthSalaryDetail(salaryMonth) {
this.salaryMonth = salaryMonth
uni.$api.pointApi.monthSalaryDetail({ salaryMonth }).then(res => { uni.$api.pointApi.monthSalaryDetail({ salaryMonth }).then(res => {
this.salaryDetail = res this.salaryDetail = res
}) })
const { phone: staffPhone } = uni.$storage.get('userInfo')
const params = {
staffPhone,
startTime: this.salaryMonth + '-01 00:00:00',
endTime: this.getLastDayOfMonth(this.salaryMonth) + ' 23:59:59'
}
uni.$api.pointApi.attendanceDetail(params).then(res => {
this.baseSalaryDetail = res
})
}, },
/** /**
...@@ -213,12 +269,20 @@ export default { ...@@ -213,12 +269,20 @@ export default {
this.tipsDetail = item this.tipsDetail = item
this.tipsShow = true this.tipsShow = true
}, },
showBaseDetail(item) {
this.baseShow = false
this.baseDetailShow = true
this.detail = item
},
/** /**
* 显示薪资明细 * 显示薪资明细
* @param {Object} item - 点击的月份对象 * @param {Object} item - 点击的月份对象
*/ */
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 }
...@@ -491,7 +555,6 @@ export default { ...@@ -491,7 +555,6 @@ export default {
margin-top: 56rpx; margin-top: 56rpx;
} }
.verify-btn { .verify-btn {
margin-top: 40rpx;
width: 288rpx; width: 288rpx;
height: 80rpx; height: 80rpx;
border-radius: 16rpx; border-radius: 16rpx;
...@@ -502,7 +565,7 @@ export default { ...@@ -502,7 +565,7 @@ export default {
color: #ffffff; color: #ffffff;
font-size: 32rpx; font-size: 32rpx;
line-height: 80rpx; line-height: 80rpx;
margin: 0 auto; margin: 40rpx auto 0;
} }
} }
.income-footer { .income-footer {
......
...@@ -88,14 +88,14 @@ ...@@ -88,14 +88,14 @@
<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)"></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" :show="baseShow"></base-dialog> <base-dialog @close="baseShow = false" @showBaseDetail="showBaseDetail" :baseSalaryDetail="baseSalaryDetail" :show="baseShow"></base-dialog>
<base-detail <base-detail
@close=" @close="
baseDetailShow = false baseDetailShow = false
...@@ -152,6 +152,7 @@ export default { ...@@ -152,6 +152,7 @@ export default {
baseDetailShow: false, baseDetailShow: false,
baseShow: false, baseShow: false,
tipsDetail: {}, tipsDetail: {},
baseSalaryDetail: {},
tipsShow: false, tipsShow: false,
activeIndex: 1, activeIndex: 1,
outputDetail: [ outputDetail: [
...@@ -232,11 +233,30 @@ export default { ...@@ -232,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 选择门店
......
<template> <template>
<Dailog @close="close" v-if="show" width="1440rpx" :title="detail.label" :icon="detail.icon" :scale="detail.scale"> <Dailog @close="close" v-if="show" width="1440rpx" :title="detail.label" :icon="detail.icon">
<view class="dailog-body" slot="content"> <view class="dailog-body" slot="content">
<view class="table-container"> <view class="table-container">
<table class="table-box"> <table class="table-box">
<tr class="th"> <tr class="th">
<th v-for="(item, index) in detail.th" :key="index" :style="{ width: item.width + '%' }">{{ item.title }}</th> <th v-for="(item, index) in detail.th" :key="index" :style="{ width: item.width + '%' }">{{ item.title }}</th>
</tr> </tr>
<tr class="tr" v-for="(item, index) in detail.recordList" :key="index"> <tr class="tr" v-for="(item, index) in detail.exceptionDetailList" :key="index">
<td v-for="(colValue, colKey) in detail.th" :key="colKey">66</td> <td v-for="(colValue, colKey) in detail.th" :key="colKey">{{ item[colValue.value] ? item[colValue.value] : colValue.value == 'attendanceType' ? detail.desc : '' }}</td>
</tr> </tr>
</table> </table>
</view> </view>
<view class="table-footer flex"> <view class="table-footer flex">
<text>{{ detail.label }}合计:</text> <text>合计:{{ detail.label }}{{ detail.exceptionDetailList && detail.exceptionDetailList.length }}次</text>
<text class="price">{{ detail.total }}</text> <text class="price">{{ detail.total }}</text>
<text class="total-text">{{ getCount(detail.exceptionDetailList) }}</text>
</view> </view>
<view class="tips-box">{{ detail.tips }}</view> <view class="tips-box">{{ detail.tips }}</view>
</view> </view>
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
<script> <script>
import Dailog from './Dailog' import Dailog from './Dailog'
import utils from '@/utils/utils'
export default { export default {
props: { props: {
detail: { detail: {
...@@ -40,6 +42,11 @@ export default { ...@@ -40,6 +42,11 @@ export default {
return {} return {}
}, },
methods: { methods: {
getCount(val) {
return val.reduce((pre, cur) => {
return utils.calcAdd(pre, isNaN(cur.deductionDays) ? 0 : cur.deductionDays)
}, 0)
},
close() { close() {
this.$emit('close') this.$emit('close')
} }
......
...@@ -11,12 +11,15 @@ ...@@ -11,12 +11,15 @@
<view class="month-fact"> <view class="month-fact">
<view class="fact-label">本月实际出勤天数:</view> <view class="fact-label">本月实际出勤天数:</view>
<view class="fact-num"> <view class="fact-num">
45 <text class="mark" v-if="baseSalaryDetail.actualAttendanceDays == baseSalaryDetail.requiredAttendanceDays && baseSalaryDetail.actualAttendanceDays">满勤</text>
<template v-else>
{{ baseSalaryDetail.actualAttendanceDays }}
<text class="unit">天</text> <text class="unit">天</text>
<text class="mark">(满勤)</text> </template>
<text class="tips" v-if="holidayCount">(满勤+法定节假日加班{{ holidayCount }}天)</text>
</view> </view>
</view> </view>
<view class="month-should">本月应出勤天数:26天</view> <view class="month-should">本月应出勤天数:{{ baseSalaryDetail.requiredAttendanceDays }}天</view>
</view> </view>
<view class="base-box flex"> <view class="base-box flex">
<view class="base-item" v-for="(item, index) in baseList" :key="index"> <view class="base-item" v-for="(item, index) in baseList" :key="index">
...@@ -25,7 +28,7 @@ ...@@ -25,7 +28,7 @@
<text class="item-next" v-if="item.value"></text> <text class="item-next" v-if="item.value"></text>
</view> </view>
<view class="item-num"> <view class="item-num">
{{ item.value }} {{ item.exceptionCount || 0 }}
<text>次</text> <text>次</text>
</view> </view>
</view> </view>
...@@ -38,27 +41,34 @@ ...@@ -38,27 +41,34 @@
<script> <script>
const WORK_TH = [ const WORK_TH = [
{ {
title: '考勤日期' title: '考勤日期',
value: 'clockInDate'
}, },
{ {
title: '类型' title: '类型',
value: 'attendanceType'
}, },
{ {
title: '打开时间' title: '打开时间',
value: 'clockInTime'
}, },
{ {
title: '扣减考勤天数' title: '扣减考勤天数',
value: 'deductionDays'
} }
] ]
const CLOTHING_TH = [ const CLOTHING_TH = [
{ {
title: '考勤日期' title: '考勤日期',
value: 'clockInDate'
}, },
{ {
title: '类型' title: '类型',
value: 'attendanceType'
}, },
{ {
title: '扣减考勤天数' title: '扣减考勤天数',
value: 'deductionDays'
} }
] ]
export default { export default {
...@@ -67,6 +77,10 @@ export default { ...@@ -67,6 +77,10 @@ export default {
type: String, type: String,
default: '1440rpx' default: '1440rpx'
}, },
baseSalaryDetail: {
type: Object,
default: () => {}
},
show: { show: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -74,50 +88,66 @@ export default { ...@@ -74,50 +88,66 @@ export default {
}, },
data() { data() {
return { return {
holidayCount: 0,
baseList: [ baseList: [
{ {
label: '迟到', label: '迟到',
tips: '迟到30分钟(含30分钟)扣减0.5小时;迟到30分钟以上1小时以内,扣减1小时;按每天8小时工作进行扣减', tips: '迟到30分钟(含30分钟)扣减0.5小时;迟到30分钟以上1小时以内,扣减1小时;按每天8小时工作进行扣减',
th: WORK_TH, th: WORK_TH,
value: 0 value: 1
}, },
{ {
label: '早退', label: '早退',
th: WORK_TH, th: WORK_TH,
tips: '早退每次扣减0.5天', tips: '早退每次扣减0.5天',
value: 1 value: 2
}, },
{ {
label: '缺卡', label: '缺卡',
th: WORK_TH, th: WORK_TH,
tips: '当月前两次补卡不扣减,第三次开始每次扣减0.5天', tips: '当月前两次补卡不扣减,第三次开始每次扣减0.5天',
value: 1 value: 3
}, },
{ {
label: '调休/请假', label: '调休/请假',
th: CLOTHING_TH, th: CLOTHING_TH,
tips: '按每天8小时工作进行;请假1小时=扣减0.12天', tips: '按每天8小时工作进行;请假1小时=扣减0.12天',
value: 1 value: 4
}, },
{ {
label: '着装异常', label: '着装异常',
th: CLOTHING_TH, th: CLOTHING_TH,
desc: '着装异常',
tips: '着装异常每次扣减0.5天', tips: '着装异常每次扣减0.5天',
value: 1 value: 5
}, },
{ {
label: '法定节假日加班', label: '法定节假日加班',
value: 1 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: { methods: {
close() { close() {
this.$emit('close') this.$emit('close')
}, },
showDetail(item) { showDetail(item) {
console.log(8)
this.$emit('showBaseDetail', item) this.$emit('showBaseDetail', item)
} }
} }
...@@ -187,6 +217,10 @@ export default { ...@@ -187,6 +217,10 @@ export default {
} }
.mark { .mark {
color: #2cca74; color: #2cca74;
font-size: 48rpx;
}
.tips {
color: #3773f8;
font-size: 32rpx; font-size: 32rpx;
} }
} }
......
...@@ -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({
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 {
......
...@@ -52,10 +52,19 @@ ...@@ -52,10 +52,19 @@
:key="item.id" :key="item.id"
@click="reception(item)" @click="reception(item)"
> >
<view :class="['status flex', 'status_' + formatInvite(item)]">{{ inviteStatus[formatInvite(item)] }}</view> <view
class="detail-btn flex"
@click.stop="openDetail(item)"
>
查看
<div class="sprite-icon icon-detail-btn"></div>
</view>
<view class="top flex">
<view class="name"> <view class="name">
{{ item.customerName }} {{ item.customerName }}
</view> </view>
<view :class="['status flex', 'status_' + formatInvite(item)]">{{ inviteStatus[formatInvite(item)] }}</view>
</view>
<template v-for="(k, ind) in itemObject"> <template v-for="(k, ind) in itemObject">
<view <view
class="info flex" class="info flex"
...@@ -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,10 +359,19 @@ export default { ...@@ -329,10 +359,19 @@ 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);
color: #2c66f7;
font-size: toRpx(28);
font-weight: 500;
.sprite-icon {
margin-left: toRpx(8);
}
}
.status {
flex-shrink: 0;
padding: toRpx(4) toRpx(16); padding: toRpx(4) toRpx(16);
border-radius: toRpx(4); border-radius: toRpx(4);
font-weight: 500; font-weight: 500;
...@@ -340,6 +379,7 @@ export default { ...@@ -340,6 +379,7 @@ export default {
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 +402,9 @@ export default { ...@@ -362,6 +402,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 +412,6 @@ export default { ...@@ -369,7 +412,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;
......
...@@ -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"
...@@ -243,9 +242,9 @@ export default { ...@@ -243,9 +242,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!