438 lines
17 KiB
Vue
438 lines
17 KiB
Vue
<template>
|
|
<div class="bzdyStep8">
|
|
<!-- 标准调研流程-->
|
|
<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 === '2' ? 'active' : ''" @click="handleTabs('2')">审批历史</div>
|
|
</div>
|
|
<div class="content" v-show="active === '1'">
|
|
<div style="flex: auto; overflow: auto;">
|
|
<el-form
|
|
ref="bzzqyjForm"
|
|
:model="form"
|
|
:rules="formRules"
|
|
class="label-input-form"
|
|
label-width="210px"
|
|
>
|
|
<ProcessTitle>
|
|
<template slot="title">基础信息</template>
|
|
</ProcessTitle>
|
|
<div class="prc-content-border">
|
|
<el-row :gutter="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="标准编号" prop="cid" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="form.cid"
|
|
placeholder="请输入标准编号"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="标准名称" prop="cname" class="add-form-item form-item-disabled">
|
|
<el-input
|
|
disabled
|
|
v-model="form.cname"
|
|
placeholder="请输入标准名称"
|
|
clearable
|
|
></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="征求意见结束日期" prop="endTime" class="add-form-item form-item-disabled">
|
|
<el-date-picker
|
|
disabled
|
|
v-model="form.endTime"
|
|
type="date"
|
|
placeholder="请选择结束日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</div>
|
|
</el-form>
|
|
<ProcessTitle>
|
|
<template slot="title">征求意见列表</template>
|
|
</ProcessTitle>
|
|
<div class="button-list">
|
|
<el-button type="primary"
|
|
class="common-button-primary add-button"
|
|
@click="upload(data, '汇总单.xls')"
|
|
size="mini">导出汇总单</el-button>
|
|
<el-button type="primary"
|
|
class="common-button-primary add-button"
|
|
@click="upload(oldData, '征求意见搞.xls')"
|
|
size="mini">导出征求意见搞</el-button>
|
|
</div>
|
|
<el-table
|
|
ref="multipleTable"
|
|
:data="data"
|
|
tooltip-effect="dark"
|
|
border
|
|
style="width: 100%; flex: auto;"
|
|
class="drag-table"
|
|
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
|
|
fontWeight: 'bold', height: '48px'}">
|
|
<el-table-column
|
|
type="index"
|
|
label="序号"
|
|
width="55"
|
|
align="center">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="chapterNumber"
|
|
label="章条编号"
|
|
width="170px">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="chapterName"
|
|
label="章节名称">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="commentText"
|
|
label="修改意见内容(包括理由或依据)">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="department"
|
|
label="提出部门">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="responUserName"
|
|
label="提出人">
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="state"
|
|
label="处理意见">
|
|
<template slot-scope="scope">
|
|
<div>{{ stateText(scope.row.state) }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</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 class="content" v-show="active === '2'">
|
|
<el-table
|
|
height="100%"
|
|
ref="selection"
|
|
:data="histortData"
|
|
tooltip-effect="dark"
|
|
style="width: 100%"
|
|
border
|
|
row-key="id"
|
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
|
|
<el-table-column
|
|
prop="name"
|
|
label="任务步骤"
|
|
align="center"
|
|
sortable="custom"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column
|
|
prop="assignee"
|
|
label="任务受理人"
|
|
align="center"
|
|
sortable="custom"
|
|
>
|
|
</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>
|
|
</div>
|
|
<ProcessFooter
|
|
show-save
|
|
show-submit
|
|
:submitLoading="isSubmit"
|
|
:saveLoading="saveLoading"
|
|
@save="handleSave"
|
|
@submit="handleSubmit"
|
|
show-back
|
|
@back="handleSubmitNo"
|
|
approval
|
|
submitBTNText="同意"
|
|
>
|
|
</ProcessFooter>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ProcessHeader from '../../components/ProcessHeader'
|
|
import ProcessFooter from '../../components/ProcessFooter'
|
|
import ProcessTitle from '../../components/ProcessTitle'
|
|
import {inboundLiaisonDetail,processCreateStand} from 'api/process'
|
|
|
|
export default {
|
|
name: "bzzqyjStep8",
|
|
data() {
|
|
return {
|
|
histortData: [],
|
|
oldData: [],
|
|
data: [],
|
|
commentText: '',
|
|
taskIds: this.$route.query.taskIds,
|
|
pId: this.$route.query.prcId,
|
|
roleRow: {},
|
|
nodeList: [],
|
|
type: '',
|
|
defaultProps: {
|
|
children: 'children',
|
|
label: 'name'
|
|
},
|
|
treeData: [], // 人员数据
|
|
modalshowflag: false, // drawer开关
|
|
drawerTitle: '', //drawer标题
|
|
textarea: '', // 意见
|
|
ListModel: false, // 新增编辑抽屉开关
|
|
active: '1', // 默认显示
|
|
isSubmit: false,
|
|
saveLoading: false,
|
|
form: {
|
|
cid: '', // 编号
|
|
endTime: '', // 结束日期
|
|
cname: '', // 名称
|
|
},
|
|
formRules: {
|
|
responUserList: [
|
|
{ required: true, message: '请选择责任人', trigger: 'change' },
|
|
]
|
|
},
|
|
json: {}
|
|
}
|
|
},
|
|
components: {
|
|
ProcessHeader,
|
|
ProcessFooter,
|
|
ProcessTitle
|
|
},
|
|
methods: {
|
|
getHistoryData () {
|
|
this.$http.get('lawss/activiti/get_list_by_instance', {
|
|
prcNum: this.$route.query.prcNum,
|
|
}, {}, res => {
|
|
this.histortData = res
|
|
}, e => {})
|
|
},
|
|
upload (row, title) {
|
|
var params = {
|
|
columnName: {
|
|
chapterNumber : '章条编号',
|
|
chapterName : '章节名称',
|
|
commentText: '修改意见内容(包括理由或依据)',
|
|
department: '提出部门',
|
|
responUserName: '提出人'
|
|
},
|
|
dataList: []
|
|
}
|
|
params.dataList = row
|
|
this.$http.downloadFile('/api/lawss/activiti/export_excel', params, title, res => {})
|
|
},
|
|
stateText (row) {
|
|
if (row === '1') {
|
|
return '上报'
|
|
} else if (row === '2') {
|
|
return '处理后上报'
|
|
}
|
|
},
|
|
handleTabs(name) {
|
|
this.active = name
|
|
},
|
|
handleSave() {},
|
|
handleSubmit() {
|
|
if (this.data.length < 1) {
|
|
this.$message.warning('请输入征求意见搞')
|
|
} else {
|
|
var a = 0
|
|
var b = 0
|
|
var c = 0
|
|
for (let s1 = 0; s1 < this.data.length; s1++) {
|
|
if (!this.data[s1].chapterNumber) {
|
|
a++
|
|
}
|
|
if (!this.data[s1].chapterName) {
|
|
b++
|
|
}
|
|
if (!this.data[s1].commentText) {
|
|
c++
|
|
}
|
|
}
|
|
if (a > 0) {
|
|
this.$message.warning('请输入章节编号')
|
|
} else if (b > 0) {
|
|
this.$message.warning('请输入章节名称')
|
|
} else if (c > 0) {
|
|
this.$message.warning('请输入意见内容')
|
|
} else {
|
|
this.isSubmit = true
|
|
var json = this.json
|
|
json.actionFlag = 0
|
|
json.commentText = this.commentText
|
|
this.$http.post('lawss/activiti/completeTask', {
|
|
json: JSON.stringify(json),
|
|
taskId: this.taskIds,
|
|
userId: this.$store.getters.userInfo.userId
|
|
}, {}, res => {
|
|
if (res.success) {
|
|
this.$message.success('提交成功')
|
|
this.$router.push('/processCenter')
|
|
}
|
|
this.isSubmit = false
|
|
})
|
|
}
|
|
}
|
|
},
|
|
handleSubmitNo() {
|
|
if (this.commentText) {
|
|
this.isSubmit = true
|
|
var json = this.json
|
|
json.actionFlag = 1
|
|
json.commentText = this.commentText
|
|
this.$http.post('lawss/activiti/completeTask', {
|
|
json: JSON.stringify(json),
|
|
taskIds: this.taskIds,
|
|
userId: this.$store.getters.userInfo.userId
|
|
}, {}, res => {
|
|
if (res.success) {
|
|
this.$message.success('驳回成功')
|
|
this.$router.push('/processCenter')
|
|
}
|
|
this.isSubmit = false
|
|
})
|
|
} else {
|
|
this.$message.warning('请输入反馈意见')
|
|
}
|
|
},
|
|
getData() {
|
|
return new Promise((resolve, reject) => {
|
|
inboundLiaisonDetail({
|
|
taskIds: this.taskIds,
|
|
pId: this.pId
|
|
}).then(res => {
|
|
let data = JSON.parse(res.mesg)
|
|
this.form.cid = data.cid
|
|
this.form.endTime = data.endTime
|
|
this.form.cname = data.cname
|
|
var arr = []
|
|
data.summaryList.forEach( item => {
|
|
if (item.state != '3') {
|
|
arr.push(item)
|
|
}
|
|
})
|
|
this.json = data
|
|
this.data = arr
|
|
this.oldData = data.oldinfo
|
|
}).catch(e => {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
mounted () {
|
|
this.getHistoryData()
|
|
this.getData()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
@import '~@/assets/styles/style';
|
|
.bzdyStep8 {
|
|
/deep/.el-drawer__container {
|
|
.prc-content-border {
|
|
border: none;
|
|
padding: 0 20px 0;
|
|
}
|
|
}
|
|
.fileClass {
|
|
cursor: pointer;
|
|
}
|
|
.fileClass:hover{
|
|
color: #0c91e5;
|
|
}
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|