607 lines
18 KiB
Vue
607 lines
18 KiB
Vue
<template>
|
|
<div class="qbfz-step6">
|
|
<ProcessHeader toggle>
|
|
<template slot="proName">企标废止流程</template>
|
|
<template slot="proNode">审定责任人审核</template>
|
|
</ProcessHeader>
|
|
<div class="headerTabs">
|
|
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
|
|
<div class="headerTabsItem" :class="active === '3' ? 'active' : ''" @click="handleTabs('3')">审批历史</div>
|
|
</div>
|
|
<process-title>
|
|
<template slot="title">基础信息</template>
|
|
</process-title>
|
|
<div class="content" v-show="active === '1'">
|
|
<div style="flex: auto; overflow: auto">
|
|
<el-form
|
|
ref="qbfsForm"
|
|
:model="qbfsForm"
|
|
:rules="formRules"
|
|
class="label-input-form prc-content-border"
|
|
label-width="150px"
|
|
>
|
|
<div v-if="foldFormFlag">
|
|
<el-row :gutter="24">
|
|
<el-col :span="12">
|
|
<el-form-item label="企标编号" prop="standCode" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.standCode"
|
|
placeholder="请输入企标编号"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="中文名称" prop="standName" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.standName"
|
|
placeholder="请输入中文名称"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="企标类别" prop="entCategory" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.entCategory"
|
|
placeholder="请输入企标类别"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="代替企标编号" prop="replaceNumber" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.replaceNumber"
|
|
placeholder="请输入代替企标编号"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="废止理由" prop="abolishCause" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
type="textarea"
|
|
v-model="qbfsForm.abolishCause"
|
|
placeholder="请输入废止理由"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-form-item label="英文名称" prop="enName" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.enName"
|
|
placeholder="请输入英文名称"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="被代替企标编号" prop="replacedNumber" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.replacedNumber"
|
|
placeholder="请输入被代替企标编号"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="发布日期" prop="releaseDate" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.releaseDate"
|
|
placeholder="请输入发布日期"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="实施日期" prop="implementDate" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
readonly
|
|
v-model="qbfsForm.implementDate"
|
|
placeholder="请输入实施日期"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="下一步状态" prop="nextStatus" class="add-form-item ">
|
|
<el-select v-model="qbfsForm.nextStatus" disabled placeholder="请选择下一步状态">
|
|
<el-option
|
|
v-for="item in associationOptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</el-form>
|
|
<el-button style="width: 100%" :icon="foldFormFlag ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
|
|
@click="foldForm">{{ foldFormFlag ? "隐藏基础信息" : "展开基础信息" }}
|
|
</el-button>
|
|
<process-title>
|
|
<template slot="title">会签信息</template>
|
|
</process-title>
|
|
<el-table
|
|
:data="dataList"
|
|
border
|
|
height="52%"
|
|
style="width: 100%;"
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}">
|
|
<el-table-column
|
|
type="selection"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="opinion"
|
|
align="center"
|
|
label="会签意见">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="people"
|
|
align="center"
|
|
label="会签人">
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div>
|
|
<el-collapse accordion>
|
|
<el-collapse-item title="审批意见">
|
|
<div style="margin: 10px 0;">
|
|
<el-input
|
|
type="textarea"
|
|
:rows="3"
|
|
resize="none"
|
|
placeholder="请输入意见"
|
|
v-model="commentText">
|
|
</el-input>
|
|
</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
</div>
|
|
</div>
|
|
<div class="content" v-show="active === '3'">
|
|
<div class="flow-list">
|
|
<el-table
|
|
height="100%"
|
|
ref="selection"
|
|
:data="detailData"
|
|
tooltip-effect="dark"
|
|
style="width: 100%"
|
|
border
|
|
row-key="id"
|
|
:no-data-text="listNoDataText"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
|
|
>
|
|
<el-table-column
|
|
type="selection"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="name"
|
|
label="任务步骤"
|
|
align="center"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="assignee"
|
|
label="任务受理人"
|
|
align="center"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="createTime"
|
|
label="创建时间"
|
|
sortable="custom"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format("YYYY-MM-DD") : "" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="endTime"
|
|
label="完成时间"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format("YYYY-MM-DD") : "" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="comment"
|
|
label="流程信息"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.commentText }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="completeFlag"
|
|
label="状态"
|
|
align="center">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.endTime ? "已完成" : "未完成" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<loading :loading="loading">流程列表加载中</loading>
|
|
</div>
|
|
</div>
|
|
<ProcessFooter
|
|
show-transfer
|
|
show-submit
|
|
show-back
|
|
:transfer-loading="isTransfer"
|
|
:submitLoading="isSubmit"
|
|
:saveLoading="saveLoading"
|
|
:approval="true"
|
|
@back="beforeBack"
|
|
@transfer="handleTransfer"
|
|
@submit="handleSubmit"
|
|
>
|
|
</ProcessFooter>
|
|
<!-- 福田全公司选人解决方案 -->
|
|
<Role-tree
|
|
check-box
|
|
:is-title="drawerTitle"
|
|
:is-visible.sync="drawerModal"
|
|
@checkedRole="checkedRole"
|
|
:nodeList="nodeList"
|
|
></Role-tree>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from "../../components/ProcessHeader";
|
|
import ProcessFooter from "../../components/ProcessFooter";
|
|
import ProcessTitle from "../../components/ProcessTitle";
|
|
import { changeAssigneeNew, inboundLiaisonDetail, saveTaskFirst } from "api/process";
|
|
|
|
export default {
|
|
name: "qbfzStep6",
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
data() {
|
|
return {
|
|
active: "1",
|
|
isTransfer: false,
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
drawerModal: false,
|
|
drawerTitle: "",
|
|
nodeList: [],
|
|
fileList: [],
|
|
commentText: "",
|
|
dataList: [],
|
|
detailData: [],
|
|
loading: false,
|
|
foldFormFlag: true,
|
|
qbfsForm: {
|
|
entNumber: "",
|
|
cnName: "",
|
|
enName: "",
|
|
entCategory: "",
|
|
replaceNumber: "",
|
|
replacedNumber: "",
|
|
releaseDate: "",
|
|
implementDate: "",
|
|
reviewDate: "",
|
|
nextStatus: ""
|
|
},
|
|
formRules: {
|
|
nextStatus: [
|
|
{ required: true, message: "请选择下一步状态", trigger: "change" }
|
|
]
|
|
},
|
|
associationOptions: [{
|
|
value: "修订",
|
|
label: "修订"
|
|
}, {
|
|
value: "废止",
|
|
label: "废止"
|
|
}, {
|
|
value: "有效",
|
|
label: "有效"
|
|
}]
|
|
};
|
|
},
|
|
mounted() {
|
|
this.processTable();
|
|
this.getData();
|
|
},
|
|
methods: {
|
|
processTable() {
|
|
this.$http.get("lawss/activiti/get_list_by_instance", {
|
|
prcNum: this.$route.query.prcNum,
|
|
sortWord: this.shunxu ? this.paixu : "",
|
|
shunxu: this.shunxu
|
|
}, {
|
|
loading: "loading",
|
|
_this: this
|
|
}, res => {
|
|
this.detailData = res;
|
|
}, e => {
|
|
});
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId
|
|
}).then(res => {
|
|
if (res) {
|
|
const processForm = JSON.parse(res.mesg);
|
|
this.getFormFieldList(processForm);
|
|
}
|
|
}).catch(e => {
|
|
});
|
|
});
|
|
},
|
|
/**
|
|
* @description: 动态表单读取
|
|
*/
|
|
getFormFieldList(item) {
|
|
console.log(item);
|
|
this.$nextTick(() => {
|
|
this.qbfsForm = JSON.parse(JSON.stringify(item));
|
|
let res = item.res ? item.res.substring(1, item.res.lastIndexOf("]")) : "";
|
|
res = res.split(",");
|
|
this.dataList = [];
|
|
res.forEach(item => {
|
|
this.dataList.push({
|
|
opinion: item.split("-")[1],
|
|
people: item.split("-")[0]
|
|
});
|
|
});
|
|
});
|
|
},
|
|
//流程驳回
|
|
beforeBack(){
|
|
if(!this.commentText){
|
|
this.$message.warning('请填写审批意见')
|
|
}else{
|
|
this.isSubmit = true;
|
|
this.qbfsForm.commentText = this.commentText;
|
|
this.qbfsForm.sdFlag = '1'
|
|
this.qbfsForm.dataList = this.dataList;
|
|
let json = JSON.stringify(this.qbfsForm);
|
|
this.$http.post("lawss/activiti/completeTask", {
|
|
taskIds: this.$route.query.taskIds,
|
|
userId: this.$store.getters.userInfo.userId,
|
|
json: json
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
if (res.success) {
|
|
this.$message.success(res.message);
|
|
this.$router.push("/processCenter");
|
|
}
|
|
this.isSubmit = false;
|
|
}, e => {
|
|
});
|
|
}
|
|
},
|
|
//流程提交
|
|
handleSubmit() {
|
|
this.$refs['qbfsForm'].validate((valid) => {
|
|
if (valid) {
|
|
this.isSubmit = true;
|
|
this.qbfsForm.commentText = this.commentText;
|
|
this.qbfsForm.sdFlag = '0'
|
|
this.qbfsForm.dataList = this.dataList;
|
|
let json = JSON.stringify(this.qbfsForm);
|
|
this.$http.post("lawss/activiti/completeTask", {
|
|
taskIds: this.$route.query.taskIds,
|
|
userId: this.$store.getters.userInfo.userId,
|
|
json: json
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
if (res.success) {
|
|
this.$message.success(res.message);
|
|
this.$router.push("/processCenter");
|
|
}
|
|
this.isSubmit = false;
|
|
}, e => {
|
|
});
|
|
}else{
|
|
this.$message.warning('请完善基础信息')
|
|
}
|
|
})
|
|
},
|
|
|
|
handleTabs(name) {
|
|
this.active = name;
|
|
},
|
|
foldForm() {
|
|
this.foldFormFlag = !this.foldFormFlag;
|
|
},
|
|
//转办事件
|
|
handleTransfer() {
|
|
this.drawerModal = true;
|
|
this.drawerTitle = "转办处理人";
|
|
this.selectPeople = row;
|
|
},
|
|
//确认转办
|
|
checkedRole(data) {
|
|
this.assigneeNewLoading = true;
|
|
changeAssigneeNew({
|
|
taskId: this.$route.query.taskIds, // 任务id
|
|
assignee: data[0].id, // 被委托人
|
|
userId: this.$store.getters.userInfo.userId, // 委托人
|
|
pId: this.$route.query.prcId // 流程实例
|
|
}).then(res => {
|
|
this.isTransfer = false;
|
|
if (res.success) {
|
|
this.drawerModal = false;
|
|
this.$message.success("调整成功");
|
|
this.$router.push("/processCenter");
|
|
this.processNum();
|
|
} else {
|
|
this.$message.warning(res.message);
|
|
}
|
|
});
|
|
},
|
|
// 请求转换流程图
|
|
processNum(row) {
|
|
axios.request({
|
|
url: "/api/lawss/activiti/getImg?_t=" + new Date().getTime(),
|
|
responseType: "blob",
|
|
method: "get",
|
|
params: {
|
|
prcNum: this.$route.query.prcNum
|
|
}
|
|
}).then(res => {
|
|
// let blob = new Blob([res.data], {type: 'image/jpg'})
|
|
// let url = window.URL.createObjectURL(res.data)
|
|
this.processStep = window.URL.createObjectURL(res.data);
|
|
});
|
|
},
|
|
/**
|
|
* @Description: 点击下载
|
|
*/
|
|
downloadFile(attId) {
|
|
if (attId != null && attId !== "") {
|
|
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
|
|
} else {
|
|
this.$message.error("请选择要下载的文件");
|
|
}
|
|
},
|
|
downloadFileByWater(attId, fileSuffix) {
|
|
let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
|
|
if (fileExtension !== "pdf" && fileExtension !== "PDF") {
|
|
this.$message.error("水印下载仅支持PDF,pdf格式文件");
|
|
} else {
|
|
if (attId != null && attId !== "") {
|
|
window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
|
|
} else {
|
|
this.$message.error("请选择要下载的文件");
|
|
}
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
listNoDataText() {
|
|
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
|
|
.qbfz-step6 {
|
|
/deep/ .el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 0;
|
|
}
|
|
}
|
|
|
|
.fileClass {
|
|
cursor: pointer;
|
|
}
|
|
|
|
.fileClass:hover {
|
|
color: #0c91e5;
|
|
}
|
|
|
|
p {
|
|
& > a {
|
|
cursor: pointer;
|
|
}
|
|
|
|
& > i {
|
|
display: inline-block;
|
|
margin-left: 3px;
|
|
width: 18px;
|
|
height: 16px;
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
background-position: center center;
|
|
vertical-align: sub;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.icon-download {
|
|
background-image: url("~assets/images/shangqi/img/download.png");
|
|
}
|
|
|
|
.icon-download2 {
|
|
background-image: url("~assets/images/shangqi/img/download2.png");
|
|
}
|
|
}
|
|
|
|
.choiceBtn {
|
|
.el-button--primary {
|
|
width: 150px;
|
|
}
|
|
}
|
|
|
|
position: relative;
|
|
height: 100%;
|
|
|
|
.headerTabs {
|
|
height: 52px;
|
|
display: flex;
|
|
align-items: center;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 10px;
|
|
|
|
.headerTabsItem {
|
|
border: 1px solid #c1c1c1;
|
|
padding: 0 5px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.active {
|
|
border: 1px solid #E6A23C;
|
|
color: #fff;
|
|
background: #E6A23C;
|
|
}
|
|
}
|
|
|
|
.content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
height: calc(~'100% - 103px');
|
|
overflow: auto;
|
|
|
|
.tableTitle {
|
|
margin-bottom: 10px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
position: relative;
|
|
font-size: 13px;
|
|
font-weight: bold;
|
|
|
|
.tableButton {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.accessStandardsAndRegulations {
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.add-form-el-select {
|
|
/deep/ .el-select {
|
|
width: 210px;
|
|
}
|
|
}
|
|
|
|
.demo-drawer-content {
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
</style>
|