| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报销日期" prop="createTime"> |
| | | <el-form-item label="报销日期" prop="applyTime"> |
| | | <el-date-picker |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" |
| | |
| | | label="申请时间" |
| | | width="150" |
| | | align="center" |
| | | prop="createTime" |
| | | prop="applyTime" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> |
| | | <span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="预审状态" |
| | | label="申请材料状态" |
| | | width="140" |
| | | align="center" |
| | | prop="checkstatus" |
| | |
| | | label="操作" |
| | | align="center" |
| | | fixed="right" |
| | | width="300" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | |
| | | v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | >删除</el-button |
| | | ><span class="button-delete" |
| | | ><i class="el-icon-delete"></i>删除</span |
| | | ></el-button |
| | | > |
| | | <!-- v-hasPermi="['project:funddetail:remove']" --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" align="center" width="120" label="功能"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" v-if="scope.row.uploadStates == 1" |
| | | >线下已报销</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="success" |
| | | v-else-if="scope.row.uploadStates == 0" |
| | | @click="Dooffline('1', scope.row)" |
| | | >线下报销</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-row |
| | | ><el-col :span="5"> |
| | | <el-form-item label="申请日期" prop="createTime"> |
| | | <el-form-item label="申请日期" prop="applyTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.createTime" |
| | | v-model="form.applyTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="申请日期" |
| | |
| | | import { getUser, getUserProfile } from "@/api/system/user"; |
| | | import { treeselect } from "@/api/system/dept"; |
| | | import { getSubsidy } from "@/api/project/travelcity"; |
| | | import { addorupdateFund } from "@/api/project/fund"; |
| | | import { listReportname, listUser } from "@/api/project/organization"; |
| | | import { getToken } from "@/utils/auth"; |
| | | export default { |
| | |
| | | |
| | | handleExceed() { |
| | | this.$message.error(`上传文件数量不能超过 ${5} 个!`); |
| | | }, |
| | | Dooffline(a, value) { |
| | | value.uploadStates = 1; |
| | | value.notes = "线下已报销"; |
| | | addorupdateFund(value).then(res => { |
| | | if (res.code == 200) { |
| | | this.$modal.msgSuccess("记录成功"); |
| | | } else { |
| | | this.$modal.msgError(res.msg); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | //文件上传成功回调 |
| | |
| | | var aEle = document.createElement("a"); |
| | | aEle.href = |
| | | curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"]; |
| | | aEle.click(); |
| | | console.log(aEle.href); |
| | | // 添加Authorization头部 |
| | | fetch(aEle.href, { |
| | | headers: this.headers |
| | | }) |
| | | .then(response => { |
| | | // 将文件下载链接作为blob对象进行下载 |
| | | return response.blob(); |
| | | }) |
| | | .then(blob => { |
| | | const url = window.URL.createObjectURL(new Blob([blob])); |
| | | console.log(url); |
| | | const link = document.createElement("a"); |
| | | link.href = url; |
| | | const name = fileUrl["downloadName"]; |
| | | link.setAttribute("download", name); // 替换file.pdf为实际的文件名 |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | link.parentNode.removeChild(link); |
| | | }); |
| | | }); |
| | | |
| | | // downloadconfirmationinfo(id).then((response) => { |
| | | // var fileUrl = response; |
| | | // //获取当前网址 |
| | | // var urlBase = process.env.VUE_APP_BASE_API; |
| | | // var curWWWPath = window.document.location.href; |
| | | // var pos = curWWWPath.indexOf(window.document.location.pathname); |
| | | // // 创建a标签 |
| | | // var aEle = document.createElement("a"); |
| | | // aEle.href = |
| | | // curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"]; |
| | | // aEle.click(); |
| | | // }); |
| | | }, |
| | | |
| | | /** 查询报销申请列表 */ |
| | |
| | | //明显提示审批退回记录 |
| | | rowClassName({ row, column, rowIndex, columnIndex }) { |
| | | //此判断为最后三行 |
| | | if (row.backflowlevel == 199) { |
| | | return "addClassva"; |
| | | if (row.recordstatus == -1 && row.backflowlevel != null) { |
| | | return "error-row"; |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <!-- <style scoped> --> |
| | | <!-- 不可加scoped,会独立样式element访问不到 --> |
| | | <style> |
| | | <style lang="scss" scoped> |
| | | .addClassva { |
| | | /* background: #10aec2; */ |
| | | background: #e8f4ff !important; |
| | | /* color:whitesmoke; */ |
| | | } |
| | | .button-delete { |
| | | color: rgb(236, 69, 69); |
| | | } |
| | | ::v-deep.el-table .error-row { |
| | | background: #fcebeb; |
| | | } |
| | | </style> |