diff --git a/src/App.vue b/src/App.vue
index 284188d..f9cc09d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,7 +6,6 @@ export default {
if (userStore.isLogin) {
userStore.fetchUserInfo()
}
- console.log(userStore.isLogin);
// #ifdef APP-PLUS
if (userStore.isLogin) {
plus.navigator.closeSplashscreen()
diff --git a/src/components/cu-badge/index.vue b/src/components/cu-badge/index.vue
index ab69b48..134c70a 100644
--- a/src/components/cu-badge/index.vue
+++ b/src/components/cu-badge/index.vue
@@ -1,13 +1,20 @@
-
+
+
+
+
+
-
diff --git a/src/pages/clockout/index.vue b/src/pages/clockout/index.vue
index 8f54088..bff0ec3 100644
--- a/src/pages/clockout/index.vue
+++ b/src/pages/clockout/index.vue
@@ -50,7 +50,7 @@
@@ -118,7 +118,10 @@ const form = reactive({
const rules = ref({})
const noCheck = computed(() => {
- return isGPS.value || !detail.enable
+ return !isGPS.value || !detail.value.enable
+})
+const maxDistance = computed(() => {
+ return detail.value.maxDistance
})
const timeConfirm = ({ value }) => {
@@ -139,10 +142,10 @@ const getLoca = async () => {
type: 'wgs84',
fail: (err) => {
isGPS.value = false
- uni.showToast({
- icon: 'none',
- title: '定位失败,请检查手机定位权限是否开启',
- })
+ // uni.showToast({
+ // icon: 'none',
+ // title: '定位失败,请检查手机定位权限是否开启',
+ // })
},
success: (res) => {
isGPS.value = true
@@ -150,7 +153,7 @@ const getLoca = async () => {
complete: async (e) => {
position.value = {
lat: e.latitude,
- lng: e.longitude,
+ lon: e.longitude,
...e
}
initLo()
@@ -159,7 +162,12 @@ const getLoca = async () => {
}
const initLo = async () => {
- const resdata = await http.get('/hr/sign/info', position.value)
+ console.log(position.value);
+ const resdata = await http.get('/hr/sign/info',{
+ params: {
+ ...position.value
+ }
+ })
detail.value = resdata
form.type = resdata.type
form.sign_time = timeList.value[0].find((e) => e.value == resdata.time)?.name
@@ -203,7 +211,7 @@ const goPage = (url) => {
.btn {
&[disabled='true'] {
- @apply opacity-70 pointer-events-none;
+ @apply bg-hex-999 pointer-events-none;
}
}
diff --git a/src/pages/clockout/logs.vue b/src/pages/clockout/logs.vue
index 1705bcf..144e62b 100644
--- a/src/pages/clockout/logs.vue
+++ b/src/pages/clockout/logs.vue
@@ -17,6 +17,12 @@
>
+
+
+
{{
current.first_time
@@ -38,7 +44,7 @@
补卡申请>
补卡申请
@@ -95,8 +101,8 @@ const onChangeDay = (e) => {
const goC = () => {
// /pages/make-card/create
let type
- if(!current.value.last_time) type = 1
- if(!current.value.first_time) type = 2
+ if (!current.value.last_time) type = 1
+ if (!current.value.first_time) type = 2
uni.navigateTo({
url: `/pages/make-card/create?date=${current.value.date}&type=${type}`,
})
diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue
index a3a8be6..09e2993 100644
--- a/src/pages/examination/index.vue
+++ b/src/pages/examination/index.vue
@@ -38,7 +38,7 @@ const { mescrollItem } = useMescrollComp(onPageScroll, onReachBottom)
onLoad(() => {
uni.$on('examination:onRefresh', () => {
- mescrollItem?.value?.refresh()
+ mescrollItem?.value?.getMescroll()?.resetUpScroll()
})
})
diff --git a/src/pages/home/index.vue b/src/pages/home/index.vue
index 3bb5af5..96b553f 100644
--- a/src/pages/home/index.vue
+++ b/src/pages/home/index.vue
@@ -8,15 +8,15 @@
-
-
+
+
+
+
-
+
昨日累计金额
@@ -82,8 +82,13 @@ import { onShow } from '@dcloudio/uni-app'
import { timeFormat } from '@climblee/uv-ui/libs/function'
import StoreDown from './components/store-down.vue'
import { useUserStore } from '@/store/modules/user'
+import cuBadge from '@/components/cu-badge/index.vue'
import checkPermission from '@/utils/permission'
const userStore = useUserStore()
+const userInfo = computed(() => userStore.userInfo)
+const unread_notifications = computed(
+ () => userInfo.value.unread_notifications || 0
+)
const opts = {
color: ['#ee2c37'],
dataLabel: false,
@@ -129,11 +134,13 @@ const list = ref([
const tabIndex = ref(0)
const detail = ref({
yesday_ledger: {},
- current_month_ledger:{}
+ current_month_ledger: {},
})
const chartData = ref({})
const yesday_ledger = computed(() => detail.value.yesday_ledger || {})
-const current_month_ledger = computed(() => detail.value.current_month_ledger || {})
+const current_month_ledger = computed(
+ () => detail.value.current_month_ledger || {}
+)
const trends_of_30days = computed(() => detail.value.trends_of_30days || [])
const yesterday = computed(() => {
@@ -173,6 +180,7 @@ const updateData = () => {
onShow(() => {
getData()
+ userStore.fetchUserInfo()
})
const getData = (e = {}) => {
diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue
index 74eb864..be3d8b3 100644
--- a/src/pages/mine/index.vue
+++ b/src/pages/mine/index.vue
@@ -43,15 +43,15 @@
@click="goPath('/pages/clockout/index')"
>
-
+
@@ -95,6 +95,7 @@ import contractIcon from '@/static/images/contract.svg'
import booksIcon from '@/static/images/books.svg'
import examinationIcon from '@/static/images/examination.svg'
import cuBadge from '@/components/cu-badge/index.vue'
+import { onShow } from '@dcloudio/uni-app'
const userStore = useUserStore()
const userInfo = computed(() => userStore.userInfo)
@@ -102,6 +103,10 @@ const unread_notifications = computed(
() => userInfo.value.unread_notifications || 0
)
+onShow(() => {
+ userStore.fetchUserInfo()
+})
+
const opList = [
{
title: '门店数据',
diff --git a/src/pages/overtime/create.vue b/src/pages/overtime/create.vue
index 87946c1..fe5ac03 100644
--- a/src/pages/overtime/create.vue
+++ b/src/pages/overtime/create.vue
@@ -43,7 +43,7 @@
-
+
diff --git a/src/pages/revert/index.vue b/src/pages/revert/index.vue
index f03a83e..4d044e5 100644
--- a/src/pages/revert/index.vue
+++ b/src/pages/revert/index.vue
@@ -1,7 +1,7 @@
-
-
+
+
{{ item.name }}
-
+
diff --git a/src/pages/user/detail.vue b/src/pages/user/detail.vue
index 7494af8..e735f6a 100644
--- a/src/pages/user/detail.vue
+++ b/src/pages/user/detail.vue
@@ -115,7 +115,7 @@ const select = (e) => {
modalOptin.content = '是否确认删除该员工?'
modalOptin.confirm = onDelete
modalRef.value.open()
- }else if(value === 'store'){
+ } else if (value === 'store') {
uni.navigateTo({
url: `/pages/user/update?id=${id.value}&type=store`,
})
@@ -123,13 +123,15 @@ const select = (e) => {
}
const onDelete = () => {
http.delete(`/hr/employee/${id.value}`).then((res) => {
- uni.$emit('user:onRefresh')
uni.showToast({
title: '删除成功',
- duration: 2000,
icon: 'none',
})
- uni.navigateBack()
+ uni.$emit('user:onRefresh')
+ setTimeout(() => {
+
+ uni.navigateBack()
+ }, 2000)
})
}
const onQuick = () => {
diff --git a/src/pages/user/update.vue b/src/pages/user/update.vue
index 8cb4fa9..85949d4 100644
--- a/src/pages/user/update.vue
+++ b/src/pages/user/update.vue
@@ -183,14 +183,15 @@ const updateUser = async () => {
await http.put(`/hr/employee/${id.value}`, {
...form,
})
- uni.$emit('user:onRefresh')
- uni.navigateBack()
- formRef.value.resetFields()
uni.showToast({
title: '修改成功',
- duration: 2000,
icon: 'none',
})
+ uni.$emit('user:onRefresh')
+ setTimeout(() => {
+ uni.navigateBack()
+ formRef.value.resetFields()
+ }, 2000)
} catch (error) {
} finally {
loading.value = false
@@ -211,6 +212,7 @@ const addUser = async () => {
duration: 2000,
icon: 'none',
})
+ uni.$emit('user:onRefresh')
} catch (error) {
} finally {
loading.value = false