From 21b38ba58dfc6c2a19c2cfdbbab53087d873b3b4 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 4 Mar 2025 11:46:14 +0800 Subject: [PATCH] 1 --- src/views/attendance/WorkOvertime.vue | 28 +++++++++++++++++++++--- src/views/attendance/index.vue | 31 ++++++++++++++++++--------- src/views/flow/list.vue | 22 +++++++++---------- 3 files changed, 57 insertions(+), 24 deletions(-) diff --git a/src/views/attendance/WorkOvertime.vue b/src/views/attendance/WorkOvertime.vue index c3053bd..71ea2e5 100644 --- a/src/views/attendance/WorkOvertime.vue +++ b/src/views/attendance/WorkOvertime.vue @@ -8,11 +8,11 @@ type="daterange" size="small" value-format="yyyy-MM-dd" - clearable style="width: 260px;" range-separator="至" start-placeholder="开始日期" - end-placeholder="结束日期"> + end-placeholder="结束日期" + @input="e => (e && e.length === 2) ? (select.start_date = e[0],select.end_date = e[1]) : (select.start_date = '',select.end_date = '')"> 搜索 @@ -128,6 +128,28 @@ + + @@ -151,7 +173,7 @@ export default { tableData: [], select: { page: 1, - page_size: 9999, + page_size: 10, start_date: this.$moment().subtract(1, 'months').format('YYYY-MM-DD'), end_date: this.$moment().add(1, 'months').format('YYYY-MM-DD') }, diff --git a/src/views/attendance/index.vue b/src/views/attendance/index.vue index 465daa0..5f14bf1 100644 --- a/src/views/attendance/index.vue +++ b/src/views/attendance/index.vue @@ -3,9 +3,14 @@
开始值班 - +
+ + +
打卡状态 {{ (isGetLocation || isIpSign) ? (isOutSign ? '外勤打卡' : '可打卡') : '不可打卡' }}
@@ -86,6 +91,7 @@ export default { return { uploadSize, isInUni: false, + signStatus: 0, // start 外勤打卡 loading: false, action: process.env.VUE_APP_UPLOAD_API, @@ -160,7 +166,8 @@ export default { if (this.isIpSign) { const res = await signIp({ image_id: this.imageId, - remark: this.remark + remark: this.remark, + status: 3 }) } else { const res = await sign({ @@ -180,7 +187,7 @@ export default { this.loading = false } }, 1000, true), - clockIn: throttle(async function() { + clockIn: throttle(async function(isOut=true) { try { if (!this.isInUni && !this.isIpSign) { await this.getLocation() @@ -195,12 +202,14 @@ export default { return } if(!this.isGetLocation && !this.isIpSign) return - if(this.isOutSign) { + if(isOut) { this.isShow = true return } if (this.isIpSign) { - const res = await signIp() + const res = await signIp({ + status: 1 + }) } else { const res = await sign({ location: `${this.pos.lng},${this.pos.lat}`, @@ -262,10 +271,12 @@ export default { async preIp() { try { - const res = await preIp() - this.isOutSign = false + const { result } = await preIp() + this.signStatus = result + + // this.isOutSign = false } catch (err) { - this.isOutSign = true + // this.isOutSign = true } }, async pos2Address(lat, lng) { diff --git a/src/views/flow/list.vue b/src/views/flow/list.vue index a9b1731..de8cf67 100644 --- a/src/views/flow/list.vue +++ b/src/views/flow/list.vue @@ -77,15 +77,15 @@ @click="getList(true)" >搜索 - 批量审批 + + + + + + + + +
@@ -386,7 +386,7 @@ import moment from "moment/moment"; import ListPopover from "./components/ListPopover.vue"; import MultiDeal from "./components/MultiDeal.vue" import share from "./components/share.vue"; -import {index as departmentIndex} from "@/api/department"; +import { departmentListNoAuth } from "@/api/common" export default { name: "flowList", components: { @@ -512,7 +512,7 @@ export default { methods: { async getDepartments() { try { - this.departments = await departmentIndex({ + this.departments = await departmentListNoAuth({ page: 1, page_size: 9999 })