| | |
| | | <el-table |
| | | :data="rbDetails" |
| | | v-loading="loading" |
| | | max-height="800" |
| | | border |
| | | highlight-current-row |
| | | > |
| | |
| | | prop="orderno" |
| | | align="center" |
| | | label="序号" |
| | | width="65" |
| | | width="88" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.orderno" placeholder="序号" /> |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.applytype" |
| | | v-model="scope.row.applytypename" |
| | | placeholder="服务类型" |
| | | @change="verifyFeeItemType(scope.row)" |
| | | > |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.itemid" |
| | | v-model="scope.row.itemname" |
| | | placeholder="服务项目" |
| | | filterable |
| | | @change="verifyFeeItem(scope.row)" |
| | |
| | | :value="dict.expense"></el-option> |
| | | </el-select> |
| | | --> |
| | | <el-input v-model="scope.row.amount" placeholder="金额" /> |
| | | <el-input |
| | | v-model="scope.row.amount" |
| | | placeholder="金额" |
| | | @blur=" |
| | | val => { |
| | | calculateTax(scope.row, 'A'); |
| | | } |
| | | " |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <el-input |
| | | v-model="scope.row.taxedamount" |
| | | placeholder="税后金额" |
| | | @blur=" |
| | | val => { |
| | | calculateTax(scope.row, 'B'); |
| | | } |
| | | " |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @click="submitForm" |
| | | v-if=" |
| | | operationType == 'add' || |
| | | operationType == 'update' || |
| | | ismanager == true |
| | | operationType == 'update' || |
| | | ismanager == true |
| | | " |
| | | >提交保存</el-button |
| | | > |
| | |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :title="pdftitle" :visible.sync="pdfVisible" width="50%"> |
| | | <el-dialog |
| | | v-dialogDrags |
| | | :modal="false" |
| | | :close-on-click-modal="false" |
| | | :title="pdftitle" |
| | | :visible.sync="pdfVisible" |
| | | width="60%" |
| | | > |
| | | <div class="pdfimg"> |
| | | <div class="box-pdf"> |
| | | <div> |
| | |
| | | class="upload-demo" |
| | | :action="uploadFileUrl" |
| | | :file-list="fileListto" |
| | | :show-file-list="false" |
| | | multiple |
| | | drag |
| | | :limit="20" |
| | | :headers="headers" |
| | | :on-success=" |
| | |
| | | :on-remove="remove" |
| | | accept="image/*,.pdf" |
| | | > |
| | | <el-button |
| | | :disabled="operationType == 'detail'" |
| | | size="small" |
| | | type="primary" |
| | | >上传票据</el-button |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"> |
| | | 将票据拖到此处,或 |
| | | <em |
| | | ><el-button |
| | | :disabled="operationType == 'detail'" |
| | | size="small" |
| | | type="primary" |
| | | >点击上传</el-button |
| | | ></em |
| | | > |
| | | </div> |
| | | <!-- <div class="el-upload__tip" slot="tip"> |
| | | 只能上传jpg/png文件,且不超过500kb |
| | | </div> --> |
| | | </el-upload> |
| | | <el-table |
| | | :data="fileListto" |
| | | @row-click="downFile" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | prop="name" |
| | | :show-overflow-tooltip="true" |
| | | label="名称" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <i style="color:#409EFF" class=" el-icon-s-order" />{{ |
| | | scope.row.name |
| | | }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="name" |
| | | width="180" |
| | | :show-overflow-tooltip="true" |
| | | label="功能" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | @click.native.prevent="deletedowfile(scope.row)" |
| | | >删除</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | @click.native.prevent="moveupdowfile(scope.row)" |
| | | >上移</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- <div |
| | | class="pdftit" |
| | |
| | | listDonatebaseinfo, |
| | | getDonatebaseinfo |
| | | } from "@/api/project/donatebaseinfo"; |
| | | |
| | | import debounce from "lodash/debounce"; |
| | | import { |
| | | onelistFund, |
| | | listFund, |
| | |
| | | rowfeeblocks: [], |
| | | |
| | | fundflowList: [], |
| | | // 随机数 |
| | | randomnumber: "", |
| | | |
| | | //专家/单位选择:expert/unit |
| | | selectionType: "", |
| | |
| | | Modifyornot: 0 //是否修改 |
| | | }; |
| | | }, |
| | | // vue路由控制页面关闭提示 |
| | | beforeRouteLeave(to, from, next) { |
| | | if ( |
| | | JSON.stringify(this.form) == sessionStorage.getItem("apiform") && |
| | | JSON.stringify(this.rbDetails) == sessionStorage.getItem("apifunddetail") |
| | | ) { |
| | | console.log("cg1"); |
| | | sessionStorage.removeItem("apiform"); |
| | | sessionStorage.removeItem("apifunddetail"); |
| | | |
| | | //就是上面的状态 如果是true , 则不询问是否保存, 当然这个方法比较笨, 大家可以使用更优雅的方式 |
| | | next(); |
| | | } else { |
| | | console.log("cg2"); |
| | | this.$confirm("离开页面 , 更新数据将不做保存, 请确认已经保存", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | sessionStorage.removeItem("apiform"); |
| | | sessionStorage.removeItem("apifunddetail"); |
| | | this.$router.go(-1); |
| | | next(); |
| | | }) |
| | | .catch(() => { |
| | | // alert("router") |
| | | }); |
| | | } |
| | | }, |
| | | //监听属性 类似于data概念 |
| | | computed: {}, |
| | | //监控data中的数据变化 |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | generateRandomString(length) { |
| | | const characters = |
| | | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; |
| | | let randomString = ""; |
| | | for (let i = 0; i < length; i++) { |
| | | randomString += characters.charAt( |
| | | Math.floor(Math.random() * characters.length) |
| | | ); |
| | | } |
| | | return randomString; |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | submitForm: debounce(function() { |
| | | if (!this.randomnumber) { |
| | | this.randomnumber = this.generateRandomString(9); |
| | | this.form.randomnumber = this.randomnumber; |
| | | } |
| | | console.log(this.randomnumber); |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.formData = this.form; |
| | |
| | | } |
| | | this.rbDetails[i] = tempDetail; |
| | | /* |
| | | //计算个税 |
| | | //计算个税 |
| | | //if (isNaN(parseFloat(tempDetail.taxedamount))) |
| | | //获取参数 |
| | | this.taxParam.beneficiaryNo = tempDetail.beneficiaryno; |
| | |
| | | tempDetail.taxamount = res.data; |
| | | tempDetail.taxedamount = tempDetail.amount - tempDetail.taxamount; |
| | | this.rbDetails[k] = tempDetail; |
| | | |
| | | |
| | | this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | this.totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 计算税前、税费、税后金额 |
| | | if (tempDetail.amount == undefined || tempDetail.amount == null || tempDetail.amount == 0 || tempDetail.amount == '') { |
| | | //获取参数 |
| | |
| | | tempDetail.taxamount = res.data.nowTax; |
| | | tempDetail.amount = parseFloat(res.data.nowTaxBeforeMoney); |
| | | this.rbDetails[k] = tempDetail; |
| | | |
| | | |
| | | this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | this.totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | |
| | | this.$router.go(-1); |
| | | } |
| | | }); |
| | | }, |
| | | }, 500), |
| | | |
| | | //审批提交 |
| | | checksubmit() { |
| | |
| | | row.amount = 0.0; |
| | | row.taxamount = 0.0; |
| | | row.taxedamount = item.expense; |
| | | |
| | | //计算税前金额 |
| | | this.calculateTax(row, "B"); |
| | | } else { |
| | | row.amount = item.expense; |
| | | row.taxamount = 0.0; |
| | | row.taxedamount = 0.0; |
| | | |
| | | //计算税后金额 |
| | | this.calculateTax(row, "A"); |
| | | } |
| | | |
| | | this.form.serviceFunddetails = 0; |
| | |
| | | }); |
| | | }, |
| | | |
| | | //计算个税:type(A:已知税前金额,计算税后金额;B:已知税后金额,计算税前金额) |
| | | calculateTax(row, type) { |
| | | //if (isNaN(parseFloat(tempDetail.taxedamount))) |
| | | //获取参数 |
| | | this.taxParam.beneficiaryNo = row.beneficiaryno; |
| | | this.taxParam.startTime = this.form.createTime.substring(0, 10); |
| | | |
| | | if (type == "A") { |
| | | // 计算个税、税后金额 |
| | | this.taxParam.money = row.amount.toString(); |
| | | getTaxByBeneFiciaryNo(this.taxParam).then(res => { |
| | | if (res.code == 200) { |
| | | row.taxamount = res.data; |
| | | row.taxedamount = row.amount - row.taxamount; |
| | | } |
| | | }); |
| | | } else { |
| | | // 计算税前、个税金额 |
| | | this.taxParam.money = row.taxedamount.toString(); |
| | | getTaxBeforeByAfterMoney(this.taxParam).then(res => { |
| | | if (res.code == 200) { |
| | | row.taxamount = res.data.nowTax; |
| | | row.amount = parseFloat(res.data.nowTaxBeforeMoney); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | //导入所有项目 |
| | | importFeeItems() { |
| | | this.loading = true; |
| | |
| | | }, |
| | | // 接受提醒立刻保存 |
| | | Savenow() { |
| | | if (!this.randomnumber) { |
| | | this.randomnumber = this.generateRandomString(9); |
| | | this.form.randomnumber = this.randomnumber; |
| | | } |
| | | this.Savereminder = false; |
| | | this.Reminderquantity = 0; |
| | | this.totalquantity = 0; |
| | |
| | | } |
| | | this.rbDetails[i] = tempDetail; |
| | | /* |
| | | //计算个税 |
| | | //计算个税 |
| | | //if (isNaN(parseFloat(tempDetail.taxedamount))) |
| | | //获取参数 |
| | | this.taxParam.beneficiaryNo = tempDetail.beneficiaryno; |
| | |
| | | tempDetail.taxamount = res.data; |
| | | tempDetail.taxedamount = tempDetail.amount - tempDetail.taxamount; |
| | | this.rbDetails[k] = tempDetail; |
| | | |
| | | |
| | | this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | this.totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | |
| | | tempDetail.taxamount = res.data.nowTax; |
| | | tempDetail.amount = parseFloat(res.data.nowTaxBeforeMoney); |
| | | this.rbDetails[k] = tempDetail; |
| | | |
| | | |
| | | this.totalAfterTaxAmount += parseFloat(tempDetail.taxedamount); |
| | | this.totalAmount += parseFloat(tempDetail.amount); |
| | | } |
| | |
| | | rowfeeblocks: [], |
| | | annexfiles: null |
| | | }; |
| | | if (this.Reminderquantity >= 5) { |
| | | this.Savereminder = true; |
| | | return; |
| | | } |
| | | // if (this.Reminderquantity >= 5) { |
| | | // this.Savereminder = true; |
| | | // return; |
| | | // } |
| | | if (rowIndex == undefined || rowIndex == null || rowIndex < 0) { |
| | | this.rbDetails.push(rowData); |
| | | } else { |
| | |
| | | this.addRow(0); |
| | | } |
| | | }, |
| | | |
| | | //计算个税 |
| | | calculateTax() {}, |
| | | |
| | | //计算总金额 |
| | | sumTotalFee(row) { |
| | |
| | | handleUploadError() {}, |
| | | |
| | | /** 下载文件按钮操作 */ |
| | | downFile(item) { |
| | | const url = process.env.VUE_APP_BASE_API + item.url; |
| | | var a = document.createElement("a"); |
| | | var event = new MouseEvent("click"); |
| | | a.download = item.name; |
| | | a.href = url; |
| | | a.dispatchEvent(event); |
| | | }, |
| | | // downFile(item) { |
| | | // const url = process.env.VUE_APP_BASE_API + item.url; |
| | | // var a = document.createElement("a"); |
| | | // var event = new MouseEvent("click"); |
| | | // a.download = item.name; |
| | | // a.href = url; |
| | | // a.dispatchEvent(event); |
| | | // }, |
| | | |
| | | // remove(file) { |
| | | // this.fileList.splice(this.fileList.indexOf(file), 1) |
| | |
| | | this.form.filename = file.raw.name; |
| | | |
| | | this.$modal.msgSuccess(response.msg); |
| | | // this.fileListto.push({ name: file.name, url: response.fileName }); |
| | | this.fileListto.push({ name: file.name, url: response.url }); |
| | | this.fileListto.push({ name: file.name, url: response.fileName }); |
| | | // this.fileListto.push({ name: file.name, url: response.url }); |
| | | this.pdfimgsrcList.push( |
| | | this.Networkheader + "/prod-api" + response.fileName |
| | | ); |
| | | // this.pdfimgsrcList.push(response.url); |
| | | |
| | | this.rbDetails[this.atpresent].annexfilesList = this.fileListto; |
| | | } else { |
| | | console.log(response.msg); |
| | |
| | | this.pdfVisible = true; |
| | | if (this.rbDetails[index].annexfilesList) { |
| | | this.fileListto = this.rbDetails[index].annexfilesList; |
| | | // this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url; |
| | | this.pdfimg = this.fileListto[0].url; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url; |
| | | // this.pdfimg = this.fileListto[0].url; |
| | | this.pdfimgsrcList = []; |
| | | this.pdfimgsrcList.push(this.pdfimg); |
| | | this.fileListto.forEach(item => { |
| | | this.pdfimgsrcList.push(this.Networkheader + "/prod-api" + item.url); |
| | | }); |
| | | console.log(this.pdfimgsrcList); |
| | | console.log(this.pdfimg); |
| | | } else { |
| | | this.fileListto = []; |
| | |
| | | this.pdftitle = ""; |
| | | } |
| | | }, |
| | | |
| | | // 点击已上传文件 |
| | | downFile(item) { |
| | | console.log(item); |
| | | this.pdftitle = item.name; |
| | | let name = item.name.split("."); |
| | | if (name[1] == "pdf") { |
| | |
| | | this.previewpdf = true; |
| | | if (item.url) { |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.url; |
| | | this.pdfimgsrcList = []; |
| | | this.pdfimgsrcList.push(this.pdfimg); |
| | | // this.pdfimg = item.url; |
| | | // this.pdfimgsrcList = []; |
| | | // this.pdfimgsrcList.push(this.pdfimg); |
| | | if (!this.pdfimgsrcList.includes(this.pdfimg)) { |
| | | this.pdfimgsrcList.push(this.pdfimg); |
| | | console.log("加入"); |
| | | } |
| | | console.log(this.pdfimg); |
| | | } else { |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.response.url; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.url; |
| | | } |
| | | } else { |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | |
| | | this.previewpdf = false; |
| | | } |
| | | }, |
| | | |
| | | getIndexInArray(arr, obj) { |
| | | return arr.indexOf(obj); |
| | | }, |
| | | // 点击删除 |
| | | deletedowfile(row) { |
| | | console.log(this.fileListto); |
| | | console.log(row); |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | this.fileList = this.fileListto.splice(index, 1); |
| | | console.log(index); |
| | | }, |
| | | // 点击上移 |
| | | moveupdowfile(row) { |
| | | const index = this.getIndexInArray(this.fileListto, row); |
| | | const item = this.fileListto.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中 |
| | | this.fileListto.splice(index - 1, 0, item); // 将item插入到索引位置的前一位 |
| | | }, |
| | | //专家/医疗机构/费用报销机构选择 |
| | | ShowDetailDialog(spoce, showType) { |
| | | this.selectionType = showType; |
| | |
| | | |
| | | beforeCreate() {}, //生命周期 - 创建之前 |
| | | beforeMount() {}, //生命周期 - 挂载之前 |
| | | beforeUpdate() { |
| | | console.log("beforeUpdate"); |
| | | }, //生命周期 - 更新之前 |
| | | beforeUpdate() {}, //生命周期 - 更新之前 |
| | | updated() {}, //生命周期 - 更新之后 |
| | | beforeDestroy() {}, //生命周期 - 销毁之前 |
| | | destroyed() {}, //生命周期 - 销毁完成 |
| | |
| | | height: 600px; |
| | | |
| | | .box-pdf { |
| | | width: 200px; |
| | | width: 400px; |
| | | padding-top: 20px; |
| | | margin-right: 30px; |
| | | border: 1px solid #dcdfe6; |