| | |
| | | <el-form :model="state.dataForm" ref="dataForm" :inline="true" style="margin-top: 10px" label-width="180px" > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目名称(事由):"> |
| | | <el-form-item label="出差事由:"> |
| | | <span>{{state.dataForm.projectName}}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-upload :disabled="projectType==='view' || isView" accept=".pdf" :action="state.uploadUrl" :headers="state.header" method="post" :on-success="(res, uploadFile)=>handleAvatarSuccess(res, uploadFile)" :on-exceed="showTip" :on-preview="handlePictureCardPreview" :limit='1' v-model:file-list="state.fileList" :before-upload="picSize" :on-remove="(file, uploadFiles)=>handleRemove(file, uploadFiles)"> |
| | | <el-button type="primary">上传附件PDF</el-button> |
| | | <template #tip> |
| | | <div class="el-upload__tip">上传文件尺寸小于5M,最多可上传1份</div> |
| | | <div class="el-upload__tip">上传文件尺寸小于15M,最多可上传1份</div> |
| | | </template> |
| | | </el-upload> |
| | | </div> |
| | |
| | | } |
| | | |
| | | const picSize = async (rawFile) => { |
| | | if(rawFile.size / 1024 / 1024 > 5){ |
| | | if(rawFile.size / 1024 / 1024 > 15){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件大小不能超过5M' |
| | | message: '文件大小不能超过15M' |
| | | }); |
| | | return false |
| | | } |
| | |
| | | const startGeneration = async () => { |
| | | const data = state.dataForm |
| | | let day = new Date(data.projectDateEnd).getTime() - new Date(data.projectDateStart).getTime(); |
| | | let dayCount = Math.floor(day / 86400000) ; |
| | | let dayCount = Math.floor(day / 86400000) + 1; |
| | | data.planTime = moment(data.projectDateStart).format('YYYY年MM月DD日') + ' 至 ' + moment(data.projectDateEnd).format('YYYY年MM月DD日') +','+`共计${dayCount}天。` |
| | | |
| | | // state.jobCategoryArr.forEach(item => { |
| | |
| | | expertRemark: item.expertRemark ? item.expertRemark : '' |
| | | } |
| | | }) |
| | | console.log('dataList',state.dataList) |
| | | data.expertNum = data.tableData.length |
| | | data.isInside = '是' |
| | | console.log('dataList',state.dataList,data.expertNum) |
| | | try { |
| | | generateWordDocument(templatePath, data, '专家选用审批单.docx'); |
| | | } catch (error){ |