|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="business-item-container-style">
|
|
|
|
|
<div ref="businessItem" class="business-item-container-style">
|
|
|
|
|
<div class="create-time-style">{{timeHandle(business.create_time)}}</div>
|
|
|
|
|
<div class="system-title-style">
|
|
|
|
|
<div class="icon-container-style">
|
|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="type.id !== 'sendToMe' && type.id !== 'announcement' && (type.id !== 'notice' || (type.id === 'notice' &&
|
|
|
|
|
parseInt(business.data_infomation.notice_receipt) === 1))" class="btn-style">
|
|
|
|
|
<span class="btn-one-style" @click.stop="">
|
|
|
|
|
<span class="btn-one-style" @click.stop="automaticHandle">
|
|
|
|
|
{{getBtnName()}}
|
|
|
|
|
</span>
|
|
|
|
|
<span v-if="type.id === 'approval'" style="color: red;" @click.stop="noPass">
|
|
|
|
@ -32,12 +32,37 @@
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-modal
|
|
|
|
|
:title="modalTitle"
|
|
|
|
|
:visible="visible"
|
|
|
|
|
centered
|
|
|
|
|
cancelText="取消"
|
|
|
|
|
okText="确定"
|
|
|
|
|
:closable="false"
|
|
|
|
|
:destroyOnClose="true"
|
|
|
|
|
@cancel="modalCancel"
|
|
|
|
|
@ok="modalOk"
|
|
|
|
|
>
|
|
|
|
|
<vue-scroll :ops="listScroll" style="height:200px">
|
|
|
|
|
<ApproveCom
|
|
|
|
|
:hasNext="hasNext"
|
|
|
|
|
ref="approveCom"
|
|
|
|
|
:checkPersonList="checkPersonList"
|
|
|
|
|
:openCopyFlag="openCopyFlag"
|
|
|
|
|
:copyPersonType="copyPersonType"
|
|
|
|
|
:copyPersonList="copyPersonList"
|
|
|
|
|
@changeCheckPerson="changeCheckPerson"
|
|
|
|
|
@changeCopyPerson="changeCopyPerson"
|
|
|
|
|
/>
|
|
|
|
|
</vue-scroll>
|
|
|
|
|
</a-modal>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import interConfig from '../modulComponent/interConfig';
|
|
|
|
|
import {Modal} from 'ant-design-vue';
|
|
|
|
|
import ApproveCom from '../modulComponent/approveCom.vue';
|
|
|
|
|
export default {
|
|
|
|
|
name: "BusinessItem",
|
|
|
|
|
props: {
|
|
|
|
@ -53,7 +78,19 @@
|
|
|
|
|
data: function () {
|
|
|
|
|
return {
|
|
|
|
|
type: this.typeData,
|
|
|
|
|
business: this.businessData
|
|
|
|
|
business: this.businessData,
|
|
|
|
|
listScroll: this.StaticParams.scrollOption,
|
|
|
|
|
visible: false,
|
|
|
|
|
modalTitle: "",
|
|
|
|
|
openCopyFlag: 0,//是否开启抄送 默认关闭
|
|
|
|
|
copyPersonType: -1,//抄送方式 (0-自选,1-申请部门领导,2-指定)
|
|
|
|
|
copyPersonList: [],//抄送人
|
|
|
|
|
hasNext: 0,//是否存在下一审批节点 默认不存在
|
|
|
|
|
checkPersonList: [],//审批人
|
|
|
|
|
nextLevelId: "",//下一审批节点ID
|
|
|
|
|
checkPersonId: "",//审核人ID
|
|
|
|
|
checkPersonName: "",//审核人姓名
|
|
|
|
|
paramCopyList: [],//抄送人
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -113,9 +150,156 @@
|
|
|
|
|
showBusinessDetail: function () {
|
|
|
|
|
this.$emit("clickContent", this.businessData)
|
|
|
|
|
},
|
|
|
|
|
//自动办理--通过
|
|
|
|
|
automaticHandle: function () {
|
|
|
|
|
let bizCode = this.businessData.biz_code;
|
|
|
|
|
let infoBox = this.businessData.data_infomation;
|
|
|
|
|
switch (bizCode) {
|
|
|
|
|
case "107001001":
|
|
|
|
|
let callBack = this.getCarApplyInfo(infoBox);
|
|
|
|
|
if (callBack) {
|
|
|
|
|
callBack.then((res) => {
|
|
|
|
|
let soflowInfo = res.soFlowInfo;//下一节点信息
|
|
|
|
|
//当前节点
|
|
|
|
|
if (soflowInfo.current_level) {
|
|
|
|
|
this.openCopyFlag = soflowInfo.current_level.open_copy_flag;//是否开启抄送 1:开始 0:关闭
|
|
|
|
|
if (this.openCopyFlag === 1) {
|
|
|
|
|
//抄送方式 (0-自选,1-申请部门领导,2-指定)
|
|
|
|
|
this.copyPersonType = soflowInfo.current_level.copy_person_type;
|
|
|
|
|
this.copyPersonList = soflowInfo.current_level.copy_person_list;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//是否存在下一审批节点 1:存在 2:不存在
|
|
|
|
|
this.hasNext = soflowInfo.has_next;
|
|
|
|
|
if (this.hasNext === 1) {
|
|
|
|
|
this.checkPersonList = soflowInfo.next_level.check_person_list;
|
|
|
|
|
this.nextLevelId = soflowInfo.next_level.level_id;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* visible为true的前提条件
|
|
|
|
|
* 1、当前节点 开启抄送 并且抄送方式为自选或者指定
|
|
|
|
|
* 2、存在下一审批节点
|
|
|
|
|
* 3、1和2是“或者”关系
|
|
|
|
|
*/
|
|
|
|
|
if ((this.openCopyFlag === 1 && (this.copyPersonType === 0 || this.copyPersonType === 2)) || this.hasNext === 1) {
|
|
|
|
|
this.modalTitle = "审批节点";
|
|
|
|
|
this.visible = true;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//直接处理
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//---------------------业务接口调用-----------------------
|
|
|
|
|
//1、获取公车申请详情
|
|
|
|
|
getCarApplyInfo: function (info) {
|
|
|
|
|
let _this = this;
|
|
|
|
|
let p = new Promise(function (resolve, reject) {
|
|
|
|
|
let params = {
|
|
|
|
|
apply_id: info.apply_id,
|
|
|
|
|
run_type: 1,
|
|
|
|
|
person_id: _this.BaseConfig.userInfo.person_id
|
|
|
|
|
}
|
|
|
|
|
_this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: interConfig.getCarApplyInfo.url,
|
|
|
|
|
params: params,
|
|
|
|
|
method: interConfig.getCarApplyInfo.method,
|
|
|
|
|
isTestLogin: interConfig.getCarApplyInfo.isTestLogin
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let res = result[0].data;
|
|
|
|
|
if (res.code === 2000) {
|
|
|
|
|
resolve(res.data);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
return p;
|
|
|
|
|
},
|
|
|
|
|
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;
|
|
|
|
|
},
|
|
|
|
|
modalCancel: function () {
|
|
|
|
|
this.visible = false;
|
|
|
|
|
},
|
|
|
|
|
modalOk: function () {
|
|
|
|
|
let bizCode = this.businessData.biz_code;
|
|
|
|
|
let infoBox = this.businessData.data_infomation;
|
|
|
|
|
switch (bizCode) {
|
|
|
|
|
case "107001001":
|
|
|
|
|
//用车审批
|
|
|
|
|
if (this.hasNext === 1 && this.checkPersonId === "") {
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: "请选择审批人",
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
let type = 1;
|
|
|
|
|
let options = this.$refs.approveCom.options;
|
|
|
|
|
let submitParam = {
|
|
|
|
|
apply_id: infoBox.apply_id,
|
|
|
|
|
check_id: infoBox.check_id,
|
|
|
|
|
status_id: type,
|
|
|
|
|
person_id: this.BaseConfig.userInfo.person_id_cookie,
|
|
|
|
|
check_opinion: 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.InterfaceConfig.callInterface([{
|
|
|
|
|
url: interConfig.submitCarCheck.url,
|
|
|
|
|
params: submitParam,
|
|
|
|
|
method: interConfig.submitCarCheck.method,
|
|
|
|
|
isTestLogin: interConfig.submitCarCheck.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;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
this.visible = false;
|
|
|
|
|
},
|
|
|
|
|
//自动办理--未通过
|
|
|
|
|
noPass: function () {
|
|
|
|
|
console.log(this.typeData)
|
|
|
|
|
console.log(this.businessData)
|
|
|
|
|
let bizCode = this.businessData.biz_code;
|
|
|
|
|
let param = {};//提交参数
|
|
|
|
|
switch (bizCode) {
|
|
|
|
@ -127,8 +311,8 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//请假审批
|
|
|
|
|
checkLeave:function (info) {
|
|
|
|
|
this.getInfo(info.run_id).then((result)=>{
|
|
|
|
|
checkLeave: function (info) {
|
|
|
|
|
this.getInfo(info.run_id).then((result) => {
|
|
|
|
|
let submitParam = {
|
|
|
|
|
check_id: info.check_id,
|
|
|
|
|
status_id: -1,
|
|
|
|
@ -150,14 +334,13 @@
|
|
|
|
|
content: "",
|
|
|
|
|
centered: true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getInfo:function (runId) {
|
|
|
|
|
getInfo: function (runId) {
|
|
|
|
|
var _this = this;
|
|
|
|
|
var p = new Promise((resolve,reject)=>{
|
|
|
|
|
var p = new Promise((resolve, reject) => {
|
|
|
|
|
let params = {
|
|
|
|
|
run_id: runId,
|
|
|
|
|
level_check: 1,
|
|
|
|
@ -186,6 +369,10 @@
|
|
|
|
|
businessData: function (newData) {
|
|
|
|
|
this.business = newData;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
AModal: Modal,
|
|
|
|
|
ApproveCom
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|