From c2b770628a45b844523304ea36e220ee89c6a89b Mon Sep 17 00:00:00 2001 From: ihzero Date: Sat, 27 Apr 2024 23:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 ++ src/pages/ask-leave/components/item.vue | 43 +++++++++++++----- src/pages/ask-leave/list.vue | 10 ++++- src/pages/audits/data.data.js | 58 ++++++++++++++++++++++--- 4 files changed, 96 insertions(+), 19 deletions(-) diff --git a/src/App.vue b/src/App.vue index f9cc09d..c88aea7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,6 +5,10 @@ export default { const userStore = useUserStoreWithOut() if (userStore.isLogin) { userStore.fetchUserInfo() + }else{ + uni.reLaunch({ + url: '/pages/login/index', + }) } // #ifdef APP-PLUS if (userStore.isLogin) { diff --git a/src/pages/ask-leave/components/item.vue b/src/pages/ask-leave/components/item.vue index d0e70e9..9e193cf 100644 --- a/src/pages/ask-leave/components/item.vue +++ b/src/pages/ask-leave/components/item.vue @@ -1,9 +1,12 @@ diff --git a/src/pages/ask-leave/list.vue b/src/pages/ask-leave/list.vue index 87ba544..ac76a3c 100644 --- a/src/pages/ask-leave/list.vue +++ b/src/pages/ask-leave/list.vue @@ -28,7 +28,7 @@ @@ -39,11 +39,16 @@ :i="1" :index="tabIndex" :apiUrl="tabList[1].apiUrl" + :params="tabList[1].params" > @@ -67,6 +72,7 @@ const tabList = ref([ apiUrl: '/workflow', params: { subject_type: 'holiday_applies', + include: 'employee,store,type', }, }, ]) diff --git a/src/pages/audits/data.data.js b/src/pages/audits/data.data.js index 91ddbb1..c69075e 100644 --- a/src/pages/audits/data.data.js +++ b/src/pages/audits/data.data.js @@ -164,25 +164,25 @@ export default { }, { title: '电话号码', dataIndex: 'employee.phone' - },{ + }, { title: '申请时间', dataIndex: 'created_at', format: timeFormat, - },{ + }, { title: '补卡时间', dataIndex: 'date', - format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM') - },{ + format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM') + }, { title: '补卡原因', dataIndex: 'reason', labelPosition: 'top', - },{ + }, { title: '是否外勤', dataIndex: 'sign_type', format: (e) => { return e == 1 ? '否' : '是' } - },{ + }, { title: '外勤事由', dataIndex: 'outside_remarks', labelPosition: 'top', @@ -191,5 +191,51 @@ export default { return item?.sign_type == 2 } }] + }, + //请假申请 + holiday_applies: { + params: { + include: 'employee,store,type' + }, + data: [{ + title: '审核状态', + dataIndex: 'workflow_check.check_status_text', + }, + { + title: '未通过理由', + dataIndex: 'workflow_check.check_remarks', + labelPosition: 'top', + isShow: (item) => { + return item?.workflow_check?.check_status == 4 + }, + }, { + title: '申请人', + dataIndex: 'employee.name', + }, { + title: '所属门店', + dataIndex: 'store.title', + }, { + title: '电话号码', + dataIndex: 'employee.phone' + }, { + title: '申请时间', + dataIndex: 'created_at', + format: (e)=>timeFormat(e,'yyyy-mm-dd hh:MM'), + }, { + title: '请假类型', + dataIndex: 'type.name', + }, { + title: '请假开始时间', + dataIndex: 'start_at', + format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'), + }, { + title: '请假结束时间', + dataIndex: 'end_at', + format: (e) => timeFormat(e, 'yyyy-mm-dd hh:MM'), + }, { + title: '请假原因', + dataIndex: 'reason', + labelPosition: 'top', + }] } } \ No newline at end of file