From 0d2e5f829900dcc77f6e4abd6fe2a017a5aefa2b Mon Sep 17 00:00:00 2001
From: panliang <1163816051@qq.com>
Date: Fri, 3 May 2024 17:20:15 +0800
Subject: [PATCH] status
---
src/pages/audits/data.data.js | 4 +-
src/pages/audits/log.vue | 2 +-
src/pages/expense-account/index.vue | 2 +-
src/pages/task/index.vue | 4 +-
src/utils/status.js | 96 ++++++++++-------------------
5 files changed, 37 insertions(+), 71 deletions(-)
diff --git a/src/pages/audits/data.data.js b/src/pages/audits/data.data.js
index ca6d721..90aeb7e 100644
--- a/src/pages/audits/data.data.js
+++ b/src/pages/audits/data.data.js
@@ -8,9 +8,7 @@ export default {
{
title: '审核状态',
dataIndex: 'check_status',
- format: (value) => {
- return statusFun(value, 'statusExpense2', 'name')
- }
+ format: (value) => statusFun(value, 'statusExpense2', 'name')
},
diff --git a/src/pages/audits/log.vue b/src/pages/audits/log.vue
index d005d45..6f1efb0 100644
--- a/src/pages/audits/log.vue
+++ b/src/pages/audits/log.vue
@@ -13,7 +13,7 @@
{{ item.check_user ? item.check_user.name : item.check_name }}
- {{ item.check_status_text }}
+ {{ statusFun(item.check_status, 'statusExpense', 'name') }}
{{item.remarks}}
diff --git a/src/pages/expense-account/index.vue b/src/pages/expense-account/index.vue
index ff45d23..f5259bd 100644
--- a/src/pages/expense-account/index.vue
+++ b/src/pages/expense-account/index.vue
@@ -29,7 +29,7 @@
v-for="item in list"
:key="item.id"
:title="item.type?.name"
- :status-text="item.workflow_check?.check_status_text"
+ :status-text="statusFun(item.workflow_check?.check_status, 'statusExpense', 'name')"
:status-color="statusFun(item.workflow_check?.check_status,'statusExpense','color')"
:body="[
{ label: '报销金额: ', value: item.expense },
diff --git a/src/pages/task/index.vue b/src/pages/task/index.vue
index 24a370c..2128a22 100644
--- a/src/pages/task/index.vue
+++ b/src/pages/task/index.vue
@@ -50,8 +50,8 @@
v-for="item in list"
:key="item.id"
:title="item.check.subject.task.name"
- :status-text="statusFun( item.check_status,'statusExpense2','name')"
- :status-color="statusFun( item.check_status,'statusExpense2','color')"
+ :status-text="statusFun(item.check_status,'statusExpense2','name')"
+ :status-color="statusFun(item.check_status,'statusExpense2','color')"
:body="[
{label: '任务时间: ', value: item.check.subject.task.start_format + '-' + item.check.subject.task.end_format}
]"
diff --git a/src/utils/status.js b/src/utils/status.js
index f3e3c73..30233f8 100644
--- a/src/utils/status.js
+++ b/src/utils/status.js
@@ -12,48 +12,22 @@ const data = {
value:'approval',
name:'审批通知',
}],
- statusExpense: [{
- value: 1,
- name: '待提审',
- color: '#f56c6c'
- }, {
- value: 2,
- name: '审核中',
- color: '#f56c6c'
- }, {
- value: 3,
- name: '审核通过',
- color: '#3c9cff'
- }, {
- value: 4,
- name: '未通过',
- color: '#999999'
- }, {
- value: 5,
- name: '已取消',
- color: '#999999'
- }],
- statusExpense2: [{
- value: 1,
- name: '待提审',
- color: '#f56c6c'
- }, {
- value: 2,
- name: '待审核',
- color: '#f56c6c'
- }, {
- value: 3,
- name: '审核通过',
- color: '#3c9cff'
- }, {
- value: 4,
- name: '未通过',
- color: '#999999'
- }, {
- value: 5,
- name: '已取消',
- color: '#999999'
- }],
+ // 申请状态
+ statusExpense: [
+ { value: 1, name: '待审核', color: '#f56c6c' },
+ { value: 2, name: '审核中', color: '#f56c6c' },
+ { value: 3, name: '已通过', color: '#3c9cff' },
+ { value: 4, name: '未通过', color: '#999999' },
+ { value: 5, name: '已取消', color: '#999999' }
+ ],
+ // 审核状态
+ statusExpense2: [
+ { value: 1, name: '未开始', color: '#f56c6c' },
+ { value: 2, name: '待审核', color: '#f56c6c' },
+ { value: 3, name: '审核通过', color: '#3c9cff' },
+ { value: 4, name: '未通过', color: '#999999' },
+ { value: 5, name: '已取消', color: '#999999' }
+ ],
//清洁任务
task_hygienes: [{
value: 1,
@@ -98,28 +72,22 @@ const data = {
name: '未完成',
color: '#999999'
}],
- // 升职申请
- promotion_status: [{
- value: 1,
- name: '待提交',
- color: '#f56c6c'
- }, {
- value: 2,
- name: '待推荐',
- color: '#f56c6c'
- }, {
- value: 3,
- name: '审核中',
- color: '#f56c6c'
- }, {
- value: 4,
- name: '审核通过',
- color: '#3c9cff'
- }, {
- value: 5,
- name: '不通过',
- color: '#999999'
- }],
+ // 升职申请-申请人
+ promotion_status: [
+ { value: 1, name: '待提交', color: '#f56c6c'},
+ { value: 2, name: '待推荐', color: '#f56c6c' },
+ { value: 3, name: '审核中', color: '#f56c6c' },
+ { value: 4, name: '已通过', color: '#3c9cff' },
+ { value: 5, name: '未通过', color: '#999999' }
+ ],
+ // 升职申请-推荐人
+ promotion_status: [
+ { value: 1, name: '待提交', color: '#f56c6c'},
+ { value: 2, name: '待推荐', color: '#f56c6c' },
+ { value: 3, name: '审核中', color: '#f56c6c' },
+ { value: 4, name: '已通过', color: '#3c9cff' },
+ { value: 5, name: '未通过', color: '#999999' }
+ ],
// 不卡申请
workflow_check: [
{