From d4b7ae43a0904b9b19a6d11fa06ae45e5f8f176d Mon Sep 17 00:00:00 2001 From: zhutianqi Date: Fri, 29 Oct 2021 14:00:58 +0800 Subject: [PATCH] commit --- .../pages/components/ProcessFooter.vue | 2 +- .../pages/creatProcess/zchh/step1.vue | 431 ++++++++++++---- .../pages/creatProcess/zchh/step2.vue | 474 ++++++++++++++++++ .../tabComponents/processCenter/index.vue | 39 +- src/router/index.js | 9 + 5 files changed, 853 insertions(+), 102 deletions(-) create mode 100644 src/pages/processCenter/pages/creatProcess/zchh/step2.vue diff --git a/src/pages/processCenter/pages/components/ProcessFooter.vue b/src/pages/processCenter/pages/components/ProcessFooter.vue index c6537ed59..d594b5bb4 100644 --- a/src/pages/processCenter/pages/components/ProcessFooter.vue +++ b/src/pages/processCenter/pages/components/ProcessFooter.vue @@ -426,7 +426,7 @@ export default { text-align: right; background: #fff; z-index: 999; - padding: 0; + padding: 0 10px 0 0; .footer-line { height: 1px; box-shadow: 0 -1px 2px 0px #e8e8e8; diff --git a/src/pages/processCenter/pages/creatProcess/zchh/step1.vue b/src/pages/processCenter/pages/creatProcess/zchh/step1.vue index 1d7dd9a29..fc0833f3b 100644 --- a/src/pages/processCenter/pages/creatProcess/zchh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/zchh/step1.vue @@ -11,9 +11,8 @@
@@ -25,20 +24,15 @@ - - - - + + placeholder="请选择参会时间"> - - - - - - 点击上传 - + +
+
{{ item.name }}
+
{{ foldFormFlag ? '隐藏基础信息' : '展开基础信息' }}
- + + + + + + + + + + +
+
+ {{ item.name }} +
+
+
+ + 点击上传 + +
+
+
+
+
+ + -
- - 添加 - - - 批量删除 - -
- - + -
- - 添加 - - - 批量删除 - -
- + + + + + + +
+ + +
+
+
@@ -221,44 +274,22 @@ class="label-input-form"> - +

流程发起人

- - + +
- + - +

法规认证部部长

- - -
-
-
-
- - - -

法规认证部副总监

-
- - -
-
-
-
- - - -

公司副总

-
- - + +
@@ -268,14 +299,40 @@
+ + +
+ +

点击或拖拽上传文件

+
+
+
+ @@ -283,7 +340,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; - import { saveTaskFirst } from "api/process"; + import { saveTaskFirst,inboundLiaisonDetail } from "api/process"; export default { name: "zchhStep1", @@ -294,48 +351,222 @@ }, data() { return { + fileList: [], + commentText: '', isSubmit: false, saveLoading: false, active: "1", //默认显示 + hhform: { + title2: '', + modelNameList2: '', + modelList2: [] + }, + formRules: { + title2: [ + { required: true, message: '请输入会议总结', trigger: 'blur' }, + ], + modelNameList2: [ + { required: true, message: '请上传课题组通知', trigger: 'blur' }, + ] + }, rhform: { title: '', - Participants: '', content: '', price: '', time: '', time2: '', place: '', Company: '', - summary: '', + modelNameList: '', + modelList: [] }, - formRules: {}, foldFormFlag: true, data1: [], data2: [], - roleForm: {}, - roleFormRules: {} + roleForm: { + revisionId: this.$store.getters.userInfo.userId, + revisionIdName: this.$store.getters.userInfo.userName, + approvalId: '', + approvalIdName: '', + }, + roleFormRules: { + approvalIdName: [ + {required: true, message: '请选择法规认证部部长', trigger: 'change'}, + ], + }, + fileMadel: false, + fileUrl: 'api/att/attFile/upload', + nodeList: [], + type: '', + drawerTitle: '', + modalshowflag: false, + taskIds: this.$route.query.taskIds, + pId: this.$route.query.prcId, } }, methods: { + updataFj (item) { + window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id + }, + getData() { + return new Promise((resolve, reject) => { + inboundLiaisonDetail({ + taskIds: this.taskIds, + pId: this.pId + }).then(res => { + let data = JSON.parse(res.mesg) + this.json = data + this.data1 = data.data1 + this.data2 = data.data2 + this.rhform.commentText = data.commentText + this.rhform.content = data.content + this.rhform.price = data.price + this.rhform.time = data.time + this.rhform.title = data.title + this.rhform.Company = data.Company + this.rhform.place = data.place + this.rhform.time2 = data.time2 + this.rhform.modelList = data.modelList + this.rhform.modelNameList = data.modelNameList + this.hhform.title2 = data.title2 || '' + this.hhform.modelList2 = data.modelList2 || [] + this.hhform.modelNameList2 = data.modelNameList2 || '' + this.roleForm.approvalId = data.approvalId + this.roleForm.approvalIdName = data.approvalIdName + }).catch(e => { + }) + }) + }, + // 导入按钮 上传之前的钩子 + beginImportFile(file) { + var filename = file.name + var index1 = filename.lastIndexOf('.') + var index2 = filename.length + var fileSuffix = filename.substring(index1, index2) + // const fileSuffix = file.name.split('.')[1] // 后缀名 + // 判断上传文件格式 + if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx') { + return true + } else { + this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS文件') + return false + } + // 判断文件上传大小 + // eslint-disable-next-line no-unreachable + if (file.size / 1024 / 1024 <= 200) { + return true + } else { + this.$message.error('文件' + file.name + '大小不超过200M') + return false + } + return true + }, + importFileSuccess(response, file) { + if (response.ok) { + this.hhform.modelList2.push(response.data) + let list = '' + this.hhform.modelList2.forEach(item => { + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.hhform.modelNameList2 = list + this.$message({ + showClose: true, + message: response.message, + type: 'success' + }) + } else { + this.$message.error('程序异常,上传失败') + } + }, + importFileRemove(file, fileList) { + let list = '' + this.hhform.modelList2 = [] + fileList.forEach(item => { + this.hhform.modelList2.push(item) + if (list.length > 0) { + list += ',' + list += item.name + } else { + list+= item.name + } + }) + this.hhform.modelNameList2 = list + }, + fileUpload() { + this.fileList = this.hhform.modelList2 + this.fileMadel = true + }, handleTabs(type) { this.active = type; }, // 切换tabs foldForm() { this.foldFormFlag = !this.foldFormFlag }, // 基础信息显隐 - handleSave() { - }, // 保存事件 handleSubmit() { - console.log(this.rhform); + this.$refs['hhForm'].validate((valid) => { + if (valid) { + let info = 0 + this.data2.forEach((item, index) =>{ + if (!item.info) { + info++ + } + }) + if (info > 0) { + return this.$message.warning('请选择是否参会') + } else{ + this.$refs['Form'].validate((valid) => { + if (valid) { + this.isSubmit = true + var json = Object.assign(this.rhform, this.roleForm, this.hhform) + json.commentText = this.commentText + json.data1 = this.data1 + json.data2 = this.data2 + 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 + } else { + this.$message.warning('流程启动失败') + this.isSubmit = false + } + }) + } else { + return this.$message.warning('请完善人员信息') + } + }) + } + } else { + return this.$message.warning('请完善会后信息') + } + }) }, // 提交事件 - handleSelectionChange1() { - }, // table1选中change事件 - handleSelectionChange2() { - }, // table2选中change事件 - choiceZRR() { + choiceZRR(type, title, id) { + this.nodeList = [] + this.nodeList.push(id) + this.type = type + this.drawerTitle = title + this.modalshowflag = true }, // 点击人员input事件 + checkedRole(data) { + if (this.type === 'approvalId') { + this.roleForm.approvalId = data[0].id + this.roleForm.approvalIdName = data[0].name + } + }, // 选择人员确认事件 }, - mounted() {} + mounted() { + this.getData() + } }; diff --git a/src/pages/processCenter/pages/creatProcess/zchh/step2.vue b/src/pages/processCenter/pages/creatProcess/zchh/step2.vue new file mode 100644 index 000000000..33a994a10 --- /dev/null +++ b/src/pages/processCenter/pages/creatProcess/zchh/step2.vue @@ -0,0 +1,474 @@ + + + + + + + diff --git a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue index 9ab14f7cf..150e4b0ea 100644 --- a/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue +++ b/src/pages/processCenter/pages/processList/tabComponents/processCenter/index.vue @@ -1037,7 +1037,44 @@ export default { }) } break - // 外部标准化协会参会流程 + // 政策参会流程 + case '19': + if (row.taskInfo === '申请人填写表单') { + this.$router.push({ + name: 'zchhStep1', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } else if (row.taskInfo === '审核员批准') { + this.$router.push({ + name: 'zchhStep2', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } else if (row.taskInfo === '申请人修订申请信息') { + this.$router.push({ + name: 'zchhStep1', + query: { + taskIds: row.taskIds, + prcId: row.prcId, + prcNum: row.prcNum, + prcName: row.prcName, + prcType: row.prcType + } + }) + } + break + // 政策会后流程 case '21': if (row.taskInfo === '技术委员会分委会主任/入会代表所在中心主任提名入会代表') { this.$router.push({ diff --git a/src/router/index.js b/src/router/index.js index 7fe4f3114..7ae3a1428 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1069,6 +1069,15 @@ const routes = [ title: '政策课题会后流程' } }, + { + path: '/zchhStep2', + name: 'zchhStep2', + component: () => import('@/pages/processCenter/pages/creatProcess/zchh/step2.vue'), + meta: { + requireAuth: true, + title: '政策课题会后流程' + } + }, { path: '/wbsmStep1', name: 'wbsmStep1',