| | |
| | | > |
| | | <el-option |
| | | v-for="item in personsList" |
| | | :key="item.reportNo" |
| | | :label="item.reportName" |
| | | :value="item.reportName" |
| | | > |
| | |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_travelexpensebelong" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | |
| | | <el-select |
| | | v-model="form.infoid" |
| | | @change="selectbaseinfo" |
| | | @clear="clearDonatorInfo" |
| | | clearable |
| | | filterable |
| | | placeholder="请选择捐献者" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <div style="margin-left: 10px;"> |
| | | <dict-tag |
| | | :options="dict.type.sys_DonationStatus" |
| | | :value="form.invoicecount" |
| | | /> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="margin-top: 10px"> |
| | |
| | | <el-form-item label="出差人" prop="travelers"> |
| | | <el-select v-model="form.travelers" clearable filterable allow-create ref="getReportname" |
| | | default-first-option placeholder="请选择" @change="getAccountinfo()"> |
| | | <el-option v-for="item in travelers" :key="item.reportNo" :label="item.reportName" |
| | | <el-option v-for="item in travelers" :label="item.reportName" |
| | | :value="item.reportName"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | @focus1="getPersons(scope.row)" |
| | | > |
| | | <el-option |
| | | v-for="item in personsSel" |
| | | :key="item.reportNo" |
| | | v-for="(item, index) in personsSel" |
| | | :key="`${item.reportNo}_${index}`" |
| | | :label="item.reportName" |
| | | :value="item.reportName" |
| | | > |
| | |
| | | @change="getAccountinfo2(scope.row, scope.row.persontype)" |
| | | > |
| | | <el-option |
| | | v-for="item in personsSel" |
| | | :key="item.reportNo" |
| | | v-for="(item, index) in personsSel" |
| | | :key="`${item.reportNo}_${index}`" |
| | | :label="item.reportName" |
| | | :value="item.reportName" |
| | | > |
| | |
| | | :src="pdfimg" |
| | | :preview-src-list="pdfimgsrcList" --> |
| | | > |
| | | <el-image |
| | | ref="imagePreview" |
| | | style="width: 95%; height: 90%" |
| | | :src="pdfimg" |
| | | :preview-src-list="pdfimgsrcList" |
| | | :initial-index="initialIndex" |
| | | @error="handleImageError" |
| | | @load="handleImageLoad" |
| | | > |
| | | </el-image> |
| | | <!-- <div slot="error" class="image-slot"> |
| | | <el-image |
| | | ref="imagePreview" |
| | | style="width: 95%; height: 90%" |
| | | :src="pdfimg" |
| | | @click="handleImageClick(initialIndex)" |
| | | > |
| | | </el-image> |
| | | <custom-image-viewer |
| | | :url-list="pdfimgsrcList" |
| | | :initial-index="currentIndex" |
| | | :visible="viewerVisible" |
| | | @update:visible="viewerVisible = $event" |
| | | @close="handleViewerClose" |
| | | /> |
| | | <!-- <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> --> |
| | | <!-- </el-image> --> |
| | |
| | | <el-image |
| | | style="width: 95%; height: 90%" |
| | | :src="invoicepdfimg" |
| | | :preview-src-list="invoicepdfimgsrcList" |
| | | @click="invoicehandleImageClick(initialIndex)" |
| | | > |
| | | <!-- <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> --> |
| | | </el-image> |
| | | <custom-image-viewer |
| | | :url-list="invoicepdfimgsrcList" |
| | | :initial-index="invoicecurrentIndex" |
| | | :visible="invoiceviewerVisible" |
| | | @update:visible="invoiceviewerVisible = $event" |
| | | @close="invoicehandleViewerClose" |
| | | /> |
| | | </div> |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | | </div> |
| | |
| | | import { getInfoBytheUserNo } from "@/api/project/externalperson"; |
| | | import { regionDataPlus, CodeToText } from "element-china-area-data"; |
| | | import Li_area_select from "@/components/Address"; |
| | | import CustomImageViewer from "@/components/CustomImageViewer"; // 根据你的路径调整 |
| | | import { getUser, getUserProfile } from "@/api/system/user"; |
| | | import { treeselect } from "@/api/system/dept"; |
| | | import { getSubsidy } from "@/api/project/travelcity"; |
| | |
| | | components: { |
| | | Treeselect, |
| | | Li_area_select, |
| | | CustomImageViewer, |
| | | pdf |
| | | }, |
| | | name: "Funddetail", |
| | |
| | | "sys_recordstatus", |
| | | "sys_travelexpensebelong", |
| | | "sys_traffictype", |
| | | "sys_area_name" |
| | | "sys_area_name", |
| | | "sys_DonationStatus" |
| | | ], |
| | | data() { |
| | | return { |
| | |
| | | invoicefileListto: [], |
| | | invoicepdfimg: "", |
| | | invoicepdfimgsrcList: [], |
| | | currentIndex: 0, // 初始索引 |
| | | invoicecurrentIndex: 0, // 初始索引 |
| | | initialIndex: 0, // 初始索引 |
| | | viewerVisible: false, // 控制预览组件显示 |
| | | invoiceviewerVisible: false, // 控制预览组件显示 |
| | | |
| | | //人员类别 |
| | | persontype: null, |
| | | //到达地 |
| | |
| | | } |
| | | } |
| | | return 0; |
| | | }, |
| | | handleImageClick(index) { |
| | | this.currentIndex = index; |
| | | this.viewerVisible = true; |
| | | }, |
| | | invoicehandleImageClick(index) { |
| | | this.invoicecurrentIndex = index; |
| | | this.invoiceviewerVisible = true; |
| | | }, |
| | | handleViewerClose() { |
| | | this.viewerVisible = false; |
| | | }, |
| | | invoicehandleViewerClose() { |
| | | this.invoiceviewerVisible = false; |
| | | }, |
| | | handleImageError() { |
| | | console.error("图片加载失败"); |
| | |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | this.fileListto.splice(index, 1); |
| | | console.log(this.rbDetails[this.atpresent].annexfilesList); |
| | | indexvalue = this.rbDetails[this.atpresent].annexfilesList.find( |
| | | (item, index) => { |
| | | return item.name == row.name; |
| | | } |
| | | ); |
| | | console.log(indexvalue, "删除索引"); |
| | | this.rbDetails[this.atpresent].annexfilesList.splice(indexvalue, 1); |
| | | // indexvalue = this.rbDetails[this.atpresent].annexfilesList.find( |
| | | // (item, index) => { |
| | | // return item.name == row.name; |
| | | // } |
| | | // ); |
| | | // console.log(indexvalue, "删除索引"); |
| | | // this.rbDetails[this.atpresent].annexfilesList.splice(indexvalue, 1); |
| | | const targetIndex = this.rbDetails[ |
| | | this.atpresent |
| | | ].annexfilesList.findIndex(item => { |
| | | return item.name === row.name; // 建议使用严格相等 === |
| | | }); |
| | | console.log(targetIndex, "删除索引"); // 现在打印的是索引号,例如 0, 1, 2... |
| | | |
| | | if (targetIndex > -1) { |
| | | // 确保找到了元素 |
| | | this.rbDetails[this.atpresent].annexfilesList.splice(targetIndex, 1); |
| | | console.log("删除成功"); |
| | | } else { |
| | | console.log("未找到对应项目,无法删除"); |
| | | } |
| | | } else { |
| | | const indexlist = this.getIndexInArray( |
| | | this.invoicepdfimgsrcList, |
| | |
| | | const index = this.getIndexInArray(this.invoicefileListto, row); |
| | | this.invoicefileListto.splice(index, 1); |
| | | console.log(this.rbDetails[this.atpresent].invoicefilesList); |
| | | indexvalue = this.rbDetails[this.atpresent].invoicefilesList.find( |
| | | (item, index) => { |
| | | return item.name == row.name; |
| | | } |
| | | ); |
| | | console.log(indexvalue, "删除索引"); |
| | | this.rbDetails[this.atpresent].invoicefilesList.splice(indexvalue, 1); |
| | | const targetIndex = this.rbDetails[ |
| | | this.atpresent |
| | | ].invoicefilesList.findIndex(item => { |
| | | return item.name === row.name; // 建议使用严格相等 === |
| | | }); |
| | | console.log(targetIndex, "删除索引"); // 现在打印的是索引号,例如 0, 1, 2... |
| | | |
| | | if (targetIndex > -1) { |
| | | // 确保找到了元素 |
| | | this.rbDetails[this.atpresent].invoicefilesList.splice( |
| | | targetIndex, |
| | | 1 |
| | | ); |
| | | console.log("删除成功"); |
| | | } else { |
| | | console.log("未找到对应项目,无法删除"); |
| | | } |
| | | } |
| | | }, |
| | | // 点击上移 |
| | |
| | | if (item.id == this.form.infoid) { |
| | | this.form.donorno = item.donorno; |
| | | this.form.donorname = item.name; |
| | | |
| | | // 新增:将捐献者的 recordstate 赋值到 invoicecount |
| | | if (item.recordstate !== undefined && item.recordstate !== null) { |
| | | this.form.invoicecount = item.recordstate.toString(); |
| | | } else { |
| | | this.form.invoicecount = ""; // 如果 recordstate 为空,清空字段 |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 添加清除方法 |
| | | clearDonatorInfo() { |
| | | this.form.donorno = ""; |
| | | this.form.donorname = ""; |
| | | this.form.invoicecount = ""; // 清空 invoicecount |
| | | }, |
| | | onpick(e) { |
| | | // console.log(e,this.value1) |
| | | }, |
| | |
| | | 0 |
| | | ); |
| | | |
| | | //校验请款金额合计是否等于报销单金额 |
| | | if (this.form.amountrequested != addnumber) { |
| | | // 保留2位小数后进行比较 |
| | | const requestedAmount = Number(this.form.amountrequested); |
| | | const calculatedAmount = Number(addnumber); |
| | | |
| | | // 使用toFixed保留2位小数 |
| | | if (requestedAmount.toFixed(2) !== calculatedAmount.toFixed(2)) { |
| | | this.$message({ |
| | | message: |
| | | "报销请款表中合计金额不等于报销单的报销金额,请更正后再保存!", |