sangwenwei 1 år sedan
förälder
incheckning
307a0bd70b

+ 435 - 0
src/views/common/SignatureUpLoadComponent2.vue

@@ -0,0 +1,435 @@
+<!--文件上传组件-->
+<template>
+  <div :key="uploadKey">
+<!--    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>-->
+	  <el-divider content-position="left">
+		  已签章附件信息
+	  </el-divider>
+	  <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
+               :limit="999" :http-request="httpRequest"
+               multiple
+               :on-exceed="(files, fileList) =>{
+                      $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+                     }"
+               :show-file-list="false"
+               :on-change="changes"
+               :on-progress="uploadVideoProcess"
+               :file-list="fileList">
+		<template v-if="auth==='view'&&uploadFlag===false" #tip>
+			<el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+		</template>
+		<template v-else #trigger>
+			<el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+		</template>
+    </el-upload>
+	  <el-button v-if="showSign" :loading="loading" type="info" style="float: right;" @click="clickSign">签章</el-button>
+    <div style="height: calc(100% - 80px);margin-top: 10px">
+      <!-- 进度条 -->
+      <el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
+      <el-table
+        ref="uploadTable"
+        v-loading="loading"
+        :key="tableKey"
+        :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="name" align="center">
+          <template #default="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image
+                style="width: 30px; height: 30px;padding-top: 4px;"
+                :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]"
+				:preview-teleported="true"
+              ></el-image>
+            </div>
+            <div v-else>
+              <el-link  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.name}}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template #default="scope">
+            {{getSize(scope.row.size)}}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template  #default="scope">
+            <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
+            <el-button text type="primary" key="02" icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index,fileList)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
+<!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+<!--    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>-->
+  </div>
+</template>
+
+<script>
+  // eslint-disable-next-line no-unused-vars
+  import OSSSerivce, {
+    httpRequest,
+    // eslint-disable-next-line no-unused-vars
+    handleRemove,
+    fileName,
+    exnameFix,
+    // eslint-disable-next-line no-unused-vars
+    beforeAvatarUpload,
+    // eslint-disable-next-line no-unused-vars
+    openWindowOnUrl,
+    // eslint-disable-next-line no-unused-vars
+    toHref
+  } from '@/api/sys/OSSService'
+  // import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  import moment from 'moment'
+  export default {
+    data () {
+      return {
+		  uploadKey: '',
+        progressFlag: false,
+        loadProgress: 0,
+        fileList: [],
+        dataList: [],
+        dataListNew: [],
+        url: '',
+        showViewer: false,
+        ossService: null,
+        auth: '',
+        directory: 'public',
+        maxValue: 300,
+        tableKey: '',
+        fileLoading: true,
+        dividerName: '',
+        uploadFlag: false,
+        delFlag: false,
+        createBy: '',
+        showDivider: true,
+        loading: false,
+        dataListLength: '',
+	    showSign: false,
+      }
+    },
+    watch: {
+    },
+    created () {
+      this.ossService = new OSSSerivce()
+    },
+    components: {
+      // ElImageViewer
+    },
+    mounted () {
+      window.onPreview = this.onPreview
+    },
+    methods: {
+      /**
+       * dividerName: 组件中divider的名称赋值
+       * showDivider: ‘附件‘Divider是否展示
+       *     注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       **/
+      setDividerName (dividerName, showDivider) {
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+        if (this.commonJS.isNotEmpty(showDivider)) {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        } else {
+          this.showDivider = true
+        }
+      },
+      /**
+       * 文件上传组件初始化
+       * @param auth
+       *    auth的值为"view"时,不可上传/编辑文件
+       *    auth为其他值时,可上传/编辑文件
+       * @param fileList  要显示到文件上传列表中的文件。
+       *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+       *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+       * @param directory  要存放到oss的哪个文件夹下。
+       *    注:值为空时,默认存放到"public"文件夹
+       * @param maxValue  上传文件允许的最大值,单位:MB
+       *    注:值为空时,默认值为300MB
+       * @param dividerName  组件中divider的名称
+       *    注:值为空时,默认值为‘附件’
+       * @param uploadFlag  ‘上传文件’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+       * @param delFlag  ‘删除’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+       * @param showDivider  ‘附件‘Divider是否展示
+       *    注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+	   *    * @param showSign ‘签章’按钮 是否展示
+	   *    注:值为空时,默认值为false 不展示
+	   *    showSign=audit的时候 ‘签章’按钮展示
+       */
+      async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider,showSign) {
+		  if (this.commonJS.isEmpty(showSign)) {
+			  this.showSign = false
+		  } else {
+			  if (showSign === 'audit') {
+				  this.showSign = true
+			  } else {
+				  this.showSign = false
+			  }
+		  }
+        await this.fileLoadingFalse()
+        if (this.commonJS.isEmpty(fileList)) {
+          this.fileLoading = true
+        } else {
+          this.dataListLength = fileList.length
+        }
+        if (this.commonJS.isEmpty(dividerName)) {
+          this.dividerName = '附件'
+        } else {
+          this.dividerName = dividerName
+        }
+        if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+          this.directory = directory
+        } else {
+          this.directory = 'public'
+        }
+        if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+          this.maxValue = maxValue
+        } else {
+          this.maxValue = 300
+        }
+        this.auth = auth
+        if (this.commonJS.isEmpty(uploadFlag)) {
+          this.uploadFlag = false
+        } else {
+          if (uploadFlag !== true && uploadFlag !== false) {
+            this.uploadFlag = false
+          } else {
+            this.uploadFlag = uploadFlag
+          }
+        }
+        if (this.commonJS.isEmpty(delFlag)) {
+          this.delFlag = false
+        } else {
+          if (delFlag !== true && delFlag !== false) {
+            this.delFlag = false
+            this.createBy = delFlag
+          } else {
+            this.delFlag = delFlag
+          }
+        }
+        for await (let item of fileList) {
+          await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+            item.lsUrl = data.url
+            item.size = data.size
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            if (this.dataListNew.length === fileList.length) {
+              this.fileLoading = true
+            }
+          })
+        }
+        // this.dataList = JSON.parse(JSON.stringify(fileList))
+        // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+        if (this.commonJS.isEmpty(showDivider)) {
+          this.showDivider = true
+        } else {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        }
+      },
+      async httpRequest (file) {
+        await httpRequest(file, fileName(file), this.directory, this.maxValue)
+      },
+      uploadVideoProcess (event, file, fileList) {
+        this.progressFlag = true // 显示进度条
+        this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+        if (this.loadProgress >= 100) {
+          this.loadProgress = 100
+          setTimeout(() => {
+            this.progressFlag = false
+          }, 1000) // 一秒后关闭进度条
+        }
+      },
+      getSize (value) {
+        if (this.commonJS.isEmpty(value)) {
+          return '0 B'
+        } else {
+          let val = parseInt(value)
+          if (this.commonJS.isEmpty(val)) {
+            return '0 B'
+          }
+          if (isNaN(val)) {
+            return '0 B'
+          }
+          if (val === 0) {
+            return '0 B'
+          }
+          let k = 1024
+          let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+          let i = Math.floor(Math.log(val) / Math.log(k))
+			let result = val / Math.pow(k, i);
+			let kb = parseFloat(result.toPrecision(3));
+          return kb + '' + sizes[i]
+        }
+      },
+		async changes (file, fileList) {
+			if (!exnameFix(file, '1', 'doc,docx,pdf')) {
+				for (let i = 0; i <this.dataListNew.length ; i++) {
+					this.deleteById(this.dataListNew[i],i,this.dataListNew)
+				}
+				this.fileList = []
+				this.dataListNew = []
+				// this.$message.error('文件仅支持 xml 格式!')
+				return
+			}
+			// if (file.status !== 'ready') {
+			//   return
+			// }
+			if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+				this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+				return
+			}
+			this.dataListNew = []
+			this.dataList.forEach((item) => {
+				this.dataListNew.push(item)
+			})
+			var fileListNames = []
+			for (let fileItem of this.fileList) {
+				fileListNames.push(fileItem.name)
+			}
+			for (let item of fileList) {
+				if(fileListNames.length === 0 || fileListNames.indexOf(item.name) === -1){
+					this.fileList.push(item)
+				}
+				item.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+				item.createBy = {
+					id: '',
+					name: ''
+				}
+				item.createBy.id = this.$store.state.user.id
+				item.createBy.name = this.$store.state.user.name
+				this.dataListNew.push(item)
+			}
+			for (let item of this.dataListNew) {
+				if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+					item.url = item.raw.url
+					if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+						this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+							item.lsUrl = data
+						})
+					}
+				}
+			}
+		},
+      showFile (row) {
+      	console.log('row', row)
+        openWindowOnUrl(row)
+      },
+      onPreview (url) {
+        this.url = url
+        this.showViewer = true
+      },
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      toHref (row) {
+        toHref(row)
+      },
+		async deleteById (row, index,fileList) {
+			// this.$refs.upload.handleRemove(this.dataListNew[index])
+			await this.dataListNew.splice(index, 1)
+			await this.dataList.splice(index, 1)
+			if (this.commonJS.isNotEmpty(row.id)) {
+				this.ossService.deleteMsgById(row.id)
+			}
+			var newFileList = [];
+			for (var i = 0; i < fileList.length; i++) {
+				if (fileList[i].name !== row.name) {
+					newFileList.push(fileList[i])
+				}
+			}
+			this.fileList = newFileList;
+
+		},
+      /**
+       * 关闭dialog时使用  清除el-upload中上传的文件
+       */
+      clearUpload () {
+        this.$refs.upload.clearFiles()
+        this.dataList = []
+        this.dataListNew = []
+        this.createBy = ''
+      },
+      /**
+       * 获取当前文件列表中的文件数据
+       */
+      getDataList () {
+        return this.dataListNew
+      },
+      /**
+       * 判断进度条是否结束,附件是否加载完成
+       * @returns {boolean}
+       */
+      checkProgress () {
+        if (this.progressFlag === true) {
+          this.$message.warning('请等待附件上传完成再进行操作')
+          return true
+        }
+        if (this.fileLoading === false) {
+          this.$message.warning('请等待附件加载完成再进行操作')
+          if (this.dataListLength === this.dataListNew.length) {
+            this.fileLoading = true
+          }
+          return true
+        }
+        return false
+      },
+      ifName (row) {
+        if (this.commonJS.isEmpty(row.name)) {
+          row.name = '---'
+          return false
+        }
+        let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+        if (suffix === 'doc' || suffix === 'docx') {
+          return false
+        } else {
+          return false
+        }
+      },
+      fileLoadingFalse () {
+        this.fileLoading = false
+      },
+      // 开启/关闭页面的加载中状态
+      changeLoading (loading) {
+        if (this.commonJS.isNotEmpty(loading)) {
+          this.loading = loading
+        } else {
+          this.loading = false
+        }
+      },
+		// 隐藏签章按钮
+		hideSign () {
+			this.showSign = false
+		},
+		// 点击签章按钮事件
+		clickSign () {
+			this.$emit('clickSign')
+		},
+    }
+  }
+</script>
+<style>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+</style>

+ 35 - 6
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -157,7 +157,7 @@
 									:rules="[
                                  {required: true, message:'有无报告不能为空', trigger:'blur'}
                   ]">
-						  <el-radio :disabled="isReport" v-model="inputForm.isHaveReport" v-for="item in $dictUtils.getDictList('is_have_report')" :label="item.value" style="margin-right: 20px">
+						  <el-radio @change="preInvoice()" :disabled="isReport" v-model="inputForm.isHaveReport" v-for="item in $dictUtils.getDictList('is_have_report')" :label="item.value" style="margin-right: 20px">
 							  {{item.label}}</el-radio>
 					  </el-form-item>
 				  </el-col>
@@ -181,7 +181,7 @@
                                 :rules="[
                                  {required: true, message:'项目分类不能为空', trigger:'blur'}
                   ]">
-                    <el-select v-model="inputForm.projectClassification" placeholder="请选择项目分类类型" clearable style="width: 100%;">
+                    <el-select @change="preInvoice()" v-model="inputForm.projectClassification" placeholder="请选择项目分类类型" clearable style="width: 100%;">
                       <el-option
                         v-for="item in $dictUtils.getDictList('project_classification')"
                         :key="item.value"
@@ -191,6 +191,15 @@
                     </el-select>
                   </el-form-item>
                 </el-col>
+				  <el-col :span="12">
+					  <el-form-item label="是否预开票" prop="isPreInvoice"
+									:rules="[
+
+                  ]">
+						  <el-radio :disabled="ifCheck" v-model="inputForm.isPreInvoice" v-for="item in $dictUtils.getDictList('is_pre_invoice')" :label="item.value" style="margin-right: 20px">
+							  {{item.label}}</el-radio>
+					  </el-form-item>
+				  </el-col>
                 <el-col :span="12">
                   <el-form-item label="审计期间" prop="auditYear"
                                 :rules="[
@@ -500,7 +509,8 @@
 		  projectClassification: '',
           programRow: '',
           cwProjectClientContactDTOList: [],
-		  isHaveReport:'1'
+		  isHaveReport:'1',
+			isPreInvoice:'0'
         },
         keyWatch: '',
         activeName: 'client',
@@ -536,7 +546,8 @@
 			  pageSize: 10,
 			  orders: []
 		  },
-		  isReport: false
+		  isReport: false,
+		  ifCheck:true
       }
     },
 	  cwProjectBusinessTypeService: null,
@@ -632,7 +643,8 @@
           reportType: '',
 			projectClassification: '',
           cwProjectClientContactDTOList: [],
-			isHaveReport:'1'
+			isHaveReport:'1',
+			isPreInvoice:'0'
         }
         this.inputForm.id = id
         this.loading = false
@@ -661,6 +673,9 @@
 			  if (this.commonJS.isEmpty(this.inputForm.isHaveReport)) {
 				  this.inputForm.isHaveReport = '1'
 			  }
+			  if (this.commonJS.isEmpty(this.inputForm.isPreInvoice)) {
+				  this.inputForm.isPreInvoice = '0'
+			  }
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
@@ -691,6 +706,7 @@
 			}else{
 				this.reportTypeFlag = false;
 			}
+			this.preInvoice()
 		}
 		,
       // 表单提交
@@ -1115,7 +1131,20 @@
 					this.isReport = true
 				}
 			})
-
+		},
+		preInvoice(){
+      	console.log('this.inputForm.reportType',this.inputForm.reportType)
+      	console.log('this.inputForm.projectClassification',this.inputForm.projectClassification)
+      	console.log('this.inputForm.isHaveReport',this.inputForm.isHaveReport)
+      		if (this.commonJS.isNotEmpty(this.inputForm.isHaveReport) && this.commonJS.isNotEmpty(this.inputForm.projectClassification) && this.commonJS.isNotEmpty(this.inputForm.reportType)){
+      			if (this.inputForm.isHaveReport === '1' && this.inputForm.projectClassification === '16' && this.inputForm.reportType === '10'){
+      				this.ifCheck = false
+				}else {
+					this.ifCheck = true
+				}
+			}else {
+				this.ifCheck = true
+			}
 		}
     }
   }

+ 12 - 0
src/views/cw/signatureDaily/SignatureDailyDia.vue

@@ -80,6 +80,7 @@
     </el-form>
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <UpLoadComponent2 ref="uploadComponent2"></UpLoadComponent2>
 		  <template #footer>
 			<span class="dialog-footer">
 			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
@@ -93,6 +94,7 @@
 <script>
   import SignatureDailyService from '@/api/cw/signatureDaily/SignatureDailyService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent'
   export default {
 	  props: {
 		  businessId: {
@@ -128,6 +130,7 @@
 				  name: '',
 				  status: '',
 				  files: [],
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 		  }
@@ -140,12 +143,14 @@
 	  },
 	  components: {
 		  UpLoadComponent,
+		  UpLoadComponent2,
 
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -169,6 +174,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -191,6 +197,7 @@
 				  name: '',
 				  status: '',
 				  files: [],
+				  signatureFiles:[]
 			  }
 			  if (method === 'add') {
 			    this.title = `新建日常签章`
@@ -207,6 +214,7 @@
 				  this.loading = true
 				  this.signatureDailyService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -222,8 +230,12 @@
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  console.log('this.inputForm',this.inputForm)
 					  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureDaily')
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureDaily')
 					  this.loading = false
 				  })
 			  })

+ 15 - 3
src/views/cw/signatureDaily/SignatureDailyFormTask.vue

@@ -71,6 +71,7 @@
     </el-form>
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent" @clickSign="clickSign"></UpLoadComponent>
+    <UpLoadComponent2 ref="uploadComponent2" ></UpLoadComponent2>
 
   </div>
 </template>
@@ -78,6 +79,7 @@
 <script>
   import SignatureDailyService from '@/api/cw/signatureDaily/SignatureDailyService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent2'
   import CommonApi from '@/api/cw/common/CommonApi'
   export default {
 	  props: {
@@ -114,7 +116,8 @@
 				  name: '',
 				  status: '',
 				  files: [],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 		  }
@@ -129,12 +132,13 @@
 	  },
 	  components: {
 		  UpLoadComponent,
-
+		  UpLoadComponent2
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -158,6 +162,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -180,7 +185,8 @@
 				  name: '',
 				  status: '',
 				  files: [],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles: []
 			  }
 			  // if (method === 'add') {
 			  //   this.title = `新建发票`
@@ -197,6 +203,7 @@
 				  this.loading = true
 				  this.signatureDailyService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -209,6 +216,9 @@
 					  if (this.commonJS.isEmpty(this.inputForm.files) || this.inputForm.files.length === 0) {
 						  this.inputForm.files = []
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
@@ -226,6 +236,7 @@
 							  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureDaily', null, null, null, null, false, false)
 						  }
 					  })
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureDaily', null, null, null, null, false, false)
 					  this.loading = false
 				  })
 			  })
@@ -328,6 +339,7 @@
 		  },
 		  close() {
 			  this.$refs.uploadComponent.clearUpload()
+			  this.$refs.uploadComponent2.clearUpload()
 			  this.$refs.inputForm.resetFields()
 			  this.inputForm = {
 				  id: '',

+ 15 - 3
src/views/cw/signatureDaily/SignatureReportDia.vue

@@ -119,6 +119,7 @@
     </el-form>
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <UpLoadComponent2 ref="uploadComponent2"></UpLoadComponent2>
 	<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
 		  <template #footer>
 			<span class="dialog-footer">
@@ -133,6 +134,7 @@
 <script>
   import SignatureReportService from '@/api/cw/signatureDaily/SignatureReportService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent'
   import ProgramPageForm from "./ProgramPageForm";
   import CommonApi from '@/api/cw/common/CommonApi'
   export default {
@@ -171,7 +173,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 			  programRow: '',
@@ -188,12 +191,14 @@
 	  },
 	  components: {
 		  UpLoadComponent,
+		  UpLoadComponent2,
 		  ProgramPageForm
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -217,6 +222,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -240,7 +246,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  }
 			  if (method === 'add') {
 				  this.title = `新建日常签章`
@@ -257,6 +264,7 @@
 				  this.loading = true
 				  this.signatureReportService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -275,8 +283,12 @@
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  console.log('this.inputForm',this.inputForm)
-					  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureDaily')
+					  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureReport')
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureReport')
 					  this.loading = false
 				  })
 			  })

+ 15 - 2
src/views/cw/signatureDaily/SignatureReportFormTask.vue

@@ -111,12 +111,15 @@
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent" @clickSign="clickSign"></UpLoadComponent>
 	<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+	  <UpLoadComponent2 ref="uploadComponent2" ></UpLoadComponent2>
+
   </div>
 </template>
 
 <script>
   import SignatureReportService from '@/api/cw/signatureDaily/SignatureReportService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent2'
   import ProgramPageForm from "./ProgramPageForm";
   import CommonApi from '@/api/cw/common/CommonApi'
   export default {
@@ -155,7 +158,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 			  programRow: '',
@@ -172,12 +176,14 @@
 	  },
 	  components: {
 		  UpLoadComponent,
+		  UpLoadComponent2,
 		  ProgramPageForm
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -201,6 +207,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -224,7 +231,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  }
 			  // if (method === 'add') {
 			  //   this.title = `新建发票`
@@ -241,6 +249,7 @@
 				  this.loading = true
 				  this.signatureReportService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -256,6 +265,9 @@
 					  if (this.commonJS.isEmpty(this.inputForm.projectList) || this.inputForm.projectList.length === 0) {
 						  this.inputForm.projectList = []
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
@@ -273,6 +285,7 @@
 							  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureReport', null, null, null, null, false, false)
 						  }
 					  })
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureReport', null, null, null, null, false, false)
 
 					  this.loading = false
 				  })

+ 12 - 0
src/views/program/signatureDaily/SignatureDailyDia.vue

@@ -80,6 +80,7 @@
     </el-form>
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <UpLoadComponent2 ref="uploadComponent2"></UpLoadComponent2>
 		  <template #footer>
 			<span class="dialog-footer">
 			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
@@ -93,6 +94,7 @@
 <script>
   import SignatureDailyService from '@/api/program/signatureDaily/SignatureDailyService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent2'
   export default {
 	  props: {
 		  businessId: {
@@ -128,6 +130,7 @@
 				  name: '',
 				  status: '',
 				  files: [],
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 		  }
@@ -140,12 +143,14 @@
 	  },
 	  components: {
 		  UpLoadComponent,
+		  UpLoadComponent2,
 
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -169,6 +174,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -191,6 +197,7 @@
 				  name: '',
 				  status: '',
 				  files: [],
+				  signatureFiles:[]
 			  }
 			  if (method === 'add') {
 			    this.title = `新建日常签章`
@@ -207,6 +214,7 @@
 				  this.loading = true
 				  this.signatureDailyService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -219,11 +227,15 @@
 					  if (this.commonJS.isEmpty(this.inputForm.files) || this.inputForm.files.length === 0) {
 						  this.inputForm.files = []
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
 					  console.log('this.inputForm',this.inputForm)
 					  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureDaily')
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureDaily')
 					  this.loading = false
 				  })
 			  })

+ 15 - 3
src/views/program/signatureDaily/SignatureDailyFormTask.vue

@@ -71,6 +71,7 @@
     </el-form>
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent" @clickSign="clickSign"></UpLoadComponent>
+	  <UpLoadComponent2 ref="uploadComponent2" ></UpLoadComponent2>
 
   </div>
 </template>
@@ -78,6 +79,7 @@
 <script>
   import SignatureDailyService from '@/api/program/signatureDaily/SignatureDailyService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent2'
   import CommonApi from '@/api/cw/common/CommonApi'
   export default {
 	  props: {
@@ -114,7 +116,8 @@
 				  name: '',
 				  status: '',
 				  files: [],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 		  }
@@ -129,12 +132,14 @@
 	  },
 	  components: {
 		  UpLoadComponent,
+		  UpLoadComponent2,
 
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -158,6 +163,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -180,7 +186,8 @@
 				  name: '',
 				  status: '',
 				  files: [],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  }
 			  // if (method === 'add') {
 			  //   this.title = `新建发票`
@@ -197,6 +204,7 @@
 				  this.loading = true
 				  this.signatureDailyService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -209,6 +217,9 @@
 					  if (this.commonJS.isEmpty(this.inputForm.files) || this.inputForm.files.length === 0) {
 						  this.inputForm.files = []
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
@@ -226,7 +237,7 @@
 								  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureDaily', null, null, null, null, false, false)
 							  }
 						  })
-
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureDaily', null, null, null, null, false, false)
 					  this.loading = false
 				  })
 			  })
@@ -329,6 +340,7 @@
 		  },
 		  close() {
 			  this.$refs.uploadComponent.clearUpload()
+			  this.$refs.uploadComponent2.clearUpload()
 			  this.$refs.inputForm.resetFields()
 			  this.inputForm = {
 				  id: '',

+ 15 - 3
src/views/program/signatureDaily/SignatureReportDia.vue

@@ -119,6 +119,7 @@
     </el-form>
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+    <UpLoadComponent2 ref="uploadComponent2"></UpLoadComponent2>
 	<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
 		  <template #footer>
 			<span class="dialog-footer">
@@ -133,6 +134,7 @@
 <script>
   import SignatureReportService from '@/api/program/signatureDaily/SignatureReportService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent2'
   import ProgramPageForm from "./ProgramPageForm";
   import CommonApi from '@/api/cw/common/CommonApi'
   export default {
@@ -171,7 +173,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 			  programRow: '',
@@ -194,6 +197,7 @@
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -217,6 +221,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -240,7 +245,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  }
 			  if (method === 'add') {
 				  this.title = `新建日常签章`
@@ -257,6 +263,7 @@
 				  this.loading = true
 				  this.signatureReportService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -275,8 +282,13 @@
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  console.log('this.inputForm',this.inputForm)
-					  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureDaily')
+					  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureReport')
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureReport')
+
 					  this.loading = false
 				  })
 			  })

+ 14 - 2
src/views/program/signatureDaily/SignatureReportFormTask.vue

@@ -111,12 +111,14 @@
     <!--        附件-->
     <UpLoadComponent ref="uploadComponent" @clickSign="clickSign"></UpLoadComponent>
 	<ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>
+	  <UpLoadComponent2 ref="uploadComponent2" ></UpLoadComponent2>
   </div>
 </template>
 
 <script>
   import SignatureReportService from '@/api/program/signatureDaily/SignatureReportService'
   import UpLoadComponent from '@/views/common/SignatureUpLoadComponent'
+  import UpLoadComponent2 from '@/views/common/SignatureUpLoadComponent2'
   import ProgramPageForm from "./ProgramPageForm";
   import CommonApi from '@/api/cw/common/CommonApi'
   export default {
@@ -155,7 +157,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  },
 			  keyWatch: '',
 			  programRow: '',
@@ -172,12 +175,14 @@
 	  },
 	  components: {
 		  UpLoadComponent,
+		  UpLoadComponent2,
 		  ProgramPageForm
 	  },
 	  computed: {
 		  bus: {
 			  get() {
 				  this.$refs.uploadComponent.setDividerName('附件')
+				  this.$refs.uploadComponent2.setDividerName('附件')
 				  return this.businessId
 			  },
 			  set(val) {
@@ -201,6 +206,7 @@
 			  handler(newVal) {
 				  this.$emit('changeLoading', newVal)
 				  this.$refs.uploadComponent.changeLoading(newVal)
+				  this.$refs.uploadComponent2.changeLoading(newVal)
 			  }
 		  }
 	  },
@@ -224,7 +230,8 @@
 				  status: '',
 				  files: [],
 				  projectList:[],
-				  procInsId:''
+				  procInsId:'',
+				  signatureFiles:[]
 			  }
 			  // if (method === 'add') {
 			  //   this.title = `新建发票`
@@ -241,6 +248,7 @@
 				  this.loading = true
 				  this.signatureReportService.findById(this.inputForm.id).then((data) => {
 					  this.$refs.uploadComponent.clearUpload()
+					  this.$refs.uploadComponent2.clearUpload()
 					  this.inputForm = this.recover(this.inputForm, data)
 					  this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 					  if (this.commonJS.isEmpty(this.inputForm.createName)) {
@@ -256,6 +264,9 @@
 					  if (this.commonJS.isEmpty(this.inputForm.projectList) || this.inputForm.projectList.length === 0) {
 						  this.inputForm.projectList = []
 					  }
+					  if (this.commonJS.isEmpty(this.inputForm.signatureFiles) || this.inputForm.signatureFiles.length === 0) {
+						  this.inputForm.signatureFiles = []
+					  }
 					  if (this.status === 'audit' || this.status === 'taskFormDetail') {
 						  method = 'view'
 					  }
@@ -273,6 +284,7 @@
 							  this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'signatureReport', null, null, null, null, false, false)
 						  }
 					  })
+					  this.$refs.uploadComponent2.newUpload(method, this.inputForm.signatureFiles, 'signatureReport', null, null, null, null, false, false)
 					  this.loading = false
 				  })
 			  })