sangwenwei 1 年間 前
コミット
9e90a5d158

+ 70 - 0
src/api/jy/InscriptionService.js

@@ -0,0 +1,70 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class GoOutService{
+	list (param) {
+		return request({
+			url: prefix +'/inscription/findList',
+			method: 'get',
+			params: param
+		})
+	}
+
+	saveForm (inputForm) {
+		return request({
+			url: prefix + `/inscription/saveForm`,
+			method: 'post',
+			data: inputForm
+		})
+	}
+
+	queryById (id) {
+		return request({
+			url: prefix +'/inscription/findById',
+			method: 'get',
+			params: {id: id}
+		})
+	}
+
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/inscription/updateStatusById",
+			method: "post",
+			data: data,
+		})
+	}
+	delete (ids) {
+		return request({
+			url: prefix+"/inscription/delete",
+			method: 'delete',
+			params: {id: ids}
+		})
+	}
+
+
+	adminEditForm(param){
+		return request({
+			url: prefix + "/inscription/adminEditForm",
+			method: "post",
+			data: param,
+		})
+	}
+
+	getPageTotal(inputForm){
+		return request({
+			url: prefix + "/inscription/getPageTotal",
+			method: "post",
+			data: inputForm,
+		})
+
+	}
+
+	downloadInscription (id) {
+		return request({
+			url: prefix + '/inscription/downloadInscription',
+			method: 'get',
+			params: {id: id},
+		})
+	}
+
+}

+ 406 - 0
src/views/common/InscriptionUpLoadComponent.vue

@@ -0,0 +1,406 @@
+<!--文件上传组件-->
+<template>
+  <div :key="uploadKey">
+    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> <span style="color: red; font-size: 20px">*</span>{{dividerName}}</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>
+    <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)" :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,
+    // 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: ''
+      }
+    },
+    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隐藏
+       */
+      async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+      	console.log('fileList',fileList)
+        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 (file.status !== 'ready') {
+        //   return
+        // }
+		  fileList.forEach((item)=>{
+			  let suffix = item.name.substring(item.name.lastIndexOf('.') + 1)
+				  if (suffix === 'pdf' || suffix === 'doc' || suffix === 'docx' || suffix === 'xls' || suffix === 'xlsx') {
+
+				  } else {
+					  this.$message.error('只有“pdf、doc、docx、xls、xlsx”格式文件的类型可以上传')
+					  this.dataListNew = []
+					  return
+				  }
+		  })
+        if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+          this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+          return
+        }
+        this.dataListNew = []
+        this.dataList.forEach((item) => {
+          this.dataListNew.push(item)
+        })
+        for (let item of fileList) {
+          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 await (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 !== {}) {
+              await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+                item.lsUrl = data
+              })
+            }
+          }
+			console.log('path',file);
+        }
+        this.tableKey = Math.random()
+        this.uploadKey = Math.random()
+
+	    this.$emit('updateSealType',this.dataListNew)
+      },
+      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) {
+      	console.log('row', row)
+	  	// 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)
+		  }
+		this.tableKey = Math.random()
+		this.uploadKey = Math.random()
+      },
+      /**
+       * 关闭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 === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+          return true
+        } else {
+          return false
+
+        }
+      },
+      fileLoadingFalse () {
+        this.fileLoading = false
+      },
+      // 开启/关闭页面的加载中状态
+      changeLoading (loading) {
+        if (this.commonJS.isNotEmpty(loading)) {
+          this.loading = loading
+        } else {
+          this.loading = false
+        }
+      }
+    }
+  }
+</script>
+<style>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+</style>

+ 3 - 1
src/views/flowable/task/TaskForm.vue

@@ -711,6 +711,7 @@ export default {
 		// Process_1701332165234 嘉溢-车辆维护
 		// Process_1701396100594 嘉溢-出差申请
 		// Process_1701410671521 嘉溢-外出申请
+		// Process_1701655913359 嘉溢-文印申请
 
 		// 驳回
 		reject(vars) {
@@ -766,7 +767,8 @@ export default {
 				this.procDefId.includes('Process_1701066623812') ||
 				this.procDefId.includes('Process_1701332165234') ||
 				this.procDefId.includes('Process_1701396100594') ||
-				this.procDefId.includes('Process_1701410671521')
+				this.procDefId.includes('Process_1701410671521') ||
+				this.procDefId.includes('Process_1701655913359')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 2 - 2
src/views/jy/driveInfo/DriveInfoList.vue

@@ -43,8 +43,8 @@
 					<vxe-column min-width="350" title="车辆识别号" field="driveIdentifyNumber"></vxe-column>
 					<vxe-column title="操作" width="230px" fixed="right" align="center">
 						<template  #default="scope">
-							<el-button    @click="edit(scope.row.id)">修改</el-button>
-							<el-button    @click="del(scope.row.id)">删除</el-button>
+							<el-button text type="primary" size="small"    @click="edit(scope.row.id)">修改</el-button>
+							<el-button text type="primary" size="small"    @click="del(scope.row.id)">删除</el-button>
 						</template>
 					</vxe-column>
 				</vxe-table>

+ 585 - 0
src/views/jy/inscription/InscriptionDia.vue

@@ -0,0 +1,585 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-dialog
+			:title="title"
+			:close-on-click-modal="false"
+			draggable
+			width="1300px"
+			@close="close"
+			@keyup.enter.native=""
+			v-model="visible">
+		<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="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</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-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="申请人" prop="createName"
+					>
+						<el-input :disabled="true" v-model="inputForm.createName" placeholder="请输入申请人名称" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="申请人部门" prop="officeName"
+					>
+						<el-input :disabled="true" v-model="inputForm.officeName" placeholder="请输入申请人部门" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="申请时间" prop="createTime">
+						<el-input :disabled="true" v-model="inputForm.createTime" placeholder="请输入申请时间" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="黑白页数量" prop="normalPage">
+						<el-input :disabled="true" v-model="inputForm.normalPage" placeholder="请输入黑白页数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="彩页数量" prop="colorPage"
+								  :rules="[
+								  {required: true, message:'彩页数量不能为空', trigger:'blur'}]">
+						<el-input oninput="value=value.replace(/[^\d]/g,'')" @change="updateNormal"  v-model="inputForm.colorPage" placeholder="请输入彩页数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="装订数量" prop="bookbindingNum"
+								  :rules="[
+								  {required: true, message:'装订数量不能为空', trigger:'blur'}]">
+						<el-input oninput="value=value.replace(/[^\d]/g,'')"  v-model="inputForm.bookbindingNum" placeholder="请输入装订数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="其他" prop="otherNum"
+								  :rules="[]">
+						<el-input  v-model="inputForm.otherNum" placeholder="请输入其他数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="文印内容" prop="content"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入文印内容"  maxlength="500"  style="width:100%" v-model="inputForm.content" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+		<UpLoadComponent ref="uploadComponent" @updateSealType="updateSealType"></UpLoadComponent>
+			<template #footer>
+			<span class="dialog-footer">
+			  <el-button  @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import InscriptionService from '@/api/jy/InscriptionService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from './ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/InscriptionUpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import OSSSerivce, {openWindowOnUrl,toHref} from '@/api/sys/OSSService'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				visible: false,
+				inputForm: {
+					id: '',
+					createName:this.$store.state.user.name,
+					officeName:this.$store.state.user.office.name,
+					createTime:this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+					normalPage:'',
+					colorPage:'',
+					bookbindingNum:'',
+					otherNum:'',
+					content:'',
+					files: [], // 附件信息
+					procInsId: '',
+					projectList:[],
+					minister:'',
+					examiner:'',
+					approver:''
+				},
+				baseKey: '',
+				keyWatch: '',
+				programRow:'',
+
+			}
+		},
+		InscriptionService:null,
+		commonApi: null,
+		created () {
+			this.inscriptionService=new InscriptionService()
+			this.commonApi = new CommonApi()
+			this.ossService = new OSSSerivce()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					createName:'',
+					officeName:'',
+					createTime:'',
+					normalPage:'',
+					colorPage:'',
+					bookbindingNum:'',
+					otherNum:'',
+					content:'',
+					files: [], // 附件信息
+					procInsId: '',
+					projectList:[],
+					minister:'',
+					examiner:'',
+					approver:'',
+					pageTotal:''
+				}
+				this.inputForm.id = id
+				console.log('this.inputForm.id', this.inputForm.id)
+				this.loading = false
+				this.visible = true
+				if (method === 'edit'){
+					this.title = '修改文印信息'
+				}else if (method === 'view'){
+					this.title = '查看文印信息'
+				}
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					// if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+
+					this.inscriptionService.queryById(this.inputForm.id).then((data)=>{
+						if (this.commonJS.isEmpty(this.inputForm.createName)){
+							this.inputForm.createName=this.$store.state.user.name
+						}
+						if (this.commonJS.isEmpty(this.inputForm.officeName)){
+							this.inputForm.officeName=this.$store.state.user.office.name							}
+						if (this.commonJS.isEmpty(this.inputForm.createTime)){
+							this.inputForm.createTime=this.moment(new Date()).format('YYYY-MM-DD')
+						}
+						this.inputForm = this.recover(this.inputForm, data)
+						this.inputForm.files=data.files
+						console.log('s',this.inputForm)
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							method = 'view'
+						}
+						console.log('me',method)
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'inscription',null,null,null,null,null)
+						this.loading = false
+					})
+					// }
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						if (this.commonJS.isEmpty(this.inputForm.examiner) && this.commonJS.isNotEmpty(this.inputForm.minister)){
+							this.inputForm.examiner=this.$store.state.user.id
+						}
+						if (this.commonJS.isEmpty(this.inputForm.minister)){
+							this.inputForm.minister=this.$store.state.user.id
+						}
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '副总经理审核') {
+									this.inputForm.status = '5'
+									this.inputForm.approver=this.$store.state.user.id
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.inscriptionService.updateStatusById(this.inputForm).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.inscriptionService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.projectList.length ===0) {
+						this.$message.error('请选择项目')
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.files)) {
+						this.$message.error('请上传附件')
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.colorPage)){
+						this.$message.error('请输入彩页数量')
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.bookbindingNum)){
+						this.$message.error('请输入装订数量')
+						this.loading = false
+						return
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inscriptionService.adminEditForm(this.inputForm).then((data) => {
+							this.visible = false
+							this.$emit('refreshList')
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.inscriptionService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.inscriptionService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+			updateSealType(files){
+				this.inputForm.files = this.$refs.uploadComponent.getDataList()
+				let page=''
+				this.inscriptionService.getPageTotal(this.inputForm).then((data)=>{
+					console.log('datqa',data)
+					page=data-this.inputForm.colorPage
+					console.log('page',page)
+					this.inputForm.normalPage=page
+				})
+
+				console.log('file1',this.inputForm.normalPage)
+			},
+			updateNormal(){
+				this.inputForm.normalPage = this.inputForm.pageTotal - this.inputForm.colorPage
+			}
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 561 - 0
src/views/jy/inscription/InscriptionForm.vue

@@ -0,0 +1,561 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+	<div>
+		<el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
+				 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="projectLeader" align="center" title="项目负责人" :edit-render="{}">
+							<template v-slot:edit="scope">
+								<el-input :disabled="true" placeholder="请填写项目负责人" v-model="scope.row.projectLeader"/>
+							</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-divider content-position="left"><i class="el-icon-document"></i>
+				基本信息
+			</el-divider>
+			<el-row  :gutter="15">
+				<el-col :span="12">
+					<el-form-item label="申请人" prop="createName"
+								  >
+						<el-input :disabled="true" v-model="inputForm.createName" placeholder="请输入申请人名称" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="申请人部门" prop="officeName"
+								  >
+						<el-input :disabled="true" v-model="inputForm.officeName" placeholder="请输入申请人部门" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="申请时间" prop="createTime">
+						<el-input :disabled="true" v-model="inputForm.createTime" placeholder="请输入申请时间" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="黑白页数量" prop="normalPage">
+						<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="true" v-model="inputForm.normalPage" placeholder="请输入黑白页数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="彩页数量" prop="colorPage"
+								  :rules="[
+								  {required: true, message:'彩页数量不能为空', trigger:'blur'}]">
+						<el-input oninput="value=value.replace(/[^\d]/g,'')" @change="updateSealType"  v-model="inputForm.colorPage" placeholder="请输入彩页数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="装订数量" prop="bookbindingNum"
+								  :rules="[
+								  {required: true, message:'装订数量不能为空', trigger:'blur'}]">
+						<el-input oninput="value=value.replace(/[^\d]/g,'')"  v-model="inputForm.bookbindingNum" placeholder="请输入装订数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="12">
+					<el-form-item label="其他" prop="otherNum"
+								  :rules="[]">
+						<el-input  v-model="inputForm.otherNum" placeholder="请输入其他数量" clearable></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="文印内容" prop="content"
+								  :rules="[ ]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" type="textarea" placeholder="请输入文印内容"  maxlength="500"  style="width:100%" v-model="inputForm.content" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<ProjectForm ref="projectForm" @getProgram="getProgram"></ProjectForm>
+		<UpLoadComponent ref="uploadComponent" @updateSealType="updateSealType"></UpLoadComponent>
+
+	</div>
+</template>
+
+<script>
+	import XEUtils from 'xe-utils'
+	import InscriptionService from '@/api/jy/InscriptionService'
+	import { ElDatePicker } from 'element-plus';
+	import ProjectForm from './ProjectForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import UpLoadComponent from '@/views/common/InscriptionUpLoadComponent'
+	import CommonApi from '@/api/cw/common/CommonApi'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import OSSSerivce, {openWindowOnUrl,toHref} from '@/api/sys/OSSService'
+	export default {
+		props: {
+			businessId: {
+				type: String,
+				default: ''
+			},
+			formReadOnly: {
+				type: Boolean,
+				default: false
+			},
+			status: {
+				type: String,
+				default: ''
+			}
+		},
+		data () {
+			return {
+				title: '',
+				method: '',
+				loading: false,
+				inputForm: {
+					id: '',
+					createName:this.$store.state.user.name,
+					officeName:this.$store.state.user.office.name,
+					createTime:this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+					normalPage:'',
+					colorPage:'',
+					bookbindingNum:'',
+					otherNum:'',
+					content:'',
+					files: [], // 附件信息
+					procInsId: '',
+					projectList:[],
+					minister:'',
+					examiner:'',
+					approver:''
+				},
+				baseKey: '',
+				keyWatch: '',
+				programRow:'',
+
+			}
+		},
+		InscriptionService:null,
+		commonApi: null,
+		created () {
+			this.inscriptionService=new InscriptionService()
+			this.commonApi = new CommonApi()
+			this.ossService = new OSSSerivce()
+		},
+		mounted () {
+		},
+		activated () {
+		},
+		components: {
+			ElDatePicker,
+			ProjectForm,
+			UserSelectSignatory,
+			UpLoadComponent,
+			SelectTree,
+		},
+		computed: {
+			bus: {
+				get () {
+					this.$refs.uploadComponent.setDividerName('附件')
+					return this.businessId
+				},
+				set (val) {
+					this.businessId = val
+				}
+			}
+		},
+		watch: {
+			'keyWatch': {
+				handler (newVal) {
+					console.log('几里路')
+					if (this.bus) {
+						if (this.bus !== 'false') {
+							this.init('', this.bus)
+						}
+					} else {
+						this.$nextTick(() => {
+							this.$refs.inputForm.resetFields()
+						})
+					}
+				}
+			},
+			'loading': {
+				handler (newVal) {
+					this.$emit('changeLoading', newVal)
+					this.$refs.uploadComponent.changeLoading(newVal)
+				}
+			}
+		},
+		methods: {
+			getKeyWatch(keyWatch) {
+				this.keyWatch = keyWatch
+			},
+			init(method, id) {
+				this.method = method
+				this.inputForm={
+					id: '',
+					createName:'',
+					officeName:'',
+					createTime:'',
+					normalPage:'',
+					colorPage:'',
+					bookbindingNum:'',
+					otherNum:'',
+					content:'',
+					files: [], // 附件信息
+					procInsId: '',
+					projectList:[],
+					minister:'',
+					examiner:'',
+					approver:''
+				}
+				this.inputForm.id = id
+				console.log('this.inputForm.id', this.inputForm.id)
+				this.loading = false
+				this.$nextTick(() => {
+					this.$refs.inputForm.resetFields()
+					this.loading = true
+					this.$refs.uploadComponent.clearUpload()
+					// if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+
+						this.inscriptionService.queryById(this.inputForm.id).then((data)=>{
+							if (this.commonJS.isEmpty(this.inputForm.createName)){
+								this.inputForm.createName=this.$store.state.user.name
+							}
+							if (this.commonJS.isEmpty(this.inputForm.officeName)){
+								this.inputForm.officeName=this.$store.state.user.office.name							}
+							if (this.commonJS.isEmpty(this.inputForm.createTime)){
+								this.inputForm.createTime=this.moment(new Date()).format('YYYY-MM-DD')
+							}
+							this.inputForm = this.recover(this.inputForm, data)
+							this.inputForm.files=data.files
+							console.log('s',this.inputForm)
+							if (this.status === 'audit' || this.status === 'taskFormDetail') {
+								method = 'view'
+							}
+							console.log('me',method)
+							this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'inscription',null,null,null,null,null)
+							this.loading = false
+						})
+					// }
+				})
+			},
+			saveForm(callback) {
+				this.doSubmit('save', callback)
+			},
+			startForm(callback) {
+				this.loading = true
+				if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+					this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							this.doSubmit('start', callback)
+						}
+					})
+				} else {
+					this.doSubmit('start', callback)
+				}
+			},
+			async agreeForm(callback) {
+				console.log('进入方法')
+				this.loading = true
+				await this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '2' ) { // status的值不等于“审核中”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						this.inputForm.status= '2'
+						if (this.commonJS.isEmpty(this.inputForm.examiner) && this.commonJS.isNotEmpty(this.inputForm.minister)){
+							this.inputForm.examiner=this.$store.state.user.id
+						}
+						if (this.commonJS.isEmpty(this.inputForm.minister)){
+							this.inputForm.minister=this.$store.state.user.id
+						}
+						this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then((data)=>{
+							if (this.commonJS.isNotEmpty(data)) {
+								if (data === '副总经理审核') {
+									this.inputForm.status = '5'
+									this.inputForm.approver=this.$store.state.user.id
+								}
+							}
+							let param = {status: this.inputForm.status, id: this.inputForm.id}
+							this.inputForm=JSON.stringify(this.inputForm)
+							this.inscriptionService.updateStatusById(this.inputForm).then(() => {
+								callback(data.businessTable, data.businessId, this.inputForm)
+								this.loading = false
+							}).catch(() => {
+								this.loading = false
+							})
+						})
+					}
+				})
+			},
+			reapplyForm(callback) {
+				this.loading = true
+				this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+					if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					} else {
+						this.doSubmit('reapply', callback)
+					}
+				})
+			},
+			// 表单提交
+			async doSubmit(status, callback) {
+				this.loading = true
+				console.log('5',this.inputForm)
+				if (status === 'save') {
+					// 暂存
+					this.loading = true
+					this.inputForm.status = '1'
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					this.inscriptionService.saveForm(this.inputForm).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+					return
+				} else if (status === 'start') {
+					if (this.inputForm.projectList.length ===0) {
+						this.$message.error('请选择项目')
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.files)) {
+						this.$message.error('请上传附件')
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.colorPage)){
+						this.$message.error('请输入彩页数量')
+						this.loading = false
+						return
+					}
+					if (this.commonJS.isEmpty(this.inputForm.bookbindingNum)){
+						this.$message.error('请输入装订数量')
+						this.loading = false
+						return
+					}
+					if (this.$refs.uploadComponent.checkProgress()) {
+						this.loading = false
+						return
+					}
+					this.inputForm.files = this.$refs.uploadComponent.getDataList()
+					// 送审  待审核
+					this.inputForm.status = '2'
+				} else if (status === 'agree') {
+					this.inputForm.status= '5'
+				} else if (status === 'reapply') {
+					this.inputForm.status = '2'
+				}
+				this.$refs['inputForm'].validate((valid) => {
+					if (valid) {
+						this.loading = true
+						console.log('form',this.inputForm)
+						this.inscriptionService.saveForm(this.inputForm).then((data) => {
+							callback(data.businessTable, data.businessId, this.inputForm)
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						}).catch(() => {
+							this.$refs.inputForm.resetFields()
+							this.loading = false
+						})
+					} else {
+						this.loading = false
+					}
+				})
+			},
+			close() {
+				this.inputForm = {
+					id:'',
+					projectList:[],
+					name:'',
+					no:'',
+					projectLeader:'',
+					projectCreateDate:'',
+					createById:'',
+					createByName:'',
+					createDate:'',
+					remarks:'',
+					files: [], // 附件信息
+					types:[], //用印类型
+					number:'', //用印份数
+					projectId:'',
+				}
+				this.visible = false
+			},
+			async updateStatusById(type, callback) {
+				this.loading = true
+				if (type === 'reject' || type === 'reback') {
+					this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// if (type === 'agree') {
+							//   // 同意
+							//   this.inputForm.status = '5'
+							// }
+							if (type === 'reject') {
+								// 驳回
+								this.inputForm.status = '4'
+							}
+							if (type === 'reback') {
+								// 撤回
+								this.inputForm.status = '3'
+							}
+							if (type === 'reject' || type === 'reback') {
+								let param = {status: this.inputForm.status, id: this.inputForm.id}
+								this.inscriptionService.updateStatusById(param).then(() => {
+									this.loading = false
+									callback()
+								})
+							}
+						}
+					})
+				} else if (type === 'hold') {
+					this.inscriptionService.queryById(this.inputForm.id).then((data) => {
+						if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							throw new Error()
+						} else {
+							// 终止
+							let param = {status: '1', id: this.inputForm.id}
+							this.inscriptionService.updateStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					})
+				}
+
+			},
+			insertEvent(type) {
+				if (type === 'base') {
+					if (this.inputForm.projectList.length>=1){
+						if (this.commonJS.isEmpty(this.inputForm.projectList[0].projectId)){
+							this.$message.error('第一行不能为空')
+							return
+						}
+					}
+					this.$refs.baseTable.insertAt({})
+					this.inputForm.projectList.push({})
+					this.baseKey = Math.random()
+				}
+				console.log('22',this.inputForm.projectList)
+			},
+			// 删除
+			removeEvent(row, rowIndex, type) {
+				if (type === 'base') {
+					this.$refs.baseTable.remove(row)
+					this.inputForm.projectList.splice(rowIndex, 1)
+				}
+			},
+			openProgramPageForm(rowIndex) {
+				this.$refs.projectForm.init()
+				this.programRow = rowIndex
+				console.log('11',this.programRow)
+			},
+			getProgram(rows) {
+				console.log('1',rows)
+				rows.forEach((item, index) => {
+					this.inputForm.programId = item.id
+					if (index === 0) {
+						let r = this.inputForm.projectList[this.programRow]
+						r.projectId=item.id
+						r.name = item.name
+						r.no = item.no
+						r.projectLeader = item.projectLeader
+						r.createTime = item.createTime
+						console.log('2',this.inputForm.projectList[this.programRow])
+					} else {
+						let r = {
+							projectId: item.id,
+							name: item.name,
+							no: item.no,
+							projectLeader: item.projectLeader,
+							createTime: item.createTime,
+						}
+						this.$refs.baseTable.insertAt(r)
+						this.inputForm.projectList.push(r)
+						this.baseKey = Math.random()
+					}
+
+				})
+				this.$forceUpdate()
+				this.programRow = ''
+				// this.inputForm.reconciliationArea = this.inputForm.financeInvoiceBaseDTOList[0].location
+			},
+			updateSealType(files){
+				this.inputForm.files = files
+				let page=''
+				this.inscriptionService.getPageTotal(this.inputForm).then((data)=>{
+					console.log('datqa',data)
+					page=data-this.inputForm.colorPage
+					console.log('page',page)
+					this.inputForm.normalPage=page
+				})
+				console.log('file1',this.inputForm.normalPage)
+			},
+
+
+		}
+
+	}
+</script>
+<style scoped>
+	/deep/ .el-input-number .el-input__inner {
+		text-align: left;
+	}
+	/deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+		font-weight:700;
+	}
+</style>

+ 473 - 0
src/views/jy/inscription/InscriptionList.vue

@@ -0,0 +1,473 @@
+<template>
+	<div class="page">
+		<el-form :inline="true"  v-if="searchVisible" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="关联项目" prop="projectName">
+				<el-input  placeholder="请填写项目名称"  v-model="searchForm.projectName"/>
+			</el-form-item>
+			<el-form-item v-if="showHideItem" label="申请人" prop="createById">
+				<UserSelectSignatory style="width: 100%" ref="userSelect2" :limit="1"
+									 :readonly="true" :modelValue="searchForm.createById"
+									 @update:modelValue='(value) => {searchForm.createById = value}'></UserSelectSignatory>			</el-form-item>
+			<el-form-item v-if="showHideItem"  prop="officeId" label="申请人部门">
+				<SelectTree
+					ref="officeTree"
+					:props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+					:url="`/system-server/sys/office/treeData?type=2`"
+					:value="searchForm.officeId"
+					size="default"
+					:accordion="true"
+					@getValue="(value) => {searchForm.officeId=value}"/>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="申请时间" prop="createDates">
+				<el-date-picker
+					placement="bottom-start"
+					format="YYYY-MM-DD"
+					value-format="YYYY-MM-DD"
+					v-model="searchForm.createDates"
+					type="daterange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+		<div class="jp-table top" style="">
+			<vxe-toolbar :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('inscription:add')" :disabled="isAdmin" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+				</template>
+				<template #tools>
+					<vxe-button
+						text
+						type="primary"
+						:title="searchVisible ? '收起检索' : '展开检索'"
+						icon="vxe-icon-search"
+						class="tool-btn"
+						@click="searchVisible = !searchVisible"
+					></vxe-button>
+				</template>
+			</vxe-toolbar>
+			<div style="height: calc(100% - 90px)">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					ref="clientTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column min-width="160" align="center" title="项目" field="projectName">
+						<template  #default="scope">
+							<el-link  type="primary" :underline="false"  @click="view(scope.row)">{{scope.row.projectName}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="160" align="center" title="申请人" field="createName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请人部门" field="officeName"></vxe-column>
+					<vxe-column min-width="160" align="center" title="申请时间" field="createTime"></vxe-column>
+					<vxe-column  min-width="150px" align="center" title="申请状态" field="status" fixed="right">
+						<template #default="scope">
+							<el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('program_project_list_info_status_info', scope.row.status, '')" effect="dark" >{{$dictUtils.getDictLabel("program_project_list_info_status", scope.row.status, '未登记')}} </el-button>
+						</template>
+					</vxe-column>
+					<vxe-column title="操作" width="150px" fixed="right" align="center">
+						<template  #default="scope">
+							<div v-if="isAdmin">
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='5'" @click="del(scope.row.id)">删除</el-button>
+								<el-button  size="small" text type="primary"  @click="adminEdit(scope.row)">修改</el-button>
+							</div>
+							<div v-else>
+								<el-button text type="primary" size="small" v-if="scope.row.status==='0' || scope.row.status==='1'|| scope.row.status==='3'" @click="del(scope.row.id)">删除</el-button>
+								<el-button v-if="(scope.row.status === '0'||scope.row.status === '1'|| scope.row.status === '3')" size="small" text type="primary"  @click="edit(scope.row)">修改</el-button>
+								<!--              当前申请人撤回-->
+								<el-button v-if="scope.row.createById === $store.state.user.id && scope.row.status==='2'" text type="primary" size="small" @click="reback(scope.row)">撤回</el-button>
+
+								<el-button v-if="scope.row.status==='2' && checkIsAudit(scope.row)" text type="primary" size="small" @click="examine(scope.row)">审核</el-button>
+								<el-button v-if="scope.row.status === '4'&&scope.row.createById === $store.state.user.id" text type="primary" size="small" @click="adjust(scope.row)">驳回调整</el-button>
+								<el-button v-if="scope.row.status ==='5'" text type="primary" size="small" @click="outExport(scope.row)">导出</el-button>
+							</div>
+						</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+
+			</div>
+		</div>
+		<InscriptionDia ref="inscriptionDia" @refreshList="refreshList"></InscriptionDia>
+	</div>
+
+</template>
+
+<script>
+	import UserSelect from '@/components/userSelect'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import InscriptionService from '@/api/jy/InscriptionService'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import userService from '@/api/sys/userService'
+	import pick from 'lodash.pick'
+	import SupplierChooseForm from '@/views/materialManagement/supplier/SupplierChooseForm'
+	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import InscriptionDia from './InscriptionDia'
+	export default {
+		data () {
+			return {
+				dialogTableVisible:false,
+				searchVisible: true,
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				num: 0,
+				searchForm: {
+					projectId: '',
+					projectName: '',
+					outMen: '',
+					officeId: '',
+					createById: '',
+					createDates:[],
+					targetCity:''
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				tableKey: '',
+				loading: false,
+				processDefinitionId: '',
+				procDefKey: '',
+				isAdmin: false,
+				create: '',
+				gridData:[],
+				typeData:[]
+			}
+		},
+		InscriptionService:null,
+		created () {
+			this.inscriptionService=new InscriptionService()
+		},
+		components: {
+			SelectTree,
+			UserSelect,
+			SupplierChooseForm,
+			UserSelectSignatory,
+			InscriptionDia
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.createName = this.$store.state.user.name
+				return this.$store.state.user
+			}
+		},
+		mounted () {
+			this.refreshList()
+		},
+		activated () {
+			this.refreshList()
+		},
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 新增
+			add () {
+				// 读取流程表单
+				let tabTitle = `发起流程【嘉溢-文印申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-文印申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: 'false',
+							isShow: false,
+							routePath: '/jy/inscription/InscriptionList'
+						}
+					})
+				})
+			},
+			// 修改
+			edit (row) {
+				let tabTitle = `发起流程【嘉溢- 文印申请】`
+				let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-文印申请]`
+				taskService.getTaskDef({ procDefId: this.processDefinitionId,
+					businessId: row.id,
+					businessTable: 'jy_inscription',
+					status: 'startAndHold'}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+							procDefId: this.processDefinitionId,
+							procDefKey: this.procDefKey,
+							status: 'startAndHold',
+							title: tabTitle,
+							formType: data.formType,
+							formUrl: data.formUrl,
+							formTitle: processTitle,
+							businessId: row.id,
+							businessTable: 'jy_inscription',
+							isShow: false,
+							routePath: '/jy/inscription/InscriptionList'
+						}
+					})
+				})
+			},
+			// 查看
+			view (row) {
+				this.$refs.inscriptionDia.init('view',row.id);
+
+			},
+			// 查询当前用户是否是管理员用户
+			checkIsAdmin () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.inscriptionService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					...this.searchForm
+				}).then((data) => {
+					console.log('x',data.records)
+					this.dataList = data.records
+					this.tablePage.total = data.total
+					this.tableKey = Math.random()
+					this.loading = false
+				})
+				this.checkIsAdmin()
+				processService.getByName('嘉溢-文印申请').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({ currentPage, pageSize }) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.inscriptionService.delete(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.$refs.searchForm.resetFields()
+				this.searchForm.projectId = '' // 重置时清空项目id
+				this.refreshList()
+			},
+
+			// 查看修改流程结果
+			detail (row) {
+				if (row.status !== '0' && row.status !== '1') {
+					this.inscriptionService.queryById(row.id).then((da)=>{
+						// eslint-disable-next-line eqeqeq
+						taskService.getTaskDef({
+							procInsId: row.procInsId,
+							procDefId: this.processDefinitionId
+						}).then((data) => {
+							this.$router.push({
+								path: '/flowable/task/TaskFormDetail',
+								query: {
+									...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									isShow: 'false',
+									readOnly: true,
+									title: '文印申请' + '流程详情',
+									formTitle: '文印申请' + '流程详情',
+									businessId: row.id,
+									status: 'reback',
+									method: 'view'
+								}
+							})
+						})
+					})
+				}
+			},
+			// 撤回入库修改
+			reback (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.inscriptionService.queryById(row.id).then((data) => {
+						if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(row.procInsId).then((data) => {
+								let form = {status: '3', id: row.id}
+								this.inscriptionService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+				})
+			},
+			// 驳回后调整
+			adjust (row) {
+				this.inscriptionService.queryById(row.id).then((data) => {
+					if (data.status !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核
+			examine (row) {
+				this.inscriptionService.queryById(row.id).then((data) => {
+					if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todo(row)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/inscription/InscriptionList',   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+
+			adminEdit(row){
+				this.$refs.inscriptionDia.init('edit',row.id);
+			},
+			openProgramPageForm() {
+				this.$refs.projectForm.init('1',false)
+			},
+			getProgram(row){
+				console.log('row',row)
+				row.forEach(item=>{
+					this.searchForm.projectId = item.id
+					this.searchForm.projectName=item.name
+				})
+
+			},
+			outExport(row){
+				this.inscriptionService.downloadInscription(row.id).then((res) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.tabName="文印申请单"
+					this.$utils.downloadWord(res, this.tabName)
+					this.loading = false
+				}).catch(function (err) {
+					this.loading = false
+					if (err.response) {
+						console.log(err.response)
+					}
+				})
+			}
+
+
+
+
+		}
+	}
+</script>

+ 365 - 0
src/views/jy/inscription/ProjectForm.vue

@@ -0,0 +1,365 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1100px"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+      <div v-if="isShow">
+<!--        <el-radio v-model="checkType" label="1" style="margin-right: 20px">项目</el-radio>-->
+<!--        <el-radio v-model="checkType" label="2" style="margin-right: 20px">报告</el-radio>-->
+<!--	    <el-radio v-model="checkType" label="3" style="margin-right: 20px">其他</el-radio>-->
+      </div>
+		<!--报告        -->
+		<div v-if="checkType === '2'">
+			<el-form size="large" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+					 @submit.native.prevent>
+				<!-- 搜索框-->
+				<el-form-item label="项目名称" prop="projectName">
+					<el-input size="large" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告号" prop="reportNo">
+					<el-input size="large" v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告创建时间" prop="createDates">
+					<el-date-picker
+						placement="bottom-start"
+						format="YYYY-MM-DD HH:mm:ss"
+						value-format="YYYY-MM-DD HH:mm:ss"
+						v-model="searchForm.createDates"
+						type="datetimerange"
+						range-separator="至"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期">
+					</el-date-picker>
+				</el-form-item>
+
+				<el-form-item>
+					<el-button type="primary" @click="list1()" size="large" icon="el-icon-search">查询</el-button>
+					<el-button @click="resetSearch1()" size="large" icon="el-icon-refresh-right">重置</el-button>
+				</el-form-item>
+			</el-form>
+
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="550px"
+				:loading="loading"
+				size="large"
+				ref="projectTable1"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				@sort-change=""
+				:sort-config="{remote:true}"
+				:data="dataList1"
+				:row-config="{isCurrent: true}"
+				:checkbox-config="{trigger: 'row'}"
+			>
+				<vxe-column type="seq" width="60" title="序号"></vxe-column>
+				<vxe-column type="checkbox" width="60px"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目名称" field="projectName" show-overflow="title"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目编号" field="projectNumber"></vxe-column>
+				<vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
+				<vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建时间" field="createTime"></vxe-column>
+
+			</vxe-table>
+			<vxe-pager
+				background
+				size="large"
+				:current-page="tablePage1.currentPage"
+				:page-size="tablePage1.pageSize"
+				:total="tablePage1.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle1">
+			</vxe-pager>
+		</div>
+      <div v-if="checkType === '1'" >
+          <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+            <!-- 搜索框-->
+            <el-form-item label="项目名称" prop="name">
+              <el-input v-model="searchForm.name" placeholder="请输入项目名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="项目编号" prop="no">
+              <el-input v-model="searchForm.no" placeholder="请输入项目编号" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="创建时间" prop="createDates">
+              <el-date-picker
+                placement="bottom-start"
+                format="YYYY-MM-DD HH:mm:ss"
+                value-format="YYYY-MM-DD HH:mm:ss"
+                v-model="searchForm.createDates"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期">
+              </el-date-picker>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="list()"  icon="el-icon-search">查询</el-button>
+              <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+            </el-form-item>
+          </el-form>
+
+          <vxe-table
+            border="inner"
+            auto-resize
+            resizable
+            height="550px"
+            :loading="loading"
+            ref="projectTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            :print-config="{}"
+            :sort-config="{remote:true}"
+            :data="dataList"
+            :row-config="{isCurrent: true}"
+            :checkbox-config="{trigger: 'row'}"
+          >
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+            <vxe-column type="radio" width="60px"></vxe-column>
+            <vxe-column min-width="160" align="center" title="项目名称" field="name" show-overflow="title"></vxe-column>
+            <vxe-column min-width="160" align="center" title="项目编号" field="no"></vxe-column>
+            <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建人" field="createById"></vxe-column>
+            <vxe-column min-width="160" align="center" title="创建时间" field="createTime"></vxe-column>
+
+          </vxe-table>
+          <vxe-pager
+            background
+            :current-page="tablePage.currentPage"
+            :page-size="tablePage.pageSize"
+            :total="tablePage.total"
+            :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+            :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+            @page-change="currentChangeHandle">
+          </vxe-pager>
+        </div>
+      <div style="height: 500px;" v-if="checkType === '3'">
+        <el-form  label-width="80px" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<el-row  :gutter="15">
+            <el-col :span="21">
+              <el-form-item label="详情" prop="detail">
+                <el-input style="width: 100%" type="textarea" maxlength="500" v-model="detail" placeholder="请输入详情" show-word-limit></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+		<template #footer>
+			<span class="dialog-footer">
+			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			  <el-button type="primary" v-if="method != 'view'" @click="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import ProjectInfoService from '@/api/jy/ProjectInfoService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+	    tablePage1: {
+		  total: 0,
+		  currentPage: 1,
+		  pageSize: 10,
+		  orders: []
+	    },
+        dataList: [],
+        dataList1: [],
+        searchForm: {
+          name: '',
+          no: '',
+          createBy: '',
+          projectMasterName: '',
+          projectNumber: '',
+          projectName: '',
+          createDates: [],
+		  reportNo: '',
+          status: ''
+        },
+        checkType: '',
+        detail: '',
+        isShow: true,
+        num: true,// num为true是多选,false是单选
+		reportType:''
+      }
+    },
+	  ProjectInfoService:null,
+    created () {
+    	this.projectInfoService=new ProjectInfoService()
+    },
+    components: {
+    },
+    methods: {
+      /**
+       * @param isShow
+       *      isShow为空,则可以选择“项目”或填写“其他”
+       *      isShow为false,则只可以选择“项目”,并且弹出提示
+       *      isShow为‘1’,则只可以选择“项目”,不弹出提示
+       *      isShow为其他任何值,则只可以填写“其他”
+       * @param num
+       *      num为空或者true,则允许多选
+       *      num为其他任何值,则只可以单选
+       */
+      init (isShow, num) {
+        if (this.commonJS.isEmpty(isShow)) {
+          this.isShow = true
+          this.checkType = '1'
+        } else {
+			if (isShow === false || isShow === 'false') {
+				if (this.checkType === '1') {
+					this.isShow = false
+					this.checkType = '1'
+					this.$message({message: '第一条为项目后面新增只能选择项目', type: 'warning', customClass: 'messageZindex'})
+				} else if (this.checkType === '2') {
+					this.isShow = false
+					this.checkType = '2'
+					this.$message({message: '第一条为报告后面新增只能选择报告', type: 'warning', customClass: 'messageZindex'})
+				}
+			} else if (isShow === '1') {
+				this.isShow = false
+				this.checkType = '1'
+			}else if (isShow === '2') {
+				this.isShow = false
+				this.checkType = '2'
+			} else {
+				this.isShow = false
+				this.checkType = '3'
+			}
+        }
+        if (this.commonJS.isEmpty(num) || num === true) {
+          this.num = true // num为true是多选,false是单选
+        } else {
+          this.num = false
+        }
+        this.visible = true
+        this.list()
+	    // this.list1()
+      },
+      // 表单提交
+      getProgram () {
+        let rows
+	    let rowsType
+        if (this.checkType === '1') {
+          if (this.commonJS.isEmpty(this.$refs.projectTable.getCheckboxRecords())) {
+            this.$message.error('请至少选择一条数据')
+            return
+          }
+          if (this.num === false) {
+            if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
+              this.$message.error('最多选择一条数据')
+              return
+            }
+          }
+          rows = this.$refs.projectTable.getCheckboxRecords()
+        } else if (this.checkType === '2') {
+			if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
+				this.$message.error('请至少选择一条数据')
+				return
+			}
+			if (this.num === false) {
+				if (this.$refs.projectTable1.getCheckboxRecords().length > 1) {
+					this.$message.error('最多选择一条数据')
+					return
+				}
+			}
+			rows = this.$refs.projectTable1.getCheckboxRecords()
+		} else {
+          if (this.commonJS.isEmpty(this.detail)) {
+            this.$message.error('请填写开票详情')
+            return
+          }
+          rows = [{projectName: this.detail}]
+		  rows.bj1 = 'bj1'
+        }
+
+        this.close()
+        this.$emit('getProgram', rows)
+      },
+      list () {
+        this.loading = true
+        this.searchForm.status = '5'
+		  this.projectInfoService.listByCreateId({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+        	console.log('aa',data.records)
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+	  // list1 () {
+		//   this.loading = true
+		//   this.searchForm.status = '5'
+		//   projectRecordsService.list1({
+		// 	'current': this.tablePage1.currentPage,
+		// 	'size': this.tablePage1.pageSize,
+		// 	'orders': this.tablePage1.orders,
+		// 	...this.searchForm
+		//   }).then((data) => {
+		// 	this.dataList1 = data.records
+		// 	this.tablePage1.total = data.total
+		// 	this.loading = false
+		//   })
+	  // },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+	  currentChangeHandle1 ({currentPage, pageSize}) {
+		this.tablePage1.currentPage = currentPage
+		this.tablePage1.pageSize = pageSize
+		this.list1()
+	  },
+	  resetSearch1 () {
+		this.$refs.searchForm.resetFields()
+		this.list1()
+	  },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>