洋浦中学 工作台项目阶段代码提交

init
gongdi 4 years ago
parent f3a7ef10ce
commit 0053d851b2

@ -574,7 +574,13 @@
}
},
clickContent: function (item) {
let apply_id = item.data_infomation.apply_id;
let biz_code = item.biz_code;
let apply_id = "";
if(biz_code === "105001001"){
apply_id = item.data_infomation.run_id;
}else {
apply_id = item.data_infomation.apply_id;
}
if(!apply_id || apply_id === ""){
Modal.warning({
title:"数据有误,请联系管理员处理",
@ -583,7 +589,6 @@
})
return
}
let biz_code = item.biz_code;
switch (biz_code){
case "108001001":
this.infoTitle = "会议室审批";
@ -605,6 +610,11 @@
this.moduleComponent = ()=>import('../modulComponent/goodsReceiveApprove.vue');
this.moduleParam = item.data_infomation;
break;
case "105001001":
this.infoTitle = "请假审批";
this.moduleComponent = ()=>import('../modulComponent/leaveApprove.vue');
this.moduleParam = item.data_infomation;
break;
case 1:
break;
}

@ -54,5 +54,18 @@ const interConfig = {
isTestLogin:true,
},
//---------------考勤审批-----------------
//请假详情
'getLeaveApplyDetail':{
url:'/intellioa/attendance/attendanceRule/getApplyDetail',
method:'post',
isTestLogin:true,
},
//请假审批
'leaveCheck':{
url:'/intellioa/attendance/attendanceRule/check',
method:'post',
isTestLogin:true,
},
}
export default interConfig

@ -0,0 +1,289 @@
<template>
<a-spin :spinning="spinning">
<vue-scroll :ops="listScroll" class="leave-info-box-style" style="height:450px">
<div class="info-row-style">
<div class="info-left">申请人</div>
<div class="info-right">{{applyInfo.person_name}}</div>
</div>
<div class="info-row-style">
<div class="info-left">申请时间</div>
<div class="info-right">{{applyInfo.create_time}}</div>
</div>
<div class="info-row-style">
<div class="info-left">请假类型</div>
<div class="info-right">{{typeStr}}</div>
</div>
<div class="info-row-style">
<div class="info-left">开始时间</div>
<div class="info-right">
{{applyInfo.start_time}}
</div>
</div>
<div class="info-row-style">
<div class="info-left">结束时间</div>
<div class="info-right">
<div class="left-style">{{applyInfo.end_time}}</div>
<div class="right-style">
<div class="part-left">合计</div>
<div class="part-right">{{applyInfo.total_hours + '小时' + '('+applyInfo.total_days+'工作日'+')'}}</div>
</div>
</div>
</div>
<div class="info-row-style">
<div class="info-left">请假事由</div>
<div class="info-right">{{applyInfo.content}}</div>
</div>
<div class="info-row-style">
<div class="info-left">附件</div>
<div class="info-right">
<div v-if="fileList.length == 0"></div>
<div v-else>
<Uploader :type="1" :fileData="fileList" :canUpload="false" :option="{}" :multiple="false"></Uploader>
</div>
</div>
</div>
<a-divider>审批内容</a-divider>
<ApproveCom
:hasNext="hasNext"
:checkPersonList="checkPersonList"
:openCopyFlag="openCopyFlag"
:copyPersonType="copyPersonType"
:copyPersonList="copyPersonList"
@changeCheckPerson="changeCheckPerson"
@changeCopyPerson="changeCopyPerson"
@submit="submit"
/>
</vue-scroll>
</a-spin>
</template>
<script>
/*
* 请假审批
* */
import {Spin, Divider, Modal} from 'ant-design-vue';
import interConfig from './interConfig';
import ApproveCom from './approveCom.vue';
import Uploader from '../../../../../../../components/common/uploader/Upload.vue';
export default{
props: {
param: {
type: Object,
}
},
data(){
return {
applyInfo: {},
typeStr:"",//
fileList:[],
spinning: false,
listScroll: this.StaticParams.scrollOption,
hasNext: 0,//
checkPersonList: [],//
nextLevelId: "",//ID
openCopyFlag: 1,//
copyPersonType: 0,// 0-1-2-
copyPersonList: [],//
checkPersonId: "",//ID
checkPersonName: "",//
paramCopyList: [],//
options: "",//
}
},
mounted(){
this.getApplyInfo();
},
methods: {
getApplyInfo: function () {
let params = {
run_id: this.param.run_id,
level_check: 1,
need_next: 1,
person_id: this.BaseConfig.userInfo.person_id
}
this.spinning = true;
this.InterfaceConfig.callInterface([{
url: interConfig.getLeaveApplyDetail.url,
params: params,
method: interConfig.getLeaveApplyDetail.method,
isTestLogin: interConfig.getLeaveApplyDetail.isTestLogin
}], (result) => {
let res = result[0].data;
if (res.code === 2000) {
let dataBox = res.data;
if(dataBox.run){
this.applyInfo = dataBox.run;
this.fileList = JSON.parse(dataBox.run.attachment_json);
}
let typeId = dataBox.run.type_id;
this.typeStr = this.getTypeStr(typeId);
this.hasNext = dataBox.has_next;//
if (this.hasNext === 1 && dataBox.next_level) {
this.checkPersonList = dataBox.next_level.check_person_list;
this.nextLevelId = dataBox.next_level.level_id;
}
this.spinning = false;
} else {
this.spinning = false;
}
})
},
getTypeStr:function (typeId) {
console.log(typeId)
let str = "";
switch (typeId){
case 1:
str = "事假";
break;
case 2:
str = "病假";
break;
case 3:
str = "婚假";
break;
case 4:
str = "产假";
break;
case 5:
str = "丧假";
break;
case 6:
str = "陪护假";
break;
case 7:
str = "其他";
break;
}
return str;
},
changeCheckPerson: function (personId) {
let checkPerson = this.checkPersonList.filter((item) => {
return parseInt(item.person_id) === parseInt(personId);
})
this.checkPersonId = personId;
if (checkPerson.length > 0) {
this.checkPersonName = checkPerson[0].person_name;
}
},
changeCopyPerson: function (personArr) {
this.paramCopyList = personArr;
},
submit: function (res) {
let type = res.type;
this.options = res.options;
if (type === 1) {
if (this.hasNext === 1 && this.checkPersonId === "") {
Modal.warning({
title: "请选择审批人",
content: "",
centered: true
})
return
}
if (this.openCopyFlag === 1 && this.paramCopyList.length > 20) {
Modal.warning({
title: "请选择审批人",
content: "",
centered: true
})
return
}
} else if (type === -1) {
if (this.options === "") {
Modal.warning({
title: "请填写审批意见",
content: "",
centered: true
})
return
}
}
let submitParam = {
check_id: this.param.check_id,
status_id: type,
person_id: this.BaseConfig.userInfo.person_id_cookie,
check_opinion: this.options,
has_next: this.hasNext,
}
if (type === 1 && this.hasNext === 1) {
submitParam.next_level_id = this.nextLevelId;
submitParam.next_person_id = this.checkPersonId;
submitParam.next_person_name = this.checkPersonName;
}
if (this.copyPersonType === 1 && this.copyPersonList.length > 0) {
//
submitParam.copy_list = JSON.stringify(this.copyPersonList);
}
if (this.copyPersonType !== 1 && this.paramCopyList.length > 0) {
//
submitParam.copy_list = JSON.stringify(this.paramCopyList);
}
this.spinning = true;
this.InterfaceConfig.callInterface([{
url: interConfig.leaveCheck.url,
params: submitParam,
method: interConfig.leaveCheck.method,
isTestLogin: interConfig.leaveCheck.isTestLogin
}], (result) => {
let res = result[0].data;
if (res.code === 2000) {
Modal.success({
title: "审批成功",
content: "",
centered: true
})
this.$emit("updateModuleData")
this.spinning = false;
} else {
this.spinning = false;
}
})
}
},
components: {
ASpin: Spin,
ADivider: Divider,
ApproveCom,
Uploader
}
}
</script>
<style scoped lang="scss">
.leave-info-box-style {
width: 100%;
/*height: calc(100% - 50px) !important;*/
padding: 10px !important;
display: flex;
flex-direction: column;
.info-row-style {
width: 100%;
min-height: 2.5rem;
display: flex;
.info-left {
width: 20%;
text-align: right;
}
.info-right {
width: 80%;
text-align: left;
display: flex;
.left-style {
width: 50%;
text-align: left;
}
.right-style {
width: 50%;
text-align: left;
display: flex;
}
}
}
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE 10+ */
::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
}
</style>

@ -335,6 +335,9 @@
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
/deep/ label{
color:var(--moduleFontColor) !important;
}
.form-button-div{
/deep/ .ant-form-item-children{
display: flex;
@ -344,6 +347,9 @@
}
}
/deep/ label{
color:var(--moduleFontColor) !important;
}
/deep/ .ant-form-item-control {
position: relative;
.ant-form-item-children {
@ -353,6 +359,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color:var(--moduleFontColor) !important;
.upload-container-style {
.file-style {
.file-name-style {

@ -99,6 +99,9 @@
justify-content: flex-start;
.ant-checkbox-wrapper {
margin-left: 8px !important;
/deep/ span{
color:var(--moduleFontColor) !important;
}
}
}
}

@ -391,6 +391,9 @@
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
/deep/ label{
color:var(--moduleFontColor) !important;
}
.form-button-div {
/deep/ .ant-form-item-children {
display: flex;
@ -400,6 +403,9 @@
}
}
/deep/ label{
color:var(--moduleFontColor) !important;
}
/deep/ .ant-form-item-control {
position: relative;
.ant-form-item-children {
@ -409,6 +415,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color:var(--moduleFontColor) !important;
.upload-container-style {
.file-style {
.file-name-style {

@ -196,7 +196,7 @@
line-height: 20px;
margin-top: 10px;
text-align: center;
color: white;
color: #d3d6dd;
}
}
}

Loading…
Cancel
Save