Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yanyizhou
2021-08-08 17:39:12 +08:00
7 changed files with 466 additions and 14 deletions
@@ -406,7 +406,6 @@ export default {
},
// 保存按钮
handleSave() {
this.isSubmit = true
let zqa = new Map();
for (let lastDataListElement of this.dataList) {
let a = zqa.get(lastDataListElement.dutyPeopleInfoId)
@@ -232,6 +232,7 @@ import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {uploadFile} from '@/api/unqualProcess.js';
import {inboundLiaisonDetail, completeTask, saveTaskForPub} from "@/api/process"
import listOfCountries from "@/pages/regulatoryRepository/accessStandardsAndRegulations/page/listOfCountries";
export default {
name: "wfhxzgStep4",
@@ -307,11 +308,11 @@ export default {
},
getFormFieldList (item) {
this.$nextTick(() => {
let listJSON = JSON.parse(JSON.stringify(item.responUserInfo.info))
let listJSON = JSON.parse(JSON.stringify(item.responUserList))
if (listJSON.length !== undefined) {
this.dataList = listJSON
this.dataList = listJSON[0].standardInfoList
} else {
this.dataList = [listJSON]
this.dataList = [listJSON][0].standardInfoList
}
this.dataList.forEach(item => {
if (item.fileText.length !== 0) {
@@ -427,8 +428,8 @@ export default {
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
// roleForm: this.roleForm,
responUserInfo: {
info: this.dataList.splice(-1, 1)
responUserList: {
standardInfoList: this.dataList
},
commentText: this.commentText
}))
@@ -375,6 +375,7 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
@@ -1,13 +1,463 @@
<template>
<div class="xmpg2-step2">
<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="projectNumber" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.projectNumber"
placeholder="请输入项目编号"
disabled
clearable
></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectName" class="add-form-item form-item-disabled">
<el-input
v-model="listForm.projectName"
placeholder="请输入项目名称"
disabled
clearable
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<process-title style="margin-top:5px; margin-bottom: 5px">
<template slot="title">填写信息</template>
</process-title>
<el-table
:data="dataList"
border
ref="selection"
height="70%"
style="width: 100%; border:1px solid #ccc"
: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
align="center"
width="200px"
label="标准号"
>
<template slot-scope="scope">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
align="center"
label="中文名称"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="standEnName"
label="英文名称"
align="center"
width="180px"
>
<template slot-scope="scope">
<a @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standEnName }}</a>
</template>
</el-table-column>
<el-table-column
prop="ssrq"
width="190px"
align="center"
sortable
label="标准实施日期">
<template slot-scope="scope">
<span>{{ scope.row.ssrq ? $moment(scope.row.ssrq).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
prop="xcxssrq"
width="190px"
align="center"
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
prop="zccssrq"
align="center"
sortable
width="190px"
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
prop="zrbm"
label="责任部门"
align="center"
width="180px"
>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppsbm"
width="180px"
align="center"
label="卡车VPPS编码">
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="kccvppscn"
width="180px"
align="center"
label="卡车vpps中文名称">
</el-table-column>
<el-table-column
prop="cycvppsbm"
width="180px"
align="center"
label="乘用车VPPS编码">
</el-table-column>
<el-table-column
prop="cycvppscn"
width="180px"
align="center"
label="乘用车vpps中文名称">
</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" style="height: 100%">
<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, queryDetail } from "api/process";
export default {
name: "step1-2"
name: "xmpg2Step1-2",
components: {
ProcessTitle,
ProcessHeader,
ProcessFooter
},
data() {
return {
active: "1",
loading: false,
// 当前流程类型(1待办/2已办)
processType: 1,
isSubmit: false,
saveLoading: false,
//表单的数据
listForm: {
BZFlag: " ", //1审批通过 其他为驳回
projectNumber: "", //项目编号
projectName: "", //项目名称
dataList: [], //项目下的标准数据
breakdownList: [] //标准下的分解单数据
},
dataList: [], //展示的标准数据
commentText: "", //审批意见
detailData: [],//流程历史数据
userId: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId
};
},
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(type) {
this.active = type;
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.standId,
pageType: 'INLAND_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
//获取数据
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 => {
});
});
},
//动态表单读取
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.dataList.distributePerson = item.dataList[0].distributePerson;
this.listForm.breakdownList = item.breakdownList;
});
},
//驳回事件
beforeBack() {
if(this.commentText === null || this.commentText === undefined || this.commentText === ''){
this.$message.warning('审批意见不能为空')
}else{
this.listForm.BZFlag = "2";
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");
}
}, e => {
});
}
},
//提交事件
handleSubmit() {
this.isSubmit = true
this.listForm.BZFlag = "1";
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
}, e => {
});
}
},
computed: {
listNoDataText() {
return this.processType === 1 ? "暂无待办流程" : "暂无已办流程";
}
},
mounted() {
this.processTable();
this.getData();
}
};
</script>
<style scoped>
<style lang="less" scoped>
@import '~@/assets/styles/style';
.xmpg2-step2 {
/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>
@@ -178,9 +178,10 @@ export default {
let row = {...this.detailData[index]}
row.taskIds = row.id
row.taskInfo = row.name
console.log(row.name)
row.tabsName = this.$route.query.tabsName
let prcType = this.detailData[index].prcType // 流程类型
console.log(prcType)
console.log(row.taskInfo);
// 判断当前流程是否已全部办理完成
this.detailData.map(item => {
if (!item.endTime) {
@@ -213,7 +214,7 @@ export default {
}
}else if(prcType === '6'){
//标准项目合规评估 项目维度
if(row.taskInfo === '标准法规部领导审核'){
if(row.taskInfo === '标准法规部部长审批'){
this.toProcessDetail('xmpg2Step1-12',row)
}else{
this.toProcessDetail('xmpg2Step1-2',row)
@@ -10,7 +10,7 @@
<el-card class="contaiinerCard" style="margin: 5px">
<div style="padding: 20px">
<el-row style="margin-top: 10px">
<el-col :span="5">产品平台: <span class="valueColor">{{ localProEO.projectPlatfor }}</span></el-col>
<el-col :span="5">产品平台1: <span class="valueColor">{{ localProEO.projectPlatfor }}</span></el-col>
<el-col :span="5" :push="1">项目编号: <span class="valueColor">{{ localProEO.projectNumber }}</span></el-col>
<el-col :span="5" :push="2">
<el-tooltip class="item" effect="dark" :content="localProEO.projectName" placement="top">
@@ -103,8 +103,8 @@
align="center"
:label="$t('m.issueTime')">
<template slot-scope="scope">
<div v-if="scope.row.issue_time !== null && scope.row.issue_time !== undefined">
{{ dateFormat2(scope.row.issue_time) }}
<div v-if="scope.row.issueTime !== null && scope.row.issueTime !== undefined">
{{ dateFormat2(scope.row.issueTime) }}
</div>
<div v-else></div>
</template>