From 7622ee0af91cd7837e1cf38e5fabb99de5dde0c6 Mon Sep 17 00:00:00 2001
From: panliang <1163816051@qq.com>
Date: Sun, 28 Apr 2024 01:29:47 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E6=B5=81=E7=A8=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 6 +-
src/pages/ask-leave/components/item.vue | 57 -----------
src/pages/ask-leave/detail.vue | 25 ++---
src/pages/ask-leave/list.vue | 67 +++++++++++--
src/pages/audits/data.data.js | 128 +++++++++++++++---------
src/pages/audits/detail.vue | 5 +-
src/pages/business/components/item.vue | 36 -------
src/pages/business/create.vue | 2 +-
src/pages/business/detail.vue | 26 +++--
src/pages/business/list.vue | 59 +++++++++--
src/pages/contract/components/item.vue | 43 --------
src/pages/contract/create.vue | 8 +-
src/pages/contract/detail.vue | 31 +++---
src/pages/contract/list.vue | 47 ++++++++-
src/pages/make-card/detail.vue | 51 +++++++++-
src/pages/make-card/list.vue | 37 +++++--
src/pages/overtime/components/item.vue | 39 --------
src/pages/overtime/create.vue | 4 +-
src/pages/overtime/detail.vue | 26 +++--
src/pages/overtime/list.vue | 53 +++++++++-
src/pages/work/commone.vue | 5 +-
src/pages/work/list.vue | 33 ++++--
22 files changed, 457 insertions(+), 331 deletions(-)
delete mode 100644 src/pages/ask-leave/components/item.vue
delete mode 100644 src/pages/business/components/item.vue
delete mode 100644 src/pages/contract/components/item.vue
delete mode 100644 src/pages/overtime/components/item.vue
diff --git a/src/pages.json b/src/pages.json
index 7e54840..99f62ed 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -307,19 +307,19 @@
{
"path": "list",
"style": {
- "navigationBarTitleText": "加班报备"
+ "navigationBarTitleText": "合同管理"
}
},
{
"path": "create",
"style": {
- "navigationBarTitleText": "加班报备"
+ "navigationBarTitleText": "我的合同"
}
},
{
"path": "detail",
"style": {
- "navigationBarTitleText": "加班详情"
+ "navigationBarTitleText": "合同详细"
}
}
]
diff --git a/src/pages/ask-leave/components/item.vue b/src/pages/ask-leave/components/item.vue
deleted file mode 100644
index 9e193cf..0000000
--- a/src/pages/ask-leave/components/item.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
- 请假申请
-
- 请假类型:
- {{ item.type?.name }}
-
-
- 请假事由:
- {{ item.reason }}
-
-
- 申请时间:
- {{
- timeFormat(item.created_at, 'yyyy-mm-dd hh:MM')
- }}
-
- {{
- statusFun(item.workflow_check.check_status, 'workflow_check', 'name')
- }}
-
-
-
diff --git a/src/pages/ask-leave/detail.vue b/src/pages/ask-leave/detail.vue
index cbe9046..2dfaff8 100644
--- a/src/pages/ask-leave/detail.vue
+++ b/src/pages/ask-leave/detail.vue
@@ -1,8 +1,8 @@
-
-
+
+
@@ -44,16 +44,6 @@
{{ detail.reason }}
-
-
-
- 拒绝
-
-
- 通过
-
-
-
@@ -65,7 +55,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const modalRef = ref(null)
-const columns = [["修改", "删除"]]
+const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@@ -108,12 +98,15 @@ onLoad(options => {
.request({
url: `/hr/holidays/${options.id}`,
method: "GET",
- header: {
- Accept: "application/json"
- }
})
.then(res => {
detail.value = res
+
+ const options = []
+ if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
+ options.push('修改', '删除')
+ }
+ columns.value = [options]
})
})
diff --git a/src/pages/ask-leave/list.vue b/src/pages/ask-leave/list.vue
index ac76a3c..926d30f 100644
--- a/src/pages/ask-leave/list.vue
+++ b/src/pages/ask-leave/list.vue
@@ -27,8 +27,25 @@
>
-
-
+
+ 请假申请
+
+ 请假类型
+ {{ item.type?.name }}
+
+
+ 请假事由
+ {{ item.reason }}
+
+
+ 申请时间
+ {{ item.created_format }}
+
+ {{ item.workflow_check.check_status_text }}
@@ -43,12 +60,29 @@
>
-
-
+
+ 请假申请
+
+ 申请人
+ {{ item.check.subject.employee.name }}
+
+
+ 请假类型
+ {{ item.check.subject.type.name }}
+
+
+ 请假事由
+ {{ item.check.subject.reason }}
+
+
+ 申请时间
+ {{ item.check.subject.created_format }}
+
+ {{ item.check_status_text }}
@@ -61,7 +95,7 @@ import { ref } from 'vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
-import Item from './components/item.vue'
+import statusFun from '@/utils/status'
const tabList = ref([
{
name: '我的请假',
@@ -72,7 +106,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'holiday_applies',
- include: 'employee,store,type',
+ include: 'check.subject.employee,check.subject.type',
},
},
])
@@ -94,4 +128,17 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
+
+const applyDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/ask-leave/detail?id=${item.id}`,
+ })
+}
+
+const checkDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
+ })
+}
+
diff --git a/src/pages/audits/data.data.js b/src/pages/audits/data.data.js
index 0143ea5..37206bd 100644
--- a/src/pages/audits/data.data.js
+++ b/src/pages/audits/data.data.js
@@ -96,111 +96,108 @@ export default {
//升职
employee_promotions: {
params: {
- include: 'employee,invitor,job',
+ include: 'check.subject.store,check.subject.invitor,check.subject.employee,check.subject.job',
},
data: [
{
title: '审核状态',
- dataIndex: 'workflow_check.check_status_text',
+ dataIndex: 'check_status_text',
},
{
title: '未通过理由',
- dataIndex: 'workflow_check.check_remarks',
+ dataIndex: 'remarks',
labelPosition: 'top',
isShow: (item) => {
- return item?.workflow_check?.check_status == 4
+ return item?.check_status == 4
},
}, {
title: '晋升职位',
- dataIndex: 'job.name',
+ dataIndex: 'check.subject.job.name',
}, {
title: '推荐人',
- dataIndex: 'invitor.name',
+ dataIndex: 'check.subject.invitor.name',
}, {
title: '申请人',
- dataIndex: 'employee.name',
+ dataIndex: 'check.subject.employee.name',
}, {
title: '年龄',
- dataIndex: 'employee_data.age',
+ dataIndex: 'check.subject.employee_data.age',
}, {
title: '性别',
- dataIndex: 'employee_data.sex',
+ dataIndex: 'check.subject.employee_data.sex',
}, {
title: '学历',
- dataIndex: 'employee_data.education',
+ dataIndex: 'check.subject.employee_data.education',
}, {
title: '首次参加工作时间',
- dataIndex: 'employee_data.first_work_time',
+ dataIndex: 'check.subject.employee_data.first_work_time',
labelWidth: "250rpx"
}, {
title: '工作年限',
- dataIndex: 'employee_data.work_years',
+ dataIndex: 'check.subject.employee_data.work_years',
}, {
title: '本公司工作年限',
- dataIndex: 'employee_data.work_years_in_company',
+ dataIndex: 'check.subject.employee_data.work_years_in_company',
}, {
title: '员工自评',
- dataIndex: 'employee_data.comment_self',
+ dataIndex: 'check.subject.employee_data.comment_self',
labelPosition: 'top',
}, {
title: '未来计划',
- dataIndex: 'employee_data.plans',
+ dataIndex: 'check.subject.employee_data.plans',
labelPosition: 'top',
}, {
title: '推荐理由',
- dataIndex: 'employee_data.reason',
+ dataIndex: 'check.subject.employee_data.reason',
labelPosition: 'top',
}]
},
//补卡申请
employee_sign_repairs: {
params: {
- include: 'employee,store',
+ include: 'check.subject.employee,check.subject.store',
},
data: [{
title: '审核状态',
- dataIndex: 'workflow_check.check_status_text',
+ dataIndex: 'check_status_text',
},
{
title: '未通过理由',
- dataIndex: 'workflow_check.check_remarks',
+ dataIndex: 'remarks',
labelPosition: 'top',
isShow: (item) => {
- return item?.workflow_check?.check_status == 4
+ return item?.check_status == 4
},
}, {
title: '申请人',
- dataIndex: 'employee.name',
+ dataIndex: 'check.subject.employee.name',
}, {
title: '所属门店',
- dataIndex: 'store.title',
+ dataIndex: 'check.subject.store.title',
}, {
title: '电话号码',
- dataIndex: 'employee.phone'
+ dataIndex: 'check.subject.employee.phone'
}, {
title: '申请时间',
- dataIndex: 'created_at',
- format: timeFormat,
+ dataIndex: 'check.subject.created_format'
}, {
title: '补卡时间',
- dataIndex: 'date',
- format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM')
+ dataIndex: 'check.subject.date_format',
}, {
title: '补卡原因',
- dataIndex: 'reason',
+ dataIndex: 'check.subject.reason',
labelPosition: 'top',
}, {
title: '是否外勤',
- dataIndex: 'sign_type',
+ dataIndex: 'check.subject.sign_type',
format: (e) => {
return e == 1 ? '否' : '是'
}
}, {
title: '外勤事由',
- dataIndex: 'outside_remarks',
+ dataIndex: 'check.subject.outside_remarks',
labelPosition: 'top',
isShow: (item) => {
- console.log(item);
return item?.sign_type == 2
}
}]
@@ -208,47 +205,86 @@ export default {
//请假申请
holiday_applies: {
params: {
- include: 'employee,store,type'
+ include: 'check.subject.employee,check.subject.type,check.subject.store'
},
data: [{
title: '审核状态',
- dataIndex: 'workflow_check.check_status_text',
+ dataIndex: 'check_status_text',
},
{
title: '未通过理由',
- dataIndex: 'workflow_check.check_remarks',
+ dataIndex: 'remarks',
labelPosition: 'top',
isShow: (item) => {
- return item?.workflow_check?.check_status == 4
+ return item?.check_status == 4
},
}, {
title: '申请人',
- dataIndex: 'employee.name',
+ dataIndex: 'check.subject.employee.name',
}, {
title: '所属门店',
- dataIndex: 'store.title',
+ dataIndex: 'check.subject.store.title',
}, {
title: '电话号码',
- dataIndex: 'employee.phone'
+ dataIndex: 'check.subject.employee.phone'
}, {
title: '申请时间',
- dataIndex: 'created_at',
- format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM'),
+ dataIndex: 'check.subject.created_format',
}, {
title: '请假类型',
- dataIndex: 'type.name',
+ dataIndex: 'check.subject.type.name',
}, {
title: '请假开始时间',
- dataIndex: 'start_at',
- format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'),
+ dataIndex: 'check.subject.start_format',
}, {
title: '请假结束时间',
- dataIndex: 'end_at',
- format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'),
+ dataIndex: 'check.subject.end_format',
}, {
title: '请假原因',
- dataIndex: 'reason',
+ dataIndex: 'check.subject.reason',
labelPosition: 'top',
}]
+ },
+ offical_business: {
+ params: {
+ include: 'check.subject.employee,check.subject.store'
+ },
+ data: [
+ { title: '审核状态', dataIndex: 'check_status_text' },
+ { title: '未通过理由', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
+ { title: '申请人', dataIndex: 'check.subject.employee.name' },
+ { title: '所属门店', dataIndex: 'check.subject.store.title' },
+ { title: '目的地', dataIndex: 'check.subject.address' },
+ { title: '开始时间', dataIndex: 'check.subject.start_format' },
+ { title: '结束时间', dataIndex: 'check.subject.end_format' },
+ { title: '出差事由', dataIndex: 'check.subject.reason', labelPosition: 'top' },
+ ]
+ },
+ overtime_applies: {
+ params: {
+ include: 'check.subject.employee,check.subject.store'
+ },
+ data: [
+ { title: '审核状态', dataIndex: 'check_status_text' },
+ { title: '未通过理由', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
+ { title: '申请人', dataIndex: 'check.subject.employee.name' },
+ { title: '所属门店', dataIndex: 'check.subject.store.title' },
+ { title: '日期', dataIndex: 'check.subject.date_format' },
+ { title: '开始时间', dataIndex: 'check.subject.start_format' },
+ { title: '结束时间', dataIndex: 'check.subject.end_format' },
+ { title: '加班事由', dataIndex: 'check.subject.reason', labelPosition: 'top' },
+ ]
+ },
+ agreements: {
+ params: {
+ include: 'check.subject.employee'
+ },
+ data: [
+ { title: '审核状态', dataIndex: 'check_status_text' },
+ { title: '未通过理由', dataIndex: 'remarks', labelPosition: 'top', isShow: (item) => item?.check_status == 4 },
+ { title: '申请人', dataIndex: 'check.subject.employee.name' },
+ { title: '合同名称', dataIndex: 'check.subject.name' },
+ { title: '合同照片', dataIndex: 'check.subject.images', type: 'album' },
+ ]
}
}
\ No newline at end of file
diff --git a/src/pages/audits/detail.vue b/src/pages/audits/detail.vue
index 672f190..f919c10 100644
--- a/src/pages/audits/detail.vue
+++ b/src/pages/audits/detail.vue
@@ -69,12 +69,15 @@ const modelOptions = reactive({
})
const onConfirm = async () => {
+ if (modelOptions.isValue && !value.value) {
+ return uni.showToast({title: "请填写拒绝原因", icon: "none"})
+ }
try {
await http.post(`/workflow/${id.value}/check`, {
status: !modelOptions.isValue,
remarks: modelOptions.isValue ? value.value : '',
})
- // uni.$emit('audits:onRefresh')
+ uni.$emit('audits:onRefresh')
uni.navigateBack()
} catch (error) {}
}
diff --git a/src/pages/business/components/item.vue b/src/pages/business/components/item.vue
deleted file mode 100644
index 84f106c..0000000
--- a/src/pages/business/components/item.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- 出差报备
-
- 目的地:
- {{ item.address }}
-
-
- 出差事由:
- {{ item.reason }}
-
-
- 申请时间:
- {{ timeFormat(item.created_at, "yyyy-mm-dd hh:MM:ss") }}
-
- {{ statusFun(item.workflow_check.check_status, "workflow_check", "name") }}
-
-
-
diff --git a/src/pages/business/create.vue b/src/pages/business/create.vue
index 7c7a51a..62346e7 100644
--- a/src/pages/business/create.vue
+++ b/src/pages/business/create.vue
@@ -8,7 +8,7 @@
-
+
diff --git a/src/pages/business/detail.vue b/src/pages/business/detail.vue
index 84769cd..be074ca 100644
--- a/src/pages/business/detail.vue
+++ b/src/pages/business/detail.vue
@@ -1,7 +1,7 @@
-
+
@@ -43,15 +43,14 @@
出差原因
{{ detail.reason }}
-
-
-
-
- 拒绝
-
-
- 通过
-
+
+
+ 审核状态
+ {{ detail.workflow_check.check_status_text }}
+
+
+ 未通过原因
+ {{ detail.workflow_check.check_remarks }}
@@ -65,7 +64,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const modalRef = ref(null)
-const columns = [["修改", "删除"]]
+const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@@ -114,6 +113,11 @@ onLoad(options => {
})
.then(res => {
detail.value = res
+ const options = []
+ if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
+ options.push('修改', '删除')
+ }
+ columns.value = [options]
})
})
diff --git a/src/pages/business/list.vue b/src/pages/business/list.vue
index 4a03c27..5c99018 100644
--- a/src/pages/business/list.vue
+++ b/src/pages/business/list.vue
@@ -27,8 +27,21 @@
>
-
-
+
+ 出差报备
+
+ 目的地:
+ {{ item.address }}
+
+
+ 出差事由:
+ {{ item.reason }}
+
+
+ 申请时间:
+ {{ item.created_format }}
+
+ {{ item.workflow_check.check_status_text }}
@@ -44,8 +57,25 @@
>
-
-
+
+ 出差报备
+
+ 申请人:
+ {{ item.check.subject.employee.name }}
+
+
+ 目的地:
+ {{ item.check.subject.address }}
+
+
+ 出差事由:
+ {{ item.check.subject.reason }}
+
+
+ 申请时间:
+ {{ item.check.subject.created_format }}
+
+ {{ item.check_status_text }}
@@ -58,17 +88,18 @@ import { ref } from 'vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
-import Item from './components/item.vue'
+import statusFun from "@/utils/status"
const tabList = ref([
{
- name: '我的请假',
+ name: '出差申请',
apiUrl: '/hr/offical-bussiness',
},
{
- name: '请假审核',
+ name: '出差审核',
apiUrl: '/workflow',
params: {
- subject_type: 'holiday_applies',
+ subject_type: 'offical_business',
+ include: 'check.subject.employee',
},
},
])
@@ -90,4 +121,16 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
+
+const applyDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/business/detail?id=${item.id}`
+ })
+}
+
+const checkDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
+ })
+}
diff --git a/src/pages/contract/components/item.vue b/src/pages/contract/components/item.vue
deleted file mode 100644
index dd5eb3d..0000000
--- a/src/pages/contract/components/item.vue
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
- {{ item.name }}
-
-
-
-
-
-
-
-
- {{
- statusFun(item.workflow_check.check_status, 'workflow_check', 'name')
- }}
-
-
-
diff --git a/src/pages/contract/create.vue b/src/pages/contract/create.vue
index 05705d5..d1b131c 100644
--- a/src/pages/contract/create.vue
+++ b/src/pages/contract/create.vue
@@ -62,7 +62,11 @@ onLoad(options => {
})
.then(res => {
form.name = res.name
- form.images = res.images
+ if (res.images && res.images.length > 0) {
+ res.images.forEach(item => {
+ form.images.push({url: item})
+ })
+ }
})
}
})
@@ -95,7 +99,7 @@ const onSubmit = async () => {
icon: "none"
})
formRef.value.resetFields()
- uni.$emit("task:submit", resData)
+ uni.$emit("task:submit")
uni.navigateBack()
} catch (error) {
console.log(error)
diff --git a/src/pages/contract/detail.vue b/src/pages/contract/detail.vue
index 9e87c8b..26e9aa3 100644
--- a/src/pages/contract/detail.vue
+++ b/src/pages/contract/detail.vue
@@ -1,7 +1,7 @@
-
+
@@ -47,21 +47,17 @@
-
-
-
-
-
- 拒绝
-
-
-
- 通过
-
+
+
+ 审核状态
+ {{ detail.workflow_check.check_status_text }}
+
+
+ 未通过原因
+ {{ detail.workflow_check.check_remarks }}
+
{
})
.then((res) => {
detail.value = res
+ const options = []
+ if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
+ options.push('修改', '删除')
+ }
+ columns.value = [options]
})
})
diff --git a/src/pages/contract/list.vue b/src/pages/contract/list.vue
index 222e08e..c482ca2 100644
--- a/src/pages/contract/list.vue
+++ b/src/pages/contract/list.vue
@@ -30,8 +30,18 @@
>
-
-
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+ {{item.workflow_check.check_status_text}}
@@ -48,7 +58,23 @@
-
+
+
+ {{ item.check.subject.name }}
+
+
+ 申请人:
+ {{ item.check.subject.employee.name }}
+
+
+
+
+
+
+
+
+ {{item.check_status_text}}
+
@@ -58,10 +84,10 @@
diff --git a/src/pages/make-card/detail.vue b/src/pages/make-card/detail.vue
index 8418f30..ec94ea7 100644
--- a/src/pages/make-card/detail.vue
+++ b/src/pages/make-card/detail.vue
@@ -6,7 +6,8 @@
-
+
+
+ -->
+
@@ -70,11 +71,53 @@ import { http } from "@/utils/request"
import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
+import BaseData from '@/pages/audits/base-data.vue'
+
const modalRef = ref(null)
const columns = [["修改", "删除"]]
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
+const detailColumns = [
+ {
+ title: "申请人",
+ dataIndex: "employee.name"
+ },
+ {
+ title: "所属门店",
+ dataIndex: "store.title"
+ },
+ {
+ title: "电话号码",
+ dataIndex: "employee.phone"
+ },
+ {
+ title: "申请时间",
+ dataIndex: "created_format"
+ },
+ {
+ title: "补卡时间",
+ dataIndex: "date_format"
+ },
+ {
+ title: "补卡原因",
+ dataIndex: "reason"
+ },
+ {
+ title: "是否外勤",
+ dataIndex: "sign_type",
+ format: (value) => {
+ return value == 1 ? "否" : "是"
+ }
+ },
+ {
+ title: "外勤事由",
+ dataIndex: "outside_remarks",
+ isShow: (data) => {
+ return data?.sign_type == 2
+ }
+ },
+];
const open = () => {
pickerRef.value.open()
}
diff --git a/src/pages/make-card/list.vue b/src/pages/make-card/list.vue
index 0c37715..fa262cd 100644
--- a/src/pages/make-card/list.vue
+++ b/src/pages/make-card/list.vue
@@ -43,12 +43,29 @@
>
-
-
+
+ 补卡申请
+
+ 申请人:
+ {{ item.check.subject.employee.name }}
+
+
+ 补卡原因:
+ {{ item.check.subject.reason }}
+
+
+ 补卡类别:
+ {{ item.check.subject.sign_time == 1 ? '上班打卡' : '下班打卡' }}
+
+
+ 补卡时间:
+ {{ item.check.subject.date_format }}
+
+ {{ item.check_status_text }}
@@ -62,6 +79,7 @@ import { onPageScroll, onReachBottom, onShow, onLoad } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
+import statusFun from '@/utils/status'
const tabList = ref([
{
name: '我的补卡',
@@ -72,6 +90,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'employee_sign_repairs',
+ include: 'check.subject.employee'
},
},
])
@@ -100,4 +119,10 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
+
+const checkDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`,
+ })
+}
diff --git a/src/pages/overtime/components/item.vue b/src/pages/overtime/components/item.vue
deleted file mode 100644
index 4a90414..0000000
--- a/src/pages/overtime/components/item.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- 加班报备
-
- 加班日期:
- {{ timeFormat(item.date, "yyyy-mm-dd") }}
-
-
- 加班时间:
- {{ timeFormat(item.start_at, "yyyy-mm-dd hh:MM").substring(10) }} -
- {{ timeFormat(item.end_at, "yyyy-mm-dd hh:MM").substring(10) }}
-
-
- 加班事由:
- {{ item.reason }}
-
- {{ statusFun(item.workflow_check.check_status, "workflow_check", "name") }}
-
-
-
diff --git a/src/pages/overtime/create.vue b/src/pages/overtime/create.vue
index 2abf80f..02cfa5b 100644
--- a/src/pages/overtime/create.vue
+++ b/src/pages/overtime/create.vue
@@ -42,7 +42,7 @@
-
+
@@ -119,7 +119,7 @@ const confirmEndDatePicker = e => {
const rules = reactive({
start_at: [{ required: true, message: "请选择时间" }],
end_at: [{ required: true, message: "请选择时间" }],
- reason: [{ required: true, message: "请输入加班理由" }],
+ reason: [{ required: true, message: "请输入加班事由" }],
date: [{ required: true, message: "请选择日期" }]
})
onLoad(options => {
diff --git a/src/pages/overtime/detail.vue b/src/pages/overtime/detail.vue
index 55f5405..a661004 100644
--- a/src/pages/overtime/detail.vue
+++ b/src/pages/overtime/detail.vue
@@ -1,7 +1,7 @@
-
+
@@ -43,15 +43,14 @@
加班原因
{{ detail.reason }}
-
-
-
-
- 拒绝
-
-
- 通过
-
+
+
+ 审核状态
+ {{ detail.workflow_check.check_status_text }}
+
+
+ 未通过原因
+ {{ detail.workflow_check.check_remarks }}
@@ -65,7 +64,7 @@ import { onLoad } from "@dcloudio/uni-app"
import { ref } from "vue"
import { timeFormat } from "@climblee/uv-ui/libs/function/index"
const modalRef = ref(null)
-const columns = [["修改", "删除"]]
+const columns = ref([[]])
const detail = ref()
const pickerRef = ref(null)
const id = ref(0)
@@ -114,6 +113,11 @@ onLoad(options => {
})
.then(res => {
detail.value = res
+ const options = []
+ if ([1,4,5].indexOf(res.workflow_check.check_status) != -1) {
+ options.push('修改', '删除')
+ }
+ columns.value = [options]
})
})
diff --git a/src/pages/overtime/list.vue b/src/pages/overtime/list.vue
index ee548e1..f6751f0 100644
--- a/src/pages/overtime/list.vue
+++ b/src/pages/overtime/list.vue
@@ -27,8 +27,21 @@
>
-
-
+
+ 加班报备
+
+ 加班日期:
+ {{ item.date_format }}
+
+
+ 加班时间:
+ {{ item.start_format }} - {{ item.end_format }}
+
+
+ 加班事由:
+ {{ item.reason }}
+
+ {{ item.workflow_check.check_status_text }}
@@ -44,8 +57,25 @@
>
-
-
+
+ 加班报备
+
+ 申请人:
+ {{ item.check.subject.employee.name }}
+
+
+ 加班日期:
+ {{ item.check.subject.date_format }}
+
+
+ 加班时间:
+ {{ item.check.subject.start_format }} - {{ item.check.subject.end_format }}
+
+
+ 加班事由:
+ {{ item.check.subject.reason }}
+
+ {{ item.check_status_text }}
@@ -58,7 +88,7 @@ import { ref } from 'vue'
import { onPageScroll, onReachBottom, onShow } from '@dcloudio/uni-app'
import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js'
import MescrollItem from '@/components/mescroll-api/more.vue'
-import Item from './components/item.vue'
+import statusFun from "@/utils/status"
const tabList = ref([
{
name: '我的加班',
@@ -69,6 +99,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'overtime_applies',
+ include: 'check.subject.employee'
},
},
])
@@ -90,4 +121,16 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
+
+const applyDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/overtime/detail?id=${item.id}`
+ })
+}
+
+const checkDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
+ })
+}
diff --git a/src/pages/work/commone.vue b/src/pages/work/commone.vue
index c9ec105..d5082ab 100644
--- a/src/pages/work/commone.vue
+++ b/src/pages/work/commone.vue
@@ -273,9 +273,6 @@ const onSubmit = async () => {
const resData = await http.request({
url: `/hr/promotion/${props.id}`,
method: 'POST',
- header: {
- Accept: 'application/json',
- },
data: params,
})
uni.showToast({
@@ -283,7 +280,7 @@ const onSubmit = async () => {
icon: 'none',
})
formRef.value.resetFields()
- uni.$emit('work:submit', resData)
+ // uni.$emit('work:submit', resData)
uni.navigateBack()
} catch (error) {
console.log(error)
diff --git a/src/pages/work/list.vue b/src/pages/work/list.vue
index c330667..b463e56 100644
--- a/src/pages/work/list.vue
+++ b/src/pages/work/list.vue
@@ -50,12 +50,23 @@
>
-
-
+
+
+ {{ item.check.subject.job.name }}
+ {{ item.check_status_text }}
+
+
+ 推荐人
+ {{ item.check.subject.invitor.name }}
+
+
+ 申请人
+ {{ item.check.subject.employee.name }}
+
+
+ 晋升职位
+ {{ item.check.subject.job.name }}
+
@@ -70,6 +81,8 @@ import useMescrollMore from '@/uni_modules/mescroll-uni/hooks/useMescrollMore.js
import MescrollItem from '@/components/mescroll-api/more.vue'
import Item from './components/item.vue'
import { onLoad } from '@dcloudio/uni-app'
+import statusFun from '@/utils/status'
+
const tabList = ref([
{
name: '申请列表',
@@ -84,7 +97,7 @@ const tabList = ref([
apiUrl: '/workflow',
params: {
subject_type: 'employee_promotions',
- include: 'employee,invitor,job',
+ include: 'check.subject.store,check.subject.invitor,check.subject.employee,check.subject.job',
},
},
])
@@ -114,4 +127,10 @@ const tabChange = ({ index }) => {
tabIndex.value = index
scrollToLastY()
}
+
+const checkDetail = (item) => {
+ uni.navigateTo({
+ url: `/pages/audits/detail?id=${item.id}&type=${item.check.subject_type}`
+ })
+}