Commit 6557b918 authored by Mac's avatar Mac

1

parent fb889a1f
......@@ -10,3 +10,83 @@ export function getTemplateList(data) {
});
}
/**
* 获取审批启用和停用
*/
export function setTemplate(data) {
return request({
url: '/WorkFlowManagement/SetTemplate',
method: 'post',
data
});
}
/**
*
*/
export function getDefaultCondition(data) {
return request({
url: '/WorkFlowManagement/GetDefaultCondition',
method: 'post',
data
});
}
/**
*
*/
export function getOtherConditionList(data) {
return request({
url: '/WorkFlowManagement/GetOtherConditionList',
method: 'post',
data
});
}
/**
*请假类型
*/
export function getAskForLeaveType(data) {
return request({
url: '/WorkFlowManagement/GetAskForLeaveType',
method: 'post',
data
});
}
/**
*条件审批保存
*/
export function setOtherCondition(data) {
return request({
url: '/WorkFlowManagement/SetOtherCondition',
method: 'post',
data
});
}
/**
*条件审批删除
*/
export function delOtherCondition(data) {
return request({
url: '/WorkFlowManagement/DelOtherCondition',
method: 'post',
data
});
}
/**
*审核的保存
*/
export function setDefaultCondition(data) {
return request({
url: '/WorkFlowManagement/SetDefaultCondition',
method: 'post',
data
});
}
......@@ -76,3 +76,14 @@ export function BatchResetUserPassword(data)
data
})
}
/**
* 获取部门Id
*/
export function getEmployeeAddrBook(data)
{
return request({
url: '/User/GetEmployeeAddrBook',
method: 'post',
data
})
}
<template>
<div>
<div class="query-box appProval">
<div class="appProval">
<div class="query-box ">
<ul>
<li><span><em>所属公司</em>
<li><span><em>所属校区</em>
<el-select :disabled="IsParentCompany!=1" v-model="QueryMsg.BranchId" @change="getList()" >
<el-option
v-for="item in companyList"
......@@ -12,47 +12,47 @@
</el-option>
</el-select>
</span></li>
<li>
<!-- <input type="button" class="hollowFixedBtn" value="查询" @click="getList()"/> -->
</li>
<li></li>
</ul>
</div>
<div class="flexOne">
<div class="approval_title">出勤休假(4)</div>
<div class="approval_list" v-loading='loading'>
<div class="approval_item" v-for="(item,index) in dataList">
<img :src="item.Icon" width="86" style="float: left;margin: 17px 20px 0 0;" />
<div class="approval_desDiv">
<p class="tit">{{item.Name}}</p>
<div class="row">
<div class="approval_item col shadow-1" v-for="(item,index) in dataList" :style="{'margin-right':dataList.length!=index+1?'40px':'0' }">
<img :src="item.Icon" width="86" style="" />
<span class="tit">{{item.Name}}</span>
<p class="updateP">全部可见</p>
<div style="width: 36px;height: 2px;background: #E2E2E2;margin: 8px;"></div>
<p class="des" v-html="item.describe"></p>
<p class="des" v-html="item.describe2"></p>
<p class="tim">{{item.UpdateTime}}</p>
<div class="row" style="margin-top: 50px;justify-content: space-around;width: 100%" v-if='item.Status==1'>
<q-btn color="primary" label="审批流程" style="padding: 0 20px" @click="workflow(item.Id)"></q-btn>
<q-btn outline style="color: #2961FE;padding: 0 10px" label="停用" @click="updateTempStatus(item.Id,item.TemplateType,item.Status)"></q-btn>
</div>
<div class="approval_fwDiv">
<p>可见范围</p>
<p class="updateP">全部可见</p>
<div class="row" style="margin-top: 50px;justify-content: center;" v-if='item.Status==2'>
<q-btn outline style="color: #2961FE;padding: 0 10px" label="启用" @click="updateTempStatus(item.Id,item.TemplateType,item.Status)"></q-btn>
</div>
<div class="approval_doDiv">
<p>
<button v-if='item.Status==1' class="normalBtn" @click="goUrl('ApprovalProcess',item.Id)">审批流程</button> &nbsp;&nbsp;
<button v-if='item.Status==1' @click="updateTempStatus(item.Id,item.TemplateType,item.Status)" class="hollowFixedBtn">{{$t('fnc.tingyong')}}</button>
<button v-if='item.Status==2' @click="updateTempStatus(item.Id,item.TemplateType,item.Status)" class="hollowFixedBtn">{{$t('fnc.qiyong')}}</button>
</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {
getTemplateList
getTemplateList,
setTemplate
} from '../../api/administration/administration';
import {
getSchoolDropdown //校区下拉
} from '../../api/school/index'
export default {
data() {
return {
loading:true,
......@@ -63,30 +63,33 @@
//返回数据
dataList: [],
companyList: [],
IsParentCompany:2
IsParentCompany:2,
drawer:false,
SpId:0
}
},
methods: {
workflow(Id){
this.$router.push({
path: '/administration/ApprovalProcess?Id='+Id+'&Bid='+this.QueryMsg.BranchId
});
},
getList() {
let describe = ['适用于请假申请,<br/>精确扣减出勤时间,并同步考勤报表', '适用于出差申请,<br/>精确汇总至考勤报表', '适用于外出申请,<br/>精确汇总至考勤报表', '当员工考勤出现缺卡时,可发起补卡审批,<br/>审批通过后考勤报表中的缺卡记录改为正常']
// this.apipost('WorkFlow_get_GetTemplateList', {BranchId:this.QueryMsg.BranchId}, res => {
// if(res.data.resultCode == 1) {
// this.loading=false;
// this.dataList = res.data.data[0].List;
// this.dataList.forEach((item, index) => {
// item.describe = describe[index]
// })
//
// }
// }, err => {})
let describe = ['适用于请假申请', '适用于出差申请', '适用于外出申请', '当员工考勤出现缺卡时,可发起补卡审批']
let describe2 = ['精确扣减出勤时间,并同步考勤报表', '精确汇总至考勤报表', '精确汇总至考勤报表', '审批通过后考勤报表中的缺卡记录改为正常']
getTemplateList({BranchId:this.QueryMsg.BranchId}).then(res => {
if(res.Code == 1) {
this.loading=false;
this.dataList = res.Data[0].List;
this.dataList.forEach((item, index) => {
item.describe = describe[index]
item.describe2 = describe2[index]
})
}
}).catch(() => {
})
},
getCompanyList() {
......@@ -114,19 +117,21 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('WorkFlow_post_SetTemplate', {
setTemplate({
Id: id,
TemplateType: type,
Status: 2,
BranchId:this.QueryMsg.BranchId
}, res => {
if(res.data.resultCode == 1) {
}).then(res => {
if(res.Code == 1) {
this.$message.success("已经停用")
this.getList()
} else {
}else {
this.$message.error("操作失败")
}
}, err => {})
}).catch(() => {
})
}).catch(() => {
this.$message.info('已取消停用')
});
......@@ -137,19 +142,21 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('WorkFlow_post_SetTemplate', {
setTemplate({
Id: id,
TemplateType: type,
Status: 1,
BranchId:this.QueryMsg.BranchId
}, res => {
if(res.data.resultCode == 1) {
}).then(res => {
if(res.Code == 1) {
this.$message.success("启用成功")
this.getList()
} else {
this.$message.error("操作失败")
}
}, err => {})
}).catch(() => {
})
}).catch(() => {
this.$message.info('已取消启用')
......@@ -183,7 +190,11 @@
border-left: 3px solid #E95252;
margin: 30px 0;
}
.appProval{
background: white;
height: 90%;
padding: 0 20px;
}
.appProval .el-input__inner{
height: 34px!important;
}
......@@ -197,58 +208,58 @@
}
.approval_item {
height: 160px;
padding: 20px;
background: #fff;
overflow: auto;
border-radius: 8px;
margin-bottom: 10px;
background: white;
/*border: 1px solid rgba(2, 44, 66, 0.15);*/
border-radius: 4px;
padding: 40px;
display: flex;
flex-direction: column;
align-items: center;
}
.approval_item p.tit {
font-size: 18px;
color: #333;
.approval_item .tit {
font-size: 32px;
color: #111111;
font-weight: bold;
margin-top: 30px;
}
.approval_item p.des {
.approval_item .des {
font-size: 14px;
color: #666;
color: #999999;
line-height: 22px;
}
.approval_item p.tim {
font-size: 14px;
color: #999;
.approval_item .tim {
font-size: 12px;
color: #A6A6A6;
line-height: 22px;
}
.approval_fwDiv {
float: left;
width: 520px;
height: 120px;
padding: 50px 0;
border-right: 1px dotted #DCDFE6;
}
.approval_fwDiv>p {
text-align: center;
font-size: 16px;
color: #333;
}
.approval_fwDiv>p.updateP {
.approval_item .updateP {
font-size: 14px;
color: #666;
color: #999999;
line-height: 24px;
}
.approval_doDiv {
float: left;
width: 500px;
.appProval .drawerTop {
width: 100%;
height: 50px;
display: flex;
flex-direction: row;
justify-content: space-between;
background-color: #F0F5FB;
padding: 5px 10px;
align-items: center;
}
.approval_doDiv>p {
text-align: center;
line-height: 120px;
.el-drawer__body {
overflow: auto;
}
/*2.隐藏滚动条,太丑了*/
.el-drawer__container ::-webkit-scrollbar{
display: none;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -316,6 +316,21 @@ const routes = [{
component: () =>
import("pages/administration/Approval.vue")
},
{
path: "/administration/ApprovalProcess", //审批流程详情
component: () =>
import("pages/administration/ApprovalProcess.vue")
},
{
path: "/administration/processDesign", //分条件审批
component: () =>
import("pages/administration/processDesign.vue")
},
{
path: "/administration/updateProcessDesign", //分条件审批
component: () =>
import("pages/administration/updateProcessDesign.vue")
},
{
path: "/test", //API测试
component: () =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment