|
@@ -1,61 +1,8 @@
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
<div>
|
|
<div>
|
|
<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'"
|
|
<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status === 'audit' || status === 'taskFormDetail' || method==='view'"
|
|
- label-width="160px" @submit.native.prevent>
|
|
|
|
- <el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
|
- <span style="color: red;border-top: 20px">*</span>关联项目
|
|
|
|
- <el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')" plain>
|
|
|
|
- 新增
|
|
|
|
- </el-button>
|
|
|
|
- </el-divider>
|
|
|
|
- <el-row :gutter="15">
|
|
|
|
- <el-col :span="24">
|
|
|
|
- <vxe-table
|
|
|
|
- border
|
|
|
|
- :footer-method="footerMethod2"
|
|
|
|
- show-overflow
|
|
|
|
- show-footer
|
|
|
|
- ref="baseTable"
|
|
|
|
- :key="baseKey"
|
|
|
|
- class="vxe-table-element"
|
|
|
|
- :data="inputForm.projectList"
|
|
|
|
- style="margin-left: 5em"
|
|
|
|
- @cell-click=""
|
|
|
|
- @edit-closed=""
|
|
|
|
- keep-source
|
|
|
|
- :readonly="true"
|
|
|
|
- highlight-current-row
|
|
|
|
- :edit-rules="tableRules"
|
|
|
|
- :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
|
|
|
|
- >
|
|
|
|
- <vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
|
|
|
|
- <template v-slot:edit="scope">
|
|
|
|
- <el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
|
|
|
|
- </template>
|
|
|
|
- </vxe-table-column>
|
|
|
|
- <vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
|
|
|
|
- <template v-slot:edit="scope">
|
|
|
|
- <el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
|
|
|
|
- </template>
|
|
|
|
- </vxe-table-column>
|
|
|
|
- <vxe-table-column field="leader" align="center" title="项目负责人" :edit-render="{}">
|
|
|
|
- <template v-slot:edit="scope">
|
|
|
|
- <el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.leader"/>
|
|
|
|
- </template>
|
|
|
|
- </vxe-table-column>
|
|
|
|
- <vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
|
|
|
|
- <template v-slot:edit="scope">
|
|
|
|
- <el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
|
|
|
|
- </template>
|
|
|
|
- </vxe-table-column>
|
|
|
|
- <vxe-table-column title="操作" align="center" width="100">
|
|
|
|
- <template v-slot="scope">
|
|
|
|
- <el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-table-column>
|
|
|
|
- </vxe-table>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+ label-width="160px" @submit.native.prevent style="margin-bottom: 20px">
|
|
|
|
+
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
基本信息
|
|
基本信息
|
|
<el-link v-if="commonJS.isEmpty(tabName) && projectData.firstInstanceStatus === '5'"
|
|
<el-link v-if="commonJS.isEmpty(tabName) && projectData.firstInstanceStatus === '5'"
|
|
@@ -119,6 +66,62 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+
|
|
|
|
+ <el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
|
+ <span style="color: red;border-top: 20px">*</span>关联项目
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @click="insertEvent('base')" plain>
|
|
|
|
+ 新增
|
|
|
|
+ </el-button>
|
|
|
|
+ <span style="font-size: 14px;color: red;margin-left: 20px">(注:发起报告签发或报批签发时,一个申请仅可选择一个项目)</span>
|
|
|
|
+ </el-divider>
|
|
|
|
+ <el-row :gutter="15">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <vxe-table
|
|
|
|
+ border
|
|
|
|
+ :footer-method="footerMethod2"
|
|
|
|
+ show-overflow
|
|
|
|
+ show-footer
|
|
|
|
+ ref="baseTable"
|
|
|
|
+ :key="baseKey"
|
|
|
|
+ class="vxe-table-element"
|
|
|
|
+ :data="inputForm.projectList"
|
|
|
|
+ style="margin-left: 5em"
|
|
|
|
+ @cell-click=""
|
|
|
|
+ @edit-closed=""
|
|
|
|
+ keep-source
|
|
|
|
+ :readonly="true"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ :edit-rules="tableRules"
|
|
|
|
+ :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
|
|
|
|
+ >
|
|
|
|
+ <vxe-table-column field="name" align="center" title="项目名称" :edit-render="{}" show-overflow="title">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称" :readonly="true" v-model="scope.row.name"/>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="no" align="center" title="项目编号" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input :disabled="true" :readonly="true" placeholder="请填写项目编号" v-model="scope.row.no"/>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="leader" align="center" title="项目负责人" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.leader"/>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="createTime" align="center" title="创建时间" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input :disabled="true" placeholder="请填写创建时间" v-model="scope.row.createTime"/>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column title="操作" align="center" width="100">
|
|
|
|
+ <template v-slot="scope">
|
|
|
|
+ <el-button :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 附件-->
|
|
<!-- 附件-->
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
@@ -305,6 +308,9 @@
|
|
this.signetService.queryById(this.inputForm.id).then((data)=>{
|
|
this.signetService.queryById(this.inputForm.id).then((data)=>{
|
|
|
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
|
+ if(!this.inputForm.createByName){
|
|
|
|
+ this.inputForm.createByName=this.$store.state.user.name
|
|
|
|
+ }
|
|
var list=data.projectList
|
|
var list=data.projectList
|
|
this.inputForm.projectList=list
|
|
this.inputForm.projectList=list
|
|
this.inputForm.types=data.types
|
|
this.inputForm.types=data.types
|
|
@@ -375,6 +381,47 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 打开校审明细页面
|
|
// 打开校审明细页面
|
|
|
|
+ handleChange (types) {
|
|
|
|
+ let exists = false;
|
|
|
|
+ for (let key in types) {
|
|
|
|
+ //如果选择报告签发或报批签发,则需要验证项目选择的行数量,超过一行,则进行删除,并且判定第一行的项目是否符合报批或报告签发的限定
|
|
|
|
+ if (types[key] === '1713752829629239298' || types[key] === '1713752789795934210') {
|
|
|
|
+ exists = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(exists && this.inputForm.projectList.length>1){
|
|
|
|
+ this.inputForm.projectList = this.inputForm.projectList.slice(0, 1);
|
|
|
|
+ }
|
|
|
|
+ if(exists && this.inputForm.projectList.length>0){
|
|
|
|
+ if ('projectId' in this.inputForm.projectList[0]) {
|
|
|
|
+ //根据第一行项目的项目id查询是否符合报告签发 或者报批签发的选择条件,不符合则不允许选择
|
|
|
|
+
|
|
|
|
+ for (let key in this.inputForm.types) {
|
|
|
|
+ if (this.inputForm.types[key] === '1713752829629239298') { //报批签发
|
|
|
|
+ //根据id查询是否处于报批签发阶段
|
|
|
|
+ this.signetService.queryByProjectIdAndTypeStatus(this.inputForm.projectList[0].projectId,'2').then((data) => {
|
|
|
|
+ if(!data.success){
|
|
|
|
+ this.inputForm.projectList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ break;
|
|
|
|
+ }else if(this.inputForm.types[key] === '1713752789795934210'){ //报告签发
|
|
|
|
+ //根据id查询是否处于报告签发阶段
|
|
|
|
+ this.signetService.queryByProjectIdAndTypeStatus(this.inputForm.projectList[0].projectId,'1').then((data) => {
|
|
|
|
+ if(!data.success){
|
|
|
|
+ this.inputForm.projectList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log('包含 projectId 属性');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 打开校审明细页面
|
|
openSignetDetail (projectId) {
|
|
openSignetDetail (projectId) {
|
|
this.$refs.signetDetail.init(projectId,'view')
|
|
this.$refs.signetDetail.init(projectId,'view')
|
|
},
|
|
},
|
|
@@ -526,6 +573,22 @@
|
|
this.visible = false
|
|
this.visible = false
|
|
},
|
|
},
|
|
insertEvent(type) {
|
|
insertEvent(type) {
|
|
|
|
+ if(!this.inputForm.types){
|
|
|
|
+ this.$message.error('请先选择用印类型')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ console.log(this.inputForm.types)
|
|
|
|
+ console.log(this.inputForm.typeStatus)
|
|
|
|
+
|
|
|
|
+ let exists = false;
|
|
|
|
+ for (let key in this.inputForm.types) {
|
|
|
|
+ if (this.inputForm.types[key] === '1713752829629239298' || this.inputForm.types[key] === '1713752789795934210') {
|
|
|
|
+ exists = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
if (type === 'base') {
|
|
if (type === 'base') {
|
|
if (this.inputForm.projectList.length>=1){
|
|
if (this.inputForm.projectList.length>=1){
|
|
if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
|
|
if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
|
|
@@ -533,6 +596,10 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(exists && this.inputForm.projectList.length>=1){
|
|
|
|
+ this.$message.error('选择报告签发或报批签发,仅可选择一个项目')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.$refs.baseTable.insertAt({})
|
|
this.$refs.baseTable.insertAt({})
|
|
this.inputForm.projectList.push({})
|
|
this.inputForm.projectList.push({})
|
|
this.baseKey = Math.random()
|
|
this.baseKey = Math.random()
|
|
@@ -547,7 +614,18 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
openProgramPageForm(rowIndex) {
|
|
openProgramPageForm(rowIndex) {
|
|
- this.$refs.projectForm.init()
|
|
|
|
|
|
+ var type = '';
|
|
|
|
+ for (let key in this.inputForm.types) {
|
|
|
|
+ if (this.inputForm.types[key] === '1713752829629239298') { //报批签发
|
|
|
|
+ type = 2;
|
|
|
|
+ break;
|
|
|
|
+ }else if(this.inputForm.types[key] === '1713752789795934210'){ //报告签发
|
|
|
|
+ type = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.$refs.projectForm.init('',1,type)
|
|
this.programRow = rowIndex
|
|
this.programRow = rowIndex
|
|
console.log('11',this.programRow)
|
|
console.log('11',this.programRow)
|
|
},
|
|
},
|