541 lines
16 KiB
Vue
541 lines
16 KiB
Vue
<!--标准法规清单发布 - 业务经理审批-->
|
|
<template>
|
|
<div class="bzqdfb-step4">
|
|
<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>
|
|
<div class="content" v-show="active == '1'">
|
|
<div style="flex: auto; overflow: auto">
|
|
<process-title>
|
|
<template slot="title">基础信息</template>
|
|
</process-title>
|
|
<el-form
|
|
:model="listForm"
|
|
class="label-input-form prc-content-border"
|
|
label-width="150px"
|
|
>
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="清单名称" prop="listName" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="listForm.listName"
|
|
placeholder="请输入清单名称"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="清单说明" prop="descriptionList" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="listForm.descriptionList"
|
|
placeholder="请输入清单说明"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="附件" prop="modelName" class="add-form-item form-item-disabled">
|
|
<div class="file-box" v-if="listForm.model">
|
|
<p> {{ listForm.modelName }}
|
|
<i
|
|
title="下载"
|
|
@click="downloadFile(listForm.model)"
|
|
class="icon-download"
|
|
v-btn-permission="''"
|
|
/>
|
|
<i
|
|
title="下载带水印"
|
|
@click="downloadFileByWater(listForm.model,listForm.modelName)"
|
|
class="icon-download2"
|
|
v-btn-permission="''"
|
|
/>
|
|
</p>
|
|
</div>
|
|
<div v-else>
|
|
暂无数据
|
|
</div>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<process-title>
|
|
<template slot="title">填写信息</template>
|
|
</process-title>
|
|
<el-table
|
|
:data="dataList"
|
|
border
|
|
height="64.6%"
|
|
style="width: 100%"
|
|
@selection-change="selectStandChange"
|
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}">
|
|
<el-table-column
|
|
prop="code"
|
|
width="180px"
|
|
label="标准号">
|
|
<template slot-scope="scope">
|
|
<a v-if="scope.row.standYear" class="table-jump"
|
|
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
|
|
scope.row.standNumber
|
|
}}-{{ scope.row.standYear }}</a>
|
|
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{
|
|
scope.row.standSortShow }}
|
|
{{ scope.row.standNumber }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="standName"
|
|
label="标准名称"
|
|
width="260px"
|
|
>
|
|
<template slot-scope="scope">
|
|
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="issueTime"
|
|
sortable
|
|
label="发布日期">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="XCXSSRQ"
|
|
sortable
|
|
label="新车型实施日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.XCXSSRQ ? $moment(scope.row.XCXSSRQ).format("YYYY-MM-DD") : "" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="ZCCSSRQ"
|
|
sortable
|
|
label="在产车实施日期">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.ZCCSSRQ ? $moment(scope.row.ZCCSSRQ).format("YYYY-MM-DD") : "" }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
show-overflow-tooltip
|
|
prop="textStatus"
|
|
width="120px"
|
|
label="文本状态">
|
|
<template slot-scope="scope">
|
|
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
|
|
</template>
|
|
</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>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from "../../components/ProcessHeader";
|
|
import ProcessFooter from "../../components/ProcessFooter";
|
|
import ProcessTitle from "../../components/ProcessTitle";
|
|
import { inboundLiaisonDetail } from "api/process";
|
|
export default {
|
|
name: "bzqdfbStep1-4",
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
data() {
|
|
return {
|
|
detailData: [],
|
|
// 当前流程类型(1待办/2已办)
|
|
processType: 1,
|
|
loading: false,
|
|
dataList: [],//清单里的标准数据
|
|
approvalOpinion: "", // 通过0/驳回1
|
|
active: "1",
|
|
listType: "country", //选择的清单类型
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
tabValue: "listOfCountries",
|
|
selectedList: [], //选择清单的选择框
|
|
selectList: [], //选择标准的选择框
|
|
bringData: [],
|
|
commentText: "", //填写会签意见
|
|
page: 1,
|
|
total: 0,
|
|
pageSize: this.$store.getters.userInfo.configContent,
|
|
listForm: {
|
|
listType: "", //区分是哪个清单
|
|
listName: "", //清单名称
|
|
descriptionList: "", //清单说明
|
|
enclosure: "", //附件
|
|
signFlag: "1", //是否会签 1为会签 2为不会签
|
|
approvalOpinion: "", // 通过/驳回
|
|
dataList: [{
|
|
standNumber: "", //标准号
|
|
cnName: "", //中文名称
|
|
enName: "", //英文名称
|
|
isSubTime: "", //发布日期
|
|
newCarTime: "", //新车型实施日期
|
|
oldCarTime: "", //在产车实施日期
|
|
applyCar: "", //适用车型
|
|
textState: "", //文本状态
|
|
id: ""
|
|
}]
|
|
},
|
|
choiceForm: {}, //选择标准清单列表
|
|
// countryOptions: [], //适用区域下拉框数据
|
|
userId: this.$store.getters.userInfo.userId,
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId,
|
|
signFlag: "1", //是否会签 1为会签 2为不会签
|
|
user1: "",
|
|
user2: "",
|
|
user3: "",
|
|
user4: "",
|
|
user5: "",
|
|
standMap: new Map(),
|
|
textStatusMap: {}// 文本状态id与name对应
|
|
};
|
|
},
|
|
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 => {
|
|
});
|
|
},
|
|
//tab发生变化
|
|
handleTabs(name) {
|
|
this.active = name;
|
|
},
|
|
choiceShow() {
|
|
this.ListModel = true;
|
|
},
|
|
// 点击查看
|
|
handlePreview(item) {
|
|
let routeUrl = this.$router.resolve({
|
|
name: "OtherStandardDetails",
|
|
params: {
|
|
id: item.id,
|
|
pageType: "INLAND_STAND"
|
|
}
|
|
});
|
|
window.open(routeUrl.href, "_blank");
|
|
},
|
|
//保存事件
|
|
handleSave() {
|
|
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.taskIds,
|
|
pId: this.pId
|
|
}).then(res => {
|
|
if (res) {
|
|
const processForm = JSON.parse(res.mesg);
|
|
this.getFormFieldList(processForm);
|
|
}
|
|
}).catch(e => {
|
|
});
|
|
});
|
|
},
|
|
/**
|
|
* @description: 动态表单读取
|
|
*/
|
|
getFormFieldList(item) {
|
|
this.$nextTick(() => {
|
|
this.listForm = JSON.parse(JSON.stringify(item));
|
|
this.listForm.prcNum = this.prcNum;
|
|
this.listForm.prcName = this.prcName;
|
|
this.listForm["id"] = item.id;
|
|
this.listForm.dataList = item.dataList;
|
|
this.dataList = item.dataList;
|
|
this.listForm.applyUpdUserId = item.applyUpdUserId;
|
|
this.listForm.jlUserId = item.jlUserId;
|
|
this.listForm.zrUserId = item.zrUserId;
|
|
});
|
|
},
|
|
// 请求上传的文件信息
|
|
getFileInfo() {
|
|
this.$http.get("att/attFile/getMultiFileInfos", {
|
|
fileIds: this.fileIds
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
console.log(res);
|
|
this.$nextTick(() => {
|
|
res.data.map(item => {
|
|
this.listForm.modelName = item.oldFileName;
|
|
this.listForm.model = item.id;
|
|
});
|
|
});
|
|
}, e => {
|
|
});
|
|
},
|
|
/**
|
|
* @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("请选择要下载的文件");
|
|
}
|
|
}
|
|
},
|
|
//驳回事件
|
|
beforeBack() {
|
|
if (this.commentText === null || this.commentText === undefined || this.commentText === "") {
|
|
this.$message.warning("请填写审批意见");
|
|
} else {
|
|
this.listForm.approvalOpinion = "1";
|
|
this.handleSubmit();
|
|
}
|
|
},
|
|
//提交事件
|
|
handleSubmit() {
|
|
this.isSubmit = true
|
|
this.listForm.commentText = this.commentText;
|
|
const json = JSON.stringify(this.listForm);
|
|
this.$http.post("lawss/activiti/completeTask", {
|
|
taskIds: this.taskIds,
|
|
userId: this.userId,
|
|
json: json
|
|
}, {
|
|
_this: this
|
|
}, res => {
|
|
if (res.success) {
|
|
this.$message.success(res.message);
|
|
this.$router.push("/processCenter");
|
|
}
|
|
this.isSubmit = false
|
|
});
|
|
},
|
|
//选择标准取消事件
|
|
closeDrawer() {
|
|
this.ListModel = false;
|
|
},
|
|
//标准表格选择框改变
|
|
selectStandChange(data) {
|
|
this.selectList = [];
|
|
for (let i = 0; i < data.length; i++) {
|
|
this.selectList.push(data[i].id);
|
|
}
|
|
},
|
|
selectThree() {
|
|
|
|
},
|
|
pageChange(page) {
|
|
this.page = page;
|
|
this.searchData();
|
|
},
|
|
pageSizeChange(pageSize) {
|
|
this.pageSize = this.$store.getters.userInfo.configContent;
|
|
this.searchData();
|
|
},
|
|
// 将文本状态的id与name对应
|
|
setMap(data) {
|
|
data.forEach(item => {
|
|
this.$set(this.textStatusMap, item.value, item.label);
|
|
});
|
|
}
|
|
},
|
|
computed: {
|
|
listNoDataText() {
|
|
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
|
|
}
|
|
},
|
|
mounted() {
|
|
//从数据库中查询下拉框数据
|
|
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
|
|
_this: this
|
|
}, res => {
|
|
this.countryOptions = res.data.COUNTRY;
|
|
this.standStateOptions = res.data.WBZTCLASS; // 文本状态
|
|
this.setMap(this.standStateOptions);
|
|
});
|
|
this.getData();
|
|
this.processTable();
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
|
|
.bzqdfb-step4 {
|
|
/deep/ .el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 0;
|
|
}
|
|
}
|
|
|
|
.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%;
|
|
}
|
|
}
|
|
}
|
|
|
|
.demo-drawer-content {
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
</style>
|
|
|