参会流程

This commit is contained in:
shenyanpei
2021-12-03 15:02:04 +08:00
parent cd5b4442ff
commit e3b81f6009
7 changed files with 452 additions and 395 deletions
@@ -97,7 +97,8 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="费用列支:"> <el-form-item class="add-form-item" label="费用列支:">
<el-select <el-input v-model="ch_pageData.feeKind" placeholder="请输入费用列支"></el-input>
<!-- <el-select
v-model="ch_pageData.feeKind" v-model="ch_pageData.feeKind"
placeholder="请选择费用列支"> placeholder="请选择费用列支">
<el-option <el-option
@@ -105,7 +106,7 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.label"/> :value="item.label"/>
</el-select> </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -170,6 +171,19 @@
</el-form> </el-form>
</div> </div>
</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 === '2'"> <div class="content" v-show="active === '2'">
<div class="block" style="padding-top: 20px;"> <div class="block" style="padding-top: 20px;">
@@ -319,7 +333,7 @@
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {startProcess, saveTaskFirst, completeTask} from '@/api/process.js' import {startProcess, queryTaskFirst, saveTaskFirst, completeTask} from '@/api/process.js'
export default { export default {
components: { components: {
@@ -393,6 +407,13 @@ export default {
roleShowflagOne: false, roleShowflagOne: false,
isSubmit: false, isSubmit: false,
saveLoading: false, saveLoading: false,
commentText: ''
}
},
mounted() {
this.bpnId = this.$route.query.bpnId
if (this.bpnId !== undefined) {
this.getData()
} }
}, },
methods: { methods: {
@@ -400,6 +421,16 @@ export default {
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
getData() {
queryTaskFirst({
bpnId: this.$route.query.bpnId
}).then(res => {
let mes = JSON.parse(res.mes)
this.ch_pageData = mes.ch_pageData
this.commentText = mes.commentText
this.roleForm = mes.roleForm
});
},
//上传按钮 //上传按钮
/* uploadFile(val) { /* uploadFile(val) {
@@ -557,10 +588,12 @@ export default {
_formData.append('id', this.bpnId || '') _formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId) _formData.append('createUser', this.$store.getters.userInfo.userId)
_formData.append('createUserName', this.$store.getters.userInfo.userName) _formData.append('createUserName', this.$store.getters.userInfo.userName)
_formData.append('prcType', '20') _formData.append('prcType', '21')
_formData.append('json', JSON.stringify({ _formData.append('json', JSON.stringify({
roleForm: this.roleForm, roleForm: this.roleForm,
ch_pageData: this.ch_pageData ch_pageData: this.ch_pageData,
commentText: this.commentText
})) }))
saveTaskFirst(_formData).then(res => { saveTaskFirst(_formData).then(res => {
this.saveLoading = false this.saveLoading = false
@@ -572,39 +605,44 @@ export default {
}, },
/** 提交按钮*/ /** 提交按钮*/
handleSubmit() { handleSubmit() {
let json = { if (this.commentText === '') {
prcCreateUser: this.$store.getters.userInfo.userId, this.$message.warning('请输入回执说明')
prcCreateUserName: this.$store.getters.userInfo.userName, } else {
roleList: this.roleForm, let json = {
ch_pageData: this.ch_pageData, prcCreateUser: this.$store.getters.userInfo.userId,
directorList: this.roleForm.dockUser, prcCreateUserName: this.$store.getters.userInfo.userName,
} roleList: this.roleForm,
this.$refs['ch_pageData'].validate((valid) => { ch_pageData: this.ch_pageData,
if (valid) { commentText: this.commentText,
this.$refs['roleForm'].validate((valid) => { directorList: this.roleForm.dockUser,
if (valid) {
this.isSubmit = true
const paramsInfo = {
type: '21'
}
startProcess(paramsInfo).then(res => {
this.taskID = res.data
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskID)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
})
})
}
})
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.$refs['roleForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
const paramsInfo = {
type: '21'
}
startProcess(paramsInfo).then(res => {
this.taskID = res.data
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskID)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
})
})
}
})
}
})
}
} }
} }
@@ -59,19 +59,18 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile"> <el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
<el-upload <span v-if="uploadFileLength < 1">{{ '-' }}</span>
action="" <span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
name="file" {{ item.name }} {{ ';'}}
:disabled="acceptShow" </span>
:file-list="ch_pageData.fileTextList"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="类别:"> <el-form-item class="add-form-item" label="类别:">
{{ ch_pageData.sort || '-'}} <span v-if="ch_pageData.sort === '1'">计划内</span>
<span v-else>计划外</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -104,14 +103,14 @@
</div> </div>
</div> </div>
<el-collapse accordion> <el-collapse accordion>
<el-collapse-item title="回执说明"> <el-collapse-item title="审批意见">
<div style="margin: 10px 0;"> <div style="margin: 10px 0;">
<el-input <el-input
type="textarea" type="textarea"
:rows="3" :rows="3"
resize="none" resize="none"
placeholder="请输入意见" placeholder="请输入意见"
v-model="textContent"> v-model="commentText">
</el-input> </el-input>
</div> </div>
</el-collapse-item> </el-collapse-item>
@@ -217,7 +216,7 @@ export default {
ch_pageData: {}, ch_pageData: {},
ch_rules: {}, ch_rules: {},
nodeList: [], nodeList: [],
textContent: '', commentText: '',
isBack: false, isBack: false,
isSubmit: false, isSubmit: false,
@@ -228,6 +227,7 @@ export default {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
uploadFileLength: ''
} }
}, },
computed: { computed: {
@@ -272,61 +272,72 @@ export default {
getFormFieldList (item) { getFormFieldList (item) {
this.$nextTick(() => { this.$nextTick(() => {
this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData
this.uploadFileLength = this.ch_pageData.fileTextList.length
this.ch_pageData.meetingInRole = this.$store.getters.userInfo.userName this.ch_pageData.meetingInRole = this.$store.getters.userInfo.userName
this.roleForm = JSON.parse(JSON.stringify(item)).roleList this.roleForm = JSON.parse(JSON.stringify(item)).roleList
}) })
}, },
// 退回按钮 // 退回按钮
handleSubmitNo() { handleSubmitNo() {
let json = { if (this.commentText === '') {
roleList: this.roleForm, this.$message.warning('请输入审批意见')
memberId: this.$store.getters.userInfo.userId, } else {
passFlag: '0', let json = {
commentText: this.textContent, roleList: this.roleForm,
ch_pageData: this.ch_pageData, memberId: this.$store.getters.userInfo.userId,
} passFlag: '0',
this.$refs['ch_pageData'].validate((valid) => { commentText: this.commentText,
if (valid) { ch_pageData: this.ch_pageData,
this.isBack = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('退回成功')
this.$router.push("/processCenter");
}
this.isBack = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isBack = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('退回成功')
this.$router.push("/processCenter");
}
this.isBack = false
});
}
})
}
}, },
// 提交按钮 // 提交按钮
handleSubmit() { handleSubmit() {
let json = { if (this.commentText === '') {
roleList: this.roleForm, this.$message.warning('请输入审批意见')
memberId: this.$store.getters.userInfo.userId, } else {
passFlag: '1', let json = {
commentText: this.textContent, roleList: this.roleForm,
ch_pageData: this.ch_pageData, memberId: this.$store.getters.userInfo.userId,
} passFlag: '1',
this.$refs['ch_pageData'].validate((valid) => { commentText: this.commentText,
if (valid) { ch_pageData: this.ch_pageData,
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
}
})
}
} }
} }
} }
@@ -59,18 +59,18 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile"> <el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
<el-upload <span v-if="uploadFileLength < 1">{{ '-' }}</span>
action="" <span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
name="file" {{ item.name }} {{ ';'}}
:file-list="ch_pageData.fileTextList" </span>
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="类别:"> <el-form-item class="add-form-item" label="类别:">
{{ ch_pageData.sort || '-' }} <span v-if="ch_pageData.sort === '1'">计划内</span>
<span v-else>计划外</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -123,9 +123,10 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="参与人部门领导:"> <el-form-item class="add-form-item" prop="fillLeader" label="参与人部门领导:">
<el-input <el-input
style="width: 100%" style="width: 100%"
readonly
placeholder="请选择" placeholder="请选择"
v-model="ch_pageData.fillLeader" v-model="ch_pageData.fillLeader"
@click.native="choiceZRR" @click.native="choiceZRR"
@@ -154,6 +155,19 @@
</el-form> </el-form>
</div> </div>
</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="content" v-show="active === '3'">
<div class="flow-list"> <div class="flow-list">
@@ -269,7 +283,12 @@ export default {
fillLeader: '', fillLeader: '',
fillFile: '', fillFile: '',
}, },
ch_rules: {}, ch_rules: {
fillLeader: [
{required: true, message: "请选择参与人部门领导", trigger: 'blur'},
{ trigger: 'change' }
]
},
detailData: [], detailData: [],
loading: false, loading: false,
@@ -284,6 +303,9 @@ export default {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
uploadFileLength: '',
commentText: ''
} }
}, },
computed: { computed: {
@@ -327,6 +349,7 @@ export default {
getFormFieldList (item) { getFormFieldList (item) {
this.$nextTick(() => { this.$nextTick(() => {
this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData
this.uploadFileLength = this.ch_pageData.fileTextList.length
this.ch_pageData.fillPeopleId = this.$store.getters.userInfo.userId this.ch_pageData.fillPeopleId = this.$store.getters.userInfo.userId
this.ch_pageData.fillPeople = this.$store.getters.userInfo.userName this.ch_pageData.fillPeople = this.$store.getters.userInfo.userName
this.roleForm = JSON.parse(JSON.stringify(item)).roleList this.roleForm = JSON.parse(JSON.stringify(item)).roleList
@@ -356,6 +379,7 @@ export default {
_formData.append('taskIds', this.taskIds) _formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({ _formData.append('json', JSON.stringify({
roleList: this.roleForm, roleList: this.roleForm,
commentText: this.commentText,
selfUser: this.$store.getters.userInfo.userId, selfUser: this.$store.getters.userInfo.userId,
charge: this.ch_pageData.fillLeaderId, charge: this.ch_pageData.fillLeaderId,
ch_pageData: this.ch_pageData, ch_pageData: this.ch_pageData,
@@ -370,28 +394,34 @@ export default {
}, },
// 提交按钮 // 提交按钮
handleSubmit() { handleSubmit() {
let json = { if (this.commentText === '') {
roleList: this.roleForm, this.$message.warning('请输入回执说明')
selfUser: this.$store.getters.userInfo.userId, } else {
charge: this.ch_pageData.fillLeaderId, let json = {
ch_pageData: this.ch_pageData, roleList: this.roleForm,
} selfUser: this.$store.getters.userInfo.userId,
this.$refs['ch_pageData'].validate((valid) => { commentText: this.commentText,
if (valid) { charge: this.ch_pageData.fillLeaderId,
this.isSubmit = true ch_pageData: this.ch_pageData,
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
}
})
}
} }
} }
} }
@@ -59,18 +59,18 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile"> <el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
<el-upload <span v-if="uploadFileLength < 1">{{ '-' }}</span>
action="" <span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
name="file" {{ item.name }} {{ ';'}}
:file-list="ch_pageData.fileTextList" </span>
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="类别:"> <el-form-item class="add-form-item" label="类别:">
{{ ch_pageData.sort || '-' }} <span v-if="ch_pageData.sort === '1'">计划内</span>
<span v-else>计划外</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -109,7 +109,7 @@
</div> </div>
</div> </div>
<el-collapse accordion> <el-collapse accordion>
<el-collapse-item title="回执说明"> <el-collapse-item title="审批意见">
<div style="margin: 10px 0;"> <div style="margin: 10px 0;">
<el-input <el-input
type="textarea" type="textarea"
@@ -232,6 +232,7 @@ export default {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
uploadFileLength: ''
} }
}, },
computed: { computed: {
@@ -275,6 +276,7 @@ export default {
getFormFieldList (item) { getFormFieldList (item) {
this.$nextTick(() => { this.$nextTick(() => {
this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData
this.uploadFileLength = this.ch_pageData.fileTextList.length
this.ch_pageData.myPartRole = [{ this.ch_pageData.myPartRole = [{
fillPeopleId: this.ch_pageData.fillPeopleId, fillPeopleId: this.ch_pageData.fillPeopleId,
fillPeople: this.ch_pageData.fillPeople, fillPeople: this.ch_pageData.fillPeople,
@@ -292,56 +294,64 @@ export default {
}, },
// 退回按钮 // 退回按钮
handleSubmitNo() { handleSubmitNo() {
let json = { if (this.textarea === '') {
member: this.selfUser, this.$message.warning('请输入审批意见')
passFlag: '0', } else {
roleList: this.roleForm, let json = {
commentText: this.textarea, member: this.selfUser,
ch_pageData: this.ch_pageData, passFlag: '0',
} roleList: this.roleForm,
this.$refs['ch_pageData'].validate((valid) => { commentText: this.textarea,
if (valid) { ch_pageData: this.ch_pageData,
this.isBack = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('退回成功')
this.$router.push("/processCenter");
}
this.isBack = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isBack = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('退回成功')
this.$router.push("/processCenter");
}
this.isBack = false
});
}
})
}
}, },
// 提交按钮 // 提交按钮
handleSubmit() { handleSubmit() {
let json = { if (this.textarea === '') {
member: this.selfUser, this.$message.warning('请输入审批意见')
passFlag: '1', } else {
engineerSum: this.roleForm.startUser, let json = {
roleList: this.roleForm, member: this.selfUser,
commentText: this.textarea, passFlag: '1',
ch_pageData: this.ch_pageData, engineerSum: this.roleForm.startUser,
} roleList: this.roleForm,
this.$refs['ch_pageData'].validate((valid) => { commentText: this.textarea,
if (valid) { ch_pageData: this.ch_pageData,
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
}
})
}
} }
} }
} }
@@ -59,18 +59,18 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile"> <el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
<el-upload <span v-if="uploadFileLength < 1">{{ '-' }}</span>
action="" <span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
name="file" {{ item.name }} {{ ';'}}
:file-list="ch_pageData.fileTextList" </span>
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="类别:"> <el-form-item class="add-form-item" label="类别:">
{{ ch_pageData.sort || '-' }} <span v-if="ch_pageData.sort === '1'">计划内</span>
<span v-else>计划外</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -126,6 +126,19 @@
</el-form> </el-form>
</div> </div>
</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="content" v-show="active === '3'">
<div class="flow-list"> <div class="flow-list">
@@ -210,7 +223,7 @@
import ProcessHeader from "../../components/ProcessHeader"; import ProcessHeader from "../../components/ProcessHeader";
import ProcessFooter from "../../components/ProcessFooter"; import ProcessFooter from "../../components/ProcessFooter";
import ProcessTitle from "../../components/ProcessTitle"; import ProcessTitle from "../../components/ProcessTitle";
import { startProcess, saveTaskFirst,completeTask, inboundLiaisonDetail } from '@/api/process.js' import { startProcess, saveTaskForPub,completeTask, inboundLiaisonDetail } from '@/api/process.js'
export default { export default {
components: { components: {
ProcessHeader, ProcessHeader,
@@ -237,6 +250,9 @@ export default {
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
uploadFileLength: '',
commentText: ''
} }
}, },
computed: { computed: {
@@ -280,6 +296,7 @@ export default {
getFormFieldList (item) { getFormFieldList (item) {
this.$nextTick(() => { this.$nextTick(() => {
this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData
this.uploadFileLength = this.ch_pageData.fileTextList.length
this.roleForm = JSON.parse(JSON.stringify(item)).roleList this.roleForm = JSON.parse(JSON.stringify(item)).roleList
// this.ch_pageData.comityFileNum = this.fileTextList // this.ch_pageData.comityFileNum = this.fileTextList
}) })
@@ -318,30 +335,51 @@ export default {
}, },
// 保存按钮 // 保存按钮
handleSave() { handleSave() {
this.saveLoading = true
let _formData = new FormData()
_formData.append('taskIds', this.taskIds)
_formData.append('json', JSON.stringify({
ch_pageData: this.ch_pageData,
roleList: this.roleForm,
commentText: this.commentText
}))
saveTaskForPub(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
this.saveLoading = false
})
}, },
// 提交按钮 // 提交按钮
handleSubmit() { handleSubmit() {
let json = { if (this.commentText === '') {
leader: this.roleForm.leaderUserId, this.$message.warning('请输入审批意见')
ch_pageData: this.ch_pageData, } else {
roleList: this.roleForm, let json = {
} leader: this.roleForm.leaderUserId,
this.$refs['ch_pageData'].validate((valid) => { ch_pageData: this.ch_pageData,
if (valid) { commentText: this.commentText,
this.isSubmit = true roleList: this.roleForm,
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
}
})
}
} }
} }
} }
@@ -2,10 +2,7 @@
<div class="bzchStep6"> <div class="bzchStep6">
<ProcessHeader toggle> <ProcessHeader toggle>
<template slot="proName">外部标准化协会参会流程</template> <template slot="proName">外部标准化协会参会流程</template>
<template v-if="taskInfo === '技术管理中心主任审批'" slot="proNode">审批</template> <template slot="proNode">批准</template>
<template v-else-if="taskInfo === '费用管理部门会签'" slot="proNode">会签</template>
<template v-else-if="taskInfo === '技术委员会常务副主任/总院院长审定'" slot="proNode">审定</template>
<template v-else slot="proNode">批准</template>
</ProcessHeader> </ProcessHeader>
<div class="headerTabs"> <div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div> <div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
@@ -62,18 +59,18 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile"> <el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
<el-upload <span v-if="uploadFileLength < 1">{{ '-' }}</span>
action="" <span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
name="file" {{ item.name }} {{ ';'}}
:file-list="ch_pageData.fileTextList" </span>
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="类别:"> <el-form-item class="add-form-item" label="类别:">
{{ ch_pageData.sort || '-' }} <span v-if="ch_pageData.sort === '1'">计划内</span>
<span v-else>计划外</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -111,6 +108,19 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<el-collapse accordion>
<el-collapse-item :title="passTitle">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
:placeholder="passHolder"
v-model="textarea">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div> </div>
<div class="content" v-show="active === '3'"> <div class="content" v-show="active === '3'">
<div class="flow-list"> <div class="flow-list">
@@ -179,21 +189,6 @@
<loading :loading="loading">流程列表加载中</loading> <loading :loading="loading">流程列表加载中</loading>
</div> </div>
</div> </div>
<ProcessFooter
v-if="taskInfo !== '标准法规工程师修订完毕'"
show-submit
show-back
:isSubmitBack="isBack"
:submitLoading="isSubmit"
@back="handleSubmitNo"
@submit="handleSubmit"
/>
<ProcessFooter
v-else
show-submit
:submitLoading="isSubmit"
@submit="handleSubmit"
/>
</div> </div>
</template> </template>
@@ -230,6 +225,10 @@ export default {
taskInfo: this.$route.query.taskInfo, taskInfo: this.$route.query.taskInfo,
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
uploadFileLength: '',
passTitle: '回执说明',
passHolder: '请输入回执说明'
} }
}, },
computed: { computed: {
@@ -273,116 +272,12 @@ export default {
getFormFieldList (item) { getFormFieldList (item) {
this.$nextTick(() => { this.$nextTick(() => {
this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData
this.uploadFileLength = this.ch_pageData.fileTextList.length
this.textarea = JSON.parse(JSON.stringify(item)).commentText
this.roleForm = JSON.parse(JSON.stringify(item)).roleList this.roleForm = JSON.parse(JSON.stringify(item)).roleList
// this.ch_pageData.comityFileNum = this.fileTextList // this.ch_pageData.comityFileNum = this.fileTextList
}) })
}, },
/** 批量删除 */
del_paryForm() {
if (this.deleteDataList.length < 1) {
this.$message.warning("请选择一条数据进行删除");
} else {
this.$confirm("您确认删除这些数据?", "提示", {
confirmButtonText: "确认",
confirmButtonClass: "common-button-primary",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
let exits = [];
this.deleteDataList.map(item => {
let index;
index = this.ch_pageData.myPartRole.findIndex(items => {
return items.id === item;
});
if (index > -1) {
this.ch_pageData.myPartRole.splice(index, 1);
}
exits.push(item);
});
this.deleteDataList = [];
}).catch(() => {
});
}
},
selectedDelete(val) {
this.deleteDataList = val
},
// 退回按钮
handleSubmitNo() {
let json = {
passFlag: '0',
ch_pageData: this.ch_pageData,
roleList: this.roleForm
}
if (this.taskInfo === '技术管理中心主任审批') {
json.manageDepartmentList = this.roleForm.feeUserId
} else if (this.taskInfo === '费用管理部门会签') {
json.manageDepartment = this.$store.getters.userInfo.userId
json.president = this.roleForm.engineerUserId
} else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
json.engineerSumDone = this.roleForm.startUser
} else {
json = {
ch_pageData: this.ch_pageData,
roleList: this.roleForm
}
}
this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isBack = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isBack = false
});
}
})
},
// 提交按钮
handleSubmit() {
let json = {
passFlag: '1',
ch_pageData: this.ch_pageData,
roleList: this.roleForm
}
if (this.taskInfo === '技术管理中心主任审批') {
json.manageDepartmentList = this.roleForm.feeUserId
} else if (this.taskInfo === '费用管理部门会签') {
json.manageDepartment = this.$store.getters.userInfo.userId
json.president = this.roleForm.engineerUserId
} else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
json.engineerSumDone = this.roleForm.startUser
} else {
json = {
ch_pageData: this.ch_pageData,
roleList: this.roleForm
}
}
this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
}
})
}
} }
} }
</script> </script>
@@ -62,18 +62,18 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile"> <el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
<el-upload <span v-if="uploadFileLength < 1">{{ '-' }}</span>
action="" <span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
name="file" {{ item.name }} {{ ';'}}
:file-list="ch_pageData.fileTextList" </span>
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item class="add-form-item" label="类别:"> <el-form-item class="add-form-item" label="类别:">
{{ ch_pageData.sort || '-' }} <span v-if="ch_pageData.sort === '1'">计划内</span>
<span v-else>计划外</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -111,6 +111,19 @@
</el-form> </el-form>
</div> </div>
</div> </div>
<el-collapse accordion>
<el-collapse-item :title="passTitle">
<div style="margin: 10px 0;">
<el-input
type="textarea"
:rows="3"
resize="none"
:placeholder="passHolder"
v-model="textarea">
</el-input>
</div>
</el-collapse-item>
</el-collapse>
</div> </div>
<div class="content" v-show="active === '3'"> <div class="content" v-show="active === '3'">
<div class="flow-list"> <div class="flow-list">
@@ -230,6 +243,10 @@ export default {
taskInfo: this.$route.query.taskInfo, taskInfo: this.$route.query.taskInfo,
taskIds: this.$route.query.taskIds, taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId, pId: this.$route.query.prcId,
uploadFileLength: '',
passTitle: '审批意见',
passHolder: '请输入审批意见'
} }
}, },
computed: { computed: {
@@ -261,6 +278,10 @@ export default {
}, },
getData() { getData() {
if (this.taskInfo === '标准法规工程师修订完毕') {
this.passTitle = '回执说明',
this.passHolder = '请输入回执说明'
}
const params = { const params = {
taskIds: this.taskIds, taskIds: this.taskIds,
pId: this.pId, pId: this.pId,
@@ -273,6 +294,7 @@ export default {
getFormFieldList (item) { getFormFieldList (item) {
this.$nextTick(() => { this.$nextTick(() => {
this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData this.ch_pageData = JSON.parse(JSON.stringify(item)).ch_pageData
this.uploadFileLength = this.ch_pageData.fileTextList.length
this.roleForm = JSON.parse(JSON.stringify(item)).roleList this.roleForm = JSON.parse(JSON.stringify(item)).roleList
// this.ch_pageData.comityFileNum = this.fileTextList // this.ch_pageData.comityFileNum = this.fileTextList
}) })
@@ -293,7 +315,7 @@ export default {
this.deleteDataList.map(item => { this.deleteDataList.map(item => {
let index; let index;
index = this.ch_pageData.myPartRole.findIndex(items => { index = this.ch_pageData.myPartRole.findIndex(items => {
return items.id === item; return items === item;
}); });
if (index > -1) { if (index > -1) {
this.ch_pageData.myPartRole.splice(index, 1); this.ch_pageData.myPartRole.splice(index, 1);
@@ -311,77 +333,90 @@ export default {
}, },
// 退回按钮 // 退回按钮
handleSubmitNo() { handleSubmitNo() {
let json = { if (this.textarea === '') {
passFlag: '0', this.$message.warning('请输入审批意见')
ch_pageData: this.ch_pageData,
roleList: this.roleForm
}
if (this.taskInfo === '技术管理中心主任审批') {
json.manageDepartmentList = this.roleForm.feeUserId
} else if (this.taskInfo === '费用管理部门会签') {
json.manageDepartment = this.$store.getters.userInfo.userId
json.president = this.roleForm.engineerUserId
} else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
json.engineerSumDone = this.roleForm.startUser
} else { } else {
json = { let json = {
passFlag: '0',
ch_pageData: this.ch_pageData, ch_pageData: this.ch_pageData,
commentText: this.textarea,
roleList: this.roleForm roleList: this.roleForm
} }
} if (this.taskInfo === '技术管理中心主任审批') {
this.$refs['ch_pageData'].validate((valid) => { json.manageDepartmentList = this.roleForm.feeUserId
if (valid) { } else if (this.taskInfo === '费用管理部门会签') {
this.isBack = true json.manageDepartment = this.$store.getters.userInfo.userId
const params = new FormData(); json.president = this.roleForm.engineerUserId
params.set('json', JSON.stringify(json)) } else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
params.set('userId', this.$store.getters.userInfo.userId) json.engineerSumDone = this.roleForm.startUser
params.set('taskId', this.taskIds) } else {
completeTask(params).then(res => { json = {
if (res.success === true) { ch_pageData: this.ch_pageData,
this.$message.success('提交成功') commentText: this.textarea,
this.$router.push("/processCenter"); roleList: this.roleForm
} }
this.isBack = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isBack = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isBack = false
});
}
})
}
}, },
// 提交按钮 // 提交按钮
handleSubmit() { handleSubmit() {
let json = { if (this.textarea === '') {
passFlag: '1', this.$message.warning('请输入审批意见')
ch_pageData: this.ch_pageData,
roleList: this.roleForm
}
if (this.taskInfo === '技术管理中心主任审批') {
json.manageDepartmentList = this.roleForm.feeUserId
} else if (this.taskInfo === '费用管理部门会签') {
json.manageDepartment = this.$store.getters.userInfo.userId
json.president = this.roleForm.engineerUserId
} else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
json.engineerSumDone = this.roleForm.startUser
} else { } else {
json = { let json = {
passFlag: '1',
ch_pageData: this.ch_pageData, ch_pageData: this.ch_pageData,
commentText: this.textarea,
roleList: this.roleForm roleList: this.roleForm
} }
} if (this.taskInfo === '技术管理中心主任审批') {
this.$refs['ch_pageData'].validate((valid) => { json.manageDepartmentList = this.roleForm.feeUserId
if (valid) { } else if (this.taskInfo === '费用管理部门会签') {
this.isSubmit = true json.manageDepartment = this.$store.getters.userInfo.userId
const params = new FormData(); json.president = this.roleForm.engineerUserId
params.set('json', JSON.stringify(json)) } else if (this.taskInfo === '技术委员会常务副主任/总院院长审定') {
params.set('userId', this.$store.getters.userInfo.userId) json.engineerSumDone = this.roleForm.startUser
params.set('taskId', this.taskIds) } else {
completeTask(params).then(res => { json = {
if (res.success === true) { ch_pageData: this.ch_pageData,
this.$message.success('提交成功') commentText: this.textarea,
this.$router.push("/processCenter"); roleList: this.roleForm
} }
this.isSubmit = false
});
} }
}) this.$refs['ch_pageData'].validate((valid) => {
if (valid) {
this.isSubmit = true
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskId', this.taskIds)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
});
}
})
}
} }
} }
} }