From 8c84adf2d3cd83d0c5f8ee77d3fb615ae9a02ba7 Mon Sep 17 00:00:00 2001
From: Admin <978517621@qq.com>
Date: Tue, 11 Oct 2022 17:43:58 +0800
Subject: [PATCH] Default Changelist
---
src/views/specialWorkSystem/workTicket/allApplys/index.vue | 100 +++++++++++++++++++------------------------------
1 files changed, 39 insertions(+), 61 deletions(-)
diff --git a/src/views/specialWorkSystem/workTicket/allApplys/index.vue b/src/views/specialWorkSystem/workTicket/allApplys/index.vue
index a720953..7c5661e 100644
--- a/src/views/specialWorkSystem/workTicket/allApplys/index.vue
+++ b/src/views/specialWorkSystem/workTicket/allApplys/index.vue
@@ -23,13 +23,17 @@
<el-cascader v-model="searchDep" :options="departmentList" :props="casProps" :show-all-levels="false"/>
</div>
</el-col>
- <el-col :span="5" style="display:flex;align-items: center;">
+ <el-col :span="8" style="display:flex;align-items: center;">
<span style="white-space: nowrap;margin-left: 20px">申请时间:</span>
<div class="grid-content topInfo">
<el-date-picker
v-model="searchDate"
- type="date"
- format="YYYY-MM-DD" value-format="YYYY-MM-DD"
+ type="daterange"
+ unlink-panels
+ range-separator="至"
+ start-placeholder="开始日期"
+ end-placeholder="结束日期"
+ format="YYYY-MM-DD" value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</el-col>
@@ -63,8 +67,7 @@
<template #default="scope">
<el-button link type="primary" size="small" :icon="View" @click="viewRecord(scope.row)">查看</el-button>
<el-button link type="success" size="small" :icon="Finished" @click="viewStatus(scope.row)">进度</el-button>
- <el-button link type="warning" size="small" :icon="Delete" @click="deleteRecordBtn(scope.row)">取消</el-button>
- <el-button link type="primary" size="small" :icon="Download" @click="downLoadBtn(scope.row)">导出</el-button>
+ <el-button :disabled="scope.row.status == 7 ? false : true" link type="primary" size="small" :icon="Download" @click="downLoadBtn(scope.row)">导出作业票</el-button>
</template>
</el-table-column>
</el-table>
@@ -106,7 +109,10 @@
审批结果:<span>{{ item.approvalResultDesc }}</span>
</div>
<div class="text">
- 审批类型:<span>{{ item.typeDesc }}</span>
+ 审批层级:<span>{{ item.typeDesc }}</span>
+ </div>
+ <div class="text" v-if="item.auditTypeDesc">
+ 审批类型:<span>{{ item.auditTypeDesc }}</span>
</div>
<div class="text" v-show="item.startApprovalTime != null">
开始时间:<span>{{ item.startApprovalTime }}</span>
@@ -155,15 +161,6 @@
</div>
</div>
</div>
- </el-dialog>
- <el-dialog v-model="deleteDialog" title="提示" width="30%" center>
- <span>您确定要取消该条申请吗?</span>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="deleteDialog = false" size="default">取消</el-button>
- <el-button type="primary" @click="conFirmDelete" size="default">确认</el-button>
- </span>
- </template>
</el-dialog>
<el-dialog v-model="downLoadDialog" title="提示" width="30%" center>
<span>您确定要导出该条记录吗?</span>
@@ -246,9 +243,9 @@
deleteId: null | number;
downLoadId: null | number;
downLoadName: string;
- searchWord: string;
+ searchWord: number | null;
searchDep: number | null;
- searchDate: string;
+ searchDate: Array<any>,
totalSize1: number;
activeName: string;
addRecord: {};
@@ -292,9 +289,9 @@
departmentList: [],
departmentRecursionList: [],
chosenIndex: null,
- searchWord: '',
+ searchWord: null,
searchDep: null,
- searchDate: '',
+ searchDate: [],
applyData: [],
workTimeList: [],
multipleSelection: [],
@@ -345,7 +342,7 @@
// 填写表单
const toApply = () => {
router.push({
- path: 'workApply'
+ path: 'apply'
});
};
@@ -357,7 +354,7 @@
let res = await teamManageApi().getAllDepartment();
if (res.data.code === '200') {
state.departmentList = JSON.parse(JSON.stringify(res.data.data))
- recursion(state.departmentList);
+ // recursion(state.departmentList);
} else {
ElMessage({
type: 'warning',
@@ -366,21 +363,23 @@
}
};
- const recursion = (value: any) => {
- for (let i of value) {
- if (i.children.length !== 0) {
- state.departmentRecursionList.push(i);
- recursion(i.children);
- } else {
- state.departmentRecursionList.push(i);
- }
- }
- };
+ // const recursion = (value: any) => {
+ // for (let i of value) {
+ // if (i.children.length !== 0) {
+ // state.departmentRecursionList.push(i);
+ // recursion(i.children);
+ // } else {
+ // state.departmentRecursionList.push(i);
+ // }
+ // }
+ // };
- // 分页获取工作时间组列表
+ // 分页获取列表
const getListByPage = async () => {
- const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord } };
- let res = await workApplyApi().getApplyListPage(data);
+ const dateRange = JSON.parse(JSON.stringify(state.searchDate))
+ if(dateRange[1]){dateRange[1] = dateRange[1].replace('00:00:00','23:59:59')}
+ const data = { pageSize: state.pageSize1, pageIndex: state.pageIndex1, searchParams: { workType: state.searchWord, applyDepId: state.searchDep,applyStartTime: dateRange[0],applyEndTime: dateRange[1]} };
+ let res = await workApplyApi().getApplyList(data);
if (res.data.code === '200') {
state.applyData = JSON.parse(JSON.stringify(res.data.data));
state.applyData = state.applyData.map((item) => {
@@ -419,7 +418,7 @@
// 关键词查询记录
const searchRecord = async () => {
- if (state.searchWord == ''&& state.searchDep == null && state.searchDate == '') {
+ if (state.searchWord == null && state.searchDep == null && state.searchDate == '') {
ElMessage({
type: 'warning',
message: '请输入查询关键词'
@@ -430,14 +429,15 @@
};
// 重置搜索
const clearSearch = async () => {
- state.searchWord = '';
+ state.searchWord = null;
+ state.searchDep = null;
+ state.searchDate = ''
getListByPage();
};
// 查看进度
const viewStatus = (row) => {
getStatus({ workApplyId: row.workApplyId });
- state.dialogStatus = true;
};
// 查询进度方法
@@ -446,6 +446,7 @@
if (res.data.code === '200') {
state.approveInfo = JSON.parse(JSON.stringify(res.data.data));
state.approveInfo.operators = Array.from(state.approveInfo.operators, ({ operatorUname }) => operatorUname);
+ state.dialogStatus = true;
} else {
ElMessage({
type: 'warning',
@@ -457,28 +458,6 @@
const deleteRecordBtn = (row) => {
state.deleteId = row.workApplyId;
state.deleteDialog = true;
- };
-
- // 取消申请方法
- const deleteRecord = async (data: any) => {
- let res = await workApplyApi().cancelApply(data);
- if (res.data.code === '200') {
- ElMessage({
- type: 'success',
- message: '删除成功!'
- });
- getListByPage();
- } else {
- ElMessage({
- type: 'warning',
- message: res.data.msg
- });
- }
- };
-
- const conFirmDelete = () => {
- deleteRecord({ workApplyId: state.deleteId });
- state.deleteDialog = false;
};
// 导出图表
@@ -504,7 +483,7 @@
} else {
ElMessage({
type: 'warning',
- message: res.data.msg
+ message: '导出失败'
});
}
})
@@ -596,7 +575,6 @@
viewStatus,
deleteRecordBtn,
downLoadBtn,
- conFirmDelete,
conFirmDownLoad,
getListByPage,
handleSizeChange1,
--
Gitblit v1.9.2